瀏覽代碼

修改内容:权限更新;广告渠道条件查询修改

lth 1 年之前
父節點
當前提交
9391ab1bbc

+ 13 - 8
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/AccountAgentDayServiceImpl.java

@@ -1,5 +1,6 @@
 package com.zanxiang.game.data.serve.service.impl;
 
+import com.github.sd4324530.jtuple.Tuple2;
 import com.google.common.base.CaseFormat;
 import com.google.gson.Gson;
 import com.zanxiang.game.data.serve.component.DataPowerComponent;
@@ -50,8 +51,9 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
 
     @Override
     public Page<GamePromoteDayVO> accountAgentDay(GamePromoteDayDTO dto) {
-        List<Long> userIds = dto.getSysUserId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getSysUserId());
-        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
+        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();
@@ -244,8 +246,9 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
 
     @Override
     public GamePromoteDayTotalVO accountAgentDayTotal(GamePromoteDayTotalDTO dto) {
-        List<Long> userIds = dto.getSysUserId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getSysUserId());
-        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
+        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();
@@ -451,8 +454,9 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
 
     @Override
     public Page<GamePromoteTotalVO> accountAgentTotal(GamePromoteTotalDTO dto) {
-        List<Long> userIds = dto.getSysUserId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getSysUserId());
-        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
+        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);*/
@@ -850,8 +854,9 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
 
     @Override
     public GamePromoteTotalSumVO accountAgentTotalSum(GamePromoteTotalSumDTO dto) {
-        List<Long> userIds = dto.getSysUserId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getSysUserId());
-        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
+        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);*/

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

@@ -156,8 +156,9 @@ public class AdsOrderDetailService implements IAdsOrderDetailService {
 
     @Override
     public AdsOrderDetailTotalVO orderTotal(AdsOrderDetailTotalDTO dto) {
-        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(Long.parseLong(dto.getPitcherId()));
-        List<Long> gameIds = CollectionUtils.isEmpty(dto.getGameId()) ? dataPowerComponent.getSubGameIdList() : dto.getGameId();
+        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.getPitcherId()) && !SecurityUtil.isManager()) {
             // 只有管理员才能查看全部数据
             dto.setPitcherId(SecurityUtil.getUserId().toString());

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

@@ -195,7 +195,8 @@ public class GameDataServiceImpl implements IGameDataService {
      */
     @Override
     public Page<GameDataDayVO> getGameDataDay(GameDataDayDTO dto) {
-        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
+        com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+        List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
 
         //默认查询 total 总量数据
         if (StringUtils.isBlank(dto.getTableTypes())) {
@@ -263,7 +264,8 @@ public class GameDataServiceImpl implements IGameDataService {
      * @return 返回给前端的总计数据实体
      */
     public GameDataDayTotalVO getGameDataDayTotal(GameDataDayTotalDTO dto) {
-        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
+        com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+        List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
 
         //默认查询 total 总量数据
         if (StringUtils.isBlank(dto.getTableTypes())) {
@@ -314,7 +316,8 @@ public class GameDataServiceImpl implements IGameDataService {
      */
     @Override
     public Page<GameDataTotalVO> getGameDataTotal(GameDataTotalDTO dto) {
-        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
+        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 (dto.getRegisteredBeginDate() == null || dto.getRegisteredEndDate() == null) {
             dto.setRegisteredBeginDate(LocalDate.now());
@@ -435,7 +438,8 @@ public class GameDataServiceImpl implements IGameDataService {
      * @return 返回给前端额数据
      */
     public GameDataTotalTotalVO getGameDataTotalTotal(GameDataTotalTotalDTO dto) {
-        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
+        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 (dto.getRegisteredBeginDate() == null || dto.getRegisteredEndDate() == null) {
             dto.setRegisteredBeginDate(LocalDate.now());
@@ -654,7 +658,8 @@ public class GameDataServiceImpl implements IGameDataService {
      */
     @Override
     public Page<GameDataWaterVO> getGameDataWater(GameDataWaterDTO dto) {
-        List<Long> userGameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
+        com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+        List<Long> userGameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
         if (null == dto.getRechargeDate()) {
             dto.setRechargeDate(LocalDate.now());
         }
@@ -762,7 +767,8 @@ public class GameDataServiceImpl implements IGameDataService {
      */
     @Override
     public Map<LocalDate, List<GameDataAgainDayVO>> getGameDataAgainDay(GameDataAgainDayDTO dto) {
-        List<Long> userGameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
+        com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+        List<Long> userGameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
 
         //如果查询时间不传递默认从今天开始查询
         if (dto.getBeginDate() == null) {
@@ -2832,7 +2838,8 @@ public class GameDataServiceImpl implements IGameDataService {
 
     @Override
     public Page<GameDataH5VO> getH5Recharge(GameDataH5DTO dto) {
-        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
+        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 (null == dto.getCostBeginDate() || null == dto.getCostEndDate()) {
             dto.setCostEndDate(LocalDate.now());
             dto.setCostBeginDate(LocalDate.now());
@@ -2991,7 +2998,8 @@ public class GameDataServiceImpl implements IGameDataService {
      */
     @Override
     public Page<LtvDataVO> getLtvData(LtvDataDTO dto) {
-        List<Long> userGameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
+        com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+        List<Long> userGameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
         if (dto.getRegisteredBeginDate() == null || dto.getRegisteredEndDate() == null) {
             //查询时间不传递默认传递当天
             dto.setRegisteredBeginDate(LocalDate.now());
@@ -3057,7 +3065,8 @@ public class GameDataServiceImpl implements IGameDataService {
      */
     @Override
     public LtvDataTotalVO getLtvTotalData(LtvDataTotalDTO dto) {
-        List<Long> userGameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
+        com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+        List<Long> userGameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
         //如果没有传入查询时间默认查询当天
         if (dto.getRegisteredBeginDate() == null || dto.getRegisteredEndDate() == null) {
             dto.setRegisteredBeginDate(LocalDate.now());
@@ -3118,7 +3127,8 @@ public class GameDataServiceImpl implements IGameDataService {
      */
     @Override
     public Page<GameDataFirstNewUserAgainVO> getFirstNewUserAgain(GameDataFirstNewUserAgainDTO dto) {
-        List<Long> userGameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
+        com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+        List<Long> userGameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
         if (dto.getRegisteredBeginDate() == null || dto.getRegisteredEndDate() == null) {
             //查询时间不传递默认传递当天
             dto.setRegisteredBeginDate(LocalDate.now());
@@ -3202,7 +3212,8 @@ public class GameDataServiceImpl implements IGameDataService {
      */
     @Override
     public GameDataFirstNewUserAgainTotalVO getFirstNewUserAgainTotal(GameDataFirstNewUserAgainTotalDTO dto) {
-        List<Long> userGameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
+        com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+        List<Long> userGameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
         //如果没有传入查询时间默认查询当天
         if (dto.getRegisteredBeginDate() == null || dto.getRegisteredEndDate() == null) {
             dto.setRegisteredBeginDate(LocalDate.now());

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

@@ -128,7 +128,8 @@ public class GameServerServiceImpl implements IGameServerService {
      */
     @Override
     public Page<GameServerDayVO> getGameServerDataDay(GameServerDayDTO dto) {
-        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
+        com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+        List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
 
         //创建查询条件
         Criteria cri = Cnd.cri();
@@ -192,7 +193,8 @@ public class GameServerServiceImpl implements IGameServerService {
      */
     @Override
     public GameServerDayTotalVO getGameServerDataDayTotal(GameServerDayTotalDTO dto) {
-        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
+        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.getActiveTypes())) {
             dto.setActiveTypes("reg");

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

@@ -126,7 +126,8 @@ public class IActiveDataServiceImpl implements IActiveDataService {
      */
     @Override
     public Page<ActiveDataDayVO> getActiveDataDay(ActiveDataDayDTO dto) {
-        List<Long> userGameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
+        com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+        List<Long> userGameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(dto.getGameId());
         //默认查询总数据
         if (StringUtils.isBlank(dto.getTableTypes())) {
             dto.setTableTypes("total");
@@ -217,7 +218,8 @@ public class IActiveDataServiceImpl implements IActiveDataService {
      */
     @Override
     public ActiveDataTotalVO getActiveDataTotal(ActiveDataTotalDTO dto) {
-        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
+        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.getTableTypes())) {
             dto.setTableTypes("total");

+ 28 - 16
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/IMediaDataServiceImpl.java

@@ -156,8 +156,9 @@ public class IMediaDataServiceImpl implements IMediaDataService {
     @Override
     public Page<PitcherGameMediaDataDayVO> getPitcherGameMediaDataDay(PitcherGameMediaDataDayDTO dto) {
         //添加权限
-        List<Long> pitcherIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
-        List<Long> gameIds = StringUtils.isBlank(dto.getGameId()) ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(Long.parseLong(dto.getGameId()));
+        com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+        List<Long> pitcherIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
+        List<Long> gameIds = StringUtils.isBlank(dto.getGameId()) ? poerInfo.second : Collections.singletonList(Long.parseLong(dto.getGameId()));
         //创建查询条件
         Criteria cri = Cnd.cri();
         if (pitcherIds != null) {
@@ -223,8 +224,9 @@ public class IMediaDataServiceImpl implements IMediaDataService {
     @Override
     public PitcherGameMediaDataDayVO getPitcherGameMediaDataDayTotal(PitcherGameMediaDataDayTotalDTO dto) {
         //添加权限
-        List<Long> pitcherIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
-        List<Long> gameIds = StringUtils.isBlank(dto.getGameId()) ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(Long.parseLong(dto.getGameId()));
+        com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+        List<Long> pitcherIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
+        List<Long> gameIds = StringUtils.isBlank(dto.getGameId()) ? poerInfo.second : Collections.singletonList(Long.parseLong(dto.getGameId()));
         //创建查询条件
         Criteria cri = Cnd.cri();
         if (pitcherIds != null) {
@@ -271,8 +273,9 @@ public class IMediaDataServiceImpl implements IMediaDataService {
     @Override
     public Page<PitcherGameMediaDataTotalVO> getPitcherGameMediaDataTotal(PitcherGameMediaDataTotalDTO dto) {
         //添加权限
-        List<Long> pitcherIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : List.of(dto.getPitcherId());
-        List<Long> gameIds = StringUtils.isBlank(dto.getGameId()) ? dataPowerComponent.getSubGameIdList() : List.of(Long.parseLong(dto.getGameId()));
+        com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+        List<Long> pitcherIds = dto.getPitcherId() == null ? poerInfo.first : List.of(dto.getPitcherId());
+        List<Long> gameIds = StringUtils.isBlank(dto.getGameId()) ? poerInfo.second : List.of(Long.parseLong(dto.getGameId()));
         //如果注册时间参数为空,默认设置查询当天数据
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
             dto.setBeginDate(LocalDate.now());
@@ -366,8 +369,9 @@ public class IMediaDataServiceImpl implements IMediaDataService {
      */
     @Override
     public PitcherGameMediaDataTotalVO getPitcherGameMediaDataTotalSum(PitcherGameMediaDataTotalSumDTO dto) {
-        List<Long> pitcherId = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
-        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(Long.parseLong(dto.getGameId()));
+        com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+        List<Long> pitcherId = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
+        List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(Long.parseLong(dto.getGameId()));
         //如果注册时间参数为空,默认设置查询当天数据
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
             dto.setBeginDate(LocalDate.now());
@@ -457,7 +461,8 @@ public class IMediaDataServiceImpl implements IMediaDataService {
     @Override
     public Page<PitcherMediaDataDayVO> getPitcherMediaDataDay(PitcherMediaDataDayDTO dto) {
         //添加权限
-        List<Long> pitcherIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
+        com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+        List<Long> pitcherIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
         //创建查询条件
         Criteria cri = Cnd.cri();
         if (pitcherIds != null) {
@@ -514,7 +519,8 @@ public class IMediaDataServiceImpl implements IMediaDataService {
     @Override
     public PitcherMediaDataDayVO getPitcherMediaDataDayTotal(PitcherMediaDataDayTotalDTO dto) {
         //添加权限
-        List<Long> pitcherIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
+        com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+        List<Long> pitcherIds = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
         //创建查询条件
         Criteria cri = Cnd.cri();
         if (pitcherIds != null) {
@@ -552,7 +558,8 @@ public class IMediaDataServiceImpl implements IMediaDataService {
     @Override
     public Page<PitcherMediaDataTotalVO> getPitcherMediaDataTotal(PitcherMediaDataTotalDTO dto) {
         //添加权限
-        List<Long> pitcherIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : List.of(dto.getPitcherId());
+        com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+        List<Long> pitcherIds = dto.getPitcherId() == null ? poerInfo.first : List.of(dto.getPitcherId());
         //如果注册时间参数为空,默认设置查询当天数据
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
             dto.setBeginDate(LocalDate.now());
@@ -646,7 +653,8 @@ public class IMediaDataServiceImpl implements IMediaDataService {
      */
     @Override
     public PitcherMediaDataTotalVO getPitcherMediaDataTotalSum(PitcherMediaDataTotalSumDTO dto) {
-        List<Long> pitcherId = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
+        com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+        List<Long> pitcherId = dto.getPitcherId() == null ? poerInfo.first : Collections.singletonList(dto.getPitcherId());
         //如果注册时间参数为空,默认设置查询当天数据
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
             dto.setBeginDate(LocalDate.now());
@@ -736,7 +744,8 @@ public class IMediaDataServiceImpl implements IMediaDataService {
     @Override
     public Page<GameMediaDataDayVO> getGameMediaDataDay(GameMediaDataDayDTO dto) {
         //添加权限
-        List<Long> gameIds = StringUtils.isBlank(dto.getGameId()) ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(Long.parseLong(dto.getGameId()));
+        com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+        List<Long> gameIds = StringUtils.isBlank(dto.getGameId()) ? poerInfo.second : Collections.singletonList(Long.parseLong(dto.getGameId()));
         //创建查询条件
         Criteria cri = Cnd.cri();
         if (gameIds != null) {
@@ -799,7 +808,8 @@ public class IMediaDataServiceImpl implements IMediaDataService {
     @Override
     public GameMediaDataDayVO getGameMediaDataDayTotal(GameMediaDataDayTotalDTO dto) {
         //添加权限
-        List<Long> gameIds = StringUtils.isBlank(dto.getGameId()) ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(Long.parseLong(dto.getGameId()));
+        com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+        List<Long> gameIds = StringUtils.isBlank(dto.getGameId()) ? poerInfo.second : Collections.singletonList(Long.parseLong(dto.getGameId()));
         //创建查询条件
         Criteria cri = Cnd.cri();
         if (gameIds != null) {
@@ -843,7 +853,8 @@ public class IMediaDataServiceImpl implements IMediaDataService {
     @Override
     public Page<GameMediaDataTotalVO> getGameMediaDataTotal(GameMediaDataTotalDTO dto) {
         //添加权限
-        List<Long> gameIds = StringUtils.isBlank(dto.getGameId()) ? dataPowerComponent.getSubGameIdList() : List.of(Long.parseLong(dto.getGameId()));
+        com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+        List<Long> gameIds = StringUtils.isBlank(dto.getGameId()) ? poerInfo.second : List.of(Long.parseLong(dto.getGameId()));
         //如果注册时间参数为空,默认设置查询当天数据
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
             dto.setBeginDate(LocalDate.now());
@@ -937,7 +948,8 @@ public class IMediaDataServiceImpl implements IMediaDataService {
      */
     @Override
     public GameMediaDataTotalVO getGameMediaDataTotalSum(GameMediaDataTotalSumDTO dto) {
-        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(Long.parseLong(dto.getGameId()));
+        com.github.sd4324530.jtuple.Tuple2<List<Long>, List<Long>> poerInfo = dataPowerComponent.getPowerInfo();
+        List<Long> gameIds = dto.getGameId() == null ? poerInfo.second : Collections.singletonList(Long.parseLong(dto.getGameId()));
         //如果注册时间参数为空,默认设置查询当天数据
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
             dto.setBeginDate(LocalDate.now());

+ 8 - 10
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/OverallSummaryServiceImpl.java

@@ -1,6 +1,6 @@
 package com.zanxiang.game.data.serve.service.impl;
 
-import com.zanxiang.erp.security.util.SecurityUtil;
+import com.github.sd4324530.jtuple.Tuple2;
 import com.zanxiang.game.data.serve.component.DataPowerComponent;
 import com.zanxiang.game.data.serve.pojo.dto.OverallSummaryDTO;
 import com.zanxiang.game.data.serve.pojo.vo.OverallSummaryAmountLineDataVO;
@@ -23,11 +23,7 @@ import java.math.BigDecimal;
 import java.math.RoundingMode;
 import java.time.LocalDate;
 import java.time.temporal.ChronoUnit;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 /**
  * @author tianhua
@@ -51,8 +47,9 @@ public class OverallSummaryServiceImpl implements IOverallSummaryService {
      */
     @Override
     public OverallSummaryVO getOverallSummaryTotalData(OverallSummaryDTO dto) {
-        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
-        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
+        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();
@@ -150,8 +147,9 @@ public class OverallSummaryServiceImpl implements IOverallSummaryService {
      */
     @Override
     public Map<String, List> getOverallSummaryLineData(OverallSummaryDTO dto) {
-        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
-        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
+        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());
 
         //根据条件获取数据
         Condition lineCon = myCondition(userIds, gameIds, dto, true, true, -1);

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

@@ -202,7 +202,8 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
      */
     @Override
     public Page<PitcherDataDayVO> getPitcherDataDay(PitcherDataDayDTO dto) {
-        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
+        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 (dto.getBeginDate() == null || dto.getEndDate() == null) {
             dto.setBeginDate(LocalDate.now());
@@ -260,7 +261,8 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
      */
     @Override
     public PitcherDataDayTotalVO getPitcherDataDayTotal(PitcherDataDayTotalDTO dto) {
-        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
+        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 (dto.getBeginDate() == null || dto.getEndDate() == null) {
             dto.setBeginDate(LocalDate.now());
@@ -301,7 +303,8 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
      */
     @Override
     public Page<PitcherDataTotalVO> getPitcherDataTotal(PitcherDataTotalDTO dto) {
-        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
+        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 (dto.getBeginDate() == null || dto.getEndDate() == null) {
             dto.setBeginDate(LocalDate.now());
@@ -392,7 +395,8 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
      */
     @Override
     public PitcherDataTotalSumVO getPitcherDataTotalSum(PitcherDataTotalSumDTO dto) {
-        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
+        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 (dto.getBeginDate() == null || dto.getEndDate() == null) {
             dto.setBeginDate(LocalDate.now());
@@ -482,8 +486,9 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
      */
     @Override
     public Page<PitcherGameDataDayVO> getPitcherGameDataDay(PitcherGameDataDayDTO dto) {
-        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
-        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(Long.parseLong(dto.getGameId()));
+        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 (dto.getBeginDate() == null || dto.getEndDate() == null) {
             dto.setBeginDate(LocalDate.now());

+ 10 - 10
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/PlayerDataServiceImpl.java

@@ -605,8 +605,8 @@ public class PlayerDataServiceImpl implements IPlayerDataService {
                         a.game_id as game_id ,
                         e.game_name as game_name ,
                         e.classify as game_category_id ,
-                        d.zx_pitcher_name as pitcher_name ,
-                        d.zx_pitcher_id as pitcher_id ,
+                        IFNULL(d.zx_pitcher_name, '自然量') as pitcher_name ,
+                        IFNULL(d.zx_pitcher_id, 0) as pitcher_id ,
                         c.account_id as account_id,
                         c.account_type as account_type,
                         a.mobile as mobile ,
@@ -705,8 +705,8 @@ public class PlayerDataServiceImpl implements IPlayerDataService {
                         a.game_id as game_id ,
                         e.game_name as game_name ,
                         e.classify as game_category_id ,
-                        d.zx_pitcher_name as pitcher_name ,
-                        d.zx_pitcher_id as pitcher_id ,
+                        IFNULL(d.zx_pitcher_name, '自然量') as pitcher_name ,
+                        IFNULL(d.zx_pitcher_id, 0) as pitcher_id ,
                         c.account_id as account_id,
                         c.account_type as account_type,
                         a.mobile as mobile ,
@@ -801,8 +801,8 @@ public class PlayerDataServiceImpl implements IPlayerDataService {
                 		b.create_time as reg_time, -- 玩家注册时间
                 		b.agent_id , -- 注册渠道ID
                 		IF(b.agent_id = 0, '自然量', c.agent_name) as agent_name , -- 注册渠道名
-                		c.pitcher_id , -- 投手ID
-                		d.zx_pitcher_name as pitcher_name, -- 投手名
+                		IFNULL(c.pitcher_id, 0) as pitcher_id , -- 投手ID
+                  		IFNULL(d.zx_pitcher_name, '自然量') as pitcher_name, -- 投手名
                 		c.account_id , -- 推广账号ID
                 		c.account_name , -- 推广账号名
                 		c.account_type , -- 推广账号类型
@@ -911,8 +911,8 @@ public class PlayerDataServiceImpl implements IPlayerDataService {
                 		b.create_time as reg_time, -- 玩家注册时间
                 		b.agent_id , -- 注册渠道ID
                 		IF(b.agent_id = 0, '自然量', c.agent_name) as agent_name , -- 注册渠道名
-                		c.pitcher_id , -- 投手ID
-                		d.zx_pitcher_name as pitcher_name, -- 投手名
+                		IFNULL(c.pitcher_id, 0) as pitcher_id , -- 投手ID
+                  		IFNULL(d.zx_pitcher_name, '自然量') as pitcher_name, -- 投手名
                 		c.account_id , -- 推广账号ID
                 		c.account_name , -- 推广账号名
                 		c.account_type , -- 推广账号类型
@@ -1022,8 +1022,8 @@ public class PlayerDataServiceImpl implements IPlayerDataService {
                 		b.create_time as reg_time, -- 玩家注册时间
                 		b.agent_id , -- 注册渠道ID
                 		IF(b.agent_id = 0, '自然量', c.agent_name) as agent_name , -- 注册渠道名
-                		c.pitcher_id , -- 投手ID
-                		d.zx_pitcher_name as pitcher_name, -- 投手名
+                		IFNULL(c.pitcher_id, 0) as pitcher_id , -- 投手ID
+                  		IFNULL(d.zx_pitcher_name, '自然量') as pitcher_name, -- 投手名
                 		c.account_id , -- 推广账号ID
                 		c.account_name , -- 推广账号名
                 		c.account_type , -- 推广账号类型

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

@@ -1,5 +1,6 @@
 package com.zanxiang.game.data.serve.service.impl;
 
+import com.github.sd4324530.jtuple.Tuple2;
 import com.google.common.base.CaseFormat;
 import com.zanxiang.game.data.serve.component.DataPowerComponent;
 import com.zanxiang.game.data.serve.pojo.dto.PromotionDayDTO;
@@ -11,6 +12,7 @@ import com.zanxiang.game.data.serve.pojo.vo.*;
 import com.zanxiang.game.data.serve.service.IAdsPromotionDayService;
 import com.zanxiang.game.data.serve.utils.Page;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.ArrayUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.nutz.dao.Cnd;
 import org.nutz.dao.Dao;
@@ -52,8 +54,9 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
      * @return
      */
     public Page<PromotionDayVO> getPromotionDayListData(PromotionDayDTO dto) {
-        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
-        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
+        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());
         //如果没有排序条件给默认值
         if (StringUtils.isBlank(dto.getSortFiled())) {
             dto.setSortFiled("dt");
@@ -138,8 +141,9 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
      */
     @Override
     public Page<PromotionDayVO> getPromotionDayData(PromotionDayDTO dto) {
-        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
-        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
+        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());
         //如果没有排序条件给默认值
         if (StringUtils.isBlank(dto.getSortFiled())) {
             dto.setSortFiled("today_cost");
@@ -220,8 +224,9 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
      */
     @Override
     public PromotionDayTotalVO getPromotionDayTotalData(PromotionDayTotalDTO dto) {
-        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
-        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
+        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());
         //创建查询条件
         Criteria cri = Cnd.cri();
         if (dto.getAccountId() != null) {
@@ -239,7 +244,7 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
         if (userIds != null) {
             cri.where().andInList("pitcher_id", userIds);
         }
-        if (dto.getAgentId() != null) {
+        if (ArrayUtils.isNotEmpty(dto.getAgentId())) {
             cri.where().andInList("agent_id", Arrays.asList(dto.getAgentId()));
         }
         if (StringUtils.isNotBlank(dto.getCpName())) {
@@ -410,8 +415,9 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
      * @return
      */
     public Page<TencentPromotionDayVO> getTencentPromotionDayListData(TencentPromotionDayDTO dto) {
-        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
-        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
+        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());
         //如果没有排序条件给默认值
         if (StringUtils.isBlank(dto.getSortFiled())) {
             dto.setSortFiled("dt");
@@ -496,8 +502,9 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
      */
     @Override
     public Page<TencentPromotionDayVO> getTencentPromotionDayData(TencentPromotionDayDTO dto) {
-        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
-        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
+        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());
         //如果没有排序条件给默认值
         if (StringUtils.isBlank(dto.getSortFiled())) {
             dto.setSortFiled("today_cost");
@@ -578,8 +585,9 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
      */
     @Override
     public TencentPromotionDayTotalVO getTencentPromotionDayTotalData(TencentPromotionDayTotalDTO dto) {
-        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
-        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
+        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());
         //创建查询条件
         Criteria cri = Cnd.cri();
         if (dto.getAccountId() != null) {
@@ -597,7 +605,7 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
         if (userIds != null) {
             cri.where().andInList("pitcher_id", userIds);
         }
-        if (dto.getAgentId() != null) {
+        if (ArrayUtils.isNotEmpty(dto.getAgentId())) {
             cri.where().andInList("agent_id", Arrays.asList(dto.getAgentId()));
         }
         if (StringUtils.isNotBlank(dto.getCpName())) {
@@ -779,7 +787,7 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
         if (userIds != null) {
             cri.where().andInList("pitcher_id", userIds);
         }
-        if (dto.getAgentId() != null) {
+        if (ArrayUtils.isNotEmpty(dto.getAgentId())) {
             cri.where().andInList("agent_id", Arrays.asList(dto.getAgentId()));
         }
         if (StringUtils.isNotBlank(dto.getCpName())) {
@@ -852,7 +860,7 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
         if (userIds != null) {
             cri.where().andInList("pitcher_id", userIds);
         }
-        if (dto.getAgentId() != null) {
+        if (ArrayUtils.isNotEmpty(dto.getAgentId())) {
             cri.where().andInList("agent_id", Arrays.asList(dto.getAgentId()));
         }
         if (StringUtils.isNotBlank(dto.getCpName())) {