|
@@ -9,6 +9,7 @@ import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.dromara.common.redis.utils.RedisUtils;
|
|
import org.dromara.common.redis.utils.RedisUtils;
|
|
@@ -707,4 +708,32 @@ public class GameEventProjectServiceImpl implements IGameEventProjectService {
|
|
|
Collectors.toMap(GameEventProject::getProjectId, GameEventProject::getProjectName));
|
|
Collectors.toMap(GameEventProject::getProjectId, GameEventProject::getProjectName));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public TableDataInfo<GameEventProjectVo> queryPageListWithStats(GameEventProjectBo bo, PageQuery pageQuery) {
|
|
|
|
|
+ // 处理默认赛事 ID
|
|
|
|
|
+ if (bo.getEventId() == null) {
|
|
|
|
|
+ Object cacheObject = RedisUtils.getCacheObject(GameEventConstant.DEFAULT_EVENT_ID);
|
|
|
|
|
+ if (cacheObject instanceof Integer) {
|
|
|
|
|
+ bo.setEventId(((Integer) cacheObject).longValue());
|
|
|
|
|
+ } else if (cacheObject instanceof Long) {
|
|
|
|
|
+ bo.setEventId((Long) cacheObject);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ Page<GameEventProjectVo> result = baseMapper.selectPageWithStats(pageQuery.build(), bo);
|
|
|
|
|
+ List<GameEventProjectVo> rows = result.getRecords();
|
|
|
|
|
+ // 补充展示数据(赛事名称、裁判组列表)
|
|
|
|
|
+ GameEvent gameEvent = gameEventMapper.selectById(bo.getEventId());
|
|
|
|
|
+ rows.forEach(vo -> {
|
|
|
|
|
+ if (gameEvent != null) {
|
|
|
|
|
+ vo.setEventName(gameEvent.getEventName());
|
|
|
|
|
+ }
|
|
|
|
|
+ if (StringUtils.isNotEmpty(vo.getRefereeGroup())) {
|
|
|
|
|
+ vo.setRefereeGroups(JSONUtil.toList(vo.getRefereeGroup(), Long.class));
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ return TableDataInfo.build(result);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|