|
|
@ -1,5 +1,6 @@ |
|
|
package com.project.question.domain.service.impl; |
|
|
package com.project.question.domain.service.impl; |
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.date.DateUtil; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.project.base.domain.result.Result; |
|
|
import com.project.base.domain.result.Result; |
|
|
import com.project.question.domain.entity.TaskKnowledgeClusterEntity; |
|
|
import com.project.question.domain.entity.TaskKnowledgeClusterEntity; |
|
|
@ -43,7 +44,7 @@ public class QuestionInventoryDomainServiceImpl implements QuestionInventoryDoma |
|
|
@Override |
|
|
@Override |
|
|
public void checkAndReplenish(Long taskId) { |
|
|
public void checkAndReplenish(Long taskId) { |
|
|
TaskEntity task = taskMapper.selectById(taskId); |
|
|
TaskEntity task = taskMapper.selectById(taskId); |
|
|
if (task == null || task.getEndTime().before(new Date())) { |
|
|
if (task == null || DateUtil.endOfDay(task.getEndTime()).before(new Date())) { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
int watermark = getWatermark(task); |
|
|
int watermark = getWatermark(task); |
|
|
@ -85,7 +86,7 @@ public class QuestionInventoryDomainServiceImpl implements QuestionInventoryDoma |
|
|
@Override |
|
|
@Override |
|
|
public Result<String> checkAndReplenishBoolean(Long taskId) { |
|
|
public Result<String> checkAndReplenishBoolean(Long taskId) { |
|
|
TaskEntity task = taskMapper.selectById(taskId); |
|
|
TaskEntity task = taskMapper.selectById(taskId); |
|
|
if (task == null || task.getEndTime().before(new Date())) { |
|
|
if (task == null || DateUtil.endOfDay(task.getEndTime()).before(new Date())) { |
|
|
return Result.success("考试任务不存在"); |
|
|
return Result.success("考试任务不存在"); |
|
|
} |
|
|
} |
|
|
int unpassed = getUnpassedCount(task); |
|
|
int unpassed = getUnpassedCount(task); |
|
|
|