浏览代码

fix : 游戏SDK调试修改

bilingfeng 1 年之前
父节点
当前提交
f8d4cef0dd

+ 38 - 0
game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/dto/H5GameConfigDTO.java

@@ -0,0 +1,38 @@
+package com.zanxiang.game.module.base.pojo.dto;
+
+import com.zanxiang.game.module.base.pojo.enums.H5SignShowEnum;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @author : lingfeng
+ * @time : 2023-07-07
+ * @description : H5游戏配置对象
+ */
+@Data
+public class H5GameConfigDTO {
+
+    /**
+     * H5游戏地址
+     */
+    @ApiModelProperty(notes = "H5游戏地址")
+    private String h5GameUrl;
+
+    /**
+     * H5游戏登录窗Logo图片
+     */
+    @ApiModelProperty(notes = "H5游戏登录窗Logo图片")
+    private String h5LoginLogo;
+
+    /**
+     * H5侧边栏Logo图片
+     */
+    @ApiModelProperty(notes = "H5侧边栏Logo图片")
+    private String h5SignLogo;
+
+    /**
+     * H5侧边栏暂时类型枚举
+     */
+    @ApiModelProperty(notes = "H5侧边栏暂时类型枚举")
+    private H5SignShowEnum h5SignShow;
+}

+ 44 - 0
game-module/game-module-base/src/main/java/com/zanxiang/game/module/base/pojo/enums/H5SignShowEnum.java

@@ -0,0 +1,44 @@
+package com.zanxiang.game.module.base.pojo.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * @author : lingfeng
+ * @time : 2023-07-07
+ * @description : H5侧边栏暂时类型枚举
+ */
+@Getter
+@AllArgsConstructor
+public enum H5SignShowEnum {
+
+    /**
+     * 全部显示
+     */
+    SIGN_SHOW_ALL(1, "全部显示"),
+
+    /**
+     * 全部不显示
+     */
+    SIGN_SHOW_NONE(2, "全部不显示"),
+
+    /**
+     * 微信浏览器不显示
+     */
+    SIGN_SHOW_WX_NONE(3, "微信浏览器不显示"),
+
+    /**
+     * 所有H5不显示
+     */
+    SIGN_SHOW_H5_NONE(4, "所有H5不显示");
+
+    /**
+     * 展示类型
+     */
+    private Integer showType;
+
+    /**
+     * 描述
+     */
+    private String describe;
+}

+ 61 - 0
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/vo/GameAppletShellVO.java

@@ -0,0 +1,61 @@
+package com.zanxiang.game.module.manage.pojo.vo;
+
+import java.time.LocalDateTime;
+
+/**
+ * @author : lingfeng
+ * @time : 2023-07-07
+ * @description : 客包控制
+ */
+public class GameAppletShellVO {
+
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 游戏id
+     */
+    private Long gameId;
+
+    /**
+     * 是否在申诉
+     */
+    private Boolean isAppeal;
+
+    /**
+     * 线上版本号
+     */
+    private String proVersion;
+
+    /**
+     * 提审版本号
+     */
+    private String arraignVersion;
+
+    /**
+     * 壳包控制类型, 0:关闭, 1:开启, 2:新用户开启, 老用户关闭, 3:角色等级控制开启
+     */
+    private Integer proControlType;
+
+    /**
+     * 壳包控制等级, 类型为3时, 必填
+     */
+    private Long proControlLevel;
+
+    /**
+     * 壳跳出按钮开关
+     */
+    private Boolean isSkipSwitch;
+
+    /**
+     * 创建时间
+     */
+    private LocalDateTime createTime;
+
+    /**
+     * 更新时间
+     */
+    private LocalDateTime updateTime;
+}

+ 12 - 0
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/IGameAppletShellService.java

@@ -0,0 +1,12 @@
+package com.zanxiang.game.module.manage.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.zanxiang.game.module.mybatis.entity.GameAppletShell;
+
+/**
+ * @author : lingfeng
+ * @time : 2023-07-06
+ * @description : 壳包控制
+ */
+public interface IGameAppletShellService extends IService<GameAppletShell> {
+}

+ 20 - 0
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/GameAppletShellServiceImpl.java

@@ -0,0 +1,20 @@
+package com.zanxiang.game.module.manage.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.zanxiang.game.module.manage.service.IGameAppletShellService;
+import com.zanxiang.game.module.mybatis.entity.GameAppletShell;
+import com.zanxiang.game.module.mybatis.mapper.GameAppletShellMapper;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+
+import java.time.LocalDateTime;
+
+/**
+ * @author : lingfeng
+ * @time : 2023-07-06
+ * @description : 壳包控制
+ */
+@Slf4j
+@Service
+public class GameAppletShellServiceImpl extends ServiceImpl<GameAppletShellMapper, GameAppletShell> implements IGameAppletShellService {
+}

+ 5 - 0
game-module/game-module-mybatis/src/main/java/com/zanxiang/game/module/mybatis/entity/Game.java

@@ -111,4 +111,9 @@ public class Game implements Serializable {
      * 更新时间
      */
     private LocalDateTime updateTime;
+
+    /**
+     * H5游戏相关配置
+     */
+    private String h5GameConfig;
 }

+ 4 - 4
game-module/game-module-sdk/src/main/java/com/zanxiang/game/module/sdk/service/impl/GameAppletShellServiceImpl.java

@@ -66,8 +66,8 @@ public class GameAppletShellServiceImpl extends ServiceImpl<GameAppletShellMappe
             //返回关闭
             return ShellSwitchEnum.SHELL_SWITCH_CLOSE.getShellSwitch();
         }
-        log.error("版本信息不存在, appId : {}, version : {}", appId, version);
-        throw new BaseException("游戏参数设置错误, 版本信息不存在");
+        log.error("版本信息不存在, 默认进壳包, appId : {}, version : {}", appId, version);
+        return ShellSwitchEnum.SHELL_SWITCH_OPEN.getShellSwitch();
     }
 
     @Override
@@ -110,7 +110,7 @@ public class GameAppletShellServiceImpl extends ServiceImpl<GameAppletShellMappe
             }
             return ShellSwitchEnum.SHELL_SWITCH_CLOSE.getShellSwitch();
         }
-        log.error("版本信息不存在, userId : {}, gameAppletShell : {}", user.getId(), JsonUtil.toString(gameAppletShell));
-        throw new BaseException("参数错误, 游戏参数设置错误");
+        log.error("壳包控制配置不存在, 默认进壳包, userId : {}, gameAppletShell : {}", user.getId(), JsonUtil.toString(gameAppletShell));
+        return ShellSwitchEnum.SHELL_SWITCH_OPEN.getShellSwitch();
     }
 }