Browse Source

增加判空

tags/v1.2.0^2
wanghaoran 1 year ago
parent
commit
6d2487b582
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      tuoheng-admin/src/main/java/com/tuoheng/admin/service/camera/CameraServiceImpl.java

+ 3
- 1
tuoheng-admin/src/main/java/com/tuoheng/admin/service/camera/CameraServiceImpl.java View File

@@ -108,7 +108,9 @@ public class CameraServiceImpl extends BaseServiceImpl<CameraMapper, Camera> imp
.orderByDesc(Camera::getCreateTime));
for (Camera record : pageData.getRecords()) {
User user = userMapper.selectById(record.getUpdateUser());
record.setUpdateUserName(user.getRealname());
if(ObjectUtil.isNotNull(user)){
record.setUpdateUserName(user.getRealname());
}
}

Loading…
Cancel
Save