Browse Source

修改内容:订单游戏筛选改为多选;媒体数据加权限

lth 1 year ago
parent
commit
ef6e363d06

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

@@ -64,7 +64,7 @@ public class AdsOrderDetailListDTO extends BasePage {
      * 充值游戏id
      */
     @ApiModelProperty(notes = "充值游戏id")
-    private String gameId;
+    private List<Long> gameId;
 
     /**
      * 注册渠道对应的id --> agentId

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

@@ -6,6 +6,7 @@ import lombok.Data;
 import org.springframework.format.annotation.DateTimeFormat;
 
 import java.time.LocalDate;
+import java.util.List;
 
 @Data
 public class AdsOrderDetailTotalDTO {
@@ -62,13 +63,13 @@ public class AdsOrderDetailTotalDTO {
      * 充值游戏id
      */
     @ApiModelProperty(notes = "充值游戏id")
-    private String gameId;
+    private List<Long> gameId;
 
     /**
      * 注册渠道对应的id --> agentId
      */
     @ApiModelProperty(notes = "注册渠道对应的id")
-    private String[] channelId;
+    private List<String> channelId;
 
     /**
      * 归因推广账号

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

@@ -13,7 +13,6 @@ 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;
 import org.nutz.dao.Dao;
@@ -40,7 +39,7 @@ public class AdsOrderDetailService implements IAdsOrderDetailService {
     @Override
     public Page<AdsOrderDetailVO> listOfPage(AdsOrderDetailListDTO dto) {
         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()));
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : dto.getGameId();
         if (StringUtils.isBlank(dto.getPitcherId()) && !SecurityUtil.isManager()) {
             // 只有管理员才能查看全部数据
             dto.setPitcherId(SecurityUtil.getUserId().toString());
@@ -137,7 +136,7 @@ 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 = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(Long.parseLong(dto.getGameId()));
+        List<Long> gameIds = dto.getGameId() == null ? dataPowerComponent.getSubGameIdList() : dto.getGameId();
         /*if (StringUtils.isBlank(dto.getPitcherId()) && !SecurityUtil.isManager()) {
             // 只有管理员才能查看全部数据
             dto.setPitcherId(SecurityUtil.getUserId().toString());
@@ -167,8 +166,8 @@ public class AdsOrderDetailService implements IAdsOrderDetailService {
         if (gameIds != null) {
             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());

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

@@ -160,10 +160,10 @@ public class IMediaDataServiceImpl implements IMediaDataService {
         List<Long> gameIds = StringUtils.isBlank(dto.getGameId()) ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(Long.parseLong(dto.getGameId()));
         //创建查询条件
         Criteria cri = Cnd.cri();
-        if (dto.getPitcherId() != null) {
+        if (pitcherIds != null) {
             cri.where().andInList("pitcher_id", pitcherIds);
         }
-        if (StringUtils.isNotBlank(dto.getGameId())) {
+        if (gameIds != null) {
             cri.where().andInList("game_id", gameIds);
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
@@ -227,10 +227,10 @@ public class IMediaDataServiceImpl implements IMediaDataService {
         List<Long> gameIds = StringUtils.isBlank(dto.getGameId()) ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(Long.parseLong(dto.getGameId()));
         //创建查询条件
         Criteria cri = Cnd.cri();
-        if (dto.getPitcherId() != null) {
+        if (pitcherIds != null) {
             cri.where().andInList("pitcher_id", pitcherIds);
         }
-        if (StringUtils.isNotBlank(dto.getGameId())) {
+        if (gameIds != null) {
             cri.where().andInList("game_id", gameIds);
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
@@ -460,7 +460,7 @@ public class IMediaDataServiceImpl implements IMediaDataService {
         List<Long> pitcherIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
         //创建查询条件
         Criteria cri = Cnd.cri();
-        if (dto.getPitcherId() != null) {
+        if (pitcherIds != null) {
             cri.where().andInList("pitcher_id", pitcherIds);
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
@@ -517,7 +517,7 @@ public class IMediaDataServiceImpl implements IMediaDataService {
         List<Long> pitcherIds = dto.getPitcherId() == null ? dataPowerComponent.getSubUserIdList() : Collections.singletonList(dto.getPitcherId());
         //创建查询条件
         Criteria cri = Cnd.cri();
-        if (dto.getPitcherId() != null) {
+        if (pitcherIds != null) {
             cri.where().andInList("pitcher_id", pitcherIds);
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
@@ -739,7 +739,7 @@ public class IMediaDataServiceImpl implements IMediaDataService {
         List<Long> gameIds = StringUtils.isBlank(dto.getGameId()) ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(Long.parseLong(dto.getGameId()));
         //创建查询条件
         Criteria cri = Cnd.cri();
-        if (StringUtils.isNotBlank(dto.getGameId())) {
+        if (gameIds != null) {
             cri.where().andInList("game_id", gameIds);
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
@@ -802,7 +802,7 @@ public class IMediaDataServiceImpl implements IMediaDataService {
         List<Long> gameIds = StringUtils.isBlank(dto.getGameId()) ? dataPowerComponent.getSubGameIdList() : Collections.singletonList(Long.parseLong(dto.getGameId()));
         //创建查询条件
         Criteria cri = Cnd.cri();
-        if (StringUtils.isNotBlank(dto.getGameId())) {
+        if (gameIds != null) {
             cri.where().andInList("game_id", gameIds);
         }
         if (StringUtils.isNotBlank(dto.getSourceSystem())) {
@@ -1454,7 +1454,7 @@ public class IMediaDataServiceImpl implements IMediaDataService {
             //拼接注册时间查询条件
             cri.where().andBetween("dt", dto.getBeginDate(), dto.getEndDate());
         }
-        if (StringUtils.isNotBlank(dto.getGameId())) {
+        if (gameIds != null) {
             //拼接游戏ID查询条件
             cri.where().andInList("game_id", gameIds);
         }
@@ -1462,7 +1462,7 @@ public class IMediaDataServiceImpl implements IMediaDataService {
             //拼接SDK来源查询条件
             cri.where().andEquals("source_system", dto.getSourceSystem());
         }
-        if (dto.getPitcherId() != null) {
+        if (pitcherIds != null) {
             cri.where().andInList("pitcher_id", pitcherIds);
         }
         if (StringUtils.isNotBlank(dto.getAccountType())) {
@@ -1532,7 +1532,7 @@ public class IMediaDataServiceImpl implements IMediaDataService {
             //拼接SDK来源查询条件
             cri.where().andEquals("source_system", dto.getSourceSystem());
         }
-        if (dto.getPitcherId() != null) {
+        if (pitcherIds != null) {
             cri.where().andInList("pitcher_id", pitcherIds);
         }
         if (StringUtils.isNotBlank(dto.getAccountType())) {
@@ -1595,7 +1595,7 @@ public class IMediaDataServiceImpl implements IMediaDataService {
             //拼接注册时间查询条件
             cri.where().andBetween("dt", dto.getBeginDate(), dto.getEndDate());
         }
-        if (StringUtils.isNotBlank(dto.getGameId())) {
+        if (gameIds != null) {
             //拼接游戏ID查询条件
             cri.where().andInList("game_id", gameIds);
         }
@@ -1664,7 +1664,7 @@ public class IMediaDataServiceImpl implements IMediaDataService {
             //拼接注册时间查询条件
             cri.where().andBetween("dt", dto.getBeginDate(), dto.getEndDate());
         }
-        if (StringUtils.isNotBlank(dto.getGameId())) {
+        if (gameIds != null) {
             //拼接游戏ID查询条件
             cri.where().andInList("game_id", gameIds);
         }
@@ -1672,7 +1672,7 @@ public class IMediaDataServiceImpl implements IMediaDataService {
             //拼接SDK来源查询条件
             cri.where().andEquals("source_system", dto.getSourceSystem());
         }
-        if (dto.getPitcherId() != null) {
+        if (pitcherIds != null) {
             cri.where().andInList("pitcher_id", pitcherIds);
         }
         if (StringUtils.isNotBlank(dto.getAccountType())) {
@@ -1727,7 +1727,7 @@ public class IMediaDataServiceImpl implements IMediaDataService {
             //拼接SDK来源查询条件
             cri.where().andEquals("source_system", dto.getSourceSystem());
         }
-        if (dto.getPitcherId() != null) {
+        if (pitcherIds != null) {
             cri.where().andInList("pitcher_id", pitcherIds);
         }
         if (StringUtils.isNotBlank(dto.getAccountType())) {
@@ -1777,7 +1777,7 @@ public class IMediaDataServiceImpl implements IMediaDataService {
             //拼接注册时间查询条件
             cri.where().andBetween("dt", dto.getBeginDate(), dto.getEndDate());
         }
-        if (StringUtils.isNotBlank(dto.getGameId())) {
+        if (gameIds != null) {
             //拼接游戏ID查询条件
             cri.where().andInList("game_id", gameIds);
         }
@@ -1932,7 +1932,7 @@ public class IMediaDataServiceImpl implements IMediaDataService {
     private Criteria myCri(PitcherGameMediaDataTotalDTO dto, String type, List<Long> gameIds, List<Long> pitcherIds) {
         //根据传入的dto拼接查询参数
         Criteria cri = Cnd.cri();
-        if (StringUtils.isNotBlank(dto.getGameId())) {
+        if (gameIds != null) {
             //拼接游戏id查询条件
             cri.where().andInList("game_id", gameIds);
         }
@@ -1948,7 +1948,7 @@ public class IMediaDataServiceImpl implements IMediaDataService {
             //拼接SDK来源
             cri.where().andEquals("source_system", dto.getSourceSystem());
         }
-        if (dto.getPitcherId() != null) {
+        if (pitcherIds != null) {
             //拼接投手ID
             cri.where().andInList("pitcher_id", pitcherIds);
         }
@@ -1984,7 +1984,7 @@ public class IMediaDataServiceImpl implements IMediaDataService {
     private Criteria myCriRecharge(PitcherGameMediaDataTotalDTO dto, Boolean needRegTime, List<Long> gameIds, List<Long> pitcherIds) {
         //根据传入的dto拼接查询参数
         Criteria cri = Cnd.cri();
-        if (StringUtils.isNotBlank(dto.getGameId())) {
+        if (gameIds != null) {
             //拼接游戏id查询条件
             cri.where().andInList("game_id", gameIds);
         }
@@ -2000,7 +2000,7 @@ public class IMediaDataServiceImpl implements IMediaDataService {
             //拼接SDK来源
             cri.where().andEquals("source_system", dto.getSourceSystem());
         }
-        if (dto.getPitcherId() != null) {
+        if (pitcherIds != null) {
             //拼接投手ID
             cri.where().andInList("pitcher_id", pitcherIds);
         }
@@ -2032,7 +2032,7 @@ public class IMediaDataServiceImpl implements IMediaDataService {
     private Criteria myCriRole(PitcherGameMediaDataTotalDTO dto, List<Long> gameIds, List<Long> pitcherIds) {
         //根据传入的dto拼接查询参数
         Criteria cri = Cnd.cri();
-        if (StringUtils.isNotBlank(dto.getGameId())) {
+        if (gameIds != null) {
             //拼接游戏id查询条件
             cri.where().andInList("user_game_id", gameIds);
         }
@@ -2048,7 +2048,7 @@ public class IMediaDataServiceImpl implements IMediaDataService {
             //拼接SDK来源
             cri.where().andEquals("source_system", dto.getSourceSystem());
         }
-        if (dto.getPitcherId() != null) {
+        if (pitcherIds != null) {
             //拼接投手ID
             cri.where().andInList("user_zx_pitcher_id", pitcherIds);
         }
@@ -2083,7 +2083,7 @@ public class IMediaDataServiceImpl implements IMediaDataService {
             //拼接SDK来源
             cri.where().andEquals("source_system", dto.getSourceSystem());
         }
-        if (dto.getPitcherId() != null) {
+        if (pitcherIds != null) {
             //拼接投手ID
             cri.where().andInList("pitcher_id", pitcherIds);
         }
@@ -2122,7 +2122,7 @@ public class IMediaDataServiceImpl implements IMediaDataService {
             //拼接SDK来源
             cri.where().andEquals("source_system", dto.getSourceSystem());
         }
-        if (dto.getPitcherId() != null) {
+        if (pitcherIds != null) {
             //拼接投手ID
             cri.where().andInList("pitcher_id", pitcherIds);
         }
@@ -2157,7 +2157,7 @@ public class IMediaDataServiceImpl implements IMediaDataService {
             //拼接SDK来源
             cri.where().andEquals("source_system", dto.getSourceSystem());
         }
-        if (dto.getPitcherId() != null) {
+        if (pitcherIds != null) {
             //拼接投手ID
             cri.where().andInList("user_zx_pitcher_id", pitcherIds);
         }
@@ -2188,7 +2188,7 @@ public class IMediaDataServiceImpl implements IMediaDataService {
     private Criteria myCriGame(GameMediaDataTotalDTO dto, String type, List<Long> gameIds) {
         //根据传入的dto拼接查询参数
         Criteria cri = Cnd.cri();
-        if (StringUtils.isNotBlank(dto.getGameId())) {
+        if (gameIds != null) {
             //拼接游戏id查询条件
             cri.where().andInList("game_id", gameIds);
         }
@@ -2235,7 +2235,7 @@ public class IMediaDataServiceImpl implements IMediaDataService {
     private Criteria myCriRechargeGame(GameMediaDataTotalDTO dto, Boolean needRegTime, List<Long> gameIds) {
         //根据传入的dto拼接查询参数
         Criteria cri = Cnd.cri();
-        if (StringUtils.isNotBlank(dto.getGameId())) {
+        if (gameIds != null) {
             //拼接游戏id查询条件
             cri.where().andInList("game_id", gameIds);
         }
@@ -2278,7 +2278,7 @@ public class IMediaDataServiceImpl implements IMediaDataService {
     private Criteria myCriRoleGame(GameMediaDataTotalDTO dto, List<Long> gameIds) {
         //根据传入的dto拼接查询参数
         Criteria cri = Cnd.cri();
-        if (StringUtils.isNotBlank(dto.getGameId())) {
+        if (gameIds != null) {
             //拼接游戏id查询条件
             cri.where().andInList("user_game_id", gameIds);
         }