Преглед на файлове

:fix:修改查询字段

zhangxianyu преди 11 месеца
родител
ревизия
1fe5123c0d

+ 4 - 4
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/pojo/dto/RoleRechargeRankingDTO.java

@@ -103,7 +103,7 @@ public class RoleRechargeRankingDTO extends BasePage {
      * 是否转端
      */
     @ApiModelProperty(value = "是否转端: 1 -> 转端 ; 0 -> 不转端; 2-空(默认)")
-    private Integer isChange;
+    private List<Long> isChange;
 
     /**
      * 企业微信号
@@ -175,7 +175,7 @@ public class RoleRechargeRankingDTO extends BasePage {
      * 是否退游
      */
     @ApiModelProperty(notes = "是否退游:1->退游;0->未退游; 2-空(默认)")
-    private Integer isRemoveGame;
+    private List<Long> isRemoveGame;
 
     /**
      * 是否退游(系统判定)
@@ -187,13 +187,13 @@ public class RoleRechargeRankingDTO extends BasePage {
      * 是否添加企微 1-是; 0-否
      */
     @ApiModelProperty(notes = "是否添加企微 1-是; 0-否; 2-空(默认)")
-    private Integer isAddCorpWechat;
+    private List<Long> isAddCorpWechat;
 
     /**
      * 是否唤醒 1-是;0-否
      */
     @ApiModelProperty(notes = "是否唤醒 1-是;0-否; 2-空(默认)")
-    private Integer isWakeUp;
+    private List<Long> isWakeUp;
 
     /**
      * 玩家操作系统筛选:windows;mac;ios;devtools;android

+ 51 - 33
game-data/game-data-serve/src/main/java/com/zanxiang/game/data/serve/service/impl/RoleManageServiceImpl.java

@@ -268,7 +268,7 @@ public class RoleManageServiceImpl implements IRoleManageService {
             criA.where().andGTE("role_level", dto.getRoleLevelMin());
         }
         if (dto.getRoleLevelMax() != null) {
-            criA.where().andLTE("role_level", dto.getRoleLevelMin());
+            criA.where().andLTE("role_level", dto.getRoleLevelMax());
         }
         //玩家注册时间
         if (dto.getRegisterTimeMax() != null && dto.getRegisterTimeMin() != null) {
@@ -338,13 +338,16 @@ public class RoleManageServiceImpl implements IRoleManageService {
         if (dto.getIsSendMail() != null) {
             criA.where().andEquals("is_send_mail", dto.getIsSendMail());
         }
-        if (dto.getIsChange() != null) {
-            if (dto.getIsChange() == 2) {
+        //是否转端
+        List<Long> isChange = dto.getIsChange();
+        if (CollectionUtils.isNotEmpty(isChange)) {
+            if (isChange.contains(2L)) {
                 //是否转端
                 criA.where().andIsNull("is_change_game_type");
-            } else {
+            }
+            if (isChange.contains(1L) || isChange.contains(0L)) {
                 //是否转端
-                criA.where().andEquals("is_change_game_type", dto.getIsChange());
+                criA.where().andInList("is_change_game_type", dto.getIsChange());
             }
         }
         if (StringUtils.isNotBlank(dto.getWeChatCompany())) {
@@ -399,35 +402,41 @@ public class RoleManageServiceImpl implements IRoleManageService {
             //玩家操作系统
             criA.where().andEquals("os", dto.getOs());
         }
-        if (dto.getIsRemoveGame() != null) {
-            if (dto.getIsRemoveGame() == 2) {
+        List<Long> isRemoveGame = dto.getIsRemoveGame();
+        if (CollectionUtils.isNotEmpty(isRemoveGame)) {
+            if (isRemoveGame.contains(2L)) {
                 //是否退游
                 criA.where().andIsNull("is_remove_game");
-            } else {
+            }
+            if (isRemoveGame.contains(1L) || isRemoveGame.contains(0L)) {
                 //是否退游
-                criA.where().andEquals("is_remove_game", dto.getIsRemoveGame());
+                criA.where().andInList("is_remove_game", dto.getIsRemoveGame());
             }
         }
         if (dto.getIsRemoveGameForSystem() != null) {
             //是否退游(系统判定)
             criA.where().andEquals("is_remove_game_for_system", dto.getIsRemoveGameForSystem());
         }
-        if (dto.getIsWakeUp() != null) {
-            if (dto.getIsWakeUp() == 2) {
+        List<Long> isWakeUp = dto.getIsWakeUp();
+        if (CollectionUtils.isNotEmpty(isWakeUp)) {
+            if (isWakeUp.contains(2L)) {
                 //是否唤醒
                 criA.where().andIsNull("is_wake_up");
-            } else {
+            }
+            if (isChange.contains(1L) || isChange.contains(0L)) {
                 //是否唤醒
-                criA.where().andEquals("is_wake_up", dto.getIsWakeUp());
+                criA.where().andInList("is_wake_up", dto.getIsWakeUp());
             }
         }
-        if (dto.getIsAddCorpWechat() != null) {
-            if (dto.getIsAddCorpWechat() == 2) {
+        List<Long> isAddCorpWechat = dto.getIsAddCorpWechat();
+        if (CollectionUtils.isNotEmpty(isAddCorpWechat)) {
+            if (isAddCorpWechat.contains(2L)) {
                 //是否添加企微
                 criA.where().andIsNull("is_add_corp_wechat");
-            } else {
+            }
+            if (isAddCorpWechat.contains(0L) || isAddCorpWechat.contains(1L)) {
                 //是否添加企微
-                criA.where().andEquals("is_add_corp_wechat", dto.getIsAddCorpWechat());
+                criA.where().andInList("is_add_corp_wechat", dto.getIsAddCorpWechat());
             }
         }
         //角色最近活跃时间
@@ -632,13 +641,16 @@ public class RoleManageServiceImpl implements IRoleManageService {
         if (dto.getIsSendMail() != null) {
             criA.where().andEquals("is_send_mail", dto.getIsSendMail());
         }
-        if (dto.getIsChange() != null) {
-            if (dto.getIsChange() == 2) {
+        //是否转端
+        List<Long> isChange = dto.getIsChange();
+        if (CollectionUtils.isNotEmpty(isChange)) {
+            if (isChange.contains(2L)) {
                 //是否转端
                 criA.where().andIsNull("is_change_game_type");
-            } else {
+            }
+            if (isChange.contains(1L) || isChange.contains(0L)) {
                 //是否转端
-                criA.where().andEquals("is_change_game_type", dto.getIsChange());
+                criA.where().andInList("is_change_game_type", dto.getIsChange());
             }
         }
         if (StringUtils.isNotBlank(dto.getWeChatCompany())) {
@@ -693,35 +705,41 @@ public class RoleManageServiceImpl implements IRoleManageService {
             //玩家操作系统
             criA.where().andEquals("os", dto.getOs());
         }
-        if (dto.getIsRemoveGame() != null) {
-            if (dto.getIsRemoveGame() == 2) {
+        List<Long> isRemoveGame = dto.getIsRemoveGame();
+        if (CollectionUtils.isNotEmpty(isRemoveGame)) {
+            if (isRemoveGame.contains(2L)) {
                 //是否退游
                 criA.where().andIsNull("is_remove_game");
-            } else {
+            }
+            if (isRemoveGame.contains(1L) || isRemoveGame.contains(0L)) {
                 //是否退游
-                criA.where().andEquals("is_remove_game", dto.getIsRemoveGame());
+                criA.where().andInList("is_remove_game", dto.getIsRemoveGame());
             }
         }
         if (dto.getIsRemoveGameForSystem() != null) {
             //是否退游(系统判定)
             criA.where().andEquals("is_remove_game_for_system", dto.getIsRemoveGameForSystem());
         }
-        if (dto.getIsWakeUp() != null) {
-            if (dto.getIsWakeUp() == 2) {
+        List<Long> isWakeUp = dto.getIsWakeUp();
+        if (CollectionUtils.isNotEmpty(isWakeUp)) {
+            if (isWakeUp.contains(2L)) {
                 //是否唤醒
                 criA.where().andIsNull("is_wake_up");
-            } else {
+            }
+            if (isChange.contains(1L) || isChange.contains(0L)) {
                 //是否唤醒
-                criA.where().andEquals("is_wake_up", dto.getIsWakeUp());
+                criA.where().andInList("is_wake_up", dto.getIsWakeUp());
             }
         }
-        if (dto.getIsAddCorpWechat() != null) {
-            if (dto.getIsAddCorpWechat() == 2) {
+        List<Long> isAddCorpWechat = dto.getIsAddCorpWechat();
+        if (CollectionUtils.isNotEmpty(isAddCorpWechat)) {
+            if (isAddCorpWechat.contains(2L)) {
                 //是否添加企微
                 criA.where().andIsNull("is_add_corp_wechat");
-            } else {
+            }
+            if (isAddCorpWechat.contains(0L) || isAddCorpWechat.contains(1L)) {
                 //是否添加企微
-                criA.where().andEquals("is_add_corp_wechat", dto.getIsAddCorpWechat());
+                criA.where().andInList("is_add_corp_wechat", dto.getIsAddCorpWechat());
             }
         }
         //给充值时间查询条件