Commit cf2a23dd by liuyu

2023/10/19 模板搜索和更新时间bug修复

parent 16e2d7b7
......@@ -88,7 +88,7 @@ public class TemplateTitleServiceImpl implements TemplateTitleService {
res.add(map);
}
Tools.sortByField(res, orderField, isAsc);
resultMap.put("count", templateTitleVoMap.size());
resultMap.put("count", res.size());
// 分页判断
limit = limit > res.size() ? 0 : limit;
resultMap.put("list", res.subList(limit, Math.min((limit + size), res.size())));
......
......@@ -222,6 +222,7 @@ public class TemplateTitleServiceImpl implements TemplateTitleService {
if (Objects.nonNull(daySum)) {
templateTitleVo.accSum(daySum);
}
templateTitleVo.setUpdateTime(new Date());
redissonUtil.setMapValue(mapKey, title, JSONObject.toJSONString(templateTitleVo));
log.info("模板更新,id:{},标注总量:{},标注天级:{},标签:{}", templateTitleVo.getId(), templateTitleVo.getMarkSum(), templateTitleVo.getDaySum(), templateTitleVo.getMtag());
}
......
......@@ -264,8 +264,8 @@ public class TaskServiceCommon extends BaseTaskTypePair<TaskServiceCommon.TaskCo
templateTitleService.insertTemplateRecord(new TemplateRecord(templateTitleVo.getId(), title, id, getUrl(markInfo), getPlatform(markInfo),
sourceObj.getString("source"), sourceObj.getString("real_source"), Tools.TIME_FORMAT.format(sourceObj.getLong("time")), updates[0]));
// 测试环境临时添加,用于对比
templateRecordDao.tempRecord(new TemplateTempRecord(templateTitleVo.getId(), templateTitleVo.getTemplateTitle(), group, getUrl(markInfo),
id, templateTitleVo.getMtag()));
// templateRecordDao.tempRecord(new TemplateTempRecord(templateTitleVo.getId(), templateTitleVo.getTemplateTitle(), group, getUrl(markInfo),
// id, templateTitleVo.getMtag()));
return true;
} catch (Exception e) {
log.error("记录事件采集-标注数据特征值失败", e);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment