Explorar el Código

游戏数据(排行榜)

wcc hace 1 año
padre
commit
2c33625efd

+ 0 - 39
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/controller/AdsAccountRechargeRankingController.java

@@ -1,39 +0,0 @@
-package com.zanxiang.game.data.serve.controller;
-
-import com.zanxiang.erp.security.annotation.PreAuthorize;
-import com.zanxiang.game.data.serve.pojo.dto.AdsAccountRechargeRankingListDTO;
-import com.zanxiang.game.data.serve.pojo.vo.AdsAccountRechargeRankingVO;
-import com.zanxiang.game.data.serve.pojo.vo.AdsAgentRechargeRankingVO;
-import com.zanxiang.game.data.serve.service.IAdsAccountRechargeRankingService;
-import com.zanxiang.game.data.serve.utils.Page;
-import com.zanxiang.module.util.pojo.ResultVO;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiResponse;
-import io.swagger.annotations.ApiResponses;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-@Slf4j
-@Api(tags = {"账号充值排行榜"})
-@RestController
-@RequestMapping("/accountRechargeRanking")
-public class AdsAccountRechargeRankingController {
-
-    @Autowired
-    private IAdsAccountRechargeRankingService adsAccountRechargeRankingService;
-
-    @PreAuthorize(permissionKey = "gameData:accountRechargeRanking:list")
-    @ApiOperation(value = "推广账号充值排行榜")
-    @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = AdsAgentRechargeRankingVO.class)})
-    @PostMapping("/list")
-    public ResultVO<Page<AdsAccountRechargeRankingVO>> list(@Validated @RequestBody AdsAccountRechargeRankingListDTO dto) {
-        return ResultVO.ok(adsAccountRechargeRankingService.listOfPage(dto));
-    }
-}

+ 0 - 38
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/controller/AdsAgentRechargeRankingController.java

@@ -1,38 +0,0 @@
-package com.zanxiang.game.data.serve.controller;
-
-import com.zanxiang.erp.security.annotation.PreAuthorize;
-import com.zanxiang.game.data.serve.pojo.dto.AdsAgentRechargeRankingListDTO;
-import com.zanxiang.game.data.serve.pojo.vo.AdsAgentRechargeRankingVO;
-import com.zanxiang.game.data.serve.service.IAdsAgentRechargeRankingService;
-import com.zanxiang.game.data.serve.utils.Page;
-import com.zanxiang.module.util.pojo.ResultVO;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiResponse;
-import io.swagger.annotations.ApiResponses;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.validation.annotation.Validated;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-@Slf4j
-@Api(tags = {"渠道充值排行榜"})
-@RestController
-@RequestMapping("/agentRechargeRanking")
-public class AdsAgentRechargeRankingController {
-
-    @Autowired
-    private IAdsAgentRechargeRankingService adsAgentRechargeRankingService;
-
-    @PreAuthorize(permissionKey = "gameData:agentRechargeRanking:list")
-    @ApiOperation(value = "推广渠道充值排行榜")
-    @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = AdsAgentRechargeRankingVO.class)})
-    @PostMapping("/list")
-    public ResultVO<Page<AdsAgentRechargeRankingVO>> list(@Validated @RequestBody AdsAgentRechargeRankingListDTO dto) {
-        return ResultVO.ok(adsAgentRechargeRankingService.listOfPage(dto));
-    }
-}

+ 30 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/controller/RankingController.java

@@ -1,16 +1,25 @@
 package com.zanxiang.game.data.serve.controller;
 
 import com.zanxiang.erp.security.annotation.PreAuthorize;
+import com.zanxiang.game.data.serve.pojo.dto.AdsAccountRechargeRankingListDTO;
+import com.zanxiang.game.data.serve.pojo.dto.AdsAgentRechargeRankingListDTO;
 import com.zanxiang.game.data.serve.pojo.dto.GamePromoteDayDTO;
 import com.zanxiang.game.data.serve.pojo.dto.RechargeRankingDTO;
+import com.zanxiang.game.data.serve.pojo.vo.AdsAccountRechargeRankingVO;
+import com.zanxiang.game.data.serve.pojo.vo.AdsAgentRechargeRankingVO;
 import com.zanxiang.game.data.serve.pojo.vo.GameRechargeRankingVO;
 import com.zanxiang.game.data.serve.pojo.vo.PlayerRechargeRankingVO;
+import com.zanxiang.game.data.serve.service.IAdsAccountRechargeRankingService;
+import com.zanxiang.game.data.serve.service.IAdsAgentRechargeRankingService;
 import com.zanxiang.game.data.serve.service.IRankingService;
 import com.zanxiang.game.data.serve.utils.Page;
 import com.zanxiang.module.util.pojo.ResultVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -23,6 +32,11 @@ public class RankingController {
     @Autowired
     private IRankingService rankingService;
 
+    @Autowired
+    private IAdsAccountRechargeRankingService adsAccountRechargeRankingService;
+    @Autowired
+    private IAdsAgentRechargeRankingService adsAgentRechargeRankingService;
+
     @ApiOperation(value = "游戏充值排行榜")
     @PreAuthorize(permissionKey = "gameData:ranking:game")
     @PostMapping("/game")
@@ -36,4 +50,20 @@ public class RankingController {
     public ResultVO<Page<PlayerRechargeRankingVO>> playerRanking(@RequestBody RechargeRankingDTO dto) {
         return ResultVO.ok(rankingService.playerRanking(dto));
     }
+
+    @PreAuthorize(permissionKey = "gameData:ranking:agent")
+    @ApiOperation(value = "推广渠道充值排行榜")
+    @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = AdsAgentRechargeRankingVO.class)})
+    @PostMapping("/agent")
+    public ResultVO<Page<AdsAgentRechargeRankingVO>> list(@Validated @RequestBody AdsAgentRechargeRankingListDTO dto) {
+        return ResultVO.ok(adsAgentRechargeRankingService.listOfPage(dto));
+    }
+
+    @PreAuthorize(permissionKey = "gameData:ranking:account")
+    @ApiOperation(value = "推广账号充值排行榜")
+    @ApiResponses(value = {@ApiResponse(code = 200, message = "成功", response = AdsAccountRechargeRankingVO.class)})
+    @PostMapping("/account")
+    public ResultVO<Page<AdsAccountRechargeRankingVO>> list(@Validated @RequestBody AdsAccountRechargeRankingListDTO dto) {
+        return ResultVO.ok(adsAccountRechargeRankingService.listOfPage(dto));
+    }
 }

+ 3 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/vo/AdsAccountRechargeRankingVO.java

@@ -17,6 +17,9 @@ public class AdsAccountRechargeRankingVO {
     @ApiModelProperty(notes = "推广账号媒体")
     private String type;
 
+    @ApiModelProperty(notes = "投手ID")
+    private String pitcherId;
+
     @ApiModelProperty(notes = "投手名称")
     private String pitcher;
 

+ 10 - 7
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/vo/AdsAgentRechargeRankingVO.java

@@ -17,6 +17,9 @@ public class AdsAgentRechargeRankingVO {
     @ApiModelProperty(notes = "推广渠道名称")
     private String agentName;
 
+    @ApiModelProperty(notes = "投手ID")
+    private String pitcherId;
+
     @ApiModelProperty(notes = "投手")
     private String pitcher;
 
@@ -26,14 +29,17 @@ public class AdsAgentRechargeRankingVO {
     @ApiModelProperty(notes = "当天充值金额")
     private BigDecimal todayAmount;
 
-    @ApiModelProperty(notes = "累计充值今额")
-    private BigDecimal totalAmount;
+    @ApiModelProperty(notes = "新用户累计充值金额")
+    private BigDecimal newUserTotalRechargeAmount;
 
     @ApiModelProperty(notes = "累计充值人数")
-    private Long totalRechargeUserCount;
+    private Long newUserTotalRechargeNum;
 
     @ApiModelProperty(notes = "累计充值次数")
-    private Long totalRechargeCount;
+    private Long newUserTotalRechargeCount;
+
+    @ApiModelProperty(notes = "累计消耗")
+    private Long totalCost;
 
     @ApiModelProperty(notes = "平均单价")
     private BigDecimal avgAmount;
@@ -41,9 +47,6 @@ public class AdsAgentRechargeRankingVO {
     @ApiModelProperty(notes = "注册人数")
     private Long regUserCount;
 
-    @ApiModelProperty(notes = "累计消耗")
-    private BigDecimal totalCost;
-
     @ApiModelProperty(notes = "回本率")
     private BigDecimal roi;
 }

+ 1 - 1
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/AdsAccountRechargeRankingServiceImpl.java

@@ -42,7 +42,7 @@ public class AdsAccountRechargeRankingServiceImpl implements IAdsAccountRecharge
         }
         Pager pager = dto.toPage();
         String sqlStr = """
-                select account_id, pitcher_id, max(pitcher) as pitcher, `type`, game_id, max(game_name), max(game_classify) as game_classify , max(game_cp) as game_cp,
+                select account_id, pitcher_id, max(pitcher) as pitcher, `type`, game_id, max(game_name) as game_name, max(game_classify) as game_classify , max(game_cp) as game_cp,
                 sum(cost) as cost,
                 sum(ad_count) as ad_count,
                 sum(view_count) as view_count,