【代码优化】SYSTEM:操作日志,增加异步记录

This commit is contained in:
YunaiV
2024-08-31 13:28:30 +08:00
parent 424922b488
commit 56ae4503a6
7 changed files with 45 additions and 28 deletions

View File

@ -63,6 +63,7 @@ public class BpmModelServiceImpl implements BpmModelService {
@Override
public PageResult<Model> getModelPage(BpmModelPageReqVO pageVO) {
ModelQuery modelQuery = repositoryService.createModelQuery();
modelQuery.modelTenantId(FlowableUtils.getTenantId());
if (StrUtil.isNotBlank(pageVO.getKey())) {
modelQuery.modelKey(pageVO.getKey());
}
@ -78,7 +79,6 @@ public class BpmModelServiceImpl implements BpmModelService {
return PageResult.empty(count);
}
List<Model> models = modelQuery
.modelTenantId(FlowableUtils.getTenantId())
.orderByCreateTime().desc()
.listPage(PageUtils.getStart(pageVO), pageVO.getPageSize());
return new PageResult<>(models, count);

View File

@ -97,7 +97,7 @@ public class BpmTaskServiceImpl implements BpmTaskService {
}
if (ArrayUtil.isNotEmpty(pageVO.getCreateTime())) {
taskQuery.taskCreatedAfter(DateUtils.of(pageVO.getCreateTime()[0]));
taskQuery.taskCreatedAfter(DateUtils.of(pageVO.getCreateTime()[1]));
taskQuery.taskCreatedBefore(DateUtils.of(pageVO.getCreateTime()[1]));
}
long count = taskQuery.count();
if (count == 0) {
@ -119,7 +119,7 @@ public class BpmTaskServiceImpl implements BpmTaskService {
}
if (ArrayUtil.isNotEmpty(pageVO.getCreateTime())) {
taskQuery.taskCreatedAfter(DateUtils.of(pageVO.getCreateTime()[0]));
taskQuery.taskCreatedAfter(DateUtils.of(pageVO.getCreateTime()[1]));
taskQuery.taskCreatedBefore(DateUtils.of(pageVO.getCreateTime()[1]));
}
// 执行查询
long count = taskQuery.count();
@ -141,7 +141,7 @@ public class BpmTaskServiceImpl implements BpmTaskService {
}
if (ArrayUtil.isNotEmpty(pageVO.getCreateTime())) {
taskQuery.taskCreatedAfter(DateUtils.of(pageVO.getCreateTime()[0]));
taskQuery.taskCreatedAfter(DateUtils.of(pageVO.getCreateTime()[1]));
taskQuery.taskCreatedBefore(DateUtils.of(pageVO.getCreateTime()[1]));
}
// 执行查询
long count = taskQuery.count();