新增方法:计算最近任务创建时间差修改

devhuozheluoji
DELL 2 years ago
parent eb50805c86
commit d092e9c418

@ -63,8 +63,6 @@ public class OcrIdentifyServiceImpl extends ServiceImpl<OcrIdentifyMapper, OcrId
RedisUtil redisUtil;
@Resource
IOcrIdentifyCallbackLogService ocrIdentifyCallbackLogService;
@Resource
private IOcrIdentifyService ocrIdentifyService;
@Override
public OcrIdentifyDTO findById(String id) {
@ -1227,7 +1225,7 @@ public class OcrIdentifyServiceImpl extends ServiceImpl<OcrIdentifyMapper, OcrId
public long calculateTimeDifference(String taskName) {
QueryWrapper<OcrIdentify> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("taskName", taskName).orderByDesc("createTime").last("LIMIT 1");
OcrIdentify lastIdentify = ocrIdentifyService.getOne(queryWrapper);
OcrIdentify lastIdentify = this.getOne(queryWrapper);
if (lastIdentify != null) {
Date lastCreateTime = lastIdentify.getCreateTime();
Date currentTime = new Date();

Loading…
Cancel
Save