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 -