diff --git a/youlai-admin/src/main/java/com/youlai/admin/controller/SysDeptController.java b/youlai-admin/src/main/java/com/youlai/admin/controller/SysDeptController.java index d00d2beab..0fdeada16 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/controller/SysDeptController.java +++ b/youlai-admin/src/main/java/com/youlai/admin/controller/SysDeptController.java @@ -2,7 +2,8 @@ package com.youlai.admin.controller; import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.youlai.admin.entity.SysDept; +import com.youlai.admin.common.AdminConstant; +import com.youlai.admin.domain.entity.SysDept; import com.youlai.admin.service.ISysDeptService; import com.youlai.common.result.Result; import io.swagger.annotations.Api; @@ -13,7 +14,9 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import java.util.ArrayList; import java.util.List; +import java.util.Optional; @Api(tags = "部门接口") @RestController @@ -27,7 +30,8 @@ public class SysDeptController { @ApiOperation(value = "列表分页", httpMethod = "GET") @ApiImplicitParams({ @ApiImplicitParam(name = "name", value = "部门名称", paramType = "query", dataType = "String"), - @ApiImplicitParam(name = "mode", value = "查询模式(mode:1-表格数据)", defaultValue = "1", paramType = "query", dataType = "Integer"), + @ApiImplicitParam(name = "status", value = "部门状态", paramType = "query", dataType = "Integer"), + @ApiImplicitParam(name = "mode", value = "查询模式(mode:1-表格数据 2-树形下拉)", defaultValue = "1", paramType = "query", dataType = "Integer"), }) @GetMapping public Result list(@RequestParam(required = false, defaultValue = "1") Integer mode, @@ -38,13 +42,11 @@ public class SysDeptController { .orderByDesc(SysDept::getUpdateTime) .orderByDesc(SysDept::getCreateTime); List list; - if (mode.equals(1)) { - // 表格数据 + if (mode.equals(1)) { // 表格数据 baseQuery = baseQuery.like(StrUtil.isNotBlank(name), SysDept::getName, name) .eq(status != null, SysDept::getStatus, status); list = iSysDeptService.listForTableData(baseQuery); - } else if (mode.equals(2)) { - // tree-select 树形下拉数据 + } else if (mode.equals(2)) { // tree-select 树形下拉数据 list = iSysDeptService.listForTreeSelect(baseQuery); } else { list = iSysDeptService.list(baseQuery); @@ -64,8 +66,16 @@ public class SysDeptController { @ApiImplicitParam(name = "sysDept", value = "实体JSON对象", required = true, paramType = "body", dataType = "SysDept") @PostMapping public Result add(@RequestBody SysDept sysDept) { - boolean status = iSysDeptService.save(sysDept); - return Result.status(status); + Integer parentId = sysDept.getParentId(); + String treePath; + if (parentId.equals(AdminConstant.ROOT_DEPT_ID)) { + treePath = String.valueOf(AdminConstant.ROOT_DEPT_ID); + } else { + SysDept parentDept = iSysDeptService.getById(parentId); + treePath = Optional.ofNullable(parentDept).map(dept -> dept.getParentId() + "," + dept.getTreePath()).get(); + } + sysDept.setTreePath(treePath); + return Result.status(iSysDeptService.save(sysDept)); } @ApiOperation(value = "修改部门", httpMethod = "PUT") @@ -77,6 +87,16 @@ public class SysDeptController { public Result update( @PathVariable Integer id, @RequestBody SysDept sysDept) { + + Integer parentId = sysDept.getParentId(); + String treePath; + if (parentId.equals(AdminConstant.ROOT_DEPT_ID)) { + treePath = String.valueOf(AdminConstant.ROOT_DEPT_ID); + } else { + SysDept parentDept = iSysDeptService.getById(parentId); + treePath = Optional.ofNullable(parentDept).map(dept -> dept.getParentId() + "," + dept.getTreePath()).get(); + } + sysDept.setTreePath(treePath); boolean status = iSysDeptService.updateById(sysDept); return Result.status(status); } @@ -85,7 +105,12 @@ public class SysDeptController { @ApiImplicitParam(name = "ids[]", value = "id集合", required = true, paramType = "query", allowMultiple = true, dataType = "Integer") @DeleteMapping public Result delete(@RequestParam("ids") List ids) { - boolean status = iSysDeptService.removeByIds(ids); - return Result.status(status); + + // 删除部门以及子部门 + Optional.ofNullable(ids).orElse(new ArrayList<>()).forEach(id -> + iSysDeptService.remove(new LambdaQueryWrapper().eq(SysDept::getId, id) + .or().apply("concat (',',tree_path,',') like concat('%,',{1},',%')", id)) + ); + return Result.success(); } } diff --git a/youlai-admin/src/main/java/com/youlai/admin/controller/SysDictController.java b/youlai-admin/src/main/java/com/youlai/admin/controller/SysDictController.java index 33278129d..58a9bcd4c 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/controller/SysDictController.java +++ b/youlai-admin/src/main/java/com/youlai/admin/controller/SysDictController.java @@ -3,7 +3,7 @@ package com.youlai.admin.controller; import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.youlai.admin.entity.SysDict; +import com.youlai.admin.domain.entity.SysDict; import com.youlai.admin.service.ISysDictService; import com.youlai.common.result.PageResult; import com.youlai.common.result.Result; diff --git a/youlai-admin/src/main/java/com/youlai/admin/controller/SysDictTypeController.java b/youlai-admin/src/main/java/com/youlai/admin/controller/SysDictTypeController.java index d1e5c3b70..28012f9f9 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/controller/SysDictTypeController.java +++ b/youlai-admin/src/main/java/com/youlai/admin/controller/SysDictTypeController.java @@ -3,7 +3,7 @@ package com.youlai.admin.controller; import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.youlai.admin.entity.SysDictType; +import com.youlai.admin.domain.entity.SysDictType; import com.youlai.admin.service.ISysDictTypeService; import com.youlai.common.result.PageResult; import com.youlai.common.result.Result; diff --git a/youlai-admin/src/main/java/com/youlai/admin/controller/SysMenuController.java b/youlai-admin/src/main/java/com/youlai/admin/controller/SysMenuController.java index d4c54f6ac..09002b997 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/controller/SysMenuController.java +++ b/youlai-admin/src/main/java/com/youlai/admin/controller/SysMenuController.java @@ -3,7 +3,8 @@ package com.youlai.admin.controller; import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.youlai.admin.entity.SysMenu; +import com.youlai.admin.domain.entity.SysMenu; +import com.youlai.admin.domain.entity.SysMenu; import com.youlai.admin.service.ISysMenuService; import com.youlai.common.result.PageResult; import com.youlai.common.result.Result; @@ -24,31 +25,29 @@ import java.util.List; @Slf4j public class SysMenuController { - @Autowired private ISysMenuService iSysMenuService; @ApiOperation(value = "列表分页", httpMethod = "GET") @ApiImplicitParams({ - @ApiImplicitParam(name = "page", value = "页码", paramType = "query", dataType = "Integer"), - @ApiImplicitParam(name = "limit", value = "每页数量", paramType = "query", dataType = "Integer"), - @ApiImplicitParam(name = "username", value = "菜单名", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "name", value = "菜单名称", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "mode", value = "查询模式: 1-表格数据 2-树形下拉", paramType = "query", dataType = "Integer") }) @GetMapping - public Result list(Integer page, Integer limit, String name) { - LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper() - .like(StrUtil.isNotBlank(name), SysMenu::getName, name) + public Result list(String name,Integer mode) { + LambdaQueryWrapper baseQuery = new LambdaQueryWrapper() + .orderByAsc(SysMenu::getSort) .orderByDesc(SysMenu::getUpdateTime) .orderByDesc(SysMenu::getCreateTime); - - if (page != null && limit != null) { - Page result = iSysMenuService.page(new Page<>(page, limit) ,queryWrapper); - - return PageResult.success(result.getRecords(), result.getTotal()); - } else if (limit != null) { - queryWrapper.last("LIMIT " + limit); + List list; + if (mode.equals(1)) { // 表格数据 + baseQuery = baseQuery.like(StrUtil.isNotBlank(name), SysMenu::getName, name); + list = iSysMenuService.listForTableData(baseQuery); + } else if (mode.equals(2)) { // tree-select 树形下拉数据 + list = iSysMenuService.listForTreeSelect(baseQuery); + } else { + list = iSysMenuService.list(baseQuery); } - List list = iSysMenuService.list(queryWrapper); return Result.success(list); } diff --git a/youlai-admin/src/main/java/com/youlai/admin/controller/SysRoleController.java b/youlai-admin/src/main/java/com/youlai/admin/controller/SysRoleController.java index 0401ffe6c..0b9a3ca55 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/controller/SysRoleController.java +++ b/youlai-admin/src/main/java/com/youlai/admin/controller/SysRoleController.java @@ -3,7 +3,7 @@ package com.youlai.admin.controller; import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.youlai.admin.entity.SysRole; +import com.youlai.admin.domain.entity.SysRole; import com.youlai.admin.service.ISysRoleService; import com.youlai.common.result.PageResult; import com.youlai.common.result.Result; @@ -32,7 +32,7 @@ public class SysRoleController { @ApiImplicitParams({ @ApiImplicitParam(name = "page", value = "页码", paramType = "query", dataType = "Integer"), @ApiImplicitParam(name = "limit", value = "每页数量", paramType = "query", dataType = "Integer"), - @ApiImplicitParam(name = "username", value = "角色名", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "username", value = "角色名称", paramType = "query", dataType = "String"), }) @GetMapping public Result list(Integer page, Integer limit, String name) { @@ -43,7 +43,6 @@ public class SysRoleController { if (page != null && limit != null) { Page result = iSysRoleService.page(new Page<>(page, limit) ,queryWrapper); - return PageResult.success(result.getRecords(), result.getTotal()); } else if (limit != null) { queryWrapper.last("LIMIT " + limit); diff --git a/youlai-admin/src/main/java/com/youlai/admin/controller/SysUserController.java b/youlai-admin/src/main/java/com/youlai/admin/controller/SysUserController.java index b26ac9204..ecf33662c 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/controller/SysUserController.java +++ b/youlai-admin/src/main/java/com/youlai/admin/controller/SysUserController.java @@ -3,18 +3,17 @@ package com.youlai.admin.controller; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.util.StrUtil; -import cn.hutool.json.JSON; import cn.hutool.json.JSONObject; import cn.hutool.json.JSONUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.youlai.admin.api.dto.UserDTO; -import com.youlai.admin.entity.SysUser; -import com.youlai.admin.entity.SysUserRole; +import com.youlai.admin.domain.entity.SysUser; +import com.youlai.admin.domain.entity.SysUserRole; import com.youlai.admin.service.ISysRoleService; import com.youlai.admin.service.ISysUserRoleService; import com.youlai.admin.service.ISysUserService; -import com.youlai.admin.vo.UserVO; +import com.youlai.admin.domain.vo.UserVO; import com.youlai.common.auth.constant.AuthConstant; import com.youlai.common.result.PageResult; import com.youlai.common.result.Result; @@ -24,13 +23,10 @@ import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.server.reactive.ServerHttpRequest; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; import java.util.Date; -import java.util.Enumeration; import java.util.List; import java.util.stream.Collectors; @@ -129,7 +125,6 @@ public class SysUserController { userDTO.setRoles(roles); } } - return userDTO; } diff --git a/youlai-admin/src/main/java/com/youlai/admin/entity/SysDept.java b/youlai-admin/src/main/java/com/youlai/admin/domain/entity/SysDept.java similarity index 93% rename from youlai-admin/src/main/java/com/youlai/admin/entity/SysDept.java rename to youlai-admin/src/main/java/com/youlai/admin/domain/entity/SysDept.java index ca143d1d0..103f20a4d 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/entity/SysDept.java +++ b/youlai-admin/src/main/java/com/youlai/admin/domain/entity/SysDept.java @@ -1,4 +1,4 @@ -package com.youlai.admin.entity; +package com.youlai.admin.domain.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; diff --git a/youlai-admin/src/main/java/com/youlai/admin/entity/SysDict.java b/youlai-admin/src/main/java/com/youlai/admin/domain/entity/SysDict.java similarity index 92% rename from youlai-admin/src/main/java/com/youlai/admin/entity/SysDict.java rename to youlai-admin/src/main/java/com/youlai/admin/domain/entity/SysDict.java index 89c54d0cf..94b633793 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/entity/SysDict.java +++ b/youlai-admin/src/main/java/com/youlai/admin/domain/entity/SysDict.java @@ -1,4 +1,4 @@ -package com.youlai.admin.entity; +package com.youlai.admin.domain.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; diff --git a/youlai-admin/src/main/java/com/youlai/admin/entity/SysDictType.java b/youlai-admin/src/main/java/com/youlai/admin/domain/entity/SysDictType.java similarity index 90% rename from youlai-admin/src/main/java/com/youlai/admin/entity/SysDictType.java rename to youlai-admin/src/main/java/com/youlai/admin/domain/entity/SysDictType.java index 9089c0c31..228bf7aee 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/entity/SysDictType.java +++ b/youlai-admin/src/main/java/com/youlai/admin/domain/entity/SysDictType.java @@ -1,4 +1,4 @@ -package com.youlai.admin.entity; +package com.youlai.admin.domain.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; diff --git a/youlai-admin/src/main/java/com/youlai/admin/entity/SysMenu.java b/youlai-admin/src/main/java/com/youlai/admin/domain/entity/SysMenu.java similarity index 92% rename from youlai-admin/src/main/java/com/youlai/admin/entity/SysMenu.java rename to youlai-admin/src/main/java/com/youlai/admin/domain/entity/SysMenu.java index 3867f7472..684eae4b4 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/entity/SysMenu.java +++ b/youlai-admin/src/main/java/com/youlai/admin/domain/entity/SysMenu.java @@ -1,4 +1,4 @@ -package com.youlai.admin.entity; +package com.youlai.admin.domain.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; diff --git a/youlai-admin/src/main/java/com/youlai/admin/entity/SysPermission.java b/youlai-admin/src/main/java/com/youlai/admin/domain/entity/SysPermission.java similarity index 91% rename from youlai-admin/src/main/java/com/youlai/admin/entity/SysPermission.java rename to youlai-admin/src/main/java/com/youlai/admin/domain/entity/SysPermission.java index 90cffb089..069c5fbbd 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/entity/SysPermission.java +++ b/youlai-admin/src/main/java/com/youlai/admin/domain/entity/SysPermission.java @@ -1,4 +1,4 @@ -package com.youlai.admin.entity; +package com.youlai.admin.domain.entity; import com.baomidou.mybatisplus.annotation.TableId; import lombok.Data; diff --git a/youlai-admin/src/main/java/com/youlai/admin/entity/SysRole.java b/youlai-admin/src/main/java/com/youlai/admin/domain/entity/SysRole.java similarity index 91% rename from youlai-admin/src/main/java/com/youlai/admin/entity/SysRole.java rename to youlai-admin/src/main/java/com/youlai/admin/domain/entity/SysRole.java index 6724712ed..1639042be 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/entity/SysRole.java +++ b/youlai-admin/src/main/java/com/youlai/admin/domain/entity/SysRole.java @@ -1,4 +1,4 @@ -package com.youlai.admin.entity; +package com.youlai.admin.domain.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; diff --git a/youlai-admin/src/main/java/com/youlai/admin/entity/SysRoleMenu.java b/youlai-admin/src/main/java/com/youlai/admin/domain/entity/SysRoleMenu.java similarity index 74% rename from youlai-admin/src/main/java/com/youlai/admin/entity/SysRoleMenu.java rename to youlai-admin/src/main/java/com/youlai/admin/domain/entity/SysRoleMenu.java index 618faf730..8f738f36a 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/entity/SysRoleMenu.java +++ b/youlai-admin/src/main/java/com/youlai/admin/domain/entity/SysRoleMenu.java @@ -1,4 +1,4 @@ -package com.youlai.admin.entity; +package com.youlai.admin.domain.entity; import lombok.Data; diff --git a/youlai-admin/src/main/java/com/youlai/admin/entity/SysRolePermission.java b/youlai-admin/src/main/java/com/youlai/admin/domain/entity/SysRolePermission.java similarity index 75% rename from youlai-admin/src/main/java/com/youlai/admin/entity/SysRolePermission.java rename to youlai-admin/src/main/java/com/youlai/admin/domain/entity/SysRolePermission.java index 7b945b4dc..41c13aa4e 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/entity/SysRolePermission.java +++ b/youlai-admin/src/main/java/com/youlai/admin/domain/entity/SysRolePermission.java @@ -1,4 +1,4 @@ -package com.youlai.admin.entity; +package com.youlai.admin.domain.entity; import lombok.Data; diff --git a/youlai-admin/src/main/java/com/youlai/admin/entity/SysUser.java b/youlai-admin/src/main/java/com/youlai/admin/domain/entity/SysUser.java similarity index 92% rename from youlai-admin/src/main/java/com/youlai/admin/entity/SysUser.java rename to youlai-admin/src/main/java/com/youlai/admin/domain/entity/SysUser.java index 37217699c..e5e931c8f 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/entity/SysUser.java +++ b/youlai-admin/src/main/java/com/youlai/admin/domain/entity/SysUser.java @@ -1,4 +1,4 @@ -package com.youlai.admin.entity; +package com.youlai.admin.domain.entity; import com.baomidou.mybatisplus.annotation.TableId; import com.youlai.common.core.entity.BaseEntity; diff --git a/youlai-admin/src/main/java/com/youlai/admin/entity/SysUserRole.java b/youlai-admin/src/main/java/com/youlai/admin/domain/entity/SysUserRole.java similarity index 74% rename from youlai-admin/src/main/java/com/youlai/admin/entity/SysUserRole.java rename to youlai-admin/src/main/java/com/youlai/admin/domain/entity/SysUserRole.java index 3b5eada62..233805f9b 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/entity/SysUserRole.java +++ b/youlai-admin/src/main/java/com/youlai/admin/domain/entity/SysUserRole.java @@ -1,4 +1,4 @@ -package com.youlai.admin.entity; +package com.youlai.admin.domain.entity; import lombok.Data; diff --git a/youlai-admin/src/main/java/com/youlai/admin/vo/DeptVO.java b/youlai-admin/src/main/java/com/youlai/admin/domain/vo/DeptVO.java similarity index 73% rename from youlai-admin/src/main/java/com/youlai/admin/vo/DeptVO.java rename to youlai-admin/src/main/java/com/youlai/admin/domain/vo/DeptVO.java index 1816d1688..1a73b2693 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/vo/DeptVO.java +++ b/youlai-admin/src/main/java/com/youlai/admin/domain/vo/DeptVO.java @@ -1,7 +1,5 @@ -package com.youlai.admin.vo; +package com.youlai.admin.domain.vo; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; import lombok.Data; import java.util.List; diff --git a/youlai-admin/src/main/java/com/youlai/admin/domain/vo/MenuVO.java b/youlai-admin/src/main/java/com/youlai/admin/domain/vo/MenuVO.java new file mode 100644 index 000000000..37ec8be45 --- /dev/null +++ b/youlai-admin/src/main/java/com/youlai/admin/domain/vo/MenuVO.java @@ -0,0 +1,31 @@ +package com.youlai.admin.domain.vo; + +import com.youlai.common.core.entity.BaseEntity; +import lombok.Data; + +import java.util.List; + +@Data +public class MenuVO extends BaseEntity { + + private Integer id; + + private String name; + + private Integer parentId; + + private String icon; + + private Integer sort; + + private Integer visible; + + private Integer status; + + private String path; + + private String perms; + + private List children; + +} diff --git a/youlai-admin/src/main/java/com/youlai/admin/vo/TreeSelectVO.java b/youlai-admin/src/main/java/com/youlai/admin/domain/vo/TreeSelectVO.java similarity index 83% rename from youlai-admin/src/main/java/com/youlai/admin/vo/TreeSelectVO.java rename to youlai-admin/src/main/java/com/youlai/admin/domain/vo/TreeSelectVO.java index cf354727d..0e9bce675 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/vo/TreeSelectVO.java +++ b/youlai-admin/src/main/java/com/youlai/admin/domain/vo/TreeSelectVO.java @@ -1,4 +1,4 @@ -package com.youlai.admin.vo; +package com.youlai.admin.domain.vo; import lombok.Data; diff --git a/youlai-admin/src/main/java/com/youlai/admin/vo/UserVO.java b/youlai-admin/src/main/java/com/youlai/admin/domain/vo/UserVO.java similarity index 84% rename from youlai-admin/src/main/java/com/youlai/admin/vo/UserVO.java rename to youlai-admin/src/main/java/com/youlai/admin/domain/vo/UserVO.java index 5121c708b..e4b19d64c 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/vo/UserVO.java +++ b/youlai-admin/src/main/java/com/youlai/admin/domain/vo/UserVO.java @@ -1,4 +1,4 @@ -package com.youlai.admin.vo; +package com.youlai.admin.domain.vo; import lombok.Data; diff --git a/youlai-admin/src/main/java/com/youlai/admin/mapper/SysDeptMapper.java b/youlai-admin/src/main/java/com/youlai/admin/mapper/SysDeptMapper.java index 76c19310a..5383ce4b0 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/mapper/SysDeptMapper.java +++ b/youlai-admin/src/main/java/com/youlai/admin/mapper/SysDeptMapper.java @@ -1,7 +1,7 @@ package com.youlai.admin.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.youlai.admin.entity.SysDept; +import com.youlai.admin.domain.entity.SysDept; import org.mapstruct.Mapper; @Mapper diff --git a/youlai-admin/src/main/java/com/youlai/admin/mapper/SysDictMapper.java b/youlai-admin/src/main/java/com/youlai/admin/mapper/SysDictMapper.java index a4bed44bf..6830aec1a 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/mapper/SysDictMapper.java +++ b/youlai-admin/src/main/java/com/youlai/admin/mapper/SysDictMapper.java @@ -1,7 +1,7 @@ package com.youlai.admin.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.youlai.admin.entity.SysDict; +import com.youlai.admin.domain.entity.SysDict; import org.mapstruct.Mapper; @Mapper diff --git a/youlai-admin/src/main/java/com/youlai/admin/mapper/SysDictTypeMapper.java b/youlai-admin/src/main/java/com/youlai/admin/mapper/SysDictTypeMapper.java index b744b3e75..85d771c72 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/mapper/SysDictTypeMapper.java +++ b/youlai-admin/src/main/java/com/youlai/admin/mapper/SysDictTypeMapper.java @@ -1,7 +1,7 @@ package com.youlai.admin.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.youlai.admin.entity.SysDictType; +import com.youlai.admin.domain.entity.SysDictType; import org.mapstruct.Mapper; @Mapper diff --git a/youlai-admin/src/main/java/com/youlai/admin/mapper/SysMenuMapper.java b/youlai-admin/src/main/java/com/youlai/admin/mapper/SysMenuMapper.java index 0e9918fd0..3684a5c65 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/mapper/SysMenuMapper.java +++ b/youlai-admin/src/main/java/com/youlai/admin/mapper/SysMenuMapper.java @@ -1,7 +1,7 @@ package com.youlai.admin.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.youlai.admin.entity.SysMenu; +import com.youlai.admin.domain.entity.SysMenu; import org.mapstruct.Mapper; @Mapper diff --git a/youlai-admin/src/main/java/com/youlai/admin/mapper/SysPermissionMapper.java b/youlai-admin/src/main/java/com/youlai/admin/mapper/SysPermissionMapper.java index 959a2b5f7..964cf2668 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/mapper/SysPermissionMapper.java +++ b/youlai-admin/src/main/java/com/youlai/admin/mapper/SysPermissionMapper.java @@ -1,7 +1,7 @@ package com.youlai.admin.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.youlai.admin.entity.SysPermission; +import com.youlai.admin.domain.entity.SysPermission; import org.apache.ibatis.annotations.Select; import org.mapstruct.Mapper; diff --git a/youlai-admin/src/main/java/com/youlai/admin/mapper/SysRoleMapper.java b/youlai-admin/src/main/java/com/youlai/admin/mapper/SysRoleMapper.java index b4dcd8140..bfece930d 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/mapper/SysRoleMapper.java +++ b/youlai-admin/src/main/java/com/youlai/admin/mapper/SysRoleMapper.java @@ -1,7 +1,7 @@ package com.youlai.admin.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.youlai.admin.entity.SysRole; +import com.youlai.admin.domain.entity.SysRole; import org.mapstruct.Mapper; @Mapper diff --git a/youlai-admin/src/main/java/com/youlai/admin/mapper/SysRoleMenuMapper.java b/youlai-admin/src/main/java/com/youlai/admin/mapper/SysRoleMenuMapper.java index 731b11cb0..f93152e1a 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/mapper/SysRoleMenuMapper.java +++ b/youlai-admin/src/main/java/com/youlai/admin/mapper/SysRoleMenuMapper.java @@ -1,7 +1,7 @@ package com.youlai.admin.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.youlai.admin.entity.SysRoleMenu; +import com.youlai.admin.domain.entity.SysRoleMenu; import org.mapstruct.Mapper; @Mapper diff --git a/youlai-admin/src/main/java/com/youlai/admin/mapper/SysRolePermissionMapper.java b/youlai-admin/src/main/java/com/youlai/admin/mapper/SysRolePermissionMapper.java index 4620dcba2..df3191a17 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/mapper/SysRolePermissionMapper.java +++ b/youlai-admin/src/main/java/com/youlai/admin/mapper/SysRolePermissionMapper.java @@ -1,7 +1,7 @@ package com.youlai.admin.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.youlai.admin.entity.SysRolePermission; +import com.youlai.admin.domain.entity.SysRolePermission; import org.mapstruct.Mapper; @Mapper diff --git a/youlai-admin/src/main/java/com/youlai/admin/mapper/SysUserMapper.java b/youlai-admin/src/main/java/com/youlai/admin/mapper/SysUserMapper.java index b31decbc3..c259a0294 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/mapper/SysUserMapper.java +++ b/youlai-admin/src/main/java/com/youlai/admin/mapper/SysUserMapper.java @@ -1,7 +1,7 @@ package com.youlai.admin.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.youlai.admin.entity.SysUser; +import com.youlai.admin.domain.entity.SysUser; import org.mapstruct.Mapper; @Mapper diff --git a/youlai-admin/src/main/java/com/youlai/admin/mapper/SysUserRoleMapper.java b/youlai-admin/src/main/java/com/youlai/admin/mapper/SysUserRoleMapper.java index e4913b3de..8d1bfa048 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/mapper/SysUserRoleMapper.java +++ b/youlai-admin/src/main/java/com/youlai/admin/mapper/SysUserRoleMapper.java @@ -1,7 +1,7 @@ package com.youlai.admin.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.youlai.admin.entity.SysUserRole; +import com.youlai.admin.domain.entity.SysUserRole; import org.mapstruct.Mapper; @Mapper diff --git a/youlai-admin/src/main/java/com/youlai/admin/service/ISysDeptService.java b/youlai-admin/src/main/java/com/youlai/admin/service/ISysDeptService.java index 46b3f9637..7c3ca83e0 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/service/ISysDeptService.java +++ b/youlai-admin/src/main/java/com/youlai/admin/service/ISysDeptService.java @@ -3,9 +3,9 @@ package com.youlai.admin.service; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.IService; -import com.youlai.admin.entity.SysDept; -import com.youlai.admin.vo.DeptVO; -import com.youlai.admin.vo.TreeSelectVO; +import com.youlai.admin.domain.entity.SysDept; +import com.youlai.admin.domain.vo.DeptVO; +import com.youlai.admin.domain.vo.TreeSelectVO; import java.util.List; diff --git a/youlai-admin/src/main/java/com/youlai/admin/service/ISysDictService.java b/youlai-admin/src/main/java/com/youlai/admin/service/ISysDictService.java index 2e2ef2ff0..cfce6deef 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/service/ISysDictService.java +++ b/youlai-admin/src/main/java/com/youlai/admin/service/ISysDictService.java @@ -2,7 +2,7 @@ package com.youlai.admin.service; import com.baomidou.mybatisplus.extension.service.IService; -import com.youlai.admin.entity.SysDict; +import com.youlai.admin.domain.entity.SysDict; public interface ISysDictService extends IService { } diff --git a/youlai-admin/src/main/java/com/youlai/admin/service/ISysDictTypeService.java b/youlai-admin/src/main/java/com/youlai/admin/service/ISysDictTypeService.java index 1250a63af..b8ddb1f16 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/service/ISysDictTypeService.java +++ b/youlai-admin/src/main/java/com/youlai/admin/service/ISysDictTypeService.java @@ -2,7 +2,7 @@ package com.youlai.admin.service; import com.baomidou.mybatisplus.extension.service.IService; -import com.youlai.admin.entity.SysDictType; +import com.youlai.admin.domain.entity.SysDictType; public interface ISysDictTypeService extends IService { diff --git a/youlai-admin/src/main/java/com/youlai/admin/service/ISysMenuService.java b/youlai-admin/src/main/java/com/youlai/admin/service/ISysMenuService.java index d95ea5ce5..c65c20706 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/service/ISysMenuService.java +++ b/youlai-admin/src/main/java/com/youlai/admin/service/ISysMenuService.java @@ -1,8 +1,17 @@ package com.youlai.admin.service; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.IService; -import com.youlai.admin.entity.SysMenu; +import com.youlai.admin.domain.entity.SysMenu; +import com.youlai.admin.domain.vo.MenuVO; +import com.youlai.admin.domain.vo.TreeSelectVO; + +import java.util.List; public interface ISysMenuService extends IService { + + List listForTableData(LambdaQueryWrapper baseQuery); + + List listForTreeSelect(LambdaQueryWrapper baseQuery); } diff --git a/youlai-admin/src/main/java/com/youlai/admin/service/ISysPermissionService.java b/youlai-admin/src/main/java/com/youlai/admin/service/ISysPermissionService.java index 5343315f4..3f45565fb 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/service/ISysPermissionService.java +++ b/youlai-admin/src/main/java/com/youlai/admin/service/ISysPermissionService.java @@ -2,7 +2,7 @@ package com.youlai.admin.service; import com.baomidou.mybatisplus.extension.service.IService; -import com.youlai.admin.entity.SysPermission; +import com.youlai.admin.domain.entity.SysPermission; import java.util.List; diff --git a/youlai-admin/src/main/java/com/youlai/admin/service/ISysRoleMenuService.java b/youlai-admin/src/main/java/com/youlai/admin/service/ISysRoleMenuService.java index 6c6babbf2..80f4ce858 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/service/ISysRoleMenuService.java +++ b/youlai-admin/src/main/java/com/youlai/admin/service/ISysRoleMenuService.java @@ -2,7 +2,7 @@ package com.youlai.admin.service; import com.baomidou.mybatisplus.extension.service.IService; -import com.youlai.admin.entity.SysRoleMenu; +import com.youlai.admin.domain.entity.SysRoleMenu; public interface ISysRoleMenuService extends IService { } diff --git a/youlai-admin/src/main/java/com/youlai/admin/service/ISysRolePermissionService.java b/youlai-admin/src/main/java/com/youlai/admin/service/ISysRolePermissionService.java index 513091e16..52eb68884 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/service/ISysRolePermissionService.java +++ b/youlai-admin/src/main/java/com/youlai/admin/service/ISysRolePermissionService.java @@ -2,7 +2,7 @@ package com.youlai.admin.service; import com.baomidou.mybatisplus.extension.service.IService; -import com.youlai.admin.entity.SysRolePermission; +import com.youlai.admin.domain.entity.SysRolePermission; public interface ISysRolePermissionService extends IService { } diff --git a/youlai-admin/src/main/java/com/youlai/admin/service/ISysRoleService.java b/youlai-admin/src/main/java/com/youlai/admin/service/ISysRoleService.java index 67ec03c47..7e46479e6 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/service/ISysRoleService.java +++ b/youlai-admin/src/main/java/com/youlai/admin/service/ISysRoleService.java @@ -2,7 +2,7 @@ package com.youlai.admin.service; import com.baomidou.mybatisplus.extension.service.IService; -import com.youlai.admin.entity.SysRole; +import com.youlai.admin.domain.entity.SysRole; public interface ISysRoleService extends IService { } diff --git a/youlai-admin/src/main/java/com/youlai/admin/service/ISysUserRoleService.java b/youlai-admin/src/main/java/com/youlai/admin/service/ISysUserRoleService.java index d31a59191..46c3ea093 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/service/ISysUserRoleService.java +++ b/youlai-admin/src/main/java/com/youlai/admin/service/ISysUserRoleService.java @@ -2,7 +2,7 @@ package com.youlai.admin.service; import com.baomidou.mybatisplus.extension.service.IService; -import com.youlai.admin.entity.SysUserRole; +import com.youlai.admin.domain.entity.SysUserRole; public interface ISysUserRoleService extends IService { } diff --git a/youlai-admin/src/main/java/com/youlai/admin/service/ISysUserService.java b/youlai-admin/src/main/java/com/youlai/admin/service/ISysUserService.java index 960bd3c4d..71757c11d 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/service/ISysUserService.java +++ b/youlai-admin/src/main/java/com/youlai/admin/service/ISysUserService.java @@ -2,7 +2,7 @@ package com.youlai.admin.service; import com.baomidou.mybatisplus.extension.service.IService; -import com.youlai.admin.entity.SysUser; +import com.youlai.admin.domain.entity.SysUser; public interface ISysUserService extends IService { } diff --git a/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysDeptServiceImpl.java b/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysDeptServiceImpl.java index 52c4e9835..b0b47b5ce 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysDeptServiceImpl.java +++ b/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysDeptServiceImpl.java @@ -4,11 +4,11 @@ import cn.hutool.core.bean.BeanUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.youlai.admin.common.AdminConstant; -import com.youlai.admin.entity.SysDept; +import com.youlai.admin.domain.entity.SysDept; import com.youlai.admin.mapper.SysDeptMapper; import com.youlai.admin.service.ISysDeptService; -import com.youlai.admin.vo.DeptVO; -import com.youlai.admin.vo.TreeSelectVO; +import com.youlai.admin.domain.vo.DeptVO; +import com.youlai.admin.domain.vo.TreeSelectVO; import org.springframework.stereotype.Service; import java.util.ArrayList; @@ -26,6 +26,16 @@ public class SysDeptServiceImpl extends ServiceImpl impl } + + @Override + public List listForTreeSelect(LambdaQueryWrapper baseQuery) { + List deptList = this.baseMapper.selectList(baseQuery); + List list = recursionForTreeSelect(AdminConstant.ROOT_DEPT_ID, deptList); + return list; + } + + + /** * 递归生成部门表格数据 * @param parentId @@ -47,12 +57,6 @@ public class SysDeptServiceImpl extends ServiceImpl impl return list; } - @Override - public List listForTreeSelect(LambdaQueryWrapper baseQuery) { - List deptList = this.baseMapper.selectList(baseQuery); - List list = recursionForTreeSelect(AdminConstant.ROOT_DEPT_ID, deptList); - return list; - } /** * 递归生成部门树形下拉数据 diff --git a/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysDictServiceImpl.java b/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysDictServiceImpl.java index f63093555..d2ea52d77 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysDictServiceImpl.java +++ b/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysDictServiceImpl.java @@ -1,7 +1,7 @@ package com.youlai.admin.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.youlai.admin.entity.SysDict; +import com.youlai.admin.domain.entity.SysDict; import com.youlai.admin.mapper.SysDictMapper; import com.youlai.admin.service.ISysDictService; import org.springframework.stereotype.Service; diff --git a/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysDictTypeServiceImpl.java b/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysDictTypeServiceImpl.java index cf1f811eb..686005a01 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysDictTypeServiceImpl.java +++ b/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysDictTypeServiceImpl.java @@ -1,7 +1,7 @@ package com.youlai.admin.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.youlai.admin.entity.SysDictType; +import com.youlai.admin.domain.entity.SysDictType; import com.youlai.admin.mapper.SysDictTypeMapper; import com.youlai.admin.service.ISysDictTypeService; import org.springframework.stereotype.Service; diff --git a/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysMenuServiceImpl.java b/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysMenuServiceImpl.java index 6747dc387..6a5f3a541 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysMenuServiceImpl.java +++ b/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysMenuServiceImpl.java @@ -1,12 +1,86 @@ package com.youlai.admin.service.impl; +import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.youlai.admin.entity.SysMenu; +import com.youlai.admin.common.AdminConstant; +import com.youlai.admin.domain.entity.SysMenu; +import com.youlai.admin.domain.entity.SysMenu; +import com.youlai.admin.domain.vo.MenuVO; +import com.youlai.admin.domain.vo.MenuVO; +import com.youlai.admin.domain.vo.TreeSelectVO; import com.youlai.admin.mapper.SysMenuMapper; import com.youlai.admin.service.ISysMenuService; import org.springframework.stereotype.Service; +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; + @Service public class SysMenuServiceImpl extends ServiceImpl implements ISysMenuService { + + @Override + public List listForTableData(LambdaQueryWrapper baseQuery) { + List deptList = this.baseMapper.selectList(baseQuery); + List list = recursionForTableData(AdminConstant.ROOT_DEPT_ID, deptList); + return list; + } + + + + @Override + public List listForTreeSelect(LambdaQueryWrapper baseQuery) { + List deptList = this.baseMapper.selectList(baseQuery); + List list = recursionForTreeSelect(AdminConstant.ROOT_DEPT_ID, deptList); + return list; + } + + + + /** + * 递归生成部门表格数据 + * @param parentId + * @param deptList + * @return + */ + public static List recursionForTableData(int parentId, List deptList) { + List list = new ArrayList<>(); + Optional.ofNullable(deptList).orElse(new ArrayList<>()) + .stream() + .filter(dept -> dept.getParentId().equals(parentId)) + .forEach(dept -> { + MenuVO deptVO = new MenuVO(); + BeanUtil.copyProperties(dept, deptVO); + List children = recursionForTableData(dept.getId(), deptList); + deptVO.setChildren(children); + list.add(deptVO); + }); + return list; + } + + + /** + * 递归生成部门树形下拉数据 + * @param parentId + * @param deptList + * @return + */ + public static List recursionForTreeSelect(int parentId, List deptList) { + List list = new ArrayList<>(); + Optional.ofNullable(deptList).orElse(new ArrayList<>()) + .stream() + .filter(dept -> dept.getParentId().equals(parentId)) + .forEach(dept -> { + TreeSelectVO treeSelectVO = new TreeSelectVO(); + treeSelectVO.setId(dept.getId().toString()); + treeSelectVO.setLabel(dept.getName()); + List children = recursionForTreeSelect(dept.getId(), deptList); + treeSelectVO.setChildren(children); + list.add(treeSelectVO); + }); + return list; + } + } diff --git a/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysPermissionServiceImpl.java b/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysPermissionServiceImpl.java index 3f0c140f4..964ed21b2 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysPermissionServiceImpl.java +++ b/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysPermissionServiceImpl.java @@ -1,7 +1,7 @@ package com.youlai.admin.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.youlai.admin.entity.SysPermission; +import com.youlai.admin.domain.entity.SysPermission; import com.youlai.admin.mapper.SysPermissionMapper; import com.youlai.admin.service.ISysPermissionService; import org.springframework.stereotype.Service; diff --git a/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysRoleMenuServiceImpl.java b/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysRoleMenuServiceImpl.java index 3958377e9..c9de5217e 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysRoleMenuServiceImpl.java +++ b/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysRoleMenuServiceImpl.java @@ -1,7 +1,7 @@ package com.youlai.admin.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.youlai.admin.entity.SysRoleMenu; +import com.youlai.admin.domain.entity.SysRoleMenu; import com.youlai.admin.mapper.SysRoleMenuMapper; import com.youlai.admin.service.ISysRoleMenuService; import org.springframework.stereotype.Service; diff --git a/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysRolePermissionServiceImpl.java b/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysRolePermissionServiceImpl.java index 735896c00..71211efa3 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysRolePermissionServiceImpl.java +++ b/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysRolePermissionServiceImpl.java @@ -1,7 +1,7 @@ package com.youlai.admin.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.youlai.admin.entity.SysRolePermission; +import com.youlai.admin.domain.entity.SysRolePermission; import com.youlai.admin.mapper.SysRolePermissionMapper; import com.youlai.admin.service.ISysRolePermissionService; import org.springframework.stereotype.Service; diff --git a/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysRoleServiceImpl.java b/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysRoleServiceImpl.java index 9bdf84632..3c260d5da 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysRoleServiceImpl.java +++ b/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysRoleServiceImpl.java @@ -1,7 +1,7 @@ package com.youlai.admin.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.youlai.admin.entity.SysRole; +import com.youlai.admin.domain.entity.SysRole; import com.youlai.admin.mapper.SysRoleMapper; import com.youlai.admin.service.ISysRoleService; import org.springframework.stereotype.Service; diff --git a/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysUserRoleServiceImpl.java b/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysUserRoleServiceImpl.java index 42891af21..e88a2fed7 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysUserRoleServiceImpl.java +++ b/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysUserRoleServiceImpl.java @@ -1,7 +1,7 @@ package com.youlai.admin.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.youlai.admin.entity.SysUserRole; +import com.youlai.admin.domain.entity.SysUserRole; import com.youlai.admin.mapper.SysUserRoleMapper; import com.youlai.admin.service.ISysUserRoleService; import org.springframework.stereotype.Service; diff --git a/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysUserServiceImpl.java b/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysUserServiceImpl.java index debe11aa4..eb9e941ab 100644 --- a/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysUserServiceImpl.java +++ b/youlai-admin/src/main/java/com/youlai/admin/service/impl/SysUserServiceImpl.java @@ -1,7 +1,7 @@ package com.youlai.admin.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.youlai.admin.entity.SysUser; +import com.youlai.admin.domain.entity.SysUser; import com.youlai.admin.mapper.SysUserMapper; import com.youlai.admin.service.ISysUserService; import org.springframework.stereotype.Service;