|
@@ -57,11 +57,11 @@ public class AuthorizeServiceImpl implements IAuthorizeService {
|
|
|
* Step1:先删除原先的权限组关联菜单数据;
|
|
|
* Step2:再添加新的账号权限组关联菜单数据;
|
|
|
*/
|
|
|
-// sysGroupMenuRepo.removeGroupMenu(groupId);
|
|
|
+ sysGroupMenuRepo.removeGroupMenu(groupId);
|
|
|
String[] menuIdsArray = menuIds.split(",");
|
|
|
- for (int a = 0; a < menuIdsArray.length; a++) {
|
|
|
+ /* for (int a = 0; a < menuIdsArray.length; a++) {
|
|
|
sysGroupMenuRepo.removeGroupMenu(groupId, menuIdsArray[a]);
|
|
|
- }
|
|
|
+ }*/
|
|
|
for (int a = 0; a < menuIdsArray.length; a++) {
|
|
|
SysGroupMenuEntity sysGroupMenuEntity = new SysGroupMenuEntity();
|
|
|
sysGroupMenuEntity.setGroupId(Integer.parseInt(groupId));
|
|
@@ -71,44 +71,6 @@ public class AuthorizeServiceImpl implements IAuthorizeService {
|
|
|
return new Result(10001, "保存权限组关联菜单成功", true);
|
|
|
}
|
|
|
|
|
|
- /* @Override
|
|
|
- public Result getMyMenu(String accountName) {
|
|
|
- // 根据账号获取权限组(查询账号权限组关联表)
|
|
|
- // 根据权限组获取菜单id(查询权限组菜单官僚表)
|
|
|
- // 根据菜单id获取菜单全部信息(查询菜单表)
|
|
|
- List<SysMenuEntity> dataList = sysMenuEntityRepo.getMyMenu(accountName);
|
|
|
- System.out.println("dataList.size>>"+dataList.size());
|
|
|
- List newMenuList = new ArrayList();
|
|
|
- // error for (SysMenuEntity menuEntity : dataList) {
|
|
|
- for (int a=0;a<dataList.size();a++) {
|
|
|
- SysMenuEntity menuEntity = dataList.get(a);
|
|
|
- if (menuEntity.getParentId() == 0) {
|
|
|
- Map menuMap = new HashMap<>();
|
|
|
- menuMap.put("id", menuEntity.getId());
|
|
|
- menuMap.put("menuName", menuEntity.getMenuName());
|
|
|
- menuMap.put("parentId", menuEntity.getParentId());
|
|
|
- menuMap.put("url", menuEntity.getUrl());
|
|
|
- menuMap.put("sort", menuEntity.getSort());
|
|
|
- newMenuList.add(menuMap);
|
|
|
- dataList.remove(menuEntity);
|
|
|
- }
|
|
|
- }
|
|
|
- for (int a = 0; a < newMenuList.size(); a++) {
|
|
|
- Map menuMap = (Map) newMenuList.get(a);
|
|
|
- int id = Integer.parseInt(menuMap.get("id").toString());
|
|
|
- List childrenList = new ArrayList();
|
|
|
- for (SysMenuEntity menuEntity : dataList) {
|
|
|
- if (id == menuEntity.getParentId()) {
|
|
|
- childrenList.add(menuEntity);
|
|
|
- }
|
|
|
- }
|
|
|
- if (childrenList.size() > 0) {
|
|
|
- menuMap.put("children", childrenList);
|
|
|
- }
|
|
|
- }
|
|
|
- return new Result(ResultCode.SUCCESS, newMenuList);
|
|
|
- }*/
|
|
|
-
|
|
|
/**
|
|
|
* @param accountName
|
|
|
* @return
|