Преглед изворни кода

Merge branch 'dev' of GameCenter/game-center into master

Letianhua пре 1 година
родитељ
комит
f9830f60df

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

@@ -118,15 +118,15 @@ public class RoleRechargeRankingDTO extends BasePage {
     private String phone;
 
     /**
-     * GS
+     * GS: 0-表示未操作
      */
-    @ApiModelProperty(value = "GS_ID")
+    @ApiModelProperty(value = "GS_ID:0-表示未操作")
     private Long gsId;
 
     /**
-     * 客服
+     * 客服:0-表示未操作
      */
-    @ApiModelProperty(value = "客服ID")
+    @ApiModelProperty(value = "客服ID:0-表示未操作")
     private Long customerServerId;
 
     /**
@@ -136,9 +136,9 @@ public class RoleRechargeRankingDTO extends BasePage {
     private Long pitcherId;
 
     /**
-     * 运营
+     * 运营:0-表示未操作
      */
-    @ApiModelProperty(value = "运营ID")
+    @ApiModelProperty(value = "运营ID:0-表示未操作")
     private Long operatorId;
 
     /**

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

@@ -111,7 +111,12 @@ public class RoleManageServiceImpl implements IRoleManageService {
             criA.where().andEquals("user_phone", dto.getPhone());
         }
         if (dto.getGsId() != null) {
-            criA.where().andEquals("gs_id", dto.getGsId());
+            //GS
+            if (dto.getGsId() == 0L) {
+                criA.where().andIsNull("gs_id");
+            } else {
+                criA.where().andEquals("gs_id", dto.getGsId());
+            }
         }
         if (dto.getPitcherId() != null) {
             //投手
@@ -119,11 +124,19 @@ public class RoleManageServiceImpl implements IRoleManageService {
         }
         if (dto.getOperatorId() != null) {
             //运营
-            criA.where().andEquals("oper_user_id", dto.getOperatorId());
+            if (dto.getOperatorId() == 0L) {
+                criA.where().andIsNull("oper_user_id");
+            } else {
+                criA.where().andEquals("oper_user_id", dto.getOperatorId());
+            }
         }
         if (dto.getCustomerServerId() != null) {
             //客服
-            criA.where().andEquals("customer_service_id", dto.getCustomerServerId());
+            if (dto.getCustomerServerId() == 0L) {
+                criA.where().andIsNull("customer_service_id");
+            } else {
+                criA.where().andEquals("customer_service_id", dto.getCustomerServerId());
+            }
         }
         if (dto.getTotalRechargeMin() != null) {
             //累计充值金额最小值

+ 5 - 5
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/pojo/vo/GamePolicyConfigListVO.java

@@ -6,8 +6,8 @@ import lombok.Builder;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
-import java.math.BigDecimal;
 import java.time.LocalDateTime;
+import java.util.List;
 
 /**
  * @author tianhua
@@ -78,14 +78,14 @@ public class GamePolicyConfigListVO {
     private String configExplain;
 
     /**
-     * 告警人员名称
+     * 告警人员ID
      */
-    private String userNameStr;
+    private List<Long> userNameStr;
 
     /**
-     * 排除标签名字符串
+     * 排除标签名字符串 ID
      */
-    private String tagsNameStr;
+    private List<Long> tagsNameStr;
 
     /**
      * 创建时间

+ 9 - 24
game-module/game-module-manage/src/main/java/com/zanxiang/game/module/manage/service/impl/GamePolicyConfigServiceImpl.java

@@ -30,7 +30,10 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.time.LocalDateTime;
+import java.util.Arrays;
+import java.util.List;
 import java.util.Map;
+import java.util.stream.Collectors;
 
 /**
  * @author tianhua
@@ -134,28 +137,10 @@ public class GamePolicyConfigServiceImpl extends ServiceImpl<GamePolicyConfigMap
         GameSupper gameSupper = gameSupperService.getById(vo.getSuperGameId());
         GameDTO game = gameService.getById(vo.getSuperGameId());
         String superGameName = null == gameSupper ? (null == game ? null : game.getName()) : gameSupper.getName();
-        //告警人员名称
-        StringBuilder userNameStr = new StringBuilder();
-        if (StringUtils.isNotBlank(vo.getUserIds())) {
-            String[] userIds = vo.getUserIds().split(",");
-            for (int i = 0; i < userIds.length; i++) {
-                userNameStr.append(sysUserRpc.getById(Long.valueOf(userIds[i])).getData().getNickname());
-                if (i != userIds.length -1) {
-                    userNameStr.append(",");
-                }
-            }
-        }
-        //排除标签名称
-        StringBuilder tagNameStr = new StringBuilder();
-        if (StringUtils.isNotBlank(vo.getTagIds())) {
-            String[] tagIds = vo.getTagIds().split(",");
-            for (int i = 0; i < tagIds.length; i++) {
-                tagNameStr.append(ExcludeTagsEnum.getTagName(Integer.valueOf(tagIds[i])));
-                if (i != tagIds.length -1) {
-                    tagNameStr.append(",");
-                }
-            }
-        }
+        List<Long> userIds = StringUtils.isNotBlank(vo.getUserIds()) ?
+                Arrays.stream(vo.getUserIds().split(",")).map(Long::valueOf).collect(Collectors.toList()) : null;
+        List<Long> tagIds = StringUtils.isNotBlank(vo.getTagIds()) ?
+                Arrays.stream(vo.getTagIds().split(",")).map(Long::valueOf).collect(Collectors.toList()) : null;
         return GamePolicyConfigListVO.builder()
                 .id(vo.getId())
                 .superGameId(vo.getSuperGameId())
@@ -166,8 +151,8 @@ public class GamePolicyConfigServiceImpl extends ServiceImpl<GamePolicyConfigMap
                 .time(StringUtils.isBlank(time) ? null : Long.valueOf(time))
                 .timeCondition(StringUtils.isBlank(timeCondition) ? null : timeCondition)
                 .configExplain(vo.getConfigExplain())
-                .userNameStr(StringUtils.isBlank(userNameStr.toString()) ? null : userNameStr.toString())
-                .tagsNameStr(StringUtils.isBlank(tagNameStr.toString()) ? null : tagNameStr.toString())
+                .userNameStr(userIds)
+                .tagsNameStr(tagIds)
                 .createBy(vo.getCreateBy())
                 .createName(sysUserRpc.getById(vo.getCreateBy()).getData().getNickname())
                 .createTime(vo.getCreateTime())