feat:修改

new-exam
wangxy 5 months ago
parent 6c85bcb3cc
commit 370ea0078f

@ -1,6 +1,8 @@
package com.ruoyi.web.controller.manager;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.system.domain.check.TdCheckReport;
import com.ruoyi.system.domain.paper.dto.request.PaperListReqDTO;
import com.ruoyi.system.domain.paper.dto.response.PaperListRespDTO;
@ -50,7 +52,9 @@ public class UserExamManager {
* @return java.util.List<com.hyp.system.domain.SysNotice>
*/
public List<UserExamRespDTO> selectExamList(UserExamReqDTO reqDTO) {
reqDTO.setUserId(getUserId());
if (!SysUser.isAdmin(ShiroUtils.getUserId())){
reqDTO.setUserId(getUserId());
}
return elUserExamService.selectExamList(reqDTO);
}
@ -77,11 +81,14 @@ public class UserExamManager {
record.setExamId(examId);
record.setMaxScore(score);
record.setPassed(passed);
record.setTryCount(1);
elUserExamService.save(record);
return;
}
// 修复低分数不加入统计问题
record.setTryCount(record.getTryCount()+1);
if(Objects.nonNull(record.getTryCount())){
record.setTryCount(record.getTryCount()+1);
}
record.setUpdateTime(new Date());
if(record.getMaxScore() < score){
record.setMaxScore(score);

Loading…
Cancel
Save