干预列表优化

This commit is contained in:
cjw 2024-06-07 15:51:38 +08:00
parent 5c556dd740
commit 7ed87f3b9f
1 changed files with 11 additions and 8 deletions

View File

@ -1,5 +1,6 @@
package org.dromara.scale.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -60,6 +61,7 @@ public class SysInterveneRecordServiceImpl implements ISysInterveneRecordService
.eq(SysInterveneRecord::getUserId, userId)
.orderByDesc(SysInterveneRecord::getCreateTime)
);
if (ObjectUtil.isNotEmpty(result.getRecords())) {
for (SysInterveneRecordVo record : result.getRecords()) {
SysScalePublish sysScalePublish = publishMapper.selectById(record.getBatchNo());
record.setSessionName(sysScalePublish.getSessionName());
@ -69,6 +71,7 @@ public class SysInterveneRecordServiceImpl implements ISysInterveneRecordService
.eq(SysWarnRecord::getUserId, record.getUserId()));
record.setNote(warn.getNote());
}
}
return TableDataInfo.build(result);
}