bilingfeng пре 1 година
родитељ
комит
7422d473e2

+ 0 - 2
game-module/game-sdk/src/main/java/com/zanxiang/sdk/adapter/WebHandlerAdapter.java

@@ -4,7 +4,6 @@ import com.zanxiang.common.enums.DeviceTypeEnum;
 import com.zanxiang.common.enums.HttpStatusEnum;
 import com.zanxiang.common.exception.CustomException;
 import com.zanxiang.common.utils.StringUtils;
-import com.zanxiang.module.util.JsonUtil;
 import com.zanxiang.mybatis.entity.GameExt;
 import com.zanxiang.sdk.annotation.UnSignCheck;
 import com.zanxiang.sdk.service.IGameExtService;
@@ -65,7 +64,6 @@ public class WebHandlerAdapter implements HandlerInterceptor {
         }
         //签名验证
         GameExt gameExt = gameExtService.getByGameAppId(gameId);
-        log.error("gameId : {}, sign : {}, timestamp : {}, gameExt : {}", gameId, sign, timestamp, JsonUtil.toString(gameExt));
         if (gameExt == null || Strings.isBlank(gameExt.getAppKey())) {
             log.error("非法参数, 游戏id对应的前端密钥appKey不存在");
             throw new CustomException(HttpStatusEnum.INVALID_PARAMS);

+ 15 - 0
game-module/game-sdk/src/main/java/com/zanxiang/sdk/service/impl/OrderPayServiceImpl.java

@@ -105,10 +105,25 @@ public class OrderPayServiceImpl implements IOrderPayService {
 
     @Override
     public Long getAppletPayDevice(UserData userData) {
+
+        log.error("获取支付类型参数, 请求信息 userData : {}", JsonUtil.toString(userData));
+
+
+
         //查询游戏配置的支付方式
         List<GamePayWayDTO> gamePayWayList = gamePayWayService.listOfGameId(userData.getGameId());
+
         //支付方式
         GamePayWayDTO gamePayWayDTO = null;
+
+        gamePayWayDTO = gamePayWayList.stream().filter(gamePayWay ->
+                Objects.equals(gamePayWay.getPayDeviceId(), PayDeviceEnum.MI_PAY.getPayDeviceId()))
+                .findFirst().orElse(null);
+        if (gamePayWayDTO != null){
+            return gamePayWayDTO.getPayDeviceId();
+        }
+
+
         //android用户, 游戏适配米大师支付
         if (Objects.equals(userData.getDeviceSystem(), DeviceTypeEnum.DEVICE_TYPE_ANDROID.getDescribe())) {
             gamePayWayDTO = gamePayWayList.stream().filter(gamePayWay ->