Переглянути джерело

fix : 权限rpc接口修改

bilingfeng 1 рік тому
батько
коміт
8d6088df12

+ 2 - 1
game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/rpc/GameAuthRpc.java

@@ -1,6 +1,7 @@
 package com.zanxiang.game.module.base.rpc;
 
 import com.zanxiang.game.module.base.pojo.vo.GameAuthUserVO;
+import com.zanxiang.module.util.pojo.ResultVO;
 
 /**
  * @author : lingfeng
@@ -14,5 +15,5 @@ public interface GameAuthRpc {
      *
      * @return {@link GameAuthUserVO}
      */
-    GameAuthUserVO getGameAuthByUserIds();
+    ResultVO<GameAuthUserVO> getGameAuthByUserIds();
 }

+ 4 - 3
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/rpc/impl/GameAuthRpcImpl.java

@@ -13,6 +13,7 @@ import com.zanxiang.game.module.manage.service.IGameAuthService;
 import com.zanxiang.game.module.mybatis.entity.GameAuth;
 import com.zanxiang.game.module.mybatis.entity.GameAuthRole;
 import com.zanxiang.module.util.exception.BaseException;
+import com.zanxiang.module.util.pojo.ResultVO;
 import org.apache.dubbo.config.annotation.DubboReference;
 import org.apache.dubbo.config.annotation.DubboService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -42,7 +43,7 @@ public class GameAuthRpcImpl implements GameAuthRpc {
     private ISysGameUserGroupRpc sysGameUserGroupRpc;
 
     @Override
-    public GameAuthUserVO getGameAuthByUserIds() {
+    public ResultVO<GameAuthUserVO> getGameAuthByUserIds() {
         //游戏列表
         Tuple2<String, List<Long>> tuple2 = gameAuthService.getUserGameList(null);
         //角色
@@ -84,11 +85,11 @@ public class GameAuthRpcImpl implements GameAuthRpc {
             pitcherList.add(SecurityUtil.getUserId());
         }
         //构造返回
-        return GameAuthUserVO.builder()
+        return ResultVO.ok(GameAuthUserVO.builder()
                 .userId(SecurityUtil.getUserId())
                 .gameIdList(tuple2.getT2())
                 .gameAuthEnum(gameAuthEnum)
                 .pitcherList(pitcherList)
-                .build();
+                .build());
     }
 }