修改举报列表空指针异常

master
Diyu0904 2025-04-08 17:00:42 +08:00
parent 2ab7a54774
commit 44af6d3b60
1 changed files with 4 additions and 1 deletions

View File

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mcwl.common.constant.DictConstants;
import com.mcwl.common.core.domain.R;
import com.mcwl.common.utils.SecurityUtils;
import com.mcwl.common.utils.StringUtils;
import com.mcwl.resource.domain.ModelProduct;
import com.mcwl.resource.domain.Report;
import com.mcwl.resource.domain.WorkFlow;
@ -67,7 +68,9 @@ public class ReportServiceImpl implements ReportService {
}
Page<Report> reportPage = reportMapper.selectPage(page, reportLambdaQueryWrapper);
if (StringUtils.isEmpty(reportPage.getRecords())){
return R.ok(reportPage);
}
for (Report record : reportPage.getRecords()) {
record.setNickName(sysUserMapper.selectUserById(record.getUserId()).getNickName());
//翻译举报类型