浏览代码

修改权限-布谷数据使用

Letianhua 1 年之前
父节点
当前提交
e37a09090f

+ 6 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/AdsOrderDetailListDTO.java

@@ -222,4 +222,10 @@ public class AdsOrderDetailListDTO extends BasePage {
     @ApiModelProperty(notes = "广告ID")
     @ApiModelProperty(notes = "广告ID")
     private String projectId;
     private String projectId;
 
 
+    /**
+     * 订单渠道类型
+     */
+    @ApiModelProperty(notes = "订单渠道类型:买量 -> buy ; 自然量 -> nature")
+    private String orderAgentType;
+
 }
 }

+ 6 - 0
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/AdsOrderDetailTotalDTO.java

@@ -209,4 +209,10 @@ public class AdsOrderDetailTotalDTO {
     @ApiModelProperty(notes = "广告ID")
     @ApiModelProperty(notes = "广告ID")
     private String projectId;
     private String projectId;
 
 
+    /**
+     * 订单渠道类型
+     */
+    @ApiModelProperty(notes = "订单渠道类型:买量 -> buy ; 自然量 -> nature")
+    private String orderAgentType;
+
 }
 }

+ 67 - 32
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/AccountAgentDayServiceImpl.java

@@ -51,13 +51,22 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
 
 
     @Override
     @Override
     public Page<GamePromoteDayVO> accountAgentDay(GamePromoteDayDTO dto) {
     public Page<GamePromoteDayVO> accountAgentDay(GamePromoteDayDTO dto) {
-        Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
-        List<Long> userIds = dto.getSysUserId() == null ? poerInfo.first : Collections.singletonList(dto.getSysUserId());
-        List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
 
 
-        /*Long sysUserId = SecurityUtil.isAdmin() ? null : SecurityUtil.getUserId();
-        sysUserId = null == dto.getSysUserId() ? sysUserId : dto.getSysUserId();
-        dto.setSysUserId(sysUserId);*/
+        //默认查询‘ZX_ONE’数据
+        if (StringUtils.isBlank(dto.getSourceSystem())) {
+            dto.setSourceSystem("ZX_ONE");
+        }
+        List<Long> userIds;
+        List<Long> gameIds;
+        if ("ZX_ONE".equals(dto.getSourceSystem())) {
+            Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+            userIds = dto.getSysUserId() == null ? poerInfo.first : Collections.singletonList(dto.getSysUserId());
+            gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
+        } else {
+            userIds = dto.getSysUserId() == null ? Collections.emptyList() : Collections.singletonList(dto.getSysUserId());
+            gameIds = dto.getGameId() == null ? Collections.emptyList() : Collections.singletonList(dto.getGameId());
+        }
+
         if (null == dto.getBeginDay() || null == dto.getEndDay()) {
         if (null == dto.getBeginDay() || null == dto.getEndDay()) {
             dto.setBeginDay(LocalDate.now());
             dto.setBeginDay(LocalDate.now());
             dto.setEndDay(LocalDate.now());
             dto.setEndDay(LocalDate.now());
@@ -66,7 +75,7 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
         // 创建一个 Criteria 接口实例
         // 创建一个 Criteria 接口实例
         SimpleCriteria cri = Cnd.cri();
         SimpleCriteria cri = Cnd.cri();
         // 组装条件
         // 组装条件
-        if (userIds != null) {
+        if (!CollectionUtils.isEmpty(userIds)) {
             cri.where().andInList("pitcher_id", userIds);
             cri.where().andInList("pitcher_id", userIds);
         }
         }
         if (StringUtils.isNotBlank(dto.getAccountId())) {
         if (StringUtils.isNotBlank(dto.getAccountId())) {
@@ -84,7 +93,7 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
         if (StringUtils.isNotBlank(dto.getGameName())) {
         if (StringUtils.isNotBlank(dto.getGameName())) {
             cri.where().andLike("game_name", dto.getGameName());
             cri.where().andLike("game_name", dto.getGameName());
         }
         }
-        if (gameIds != null) {
+        if (!CollectionUtils.isEmpty(gameIds)) {
             cri.where().andInList("game_id", gameIds);
             cri.where().andInList("game_id", gameIds);
         }
         }
         if (StringUtils.isNotBlank(dto.getGameType())) {
         if (StringUtils.isNotBlank(dto.getGameType())) {
@@ -246,13 +255,21 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
 
 
     @Override
     @Override
     public GamePromoteDayTotalVO accountAgentDayTotal(GamePromoteDayTotalDTO dto) {
     public GamePromoteDayTotalVO accountAgentDayTotal(GamePromoteDayTotalDTO dto) {
-        Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
-        List<Long> userIds = dto.getSysUserId() == null ? poerInfo.first : Collections.singletonList(dto.getSysUserId());
-        List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
+        //默认查询‘ZX_ONE’数据
+        if (StringUtils.isBlank(dto.getSourceSystem())) {
+            dto.setSourceSystem("ZX_ONE");
+        }
+        List<Long> userIds;
+        List<Long> gameIds;
+        if ("ZX_ONE".equals(dto.getSourceSystem())) {
+            Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+            userIds = dto.getSysUserId() == null ? poerInfo.first : Collections.singletonList(dto.getSysUserId());
+            gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
+        } else {
+            userIds = dto.getSysUserId() == null ? Collections.emptyList() : Collections.singletonList(dto.getSysUserId());
+            gameIds = dto.getGameId() == null ? Collections.emptyList() : Collections.singletonList(dto.getGameId());
+        }
 
 
-        /*Long sysUserId = SecurityUtil.isAdmin() ? null : SecurityUtil.getUserId();
-        sysUserId = null == dto.getSysUserId() ? sysUserId : dto.getSysUserId();
-        dto.setSysUserId(sysUserId);*/
         if (null == dto.getBeginDay() || null == dto.getEndDay()) {
         if (null == dto.getBeginDay() || null == dto.getEndDay()) {
             dto.setBeginDay(LocalDate.now());
             dto.setBeginDay(LocalDate.now());
             dto.setEndDay(LocalDate.now());
             dto.setEndDay(LocalDate.now());
@@ -260,7 +277,7 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
         // 创建一个 Criteria 接口实例
         // 创建一个 Criteria 接口实例
         SimpleCriteria cri = Cnd.cri();
         SimpleCriteria cri = Cnd.cri();
         // 组装条件
         // 组装条件
-        if (null != userIds) {
+        if (!CollectionUtils.isEmpty(userIds)) {
             cri.where().andInList("pitcher_id", userIds);
             cri.where().andInList("pitcher_id", userIds);
         }
         }
         if (StringUtils.isNotBlank(dto.getAccountId())) {
         if (StringUtils.isNotBlank(dto.getAccountId())) {
@@ -281,7 +298,7 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
         if (StringUtils.isNotBlank(dto.getGameType())) {
         if (StringUtils.isNotBlank(dto.getGameType())) {
             cri.where().andEquals("game_type", dto.getGameType());
             cri.where().andEquals("game_type", dto.getGameType());
         }
         }
-        if (gameIds != null) {
+        if (!CollectionUtils.isEmpty(gameIds)) {
             cri.where().andInList("game_id", gameIds);
             cri.where().andInList("game_id", gameIds);
         }
         }
         if (null != dto.getBeginDay()) {
         if (null != dto.getBeginDay()) {
@@ -454,12 +471,21 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
 
 
     @Override
     @Override
     public Page<GamePromoteTotalVO> accountAgentTotal(GamePromoteTotalDTO dto) {
     public Page<GamePromoteTotalVO> accountAgentTotal(GamePromoteTotalDTO dto) {
-        Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
-        List<Long> userIds = dto.getSysUserId() == null ? poerInfo.first : Collections.singletonList(dto.getSysUserId());
-        List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
-        /*Long sysUserId = SecurityUtil.isAdmin() ? null : SecurityUtil.getUserId();
-        sysUserId = null == dto.getSysUserId() ? sysUserId : dto.getSysUserId();
-        dto.setSysUserId(sysUserId);*/
+        //默认查询‘ZX_ONE’数据
+        if (StringUtils.isBlank(dto.getSourceSystem())) {
+            dto.setSourceSystem("ZX_ONE");
+        }
+        List<Long> userIds;
+        List<Long> gameIds;
+        if ("ZX_ONE".equals(dto.getSourceSystem())) {
+            Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+            userIds = dto.getSysUserId() == null ? poerInfo.first : Collections.singletonList(dto.getSysUserId());
+            gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
+        } else {
+            userIds = dto.getSysUserId() == null ? Collections.emptyList() : Collections.singletonList(dto.getSysUserId());
+            gameIds = dto.getGameId() == null ? Collections.emptyList() : Collections.singletonList(dto.getGameId());
+        }
+
         if (StringUtils.isBlank(dto.getSortFiled())) {
         if (StringUtils.isBlank(dto.getSortFiled())) {
             dto.setSortFiled("cost");
             dto.setSortFiled("cost");
         }
         }
@@ -478,7 +504,7 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
         // 创建一个 Criteria 接口实例
         // 创建一个 Criteria 接口实例
         SimpleCriteria cri = Cnd.cri();
         SimpleCriteria cri = Cnd.cri();
         // 组装条件
         // 组装条件
-        if (userIds != null) {
+        if (!CollectionUtils.isEmpty(userIds)) {
             cri.where().andInList("a.pitcher_id", userIds);
             cri.where().andInList("a.pitcher_id", userIds);
         }
         }
         if (StringUtils.isNotBlank(dto.getAccountId())) {
         if (StringUtils.isNotBlank(dto.getAccountId())) {
@@ -505,7 +531,7 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
         if (null != dto.getCostEndDay()) {
         if (null != dto.getCostEndDay()) {
             cri.where().and("a.dt", "<=", dto.getCostEndDay());
             cri.where().and("a.dt", "<=", dto.getCostEndDay());
         }
         }
-        if (null != gameIds) {
+        if (!CollectionUtils.isEmpty(gameIds)) {
             cri.where().andInList("a.game_id", gameIds);
             cri.where().andInList("a.game_id", gameIds);
         }
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
@@ -854,12 +880,21 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
 
 
     @Override
     @Override
     public GamePromoteTotalSumVO accountAgentTotalSum(GamePromoteTotalSumDTO dto) {
     public GamePromoteTotalSumVO accountAgentTotalSum(GamePromoteTotalSumDTO dto) {
-        Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
-        List<Long> userIds = dto.getSysUserId() == null ? poerInfo.first : Collections.singletonList(dto.getSysUserId());
-        List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
-        /*Long sysUserId = SecurityUtil.isAdmin() ? null : SecurityUtil.getUserId();
-        sysUserId = null == dto.getSysUserId() ? sysUserId : dto.getSysUserId();
-        dto.setSysUserId(sysUserId);*/
+        //默认查询‘ZX_ONE’数据
+        if (StringUtils.isBlank(dto.getSourceSystem())) {
+            dto.setSourceSystem("ZX_ONE");
+        }
+        List<Long> userIds;
+        List<Long> gameIds;
+        if ("ZX_ONE".equals(dto.getSourceSystem())) {
+            Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+            userIds = dto.getSysUserId() == null ? poerInfo.first : Collections.singletonList(dto.getSysUserId());
+            gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
+        } else {
+            userIds = dto.getSysUserId() == null ? Collections.emptyList() : Collections.singletonList(dto.getSysUserId());
+            gameIds = dto.getGameId() == null ? Collections.emptyList() : Collections.singletonList(dto.getGameId());
+        }
+
         if (null == dto.getCostEndDay() || null == dto.getCostBeginDay()) {
         if (null == dto.getCostEndDay() || null == dto.getCostBeginDay()) {
             dto.setCostBeginDay(LocalDate.now());
             dto.setCostBeginDay(LocalDate.now());
             dto.setCostEndDay(LocalDate.now());
             dto.setCostEndDay(LocalDate.now());
@@ -1140,7 +1175,7 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
     private SimpleCriteria getSimpleCriteria(List<Long> userIds, List<Long> gameIds, GamePromoteTotalSumDTO dto) {
     private SimpleCriteria getSimpleCriteria(List<Long> userIds, List<Long> gameIds, GamePromoteTotalSumDTO dto) {
         SimpleCriteria cri = Cnd.cri();
         SimpleCriteria cri = Cnd.cri();
         // 组装条件
         // 组装条件
-        if (null != userIds) {
+        if (!CollectionUtils.isEmpty(userIds)) {
             cri.where().andInList("a.pitcher_id", userIds);
             cri.where().andInList("a.pitcher_id", userIds);
         }
         }
         if (StringUtils.isNotBlank(dto.getAccountId())) {
         if (StringUtils.isNotBlank(dto.getAccountId())) {
@@ -1161,7 +1196,7 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
         if (StringUtils.isNotBlank(dto.getGameType())) {
         if (StringUtils.isNotBlank(dto.getGameType())) {
             cri.where().andEquals("a.game_type", dto.getGameType());
             cri.where().andEquals("a.game_type", dto.getGameType());
         }
         }
-        if (null != gameIds) {
+        if (!CollectionUtils.isEmpty(gameIds)) {
             cri.where().andInList("a.game_id", gameIds);
             cri.where().andInList("a.game_id", gameIds);
         }
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {

+ 50 - 12
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/AdsOrderDetailService.java

@@ -43,14 +43,24 @@ public class AdsOrderDetailService implements IAdsOrderDetailService {
 
 
     @Override
     @Override
     public Page<AdsOrderDetailVO> listOfPage(AdsOrderDetailListDTO dto) {
     public Page<AdsOrderDetailVO> listOfPage(AdsOrderDetailListDTO dto) {
-        Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
-        List<Long> userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(Long.parseLong(dto.getPitcherId()));
-        List<Long> gameIds = CollectionUtils.isEmpty(dto.getGameId()) ? poerInfo.second : dto.getGameId();
+        if (StringUtils.isBlank(dto.getSourceSystem())) {
+            dto.setSourceSystem("ZX_ONE");
+        }
+        List<Long> userIds;
+        List<Long> gameIds;
+        if ("ZX_ONE".equals(dto.getSourceSystem())) {
+            Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+            userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(Long.parseLong(dto.getPitcherId()));
+            gameIds = CollectionUtils.isEmpty(dto.getGameId()) ? poerInfo.second : dto.getGameId();
+        } else {
+            userIds = dto.getPitcherId() == null ? Collections.emptyList() : Collections.singletonList(Long.parseLong(dto.getPitcherId()));
+            gameIds = CollectionUtils.isEmpty(dto.getGameId()) ? Collections.emptyList() : dto.getGameId();
+        }
 
 
-        if (StringUtils.isBlank(dto.getPitcherId()) && !SecurityUtil.isManager()) {
+        /*if (StringUtils.isBlank(dto.getPitcherId()) && !SecurityUtil.isManager()) {
             // 只有管理员才能查看全部数据
             // 只有管理员才能查看全部数据
             dto.setPitcherId(SecurityUtil.getUserId().toString());
             dto.setPitcherId(SecurityUtil.getUserId().toString());
-        }
+        }*/
         Criteria cri = Cnd.cri();
         Criteria cri = Cnd.cri();
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
             cri.where().andEquals("source_system", dto.getSourceSystem());
             cri.where().andEquals("source_system", dto.getSourceSystem());
@@ -76,7 +86,7 @@ public class AdsOrderDetailService implements IAdsOrderDetailService {
         if (StringUtils.isNotBlank(dto.getSourceServerName())) {
         if (StringUtils.isNotBlank(dto.getSourceServerName())) {
             cri.where().andLike("source_server_name", dto.getSourceServerName());
             cri.where().andLike("source_server_name", dto.getSourceServerName());
         }
         }
-        if (gameIds != null) {
+        if (CollectionUtils.isNotEmpty(gameIds)) {
             cri.where().andInList("order_game_id", gameIds);
             cri.where().andInList("order_game_id", gameIds);
         }
         }
         if (CollectionUtils.isNotEmpty(dto.getChannelId())) {
         if (CollectionUtils.isNotEmpty(dto.getChannelId())) {
@@ -85,7 +95,7 @@ public class AdsOrderDetailService implements IAdsOrderDetailService {
         if (StringUtils.isNotBlank(dto.getAccountId())) {
         if (StringUtils.isNotBlank(dto.getAccountId())) {
             cri.where().andEquals("account_id", dto.getAccountId());
             cri.where().andEquals("account_id", dto.getAccountId());
         }
         }
-        if (userIds != null) {
+        if (CollectionUtils.isNotEmpty(userIds)) {
             cri.where().andInList("zx_pitcher_id", userIds);
             cri.where().andInList("zx_pitcher_id", userIds);
         }
         }
         if (StringUtils.isNotBlank(dto.getDeviceSystem())) {
         if (StringUtils.isNotBlank(dto.getDeviceSystem())) {
@@ -138,6 +148,15 @@ public class AdsOrderDetailService implements IAdsOrderDetailService {
             //广告ID
             //广告ID
             cri.where().andEquals("project_id", dto.getProjectId());
             cri.where().andEquals("project_id", dto.getProjectId());
         }
         }
+        if (StringUtils.isNotBlank(dto.getOrderAgentType())) {
+            if ("buy".equals(dto.getOrderAgentType())) {
+                //查询买量渠道订单
+                cri.where().andNotEquals("agent", 0);
+            } else if ("nature".equals(dto.getOrderAgentType())) {
+                //查询自然量订单
+                cri.where().andEquals("agent", 0);
+            }
+        }
         //添加判断,除去BG的数据 BG的数据在我们这找不到用户以及渠道
         //添加判断,除去BG的数据 BG的数据在我们这找不到用户以及渠道
         cri.where().andNotIsNull("agent_name");
         cri.where().andNotIsNull("agent_name");
         cri.where().andNotIsNull("username");
         cri.where().andNotIsNull("username");
@@ -180,9 +199,19 @@ public class AdsOrderDetailService implements IAdsOrderDetailService {
 
 
     @Override
     @Override
     public AdsOrderDetailTotalVO orderTotal(AdsOrderDetailTotalDTO dto) {
     public AdsOrderDetailTotalVO orderTotal(AdsOrderDetailTotalDTO dto) {
-        Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
-        List<Long> userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(Long.parseLong(dto.getPitcherId()));
-        List<Long> gameIds = CollectionUtils.isEmpty(dto.getGameId()) ? poerInfo.second : dto.getGameId();
+        if (StringUtils.isBlank(dto.getSourceSystem())) {
+            dto.setSourceSystem("ZX_ONE");
+        }
+        List<Long> userIds;
+        List<Long> gameIds;
+        if ("ZX_ONE".equals(dto.getSourceSystem())) {
+            Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+            userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(Long.parseLong(dto.getPitcherId()));
+            gameIds = CollectionUtils.isEmpty(dto.getGameId()) ? poerInfo.second : dto.getGameId();
+        } else {
+            userIds = dto.getPitcherId() == null ? Collections.emptyList() : Collections.singletonList(Long.parseLong(dto.getPitcherId()));
+            gameIds = CollectionUtils.isEmpty(dto.getGameId()) ? Collections.emptyList() : dto.getGameId();
+        }
         Criteria cri = Cnd.cri();
         Criteria cri = Cnd.cri();
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
             cri.where().andEquals("source_system", dto.getSourceSystem());
             cri.where().andEquals("source_system", dto.getSourceSystem());
@@ -208,7 +237,7 @@ public class AdsOrderDetailService implements IAdsOrderDetailService {
         if (StringUtils.isNotBlank(dto.getSourceServerName())) {
         if (StringUtils.isNotBlank(dto.getSourceServerName())) {
             cri.where().andLike("source_server_name", dto.getSourceServerName());
             cri.where().andLike("source_server_name", dto.getSourceServerName());
         }
         }
-        if (gameIds != null) {
+        if (CollectionUtils.isNotEmpty(gameIds)) {
             cri.where().andInList("order_game_id", gameIds);
             cri.where().andInList("order_game_id", gameIds);
         }
         }
         if (CollectionUtils.isNotEmpty(dto.getChannelId())) {
         if (CollectionUtils.isNotEmpty(dto.getChannelId())) {
@@ -217,7 +246,7 @@ public class AdsOrderDetailService implements IAdsOrderDetailService {
         if (StringUtils.isNotBlank(dto.getAccountId())) {
         if (StringUtils.isNotBlank(dto.getAccountId())) {
             cri.where().andEquals("account_id", dto.getAccountId());
             cri.where().andEquals("account_id", dto.getAccountId());
         }
         }
-        if (userIds != null) {
+        if (CollectionUtils.isNotEmpty(userIds)) {
             cri.where().andInList("zx_pitcher_id", userIds);
             cri.where().andInList("zx_pitcher_id", userIds);
         }
         }
         if (StringUtils.isNotBlank(dto.getDeviceSystem())) {
         if (StringUtils.isNotBlank(dto.getDeviceSystem())) {
@@ -270,6 +299,15 @@ public class AdsOrderDetailService implements IAdsOrderDetailService {
             //广告ID
             //广告ID
             cri.where().andEquals("project_id", dto.getProjectId());
             cri.where().andEquals("project_id", dto.getProjectId());
         }
         }
+        if (StringUtils.isNotBlank(dto.getOrderAgentType())) {
+            if ("buy".equals(dto.getOrderAgentType())) {
+                //查询买量渠道订单
+                cri.where().andNotEquals("agent_id", 0);
+            } else if ("nature".equals(dto.getOrderAgentType())) {
+                //查询自然量订单
+                cri.where().andEquals("agent_id", 0);
+            }
+        }
         //添加判断,除去BG的数据 BG的数据在我们这找不到用户以及渠道
         //添加判断,除去BG的数据 BG的数据在我们这找不到用户以及渠道
         cri.where().andNotIsNull("agent_name");
         cri.where().andNotIsNull("agent_name");
         cri.where().andNotIsNull("username");
         cri.where().andNotIsNull("username");

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

@@ -195,8 +195,16 @@ public class GameDataServiceImpl implements IGameDataService {
      */
      */
     @Override
     @Override
     public Page<GameDataDayVO> getGameDataDay(GameDataDayDTO dto) {
     public Page<GameDataDayVO> getGameDataDay(GameDataDayDTO dto) {
-        com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
-        List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
+        if (StringUtils.isBlank(dto.getSourceSystem())) {
+            dto.setSourceSystem("ZX_ONE");
+        }
+        List<Long> gameIds;
+        if ("ZX_ONE".equals(dto.getSourceSystem())) {
+            com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+            gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
+        } else {
+            gameIds = dto.getGameId() == null ? Collections.emptyList() : Collections.singletonList(dto.getGameId());
+        }
 
 
         //默认查询 total 总量数据
         //默认查询 total 总量数据
         if (StringUtils.isBlank(dto.getTableTypes())) {
         if (StringUtils.isBlank(dto.getTableTypes())) {
@@ -208,7 +216,7 @@ public class GameDataServiceImpl implements IGameDataService {
             //拼接游戏名称查询条件
             //拼接游戏名称查询条件
             cri.where().andEquals("game_name", dto.getGameName());
             cri.where().andEquals("game_name", dto.getGameName());
         }
         }
-        if (gameIds != null) {
+        if (!CollectionUtils.isEmpty(gameIds)) {
             //拼接游戏id查询条件
             //拼接游戏id查询条件
             cri.where().andInList("game_id", gameIds);
             cri.where().andInList("game_id", gameIds);
         }
         }
@@ -264,8 +272,16 @@ public class GameDataServiceImpl implements IGameDataService {
      * @return 返回给前端的总计数据实体
      * @return 返回给前端的总计数据实体
      */
      */
     public GameDataDayTotalVO getGameDataDayTotal(GameDataDayTotalDTO dto) {
     public GameDataDayTotalVO getGameDataDayTotal(GameDataDayTotalDTO dto) {
-        com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
-        List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
+        if (StringUtils.isBlank(dto.getSourceSystem())) {
+            dto.setSourceSystem("ZX_ONE");
+        }
+        List<Long> gameIds;
+        if ("ZX_ONE".equals(dto.getSourceSystem())) {
+            com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+            gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
+        } else {
+            gameIds = dto.getGameId() == null ? Collections.emptyList() : Collections.singletonList(dto.getGameId());
+        }
 
 
         //默认查询 total 总量数据
         //默认查询 total 总量数据
         if (StringUtils.isBlank(dto.getTableTypes())) {
         if (StringUtils.isBlank(dto.getTableTypes())) {
@@ -273,7 +289,7 @@ public class GameDataServiceImpl implements IGameDataService {
         }
         }
         //新增查询条件
         //新增查询条件
         Criteria cri = Cnd.cri();
         Criteria cri = Cnd.cri();
-        if (gameIds != null) {
+        if (!CollectionUtils.isEmpty(gameIds)) {
             //拼接游戏id
             //拼接游戏id
             cri.where().andInList("game_id", gameIds);
             cri.where().andInList("game_id", gameIds);
         }
         }
@@ -316,8 +332,17 @@ public class GameDataServiceImpl implements IGameDataService {
      */
      */
     @Override
     @Override
     public Page<GameDataTotalVO> getGameDataTotal(GameDataTotalDTO dto) {
     public Page<GameDataTotalVO> getGameDataTotal(GameDataTotalDTO dto) {
-        com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
-        List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
+        if (StringUtils.isBlank(dto.getSourceSystem())) {
+            dto.setSourceSystem("ZX_ONE");
+        }
+        List<Long> gameIds;
+        if ("ZX_ONE".equals(dto.getSourceSystem())) {
+            com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+            gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
+        } else {
+            gameIds = dto.getGameId() == null ? Collections.emptyList() : Collections.singletonList(dto.getGameId());
+        }
+
         //如果注册时间参数为空,默认设置查询当天数据
         //如果注册时间参数为空,默认设置查询当天数据
         if (dto.getRegisteredBeginDate() == null || dto.getRegisteredEndDate() == null) {
         if (dto.getRegisteredBeginDate() == null || dto.getRegisteredEndDate() == null) {
             dto.setRegisteredBeginDate(LocalDate.now());
             dto.setRegisteredBeginDate(LocalDate.now());
@@ -438,8 +463,17 @@ public class GameDataServiceImpl implements IGameDataService {
      * @return 返回给前端额数据
      * @return 返回给前端额数据
      */
      */
     public GameDataTotalTotalVO getGameDataTotalTotal(GameDataTotalTotalDTO dto) {
     public GameDataTotalTotalVO getGameDataTotalTotal(GameDataTotalTotalDTO dto) {
-        com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
-        List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
+        if (StringUtils.isBlank(dto.getSourceSystem())) {
+            dto.setSourceSystem("ZX_ONE");
+        }
+        List<Long> gameIds;
+        if ("ZX_ONE".equals(dto.getSourceSystem())) {
+            com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+            gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
+        } else {
+            gameIds = dto.getGameId() == null ? Collections.emptyList() : Collections.singletonList(dto.getGameId());
+        }
+
         //如果注册时间参数为空,默认设置查询当天数据
         //如果注册时间参数为空,默认设置查询当天数据
         if (dto.getRegisteredBeginDate() == null || dto.getRegisteredEndDate() == null) {
         if (dto.getRegisteredBeginDate() == null || dto.getRegisteredEndDate() == null) {
             dto.setRegisteredBeginDate(LocalDate.now());
             dto.setRegisteredBeginDate(LocalDate.now());
@@ -1040,7 +1074,7 @@ public class GameDataServiceImpl implements IGameDataService {
             //拼接游戏名称查询条件
             //拼接游戏名称查询条件
             cri.where().andEquals("game_name", dto.getGameName());
             cri.where().andEquals("game_name", dto.getGameName());
         }
         }
-        if (gameIds != null) {
+        if (!CollectionUtils.isEmpty(gameIds)) {
             //拼接游戏id查询条件
             //拼接游戏id查询条件
             cri.where().andInList("game_id", gameIds);
             cri.where().andInList("game_id", gameIds);
         }
         }
@@ -1082,7 +1116,7 @@ public class GameDataServiceImpl implements IGameDataService {
     private Criteria myCriRecharge(List<Long> gameIds, GameDataTotalDTO dto, Boolean needRegTime) {
     private Criteria myCriRecharge(List<Long> gameIds, GameDataTotalDTO dto, Boolean needRegTime) {
         //根据传入的dto拼接查询参数
         //根据传入的dto拼接查询参数
         Criteria cri = Cnd.cri();
         Criteria cri = Cnd.cri();
-        if (gameIds != null) {
+        if (!CollectionUtils.isEmpty(gameIds)) {
             //拼接游戏id查询条件
             //拼接游戏id查询条件
             cri.where().andInList("game_id", gameIds);
             cri.where().andInList("game_id", gameIds);
         }
         }
@@ -1116,7 +1150,7 @@ public class GameDataServiceImpl implements IGameDataService {
     private Criteria myCriRole(List<Long> gameIds, GameDataTotalDTO dto) {
     private Criteria myCriRole(List<Long> gameIds, GameDataTotalDTO dto) {
         //根据传入的dto拼接查询参数
         //根据传入的dto拼接查询参数
         Criteria cri = Cnd.cri();
         Criteria cri = Cnd.cri();
-        if (gameIds != null) {
+        if (!CollectionUtils.isEmpty(gameIds)) {
             //拼接游戏id查询条件
             //拼接游戏id查询条件
             cri.where().andInList("user_game_id", gameIds);
             cri.where().andInList("user_game_id", gameIds);
         }
         }

+ 29 - 12
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/OverallSummaryServiceImpl.java

@@ -9,6 +9,7 @@ import com.zanxiang.game.data.serve.pojo.vo.OverallSummaryUserLineDataVO;
 import com.zanxiang.game.data.serve.pojo.vo.OverallSummaryVO;
 import com.zanxiang.game.data.serve.pojo.vo.OverallSummaryVO;
 import com.zanxiang.game.data.serve.service.IOverallSummaryService;
 import com.zanxiang.game.data.serve.service.IOverallSummaryService;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.nutz.dao.Cnd;
 import org.nutz.dao.Cnd;
 import org.nutz.dao.Condition;
 import org.nutz.dao.Condition;
@@ -47,18 +48,23 @@ public class OverallSummaryServiceImpl implements IOverallSummaryService {
      */
      */
     @Override
     @Override
     public OverallSummaryVO getOverallSummaryTotalData(OverallSummaryDTO dto) {
     public OverallSummaryVO getOverallSummaryTotalData(OverallSummaryDTO dto) {
-        Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
-        List<Long> userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
-        List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
-
-        //创建返回给前端的对象
-        OverallSummaryVO overallSummaryVO = new OverallSummaryVO();
-
         //默认查询‘ZX_ONE’数据
         //默认查询‘ZX_ONE’数据
         if (StringUtils.isBlank(dto.getSourceSystem())) {
         if (StringUtils.isBlank(dto.getSourceSystem())) {
             dto.setSourceSystem("ZX_ONE");
             dto.setSourceSystem("ZX_ONE");
         }
         }
+        List<Long> userIds;
+        List<Long> gameIds;
+        if ("ZX_ONE".equals(dto.getSourceSystem())) {
+            Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+            userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
+            gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
+        } else {
+            userIds = dto.getPitcherId() == null ? Collections.emptyList() : Collections.singletonList(dto.getPitcherId());
+            gameIds = dto.getGameId() == null ? Collections.emptyList() : Collections.singletonList(dto.getGameId());
+        }
 
 
+        //创建返回给前端的对象
+        OverallSummaryVO overallSummaryVO = new OverallSummaryVO();
         //计算总计条件
         //计算总计条件
         Condition totalCri = myCondition(userIds, gameIds, dto, true, false, -1);
         Condition totalCri = myCondition(userIds, gameIds, dto, true, false, -1);
         //计算今日数据条件
         //计算今日数据条件
@@ -189,9 +195,20 @@ public class OverallSummaryServiceImpl implements IOverallSummaryService {
      */
      */
     @Override
     @Override
     public Map<String, List> getOverallSummaryLineData(OverallSummaryDTO dto) {
     public Map<String, List> getOverallSummaryLineData(OverallSummaryDTO dto) {
-        Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
-        List<Long> userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
-        List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
+        //默认查询‘ZX_ONE’数据
+        if (StringUtils.isBlank(dto.getSourceSystem())) {
+            dto.setSourceSystem("ZX_ONE");
+        }
+        List<Long> userIds;
+        List<Long> gameIds;
+        if ("ZX_ONE".equals(dto.getSourceSystem())) {
+            Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+            userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
+            gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
+        } else {
+            userIds = dto.getPitcherId() == null ? Collections.emptyList() : Collections.singletonList(dto.getPitcherId());
+            gameIds = dto.getGameId() == null ? Collections.emptyList() : Collections.singletonList(dto.getGameId());
+        }
 
 
         //根据条件获取数据
         //根据条件获取数据
         Condition lineCon = myCondition(userIds, gameIds, dto, true, true, -1);
         Condition lineCon = myCondition(userIds, gameIds, dto, true, true, -1);
@@ -258,7 +275,7 @@ public class OverallSummaryServiceImpl implements IOverallSummaryService {
 
 
         Criteria cri = Cnd.cri();
         Criteria cri = Cnd.cri();
         //默认查询条件
         //默认查询条件
-        if (gameIds != null && needGameId) {
+        if (CollectionUtils.isNotEmpty(gameIds) && needGameId) {
             //拼接游戏查询条件
             //拼接游戏查询条件
             cri.where().andInList("game_id", gameIds);
             cri.where().andInList("game_id", gameIds);
         }
         }
@@ -275,7 +292,7 @@ public class OverallSummaryServiceImpl implements IOverallSummaryService {
             cri.where().andEquals("source_system", dto.getSourceSystem());
             cri.where().andEquals("source_system", dto.getSourceSystem());
         }
         }
         //前端传递 pitcherId 根据 pitcherId 查询
         //前端传递 pitcherId 根据 pitcherId 查询
-        if (userIds != null) {
+        if (CollectionUtils.isNotEmpty(userIds)) {
             //拼接投手查询条件
             //拼接投手查询条件
             cri.where().andInList("pitcher_id", userIds);
             cri.where().andInList("pitcher_id", userIds);
         }
         }

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

@@ -202,8 +202,17 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
      */
      */
     @Override
     @Override
     public Page<PitcherDataDayVO> getPitcherDataDay(PitcherDataDayDTO dto) {
     public Page<PitcherDataDayVO> getPitcherDataDay(PitcherDataDayDTO dto) {
-        com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
-        List<Long> userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
+        if (StringUtils.isBlank(dto.getSourceSystem())) {
+            dto.setSourceSystem("ZX_ONE");
+        }
+        List<Long> userIds;
+        if (StringUtils.isNotBlank(dto.getSourceSystem())) {
+            com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+            userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
+        } else {
+            userIds = dto.getPitcherId() == null ? Collections.emptyList() : Collections.singletonList(dto.getPitcherId());
+        }
+
         //不传递时间,默认查询当天
         //不传递时间,默认查询当天
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
             dto.setBeginDate(LocalDate.now());
             dto.setBeginDate(LocalDate.now());
@@ -211,7 +220,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
         }
         }
         //创建查询条件
         //创建查询条件
         Criteria cri = Cnd.cri();
         Criteria cri = Cnd.cri();
-        if (userIds != null) {
+        if (CollectionUtils.isNotEmpty(userIds)) {
             cri.where().andInList("pitcher_id", userIds);
             cri.where().andInList("pitcher_id", userIds);
         }
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
@@ -261,8 +270,17 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
      */
      */
     @Override
     @Override
     public PitcherDataDayTotalVO getPitcherDataDayTotal(PitcherDataDayTotalDTO dto) {
     public PitcherDataDayTotalVO getPitcherDataDayTotal(PitcherDataDayTotalDTO dto) {
-        com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
-        List<Long> userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
+        if (StringUtils.isBlank(dto.getSourceSystem())) {
+            dto.setSourceSystem("ZX_ONE");
+        }
+        List<Long> userIds;
+        if (StringUtils.isNotBlank(dto.getSourceSystem())) {
+            com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+            userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
+        } else {
+            userIds = dto.getPitcherId() == null ? Collections.emptyList() : Collections.singletonList(dto.getPitcherId());
+        }
+
         //不传递时间,默认查询当天
         //不传递时间,默认查询当天
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
             dto.setBeginDate(LocalDate.now());
             dto.setBeginDate(LocalDate.now());
@@ -270,7 +288,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
         }
         }
         //创建查询条件
         //创建查询条件
         Criteria cri = Cnd.cri();
         Criteria cri = Cnd.cri();
-        if (userIds != null) {
+        if (CollectionUtils.isNotEmpty(userIds)) {
             cri.where().andInList("pitcher_id", userIds);
             cri.where().andInList("pitcher_id", userIds);
         }
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
@@ -303,8 +321,16 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
      */
      */
     @Override
     @Override
     public Page<PitcherDataTotalVO> getPitcherDataTotal(PitcherDataTotalDTO dto) {
     public Page<PitcherDataTotalVO> getPitcherDataTotal(PitcherDataTotalDTO dto) {
-        com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
-        List<Long> userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
+        if (StringUtils.isBlank(dto.getSourceSystem())) {
+            dto.setSourceSystem("ZX_ONE");
+        }
+        List<Long> userIds;
+        if (StringUtils.isNotBlank(dto.getSourceSystem())) {
+            com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+            userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
+        } else {
+            userIds = dto.getPitcherId() == null ? Collections.emptyList() : Collections.singletonList(dto.getPitcherId());
+        }
         //如果注册时间参数为空,默认设置查询当天数据
         //如果注册时间参数为空,默认设置查询当天数据
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
             dto.setBeginDate(LocalDate.now());
             dto.setBeginDate(LocalDate.now());
@@ -395,8 +421,17 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
      */
      */
     @Override
     @Override
     public PitcherDataTotalSumVO getPitcherDataTotalSum(PitcherDataTotalSumDTO dto) {
     public PitcherDataTotalSumVO getPitcherDataTotalSum(PitcherDataTotalSumDTO dto) {
-        com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
-        List<Long> userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
+        if (StringUtils.isBlank(dto.getSourceSystem())) {
+            dto.setSourceSystem("ZX_ONE");
+        }
+        List<Long> userIds;
+        if (StringUtils.isNotBlank(dto.getSourceSystem())) {
+            com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+            userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
+        } else {
+            userIds = dto.getPitcherId() == null ? Collections.emptyList() : Collections.singletonList(dto.getPitcherId());
+        }
+        
         //如果注册时间参数为空,默认设置查询当天数据
         //如果注册时间参数为空,默认设置查询当天数据
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
             dto.setBeginDate(LocalDate.now());
             dto.setBeginDate(LocalDate.now());
@@ -486,9 +521,19 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
      */
      */
     @Override
     @Override
     public Page<PitcherGameDataDayVO> getPitcherGameDataDay(PitcherGameDataDayDTO dto) {
     public Page<PitcherGameDataDayVO> getPitcherGameDataDay(PitcherGameDataDayDTO dto) {
-        com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
-        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()));
+        if (StringUtils.isBlank(dto.getSourceSystem())) {
+            dto.setSourceSystem("ZX_ONE");
+        }
+        List<Long> userIds;
+        List<Long> gameIds;
+        if (StringUtils.isNotBlank(dto.getSourceSystem())) {
+            com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+            userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
+            gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(Long.parseLong(dto.getGameId()));
+        } else {
+            userIds = dto.getPitcherId() == null ? Collections.emptyList() : Collections.singletonList(dto.getPitcherId());
+            gameIds = dto.getGameId() == null ? Collections.emptyList() : Collections.singletonList(Long.parseLong(dto.getGameId()));
+        }
         //不传递时间,默认查询当天
         //不传递时间,默认查询当天
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
             dto.setBeginDate(LocalDate.now());
             dto.setBeginDate(LocalDate.now());
@@ -496,10 +541,10 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
         }
         }
         //创建查询条件
         //创建查询条件
         Criteria cri = Cnd.cri();
         Criteria cri = Cnd.cri();
-        if (userIds != null) {
+        if (CollectionUtils.isNotEmpty(userIds)) {
             cri.where().andInList("pitcher_id", userIds);
             cri.where().andInList("pitcher_id", userIds);
         }
         }
-        if (gameIds != null) {
+        if (CollectionUtils.isNotEmpty(gameIds)) {
             cri.where().andInList("game_id", gameIds);
             cri.where().andInList("game_id", gameIds);
         }
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
@@ -556,9 +601,20 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
      */
      */
     @Override
     @Override
     public PitcherGameDataDayTotalVO getPitcherGameDataDayTotal(PitcherGameDataDayTotalDTO dto) {
     public PitcherGameDataDayTotalVO getPitcherGameDataDayTotal(PitcherGameDataDayTotalDTO dto) {
-        com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
-        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()));
+        if (StringUtils.isBlank(dto.getSourceSystem())) {
+            dto.setSourceSystem("ZX_ONE");
+        }
+        List<Long> userIds;
+        List<Long> gameIds;
+        if (StringUtils.isNotBlank(dto.getSourceSystem())) {
+            com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+            userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
+            gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(Long.parseLong(dto.getGameId()));
+        } else {
+            userIds = dto.getPitcherId() == null ? Collections.emptyList() : Collections.singletonList(dto.getPitcherId());
+            gameIds = dto.getGameId() == null ? Collections.emptyList() : Collections.singletonList(Long.parseLong(dto.getGameId()));
+        }
+
         //不传递时间,默认查询当天
         //不传递时间,默认查询当天
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
             dto.setBeginDate(LocalDate.now());
             dto.setBeginDate(LocalDate.now());
@@ -566,10 +622,10 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
         }
         }
         //创建查询条件
         //创建查询条件
         Criteria cri = Cnd.cri();
         Criteria cri = Cnd.cri();
-        if (userIds != null) {
+        if (CollectionUtils.isNotEmpty(userIds)) {
             cri.where().andInList("pitcher_id", userIds);
             cri.where().andInList("pitcher_id", userIds);
         }
         }
-        if (gameIds != null) {
+        if (CollectionUtils.isNotEmpty(gameIds)) {
             cri.where().andInList("game_id", gameIds);
             cri.where().andInList("game_id", gameIds);
         }
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
@@ -608,9 +664,19 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
      */
      */
     @Override
     @Override
     public Page<PitcherGameDataTotalVO> getPitcherGameDataTotal(PitcherGameDataTotalDTO dto) {
     public Page<PitcherGameDataTotalVO> getPitcherGameDataTotal(PitcherGameDataTotalDTO dto) {
-        com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
-        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()));
+        if (StringUtils.isBlank(dto.getSourceSystem())) {
+            dto.setSourceSystem("ZX_ONE");
+        }
+        List<Long> userIds;
+        List<Long> gameIds;
+        if (StringUtils.isNotBlank(dto.getSourceSystem())) {
+            com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+            userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
+            gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(Long.parseLong(dto.getGameId()));
+        } else {
+            userIds = dto.getPitcherId() == null ? Collections.emptyList() : Collections.singletonList(dto.getPitcherId());
+            gameIds = dto.getGameId() == null ? Collections.emptyList() : Collections.singletonList(Long.parseLong(dto.getGameId()));
+        }
         //如果注册时间参数为空,默认设置查询当天数据
         //如果注册时间参数为空,默认设置查询当天数据
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
             dto.setBeginDate(LocalDate.now());
             dto.setBeginDate(LocalDate.now());
@@ -707,9 +773,19 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
      */
      */
     @Override
     @Override
     public PitcherGameDataTotalSumVO getPitcherGameDataTotalSum(PitcherGameDataTotalSumDTO dto) {
     public PitcherGameDataTotalSumVO getPitcherGameDataTotalSum(PitcherGameDataTotalSumDTO dto) {
-        com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
-        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()));
+        if (StringUtils.isBlank(dto.getSourceSystem())) {
+            dto.setSourceSystem("ZX_ONE");
+        }
+        List<Long> userIds;
+        List<Long> gameIds;
+        if (StringUtils.isNotBlank(dto.getSourceSystem())) {
+            com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+            userIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
+            gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(Long.parseLong(dto.getGameId()));
+        } else {
+            userIds = dto.getPitcherId() == null ? Collections.emptyList() : Collections.singletonList(dto.getPitcherId());
+            gameIds = dto.getGameId() == null ? Collections.emptyList() : Collections.singletonList(Long.parseLong(dto.getGameId()));
+        }
         //如果注册时间参数为空,默认设置查询当天数据
         //如果注册时间参数为空,默认设置查询当天数据
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
             dto.setBeginDate(LocalDate.now());
             dto.setBeginDate(LocalDate.now());
@@ -1042,7 +1118,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
     private Criteria myCri(List<Long> userIds, List<Long> gameIds, PitcherGameDataTotalDTO dto, String type, Boolean needGroupBy) {
     private Criteria myCri(List<Long> userIds, List<Long> gameIds, PitcherGameDataTotalDTO dto, String type, Boolean needGroupBy) {
         //根据传入的dto拼接查询参数
         //根据传入的dto拼接查询参数
         Criteria cri = Cnd.cri();
         Criteria cri = Cnd.cri();
-        if (gameIds != null) {
+        if (CollectionUtils.isNotEmpty(gameIds)) {
             //拼接游戏id查询条件
             //拼接游戏id查询条件
             cri.where().andInList("game_id", gameIds);
             cri.where().andInList("game_id", gameIds);
         }
         }
@@ -1058,7 +1134,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
             //拼接SDK来源
             //拼接SDK来源
             cri.where().andEquals("source_system", dto.getSourceSystem());
             cri.where().andEquals("source_system", dto.getSourceSystem());
         }
         }
-        if (userIds != null) {
+        if (CollectionUtils.isNotEmpty(userIds)) {
             //拼接投手ID
             //拼接投手ID
             cri.where().andInList("pitcher_id", userIds);
             cri.where().andInList("pitcher_id", userIds);
         }
         }
@@ -1181,7 +1257,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
             //拼接SDK来源
             //拼接SDK来源
             cri.where().andEquals("source_system", dto.getSourceSystem());
             cri.where().andEquals("source_system", dto.getSourceSystem());
         }
         }
-        if (userIds != null) {
+        if (CollectionUtils.isNotEmpty(userIds)) {
             //拼接投手ID
             //拼接投手ID
             cri.where().andInList("pitcher_id", userIds);
             cri.where().andInList("pitcher_id", userIds);
         }
         }
@@ -1219,7 +1295,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
             //拼接SDK来源
             //拼接SDK来源
             cri.where().andEquals("source_system", dto.getSourceSystem());
             cri.where().andEquals("source_system", dto.getSourceSystem());
         }
         }
-        if (userIds != null) {
+        if (CollectionUtils.isNotEmpty(userIds)) {
             //拼接投手ID
             //拼接投手ID
             cri.where().andInList("pitcher_id", userIds);
             cri.where().andInList("pitcher_id", userIds);
         }
         }
@@ -1249,7 +1325,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
             //拼接SDK来源
             //拼接SDK来源
             cri.where().andEquals("source_system", dto.getSourceSystem());
             cri.where().andEquals("source_system", dto.getSourceSystem());
         }
         }
-        if (userIds != null) {
+        if (CollectionUtils.isNotEmpty(userIds)) {
             //拼接投手ID
             //拼接投手ID
             cri.where().andInList("user_zx_pitcher_id", userIds);
             cri.where().andInList("user_zx_pitcher_id", userIds);
         }
         }