|
@@ -1,31 +1,30 @@
|
|
|
package org.dromara.system.service.impl;
|
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
-import org.dromara.common.core.utils.MapstructUtils;
|
|
|
-import org.dromara.common.core.utils.StringUtils;
|
|
|
-import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
|
-import org.dromara.common.mybatis.core.page.PageQuery;
|
|
|
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.dromara.common.core.utils.MapstructUtils;
|
|
|
+import org.dromara.common.core.utils.StringUtils;
|
|
|
+import org.dromara.common.mybatis.core.page.PageQuery;
|
|
|
+import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
|
import org.dromara.common.redis.utils.RedisUtils;
|
|
|
+import org.dromara.system.domain.Advice;
|
|
|
+import org.dromara.system.domain.bo.AdviceBo;
|
|
|
import org.dromara.system.domain.bo.GameTeamBo;
|
|
|
import org.dromara.system.domain.constant.GameEventConstant;
|
|
|
-import org.dromara.system.domain.vo.GameTeamVo;
|
|
|
-import org.dromara.system.service.IGameTeamService;
|
|
|
-import org.springframework.stereotype.Service;
|
|
|
-import org.dromara.system.domain.bo.AdviceBo;
|
|
|
import org.dromara.system.domain.vo.AdviceVo;
|
|
|
-import org.dromara.system.domain.Advice;
|
|
|
+import org.dromara.system.domain.vo.GameTeamVo;
|
|
|
import org.dromara.system.mapper.AdviceMapper;
|
|
|
import org.dromara.system.service.IAdviceService;
|
|
|
+import org.dromara.system.service.IGameTeamService;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.util.Collection;
|
|
|
import java.util.Collections;
|
|
|
import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-import java.util.Collection;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
@@ -67,10 +66,13 @@ public class AdviceServiceImpl implements IAdviceService {
|
|
|
bo.setEventId(defaultEventId);
|
|
|
LambdaQueryWrapper<Advice> lqw = buildQueryWrapper(bo);
|
|
|
Page<AdviceVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
|
|
- result.getRecords().stream()
|
|
|
+ result.getRecords()
|
|
|
+ .stream()
|
|
|
.map(vo -> {
|
|
|
GameTeamVo gameTeamVo = gameTeamService.queryById(vo.getTeamId());
|
|
|
- vo.setTeamName(gameTeamVo.getTeamName());
|
|
|
+ if(gameTeamVo!=null) {
|
|
|
+ vo.setTeamName(gameTeamVo.getTeamName());
|
|
|
+ }
|
|
|
return vo;
|
|
|
})
|
|
|
.collect(Collectors.toList());
|