|
@@ -4,10 +4,16 @@ import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.core.convert.Convert;
|
|
|
import cn.hutool.core.lang.Validator;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
|
import com.zhongzheng.common.exception.CustomException;
|
|
|
import com.zhongzheng.common.utils.DateUtils;
|
|
|
import com.zhongzheng.common.utils.ServletUtils;
|
|
|
import com.zhongzheng.common.utils.ip.IpUtils;
|
|
|
+import com.zhongzheng.modules.bank.domain.ExamTemp;
|
|
|
+import com.zhongzheng.modules.bank.service.IExamTempService;
|
|
|
+import com.zhongzheng.modules.exam.domain.ExamPaper;
|
|
|
+import com.zhongzheng.modules.exam.service.IExamPaperService;
|
|
|
import com.zhongzheng.modules.grade.domain.UserPeriod;
|
|
|
import com.zhongzheng.modules.grade.domain.UserPeriodStatus;
|
|
|
import com.zhongzheng.modules.grade.service.IUserPeriodService;
|
|
@@ -21,6 +27,7 @@ import com.zhongzheng.modules.user.mapper.UserBankRecordMapper;
|
|
|
import com.zhongzheng.modules.user.mapper.UserStudyRecordMapper;
|
|
|
import com.zhongzheng.modules.user.service.*;
|
|
|
import com.zhongzheng.modules.user.vo.UserBankRecordVo;
|
|
|
+import com.zhongzheng.modules.user.vo.UserExamRecordVo;
|
|
|
import com.zhongzheng.modules.user.vo.UserVo;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
@@ -70,6 +77,12 @@ public class UserBankRecordServiceImpl extends ServiceImpl<UserBankRecordMapper,
|
|
|
@Autowired
|
|
|
private IUserStudyRecordService iUserStudyRecordService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IExamTempService iExamTempService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IExamPaperService iExamPaperService;
|
|
|
+
|
|
|
|
|
|
|
|
|
private static Logger log = LoggerFactory.getLogger(UserBankRecordServiceImpl.class);
|
|
@@ -275,7 +288,21 @@ public class UserBankRecordServiceImpl extends ServiceImpl<UserBankRecordMapper,
|
|
|
|
|
|
@Override
|
|
|
public List<UserBankRecordVo> getUserBankList(UserBankRecordQueryBo bo) {
|
|
|
- return baseMapper.getUserBankList(bo);
|
|
|
+ List<UserBankRecordVo> userBankList = baseMapper.getUserBankList(bo);
|
|
|
+ if (!CollectionUtils.isEmpty(userBankList)){
|
|
|
+ for (UserBankRecordVo vo : userBankList) {
|
|
|
+ if (StringUtils.isBlank(vo.getExamName()) && StringUtils.isBlank(vo.getPaperName())){
|
|
|
+ //随机练习的试卷
|
|
|
+ ExamTemp examTemp = iExamTempService.getById(vo.getExamId());
|
|
|
+ if (ObjectUtils.isNotNull(examTemp)){
|
|
|
+ vo.setExamName(examTemp.getExamName());
|
|
|
+ ExamPaper examPaper = iExamPaperService.getById(examTemp.getExamPaperId());
|
|
|
+ vo.setPaperName(ObjectUtils.isNotNull(examPaper)?examPaper.getPaperName():"");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return userBankList;
|
|
|
}
|
|
|
|
|
|
|