From 6a2d7c6e709c093a0af4255e96f4bbcfcfdcbccd Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Fri, 31 Mar 2023 17:54:01 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=A7=92=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/DashboardUserDataScopeProviderImpl.java | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/datascope/provider/impl/DashboardUserDataScopeProviderImpl.java diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/datascope/provider/impl/DashboardUserDataScopeProviderImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/datascope/provider/impl/DashboardUserDataScopeProviderImpl.java new file mode 100644 index 0000000..21c28f2 --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/datascope/provider/impl/DashboardUserDataScopeProviderImpl.java @@ -0,0 +1,42 @@ +package com.ningdatech.pmapi.datascope.provider.impl; + +import com.google.common.collect.Lists; +import com.ningdatech.pmapi.common.helper.UserInfoHelper; +import com.ningdatech.pmapi.datascope.model.DataScopeDTO; +import com.ningdatech.pmapi.datascope.provider.DataScopeProvider; +import com.ningdatech.pmapi.user.entity.enumeration.RoleEnum; +import com.ningdatech.pmapi.user.security.auth.model.UserFullInfoDTO; +import com.ningdatech.pmapi.user.util.LoginUserUtil; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; + +import java.util.Optional; + +/** + *

+ * 数据权限 数据看板角色 + *

+ * + * @author ZPF + * @since 2023/3/27 23:29 + */ +@Slf4j +@RequiredArgsConstructor +@Component("DASHBOARD") +public class DashboardUserDataScopeProviderImpl implements DataScopeProvider { + + private final UserInfoHelper userInfoHelper; + + @Override + public Optional findDataFieldProperty() { + UserFullInfoDTO userFullInfo = userInfoHelper.getUserFullInfo(LoginUserUtil.getUserId()); + DataScopeDTO ds = new DataScopeDTO(); + ds.setEmployeeCode(userFullInfo.getOrganizationCode()); + ds.setRegionCodes(Lists.newArrayList(userFullInfo.getRegionCode())); + ds.setUserId(userFullInfo.getUserId()); + ds.setRole(RoleEnum.DASHBOARD); + return Optional.ofNullable(ds); + } + +} From 80b1b69921d8647783a27e2c6e97042fbb073568 Mon Sep 17 00:00:00 2001 From: WendyYang Date: Fri, 31 Mar 2023 17:54:35 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=AF=84=E5=AE=A1=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ningdatech/pmapi/meeting/mapper/MeetingExpertMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/mapper/MeetingExpertMapper.xml b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/mapper/MeetingExpertMapper.xml index 9e0ac18..b90f74e 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/mapper/MeetingExpertMapper.xml +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/mapper/MeetingExpertMapper.xml @@ -96,7 +96,7 @@