Loading censoft-rongtong/src/main/java/com/censoft/censoftrongtong/controller/ProjectUserPostController.java +7 −7 Original line number Original line Diff line number Diff line Loading @@ -30,7 +30,7 @@ import com.ruoyi.common.core.page.TableDataInfo; * @date 2023-11-30 * @date 2023-11-30 */ */ @RestController @RestController @RequestMapping("/system/currentProject") @RequestMapping("/risk/currentProject") public class ProjectUserPostController extends BaseController public class ProjectUserPostController extends BaseController { { @Autowired @Autowired Loading @@ -39,7 +39,7 @@ public class ProjectUserPostController extends BaseController /** /** * 查询项目用户岗位关系列表 * 查询项目用户岗位关系列表 */ */ @PreAuthorize("@ss.hasPermi('system:currentProject:list')") @PreAuthorize("@ss.hasPermi('risk:currentProject:list')") @GetMapping("/list") @GetMapping("/list") public TableDataInfo list(ProjectUserPost projectUserPost) public TableDataInfo list(ProjectUserPost projectUserPost) { { Loading @@ -51,7 +51,7 @@ public class ProjectUserPostController extends BaseController /** /** * 导出项目用户岗位关系列表 * 导出项目用户岗位关系列表 */ */ @PreAuthorize("@ss.hasPermi('system:currentProject:export')") @PreAuthorize("@ss.hasPermi('risk:currentProject:export')") @Log(title = "项目用户岗位关系", businessType = BusinessType.EXPORT) @Log(title = "项目用户岗位关系", businessType = BusinessType.EXPORT) @PostMapping("/export") @PostMapping("/export") public void export(HttpServletResponse response, ProjectUserPost projectUserPost) public void export(HttpServletResponse response, ProjectUserPost projectUserPost) Loading @@ -64,7 +64,7 @@ public class ProjectUserPostController extends BaseController /** /** * 获取项目用户岗位关系详细信息 * 获取项目用户岗位关系详细信息 */ */ @PreAuthorize("@ss.hasPermi('system:currentProject:query')") @PreAuthorize("@ss.hasPermi('risk:currentProject:query')") @GetMapping(value = "/{id}") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id) { { Loading @@ -74,7 +74,7 @@ public class ProjectUserPostController extends BaseController /** /** * 新增项目用户岗位关系 * 新增项目用户岗位关系 */ */ @PreAuthorize("@ss.hasPermi('system:currentProject:add')") @PreAuthorize("@ss.hasPermi('risk:currentProject:add')") @Log(title = "项目用户岗位关系", businessType = BusinessType.INSERT) @Log(title = "项目用户岗位关系", businessType = BusinessType.INSERT) @PostMapping("save") @PostMapping("save") public AjaxResult add(@RequestBody ProjectUserPost projectUserPost) public AjaxResult add(@RequestBody ProjectUserPost projectUserPost) Loading @@ -90,7 +90,7 @@ public class ProjectUserPostController extends BaseController /** /** * 修改项目用户岗位关系 * 修改项目用户岗位关系 */ */ @PreAuthorize("@ss.hasPermi('system:currentProject:edit')") @PreAuthorize("@ss.hasPermi('risk:currentProject:edit')") @Log(title = "项目用户岗位关系", businessType = BusinessType.UPDATE) @Log(title = "项目用户岗位关系", businessType = BusinessType.UPDATE) @PutMapping @PutMapping public AjaxResult edit(@RequestBody ProjectUserPost projectUserPost) public AjaxResult edit(@RequestBody ProjectUserPost projectUserPost) Loading @@ -101,7 +101,7 @@ public class ProjectUserPostController extends BaseController /** /** * 删除项目用户岗位关系 * 删除项目用户岗位关系 */ */ @PreAuthorize("@ss.hasPermi('system:currentProject:remove')") @PreAuthorize("@ss.hasPermi('risk:currentProject:remove')") @Log(title = "项目用户岗位关系", businessType = BusinessType.DELETE) @Log(title = "项目用户岗位关系", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids) Loading censoft-rongtong/src/main/java/com/censoft/censoftrongtong/domain/ProjectUserPost.java +2 −0 Original line number Original line Diff line number Diff line Loading @@ -39,4 +39,6 @@ public class ProjectUserPost extends BaseEntityClean @Excel(name = "岗位 id") @Excel(name = "岗位 id") @ApiModelProperty("岗位 id") @ApiModelProperty("岗位 id") private Long postId; private Long postId; private String projectName; } } censoft-rongtong/src/main/resources/mapper/system/ProjectUserPostMapper.xml +10 −1 Original line number Original line Diff line number Diff line Loading @@ -9,6 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <result property="projectId" column="project_id" /> <result property="projectId" column="project_id" /> <result property="userId" column="user_id" /> <result property="userId" column="user_id" /> <result property="postId" column="post_id" /> <result property="postId" column="post_id" /> <result property="projectName" column="project_name" /> </resultMap> </resultMap> <sql id="selectProjectUserPostVo"> <sql id="selectProjectUserPostVo"> Loading @@ -16,7 +17,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" </sql> </sql> <select id="selectProjectUserPostList" parameterType="com.censoft.censoftrongtong.domain.ProjectUserPost" resultMap="ProjectUserPostResult"> <select id="selectProjectUserPostList" parameterType="com.censoft.censoftrongtong.domain.ProjectUserPost" resultMap="ProjectUserPostResult"> <include refid="selectProjectUserPostVo"/> SELECT a.id, project_id, b.`name` project_name, user_id, post_id FROM project_user_post a LEFT JOIN ledger_project b on a.project_id = b.id <where> <where> <if test="projectId != null "> and project_id = #{projectId}</if> <if test="projectId != null "> and project_id = #{projectId}</if> <if test="userId != null "> and user_id = #{userId}</if> <if test="userId != null "> and user_id = #{userId}</if> Loading Loading
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/controller/ProjectUserPostController.java +7 −7 Original line number Original line Diff line number Diff line Loading @@ -30,7 +30,7 @@ import com.ruoyi.common.core.page.TableDataInfo; * @date 2023-11-30 * @date 2023-11-30 */ */ @RestController @RestController @RequestMapping("/system/currentProject") @RequestMapping("/risk/currentProject") public class ProjectUserPostController extends BaseController public class ProjectUserPostController extends BaseController { { @Autowired @Autowired Loading @@ -39,7 +39,7 @@ public class ProjectUserPostController extends BaseController /** /** * 查询项目用户岗位关系列表 * 查询项目用户岗位关系列表 */ */ @PreAuthorize("@ss.hasPermi('system:currentProject:list')") @PreAuthorize("@ss.hasPermi('risk:currentProject:list')") @GetMapping("/list") @GetMapping("/list") public TableDataInfo list(ProjectUserPost projectUserPost) public TableDataInfo list(ProjectUserPost projectUserPost) { { Loading @@ -51,7 +51,7 @@ public class ProjectUserPostController extends BaseController /** /** * 导出项目用户岗位关系列表 * 导出项目用户岗位关系列表 */ */ @PreAuthorize("@ss.hasPermi('system:currentProject:export')") @PreAuthorize("@ss.hasPermi('risk:currentProject:export')") @Log(title = "项目用户岗位关系", businessType = BusinessType.EXPORT) @Log(title = "项目用户岗位关系", businessType = BusinessType.EXPORT) @PostMapping("/export") @PostMapping("/export") public void export(HttpServletResponse response, ProjectUserPost projectUserPost) public void export(HttpServletResponse response, ProjectUserPost projectUserPost) Loading @@ -64,7 +64,7 @@ public class ProjectUserPostController extends BaseController /** /** * 获取项目用户岗位关系详细信息 * 获取项目用户岗位关系详细信息 */ */ @PreAuthorize("@ss.hasPermi('system:currentProject:query')") @PreAuthorize("@ss.hasPermi('risk:currentProject:query')") @GetMapping(value = "/{id}") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id) { { Loading @@ -74,7 +74,7 @@ public class ProjectUserPostController extends BaseController /** /** * 新增项目用户岗位关系 * 新增项目用户岗位关系 */ */ @PreAuthorize("@ss.hasPermi('system:currentProject:add')") @PreAuthorize("@ss.hasPermi('risk:currentProject:add')") @Log(title = "项目用户岗位关系", businessType = BusinessType.INSERT) @Log(title = "项目用户岗位关系", businessType = BusinessType.INSERT) @PostMapping("save") @PostMapping("save") public AjaxResult add(@RequestBody ProjectUserPost projectUserPost) public AjaxResult add(@RequestBody ProjectUserPost projectUserPost) Loading @@ -90,7 +90,7 @@ public class ProjectUserPostController extends BaseController /** /** * 修改项目用户岗位关系 * 修改项目用户岗位关系 */ */ @PreAuthorize("@ss.hasPermi('system:currentProject:edit')") @PreAuthorize("@ss.hasPermi('risk:currentProject:edit')") @Log(title = "项目用户岗位关系", businessType = BusinessType.UPDATE) @Log(title = "项目用户岗位关系", businessType = BusinessType.UPDATE) @PutMapping @PutMapping public AjaxResult edit(@RequestBody ProjectUserPost projectUserPost) public AjaxResult edit(@RequestBody ProjectUserPost projectUserPost) Loading @@ -101,7 +101,7 @@ public class ProjectUserPostController extends BaseController /** /** * 删除项目用户岗位关系 * 删除项目用户岗位关系 */ */ @PreAuthorize("@ss.hasPermi('system:currentProject:remove')") @PreAuthorize("@ss.hasPermi('risk:currentProject:remove')") @Log(title = "项目用户岗位关系", businessType = BusinessType.DELETE) @Log(title = "项目用户岗位关系", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids) Loading
censoft-rongtong/src/main/java/com/censoft/censoftrongtong/domain/ProjectUserPost.java +2 −0 Original line number Original line Diff line number Diff line Loading @@ -39,4 +39,6 @@ public class ProjectUserPost extends BaseEntityClean @Excel(name = "岗位 id") @Excel(name = "岗位 id") @ApiModelProperty("岗位 id") @ApiModelProperty("岗位 id") private Long postId; private Long postId; private String projectName; } }
censoft-rongtong/src/main/resources/mapper/system/ProjectUserPostMapper.xml +10 −1 Original line number Original line Diff line number Diff line Loading @@ -9,6 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <result property="projectId" column="project_id" /> <result property="projectId" column="project_id" /> <result property="userId" column="user_id" /> <result property="userId" column="user_id" /> <result property="postId" column="post_id" /> <result property="postId" column="post_id" /> <result property="projectName" column="project_name" /> </resultMap> </resultMap> <sql id="selectProjectUserPostVo"> <sql id="selectProjectUserPostVo"> Loading @@ -16,7 +17,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" </sql> </sql> <select id="selectProjectUserPostList" parameterType="com.censoft.censoftrongtong.domain.ProjectUserPost" resultMap="ProjectUserPostResult"> <select id="selectProjectUserPostList" parameterType="com.censoft.censoftrongtong.domain.ProjectUserPost" resultMap="ProjectUserPostResult"> <include refid="selectProjectUserPostVo"/> SELECT a.id, project_id, b.`name` project_name, user_id, post_id FROM project_user_post a LEFT JOIN ledger_project b on a.project_id = b.id <where> <where> <if test="projectId != null "> and project_id = #{projectId}</if> <if test="projectId != null "> and project_id = #{projectId}</if> <if test="userId != null "> and user_id = #{userId}</if> <if test="userId != null "> and user_id = #{userId}</if> Loading