浏览代码

游戏数据权限

wcc 1 年之前
父节点
当前提交
509530c230
共有 14 个文件被更改,包括 164 次插入157 次删除
  1. 9 5
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/component/DataPowerComponent.java
  2. 2 1
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/AdsOrderDetailListDTO.java
  3. 17 17
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/AccountAgentDayServiceImpl.java
  4. 5 4
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/AdsAccountRechargeRankingServiceImpl.java
  5. 3 2
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/AdsAgentRechargeRankingServiceImpl.java
  6. 14 12
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/AdsOrderDetailService.java
  7. 26 26
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/GameDataServiceImpl.java
  8. 4 4
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/GameServerServiceImpl.java
  9. 4 4
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/IActiveDataServiceImpl.java
  10. 16 16
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/IMediaDataServiceImpl.java
  11. 8 13
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/OverallSummaryServiceImpl.java
  12. 27 27
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/PitcherDataServiceImpl.java
  13. 22 22
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/PromotionDayServiceImpl.java
  14. 7 4
      game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/RankingServiceImpl.java

+ 9 - 5
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/component/DataPowerComponent.java

@@ -1,6 +1,5 @@
 package com.zanxiang.game.data.serve.component;
 
-import com.github.sd4324530.jtuple.Tuple2;
 import com.zanxiang.erp.base.ErpServer;
 import com.zanxiang.erp.base.rpc.ISysUserGroupRpc;
 import com.zanxiang.erp.security.util.SecurityUtil;
@@ -30,11 +29,16 @@ public class DataPowerComponent {
      * 3:管理员:自己+组员
      * 4:超管:null-->有权限看所有数据
      */
-    public long[] getSubUserIdList() {
+    public List<Long> getSubUserIdList() {
         if (SecurityUtil.isAdmin()) {
             return null;
         }
-        return sysUserGroupRpc.memberUserId(SecurityUtil.getCompanyId(), SecurityUtil.getUserId()).getData().stream().mapToLong(Long::longValue).toArray();
+        List<Long> subUserIds = sysUserGroupRpc.memberUserId(SecurityUtil.getCompanyId(), SecurityUtil.getUserId()).getData();
+        if (subUserIds.size() > 1) {
+            // 自然量
+            subUserIds.add(-2L);
+        }
+        return subUserIds;
     }
 
 
@@ -46,10 +50,10 @@ public class DataPowerComponent {
      * 4:管理员:自己+组员投的游戏列表
      * 5:超管:null-->表示不用此字段做游戏过滤
      */
-    public long[] getSubGameIdList() {
+    public List<Long> getSubGameIdList() {
         if (SecurityUtil.isAdmin()) {
             return null;
         }
-        return gameAuthRpc.getGameAuthByUserIds().getData().getGameIdList().stream().mapToLong(Long::longValue).toArray();
+        return gameAuthRpc.getGameAuthByUserIds().getData().getGameIdList();
     }
 }

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

@@ -7,6 +7,7 @@ import lombok.Data;
 import org.springframework.format.annotation.DateTimeFormat;
 
 import java.time.LocalDate;
+import java.util.List;
 
 @Data
 public class AdsOrderDetailListDTO extends BasePage {
@@ -69,7 +70,7 @@ public class AdsOrderDetailListDTO extends BasePage {
      * 注册渠道对应的id --> agentId
      */
     @ApiModelProperty(notes = "注册渠道对应的id")
-    private String[] channelId;
+    private List<String> channelId;
 
     /**
      * 归因推广账号

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

@@ -51,8 +51,8 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
 
     @Override
     public Page<GamePromoteDayVO> accountAgentDay(GamePromoteDayDTO dto) {
-        long[] userIds = dto.getSysUserId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getSysUserId()};
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> userIds = dto.getSysUserId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getSysUserId());
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
 
         /*Long sysUserId = SecurityUtil.isAdmin() ? null : SecurityUtil.getUserId();
         sysUserId = null == dto.getSysUserId() ? sysUserId : dto.getSysUserId();
@@ -72,7 +72,7 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
         SimpleCriteria cri = Cnd.cri();
         // 组装条件
         if (userIds != null) {
-            cri.where().andIn("pitcher_id", userIds);
+            cri.where().andInList("pitcher_id", userIds);
         }
         if (StringUtils.isNotBlank(dto.getAccountId())) {
             cri.where().andEquals("account_id", dto.getAccountId());
@@ -90,7 +90,7 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
             cri.where().andLike("game_name", dto.getGameName());
         }
         if (gameIds != null) {
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         if (StringUtils.isNotBlank(dto.getGameType())) {
             cri.where().andEquals("game_type", dto.getGameType());
@@ -243,8 +243,8 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
 
     @Override
     public GamePromoteDayTotalVO accountAgentDayTotal(GamePromoteDayTotalDTO dto) {
-        long[] userIds = dto.getSysUserId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getSysUserId()};
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> userIds = dto.getSysUserId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getSysUserId());
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
 
         /*Long sysUserId = SecurityUtil.isAdmin() ? null : SecurityUtil.getUserId();
         sysUserId = null == dto.getSysUserId() ? sysUserId : dto.getSysUserId();
@@ -257,7 +257,7 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
         SimpleCriteria cri = Cnd.cri();
         // 组装条件
         if (null != userIds) {
-            cri.where().andIn("pitcher_id", userIds);
+            cri.where().andInList("pitcher_id", userIds);
         }
         if (StringUtils.isNotBlank(dto.getAccountId())) {
             cri.where().andEquals("account_id", dto.getAccountId());
@@ -278,7 +278,7 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
             cri.where().andEquals("game_type", dto.getGameType());
         }
         if (gameIds != null) {
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         if (null != dto.getBeginDay()) {
             cri.where().and("dt", ">=", dto.getBeginDay());
@@ -450,8 +450,8 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
 
     @Override
     public Page<GamePromoteTotalVO> accountAgentTotal(GamePromoteTotalDTO dto) {
-        long[] userIds = dto.getSysUserId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getSysUserId()};
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> userIds = dto.getSysUserId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getSysUserId());
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
         /*Long sysUserId = SecurityUtil.isAdmin() ? null : SecurityUtil.getUserId();
         sysUserId = null == dto.getSysUserId() ? sysUserId : dto.getSysUserId();
         dto.setSysUserId(sysUserId);*/
@@ -474,7 +474,7 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
         SimpleCriteria cri = Cnd.cri();
         // 组装条件
         if (userIds != null) {
-            cri.where().andIn("a.pitcher_id", userIds);
+            cri.where().andInList("a.pitcher_id", userIds);
         }
         if (StringUtils.isNotBlank(dto.getAccountId())) {
             cri.where().andEquals("a.account_id", dto.getAccountId());
@@ -501,7 +501,7 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
             cri.where().and("a.dt", "<=", dto.getCostEndDay());
         }
         if (null != gameIds) {
-            cri.where().andIn("a.game_id", gameIds);
+            cri.where().andInList("a.game_id", gameIds);
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
             cri.where().andEquals("a.source_system", dto.getSourceSystem());
@@ -849,8 +849,8 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
 
     @Override
     public GamePromoteTotalSumVO accountAgentTotalSum(GamePromoteTotalSumDTO dto) {
-        long[] userIds = dto.getSysUserId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getSysUserId()};
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> userIds = dto.getSysUserId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getSysUserId());
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
         /*Long sysUserId = SecurityUtil.isAdmin() ? null : SecurityUtil.getUserId();
         sysUserId = null == dto.getSysUserId() ? sysUserId : dto.getSysUserId();
         dto.setSysUserId(sysUserId);*/
@@ -1131,11 +1131,11 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
         return gamePromoteTotalSumVO;
     }
 
-    private SimpleCriteria getSimpleCriteria(long[] userIds, long[] gameIds, GamePromoteTotalSumDTO dto) {
+    private SimpleCriteria getSimpleCriteria(List<Long> userIds, List<Long> gameIds, GamePromoteTotalSumDTO dto) {
         SimpleCriteria cri = Cnd.cri();
         // 组装条件
         if (null != userIds) {
-            cri.where().andIn("a.pitcher_id", userIds);
+            cri.where().andInList("a.pitcher_id", userIds);
         }
         if (StringUtils.isNotBlank(dto.getAccountId())) {
             cri.where().andEquals("a.account_id", dto.getAccountId());
@@ -1156,7 +1156,7 @@ public class AccountAgentDayServiceImpl implements IAccountAgentDayService {
             cri.where().andEquals("a.game_type", dto.getGameType());
         }
         if (null != gameIds) {
-            cri.where().andIn("a.game_id", gameIds);
+            cri.where().andInList("a.game_id", gameIds);
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
             cri.where().andEquals("a.source_system", dto.getSourceSystem());

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

@@ -24,6 +24,7 @@ import org.springframework.stereotype.Service;
 
 import java.math.BigDecimal;
 import java.math.RoundingMode;
+import java.util.Collections;
 import java.util.List;
 
 @Slf4j
@@ -37,8 +38,8 @@ public class AdsAccountRechargeRankingServiceImpl implements IAdsAccountRecharge
 
     @Override
     public Page<AdsAccountRechargeRankingVO> listOfPage(AdsAccountRechargeRankingListDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
-        long[] gameIds = dto.getPitcherId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
+        List<Long> gameIds = dto.getPitcherId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
         if (StringUtils.isBlank(dto.getSortFiled())) {
             dto.setSortFiled("cost");
         }
@@ -74,13 +75,13 @@ public class AdsAccountRechargeRankingServiceImpl implements IAdsAccountRecharge
             cri.where().and("dt", ">=", dto.getBeginDay()).and("dt", "<=", dto.getEndDay());
         }
         if (userIds != null) {
-            cri.where().andIn("pitcher_id", userIds);
+            cri.where().andInList("pitcher_id", userIds);
         }
         if (StringUtils.isNotBlank(dto.getAccountId())) {
             cri.where().and("account_id", "=", dto.getAccountId());
         }
         if (gameIds != null) {
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         if (StringUtils.isNotBlank(dto.getType())) {
             cri.where().and("type", "=", dto.getType());

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

@@ -25,6 +25,7 @@ import org.springframework.stereotype.Service;
 
 import java.math.BigDecimal;
 import java.math.RoundingMode;
+import java.util.Collections;
 import java.util.List;
 
 @Slf4j
@@ -37,7 +38,7 @@ public class AdsAgentRechargeRankingServiceImpl implements IAdsAgentRechargeRank
     private DataPowerComponent dataPowerComponent;
 
     public Page<AdsAgentRechargeRankingVO> listOfPage(AdsAgentRechargeRankingListDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
+        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
         if (StringUtils.isBlank(dto.getSortFiled())) {
             dto.setSortFiled("today_amount");
         }
@@ -64,7 +65,7 @@ public class AdsAgentRechargeRankingServiceImpl implements IAdsAgentRechargeRank
             cri.where().and("agent_id", "=", dto.getAgentId());
         }
         if (userIds != null) {
-            cri.where().andIn("pitcher_id", userIds);
+            cri.where().andInList("pitcher_id", userIds);
         }
         if (StringUtils.isNotBlank(dto.getType())) {
             cri.where().and("type", "=", dto.getType());

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

@@ -12,6 +12,7 @@ import com.zanxiang.game.data.serve.service.IAdsOrderDetailService;
 import com.zanxiang.game.data.serve.utils.Page;
 import com.zanxiang.module.util.bean.BeanUtil;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.lang3.ArrayUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.nutz.dao.Cnd;
@@ -23,6 +24,7 @@ import org.nutz.dao.sql.Sql;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.Collections;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -37,8 +39,8 @@ public class AdsOrderDetailService implements IAdsOrderDetailService {
 
     @Override
     public Page<AdsOrderDetailVO> listOfPage(AdsOrderDetailListDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{Long.parseLong(dto.getPitcherId())};
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{Long.parseLong(dto.getGameId())};
+        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(Long.parseLong(dto.getPitcherId()));
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(Long.parseLong(dto.getGameId()));
         if (StringUtils.isBlank(dto.getPitcherId()) && !SecurityUtil.isManager()) {
             // 只有管理员才能查看全部数据
             dto.setPitcherId(SecurityUtil.getUserId().toString());
@@ -67,16 +69,16 @@ public class AdsOrderDetailService implements IAdsOrderDetailService {
             cri.where().andEquals("server_name", dto.getServerName());
         }
         if (gameIds != null) {
-            cri.where().andIn("order_game_id", gameIds);
+            cri.where().andInList("order_game_id", gameIds);
         }
-        if (ArrayUtils.isNotEmpty(dto.getChannelId())) {
-            cri.where().andIn("agent_id", dto.getChannelId());
+        if (CollectionUtils.isNotEmpty(dto.getChannelId())) {
+            cri.where().andInStrList("agent_id", dto.getChannelId());
         }
         if (StringUtils.isNotBlank(dto.getAccountId())) {
             cri.where().andEquals("account_id", dto.getAccountId());
         }
         if (userIds != null) {
-            cri.where().andIn("zx_pitcher_id", userIds);
+            cri.where().andInList("zx_pitcher_id", userIds);
         }
         if (StringUtils.isNotBlank(dto.getDeviceSystem())) {
             cri.where().andEquals("os", dto.getDeviceSystem());
@@ -122,8 +124,8 @@ public class AdsOrderDetailService implements IAdsOrderDetailService {
             dto.setSortType(OrderByEnum.DESC.getOrderType());
         }
         if (StringUtils.isBlank(dto.getSortFiled())) {
-            cri.getOrderBy().orderBy("day", dto.getSortType());
-            cri.getOrderBy().orderBy("order_create_time", dto.getSortType());
+            cri.getOrderBy().orderBy("day", dto.getSortType())
+                    .orderBy("order_create_time", dto.getSortType());
         } else {
             cri.getOrderBy().orderBy(dto.getSortFiled(), dto.getSortType());
         }
@@ -134,8 +136,8 @@ public class AdsOrderDetailService implements IAdsOrderDetailService {
 
     @Override
     public AdsOrderDetailTotalVO orderTotal(AdsOrderDetailTotalDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{Long.parseLong(dto.getPitcherId())};
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{Long.parseLong(dto.getGameId())};
+        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(Long.parseLong(dto.getPitcherId()));
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(Long.parseLong(dto.getGameId()));
         /*if (StringUtils.isBlank(dto.getPitcherId()) && !SecurityUtil.isManager()) {
             // 只有管理员才能查看全部数据
             dto.setPitcherId(SecurityUtil.getUserId().toString());
@@ -163,7 +165,7 @@ public class AdsOrderDetailService implements IAdsOrderDetailService {
             cri.where().andEquals("server_name", dto.getServerName());
         }
         if (gameIds != null) {
-            cri.where().andIn("order_game_id", gameIds);
+            cri.where().andInList("order_game_id", gameIds);
         }
         if (ArrayUtils.isNotEmpty(dto.getChannelId())) {
             cri.where().andIn("agent_id", dto.getChannelId());
@@ -172,7 +174,7 @@ public class AdsOrderDetailService implements IAdsOrderDetailService {
             cri.where().andEquals("account_id", dto.getAccountId());
         }
         if (userIds != null) {
-            cri.where().andIn("zx_pitcher_id", userIds);
+            cri.where().andInList("zx_pitcher_id", userIds);
         }
         if (StringUtils.isNotBlank(dto.getDeviceSystem())) {
             cri.where().andEquals("os", dto.getDeviceSystem());

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

@@ -195,7 +195,7 @@ public class GameDataServiceImpl implements IGameDataService {
      */
     @Override
     public Page<GameDataDayVO> getGameDataDay(GameDataDayDTO dto) {
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
 
         //传入的注册时间为空时,给一个默认值 当天数据
         if (dto.getRegisteredBeginDate() == null || dto.getRegisteredEndDate() == null) {
@@ -210,7 +210,7 @@ public class GameDataServiceImpl implements IGameDataService {
         }
         if (gameIds != null) {
             //拼接游戏id查询条件
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         if (dto.getGameClassify() != null) {
             //拼接游戏类型查询条件
@@ -264,7 +264,7 @@ public class GameDataServiceImpl implements IGameDataService {
      * @return 返回给前端的总计数据实体
      */
     public GameDataDayTotalVO getGameDataDayTotal(GameDataDayTotalDTO dto) {
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
 
         //如果没有传入查询时间默认查询当天
         if (dto.getRegisteredBeginDate() == null || dto.getRegisteredEndDate() == null) {
@@ -275,7 +275,7 @@ public class GameDataServiceImpl implements IGameDataService {
         Criteria cri = Cnd.cri();
         if (gameIds != null) {
             //拼接游戏id
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         if (StringUtils.isNotBlank(dto.getGameName())) {
             //拼接游戏名称
@@ -316,7 +316,7 @@ public class GameDataServiceImpl implements IGameDataService {
      */
     @Override
     public Page<GameDataTotalVO> getGameDataTotal(GameDataTotalDTO dto) {
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
         //如果注册时间参数为空,默认设置查询当天数据
         if (dto.getRegisteredBeginDate() == null || dto.getRegisteredEndDate() == null) {
             dto.setRegisteredBeginDate(LocalDate.now());
@@ -534,7 +534,7 @@ public class GameDataServiceImpl implements IGameDataService {
      * @return 返回给前端额数据
      */
     public GameDataTotalTotalVO getGameDataTotalTotal(GameDataTotalTotalDTO dto) {
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
         //如果注册时间参数为空,默认设置查询当天数据
         if (dto.getRegisteredBeginDate() == null || dto.getRegisteredEndDate() == null) {
             dto.setRegisteredBeginDate(LocalDate.now());
@@ -976,7 +976,7 @@ public class GameDataServiceImpl implements IGameDataService {
      */
     @Override
     public Page<GameDataWaterVO> getGameDataWater(GameDataWaterDTO dto) {
-        long[] userGameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> userGameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
         if (null == dto.getRechargeDate()) {
             dto.setRechargeDate(LocalDate.now());
         }
@@ -1002,7 +1002,7 @@ public class GameDataServiceImpl implements IGameDataService {
             cri.where().andEquals("source_system", dto.getSourceSystem());
         }
         if (null != userGameIds) {
-            cri.where().andIn("game_id", userGameIds);
+            cri.where().andInList("game_id", userGameIds);
         }
         cri.where().and("dt", "=", dto.getRechargeDate());
         cri.groupBy("source_system,game_id");
@@ -1084,7 +1084,7 @@ public class GameDataServiceImpl implements IGameDataService {
      */
     @Override
     public Map<LocalDate, List<GameDataAgainDayVO>> getGameDataAgainDay(GameDataAgainDayDTO dto) {
-        long[] userGameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> userGameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
 
         //如果查询时间不传递默认从今天开始查询
         if (dto.getBeginDate() == null) {
@@ -1104,7 +1104,7 @@ public class GameDataServiceImpl implements IGameDataService {
             cri.where().andEquals("game_name", dto.getGameName());
         }
         if (userGameIds != null) {
-            cri.where().andIn("game_id", userGameIds);
+            cri.where().andInList("game_id", userGameIds);
         }
         if (dto.getBeginDate() != null) {
             cri.where().andEquals("dt", dto.getBeginDate());
@@ -1349,7 +1349,7 @@ public class GameDataServiceImpl implements IGameDataService {
      * @param needGroupBy 是否需要分组条件
      * @return 查询条件
      */
-    private Criteria myCri(long[] gameIds, GameDataTotalDTO dto, String type, Boolean needGroupBy) {
+    private Criteria myCri(List<Long> gameIds, GameDataTotalDTO dto, String type, Boolean needGroupBy) {
         //根据传入的dto拼接查询参数
         Criteria cri = Cnd.cri();
         if (StringUtils.isNotBlank(dto.getGameName())) {
@@ -1358,7 +1358,7 @@ public class GameDataServiceImpl implements IGameDataService {
         }
         if (gameIds != null) {
             //拼接游戏id查询条件
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         if (dto.getGameClassify() != null) {
             //拼接游戏类型查询条件
@@ -1395,12 +1395,12 @@ public class GameDataServiceImpl implements IGameDataService {
      * @param needRegTime 是否需要拼接注册时间
      * @return 查询条件
      */
-    private Criteria myCriRecharge(long[] gameIds, GameDataTotalDTO dto, Boolean needRegTime) {
+    private Criteria myCriRecharge(List<Long> gameIds, GameDataTotalDTO dto, Boolean needRegTime) {
         //根据传入的dto拼接查询参数
         Criteria cri = Cnd.cri();
         if (gameIds != null) {
             //拼接游戏id查询条件
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         if (dto.getGameClassify() != null) {
             //拼接游戏类型查询条件
@@ -1429,12 +1429,12 @@ public class GameDataServiceImpl implements IGameDataService {
      * @param dto 前端传递的查询条件
      * @return 查询条件
      */
-    private Criteria myCriRole(long[] gameIds, GameDataTotalDTO dto) {
+    private Criteria myCriRole(List<Long> gameIds, GameDataTotalDTO dto) {
         //根据传入的dto拼接查询参数
         Criteria cri = Cnd.cri();
         if (gameIds != null) {
             //拼接游戏id查询条件
-            cri.where().andIn("user_game_id", gameIds);
+            cri.where().andInList("user_game_id", gameIds);
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
             //拼接SDK来源
@@ -3067,7 +3067,7 @@ public class GameDataServiceImpl implements IGameDataService {
 
     @Override
     public Page<GameDataH5VO> getH5Recharge(GameDataH5DTO dto) {
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
         if (null == dto.getCostBeginDate() || null == dto.getCostEndDate()) {
             dto.setCostEndDate(LocalDate.now());
             dto.setCostBeginDate(LocalDate.now());
@@ -3092,7 +3092,7 @@ public class GameDataServiceImpl implements IGameDataService {
             cri.where().andEquals("a.source_system", dto.getSourceSystem());
         }
         if (null != gameIds) {
-            cri.where().andIn("a.game_id", gameIds);
+            cri.where().andInList("a.game_id", gameIds);
         }
         cri.where().and("a.dt", ">=", dto.getCostBeginDate()).and("a.dt", "<=", dto.getCostEndDate());
         cri.where().andEquals("a.id", 1);
@@ -3226,7 +3226,7 @@ public class GameDataServiceImpl implements IGameDataService {
      */
     @Override
     public Page<LtvDataVO> getLtvData(LtvDataDTO dto) {
-        long[] userGameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> userGameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
         if (dto.getRegisteredBeginDate() == null || dto.getRegisteredEndDate() == null) {
             //查询时间不传递默认传递当天
             dto.setRegisteredBeginDate(LocalDate.now());
@@ -3240,7 +3240,7 @@ public class GameDataServiceImpl implements IGameDataService {
         Criteria cri = Cnd.cri();
         //拼接游戏ID
         if (userGameIds != null) {
-            cri.where().andIn("game_id", userGameIds);
+            cri.where().andInList("game_id", userGameIds);
         }
         //拼接游戏应用类型
         if (dto.getClassify() != null) {
@@ -3292,7 +3292,7 @@ public class GameDataServiceImpl implements IGameDataService {
      */
     @Override
     public LtvDataTotalVO getLtvTotalData(LtvDataTotalDTO dto) {
-        long[] userGameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> userGameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
         //如果没有传入查询时间默认查询当天
         if (dto.getRegisteredBeginDate() == null || dto.getRegisteredEndDate() == null) {
             dto.setRegisteredBeginDate(LocalDate.now());
@@ -3306,7 +3306,7 @@ public class GameDataServiceImpl implements IGameDataService {
         Criteria cri = Cnd.cri();
         if (userGameIds != null) {
             //拼接游戏id
-            cri.where().andIn("game_id", userGameIds);
+            cri.where().andInList("game_id", userGameIds);
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
             //拼接SDK来源
@@ -3353,7 +3353,7 @@ public class GameDataServiceImpl implements IGameDataService {
      */
     @Override
     public Page<GameDataFirstNewUserAgainVO> getFirstNewUserAgain(GameDataFirstNewUserAgainDTO dto) {
-        long[] userGameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> userGameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
         if (dto.getRegisteredBeginDate() == null || dto.getRegisteredEndDate() == null) {
             //查询时间不传递默认传递当天
             dto.setRegisteredBeginDate(LocalDate.now());
@@ -3367,7 +3367,7 @@ public class GameDataServiceImpl implements IGameDataService {
         Criteria cri = Cnd.cri();
         //拼接游戏ID
         if (userGameIds != null) {
-            cri.where().andIn("game_id", userGameIds);
+            cri.where().andInList("game_id", userGameIds);
         }
         //拼接游戏应用类型
         if (dto.getClassify() != null) {
@@ -3437,7 +3437,7 @@ public class GameDataServiceImpl implements IGameDataService {
      */
     @Override
     public GameDataFirstNewUserAgainTotalVO getFirstNewUserAgainTotal(GameDataFirstNewUserAgainTotalDTO dto) {
-        long[] userGameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> userGameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
         //如果没有传入查询时间默认查询当天
         if (dto.getRegisteredBeginDate() == null || dto.getRegisteredEndDate() == null) {
             dto.setRegisteredBeginDate(LocalDate.now());
@@ -3451,7 +3451,7 @@ public class GameDataServiceImpl implements IGameDataService {
         Criteria cri = Cnd.cri();
         if (userGameIds != null) {
             //拼接游戏id
-            cri.where().andIn("game_id", userGameIds);
+            cri.where().andInList("game_id", userGameIds);
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
             //拼接SDK来源

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

@@ -128,13 +128,13 @@ public class GameServerServiceImpl implements IGameServerService {
      */
     @Override
     public Page<GameServerDayVO> getGameServerDataDay(GameServerDayDTO dto) {
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
 
         //创建查询条件
         Criteria cri = Cnd.cri();
         if (gameIds != null) {
             //拼接游戏ID查询条件
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         if (dto.getServerId() != null) {
             //拼接区服ID查询条件
@@ -192,12 +192,12 @@ public class GameServerServiceImpl implements IGameServerService {
      */
     @Override
     public GameServerDayTotalVO getGameServerDataDayTotal(GameServerDayTotalDTO dto) {
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
         //创建查询条件
         Criteria cri = Cnd.cri();
         if (gameIds != null) {
             //拼接游戏ID查询条件
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         if (dto.getServerId() != null) {
             //拼接区服ID查询条件

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

@@ -126,7 +126,7 @@ public class IActiveDataServiceImpl implements IActiveDataService {
      */
     @Override
     public Page<ActiveDataDayVO> getActiveDataDay(ActiveDataDayDTO dto) {
-        long[] userGameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> userGameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
         //默认查询总数据
         if (StringUtils.isBlank(dto.getTableTypes())) {
             dto.setTableTypes("total");
@@ -156,7 +156,7 @@ public class IActiveDataServiceImpl implements IActiveDataService {
         Criteria cri = Cnd.cri();
         //拼接游戏ID
         if (userGameIds != null) {
-            cri.where().andIn("game_id", userGameIds);
+            cri.where().andInList("game_id", userGameIds);
         }
         //拼接游戏应用类型
         if (dto.getClassify() != null) {
@@ -217,7 +217,7 @@ public class IActiveDataServiceImpl implements IActiveDataService {
      */
     @Override
     public ActiveDataTotalVO getActiveDataTotal(ActiveDataTotalDTO dto) {
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
         //默认查询总数据
         if (StringUtils.isBlank(dto.getTableTypes())) {
             dto.setTableTypes("total");
@@ -236,7 +236,7 @@ public class IActiveDataServiceImpl implements IActiveDataService {
         Criteria cri = Cnd.cri();
         //拼接游戏ID
         if (gameIds != null) {
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         //拼接游戏应用类型
         if (dto.getClassify() != null) {

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

@@ -150,15 +150,15 @@ public class IMediaDataServiceImpl implements IMediaDataService {
     @Override
     public Page<PitcherGameMediaDataDayVO> getPitcherGameMediaDataDay(PitcherGameMediaDataDayDTO dto) {
         //添加权限
-        long[] pitcherIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
-        long[] gameIds = StringUtils.isBlank(dto.getGameId()) ? dataPowerComponent.getSubGameIdList() : new long[]{Long.parseLong(dto.getGameId())};
+        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()));
         //创建查询条件
         Criteria cri = Cnd.cri();
         if (dto.getPitcherId() != null) {
-            cri.where().andIn("pitcher_id", pitcherIds);
+            cri.where().andInList("pitcher_id", pitcherIds);
         }
         if (StringUtils.isNotBlank(dto.getGameId())) {
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
             cri.where().andEquals("source_system", dto.getSourceSystem());
@@ -217,15 +217,15 @@ public class IMediaDataServiceImpl implements IMediaDataService {
     @Override
     public PitcherGameMediaDataDayVO getPitcherGameMediaDataDayTotal(PitcherGameMediaDataDayTotalDTO dto) {
         //添加权限
-        long[] pitcherIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
-        long[] gameIds = StringUtils.isBlank(dto.getGameId()) ? dataPowerComponent.getSubGameIdList() : new long[]{Long.parseLong(dto.getGameId())};
+        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()));
         //创建查询条件
         Criteria cri = Cnd.cri();
         if (dto.getPitcherId() != null) {
-            cri.where().andIn("pitcher_id", pitcherIds);
+            cri.where().andInList("pitcher_id", pitcherIds);
         }
         if (StringUtils.isNotBlank(dto.getGameId())) {
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
             cri.where().andEquals("source_system", dto.getSourceSystem());
@@ -285,11 +285,11 @@ public class IMediaDataServiceImpl implements IMediaDataService {
     @Override
     public Page<PitcherMediaDataDayVO> getPitcherMediaDataDay(PitcherMediaDataDayDTO dto) {
         //添加权限
-        long[] pitcherIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
+        List<Long> pitcherIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
         //创建查询条件
         Criteria cri = Cnd.cri();
         if (dto.getPitcherId() != null) {
-            cri.where().andIn("pitcher_id", pitcherIds);
+            cri.where().andInList("pitcher_id", pitcherIds);
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
             cri.where().andEquals("source_system", dto.getSourceSystem());
@@ -342,11 +342,11 @@ public class IMediaDataServiceImpl implements IMediaDataService {
     @Override
     public PitcherMediaDataDayVO getPitcherMediaDataDayTotal(PitcherMediaDataDayTotalDTO dto) {
         //添加权限
-        long[] pitcherIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
+        List<Long> pitcherIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
         //创建查询条件
         Criteria cri = Cnd.cri();
         if (dto.getPitcherId() != null) {
-            cri.where().andIn("pitcher_id", pitcherIds);
+            cri.where().andInList("pitcher_id", pitcherIds);
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
             cri.where().andEquals("source_system", dto.getSourceSystem());
@@ -400,11 +400,11 @@ public class IMediaDataServiceImpl implements IMediaDataService {
     @Override
     public Page<GameMediaDataDayVO> getGameMediaDataDay(GameMediaDataDayDTO dto) {
         //添加权限
-        long[] gameIds = StringUtils.isBlank(dto.getGameId()) ? dataPowerComponent.getSubGameIdList() : new long[]{Long.parseLong(dto.getGameId())};
+        List<Long> gameIds = StringUtils.isBlank(dto.getGameId()) ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(Long.parseLong(dto.getGameId()));
         //创建查询条件
         Criteria cri = Cnd.cri();
         if (StringUtils.isNotBlank(dto.getGameId())) {
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
             cri.where().andEquals("source_system", dto.getSourceSystem());
@@ -463,11 +463,11 @@ public class IMediaDataServiceImpl implements IMediaDataService {
     @Override
     public GameMediaDataDayVO getGameMediaDataDayTotal(GameMediaDataDayTotalDTO dto) {
         //添加权限
-        long[] gameIds = StringUtils.isBlank(dto.getGameId()) ? dataPowerComponent.getSubGameIdList() : new long[]{Long.parseLong(dto.getGameId())};
+        List<Long> gameIds = StringUtils.isBlank(dto.getGameId()) ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(Long.parseLong(dto.getGameId()));
         //创建查询条件
         Criteria cri = Cnd.cri();
         if (StringUtils.isNotBlank(dto.getGameId())) {
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
             cri.where().andEquals("source_system", dto.getSourceSystem());

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

@@ -24,6 +24,7 @@ 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;
@@ -50,8 +51,8 @@ public class OverallSummaryServiceImpl implements IOverallSummaryService {
      */
     @Override
     public OverallSummaryVO getOverallSummaryTotalData(OverallSummaryDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
 
         //创建返回给前端的对象
         OverallSummaryVO overallSummaryVO = new OverallSummaryVO();
@@ -149,8 +150,8 @@ public class OverallSummaryServiceImpl implements IOverallSummaryService {
      */
     @Override
     public Map<String, List> getOverallSummaryLineData(OverallSummaryDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
 
         //根据条件获取数据
         Condition lineCon = myCondition(userIds, gameIds, dto, true, true, -1);
@@ -213,13 +214,13 @@ public class OverallSummaryServiceImpl implements IOverallSummaryService {
      * @param queryDays     拼接需要查询数据的天数条件(给今日昨日、首日Roi、7日Roi以及30日Roi使用)
      * @return Condition 查询条件
      */
-    private Condition myCondition(long[] userIds, long[] gameIds, OverallSummaryDTO dto, Boolean needGameId, Boolean needLocalDate, Integer queryDays) {
+    private Condition myCondition(List<Long> userIds, List<Long> gameIds, OverallSummaryDTO dto, Boolean needGameId, Boolean needLocalDate, Integer queryDays) {
 
         Criteria cri = Cnd.cri();
         //默认查询条件
         if (gameIds != null && needGameId) {
             //拼接游戏查询条件
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         if (dto.getAgentId() != null) {
             //拼接渠道查询条件
@@ -236,13 +237,7 @@ public class OverallSummaryServiceImpl implements IOverallSummaryService {
         //前端传递 pitcherId 根据 pitcherId 查询
         if (userIds != null) {
             //拼接投手查询条件
-            cri.where().andIn("pitcher_id", userIds);
-        } else if (SecurityUtil.isManager()) {
-            //前端没有传递 pitcherId 参数并且是管理员 查看所有数据 排除掉 pitcherId = -2 的数据
-            cri.where().andNotEquals("pitcher_id", -2);
-        } else {
-            //前端没有传递 pitcherId 并且不是管理员 只能看自己的数据
-            cri.where().andEquals("pitcher_id", SecurityUtil.getUserId());
+            cri.where().andInList("pitcher_id", userIds);
         }
 
         //根据参数拼接条件

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

@@ -202,7 +202,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
      */
     @Override
     public Page<PitcherDataDayVO> getPitcherDataDay(PitcherDataDayDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
+        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
         //不传递时间,默认查询当天
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
             dto.setBeginDate(LocalDate.now());
@@ -211,7 +211,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
         //创建查询条件
         Criteria cri = Cnd.cri();
         if (userIds != null) {
-            cri.where().andIn("pitcher_id", userIds);
+            cri.where().andInList("pitcher_id", userIds);
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
             cri.where().andEquals("source_system", dto.getSourceSystem());
@@ -260,7 +260,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
      */
     @Override
     public PitcherDataDayTotalVO getPitcherDataDayTotal(PitcherDataDayTotalDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
+        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
         //不传递时间,默认查询当天
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
             dto.setBeginDate(LocalDate.now());
@@ -269,7 +269,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
         //创建查询条件
         Criteria cri = Cnd.cri();
         if (userIds != null) {
-            cri.where().andIn("pitcher_id", userIds);
+            cri.where().andInList("pitcher_id", userIds);
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
             cri.where().andEquals("source_system", dto.getSourceSystem());
@@ -301,7 +301,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
      */
     @Override
     public Page<PitcherDataTotalVO> getPitcherDataTotal(PitcherDataTotalDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
+        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
         //如果注册时间参数为空,默认设置查询当天数据
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
             dto.setBeginDate(LocalDate.now());
@@ -392,7 +392,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
      */
     @Override
     public PitcherDataTotalSumVO getPitcherDataTotalSum(PitcherDataTotalSumDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
+        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
         //如果注册时间参数为空,默认设置查询当天数据
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
             dto.setBeginDate(LocalDate.now());
@@ -482,8 +482,8 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
      */
     @Override
     public Page<PitcherGameDataDayVO> getPitcherGameDataDay(PitcherGameDataDayDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{Long.parseLong(dto.getGameId())};
+        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()));
         //不传递时间,默认查询当天
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
             dto.setBeginDate(LocalDate.now());
@@ -492,10 +492,10 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
         //创建查询条件
         Criteria cri = Cnd.cri();
         if (userIds != null) {
-            cri.where().andIn("pitcher_id", userIds);
+            cri.where().andInList("pitcher_id", userIds);
         }
         if (gameIds != null) {
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
             cri.where().andEquals("source_system", dto.getSourceSystem());
@@ -551,8 +551,8 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
      */
     @Override
     public PitcherGameDataDayTotalVO getPitcherGameDataDayTotal(PitcherGameDataDayTotalDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{Long.parseLong(dto.getGameId())};
+        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()));
         //不传递时间,默认查询当天
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
             dto.setBeginDate(LocalDate.now());
@@ -561,10 +561,10 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
         //创建查询条件
         Criteria cri = Cnd.cri();
         if (userIds != null) {
-            cri.where().andIn("pitcher_id", userIds);
+            cri.where().andInList("pitcher_id", userIds);
         }
         if (gameIds != null) {
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
             cri.where().andEquals("source_system", dto.getSourceSystem());
@@ -602,8 +602,8 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
      */
     @Override
     public Page<PitcherGameDataTotalVO> getPitcherGameDataTotal(PitcherGameDataTotalDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{Long.parseLong(dto.getGameId())};
+        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()));
         //如果注册时间参数为空,默认设置查询当天数据
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
             dto.setBeginDate(LocalDate.now());
@@ -700,8 +700,8 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
      */
     @Override
     public PitcherGameDataTotalSumVO getPitcherGameDataTotalSum(PitcherGameDataTotalSumDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{Long.parseLong(dto.getGameId())};
+        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()));
         //如果注册时间参数为空,默认设置查询当天数据
         if (dto.getBeginDate() == null || dto.getEndDate() == null) {
             dto.setBeginDate(LocalDate.now());
@@ -1031,12 +1031,12 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
      * @param needGroupBy 是否需要分组条件
      * @return 查询条件
      */
-    private Criteria myCri(long[] userIds, long[] gameIds, PitcherGameDataTotalDTO dto, String type, Boolean needGroupBy) {
+    private Criteria myCri(List<Long> userIds, List<Long> gameIds, PitcherGameDataTotalDTO dto, String type, Boolean needGroupBy) {
         //根据传入的dto拼接查询参数
         Criteria cri = Cnd.cri();
         if (gameIds != null) {
             //拼接游戏id查询条件
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         if (StringUtils.isNotBlank(dto.getGameCp())) {
             //拼接游戏cp方
@@ -1052,7 +1052,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
         }
         if (userIds != null) {
             //拼接投手ID
-            cri.where().andIn("pitcher_id", userIds);
+            cri.where().andInList("pitcher_id", userIds);
         }
         //根据type拼接不同的时间查询条件
         if (type.equals("criA")) {
@@ -1166,7 +1166,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
      * @param needGroupBy 是否需要分组条件
      * @return 查询条件
      */
-    private Criteria myCriPitcher(long[] userIds, PitcherDataTotalDTO dto, String type, Boolean needGroupBy) {
+    private Criteria myCriPitcher(List<Long> userIds, PitcherDataTotalDTO dto, String type, Boolean needGroupBy) {
         //根据传入的dto拼接查询参数
         Criteria cri = Cnd.cri();
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
@@ -1175,7 +1175,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
         }
         if (userIds != null) {
             //拼接投手ID
-            cri.where().andIn("pitcher_id", userIds);
+            cri.where().andInList("pitcher_id", userIds);
         }
         //根据type拼接不同的时间查询条件
         if (type.equals("criA")) {
@@ -1204,7 +1204,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
      * @param needRegTime 是否需要拼接注册时间
      * @return 查询条件
      */
-    private Criteria myCriRechargePitcher(long[] userIds, PitcherDataTotalDTO dto, Boolean needRegTime) {
+    private Criteria myCriRechargePitcher(List<Long> userIds, PitcherDataTotalDTO dto, Boolean needRegTime) {
         //根据传入的dto拼接查询参数
         Criteria cri = Cnd.cri();
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
@@ -1213,7 +1213,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
         }
         if (userIds != null) {
             //拼接投手ID
-            cri.where().andIn("pitcher_id", userIds);
+            cri.where().andInList("pitcher_id", userIds);
         }
         //拼接不同的时间查询条件
         if (needRegTime && dto.getBeginDate() != null && dto.getEndDate() != null) {
@@ -1234,7 +1234,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
      * @param dto 前端传递的查询条件
      * @return 查询条件
      */
-    private Criteria myCriRolePitcher(long[] userIds, PitcherDataTotalDTO dto) {
+    private Criteria myCriRolePitcher(List<Long> userIds, PitcherDataTotalDTO dto) {
         //根据传入的dto拼接查询参数
         Criteria cri = Cnd.cri();
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
@@ -1243,7 +1243,7 @@ public class PitcherDataServiceImpl implements IPitcherDataService {
         }
         if (userIds != null) {
             //拼接投手ID
-            cri.where().andIn("user_zx_pitcher_id", userIds);
+            cri.where().andInList("user_zx_pitcher_id", userIds);
         }
         if (dto.getBeginDate() != null && dto.getEndDate() != null) {
             //拼接注册日期查询条件

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

@@ -52,8 +52,8 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
      * @return
      */
     public Page<PromotionDayVO> getPromotionDayListData(PromotionDayDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
         //如果没有排序条件给默认值
         if (StringUtils.isBlank(dto.getSortFiled())) {
             dto.setSortFiled("dt");
@@ -138,8 +138,8 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
      */
     @Override
     public Page<PromotionDayVO> getPromotionDayData(PromotionDayDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
         //如果没有排序条件给默认值
         if (StringUtils.isBlank(dto.getSortFiled())) {
             dto.setSortFiled("today_cost");
@@ -220,8 +220,8 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
      */
     @Override
     public PromotionDayTotalVO getPromotionDayTotalData(PromotionDayTotalDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
         //创建查询条件
         Criteria cri = Cnd.cri();
         if (dto.getAccountId() != null) {
@@ -237,7 +237,7 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
             cri.where().andEquals("account_type", dto.getAccountType());
         }
         if (userIds != null) {
-            cri.where().andIn("pitcher_id", userIds);
+            cri.where().andInList("pitcher_id", userIds);
         }
         if (dto.getAgentId() != null) {
             cri.where().andInList("agent_id", Arrays.asList(dto.getAgentId()));
@@ -246,7 +246,7 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
             cri.where().andEquals("cp_name", dto.getCpName());
         }
         if (gameIds != null) {
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         if (dto.getClassify() != null) {
             cri.where().andEquals("classify", dto.getClassify());
@@ -403,8 +403,8 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
      * @return
      */
     public Page<TencentPromotionDayVO> getTencentPromotionDayListData(TencentPromotionDayDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
         //如果没有排序条件给默认值
         if (StringUtils.isBlank(dto.getSortFiled())) {
             dto.setSortFiled("dt");
@@ -489,8 +489,8 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
      */
     @Override
     public Page<TencentPromotionDayVO> getTencentPromotionDayData(TencentPromotionDayDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
         //如果没有排序条件给默认值
         if (StringUtils.isBlank(dto.getSortFiled())) {
             dto.setSortFiled("today_cost");
@@ -571,8 +571,8 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
      */
     @Override
     public TencentPromotionDayTotalVO getTencentPromotionDayTotalData(TencentPromotionDayTotalDTO dto) {
-        long[] userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : new long[]{dto.getPitcherId()};
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> userIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
         //创建查询条件
         Criteria cri = Cnd.cri();
         if (dto.getAccountId() != null) {
@@ -588,7 +588,7 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
             cri.where().andEquals("account_type", dto.getAccountType());
         }
         if (userIds != null) {
-            cri.where().andIn("pitcher_id", userIds);
+            cri.where().andInList("pitcher_id", userIds);
         }
         if (dto.getAgentId() != null) {
             cri.where().andInList("agent_id", Arrays.asList(dto.getAgentId()));
@@ -597,7 +597,7 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
             cri.where().andEquals("cp_name", dto.getCpName());
         }
         if (gameIds != null) {
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         if (dto.getClassify() != null) {
             cri.where().andEquals("classify", dto.getClassify());
@@ -754,7 +754,7 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
      * @param needGroupBy 需要聚合分组
      * @return 查询条件
      */
-    private Criteria myCri(long[] userIds, long[] gameIds, PromotionDayDTO dto, Boolean needGroupBy) {
+    private Criteria myCri(List<Long> userIds, List<Long> gameIds, PromotionDayDTO dto, Boolean needGroupBy) {
         //创建查询条件
         Criteria cri = Cnd.cri();
         if (dto.getAccountId() != null) {
@@ -770,7 +770,7 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
             cri.where().andEquals("account_type", dto.getAccountType());
         }
         if (userIds != null) {
-            cri.where().andIn("pitcher_id", userIds);
+            cri.where().andInList("pitcher_id", userIds);
         }
         if (dto.getAgentId() != null) {
             cri.where().andInList("agent_id", Arrays.asList(dto.getAgentId()));
@@ -779,7 +779,7 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
             cri.where().andEquals("cp_name", dto.getCpName());
         }
         if (gameIds != null) {
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         if (dto.getClassify() != null) {
             cri.where().andEquals("classify", dto.getClassify());
@@ -820,7 +820,7 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
      * @param needGroupBy 需要聚合分组
      * @return 查询条件
      */
-    private Criteria myCriTencent(long[] userIds, long[] gameIds, TencentPromotionDayDTO dto, Boolean needGroupBy) {
+    private Criteria myCriTencent(List<Long> userIds, List<Long> gameIds, TencentPromotionDayDTO dto, Boolean needGroupBy) {
         //创建查询条件
         Criteria cri = Cnd.cri();
         if (dto.getAccountId() != null) {
@@ -836,7 +836,7 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
             cri.where().andEquals("account_type", dto.getAccountType());
         }
         if (userIds != null) {
-            cri.where().andIn("pitcher_id", userIds);
+            cri.where().andInList("pitcher_id", userIds);
         }
         if (dto.getAgentId() != null) {
             cri.where().andInList("agent_id", Arrays.asList(dto.getAgentId()));
@@ -845,7 +845,7 @@ public class PromotionDayServiceImpl implements IAdsPromotionDayService {
             cri.where().andEquals("cp_name", dto.getCpName());
         }
         if (gameIds != null) {
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         if (dto.getClassify() != null) {
             cri.where().andEquals("classify", dto.getClassify());

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

@@ -21,6 +21,9 @@ import org.nutz.dao.util.cri.SimpleCriteria;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.util.Collections;
+import java.util.List;
+
 @Service
 @Slf4j
 public class RankingServiceImpl implements IRankingService {
@@ -31,7 +34,7 @@ public class RankingServiceImpl implements IRankingService {
 
     @Override
     public Page<GameRechargeRankingVO> gameRanking(RechargeRankingDTO dto) {
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
         if (StringUtils.isBlank(dto.getSortFiled())){
             dto.setSortFiled("totalAmount");
         }
@@ -45,7 +48,7 @@ public class RankingServiceImpl implements IRankingService {
             cri.where().and("dt",">=",dto.getBeginDay()).and("dt","<=",dto.getEndDay());
         }
         if(gameIds != null) {
-            cri.where().andIn("game_id", gameIds);
+            cri.where().andInList("game_id", gameIds);
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
             cri.where().andEquals("source_system", dto.getSourceSystem());
@@ -91,7 +94,7 @@ public class RankingServiceImpl implements IRankingService {
 
     @Override
     public Page<PlayerRechargeRankingVO> playerRanking(RechargeRankingDTO dto) {
-        long[] gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : new long[]{dto.getGameId()};
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(dto.getGameId());
         if (StringUtils.isBlank(dto.getSortFiled())){
             dto.setSortFiled("totalAmount");
         }
@@ -105,7 +108,7 @@ public class RankingServiceImpl implements IRankingService {
             cri.where().and("dt",">=",dto.getBeginDay()).and("dt","<=",dto.getEndDay());
         }
         if(gameIds != null) {
-            cri.where().andIn("reg_game_id", gameIds);
+            cri.where().andInList("reg_game_id", gameIds);
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
             cri.where().andEquals("source_system", dto.getSourceSystem());