diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysUserController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysUserController.java index 22afee0..af8ee02 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysUserController.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysUserController.java @@ -14,6 +14,7 @@ import com.ruoyi.system.domain.SysDept; import com.ruoyi.system.domain.SysPost; import com.ruoyi.system.domain.SysRole; import com.ruoyi.system.domain.SysUser; +import com.ruoyi.system.domain.bo.SysPostBo; import com.ruoyi.system.service.*; import jakarta.annotation.Resource; import jakarta.servlet.http.HttpServletResponse; @@ -114,7 +115,7 @@ public class SysUserController extends BaseController { SysRole sysRole = new SysRole(); sysRole.setStatus(UserConstants.ROLE_NORMAL); List roles = roleService.selectRoleList(sysRole); - SysPost sysPost = new SysPost(); + SysPostBo sysPost = new SysPostBo(); sysPost.setStatus(UserConstants.POST_NORMAL); ajax.put("roles", SysUser.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList())); ajax.put("posts", postService.selectPostList(sysPost)); diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml index 227c459..1816aff 100644 --- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml @@ -16,36 +16,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + - select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark + select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark from sys_post - - - - - - - + + + - + - - - - - - - update sys_post - - post_code = #{postCode}, - post_name = #{postName}, - post_sort = #{postSort}, - status = #{status}, - remark = #{remark}, - update_by = #{updateBy}, - update_time = sysdate() - - where post_id = #{postId} - - - - insert into sys_post( - post_id, - post_code, - post_name, - post_sort, - status, - remark, - create_by, - create_time - )values( - #{postId}, - #{postCode}, - #{postName}, - #{postSort}, - #{status}, - #{remark}, - #{createBy}, - sysdate() - ) - - - - delete from sys_post where post_id = #{postId} - - - - delete from sys_post where post_id in - - #{postId} - - - \ No newline at end of file + + +