|
@@ -17,6 +17,7 @@ import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Collection;
|
|
|
+import java.util.Collections;
|
|
|
import java.util.List;
|
|
|
|
|
|
@Slf4j
|
|
@@ -29,7 +30,9 @@ public class DataPowerComponent {
|
|
|
@DubboReference(providedBy = ServerInfo.SERVER_DUBBO_NAME)
|
|
|
private GameAuthRpc gameAuthRpc;
|
|
|
|
|
|
-
|
|
|
+ public Tuple2<List<Long>, List<Long>> getPowerInfo() {
|
|
|
+ return getPowerInfo("ZX_ONE");
|
|
|
+ }
|
|
|
|
|
|
|
|
|
* 获取当前登录用户有权限查看的用户列表
|
|
@@ -38,16 +41,19 @@ public class DataPowerComponent {
|
|
|
* 2:投手组长:自己+组员+自然量
|
|
|
* 3:管理员/超管:所有数据
|
|
|
*/
|
|
|
- public Tuple2<List<Long>, List<Long>> getPowerInfo() {
|
|
|
+ public Tuple2<List<Long>, List<Long>> getPowerInfo(String sdk) {
|
|
|
if (SecurityUtil.isAdmin()) {
|
|
|
return Tuple2.with(null, null);
|
|
|
}
|
|
|
+ Collection<Long> subUserIds = sysGameUserGroupRpc.memberUserIds(SecurityUtil.getCompanyId(), SecurityUtil.getUserId()).getData();
|
|
|
+ if(!"ZX_ONE".equals(sdk)) {
|
|
|
+ return Tuple2.with(new ArrayList<>(subUserIds), null);
|
|
|
+ }
|
|
|
GameAuthUserVO userGameInfo = gameAuthRpc.getGameAuthByUserIds().getData();
|
|
|
if(CollectionUtils.isEmpty(userGameInfo.getGameIdList())) {
|
|
|
throw new BaseException("没有游戏查看权限,请联系管理员指派游戏权限");
|
|
|
}
|
|
|
GameAuthEnum gameAuth = userGameInfo.getGameAuthEnum();
|
|
|
- Collection<Long> subUserIds = sysGameUserGroupRpc.memberUserIds(SecurityUtil.getCompanyId(), SecurityUtil.getUserId()).getData();
|
|
|
if(CollectionUtils.isEmpty(subUserIds)) {
|
|
|
throw new BaseException("服务异常,获取用户列表失败!!");
|
|
|
}
|