diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TdTrainServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TdTrainServiceImpl.java index 8595ce6..7ebd5bf 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TdTrainServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TdTrainServiceImpl.java @@ -8,6 +8,7 @@ import java.util.function.Function; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.ruoyi.common.annotation.DataScope; import com.ruoyi.system.domain.count.TrainCountDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -46,6 +47,7 @@ public class TdTrainServiceImpl extends ServiceImpl imple * @param tdTrain 涉密人员培训 * @return 涉密人员培训 */ + @DataScope(deptAlias = "d") @Override public List selectTdTrainList(TdTrain tdTrain) { diff --git a/ruoyi-system/src/main/resources/mapper/system/TdTrainMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TdTrainMapper.xml index 0858d2a..303f39e 100644 --- a/ruoyi-system/src/main/resources/mapper/system/TdTrainMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/TdTrainMapper.xml @@ -29,7 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select ID, USERNAME, DEPT_NAME, TRAIN_TYPE, TRAIN_SUBJECT, TRAIN_ADDRESS, TRAIN_DATE, CREATE_STAFFID, CREATE_DEPARTID, CREATE_DATE, UPDATE_DEPARTID, UPDATE_STAFFID, UPDATE_DATE, AREAID, FRAMEWORK, TRAIN_NAME, TRAIN_STATE, TRAIN_TIMEEND, PART, TRAININFO,dept_id from td_train + select ID, USERNAME, DEPT_NAME, TRAIN_TYPE, TRAIN_SUBJECT, TRAIN_ADDRESS, TRAIN_DATE, CREATE_STAFFID, CREATE_DEPARTID, CREATE_DATE, UPDATE_DEPARTID, UPDATE_STAFFID, UPDATE_DATE, AREAID, FRAMEWORK, TRAIN_NAME, TRAIN_STATE, TRAIN_TIMEEND, PART, TRAININFO,dept_id from td_train d