From ca1a44f21d75bbebaf76334cff11e3db3b51447d Mon Sep 17 00:00:00 2001 From: wangxy <1481820854@qq.com> Date: Fri, 1 Nov 2024 08:45:41 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E8=87=AA=E6=9F=A5=E8=87=AA=E8=AF=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/system/service/impl/TdTrainServiceImpl.java | 2 ++ .../src/main/resources/mapper/system/TdTrainMapper.xml | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) 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