Browse Source

角色最大VIP等级

Letianhua 1 year ago
parent
commit
2e50715704

+ 11 - 4
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/controller/ChoiceListController.java

@@ -6,10 +6,7 @@ import com.zanxiang.game.data.serve.pojo.vo.AccountListVO;
 import com.zanxiang.game.data.serve.pojo.vo.AgentListVO;
 import com.zanxiang.game.data.serve.pojo.vo.GameListVO;
 import com.zanxiang.game.data.serve.pojo.vo.PitcherListVO;
-import com.zanxiang.game.data.serve.service.IAccountListService;
-import com.zanxiang.game.data.serve.service.IAgentListService;
-import com.zanxiang.game.data.serve.service.IGameListService;
-import com.zanxiang.game.data.serve.service.IPitcherListService;
+import com.zanxiang.game.data.serve.service.*;
 import com.zanxiang.module.util.pojo.ResultVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -43,6 +40,9 @@ public class ChoiceListController {
     @Autowired
     private IPitcherListService pitcherListService;
 
+    @Autowired
+    private IVipLevelService vipLevelService;
+
     @ApiOperation(value = "所有游戏列表")
     @PreAuthorize(permissionKey = "gameData:choice:gameList")
     @PostMapping("/game/list")
@@ -71,4 +71,11 @@ public class ChoiceListController {
         return ResultVO.ok(pitcherListService.getPitcherList(dto));
     }
 
+    @ApiOperation(value = "最大VIP等级")
+    @PreAuthorize(permissionKey = "gameData:choice:maxVipLevel")
+    @GetMapping("/vip/level")
+    public ResultVO<Integer> getMaxVipLevel() {
+        return ResultVO.ok(vipLevelService.getMaxVipLevel());
+    }
+
 }

+ 89 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/entity/TGameVip.java

@@ -0,0 +1,89 @@
+package com.zanxiang.game.data.serve.pojo.entity;
+
+import lombok.Data;
+import org.nutz.dao.entity.annotation.Column;
+import org.nutz.dao.entity.annotation.PK;
+import org.nutz.dao.entity.annotation.Table;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+
+/**
+ * @author tianhua
+ */
+@Data
+@Table(TGameVip.TABLE_NAME)
+@PK({"sourceSystem", "id"})
+public class TGameVip implements Serializable {
+    private static final long serialVersionUID = 1L;
+    public static final String TABLE_NAME = "dm_game_order.t_game_vip";
+
+    /**
+     * SDK来源
+     */
+    private String sourceSystem;
+
+    /**
+    * 自增ID
+    */
+    private Long id;
+    
+    /**
+    * 超父游戏ID
+    */    
+    @Column
+    private Long superGameId;
+    
+    /**
+    * 父游戏ID
+    */    
+    @Column
+    private Long parentGameId;
+    
+    /**
+    * 充值金额最小
+    */    
+    @Column
+    private BigDecimal rechargeMoneyMin;
+
+    /**
+     * 充值金额最大
+     */
+    @Column
+    private BigDecimal rechargeMoneyMax;
+    
+    /**
+    * vip档位
+    */    
+    @Column
+    private Integer vipLevel;
+
+    
+    /**
+    * 创建时间
+    */    
+    @Column
+    private LocalDateTime createTime;
+
+    /**
+     * 创建者
+     */
+    @Column
+    private Long createBy;
+
+    /**
+    * 更新时间
+    */    
+    @Column
+    private LocalDateTime updateTime;
+
+    /**
+     * 更新者
+     */
+    @Column
+    private Long updateBy;
+  
+}
+
+

+ 7 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/IVipLevelService.java

@@ -0,0 +1,7 @@
+package com.zanxiang.game.data.serve.service;
+
+public interface IVipLevelService {
+
+    Integer getMaxVipLevel();
+
+}

+ 32 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/VipLevelServiceImpl.java

@@ -0,0 +1,32 @@
+package com.zanxiang.game.data.serve.service.impl;
+
+import com.zanxiang.game.data.serve.pojo.entity.TGameVip;
+import com.zanxiang.game.data.serve.service.IVipLevelService;
+import lombok.extern.slf4j.Slf4j;
+import org.nutz.dao.Dao;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * @author tianhua
+ * @version 1.0
+ * @description: TODO
+ * @date 2023/11/24 11:01
+ */
+@Service
+@Slf4j
+public class VipLevelServiceImpl implements IVipLevelService {
+
+    @Autowired
+    private Dao dao;
+
+    /**
+     * 获得最大的vip等级
+     * @return Integer
+     */
+    @Override
+    public Integer getMaxVipLevel() {
+        return (Integer) dao.func2(TGameVip.class, "MAX", "vip_level");
+    }
+
+}