|
@@ -1,6 +1,5 @@
|
|
|
package com.gree.mall.manager.logic.admin;
|
|
package com.gree.mall.manager.logic.admin;
|
|
|
|
|
|
|
|
-import cn.hutool.core.collection.CollectionUtil;
|
|
|
|
|
import com.alibaba.excel.util.StringUtils;
|
|
import com.alibaba.excel.util.StringUtils;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
@@ -52,16 +51,10 @@ public class AdminRoleLogic {
|
|
|
type = RoleTypeEnum.ADMIN.getCode();
|
|
type = RoleTypeEnum.ADMIN.getCode();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- List<String> websitList = null;
|
|
|
|
|
- if (adminUser.getType() == 0 && adminUser.getIsMaster()) {
|
|
|
|
|
- websitList = adminUser.getAdminWebsitIds();
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
Page<AdminRole> rolePage = adminRoleService.lambdaQuery()
|
|
Page<AdminRole> rolePage = adminRoleService.lambdaQuery()
|
|
|
.like(StringUtils.isNotBlank(companyWechatName), AdminRole::getCompanyName, companyWechatName)
|
|
.like(StringUtils.isNotBlank(companyWechatName), AdminRole::getCompanyName, companyWechatName)
|
|
|
.le(AdminRole::getType, type)
|
|
.le(AdminRole::getType, type)
|
|
|
.in(CollectionUtils.isNotEmpty(companyWechatIds), AdminRole::getCompanyWechatId, companyWechatIds)
|
|
.in(CollectionUtils.isNotEmpty(companyWechatIds), AdminRole::getCompanyWechatId, companyWechatIds)
|
|
|
- .in(CollectionUtil.isNotEmpty(websitList), AdminRole::getRoleWebsitId, websitList)
|
|
|
|
|
.orderByDesc(AdminRole::getType)
|
|
.orderByDesc(AdminRole::getType)
|
|
|
.page(new Page<>(pageNo, pageSize));
|
|
.page(new Page<>(pageNo, pageSize));
|
|
|
|
|
|
|
@@ -79,10 +72,6 @@ public class AdminRoleLogic {
|
|
|
AdminUserCom adminUser = commonLogic.getAdminUser(request);
|
|
AdminUserCom adminUser = commonLogic.getAdminUser(request);
|
|
|
adminRole.setCompanyWechatId(adminUser.getCompanyWechatId());
|
|
adminRole.setCompanyWechatId(adminUser.getCompanyWechatId());
|
|
|
adminRole.setCompanyName(adminUser.getCompanyName());
|
|
adminRole.setCompanyName(adminUser.getCompanyName());
|
|
|
- if (adminUser.getType() == 0 && adminUser.getIsMaster()) {
|
|
|
|
|
- adminRole.setRoleWebsitId(adminUser.getAdminWebsitIds().get(0));
|
|
|
|
|
- adminRole.setLevel(0);
|
|
|
|
|
- }
|
|
|
|
|
adminRole.setCreateTime(new Date());
|
|
adminRole.setCreateTime(new Date());
|
|
|
adminRoleService.save(adminRole);
|
|
adminRoleService.save(adminRole);
|
|
|
}
|
|
}
|