shudonghui 1 سال پیش
والد
کامیت
fb2d49767c
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      sop-business/src/main/java/com/qmth/sop/business/service/impl/SysCustomServiceImpl.java

+ 1 - 1
sop-business/src/main/java/com/qmth/sop/business/service/impl/SysCustomServiceImpl.java

@@ -61,7 +61,7 @@ public class SysCustomServiceImpl extends ServiceImpl<SysCustomMapper, SysCustom
     public IPage<SysCustomResult> query(Page<Map> iPage, ProductTypeEnum type, Long managerId, String name, Long levelId) {
         IPage<SysCustomResult> sysCustomResultIPage = this.baseMapper.query(iPage, Objects.nonNull(type) ? type.name() : null, Objects.nonNull(managerId) ? managerId : null, name, Objects.nonNull(levelId) ? levelId : null);
         sysCustomResultIPage.getRecords().forEach(e -> {
-            e.setRoleList(sysLevelRoleService.getList(e.getLevelId()));
+            if(e.getLevelId()!=null)e.setRoleList(sysLevelRoleService.getList(e.getLevelId()));
             e.setAddrList(sysCustomAddrService.list(new QueryWrapper<SysCustomAddr>().lambda().eq(SysCustomAddr::getCustomId,e.getId())));
         });
         return  sysCustomResultIPage;