|
@@ -3,6 +3,10 @@ package com.zhongzheng.modules.inform.service.impl;
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.zhongzheng.common.utils.DateUtils;
|
|
|
+import com.zhongzheng.modules.grade.bo.ClassGradeUserQueryBo;
|
|
|
+import com.zhongzheng.modules.grade.mapper.ClassGradeUserMapper;
|
|
|
+import com.zhongzheng.modules.grade.vo.ClassGradeUserGoodsVo;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
@@ -16,6 +20,8 @@ import com.zhongzheng.modules.inform.mapper.InformUserMapper;
|
|
|
import com.zhongzheng.modules.inform.vo.InformUserVo;
|
|
|
import com.zhongzheng.modules.inform.service.IInformUserService;
|
|
|
|
|
|
+import javax.swing.plaf.nimbus.State;
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.Collection;
|
|
|
import java.util.Collections;
|
|
|
import java.util.List;
|
|
@@ -30,6 +36,9 @@ import java.util.stream.Collectors;
|
|
|
@Service
|
|
|
public class InformUserServiceImpl extends ServiceImpl<InformUserMapper, InformUser> implements IInformUserService {
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ClassGradeUserMapper classGradeUserMapper;
|
|
|
+
|
|
|
@Override
|
|
|
public InformUserVo queryById(Long id){
|
|
|
InformUser db = this.baseMapper.selectById(id);
|
|
@@ -102,6 +111,20 @@ public class InformUserServiceImpl extends ServiceImpl<InformUserMapper, InformU
|
|
|
|
|
|
@Override
|
|
|
public List<InformUserVo> queryUserList(InformUserQueryBo bo) {
|
|
|
- return baseMapper.queryUserList(bo);
|
|
|
+ List<InformUserVo> informUserVos = baseMapper.queryUserList(bo);
|
|
|
+ for (InformUserVo informUserVo : informUserVos) {
|
|
|
+ ClassGradeUserQueryBo classGradeUserQueryBo = new ClassGradeUserQueryBo();
|
|
|
+ classGradeUserQueryBo.setUserId(informUserVo.getUserId());
|
|
|
+ List<Integer> status = new ArrayList<>();
|
|
|
+ status.add(1);
|
|
|
+ classGradeUserQueryBo.setStatus(status);
|
|
|
+ List<ClassGradeUserGoodsVo> classGradeUserGoodsVos = classGradeUserMapper.listUser(classGradeUserQueryBo);
|
|
|
+ for (ClassGradeUserGoodsVo classGradeUserGoodsVo : classGradeUserGoodsVos) {
|
|
|
+ List<String> className = new ArrayList<>();
|
|
|
+ className.add(classGradeUserGoodsVo.getGradeName());
|
|
|
+ informUserVo.setClassName(className);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return informUserVos;
|
|
|
}
|
|
|
}
|