Browse Source

Merge remote-tracking branch 'origin/master'

‘linchangsheng’ 3 weeks ago
parent
commit
0ce5aa5a1e

+ 8 - 1
src/main/java/com/gree/mall/manager/logic/admin/AdminRoleLogic.java

@@ -6,9 +6,11 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.gree.mall.manager.bean.admin.AdminUserCom;
 import com.gree.mall.manager.exception.RemoteServiceException;
 import com.gree.mall.manager.logic.common.CommonLogic;
+import com.gree.mall.manager.plus.entity.AdminCompany;
 import com.gree.mall.manager.plus.entity.AdminRole;
 import com.gree.mall.manager.plus.entity.AdminUser;
 import com.gree.mall.manager.plus.entity.AdminUserModuleRela;
+import com.gree.mall.manager.plus.service.AdminCompanyService;
 import com.gree.mall.manager.plus.service.AdminRoleService;
 import com.gree.mall.manager.plus.service.AdminUserModuleRelaService;
 import com.gree.mall.manager.plus.service.AdminUserService;
@@ -29,7 +31,7 @@ public class AdminRoleLogic {
     private final AdminUserService adminUserService;
     private final CommonLogic commonLogic;
     private final AdminUserModuleRelaService adminUserModuleRelaService;
-
+    private final AdminCompanyService adminCompanyService;
 
     /**
      * 角色列表
@@ -79,6 +81,11 @@ public class AdminRoleLogic {
             adminRole.setParentRoleName(parentRole.getName());
         }
 
+        if (StringUtils.isNotBlank(adminRole.getCompanyWechatId())) {
+            final AdminCompany company = adminCompanyService.getById(adminRole.getCompanyWechatId());
+            adminRole.setCompanyName(company.getAdminCompanyName());
+        }
+
         adminRoleService.save(adminRole);
     }
 

+ 2 - 1
src/main/java/com/gree/mall/manager/logic/admin/AdminUserLogic.java

@@ -338,7 +338,8 @@ public class AdminUserLogic {
                 .eq(StringUtils.isNotEmpty(roleId), AdminUser::getRoleId, roleId)
                 .eq(status != null, AdminUser::getStatus, status)
                 .in(CollectionUtils.isNotEmpty(adminUser.getAdminCompanyIds()), AdminUser::getCompanyWechatId, adminUser.getAdminCompanyIds())
-                .like(StringUtils.isNotEmpty(userName), AdminUser::getUserName, userName).page(new Page<>(pageNum, pageSize));
+                .like(StringUtils.isNotEmpty(userName), AdminUser::getUserName, userName)
+                .page(new Page<>(pageNum, pageSize));
         return page;
     }