소스 검색

no message

FengChaoYu 1 개월 전
부모
커밋
543c0b71cf
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      src/main/java/com/gree/mall/manager/logic/admin/AdminRoleLogic.java

+ 5 - 0
src/main/java/com/gree/mall/manager/logic/admin/AdminRoleLogic.java

@@ -80,6 +80,11 @@ public class AdminRoleLogic {
             throw new RemoteServiceException("角色名称不能为空");
         }
 
+        if (StringUtils.isBlank(adminRole.getCompanyId()) && adminUser.getType() > 0) {
+            adminRole.setCompanyId(adminUser.getCompanyId())
+                    .setCompanyName(adminUser.getCompanyName());
+        }
+
         if (adminRoleService.lambdaQuery()
                 .eq(AdminRole::getCompanyId, adminRole.getCompanyId())
                 .eq(AdminRole::getName, StringUtils.trim(adminRole.getName()))