| | |
| | | TIME_FORMAT_INVALID(-18,"时间格式无效"), |
| | | TIME_INVALID(-19,"时间无效"), |
| | | GROUP_EXIST(-20, "组已存在"), |
| | | ROLE_IS_EXPIRE(-21, "该角色名不存在"), |
| | | ROLE_IS_EXIST(-21, "角色已存在"), |
| | | ROLE_IS_NULL(-22, "角色不存在"), |
| | | MENU_IS_EXPIRE(-23, "该菜单名不存在"), |
| | | MENU_IS_EXIST(-23, "菜单已存在"), |
| | | MENU_IS_NULL(-24, "菜单不存在"), |
| | | PARAMETERS_NOT_REQUIREMENT(-25, "参数不符合要求"), |
| | | DICTTYPE_NOT_EXIST(-26,"字典类型不存在"), |
| | |
| | | return resultMap; |
| | | } |
| | | if (manageMenuMapper.getManageMenuByName(manageMenu.getName()) != null) { |
| | | resultMap.put("code", ResponseCodeEnum.MENU_IS_EXPIRE.getCode()); |
| | | resultMap.put("msg", ResponseCodeEnum.MENU_IS_EXPIRE.getMsg()); |
| | | resultMap.put("code", ResponseCodeEnum.MENU_IS_EXIST.getCode()); |
| | | resultMap.put("msg", ResponseCodeEnum.MENU_IS_EXIST.getMsg()); |
| | | } else { |
| | | manageMenuMapper.insertOne(manageMenu); |
| | | //操作插入日志 |
| | |
| | | result = manageRoleMenuMapper.getDataByMenuIds(list,id); |
| | | } |
| | | List<Map> result1 = manageRoleMenuMapper.getDataByRoleId(id); |
| | | if (manageRoleMenuMapper.selectCount(wrapper)==0 || result.size()==0){ |
| | | if ((manageRoleMenuMapper.selectCount(wrapper)==0 || result.size()==0)&&list.size()!=0){ |
| | | List<Map> insertList = new ArrayList<>(); |
| | | for (Object temp:list) { |
| | | Map<String,Object> map = new HashMap<>(); |
| | |
| | | if (insertList.size()!=0){ |
| | | manageRoleMenuMapper.insertBatch(insertList); |
| | | } |
| | | } |
| | | }else { |
| | | List updateList = new ArrayList(); |
| | | for (Map manageRoleMenu:result1) { |
| | | int have = 1; |
| | |
| | | continue; |
| | | } |
| | | updateList.add(manageRoleMenu.get("menu_id")); |
| | | System.out.println("++++++++++++++"+updateList); |
| | | } |
| | | List insertList = new ArrayList(); |
| | | for (Object temp:list) { |
| | |
| | | } |
| | | manageRoleMenuMapper.insertBatch(mapList); |
| | | } |
| | | } |
| | | List<ManageMenu> manageMenusNew = manageMenuMapper.getManageMenuByRoleId(id); |
| | | List manageMenuOldList = new ArrayList(); |
| | | List manageMenuNewList = new ArrayList(); |
| | |
| | | return resultMap; |
| | | } |
| | | if (manageRoleMapper.getManageRoleByName(manageRole.getName()) != null){ |
| | | resultMap.put("code",ResponseCodeEnum.ROLE_IS_EXPIRE.getCode()); |
| | | resultMap.put("msg",ResponseCodeEnum.ROLE_IS_EXPIRE.getMsg()); |
| | | resultMap.put("code",ResponseCodeEnum.ROLE_IS_EXIST.getCode()); |
| | | resultMap.put("msg",ResponseCodeEnum.ROLE_IS_EXIST.getMsg()); |
| | | return resultMap; |
| | | } |
| | | manageRoleMapper.insertOne(manageRole); |