Quellcode durchsuchen

Merge remote-tracking branch 'origin/package' into package

zhangxianyu vor 1 Jahr
Ursprung
Commit
fb4ba98c2c

+ 1 - 1
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/SDKApplication.java

@@ -23,7 +23,7 @@ public class SDKApplication {
 
 
     public static void main(String[] args) {
     public static void main(String[] args) {
         SpringApplication.run(SDKApplication.class, args);
         SpringApplication.run(SDKApplication.class, args);
-        System.out.println("赞象SDK服务启动成功 <CP发送消息代码提交> ( ´・・)ノ(._.`) \n" +
+        System.out.println("赞象SDK服务启动成功 <H5端加配置字段, 回传修改> ( ´・・)ノ(._.`) \n" +
                 " ___________ _   __\n" +
                 " ___________ _   __\n" +
                 "/  ___|  _  \\ | / /\n" +
                 "/  ___|  _  \\ | / /\n" +
                 "\\ `--.| | | | |/ / \n" +
                 "\\ `--.| | | | |/ / \n" +

+ 8 - 0
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/pojo/vo/GameInitVO.java

@@ -7,6 +7,8 @@ import lombok.Builder;
 import lombok.Data;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 import lombok.NoArgsConstructor;
 
 
+import java.util.Map;
+
 /**
 /**
  * @author : lingfeng
  * @author : lingfeng
  * @time : 2023-06-29
  * @time : 2023-06-29
@@ -47,4 +49,10 @@ public class GameInitVO {
      */
      */
     @ApiModelProperty(notes = "H5游戏配置")
     @ApiModelProperty(notes = "H5游戏配置")
     private H5GameConfigDTO h5GameConfigDTO;
     private H5GameConfigDTO h5GameConfigDTO;
+
+    /**
+     * H5游戏配置新(老的字段 h5GameConfigDTO 保留, 但是新加的字段都只会在这个新字段中返回)
+     */
+    @ApiModelProperty(notes = "H5游戏配置新")
+    private Map<String, Object> h5GameConfigMap;
 }
 }

+ 9 - 9
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/CallBackServiceImpl.java

@@ -79,7 +79,7 @@ public class CallBackServiceImpl implements ICallBackService {
         }
         }
         //查询小游戏信息或者H5游戏相关公众号信息
         //查询小游戏信息或者H5游戏相关公众号信息
         GameApplet gameApplet = gameAppletService.getOne(new LambdaQueryWrapper<GameApplet>()
         GameApplet gameApplet = gameAppletService.getOne(new LambdaQueryWrapper<GameApplet>()
-                .eq(GameApplet::getGameId, user.getGameId()));
+                .eq(GameApplet::getGameId, agent.getGameId()));
         log.error("用户注册回传, userId : {}", user.getId());
         log.error("用户注册回传, userId : {}", user.getId());
         try {
         try {
             //腾讯H5回传
             //腾讯H5回传
@@ -128,7 +128,7 @@ public class CallBackServiceImpl implements ICallBackService {
         }
         }
         //查询小游戏信息或者H5游戏相关公众号信息
         //查询小游戏信息或者H5游戏相关公众号信息
         GameApplet gameApplet = gameAppletService.getOne(new LambdaQueryWrapper<GameApplet>()
         GameApplet gameApplet = gameAppletService.getOne(new LambdaQueryWrapper<GameApplet>()
-                .eq(GameApplet::getGameId, user.getGameId()));
+                .eq(GameApplet::getGameId, agent.getGameId()));
         log.error("用户创角回传, userId : {}", user.getId());
         log.error("用户创角回传, userId : {}", user.getId());
         try {
         try {
             //腾讯H5回传
             //腾讯H5回传
@@ -175,7 +175,7 @@ public class CallBackServiceImpl implements ICallBackService {
         }
         }
         //查询小游戏信息或者H5游戏相关公众号信息
         //查询小游戏信息或者H5游戏相关公众号信息
         GameApplet gameApplet = gameAppletService.getOne(new LambdaQueryWrapper<GameApplet>()
         GameApplet gameApplet = gameAppletService.getOne(new LambdaQueryWrapper<GameApplet>()
-                .eq(GameApplet::getGameId, user.getGameId()));
+                .eq(GameApplet::getGameId, agent.getGameId()));
         log.error("用户订单回传, orderId : {}", platformOrderDTO.getOrderId());
         log.error("用户订单回传, orderId : {}", platformOrderDTO.getOrderId());
         try {
         try {
             //腾讯H5回传
             //腾讯H5回传
@@ -211,7 +211,7 @@ public class CallBackServiceImpl implements ICallBackService {
     private TencentRoleRegisterRpcDTO transform(User user, Agent agent, GameApplet gameApplet, GameUserRole gameUserRole) {
     private TencentRoleRegisterRpcDTO transform(User user, Agent agent, GameApplet gameApplet, GameUserRole gameUserRole) {
         return TencentRoleRegisterRpcDTO.builder()
         return TencentRoleRegisterRpcDTO.builder()
                 .backPolicyId(agent.getBackPolicyId())
                 .backPolicyId(agent.getBackPolicyId())
-                .gameId(gameUserRole.getGameId())
+                .gameId(agent.getGameId())
                 .adAccountId(agent.getAccountId())
                 .adAccountId(agent.getAccountId())
                 .registerTime(gameUserRole.getCreateTime())
                 .registerTime(gameUserRole.getCreateTime())
                 .channel(agent.getAgentKey())
                 .channel(agent.getAgentKey())
@@ -230,7 +230,7 @@ public class CallBackServiceImpl implements ICallBackService {
                 .reportUrl(agent.getReportUrl())
                 .reportUrl(agent.getReportUrl())
                 .build();
                 .build();
         return TtRoleRegisterRpcDTO.builder()
         return TtRoleRegisterRpcDTO.builder()
-                .gameId(gameUserRole.getGameId())
+                .gameId(agent.getGameId())
                 .backPolicyId(agent.getBackPolicyId())
                 .backPolicyId(agent.getBackPolicyId())
                 .accountReport(ttAccountRpcDTO)
                 .accountReport(ttAccountRpcDTO)
                 .wechatAppId(gameApplet == null ? null : gameApplet.getAppId())
                 .wechatAppId(gameApplet == null ? null : gameApplet.getAppId())
@@ -245,7 +245,7 @@ public class CallBackServiceImpl implements ICallBackService {
     private TencentUserDTO transform(User user, Agent agent, GameApplet gameApplet) {
     private TencentUserDTO transform(User user, Agent agent, GameApplet gameApplet) {
         return TencentUserDTO.builder()
         return TencentUserDTO.builder()
                 .backPolicyId(agent.getBackPolicyId())
                 .backPolicyId(agent.getBackPolicyId())
-                .gameId(user.getGameId())
+                .gameId(agent.getGameId())
                 .adAccountId(agent.getAccountId())
                 .adAccountId(agent.getAccountId())
                 .registerTime(user.getCreateTime())
                 .registerTime(user.getCreateTime())
                 .channel(agent.getAgentKey())
                 .channel(agent.getAgentKey())
@@ -262,7 +262,7 @@ public class CallBackServiceImpl implements ICallBackService {
                 .reportUrl(agent.getReportUrl())
                 .reportUrl(agent.getReportUrl())
                 .build();
                 .build();
         return TtUserActiveRpcDTO.builder()
         return TtUserActiveRpcDTO.builder()
-                .gameId(user.getGameId())
+                .gameId(agent.getGameId())
                 .wechatAppId(gameApplet == null ? null : gameApplet.getAppId())
                 .wechatAppId(gameApplet == null ? null : gameApplet.getAppId())
                 .wechatOpenId(user.getOpenId())
                 .wechatOpenId(user.getOpenId())
                 .accountReport(ttAccountRpcDTO)
                 .accountReport(ttAccountRpcDTO)
@@ -279,7 +279,7 @@ public class CallBackServiceImpl implements ICallBackService {
     private TencentOrderDTO transform(PlatformOrderDTO platformOrderDTO, User user, Agent agent, GameApplet gameApplet) {
     private TencentOrderDTO transform(PlatformOrderDTO platformOrderDTO, User user, Agent agent, GameApplet gameApplet) {
         return TencentOrderDTO.builder()
         return TencentOrderDTO.builder()
                 .backPolicyId(agent.getBackPolicyId())
                 .backPolicyId(agent.getBackPolicyId())
-                .gameId(platformOrderDTO.getGameId())
+                .gameId(agent.getGameId())
                 .adAccountId(agent.getAccountId())
                 .adAccountId(agent.getAccountId())
                 .registerTime(user.getCreateTime())
                 .registerTime(user.getCreateTime())
                 .rechargeMoney(platformOrderDTO.getAmount().longValue() * 100)
                 .rechargeMoney(platformOrderDTO.getAmount().longValue() * 100)
@@ -303,7 +303,7 @@ public class CallBackServiceImpl implements ICallBackService {
                 .reportUrl(agent.getReportUrl())
                 .reportUrl(agent.getReportUrl())
                 .build();
                 .build();
         return TtOrderRpcDTO.builder()
         return TtOrderRpcDTO.builder()
-                .gameId(platformOrderDTO.getGameId())
+                .gameId(agent.getGameId())
                 .accountReport(ttAccountRpcDTO)
                 .accountReport(ttAccountRpcDTO)
                 .wechatAppId(gameApplet == null ? null : gameApplet.getAppId())
                 .wechatAppId(gameApplet == null ? null : gameApplet.getAppId())
                 .wechatOpenId(openId)
                 .wechatOpenId(openId)

+ 1 - 0
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/GameAppletServiceImpl.java

@@ -192,6 +192,7 @@ public class GameAppletServiceImpl extends ServiceImpl<GameAppletMapper, GameApp
                 .gameName(game.getName())
                 .gameName(game.getName())
                 .isPut(game.getIsPut())
                 .isPut(game.getIsPut())
                 .h5GameConfigDTO(Strings.isBlank(h5GameConfig) ? null : JsonUtil.toObj(h5GameConfig, H5GameConfigDTO.class))
                 .h5GameConfigDTO(Strings.isBlank(h5GameConfig) ? null : JsonUtil.toObj(h5GameConfig, H5GameConfigDTO.class))
+                .h5GameConfigMap(Strings.isBlank(h5GameConfig) ? null : JsonUtil.toMapWithClass(h5GameConfig, Map.class))
                 .build();
                 .build();
     }
     }
 }
 }