Commit bd286de60f27734ad963285cc777e4404f57e8a1

Authored by 张志伟
1 parent 0db5b9b7

:sparkles: feature(*): 新增查询续保成交的数据

- 升级sdk参数
fw-valhalla-sdk/src/main/java/cn/fw/valhalla/sdk/param/ShouldBeCompletedQuery.java
1 1 package cn.fw.valhalla.sdk.param;
2 2  
3 3 import lombok.Data;
  4 +import org.springframework.util.CollectionUtils;
4 5  
5   -import javax.validation.constraints.NotEmpty;
  6 +import javax.validation.constraints.NotBlank;
6 7 import java.time.YearMonth;
7 8 import java.time.ZoneId;
8 9 import java.util.Arrays;
... ... @@ -21,15 +22,16 @@ import java.util.stream.Collectors;
21 22 */
22 23 @Data
23 24 public class ShouldBeCompletedQuery {
  25 + private final static String SEPARATOR = ",";
24 26 /**
25 27 * 跟进人员id
26 28 */
27 29 private Long userId;
28 30 /**
29   - * 门店id
  31 + * 门店ids
30 32 */
31   - @NotEmpty(message = "门店不能为空")
32   - private Long[] shopId;
  33 + @NotBlank(message = "门店不能为空")
  34 + private String shopIds;
33 35 /**
34 36 * 跟进开始时间 [时间戳 默认为本月月初]
35 37 */
... ... @@ -58,14 +60,30 @@ public class ShouldBeCompletedQuery {
58 60 }
59 61  
60 62 public List<Long> getShopId() {
61   - return Arrays.stream(shopId).collect(Collectors.toList());
  63 + return Arrays.stream(shopIds.split(SEPARATOR)).map(Long::valueOf).collect(Collectors.toList());
62 64 }
63 65  
  66 + /**
  67 + * 设置门店
  68 + *
  69 + * @param shopId 门店id数组
  70 + */
64 71 public void setShopId(final Long... shopId) {
65   - this.shopId = shopId;
  72 + if (shopId == null || shopId.length == 0) {
  73 + return;
  74 + }
  75 + this.shopIds = Arrays.stream(shopId).map(String::valueOf).collect(Collectors.joining(","));
66 76 }
67 77  
  78 + /**
  79 + * 设置门店
  80 + *
  81 + * @param shopIdList 门店id集合
  82 + */
68 83 public void setShopId(final List<Long> shopIdList) {
69   - this.shopId = shopIdList.toArray(new Long[0]);
  84 + if (CollectionUtils.isEmpty(shopIdList)) {
  85 + return;
  86 + }
  87 + this.shopIds = shopIdList.stream().map(String::valueOf).collect(Collectors.joining(","));
70 88 }
71 89 }
... ...