|
@ -0,0 +1,41 @@ |
|
|
|
|
|
package com.lottery.admin.service.Impl; |
|
|
|
|
|
|
|
|
|
|
|
import com.lottery.admin.mapper.IWinMapper; |
|
|
|
|
|
import com.lottery.admin.service.IWinService; |
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.Collections; |
|
|
|
|
|
import java.util.HashMap; |
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @program: lottery-system |
|
|
|
|
|
* @ClassName IWinServiceImpl |
|
|
|
|
|
* @description: |
|
|
|
|
|
* @author:jihaipeng |
|
|
|
|
|
* @create: 2025−07-12 17:20 |
|
|
|
|
|
* @Version 1.0 |
|
|
|
|
|
**/ |
|
|
|
|
|
@Service |
|
|
|
|
|
public class IWinServiceImpl implements IWinService { |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
private IWinMapper iWinMapper; |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public List<Map<String, Object>> getWinRecordsByConditions(String username, String jwcode, String gradeName) { |
|
|
|
|
|
// 如果所有条件都为空,可以返回空列表或抛出异常,避免全表扫描 |
|
|
|
|
|
if (username == null && jwcode == null && gradeName == null) { |
|
|
|
|
|
return Collections.emptyList(); // 或者抛出异常 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> params = new HashMap<>(); |
|
|
|
|
|
params.put("username", username); |
|
|
|
|
|
params.put("jwcode", jwcode); |
|
|
|
|
|
params.put("gradeName", gradeName); |
|
|
|
|
|
|
|
|
|
|
|
return iWinMapper.selectWinRecordsByConditions(params); |
|
|
|
|
|
} |
|
|
|
|
|
} |