perf(): 优化安全环境检查getOne查询
parent
b64c1048a0
commit
a5620c3a27
|
|
@ -233,6 +233,8 @@ public class SafetyEnvironmentalInspectionAddExe {
|
|||
queryWrapper.eq("key_project_id", cmd.getKeyProjectId());
|
||||
queryWrapper.ne("apply_status", 0);
|
||||
queryWrapper.eq("delete_enum", "FALSE");
|
||||
queryWrapper.orderByDesc("update_time");
|
||||
queryWrapper.last("limit 1");
|
||||
KeyProjectDO keyProjectDO = keyProjectRepository.getOne(queryWrapper);
|
||||
List<SafetyEnvironmentalInspectionUserDO> messageUserList = safetyEnvironmentalInspectionUserRepository.listAllByInspectionId(cmd.getInspectionId(), 2);
|
||||
// todo 可能会导致异步任务被线程池拒绝
|
||||
|
|
|
|||
|
|
@ -256,6 +256,8 @@ public class SafetyEnvironmentalInspectionUpdateExe {
|
|||
queryWrapper.eq("key_project_id", cmd.getKeyProjectId());
|
||||
queryWrapper.ne("apply_status", 0);
|
||||
queryWrapper.eq("delete_enum", "FALSE");
|
||||
queryWrapper.orderByDesc("update_time");
|
||||
queryWrapper.last("limit 1");
|
||||
KeyProjectDO keyProjectDO = keyProjectRepository.getOne(queryWrapper);
|
||||
List<SafetyEnvironmentalInspectionUserDO> messageUserList = safetyEnvironmentalInspectionUserRepository.listAllByInspectionId(cmd.getInspectionId(), 2);
|
||||
for (SafetyEnvironmentalInspectionUserDO insUser : messageUserList){
|
||||
|
|
@ -425,6 +427,8 @@ public class SafetyEnvironmentalInspectionUpdateExe {
|
|||
queryWrapper.eq("key_project_id", cmd.getKeyProjectId());
|
||||
queryWrapper.ne("apply_status", 0);
|
||||
queryWrapper.eq("delete_enum", "FALSE");
|
||||
queryWrapper.orderByDesc("update_time");
|
||||
queryWrapper.last("limit 1");
|
||||
KeyProjectDO keyProjectDO = keyProjectRepository.getOne(queryWrapper);
|
||||
List<SafetyEnvironmentalInspectionUserDO> messageUserList = safetyEnvironmentalInspectionUserRepository.listAllByInspectionId(cmd.getInspectionId(), 5);
|
||||
for (SafetyEnvironmentalInspectionUserDO insUser : messageUserList){
|
||||
|
|
|
|||
Loading…
Reference in New Issue