all
huanghongfa
2021-02-05 c837a29945387fb3deeed8f9fe3e0040dc9dafb0
all
4个文件已修改
117 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/.idea/workspace.xml 57 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/target/classes/com/panzhihua/common/service/user/UserService.class 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/SystemManagementApi.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java 55 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/.idea/workspace.xml
@@ -22,7 +22,12 @@
    <select />
  </component>
  <component name="ChangeListManager">
    <list default="true" id="8ba27629-3e5d-4f42-993e-d0c055bc9371" name="Default Changelist" comment="" />
    <list default="true" id="8ba27629-3e5d-4f42-993e-d0c055bc9371" name="Default Changelist" comment="">
      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/common/target/classes/com/panzhihua/common/service/user/UserService.class" beforeDir="false" afterPath="$PROJECT_DIR$/common/target/classes/com/panzhihua/common/service/user/UserService.class" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/community_backstage/src/main/java/com/panzhihua/community_backstage/api/SystemManagementApi.java" beforeDir="false" afterPath="$PROJECT_DIR$/community_backstage/src/main/java/com/panzhihua/community_backstage/api/SystemManagementApi.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java" afterDir="false" />
    </list>
    <option name="SHOW_DIALOG" value="false" />
    <option name="HIGHLIGHT_CONFLICTS" value="true" />
    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@@ -413,7 +418,7 @@
      <workItem from="1612406442748" duration="9358000" />
      <workItem from="1612486797044" duration="146000" />
      <workItem from="1612487068003" duration="7000" />
      <workItem from="1612487277561" duration="2287000" />
      <workItem from="1612487277561" duration="4832000" />
    </task>
    <servers />
  </component>
@@ -473,54 +478,54 @@
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state x="549" y="167" key="FileChooserDialogImpl/0.0.1536.824@0.0.1536.824" timestamp="1612426172959" />
    <state width="1031" height="507" key="GridCell.Tab.0.bottom" timestamp="1612424826236">
    <state width="1031" height="634" key="GridCell.Tab.0.bottom" timestamp="1612511424856">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="507" key="GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824" timestamp="1612424826236" />
    <state width="1031" height="507" key="GridCell.Tab.0.center" timestamp="1612424826236">
    <state width="1031" height="634" key="GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824" timestamp="1612511424856" />
    <state width="1031" height="634" key="GridCell.Tab.0.center" timestamp="1612511424856">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="507" key="GridCell.Tab.0.center/0.0.1536.824@0.0.1536.824" timestamp="1612424826236" />
    <state width="1031" height="507" key="GridCell.Tab.0.left" timestamp="1612424826236">
    <state width="1031" height="634" key="GridCell.Tab.0.center/0.0.1536.824@0.0.1536.824" timestamp="1612511424856" />
    <state width="1031" height="634" key="GridCell.Tab.0.left" timestamp="1612511424855">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="507" key="GridCell.Tab.0.left/0.0.1536.824@0.0.1536.824" timestamp="1612424826236" />
    <state width="1031" height="507" key="GridCell.Tab.0.right" timestamp="1612424826236">
    <state width="1031" height="634" key="GridCell.Tab.0.left/0.0.1536.824@0.0.1536.824" timestamp="1612511424855" />
    <state width="1031" height="634" key="GridCell.Tab.0.right" timestamp="1612511424856">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="507" key="GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824" timestamp="1612424826236" />
    <state width="1031" height="507" key="GridCell.Tab.1.bottom" timestamp="1612424826236">
    <state width="1031" height="634" key="GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824" timestamp="1612511424856" />
    <state width="1031" height="634" key="GridCell.Tab.1.bottom" timestamp="1612511424856">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="507" key="GridCell.Tab.1.bottom/0.0.1536.824@0.0.1536.824" timestamp="1612424826236" />
    <state width="1031" height="507" key="GridCell.Tab.1.center" timestamp="1612424826236">
    <state width="1031" height="634" key="GridCell.Tab.1.bottom/0.0.1536.824@0.0.1536.824" timestamp="1612511424856" />
    <state width="1031" height="634" key="GridCell.Tab.1.center" timestamp="1612511424856">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="507" key="GridCell.Tab.1.center/0.0.1536.824@0.0.1536.824" timestamp="1612424826236" />
    <state width="1031" height="507" key="GridCell.Tab.1.left" timestamp="1612424826236">
    <state width="1031" height="634" key="GridCell.Tab.1.center/0.0.1536.824@0.0.1536.824" timestamp="1612511424856" />
    <state width="1031" height="634" key="GridCell.Tab.1.left" timestamp="1612511424856">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="507" key="GridCell.Tab.1.left/0.0.1536.824@0.0.1536.824" timestamp="1612424826236" />
    <state width="1031" height="507" key="GridCell.Tab.1.right" timestamp="1612424826236">
    <state width="1031" height="634" key="GridCell.Tab.1.left/0.0.1536.824@0.0.1536.824" timestamp="1612511424856" />
    <state width="1031" height="634" key="GridCell.Tab.1.right" timestamp="1612511424856">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="507" key="GridCell.Tab.1.right/0.0.1536.824@0.0.1536.824" timestamp="1612424826236" />
    <state width="1031" height="507" key="GridCell.Tab.2.bottom" timestamp="1612424826237">
    <state width="1031" height="634" key="GridCell.Tab.1.right/0.0.1536.824@0.0.1536.824" timestamp="1612511424856" />
    <state width="1031" height="634" key="GridCell.Tab.2.bottom" timestamp="1612511424856">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="507" key="GridCell.Tab.2.bottom/0.0.1536.824@0.0.1536.824" timestamp="1612424826237" />
    <state width="1031" height="507" key="GridCell.Tab.2.center" timestamp="1612424826237">
    <state width="1031" height="634" key="GridCell.Tab.2.bottom/0.0.1536.824@0.0.1536.824" timestamp="1612511424856" />
    <state width="1031" height="634" key="GridCell.Tab.2.center" timestamp="1612511424856">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="507" key="GridCell.Tab.2.center/0.0.1536.824@0.0.1536.824" timestamp="1612424826237" />
    <state width="1031" height="507" key="GridCell.Tab.2.left" timestamp="1612424826237">
    <state width="1031" height="634" key="GridCell.Tab.2.center/0.0.1536.824@0.0.1536.824" timestamp="1612511424856" />
    <state width="1031" height="634" key="GridCell.Tab.2.left" timestamp="1612511424856">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="507" key="GridCell.Tab.2.left/0.0.1536.824@0.0.1536.824" timestamp="1612424826237" />
    <state width="1031" height="507" key="GridCell.Tab.2.right" timestamp="1612424826237">
    <state width="1031" height="634" key="GridCell.Tab.2.left/0.0.1536.824@0.0.1536.824" timestamp="1612511424856" />
    <state width="1031" height="634" key="GridCell.Tab.2.right" timestamp="1612511424856">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="507" key="GridCell.Tab.2.right/0.0.1536.824@0.0.1536.824" timestamp="1612424826237" />
    <state width="1031" height="634" key="GridCell.Tab.2.right/0.0.1536.824@0.0.1536.824" timestamp="1612511424856" />
    <state x="299" y="67" key="Maven.ArtifactSearchDialog" timestamp="1610611848124">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
springcloud_k8s_panzhihuazhihuishequ/common/target/classes/com/panzhihua/common/service/user/UserService.class
Binary files differ
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/SystemManagementApi.java
@@ -118,10 +118,11 @@
        return userService.deleteRoleBackstage(roleVO);
    }
    @ApiOperation(value = "运营平台权限配置列表",response = SysMenuVO.class)
    @ApiOperation(value = "社区平台权限配置表",response = SysMenuVO.class)
    @GetMapping("listmenu")
    public R listMenuBackstage(){
        Long communityId = this.getCommunityId();
//        Long communityId = this.getCommunityId(); todo 所有平台都用一套死菜单 所以参数固定
        Long communityId = 2l;
        return userService.listMenuBackstage(communityId);
    }
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
@@ -743,33 +743,36 @@
        Long roleId = menuRoleVO.getRoleId();
        Integer isAll = menuRoleVO.getIsAll();
        Long communityId = menuRoleVO.getCommunityId();
        if (isAll.intValue()==1) {
            List<SysMenuDO> sysMenuDOS = sysMenuDAO.selectList(new QueryWrapper<SysMenuDO>().lambda().eq(SysMenuDO::getCommunityId, 2l).eq(SysMenuDO::getParentId,0).orderByAsc(SysMenuDO::getOrderNum));
            Long menuIdParent = sysMenuDOS.get(1).getMenuId();
            List<SysMenuDO> sysMenuDOSErJi = sysMenuDAO.selectList(new QueryWrapper<SysMenuDO>().lambda().eq(SysMenuDO::getParentId, menuIdParent));
            if (!ObjectUtils.isEmpty(sysMenuDOS)) {
                sysMenuDOS.forEach(sysMenuDO -> {
                    sysMenuDO.setCommunityId(communityId);
                    sysMenuDO.setMenuId(null);
                    sysMenuDAO.insert(sysMenuDO);
                });
//                完成一级目录创建
                List<SysMenuDO> sysMenuDOS1 = sysMenuDAO.selectList(new QueryWrapper<SysMenuDO>().lambda().eq(SysMenuDO::getCommunityId, communityId).orderByAsc(SysMenuDO::getOrderNum));
                sysMenuDOS1.forEach(sysMenuDO -> {
                    Integer orderNum = sysMenuDO.getOrderNum();
                    if (orderNum.intValue()>0) {
                        sysMenuDOSErJi.forEach(sysMenuDO1 -> {
                            sysMenuDO1.setParentId(sysMenuDO.getMenuId());
                            sysMenuDO1.setCommunityId(communityId);
                            sysMenuDO1.setMenuId(null);
                            sysMenuDAO.insert(sysMenuDO1);
                        });
                    }
                });
            }
        }
//        if (isAll.intValue()==1) {
//            List<SysMenuDO> sysMenuDOS = sysMenuDAO.selectList(new QueryWrapper<SysMenuDO>().lambda().eq(SysMenuDO::getCommunityId, 2l).eq(SysMenuDO::getParentId,0).orderByAsc(SysMenuDO::getOrderNum));
//            Long menuIdParent = sysMenuDOS.get(1).getMenuId();
//            List<SysMenuDO> sysMenuDOSErJi = sysMenuDAO.selectList(new QueryWrapper<SysMenuDO>().lambda().eq(SysMenuDO::getParentId, menuIdParent));
//            if (!ObjectUtils.isEmpty(sysMenuDOS)) {
//                sysMenuDOS.forEach(sysMenuDO -> {
//                    sysMenuDO.setCommunityId(communityId);
//                    sysMenuDO.setMenuId(null);
//                    sysMenuDAO.insert(sysMenuDO);
//                });
////                完成一级目录创建
//                List<SysMenuDO> sysMenuDOS1 = sysMenuDAO.selectList(new QueryWrapper<SysMenuDO>().lambda().eq(SysMenuDO::getCommunityId, communityId).orderByAsc(SysMenuDO::getOrderNum));
//                sysMenuDOS1.forEach(sysMenuDO -> {
//                    Integer orderNum = sysMenuDO.getOrderNum();
//                    if (orderNum.intValue()>0) {
//                        sysMenuDOSErJi.forEach(sysMenuDO1 -> {
//                            sysMenuDO1.setParentId(sysMenuDO.getMenuId());
//                            sysMenuDO1.setCommunityId(communityId);
//                            sysMenuDO1.setMenuId(null);
//                            sysMenuDAO.insert(sysMenuDO1);
//                        });
//                    }
//                });
//            }
//        }
//        菜单写死不重新生成菜单 todo 所有注释上面自动生成新菜单功能
//        获取所有权限id
        List<SysMenuDO> menuDOList = sysMenuDAO.selectList(new QueryWrapper<SysMenuDO>().lambda().eq(SysMenuDO::getCommunityId, communityId).orderByAsc(SysMenuDO::getOrderNum));
        List<SysMenuDO> menuDOList = sysMenuDAO.selectList(new QueryWrapper<SysMenuDO>().lambda().eq(SysMenuDO::getCommunityId, 2l).orderByAsc(SysMenuDO::getOrderNum));
        menuIds=menuDOList.stream().map(sysMenuDO -> sysMenuDO.getMenuId()).collect(Collectors.toList());
        for(int i=0;i<menuIds.size();i++){
            SysRoleMenuDO sysRoleMenuDO=new SysRoleMenuDO();