lqh 1 рік тому
батько
коміт
b7b0e92e56

+ 12 - 1
hx-customer/src/main/java/com/fjhx/customer/entity/xiaoman/vo/CustomerInfoVo.java

@@ -226,7 +226,7 @@ public class CustomerInfoVo {
         private List<ImageInfo> imageList;
 
         @JsonProperty("contact")
-        private List<String> contact;
+        private List<Contact> contact;
 
         @JsonProperty("main_customer_flag")
         private int mainCustomerFlag;
@@ -256,4 +256,15 @@ public class CustomerInfoVo {
         @JsonProperty("file_preview_url")
         private String filePreviewUrl;
     }
+
+
+    @Data
+    public static class Contact {
+
+        @JsonProperty("type")
+        private String type;
+
+        @JsonProperty("value")
+        private String value;
+    }
 }

+ 494 - 45
hx-customer/src/main/java/com/fjhx/customer/handle/ccc.json

@@ -1,22 +1,22 @@
 {
   "code": 200,
   "message": "success",
-  "now": "2024-04-06 22:09:10",
+  "now": "2024-04-06 23:01:02",
   "data": {
-    "company_id": 18246876705558,
-    "serial_id": "86650",
+    "company_id": 17802838208969,
+    "serial_id": "86480",
     "user_id": [
-      "56322072"
+      "56322068"
     ],
     "owner": [
       {
-        "user_id": "56322072",
-        "avatar": "https:\/\/v4client.oss-cn-hangzhou.aliyuncs.com\/other\/img\/56322072\/600d4e6ddf7d5b6ee403f5c6f522e79ea773f6ccf548e9d03ccc9a96988987d1.png",
-        "name": "Jimmy",
-        "nickname": "Jimmy"
+        "user_id": "56322068",
+        "avatar": "https:\\/\\/v4client.oss-cn-hangzhou.aliyuncs.com\\/other\\/img\\/56322068\\/1a2df65fa32a4ee0a6b637c0ca6b3f4b29582e092cbd79b9a49536ccb82fa3fe.png",
+        "name": "Cici",
+        "nickname": "Cici"
       }
     ],
-    "create_user": 56322072,
+    "create_user": 56322068,
     "last_owner_info": {
       "nickname": "无",
       "user_id": 0,
@@ -24,77 +24,526 @@
     },
     "pool_id": 0,
     "pool_name": "",
-    "private_time": "2024-03-23 14:40:59",
+    "private_time": "2024-03-14 10:47:26",
     "public_time": "",
     "release_count": 0,
-    "edit_time": "2024-04-06 19:14:35",
+    "edit_time": "2024-03-14 10:47:26",
     "main_lead_id": 0,
     "lead_name": "",
-    "origin": "阿里巴巴(B2B平台)",
-    "origin_name": "阿里巴巴(B2B平台)",
+    "origin": "OKKI Leads",
+    "origin_name": "OKKI Leads",
     "tag": [],
     "client_tag_list": [],
     "source_detail": {
-      "alibaba_store_info": [
-        {
-          "store_id": "239374100",
-          "store_name": "福建尔泓时代家居用品有限公司",
-          "enable_flag": "1",
-          "oauth_flag": "1",
-          "sync_customer_flag": "1"
-        }
-      ],
+      "alibaba_store_info": [],
       "site_info": []
     },
-    "name": "ADIBAADCADI DREAMZZ",
+    "name": "Swan Brand",
     "short_name": "",
     "origin_list": [
-      "阿里巴巴(B2B平台)"
+      "OKKI Leads"
     ],
     "biz_type": "",
     "annual_procurement": 0,
-    "country": "AU",
+    "country": "GB",
     "intention_level": 0,
     "province": "",
-    "timezone": "10",
+    "timezone": "0",
     "city": "",
     "scale_id": 0,
     "trail_status": "无",
-    "homepage": "",
+    "homepage": "http:\\/\\/www.swan-brand.co.uk",
     "fax": "",
-    "tel_area_code": "",
-    "tel": "",
-    "address": "",
+    "tel_area_code": "44",
+    "tel": "161-934-2240",
+    "address": "P.O. Box 3117,Stoke-on-Trent,Stoke-on-Trent,ST4 9GD,United Kingdom of Great Britain and Northern Ireland",
     "remark": "",
     "category_ids": [],
-    "create_time": "2024-03-23 14:40:59",
+    "create_time": "2024-03-14 10:47:26",
     "customers": [
       {
-        "customer_id": 18246877321569,
-        "company_id": 18246876705558,
-        "name": "DAVID WARNER",
-        "email": "",
+        "customer_id": 17802837442234,
+        "company_id": 17802838208969,
+        "name": "Veronica Davidson",
+        "email": "veronica@swan-brand.co.uk",
         "gender": 0,
         "remark": "",
         "birth": "",
-        "post_grade": 1,
-        "post": "",
-        "image_list": [
+        "post_grade": 0,
+        "post": "Lingerie\\/jewellery Buyer Manager",
+        "image_list": [],
+        "contact": [
           {
-            "file_id": 18246876705312,
-            "file_name": "A0c84be547b734c148a006ab7ec4bb4c4p.jpg",
-            "file_size": "87087",
-            "file_path": "https:\/\/v4client.oss-cn-hangzhou.aliyuncs.com\/other\/img\/56322072\/6f9f4639a022279a6eb1d9557221dd368dfcc0e1029a2b1f326f4c08517b3773.jpg",
-            "file_preview_url": "https:\/\/v4client.oss-cn-hangzhou.aliyuncs.com\/other%2Fimg%2F56322072%2F6f9f4639a022279a6eb1d9557221dd368dfcc0e1029a2b1f326f4c08517b3773.jpg?response-content-disposition=inline%3B%20filename%3DA0c84be547b734c148a006ab7ec4bb4c4p.jpg%3B%20filename%2A%3Dutf-8%27%27A0c84be547b734c148a006ab7ec4bb4c4p.jpg&response-content-type=image%2Fjpeg&OSSAccessKeyId=LTAI5tCRVsUWyca4YrKZMPQP&Signature=sE1ERZL2hMwtU7oIWR5GT1WHEvg%3D&Expires=1713276550"
+            "type": "facebook",
+            "value": "https:\\/\\/www.facebook.com\\/teasmade"
+          },
+          {
+            "type": "twitter",
+            "value": "https:\\/\\/twitter.com\\/swanteasmade"
+          },
+          {
+            "type": "instagram",
+            "value": "https:\\/\\/instagram.com\\/swanbranduk"
+          },
+          {
+            "type": "youtube",
+            "value": "https:\\/\\/youtube.com\\/user\\/SwanTeasmade"
           }
         ],
-        "contact": [],
         "main_customer_flag": 1,
         "tel_area_code": "",
         "tel": ""
+      },
+      {
+        "customer_id": 17802838209030,
+        "company_id": 17802838208969,
+        "name": "Paul Simpson",
+        "email": "paul@swan-brand.co.uk",
+        "gender": 0,
+        "remark": null,
+        "birth": "",
+        "post_grade": 0,
+        "post": "National Account Manager",
+        "image_list": [],
+        "contact": [],
+        "main_customer_flag": 0,
+        "tel_area_code": "",
+        "tel": ""
+      },
+      {
+        "customer_id": 17802838209110,
+        "company_id": 17802838208969,
+        "name": "Katie Lindop",
+        "email": "katie@swan-brand.co.uk",
+        "gender": 0,
+        "remark": null,
+        "birth": "",
+        "post_grade": 0,
+        "post": "Sales Coordinator",
+        "image_list": [],
+        "contact": [],
+        "main_customer_flag": 0,
+        "tel_area_code": "",
+        "tel": ""
+      },
+      {
+        "customer_id": 17802838209172,
+        "company_id": 17802838208969,
+        "name": "Meda Delf",
+        "email": "meda@swan-brand.co.uk",
+        "gender": 0,
+        "remark": null,
+        "birth": "",
+        "post_grade": 0,
+        "post": "Social Media Placement",
+        "image_list": [],
+        "contact": [],
+        "main_customer_flag": 0,
+        "tel_area_code": "",
+        "tel": ""
+      },
+      {
+        "customer_id": 17802838209269,
+        "company_id": 17802838208969,
+        "name": "David Foulstone",
+        "email": "david@swan-brand.co.uk",
+        "gender": 0,
+        "remark": null,
+        "birth": "",
+        "post_grade": 0,
+        "post": "Marketing Manager",
+        "image_list": [],
+        "contact": [],
+        "main_customer_flag": 0,
+        "tel_area_code": "",
+        "tel": ""
+      },
+      {
+        "customer_id": 17802838209351,
+        "company_id": 17802838208969,
+        "name": "Tony Druce",
+        "email": "tony@swan-brand.co.uk",
+        "gender": 0,
+        "remark": null,
+        "birth": "",
+        "post_grade": 0,
+        "post": "Business Development Manager",
+        "image_list": [],
+        "contact": [],
+        "main_customer_flag": 0,
+        "tel_area_code": "",
+        "tel": ""
+      },
+      {
+        "customer_id": 17802838209440,
+        "company_id": 17802838208969,
+        "name": "Emma Cork",
+        "email": "emma@swan-brand.co.uk",
+        "gender": 0,
+        "remark": null,
+        "birth": "",
+        "post_grade": 0,
+        "post": "Administrator",
+        "image_list": [],
+        "contact": [],
+        "main_customer_flag": 0,
+        "tel_area_code": "",
+        "tel": ""
+      },
+      {
+        "customer_id": 17802838209494,
+        "company_id": 17802838208969,
+        "name": "Michael Tan",
+        "email": "michael.tan@swan-brand.co.uk",
+        "gender": 0,
+        "remark": null,
+        "birth": "",
+        "post_grade": 0,
+        "post": "Head Of Procurement",
+        "image_list": [],
+        "contact": [],
+        "main_customer_flag": 0,
+        "tel_area_code": "",
+        "tel": ""
+      },
+      {
+        "customer_id": 17802838565475,
+        "company_id": 17802838208969,
+        "name": "David Foulstone",
+        "email": "david.foulstone@swan-brand.co.uk",
+        "gender": 0,
+        "remark": null,
+        "birth": "",
+        "post_grade": 0,
+        "post": "--",
+        "image_list": [],
+        "contact": [],
+        "main_customer_flag": 0,
+        "tel_area_code": "",
+        "tel": ""
+      },
+      {
+        "customer_id": 17802838565599,
+        "company_id": 17802838208969,
+        "name": "Emily Turner",
+        "email": "emily@swan-brand.co.uk",
+        "gender": 0,
+        "remark": null,
+        "birth": "",
+        "post_grade": 0,
+        "post": "--",
+        "image_list": [],
+        "contact": [],
+        "main_customer_flag": 0,
+        "tel_area_code": "",
+        "tel": ""
+      },
+      {
+        "customer_id": 17802838565651,
+        "company_id": 17802838208969,
+        "name": "Cj Williams",
+        "email": "cj@swan-brand.co.uk",
+        "gender": 0,
+        "remark": null,
+        "birth": "",
+        "post_grade": 0,
+        "post": "--",
+        "image_list": [],
+        "contact": [],
+        "main_customer_flag": 0,
+        "tel_area_code": "",
+        "tel": ""
+      },
+      {
+        "customer_id": 17802838565747,
+        "company_id": 17802838208969,
+        "name": "Harriet Neal",
+        "email": "sales@swan-brand.co.uk",
+        "gender": 0,
+        "remark": null,
+        "birth": "",
+        "post_grade": 0,
+        "post": "--",
+        "image_list": [],
+        "contact": [],
+        "main_customer_flag": 0,
+        "tel_area_code": "",
+        "tel": ""
+      },
+      {
+        "customer_id": 17802838565812,
+        "company_id": 17802838208969,
+        "name": "Claire Massey",
+        "email": "claire@sourcingpartner.co.uk",
+        "gender": 0,
+        "remark": null,
+        "birth": "",
+        "post_grade": 0,
+        "post": "--",
+        "image_list": [],
+        "contact": [],
+        "main_customer_flag": 0,
+        "tel_area_code": "",
+        "tel": ""
+      },
+      {
+        "customer_id": 17802838565866,
+        "company_id": 17802838208969,
+        "name": "James Ecclestone",
+        "email": "james.ecclestone@swan-brand.co.uk",
+        "gender": 0,
+        "remark": null,
+        "birth": "",
+        "post_grade": 0,
+        "post": "--",
+        "image_list": [],
+        "contact": [],
+        "main_customer_flag": 0,
+        "tel_area_code": "",
+        "tel": ""
+      },
+      {
+        "customer_id": 17802838565917,
+        "company_id": 17802838208969,
+        "name": "Jade Loftus",
+        "email": "jade.loftus@swan-brand.co.uk",
+        "gender": 0,
+        "remark": null,
+        "birth": "",
+        "post_grade": 0,
+        "post": "--",
+        "image_list": [],
+        "contact": [],
+        "main_customer_flag": 0,
+        "tel_area_code": "",
+        "tel": ""
+      },
+      {
+        "customer_id": 17802838565969,
+        "company_id": 17802838208969,
+        "name": "Harry Thomson",
+        "email": "harry@swan-brand.co.uk",
+        "gender": 0,
+        "remark": null,
+        "birth": "",
+        "post_grade": 0,
+        "post": "--",
+        "image_list": [],
+        "contact": [],
+        "main_customer_flag": 0,
+        "tel_area_code": "",
+        "tel": ""
+      },
+      {
+        "customer_id": 17802838566008,
+        "company_id": 17802838208969,
+        "name": "loyalty",
+        "email": "loyalty@swan-brand.co.uk",
+        "gender": 0,
+        "remark": null,
+        "birth": "",
+        "post_grade": 0,
+        "post": "--",
+        "image_list": [],
+        "contact": [],
+        "main_customer_flag": 0,
+        "tel_area_code": "",
+        "tel": ""
+      },
+      {
+        "customer_id": 17802838611014,
+        "company_id": 17802838208969,
+        "name": "affiliate",
+        "email": "affiliate@swan-brand.co.uk",
+        "gender": 0,
+        "remark": null,
+        "birth": "",
+        "post_grade": 0,
+        "post": "--",
+        "image_list": [],
+        "contact": [],
+        "main_customer_flag": 0,
+        "tel_area_code": "",
+        "tel": ""
+      },
+      {
+        "customer_id": 17802838642036,
+        "company_id": 17802838208969,
+        "name": "katie.lindop",
+        "email": "katie.lindop@swan-brand.co.uk",
+        "gender": 0,
+        "remark": null,
+        "birth": "",
+        "post_grade": 0,
+        "post": "--",
+        "image_list": [],
+        "contact": [],
+        "main_customer_flag": 0,
+        "tel_area_code": "",
+        "tel": ""
+      },
+      {
+        "customer_id": 17802838988029,
+        "company_id": 17802838208969,
+        "name": "kayleigh.baddeley",
+        "email": "kayleigh.baddeley@swan-brand.co.uk",
+        "gender": 0,
+        "remark": null,
+        "birth": "",
+        "post_grade": 0,
+        "post": "--",
+        "image_list": [],
+        "contact": [],
+        "main_customer_flag": 0,
+        "tel_area_code": "",
+        "tel": ""
+      },
+      {
+        "customer_id": 17802838988095,
+        "company_id": 17802838208969,
+        "name": "paypal",
+        "email": "paypal@swan-brand.co.uk",
+        "gender": 0,
+        "remark": null,
+        "birth": "",
+        "post_grade": 0,
+        "post": "--",
+        "image_list": [],
+        "contact": [],
+        "main_customer_flag": 0,
+        "tel_area_code": "",
+        "tel": ""
+      },
+      {
+        "customer_id": 17802838988141,
+        "company_id": 17802838208969,
+        "name": "ebay",
+        "email": "ebay@swan-brand.co.uk",
+        "gender": 0,
+        "remark": null,
+        "birth": "",
+        "post_grade": 0,
+        "post": "--",
+        "image_list": [],
+        "contact": [],
+        "main_customer_flag": 0,
+        "tel_area_code": "",
+        "tel": ""
+      },
+      {
+        "customer_id": 17802838988187,
+        "company_id": 17802838208969,
+        "name": "vincent",
+        "email": "vincent@swan-brand.co.uk",
+        "gender": 0,
+        "remark": null,
+        "birth": "",
+        "post_grade": 0,
+        "post": "--",
+        "image_list": [],
+        "contact": [],
+        "main_customer_flag": 0,
+        "tel_area_code": "",
+        "tel": ""
+      },
+      {
+        "customer_id": 17802838988302,
+        "company_id": 17802838208969,
+        "name": "kayleigh",
+        "email": "kayleigh@swan-brand.co.uk",
+        "gender": 0,
+        "remark": null,
+        "birth": "",
+        "post_grade": 0,
+        "post": "--",
+        "image_list": [],
+        "contact": [],
+        "main_customer_flag": 0,
+        "tel_area_code": "",
+        "tel": ""
+      },
+      {
+        "customer_id": 17802838988349,
+        "company_id": 17802838208969,
+        "name": "fearne",
+        "email": "fearne@swan-brand.co.uk",
+        "gender": 0,
+        "remark": null,
+        "birth": "",
+        "post_grade": 0,
+        "post": "--",
+        "image_list": [],
+        "contact": [],
+        "main_customer_flag": 0,
+        "tel_area_code": "",
+        "tel": ""
+      },
+      {
+        "customer_id": 17802838988393,
+        "company_id": 17802838208969,
+        "name": "holly.cartlidge",
+        "email": "holly.cartlidge@swan-brand.co.uk",
+        "gender": 0,
+        "remark": null,
+        "birth": "",
+        "post_grade": 0,
+        "post": "--",
+        "image_list": [],
+        "contact": [],
+        "main_customer_flag": 0,
+        "tel_area_code": "",
+        "tel": ""
+      },
+      {
+        "customer_id": 17802838988434,
+        "company_id": 17802838208969,
+        "name": "emily.brown",
+        "email": "emily.brown@swan-brand.co.uk",
+        "gender": 0,
+        "remark": null,
+        "birth": "",
+        "post_grade": 0,
+        "post": "--",
+        "image_list": [],
+        "contact": [],
+        "main_customer_flag": 0,
+        "tel_area_code": "",
+        "tel": ""
+      },
+      {
+        "customer_id": 17802838988488,
+        "company_id": 17802838208969,
+        "name": "customerservice",
+        "email": "customerservice@swan-brand.co.uk",
+        "gender": 0,
+        "remark": null,
+        "birth": "",
+        "post_grade": 0,
+        "post": "--",
+        "image_list": [],
+        "contact": [],
+        "main_customer_flag": 0,
+        "tel_area_code": "",
+        "tel": ""
+      },
+      {
+        "customer_id": 17802838988520,
+        "company_id": 17802838208969,
+        "name": "info",
+        "email": "info@swan-brand.co.uk",
+        "gender": 0,
+        "remark": null,
+        "birth": "",
+        "post_grade": 0,
+        "post": "--",
+        "image_list": [],
+        "contact": [],
+        "main_customer_flag": 0,
+        "tel_area_code": "",
+        "tel": ""
       }
     ],
     "14200691088213": "",
-    "country_name": "澳大利亚"
+    "country_name": "英国"
   }
 }

+ 1 - 1
hx-customer/src/main/java/com/fjhx/customer/initializers/XiaomanInitializers.java

@@ -30,7 +30,7 @@ public class XiaomanInitializers {
         refreshToken();
         //获取全量数据
         try {
-            HandleXiaomanData.updateList();
+            HandleXiaomanData.initAllList();
         } catch (Exception e) {
             log.error("获取小满全量数据异常", e);
         }

+ 0 - 1
hx-customer/src/main/java/com/fjhx/customer/service/xiaoman/impl/XiaomanCustomerServiceImpl.java

@@ -82,7 +82,6 @@ public class XiaomanCustomerServiceImpl extends ServiceImpl<XiaomanCustomerMappe
     }
 
     @Override
-    @DSTransactional
     public void handleSaveOrUpdate(List<CustomerApiVo> customerApiVoList, Set<Long> allCustomer) {
         List<XiaomanCustomer> xiaomanCustomerList = new ArrayList<>(customerApiVoList);
         for (XiaomanCustomer customer : xiaomanCustomerList){