Przeglądaj źródła

feat(api): 添加外部系统客户数据接口

- 在 uacrd-manager-server 和 ucard-cloud 中添加了 /wasabi/externalSystemCustomerData 接口
- 新增 CustomerDataEntity 实体类用于处理客户数据
- 配置文件中添加新的免认证路径
- 将环境配置从 test 切换到 dev
- 在 WasabiCardController 中添加接收客户数据的 POST 接口
- 在 WasabiCardFeignService 中定义外部系统客户数据接口
kongxiangyang 5 miesięcy temu
rodzic
commit
c1ff8d188c

+ 7 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/WasabiCardController.java

@@ -79,6 +79,13 @@ public class WasabiCardController {
         return wasabiCardFeignService.getMerchantUserPageList(entity);
     }
 
+    @PostMapping("/externalSystemCustomerData")
+    public BaseResultDto receiveCustomerData(@RequestBody CustomerDataEntity entity) throws ServiceException {
+//        return wasabiCardService.receiveCustomerData(entity);
+        return wasabiCardFeignService.externalSystemCustomerData(entity);
+    }
+
+
     /**
      * 商户用户注册
      */

+ 4 - 0
uacrd-manager-server/src/main/java/com/crm/manager/service/ucard/WasabiCardFeignService.java

@@ -13,6 +13,7 @@ import com.crm.rely.backend.exception.ServiceException;
 import org.springframework.cloud.netflix.feign.FeignClient;
 import org.springframework.http.MediaType;
 import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestPart;
 import org.springframework.web.multipart.MultipartFile;
 
@@ -33,6 +34,9 @@ public interface WasabiCardFeignService {
     @PostMapping("/card/types")
     BaseResultDto getCardTypes() throws ServiceException;
 
+    @PostMapping("/externalSystemCustomerData")
+    BaseResultDto externalSystemCustomerData(CustomerDataEntity entity) throws ServiceException;
+
     /**
      * 商户用户分页列表
      */

+ 3 - 2
uacrd-manager-server/src/main/resources/application.yml

@@ -2,7 +2,7 @@ server:
   port: 8888
 spring:
   profiles:
-    active: test
+    active: dev
   application:
     name: ucard-manager-service
 mybatis:
@@ -36,7 +36,8 @@ login:
     /country/get,
     /test/**,
     /ucard/callback,
-    /web/oc/api/add
+    /web/oc/api/add,
+    /wasabi/externalSystemCustomerData
 #  single-sign-on: true
 role:
   googleVerified: false

+ 6 - 0
ucard-cloud/src/main/java/com/crm/ucard/controller/WasabiCardController.java

@@ -40,6 +40,12 @@ public class WasabiCardController {
     @Autowired
     private VaultodyService vaultodyService;
 
+    @PostMapping("/externalSystemCustomerData")
+    public BaseResultDto receiveCustomerData(@RequestBody CustomerDataEntity entity) throws ServiceException {
+//        return wasabiCardService.receiveCustomerData(entity);
+        return BaseResultDto.success(entity);
+    }
+
     /**
      * 获取卡片类型列表
      */

+ 3 - 2
ucard-cloud/src/main/resources/application.yml

@@ -2,7 +2,7 @@ server:
   port: 8777
 spring:
   profiles:
-    active: test
+    active: dev
   application:
     name: ucard-service
 
@@ -18,7 +18,8 @@ login:
     /ucard/wallet/deposit,
     /ucard/wallet/withdraw,
     /wasabi/callback,
-    /crypto/callback
+    /crypto/callback,
+    /wasabi/manager/externalSystemCustomerData
 role:
   googleVerified: false
   excludePathPatterns:

+ 47 - 0
ucard-core/src/main/java/com/crm/rely/backend/core/entity/ucard/CustomerDataEntity.java

@@ -0,0 +1,47 @@
+package com.crm.rely.backend.core.entity.ucard;
+
+import lombok.Data;
+
+@Data
+public class CustomerDataEntity {
+    private String systemId;
+    /**
+     * 姓(只能是英文,单词之间支持一个英文空格, 长度不能超过64)
+     */
+    private String lastName;
+
+    /**
+     * 名(只能是英文,单词之间支持一个英文空格, 长度不能超过64)
+     */
+    private String firstName;
+
+    /**
+     * 邮箱
+     */
+    private String email;
+
+    /**
+     * 手机号
+     */
+    private String mobile;
+
+    /**
+     * 国籍。2位数code码。参见dictionary_common.xlsx(sheet. regin)
+     */
+    private String nationality;
+
+    /**
+     * 城市code码。参见dictionary_common.xlsx(sheet. city)
+     */
+    private String town;
+
+    /**
+     * 	详细地址(英文地址,长度不能超过100)
+     */
+    private String address;
+
+    /**
+     * 邮编
+     */
+    private String postCode;
+}