|
@@ -195,18 +195,7 @@ public class ToClientServiceImpl implements IToClientService {
|
|
|
*/
|
|
*/
|
|
|
@Override
|
|
@Override
|
|
|
public List<GameAppEvent> getEventList(Long refereeId) {
|
|
public List<GameAppEvent> getEventList(Long refereeId) {
|
|
|
- List<GameEvent> res = gameEventMapper.selectList(Wrappers.lambdaQuery(GameEvent.class)
|
|
|
|
|
- .orderByDesc(GameEvent::getCreateTime)
|
|
|
|
|
- .apply("event_id in (select event_id from game_referee where referee_id = {0})", refereeId)
|
|
|
|
|
- .select(GameEvent::getEventId, GameEvent::getEventCode, GameEvent::getEventName,
|
|
|
|
|
- GameEvent::getCreateTime));
|
|
|
|
|
- return res.isEmpty() ? new ArrayList<>() : res.stream().map(e -> {
|
|
|
|
|
- GameAppEvent appEvent = BeanUtil.copyProperties(e, GameAppEvent.class);
|
|
|
|
|
- appEvent.setId(e.getEventId());
|
|
|
|
|
- appEvent.setBianhao(e.getEventCode());
|
|
|
|
|
- appEvent.setName(e.getEventName());
|
|
|
|
|
- return appEvent;
|
|
|
|
|
- }).toList();
|
|
|
|
|
|
|
+ return gameEventMapper.selectRefereeEventList(refereeId);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -260,12 +249,12 @@ public class ToClientServiceImpl implements IToClientService {
|
|
|
|
|
|
|
|
// 批量查询字典数据,避免多次调用 Redis/MySQL 交互
|
|
// 批量查询字典数据,避免多次调用 Redis/MySQL 交互
|
|
|
Map<String, List<SysDictDataVo>> dictMap = dictService.selectDictDataByTypes(List.of(
|
|
Map<String, List<SysDictDataVo>> dictMap = dictService.selectDictDataByTypes(List.of(
|
|
|
- "game_project_type", "game_score_type", "game_order_type",
|
|
|
|
|
|
|
+ "game_project_type", "game_score_type",
|
|
|
"sys_group_sex", "game_stage", "game_round"));
|
|
"sys_group_sex", "game_stage", "game_round"));
|
|
|
|
|
|
|
|
vo.setType(getDictLabelFromMap(dictMap, "game_project_type", vo.getType()));
|
|
vo.setType(getDictLabelFromMap(dictMap, "game_project_type", vo.getType()));
|
|
|
vo.setChengjiType(getDictLabelFromMap(dictMap, "game_score_type", vo.getChengjiType()));
|
|
vo.setChengjiType(getDictLabelFromMap(dictMap, "game_score_type", vo.getChengjiType()));
|
|
|
- vo.setPaiMing(getDictLabelFromMap(dictMap, "game_order_type", vo.getPaiMing()));
|
|
|
|
|
|
|
+ vo.setPaiMing(String.format("[%s]", vo.getPaiMing()));
|
|
|
vo.setSex(getDictLabelFromMap(dictMap, "sys_group_sex", vo.getSex()));
|
|
vo.setSex(getDictLabelFromMap(dictMap, "sys_group_sex", vo.getSex()));
|
|
|
vo.setJieduan(getDictLabelFromMap(dictMap, "game_stage", vo.getJieduan()));
|
|
vo.setJieduan(getDictLabelFromMap(dictMap, "game_stage", vo.getJieduan()));
|
|
|
vo.setLunci(getDictLabelFromMap(dictMap, "game_round", vo.getLunci()));
|
|
vo.setLunci(getDictLabelFromMap(dictMap, "game_round", vo.getLunci()));
|