Accept Merge Request #70: (hyc -> master)

Merge Request: 【修改】更新状态

Created By: @华允传
Accepted By: @华允传
URL: https://g-iswv8783.coding.net/p/education/d/pengchen-exam-java/git/merge/70?initial=true
This commit is contained in:
华允传
2025-05-20 23:27:24 +08:00
committed by Coding

View File

@@ -115,6 +115,9 @@ public class MonitorServiceImpl implements MonitorService {
public long getStuMonitor(StuMonitorPaperVo stuMonitorPaperVo) {
String key = "userCache:"+stuMonitorPaperVo.getTaskId()+":" + stuMonitorPaperVo.getStuId();
MonitorDO info = JsonUtils.parseObject(stringRedisTemplate.opsForValue().get(key),MonitorDO.class);
if (info==null){
return 0L;
}
if (StringUtils.isNotBlank(stuMonitorPaperVo.getPaperId())){
EducationPaper educationPaper = educationPaperMapper.selectEducationPaperByPaperId(stuMonitorPaperVo.getPaperId());
String counts = educationPaper.getCounts();
@@ -199,7 +202,7 @@ public class MonitorServiceImpl implements MonitorService {
info.setRemainingTime((long) examTime.toLocalTime().toSecondOfDay());
stringRedisTemplate.opsForValue().set("userCache:"+stuMonitorPaperVo.getTaskId()+":"+stuMonitorPaperVo.getStuId(), JsonUtils.toJsonString(info));
monitorMapper.updateById(info);
return (long) examTime.toLocalTime().toSecondOfDay();