Commit 8c77c5eb by 墨竹

fix:报错

parent c9e27a2c
......@@ -193,19 +193,18 @@ public class HaobanRoleApiServiceImpl implements HaobanRoleApiService {
public ServiceResponse addHaobanRole(String wxEnterpriseId) {
List<HaobanRoleBO> haobanRoleBOList = haobanRoleService.getListByWxEnterpriseId("-1",null);
HaobanRoleQDTO haobanRoleQDTO = new HaobanRoleQDTO();
HaobanRoleQDTO haobanRoleSystemQDTO = new HaobanRoleQDTO();
int count = haobanRoleService.getCountByWxEnterpriseId(wxEnterpriseId,null);
//清除历史权限
if (count > 0) {
haobanRoleService.deleteByWxEnterpriseId(wxEnterpriseId,null);
haobanRoleMenuService.deleteByWxEnterpriseId(wxEnterpriseId);
}
for (HaobanRoleBO haobanRoleBO : haobanRoleBOList) {
Long roleId = haobanRoleBO.getRoleId();
Integer clerkType = haobanRoleBO.getClerkType();
String roleName = haobanRoleBO.getRoleName();
int count = haobanRoleService.getCountByWxEnterpriseId(wxEnterpriseId,null);
//清除历史权限
if (count > 0) {
haobanRoleService.deleteByWxEnterpriseId(wxEnterpriseId,null);
haobanRoleMenuService.deleteByWxEnterpriseId(wxEnterpriseId);
}
haobanRoleQDTO.setRoleName(roleName);
haobanRoleSystemQDTO.setRoleName(roleName);
haobanRoleQDTO.setSystemFlag(1);
......@@ -278,22 +277,24 @@ public class HaobanRoleApiServiceImpl implements HaobanRoleApiService {
if (handoverFlag) {
menuCodes.add("customerList_inheritCustomer");
}
// TODO: 2022/9/21 我的
menuCodes.add("workbench");
//导购和店长初始化权限以好办web为准
List<String> menuCodesOld = applicationSettingApiService.findMenuCodes(wxEnterpriseId);
List<String> clerkMenuCodes = haobanMenuService.getHaobanMenuByPid(menuCodesOld);
menuCodes.addAll(clerkMenuCodes);
HaobanRoleQDTO haobanRoleQDTO = new HaobanRoleQDTO();
HaobanRoleQDTO haobanRoleSystemQDTO = new HaobanRoleQDTO();
int count = haobanRoleService.getCountByWxEnterpriseId(wxEnterpriseId,null);
//清除历史权限
if (count > 0) {
haobanRoleService.deleteByWxEnterpriseId(wxEnterpriseId,null);
haobanRoleMenuService.deleteByWxEnterpriseId(wxEnterpriseId);
}
for (HaobanRoleBO haobanRoleBO : haobanRoleBOList) {
Long roleId = haobanRoleBO.getRoleId();
Integer clerkType = haobanRoleBO.getClerkType();
String roleName = haobanRoleBO.getRoleName();
int count = haobanRoleService.getCountByWxEnterpriseId(wxEnterpriseId,null);
//清除历史权限
if (count > 0) {
haobanRoleService.deleteByWxEnterpriseId(wxEnterpriseId,null);
haobanRoleMenuService.deleteByWxEnterpriseId(wxEnterpriseId);
}
haobanRoleQDTO.setRoleName(roleName);
haobanRoleSystemQDTO.setRoleName(roleName);
haobanRoleQDTO.setSystemFlag(1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment