From a0ffd8ea5401be4a6d1e458e5de7411bd0f012e7 Mon Sep 17 00:00:00 2001 From: PoffyZhang <99775271@qq.com> Date: Thu, 13 Apr 2023 17:03:04 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=B8=93=E5=AE=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../provider/impl/ExpertDataScopeProviderImpl.java | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 pmapi/src/main/java/com/ningdatech/pmapi/datascope/provider/impl/ExpertDataScopeProviderImpl.java diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/datascope/provider/impl/ExpertDataScopeProviderImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/datascope/provider/impl/ExpertDataScopeProviderImpl.java new file mode 100644 index 0000000..5634bdb --- /dev/null +++ b/pmapi/src/main/java/com/ningdatech/pmapi/datascope/provider/impl/ExpertDataScopeProviderImpl.java @@ -0,0 +1,52 @@ +package com.ningdatech.pmapi.datascope.provider.impl; + +import com.google.common.collect.Lists; +import com.ningdatech.pmapi.common.constant.RegionConst; +import com.ningdatech.pmapi.common.helper.RegionCacheHelper; +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.Collection; +import java.util.Optional; +import java.util.stream.Collectors; + +/** + *
+ * 专家 数据看板角色 + *
+ * + * @author ZPF + * @since 2023/3/27 23:29 + */ +@Slf4j +@RequiredArgsConstructor +@Component("EXPERT") +public class ExpertDataScopeProviderImpl implements DataScopeProvider { + + private final RegionCacheHelper regionCacheHelper; + + private final UserInfoHelper userInfoHelper; + + @Override + public Optional