Переглянути джерело

游戏每日数据总计修改、投手游戏每日数据总计修改

Letianhua 1 рік тому
батько
коміт
ba1350da38

+ 2 - 1
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/GameDataDayTotalDTO.java

@@ -7,6 +7,7 @@ import lombok.Data;
 import lombok.NoArgsConstructor;
 
 import java.time.LocalDate;
+import java.util.List;
 
 /**
  * @author tianhua
@@ -29,7 +30,7 @@ public class GameDataDayTotalDTO {
      * 游戏ID
      */
     @ApiModelProperty(notes = "游戏ID")
-    private Long gameId;
+    private List<Long> gameId;
 
     /**
      * 推广游戏应用类别

+ 3 - 2
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/PitcherGameDataDayTotalDTO.java

@@ -7,6 +7,7 @@ import lombok.Data;
 import lombok.NoArgsConstructor;
 
 import java.time.LocalDate;
+import java.util.List;
 
 /**
  * @author tianhua
@@ -41,13 +42,13 @@ public class PitcherGameDataDayTotalDTO {
      * 投手ID
      */
     @ApiModelProperty(value = "投手ID")
-    private Long pitcherId;
+    private List<Long> pitcherId;
 
     /**
      * 游戏ID
      */
     @ApiModelProperty(value = "游戏ID")
-    private String gameId;
+    private List<Long> gameId;
 
     /**
      * 游戏CP方

+ 2 - 2
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/GameDataServiceImpl.java

@@ -281,7 +281,7 @@ public class GameDataServiceImpl implements IGameDataService {
      */
     public GameDataDayTotalVO getGameDataDayTotal(GameDataDayTotalDTO dto) {
         com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo(dto.getSourceSystem());
-        List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
+        List<Long> gameIds = CollectionUtils.isEmpty(dto.getGameId()) ? poerInfo.second : dto.getGameId();
 
         //默认查询 total 总量数据
         if (StringUtils.isBlank(dto.getTableTypes())) {
@@ -289,7 +289,7 @@ public class GameDataServiceImpl implements IGameDataService {
         }
         //新增查询条件
         Criteria cri = Cnd.cri();
-        if (gameIds != null) {
+        if (CollectionUtils.isNotEmpty(gameIds)) {
             //拼接游戏id
             cri.where().andInList("game_id", gameIds);
         }

+ 4 - 4
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/PitcherDataServiceImpl.java

@@ -561,8 +561,8 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
     @Override
     public PitcherGameDataDayTotalVO getPitcherGameDataDayTotal(PitcherGameDataDayTotalDTO dto) {
         com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo(dto.getSourceSystem());
-        List<Long> userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
-        List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(Long.parseLong(dto.getGameId()));
+        List<Long> userIds = CollectionUtils.isEmpty(dto.getPitcherId()) ? poerInfo.first : dto.getPitcherId();
+        List<Long> gameIds = CollectionUtils.isEmpty(dto.getGameId()) ? poerInfo.second : dto.getGameId();
         //不传递时间,默认查询当天
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
             dto.setBeginDate(LocalDate.now());
@@ -570,10 +570,10 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
         }
         //创建查询条件
         Criteria cri = Cnd.cri();
-        if (userIds != null) {
+        if (CollectionUtils.isNotEmpty(userIds)) {
             cri.where().andInList("pitcher_id", userIds);
         }
-        if (gameIds != null) {
+        if (CollectionUtils.isNotEmpty(gameIds)) {
             cri.where().andInList("game_id", gameIds);
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {

+ 2 - 2
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/PromotionDayServiceImpl.java

@@ -785,7 +785,7 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
             //推广账号类型
             cri.where().andEquals("account_type", dto.getAccountType());
         }
-        if (userIds != null) {
+        if (CollectionUtils.isNotEmpty(userIds)) {
             cri.where().andInList("pitcher_id", userIds);
         }
         if (CollectionUtils.isNotEmpty(dto.getAgentId())) {
@@ -794,7 +794,7 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
         if (StringUtils.isNotBlank(dto.getCpName())) {
             cri.where().andEquals("cp_name", dto.getCpName());
         }
-        if (gameIds != null) {
+        if (CollectionUtils.isNotEmpty(gameIds)) {
             cri.where().andInList("game_id", gameIds);
         }
         if (dto.getClassify() != null) {