|
@@ -8,6 +8,7 @@ import cn.hutool.core.lang.tree.TreeNodeConfig;
|
|
|
import cn.hutool.core.lang.tree.TreeUtil;
|
|
|
import com.google.common.collect.Lists;
|
|
|
import com.ruoyi.common.enums.ValueType;
|
|
|
+import com.ruoyi.common.utils.LocalUtils;
|
|
|
import com.ruoyi.project.business.enums.JEPFuncEnum;
|
|
|
import com.ruoyi.project.business.enums.JEPLogicEnum;
|
|
|
import com.ruoyi.project.business.service.*;
|
|
@@ -36,6 +37,7 @@ import lombok.RequiredArgsConstructor;
|
|
|
|
|
|
import org.springframework.cache.annotation.CacheEvict;
|
|
|
import org.springframework.cache.annotation.Cacheable;
|
|
|
+import org.springframework.data.util.Pair;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
@@ -486,4 +488,13 @@ public class TbAgentServiceImpl extends ServiceImpl<TbAgentMapper, TbAgent> impl
|
|
|
}
|
|
|
return agent;
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<Pair<Long, String>> selectCountriesByCurUser() {
|
|
|
+ String countryIds = tbAgentMapper.selectCountriesByCurUser(SecurityUtils.getPermissionCharIns());
|
|
|
+ if (StringUtils.isBlank(countryIds)){
|
|
|
+ return Lists.newArrayList();
|
|
|
+ }
|
|
|
+ return LocalUtils.selectCountriesByCurUser(Arrays.stream(countryIds.split(",")).distinct().map(Long::valueOf).collect(Collectors.toList()));
|
|
|
+ }
|
|
|
}
|