瀏覽代碼

feat(card): 添加卡片相关服务和配置

- 创建AccountInfoFeignService接口用于账户信息查询
- 实现AesUtils工具类提供AES加密解密功能
- 配置application.yml及多环境配置文件(dev/ho/prod/test)
- 创建Card3dsTransactionMapper处理3DS交易数据
- 添加CardApplyMapper及对应XML实现卡片申请相关查询
- 实现CardBlockchainConfigMapper管理区块链配置
- 添加CardCountryMapper处理卡片国家数据
- 创建CardCryptoCallbackRecordMapper处理加密钱包交易记录
- 新增多个Repository接口包括Card3dsTransactionRepository等
- 配置数据库连接和Redis等基础服务设置
kongxiangyang 5 月之前
父節點
當前提交
5fd6b773af
共有 100 個文件被更改,包括 5718 次插入0 次删除
  1. 165 0
      ucard-cloud/pom.xml
  2. 23 0
      ucard-cloud/src/main/java/com/crm/ucard/UcardApplication.java
  3. 180 0
      ucard-cloud/src/main/java/com/crm/ucard/config/UcardConfig.java
  4. 24 0
      ucard-cloud/src/main/java/com/crm/ucard/config/VaultodyConfig.java
  5. 228 0
      ucard-cloud/src/main/java/com/crm/ucard/config/WasabiConfig.java
  6. 48 0
      ucard-cloud/src/main/java/com/crm/ucard/configuration/FeignConfiguration.java
  7. 66 0
      ucard-cloud/src/main/java/com/crm/ucard/configuration/FeignMultipartSpringFormEncoder.java
  8. 32 0
      ucard-cloud/src/main/java/com/crm/ucard/configuration/FeignMultipartSupportConfig.java
  9. 32 0
      ucard-cloud/src/main/java/com/crm/ucard/controller/CryptoNotifyController.java
  10. 222 0
      ucard-cloud/src/main/java/com/crm/ucard/controller/CustomController.java
  11. 31 0
      ucard-cloud/src/main/java/com/crm/ucard/controller/CustomVaultodyController.java
  12. 486 0
      ucard-cloud/src/main/java/com/crm/ucard/controller/CustomWasabiCardController.java
  13. 36 0
      ucard-cloud/src/main/java/com/crm/ucard/controller/SysCountryController.java
  14. 305 0
      ucard-cloud/src/main/java/com/crm/ucard/controller/UcardApiController.java
  15. 392 0
      ucard-cloud/src/main/java/com/crm/ucard/controller/UcardController.java
  16. 190 0
      ucard-cloud/src/main/java/com/crm/ucard/controller/UcardNotifyController.java
  17. 44 0
      ucard-cloud/src/main/java/com/crm/ucard/controller/UcardWalletController.java
  18. 28 0
      ucard-cloud/src/main/java/com/crm/ucard/controller/VaultodyApiController.java
  19. 523 0
      ucard-cloud/src/main/java/com/crm/ucard/controller/WasabiCardApiController.java
  20. 1076 0
      ucard-cloud/src/main/java/com/crm/ucard/controller/WasabiCardController.java
  21. 90 0
      ucard-cloud/src/main/java/com/crm/ucard/controller/WasabiCardNotifyController.java
  22. 17 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/Card3dsTransactionMapper.java
  23. 39 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardApplyMapper.java
  24. 19 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardBlockchainConfigMapper.java
  25. 20 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardBlockchainRateConfigMapper.java
  26. 18 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardCountryMapper.java
  27. 17 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardCryptoCallbackRecordMapper.java
  28. 19 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardFileMapper.java
  29. 20 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardGlobalAvailableBankCitiesMapper.java
  30. 15 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardGlobalCurrenciesFieldAvailableMapper.java
  31. 18 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardGlobalCurrenciesFieldMapper.java
  32. 26 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardGlobalCurrenciesMapper.java
  33. 23 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardGlobalOrderMapper.java
  34. 15 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardGlobalPaymentOrderMapper.java
  35. 15 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardGlobalStatesMapper.java
  36. 19 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardIdTypeConfigMapper.java
  37. 20 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardKycStatusMapper.java
  38. 32 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardMerchantUserMapper.java
  39. 15 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardOccupationsMapper.java
  40. 17 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardOperateMapper.java
  41. 17 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardPermissionMapper.java
  42. 18 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardRechargeOrderMapper.java
  43. 16 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardTransacOrderMapper.java
  44. 24 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardTypeMapper.java
  45. 17 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardWalletAddressMapper.java
  46. 13 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardWalletMapper.java
  47. 17 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardWalletRecordMapper.java
  48. 17 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardWithdrawMapper.java
  49. 25 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/UcardCardMapper.java
  50. 19 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/UcardCardNumberMapper.java
  51. 9 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/Card3dsTransactionRepository.java
  52. 15 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardActivateRepository.java
  53. 39 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardApplyRepository.java
  54. 11 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardAuthorizationFeeRepository.java
  55. 18 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardBlockchainConfigRepository.java
  56. 17 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardBlockchainRateConfigRepository.java
  57. 10 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardCountryRepository.java
  58. 19 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardFileRepository.java
  59. 10 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardGlobalAvailableBankCitiesRepository.java
  60. 14 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardGlobalCurrenciesFieldAvailableRepository.java
  61. 13 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardGlobalCurrenciesFieldRepository.java
  62. 16 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardGlobalCurrenciesRepository.java
  63. 10 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardGlobalExchangeRateRepository.java
  64. 19 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardGlobalFeeRateConfigRepository.java
  65. 14 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardGlobalOrderDataAvailableRepository.java
  66. 18 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardGlobalOrderDataRepository.java
  67. 26 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardGlobalOrderRepository.java
  68. 10 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardGlobalPayerPayeeRepository.java
  69. 18 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardGlobalPaymentOrderRepository.java
  70. 10 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardGlobalStatesRepository.java
  71. 10 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardGlobalSubmitRepository.java
  72. 18 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardIdTypeConfigRepository.java
  73. 10 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardKycAttachmentRepository.java
  74. 27 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardKycStatusRepository.java
  75. 41 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardMerchantUserRepository.java
  76. 15 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardOperateRepository.java
  77. 19 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardPasswordResetRepository.java
  78. 18 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardPermissionRepository.java
  79. 11 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardRechargeEstimateRepository.java
  80. 22 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardRechargeOrderRepository.java
  81. 26 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardTransacOrderRepository.java
  82. 17 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardTypeConfigRepository.java
  83. 17 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardTypeCurrencyRepository.java
  84. 17 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardTypeRepository.java
  85. 20 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardWalletAddressRepository.java
  86. 15 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardWithdrawRepository.java
  87. 53 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CustomInfoRepository.java
  88. 23 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CustomKycApproveRepository.java
  89. 13 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CustomKycImageRepository.java
  90. 15 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CustomLoginHistoryRepository.java
  91. 39 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CustomLoginRepository.java
  92. 17 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CustomSurveyRepository.java
  93. 36 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/SysConfigRepository.java
  94. 11 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/SysCustomBlackRepository.java
  95. 17 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/SysIpLimitRepository.java
  96. 14 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/SysKycConfigRepository.java
  97. 13 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/SysReasonsRefusalRepository.java
  98. 18 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/SysUserLoginHistoryRepository.java
  99. 15 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/UcardCardNumberRepository.java
  100. 27 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/UcardCardRepository.java

+ 165 - 0
ucard-cloud/pom.xml

@@ -0,0 +1,165 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>com.crm.uacrd</groupId>
+  <artifactId>ucard-cloud</artifactId>
+  <version>1.0-SNAPSHOT</version>
+
+
+    <parent>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-starter-parent</artifactId>
+        <version>1.5.8.RELEASE</version>
+        <relativePath/> <!-- lookup parent fromAccount repository -->
+    </parent>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+        <java.version>1.8</java.version>
+        <spring-cloud.version>Dalston.SR5</spring-cloud.version>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>com.crm.uacrd</groupId>
+            <artifactId>ucard-login-backend</artifactId>
+            <version>1.0-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+        </dependency>
+
+        <!--mybatis-->
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</artifactId>
+            <version>1.3.1</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-eureka</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.cloud</groupId>
+            <artifactId>spring-cloud-starter-feign</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-devtools</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-json</artifactId>
+            <version>5.8.25</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.bouncycastle</groupId>
+            <artifactId>bcprov-jdk15on</artifactId>
+            <version>1.68</version>  <!-- 使用最新版本 -->
+        </dependency>
+
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-all</artifactId>
+            <version>5.8.16</version>
+        </dependency>
+
+        <dependency>
+            <groupId>io.github.openfeign.form</groupId>
+            <artifactId>feign-form</artifactId>
+            <version>3.3.0</version>
+        </dependency>
+        <dependency>
+            <groupId>io.github.openfeign.form</groupId>
+            <artifactId>feign-form-spring</artifactId>
+            <version>3.3.0</version>
+        </dependency>
+
+    </dependencies>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.springframework.cloud</groupId>
+                <artifactId>spring-cloud-dependencies</artifactId>
+                <version>${spring-cloud.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    <outputDirectory>
+                        ${project.build.directory}/../../lib
+                    </outputDirectory>
+                    <layout>ZIP</layout>
+                    <includes>
+                        <include>
+                            <groupId>com.crm.ucard</groupId>
+                            <artifactId>com-crm-ucard</artifactId>
+                        </include>
+                    </includes>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+    <repositories>
+        <repository>
+            <id>spring-snapshots</id>
+            <name>Spring Snapshots</name>
+            <url>https://repo.spring.io/snapshot</url>
+            <snapshots>
+                <enabled>true</enabled>
+            </snapshots>
+        </repository>
+        <repository>
+            <id>spring-milestones</id>
+            <name>Spring Milestones</name>
+            <url>https://repo.spring.io/milestone</url>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+        </repository>
+    </repositories>
+
+    <pluginRepositories>
+        <pluginRepository>
+            <id>spring-snapshots</id>
+            <name>Spring Snapshots</name>
+            <url>https://repo.spring.io/snapshot</url>
+            <snapshots>
+                <enabled>true</enabled>
+            </snapshots>
+        </pluginRepository>
+        <pluginRepository>
+            <id>spring-milestones</id>
+            <name>Spring Milestones</name>
+            <url>https://repo.spring.io/milestone</url>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+        </pluginRepository>
+    </pluginRepositories>
+</project>

+ 23 - 0
ucard-cloud/src/main/java/com/crm/ucard/UcardApplication.java

@@ -0,0 +1,23 @@
+package com.crm.ucard;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.domain.EntityScan;
+import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
+import org.springframework.cloud.netflix.feign.EnableFeignClients;
+import org.springframework.scheduling.annotation.EnableAsync;
+import org.springframework.scheduling.annotation.EnableScheduling;
+
+@SpringBootApplication
+@EnableScheduling
+@EnableAsync
+@EnableEurekaClient
+@EnableFeignClients
+@MapperScan("com.crm.ucard.dao.mapper")
+@EntityScan("com.crm.rely.backend.core.pojo.table")
+public class UcardApplication {
+    public static void main(String[] args) {
+        SpringApplication.run(UcardApplication.class, args);
+    }
+} 

+ 180 - 0
ucard-cloud/src/main/java/com/crm/ucard/config/UcardConfig.java

@@ -0,0 +1,180 @@
+package com.crm.ucard.config;
+
+import lombok.Data;
+/**
+ * Ucard配置类
+ */
+@Data
+public class UcardConfig {
+
+    /**
+     * API基础URL
+     */
+    private String apiUrl;
+
+    /**
+     * 商户ID
+     */
+    private String merchantId;
+
+    /**
+     * 商户私钥
+     */
+    private String privateKey;
+
+    /**
+     * 商户公钥
+     */
+    private String publicKey;
+
+    /**
+     * PayouCard 公钥
+     */
+    private String payouCardPublicKey;
+
+    /**
+     * 申请卡片URL
+     */
+    private String cardApplyUrl;
+
+    /**
+     * 开卡进度查询URL
+     */
+    private String cardStatusUrl;
+
+    /**
+     * 激活卡片URL
+     */
+    private String activateCardUrl;
+
+    /**
+     * 充值预估URL
+     */
+    private String rechargeEstimateUrl;
+
+    /**
+     * 充值URL
+     */
+    private String rechargeUrl;
+
+    /**
+     * 银行卡订单结果查询URL
+     */
+    private String cardOrderUrl;
+
+    /**
+     * 充值订单查询URL
+     */
+    private String rechargeOrderUrl;
+
+    /**
+     * 余额查询URL
+     */
+    private String balanceUrl;
+
+    /**
+     * 交易记录查询URL
+     */
+    private String transactionsUrl;
+
+    /**
+     * 卡片类型列表URL
+     */
+    private String cardTypesUrl;
+
+    /**
+     * 商户账户查询URL
+     */
+    private String merchantAccountUrl;
+
+    /**
+     * 商户用户注册URL
+     */
+    private String merchantUserRegisterUrl;
+
+    /**
+     * 商户用户更新URL
+     */
+    private String merchantUserUpdateUrl;
+
+    /**
+     * KYC附件上传URL
+     */
+    private String kycAttachmentUrl;
+
+    /**
+     * KYC提交URL
+     */
+    private String kycSubmitUrl;
+
+    /**
+     * KYC状态查询URL
+     */
+    private String kycStatusUrl;
+
+    /**
+     * 密码重置URL
+     */
+    private String passwordResetUrl;
+
+    /**
+     * 卡片冻结URL
+     */
+    private String freezeCardUrl;
+
+    /**
+     * 卡片解冻URL
+     */
+    private String unfreezeCardUrl;
+
+    /**
+     * 速汇银行列表URL
+     */
+    private String bankListUrl;
+
+    /**
+     * 汇率查询URL
+     */
+    private String exchangeRateUrl;
+
+    /**
+     * 代付校验URL
+     */
+    private String validateTransferUrl;
+
+    /**
+     * 代付付款人校验URL
+     */
+    private String validatePayerUrl;
+
+    /**
+     * 代付收款人校验URL
+     */
+    private String validatePayeeUrl;
+
+    /**
+     * 代付URL
+     */
+    private String transferUrl;
+
+    /**
+     * 订单列表查询URL
+     */
+    private String orderListUrl;
+
+    /**
+     * 调单提交URL
+     */
+    private String disputeUrl;
+
+    /**
+     * 查询订单结果URL
+     */
+    private String orderResultUrl;
+
+    /**
+     * 上传文件URL
+     */
+    private String uplaodFileUrl;
+
+} 

+ 24 - 0
ucard-cloud/src/main/java/com/crm/ucard/config/VaultodyConfig.java

@@ -0,0 +1,24 @@
+package com.crm.ucard.config;
+
+import lombok.Data;
+
+@Data
+public class VaultodyConfig {
+
+    private String apiKey;
+
+    private String apiSecret;
+
+    private String passphrase;
+
+    private String method;
+
+    private String vaultId;
+
+    private String baseUrl;
+
+    private String network;
+
+    private String addressPathTemplate;
+
+}

+ 228 - 0
ucard-cloud/src/main/java/com/crm/ucard/config/WasabiConfig.java

@@ -0,0 +1,228 @@
+package com.crm.ucard.config;
+
+import lombok.Data;
+
+@Data
+public class WasabiConfig {
+
+    /**
+     * API基础URL
+     */
+    public String apiUrl;
+
+    /**
+     * 商户身份的唯一标识
+     */
+    public String apiKey;
+
+    /**
+     * 商户RSA私钥
+     */
+    public String privateKey;
+
+    /**
+     * 商户RSA公钥
+     */
+    public String publicKey;
+
+    /**
+     * wasabi 公钥
+     */
+    public String wsbPublicKey;
+
+    /**
+     * 商户的标识,可自定义
+     */
+    public String merchantTag;
+
+    /**
+     * 国家/地区列表
+     */
+    private String regionUrl;
+
+    /**
+     * 城市列表
+     */
+    private String cityUrl;
+
+    /**
+     * 城市列表-v2 URL
+     */
+    private String cityV2Url;
+
+    /**
+     * 手机区号列表
+     */
+    private String mobileAreaUrl;
+
+    /**
+     * 上传文件URL
+     */
+    private String fileUploadUrl;
+
+    /**
+     * 工单-提交URL
+     */
+    private String workSubmitUrl;
+
+    /**
+     * 工单列表URL
+     */
+    private String workListUrl;
+
+    /**
+     * 账户资产URL
+     */
+    private String accountInfoUrl;
+
+    /**
+     * 钱包充值URL
+     */
+    private String walletDepositUrl;
+
+    /**
+     * 钱包充值交易记录URL
+     */
+    private String walletDepositTransactionUrl;
+
+    /**
+     * 支持的卡BIN URL
+     */
+    private String cardTypesUrl;
+
+    /**
+     * 开卡URL
+     */
+    private String openCardUrl;
+
+    /**
+     * 激活URL
+     */
+    private String activeCardUrl;
+
+    /**
+     * 卡信息URL
+     */
+    private String cardInfoUrl;
+
+    /**
+     * 卡敏感信息URL
+     */
+    private String cardSensitiveUrl;
+
+    /**
+     * 卡余额URL
+     */
+    private String cardBalanceInfoUrl;
+
+    /**
+     * 卡冻结-v2 URL
+     */
+    private String cardFreezeV2Url;
+
+    /**
+     * 卡解冻-v2 URL
+     */
+    private String cardUnfreezeV2Url;
+
+    /**
+     * 卡充值URL
+     */
+    private String cardDepositUrl;
+
+    /**
+     * 更新PIN URL
+     */
+    private String updatePinUrl;
+
+    /**
+     * 卡交易记录查询URL
+     */
+    private String cardTransactionUrl;
+
+    /**
+     * 卡授权交易记录查询URL
+     */
+    private String cardAuthTransactionUrl;
+
+    /**
+     * 卡3ds记录查询URL
+     */
+    private String third3dsTransactionUrl;
+
+    /**
+     * 持卡人-职业URL
+     */
+    private String holderOccupationsUrl;
+
+    /**
+     * 持卡人-创建-v2 URL
+     */
+    private String holderCreateV2Url;
+
+    /**
+     * 持卡人-更新-v2 URL
+     */
+    private String holderUpdateV2Url;
+
+    /**
+     * 持卡人-查询URL
+     */
+    private String holderQueryUrl;
+
+    /**
+     * 卡扣款
+     */
+    private String cardWithdrawUrl;
+
+    /**
+     * 销卡
+     */
+    private String cardCancelUrl;
+
+    /**
+     * 支持的币种
+     */
+    private String availableCurrenciesUrl;
+
+    /**
+     * 币种发送交易需要的字段
+     */
+    private String availableFieldParamsUrl;
+
+    /**
+     * 省份/州列表
+     */
+    private String statesUrl;
+
+    /**
+     * 银行城市名单
+     */
+    private String availableBankCitiesUrl;
+
+    /**
+     * 法币汇率
+     */
+    private String exchangeRateUrl;
+
+    /**
+     * 发送交易
+     */
+    private String transactionTransferUrl;
+
+    /**
+     * 交易记录
+     */
+    private String transactionListUrl;
+
+    /**
+     * 交易记录详情
+     */
+    private String transactionDetailUrl;
+
+    /**
+     * 提交合规性检查资料
+     */
+    private String submitRfiUrl;
+
+}

+ 48 - 0
ucard-cloud/src/main/java/com/crm/ucard/configuration/FeignConfiguration.java

@@ -0,0 +1,48 @@
+package com.crm.ucard.configuration;
+
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.exception.ServiceException;
+import com.crm.rely.backend.service.RedisService;
+import com.crm.rely.backend.util.UUIDUtil;
+import com.google.common.base.Strings;
+import feign.RequestInterceptor;
+import feign.RequestTemplate;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+
+@Configuration
+public class FeignConfiguration implements RequestInterceptor {
+
+    @Autowired
+    private RedisService redisService;
+
+    @Override
+    public void apply(RequestTemplate requestTemplate) {
+       ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+        String token = null;
+        String language = null;
+        if (null != attributes) {
+            HttpServletRequest request = attributes.getRequest();
+            token = request.getHeader(Constants.ACCESS_TOKEN);
+            language = request.getHeader(Constants.Language);
+        }
+
+        String feignToken = UUIDUtil.getUUID();
+        if (Strings.isNullOrEmpty(token)) {
+            token = feignToken;
+        }
+        requestTemplate.header(Constants.ACCESS_TOKEN, token);
+        requestTemplate.header(Constants.Feign_Token, feignToken);
+        requestTemplate.header(Constants.Language, language);
+
+        try {
+            redisService.saveObject(feignToken, token, Constants.Feign_Token_TIME);
+        } catch (ServiceException e) {
+            e.printStackTrace();
+        }
+    }
+}

+ 66 - 0
ucard-cloud/src/main/java/com/crm/ucard/configuration/FeignMultipartSpringFormEncoder.java

@@ -0,0 +1,66 @@
+package com.crm.ucard.configuration;
+
+import feign.RequestTemplate;
+import feign.codec.EncodeException;
+import feign.codec.Encoder;
+import feign.form.FormEncoder;
+import feign.form.MultipartFormContentProcessor;
+import feign.form.spring.SpringManyMultipartFilesWriter;
+import feign.form.spring.SpringSingleMultipartFileWriter;
+import lombok.val;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.lang.reflect.Type;
+
+import static feign.form.ContentType.MULTIPART;
+import static java.util.Collections.singletonMap;
+
+/**
+ * @Author: houn
+ * @Date: 2020/9/4 21:22
+ * @Description:
+ */
+public class FeignMultipartSpringFormEncoder extends FormEncoder {
+
+    /**
+     * Constructor with the default Feign's encoder as a delegate.
+     */
+    public FeignMultipartSpringFormEncoder() {
+        this(new Default());
+    }
+
+    /**
+     * Constructor with specified delegate encoder.
+     *
+     * @param delegate delegate encoder, if this encoder couldn't encode object.
+     */
+    public FeignMultipartSpringFormEncoder(Encoder delegate) {
+        super(delegate);
+
+        val processor = (MultipartFormContentProcessor) getContentProcessor(MULTIPART);
+        processor.addWriter(new SpringSingleMultipartFileWriter());
+        processor.addWriter(new SpringManyMultipartFilesWriter());
+    }
+
+    @Override
+    public void encode(Object object, Type bodyType, RequestTemplate template) throws EncodeException {
+        if (bodyType.equals(MultipartFile.class)) {
+            // 单MultipartFile判断
+            val file = (MultipartFile) object;
+            val data = singletonMap(file.getName(), object);
+            super.encode(data, MAP_STRING_WILDCARD, template);
+            return;
+
+        } else if (bodyType.equals(MultipartFile[].class)) {
+            // MultipartFile数组处理
+            val file = (MultipartFile[]) object;
+            if (file != null) {
+                val data = singletonMap(file.length == 0 ? "" : file[0].getName(), object);
+                super.encode(data, MAP_STRING_WILDCARD, template);
+                return;
+            }
+        }
+        // 其他类型调用父类默认处理方法
+        super.encode(object, bodyType, template);
+    }
+}

+ 32 - 0
ucard-cloud/src/main/java/com/crm/ucard/configuration/FeignMultipartSupportConfig.java

@@ -0,0 +1,32 @@
+package com.crm.ucard.configuration;
+
+import feign.codec.Encoder;
+import org.springframework.beans.factory.ObjectFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.web.HttpMessageConverters;
+import org.springframework.cloud.netflix.feign.support.SpringEncoder;
+import org.springframework.context.annotation.*;
+
+/**
+ * @Author: houn
+ * @Date: 2020/9/4 18:20
+ * @Description:
+ */
+@Configuration
+public class FeignMultipartSupportConfig {
+    @Autowired
+    private ObjectFactory<HttpMessageConverters> messageConverters;
+
+    @Bean
+    @Primary
+    @Scope("prototype")
+    public Encoder multipartFormEncoder() {
+        // 为Encoder注入messageConverters
+        return new FeignMultipartSpringFormEncoder(new SpringEncoder(messageConverters));
+    }
+
+    @Bean
+    public feign.Logger.Level multipartLoggerLevel() {
+        return feign.Logger.Level.FULL;
+    }
+}

+ 32 - 0
ucard-cloud/src/main/java/com/crm/ucard/controller/CryptoNotifyController.java

@@ -0,0 +1,32 @@
+package com.crm.ucard.controller;
+
+import com.alibaba.fastjson.JSON;
+import com.crm.rely.backend.core.dto.wasabi.WasabiNotifyResultDto;
+import com.crm.rely.backend.core.entity.ucard.crypto.currency.callback.CryptoAddressCallbackEntity;
+import com.crm.ucard.service.CryptoService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+@Slf4j
+@RestController
+@RequestMapping("/crypto")
+public class CryptoNotifyController {
+
+    @Autowired
+    private CryptoService cryptoService;
+
+    @PostMapping("/callback")
+    public WasabiNotifyResultDto notify(@RequestBody CryptoAddressCallbackEntity entity) throws Exception {
+        try {
+            log.info("crypto回调通知开始:" + JSON.toJSONString(entity));
+            cryptoService.notify(entity);
+            log.info("crypto回调通知结束");
+            return WasabiNotifyResultDto.success();
+        } catch (Exception e) {
+            log.error("crypto回调通知处理失败", e);
+            return WasabiNotifyResultDto.error();
+        }
+    }
+
+}

+ 222 - 0
ucard-cloud/src/main/java/com/crm/ucard/controller/CustomController.java

@@ -0,0 +1,222 @@
+package com.crm.ucard.controller;
+
+import com.alibaba.fastjson.*;
+import com.crm.login.rely.backend.controller.*;
+import com.crm.rely.backend.core.constant.*;
+import com.crm.rely.backend.core.dto.base.*;
+import com.crm.rely.backend.core.dto.custom.*;
+import com.crm.rely.backend.core.dto.ib.info.*;
+import com.crm.rely.backend.core.entity.custom.info.*;
+import com.crm.rely.backend.exception.*;
+import com.crm.rely.backend.service.*;
+import com.crm.rely.backend.util.*;
+import com.crm.ucard.service.*;
+import lombok.extern.log4j.*;
+import org.springframework.beans.*;
+import org.springframework.beans.factory.annotation.*;
+import org.springframework.validation.annotation.*;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.servlet.*;
+import org.springframework.web.servlet.support.*;
+
+import javax.servlet.http.*;
+import java.math.*;
+import java.util.*;
+
+/**
+ * @program: crm-backend
+ * @description:
+ * @author: houn
+ * @create: 2019-07-25 15:57
+ */
+@Log4j
+@RestController
+@RequestMapping("/custom")
+public class CustomController extends BaseLoginController {
+
+    @Autowired
+    private SysCountryService sysCountryService;
+
+    @Autowired
+    private CustomInfoService  customInfoService;
+
+    @Autowired
+    private EmailService emailService;
+
+    /**
+     * 退出登录
+     *
+     * @param httpServletRequest
+     * @throws Exception
+     */
+    @Override
+    @PostMapping("/logout")
+    public BaseResultDto logout(HttpServletRequest httpServletRequest) throws Exception {
+
+        return super.logout(httpServletRequest);
+    }
+
+    /**
+     * 登录信息
+     *
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/login")
+    public BaseResultDto login(@RequestBody @Validated CustomInfoLoginEntity entity, HttpServletRequest request,
+                               HttpServletResponse response, HttpSession session) throws Exception {
+        entity.setLoginName(entity.getLoginName().toLowerCase());
+
+        log.info(String.format("login request,username:%s,ip:%s,CLIENT_IP:%s,time:%s",
+                entity.getLoginName(), GetIpAndMac.getIp(request), GetIpAndMac.getClientIp(request),
+                DateUtil.formatTime()));
+
+        //密码处理为
+        entity.setPassword(MD5Util.getMD5(entity.getPassword()));
+
+        /**
+         * 处理登录时间 登录ip 登录地区
+         */
+        entity.setIp(GetIpAndMac.getIp(request));
+        String returnStr = sysCountryService.getAdderByIp(entity.getIp());
+
+        entity.setAddress(returnStr);
+        entity.setTime(new Date());
+
+        InfoEntity infoEntity = customInfoService.login(entity);
+
+        infoEntity.setPrefix(PrefixEnum.PREFIX_CUSTOM);
+
+        String accessToken = super.login(infoEntity, entity.getSource());
+        setLocaleResolver(infoEntity.getCustomInfo().getLang(), request, response);
+
+        return BaseResultDto.success(Constants.LOGIN_SUCCESS, accessToken);
+    }
+
+    /**
+     * 获取登录信息
+     *
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/info")
+    public BaseResultDto info(InfoEntity entity) {
+
+        InfoDto infoDto = new InfoDto();
+
+        BeanUtils.copyProperties(entity, infoDto);
+
+        if (entity.getCustomInfo() != null) {
+            CustomInfoDto customInfoDto = new CustomInfoDto();
+            BeanUtils.copyProperties(entity.getCustomInfo(), customInfoDto);
+            infoDto.setCustomInfo(customInfoDto);
+        } else {
+            infoDto.setCustomInfo(null);
+        }
+
+        if (entity.getIbInfo() != null) {
+            IbInfoDto ibInfoDto = new IbInfoDto();
+            BeanUtils.copyProperties(entity.getIbInfo(), ibInfoDto);
+            infoDto.setIbInfo(ibInfoDto);
+        } else {
+            infoDto.setIbInfo(null);
+        }
+
+//        setLocaleResolver(entity.getCustomInfo().getLang(), request, response);
+
+        return BaseResultDto.success(infoDto);
+    }
+
+    /**
+     * 登录修改密码
+     *
+     * @param entity
+     * @param req
+     * @param infoEntity
+     * @return
+     */
+    @PostMapping("/update/login/password")
+    public BaseResultDto updatePassword(@RequestBody @Validated CustomUpdateLoginPasswordEntity entity,
+                                        HttpServletRequest req, InfoEntity infoEntity) throws Exception {
+
+        entity.setId(infoEntity.getCustomInfo().getId());
+        if (entity.getNewPassword().equals(entity.getOldPassword())) {
+            return BaseResultDto.error(Constants.PASSWORD_NEW_AND_OLD_IDENTICAL_ERROR);
+        }
+
+        entity.setModifyIp(GetIpAndMac.getIp(req));
+        entity.setModifyTime(new Date());
+        entity.setModifyUser(infoEntity.getId());
+        entity.setNewPassword(MD5Util.getMD5(entity.getNewPassword()));
+        entity.setOldPassword(MD5Util.getMD5(entity.getOldPassword()));
+
+        customInfoService.updatePassword(entity);
+        return BaseResultDto.success(Constants.UPDATE_SUCCESS);
+    }
+
+    private void setLocaleResolver(String lang, HttpServletRequest request, HttpServletResponse response) {
+        LocaleResolver localeResolver = RequestContextUtils.getLocaleResolver(request);
+        try {
+            if ("cn".equals(lang)) {
+
+                localeResolver.setLocale(request, response, new Locale("zh", "CN"));
+            } else {
+                localeResolver.setLocale(request, response, new Locale("en", "US"));
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * 未登录修改密码发送邮件
+     *
+     * @param entity
+     * @param req
+     * @return
+     */
+    @PostMapping("/update/password/send/email")
+    public BaseResultDto updatePasswordSendEmail(@RequestBody @Validated CustomUpdatePasswordSendEmailEntity entity,
+                                                 HttpServletRequest req) throws Exception {
+        String ip = GetIpAndMac.getIp(req);
+        emailService.validate(ip, EmailSendEnum.FORGET_PASSWORD.getCode(), ip);
+
+        entity.setIp(ip);
+        entity.setTime(new Date());
+        customInfoService.updatePasswordSendEmail(entity);
+
+        return BaseResultDto.success(Constants.SEND_SUCCESS);
+    }
+
+    /**
+     * 未登录根据邮件修改密码
+     *
+     * @param entity
+     * @param req
+     * @return
+     */
+    @PostMapping("/update/email/password")
+    public BaseResultDto updatePassword(@RequestBody @Validated CustomUpdateEmailPasswordEntity entity,
+                                        HttpServletRequest req) throws Exception {
+
+        log.info(String.format("updatePassword:%s",JSON.toJSONString(entity)));
+        entity.setModifyIp(GetIpAndMac.getIp(req));
+        entity.setModifyTime(new Date());
+        entity.setPassword(MD5Util.getMD5(entity.getPassword()));
+
+        customInfoService.updatePassword(entity);
+
+        return BaseResultDto.success(Constants.SUCCESS);
+    }
+
+    @RequestMapping("/get/balance")
+    public BaseResultDto balance(InfoEntity infoEntity) throws ServiceException {
+
+        BigDecimal balance = customInfoService.getBalance(infoEntity.getCustomInfo().getId());
+
+        return BaseResultDto.success(balance);
+    }
+
+}

+ 31 - 0
ucard-cloud/src/main/java/com/crm/ucard/controller/CustomVaultodyController.java

@@ -0,0 +1,31 @@
+package com.crm.ucard.controller;
+
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.entity.ucard.crypto.currency.vaultody.VaultodyGenerateDepositAddressEntity;
+import com.crm.ucard.service.*;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * 加密货币服务
+ */
+@Slf4j
+@RestController
+@RequestMapping("/vaultody/custom")
+public class CustomVaultodyController {
+
+    @Autowired
+    private VaultodyService vaultodyService;
+
+    /**
+     * 生成钱包地址
+     * @param entity:
+     * @return void
+     */
+    @PostMapping("/generate/deposit/address")
+    public BaseResultDto generateDepositAddress(@RequestBody VaultodyGenerateDepositAddressEntity entity) throws Exception {
+        return vaultodyService.generateDepositAddress(entity);
+    }
+
+}

+ 486 - 0
ucard-cloud/src/main/java/com/crm/ucard/controller/CustomWasabiCardController.java

@@ -0,0 +1,486 @@
+package com.crm.ucard.controller;
+
+import com.crm.rely.backend.core.constant.FeignClientAnnotation;
+import com.crm.rely.backend.core.dto.base.*;
+import com.crm.rely.backend.core.dto.ucard.*;
+import com.crm.rely.backend.core.dto.wasabi.*;
+import com.crm.rely.backend.core.entity.base.*;
+import com.crm.rely.backend.core.entity.custom.info.InfoEntity;
+import com.crm.rely.backend.core.entity.custom.kyc.WebsdkLinkAliEntity;
+import com.crm.rely.backend.core.entity.ucard.*;
+import com.crm.rely.backend.core.entity.wasabi.*;
+import com.crm.rely.backend.exception.ServiceException;
+import com.crm.rely.backend.util.GetIpAndMac;
+import com.crm.ucard.service.*;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.List;
+
+/**
+ * 银行卡服务接口
+ */
+@Slf4j
+@RestController
+@RequestMapping("/wasabi/custom")
+public class CustomWasabiCardController {
+
+    @Autowired
+    private UcardService ucardService;
+    @Autowired
+    private WasabiCardService wasabiCardService;
+    @Autowired
+    private UcardApiService ucardApiService;
+
+    /**
+     * 商户用户注册
+     */
+    @PostMapping("/merchant/user/register")
+    @FeignClientAnnotation
+    public BaseResultDto registerMerchantUser(@RequestBody CardMerchantUserEntity request, InfoEntity entity, HttpServletRequest servletRequest) throws ServiceException {
+        String ip = GetIpAndMac.getIp(servletRequest);
+        request.setIpAddress(ip);
+        request.setCustomId(entity.getCustomInfo().getId());
+        request.setCId(entity.getCustomInfo().getCId());
+        request.setOperateUser(entity.getCustomInfo().getCId());
+        return wasabiCardService.registerMerchantUser(request);
+    }
+
+    /**
+     * 更新商户用户信息
+     */
+    @PostMapping("/merchant/user/update")
+    @FeignClientAnnotation
+    public BaseResultDto updateMerchantUser(@RequestBody CardMerchantUserEntity request, InfoEntity entity) throws ServiceException {
+        request.setCustomId(entity.getCustomInfo().getId());
+        request.setCId(entity.getCustomInfo().getCId());
+        request.setOperateUser(entity.getCustomInfo().getCId());
+        return wasabiCardService.updateMerchantUser(request);
+    }
+
+    /**
+     * 更新用户邮寄地址
+     */
+    @PostMapping("/merchant/user/address/update")
+    @FeignClientAnnotation
+    public BaseResultDto updateUserMailingAddress(@RequestBody WasabiSaveUserMailingAddressEntity request) throws ServiceException {
+        return wasabiCardService.updateUserMailingAddress(request);
+    }
+
+    /**
+     * 查看用户详情
+     */
+    @PostMapping("/merchant/user/single")
+    @FeignClientAnnotation
+    public BaseResultDto merchantUserSingle(InfoEntity infoEntity) throws Exception {
+        return wasabiCardService.merchantUserSingle(infoEntity.getCustomInfo().getId());
+    }
+
+    /**
+     * 用户获取卡片类型
+     */
+    @PostMapping("/card/types/list")
+    @FeignClientAnnotation
+    public BaseResultDto getCardTypeList(@RequestBody CardTypeEntity entity, InfoEntity infoEntity) throws ServiceException {
+        entity.setCId(infoEntity.getCustomInfo().getCId());
+        return BaseResultDto.success(wasabiCardService.getCardTypeList(entity));
+    }
+
+    /**
+     * 申请开卡
+     */
+    @PostMapping("/card/apply")
+    @FeignClientAnnotation
+    public BaseResultDto applyCard(@RequestBody CardApplyEntity request, InfoEntity infoEntity) throws Exception {
+        request.setCId(infoEntity.getCustomInfo().getCId());
+        return wasabiCardService.applyCard(request);
+    }
+
+    /**
+     * 获取卡片申请列表
+     */
+    @PostMapping("/card/apply/page")
+    @FeignClientAnnotation
+    public ResultWithPagerDto<CardApplyDto> getCardApplyPageList(@RequestBody CardApplyPageEntity entity) throws ServiceException {
+        return ucardService.getCardApplyPageList(entity);
+    }
+
+    /**
+     * 获取卡片申请详情
+     */
+    @PostMapping("/card/apply/details")
+    @FeignClientAnnotation
+    public BaseResultDto cardApplyDetails(@RequestBody BaseEntity entity) throws ServiceException {
+        return wasabiCardService.cardApplyDetails(entity);
+    }
+
+    /**
+     * 查询开卡进度
+     */
+    @PostMapping("/card/apply/progress")
+    @FeignClientAnnotation
+    public BaseResultDto queryApplyProgress(@RequestBody CardApplyProgressEntity request) throws Exception {
+        return wasabiCardService.queryApplyProgress(request);
+    }
+
+    /**
+     * 获取我的卡片列表
+     */
+    @PostMapping("/card/list")
+    @FeignClientAnnotation
+    public BaseResultDto getCardList(@RequestBody CardPageEntity entity, InfoEntity infoEntity) throws ServiceException {
+        entity.setCId(infoEntity.getCustomInfo().getCId());
+        return BaseResultDto.success(ucardApiService.getCardList(entity));
+    }
+
+    /**
+     * 获取卡片详情
+     */
+    @PostMapping("/card/single")
+    @FeignClientAnnotation
+    public BaseResultDto getCardSingle(@RequestBody SingleLongEntity entity) throws ServiceException {
+        return BaseResultDto.success(ucardApiService.getCardSingle(entity));
+    }
+
+    /**
+     * 银行卡激活
+     */
+    @PostMapping("/card/activate")
+    @FeignClientAnnotation
+    public BaseResultDto<WasabiActiveCardDto> activateCard(@RequestBody WasabiActiveCardEntity request,
+                                                           InfoEntity infoEntity) throws ServiceException {
+        request.setCId(infoEntity.getCustomInfo().getCId());
+        return wasabiCardService.activeCard(request);
+    }
+
+    /**
+     * 银行卡充值
+     */
+    @PostMapping("/card/recharge")
+    @FeignClientAnnotation
+    public BaseResultDto rechargeCard(@RequestBody WasabiBalanceEntity request, InfoEntity infoEntity) throws ServiceException {
+        request.setCId(infoEntity.getCustomInfo().getCId());
+        return wasabiCardService.cardDeposit(request);
+    }
+
+    /**
+     * 查询用户钱包余额
+     */
+    @PostMapping("/card/wallet/balance")
+    @FeignClientAnnotation
+    public BaseResultDto<WalletBalanceDto> walletBalance(@RequestBody WalletBalanceEntity request) throws ServiceException {
+        return wasabiCardService.walletBalance(request);
+    }
+
+    /**
+     * 获取用户钱包记录列表
+     */
+    @PostMapping("/card/wallet/record/page")
+    @FeignClientAnnotation
+    public ResultWithPagerDto<CardWalletRecordDto> getCardWalletRecordPageList(@RequestBody CardWalletRecordPageEntity entity) throws ServiceException {
+        return wasabiCardService.getCardWalletRecordPageList(entity);
+    }
+
+    /**
+     * 充值记录分页查询
+     */
+    @PostMapping("/card/recharge/page")
+    @FeignClientAnnotation
+    public BaseReportResultDto<List<CardRechargeOrderDto>, CardRechargeOrderSumDto> queryRechargePageList(@RequestBody CardRechargePageEntity entity) throws ServiceException {
+        return ucardService.queryRechargePageList(entity);
+    }
+
+    /**
+     * 查询卡片余额
+     */
+    @PostMapping("/card/balance")
+    @FeignClientAnnotation
+    public BaseResultDto<WasabiBalanceInfoDto> queryCardBalance(@RequestBody WasabiBalanceInfoEntity request) throws ServiceException {
+        return wasabiCardService.getBalanceInfo(request);
+    }
+
+    /**
+     * 查询充值订单
+     */
+    @PostMapping("/card/recharge/order")
+    @FeignClientAnnotation
+    public BaseResultDto queryRechargeOrder(@RequestBody CardRechargeOrderQueryEntity request) throws Exception {
+        return wasabiCardService.queryDepositOrder(request);
+    }
+
+
+    /**
+     * 冻结卡片
+     */
+    @PostMapping("/card/freeze")
+    @FeignClientAnnotation
+    public BaseResultDto freezeCard(@RequestBody WasabiFreezeAndUnfreezeEntity request, InfoEntity infoEntity) throws Exception {
+        request.setCId(infoEntity.getCustomInfo().getCId());
+        return wasabiCardService.cardFreeze(request);
+    }
+
+    /**
+     * 解冻卡片
+     */
+    @PostMapping("/card/unfreeze")
+    @FeignClientAnnotation
+    public BaseResultDto unfreezeCard(@RequestBody WasabiFreezeAndUnfreezeEntity request, InfoEntity infoEntity) throws Exception {
+        request.setCId(infoEntity.getCustomInfo().getCId());
+        return wasabiCardService.cardUnfreeze(request);
+    }
+
+    /**
+     * 找回密码
+     */
+    @PostMapping("/card/password/reset")
+    @FeignClientAnnotation
+    public BaseResultDto<WasabiUpdatePinDto> resetPassword(@RequestBody WasabiUpdatePinEntity entity,
+                                                           InfoEntity infoEntity) throws ServiceException {
+        entity.setCId(infoEntity.getCustomInfo().getCId());
+        return wasabiCardService.updatePin(entity);
+    }
+
+    /**
+     * 校验文件
+     */
+    @PostMapping("/validated/file")
+    @FeignClientAnnotation
+    public void validatedFile(@RequestParam(value = "file") MultipartFile file) throws ServiceException {
+        wasabiCardService.validatedFile(file);
+    }
+
+    /**
+     * 查询国家和城市
+     */
+    @PostMapping("/card/country")
+    @FeignClientAnnotation
+    public BaseResultDto getCardCountry(@RequestBody CardCountryEntity request) throws ServiceException {
+        request.setCardCategory(2);
+        return BaseResultDto.success(ucardService.getCardCountryList(request));
+    }
+
+    /**
+     * 查询职业信息
+     */
+    @PostMapping("/card/occupation/list")
+    @FeignClientAnnotation
+    public BaseResultDto<List<WasabiOccupationsDto>> getOccupationList() throws ServiceException {
+        return wasabiCardService.getOccupationList();
+    }
+
+    /**
+     * 查询交易记录分页列表
+     */
+    @PostMapping("/card/transac/page")
+    @FeignClientAnnotation
+    public ResultWithPagerDto<CardTransacOrderDto> getTransactionPageList(@RequestBody CardTransacOrderPageEntity request) throws ServiceException {
+        return ucardService.getTransacOrderPageList(request);
+    }
+
+    /**
+     * 权限验证
+     */
+    @PostMapping("/card/permission/verify")
+    @FeignClientAnnotation
+    public BaseResultDto permissionVerify(InfoEntity entity) throws ServiceException {
+        return wasabiCardService.permissionVerify(entity.getCustomInfo());
+    }
+
+    /**
+     * 身份认证获取web链接
+     * @param entity
+     * @return
+     */
+    @PostMapping("/getWebsdkLink")
+    public BaseResultDto getWebsdkLink(@RequestBody WebsdkLinkAliEntity entity, InfoEntity infoEntity) throws Exception {
+        return wasabiCardService.getWebsdkLink(entity, infoEntity.getCustomInfo().getId());
+    }
+
+    /**
+     * 扫码上传文件
+     */
+    @PostMapping("/scan/upload/file")
+    @FeignClientAnnotation
+    public BaseResultDto scanUpload(@RequestBody CardWebSocketEntity entity) throws ServiceException {
+        return wasabiCardService.scanUpload(entity);
+    }
+
+    /**
+     * 证件类型配置列表
+     *
+     * @param entity
+     * @return
+     */
+    @PostMapping("/card/id/type/config/list")
+    @FeignClientAnnotation
+    public ResultWithPagerDto<CardIdTypeConfigDto> getCardIdTypeConfigList(@RequestBody CardIdTypeConfigPageEntity entity) throws ServiceException {
+        return wasabiCardService.getCardIdTypeConfigList(entity);
+    }
+
+    /**
+     * 查询支持的城市列表
+     */
+    @PostMapping("/global/query/bank/cities")
+    @FeignClientAnnotation
+    public BaseResultDto queryBankCities(@RequestBody CardBankCitiesEntity entity) throws ServiceException {
+        return wasabiCardService.queryBankCities(entity);
+    }
+
+    /**
+     * 查询CVV 发送短信验证码
+     */
+    @PostMapping("/query/cvv/send/code")
+    @FeignClientAnnotation
+    public void queryCvvSendCode(@RequestBody @Validated CardQueryCvvSendEmailCodeEntity entity) throws Exception {
+        wasabiCardService.queryCvvSendCode(entity);
+    }
+
+    /**
+     * 验证邮箱验证码查询cvv
+     */
+    @PostMapping("/query/cvv/verify/code")
+    @FeignClientAnnotation
+    public BaseResultDto queryCvvVerifyCode(@RequestBody @Validated CardQueryCvvVerifyEmailCodeEntity entity) throws Exception {
+        return wasabiCardService.queryCvvVerifyCode(entity);
+    }
+
+    /**
+     * 查询汇率
+     */
+    @PostMapping("/global/query/exchange/rate")
+    @FeignClientAnnotation
+    public BaseResultDto queryExchangeRate(@RequestBody GlobalQueryExchangeRateEntity entity) throws ServiceException {
+        return BaseResultDto.success(wasabiCardService.queryExchangeRate(entity));
+    }
+
+    /**
+     * 查询账户信息
+     */
+    @PostMapping("/card/account/dropdown")
+    @FeignClientAnnotation
+    public BaseResultDto cardAccountDropdown(@RequestBody CardAccountDropdownEntity entity) throws ServiceException {
+        return wasabiCardService.cardAccountDropdown(entity);
+    }
+
+    /**
+     * 创建交易订单
+     */
+    @PostMapping("/global/create/order")
+    @FeignClientAnnotation
+    public BaseResultDto globalCreateOrder(@RequestBody GlobalCreateOrderEntity entity) throws Exception {
+        return wasabiCardService.globalCreateOrder(entity);
+    }
+
+    /**
+     * 速汇订单分页列表
+     */
+    @PostMapping("/global/order/page/list")
+    @FeignClientAnnotation
+    public ResultWithPagerDto<GlobalOrderDto> globalOrderPageList(@RequestBody GlobalOrderPageEntity entity) throws Exception {
+        return wasabiCardService.globalOrderPageList(entity);
+    }
+
+    /**
+     * 取消交易订单
+     */
+    @PostMapping("/global/cancel/order")
+    @FeignClientAnnotation
+    public BaseResultDto globalCancelOrder(@RequestBody GlobalCancelOrderEntity entity) throws Exception {
+        return wasabiCardService.globalCancelOrder(entity);
+    }
+
+    /**
+     * 补充资料
+     */
+    @PostMapping("/global/supplementary/data")
+    @FeignClientAnnotation
+    public BaseResultDto supplementaryData(@RequestBody WasabiTransactionSubmitRfiEntity entity) throws Exception {
+        return wasabiCardService.supplementaryData(entity);
+    }
+
+    /**
+     * 支持的币种列表
+     */
+    @PostMapping("/global/currencies/dropdown")
+    @FeignClientAnnotation
+    public BaseResultDto getCurrenciesDropdown(@RequestBody GlobalCurrenciesDropdownEntity entity) throws ServiceException {
+        return wasabiCardService.getCurrenciesDropdown(entity);
+    }
+
+    /**
+     * 币种字段和可选值列表
+     */
+    @PostMapping("/global/currencies/field/list")
+    @FeignClientAnnotation
+    public BaseResultDto getCurrenciesFieldList(@RequestBody @Validated GlobalCurrenciesFieldListEntity entity) throws ServiceException {
+        return wasabiCardService.getCurrenciesFieldList(entity);
+    }
+
+    /**
+     * 查询速汇订单详情
+     */
+    @PostMapping("/global/order/details")
+    @FeignClientAnnotation
+    public BaseResultDto queryGlobalOrderDetails(@RequestBody BaseEntity entity) throws ServiceException {
+        return wasabiCardService.queryGlobalOrderDetails(entity);
+    }
+
+    /**
+     * 速汇查询用户详情
+     */
+    @PostMapping("/global/user/details")
+    @FeignClientAnnotation
+    public BaseResultDto findGlobalUserDetails(InfoEntity entity) throws ServiceException {
+        return wasabiCardService.findGlobalUserDetails(entity);
+    }
+
+    /**
+     * 获取收款用户列表
+     */
+    @PostMapping("/global/receiver/user/list")
+    @FeignClientAnnotation
+    BaseResultDto getGlobalReceiverUserList(@RequestBody GlobalReceiverUserEntity entity) throws ServiceException {
+        return wasabiCardService.getGlobalReceiverUserList(entity);
+    }
+
+    /**
+     * 删除收款用户
+     */
+    @PostMapping("/global/receiver/user/delete")
+    @FeignClientAnnotation
+    BaseResultDto deleteGlobalReceiverUser(@RequestBody BaseEntity entity) throws ServiceException {
+        return wasabiCardService.deleteGlobalReceiverUser(entity);
+    }
+
+    /**
+     * 区块链配置下拉列表
+     */
+    @PostMapping("/card/blockchain/config/dropdown")
+    @FeignClientAnnotation
+    BaseResultDto getCardBlockchainConfigDropdown(@RequestBody CardBlockchainConfigDropdownEntity entity) throws ServiceException {
+        return wasabiCardService.getCardBlockchainConfigDropdown(entity);
+    }
+
+    /**
+     * 加密货币交易分页列表
+     */
+    @PostMapping("/encrypted/wallet/transaction/page")
+    @FeignClientAnnotation
+    ResultWithPagerDto<EncryptedWalletTransactionDto> getEncryptedWalletTransactionPage(@RequestBody EncryptedWalletTransactionPageEntity entity) throws ServiceException{
+        return wasabiCardService.getEncryptedWalletTransactionPage(entity);
+    }
+
+    /**
+     * 卡扣款分页列表
+     */
+    @PostMapping("/card/withdraw/page")
+    @FeignClientAnnotation
+    ResultWithPagerDto<CardWithdrawDto> queryCardWithdrawPage(@RequestBody CardWithdrawPageEntity entity) throws ServiceException{
+        return wasabiCardService.queryCardWithdrawPage(entity);
+    }
+
+}

+ 36 - 0
ucard-cloud/src/main/java/com/crm/ucard/controller/SysCountryController.java

@@ -0,0 +1,36 @@
+package com.crm.ucard.controller;
+
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.entity.country.*;
+import com.crm.ucard.service.SysCountryFeignService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping("/country")
+public class SysCountryController {
+
+    @Autowired
+    private SysCountryFeignService sysCountryFeignService;
+
+    /**
+     * 根据pid获取列表
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/get")
+    public BaseResultDto getAllCountry(@RequestBody SysCountryEntity entity) throws Exception {
+
+        if (entity.getPid() == null) {
+            entity.setPid(0L);
+        }
+        BaseResultDto resultDto = sysCountryFeignService.getAllCountry(entity);
+
+        return resultDto;
+    }
+
+}

+ 305 - 0
ucard-cloud/src/main/java/com/crm/ucard/controller/UcardApiController.java

@@ -0,0 +1,305 @@
+package com.crm.ucard.controller;
+
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.dto.base.*;
+import com.crm.rely.backend.core.dto.ucard.*;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.info.InfoEntity;
+import com.crm.rely.backend.core.entity.ucard.*;
+import com.crm.rely.backend.exception.ServiceException;
+import com.crm.ucard.service.*;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.List;
+
+@Slf4j
+@RestController
+@RequestMapping("/ucard/api")
+public class UcardApiController {
+
+    @Autowired
+    private UcardApiService ucardApiService;
+    @Autowired
+    private UcardService ucardService;
+    @Autowired
+    private WasabiCardService wasabiCardService;
+
+    /**
+     * 获取卡片类型列表
+     */
+    @PostMapping("/card/types/page")
+    public ResultWithPagerDto<CardTypeDto> getCardTypePageList(@RequestBody CardTypePageEntity entity) throws ServiceException {
+        entity.setEnableStatus(1);
+        return ucardService.getCardTypePageList(entity);
+    }
+
+    /**
+     * 获取卡片类型
+     */
+    @PostMapping("/card/types/list")
+    public BaseResultDto getCardTypeList(@RequestBody CardTypeEntity entity, InfoEntity infoEntity) throws ServiceException {
+        entity.setCId(infoEntity.getCustomInfo().getCId());
+        return BaseResultDto.success(wasabiCardService.getCardTypeList(entity));
+    }
+
+    /**
+     * 商户用户注册
+     */
+    @PostMapping("/merchant/user/register")
+    public BaseResultDto registerMerchantUser(@RequestBody MerchantUserEntity request) throws ServiceException {
+        return ucardService.registerMerchantUser(request);
+    }
+
+    /**
+     * 更新商户用户信息
+     */
+    @PostMapping("/merchant/user/update")
+    public BaseResultDto updateMerchantUser(@RequestBody MerchantUserEntity request) throws ServiceException {
+        return ucardService.updateMerchantUser(request);
+    }
+
+    /**
+     * 查看商户用户信息
+     */
+    @PostMapping("/merchant/user/single")
+    public BaseResultDto merchantUserSingle(InfoEntity entity) throws ServiceException {
+        return BaseResultDto.success(ucardApiService.merchantUserSingle(entity.getCustomInfo().getCId()));
+    }
+
+    /**
+     * 获取kyc认证分页列表
+     */
+    @PostMapping("/merchant/kyc/page")
+    ResultWithPagerDto<CardKycStatusDto> getKycPageList(@RequestBody CardKycStatusPageEntity entity) throws ServiceException{
+        return ucardService.getKycPageList(entity);
+    }
+
+    /**
+     * 上传KYC附件
+     */
+    @PostMapping("/merchant/kyc/upload")
+    public BaseResultDto uploadKycAttachment(@RequestBody KycAttachmentUploadEntity request) throws ServiceException {
+        return ucardService.uploadKycAttachment(request);
+    }
+
+    /**
+     * 提交KYC认证"
+     */
+    @PostMapping("/merchant/kyc/submit")
+    public BaseResultDto submitKyc(@RequestBody KycEntity request) throws ServiceException {
+        return ucardService.submitKyc(request);
+    }
+
+    /**
+     * 查询KYC认证状态
+     */
+    @PostMapping("/merchant/kyc/status")
+    public BaseResultDto<KycStatusDto> queryKycStatus(@RequestBody KycEntity entity) throws ServiceException {
+        return ucardService.queryKycStatus(entity);
+    }
+
+    /**
+     * 申请开卡
+     */
+    @PostMapping("/card/apply")
+    public BaseResultDto applyCard(@RequestBody CardApplyEntity request) throws ServiceException {
+        return ucardService.applyCard(request);
+    }
+
+    /**
+     * 查询开卡进度
+     */
+    @PostMapping("/card/apply/progress")
+    public BaseResultDto<CardApplyProgressDto> queryApplyProgress(@RequestBody CardApplyProgressEntity request) throws ServiceException {
+        return ucardService.queryApplyProgress(request);
+    }
+
+    /**
+     * 获取卡片列表
+     */
+    @PostMapping("/card/list")
+    public BaseResultDto getCardList(@RequestBody CardPageEntity entity, InfoEntity infoEntity) throws ServiceException {
+        entity.setCId(infoEntity.getCustomInfo().getCId());
+        return BaseResultDto.success(ucardApiService.getCardList(entity));
+    }
+
+    /**
+     * 获取卡片详情
+     */
+    @PostMapping("/card/single")
+    public BaseResultDto getCardSingle(@RequestBody SingleLongEntity entity) throws ServiceException {
+        return BaseResultDto.success(ucardApiService.getCardSingle(entity));
+    }
+
+    /**
+     * 银行卡激活
+     */
+    @PostMapping("/card/activate")
+    public BaseResultDto<CardActivateDto> activateCard(@RequestBody CardActivateEntity request) throws ServiceException {
+        return ucardService.activateCard(request);
+    }
+
+    /**
+     * 查询充值预估到账金额
+     */
+    @PostMapping("/card/recharge/estimate")
+    public BaseResultDto<CardRechargeEstimateDto> queryRechargeEstimate(@RequestBody CardRechargeEstimateEntity request) throws ServiceException {
+        return ucardService.queryRechargeEstimate(request);
+    }
+
+    /**
+     * 银行卡充值
+     */
+    @PostMapping("/card/recharge")
+    public BaseResultDto<CardRechargeDto> rechargeCard(@RequestBody CardRechargeEntity request) throws ServiceException {
+        return ucardService.rechargeCard(request);
+    }
+
+    /**
+     * 充值记录分页查询
+     */
+    @PostMapping("/card/recharge/page")
+    public BaseReportResultDto<List<CardRechargeOrderDto>, CardRechargeOrderSumDto> queryRechargePageList(@RequestBody CardRechargePageEntity request) throws ServiceException {
+        return ucardService.queryRechargePageList(request);
+    }
+
+    /**
+     * 查询卡片余额
+     */
+    @PostMapping("/card/balance")
+    public BaseResultDto<List<CardBalanceDto>> queryCardBalance(@RequestBody CardBalanceEntity request) throws ServiceException {
+        return ucardService.queryCardBalance(request);
+    }
+
+    /**
+     * 冻结卡片
+     */
+    @PostMapping("/card/freeze")
+    public BaseResultDto<CardFreezeDto> freezeCard(@RequestBody CardOperateEntity request) throws ServiceException {
+        return ucardService.freezeCard(request);
+    }
+
+    /**
+     * 解冻卡片
+     */
+    @PostMapping("/card/unfreeze")
+    public BaseResultDto<CardFreezeDto> unfreezeCard(@RequestBody CardOperateEntity request) throws ServiceException {
+        return ucardService.unfreezeCard(request);
+    }
+
+    /**
+     * 查询交易记录分页列表
+     */
+    @PostMapping("/card/transac/page")
+    public ResultWithPagerDto<CardTransacOrderDto> getTransactionPageList(@RequestBody CardTransacOrderPageEntity request) throws ServiceException {
+        return ucardService.getTransacOrderPageList(request);
+    }
+
+    /**
+     * 获取交易纪录详情
+     */
+    @PostMapping("/card/transac/single")
+    public BaseResultDto getTransactionSingle(@RequestBody SingleLongEntity entity) throws ServiceException {
+        return BaseResultDto.success(ucardApiService.getTransactionSingle(entity));
+    }
+
+    /**
+     * 查询速汇银行及相关配置
+     */
+    @PostMapping("/transfer/banks")
+    public BaseResultDto<List<GlobalTransferBankDto>> queryBankList() throws ServiceException {
+        return ucardService.queryBankList();
+    }
+
+    /**
+     * 查询法币汇率
+     */
+    @PostMapping("/transfer/rate")
+    public BaseResultDto<GlobalExchangeRateDto> queryExchangeRate(@RequestBody GlobalExchangeRateEntity request) throws ServiceException {
+        return ucardService.queryExchangeRate(request);
+    }
+
+    /**
+     * 代付校验
+     */
+    @PostMapping("/transfer/validate")
+    public BaseResultDto validateTransfer(@RequestBody GlobalPaymentEntity request) throws ServiceException {
+        return ucardService.validateTransfer(request);
+    }
+
+    /**
+     * 代付付款人校验
+     */
+    @PostMapping("/transfer/validate/payer")
+    public BaseResultDto validatePayer(@RequestBody GlobalPayerEntity request) throws ServiceException {
+        return ucardService.validatePayer(request);
+    }
+
+    /**
+     * 代付收款人校验
+     */
+    @PostMapping("/transfer/validate/payee")
+    public BaseResultDto validatePayee(@RequestBody GlobalPayeeEntity request) throws ServiceException {
+        return ucardService.validatePayee(request);
+    }
+
+    /**
+     * 代付
+     */
+    @PostMapping("/transfer")
+    public BaseResultDto<GlobalPaymentDto> transfer(@RequestBody GlobalPaymentEntity request) throws ServiceException {
+        return ucardService.transfer(request);
+    }
+
+    /**
+     * 用户代付订单分页查询
+     */
+    @PostMapping("/transfer/page")
+    public ResultWithPagerDto<GlobalPaymentOrderDto> queryOrderPageList(@RequestBody GlobalPaymentPageEntity request) throws ServiceException {
+        return ucardService.queryOrderPageList(request);
+    }
+
+    /**
+     * 获取用户代付订单详情
+     */
+    @PostMapping("/transfer/single")
+    public BaseResultDto getTransferPaymentSingle(@RequestBody SingleLongEntity entity) throws ServiceException {
+        return BaseResultDto.success(ucardApiService.getTransferPaymentSingle(entity));
+    }
+
+    /**
+     * 提交调单信息或文件
+     */
+    @PostMapping("/transfer/dispute")
+    public BaseResultDto submitDispute(@RequestBody GlobalSubmitDisputeEntity request) throws ServiceException {
+        return ucardService.submitDispute(request);
+    }
+
+    /**
+     * 查询代付订单结果
+     */
+    @PostMapping("/transfer/order/result")
+    public BaseResultDto<GlobalOrderInfoDto> queryOrderResult(@RequestBody GlobalOrderQueryEntity request) throws ServiceException {
+        return ucardService.queryOrderResult(request);
+    }
+
+    /**
+     * 上传文件
+     */
+    @PostMapping("/upload/file")
+    public BaseResultDto<String> uploadFile(@RequestParam(value = "file") MultipartFile file) throws ServiceException {
+        return BaseResultDto.success(Constants.SUCCESS,ucardService.uploadFile(file));
+    }
+
+    /**
+     * 查询ucard国家和城市
+     */
+    @PostMapping("/card/country")
+    public BaseResultDto getCardCountry(@RequestBody CardCountryEntity request) throws ServiceException {
+        return BaseResultDto.success(ucardService.getCardCountryList(request));
+    }
+
+}

+ 392 - 0
ucard-cloud/src/main/java/com/crm/ucard/controller/UcardController.java

@@ -0,0 +1,392 @@
+package com.crm.ucard.controller;
+
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.constant.FeignClientAnnotation;
+import com.crm.rely.backend.core.dto.base.*;
+import com.crm.rely.backend.core.dto.ucard.*;
+import com.crm.rely.backend.core.entity.ucard.*;
+import com.crm.rely.backend.exception.ServiceException;
+import com.crm.ucard.service.UcardService;
+import com.crm.ucard.service.WasabiCardService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.List;
+
+/**
+ * 银行卡服务接口
+ */
+@Slf4j
+@RestController
+@RequestMapping("/ucard/manager")
+public class UcardController {
+
+    @Autowired
+    private UcardService ucardService;
+    @Autowired
+    private WasabiCardService wasabiCardService;
+
+    /**
+     * 获取卡片类型列表
+     */
+    @PostMapping("/card/types/page")
+    @FeignClientAnnotation
+    public ResultWithPagerDto<CardTypeDto> getCardTypePageList(@RequestBody CardTypePageEntity entity) throws ServiceException {
+        return ucardService.getCardTypePageList(entity);
+    }
+
+    /**
+     * 更新卡片类型列表
+     */
+    @PostMapping("/card/types")
+    @Transactional(rollbackFor = Exception.class)
+    //@FeignClientAnnotation
+    public BaseResultDto getCardTypes() throws ServiceException {
+        //ucardService.getCardTypes();
+//        wasabiCardService.getCardTypeList();
+        return BaseResultDto.success();
+    }
+
+    /**
+     * 商户用户分页列表
+     */
+    @PostMapping("/merchant/user/page")
+    @FeignClientAnnotation
+    public ResultWithPagerDto<MerchantUserDto> getMerchantUserPageLists(@RequestBody MerchantUserPageEntity entity) throws ServiceException {
+        return ucardService.getMerchantUserPageList(entity);
+    }
+
+    /**
+     * 查询商户账户信息
+     */
+    @PostMapping("/merchant/account")
+    @FeignClientAnnotation
+    public BaseResultDto<List<MerchantAccountDto>> queryMerchantAccount() throws ServiceException {
+        return ucardService.queryMerchantAccount();
+    }
+
+    /**
+     * 商户用户注册
+     */
+    @PostMapping("/merchant/user/register")
+    @FeignClientAnnotation
+    public BaseResultDto registerMerchantUser(@RequestBody MerchantUserEntity request) throws ServiceException {
+        return ucardService.registerMerchantUser(request);
+    }
+
+    /**
+     * 更新商户用户信息
+     */
+    @PostMapping("/merchant/user/update")
+    @FeignClientAnnotation
+    public BaseResultDto updateMerchantUser(@RequestBody MerchantUserEntity request) throws ServiceException {
+        return ucardService.updateMerchantUser(request);
+    }
+
+    /**
+     * 获取kyc认证分页列表
+     */
+    @PostMapping("/merchant/kyc/page")
+    @FeignClientAnnotation
+    ResultWithPagerDto<CardKycStatusDto> getKycPageList(@RequestBody CardKycStatusPageEntity entity) throws ServiceException {
+        return ucardService.getKycPageList(entity);
+    }
+
+    /**
+     * 上传KYC附件
+     */
+    @PostMapping("/merchant/kyc/upload")
+    @FeignClientAnnotation
+    public BaseResultDto uploadKycAttachment(@RequestBody KycAttachmentUploadEntity request) throws ServiceException {
+        return ucardService.uploadKycAttachment(request);
+    }
+
+    /**
+     * 提交KYC认证
+     */
+    @PostMapping("/merchant/kyc/submit")
+    @FeignClientAnnotation
+    public BaseResultDto submitKyc(@RequestBody KycEntity request) throws ServiceException {
+        return ucardService.submitKyc(request);
+    }
+
+    /**
+     * 查询KYC认证状态
+     */
+    @PostMapping("/merchant/kyc/status")
+    @FeignClientAnnotation
+    public BaseResultDto<KycStatusDto> queryKycStatus(@RequestBody KycEntity entity) throws ServiceException {
+        return ucardService.queryKycStatus(entity);
+    }
+
+    /**
+     * 申请开卡
+     */
+    @PostMapping("/card/apply")
+    @FeignClientAnnotation
+    public BaseResultDto applyCard(@RequestBody CardApplyEntity request) throws ServiceException {
+        return ucardService.applyCard(request);
+    }
+
+    /**
+     * 查询开卡进度
+     */
+    @PostMapping("/card/apply/progress")
+    @FeignClientAnnotation
+    public BaseResultDto<CardApplyProgressDto> queryApplyProgress(@RequestBody CardApplyProgressEntity request) throws ServiceException {
+        return ucardService.queryApplyProgress(request);
+    }
+
+    /**
+     * 获取卡片申请列表
+     */
+    @PostMapping("/card/apply/page")
+    @FeignClientAnnotation
+    public ResultWithPagerDto<CardApplyDto> getCardApplyPageList(@RequestBody CardApplyPageEntity entity) throws ServiceException {
+        return ucardService.getCardApplyPageList(entity);
+    }
+
+    /**
+     * 获取卡片列表
+     */
+    @PostMapping("/card/page")
+    @FeignClientAnnotation
+    public ResultWithPagerDto<UcardCardDto> getCardPageList(@RequestBody CardPageEntity entity) throws ServiceException {
+        return ucardService.getCardPageList(entity);
+    }
+
+    /**
+     * 银行卡激活
+     */
+    @PostMapping("/card/activate")
+    @FeignClientAnnotation
+    public BaseResultDto<CardActivateDto> activateCard(@RequestBody CardActivateEntity request) throws ServiceException {
+        return ucardService.activateCard(request);
+    }
+
+    /**
+     * 查询充值预估到账金额
+     */
+    @PostMapping("/card/recharge/estimate")
+    @FeignClientAnnotation
+    public BaseResultDto<CardRechargeEstimateDto> queryRechargeEstimate(@RequestBody CardRechargeEstimateEntity request) throws ServiceException {
+        return ucardService.queryRechargeEstimate(request);
+    }
+
+    /**
+     * 银行卡充值
+     */
+    @PostMapping("/card/recharge")
+    @FeignClientAnnotation
+    public BaseResultDto<CardRechargeDto> rechargeCard(@RequestBody CardRechargeEntity request) throws ServiceException {
+        return ucardService.rechargeCard(request);
+    }
+
+    /**
+     * 查询充值订单
+     */
+    @PostMapping("/card/recharge/order")
+    @FeignClientAnnotation
+    public BaseResultDto<CardRechargeOrderDto> queryRechargeOrder(@RequestBody CardRechargeOrderQueryEntity request) throws ServiceException {
+        return ucardService.queryRechargeOrder(request);
+    }
+
+    /**
+     * 查询充值记录
+     */
+    @PostMapping("/card/recharge/records")
+    @FeignClientAnnotation
+    public BaseResultDto<CardRechargeOrderListDto> queryRechargeRecords(@RequestBody CardRechargeRecordQueryEntity request) throws ServiceException {
+        return ucardService.queryRechargeRecords(request);
+    }
+
+    /**
+     * 充值记录分页查询
+     */
+    @PostMapping("/card/recharge/page")
+    @FeignClientAnnotation
+    public BaseReportResultDto<List<CardRechargeOrderDto>, CardRechargeOrderSumDto> queryRechargePageList(@RequestBody CardRechargePageEntity request) throws ServiceException {
+        return ucardService.queryRechargePageList(request);
+    }
+
+    /**
+     * 查询卡片余额
+     */
+    @PostMapping("/card/balance")
+    @FeignClientAnnotation
+    public BaseResultDto<List<CardBalanceDto>> queryCardBalance(@RequestBody CardBalanceEntity request) throws ServiceException {
+        return ucardService.queryCardBalance(request);
+    }
+
+    /**
+     * 找回密码
+     */
+    @PostMapping("/card/password/reset")
+    @FeignClientAnnotation
+    public BaseResultDto resetPassword(@RequestBody CardOperateEntity request) throws ServiceException {
+        return ucardService.resetPassword(request);
+    }
+
+    /**
+     * 查询交易记录分页列表
+     */
+    @PostMapping("/card/transac/page")
+    @FeignClientAnnotation
+    public ResultWithPagerDto<CardTransacOrderDto> getTransactionPageList(@RequestBody CardTransacOrderPageEntity request) throws ServiceException {
+        return ucardService.getTransacOrderPageList(request);
+    }
+
+    /**
+     * 查询交易记录
+     */
+    @PostMapping("/card/transac")
+    @FeignClientAnnotation
+    public BaseResultDto<CardTransacOrderListDto> queryTransactions(@RequestBody CardTransacQueryEntity request) throws ServiceException {
+        return ucardService.queryTransactions(request);
+    }
+
+    /**
+     * 冻结卡片
+     */
+    @PostMapping("/card/freeze")
+    @FeignClientAnnotation
+    public BaseResultDto<CardFreezeDto> freezeCard(@RequestBody CardOperateEntity request) throws ServiceException {
+        return ucardService.freezeCard(request);
+    }
+
+    /**
+     * 解冻卡片
+     */
+    @PostMapping("/card/unfreeze")
+    @FeignClientAnnotation
+    public BaseResultDto<CardFreezeDto> unfreezeCard(@RequestBody CardOperateEntity request) throws ServiceException {
+        return ucardService.unfreezeCard(request);
+    }
+
+    /**
+     * 查询速汇银行及相关配置
+     */
+    @PostMapping("/transfer/banks")
+    @FeignClientAnnotation
+    public BaseResultDto<List<GlobalTransferBankDto>> queryBankList() throws ServiceException {
+        return ucardService.queryBankList();
+    }
+
+    /**
+     * 查询法币汇率
+     */
+    @PostMapping("/transfer/rate")
+    @FeignClientAnnotation
+    public BaseResultDto<GlobalExchangeRateDto> queryExchangeRate(@RequestBody GlobalExchangeRateEntity request) throws ServiceException {
+        return ucardService.queryExchangeRate(request);
+    }
+
+    /**
+     * 代付校验
+     */
+    @PostMapping("/transfer/validate")
+    @FeignClientAnnotation
+    public BaseResultDto validateTransfer(@RequestBody GlobalPaymentEntity request) throws ServiceException {
+        return ucardService.validateTransfer(request);
+    }
+
+    /**
+     * 代付付款人校验
+     */
+    @PostMapping("/transfer/validate/payer")
+    @FeignClientAnnotation
+    public BaseResultDto validatePayer(@RequestBody GlobalPayerEntity request) throws ServiceException {
+        return ucardService.validatePayer(request);
+    }
+
+    /**
+     * 代付收款人校验
+     */
+    @PostMapping("/transfer/validate/payee")
+    @FeignClientAnnotation
+    public BaseResultDto validatePayee(@RequestBody GlobalPayeeEntity request) throws ServiceException {
+        return ucardService.validatePayee(request);
+    }
+
+    /**
+     * 代付
+     */
+    @PostMapping("/transfer")
+    @FeignClientAnnotation
+    public BaseResultDto<GlobalPaymentDto> transfer(@RequestBody GlobalPaymentEntity request) throws ServiceException {
+        return ucardService.transfer(request);
+    }
+
+    /**
+     * 用户订单列表
+     */
+    @PostMapping("/transfer/orders")
+    @FeignClientAnnotation
+    public BaseResultDto<GlobalPaymentOrderListDto> queryOrderList(@RequestBody GlobalTransferOrderEntity request) throws ServiceException {
+        return ucardService.queryOrderList(request);
+    }
+
+    /**
+     * 用户订单分页查询
+     */
+    @PostMapping("/transfer/page")
+    @FeignClientAnnotation
+    public ResultWithPagerDto<GlobalPaymentOrderDto> queryOrderPageList(@RequestBody GlobalPaymentPageEntity request) throws ServiceException {
+        return ucardService.queryOrderPageList(request);
+    }
+
+    /**
+     * 提交调单信息或文件
+     */
+    @PostMapping("/transfer/dispute")
+    @FeignClientAnnotation
+    public BaseResultDto submitDispute(@RequestBody GlobalSubmitDisputeEntity request) throws ServiceException {
+        return ucardService.submitDispute(request);
+    }
+
+    /**
+     * 查询订单结果
+     */
+    @PostMapping("/transfer/order/result")
+    @FeignClientAnnotation
+    public BaseResultDto<GlobalOrderInfoDto> queryOrderResult(@RequestBody GlobalOrderQueryEntity request) throws ServiceException {
+        return ucardService.queryOrderResult(request);
+    }
+
+    /**
+     * 上传文件
+     */
+    @PostMapping("/upload/file")
+    @FeignClientAnnotation
+    public BaseResultDto<String> uploadFile(@RequestParam(value = "file") MultipartFile file) throws ServiceException {
+        return BaseResultDto.success(Constants.SUCCESS, ucardService.uploadFile(file));
+    }
+
+    /**
+     * 查询国家和城市
+     */
+    @PostMapping("/card/country")
+    @FeignClientAnnotation
+    public BaseResultDto getCardCountry(@RequestBody CardCountryEntity request) throws ServiceException {
+        return BaseResultDto.success(ucardService.getCardCountryList(request));
+    }
+
+
+    /**
+     * 银行卡交易信息数据定时同步查询
+     */
+//    @Scheduled(cron = "0 0 1 * * ?")
+    public void queryOrderInfo() throws ServiceException {
+
+        log.info("银行卡交易信息数据定时同步开始: {}.............................");
+        try {
+            ucardService.queryOrderInfo();
+        } catch (Exception e) {
+            log.error("定时任务执行失败", e);
+        }
+    }
+
+}

+ 190 - 0
ucard-cloud/src/main/java/com/crm/ucard/controller/UcardNotifyController.java

@@ -0,0 +1,190 @@
+package com.crm.ucard.controller;
+
+import com.alibaba.fastjson.JSON;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.constant.FeignClientAnnotation;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.ucard.*;
+import com.crm.rely.backend.core.pojo.table.SysConfigTable;
+import com.crm.rely.backend.exception.ServiceException;
+import com.crm.ucard.config.UcardConfig;
+import com.crm.ucard.service.SysConfigService;
+import com.crm.ucard.service.UcardService;
+import com.crm.ucard.util.PayouCardUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@Slf4j
+@RestController
+@RequestMapping("/ucard/manager/callback")
+public class UcardNotifyController {
+
+    @Autowired
+    private SysConfigService sysConfigService;
+
+   @Autowired
+    private UcardService ucardService;
+
+    @PostMapping("/notify")
+    @FeignClientAnnotation
+    public BaseResultDto notify(@RequestBody UcardBaseRequest request) throws Exception {
+        log.info("Ucard回调通知开始:"+JSON.toJSONString(request));
+
+        UcardConfig ucardConfig = getUcardConfig();
+        // 验证签名
+        if (!PayouCardUtil.verifySignature(ucardConfig, JSON.toJSONString(request))) {
+            return BaseResultDto.error("签名验证失败");
+        }
+
+        switch (request.getNotifyType()){
+            case 1:
+                handleGlobalTransferNotify(request,ucardConfig);
+                break;
+            case 2:
+                handleGlobalTransferSubmitNotify(request,ucardConfig);
+                break;
+            case 3:
+                handleKycNotify(request,ucardConfig);
+                break;
+            case 4:
+                handleCardRecharge(request,ucardConfig);
+                break;
+            case 5:
+                handleCardActivate(request);
+                break;
+            case 6:
+                handleCardFreeze(request);
+                break;
+            case 7:
+                handleVerify3DS(request);
+                break;
+            case 8:
+                handCardBillStatement(request);
+                break;
+            default:
+                return BaseResultDto.error();
+        }
+
+        log.info("Ucard回调通知结束");
+        return BaseResultDto.result(0);
+    }
+
+    public UcardConfig getUcardConfig() throws ServiceException {
+        SysConfigTable sysConfigTable = sysConfigService.getByCode(Constants.UCARD_CARD);
+        if (sysConfigTable == null) {
+            throw ServiceException.exception(Constants.SYSTEM_ERROR);
+        }
+        UcardConfig ucardConfig = JSON.parseObject(sysConfigTable.getValue(), UcardConfig.class);
+        return ucardConfig;
+    }
+
+    /**
+     * 全球速汇-支付结果回调通知
+     */
+    public void handleGlobalTransferNotify(@RequestBody UcardBaseRequest request,UcardConfig ucardConfig) throws ServiceException {
+        try {
+            GlobalTransferNotifyDto notify = JSON.parseObject(JSON.toJSONString(request.getData()), GlobalTransferNotifyDto.class);
+
+            ucardService.handleGlobalTransferNotify(notify,ucardConfig);
+        } catch (Exception e) {
+            log.error("全球速汇-支付结果回调失败", e);
+        }
+    }
+
+    /**
+     * 全球速汇-调单回调通知
+     */
+    public void handleGlobalTransferSubmitNotify(UcardBaseRequest request,UcardConfig ucardConfig) throws ServiceException {
+        try {
+            GlobalTransferSubmitNotifyDto notify = JSON.parseObject(JSON.toJSONString(request.getData()), GlobalTransferSubmitNotifyDto.class);
+
+            ucardService.handleGlobalTransferSubmitNotify(notify,ucardConfig);
+        } catch (Exception e) {
+            log.error("全球速汇-调单回调失败", e);
+        }
+    }
+
+    /**
+     * 用户KYC回调通知
+     */
+    public void handleKycNotify(UcardBaseRequest request,UcardConfig ucardConfig) throws ServiceException {
+        try {
+            KycNotifyDto notify = JSON.parseObject(JSON.toJSONString(request.getData()), KycNotifyDto.class);
+
+            ucardService.handleKycNotify(notify,ucardConfig);
+        } catch (Exception e) {
+            log.error("用户KYC回调失败", e);
+        }
+    }
+
+    /**
+     *  银行卡-卡片充值结果回调通知
+     */
+    public void handleCardRecharge(UcardBaseRequest request, UcardConfig ucardConfig) throws ServiceException {
+        try {
+            CardRechargeNotifyDto notify = JSON.parseObject(JSON.toJSONString(request.getData()), CardRechargeNotifyDto.class);
+
+            ucardService.handleCardRecharge(notify,ucardConfig);
+        } catch (Exception e) {
+            log.error("卡片充值结果回调失败", e);
+        }
+    }
+
+    /**
+     * 银行卡-卡片激活结果回调通知
+     */
+    public void handleCardActivate(UcardBaseRequest request) throws ServiceException {
+        try {
+            // 处理充值回调
+            CardActivateNotifyDto notify = JSON.parseObject(JSON.toJSONString(request.getData()), CardActivateNotifyDto.class);
+
+            ucardService.handleCardActivate(notify);
+        } catch (Exception e) {
+            log.error("卡片激活结果回调失败", e);
+        }
+    }
+
+    /**
+     * 银行卡-卡片冻结、解冻、重发PIN处理状态回调通知
+     */
+    public void handleCardFreeze(UcardBaseRequest request) throws ServiceException {
+        try {
+            CardFreezeNotifyDto notify = JSON.parseObject(JSON.toJSONString(request.getData()), CardFreezeNotifyDto.class);
+
+            ucardService.handleCardFreeze(notify);
+        } catch (Exception e) {
+            log.error("卡片冻结、解冻、重发PIN处理结果回调失败", e);
+        }
+    }
+
+    /**
+     * 银行卡-3DS校验
+     */
+    public void handleVerify3DS(UcardBaseRequest request) throws ServiceException {
+        try {
+            CardVerify3DSNotifyDto notify = JSON.parseObject(JSON.toJSONString(request.getData()), CardVerify3DSNotifyDto.class);
+
+            ucardService.handleVerify3DS(notify);
+        } catch (Exception e) {
+            log.error("3DS校验处理结果回调失败", e);
+        }
+    }
+
+    /**
+     * 银行卡-消费账单事件
+     */
+    public void handCardBillStatement(UcardBaseRequest request) throws ServiceException {
+        try {
+            CardTransacOrderNotifyDto notify = JSON.parseObject(JSON.toJSONString(request.getData()), CardTransacOrderNotifyDto.class);
+
+            ucardService.handCardBillStatement(notify);
+        } catch (Exception e) {
+            log.error("消费账单事件处理结果回调失败", e);
+        }
+    }
+
+}

+ 44 - 0
ucard-cloud/src/main/java/com/crm/ucard/controller/UcardWalletController.java

@@ -0,0 +1,44 @@
+package com.crm.ucard.controller;
+
+import com.alibaba.fastjson.JSON;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.entity.ucard.UcardDepositEntity;
+import com.crm.ucard.service.UcardWalletService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@Slf4j
+@RestController
+@RequestMapping("/ucard/wallet")
+public class UcardWalletController {
+
+    @Autowired
+    private UcardWalletService cardWalletService;
+
+    @PostMapping("/deposit")
+    public BaseResultDto deposit(@RequestBody UcardDepositEntity entity) throws Exception {
+        log.info(String.format("ucard wallet deposit: %s", JSON.toJSONString(entity)));
+        try {
+            return cardWalletService.ucardWalletDeposit(entity);
+        } catch (Exception e) {
+            return BaseResultDto.error("system error");
+        }
+
+
+    }
+
+    @PostMapping("/withdraw")
+    public BaseResultDto withdraw(@RequestBody UcardDepositEntity entity) throws Exception {
+        log.info(String.format("ucard wallet withdraw: %s", JSON.toJSONString(entity)));
+        try {
+            return cardWalletService.ucardWalletWithdraw(entity);
+        } catch (Exception e) {
+            return BaseResultDto.error("system error");
+        }
+    }
+
+}

+ 28 - 0
ucard-cloud/src/main/java/com/crm/ucard/controller/VaultodyApiController.java

@@ -0,0 +1,28 @@
+package com.crm.ucard.controller;
+
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.entity.ucard.crypto.currency.vaultody.*;
+import com.crm.ucard.service.VaultodyService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+@Slf4j
+@RestController
+@RequestMapping("/vaultody/api")
+public class VaultodyApiController {
+
+    @Autowired
+    private VaultodyService vaultodyService;
+
+    /**
+     * 生成钱包地址
+     * @param entity:
+     * @return void
+     */
+    @PostMapping("/generate/deposit/address")
+    public BaseResultDto generateDepositAddress(@RequestBody VaultodyGenerateDepositAddressEntity entity) throws Exception {
+        return vaultodyService.generateDepositAddress(entity);
+    }
+
+}

+ 523 - 0
ucard-cloud/src/main/java/com/crm/ucard/controller/WasabiCardApiController.java

@@ -0,0 +1,523 @@
+package com.crm.ucard.controller;
+
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.dto.base.*;
+import com.crm.rely.backend.core.dto.ib.account.AccountDropdownDto;
+import com.crm.rely.backend.core.dto.ib.account.AccountInfoDto;
+import com.crm.rely.backend.core.dto.ucard.*;
+import com.crm.rely.backend.core.dto.wasabi.*;
+import com.crm.rely.backend.core.entity.base.BaseEntity;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.info.InfoEntity;
+import com.crm.rely.backend.core.entity.custom.kyc.WebsdkLinkAliEntity;
+import com.crm.rely.backend.core.entity.ib.account.AccountInfoListEntity;
+import com.crm.rely.backend.core.entity.ucard.*;
+import com.crm.rely.backend.core.entity.wasabi.*;
+import com.crm.rely.backend.exception.ServiceException;
+import com.crm.rely.backend.util.GetIpAndMac;
+import com.crm.ucard.service.*;
+import com.google.common.collect.Lists;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Date;
+import java.util.List;
+
+@Slf4j
+@RestController
+@RequestMapping("/wasabi/api")
+public class WasabiCardApiController {
+
+    @Autowired
+    private UcardApiService ucardApiService;
+    @Autowired
+    private UcardService ucardService;
+
+    @Autowired
+    private WasabiCardService wasabiCardService;
+
+    @Autowired
+    private CustomInfoService customInfoService;
+    @Autowired
+    private AccountInfoFeignService accountInfoFeignService;
+
+    /**
+     * 获取卡片类型列表
+     */
+    @PostMapping("/card/types/page")
+    public ResultWithPagerDto<CardTypeDto> getCardTypePageList(@RequestBody CardTypePageEntity entity) throws ServiceException {
+        entity.setEnableStatus(1);
+        return ucardService.getCardTypePageList(entity);
+    }
+
+    /**
+     * 获取卡片类型
+     */
+    @PostMapping("/card/types/list")
+    public BaseResultDto getCardTypeList(@RequestBody CardTypeEntity entity, InfoEntity infoEntity) throws ServiceException {
+        entity.setCId(infoEntity.getCustomInfo().getCId());
+        return BaseResultDto.success(wasabiCardService.getCardTypeList(entity));
+    }
+
+    /**
+     * 身份认证获取web链接
+     *
+     * @param entity
+     * @return
+     */
+    @PostMapping("/getWebsdkLink")
+    public BaseResultDto getWebsdkLink(@RequestBody WebsdkLinkAliEntity entity, InfoEntity infoEntity) throws Exception {
+        return wasabiCardService.getWebsdkLink(entity, infoEntity.getCustomInfo().getId());
+    }
+
+    /**
+     * 商户用户注册
+     */
+    @PostMapping("/merchant/user/register")
+    public BaseResultDto registerMerchantUser(@RequestBody @Validated CardMerchantUserEntity request,
+                                              InfoEntity entity, HttpServletRequest servletRequest) throws ServiceException {
+        String ip = GetIpAndMac.getIp(servletRequest);
+        request.setIpAddress(ip);
+        request.setCustomId(entity.getCustomInfo().getId());
+        request.setCId(entity.getCustomInfo().getCId());
+        request.setOperateUser(entity.getCustomInfo().getCId());
+        return wasabiCardService.registerMerchantUser(request);
+    }
+
+    /**
+     * 更新商户用户信息
+     */
+    @PostMapping("/merchant/user/update")
+    public BaseResultDto updateMerchantUser(@RequestBody @Validated CardMerchantUserEntity request,
+                                            InfoEntity entity) throws ServiceException {
+        request.setCustomId(entity.getCustomInfo().getId());
+        request.setCId(entity.getCustomInfo().getCId());
+        request.setOperateUser(entity.getCustomInfo().getCId());
+        return wasabiCardService.updateMerchantUser(request);
+    }
+
+
+    /**
+     * 更新用户邮寄地址
+     */
+    @PostMapping("/merchant/user/address/update")
+    public BaseResultDto updateUserMailingAddress(@RequestBody WasabiSaveUserMailingAddressEntity request) throws ServiceException {
+        return wasabiCardService.updateUserMailingAddress(request);
+    }
+
+    /**
+     * 获取开卡手续费优惠次数
+     */
+    @PostMapping("/apply/reduction/num")
+    public BaseResultDto getApplyReductionNum(InfoEntity infoEntity) throws ServiceException {
+        return BaseResultDto.success(customInfoService.getApplyReductionNum(infoEntity.getCustomInfo().getId()));
+    }
+
+    /**
+     * 查看用户详情
+     */
+    @PostMapping("/merchant/user/single")
+    public BaseResultDto merchantUserSingle(InfoEntity infoEntity) throws Exception {
+        return wasabiCardService.merchantUserSingle(infoEntity.getCustomInfo().getId());
+    }
+
+    /**
+     * 获取kyc认证分页列表
+     */
+    @PostMapping("/merchant/kyc/page")
+    ResultWithPagerDto<CardKycStatusDto> getKycPageList(@RequestBody CardKycStatusPageEntity entity) throws ServiceException {
+        return ucardService.getKycPageList(entity);
+    }
+
+    /**
+     * 申请开卡
+     */
+    @PostMapping("/card/apply")
+    public BaseResultDto applyCard(@RequestBody CardApplyEntity request, InfoEntity infoEntity) throws Exception {
+        request.setCId(infoEntity.getCustomInfo().getId());
+        return wasabiCardService.applyCard(request);
+    }
+
+    /**
+     * 查询开卡进度
+     */
+    @PostMapping("/card/apply/progress")
+    public BaseResultDto queryApplyProgress(@RequestBody CardApplyProgressEntity request) throws Exception {
+        return wasabiCardService.queryApplyProgress(request);
+    }
+
+    /**
+     * 获取卡片申请列表
+     */
+    @PostMapping("/card/apply/page")
+    public ResultWithPagerDto<CardApplyDto> getCardApplyPageList(@RequestBody CardApplyPageEntity entity) throws ServiceException {
+        return ucardService.getCardApplyPageList(entity);
+    }
+
+    /**
+     * 获取卡片申请详情
+     */
+    @PostMapping("/card/apply/details")
+    public BaseResultDto cardApplyDetails(@RequestBody BaseEntity entity) throws ServiceException {
+        return wasabiCardService.cardApplyDetails(entity);
+    }
+
+    /**
+     * 获取我的卡片列表
+     */
+    @PostMapping("/card/list")
+    public BaseResultDto getCardList(@RequestBody CardPageEntity entity, InfoEntity infoEntity) throws ServiceException {
+        entity.setCId(infoEntity.getCustomInfo().getCId());
+        return BaseResultDto.success(ucardApiService.getCardList(entity));
+    }
+
+    /**
+     * 获取卡片详情
+     */
+    @PostMapping("/card/single")
+    public BaseResultDto getCardSingle(@RequestBody SingleLongEntity entity) throws ServiceException {
+        return BaseResultDto.success(ucardApiService.getCardSingle(entity));
+    }
+
+    /**
+     * 银行卡激活
+     */
+    @PostMapping("/card/activate")
+    public BaseResultDto<WasabiActiveCardDto> activateCard(@RequestBody WasabiActiveCardEntity request,
+                                                           InfoEntity infoEntity) throws ServiceException {
+        request.setCId(infoEntity.getCustomInfo().getCId());
+        return wasabiCardService.activeCard(request);
+    }
+
+    /**
+     * 银行卡充值
+     */
+    @PostMapping("/card/recharge")
+    public BaseResultDto rechargeCard(@RequestBody WasabiBalanceEntity request, InfoEntity infoEntity) throws ServiceException {
+        request.setCId(infoEntity.getCustomInfo().getCId());
+        return wasabiCardService.cardDeposit(request);
+    }
+
+    /**
+     * 查询用户钱包余额
+     */
+    @PostMapping("/card/wallet/balance")
+    public BaseResultDto<WalletBalanceDto> walletBalance(@RequestBody WalletBalanceEntity request,
+                                                         InfoEntity infoEntity) throws ServiceException {
+        request.setCId(infoEntity.getCustomInfo().getCId());
+        return wasabiCardService.walletBalance(request);
+    }
+
+    /**
+     * 获取用户钱包记录列表
+     */
+    @PostMapping("/card/wallet/record/page")
+    public ResultWithPagerDto<CardWalletRecordDto> getCardWalletRecordPageList(@RequestBody CardWalletRecordPageEntity entity, InfoEntity infoEntity) throws ServiceException {
+        entity.setCId(infoEntity.getCustomInfo().getCId());
+        return wasabiCardService.getCardWalletRecordPageList(entity);
+    }
+
+    /**
+     * 充值记录分页查询
+     */
+    @PostMapping("/card/recharge/page")
+    public BaseReportResultDto<List<CardRechargeOrderDto>, CardRechargeOrderSumDto> queryRechargePageList(@RequestBody CardRechargePageEntity request) throws ServiceException {
+        return ucardService.queryRechargePageList(request);
+    }
+
+    /**
+     * 查询卡片余额
+     */
+    @PostMapping("/card/balance")
+    public BaseResultDto<WasabiBalanceInfoDto> queryCardBalance(@RequestBody WasabiBalanceInfoEntity request) throws ServiceException {
+        return wasabiCardService.getBalanceInfo(request);
+    }
+
+    /**
+     * 查询充值订单
+     */
+    @PostMapping("/card/recharge/order")
+    public BaseResultDto queryRechargeOrder(@RequestBody CardRechargeOrderQueryEntity request) throws Exception {
+        return wasabiCardService.queryDepositOrder(request);
+    }
+
+    /**
+     * 修改密码
+     */
+    @PostMapping("/card/password/reset")
+    public BaseResultDto<WasabiUpdatePinDto> resetPassword(@RequestBody WasabiUpdatePinEntity entity,
+                                                           InfoEntity infoEntity) throws ServiceException {
+        entity.setCId(infoEntity.getCustomInfo().getCId());
+        return wasabiCardService.updatePin(entity);
+    }
+
+    /**
+     * 冻结卡片
+     */
+    @PostMapping("/card/freeze")
+    public BaseResultDto freezeCard(@RequestBody WasabiFreezeAndUnfreezeEntity request, InfoEntity infoEntity) throws Exception {
+        request.setCId(infoEntity.getCustomInfo().getCId());
+        return wasabiCardService.cardFreeze(request);
+    }
+
+    /**
+     * 解冻卡片
+     */
+    @PostMapping("/card/unfreeze")
+    public BaseResultDto unfreezeCard(@RequestBody WasabiFreezeAndUnfreezeEntity request, InfoEntity infoEntity) throws Exception {
+        request.setCId(infoEntity.getCustomInfo().getCId());
+        return wasabiCardService.cardUnfreeze(request);
+    }
+
+    /**
+     * 查询交易记录分页列表
+     */
+    @PostMapping("/card/transac/page")
+    public ResultWithPagerDto<CardTransacOrderDto> getTransactionPageList(@RequestBody CardTransacOrderPageEntity request) throws ServiceException {
+        return ucardService.getTransacOrderPageList(request);
+    }
+
+    /**
+     * 获取交易纪录详情
+     */
+    @PostMapping("/card/transac/single")
+    public BaseResultDto getTransactionSingle(@RequestBody SingleLongEntity entity) throws ServiceException {
+        return BaseResultDto.success(ucardApiService.getTransactionSingle(entity));
+    }
+
+    /**
+     * 上传文件
+     */
+    @PostMapping("/upload/file")
+    public BaseResultDto uploadFile(@RequestParam(value = "file") MultipartFile file) throws Exception {
+        String middlePath = "/wasabi";
+        wasabiCardService.validatedFile(file);
+        String path = wasabiCardService.commonUpload(file, middlePath);
+        return BaseResultDto.success(Constants.UPLOAD_SUCCESS, path);
+    }
+
+    /**
+     * 查询国家和城市
+     */
+    @PostMapping("/card/country")
+    public BaseResultDto getCardCountry(@RequestBody CardCountryEntity request) throws ServiceException {
+        request.setCardCategory(2);
+        return BaseResultDto.success(ucardService.getCardCountryList(request));
+    }
+
+    /**
+     * 查询职业信息
+     */
+    @PostMapping("/card/occupation/list")
+    public BaseResultDto<List<WasabiOccupationsDto>> getOccupationList() throws ServiceException {
+        return wasabiCardService.getOccupationList();
+    }
+
+    /**
+     * 权限验证
+     */
+    @PostMapping("/card/permission/verify")
+    public BaseResultDto permissionVerify(InfoEntity infoEntity) throws ServiceException {
+        return wasabiCardService.permissionVerify(infoEntity.getCustomInfo());
+    }
+
+    /**
+     * 扫码上传文件
+     */
+    @PostMapping("/scan/upload/file")
+    public BaseResultDto scanUpload(@RequestBody CardWebSocketEntity entity) throws ServiceException {
+        return wasabiCardService.scanUpload(entity);
+    }
+
+    /**
+     * 证件类型配置列表
+     */
+    @PostMapping("/card/id/type/config/list")
+    public ResultWithPagerDto<CardIdTypeConfigDto> getCardIdTypeConfigList(@RequestBody CardIdTypeConfigPageEntity entity) throws ServiceException {
+        return wasabiCardService.getCardIdTypeConfigList(entity);
+    }
+
+    /**
+     * 查询支持的城市列表
+     */
+    @PostMapping("/global/query/bank/cities")
+    public BaseResultDto queryBankCities(@RequestBody CardBankCitiesEntity entity) throws ServiceException {
+        return wasabiCardService.queryBankCities(entity);
+    }
+
+    /**
+     * 查询CVV 发送短信验证码
+     */
+    @PostMapping("/query/cvv/send/code")
+    public BaseResultDto queryCvvSendCode(@RequestBody @Validated CardQueryCvvSendEmailCodeEntity entity,
+                                          HttpServletRequest req) throws ServiceException {
+
+        entity.setIp(GetIpAndMac.getIp(req));
+        entity.setTime(new Date());
+        wasabiCardService.queryCvvSendCode(entity);
+        return BaseResultDto.success(Constants.SEND_SUCCESS);
+    }
+
+    /**
+     * 验证邮箱验证码查询cvv
+     */
+    @PostMapping("/query/cvv/verify/code")
+    public BaseResultDto queryCvvVerifyCode(@RequestBody @Validated CardQueryCvvVerifyEmailCodeEntity entity) throws Exception {
+        return wasabiCardService.queryCvvVerifyCode(entity);
+    }
+
+    @PostMapping("/account/dropdown")
+    public BaseResultDto<List<AccountDropdownDto>> accountDropdown(@RequestBody AccountInfoListEntity entity, InfoEntity infoEntity) throws Exception {
+        entity.setCustomId(infoEntity.getCustomInfo().getId());
+
+        BaseResultDto<List<AccountInfoDto>> resultDto = accountInfoFeignService.accountDropdown(entity);
+        if (resultDto.getCode() == 200) {
+            List<AccountDropdownDto> dropdownDtos = Lists.newArrayList();
+            List<AccountInfoDto> dtos = resultDto.getData();
+            dtos.forEach((item) -> {
+                AccountDropdownDto accountDropdownDto = new AccountDropdownDto();
+                BeanUtils.copyProperties(item, accountDropdownDto);
+                dropdownDtos.add(accountDropdownDto);
+            });
+            return BaseResultDto.success(dropdownDtos);
+
+        } else {
+            return BaseResultDto.error(resultDto.getMsg());
+        }
+
+    }
+
+    /**
+     * 查询汇率
+     */
+    @PostMapping("/global/query/exchange/rate")
+    public BaseResultDto queryExchangeRate(@RequestBody GlobalQueryExchangeRateEntity entity) throws ServiceException {
+        return BaseResultDto.success(wasabiCardService.queryExchangeRate(entity));
+    }
+
+    /**
+     * 查询账户信息
+     */
+    @PostMapping("/card/account/dropdown")
+    public BaseResultDto cardAccountDropdown(InfoEntity infoEntity) throws ServiceException {
+        CardAccountDropdownEntity entity = new CardAccountDropdownEntity();
+        entity.setCId(infoEntity.getCustomInfo().getCId());
+        return wasabiCardService.cardAccountDropdown(entity);
+    }
+
+    /**
+     * 创建交易订单
+     */
+    @PostMapping("/global/create/order")
+    public BaseResultDto globalCreateOrder(@RequestBody GlobalCreateOrderEntity entity, InfoEntity infoEntity) throws Exception {
+        entity.setCId(infoEntity.getCustomInfo().getCId());
+        return wasabiCardService.globalCreateOrder(entity);
+    }
+
+    /**
+     * 速汇订单分页列表
+     */
+    @PostMapping("/global/order/page/list")
+    public ResultWithPagerDto<GlobalOrderDto> globalOrderPageList(@RequestBody GlobalOrderPageEntity entity, InfoEntity infoEntity) throws Exception {
+        entity.setCId(infoEntity.getCustomInfo().getCId());
+        return wasabiCardService.globalOrderPageList(entity);
+    }
+
+    /**
+     * 补充资料
+     */
+    @PostMapping("/global/supplementary/data")
+    public BaseResultDto supplementaryData(@RequestBody WasabiTransactionSubmitRfiEntity entity, InfoEntity infoEntity) throws Exception {
+        entity.setCId(infoEntity.getCustomInfo().getCId());
+        return wasabiCardService.supplementaryData(entity);
+    }
+
+    /**
+     * 支持的币种下拉列表
+     */
+    @PostMapping("/global/currencies/dropdown")
+    public BaseResultDto getCurrenciesDropdown(@RequestBody GlobalCurrenciesDropdownEntity entity) throws ServiceException {
+        return wasabiCardService.getCurrenciesDropdown(entity);
+    }
+
+    /**
+     * 币种字段和可选值列表
+     */
+    @PostMapping("/global/currencies/field/list")
+    public BaseResultDto getCurrenciesFieldList(@RequestBody @Validated GlobalCurrenciesFieldListEntity entity) throws ServiceException {
+        return wasabiCardService.getCurrenciesFieldList(entity);
+    }
+
+    /**
+     * 查询速汇订单详情
+     */
+    @PostMapping("/global/order/details")
+    public BaseResultDto queryGlobalOrderDetails(@RequestBody BaseEntity entity) throws ServiceException {
+        return wasabiCardService.queryGlobalOrderDetails(entity);
+    }
+
+    /**
+     * 取消交易订单
+     */
+    @PostMapping("/global/cancel/order")
+    public BaseResultDto globalCancelOrder(@RequestBody GlobalCancelOrderEntity entity, InfoEntity infoEntity) throws Exception {
+        entity.setCId(infoEntity.getCustomInfo().getCId());
+        return wasabiCardService.globalCancelOrder(entity);
+    }
+
+    /**
+     * 速汇查询用户详情
+     */
+    @PostMapping("/global/user/details")
+    public BaseResultDto findGlobalUserDetails(InfoEntity entity) throws ServiceException {
+        return wasabiCardService.findGlobalUserDetails(entity);
+    }
+
+    /**
+     * 获取收款用户列表
+     */
+    @PostMapping("/global/receiver/user/list")
+    BaseResultDto getGlobalReceiverUserList(@RequestBody GlobalReceiverUserEntity entity) throws ServiceException {
+        return wasabiCardService.getGlobalReceiverUserList(entity);
+    }
+
+    /**
+     * 删除收款用户
+     */
+    @PostMapping("/global/receiver/user/delete")
+    BaseResultDto deleteGlobalReceiverUser(@RequestBody BaseEntity entity) throws ServiceException {
+        return wasabiCardService.deleteGlobalReceiverUser(entity);
+    }
+
+    /**
+     * 区块链配置下拉列表
+     */
+    @PostMapping("/card/blockchain/config/dropdown")
+    BaseResultDto getCardBlockchainConfigDropdown(@RequestBody CardBlockchainConfigDropdownEntity entity) throws ServiceException {
+        return wasabiCardService.getCardBlockchainConfigDropdown(entity);
+    }
+
+    /**
+     * 加密货币交易分页列表
+     */
+    @PostMapping("/encrypted/wallet/transaction/page")
+    ResultWithPagerDto<EncryptedWalletTransactionDto> getEncryptedWalletTransactionPage(@RequestBody EncryptedWalletTransactionPageEntity entity, InfoEntity infoEntity) throws ServiceException {
+        entity.setCId(infoEntity.getCustomInfo().getCId());
+        return wasabiCardService.getEncryptedWalletTransactionPage(entity);
+    }
+
+    /**
+     * 卡扣款分页列表
+     */
+    @PostMapping("/card/withdraw/page")
+    ResultWithPagerDto<CardWithdrawDto> queryCardWithdrawPage(@RequestBody CardWithdrawPageEntity entity, InfoEntity infoEntity) throws ServiceException{
+        entity.setCId(infoEntity.getCustomInfo().getCId());
+        return wasabiCardService.queryCardWithdrawPage(entity);
+    }
+
+}

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

@@ -0,0 +1,1076 @@
+package com.crm.ucard.controller;
+
+import com.crm.rely.backend.core.constant.FeignClientAnnotation;
+import com.crm.rely.backend.core.dto.base.*;
+import com.crm.rely.backend.core.dto.ucard.*;
+import com.crm.rely.backend.core.dto.ucard.vaultody.VaultodyDepositAddressDto;
+import com.crm.rely.backend.core.dto.wasabi.*;
+import com.crm.rely.backend.core.entity.base.*;
+import com.crm.rely.backend.core.entity.custom.info.InfoEntity;
+import com.crm.rely.backend.core.entity.custom.kyc.WebsdkLinkAliEntity;
+import com.crm.rely.backend.core.entity.ucard.*;
+import com.crm.rely.backend.core.entity.ucard.crypto.currency.vaultody.VaultodyDepositAddressPageEntity;
+import com.crm.rely.backend.core.entity.ucard.crypto.currency.vaultody.VaultodyResetDepositAddressEntity;
+import com.crm.rely.backend.core.entity.wasabi.*;
+import com.crm.rely.backend.exception.ServiceException;
+import com.crm.rely.backend.util.GetIpAndMac;
+import com.crm.ucard.service.*;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.List;
+
+/**
+ * 银行卡服务接口
+ */
+@Slf4j
+@RestController
+@RequestMapping("/wasabi/manager")
+public class WasabiCardController {
+
+    @Autowired
+    private UcardService ucardService;
+    @Autowired
+    private WasabiCardService wasabiCardService;
+    @Autowired
+    private VaultodyService vaultodyService;
+
+    /**
+     * 获取卡片类型列表
+     */
+    @PostMapping("/card/types/page")
+    @FeignClientAnnotation
+    public ResultWithPagerDto<CardTypeDto> getCardTypePageList(@RequestBody CardTypePageEntity entity) throws ServiceException {
+        return ucardService.getCardTypePageList(entity);
+    }
+
+    /**
+     * 更新卡类型配置
+     */
+    @PostMapping("/card/type/config/update")
+    @FeignClientAnnotation
+    public BaseResultDto updateCardTypeConfig(@RequestBody CardTypeConfigUpdateEntity entity) throws ServiceException {
+        return wasabiCardService.updateCardTypeConfig(entity);
+    }
+
+    /**
+     * 更新卡片类型和基本信息
+     */
+    @PostMapping("/card/types")
+    @FeignClientAnnotation
+    public BaseResultDto getCardTypes() throws ServiceException {
+        wasabiCardService.saveCardTypeList();
+        wasabiCardService.cardUpdateCountry();
+        wasabiCardService.updateOccupationList();
+        return BaseResultDto.success();
+    }
+
+    /**
+     * 商户用户分页列表
+     */
+    @PostMapping("/merchant/user/page")
+    @FeignClientAnnotation
+    public ResultWithPagerDto<MerchantUserDto> getMerchantUserPageList(@RequestBody MerchantUserPageEntity entity) throws ServiceException {
+        return ucardService.getMerchantUserPageList(entity);
+    }
+
+    /**
+     * 商户用户注册
+     */
+    @PostMapping("/merchant/user/register")
+    @FeignClientAnnotation
+    public BaseResultDto managerRegisterMerchantUser(@RequestBody @Validated CardMerchantUserEntity request, HttpServletRequest servletRequest) throws ServiceException {
+        String ip = GetIpAndMac.getIp(servletRequest);
+        request.setIpAddress(ip);
+        return wasabiCardService.registerMerchantUser(request);
+    }
+
+    /**
+     * 更新商户用户信息
+     */
+    @PostMapping("/merchant/user/update")
+    @FeignClientAnnotation
+    public BaseResultDto updateMerchantUser(@RequestBody @Validated CardMerchantUserEntity request) throws ServiceException {
+        return wasabiCardService.updateMerchantUser(request);
+    }
+
+    /**
+     * 配置用户汇率
+     */
+    @PostMapping("/merchant/user/rate/config")
+    @FeignClientAnnotation
+    public BaseResultDto cardUserRateConfig(@RequestBody CardUserRateConfigEntity request) throws ServiceException {
+        return wasabiCardService.cardUserRateConfig(request);
+    }
+
+    /**
+     * 更新用户邮寄地址
+     */
+    @PostMapping("/merchant/user/address/update")
+    @FeignClientAnnotation
+    public BaseResultDto updateUserMailingAddress(@RequestBody WasabiSaveUserMailingAddressEntity request) throws ServiceException {
+        return wasabiCardService.updateUserMailingAddress(request);
+    }
+
+    /**
+     * 获取kyc认证分页列表
+     */
+    @PostMapping("/merchant/kyc/page")
+    @FeignClientAnnotation
+    ResultWithPagerDto<CardKycStatusDto> getKycPageList(@RequestBody CardKycStatusPageEntity entity) throws ServiceException {
+        return ucardService.getKycPageList(entity);
+    }
+
+    /**
+     * 手动审核KYC认证
+     */
+    @PostMapping("/merchant/kyc/manual/submit")
+    @FeignClientAnnotation
+    public BaseResultDto manualSubmitKyc(@RequestBody CardKycApproveEntity entity) throws ServiceException {
+        return wasabiCardService.manualSubmitKyc(entity);
+    }
+
+    /**
+     * 申请开卡
+     */
+    @PostMapping("/card/apply")
+    @FeignClientAnnotation
+    public BaseResultDto applyCard(@RequestBody CardApplyEntity request) throws Exception {
+        return wasabiCardService.applyCard(request);
+    }
+
+    /**
+     * 开卡审批
+     */
+    @PostMapping("/card/apply/approve")
+    @FeignClientAnnotation
+    public BaseResultDto cardApplyApprove(@RequestBody CardApplyApproveEntity request) throws Exception {
+        return wasabiCardService.cardApplyApprove(request);
+    }
+
+    /**
+     * 查询开卡进度
+     */
+    @PostMapping("/card/apply/progress")
+    @FeignClientAnnotation
+    public BaseResultDto queryApplyProgress(@RequestBody CardApplyProgressEntity request) throws Exception {
+        return wasabiCardService.queryApplyProgress(request);
+    }
+
+    /**
+     * 获取卡片申请列表
+     */
+    @PostMapping("/card/apply/page")
+    @FeignClientAnnotation
+    public ResultWithPagerDto<CardApplyDto> getCardApplyPageList(@RequestBody CardApplyPageEntity entity) throws ServiceException {
+        return ucardService.getCardApplyPageList(entity);
+    }
+
+    /**
+     * 获取卡片申请详情
+     */
+    @PostMapping("/card/apply/details")
+    @FeignClientAnnotation
+    public BaseResultDto cardApplyDetails(@RequestBody BaseEntity entity) throws ServiceException {
+        return wasabiCardService.cardApplyDetails(entity);
+    }
+
+    /**
+     * 获取卡片列表
+     */
+    @PostMapping("/card/page")
+    @FeignClientAnnotation
+    public ResultWithPagerDto<UcardCardDto> getCardPageList(@RequestBody CardPageEntity entity) throws ServiceException {
+        return ucardService.getCardPageList(entity);
+    }
+
+    /**
+     * 银行卡激活
+     */
+    @PostMapping("/card/activate")
+    @FeignClientAnnotation
+    public BaseResultDto<WasabiActiveCardDto> activateCard(@RequestBody @Validated WasabiActiveCardEntity request) throws ServiceException {
+        return wasabiCardService.activeCard(request);
+    }
+
+    /**
+     * 银行卡充值
+     */
+    @PostMapping("/card/recharge")
+    @FeignClientAnnotation
+    public BaseResultDto rechargeCard(@RequestBody WasabiBalanceEntity request) throws ServiceException {
+        return wasabiCardService.cardDeposit(request);
+    }
+
+    /**
+     * 银行卡充值审批
+     */
+    @PostMapping("/card/recharge/approve")
+    @FeignClientAnnotation
+    public BaseResultDto rechargeCardApprove(@RequestBody WasabiDepositApproveEntity request) throws Exception {
+        return wasabiCardService.cardDepositApprove(request);
+    }
+
+    /**
+     * 卡扣款
+     */
+    @PostMapping("/card/withdraw")
+    @FeignClientAnnotation
+    public BaseResultDto cardWithdraw(@RequestBody WasabiWithdrawEntity request) throws Exception {
+        return wasabiCardService.cardWithdraw(request);
+    }
+
+    /**
+     * 销卡
+     */
+    @PostMapping("/card/cancel")
+    @FeignClientAnnotation
+    public BaseResultDto cardCancel(@RequestBody WasabiCancelEntity request) throws Exception {
+        return wasabiCardService.cardCancel(request);
+    }
+
+    /**
+     * 查询用户钱包余额
+     */
+    @PostMapping("/card/wallet/balance")
+    @FeignClientAnnotation
+    public BaseResultDto<WalletBalanceDto> walletBalance(@RequestBody WalletBalanceEntity request) throws ServiceException {
+        return wasabiCardService.walletBalance(request);
+    }
+
+    /**
+     * 获取用户钱包记录列表
+     */
+    @PostMapping("/card/wallet/record/page")
+    @FeignClientAnnotation
+    public ResultWithPagerDto<CardWalletRecordDto> getCardWalletRecordPageList(@RequestBody CardWalletRecordPageEntity entity) throws ServiceException {
+        return wasabiCardService.getCardWalletRecordPageList(entity);
+    }
+
+    /**
+     * 查询充值订单
+     */
+    @PostMapping("/card/recharge/order")
+    @FeignClientAnnotation
+    public BaseResultDto queryRechargeOrder(@RequestBody CardRechargeOrderQueryEntity request) throws Exception {
+        return wasabiCardService.queryDepositOrder(request);
+    }
+
+    /**
+     * 查询充值记录
+     */
+    @PostMapping("/card/recharge/records")
+    @FeignClientAnnotation
+    public BaseResultDto<List<WasabiTransactionDto>> queryRechargeRecords(@RequestBody WasabiTransactionEntity entity) throws Exception {
+        entity.setType("deposit");
+        return BaseResultDto.success(wasabiCardService.getCardTransactionList(entity));
+    }
+
+    /**
+     * 充值记录分页查询
+     */
+    @PostMapping("/card/recharge/page")
+    @FeignClientAnnotation
+    public BaseReportResultDto<List<CardRechargeOrderDto>, CardRechargeOrderSumDto> queryRechargePageList(@RequestBody CardRechargePageEntity entity) throws ServiceException {
+        return ucardService.queryRechargePageList(entity);
+    }
+
+    /**
+     * 查询卡片余额
+     */
+    @PostMapping("/card/balance")
+    @FeignClientAnnotation
+    public BaseResultDto<WasabiBalanceInfoDto> queryCardBalance(@RequestBody WasabiBalanceInfoEntity request) throws ServiceException {
+        return wasabiCardService.getBalanceInfo(request);
+    }
+
+    /**
+     * 调整余额
+     */
+    @PostMapping("/card/wallet/balance/update")
+    @FeignClientAnnotation
+    public BaseResultDto updateBalance(@RequestBody WasabiUpdateBalanceEntity request) throws ServiceException {
+        return wasabiCardService.updateBalance(request);
+    }
+
+    /**
+     * 找回密码
+     */
+    @PostMapping("/card/password/reset")
+    @FeignClientAnnotation
+    public BaseResultDto<WasabiUpdatePinDto> resetPassword(@RequestBody WasabiUpdatePinEntity entity) throws ServiceException {
+        return wasabiCardService.updatePin(entity);
+    }
+
+    /**
+     * 查询交易记录分页列表
+     */
+    @PostMapping("/card/transac/page")
+    @FeignClientAnnotation
+    public ResultWithPagerDto<CardTransacOrderDto> getTransactionPageList(@RequestBody CardTransacOrderPageEntity request) throws ServiceException {
+        return ucardService.getTransacOrderPageList(request);
+    }
+
+    /**
+     * 冻结卡片
+     */
+    @PostMapping("/card/freeze")
+    @FeignClientAnnotation
+    public BaseResultDto freezeCard(@RequestBody WasabiFreezeAndUnfreezeEntity request) throws Exception {
+        return wasabiCardService.cardFreeze(request);
+    }
+
+    /**
+     * 解冻卡片
+     */
+    @PostMapping("/card/unfreeze")
+    @FeignClientAnnotation
+    public BaseResultDto unfreezeCard(@RequestBody WasabiFreezeAndUnfreezeEntity request) throws Exception {
+        return wasabiCardService.cardUnfreeze(request);
+    }
+
+    /**
+     * 校验文件
+     */
+    @PostMapping("/validated/file")
+    @FeignClientAnnotation
+    public void validatedFile(@RequestParam(value = "file") MultipartFile file) throws ServiceException {
+        wasabiCardService.validatedFile(file);
+    }
+
+    /**
+     * 查询国家和城市
+     */
+    @PostMapping("/card/country")
+    @FeignClientAnnotation
+    public BaseResultDto getCardCountry(@RequestBody CardCountryEntity request) throws ServiceException {
+        request.setCardCategory(2);
+        return BaseResultDto.success(ucardService.getCardCountryList(request));
+    }
+
+    /**
+     * 查询职业信息
+     */
+    @PostMapping("/card/occupation/list")
+    @FeignClientAnnotation
+    public BaseResultDto<List<WasabiOccupationsDto>> getOccupationList() throws ServiceException {
+        return wasabiCardService.getOccupationList();
+    }
+
+    /**
+     * 查询激活码
+     */
+    @PostMapping("/get/activation/code")
+    @FeignClientAnnotation
+    public BaseResultDto<WasabiThird3dsTransactionDto> getActivationCode(@RequestBody WasabiThird3dsTransactionEntity entity) throws ServiceException {
+        return wasabiCardService.getActivationCode(entity);
+    }
+
+    /**
+     * 卡信息刷新
+     */
+    @PostMapping("/card/info/refresh")
+    @FeignClientAnnotation
+    public BaseResultDto refreshCardInfo(@RequestBody CardInfoRefreshEntity entity) throws ServiceException {
+        return wasabiCardService.refreshCardInfo(entity);
+    }
+
+    /**
+     * 卡权限分页列表
+     */
+    @PostMapping("/card/permission/page")
+    @FeignClientAnnotation
+    public ResultWithPagerDto<CardPermissionDto> queryPermissionPageList(@RequestBody CardPermissionPageEntity entity) throws ServiceException {
+        return wasabiCardService.queryPermissionPageList(entity);
+    }
+
+    /**
+     * 新增卡权限
+     */
+    @PostMapping("/card/permission/add")
+    @FeignClientAnnotation
+    public BaseResultDto permissionAdd(@RequestBody CardPermissionAddEntity entity) throws ServiceException {
+        return wasabiCardService.addPermission(entity);
+    }
+
+    /**
+     * 更新卡权限
+     */
+    @PostMapping("/card/permission/update")
+    @FeignClientAnnotation
+    public BaseResultDto permissionAdd(@RequestBody CardPermissionUpdateEntity entity) throws ServiceException {
+        return wasabiCardService.updatePermission(entity);
+    }
+
+    /**
+     * 删除卡权限
+     */
+    @PostMapping("/card/permission/delete")
+    @FeignClientAnnotation
+    public BaseResultDto permissionDelete(@RequestBody CardPermissionDeleteEntity entity) throws ServiceException {
+        return wasabiCardService.deletePermission(entity);
+    }
+
+    /**
+     * 操作记录分页列表
+     */
+    @PostMapping("/card/operate/page")
+    @FeignClientAnnotation
+    public ResultWithPagerDto<CardOperateDto> queryOperatePageList(@RequestBody CardOperatePageEntity entity) throws ServiceException {
+        return wasabiCardService.queryOperatePageList(entity);
+    }
+
+    /**
+     * kyc认证详情
+     */
+    @PostMapping("/kyc/status/single")
+    @FeignClientAnnotation
+    public BaseResultDto kycStatusSingle(@RequestBody SingleLongEntity entity) throws ServiceException {
+        return wasabiCardService.kycStatusSingle(entity);
+    }
+
+    /**
+     * 重新充值默认开卡金额
+     */
+    @PostMapping("/recharge/default/amount")
+    @FeignClientAnnotation
+    public BaseResultDto rechargeDefaultAmount(@RequestBody CardRechargeDefaultAmountEntity entity) throws Exception {
+        return wasabiCardService.rechargeDefaultAmount(entity);
+    }
+
+    /**
+     * 校验实体卡卡号是否使用过
+     */
+    @PostMapping("/card/number/verify")
+    @FeignClientAnnotation
+    public BaseResultDto cardNumberVerify(@RequestBody @Validated CardNumberVerifyEntity entity) throws ServiceException {
+        return wasabiCardService.cardNumberVerify(entity);
+    }
+
+    /**
+     * 身份认证获取web链接
+     *
+     * @param entity
+     * @return
+     */
+    @PostMapping("/getWebsdkLink")
+    public BaseResultDto getWebsdkLink(@RequestBody WebsdkLinkAliEntity entity, InfoEntity infoEntity) throws Exception {
+        return wasabiCardService.getWebsdkLink(entity, infoEntity.getCustomInfo().getId());
+    }
+
+    /**
+     * 手动上传证件照
+     *
+     * @param entity
+     * @return
+     */
+    @PostMapping("/card/photo/manually")
+    @FeignClientAnnotation
+    public BaseResultDto uploadCardPhotoManually(@RequestBody CardPhotoUploadManuallyEntity entity) throws ServiceException {
+        return wasabiCardService.uploadCardPhotoManually(entity);
+    }
+
+    /**
+     * 证件类型配置列表
+     *
+     * @param entity
+     * @return
+     */
+    @PostMapping("/card/id/type/config/list")
+    @FeignClientAnnotation
+    public ResultWithPagerDto<CardIdTypeConfigDto> getCardIdTypeConfigList(@RequestBody CardIdTypeConfigPageEntity entity) throws ServiceException {
+        return wasabiCardService.getCardIdTypeConfigList(entity);
+    }
+
+    /**
+     * 批量新增证件类型配置
+     *
+     * @param entitys
+     * @return
+     */
+    @PostMapping("/card/id/type/config/add")
+    @FeignClientAnnotation
+    public BaseResultDto batchAddCardIdTypeConfig(@RequestBody List<CardIdTypeConfigAddEntity> entitys) throws ServiceException {
+        return wasabiCardService.batchAddCardIdTypeConfig(entitys);
+    }
+
+    /**
+     * 修改证件类型配置
+     *
+     * @param entity
+     * @return
+     */
+    @PostMapping("/card/id/type/config/update")
+    @FeignClientAnnotation
+    public BaseResultDto updateCardIdTypeConfig(@RequestBody CardIdTypeConfigUpdateEntity entity) throws ServiceException {
+        return wasabiCardService.updateCardIdTypeConfig(entity);
+    }
+
+    /**
+     * 删除证件类型配置
+     *
+     * @param entity
+     * @return
+     */
+    @PostMapping("/card/id/type/config/delete")
+    @FeignClientAnnotation
+    public BaseResultDto deleteCardIdTypeConfig(@RequestBody BaseDeleteEntities entity) throws ServiceException {
+        return wasabiCardService.deleteCardIdTypeConfig(entity);
+    }
+
+    /**
+     * 查询cvv码
+     */
+    @PostMapping("/card/query/cvv")
+    @FeignClientAnnotation
+    public BaseResultDto cardQueryCvv(@RequestBody CardVerifyGoogleCodeEntity entity) throws ServiceException {
+        return wasabiCardService.cardQueryCvv(entity);
+    }
+
+    /**
+     * 根据卡号查询卡信息
+     */
+    @PostMapping("/card/info/query")
+    @FeignClientAnnotation
+    public BaseResultDto queryCardInfoByCardNumber(@RequestBody CardInfoQueryEntity entity) throws ServiceException {
+        return wasabiCardService.queryCardInfoByCardNumber(entity);
+    }
+
+    /**
+     * 导入卡号
+     */
+    @PostMapping("/card/number/import")
+    @FeignClientAnnotation
+    BaseResultDto cardNumberImport(@RequestBody List<CardNumberAddEntity> entityList) throws ServiceException {
+        return wasabiCardService.cardNumberImport(entityList);
+    }
+
+    /**
+     * 卡号列表
+     */
+    @PostMapping("/card/number/list")
+    @FeignClientAnnotation
+    ResultWithPagerDto<CardNumberDto> queryCardNumberList(@RequestBody CardNumberPageEntity entity) throws ServiceException {
+        return wasabiCardService.queryCardNumberList(entity);
+    }
+
+    /**
+     * 卡号列表
+     */
+    @PostMapping("/card/number/dropdown")
+    @FeignClientAnnotation
+    BaseResultDto queryCardNumberDropdown(@RequestBody CardNumberPageEntity entity) throws ServiceException {
+        return wasabiCardService.queryCardNumberDropdown(entity);
+    }
+
+    /**
+     * 修改卡号状态
+     */
+    @PostMapping("/card/number/update/status")
+    @FeignClientAnnotation
+    BaseResultDto saveCardNumberStatus(@RequestBody CardNumberUpdateEntity entity) throws ServiceException {
+        return wasabiCardService.saveCardNumberStatus(entity);
+    }
+
+    /**
+     * 删除实体卡卡号
+     */
+    @PostMapping("/card/number/delete")
+    @FeignClientAnnotation
+    public BaseResultDto deleteCardNumber(@RequestBody BaseDeleteEntities entity) throws ServiceException {
+        return wasabiCardService.deleteCardNumber(entity);
+    }
+
+    /**
+     * 用户信息导出
+     */
+    @PostMapping("/merchant/user/list/export")
+    @FeignClientAnnotation
+    public BaseResultDto<List<MerchantUserDto>> merchantUserListExport(@RequestBody MerchantUserPageEntity entity) throws ServiceException {
+        return wasabiCardService.merchantUserListExport(entity);
+    }
+
+    /**
+     * kyc认证列表导出
+     */
+    @PostMapping("/merchant/kyc/list/export")
+    @FeignClientAnnotation
+    BaseResultDto<List<CardKycStatusDto>> merchantKycListExport(@RequestBody CardKycStatusPageEntity entity) throws ServiceException {
+        return wasabiCardService.merchantKycListExport(entity);
+    }
+
+    /**
+     * 卡片申请列表导出
+     */
+    @PostMapping("/card/apply/list/export")
+    @FeignClientAnnotation
+    public BaseResultDto<List<CardApplyDto>> cardApplyListExport(@RequestBody CardApplyPageEntity entity) throws ServiceException {
+        return wasabiCardService.cardApplyListExport(entity);
+    }
+
+    /**
+     * 卡片列表导出
+     */
+    @PostMapping("/card/list/export")
+    @FeignClientAnnotation
+    public BaseResultDto<List<UcardCardDto>> cardListExport(@RequestBody CardPageEntity entity) throws ServiceException {
+        return wasabiCardService.cardListExport(entity);
+    }
+
+    /**
+     * 交易记录列表导出
+     */
+    @PostMapping("/card/transac/record/export")
+    @FeignClientAnnotation
+    public BaseResultDto<List<CardTransacOrderDto>> cardTransacRecordExport(@RequestBody CardTransacOrderPageEntity request) throws ServiceException {
+        return wasabiCardService.cardTransacRecordExport(request);
+    }
+
+    /**
+     * 钱包余额记录列表导出
+     */
+    @PostMapping("/card/wallet/record/export")
+    @FeignClientAnnotation
+    public BaseResultDto<List<CardWalletRecordDto>> cardWalletRecordExport(@RequestBody CardWalletRecordPageEntity request) throws ServiceException {
+        return wasabiCardService.cardWalletRecordExport(request);
+    }
+
+    /**
+     * 操作记录列表导出
+     */
+    @PostMapping("/card/operate/record/export")
+    @FeignClientAnnotation
+    public BaseResultDto<List<CardOperateDto>> cardOperateRecordExport(@RequestBody CardOperatePageEntity entity) throws ServiceException {
+        return wasabiCardService.cardOperateRecordExport(entity);
+    }
+
+    /**
+     * 充值记录导出
+     */
+    @PostMapping("/card/recharge/list/export")
+    @FeignClientAnnotation
+    public BaseResultDto<List<CardRechargeOrderDto>> cardRechargeListExport(@RequestBody CardRechargePageEntity entity) throws ServiceException {
+        return wasabiCardService.cardRechargeListExport(entity);
+    }
+
+    /**
+     * 速汇订单导出
+     */
+    @PostMapping("/global/order/list/export")
+    @FeignClientAnnotation
+    public BaseResultDto<List<GlobalOrderDto>> globalOrderListExport(@RequestBody GlobalOrderPageEntity entity) throws ServiceException {
+        return wasabiCardService.globalOrderListExport(entity);
+    }
+
+    /**
+     * 添加文件记录
+     */
+    @PostMapping("/card/file/add")
+    @FeignClientAnnotation
+    public BaseResultDto cardVideoAdd(@RequestBody @Validated CardFileAddEntity entity) throws ServiceException {
+        return wasabiCardService.cardFileAdd(entity);
+    }
+
+    /**
+     * 修改文件
+     */
+    @PostMapping("/card/file/update")
+    @FeignClientAnnotation
+    public BaseResultDto cardVideoUpdate(@RequestBody @Validated CardFileUpdateEntity entity) throws ServiceException {
+        return wasabiCardService.cardFileUpdate(entity);
+    }
+
+    /**
+     * 删除文件
+     */
+    @PostMapping("/card/file/delete")
+    @FeignClientAnnotation
+    public BaseResultDto cardVideoDelete(@RequestBody BaseDeleteEntities entity) throws ServiceException {
+        return wasabiCardService.cardFileDelete(entity);
+    }
+
+    /**
+     * 文件分页列表
+     */
+    @PostMapping("/card/file/search/list")
+    @FeignClientAnnotation
+    public ResultWithPagerDto<CardFileDto> cardFileSearchList(@RequestBody CardFilePageEntity entity) throws ServiceException {
+        return wasabiCardService.cardFileSearchList(entity);
+    }
+
+    /**
+     * 同步币种信息
+     */
+    @PostMapping("/global/currencies/save")
+    @FeignClientAnnotation
+    public BaseResultDto saveAvailableCurrencies() throws ServiceException {
+        return wasabiCardService.saveAvailableCurrencies();
+    }
+
+    /**
+     * 币种分页列表
+     */
+    @PostMapping("/global/currencies/list")
+    @FeignClientAnnotation
+    ResultWithPagerDto<WasabiAvailableCurrenciesListDto> getCurrenciesPageList(@RequestBody GlobalCurrenciesPageListEntity entity) throws ServiceException {
+        return wasabiCardService.getCurrenciesPageList(entity);
+    }
+
+    /**
+     * 支持的币种下拉列表
+     */
+    @PostMapping("/global/currencies/dropdown")
+    @FeignClientAnnotation
+    public BaseResultDto getCurrenciesDropdown(@RequestBody GlobalCurrenciesDropdownEntity entity) throws ServiceException {
+        return wasabiCardService.getCurrenciesDropdown(entity);
+    }
+
+    /**
+     * 币种字段和可选值列表
+     */
+    @PostMapping("/global/currencies/field/list")
+    @FeignClientAnnotation
+    public BaseResultDto getCurrenciesFieldList(@RequestBody @Validated GlobalCurrenciesFieldListEntity entity) throws ServiceException {
+        return wasabiCardService.getCurrenciesFieldList(entity);
+    }
+
+    /**
+     * 创建交易订单
+     */
+    @PostMapping("/global/create/order")
+    @FeignClientAnnotation
+    public BaseResultDto globalCreateOrder(@RequestBody GlobalCreateOrderEntity entity) throws Exception {
+        return wasabiCardService.globalCreateOrder(entity);
+    }
+
+    /**
+     * 取消交易订单
+     */
+    @PostMapping("/global/cancel/order")
+    @FeignClientAnnotation
+    public BaseResultDto globalCancelOrder(@RequestBody GlobalCancelOrderEntity entity) throws Exception {
+        return wasabiCardService.globalCancelOrder(entity);
+    }
+
+    /**
+     * 查询已认证用户列表
+     */
+    @PostMapping("/card/query/user/list")
+    @FeignClientAnnotation
+    public BaseResultDto queryUcardUserList() throws ServiceException {
+        return wasabiCardService.queryUcardUserList();
+    }
+
+    /**
+     * 币种配置更改
+     */
+    @PostMapping("/global/currencies/config")
+    @FeignClientAnnotation
+    public BaseResultDto globalCurrenciesConfig(@RequestBody GlobalCurrenciesConfigEntity entity) throws ServiceException {
+        return wasabiCardService.globalCurrenciesConfig(entity);
+    }
+
+    /**
+     * 查询汇率和手续费率
+     */
+    @PostMapping("/global/query/exchange/rate")
+    @FeignClientAnnotation
+    public BaseResultDto queryExchangeRate(@RequestBody GlobalQueryExchangeRateEntity entity) throws ServiceException {
+        return BaseResultDto.success(wasabiCardService.queryExchangeRate(entity));
+    }
+
+    /**
+     * 查询最新汇率
+     */
+    @PostMapping("/global/query/latest/exchange/rate")
+    @FeignClientAnnotation
+    public BaseResultDto getExchangeRateByCurrency(@RequestBody GlobalQueryExchangeRateEntity entity) throws ServiceException {
+        return BaseResultDto.success(wasabiCardService.getExchangeRateByCurrency(entity.getPayoutCurrency(), entity.getTransferTypeId(), entity.getPayoutMethodId()));
+    }
+
+    /**
+     * 查询账户信息
+     */
+    @PostMapping("/card/account/dropdown")
+    @FeignClientAnnotation
+    public BaseResultDto cardAccountDropdown(@RequestBody CardAccountDropdownEntity entity) throws ServiceException {
+        return wasabiCardService.cardAccountDropdown(entity);
+    }
+
+    /**
+     * 查询支持的城市列表
+     */
+    @PostMapping("/global/query/bank/cities")
+    @FeignClientAnnotation
+    public BaseResultDto queryBankCities(@RequestBody CardBankCitiesEntity entity) throws ServiceException {
+        return wasabiCardService.queryBankCities(entity);
+    }
+
+    /**
+     * 查询币种全局配置
+     */
+    @PostMapping("/global/query/currencies/config")
+    @FeignClientAnnotation
+    public BaseResultDto getCurrenciesGlobalConfig() throws ServiceException {
+        return wasabiCardService.getCurrenciesGlobalConfig();
+    }
+
+    /**
+     * 速汇订单分页列表
+     */
+    @PostMapping("/global/order/page/list")
+    @FeignClientAnnotation
+    public ResultWithPagerDto<GlobalOrderDto> globalOrderPageList(@RequestBody GlobalOrderPageEntity entity) throws Exception {
+        return wasabiCardService.globalOrderPageList(entity);
+    }
+
+    /**
+     * 补充资料
+     */
+    @PostMapping("/global/supplementary/data")
+    @FeignClientAnnotation
+    public BaseResultDto supplementaryData(@RequestBody WasabiTransactionSubmitRfiEntity entity) throws Exception {
+        return wasabiCardService.supplementaryData(entity);
+    }
+
+    /**
+     * 速汇订单审批
+     */
+    @PostMapping("/global/order/approve")
+    @FeignClientAnnotation
+    public BaseResultDto globalOrderApprove(@RequestBody GlobalOrderApproveEntity entity) throws Exception {
+        return wasabiCardService.globalOrderApprove(entity);
+    }
+
+    /**
+     * 查询速汇订单详情
+     */
+    @PostMapping("/global/order/details")
+    @FeignClientAnnotation
+    public BaseResultDto queryGlobalOrderDetails(@RequestBody BaseEntity entity) throws ServiceException {
+        return wasabiCardService.queryGlobalOrderDetails(entity);
+    }
+
+    /**
+     * 获取收款用户列表
+     */
+    @PostMapping("/global/receiver/user/list")
+    @FeignClientAnnotation
+    BaseResultDto getGlobalReceiverUserList(@RequestBody GlobalReceiverUserEntity entity) throws ServiceException {
+        return wasabiCardService.getGlobalReceiverUserList(entity);
+    }
+
+    /**
+     * 删除收款用户
+     */
+    @PostMapping("/global/receiver/user/delete")
+    @FeignClientAnnotation
+    BaseResultDto deleteGlobalReceiverUser(@RequestBody BaseEntity entity) throws ServiceException{
+        return wasabiCardService.deleteGlobalReceiverUser(entity);
+    }
+
+    /**
+     * 区块链配置列表
+     */
+    @PostMapping("/card/blockchain/config/page")
+    @FeignClientAnnotation
+    ResultWithPagerDto<CardBlockchainConfigDto> getCardBlockchainConfigPageList(@RequestBody CardBlockchainConfigPageEntity entity) throws ServiceException{
+        return wasabiCardService.getCardBlockchainConfigPageList(entity);
+    }
+
+    /**
+     * 区块链下拉列表
+     */
+    @PostMapping("/card/blockchain/dropdown")
+    @FeignClientAnnotation
+    BaseResultDto getCardBlockchainDropdown() throws ServiceException{
+        return wasabiCardService.getCardBlockchainDropdown();
+    }
+
+    /**
+     * 新增区块链配置
+     */
+    @PostMapping("/card/blockchain/config/add")
+    @FeignClientAnnotation
+    BaseResultDto addCardBlockchainConfig(@RequestBody CardBlockchainConfigAddEntity entity) throws ServiceException{
+        return wasabiCardService.addCardBlockchainConfig(entity);
+    }
+
+    /**
+     * 修改区块链配置
+     */
+    @PostMapping("/card/blockchain/config/update")
+    @FeignClientAnnotation
+    BaseResultDto updateCardBlockchainConfig(@RequestBody CardBlockchainConfigUpdateEntity entity) throws ServiceException{
+        return wasabiCardService.updateCardBlockchainConfig(entity);
+    }
+
+    /**
+     * 删除区块链配置
+     */
+    @PostMapping("/card/blockchain/config/delete")
+    @FeignClientAnnotation
+    BaseResultDto deleteCardBlockchainConfig(@RequestBody BaseDeleteEntities entity) throws ServiceException{
+        return wasabiCardService.deleteCardBlockchainConfig(entity);
+    }
+
+    /**
+     * 区块链配置列表
+     */
+    @PostMapping("/card/blockchain/rate/config/page")
+    @FeignClientAnnotation
+    ResultWithPagerDto<CardBlockchainRateConfigDto> getCardBlockchainRateConfigPageList(@RequestBody CardBlockchainRateConfigPageEntity entity) throws ServiceException{
+        return wasabiCardService.getCardBlockchainRateConfigPageList(entity);
+    }
+
+    /**
+     * 新增区块链配置
+     */
+    @PostMapping("/card/blockchain/rate/config/add")
+    @FeignClientAnnotation
+    BaseResultDto addCardBlockchainRateConfig(@RequestBody CardBlockchainRateConfigAddEntity entity) throws ServiceException{
+        return wasabiCardService.addCardBlockchainRateConfig(entity);
+    }
+
+    /**
+     * 修改区块链配置
+     */
+    @PostMapping("/card/blockchain/rate/config/update")
+    @FeignClientAnnotation
+    BaseResultDto updateCardBlockchainRateConfig(@RequestBody CardBlockchainRateConfigUpdateEntity entity) throws ServiceException{
+        return wasabiCardService.updateCardBlockchainRateConfig(entity);
+    }
+
+    /**
+     * 删除区块链配置
+     */
+    @PostMapping("/card/blockchain/rate/config/delete")
+    @FeignClientAnnotation
+    BaseResultDto deleteCardBlockchainRateConfig(@RequestBody BaseDeleteEntities entity) throws ServiceException{
+        return wasabiCardService.deleteCardBlockchainRateConfig(entity);
+    }
+
+    /**
+     * 钱包地址分页列表
+     */
+    @PostMapping("/card/deposit/address/page")
+    @FeignClientAnnotation
+    ResultWithPagerDto<VaultodyDepositAddressDto> getDepositAddressPage(@RequestBody VaultodyDepositAddressPageEntity entity) throws ServiceException{
+        return vaultodyService.getDepositAddressPage(entity);
+    }
+
+    /**
+     * 重置钱包地址
+     */
+    @PostMapping("/card/deposit/address/reset")
+    @FeignClientAnnotation
+    BaseResultDto resetDepositAddress(@RequestBody VaultodyResetDepositAddressEntity entity) throws ServiceException{
+        return vaultodyService.resetDepositAddress(entity);
+    }
+
+    /**
+     * 加密货币交易分页列表
+     */
+    @PostMapping("/encrypted/wallet/transaction/page")
+    @FeignClientAnnotation
+    ResultWithPagerDto<EncryptedWalletTransactionDto> getEncryptedWalletTransactionPage(@RequestBody EncryptedWalletTransactionPageEntity entity) throws ServiceException{
+        return wasabiCardService.getEncryptedWalletTransactionPage(entity);
+    }
+
+    /**
+     * 加密货币交易记录导出
+     */
+    @PostMapping("/encrypted/wallet/transaction/list/export")
+    @FeignClientAnnotation
+    BaseResultDto<List<EncryptedWalletTransactionDto>> encryptedWalletTransactionListExport(@RequestBody EncryptedWalletTransactionPageEntity entity) throws ServiceException{
+        return wasabiCardService.encryptedWalletTransactionListExport(entity);
+    }
+
+    /**
+     * 卡扣款分页列表
+     */
+    @PostMapping("/card/withdraw/page")
+    @FeignClientAnnotation
+    ResultWithPagerDto<CardWithdrawDto> queryCardWithdrawPage(@RequestBody CardWithdrawPageEntity entity) throws ServiceException{
+        return wasabiCardService.queryCardWithdrawPage(entity);
+    }
+
+    /**
+     * 卡扣款列表导出
+     */
+    @PostMapping("/card/withdraw/list/export")
+    @FeignClientAnnotation
+    BaseResultDto<List<CardWithdrawDto>> cardWithdrawListExport(@RequestBody CardWithdrawPageEntity entity) throws ServiceException{
+        return wasabiCardService.cardWithdrawListExport(entity);
+    }
+
+    /**
+     * 卡3ds分页列表
+     */
+    @PostMapping("/card/3ds/transaction/page")
+    @FeignClientAnnotation
+    ResultWithPagerDto<Card3dsTransactionDto> queryCard3dsTransactionPage(@RequestBody Card3dsTransactionPageEntity entity) throws ServiceException{
+        return wasabiCardService.queryCard3dsTransactionPage(entity);
+    }
+
+    /**
+     * 3ds列表导出
+     */
+    @PostMapping("/card/3ds/transaction/list/export")
+    @FeignClientAnnotation
+    BaseResultDto<List<Card3dsTransactionDto>> card3dsTransactionListExport(@RequestBody Card3dsTransactionPageEntity entity) throws ServiceException{
+        return wasabiCardService.card3dsTransactionListExport(entity);
+    }
+
+
+    /**
+     * 银行卡授权交易信息数据定时同步查询
+     */
+    @Scheduled(cron = "0 0 1 * * ?")
+    public void queryOrderInfo() throws ServiceException {
+
+        log.info("银行卡授权交易信息数据定时同步查询开始: .............................");
+        try {
+            wasabiCardService.queryOrderInfo();
+        } catch (Exception e) {
+            log.error("银行卡授权交易信息数据定时同步任务执行失败", e);
+        }
+        log.info("银行卡授权交易信息数据定时同步查询结束: .............................");
+    }
+
+    /**
+     * 激活处理中数据查询卡信息并更新数据库
+     */
+    @Scheduled(cron = "0 0 * * * ?")
+    public void queryCardInfo() throws Exception {
+
+        log.info("激活中数据同步定时任务开始: .............................");
+        try {
+            wasabiCardService.queryCardInfo();
+        } catch (Exception e) {
+            log.error("激活中数据同步定时任务执行失败", e);
+        }
+        log.info("激活中数据同步定时任务结束: .............................");
+    }
+
+    /**
+     * 待激活卡片更新邮寄状态任务
+     */
+    @Scheduled(cron = "0 0 * * * ?")
+    public void queryCardLogisticsStatus() throws Exception {
+
+        log.info("待激活卡片更新邮寄状态任务开始: .............................");
+        try {
+            wasabiCardService.queryCardLogisticsStatus();
+        } catch (Exception e) {
+            log.error("待激活卡片更新邮寄状态任务执行失败", e);
+        }
+        log.info("待激活卡片更新邮寄状态任务结束: .............................");
+    }
+
+}

+ 90 - 0
ucard-cloud/src/main/java/com/crm/ucard/controller/WasabiCardNotifyController.java

@@ -0,0 +1,90 @@
+package com.crm.ucard.controller;
+
+import com.alibaba.fastjson.JSON;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.dto.wasabi.*;
+import com.crm.rely.backend.core.pojo.table.SysConfigTable;
+import com.crm.rely.backend.exception.ServiceException;
+import com.crm.ucard.config.WasabiConfig;
+import com.crm.ucard.service.SysConfigService;
+import com.crm.ucard.service.WasabiCardService;
+import com.crm.ucard.util.RsaUtils;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+@Slf4j
+@RestController
+@RequestMapping("/wasabi")
+public class WasabiCardNotifyController {
+
+    @Autowired
+    private SysConfigService sysConfigService;
+
+    @Autowired
+    private WasabiCardService wasabiCardService;
+
+    @PostMapping("/callback")
+    public WasabiNotifyResultDto notify(@RequestHeader("x-wsb-category") String category,
+                                @RequestHeader("x-wsb-signature") String signature,
+                                @RequestHeader("x-wsb-request-id") String requestId,
+                                @RequestBody String request) throws Exception {
+        try {
+            log.info("wasabi回调通知开始:" + JSON.toJSONString(request));
+            WasabiConfig config = getWasabiConfig();
+            // 验证签名
+            if (!RsaUtils.verify(request, config.getWsbPublicKey(), signature)) {
+                return WasabiNotifyResultDto.error();
+            }
+            switch (category) {
+                case "card_transaction":
+                    WasabiTransactionDto transactionNotifyDto = JSON.parseObject(request, WasabiTransactionDto.class);
+                    wasabiCardService.cardTransactionNotify(transactionNotifyDto);
+                    break;
+                case "card_auth_transaction":
+                    WasabiAuthTransactionDto authTransactionNotifyDto = JSON.parseObject(request, WasabiAuthTransactionDto.class);
+                    wasabiCardService.cardAuthTransactionNotify(authTransactionNotifyDto);
+                    break;
+                case "card_fee_patch":
+                    WasabiFeePatchNotifyDto feePatchNotifyDto = JSON.parseObject(request, WasabiFeePatchNotifyDto.class);
+                    wasabiCardService.cardFeePatchNotify(feePatchNotifyDto);
+                    break;
+                case "card_3ds":
+                    WasabiThird3dsTransactionDto card3dsNotifyDto = JSON.parseObject(request, WasabiThird3dsTransactionDto.class);
+                    wasabiCardService.card3dsNotify(card3dsNotifyDto);
+                    break;
+                case "card_holder":
+                    WasabiHolderQueryDto holderNotifyDto = JSON.parseObject(request, WasabiHolderQueryDto.class);
+                    wasabiCardService.cardHolderNotify(holderNotifyDto);
+                    break;
+                case "physical_card":
+                    WasabiPhysicalCardNotifyDto physicalCardNotifyDto = JSON.parseObject(request, WasabiPhysicalCardNotifyDto.class);
+                    wasabiCardService.physicalCardNotify(physicalCardNotifyDto);
+                    break;
+                case "work":
+                    break;
+                case "gt_transaction":
+                    WasabiTransactionTransferDto transferDto = JSON.parseObject(request, WasabiTransactionTransferDto.class);
+                    wasabiCardService.expressRemittanceTransactionNotify(transferDto);
+                    break;
+                default:
+                    return WasabiNotifyResultDto.error();
+            }
+            log.info("wasabi回调通知结束");
+            return WasabiNotifyResultDto.success();
+        } catch (Exception e) {
+            log.error("wasabi回调通知处理失败",e);
+            return WasabiNotifyResultDto.error();
+        }
+    }
+
+    public WasabiConfig getWasabiConfig() throws ServiceException {
+        SysConfigTable sysConfigTable = sysConfigService.getByCode(Constants.WASABI_CARD);
+        if (sysConfigTable == null) {
+            throw ServiceException.exception(Constants.SYSTEM_ERROR);
+        }
+        WasabiConfig wasabiConfig = JSON.parseObject(sysConfigTable.getValue(), WasabiConfig.class);
+        return wasabiConfig;
+    }
+
+}

+ 17 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/Card3dsTransactionMapper.java

@@ -0,0 +1,17 @@
+package com.crm.ucard.dao.mapper;
+
+
+import com.crm.rely.backend.core.dto.ucard.Card3dsTransactionDto;
+import com.crm.rely.backend.core.entity.ucard.Card3dsTransactionPageEntity;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface Card3dsTransactionMapper {
+
+    Integer countList(Card3dsTransactionPageEntity entity);
+
+    List<Card3dsTransactionDto> pageList(Card3dsTransactionPageEntity entity);
+
+}

+ 39 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardApplyMapper.java

@@ -0,0 +1,39 @@
+package com.crm.ucard.dao.mapper;
+
+
+import com.crm.rely.backend.core.dto.ucard.CardApplyDto;
+import com.crm.rely.backend.core.entity.base.BaseEntity;
+import com.crm.rely.backend.core.entity.ucard.CardApplyPageEntity;
+import com.crm.rely.backend.core.pojo.table.ucard.CardApplyTable;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CardApplyMapper {
+
+    Integer countList(CardApplyPageEntity entity);
+
+    List<CardApplyDto> pageList(CardApplyPageEntity entity);
+
+    /**
+     * 查询开卡中
+     */
+    CardApplyTable findByUniqueIdAndCardTypeId(@Param("uniqueId") String uniqueId, @Param("cardTypeId") Integer cardTypeId);
+
+    /**
+     * 查看详情
+     */
+    CardApplyDto findById(BaseEntity entity);
+
+    CardApplyTable cardNumberVerify(String cardNumber);
+
+    /**
+     * 根据UniqueId 查询持卡人为拒绝并且持卡人id不为空的数据
+     */
+    CardApplyTable findByUniqueIdAndHolderIdNotNullAndHolderStatusIsReject(@Param("uniqueId") String uniqueId);
+
+    List<String> queryAllUsedCardNumber();
+
+}

+ 19 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardBlockchainConfigMapper.java

@@ -0,0 +1,19 @@
+package com.crm.ucard.dao.mapper;
+
+
+import com.crm.rely.backend.core.dto.ucard.CardBlockchainConfigDto;
+import com.crm.rely.backend.core.entity.ucard.*;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CardBlockchainConfigMapper {
+
+    Integer countList(CardBlockchainConfigPageEntity entity);
+
+    List<CardBlockchainConfigDto> pageList(CardBlockchainConfigPageEntity entity);
+
+    void insert(CardBlockchainConfigAddEntity table);
+
+}

+ 20 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardBlockchainRateConfigMapper.java

@@ -0,0 +1,20 @@
+package com.crm.ucard.dao.mapper;
+
+
+import com.crm.rely.backend.core.dto.ucard.CardBlockchainRateConfigDto;
+import com.crm.rely.backend.core.entity.ucard.CardBlockchainRateConfigAddEntity;
+import com.crm.rely.backend.core.entity.ucard.CardBlockchainRateConfigPageEntity;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CardBlockchainRateConfigMapper {
+
+    Integer countList(CardBlockchainRateConfigPageEntity entity);
+
+    List<CardBlockchainRateConfigDto> pageList(CardBlockchainRateConfigPageEntity entity);
+
+    void insert(CardBlockchainRateConfigAddEntity entity);
+
+}

+ 18 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardCountryMapper.java

@@ -0,0 +1,18 @@
+package com.crm.ucard.dao.mapper;
+
+import com.crm.rely.backend.core.dto.ucard.CardCountryDto;
+import com.crm.rely.backend.core.entity.ucard.CardCountryEntity;
+import com.crm.rely.backend.core.pojo.table.ucard.CardCountryTable;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CardCountryMapper {
+
+    List<CardCountryDto> getCardCountryList(CardCountryEntity request);
+
+    void batchSave(List<CardCountryTable> list);
+
+    void deleteByCardCategory(Integer cardCategory);
+}

+ 17 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardCryptoCallbackRecordMapper.java

@@ -0,0 +1,17 @@
+package com.crm.ucard.dao.mapper;
+
+
+import com.crm.rely.backend.core.dto.ucard.EncryptedWalletTransactionDto;
+import com.crm.rely.backend.core.entity.ucard.EncryptedWalletTransactionPageEntity;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CardCryptoCallbackRecordMapper {
+
+    Integer countList(EncryptedWalletTransactionPageEntity entity);
+
+    List<EncryptedWalletTransactionDto> pageList(EncryptedWalletTransactionPageEntity entity);
+
+}

+ 19 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardFileMapper.java

@@ -0,0 +1,19 @@
+package com.crm.ucard.dao.mapper;
+
+
+import com.crm.rely.backend.core.dto.ucard.CardFileDto;
+import com.crm.rely.backend.core.entity.ucard.CardFilePageEntity;
+import com.crm.rely.backend.core.pojo.table.ucard.CardFileTable;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CardFileMapper {
+
+    Integer countList(CardFilePageEntity entity);
+
+    List<CardFileDto> pageList(CardFilePageEntity entity);
+
+    void insert(CardFileTable table);
+}

+ 20 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardGlobalAvailableBankCitiesMapper.java

@@ -0,0 +1,20 @@
+package com.crm.ucard.dao.mapper;
+
+import com.crm.rely.backend.core.dto.ucard.CardBankCitiesDto;
+import com.crm.rely.backend.core.pojo.table.ucard.CardGlobalAvailableBankCitiesTable;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CardGlobalAvailableBankCitiesMapper {
+
+    void batchSave(List<CardGlobalAvailableBankCitiesTable> list);
+
+    void deleteAll();
+
+    List<CardBankCitiesDto> queryAllByCountryAndPayoutCurrency(@Param("country") String country,
+                                                               @Param("payoutCurrency") String payoutCurrency);
+
+}

+ 15 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardGlobalCurrenciesFieldAvailableMapper.java

@@ -0,0 +1,15 @@
+package com.crm.ucard.dao.mapper;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardGlobalCurrenciesFieldAvailableTable;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CardGlobalCurrenciesFieldAvailableMapper {
+
+    void batchSave(List<CardGlobalCurrenciesFieldAvailableTable> list);
+
+    void deleteAll();
+
+}

+ 18 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardGlobalCurrenciesFieldMapper.java

@@ -0,0 +1,18 @@
+package com.crm.ucard.dao.mapper;
+
+import com.crm.rely.backend.core.dto.wasabi.WasabiFieldDto;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CardGlobalCurrenciesFieldMapper {
+
+    void deleteAll();
+
+    List<WasabiFieldDto> findAllByCurrencies(@Param("payoutCurrency") String payoutCurrency,
+                                             @Param("transferTypeId") String transferTypeId,
+                                             @Param("payoutMethodId") String payoutMethodId,
+                                             @Param("fieldType") String fieldType);
+}

+ 26 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardGlobalCurrenciesMapper.java

@@ -0,0 +1,26 @@
+package com.crm.ucard.dao.mapper;
+
+import com.crm.rely.backend.core.dto.ucard.GlobalCurrenciesDropdownListDto;
+import com.crm.rely.backend.core.dto.wasabi.WasabiAvailableCurrenciesListDto;
+import com.crm.rely.backend.core.entity.ucard.GlobalCurrenciesPageListEntity;
+import com.crm.rely.backend.core.pojo.table.ucard.CardGlobalCurrenciesTable;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CardGlobalCurrenciesMapper {
+
+    void batchSave(List<CardGlobalCurrenciesTable> list);
+
+    void deleteAll();
+
+    Integer countList(GlobalCurrenciesPageListEntity entity);
+
+    List<WasabiAvailableCurrenciesListDto> pageList(GlobalCurrenciesPageListEntity entity);
+
+    List<GlobalCurrenciesDropdownListDto> dropdownList();
+
+    List<GlobalCurrenciesDropdownListDto> findAllByStatus(@Param("status") String status);
+}

+ 23 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardGlobalOrderMapper.java

@@ -0,0 +1,23 @@
+package com.crm.ucard.dao.mapper;
+
+
+import com.crm.rely.backend.core.dto.ucard.GlobalOrderDto;
+import com.crm.rely.backend.core.entity.ucard.GlobalOrderPageEntity;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+@Repository
+public interface CardGlobalOrderMapper {
+
+    Integer countList(GlobalOrderPageEntity entity);
+
+    List<GlobalOrderDto> pageList(GlobalOrderPageEntity entity);
+
+    /**
+     * 根据用户和币种信息查询已用额度
+     */
+    BigDecimal findAllByCId(@Param("cId") Long cId,@Param("payoutCurrency") String payoutCurrency,@Param("transferType") String transferType,@Param("payoutMethod") String payoutMethod);
+}

+ 15 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardGlobalPaymentOrderMapper.java

@@ -0,0 +1,15 @@
+package com.crm.ucard.dao.mapper;
+
+
+import com.crm.rely.backend.core.dto.ucard.GlobalPaymentOrderDto;
+import com.crm.rely.backend.core.entity.ucard.GlobalPaymentPageEntity;
+
+import java.util.List;
+
+public interface CardGlobalPaymentOrderMapper {
+
+    Integer countList(GlobalPaymentPageEntity entity);
+
+    List<GlobalPaymentOrderDto> pageList(GlobalPaymentPageEntity entity);
+    
+}

+ 15 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardGlobalStatesMapper.java

@@ -0,0 +1,15 @@
+package com.crm.ucard.dao.mapper;
+
+import com.crm.rely.backend.core.dto.wasabi.WasabiStatesDto;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CardGlobalStatesMapper {
+
+    void batchSave(List<WasabiStatesDto> list);
+
+    void deleteAll();
+
+}

+ 19 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardIdTypeConfigMapper.java

@@ -0,0 +1,19 @@
+package com.crm.ucard.dao.mapper;
+
+import com.crm.rely.backend.core.dto.ucard.CardIdTypeConfigDto;
+import com.crm.rely.backend.core.entity.ucard.CardIdTypeConfigAddEntity;
+import com.crm.rely.backend.core.entity.ucard.CardIdTypeConfigPageEntity;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CardIdTypeConfigMapper {
+
+    Integer countList(CardIdTypeConfigPageEntity entity);
+
+    List<CardIdTypeConfigDto> pageList(CardIdTypeConfigPageEntity entity);
+
+    void batchSave(List<CardIdTypeConfigAddEntity> list);
+
+}

+ 20 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardKycStatusMapper.java

@@ -0,0 +1,20 @@
+package com.crm.ucard.dao.mapper;
+
+import com.crm.rely.backend.core.dto.ucard.CardKycSingleStatusDto;
+import com.crm.rely.backend.core.dto.ucard.CardKycStatusDto;
+import com.crm.rely.backend.core.entity.ucard.CardKycStatusPageEntity;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CardKycStatusMapper {
+
+    Integer countList(CardKycStatusPageEntity entity);
+
+    List<CardKycStatusDto> pageList(CardKycStatusPageEntity entity);
+
+    CardKycSingleStatusDto getKycApproveById(Long id);
+
+    CardKycStatusDto getKycApproveByUniqueId(String uniqueId);
+}

+ 32 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardMerchantUserMapper.java

@@ -0,0 +1,32 @@
+package com.crm.ucard.dao.mapper;
+
+import com.crm.rely.backend.core.dto.ucard.CardTypeUserDto;
+import com.crm.rely.backend.core.dto.ucard.MerchantUserDto;
+import com.crm.rely.backend.core.entity.ucard.CardTypeEntity;
+import com.crm.rely.backend.core.entity.ucard.MerchantUserPageEntity;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CardMerchantUserMapper {
+
+    Integer countList(MerchantUserPageEntity entity);
+
+    List<MerchantUserDto> pageList(MerchantUserPageEntity entity);
+
+    CardTypeUserDto getCardTypeStatus(CardTypeEntity entity);
+
+    /**
+     * 查询kyc审核成功的所有用户
+     */
+    List<MerchantUserDto> findAllByAuthSuccess();
+
+    MerchantUserDto getFirstByCustomId(Long customId);
+
+    /**
+     * 速汇查询用户详情
+     */
+    MerchantUserDto findUserDetailsByCId(Long cId);
+
+}

+ 15 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardOccupationsMapper.java

@@ -0,0 +1,15 @@
+package com.crm.ucard.dao.mapper;
+
+import com.crm.rely.backend.core.pojo.table.ucard.UcardOccupationsTable;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CardOccupationsMapper {
+
+    void batchSave(List<UcardOccupationsTable> list);
+
+    void deleteAll();
+
+}

+ 17 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardOperateMapper.java

@@ -0,0 +1,17 @@
+package com.crm.ucard.dao.mapper;
+
+
+import com.crm.rely.backend.core.dto.ucard.CardOperateDto;
+import com.crm.rely.backend.core.entity.ucard.CardOperatePageEntity;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CardOperateMapper {
+
+    Integer countList(CardOperatePageEntity entity);
+
+    List<CardOperateDto> pageList(CardOperatePageEntity entity);
+
+}

+ 17 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardPermissionMapper.java

@@ -0,0 +1,17 @@
+package com.crm.ucard.dao.mapper;
+
+
+import com.crm.rely.backend.core.dto.ucard.CardPermissionDto;
+import com.crm.rely.backend.core.entity.ucard.CardPermissionPageEntity;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CardPermissionMapper {
+
+    Integer countList(CardPermissionPageEntity entity);
+
+    List<CardPermissionDto> pageList(CardPermissionPageEntity entity);
+
+}

+ 18 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardRechargeOrderMapper.java

@@ -0,0 +1,18 @@
+package com.crm.ucard.dao.mapper;
+
+import com.crm.rely.backend.core.dto.ucard.CardRechargeOrderDto;
+import com.crm.rely.backend.core.dto.ucard.CardRechargeOrderSumDto;
+import com.crm.rely.backend.core.entity.ucard.CardRechargePageEntity;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CardRechargeOrderMapper {
+
+    Integer countList(CardRechargePageEntity entity);
+
+    List<CardRechargeOrderDto> pageList(CardRechargePageEntity entity);
+
+    CardRechargeOrderSumDto sumPage(CardRechargePageEntity entity);
+}

+ 16 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardTransacOrderMapper.java

@@ -0,0 +1,16 @@
+package com.crm.ucard.dao.mapper;
+
+import com.crm.rely.backend.core.dto.ucard.CardTransacOrderDto;
+import com.crm.rely.backend.core.entity.ucard.CardTransacOrderPageEntity;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CardTransacOrderMapper {
+
+    Integer countList(CardTransacOrderPageEntity entity);
+
+    List<CardTransacOrderDto> pageList(CardTransacOrderPageEntity entity);
+
+}

+ 24 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardTypeMapper.java

@@ -0,0 +1,24 @@
+package com.crm.ucard.dao.mapper;
+
+import com.crm.rely.backend.core.dto.ucard.CardTypeDto;
+import com.crm.rely.backend.core.entity.ucard.CardTypePageEntity;
+import com.crm.rely.backend.core.pojo.table.ucard.CardTypeTable;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CardTypeMapper {
+
+    Integer countList(CardTypePageEntity entity);
+
+    List<CardTypeDto> pageList(CardTypePageEntity entity);
+
+    List<CardTypeDto> getByEnableStatus();
+
+    CardTypeDto getByCardTypeId(Integer cardTypeId);
+
+    void batchSave(List<CardTypeTable> list);
+
+    void deleteByCardCategory(Integer cardCategory);
+}

+ 17 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardWalletAddressMapper.java

@@ -0,0 +1,17 @@
+package com.crm.ucard.dao.mapper;
+
+
+import com.crm.rely.backend.core.dto.ucard.vaultody.VaultodyDepositAddressDto;
+import com.crm.rely.backend.core.entity.ucard.crypto.currency.vaultody.VaultodyDepositAddressPageEntity;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CardWalletAddressMapper {
+
+    Integer countList(VaultodyDepositAddressPageEntity entity);
+
+    List<VaultodyDepositAddressDto> pageList(VaultodyDepositAddressPageEntity entity);
+
+}

+ 13 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardWalletMapper.java

@@ -0,0 +1,13 @@
+package com.crm.ucard.dao.mapper;
+
+
+import org.springframework.stereotype.Repository;
+
+import java.math.BigDecimal;
+
+@Repository
+public interface CardWalletMapper {
+
+    BigDecimal getBalance(Long cId);
+    
+}

+ 17 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardWalletRecordMapper.java

@@ -0,0 +1,17 @@
+package com.crm.ucard.dao.mapper;
+
+
+import com.crm.rely.backend.core.dto.ucard.CardWalletRecordDto;
+import com.crm.rely.backend.core.entity.ucard.CardWalletRecordPageEntity;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CardWalletRecordMapper {
+
+    Integer countList(CardWalletRecordPageEntity entity);
+
+    List<CardWalletRecordDto> pageList(CardWalletRecordPageEntity entity);
+
+}

+ 17 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardWithdrawMapper.java

@@ -0,0 +1,17 @@
+package com.crm.ucard.dao.mapper;
+
+
+import com.crm.rely.backend.core.dto.ucard.CardWithdrawDto;
+import com.crm.rely.backend.core.entity.ucard.CardWithdrawPageEntity;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CardWithdrawMapper {
+
+    Integer countList(CardWithdrawPageEntity entity);
+
+    List<CardWithdrawDto> pageList(CardWithdrawPageEntity entity);
+
+}

+ 25 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/UcardCardMapper.java

@@ -0,0 +1,25 @@
+package com.crm.ucard.dao.mapper;
+
+import com.crm.rely.backend.core.dto.ucard.CardInfoQueryDto;
+import com.crm.rely.backend.core.dto.ucard.UcardCardDto;
+import com.crm.rely.backend.core.entity.ucard.CardInfoQueryEntity;
+import com.crm.rely.backend.core.entity.ucard.CardPageEntity;
+import com.crm.rely.backend.core.pojo.table.ucard.UcardCardTable;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface UcardCardMapper {
+
+    Integer countList(CardPageEntity entity);
+
+    List<UcardCardDto> pageList(CardPageEntity entity);
+
+    CardInfoQueryDto cardInfoQuery(CardInfoQueryEntity entity);
+
+    /**
+     * 查询用户所有正常的卡
+     */
+    List<UcardCardTable> findAllByUniqueId(String uniqueId);
+}

+ 19 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/UcardCardNumberMapper.java

@@ -0,0 +1,19 @@
+package com.crm.ucard.dao.mapper;
+
+import com.crm.rely.backend.core.dto.ucard.CardNumberDto;
+import com.crm.rely.backend.core.entity.ucard.CardNumberPageEntity;
+import com.crm.rely.backend.core.pojo.table.ucard.UcardCardNumberTable;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface UcardCardNumberMapper {
+
+    Integer countList(CardNumberPageEntity entity);
+
+    List<CardNumberDto> pageList(CardNumberPageEntity entity);
+
+    void batchSave(List<UcardCardNumberTable> list);
+
+}

+ 9 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/Card3dsTransactionRepository.java

@@ -0,0 +1,9 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.Card3dsTransactionTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface Card3dsTransactionRepository extends BaseRepository<Card3dsTransactionTable> {
+}

+ 15 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardActivateRepository.java

@@ -0,0 +1,15 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardActivateTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.data.jpa.repository.Lock;
+import org.springframework.stereotype.Repository;
+
+import javax.persistence.LockModeType;
+
+@Repository
+public interface CardActivateRepository extends BaseRepository<CardActivateTable> {
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardActivateTable findByMerchantOrderNo(String merchantOrderNo);
+}

+ 39 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardApplyRepository.java

@@ -0,0 +1,39 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardApplyTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.data.jpa.repository.Lock;
+import org.springframework.stereotype.Repository;
+
+import javax.persistence.LockModeType;
+
+@Repository
+public interface CardApplyRepository extends BaseRepository<CardApplyTable> {
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardApplyTable findByOrderNo(String orderNo);
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardApplyTable findFirstById(Long id);
+
+    CardApplyTable getByOrderNo(String orderNo);
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardApplyTable getByCardNo(String cardNo);
+
+    CardApplyTable getByMerchantOrderNo(String cardMerchantOrderNo);
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardApplyTable findFirstByHolderMerchantOrderNoOrderByAddTimeDesc(String holderMerchantOrderNo);
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardApplyTable getBySerial(String serial);
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardApplyTable getByRefundSerial(String refundSerial);
+
+    CardApplyTable getFirstByUniqueIdAndCardTypeIdAndHolderStatus(String uniqueId, Integer cardTypeId, String holderStatus);
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardApplyTable getByCardNoAndStatus(String cardNo, String status);
+}

+ 11 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardAuthorizationFeeRepository.java

@@ -0,0 +1,11 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardAuthorizationFeeTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface CardAuthorizationFeeRepository extends BaseRepository<CardAuthorizationFeeTable> {
+
+
+}

+ 18 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardBlockchainConfigRepository.java

@@ -0,0 +1,18 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardBlockchainConfigTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.data.jpa.repository.Lock;
+import org.springframework.stereotype.Repository;
+
+import javax.persistence.LockModeType;
+import java.util.List;
+
+@Repository
+public interface CardBlockchainConfigRepository extends BaseRepository<CardBlockchainConfigTable> {
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardBlockchainConfigTable findFirstById(Long id);
+
+    List<CardBlockchainConfigTable> findAllByEnableStatus(Integer enableStatus);
+}

+ 17 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardBlockchainRateConfigRepository.java

@@ -0,0 +1,17 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardBlockchainRateConfigTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.data.jpa.repository.Lock;
+import org.springframework.stereotype.Repository;
+
+import javax.persistence.LockModeType;
+
+@Repository
+public interface CardBlockchainRateConfigRepository extends BaseRepository<CardBlockchainRateConfigTable> {
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardBlockchainRateConfigTable findFirstById(Long id);
+
+    CardBlockchainRateConfigTable getByCurrencyAndConvertCurrencyAndEnableStatus(String currency, String convertCurrency, Integer enableStatus);
+}

+ 10 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardCountryRepository.java

@@ -0,0 +1,10 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardCountryTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface CardCountryRepository extends BaseRepository<CardCountryTable> {
+
+}

+ 19 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardFileRepository.java

@@ -0,0 +1,19 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardFileTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.data.jpa.repository.Lock;
+import org.springframework.stereotype.Repository;
+
+import javax.persistence.LockModeType;
+
+@Repository
+public interface CardFileRepository extends BaseRepository<CardFileTable> {
+
+    @Lock(value = LockModeType.PESSIMISTIC_WRITE)
+    CardFileTable findFirstById(Long id);
+
+    CardFileTable getFirstById(Long id);
+
+    CardFileTable findByLang(String lang);
+}

+ 10 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardGlobalAvailableBankCitiesRepository.java

@@ -0,0 +1,10 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardGlobalAvailableBankCitiesTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface CardGlobalAvailableBankCitiesRepository extends BaseRepository<CardGlobalAvailableBankCitiesTable> {
+
+}

+ 14 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardGlobalCurrenciesFieldAvailableRepository.java

@@ -0,0 +1,14 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardGlobalCurrenciesFieldAvailableTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CardGlobalCurrenciesFieldAvailableRepository extends BaseRepository<CardGlobalCurrenciesFieldAvailableTable> {
+
+    List<CardGlobalCurrenciesFieldAvailableTable> findAllByFieldId(Long fieldId);
+    CardGlobalCurrenciesFieldAvailableTable findAllByFieldIdAndValueId(Long fieldId, String valueId);
+}

+ 13 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardGlobalCurrenciesFieldRepository.java

@@ -0,0 +1,13 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardGlobalCurrenciesFieldTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CardGlobalCurrenciesFieldRepository extends BaseRepository<CardGlobalCurrenciesFieldTable> {
+
+    List<CardGlobalCurrenciesFieldTable> findAllByPayoutCurrencyId(Long payoutCurrencyId);
+}

+ 16 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardGlobalCurrenciesRepository.java

@@ -0,0 +1,16 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardGlobalCurrenciesTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CardGlobalCurrenciesRepository extends BaseRepository<CardGlobalCurrenciesTable> {
+
+    List<CardGlobalCurrenciesTable> findAllByStatus(String status);
+
+    CardGlobalCurrenciesTable findByPayoutCurrencyAndTransferTypeIdAndPayoutMethodId(String payoutCurrency, String transferTypeId, String payoutMethodId);
+
+}

+ 10 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardGlobalExchangeRateRepository.java

@@ -0,0 +1,10 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardGlobalExchangeRateTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface CardGlobalExchangeRateRepository extends BaseRepository<CardGlobalExchangeRateTable> {
+
+}

+ 19 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardGlobalFeeRateConfigRepository.java

@@ -0,0 +1,19 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardFeeRateConfigTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.data.jpa.repository.Lock;
+import org.springframework.stereotype.Repository;
+
+import javax.persistence.LockModeType;
+
+@Repository
+public interface CardGlobalFeeRateConfigRepository extends BaseRepository<CardFeeRateConfigTable> {
+
+    CardFeeRateConfigTable findByType(String type);
+
+    @Lock(value = LockModeType.PESSIMISTIC_WRITE)
+    CardFeeRateConfigTable findByPayoutCurrencyAndTransferTypeIdAndPayoutMethodIdAndType(String payoutCurrency, String transferTypeId, String payoutMethodId, String type);
+
+    CardFeeRateConfigTable getByPayoutCurrencyAndTransferTypeIdAndPayoutMethodIdAndType(String payoutCurrency, String transferTypeId, String payoutMethodId, String type);
+}

+ 14 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardGlobalOrderDataAvailableRepository.java

@@ -0,0 +1,14 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardGlobalOrderDataAvailableTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CardGlobalOrderDataAvailableRepository extends BaseRepository<CardGlobalOrderDataAvailableTable> {
+
+    List<CardGlobalOrderDataAvailableTable> findAllByOrderNoAndRfiId(String orderNo, String rfiId);
+    List<CardGlobalOrderDataAvailableTable> deleteAllByOrderNoAndRfiId(String orderNo, String rfiId);
+}

+ 18 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardGlobalOrderDataRepository.java

@@ -0,0 +1,18 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardGlobalOrderDataTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.data.jpa.repository.Lock;
+import org.springframework.stereotype.Repository;
+
+import javax.persistence.LockModeType;
+import java.util.List;
+
+@Repository
+public interface CardGlobalOrderDataRepository extends BaseRepository<CardGlobalOrderDataTable> {
+
+    List<CardGlobalOrderDataTable> findAllByOrderNo(String orderNo);
+
+    @Lock(value = LockModeType.PESSIMISTIC_WRITE)
+    CardGlobalOrderDataTable findByOrderNoAndRfiId(String orderNo, String rfiId);
+}

+ 26 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardGlobalOrderRepository.java

@@ -0,0 +1,26 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardGlobalOrderTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.data.jpa.repository.Lock;
+import org.springframework.stereotype.Repository;
+
+import javax.persistence.LockModeType;
+
+@Repository
+public interface CardGlobalOrderRepository extends BaseRepository<CardGlobalOrderTable> {
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardGlobalOrderTable findByDeductionMerchantOrderNo(String deductionMerchantOrderNo);
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardGlobalOrderTable findFirstById(Long id);
+
+    CardGlobalOrderTable getFirstById(Long id);
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardGlobalOrderTable findByRefundMerchantOrderNo(String refundMerchantOrderNo);
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardGlobalOrderTable findByOrderNo(String orderNo);
+}

+ 10 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardGlobalPayerPayeeRepository.java

@@ -0,0 +1,10 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardGlobalPayerPayeeTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface CardGlobalPayerPayeeRepository extends BaseRepository<CardGlobalPayerPayeeTable> {
+
+}

+ 18 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardGlobalPaymentOrderRepository.java

@@ -0,0 +1,18 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardGlobalPaymentOrderTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.apache.ibatis.annotations.Mapper;
+import org.springframework.data.jpa.repository.Lock;
+
+import javax.persistence.LockModeType;
+
+@Mapper
+public interface CardGlobalPaymentOrderRepository extends BaseRepository<CardGlobalPaymentOrderTable> {
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardGlobalPaymentOrderTable findByOrderNo(Long orderNo);
+
+    CardGlobalPaymentOrderTable getFirstById(Long id);
+
+}

+ 10 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardGlobalStatesRepository.java

@@ -0,0 +1,10 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardGlobalStatesTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface CardGlobalStatesRepository extends BaseRepository<CardGlobalStatesTable> {
+
+}

+ 10 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardGlobalSubmitRepository.java

@@ -0,0 +1,10 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardGlobalSubmitTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface CardGlobalSubmitRepository extends BaseRepository<CardGlobalSubmitTable> {
+
+}

+ 18 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardIdTypeConfigRepository.java

@@ -0,0 +1,18 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardIdTypeConfigTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.data.jpa.repository.Lock;
+import org.springframework.stereotype.Repository;
+
+import javax.persistence.LockModeType;
+
+@Repository
+public interface CardIdTypeConfigRepository extends BaseRepository<CardIdTypeConfigTable> {
+
+    @Lock(value = LockModeType.PESSIMISTIC_WRITE)
+    CardIdTypeConfigTable findByCode(String code);
+
+    @Lock(value = LockModeType.PESSIMISTIC_WRITE)
+    CardIdTypeConfigTable findFirstById(Long id);
+}

+ 10 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardKycAttachmentRepository.java

@@ -0,0 +1,10 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardKycAttachmentTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface CardKycAttachmentRepository extends BaseRepository<CardKycAttachmentTable> {
+
+}

+ 27 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardKycStatusRepository.java

@@ -0,0 +1,27 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardKycStatusTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.data.jpa.repository.Lock;
+import org.springframework.stereotype.Repository;
+
+import javax.persistence.LockModeType;
+
+@Repository
+public interface CardKycStatusRepository extends BaseRepository<CardKycStatusTable> {
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardKycStatusTable findByUniqueIdAndCardTypeId(String uniqueId, Integer cardTypeId);
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardKycStatusTable findFirstByUniqueIdAndStatus(String uniqueId, Integer status);
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardKycStatusTable findFirstByUniqueId(String uniqueId);
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardKycStatusTable findFirstById(Long id);
+
+    CardKycStatusTable getFirstByUniqueIdAndStatus(String uniqueId, Integer status);
+
+}

+ 41 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardMerchantUserRepository.java

@@ -0,0 +1,41 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardMerchantUserTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.data.jpa.repository.Lock;
+import org.springframework.stereotype.Repository;
+
+import javax.persistence.LockModeType;
+import java.util.List;
+
+@Repository
+public interface CardMerchantUserRepository extends BaseRepository<CardMerchantUserTable> {
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardMerchantUserTable findByUniqueId(String uniqueId);
+
+    CardMerchantUserTable getByUniqueId(String uniqueId);
+
+    CardMerchantUserTable getByEmailAndCardCategory(String email, Integer cardCategory);
+
+    CardMerchantUserTable getByMobileAndCardCategory(String mobile, Integer cardCategory);
+
+    CardMerchantUserTable findByCId(Long cId);
+
+    CardMerchantUserTable findByCIdAndCardCategory(Long cId, Integer cardCategory);
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardMerchantUserTable findFirstByCustomIdAndCardCategory(Long customId, Integer cardCategory);
+
+    CardMerchantUserTable getFirstByCustomId(Long customId);
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardMerchantUserTable findFirstById(Long cardId);
+
+    /**
+     * 查询邮箱是否已存在
+     */
+    boolean existsByEmail(String email);
+
+    List<CardMerchantUserTable> findAllByAuthStatus(Integer authStatus);
+}

+ 15 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardOperateRepository.java

@@ -0,0 +1,15 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardOperateTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.data.jpa.repository.Lock;
+import org.springframework.stereotype.Repository;
+
+import javax.persistence.LockModeType;
+
+@Repository
+public interface CardOperateRepository extends BaseRepository<CardOperateTable> {
+
+    @Lock(value = LockModeType.PESSIMISTIC_WRITE)
+    CardOperateTable findByMerchantOrderNo(String merchantOrderNo);
+}

+ 19 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardPasswordResetRepository.java

@@ -0,0 +1,19 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardPasswordResetTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.data.jpa.repository.Lock;
+import org.springframework.stereotype.Repository;
+
+import javax.persistence.LockModeType;
+
+@Repository
+public interface CardPasswordResetRepository extends BaseRepository<CardPasswordResetTable> {
+    /**
+     *  根据card_no和unique_id 查询add_time 最新的一条记录
+     */
+    CardPasswordResetTable findFirstByCardNoAndUniqueIdOrderByAddTimeDesc(String cardNo, String uniqueId);
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardPasswordResetTable findFirstByMerchantOrderNo(String merchantOrderNo);
+}

+ 18 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardPermissionRepository.java

@@ -0,0 +1,18 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardPermissionTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.data.jpa.repository.Lock;
+import org.springframework.stereotype.Repository;
+
+import javax.persistence.LockModeType;
+import java.util.List;
+
+@Repository
+public interface CardPermissionRepository extends BaseRepository<CardPermissionTable> {
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardPermissionTable getFirstById(Long id);
+
+    List<CardPermissionTable> findByEnableStatus(Integer enabledStatus);
+}

+ 11 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardRechargeEstimateRepository.java

@@ -0,0 +1,11 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardRechargeEstimateTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface CardRechargeEstimateRepository extends BaseRepository<CardRechargeEstimateTable> {
+
+
+}

+ 22 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardRechargeOrderRepository.java

@@ -0,0 +1,22 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardRechargeOrderTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.apache.ibatis.annotations.Mapper;
+import org.springframework.data.jpa.repository.Lock;
+
+import javax.persistence.LockModeType;
+
+@Mapper
+public interface CardRechargeOrderRepository extends BaseRepository<CardRechargeOrderTable> {
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardRechargeOrderTable findByMerchantOrderNo(String attr0);
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardRechargeOrderTable getFirstById(Long id);
+
+    CardRechargeOrderTable getFirstByCardNoAndStatusAndRechargeType(String cardNo, String status, String rechargeType);
+
+    CardRechargeOrderTable getFirstByCardNoAndRechargeType(String cardNo, String rechargeType);
+}

+ 26 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardTransacOrderRepository.java

@@ -0,0 +1,26 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardTransacOrderTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.data.jpa.repository.Lock;
+import org.springframework.stereotype.Repository;
+
+import javax.persistence.LockModeType;
+import java.util.List;
+
+@Repository
+public interface CardTransacOrderRepository extends BaseRepository<CardTransacOrderTable> {
+
+    List<CardTransacOrderTable> findByCardNoIn(List<String> allCardNos);
+
+    List<CardTransacOrderTable> findByCardNo(String allCardNos);
+
+    CardTransacOrderTable getFirstById(Long id);
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardTransacOrderTable findByCardNoAndTradeNo(String cardNo, String tradeNo);
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardTransacOrderTable findByMerchantOrderNo(String merchantOrderNo);
+
+}

+ 17 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardTypeConfigRepository.java

@@ -0,0 +1,17 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardTypeConfigTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.data.jpa.repository.Lock;
+import org.springframework.stereotype.Repository;
+
+import javax.persistence.LockModeType;
+
+@Repository
+public interface CardTypeConfigRepository extends BaseRepository<CardTypeConfigTable> {
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardTypeConfigTable findByCardTypeId(Integer cardTypeId);
+
+    CardTypeConfigTable getByCardTypeId(Integer cardTypeId);
+}

+ 17 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardTypeCurrencyRepository.java

@@ -0,0 +1,17 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardTypeCurrencyTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CardTypeCurrencyRepository extends BaseRepository<CardTypeCurrencyTable> {
+
+    List<CardTypeCurrencyTable> findByCardTypeId(Integer cardTypeId);
+
+    CardTypeCurrencyTable findCardTypeCurrencyTableByCardTypeId(Integer cardTypeId);
+
+    void deleteByCardCategory(Integer cardCategory);
+}

+ 17 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardTypeRepository.java

@@ -0,0 +1,17 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardTypeTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface CardTypeRepository extends BaseRepository<CardTypeTable> {
+
+    CardTypeTable findByCardTypeId(Integer cardTypeId);
+
+    List<CardTypeTable> getByEnableStatus(Integer enableStatus);
+
+    void deleteByCardCategory(Integer cardCategory);
+}

+ 20 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardWalletAddressRepository.java

@@ -0,0 +1,20 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardWalletAddressTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.data.jpa.repository.Lock;
+import org.springframework.stereotype.Repository;
+
+import javax.persistence.LockModeType;
+
+@Repository
+public interface CardWalletAddressRepository extends BaseRepository<CardWalletAddressTable> {
+
+    @Lock(value = LockModeType.PESSIMISTIC_WRITE)
+    CardWalletAddressTable findFirstByUniqueIdAndBlockchainAndIsReset(String uniqueId, String blockchain, Boolean isReset);
+
+    CardWalletAddressTable getFirstByAddressAndBlockchain(String address, String blockchain);
+
+    @Lock(value = LockModeType.PESSIMISTIC_WRITE)
+    CardWalletAddressTable findFirstById(Long id);
+}

+ 15 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardWithdrawRepository.java

@@ -0,0 +1,15 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardWithdrawTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.data.jpa.repository.Lock;
+import org.springframework.stereotype.Repository;
+
+import javax.persistence.LockModeType;
+
+@Repository
+public interface CardWithdrawRepository extends BaseRepository<CardWithdrawTable> {
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardWithdrawTable findByMerchantOrderNo(String merchantOrderNo);
+}

+ 53 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CustomInfoRepository.java

@@ -0,0 +1,53 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.CustomInfoTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.data.jpa.repository.Lock;
+import org.springframework.stereotype.Repository;
+
+import javax.persistence.LockModeType;
+import java.util.List;
+
+/**
+ * @program: crm-backend
+ * @description:
+ * @author: houn
+ * @create: 2019-07-25 16:25
+ */
+@Repository
+public interface CustomInfoRepository extends BaseRepository<CustomInfoTable> {
+
+    /**
+     * 邮箱密码查询用户
+     *
+     * @param email
+     * @param password
+     * @return
+     */
+    CustomInfoTable findFirstByEmailAndPassword(String email, String password);
+
+    /**
+     * id密码查询用户
+     *
+     * @param id
+     * @param password
+     * @return
+     */
+    CustomInfoTable findFirstByIdAndPassword(Long id, String password);
+
+    CustomInfoTable getFirstByEmailNotNullAndEmail(String email);
+
+    /**
+     * 根据id查询用户信息
+     *
+     * @param id
+     * @return
+     */
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CustomInfoTable findFirstById(Long id);
+
+    CustomInfoTable getFirstById(Long id);
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CustomInfoTable findFirstByCId(Long cId);
+}

+ 23 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CustomKycApproveRepository.java

@@ -0,0 +1,23 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.CustomKycApproveTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+
+/**
+ * Created by max on 2020/7/14.
+ */
+@Repository
+public interface CustomKycApproveRepository extends BaseRepository<CustomKycApproveTable> {
+
+    CustomKycApproveTable findByBankIdAndStatus(Long bankId, Integer status);
+
+    CustomKycApproveTable findByCustomIdAndStatus(Long customId, Integer status);
+
+    CustomKycApproveTable findFirstByCustomIdAndStatus(Long customId, Integer status);
+
+    List<CustomKycApproveTable> findByCIdAndStatusOrderByAddTimeDesc(Long cId, Integer status);
+}

+ 13 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CustomKycImageRepository.java

@@ -0,0 +1,13 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.CustomKycImageTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+
+import java.util.List;
+
+public interface CustomKycImageRepository extends BaseRepository<CustomKycImageTable> {
+
+    List<CustomKycImageTable> findAllByExternalUserId(String externalUserId);
+
+    List<CustomKycImageTable> findAllByExternalUserIdIn(List<String> externalUserIds);
+}

+ 15 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CustomLoginHistoryRepository.java

@@ -0,0 +1,15 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.CustomLoginHistoryTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.stereotype.Repository;
+
+/**
+ * 登录记录
+ *
+ * @author: houn
+ */
+@Repository
+public interface CustomLoginHistoryRepository extends BaseRepository<CustomLoginHistoryTable> {
+
+}

+ 39 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CustomLoginRepository.java

@@ -0,0 +1,39 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.CustomLoginTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.data.jpa.repository.Lock;
+import org.springframework.stereotype.Repository;
+
+import javax.persistence.LockModeType;
+import java.util.List;
+
+/**
+ * @description:
+ * @author: houn
+ * @create: 2020-05-05 16:25
+ */
+@Repository
+public interface CustomLoginRepository extends BaseRepository<CustomLoginTable> {
+
+    /**
+     * 根据用户id拉取用户所有的交易账户
+     *
+     * @param customId
+     * @return
+     */
+    List<CustomLoginTable> getAllByCustomId(Long customId);
+
+    CustomLoginTable getFirstByCustomIdAndLogin(Long customId, Long login);
+
+    CustomLoginTable getFirstByLogin(Long login);
+
+    List<CustomLoginTable> getByCustomIdAndLoginIn(Long customId, List<Long> logins);
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CustomLoginTable findFirstByLogin(Long login);
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    List<CustomLoginTable> findAllByCustomIdAndAgentId(Long customId, Long agentId);
+
+}

+ 17 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CustomSurveyRepository.java

@@ -0,0 +1,17 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.CustomSurveyTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.stereotype.Repository;
+
+/**
+ * 调查信息
+ *
+ * @author: houn
+ */
+@Repository
+public interface CustomSurveyRepository extends BaseRepository<CustomSurveyTable> {
+
+    CustomSurveyTable getFirstByCustomId(Long customId);
+
+}

+ 36 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/SysConfigRepository.java

@@ -0,0 +1,36 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.SysConfigTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.data.jpa.repository.Lock;
+import org.springframework.stereotype.Repository;
+
+import javax.persistence.LockModeType;
+import java.util.List;
+
+/**
+ * @author: houn
+ */
+@Repository
+public interface SysConfigRepository extends BaseRepository<SysConfigTable> {
+
+    /**
+     * 根据codes 获取系统配置信息
+     *
+     * @param codes code的列表
+     * @return
+     */
+    List<SysConfigTable> getByCodeIn(List<String> codes);
+
+    /**
+     * 根据银行code 获取系统配置信息
+     *
+     * @param code code
+     * @return
+     */
+    SysConfigTable getByCode(String code);
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    SysConfigTable findFirstByCode(String code);
+
+}

+ 11 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/SysCustomBlackRepository.java

@@ -0,0 +1,11 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.SysCustomBlacklistTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+
+
+public interface SysCustomBlackRepository extends BaseRepository<SysCustomBlacklistTable> {
+    boolean existsByEmailIsNotNullAndEmail(String email);
+
+    boolean existsByIdentityIsNotNullAndIdentity(String identity);
+}

+ 17 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/SysIpLimitRepository.java

@@ -0,0 +1,17 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.SysIpLimitTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.data.jpa.repository.Lock;
+import org.springframework.stereotype.Repository;
+
+import javax.persistence.LockModeType;
+import java.util.List;
+
+
+@Repository
+public interface SysIpLimitRepository extends BaseRepository<SysIpLimitTable> {
+
+    boolean existsByIp(String ip);
+
+}

+ 14 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/SysKycConfigRepository.java

@@ -0,0 +1,14 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.SysKycConfigTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.stereotype.Repository;
+
+/**
+ * @author: houn
+ */
+@Repository
+public interface SysKycConfigRepository extends BaseRepository<SysKycConfigTable> {
+
+    SysKycConfigTable getByCodeAndCountryAndEnable(String code, String country,Integer enable);
+}

+ 13 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/SysReasonsRefusalRepository.java

@@ -0,0 +1,13 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.SysReasonsRefusalTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.stereotype.Repository;
+
+
+@Repository
+public interface SysReasonsRefusalRepository extends BaseRepository<SysReasonsRefusalTable> {
+
+    SysReasonsRefusalTable getFirstById(Long id);
+
+}

+ 18 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/SysUserLoginHistoryRepository.java

@@ -0,0 +1,18 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.SysUserLoginHistoryTable;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.stereotype.Repository;
+
+/**
+ * @program: crm-backend
+ * @description:
+ * @author: houn
+ * @create: 2021-07-21 16:25
+ */
+@Repository
+public interface SysUserLoginHistoryRepository extends JpaRepository<SysUserLoginHistoryTable, Long>, JpaSpecificationExecutor<SysUserLoginHistoryTable> {
+
+
+}

+ 15 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/UcardCardNumberRepository.java

@@ -0,0 +1,15 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.UcardCardNumberTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.data.jpa.repository.Lock;
+import org.springframework.stereotype.Repository;
+
+import javax.persistence.LockModeType;
+
+@Repository
+public interface UcardCardNumberRepository extends BaseRepository<UcardCardNumberTable> {
+
+    @Lock(value = LockModeType.PESSIMISTIC_WRITE)
+    UcardCardNumberTable findByCardNumber(String cardNumber);
+}

+ 27 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/UcardCardRepository.java

@@ -0,0 +1,27 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.UcardCardTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.data.jpa.repository.Lock;
+import org.springframework.stereotype.Repository;
+
+import javax.persistence.LockModeType;
+import java.util.List;
+
+@Repository
+public interface UcardCardRepository extends BaseRepository<UcardCardTable> {
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    UcardCardTable findByCardNo(String cardNo);
+
+    UcardCardTable getByCardNo(String cardNo);
+
+    UcardCardTable findByUniqueIdAndCardTypeId(String uniqueId, Integer cardTypeId);
+
+    UcardCardTable getFirstById(Long id);
+
+    List<UcardCardTable> findAllByStatus(String status);
+    List<UcardCardTable> findAllByStatusAndLogisticsStatusNot(String status, String logisticsStatus);
+    UcardCardTable getByCardNumber(String cardNumber);
+
+}

Some files were not shown because too many files changed in this diff