From f0dd18b904640cd71df643f38edde41441959362 Mon Sep 17 00:00:00 2001 From: wangxy <1356089412@qq.com> Date: Thu, 11 Jul 2024 15:40:34 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=AF=BC=E5=85=A5=E6=B5=81=E9=87=8A?= =?UTF-8?q?=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/TdLeaveServiceImpl.java | 3 ++ .../resources/mapper/system/SysUserMapper.xml | 3 +- .../resources/mapper/system/TdLeaveMapper.xml | 34 +++++++++---------- 3 files changed, 21 insertions(+), 19 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TdLeaveServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TdLeaveServiceImpl.java index 7e057e6..413c83f 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TdLeaveServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TdLeaveServiceImpl.java @@ -1,6 +1,8 @@ package com.ruoyi.system.service.impl; import java.util.List; + +import com.ruoyi.common.annotation.DataScope; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.system.mapper.TdLeaveMapper; @@ -39,6 +41,7 @@ public class TdLeaveServiceImpl implements ITdLeaveService * @return 人员离职 */ @Override + @DataScope(userAlias="u") public List selectTdLeaveList(TdLeave tdLeave) { return tdLeaveMapper.selectTdLeaveList(tdLeave); diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml index af38ae7..cf49a1c 100644 --- a/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml @@ -109,10 +109,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE FIND_IN_SET (#{deptId},ancestors) )) - - ORDER BY examinedate desc ${params.dataScope} + ORDER BY examinedate desc diff --git a/ruoyi-system/src/main/resources/mapper/system/TdLeaveMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TdLeaveMapper.xml index 00d0e0d..c1afbf6 100644 --- a/ruoyi-system/src/main/resources/mapper/system/TdLeaveMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/TdLeaveMapper.xml @@ -21,26 +21,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select id, user_id, user_name, country, areaname, leavereason, depart, leavedate, workstate, leavestate, examinename, examinedate, examinestate from td_leave + select u.id, u.user_id, u.user_name, u.country, u.areaname, u.leavereason, u.depart, u.leavedate, u.workstate, u.leavestate, u.examinename, u.examinedate, u.examinestate from td_leave u -