| | |
| | | password: nacos |
| | | config: |
| | | server-addr: http://192.168.0.212:8848 #配置Nacos地址 |
| | | namespace: dmvisit_dev |
| | | namespace: wuhu_visit_dev |
| | | # namespace: dev_renkang |
| | | username: nacos |
| | | password: nacos |
| | |
| | | password: nacos |
| | | config: |
| | | server-addr: http://192.168.0.212:8848 #配置Nacos地址 |
| | | namespace: dmvisit_dev |
| | | namespace: wuhu_visit_dev |
| | | # namespace: dev_renkang |
| | | username: nacos |
| | | password: nacos |
| | |
| | | # data-id: com.doumee.meeting.admin |
| | | discovery: |
| | | server-addr: http://192.168.0.212:8848 #配置Nacos地址 |
| | | # namespace: dev_renkang |
| | | # namespace: wuhu_visit_dev |
| | | namespace: dmvisit_dev |
| | | username: nacos |
| | | password: nacos |
| | |
| | | spring: |
| | | # 数据源配置 |
| | | datasource: |
| | | # url: jdbc:mysql://sh-cdb-aiskr3vy.sql.tencentcdb.com:62443/antaiwuliu?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai |
| | | # username: doumee |
| | | # password: rtjgfEr@&0c0m |
| | | url: jdbc:mysql://10.50.250.178:3306/antaiwuliu?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai |
| | | url: jdbc:mysql://10.50.250.178:3306/wuhuyancao?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai |
| | | username: root |
| | | password: Atwl@2024 |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | |
| | | spring: |
| | | # 数据源配置 |
| | | datasource: |
| | | url: jdbc:mysql://192.168.0.211:3306/antaiwuliu?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai |
| | | url: jdbc:mysql://192.168.0.211:3306/wuhuyancao?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai |
| | | username: root |
| | | password: Doumee@168 |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | |
| | | discovery: |
| | | server-addr: http://192.168.0.212:8848 #配置Nacos地址 |
| | | # namespace: dmvisit |
| | | namespace: dmvisit_dev |
| | | namespace: wuhu_visit_dev |
| | | username: nacos |
| | | password: nacos |
| | | gateway: |
| | |
| | | discovery: |
| | | server-addr: http://192.168.0.212:8848 #配置Nacos地址 |
| | | # namespace: dmvisit |
| | | namespace: dmvisit_dev |
| | | namespace: wuhu_visit_dev |
| | | username: nacos |
| | | password: nacos |
| | | gateway: |
| | |
| | | @ApiOperation("查询列表树") |
| | | @PostMapping("/treeList") |
| | | @CloudRequiredPermission("system:menu:query") |
| | | public ApiResponse<List<SystemMenuListVO>> findTree (@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(systemMenuBiz.findTree()); |
| | | public ApiResponse<List<SystemMenuListVO>> findTree (@RequestBody SystemMenu param,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(systemMenuBiz.findTree(param )); |
| | | } |
| | | |
| | | @PreventRepeat |
| | |
| | | return ApiResponse.success(systemMenuBiz.findTree(this.getLoginUser(null).getId())); |
| | | } |
| | | |
| | | @ApiOperation("查询顶部导航树") |
| | | @PostMapping("/topList") |
| | | @RequiresPermissions("system:menu:query") |
| | | public ApiResponse<List<SystemMenu>> findTopList () { |
| | | return ApiResponse.success(systemMenuBiz.findTopList()); |
| | | } |
| | | |
| | | @ApiOperation("查询列表树") |
| | | @PostMapping("/treeList") |
| | | @RequiresPermissions("system:menu:query") |
| | | public ApiResponse<List<SystemMenuListVO>> findTree () { |
| | | return ApiResponse.success(systemMenuBiz.findTree()); |
| | | return ApiResponse.success(systemMenuBiz.findTree(new SystemMenu())); |
| | | } |
| | | |
| | | @PreventRepeat |
| | |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | List<SystemMenuListVO> findTree(); |
| | | List<SystemMenuListVO> findTree(SystemMenu param); |
| | | |
| | | /** |
| | | * 删除 |
| | |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | void deleteByIdInBatch(List<Integer> ids); |
| | | |
| | | List<SystemMenu> findTopList(); |
| | | } |
| | |
| | | import com.doumee.biz.system.SystemMenuBiz; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.system.dto.UpdateSystemMenuSortDTO; |
| | | import com.doumee.dao.system.model.SystemMenu; |
| | | import com.doumee.dao.system.vo.SystemMenuListVO; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<SystemMenuListVO> findTree() { |
| | | List<SystemMenuListVO> menus = systemMenuService.findList(); |
| | | public List<SystemMenu> findTopList() { |
| | | SystemMenu param =new SystemMenu(); |
| | | param.setDeleted(Boolean.FALSE); |
| | | param.setType(Constants.ONE); |
| | | List<SystemMenu> menus = systemMenuService.findList(param); |
| | | return menus; |
| | | } |
| | | @Override |
| | | public List<SystemMenuListVO> findTree(SystemMenu param) { |
| | | List<SystemMenuListVO> menus = systemMenuService.findManageList(param); |
| | | List<SystemMenuListVO> rootMenus = new ArrayList<>(); |
| | | // 添加根菜单 |
| | | for (SystemMenu menu : menus) { |
| | | for (SystemMenuListVO menu : menus) { |
| | | if (menu.getParentId() == null) { |
| | | SystemMenuListVO rootMenu = new SystemMenuListVO(); |
| | | BeanUtils.copyProperties(menu, rootMenu, "children"); |
| | |
| | | nodeVO.setLabel(menu.getName()); |
| | | nodeVO.setUrl(menu.getPath()); |
| | | nodeVO.setParams(menu.getParams()); |
| | | nodeVO.setType(menu.getType()); |
| | | nodeVO.setIcon(menu.getIcon()); |
| | | nodeVO.setChildren(new ArrayList<>()); |
| | | rootNodes.add(nodeVO); |
| | |
| | | } |
| | | List<Integer> handledIds = new ArrayList<>(); |
| | | for (SystemMenu menu : menus) { |
| | | if(!Constants.equalsInteger(menu.getType(),Constants.ZERO)){ |
| | | continue; |
| | | } |
| | | if (parent.getId().equals(menu.getParentId())) { |
| | | SystemMenuListVO child = new SystemMenuListVO(); |
| | | BeanUtils.copyProperties(menu, child, "children"); |
| | |
| | | } |
| | | List<Integer> handledIds = new ArrayList<>(); |
| | | for (SystemMenu menu : menus) { |
| | | if(!Constants.equalsInteger(menu.getType(),Constants.ZERO)){ |
| | | continue; |
| | | } |
| | | if (parent.getId().equals(menu.getParentId())) { |
| | | SystemMenuNodeVO child = new SystemMenuNodeVO(); |
| | | child.setId(menu.getId()); |
| | |
| | | child.setUrl(menu.getPath()); |
| | | child.setParams(menu.getParams()); |
| | | child.setIcon(menu.getIcon()); |
| | | child.setType(menu.getType()); |
| | | child.setIndex("menu_" + menu.getId()); |
| | | child.setChildren(new ArrayList<>()); |
| | | parent.getChildren().add(child); |
| | |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | List<SystemMenuListVO> selectManageList(); |
| | | List<SystemMenuListVO> selectManageList(SystemMenu menu); |
| | | |
| | | /** |
| | | * 根据用户ID查询 |
| | |
| | | @ApiModelProperty(value = "上一级菜单", example = "1") |
| | | @TableField(updateStrategy = FieldStrategy.IGNORED) |
| | | private Integer parentId; |
| | | @ApiModelProperty(value = "类型 0服务中心菜单 1顶部导航,默认 0", example = "1") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "菜单名称") |
| | | @NotBlank(message = "菜单名称不能为空", groups = {OperaType.Create.class, OperaType.Update.class}) |
| | |
| | | |
| | | @ApiModelProperty(value = "菜单唯一标识(前端专用)") |
| | | private String index; |
| | | @ApiModelProperty(value = "菜单类型 0服务中心 1顶部导航") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "图标") |
| | | private String icon; |
| | |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/03/21 14:49 |
| | | */ |
| | | List<SystemMenuListVO> findList(); |
| | | List<SystemMenuListVO> findManageList(SystemMenu param); |
| | | |
| | | /** |
| | | * 查询一级菜单列表 |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<SystemMenuListVO> findList() { |
| | | return systemMenuMapper.selectManageList(); |
| | | public List<SystemMenuListVO> findManageList(SystemMenu menu) { |
| | | return systemMenuMapper.selectManageList(menu); |
| | | } |
| | | |
| | | @Override |
| | |
| | | <result column="UPDATE_USER_NAME" property="username"/> |
| | | </association> |
| | | </resultMap> |
| | | <select id="selectManageList" resultMap="SystemMenuListVO"> |
| | | <select id="selectManageList" resultMap="SystemMenuListVO" parameterType="com.doumee.dao.system.model.SystemMenu"> |
| | | SELECT |
| | | menu.`ID`, menu.`PARENT_ID`,menu.params, menu.`NAME`, menu.`PATH`, menu.`FIXED`, menu.`REMARK`, menu.`DISABLED`, menu.SORT, menu.`ICON`, menu.`CREATE_TIME`, menu.`UPDATE_TIME`, menu.`CREATE_USER`, menu.`UPDATE_USER`, menu.`DELETED`, |
| | | menu.`ID`, menu.`type`, menu.`PARENT_ID`,menu.params, menu.`NAME`, menu.`PATH`, menu.`FIXED`, menu.`REMARK`, menu.`DISABLED`, menu.SORT, menu.`ICON`, menu.`CREATE_TIME`, menu.`UPDATE_TIME`, menu.`CREATE_USER`, menu.`UPDATE_USER`, menu.`DELETED`, |
| | | create_user.ID CREATE_USER_ID, create_user.`USERNAME` CREATE_USER_NAME, |
| | | update_user.ID UPDETE_USER_ID, update_user.`USERNAME` UPDATE_USER_NAME |
| | | FROM SYSTEM_MENU menu |
| | |
| | | LEFT JOIN `SYSTEM_USER` update_user ON update_user.ID = menu.UPDATE_USER |
| | | <where> |
| | | menu.DELETED = 0 |
| | | <if test="type!=null"> and menu.type=#{type}</if> |
| | | </where> |
| | | ORDER BY menu.SORT |
| | | </select> |
| | |
| | | <!-- 查询菜单树 --> |
| | | <select id="selectByUserId" parameterType="java.lang.Integer" resultType="com.doumee.dao.system.model.SystemMenu"> |
| | | SELECT |
| | | DISTINCT menu.`ID`, menu.`PARENT_ID`,menu.params, menu.`NAME`, menu.`PATH`, menu.`REMARK`, menu.`DISABLED`, menu.SORT, menu.`ICON`, menu.`CREATE_TIME`, menu.`UPDATE_TIME`, menu.`CREATE_USER`, menu.`UPDATE_USER`, menu.`DELETED` |
| | | DISTINCT menu.`ID`, menu.`type`,menu.`PARENT_ID`,menu.params, menu.`NAME`, menu.`PATH`, menu.`REMARK`, menu.`DISABLED`, menu.SORT, menu.`ICON`, menu.`CREATE_TIME`, menu.`UPDATE_TIME`, menu.`CREATE_USER`, menu.`UPDATE_USER`, menu.`DELETED` |
| | | FROM `SYSTEM_MENU` menu |
| | | INNER JOIN SYSTEM_ROLE_MENU role_menu ON role_menu.MENU_ID = menu.ID AND role_menu.DELETED = 0 |
| | | INNER JOIN SYSTEM_USER_ROLE user_role ON user_role.ROLE_ID = role_menu.ROLE_ID AND user_role.DELETED = 0 |
| | |
| | | <!-- 根据角色ID查询菜单列表 --> |
| | | <select id="selectByRoleId" parameterType="java.lang.Integer" resultType="com.doumee.dao.system.model.SystemMenu"> |
| | | SELECT |
| | | menu.`ID`, menu.`PARENT_ID`, menu.`NAME`,menu.params, menu.`PATH`, menu.`REMARK`, menu.`DISABLED`, menu.SORT, menu.`ICON`, menu.`CREATE_TIME`, menu.`UPDATE_TIME`, menu.`CREATE_USER`, menu.`UPDATE_USER`, menu.`DELETED` |
| | | menu.`ID`, menu.`type`,menu.`PARENT_ID`, menu.`NAME`,menu.params, menu.`PATH`, menu.`REMARK`, menu.`DISABLED`, menu.SORT, menu.`ICON`, menu.`CREATE_TIME`, menu.`UPDATE_TIME`, menu.`CREATE_USER`, menu.`UPDATE_USER`, menu.`DELETED` |
| | | FROM `SYSTEM_MENU` menu |
| | | INNER JOIN `SYSTEM_ROLE_MENU` role_menu ON role_menu.MENU_ID = menu.ID AND role_menu.DELETED = 0 |
| | | <where> |
| | |
| | | spring: |
| | | # 数据源配置 |
| | | datasource: |
| | | url: jdbc:mysql://112.26.66.25:3306/antaiwuliu?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=GMT%2B8 |
| | | url: jdbc:mysql://112.26.66.25:3306/wuhuyancao?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: Doumee@168&QWERT |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | |
| | | # data-id: com.doumee.meeting.admin |
| | | discovery: |
| | | server-addr: http://192.168.0.212:8848 #配置Nacos地址 |
| | | namespace: dmvisit_dev |
| | | namespace: wuhu_visit_dev |
| | | username: nacos |
| | | password: nacos |
| | |
| | | # data-id: com.doumee.meeting.admin |
| | | discovery: |
| | | server-addr: http://192.168.0.212:8848 #配置Nacos地址 |
| | | namespace: dmvisit_dev |
| | | namespace: wuhu_visit_dev |
| | | username: nacos |
| | | password: nacos |
| | |
| | | discovery: |
| | | server-addr: http://192.168.0.212:8848 #配置Nacos地址 |
| | | # namespace: dmvisit |
| | | namespace: dmvisit_dev |
| | | namespace: wuhu_visit_dev |
| | | username: nacos |
| | | password: nacos |
| | | knife4j: |
| | |
| | | discovery: |
| | | server-addr: http://192.168.0.212:8848 #配置Nacos地址 |
| | | # namespace: dmvisit |
| | | namespace: dmvisit_dev |
| | | namespace: wuhu_visit_dev |
| | | username: nacos |
| | | password: nacos |
| | | knife4j: |
| | |
| | | spring: |
| | | # 数据源配置 |
| | | datasource: |
| | | url: jdbc:mysql://192.168.0.211:3306/antaiwuliu?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai |
| | | url: jdbc:mysql://192.168.0.211:3306/wuhuyancao?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai |
| | | username: root |
| | | password: Doumee@168 |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |