1
0

2 Commits af3ee6fac2 ... 34aabc04ae

Autor SHA1 Nachricht Datum
  1018653686@qq.com 34aabc04ae Merge remote-tracking branch 'origin/xiaoman' into xiaoman vor 1 Jahr
  1018653686@qq.com fd4fcfc333 将客户联系人改为json接收 vor 1 Jahr

+ 4 - 3
hx-customer/src/main/java/com/fjhx/customer/entity/xiaoman/vo/XiaomanUpdateInfoVO.java

@@ -1,6 +1,7 @@
 package com.fjhx.customer.entity.xiaoman.vo;
 
 import com.alibaba.fastjson.annotation.JSONField;
+import com.alibaba.fastjson2.JSONObject;
 import lombok.Data;
 
 import java.util.List;
@@ -36,7 +37,7 @@ public class XiaomanUpdateInfoVO {
     //备注
     private String remark;
     //客户联系人
-    private List<Customer> customers;
+    private List<JSONObject> customers;
     //客户公海分组ID,默认为0
     @JSONField(name = "pool_id")
     private Integer poolId;
@@ -47,7 +48,7 @@ public class XiaomanUpdateInfoVO {
     @JSONField(name = "trail_status")
     private Long trailStatus;
 
-    @Data
+/*    @Data
     public static class Customer {
         //客户名称
         private String name;
@@ -74,5 +75,5 @@ public class XiaomanUpdateInfoVO {
         private String facebook;
         private String wechat;
         private String twitter;
-    }
+    }*/
 }

+ 14 - 15
hx-customer/src/main/java/com/fjhx/customer/service/xiaoman/impl/XiaomanApiServiceImpl.java

@@ -246,21 +246,20 @@ public class XiaomanApiServiceImpl implements XiaomanApiService {
             throw new RuntimeException("客户名称为空");
         }
         xiaomanUpdateInfoVO.setPoolId(0);
-        List<XiaomanUpdateInfoVO.Customer> customers = xiaomanUpdateInfoVO.getCustomers();
-        if (CollectionUtil.isEmpty(customers)){
-            throw new RuntimeException("客户联系人为空");
-        }
-        for (XiaomanUpdateInfoVO.Customer customer : customers) {
-            if (StrUtil.isBlank(customer.getName())){
-                throw new RuntimeException("客户联系人名称存在为空");
-            }
-            if (StrUtil.isBlank(customer.getEmail())){
-                throw new RuntimeException("客户联系人email存在为空");
-            }
-            customer.setMainCustomerFlag("0");
-        }
-        xiaomanUpdateInfoVO.setCustomers(customers);
-
+//        List<XiaomanUpdateInfoVO.Customer> customers = xiaomanUpdateInfoVO.getCustomers();
+//        if (CollectionUtil.isEmpty(customers)){
+//            throw new RuntimeException("客户联系人为空");
+//        }
+//        for (XiaomanUpdateInfoVO.Customer customer : customers) {
+//            if (StrUtil.isBlank(customer.getName())){
+//                throw new RuntimeException("客户联系人名称存在为空");
+//            }
+//            if (StrUtil.isBlank(customer.getEmail())){
+//                throw new RuntimeException("客户联系人email存在为空");
+//            }
+//            customer.setMainCustomerFlag("0");
+//        }
+//        xiaomanUpdateInfoVO.setCustomers(customers);
 
         String body = JSON.toJSONString(xiaomanUpdateInfoVO);
         XiaomanConfig config = xiaomanConfigService.getCache();