Ver código fonte

feat(core): 新增多个枚举常量并扩展配置功能

- 新增 AccountReportChangeType 交易账户转归属报表类型枚举
- 新增 AgentCloseFunctionsType 代理关闭功能枚举
- 新增 BalanceOperateType 余额操作类型枚举
- 新增 Card3dsTransactionTypeEnum 卡3ds类型枚举
- 新增 CardApproveStatusEnum 审批状态枚举
- 扩展 CardAccountInfoDto 添加邮箱和国家字段
- 扩展 CardBlockchainConfigDto 添加汇率字段
- 扩展 CardBlockchainConfigMapper 添加充提查询方法
- 新增应用版本管理相关实体、DTO和映射器
- 新增常见问题管理相关实体、DTO和映射器
- 新增隐私政策管理相关实体、DTO和映射器
- 重命名 Card3dsTransactionTable 中的 values 字段为 value
- 移除 CardAuthorizationFeeRepository 类
- 更新数据库连接URL配置
- 添加RSA密钥配置到application-dev.yml
kongxiangyang 5 meses atrás
pai
commit
67e4f5b782
100 arquivos alterados com 3992 adições e 900 exclusões
  1. 100 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/UardFileController.java
  2. 177 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/UcardAppController.java
  3. 100 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/UcardBlockchainController.java
  4. 70 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/UcardEncryptedController.java
  5. 221 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/UcardGlobalController.java
  6. 65 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/UcardIdTypeController.java
  7. 123 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/UcardNumberController.java
  8. 71 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/UcardOperateController.java
  9. 62 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/UcardPermissionController.java
  10. 44 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/UcardWalletAddressController.java
  11. 53 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/UcardWalletWithdrawController.java
  12. 30 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/UserSystemConfigController.java
  13. 17 0
      uacrd-manager-server/src/main/java/com/crm/manager/dao/repository/UserSystemConfigRepository.java
  14. 15 0
      uacrd-manager-server/src/main/java/com/crm/manager/service/UserSystemConfigService.java
  15. 127 0
      uacrd-manager-server/src/main/java/com/crm/manager/service/ucard/UcardAppFeignService.java
  16. 71 0
      uacrd-manager-server/src/main/java/com/crm/manager/service/ucard/UcardBlockchainFeignService.java
  17. 28 0
      uacrd-manager-server/src/main/java/com/crm/manager/service/ucard/UcardEncryptedFeignService.java
  18. 51 0
      uacrd-manager-server/src/main/java/com/crm/manager/service/ucard/UcardFileFeignService.java
  19. 135 0
      uacrd-manager-server/src/main/java/com/crm/manager/service/ucard/UcardGlobalFeignService.java
  20. 46 0
      uacrd-manager-server/src/main/java/com/crm/manager/service/ucard/UcardIdTypeFeignService.java
  21. 56 0
      uacrd-manager-server/src/main/java/com/crm/manager/service/ucard/UcardNumberFeignService.java
  22. 28 0
      uacrd-manager-server/src/main/java/com/crm/manager/service/ucard/UcardOperateFeignService.java
  23. 42 0
      uacrd-manager-server/src/main/java/com/crm/manager/service/ucard/UcardPermissionFeignService.java
  24. 29 0
      uacrd-manager-server/src/main/java/com/crm/manager/service/ucard/UcardWalletAddressFeignService.java
  25. 34 0
      uacrd-manager-server/src/main/java/com/crm/manager/service/ucard/UcardWalletWithdrawFeignService.java
  26. 1 1
      uacrd-manager-server/src/main/resources/application-dev.yml
  27. 6 0
      ucard-cloud/src/main/java/com/crm/ucard/config/VaultodyConfig.java
  28. 68 0
      ucard-cloud/src/main/java/com/crm/ucard/configuration/CryptoKeyHolder.java
  29. 4 1
      ucard-cloud/src/main/java/com/crm/ucard/configuration/FeignMultipartSupportConfig.java
  30. 9 0
      ucard-cloud/src/main/java/com/crm/ucard/constants/DocType.java
  31. 0 32
      ucard-cloud/src/main/java/com/crm/ucard/controller/CryptoNotifyController.java
  32. 33 21
      ucard-cloud/src/main/java/com/crm/ucard/controller/CustomController.java
  33. 152 0
      ucard-cloud/src/main/java/com/crm/ucard/controller/CustomUcardGlobalController.java
  34. 89 0
      ucard-cloud/src/main/java/com/crm/ucard/controller/CustomUcardWalletController.java
  35. 0 31
      ucard-cloud/src/main/java/com/crm/ucard/controller/CustomVaultodyController.java
  36. 65 165
      ucard-cloud/src/main/java/com/crm/ucard/controller/CustomWasabiCardController.java
  37. 51 0
      ucard-cloud/src/main/java/com/crm/ucard/controller/ManagerEncryptedController.java
  38. 204 0
      ucard-cloud/src/main/java/com/crm/ucard/controller/ManagerUcardAppController.java
  39. 111 0
      ucard-cloud/src/main/java/com/crm/ucard/controller/ManagerUcardBlockchainController.java
  40. 81 0
      ucard-cloud/src/main/java/com/crm/ucard/controller/ManagerUcardFileController.java
  41. 210 0
      ucard-cloud/src/main/java/com/crm/ucard/controller/ManagerUcardGlobalController.java
  42. 82 0
      ucard-cloud/src/main/java/com/crm/ucard/controller/ManagerUcardIdTypeController.java
  43. 89 0
      ucard-cloud/src/main/java/com/crm/ucard/controller/ManagerUcardNumberController.java
  44. 52 0
      ucard-cloud/src/main/java/com/crm/ucard/controller/ManagerUcardOperateController.java
  45. 67 0
      ucard-cloud/src/main/java/com/crm/ucard/controller/ManagerUcardPermissionController.java
  46. 47 0
      ucard-cloud/src/main/java/com/crm/ucard/controller/ManagerUcardWalletAddressController.java
  47. 57 0
      ucard-cloud/src/main/java/com/crm/ucard/controller/ManagerUcardWalletWithdrawController.java
  48. 1 1
      ucard-cloud/src/main/java/com/crm/ucard/controller/SysCountryController.java
  49. 9 5
      ucard-cloud/src/main/java/com/crm/ucard/controller/UcardApiController.java
  50. 3 4
      ucard-cloud/src/main/java/com/crm/ucard/controller/UcardController.java
  51. 14 3
      ucard-cloud/src/main/java/com/crm/ucard/controller/VaultodyApiController.java
  52. 37 0
      ucard-cloud/src/main/java/com/crm/ucard/controller/VaultodyNotifyController.java
  53. 162 77
      ucard-cloud/src/main/java/com/crm/ucard/controller/WasabiCardApiController.java
  54. 97 411
      ucard-cloud/src/main/java/com/crm/ucard/controller/WasabiCardController.java
  55. 17 18
      ucard-cloud/src/main/java/com/crm/ucard/controller/WasabiCardNotifyController.java
  56. 18 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardAppCommonProblemMapper.java
  57. 18 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardAppCommonProblemTypeMapper.java
  58. 18 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardAppPrivacyPolicyMapper.java
  59. 18 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardAppVersionMapper.java
  60. 5 1
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardBlockchainConfigMapper.java
  61. 4 4
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardCryptoCallbackRecordMapper.java
  62. 0 15
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardGlobalCurrenciesFieldAvailableMapper.java
  63. 6 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardGlobalCurrenciesFieldMapper.java
  64. 3 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardGlobalOrderMapper.java
  65. 2 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardGlobalPaymentOrderMapper.java
  66. 1 1
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardRechargeOrderMapper.java
  67. 1 1
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardWalletAddressMapper.java
  68. 18 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardWalletWithdrawMapper.java
  69. 13 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/SysReasonsRefusalMapper.java
  70. 10 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/UcardKycVerifyRecodeMapper.java
  71. 16 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardAppCommonProblemRepository.java
  72. 23 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardAppCommonProblemTypeRepository.java
  73. 19 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardAppPrivacyPolicyRepository.java
  74. 18 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardAppVersionRepository.java
  75. 0 11
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardAuthorizationFeeRepository.java
  76. 2 2
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardBlockchainConfigRepository.java
  77. 8 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardBlockchainRateConfigRepository.java
  78. 0 14
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardGlobalCurrenciesFieldAvailableRepository.java
  79. 0 4
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardGlobalCurrenciesRepository.java
  80. 2 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardMerchantUserRepository.java
  81. 1 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardRechargeOrderRepository.java
  82. 5 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CardWalletAddressRepository.java
  83. 1 8
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CustomInfoRepository.java
  84. 0 4
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CustomKycApproveRepository.java
  85. 5 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CustomKycImageRepository.java
  86. 10 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CustomKycVerifyRecodeRepository.java
  87. 0 2
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CustomLoginHistoryRepository.java
  88. 0 17
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CustomSurveyRepository.java
  89. 52 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/FinanceDepositRepository.java
  90. 0 3
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/SysConfigRepository.java
  91. 0 4
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/SysIpLimitRepository.java
  92. 6 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/SysReasonsRefusalRepository.java
  93. 33 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/SysUcardConfigRepository.java
  94. 0 18
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/SysUserLoginHistoryRepository.java
  95. 2 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/UcardCardRepository.java
  96. 0 16
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/UcardCryptoCallbackRecordRepository.java
  97. 1 1
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/UcardGlobalReceiverInfoRepository.java
  98. 19 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/UcardVaultodyCallbackRecordRepository.java
  99. 21 0
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/UcardWalletWithdrawRepository.java
  100. 0 4
      ucard-cloud/src/main/java/com/crm/ucard/dao/repository/UserRoleRepository.java

+ 100 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/UardFileController.java

@@ -0,0 +1,100 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.CommonService;
+import com.crm.manager.service.ucard.UcardFileFeignService;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ucard.CardFileDto;
+import com.crm.rely.backend.core.entity.base.BaseDeleteEntities;
+import com.crm.rely.backend.core.entity.ucard.CardFileAddEntity;
+import com.crm.rely.backend.core.entity.ucard.CardFilePageEntity;
+import com.crm.rely.backend.core.entity.ucard.CardFileUpdateEntity;
+import com.crm.rely.backend.exception.ServiceException;
+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;
+
+/**
+ * ucard文件服务接口
+ */
+@Slf4j
+@RestController
+@RequestMapping("/ucard/file")
+public class UardFileController {
+
+    @Autowired
+    private UcardFileFeignService ucardFileFeignService;
+    @Autowired
+    private CommonService commonService;
+
+    /**
+     * 上传文件
+     */
+    @PostMapping("/upload")
+    public BaseResultDto<String> uploadFile(@RequestParam(value = "file") MultipartFile file) throws Exception {
+        String middlePath = "/wasabi";
+        ucardFileFeignService.validatedFile(file);
+        String path = commonService.uploadFile(middlePath, file);
+
+        return BaseResultDto.success(Constants.UPLOAD_SUCCESS, path);
+    }
+
+    /**
+     * 上传文件
+     */
+    @PostMapping("/manager/upload")
+    public BaseResultDto<String> managerUploadFile(@RequestParam(value = "file") MultipartFile file) throws Exception {
+        String middlePath = "/wasabi";
+        String path = commonService.uploadFile(middlePath, file);
+        return BaseResultDto.success(Constants.UPLOAD_SUCCESS, path);
+    }
+
+    /**
+     * 上传视频
+     */
+    @PostMapping("/upload/video")
+    public BaseResultDto cardFileUpload(@RequestParam(value = "file", required =
+            false) MultipartFile file) throws Exception {
+        String middlePath = "/wasabi/video";
+        commonService.validatedVideo(file);
+        String path = commonService.uploadFile(middlePath, file);
+
+        return BaseResultDto.success(Constants.UPLOAD_SUCCESS, path);
+    }
+
+    /**
+     * 添加文件记录
+     */
+    @PostMapping("/add")
+    public BaseResultDto cardFileAdd(@RequestBody @Validated CardFileAddEntity entity) throws ServiceException {
+        return ucardFileFeignService.cardFileAdd(entity);
+    }
+
+    /**
+     * 修改文件
+     */
+    @PostMapping("/update")
+    public BaseResultDto cardFileUpdate(@RequestBody @Validated CardFileUpdateEntity entity) throws ServiceException {
+        return ucardFileFeignService.cardFileUpdate(entity);
+    }
+
+    /**
+     * 删除文件
+     */
+    @PostMapping("/delete")
+    public BaseResultDto cardFileDelete(@RequestBody BaseDeleteEntities entity) throws ServiceException {
+        return ucardFileFeignService.cardFileDelete(entity);
+    }
+
+    /**
+     * 文件分页列表
+     */
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<CardFileDto> cardFileSearchList(@RequestBody CardFilePageEntity entity) throws ServiceException {
+        return ucardFileFeignService.cardFileSearchList(entity);
+    }
+
+}

+ 177 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/UcardAppController.java

@@ -0,0 +1,177 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.ucard.UcardAppFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ucard.CardAppCommonProblemDto;
+import com.crm.rely.backend.core.dto.ucard.CardAppCommonProblemTypeDto;
+import com.crm.rely.backend.core.dto.ucard.CardAppPrivacyPolicyDto;
+import com.crm.rely.backend.core.dto.ucard.CardAppVersionDto;
+import com.crm.rely.backend.core.entity.base.BaseDeleteEntities;
+import com.crm.rely.backend.core.entity.ucard.*;
+import com.crm.rely.backend.exception.ServiceException;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+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;
+
+/**
+ * ucard app服务接口
+ *
+ */
+@Slf4j
+@RestController
+@RequestMapping("/ucard/app")
+public class UcardAppController {
+
+    @Autowired
+    private UcardAppFeignService ucardAppFeignService;
+
+    /**
+     * app版本配置列表
+     */
+    @PostMapping("/version/page")
+    ResultWithPagerDto<CardAppVersionDto> getCardAppVersionPageList(@RequestBody CardAppVersionPageEntity entity) throws ServiceException{
+        return ucardAppFeignService.getCardAppVersionPageList(entity);
+    }
+
+    /**
+     * 新增app版本
+     */
+    @PostMapping("/version/add")
+    BaseResultDto addCardAppVersion(@RequestBody CardAppVersionAddEntity entity) throws ServiceException{
+        return ucardAppFeignService.addCardAppVersion(entity);
+    }
+
+    /**
+     * 修改app版本
+     */
+    @PostMapping("/version/update")
+    BaseResultDto updateCardAppVersion(@RequestBody CardAppVersionUpdateEntity entity) throws ServiceException{
+        return ucardAppFeignService.updateCardAppVersion(entity);
+    }
+
+    /**
+     * 删除app版本
+     */
+    @PostMapping("/version/delete")
+    BaseResultDto deleteCardAppVersion(@RequestBody BaseDeleteEntities entity) throws ServiceException{
+        return ucardAppFeignService.deleteCardAppVersion(entity);
+    }
+
+    /**
+     * 获取最新一条app版本配置
+     */
+    @PostMapping("/version/detail")
+    public BaseResultDto getLatestCardAppVersion(@RequestBody @Validated CardAppVersionDetailEntity entity) throws ServiceException {
+        return ucardAppFeignService.getLatestCardAppVersion(entity);
+    }
+
+    /**
+     * app常见问题列表
+     */
+    @PostMapping("/common/problem/page")
+    ResultWithPagerDto<CardAppCommonProblemDto> getCardAppCommonProblemPageList(@RequestBody CardAppCommonProblemPageEntity entity) throws ServiceException{
+        return ucardAppFeignService.getCardAppCommonProblemPageList(entity);
+    }
+
+    /**
+     * 新增app常见问题
+     */
+    @PostMapping("/common/problem/add")
+    BaseResultDto addCardAppCommonProblem(@RequestBody CardAppCommonProblemAddEntity entity) throws ServiceException{
+        return ucardAppFeignService.addCardAppCommonProblem(entity);
+    }
+
+    /**
+     * 修改app常见问题
+     */
+    @PostMapping("/common/problem/update")
+    BaseResultDto updateCardAppCommonProblem(@RequestBody CardAppCommonProblemUpdateEntity entity) throws ServiceException{
+        return ucardAppFeignService.updateCardAppCommonProblem(entity);
+    }
+
+    /**
+     * 删除app常见问题
+     */
+    @PostMapping("/common/problem/delete")
+    BaseResultDto deleteCardAppCommonProblem(@RequestBody BaseDeleteEntities entity) throws ServiceException{
+        return ucardAppFeignService.deleteCardAppCommonProblem(entity);
+    }
+
+    /**
+     * app隐私政策列表
+     */
+    @PostMapping("/privacy/policy/page")
+    ResultWithPagerDto<CardAppPrivacyPolicyDto> getCardAppPrivacyPolicyPageList(@RequestBody CardAppPrivacyPolicyPageEntity entity) throws ServiceException{
+        return ucardAppFeignService.getCardAppPrivacyPolicyPageList(entity);
+    }
+
+    /**
+     * 新增app隐私政策
+     */
+    @PostMapping("/privacy/policy/add")
+    BaseResultDto addCardAppPrivacyPolicy(@RequestBody CardAppPrivacyPolicyAddEntity entity) throws ServiceException{
+        return ucardAppFeignService.addCardAppPrivacyPolicy(entity);
+    }
+
+    /**
+     * 修改app隐私政策
+     */
+    @PostMapping("/privacy/policy/update")
+    BaseResultDto updateCardAppPrivacyPolicy(@RequestBody CardAppPrivacyPolicyUpdateEntity entity) throws ServiceException{
+        return ucardAppFeignService.updateCardAppPrivacyPolicy(entity);
+    }
+
+    /**
+     * 删除app隐私政策
+     */
+    @PostMapping("/privacy/policy/delete")
+    BaseResultDto deleteCardAppPrivacyPolicy(@RequestBody BaseDeleteEntities entity) throws ServiceException{
+        return ucardAppFeignService.deleteCardAppPrivacyPolicy(entity);
+    }
+
+    /**
+     * app常见问题类型列表
+     */
+    @PostMapping("/common/problem/type/page")
+    ResultWithPagerDto<CardAppCommonProblemTypeDto> getCardAppCommonProblemTypePageList(@RequestBody CardAppCommonProblemTypePageEntity entity) throws ServiceException{
+        return ucardAppFeignService.getCardAppCommonProblemTypePageList(entity);
+    }
+
+    /**
+     * 新增app常见问题类型
+     */
+    @PostMapping("/common/problem/type/add")
+    BaseResultDto addCardAppCommonProblemType(@RequestBody @Validated CardAppCommonProblemTypeAddEntity entity) throws ServiceException{
+        return ucardAppFeignService.addCardAppCommonProblemType(entity);
+    }
+
+    /**
+     * 修改app常见问题类型
+     */
+    @PostMapping("/common/problem/type/update")
+    BaseResultDto updateCardAppCommonProblemType(@RequestBody @Validated CardAppCommonProblemTypeUpdateEntity entity) throws ServiceException{
+        return ucardAppFeignService.updateCardAppCommonProblemType(entity);
+    }
+
+    /**
+     * 删除app常见问题类型
+     */
+    @PostMapping("/common/problem/type/delete")
+    BaseResultDto deleteCardAppCommonProblemType(@RequestBody BaseDeleteEntities entity) throws ServiceException{
+        return ucardAppFeignService.deleteCardAppCommonProblemType(entity);
+    }
+
+    /**
+     * 常见问题类型下拉列表
+     */
+    @PostMapping("/common/problem/type/dropdown")
+    BaseResultDto cardAppCommonProblemTypeDropdown(@RequestBody @Validated CardAppCommonProblemTypeDropdown entity) throws ServiceException{
+        return ucardAppFeignService.cardAppCommonProblemTypeDropdown(entity);
+    }
+
+}

+ 100 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/UcardBlockchainController.java

@@ -0,0 +1,100 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.ucard.UcardBlockchainFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ucard.CardBlockchainConfigDto;
+import com.crm.rely.backend.core.dto.ucard.CardBlockchainRateConfigDto;
+import com.crm.rely.backend.core.entity.base.BaseDeleteEntities;
+import com.crm.rely.backend.core.entity.ucard.*;
+import com.crm.rely.backend.exception.ServiceException;
+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/blockchain")
+public class UcardBlockchainController {
+
+    @Autowired
+    private UcardBlockchainFeignService ucardBlockchainFeignService;
+
+    /**
+     * 区块链配置列表
+     */
+    @PostMapping("/config/page")
+    ResultWithPagerDto<CardBlockchainConfigDto> getCardBlockchainConfigPageList(@RequestBody CardBlockchainConfigPageEntity entity) throws ServiceException{
+        return ucardBlockchainFeignService.getCardBlockchainConfigPageList(entity);
+    }
+
+    /**
+     * 区块链下拉列表
+     */
+    @PostMapping("/dropdown")
+    BaseResultDto getCardBlockchainDropdown() throws ServiceException{
+        return ucardBlockchainFeignService.getCardBlockchainDropdown();
+    }
+
+    /**
+     * 新增区块链配置
+     */
+    @PostMapping("/config/add")
+    BaseResultDto addCardBlockchainConfig(@RequestBody CardBlockchainConfigAddEntity entity) throws ServiceException{
+        return ucardBlockchainFeignService.addCardBlockchainConfig(entity);
+    }
+
+    /**
+     * 修改区块链配置
+     */
+    @PostMapping("/config/update")
+    BaseResultDto updateCardBlockchainConfig(@RequestBody CardBlockchainConfigUpdateEntity entity) throws ServiceException{
+        return ucardBlockchainFeignService.updateCardBlockchainConfig(entity);
+    }
+
+    /**
+     * 删除区块链配置
+     */
+    @PostMapping("/config/delete")
+    BaseResultDto deleteCardBlockchainConfig(@RequestBody BaseDeleteEntities entity) throws ServiceException{
+        return ucardBlockchainFeignService.deleteCardBlockchainConfig(entity);
+    }
+
+    /**
+     * 区块链汇率配置列表
+     */
+    @PostMapping("/rate/config/page")
+    ResultWithPagerDto<CardBlockchainRateConfigDto> getCardBlockchainRateConfigPageList(@RequestBody CardBlockchainRateConfigPageEntity entity) throws ServiceException{
+        return ucardBlockchainFeignService.getCardBlockchainRateConfigPageList(entity);
+    }
+
+    /**
+     * 新增区块链汇率配置
+     */
+    @PostMapping("/rate/config/add")
+    BaseResultDto addCardBlockchainRateConfig(@RequestBody CardBlockchainRateConfigAddEntity entity) throws ServiceException{
+        return ucardBlockchainFeignService.addCardBlockchainRateConfig(entity);
+    }
+
+    /**
+     * 修改区块链汇率配置
+     */
+    @PostMapping("/rate/config/update")
+    BaseResultDto updateCardBlockchainRateConfig(@RequestBody CardBlockchainRateConfigUpdateEntity entity) throws ServiceException{
+        return ucardBlockchainFeignService.updateCardBlockchainRateConfig(entity);
+    }
+
+    /**
+     * 删除区块链汇率配置
+     */
+    @PostMapping("/rate/config/delete")
+    BaseResultDto deleteCardBlockchainRateConfig(@RequestBody BaseDeleteEntities entity) throws ServiceException{
+        return ucardBlockchainFeignService.deleteCardBlockchainRateConfig(entity);
+    }
+}

+ 70 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/UcardEncryptedController.java

@@ -0,0 +1,70 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.dto.export.EncryptedWalletTransactionListExportDto;
+import com.crm.manager.service.ucard.UcardEncryptedFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ucard.UcardWalletDepositTransactionDto;
+import com.crm.rely.backend.core.entity.ucard.UcardWalletDepositTransactionPageEntity;
+import com.crm.rely.backend.exception.ServiceException;
+import com.crm.rely.backend.util.ExportUtil;
+import com.crm.rely.backend.util.FileProcessUtil;
+import com.crm.rely.backend.util.NameUtil;
+import com.google.common.collect.Lists;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections.CollectionUtils;
+import org.springframework.beans.BeanUtils;
+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;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 钱包存款记录服务接口
+ */
+@Slf4j
+@RestController
+@RequestMapping("/ucard/encrypted")
+public class UcardEncryptedController {
+
+    @Autowired
+    private UcardEncryptedFeignService ucardEncryptedFeignService;
+
+    /**
+     * 加密货币交易分页列表
+     */
+    @PostMapping("/wallet/transaction/page")
+    ResultWithPagerDto<UcardWalletDepositTransactionDto> getWalletDepositTransactionPage(@RequestBody UcardWalletDepositTransactionPageEntity entity) throws ServiceException{
+        return ucardEncryptedFeignService.getWalletDepositTransactionPage(entity);
+    }
+
+    /**
+     * 加密货币交易记录导出
+     */
+    @PostMapping("/wallet/transaction/list/export")
+    public void encryptedWalletTransactionListExport(@RequestBody UcardWalletDepositTransactionPageEntity entity, HttpServletResponse response) throws Exception {
+        BaseResultDto<List<UcardWalletDepositTransactionDto>> resultDto = ucardEncryptedFeignService.encryptedWalletTransactionListExport(entity);
+        if (resultDto != null && resultDto.getCode() == 200) {
+            List<EncryptedWalletTransactionListExportDto> dtos = Lists.newArrayList();
+            if (CollectionUtils.isNotEmpty(resultDto.getData())) {
+                resultDto.getData().forEach((item) -> {
+                    EncryptedWalletTransactionListExportDto dto = new EncryptedWalletTransactionListExportDto();
+                    BeanUtils.copyProperties(item, dto);
+                    dto.setCID(item.getCId());
+                    dto.setName(NameUtil.getName(item.getCountry(), item.getLastName(), null, item.getFirstName()));
+                    dto.setTokenName(item.getTokenName());
+                    item.setAreaCode(item.getAreaCode() == null ? "" : item.getAreaCode());
+                    item.setMobile(item.getMobile() == null ? "" : item.getMobile());
+                    dto.setMobile(item.getAreaCode() + " " + item.getMobile());
+                    dtos.add(dto);
+                });
+            }
+            ExportUtil.transferToResponse(FileProcessUtil.genExportFileName("ENCRYPTED_WALLET_TRANSACTION_LIST_EXPORT"), dtos, EncryptedWalletTransactionListExportDto.class, response);
+        }
+    }
+
+}

+ 221 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/UcardGlobalController.java

@@ -0,0 +1,221 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.dto.export.GlobalOrderListExportDto;
+import com.crm.manager.service.ucard.UcardGlobalFeignService;
+import com.crm.rely.backend.core.dto.base.BaseReportResultDto;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ucard.GlobalOrderDto;
+import com.crm.rely.backend.core.dto.ucard.GlobalOrderSumDto;
+import com.crm.rely.backend.core.dto.wasabi.WasabiAvailableCurrenciesListDto;
+import com.crm.rely.backend.core.entity.base.BaseEntity;
+import com.crm.rely.backend.core.entity.ucard.*;
+import com.crm.rely.backend.core.entity.wasabi.WasabiTransactionSubmitRfiEntity;
+import com.crm.rely.backend.core.enums.CardApproveStatusEnum;
+import com.crm.rely.backend.core.enums.GlobalOrderDeductionStatusEnum;
+import com.crm.rely.backend.core.enums.GlobalOrderStatusEnum;
+import com.crm.rely.backend.exception.ServiceException;
+import com.crm.rely.backend.util.ExportUtil;
+import com.crm.rely.backend.util.FileProcessUtil;
+import com.crm.rely.backend.util.NameUtil;
+import com.google.common.collect.Lists;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections.CollectionUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+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;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 速汇服务接口
+ */
+@Slf4j
+@RestController
+@RequestMapping("/ucard/global")
+public class UcardGlobalController {
+
+    @Autowired
+    private UcardGlobalFeignService globalFeignService;
+
+    /**
+     * 同步币种信息
+     */
+    @PostMapping("/currencies/save")
+    public BaseResultDto saveAvailableCurrencies() throws ServiceException {
+        return globalFeignService.saveAvailableCurrencies();
+    }
+
+    /**
+     * 币种分页列表
+     */
+    @PostMapping("/currencies/list")
+    ResultWithPagerDto<WasabiAvailableCurrenciesListDto> getCurrenciesPageList(@RequestBody GlobalCurrenciesPageListEntity entity) throws ServiceException{
+        return globalFeignService.getCurrenciesPageList(entity);
+    }
+
+    /**
+     * 支持的币种下拉列表
+     */
+    @PostMapping("/currencies/dropdown")
+    public BaseResultDto getCurrenciesDropdown(@RequestBody GlobalCurrenciesDropdownEntity entity) throws ServiceException {
+        return globalFeignService.getCurrenciesDropdown(entity);
+    }
+
+    /**
+     * 币种字段和可选值列表
+     */
+    @PostMapping("/currencies/field/list")
+    public BaseResultDto getCurrenciesFieldList(@RequestBody @Validated GlobalCurrenciesFieldListEntity entity) throws ServiceException {
+        return globalFeignService.getCurrenciesFieldList(entity);
+    }
+
+    /**
+     * 币种所有字段名称
+     */
+    @PostMapping("/field/params")
+    public BaseResultDto getGlobalFieldParams() throws ServiceException {
+        return globalFeignService.getGlobalFieldParams();
+    }
+
+    /**
+     * 创建交易订单
+     */
+    @PostMapping("/create/order")
+    public BaseResultDto globalCreateOrder(@RequestBody GlobalCreateOrderEntity entity) throws Exception {
+        return globalFeignService.globalCreateOrder(entity);
+    }
+
+    /**
+     * 速汇订单分页列表
+     */
+    @PostMapping("/order/page/list")
+    public BaseReportResultDto<List<GlobalOrderDto>, GlobalOrderSumDto> globalOrderPageList(@RequestBody GlobalOrderPageEntity entity) throws Exception {
+        return globalFeignService.globalOrderPageList(entity);
+    }
+
+    /**
+     * 速汇订单审批
+     */
+    @PostMapping("/order/approve")
+    public BaseResultDto globalOrderApprove(@RequestBody GlobalOrderApproveEntity entity) throws Exception {
+        return globalFeignService.globalOrderApprove(entity);
+    }
+
+    /**
+     * 币种配置更改
+     */
+    @PostMapping("/currencies/config")
+    public BaseResultDto globalCurrenciesConfig(@RequestBody GlobalCurrenciesConfigEntity entity) throws ServiceException {
+        return globalFeignService.globalCurrenciesConfig(entity);
+    }
+
+    /**
+     * 查询汇率和手续费率
+     */
+    @PostMapping("/query/exchange/rate")
+    public BaseResultDto queryExchangeRate(@RequestBody GlobalQueryExchangeRateEntity entity) throws ServiceException {
+        return globalFeignService.queryExchangeRate(entity);
+    }
+
+    /**
+     * 查询最新汇率
+     */
+    @PostMapping("/query/latest/exchange/rate")
+    public BaseResultDto getExchangeRateByCurrency(@RequestBody GlobalQueryExchangeRateEntity entity) throws ServiceException {
+        return globalFeignService.getExchangeRateByCurrency(entity);
+    }
+
+    /**
+     * 查询支持的城市列表
+     */
+    @PostMapping("/query/bank/cities")
+    public BaseResultDto queryBankCities(@RequestBody CardBankCitiesEntity entity) throws ServiceException {
+        return globalFeignService.queryBankCities(entity);
+    }
+
+    /**
+     * 查询币种全局配置
+     */
+    @PostMapping("/query/currencies/config")
+    public BaseResultDto getCurrenciesGlobalConfig() throws ServiceException {
+        return globalFeignService.getCurrenciesGlobalConfig();
+    }
+
+    /**
+     * 取消交易订单
+     */
+    @PostMapping("/cancel/order")
+    public BaseResultDto globalCancelOrder(@RequestBody GlobalCancelOrderEntity entity) throws Exception {
+        return globalFeignService.globalCancelOrder(entity);
+    }
+
+    /**
+     * 补充资料
+     */
+    @PostMapping("/supplementary/data")
+    public BaseResultDto supplementaryData(@RequestBody WasabiTransactionSubmitRfiEntity entity) throws Exception {
+        return globalFeignService.supplementaryData(entity);
+    }
+
+    /**
+     * 查询速汇订单详情
+     */
+    @PostMapping("/order/details")
+    public BaseResultDto queryGlobalOrderDetails(@RequestBody BaseEntity entity) throws ServiceException {
+        return globalFeignService.queryGlobalOrderDetails(entity);
+    }
+
+    /**
+     * 获取收款用户列表
+     */
+    @PostMapping("/receiver/user/list")
+    BaseResultDto getGlobalReceiverUserList(@RequestBody GlobalReceiverUserEntity entity) throws ServiceException {
+        return globalFeignService.getGlobalReceiverUserList(entity);
+    }
+
+    /**
+     * 删除收款用户
+     */
+    @PostMapping("/receiver/user/delete")
+    BaseResultDto deleteGlobalReceiverUser(@RequestBody BaseEntity entity) throws ServiceException{
+        return globalFeignService.deleteGlobalReceiverUser(entity);
+    }
+
+    /**
+     * 速汇订单导出
+     */
+    @PostMapping("/order/list/export")
+    public void globalOrderListExport(@RequestBody GlobalOrderPageEntity entity, HttpServletResponse response) throws Exception {
+        BaseResultDto<List<GlobalOrderDto>> resultDto = globalFeignService.globalOrderListExport(entity);
+        if (resultDto != null && resultDto.getCode() == 200) {
+            List<GlobalOrderListExportDto> dtos = Lists.newArrayList();
+            if (CollectionUtils.isNotEmpty(resultDto.getData())) {
+                resultDto.getData().forEach((item) -> {
+                    GlobalOrderListExportDto dto = new GlobalOrderListExportDto();
+                    BeanUtils.copyProperties(item, dto);
+                    dto.setCID(item.getCId());
+                    dto.setName(NameUtil.getName(item.getCountry(), item.getLastName(), null, item.getFirstName()));
+                    item.setAreaCode(item.getAreaCode() == null ? "" : item.getAreaCode());
+                    item.setMobile(item.getMobile() == null ? "" : item.getMobile());
+                    dto.setMobile(item.getAreaCode() + " " + item.getMobile());
+                    if (item.getStatus() != null){
+                        dto.setStatus(GlobalOrderStatusEnum.matchStatus(item.getStatus()));
+                    } else {
+                        dto.setStatus("待处理");
+                    }
+                    dto.setApproveStatus(CardApproveStatusEnum.matchCode(item.getApproveStatus()));
+                    dto.setDeductionAccountStatus(GlobalOrderDeductionStatusEnum.matchStatus(item.getDeductionAccountStatus()));
+                    dtos.add(dto);
+                });
+            }
+            ExportUtil.transferToResponse(FileProcessUtil.genExportFileName("GLOBAL_ORDER_LIST"), dtos, GlobalOrderListExportDto.class, response);
+        }
+    }
+
+}

+ 65 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/UcardIdTypeController.java

@@ -0,0 +1,65 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.ucard.UcardAppFeignService;
+import com.crm.manager.service.ucard.UcardIdTypeFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ucard.CardIdTypeConfigDto;
+import com.crm.rely.backend.core.entity.base.BaseDeleteEntities;
+import com.crm.rely.backend.core.entity.ucard.CardIdTypeConfigAddEntity;
+import com.crm.rely.backend.core.entity.ucard.CardIdTypeConfigPageEntity;
+import com.crm.rely.backend.core.entity.ucard.CardIdTypeConfigUpdateEntity;
+import com.crm.rely.backend.exception.ServiceException;
+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;
+
+import java.util.List;
+
+/**
+ * ucard证件类型服务接口
+ */
+@Slf4j
+@RestController
+@RequestMapping("/ucard/id/type/config")
+public class UcardIdTypeController {
+
+    @Autowired
+    private UcardIdTypeFeignService ucardIdTypeFeignService;
+
+    /**
+     * 证件类型配置列表
+     */
+    @PostMapping("/list")
+    public ResultWithPagerDto<CardIdTypeConfigDto> getCardIdTypeConfigList(@RequestBody CardIdTypeConfigPageEntity entity) throws ServiceException {
+        return ucardIdTypeFeignService.getCardIdTypeConfigList(entity);
+    }
+
+    /**
+     * 批量新增证件类型配置
+     */
+    @PostMapping("/add")
+    public BaseResultDto batchAddCardIdTypeConfig(@RequestBody List<CardIdTypeConfigAddEntity> entitys) throws ServiceException {
+        return ucardIdTypeFeignService.batchAddCardIdTypeConfig(entitys);
+    }
+
+    /**
+     * 修改证件类型配置
+     */
+    @PostMapping("/update")
+    public BaseResultDto updateCardIdTypeConfig(@RequestBody CardIdTypeConfigUpdateEntity entity) throws ServiceException {
+        return ucardIdTypeFeignService.updateCardIdTypeConfig(entity);
+    }
+
+    /**
+     * 删除证件类型配置
+     */
+    @PostMapping("/delete")
+    public BaseResultDto deleteCardIdTypeConfig(@RequestBody BaseDeleteEntities entity) throws ServiceException {
+        return ucardIdTypeFeignService.deleteCardIdTypeConfig(entity);
+    }
+
+}

+ 123 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/UcardNumberController.java

@@ -0,0 +1,123 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.dto.export.CardNumberExportDto;
+import com.crm.manager.entity.excel.CardNumberExcelEntity;
+import com.crm.manager.service.ucard.UcardNumberFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ucard.CardNumberDto;
+import com.crm.rely.backend.core.entity.base.BaseDeleteEntities;
+import com.crm.rely.backend.core.entity.ucard.CardNumberAddEntity;
+import com.crm.rely.backend.core.entity.ucard.CardNumberPageEntity;
+import com.crm.rely.backend.core.entity.ucard.CardNumberUpdateEntity;
+import com.crm.rely.backend.core.entity.ucard.CardNumberVerifyEntity;
+import com.crm.rely.backend.exception.ServiceException;
+import com.crm.rely.backend.util.EasyExcelUti;
+import com.crm.rely.backend.util.ExportUtil;
+import com.crm.rely.backend.util.FileProcessUtil;
+import com.google.common.collect.Lists;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.lang3.StringUtils;
+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.HttpServletResponse;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 实体卡卡号服务接口
+ */
+@Slf4j
+@RestController
+@RequestMapping("/ucard/number")
+public class UcardNumberController {
+
+    @Autowired
+    private UcardNumberFeignService ucardNumberFeignService;
+
+    /**
+     * 校验实体卡卡号是否使用过
+     */
+    @PostMapping("/verify")
+    public BaseResultDto cardNumberVerify(@RequestBody @Validated CardNumberVerifyEntity entity) throws ServiceException {
+        return ucardNumberFeignService.cardNumberVerify(entity);
+    }
+
+    /**
+     * 实体卡卡号导入
+     */
+    @PostMapping("/import")
+    public BaseResultDto cardNumberImport(@RequestParam("file") MultipartFile file) throws Exception {
+        // 文件类型校验
+        String fileName = file.getOriginalFilename();
+        if (fileName != null && !fileName.toLowerCase().endsWith(".xlsx") && !fileName.toLowerCase().endsWith(".xls")) {
+            return BaseResultDto.error("请上传Excel文件");
+        }
+        List<CardNumberExcelEntity> entities = EasyExcelUti.readExcel(file,
+                new CardNumberExcelEntity(), 1, CardNumberExcelEntity.class);
+
+        if (CollectionUtils.isEmpty(entities)) {
+            return BaseResultDto.success();
+        }
+        // 验证是否为纯数字格式
+        List<CardNumberAddEntity> entityList = entities.stream()
+                .map(entity -> {
+                    // 修剪空格
+                    String cardNumber = entity.getCardNumber().trim();
+                    return cardNumber;
+                }).filter(StringUtils::isNumeric).map(cardNumber -> {
+                    CardNumberAddEntity addEntity = new CardNumberAddEntity();
+                    addEntity.setCardNumber(cardNumber);
+                    return addEntity;
+                }).collect(Collectors.toList());
+        return ucardNumberFeignService.cardNumberImport(entityList);
+    }
+
+    /**
+     * 卡号模版导出
+     */
+    @PostMapping("/template/export")
+    public void cardNumberTemplateExport(HttpServletResponse response) throws Exception {
+        List<CardNumberExportDto> dtos = Lists.newArrayList();
+        ExportUtil.transferToResponse(FileProcessUtil.genExportFileName("CARD_NUMBER_TEMPLATE"), dtos, CardNumberExportDto.class, response);
+    }
+
+    /**
+     * 卡号列表
+     */
+    @PostMapping("/list")
+    ResultWithPagerDto<CardNumberDto> queryCardNumberList(@RequestBody CardNumberPageEntity entity) throws ServiceException {
+        return ucardNumberFeignService.queryCardNumberList(entity);
+    }
+
+    /**
+     * 卡号下拉列表
+     */
+    @PostMapping("/dropdown")
+    BaseResultDto queryCardNumberDropdown(@RequestBody CardNumberPageEntity entity) throws ServiceException {
+        // 默认查询未使用的卡号
+        entity.setStatus(1);
+        return ucardNumberFeignService.queryCardNumberDropdown(entity);
+    }
+
+    /**
+     * 修改卡号状态
+     */
+    @PostMapping("/update/status")
+    BaseResultDto saveCardNumberStatus(@RequestBody CardNumberUpdateEntity entity) throws ServiceException {
+        return ucardNumberFeignService.saveCardNumberStatus(entity);
+    }
+
+    /**
+     * 删除实体卡卡号
+     */
+    @PostMapping("/delete")
+    public BaseResultDto deleteCardNumber(@RequestBody BaseDeleteEntities entity) throws ServiceException {
+        return ucardNumberFeignService.deleteCardNumber(entity);
+    }
+
+}

+ 71 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/UcardOperateController.java

@@ -0,0 +1,71 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.dto.export.CardOperateRecordExportDto;
+import com.crm.manager.service.ucard.UcardOperateFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ucard.CardOperateDto;
+import com.crm.rely.backend.core.entity.ucard.CardOperatePageEntity;
+import com.crm.rely.backend.core.enums.CardOperateTypeEnum;
+import com.crm.rely.backend.exception.ServiceException;
+import com.crm.rely.backend.util.ExportUtil;
+import com.crm.rely.backend.util.FileProcessUtil;
+import com.crm.rely.backend.util.NameUtil;
+import com.google.common.collect.Lists;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections.CollectionUtils;
+import org.springframework.beans.BeanUtils;
+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;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 操作记录服务接口
+ */
+@Slf4j
+@RestController
+@RequestMapping("/ucard/operate")
+public class UcardOperateController {
+
+    @Autowired
+    private UcardOperateFeignService ucardOperateFeignService;
+
+    /**
+     * 操作记录分页列表
+     */
+    @PostMapping("/page")
+    public ResultWithPagerDto<CardOperateDto> queryOperatePageList(@RequestBody CardOperatePageEntity entity) throws ServiceException {
+        return ucardOperateFeignService.queryOperatePageList(entity);
+    }
+
+    /**
+     * 操作记录列表导出
+     */
+    @RequestMapping("/record/export")
+    public void cardOperateRecordExport(@RequestBody CardOperatePageEntity entity, HttpServletResponse response) throws Exception {
+        BaseResultDto<List<CardOperateDto>> resultDto = ucardOperateFeignService.cardOperateRecordExport(entity);
+        if (resultDto != null && resultDto.getCode() == 200) {
+            List<CardOperateRecordExportDto> dtos = Lists.newArrayList();
+            if (CollectionUtils.isNotEmpty(resultDto.getData())) {
+                resultDto.getData().forEach((item) -> {
+                    CardOperateRecordExportDto dto = new CardOperateRecordExportDto();
+                    BeanUtils.copyProperties(item, dto);
+                    dto.setCID(item.getCId());
+                    dto.setName(NameUtil.getName(item.getCountry(), item.getLastName(), null, item.getFirstName()));
+                    item.setAreaCode(item.getAreaCode() == null ? "" : item.getAreaCode());
+                    item.setMobile(item.getMobile() == null ? "" : item.getMobile());
+                    dto.setMobile(item.getAreaCode() + " " + item.getMobile());
+                    dto.setOperateType(CardOperateTypeEnum.matchCode(item.getOperateType()));
+                    dtos.add(dto);
+                });
+            }
+            ExportUtil.transferToResponse(FileProcessUtil.genExportFileName("CARD_OPERATE_RECORD"), dtos, CardOperateRecordExportDto.class, response);
+        }
+    }
+
+}

+ 62 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/UcardPermissionController.java

@@ -0,0 +1,62 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.ucard.UcardPermissionFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ucard.CardPermissionDto;
+import com.crm.rely.backend.core.entity.ucard.CardPermissionAddEntity;
+import com.crm.rely.backend.core.entity.ucard.CardPermissionDeleteEntity;
+import com.crm.rely.backend.core.entity.ucard.CardPermissionPageEntity;
+import com.crm.rely.backend.core.entity.ucard.CardPermissionUpdateEntity;
+import com.crm.rely.backend.exception.ServiceException;
+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;
+
+/**
+ * ucard权限服务接口
+ */
+@Slf4j
+@RestController
+@RequestMapping("/ucard/permission")
+public class UcardPermissionController {
+
+    @Autowired
+    private UcardPermissionFeignService ucardPermissionFeignService;
+
+    /**
+     * 卡权限分页列表
+     */
+    @PostMapping("/page")
+    public ResultWithPagerDto<CardPermissionDto> queryPermissionPageList(@RequestBody CardPermissionPageEntity entity) throws ServiceException {
+        return ucardPermissionFeignService.queryPermissionPageList(entity);
+    }
+
+    /**
+     * 新增卡权限
+     */
+    @PostMapping("/add")
+    public BaseResultDto permissionAdd(@RequestBody CardPermissionAddEntity entity) throws ServiceException {
+        return ucardPermissionFeignService.permissionAdd(entity);
+    }
+
+    /**
+     * 更新卡权限
+     */
+    @PostMapping("/update")
+    public BaseResultDto permissionUpdate(@RequestBody CardPermissionUpdateEntity entity) throws ServiceException {
+        return ucardPermissionFeignService.permissionUpdate(entity);
+    }
+
+    /**
+     * 删除卡权限
+     */
+    @PostMapping("/delete")
+    public BaseResultDto permissionDelete(@RequestBody CardPermissionDeleteEntity entity) throws ServiceException {
+        return ucardPermissionFeignService.permissionDelete(entity);
+    }
+
+}

+ 44 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/UcardWalletAddressController.java

@@ -0,0 +1,44 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.ucard.UcardWalletAddressFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ucard.vaultody.VaultodyDepositAddressDto;
+import com.crm.rely.backend.core.entity.ucard.vaultody.VaultodyDepositAddressPageEntity;
+import com.crm.rely.backend.core.entity.ucard.vaultody.VaultodyResetDepositAddressEntity;
+import com.crm.rely.backend.exception.ServiceException;
+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/address")
+public class UcardWalletAddressController {
+
+    @Autowired
+    private UcardWalletAddressFeignService ucardWalletAddressFeignService;
+
+    /**
+     * 钱包地址分页列表
+     */
+    @PostMapping("/page")
+    ResultWithPagerDto<VaultodyDepositAddressDto> getDepositAddressPage(@RequestBody VaultodyDepositAddressPageEntity entity) throws ServiceException{
+        return ucardWalletAddressFeignService.getDepositAddressPage(entity);
+    }
+
+    /**
+     * 重置钱包地址
+     */
+    @PostMapping("/reset")
+    BaseResultDto resetDepositAddress(@RequestBody VaultodyResetDepositAddressEntity entity) throws ServiceException{
+        return ucardWalletAddressFeignService.resetDepositAddress(entity);
+    }
+
+}

+ 53 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/UcardWalletWithdrawController.java

@@ -0,0 +1,53 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.ucard.UcardWalletWithdrawFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ucard.UcardWalletWithdrawDto;
+import com.crm.rely.backend.core.entity.ucard.CardWalletWithdrawApproveEntity;
+import com.crm.rely.backend.core.entity.ucard.UcardWalletWithdrawPageEntity;
+import com.crm.rely.backend.core.entity.ucard.WalletWithdrawApplyEntity;
+import com.crm.rely.backend.exception.ServiceException;
+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/withdraw/manager")
+public class UcardWalletWithdrawController {
+
+    @Autowired
+    private UcardWalletWithdrawFeignService walletWithdrawFeignService;
+
+    /**
+     * 钱包提款分页列表
+     */
+    @PostMapping("/page")
+    ResultWithPagerDto<UcardWalletWithdrawDto> getWalletWithdrawPage(@RequestBody UcardWalletWithdrawPageEntity entity) throws ServiceException{
+        return walletWithdrawFeignService.getWalletWithdrawPage(entity);
+    }
+
+    /**
+     * 钱包提款申请
+     */
+    @PostMapping("/apply")
+    BaseResultDto walletWithdrawApply(@RequestBody WalletWithdrawApplyEntity entity) throws ServiceException{
+        return walletWithdrawFeignService.walletWithdrawApply(entity);
+    }
+
+    /**
+     * 钱包提款审核
+     */
+    @PostMapping("/approve")
+    BaseResultDto walletWithdrawApprove(@RequestBody CardWalletWithdrawApproveEntity entity) throws ServiceException{
+        return walletWithdrawFeignService.walletWithdrawApprove(entity);
+    }
+
+}

+ 30 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/UserSystemConfigController.java

@@ -0,0 +1,30 @@
+//package com.crm.manager.controller;
+//
+//import com.crm.manager.service.UserSystemConfigService;
+//import com.crm.rely.backend.core.dto.base.BaseResultDto;
+//import com.crm.rely.backend.core.entity.custom.info.InfoEntity;
+//import com.crm.rely.backend.core.entity.user.system.UserSystemConfigEntity;
+//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("/user/system/config")
+//public class UserSystemConfigController {
+//
+//    @Autowired
+//    private UserSystemConfigService userSystemConfigService;
+//
+//    @PostMapping("/all/list")
+//    public BaseResultDto list(@RequestBody UserSystemConfigEntity entity) throws Exception {
+//        return BaseResultDto.success(userSystemConfigService.getAllList(entity));
+//    }
+//
+//    @PostMapping("/choose")
+//    public BaseResultDto chooseSystemToken(@RequestBody UserSystemConfigEntity entity, InfoEntity infoEntity) throws Exception {
+//        return userSystemConfigService.chooseSystemToken(entity, infoEntity.getIbInfo().getId());
+//    }
+//
+//}

+ 17 - 0
uacrd-manager-server/src/main/java/com/crm/manager/dao/repository/UserSystemConfigRepository.java

@@ -0,0 +1,17 @@
+package com.crm.manager.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.UserSystemConfigTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+
+import java.util.List;
+
+/**
+ * Created by max on 2020/5/1.
+ */
+public interface UserSystemConfigRepository extends BaseRepository<UserSystemConfigTable> {
+
+    List<UserSystemConfigTable> findAllByValid(Integer valid);
+
+    UserSystemConfigTable findFirstBySysCode(String sysCode);
+
+}

+ 15 - 0
uacrd-manager-server/src/main/java/com/crm/manager/service/UserSystemConfigService.java

@@ -0,0 +1,15 @@
+//package com.crm.manager.service;
+//
+//import com.crm.rely.backend.core.dto.base.BaseResultDto;
+//import com.crm.rely.backend.core.dto.user.system.UserSystemConfigDto;
+//import com.crm.rely.backend.core.entity.user.system.UserSystemConfigEntity;
+//
+//import java.util.List;
+//
+//public interface UserSystemConfigService {
+//
+//    List<UserSystemConfigDto> getAllList(UserSystemConfigEntity entity) throws Exception ;
+//
+//    BaseResultDto chooseSystemToken(UserSystemConfigEntity entity, Long userId) throws Exception;
+//
+//}

+ 127 - 0
uacrd-manager-server/src/main/java/com/crm/manager/service/ucard/UcardAppFeignService.java

@@ -0,0 +1,127 @@
+package com.crm.manager.service.ucard;
+
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ucard.CardAppCommonProblemDto;
+import com.crm.rely.backend.core.dto.ucard.CardAppCommonProblemTypeDto;
+import com.crm.rely.backend.core.dto.ucard.CardAppPrivacyPolicyDto;
+import com.crm.rely.backend.core.dto.ucard.CardAppVersionDto;
+import com.crm.rely.backend.core.entity.base.BaseDeleteEntities;
+import com.crm.rely.backend.core.entity.ucard.*;
+import com.crm.rely.backend.exception.ServiceException;
+import org.springframework.cloud.netflix.feign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+
+@FeignClient(name = "UCARD-SERVICE", path = "/ucard/app/manager")
+public interface UcardAppFeignService {
+
+    /**
+     * app版本配置列表
+     */
+    @PostMapping("/version/page")
+    ResultWithPagerDto<CardAppVersionDto> getCardAppVersionPageList(CardAppVersionPageEntity entity) throws ServiceException;
+
+    /**
+     * 新增app版本
+     */
+    @PostMapping("/version/add")
+    BaseResultDto addCardAppVersion(CardAppVersionAddEntity entity) throws ServiceException;
+
+    /**
+     * 修改app版本
+     */
+    @PostMapping("/version/update")
+    BaseResultDto updateCardAppVersion(CardAppVersionUpdateEntity entity) throws ServiceException;
+
+    /**
+     * 删除app版本
+     */
+    @PostMapping("/version/delete")
+    BaseResultDto deleteCardAppVersion(BaseDeleteEntities entity);
+
+    /**
+     * 获取最新一条app版本配置
+     */
+    @PostMapping("/version/detail")
+    BaseResultDto getLatestCardAppVersion(CardAppVersionDetailEntity entity) throws ServiceException;
+
+    /**
+     * 删除app隐私政策
+     */
+    @PostMapping("/privacy/policy/delete")
+    BaseResultDto deleteCardAppPrivacyPolicy(BaseDeleteEntities entity) throws ServiceException;
+
+    /**
+     * 修改app隐私政策
+     */
+    @PostMapping("/privacy/policy/update")
+    BaseResultDto updateCardAppPrivacyPolicy(CardAppPrivacyPolicyUpdateEntity entity) throws ServiceException;
+
+    /**
+     * 新增app隐私政策
+     */
+    @PostMapping("/privacy/policy/add")
+    BaseResultDto addCardAppPrivacyPolicy(CardAppPrivacyPolicyAddEntity entity) throws ServiceException;
+
+    /**
+     * app隐私政策列表
+     */
+    @PostMapping("/privacy/policy/page")
+    ResultWithPagerDto<CardAppPrivacyPolicyDto> getCardAppPrivacyPolicyPageList(CardAppPrivacyPolicyPageEntity entity) throws ServiceException;
+
+    /**
+     * 删除app常见问题
+     */
+    @PostMapping("/common/problem/delete")
+    BaseResultDto deleteCardAppCommonProblem(BaseDeleteEntities entity) throws ServiceException;
+
+    /**
+     * 修改app常见问题
+     */
+    @PostMapping("/common/problem/update")
+    BaseResultDto updateCardAppCommonProblem(CardAppCommonProblemUpdateEntity entity) throws ServiceException;
+
+    /**
+     * 新增app常见问题
+     */
+    @PostMapping("/common/problem/add")
+    BaseResultDto addCardAppCommonProblem(CardAppCommonProblemAddEntity entity) throws ServiceException;
+
+    /**
+     * app常见问题列表
+     */
+    @PostMapping("/common/problem/page")
+    ResultWithPagerDto<CardAppCommonProblemDto> getCardAppCommonProblemPageList(CardAppCommonProblemPageEntity entity) throws ServiceException;
+
+    /**
+     * app常见问题类型列表
+     */
+    @PostMapping("/common/problem/type/page")
+    ResultWithPagerDto<CardAppCommonProblemTypeDto> getCardAppCommonProblemTypePageList(CardAppCommonProblemTypePageEntity entity) throws ServiceException;
+
+    /**
+     * 新增app常见问题类型
+     */
+    @PostMapping("/common/problem/type/add")
+    BaseResultDto addCardAppCommonProblemType(CardAppCommonProblemTypeAddEntity entity) throws ServiceException;
+
+    /**
+     * 修改app常见问题类型
+     */
+    @PostMapping("/common/problem/type/update")
+    BaseResultDto updateCardAppCommonProblemType(CardAppCommonProblemTypeUpdateEntity entity) throws ServiceException;
+
+    /**
+     * 删除app常见问题类型
+     */
+    @PostMapping("/common/problem/type/delete")
+    BaseResultDto deleteCardAppCommonProblemType(BaseDeleteEntities entity) throws ServiceException;
+
+    /**
+     * 常见问题类型下拉列表
+     */
+    @PostMapping("/common/problem/type/dropdown")
+    BaseResultDto cardAppCommonProblemTypeDropdown(CardAppCommonProblemTypeDropdown entity) throws ServiceException;
+
+
+}

+ 71 - 0
uacrd-manager-server/src/main/java/com/crm/manager/service/ucard/UcardBlockchainFeignService.java

@@ -0,0 +1,71 @@
+package com.crm.manager.service.ucard;
+
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ucard.CardBlockchainConfigDto;
+import com.crm.rely.backend.core.dto.ucard.CardBlockchainRateConfigDto;
+import com.crm.rely.backend.core.entity.base.BaseDeleteEntities;
+import com.crm.rely.backend.core.entity.ucard.*;
+import com.crm.rely.backend.exception.ServiceException;
+import org.springframework.cloud.netflix.feign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+
+@FeignClient(name = "UCARD-SERVICE", path = "/ucard/blockchain/manager")
+public interface UcardBlockchainFeignService {
+
+    /**
+     * 区块链配置列表
+     */
+    @PostMapping("/config/page")
+    ResultWithPagerDto<CardBlockchainConfigDto> getCardBlockchainConfigPageList(CardBlockchainConfigPageEntity entity) throws ServiceException;
+
+    /**
+     * 新增区块链配置
+     */
+    @PostMapping("/config/add")
+    BaseResultDto addCardBlockchainConfig(CardBlockchainConfigAddEntity entity) throws ServiceException;
+
+    /**
+     * 修改区块链配置
+     */
+    @PostMapping("/config/update")
+    BaseResultDto updateCardBlockchainConfig(CardBlockchainConfigUpdateEntity entity) throws ServiceException;
+
+    /**
+     * 删除区块链配置
+     */
+    @PostMapping("/config/delete")
+    BaseResultDto deleteCardBlockchainConfig(BaseDeleteEntities entity) throws ServiceException;
+
+    /**
+     * 区块链下拉列表
+     */
+    @PostMapping("/dropdown")
+    BaseResultDto getCardBlockchainDropdown() throws ServiceException;
+
+    /**
+     * 区块链汇率配置列表
+     */
+    @PostMapping("/rate/config/page")
+    ResultWithPagerDto<CardBlockchainRateConfigDto> getCardBlockchainRateConfigPageList(CardBlockchainRateConfigPageEntity entity) throws ServiceException;
+
+    /**
+     * 新增区块链汇率配置
+     */
+    @PostMapping("/rate/config/add")
+    BaseResultDto addCardBlockchainRateConfig(CardBlockchainRateConfigAddEntity entity) throws ServiceException;
+
+    /**
+     * 修改区块链汇率配置
+     */
+    @PostMapping("/rate/config/update")
+    BaseResultDto updateCardBlockchainRateConfig(CardBlockchainRateConfigUpdateEntity entity) throws ServiceException;
+
+    /**
+     * 删除区块链汇率配置
+     */
+    @PostMapping("/rate/config/delete")
+    BaseResultDto deleteCardBlockchainRateConfig(BaseDeleteEntities entity) throws ServiceException;
+
+
+}

+ 28 - 0
uacrd-manager-server/src/main/java/com/crm/manager/service/ucard/UcardEncryptedFeignService.java

@@ -0,0 +1,28 @@
+package com.crm.manager.service.ucard;
+
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ucard.UcardWalletDepositTransactionDto;
+import com.crm.rely.backend.core.entity.ucard.UcardWalletDepositTransactionPageEntity;
+import com.crm.rely.backend.exception.ServiceException;
+import org.springframework.cloud.netflix.feign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+
+import java.util.List;
+
+@FeignClient(name = "UCARD-SERVICE", path = "/ucard/encrypted/manager")
+public interface UcardEncryptedFeignService {
+
+    /**
+     * 加密货币交易记录导出
+     */
+    @PostMapping("/wallet/transaction/list/export")
+    BaseResultDto<List<UcardWalletDepositTransactionDto>> encryptedWalletTransactionListExport(UcardWalletDepositTransactionPageEntity entity) throws ServiceException;
+
+    /**
+     * 加密货币交易分页列表
+     */
+    @PostMapping("/wallet/transaction/page")
+    ResultWithPagerDto<UcardWalletDepositTransactionDto> getWalletDepositTransactionPage(UcardWalletDepositTransactionPageEntity entity) throws ServiceException;
+
+}

+ 51 - 0
uacrd-manager-server/src/main/java/com/crm/manager/service/ucard/UcardFileFeignService.java

@@ -0,0 +1,51 @@
+package com.crm.manager.service.ucard;
+
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ucard.CardFileDto;
+import com.crm.rely.backend.core.entity.base.BaseDeleteEntities;
+import com.crm.rely.backend.core.entity.ucard.CardFileAddEntity;
+import com.crm.rely.backend.core.entity.ucard.CardFilePageEntity;
+import com.crm.rely.backend.core.entity.ucard.CardFileUpdateEntity;
+import com.crm.rely.backend.exception.ServiceException;
+import org.springframework.cloud.netflix.feign.FeignClient;
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestPart;
+import org.springframework.web.multipart.MultipartFile;
+
+@FeignClient(name = "UCARD-SERVICE", path = "/ucard/file/manager")
+public interface UcardFileFeignService {
+
+    /**
+     * 添加文件记录
+     */
+    @PostMapping("/add")
+    BaseResultDto cardFileAdd(CardFileAddEntity entity) throws ServiceException;
+
+    /**
+     * 校验文件
+     */
+    @PostMapping(value = "/validated/file", produces = {MediaType.APPLICATION_JSON_UTF8_VALUE}, consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
+    void validatedFile(@RequestPart(value = "file") MultipartFile file) throws ServiceException;
+
+    /**
+     * 修改文件
+     */
+    @PostMapping("/update")
+    BaseResultDto cardFileUpdate(CardFileUpdateEntity entity) throws ServiceException;
+
+    /**
+     * 删除文件
+     */
+    @PostMapping("/delete")
+    BaseResultDto cardFileDelete(BaseDeleteEntities entity) throws ServiceException;
+
+    /**
+     * 文件分页列表
+     */
+    @PostMapping("/search/list")
+    ResultWithPagerDto<CardFileDto> cardFileSearchList(CardFilePageEntity entity) throws ServiceException;
+
+
+}

+ 135 - 0
uacrd-manager-server/src/main/java/com/crm/manager/service/ucard/UcardGlobalFeignService.java

@@ -0,0 +1,135 @@
+package com.crm.manager.service.ucard;
+
+import com.crm.rely.backend.core.dto.base.BaseReportResultDto;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ucard.GlobalOrderDto;
+import com.crm.rely.backend.core.dto.ucard.GlobalOrderSumDto;
+import com.crm.rely.backend.core.dto.wasabi.WasabiAvailableCurrenciesListDto;
+import com.crm.rely.backend.core.entity.base.BaseEntity;
+import com.crm.rely.backend.core.entity.ucard.*;
+import com.crm.rely.backend.core.entity.wasabi.WasabiTransactionSubmitRfiEntity;
+import com.crm.rely.backend.exception.ServiceException;
+import org.springframework.cloud.netflix.feign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+
+import java.util.List;
+
+@FeignClient(name = "UCARD-SERVICE", path = "/ucard/global/manager")
+public interface UcardGlobalFeignService {
+
+    /**
+     * 支持的币种列表
+     */
+    @PostMapping("/currencies/dropdown")
+    BaseResultDto getCurrenciesDropdown(GlobalCurrenciesDropdownEntity entity) throws ServiceException;
+
+    /**
+     * 币种字段和可选值列表
+     */
+    @PostMapping("/currencies/field/list")
+    BaseResultDto getCurrenciesFieldList(GlobalCurrenciesFieldListEntity entity) throws ServiceException;
+
+    /**
+     * 同步币种信息
+     */
+    @PostMapping("/currencies/save")
+    BaseResultDto saveAvailableCurrencies() throws ServiceException;
+
+    /**
+     * 币种分页列表
+     */
+    @PostMapping("/currencies/list")
+    ResultWithPagerDto<WasabiAvailableCurrenciesListDto> getCurrenciesPageList(GlobalCurrenciesPageListEntity entity) throws ServiceException;
+
+    /**
+     * 创建交易订单
+     */
+    @PostMapping("/create/order")
+    BaseResultDto globalCreateOrder(GlobalCreateOrderEntity entity) throws Exception;
+
+    /**
+     * 速汇订单分页列表
+     */
+    @PostMapping("/order/page/list")
+    BaseReportResultDto<List<GlobalOrderDto>, GlobalOrderSumDto> globalOrderPageList(GlobalOrderPageEntity entity) throws Exception;
+
+    /**
+     * 币种配置更改
+     */
+    @PostMapping("/currencies/config")
+    BaseResultDto globalCurrenciesConfig(GlobalCurrenciesConfigEntity entity) throws ServiceException;
+
+    /**
+     * 查询汇率和手续费率
+     */
+    @PostMapping("/query/exchange/rate")
+    BaseResultDto queryExchangeRate(GlobalQueryExchangeRateEntity entity) throws ServiceException;
+
+    /**
+     * 查询支持的城市列表
+     */
+    @PostMapping("/query/bank/cities")
+    BaseResultDto queryBankCities(CardBankCitiesEntity entity) throws ServiceException;
+
+    /**
+     * 查询币种全局配置
+     */
+    @PostMapping("/query/currencies/config")
+    BaseResultDto getCurrenciesGlobalConfig() throws ServiceException;
+
+    /**
+     * 取消交易订单
+     */
+    @PostMapping("/cancel/order")
+    BaseResultDto globalCancelOrder(GlobalCancelOrderEntity entity) throws Exception;
+
+    /**
+     * 补充资料
+     */
+    @PostMapping("/supplementary/data")
+    BaseResultDto supplementaryData(WasabiTransactionSubmitRfiEntity entity) throws ServiceException;
+
+    /**
+     * 速汇订单列表导出
+     */
+    @PostMapping("/order/list/export")
+    BaseResultDto<List<GlobalOrderDto>> globalOrderListExport(GlobalOrderPageEntity entity) throws ServiceException;
+
+    /**
+     * 速汇订单审批
+     */
+    @PostMapping("/order/approve")
+    BaseResultDto globalOrderApprove(GlobalOrderApproveEntity entity) throws Exception;
+
+    /**
+     * 查询最新汇率
+     */
+    @PostMapping("/query/latest/exchange/rate")
+    BaseResultDto getExchangeRateByCurrency(GlobalQueryExchangeRateEntity entity) throws ServiceException;
+
+    /**
+     * 查询速汇订单详情
+     */
+    @PostMapping("/order/details")
+    BaseResultDto queryGlobalOrderDetails(BaseEntity entity) throws ServiceException;
+
+    /**
+     * 获取收款用户列表
+     */
+    @PostMapping("/receiver/user/list")
+    BaseResultDto getGlobalReceiverUserList(GlobalReceiverUserEntity entity) throws ServiceException;
+
+    /**
+     * 删除收款用户
+     */
+    @PostMapping("/receiver/user/delete")
+    BaseResultDto deleteGlobalReceiverUser(BaseEntity entity) throws ServiceException;
+
+    /**
+     * 币种所有字段名称
+     */
+    @PostMapping("/field/params")
+    BaseResultDto getGlobalFieldParams() throws ServiceException;
+
+}

+ 46 - 0
uacrd-manager-server/src/main/java/com/crm/manager/service/ucard/UcardIdTypeFeignService.java

@@ -0,0 +1,46 @@
+package com.crm.manager.service.ucard;
+
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ucard.CardIdTypeConfigDto;
+import com.crm.rely.backend.core.entity.base.BaseDeleteEntities;
+import com.crm.rely.backend.core.entity.ucard.CardIdTypeConfigAddEntity;
+import com.crm.rely.backend.core.entity.ucard.CardIdTypeConfigPageEntity;
+import com.crm.rely.backend.core.entity.ucard.CardIdTypeConfigUpdateEntity;
+import com.crm.rely.backend.exception.ServiceException;
+import org.springframework.cloud.netflix.feign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+
+import java.util.List;
+
+@FeignClient(name = "UCARD-SERVICE", path = "/ucard/id/type/config/manager")
+public interface UcardIdTypeFeignService {
+
+
+    /**
+     * 证件类型配置列表
+     */
+    @PostMapping("/list")
+    ResultWithPagerDto<CardIdTypeConfigDto> getCardIdTypeConfigList(CardIdTypeConfigPageEntity entity) throws ServiceException;
+
+    /**
+     * 批量新增证件类型配置
+     */
+    @PostMapping("/add")
+    BaseResultDto batchAddCardIdTypeConfig(List<CardIdTypeConfigAddEntity> entitys) throws ServiceException;
+
+    /**
+     * 修改证件类型配置
+     */
+    @PostMapping("/update")
+    BaseResultDto updateCardIdTypeConfig(CardIdTypeConfigUpdateEntity entity) throws ServiceException;
+
+    /**
+     * 删除证件类型配置
+     */
+    @PostMapping("/delete")
+    BaseResultDto deleteCardIdTypeConfig(BaseDeleteEntities entity) throws ServiceException;
+
+
+
+}

+ 56 - 0
uacrd-manager-server/src/main/java/com/crm/manager/service/ucard/UcardNumberFeignService.java

@@ -0,0 +1,56 @@
+package com.crm.manager.service.ucard;
+
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ucard.CardNumberDto;
+import com.crm.rely.backend.core.entity.base.BaseDeleteEntities;
+import com.crm.rely.backend.core.entity.ucard.CardNumberAddEntity;
+import com.crm.rely.backend.core.entity.ucard.CardNumberPageEntity;
+import com.crm.rely.backend.core.entity.ucard.CardNumberUpdateEntity;
+import com.crm.rely.backend.core.entity.ucard.CardNumberVerifyEntity;
+import com.crm.rely.backend.exception.ServiceException;
+import org.springframework.cloud.netflix.feign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+
+import java.util.List;
+
+@FeignClient(name = "UCARD-SERVICE", path = "/ucard/number/manager")
+public interface UcardNumberFeignService {
+
+    /**
+     * 校验实体卡卡号是否使用过
+     */
+    @PostMapping("/verify")
+    BaseResultDto cardNumberVerify(CardNumberVerifyEntity entity) throws ServiceException;
+
+    /**
+     * 导入卡号
+     */
+    @PostMapping("/import")
+    BaseResultDto cardNumberImport(List<CardNumberAddEntity> entityList) throws ServiceException;
+
+    /**
+     * 卡号列表
+     */
+    @PostMapping("/list")
+    ResultWithPagerDto<CardNumberDto> queryCardNumberList(CardNumberPageEntity entity) throws ServiceException;
+
+    /**
+     * 修改卡号状态
+     */
+    @PostMapping("/update/status")
+    BaseResultDto saveCardNumberStatus(CardNumberUpdateEntity entity) throws ServiceException;
+
+    /**
+     * 卡号下拉列表
+     */
+    @PostMapping("/dropdown")
+    BaseResultDto queryCardNumberDropdown(CardNumberPageEntity entity) throws ServiceException;
+
+    /**
+     * 删除实体卡卡号
+     */
+    @PostMapping("/delete")
+    BaseResultDto deleteCardNumber(BaseDeleteEntities entity) throws ServiceException;
+
+}

+ 28 - 0
uacrd-manager-server/src/main/java/com/crm/manager/service/ucard/UcardOperateFeignService.java

@@ -0,0 +1,28 @@
+package com.crm.manager.service.ucard;
+
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ucard.CardOperateDto;
+import com.crm.rely.backend.core.entity.ucard.CardOperatePageEntity;
+import com.crm.rely.backend.exception.ServiceException;
+import org.springframework.cloud.netflix.feign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+
+import java.util.List;
+
+@FeignClient(name = "UCARD-SERVICE", path = "/ucard/operate/manager")
+public interface UcardOperateFeignService {
+
+    /**
+     * 操作记录分页列表
+     */
+    @PostMapping("/page")
+    ResultWithPagerDto<CardOperateDto> queryOperatePageList(CardOperatePageEntity entity) throws ServiceException;
+
+    /**
+     * 操作记录导出
+     */
+    @PostMapping("/record/export")
+    BaseResultDto<List<CardOperateDto>> cardOperateRecordExport(CardOperatePageEntity entity) throws ServiceException;
+
+}

+ 42 - 0
uacrd-manager-server/src/main/java/com/crm/manager/service/ucard/UcardPermissionFeignService.java

@@ -0,0 +1,42 @@
+package com.crm.manager.service.ucard;
+
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ucard.CardPermissionDto;
+import com.crm.rely.backend.core.entity.ucard.CardPermissionAddEntity;
+import com.crm.rely.backend.core.entity.ucard.CardPermissionDeleteEntity;
+import com.crm.rely.backend.core.entity.ucard.CardPermissionPageEntity;
+import com.crm.rely.backend.core.entity.ucard.CardPermissionUpdateEntity;
+import com.crm.rely.backend.exception.ServiceException;
+import org.springframework.cloud.netflix.feign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+
+@FeignClient(name = "UCARD-SERVICE", path = "/ucard/permission/manager")
+public interface UcardPermissionFeignService {
+
+    /**
+     * 卡权限分页列表
+     */
+    @PostMapping("/page")
+    ResultWithPagerDto<CardPermissionDto> queryPermissionPageList(CardPermissionPageEntity entity) throws ServiceException;
+
+    /**
+     * 新增卡权限
+     */
+    @PostMapping("/add")
+    BaseResultDto permissionAdd(CardPermissionAddEntity entity) throws ServiceException;
+
+    /**
+     * 更新卡权限
+     */
+    @PostMapping("/update")
+    BaseResultDto permissionUpdate(CardPermissionUpdateEntity entity) throws ServiceException;
+
+    /**
+     * 删除卡权限
+     */
+    @PostMapping("/delete")
+    BaseResultDto permissionDelete(CardPermissionDeleteEntity entity) throws ServiceException;
+
+
+}

+ 29 - 0
uacrd-manager-server/src/main/java/com/crm/manager/service/ucard/UcardWalletAddressFeignService.java

@@ -0,0 +1,29 @@
+package com.crm.manager.service.ucard;
+
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ucard.vaultody.VaultodyDepositAddressDto;
+import com.crm.rely.backend.core.entity.ucard.vaultody.VaultodyDepositAddressPageEntity;
+import com.crm.rely.backend.core.entity.ucard.vaultody.VaultodyResetDepositAddressEntity;
+import com.crm.rely.backend.exception.ServiceException;
+import org.springframework.cloud.netflix.feign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+
+@FeignClient(name = "UCARD-SERVICE", path = "/ucard/wallet/address/manager")
+public interface UcardWalletAddressFeignService {
+
+
+    /**
+     * 钱包地址分页列表
+     */
+    @PostMapping("/page")
+    ResultWithPagerDto<VaultodyDepositAddressDto> getDepositAddressPage(VaultodyDepositAddressPageEntity entity) throws ServiceException;
+
+    /**
+     * 重置钱包地址
+     */
+    @PostMapping("/reset")
+    BaseResultDto resetDepositAddress(VaultodyResetDepositAddressEntity entity) throws ServiceException;
+
+
+}

+ 34 - 0
uacrd-manager-server/src/main/java/com/crm/manager/service/ucard/UcardWalletWithdrawFeignService.java

@@ -0,0 +1,34 @@
+package com.crm.manager.service.ucard;
+
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ucard.UcardWalletWithdrawDto;
+import com.crm.rely.backend.core.entity.ucard.CardWalletWithdrawApproveEntity;
+import com.crm.rely.backend.core.entity.ucard.UcardWalletWithdrawPageEntity;
+import com.crm.rely.backend.core.entity.ucard.WalletWithdrawApplyEntity;
+import com.crm.rely.backend.exception.ServiceException;
+import org.springframework.cloud.netflix.feign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+
+@FeignClient(name = "UCARD-SERVICE", path = "/ucard/wallet/withdraw/manager")
+public interface UcardWalletWithdrawFeignService {
+
+
+    /**
+     * 钱包提款分页列表
+     */
+    @PostMapping("/page")
+    ResultWithPagerDto<UcardWalletWithdrawDto> getWalletWithdrawPage(UcardWalletWithdrawPageEntity entity) throws ServiceException;
+
+    /**
+     * 钱包提款申请
+     */
+    @PostMapping("/apply")
+    BaseResultDto walletWithdrawApply(WalletWithdrawApplyEntity entity) throws ServiceException;
+
+    /**
+     * 钱包提款审核
+     */
+    @PostMapping("/approve")
+    BaseResultDto walletWithdrawApprove(CardWalletWithdrawApproveEntity entity) throws ServiceException;
+}

+ 1 - 1
uacrd-manager-server/src/main/resources/application-dev.yml

@@ -1,7 +1,7 @@
 spring:
   datasource:
     driver-class-name: com.mysql.jdbc.Driver
-    url: jdbc:mysql://103.214.175.29:28571/cwg_card?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&allowMultiQueries=true&useSSL=false
+    url: jdbc:mysql://103.214.175.29:28571/cwg_ucard_local?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC&allowMultiQueries=true&useSSL=false
     username: root
     password: NSH01Y0GTmUNjgg6xw80qg==
   jpa:

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

@@ -21,4 +21,10 @@ public class VaultodyConfig {
 
     private String addressPathTemplate;
 
+    private String linkAddressPathTemplate;
+
+    private String webhooksPassphrase;
+
+    private String createCoinTransactionPathTemplate;
+
 }

+ 68 - 0
ucard-cloud/src/main/java/com/crm/ucard/configuration/CryptoKeyHolder.java

@@ -0,0 +1,68 @@
+package com.crm.ucard.configuration;
+
+import com.crm.rely.backend.core.constant.ConfigConstants;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.pojo.table.SysConfigTable;
+import com.crm.rely.backend.exception.ServiceException;
+import com.crm.rely.backend.util.AESUtil;
+import com.crm.ucard.service.SysConfigService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.PostConstruct;
+
+/**
+ * @author gao
+ * @date 2026/1/12
+ */
+@Component
+public class CryptoKeyHolder {
+
+    @Value("${card.rsa.private-key-encrypted}")
+    private String encryptedPrivateKey;
+
+    private String privateKey;
+
+    @Value("${card.rsa.public-key}")
+    private String publicKey;
+
+    @Autowired
+    private SysConfigService sysConfigService;
+
+    @PostConstruct
+    public void init() {
+        try {
+            // 1. 启动时加载 AES Key
+            String aesKey = getPropertyKey();
+
+            if (aesKey == null) {
+                throw new IllegalStateException("AES Key 未配置,系统拒绝启动");
+            }
+
+            // 2. 解密 RSA 私钥
+            this.privateKey = AESUtil.decrypt(encryptedPrivateKey, aesKey);
+
+        } catch (Exception e) {
+            // 强制失败
+            throw new RuntimeException("密钥初始化失败,系统启动中断", e);
+        }
+    }
+
+    public String getPrivateKey() {
+        return privateKey;
+    }
+
+    public String getPublicKey() {
+        return publicKey;
+    }
+
+    private String getPropertyKey() throws ServiceException {
+        SysConfigTable table = sysConfigService.getByCode(ConfigConstants.FINANCE_PROPERTY_KEY);
+        if (table == null) {
+            throw ServiceException.exception(Constants.SYSTEM_ERROR);
+        }
+        return table.getValue();
+    }
+
+}

+ 4 - 1
ucard-cloud/src/main/java/com/crm/ucard/configuration/FeignMultipartSupportConfig.java

@@ -5,7 +5,10 @@ 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.*;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Primary;
+import org.springframework.context.annotation.Scope;
 
 /**
  * @Author: houn

+ 9 - 0
ucard-cloud/src/main/java/com/crm/ucard/constants/DocType.java

@@ -0,0 +1,9 @@
+package com.crm.ucard.constants;
+
+public enum DocType {
+    PASSPORT,
+    ID_CARD,
+    DRIVERS,
+    RESIDENCE_PERMIT,
+    SELFIE
+}

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

@@ -1,32 +0,0 @@
-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();
-        }
-    }
-
-}

+ 33 - 21
ucard-cloud/src/main/java/com/crm/ucard/controller/CustomController.java

@@ -1,27 +1,39 @@
 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.alibaba.fastjson.JSON;
+import com.crm.login.rely.backend.controller.BaseLoginController;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.constant.EmailSendEnum;
+import com.crm.rely.backend.core.constant.PrefixEnum;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.custom.CustomInfoDto;
+import com.crm.rely.backend.core.dto.custom.InfoDto;
+import com.crm.rely.backend.core.dto.ib.info.IbInfoDto;
 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.*;
+import com.crm.rely.backend.exception.ServiceException;
+import com.crm.rely.backend.service.EmailService;
+import com.crm.rely.backend.service.SysCountryService;
+import com.crm.rely.backend.util.DateUtil;
+import com.crm.rely.backend.util.GetIpAndMac;
+import com.crm.rely.backend.util.MD5Util;
+import com.crm.ucard.service.CustomInfoService;
+import lombok.extern.log4j.Log4j;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+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;
+import org.springframework.web.servlet.LocaleResolver;
+import org.springframework.web.servlet.support.RequestContextUtils;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.Locale;
 
 /**
  * @program: crm-backend

+ 152 - 0
ucard-cloud/src/main/java/com/crm/ucard/controller/CustomUcardGlobalController.java

@@ -0,0 +1,152 @@
+package com.crm.ucard.controller;
+
+import com.crm.rely.backend.core.constant.FeignClientAnnotation;
+import com.crm.rely.backend.core.dto.base.BaseReportResultDto;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.ucard.GlobalOrderDto;
+import com.crm.rely.backend.core.dto.ucard.GlobalOrderSumDto;
+import com.crm.rely.backend.core.entity.base.BaseEntity;
+import com.crm.rely.backend.core.entity.custom.info.InfoEntity;
+import com.crm.rely.backend.core.entity.ucard.*;
+import com.crm.rely.backend.core.entity.wasabi.WasabiTransactionSubmitRfiEntity;
+import com.crm.rely.backend.exception.ServiceException;
+import com.crm.ucard.service.GlobalService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+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;
+
+import java.util.List;
+
+/**
+ * 银行卡服务接口
+ */
+@Slf4j
+@RestController
+@RequestMapping("/ucard/global/custom")
+public class CustomUcardGlobalController {
+
+    @Autowired
+    private GlobalService globalService;
+
+    /**
+     * 查询支持的城市列表
+     */
+    @PostMapping("/query/bank/cities")
+    @FeignClientAnnotation
+    public BaseResultDto queryBankCities(@RequestBody CardBankCitiesEntity entity) throws ServiceException {
+        return globalService.queryBankCities(entity);
+    }
+
+    /**
+     * 查询汇率
+     */
+    @PostMapping("/query/exchange/rate")
+    @FeignClientAnnotation
+    public BaseResultDto queryExchangeRate(@RequestBody GlobalQueryExchangeRateEntity entity) throws Exception {
+        return BaseResultDto.success(globalService.queryExchangeRate(entity));
+    }
+
+    /**
+     * 创建交易订单
+     */
+    @PostMapping("/create/order")
+    @FeignClientAnnotation
+    public BaseResultDto globalCreateOrder(@RequestBody GlobalCreateOrderEntity entity) throws Exception {
+        return globalService.globalCreateOrder(entity);
+    }
+
+    /**
+     * 速汇订单分页列表
+     */
+    @PostMapping("/order/page/list")
+    @FeignClientAnnotation
+    public BaseReportResultDto<List<GlobalOrderDto>, GlobalOrderSumDto> globalOrderPageList(@RequestBody GlobalOrderPageEntity entity) throws Exception {
+        return globalService.globalOrderPageList(entity);
+    }
+
+    /**
+     * 取消交易订单
+     */
+    @PostMapping("/cancel/order")
+    @FeignClientAnnotation
+    public BaseResultDto globalCancelOrder(@RequestBody GlobalCancelOrderEntity entity) throws Exception {
+        return globalService.globalCancelOrder(entity);
+    }
+
+    /**
+     * 补充资料
+     */
+    @PostMapping("/supplementary/data")
+    @FeignClientAnnotation
+    public BaseResultDto supplementaryData(@RequestBody WasabiTransactionSubmitRfiEntity entity) throws Exception {
+        return globalService.supplementaryData(entity);
+    }
+
+    /**
+     * 支持的币种列表
+     */
+    @PostMapping("/currencies/dropdown")
+    @FeignClientAnnotation
+    public BaseResultDto getCurrenciesDropdown(@RequestBody GlobalCurrenciesDropdownEntity entity) throws ServiceException {
+        return globalService.getCurrenciesDropdown(entity);
+    }
+
+    /**
+     * 币种字段和可选值列表
+     */
+    @PostMapping("/currencies/field/list")
+    @FeignClientAnnotation
+    public BaseResultDto getCurrenciesFieldList(@RequestBody @Validated GlobalCurrenciesFieldListEntity entity) throws ServiceException {
+        return globalService.getCurrenciesFieldList(entity);
+    }
+
+    /**
+     * 查询速汇订单详情
+     */
+    @PostMapping("/order/details")
+    @FeignClientAnnotation
+    public BaseResultDto queryGlobalOrderDetails(@RequestBody BaseEntity entity) throws ServiceException {
+        return globalService.queryGlobalOrderDetails(entity);
+    }
+
+    /**
+     * 速汇查询用户详情
+     */
+    @PostMapping("/user/details")
+    @FeignClientAnnotation
+    public BaseResultDto findGlobalUserDetails(InfoEntity entity) throws ServiceException {
+        return globalService.findGlobalUserDetails(entity);
+    }
+
+    /**
+     * 获取收款用户列表
+     */
+    @PostMapping("/receiver/user/list")
+    @FeignClientAnnotation
+    BaseResultDto getGlobalReceiverUserList(@RequestBody GlobalReceiverUserEntity entity) throws ServiceException {
+        return globalService.getGlobalReceiverUserList(entity);
+    }
+
+    /**
+     * 删除收款用户
+     */
+    @PostMapping("/receiver/user/delete")
+    @FeignClientAnnotation
+    BaseResultDto deleteGlobalReceiverUser(@RequestBody BaseEntity entity) throws ServiceException {
+        return globalService.deleteGlobalReceiverUser(entity);
+    }
+
+    /**
+     * 币种所有字段名称
+     */
+    @PostMapping("/field/params")
+    @FeignClientAnnotation
+    public BaseResultDto getGlobalFieldParams() throws ServiceException {
+        return globalService.getGlobalFieldParams();
+    }
+
+}

+ 89 - 0
ucard-cloud/src/main/java/com/crm/ucard/controller/CustomUcardWalletController.java

@@ -0,0 +1,89 @@
+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.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ucard.UcardWalletDepositTransactionDto;
+import com.crm.rely.backend.core.dto.ucard.UcardWalletWithdrawDto;
+import com.crm.rely.backend.core.entity.ucard.CardSendEmailCodeEntity;
+import com.crm.rely.backend.core.entity.ucard.UcardWalletDepositTransactionPageEntity;
+import com.crm.rely.backend.core.entity.ucard.UcardWalletWithdrawPageEntity;
+import com.crm.rely.backend.core.entity.ucard.WalletWithdrawApplyEntity;
+import com.crm.rely.backend.core.entity.ucard.vaultody.VaultodyGenerateDepositAddressEntity;
+import com.crm.rely.backend.exception.ServiceException;
+import com.crm.ucard.service.UcardEmailService;
+import com.crm.ucard.service.VaultodyService;
+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;
+
+/**
+ * ucard钱包
+ */
+@Slf4j
+@RestController
+@RequestMapping("/ucard/wallet/custom")
+public class CustomUcardWalletController {
+
+    @Autowired
+    private VaultodyService vaultodyService;
+    @Autowired
+    private UcardEmailService emailService;
+
+    /**
+     * 生成钱包地址
+     * @param entity:
+     * @return void
+     */
+    @PostMapping("/generate/deposit/address")
+    @FeignClientAnnotation
+    public BaseResultDto generateDepositAddress(@RequestBody VaultodyGenerateDepositAddressEntity entity) throws Exception {
+        String address = vaultodyService.generateDepositAddress(entity);
+        try {
+            vaultodyService.linkAddress(entity.getBlockchain(), address);
+        } catch (Exception e){
+            log.error("链接钱包地址失败", e);
+        }
+
+        return BaseResultDto.success(Constants.SUCCESS,address);
+    }
+
+    /**
+     * 加密货币交易分页列表
+     */
+    @PostMapping("/deposit/transaction/page")
+    @FeignClientAnnotation
+    ResultWithPagerDto<UcardWalletDepositTransactionDto> getWalletDepositTransactionPage(@RequestBody UcardWalletDepositTransactionPageEntity entity) throws ServiceException{
+        return vaultodyService.getWalletDepositTransactionPage(entity);
+    }
+
+    /**
+     * 钱包提款分页列表
+     */
+    @PostMapping("/page")
+    @FeignClientAnnotation
+    ResultWithPagerDto<UcardWalletWithdrawDto> getWalletWithdrawPage(@RequestBody UcardWalletWithdrawPageEntity entity) throws ServiceException {
+        return vaultodyService.getWalletWithdrawPage(entity);
+    }
+
+    /**
+     * 钱包提款申请
+     */
+    @PostMapping("/apply")
+    @FeignClientAnnotation
+    BaseResultDto walletWithdrawApply(@RequestBody WalletWithdrawApplyEntity entity) throws Exception{
+        return vaultodyService.walletWithdrawApply(entity);
+    }
+
+    @PostMapping("/send/email/code")
+    @FeignClientAnnotation
+    public BaseResultDto sendEmailCode(@RequestBody CardSendEmailCodeEntity entity) throws Exception {
+        emailService.sendEmailCode(entity);
+        return BaseResultDto.success(Constants.SEND_SUCCESS);
+    }
+
+}

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

@@ -1,31 +0,0 @@
-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);
-    }
-
-}

+ 65 - 165
ucard-cloud/src/main/java/com/crm/ucard/controller/CustomWasabiCardController.java

@@ -1,10 +1,16 @@
 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.base.BaseReportResultDto;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
 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.dto.wasabi.WasabiActiveCardDto;
+import com.crm.rely.backend.core.dto.wasabi.WasabiBalanceInfoDto;
+import com.crm.rely.backend.core.dto.wasabi.WasabiOccupationsDto;
+import com.crm.rely.backend.core.dto.wasabi.WasabiUpdatePinDto;
+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.ucard.*;
@@ -30,11 +36,21 @@ import java.util.List;
 public class CustomWasabiCardController {
 
     @Autowired
-    private UcardService ucardService;
+    private UcardCardService ucardCardService;
     @Autowired
-    private WasabiCardService wasabiCardService;
+    private WasabiDocumentApiService wasabiDocumentApiService;
     @Autowired
-    private UcardApiService ucardApiService;
+    private UcardPermissionService ucardPermissionService;
+    @Autowired
+    private KycService kycService;
+    @Autowired
+    private UcardFileService ucardFileService;
+    @Autowired
+    private UcardTypeConfigService ucardTypeConfigService;
+    @Autowired
+    private UcardEmailService ucardEmailService;
+    @Autowired
+    private UcardBlockchainService ucardBlockchainService;
 
     /**
      * 商户用户注册
@@ -47,7 +63,7 @@ public class CustomWasabiCardController {
         request.setCustomId(entity.getCustomInfo().getId());
         request.setCId(entity.getCustomInfo().getCId());
         request.setOperateUser(entity.getCustomInfo().getCId());
-        return wasabiCardService.registerMerchantUser(request);
+        return ucardCardService.registerMerchantUser(request);
     }
 
     /**
@@ -59,7 +75,7 @@ public class CustomWasabiCardController {
         request.setCustomId(entity.getCustomInfo().getId());
         request.setCId(entity.getCustomInfo().getCId());
         request.setOperateUser(entity.getCustomInfo().getCId());
-        return wasabiCardService.updateMerchantUser(request);
+        return ucardCardService.updateMerchantUser(request);
     }
 
     /**
@@ -68,7 +84,7 @@ public class CustomWasabiCardController {
     @PostMapping("/merchant/user/address/update")
     @FeignClientAnnotation
     public BaseResultDto updateUserMailingAddress(@RequestBody WasabiSaveUserMailingAddressEntity request) throws ServiceException {
-        return wasabiCardService.updateUserMailingAddress(request);
+        return ucardCardService.updateUserMailingAddress(request);
     }
 
     /**
@@ -77,7 +93,7 @@ public class CustomWasabiCardController {
     @PostMapping("/merchant/user/single")
     @FeignClientAnnotation
     public BaseResultDto merchantUserSingle(InfoEntity infoEntity) throws Exception {
-        return wasabiCardService.merchantUserSingle(infoEntity.getCustomInfo().getId());
+        return ucardCardService.merchantUserSingle(infoEntity.getCustomInfo().getId());
     }
 
     /**
@@ -85,9 +101,9 @@ public class CustomWasabiCardController {
      */
     @PostMapping("/card/types/list")
     @FeignClientAnnotation
-    public BaseResultDto getCardTypeList(@RequestBody CardTypeEntity entity, InfoEntity infoEntity) throws ServiceException {
+    public BaseResultDto getCardTypeList(@RequestBody CardTypeEntity entity, InfoEntity infoEntity) throws Exception {
         entity.setCId(infoEntity.getCustomInfo().getCId());
-        return BaseResultDto.success(wasabiCardService.getCardTypeList(entity));
+        return BaseResultDto.success(ucardCardService.getCardTypeList(entity));
     }
 
     /**
@@ -97,7 +113,7 @@ public class CustomWasabiCardController {
     @FeignClientAnnotation
     public BaseResultDto applyCard(@RequestBody CardApplyEntity request, InfoEntity infoEntity) throws Exception {
         request.setCId(infoEntity.getCustomInfo().getCId());
-        return wasabiCardService.applyCard(request);
+        return ucardCardService.applyCard(request);
     }
 
     /**
@@ -106,7 +122,7 @@ public class CustomWasabiCardController {
     @PostMapping("/card/apply/page")
     @FeignClientAnnotation
     public ResultWithPagerDto<CardApplyDto> getCardApplyPageList(@RequestBody CardApplyPageEntity entity) throws ServiceException {
-        return ucardService.getCardApplyPageList(entity);
+        return ucardCardService.getCardApplyPageList(entity);
     }
 
     /**
@@ -115,7 +131,7 @@ public class CustomWasabiCardController {
     @PostMapping("/card/apply/details")
     @FeignClientAnnotation
     public BaseResultDto cardApplyDetails(@RequestBody BaseEntity entity) throws ServiceException {
-        return wasabiCardService.cardApplyDetails(entity);
+        return ucardCardService.cardApplyDetails(entity);
     }
 
     /**
@@ -124,7 +140,7 @@ public class CustomWasabiCardController {
     @PostMapping("/card/apply/progress")
     @FeignClientAnnotation
     public BaseResultDto queryApplyProgress(@RequestBody CardApplyProgressEntity request) throws Exception {
-        return wasabiCardService.queryApplyProgress(request);
+        return ucardCardService.queryApplyProgress(request);
     }
 
     /**
@@ -134,7 +150,7 @@ public class CustomWasabiCardController {
     @FeignClientAnnotation
     public BaseResultDto getCardList(@RequestBody CardPageEntity entity, InfoEntity infoEntity) throws ServiceException {
         entity.setCId(infoEntity.getCustomInfo().getCId());
-        return BaseResultDto.success(ucardApiService.getCardList(entity));
+        return BaseResultDto.success(ucardCardService.getCardList(entity));
     }
 
     /**
@@ -143,7 +159,7 @@ public class CustomWasabiCardController {
     @PostMapping("/card/single")
     @FeignClientAnnotation
     public BaseResultDto getCardSingle(@RequestBody SingleLongEntity entity) throws ServiceException {
-        return BaseResultDto.success(ucardApiService.getCardSingle(entity));
+        return BaseResultDto.success(ucardCardService.getCardSingle(entity));
     }
 
     /**
@@ -152,9 +168,9 @@ public class CustomWasabiCardController {
     @PostMapping("/card/activate")
     @FeignClientAnnotation
     public BaseResultDto<WasabiActiveCardDto> activateCard(@RequestBody WasabiActiveCardEntity request,
-                                                           InfoEntity infoEntity) throws ServiceException {
+                                                           InfoEntity infoEntity) throws Exception {
         request.setCId(infoEntity.getCustomInfo().getCId());
-        return wasabiCardService.activeCard(request);
+        return ucardCardService.activeCard(request);
     }
 
     /**
@@ -162,9 +178,9 @@ public class CustomWasabiCardController {
      */
     @PostMapping("/card/recharge")
     @FeignClientAnnotation
-    public BaseResultDto rechargeCard(@RequestBody WasabiBalanceEntity request, InfoEntity infoEntity) throws ServiceException {
+    public BaseResultDto rechargeCard(@RequestBody WasabiBalanceEntity request, InfoEntity infoEntity) throws Exception {
         request.setCId(infoEntity.getCustomInfo().getCId());
-        return wasabiCardService.cardDeposit(request);
+        return ucardCardService.cardDeposit(request);
     }
 
     /**
@@ -173,7 +189,7 @@ public class CustomWasabiCardController {
     @PostMapping("/card/wallet/balance")
     @FeignClientAnnotation
     public BaseResultDto<WalletBalanceDto> walletBalance(@RequestBody WalletBalanceEntity request) throws ServiceException {
-        return wasabiCardService.walletBalance(request);
+        return ucardCardService.walletBalance(request);
     }
 
     /**
@@ -182,7 +198,7 @@ public class CustomWasabiCardController {
     @PostMapping("/card/wallet/record/page")
     @FeignClientAnnotation
     public ResultWithPagerDto<CardWalletRecordDto> getCardWalletRecordPageList(@RequestBody CardWalletRecordPageEntity entity) throws ServiceException {
-        return wasabiCardService.getCardWalletRecordPageList(entity);
+        return ucardCardService.getCardWalletRecordPageList(entity);
     }
 
     /**
@@ -191,7 +207,7 @@ public class CustomWasabiCardController {
     @PostMapping("/card/recharge/page")
     @FeignClientAnnotation
     public BaseReportResultDto<List<CardRechargeOrderDto>, CardRechargeOrderSumDto> queryRechargePageList(@RequestBody CardRechargePageEntity entity) throws ServiceException {
-        return ucardService.queryRechargePageList(entity);
+        return ucardCardService.queryRechargePageList(entity);
     }
 
     /**
@@ -200,7 +216,7 @@ public class CustomWasabiCardController {
     @PostMapping("/card/balance")
     @FeignClientAnnotation
     public BaseResultDto<WasabiBalanceInfoDto> queryCardBalance(@RequestBody WasabiBalanceInfoEntity request) throws ServiceException {
-        return wasabiCardService.getBalanceInfo(request);
+        return ucardCardService.getBalanceInfo(request);
     }
 
     /**
@@ -209,7 +225,7 @@ public class CustomWasabiCardController {
     @PostMapping("/card/recharge/order")
     @FeignClientAnnotation
     public BaseResultDto queryRechargeOrder(@RequestBody CardRechargeOrderQueryEntity request) throws Exception {
-        return wasabiCardService.queryDepositOrder(request);
+        return ucardCardService.queryDepositOrder(request);
     }
 
 
@@ -220,7 +236,7 @@ public class CustomWasabiCardController {
     @FeignClientAnnotation
     public BaseResultDto freezeCard(@RequestBody WasabiFreezeAndUnfreezeEntity request, InfoEntity infoEntity) throws Exception {
         request.setCId(infoEntity.getCustomInfo().getCId());
-        return wasabiCardService.cardFreeze(request);
+        return ucardCardService.cardFreeze(request);
     }
 
     /**
@@ -230,7 +246,7 @@ public class CustomWasabiCardController {
     @FeignClientAnnotation
     public BaseResultDto unfreezeCard(@RequestBody WasabiFreezeAndUnfreezeEntity request, InfoEntity infoEntity) throws Exception {
         request.setCId(infoEntity.getCustomInfo().getCId());
-        return wasabiCardService.cardUnfreeze(request);
+        return ucardCardService.cardUnfreeze(request);
     }
 
     /**
@@ -239,9 +255,9 @@ public class CustomWasabiCardController {
     @PostMapping("/card/password/reset")
     @FeignClientAnnotation
     public BaseResultDto<WasabiUpdatePinDto> resetPassword(@RequestBody WasabiUpdatePinEntity entity,
-                                                           InfoEntity infoEntity) throws ServiceException {
+                                                           InfoEntity infoEntity) throws Exception {
         entity.setCId(infoEntity.getCustomInfo().getCId());
-        return wasabiCardService.updatePin(entity);
+        return ucardCardService.updatePin(entity);
     }
 
     /**
@@ -250,7 +266,7 @@ public class CustomWasabiCardController {
     @PostMapping("/validated/file")
     @FeignClientAnnotation
     public void validatedFile(@RequestParam(value = "file") MultipartFile file) throws ServiceException {
-        wasabiCardService.validatedFile(file);
+        wasabiDocumentApiService.validatedFile(file);
     }
 
     /**
@@ -260,7 +276,7 @@ public class CustomWasabiCardController {
     @FeignClientAnnotation
     public BaseResultDto getCardCountry(@RequestBody CardCountryEntity request) throws ServiceException {
         request.setCardCategory(2);
-        return BaseResultDto.success(ucardService.getCardCountryList(request));
+        return BaseResultDto.success(ucardCardService.getCardCountryList(request));
     }
 
     /**
@@ -269,7 +285,7 @@ public class CustomWasabiCardController {
     @PostMapping("/card/occupation/list")
     @FeignClientAnnotation
     public BaseResultDto<List<WasabiOccupationsDto>> getOccupationList() throws ServiceException {
-        return wasabiCardService.getOccupationList();
+        return ucardCardService.getOccupationList();
     }
 
     /**
@@ -278,7 +294,7 @@ public class CustomWasabiCardController {
     @PostMapping("/card/transac/page")
     @FeignClientAnnotation
     public ResultWithPagerDto<CardTransacOrderDto> getTransactionPageList(@RequestBody CardTransacOrderPageEntity request) throws ServiceException {
-        return ucardService.getTransacOrderPageList(request);
+        return ucardCardService.getTransacOrderPageList(request);
     }
 
     /**
@@ -287,7 +303,7 @@ public class CustomWasabiCardController {
     @PostMapping("/card/permission/verify")
     @FeignClientAnnotation
     public BaseResultDto permissionVerify(InfoEntity entity) throws ServiceException {
-        return wasabiCardService.permissionVerify(entity.getCustomInfo());
+        return ucardPermissionService.permissionVerify(entity.getCustomInfo());
     }
 
     /**
@@ -297,16 +313,16 @@ public class CustomWasabiCardController {
      */
     @PostMapping("/getWebsdkLink")
     public BaseResultDto getWebsdkLink(@RequestBody WebsdkLinkAliEntity entity, InfoEntity infoEntity) throws Exception {
-        return wasabiCardService.getWebsdkLink(entity, infoEntity.getCustomInfo().getId());
+        return kycService.getWebsdkLink(entity, infoEntity.getCustomInfo().getId());
     }
 
     /**
      * 扫码上传文件
      */
-    @PostMapping("/scan/upload/file")
+    @PostMapping("/scan/code")
     @FeignClientAnnotation
-    public BaseResultDto scanUpload(@RequestBody CardWebSocketEntity entity) throws ServiceException {
-        return wasabiCardService.scanUpload(entity);
+    public BaseResultDto scanCode(@RequestBody CardWebSocketEntity entity) throws ServiceException {
+        return ucardFileService.scanCode(entity);
     }
 
     /**
@@ -318,16 +334,7 @@ public class CustomWasabiCardController {
     @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);
+        return ucardTypeConfigService.getCardIdTypeConfigList(entity);
     }
 
     /**
@@ -335,8 +342,8 @@ public class CustomWasabiCardController {
      */
     @PostMapping("/query/cvv/send/code")
     @FeignClientAnnotation
-    public void queryCvvSendCode(@RequestBody @Validated CardQueryCvvSendEmailCodeEntity entity) throws Exception {
-        wasabiCardService.queryCvvSendCode(entity);
+    public void queryCvvSendCode(@RequestBody @Validated CardSendEmailCodeEntity entity) throws Exception {
+        ucardEmailService.queryCvvSendCode(entity);
     }
 
     /**
@@ -345,16 +352,7 @@ public class CustomWasabiCardController {
     @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));
+        return ucardEmailService.queryCvvVerifyCode(entity);
     }
 
     /**
@@ -362,98 +360,8 @@ public class CustomWasabiCardController {
      */
     @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);
+    public BaseResultDto cardAccountDropdown(@RequestBody CardAccountDropdownEntity entity) throws Exception {
+        return ucardCardService.cardAccountDropdown(entity);
     }
 
     /**
@@ -462,16 +370,7 @@ public class CustomWasabiCardController {
     @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);
+        return ucardBlockchainService.getCardBlockchainConfigDropdown(entity);
     }
 
     /**
@@ -480,7 +379,8 @@ public class CustomWasabiCardController {
     @PostMapping("/card/withdraw/page")
     @FeignClientAnnotation
     ResultWithPagerDto<CardWithdrawDto> queryCardWithdrawPage(@RequestBody CardWithdrawPageEntity entity) throws ServiceException{
-        return wasabiCardService.queryCardWithdrawPage(entity);
+        return ucardCardService.queryCardWithdrawPage(entity);
     }
 
+
 }

+ 51 - 0
ucard-cloud/src/main/java/com/crm/ucard/controller/ManagerEncryptedController.java

@@ -0,0 +1,51 @@
+package com.crm.ucard.controller;
+
+import com.crm.rely.backend.core.constant.FeignClientAnnotation;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ucard.UcardWalletDepositTransactionDto;
+import com.crm.rely.backend.core.entity.ucard.UcardWalletDepositTransactionPageEntity;
+import com.crm.rely.backend.exception.ServiceException;
+import com.crm.ucard.service.UcardExportService;
+import com.crm.ucard.service.VaultodyService;
+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;
+
+import java.util.List;
+
+/**
+ * 银行卡服务接口
+ */
+@Slf4j
+@RestController
+@RequestMapping("/ucard/encrypted/manager")
+public class ManagerEncryptedController {
+
+    @Autowired
+    private VaultodyService vaultodyService;
+    @Autowired
+    private UcardExportService ucardExportService;
+
+    /**
+     * 加密货币交易分页列表
+     */
+    @PostMapping("/wallet/transaction/page")
+    @FeignClientAnnotation
+    ResultWithPagerDto<UcardWalletDepositTransactionDto> getWalletDepositTransactionPage(@RequestBody UcardWalletDepositTransactionPageEntity entity) throws ServiceException{
+        return vaultodyService.getWalletDepositTransactionPage(entity);
+    }
+
+    /**
+     * 加密货币交易记录导出
+     */
+    @PostMapping("/wallet/transaction/list/export")
+    @FeignClientAnnotation
+    BaseResultDto<List<UcardWalletDepositTransactionDto>> encryptedWalletTransactionListExport(@RequestBody UcardWalletDepositTransactionPageEntity entity) throws ServiceException{
+        return ucardExportService.encryptedWalletTransactionListExport(entity);
+    }
+
+}

+ 204 - 0
ucard-cloud/src/main/java/com/crm/ucard/controller/ManagerUcardAppController.java

@@ -0,0 +1,204 @@
+package com.crm.ucard.controller;
+
+import com.crm.rely.backend.core.constant.FeignClientAnnotation;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ucard.CardAppCommonProblemDto;
+import com.crm.rely.backend.core.dto.ucard.CardAppCommonProblemTypeDto;
+import com.crm.rely.backend.core.dto.ucard.CardAppPrivacyPolicyDto;
+import com.crm.rely.backend.core.dto.ucard.CardAppVersionDto;
+import com.crm.rely.backend.core.entity.base.BaseDeleteEntities;
+import com.crm.rely.backend.core.entity.ucard.*;
+import com.crm.rely.backend.exception.ServiceException;
+import com.crm.ucard.service.UcardAppCommonProblemService;
+import com.crm.ucard.service.UcardAppCommonProblemTypeService;
+import com.crm.ucard.service.UcardAppPrivacyPolicyService;
+import com.crm.ucard.service.UcardAppVersionService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+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/app/manager")
+public class ManagerUcardAppController {
+
+    @Autowired
+    private UcardAppVersionService ucardAppVersionService;
+    @Autowired
+    private UcardAppCommonProblemService ucardAppCommonProblemService;
+    @Autowired
+    private UcardAppPrivacyPolicyService ucardAppPrivacyPolicyService;
+    @Autowired
+    private UcardAppCommonProblemTypeService ucardAppCommonProblemTypeService;
+
+    /**
+     * app版本配置列表
+     */
+    @PostMapping("/version/page")
+    @FeignClientAnnotation
+    ResultWithPagerDto<CardAppVersionDto> getCardAppVersionPageList(@RequestBody CardAppVersionPageEntity entity) throws ServiceException{
+        return ucardAppVersionService.getCardAppVersionPageList(entity);
+    }
+
+    /**
+     * 新增app版本
+     */
+    @PostMapping("/version/add")
+    @FeignClientAnnotation
+    BaseResultDto addCardAppVersion(@RequestBody CardAppVersionAddEntity entity) throws ServiceException{
+        return ucardAppVersionService.addCardAppVersion(entity);
+    }
+
+    /**
+     * 修改app版本
+     */
+    @PostMapping("/version/update")
+    @FeignClientAnnotation
+    BaseResultDto updateCardAppVersion(@RequestBody CardAppVersionUpdateEntity entity) throws ServiceException{
+        return ucardAppVersionService.updateCardAppVersion(entity);
+    }
+
+    /**
+     * 删除app版本
+     */
+    @PostMapping("/version/delete")
+    @FeignClientAnnotation
+    BaseResultDto deleteCardAppVersion(@RequestBody BaseDeleteEntities entity) throws ServiceException{
+        return ucardAppVersionService.deleteCardAppVersion(entity);
+    }
+
+    /**
+     * 获取最新一条app版本配置
+     */
+    @PostMapping("/version/detail")
+    @FeignClientAnnotation
+    public BaseResultDto getLatestCardAppVersion(@RequestBody @Validated CardAppVersionDetailEntity entity) throws ServiceException {
+        return ucardAppVersionService.getLatestCardAppVersion(entity);
+    }
+
+    /**
+     * app常见问题列表
+     */
+    @PostMapping("/common/problem/page")
+    @FeignClientAnnotation
+    ResultWithPagerDto<CardAppCommonProblemDto> getCardAppCommonProblemPageList(@RequestBody CardAppCommonProblemPageEntity entity) throws ServiceException{
+        return ucardAppCommonProblemService.getCardAppCommonProblemPageList(entity);
+    }
+
+    /**
+     * 新增app常见问题
+     */
+    @PostMapping("/common/problem/add")
+    @FeignClientAnnotation
+    BaseResultDto addCardAppCommonProblem(@RequestBody CardAppCommonProblemAddEntity entity) throws ServiceException{
+        return ucardAppCommonProblemService.addCardAppCommonProblem(entity);
+    }
+
+    /**
+     * 修改app常见问题
+     */
+    @PostMapping("/common/problem/update")
+    @FeignClientAnnotation
+    BaseResultDto updateCardAppCommonProblem(@RequestBody CardAppCommonProblemUpdateEntity entity) throws ServiceException{
+        return ucardAppCommonProblemService.updateCardAppCommonProblem(entity);
+    }
+
+    /**
+     * 删除app常见问题
+     */
+    @PostMapping("/common/problem/delete")
+    @FeignClientAnnotation
+    BaseResultDto deleteCardAppCommonProblem(@RequestBody BaseDeleteEntities entity) throws ServiceException{
+        return ucardAppCommonProblemService.deleteCardAppCommonProblem(entity);
+    }
+
+    /**
+     * app隐私政策列表
+     */
+    @PostMapping("/privacy/policy/page")
+    @FeignClientAnnotation
+    ResultWithPagerDto<CardAppPrivacyPolicyDto> getCardAppPrivacyPolicyPageList(@RequestBody CardAppPrivacyPolicyPageEntity entity) throws ServiceException{
+        return ucardAppPrivacyPolicyService.getCardAppPrivacyPolicyPageList(entity);
+    }
+
+    /**
+     * 新增app隐私政策
+     */
+    @PostMapping("/privacy/policy/add")
+    @FeignClientAnnotation
+    BaseResultDto addCardAppPrivacyPolicy(@RequestBody @Validated CardAppPrivacyPolicyAddEntity entity) throws ServiceException{
+        return ucardAppPrivacyPolicyService.addCardAppPrivacyPolicy(entity);
+    }
+
+    /**
+     * 修改app隐私政策
+     */
+    @PostMapping("/privacy/policy/update")
+    @FeignClientAnnotation
+    BaseResultDto updateCardAppPrivacyPolicy(@RequestBody @Validated CardAppPrivacyPolicyUpdateEntity entity) throws ServiceException{
+        return ucardAppPrivacyPolicyService.updateCardAppPrivacyPolicy(entity);
+    }
+
+    /**
+     * 删除app隐私政策
+     */
+    @PostMapping("/privacy/policy/delete")
+    @FeignClientAnnotation
+    BaseResultDto deleteCardAppPrivacyPolicy(@RequestBody BaseDeleteEntities entity) throws ServiceException{
+        return ucardAppPrivacyPolicyService.deleteCardAppPrivacyPolicy(entity);
+    }
+
+    /**
+     * app常见问题类型列表
+     */
+    @PostMapping("/common/problem/type/page")
+    @FeignClientAnnotation
+    ResultWithPagerDto<CardAppCommonProblemTypeDto> getCardAppCommonProblemTypePageList(@RequestBody CardAppCommonProblemTypePageEntity entity) throws ServiceException{
+        return ucardAppCommonProblemTypeService.getCardAppCommonProblemTypePageList(entity);
+    }
+
+    /**
+     * 新增app常见问题类型
+     */
+    @PostMapping("/common/problem/type/add")
+    @FeignClientAnnotation
+    BaseResultDto addCardAppCommonProblemType(@RequestBody @Validated CardAppCommonProblemTypeAddEntity entity) throws ServiceException{
+        return ucardAppCommonProblemTypeService.addCardAppCommonProblemType(entity);
+    }
+
+    /**
+     * 修改app常见问题类型
+     */
+    @PostMapping("/common/problem/type/update")
+    @FeignClientAnnotation
+    BaseResultDto updateCardAppCommonProblemType(@RequestBody @Validated CardAppCommonProblemTypeUpdateEntity entity) throws ServiceException{
+        return ucardAppCommonProblemTypeService.updateCardAppCommonProblemType(entity);
+    }
+
+    /**
+     * 删除app常见问题类型
+     */
+    @PostMapping("/common/problem/type/delete")
+    @FeignClientAnnotation
+    BaseResultDto deleteCardAppCommonProblemType(@RequestBody BaseDeleteEntities entity) throws ServiceException{
+        return ucardAppCommonProblemTypeService.deleteCardAppCommonProblemType(entity);
+    }
+
+    /**
+     * 常见问题类型下拉列表
+     */
+    @PostMapping("/common/problem/type/dropdown")
+    @FeignClientAnnotation
+    BaseResultDto cardAppCommonProblemTypeDropdown(@RequestBody @Validated CardAppCommonProblemTypeDropdown entity) throws ServiceException{
+        return ucardAppCommonProblemTypeService.cardAppCommonProblemTypeDropdown(entity);
+    }
+
+}

+ 111 - 0
ucard-cloud/src/main/java/com/crm/ucard/controller/ManagerUcardBlockchainController.java

@@ -0,0 +1,111 @@
+package com.crm.ucard.controller;
+
+import com.crm.rely.backend.core.constant.FeignClientAnnotation;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ucard.CardBlockchainConfigDto;
+import com.crm.rely.backend.core.dto.ucard.CardBlockchainRateConfigDto;
+import com.crm.rely.backend.core.entity.base.BaseDeleteEntities;
+import com.crm.rely.backend.core.entity.ucard.*;
+import com.crm.rely.backend.exception.ServiceException;
+import com.crm.ucard.service.UcardBlockchainService;
+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/blockchain/manager")
+public class ManagerUcardBlockchainController {
+
+    @Autowired
+    private UcardBlockchainService ucardBlockchainService;
+
+    /**
+     * 区块链配置列表
+     */
+    @PostMapping("/config/page")
+    @FeignClientAnnotation
+    ResultWithPagerDto<CardBlockchainConfigDto> getCardBlockchainConfigPageList(@RequestBody CardBlockchainConfigPageEntity entity) throws ServiceException{
+        return ucardBlockchainService.getCardBlockchainConfigPageList(entity);
+    }
+
+    /**
+     * 区块链下拉列表
+     */
+    @PostMapping("/dropdown")
+    @FeignClientAnnotation
+    BaseResultDto getCardBlockchainDropdown() throws ServiceException{
+        return ucardBlockchainService.getCardBlockchainDropdown();
+    }
+
+    /**
+     * 新增区块链配置
+     */
+    @PostMapping("/config/add")
+    @FeignClientAnnotation
+    BaseResultDto addCardBlockchainConfig(@RequestBody CardBlockchainConfigAddEntity entity) throws ServiceException{
+        return ucardBlockchainService.addCardBlockchainConfig(entity);
+    }
+
+    /**
+     * 修改区块链配置
+     */
+    @PostMapping("/config/update")
+    @FeignClientAnnotation
+    BaseResultDto updateCardBlockchainConfig(@RequestBody CardBlockchainConfigUpdateEntity entity) throws ServiceException{
+        return ucardBlockchainService.updateCardBlockchainConfig(entity);
+    }
+
+    /**
+     * 删除区块链配置
+     */
+    @PostMapping("/config/delete")
+    @FeignClientAnnotation
+    BaseResultDto deleteCardBlockchainConfig(@RequestBody BaseDeleteEntities entity) throws ServiceException{
+        return ucardBlockchainService.deleteCardBlockchainConfig(entity);
+    }
+
+    /**
+     * 区块链配置列表
+     */
+    @PostMapping("/rate/config/page")
+    @FeignClientAnnotation
+    ResultWithPagerDto<CardBlockchainRateConfigDto> getCardBlockchainRateConfigPageList(@RequestBody CardBlockchainRateConfigPageEntity entity) throws ServiceException{
+        return ucardBlockchainService.getCardBlockchainRateConfigPageList(entity);
+    }
+
+    /**
+     * 新增区块链配置
+     */
+    @PostMapping("/rate/config/add")
+    @FeignClientAnnotation
+    BaseResultDto addCardBlockchainRateConfig(@RequestBody CardBlockchainRateConfigAddEntity entity) throws ServiceException{
+        return ucardBlockchainService.addCardBlockchainRateConfig(entity);
+    }
+
+    /**
+     * 修改区块链配置
+     */
+    @PostMapping("/rate/config/update")
+    @FeignClientAnnotation
+    BaseResultDto updateCardBlockchainRateConfig(@RequestBody CardBlockchainRateConfigUpdateEntity entity) throws ServiceException{
+        return ucardBlockchainService.updateCardBlockchainRateConfig(entity);
+    }
+
+    /**
+     * 删除区块链配置
+     */
+    @PostMapping("/rate/config/delete")
+    @FeignClientAnnotation
+    BaseResultDto deleteCardBlockchainRateConfig(@RequestBody BaseDeleteEntities entity) throws ServiceException{
+        return ucardBlockchainService.deleteCardBlockchainRateConfig(entity);
+    }
+
+}

+ 81 - 0
ucard-cloud/src/main/java/com/crm/ucard/controller/ManagerUcardFileController.java

@@ -0,0 +1,81 @@
+package com.crm.ucard.controller;
+
+import com.crm.rely.backend.core.constant.FeignClientAnnotation;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ucard.CardFileDto;
+import com.crm.rely.backend.core.entity.base.BaseDeleteEntities;
+import com.crm.rely.backend.core.entity.ucard.CardFileAddEntity;
+import com.crm.rely.backend.core.entity.ucard.CardFilePageEntity;
+import com.crm.rely.backend.core.entity.ucard.CardFileUpdateEntity;
+import com.crm.rely.backend.exception.ServiceException;
+import com.crm.ucard.service.UcardFileService;
+import com.crm.ucard.service.WasabiDocumentApiService;
+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;
+
+/**
+ * 银行卡文件服务接口
+ */
+@Slf4j
+@RestController
+@RequestMapping("/ucard/file/manager")
+public class ManagerUcardFileController {
+
+
+    @Autowired
+    private WasabiDocumentApiService wasabiDocumentApiService;
+    @Autowired
+    private UcardFileService ucardFileService;
+
+    /**
+     * 校验文件
+     */
+    @PostMapping("/validated/file")
+    @FeignClientAnnotation
+    public void validatedFile(@RequestParam(value = "file") MultipartFile file) throws ServiceException {
+        wasabiDocumentApiService.validatedFile(file);
+    }
+
+
+    /**
+     * 添加文件记录
+     */
+    @PostMapping("/add")
+    @FeignClientAnnotation
+    public BaseResultDto cardVideoAdd(@RequestBody @Validated CardFileAddEntity entity) throws ServiceException {
+        return ucardFileService.cardFileAdd(entity);
+    }
+
+    /**
+     * 修改文件
+     */
+    @PostMapping("/update")
+    @FeignClientAnnotation
+    public BaseResultDto cardVideoUpdate(@RequestBody @Validated CardFileUpdateEntity entity) throws ServiceException {
+        return ucardFileService.cardFileUpdate(entity);
+    }
+
+    /**
+     * 删除文件
+     */
+    @PostMapping("/delete")
+    @FeignClientAnnotation
+    public BaseResultDto cardVideoDelete(@RequestBody BaseDeleteEntities entity) throws ServiceException {
+        return ucardFileService.cardFileDelete(entity);
+    }
+
+    /**
+     * 文件分页列表
+     */
+    @PostMapping("/search/list")
+    @FeignClientAnnotation
+    public ResultWithPagerDto<CardFileDto> cardFileSearchList(@RequestBody CardFilePageEntity entity) throws ServiceException {
+        return ucardFileService.cardFileSearchList(entity);
+    }
+
+
+}

+ 210 - 0
ucard-cloud/src/main/java/com/crm/ucard/controller/ManagerUcardGlobalController.java

@@ -0,0 +1,210 @@
+package com.crm.ucard.controller;
+
+import com.crm.rely.backend.core.constant.FeignClientAnnotation;
+import com.crm.rely.backend.core.dto.base.BaseReportResultDto;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ucard.GlobalOrderDto;
+import com.crm.rely.backend.core.dto.ucard.GlobalOrderSumDto;
+import com.crm.rely.backend.core.dto.wasabi.WasabiAvailableCurrenciesListDto;
+import com.crm.rely.backend.core.entity.base.BaseEntity;
+import com.crm.rely.backend.core.entity.ucard.*;
+import com.crm.rely.backend.core.entity.wasabi.WasabiTransactionSubmitRfiEntity;
+import com.crm.rely.backend.exception.ServiceException;
+import com.crm.ucard.service.GlobalService;
+import com.crm.ucard.service.UcardExportService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+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;
+
+import java.util.List;
+
+/**
+ * 银行卡服务接口
+ */
+@Slf4j
+@RestController
+@RequestMapping("/ucard/global/manager")
+public class ManagerUcardGlobalController {
+
+    @Autowired
+    private GlobalService globalService;
+    @Autowired
+    private UcardExportService ucardExportService;
+
+    /**
+     * 速汇订单导出
+     */
+    @PostMapping("/order/list/export")
+    @FeignClientAnnotation
+    public BaseResultDto<List<GlobalOrderDto>> globalOrderListExport(@RequestBody GlobalOrderPageEntity entity) throws ServiceException {
+        return ucardExportService.globalOrderListExport(entity);
+    }
+
+    /**
+     * 同步币种信息
+     */
+    @PostMapping("/currencies/save")
+    @FeignClientAnnotation
+    public BaseResultDto saveAvailableCurrencies() throws Exception {
+        return globalService.saveCurrencies();
+    }
+
+    /**
+     * 币种分页列表
+     */
+    @PostMapping("/currencies/list")
+    @FeignClientAnnotation
+    ResultWithPagerDto<WasabiAvailableCurrenciesListDto> getCurrenciesPageList(@RequestBody GlobalCurrenciesPageListEntity entity) throws ServiceException {
+        return globalService.getCurrenciesPageList(entity);
+    }
+
+    /**
+     * 支持的币种下拉列表
+     */
+    @PostMapping("/currencies/dropdown")
+    @FeignClientAnnotation
+    public BaseResultDto getCurrenciesDropdown(@RequestBody GlobalCurrenciesDropdownEntity entity) throws ServiceException {
+        return globalService.getCurrenciesDropdown(entity);
+    }
+
+    /**
+     * 币种字段和可选值列表
+     */
+    @PostMapping("/currencies/field/list")
+    @FeignClientAnnotation
+    public BaseResultDto getCurrenciesFieldList(@RequestBody @Validated GlobalCurrenciesFieldListEntity entity) throws ServiceException {
+        return globalService.getCurrenciesFieldList(entity);
+    }
+
+    /**
+     * 币种所有字段名称
+     */
+    @PostMapping("/field/params")
+    @FeignClientAnnotation
+    public BaseResultDto getGlobalFieldParams() throws ServiceException {
+        return globalService.getGlobalFieldParams();
+    }
+
+    /**
+     * 创建交易订单
+     */
+    @PostMapping("/create/order")
+    @FeignClientAnnotation
+    public BaseResultDto globalCreateOrder(@RequestBody GlobalCreateOrderEntity entity) throws Exception {
+        return globalService.globalCreateOrder(entity);
+    }
+
+    /**
+     * 取消交易订单
+     */
+    @PostMapping("/cancel/order")
+    @FeignClientAnnotation
+    public BaseResultDto globalCancelOrder(@RequestBody GlobalCancelOrderEntity entity) throws Exception {
+        return globalService.globalCancelOrder(entity);
+    }
+
+    /**
+     * 币种配置更改
+     */
+    @PostMapping("/currencies/config")
+    @FeignClientAnnotation
+    public BaseResultDto globalCurrenciesConfig(@RequestBody GlobalCurrenciesConfigEntity entity) throws ServiceException {
+        return globalService.globalCurrenciesConfig(entity);
+    }
+
+    /**
+     * 查询汇率和手续费率
+     */
+    @PostMapping("/query/exchange/rate")
+    @FeignClientAnnotation
+    public BaseResultDto queryExchangeRate(@RequestBody GlobalQueryExchangeRateEntity entity) throws Exception {
+        return BaseResultDto.success(globalService.queryExchangeRate(entity));
+    }
+
+    /**
+     * 查询最新汇率
+     */
+    @PostMapping("/query/latest/exchange/rate")
+    @FeignClientAnnotation
+    public BaseResultDto getExchangeRateByCurrency(@RequestBody GlobalQueryExchangeRateEntity entity) throws Exception {
+        return BaseResultDto.success(globalService.getExchangeRateByCurrency(entity.getPayoutCurrency(), entity.getTransferTypeId(), entity.getPayoutMethodId()));
+    }
+
+    /**
+     * 查询支持的城市列表
+     */
+    @PostMapping("/query/bank/cities")
+    @FeignClientAnnotation
+    public BaseResultDto queryBankCities(@RequestBody CardBankCitiesEntity entity) throws ServiceException {
+        return globalService.queryBankCities(entity);
+    }
+
+    /**
+     * 查询币种全局配置
+     */
+    @PostMapping("/query/currencies/config")
+    @FeignClientAnnotation
+    public BaseResultDto getCurrenciesGlobalConfig() throws ServiceException {
+        return globalService.getCurrenciesGlobalConfig();
+    }
+
+    /**
+     * 速汇订单分页列表
+     */
+    @PostMapping("/order/page/list")
+    @FeignClientAnnotation
+    public BaseReportResultDto<List<GlobalOrderDto>, GlobalOrderSumDto> globalOrderPageList(@RequestBody GlobalOrderPageEntity entity) throws Exception {
+        return globalService.globalOrderPageList(entity);
+    }
+
+    /**
+     * 补充资料
+     */
+    @PostMapping("/supplementary/data")
+    @FeignClientAnnotation
+    public BaseResultDto supplementaryData(@RequestBody WasabiTransactionSubmitRfiEntity entity) throws Exception {
+        return globalService.supplementaryData(entity);
+    }
+
+    /**
+     * 速汇订单审批
+     */
+    @PostMapping("/order/approve")
+    @FeignClientAnnotation
+    public BaseResultDto globalOrderApprove(@RequestBody GlobalOrderApproveEntity entity) throws Exception {
+        return globalService.globalOrderApprove(entity);
+    }
+
+    /**
+     * 查询速汇订单详情
+     */
+    @PostMapping("/order/details")
+    @FeignClientAnnotation
+    public BaseResultDto queryGlobalOrderDetails(@RequestBody BaseEntity entity) throws ServiceException {
+        return globalService.queryGlobalOrderDetails(entity);
+    }
+
+    /**
+     * 获取收款用户列表
+     */
+    @PostMapping("/receiver/user/list")
+    @FeignClientAnnotation
+    BaseResultDto getGlobalReceiverUserList(@RequestBody GlobalReceiverUserEntity entity) throws ServiceException {
+        return globalService.getGlobalReceiverUserList(entity);
+    }
+
+    /**
+     * 删除收款用户
+     */
+    @PostMapping("/receiver/user/delete")
+    @FeignClientAnnotation
+    BaseResultDto deleteGlobalReceiverUser(@RequestBody BaseEntity entity) throws ServiceException{
+        return globalService.deleteGlobalReceiverUser(entity);
+    }
+
+}

+ 82 - 0
ucard-cloud/src/main/java/com/crm/ucard/controller/ManagerUcardIdTypeController.java

@@ -0,0 +1,82 @@
+package com.crm.ucard.controller;
+
+import com.crm.rely.backend.core.constant.FeignClientAnnotation;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ucard.CardIdTypeConfigDto;
+import com.crm.rely.backend.core.entity.base.BaseDeleteEntities;
+import com.crm.rely.backend.core.entity.ucard.CardIdTypeConfigAddEntity;
+import com.crm.rely.backend.core.entity.ucard.CardIdTypeConfigPageEntity;
+import com.crm.rely.backend.core.entity.ucard.CardIdTypeConfigUpdateEntity;
+import com.crm.rely.backend.exception.ServiceException;
+import com.crm.ucard.service.UcardTypeConfigService;
+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;
+
+import java.util.List;
+
+/**
+ * 银行卡服务接口
+ */
+@Slf4j
+@RestController
+@RequestMapping("/ucard/id/type/config/manager")
+public class ManagerUcardIdTypeController {
+
+    @Autowired
+    private UcardTypeConfigService ucardTypeConfigService;
+
+    /**
+     * 证件类型配置列表
+     *
+     * @param entity
+     * @return
+     */
+    @PostMapping("/list")
+    @FeignClientAnnotation
+    public ResultWithPagerDto<CardIdTypeConfigDto> getCardIdTypeConfigList(@RequestBody CardIdTypeConfigPageEntity entity) throws ServiceException {
+        return ucardTypeConfigService.getCardIdTypeConfigList(entity);
+    }
+
+    /**
+     * 批量新增证件类型配置
+     *
+     * @param entitys
+     * @return
+     */
+    @PostMapping("/add")
+    @FeignClientAnnotation
+    public BaseResultDto batchAddCardIdTypeConfig(@RequestBody List<CardIdTypeConfigAddEntity> entitys) throws ServiceException {
+        return ucardTypeConfigService.batchAddCardIdTypeConfig(entitys);
+    }
+
+    /**
+     * 修改证件类型配置
+     *
+     * @param entity
+     * @return
+     */
+    @PostMapping("/update")
+    @FeignClientAnnotation
+    public BaseResultDto updateCardIdTypeConfig(@RequestBody CardIdTypeConfigUpdateEntity entity) throws ServiceException {
+        return ucardTypeConfigService.updateCardIdTypeConfig(entity);
+    }
+
+    /**
+     * 删除证件类型配置
+     *
+     * @param entity
+     * @return
+     */
+    @PostMapping("/delete")
+    @FeignClientAnnotation
+    public BaseResultDto deleteCardIdTypeConfig(@RequestBody BaseDeleteEntities entity) throws ServiceException {
+        return ucardTypeConfigService.deleteCardIdTypeConfig(entity);
+    }
+
+
+}

+ 89 - 0
ucard-cloud/src/main/java/com/crm/ucard/controller/ManagerUcardNumberController.java

@@ -0,0 +1,89 @@
+package com.crm.ucard.controller;
+
+import com.crm.rely.backend.core.constant.FeignClientAnnotation;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ucard.CardNumberDto;
+import com.crm.rely.backend.core.entity.base.BaseDeleteEntities;
+import com.crm.rely.backend.core.entity.ucard.CardNumberAddEntity;
+import com.crm.rely.backend.core.entity.ucard.CardNumberPageEntity;
+import com.crm.rely.backend.core.entity.ucard.CardNumberUpdateEntity;
+import com.crm.rely.backend.core.entity.ucard.CardNumberVerifyEntity;
+import com.crm.rely.backend.exception.ServiceException;
+import com.crm.ucard.service.UcardNumberService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+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;
+
+import java.util.List;
+
+/**
+ * 银行卡服务接口
+ */
+@Slf4j
+@RestController
+@RequestMapping("/ucard/number/manager")
+public class ManagerUcardNumberController {
+
+    @Autowired
+    private UcardNumberService ucardNumberService;
+
+    /**
+     * 校验实体卡卡号是否使用过
+     */
+    @PostMapping("/verify")
+    @FeignClientAnnotation
+    public BaseResultDto cardNumberVerify(@RequestBody @Validated CardNumberVerifyEntity entity) throws ServiceException {
+        return ucardNumberService.cardNumberVerify(entity);
+    }
+
+    /**
+     * 导入卡号
+     */
+    @PostMapping("/import")
+    @FeignClientAnnotation
+    BaseResultDto cardNumberImport(@RequestBody List<CardNumberAddEntity> entityList) throws ServiceException {
+        return ucardNumberService.cardNumberImport(entityList);
+    }
+
+    /**
+     * 卡号列表
+     */
+    @PostMapping("/list")
+    @FeignClientAnnotation
+    ResultWithPagerDto<CardNumberDto> queryCardNumberList(@RequestBody CardNumberPageEntity entity) throws ServiceException {
+        return ucardNumberService.queryCardNumberList(entity);
+    }
+
+    /**
+     * 卡号列表
+     */
+    @PostMapping("/dropdown")
+    @FeignClientAnnotation
+    BaseResultDto queryCardNumberDropdown(@RequestBody CardNumberPageEntity entity) throws ServiceException {
+        return ucardNumberService.queryCardNumberDropdown(entity);
+    }
+
+    /**
+     * 修改卡号状态
+     */
+    @PostMapping("/update/status")
+    @FeignClientAnnotation
+    BaseResultDto saveCardNumberStatus(@RequestBody CardNumberUpdateEntity entity) throws ServiceException {
+        return ucardNumberService.saveCardNumberStatus(entity);
+    }
+
+    /**
+     * 删除实体卡卡号
+     */
+    @PostMapping("/delete")
+    @FeignClientAnnotation
+    public BaseResultDto deleteCardNumber(@RequestBody BaseDeleteEntities entity) throws ServiceException {
+        return ucardNumberService.deleteCardNumber(entity);
+    }
+
+}

+ 52 - 0
ucard-cloud/src/main/java/com/crm/ucard/controller/ManagerUcardOperateController.java

@@ -0,0 +1,52 @@
+package com.crm.ucard.controller;
+
+import com.crm.rely.backend.core.constant.FeignClientAnnotation;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ucard.CardOperateDto;
+import com.crm.rely.backend.core.entity.ucard.CardOperatePageEntity;
+import com.crm.rely.backend.exception.ServiceException;
+import com.crm.ucard.service.UcardCardService;
+import com.crm.ucard.service.UcardExportService;
+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;
+
+import java.util.List;
+
+/**
+ * 银行卡服务接口
+ */
+@Slf4j
+@RestController
+@RequestMapping("/ucard/operate/manager")
+public class ManagerUcardOperateController {
+
+    @Autowired
+    private UcardCardService ucardCardService;
+    @Autowired
+    private UcardExportService ucardExportService;
+
+    /**
+     * 操作记录分页列表
+     */
+    @PostMapping("/page")
+    @FeignClientAnnotation
+    public ResultWithPagerDto<CardOperateDto> queryOperatePageList(@RequestBody CardOperatePageEntity entity) throws ServiceException {
+        return ucardCardService.queryOperatePageList(entity);
+    }
+
+    /**
+     * 操作记录列表导出
+     */
+    @PostMapping("/record/export")
+    @FeignClientAnnotation
+    public BaseResultDto<List<CardOperateDto>> cardOperateRecordExport(@RequestBody CardOperatePageEntity entity) throws ServiceException {
+        return ucardExportService.cardOperateRecordExport(entity);
+    }
+
+
+}

+ 67 - 0
ucard-cloud/src/main/java/com/crm/ucard/controller/ManagerUcardPermissionController.java

@@ -0,0 +1,67 @@
+package com.crm.ucard.controller;
+
+import com.crm.rely.backend.core.constant.FeignClientAnnotation;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ucard.CardPermissionDto;
+import com.crm.rely.backend.core.entity.ucard.CardPermissionAddEntity;
+import com.crm.rely.backend.core.entity.ucard.CardPermissionDeleteEntity;
+import com.crm.rely.backend.core.entity.ucard.CardPermissionPageEntity;
+import com.crm.rely.backend.core.entity.ucard.CardPermissionUpdateEntity;
+import com.crm.rely.backend.exception.ServiceException;
+import com.crm.ucard.service.UcardPermissionService;
+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/permission/manager")
+public class ManagerUcardPermissionController {
+
+    @Autowired
+    private UcardPermissionService ucardPermissionService;
+
+    /**
+     * 卡权限分页列表
+     */
+    @PostMapping("/page")
+    @FeignClientAnnotation
+    public ResultWithPagerDto<CardPermissionDto> queryPermissionPageList(@RequestBody CardPermissionPageEntity entity) throws ServiceException {
+        return ucardPermissionService.queryPermissionPageList(entity);
+    }
+
+    /**
+     * 新增卡权限
+     */
+    @PostMapping("/add")
+    @FeignClientAnnotation
+    public BaseResultDto permissionAdd(@RequestBody CardPermissionAddEntity entity) throws ServiceException {
+        return ucardPermissionService.addPermission(entity);
+    }
+
+    /**
+     * 更新卡权限
+     */
+    @PostMapping("/update")
+    @FeignClientAnnotation
+    public BaseResultDto permissionAdd(@RequestBody CardPermissionUpdateEntity entity) throws ServiceException {
+        return ucardPermissionService.updatePermission(entity);
+    }
+
+    /**
+     * 删除卡权限
+     */
+    @PostMapping("/delete")
+    @FeignClientAnnotation
+    public BaseResultDto permissionDelete(@RequestBody CardPermissionDeleteEntity entity) throws ServiceException {
+        return ucardPermissionService.deletePermission(entity);
+    }
+
+}

+ 47 - 0
ucard-cloud/src/main/java/com/crm/ucard/controller/ManagerUcardWalletAddressController.java

@@ -0,0 +1,47 @@
+package com.crm.ucard.controller;
+
+import com.crm.rely.backend.core.constant.FeignClientAnnotation;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ucard.vaultody.VaultodyDepositAddressDto;
+import com.crm.rely.backend.core.entity.ucard.vaultody.VaultodyDepositAddressPageEntity;
+import com.crm.rely.backend.core.entity.ucard.vaultody.VaultodyResetDepositAddressEntity;
+import com.crm.rely.backend.exception.ServiceException;
+import com.crm.ucard.service.VaultodyService;
+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/address/manager")
+public class ManagerUcardWalletAddressController {
+
+    @Autowired
+    private VaultodyService vaultodyService;
+
+    /**
+     * 钱包地址分页列表
+     */
+    @PostMapping("/page")
+    @FeignClientAnnotation
+    ResultWithPagerDto<VaultodyDepositAddressDto> getDepositAddressPage(@RequestBody VaultodyDepositAddressPageEntity entity) throws ServiceException{
+        return vaultodyService.getDepositAddressPage(entity);
+    }
+
+    /**
+     * 重置钱包地址
+     */
+    @PostMapping("/reset")
+    @FeignClientAnnotation
+    BaseResultDto resetDepositAddress(@RequestBody VaultodyResetDepositAddressEntity entity) throws ServiceException{
+        return vaultodyService.resetDepositAddress(entity);
+    }
+
+}

+ 57 - 0
ucard-cloud/src/main/java/com/crm/ucard/controller/ManagerUcardWalletWithdrawController.java

@@ -0,0 +1,57 @@
+package com.crm.ucard.controller;
+
+import com.crm.rely.backend.core.constant.FeignClientAnnotation;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ucard.UcardWalletWithdrawDto;
+import com.crm.rely.backend.core.entity.ucard.CardWalletWithdrawApproveEntity;
+import com.crm.rely.backend.core.entity.ucard.UcardWalletWithdrawPageEntity;
+import com.crm.rely.backend.core.entity.ucard.WalletWithdrawApplyEntity;
+import com.crm.rely.backend.exception.ServiceException;
+import com.crm.ucard.service.VaultodyService;
+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/withdraw/manager")
+public class ManagerUcardWalletWithdrawController {
+
+    @Autowired
+    private VaultodyService vaultodyService;
+
+    /**
+     * 钱包提款分页列表
+     */
+    @PostMapping("/page")
+    @FeignClientAnnotation
+    ResultWithPagerDto<UcardWalletWithdrawDto> getWalletWithdrawPage(@RequestBody UcardWalletWithdrawPageEntity entity) throws ServiceException{
+        return vaultodyService.getWalletWithdrawPage(entity);
+    }
+
+    /**
+     * 钱包提款申请
+     */
+    @PostMapping("/apply")
+    @FeignClientAnnotation
+    BaseResultDto walletWithdrawApply(@RequestBody WalletWithdrawApplyEntity entity) throws Exception{
+        return vaultodyService.walletWithdrawApply(entity);
+    }
+
+    /**
+     * 钱包提款审核
+     */
+    @PostMapping("/approve")
+    @FeignClientAnnotation
+    BaseResultDto walletWithdrawApprove(@RequestBody CardWalletWithdrawApproveEntity entity) throws Exception{
+        return vaultodyService.walletWithdrawApprove(entity);
+    }
+
+}

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

@@ -1,7 +1,7 @@
 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.rely.backend.core.entity.country.SysCountryEntity;
 import com.crm.ucard.service.SysCountryFeignService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PostMapping;

+ 9 - 5
ucard-cloud/src/main/java/com/crm/ucard/controller/UcardApiController.java

@@ -1,13 +1,17 @@
 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.base.BaseReportResultDto;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
 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 com.crm.ucard.service.UcardApiService;
+import com.crm.ucard.service.UcardCardService;
+import com.crm.ucard.service.UcardService;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
@@ -25,7 +29,7 @@ public class UcardApiController {
     @Autowired
     private UcardService ucardService;
     @Autowired
-    private WasabiCardService wasabiCardService;
+    private UcardCardService ucardCardService;
 
     /**
      * 获取卡片类型列表
@@ -40,9 +44,9 @@ public class UcardApiController {
      * 获取卡片类型
      */
     @PostMapping("/card/types/list")
-    public BaseResultDto getCardTypeList(@RequestBody CardTypeEntity entity, InfoEntity infoEntity) throws ServiceException {
+    public BaseResultDto getCardTypeList(@RequestBody CardTypeEntity entity, InfoEntity infoEntity) throws Exception {
         entity.setCId(infoEntity.getCustomInfo().getCId());
-        return BaseResultDto.success(wasabiCardService.getCardTypeList(entity));
+        return BaseResultDto.success(ucardCardService.getCardTypeList(entity));
     }
 
     /**

+ 3 - 4
ucard-cloud/src/main/java/com/crm/ucard/controller/UcardController.java

@@ -2,12 +2,13 @@ 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.base.BaseReportResultDto;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
 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;
@@ -26,8 +27,6 @@ public class UcardController {
 
     @Autowired
     private UcardService ucardService;
-    @Autowired
-    private WasabiCardService wasabiCardService;
 
     /**
      * 获取卡片类型列表

+ 14 - 3
ucard-cloud/src/main/java/com/crm/ucard/controller/VaultodyApiController.java

@@ -1,11 +1,15 @@
 package com.crm.ucard.controller;
 
+import com.crm.rely.backend.core.constant.Constants;
 import com.crm.rely.backend.core.dto.base.BaseResultDto;
-import com.crm.rely.backend.core.entity.ucard.crypto.currency.vaultody.*;
+import com.crm.rely.backend.core.entity.ucard.vaultody.VaultodyGenerateDepositAddressEntity;
 import com.crm.ucard.service.VaultodyService;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
+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
@@ -22,7 +26,14 @@ public class VaultodyApiController {
      */
     @PostMapping("/generate/deposit/address")
     public BaseResultDto generateDepositAddress(@RequestBody VaultodyGenerateDepositAddressEntity entity) throws Exception {
-        return vaultodyService.generateDepositAddress(entity);
+        String address = vaultodyService.generateDepositAddress(entity);
+        try {
+            vaultodyService.linkAddress(entity.getBlockchain(), address);
+        } catch (Exception e){
+            log.error("链接钱包地址失败", e);
+        }
+
+        return BaseResultDto.success(Constants.SUCCESS,address);
     }
 
 }

+ 37 - 0
ucard-cloud/src/main/java/com/crm/ucard/controller/VaultodyNotifyController.java

@@ -0,0 +1,37 @@
+package com.crm.ucard.controller;
+
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.ucard.service.VaultodyService;
+import com.google.common.base.Strings;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+@Slf4j
+@RestController
+@RequestMapping("/vaultody")
+public class VaultodyNotifyController {
+
+    @Autowired
+    private VaultodyService vaultodyService;
+
+    @PostMapping("/callback")
+    public BaseResultDto notify(@RequestBody String content, @RequestHeader("x-signature") String signature) throws Exception {
+        try {
+
+            log.info("Vaultody回调通知开始:{},signature:{}", content, signature);
+
+            if (Strings.isNullOrEmpty(content) || Strings.isNullOrEmpty(signature)) {
+                log.error("Vaultody回调通知处理失败,数据为空,content:{},signature:{}", content, signature);
+                return BaseResultDto.error();
+            }
+            vaultodyService.notify(content, signature);
+            log.info("crypto回调通知结束");
+            return BaseResultDto.success();
+        } catch (Exception e) {
+            log.error("crypto回调通知处理失败", e);
+            return BaseResultDto.error();
+        }
+    }
+
+}

+ 162 - 77
ucard-cloud/src/main/java/com/crm/ucard/controller/WasabiCardApiController.java

@@ -1,16 +1,23 @@
 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.base.BaseReportResultDto;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
 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.system.reasons.refusal.SysReasonsRefusalSearchDto;
 import com.crm.rely.backend.core.dto.ucard.*;
-import com.crm.rely.backend.core.dto.wasabi.*;
+import com.crm.rely.backend.core.dto.wasabi.WasabiActiveCardDto;
+import com.crm.rely.backend.core.dto.wasabi.WasabiBalanceInfoDto;
+import com.crm.rely.backend.core.dto.wasabi.WasabiOccupationsDto;
+import com.crm.rely.backend.core.dto.wasabi.WasabiUpdatePinDto;
 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.system.reasons.refusal.SysReasonsRefusalSearchEntity;
 import com.crm.rely.backend.core.entity.ucard.*;
 import com.crm.rely.backend.core.entity.wasabi.*;
 import com.crm.rely.backend.exception.ServiceException;
@@ -27,6 +34,7 @@ import org.springframework.web.multipart.MultipartFile;
 import javax.servlet.http.HttpServletRequest;
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
 
 @Slf4j
 @RestController
@@ -34,34 +42,56 @@ import java.util.List;
 public class WasabiCardApiController {
 
     @Autowired
-    private UcardApiService ucardApiService;
-    @Autowired
-    private UcardService ucardService;
-
-    @Autowired
-    private WasabiCardService wasabiCardService;
-
+    private UcardCardService ucardCardService;
     @Autowired
     private CustomInfoService customInfoService;
     @Autowired
     private AccountInfoFeignService accountInfoFeignService;
+    @Autowired
+    private WasabiDocumentApiService wasabiDocumentApiService;
+    @Autowired
+    private UcardPermissionService ucardPermissionService;
+    @Autowired
+    private KycService kycService;
+    @Autowired
+    private UcardFileService ucardFileService;
+    @Autowired
+    private UcardTypeConfigService ucardTypeConfigService;
+    @Autowired
+    private UcardEmailService ucardEmailService;
+    @Autowired
+    private GlobalService globalService;
+    @Autowired
+    private UcardBlockchainService ucardBlockchainService;
+    @Autowired
+    private VaultodyService vaultodyService;
+    @Autowired
+    private SysReasonsRefusalService sysReasonsRefusalService;
+    @Autowired
+    private UcardAppVersionService ucardAppVersionService;
+    @Autowired
+    private UcardAppCommonProblemService ucardAppCommonProblemService;
+    @Autowired
+    private UcardAppPrivacyPolicyService ucardAppPrivacyPolicyService;
+    @Autowired
+    private UcardAppCommonProblemTypeService ucardAppCommonProblemTypeService;
 
     /**
      * 获取卡片类型列表
      */
     @PostMapping("/card/types/page")
-    public ResultWithPagerDto<CardTypeDto> getCardTypePageList(@RequestBody CardTypePageEntity entity) throws ServiceException {
+    public ResultWithPagerDto<CardTypeDto> getCardTypePageList(@RequestBody CardTypePageEntity entity) throws Exception {
         entity.setEnableStatus(1);
-        return ucardService.getCardTypePageList(entity);
+        return ucardCardService.getCardTypePageList(entity);
     }
 
     /**
      * 获取卡片类型
      */
     @PostMapping("/card/types/list")
-    public BaseResultDto getCardTypeList(@RequestBody CardTypeEntity entity, InfoEntity infoEntity) throws ServiceException {
+    public BaseResultDto getCardTypeList(@RequestBody CardTypeEntity entity, InfoEntity infoEntity) throws Exception {
         entity.setCId(infoEntity.getCustomInfo().getCId());
-        return BaseResultDto.success(wasabiCardService.getCardTypeList(entity));
+        return BaseResultDto.success(ucardCardService.getCardTypeList(entity));
     }
 
     /**
@@ -72,7 +102,7 @@ public class WasabiCardApiController {
      */
     @PostMapping("/getWebsdkLink")
     public BaseResultDto getWebsdkLink(@RequestBody WebsdkLinkAliEntity entity, InfoEntity infoEntity) throws Exception {
-        return wasabiCardService.getWebsdkLink(entity, infoEntity.getCustomInfo().getId());
+        return kycService.getWebsdkLink(entity, infoEntity.getCustomInfo().getId());
     }
 
     /**
@@ -86,7 +116,7 @@ public class WasabiCardApiController {
         request.setCustomId(entity.getCustomInfo().getId());
         request.setCId(entity.getCustomInfo().getCId());
         request.setOperateUser(entity.getCustomInfo().getCId());
-        return wasabiCardService.registerMerchantUser(request);
+        return ucardCardService.registerMerchantUser(request);
     }
 
     /**
@@ -98,7 +128,7 @@ public class WasabiCardApiController {
         request.setCustomId(entity.getCustomInfo().getId());
         request.setCId(entity.getCustomInfo().getCId());
         request.setOperateUser(entity.getCustomInfo().getCId());
-        return wasabiCardService.updateMerchantUser(request);
+        return ucardCardService.updateMerchantUser(request);
     }
 
 
@@ -107,7 +137,7 @@ public class WasabiCardApiController {
      */
     @PostMapping("/merchant/user/address/update")
     public BaseResultDto updateUserMailingAddress(@RequestBody WasabiSaveUserMailingAddressEntity request) throws ServiceException {
-        return wasabiCardService.updateUserMailingAddress(request);
+        return ucardCardService.updateUserMailingAddress(request);
     }
 
     /**
@@ -123,7 +153,7 @@ public class WasabiCardApiController {
      */
     @PostMapping("/merchant/user/single")
     public BaseResultDto merchantUserSingle(InfoEntity infoEntity) throws Exception {
-        return wasabiCardService.merchantUserSingle(infoEntity.getCustomInfo().getId());
+        return ucardCardService.merchantUserSingle(infoEntity.getCustomInfo().getId());
     }
 
     /**
@@ -131,7 +161,7 @@ public class WasabiCardApiController {
      */
     @PostMapping("/merchant/kyc/page")
     ResultWithPagerDto<CardKycStatusDto> getKycPageList(@RequestBody CardKycStatusPageEntity entity) throws ServiceException {
-        return ucardService.getKycPageList(entity);
+        return kycService.getKycPageList(entity);
     }
 
     /**
@@ -140,7 +170,7 @@ public class WasabiCardApiController {
     @PostMapping("/card/apply")
     public BaseResultDto applyCard(@RequestBody CardApplyEntity request, InfoEntity infoEntity) throws Exception {
         request.setCId(infoEntity.getCustomInfo().getId());
-        return wasabiCardService.applyCard(request);
+        return ucardCardService.applyCard(request);
     }
 
     /**
@@ -148,7 +178,7 @@ public class WasabiCardApiController {
      */
     @PostMapping("/card/apply/progress")
     public BaseResultDto queryApplyProgress(@RequestBody CardApplyProgressEntity request) throws Exception {
-        return wasabiCardService.queryApplyProgress(request);
+        return ucardCardService.queryApplyProgress(request);
     }
 
     /**
@@ -156,7 +186,7 @@ public class WasabiCardApiController {
      */
     @PostMapping("/card/apply/page")
     public ResultWithPagerDto<CardApplyDto> getCardApplyPageList(@RequestBody CardApplyPageEntity entity) throws ServiceException {
-        return ucardService.getCardApplyPageList(entity);
+        return ucardCardService.getCardApplyPageList(entity);
     }
 
     /**
@@ -164,7 +194,7 @@ public class WasabiCardApiController {
      */
     @PostMapping("/card/apply/details")
     public BaseResultDto cardApplyDetails(@RequestBody BaseEntity entity) throws ServiceException {
-        return wasabiCardService.cardApplyDetails(entity);
+        return ucardCardService.cardApplyDetails(entity);
     }
 
     /**
@@ -173,7 +203,7 @@ public class WasabiCardApiController {
     @PostMapping("/card/list")
     public BaseResultDto getCardList(@RequestBody CardPageEntity entity, InfoEntity infoEntity) throws ServiceException {
         entity.setCId(infoEntity.getCustomInfo().getCId());
-        return BaseResultDto.success(ucardApiService.getCardList(entity));
+        return BaseResultDto.success(ucardCardService.getCardList(entity));
     }
 
     /**
@@ -181,7 +211,7 @@ public class WasabiCardApiController {
      */
     @PostMapping("/card/single")
     public BaseResultDto getCardSingle(@RequestBody SingleLongEntity entity) throws ServiceException {
-        return BaseResultDto.success(ucardApiService.getCardSingle(entity));
+        return BaseResultDto.success(ucardCardService.getCardSingle(entity));
     }
 
     /**
@@ -189,18 +219,18 @@ public class WasabiCardApiController {
      */
     @PostMapping("/card/activate")
     public BaseResultDto<WasabiActiveCardDto> activateCard(@RequestBody WasabiActiveCardEntity request,
-                                                           InfoEntity infoEntity) throws ServiceException {
+                                                           InfoEntity infoEntity) throws Exception {
         request.setCId(infoEntity.getCustomInfo().getCId());
-        return wasabiCardService.activeCard(request);
+        return ucardCardService.activeCard(request);
     }
 
     /**
      * 银行卡充值
      */
     @PostMapping("/card/recharge")
-    public BaseResultDto rechargeCard(@RequestBody WasabiBalanceEntity request, InfoEntity infoEntity) throws ServiceException {
+    public BaseResultDto rechargeCard(@RequestBody WasabiBalanceEntity request, InfoEntity infoEntity) throws Exception {
         request.setCId(infoEntity.getCustomInfo().getCId());
-        return wasabiCardService.cardDeposit(request);
+        return ucardCardService.cardDeposit(request);
     }
 
     /**
@@ -210,7 +240,7 @@ public class WasabiCardApiController {
     public BaseResultDto<WalletBalanceDto> walletBalance(@RequestBody WalletBalanceEntity request,
                                                          InfoEntity infoEntity) throws ServiceException {
         request.setCId(infoEntity.getCustomInfo().getCId());
-        return wasabiCardService.walletBalance(request);
+        return ucardCardService.walletBalance(request);
     }
 
     /**
@@ -219,7 +249,7 @@ public class WasabiCardApiController {
     @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);
+        return ucardCardService.getCardWalletRecordPageList(entity);
     }
 
     /**
@@ -227,7 +257,7 @@ public class WasabiCardApiController {
      */
     @PostMapping("/card/recharge/page")
     public BaseReportResultDto<List<CardRechargeOrderDto>, CardRechargeOrderSumDto> queryRechargePageList(@RequestBody CardRechargePageEntity request) throws ServiceException {
-        return ucardService.queryRechargePageList(request);
+        return ucardCardService.queryRechargePageList(request);
     }
 
     /**
@@ -235,7 +265,7 @@ public class WasabiCardApiController {
      */
     @PostMapping("/card/balance")
     public BaseResultDto<WasabiBalanceInfoDto> queryCardBalance(@RequestBody WasabiBalanceInfoEntity request) throws ServiceException {
-        return wasabiCardService.getBalanceInfo(request);
+        return ucardCardService.getBalanceInfo(request);
     }
 
     /**
@@ -243,7 +273,7 @@ public class WasabiCardApiController {
      */
     @PostMapping("/card/recharge/order")
     public BaseResultDto queryRechargeOrder(@RequestBody CardRechargeOrderQueryEntity request) throws Exception {
-        return wasabiCardService.queryDepositOrder(request);
+        return ucardCardService.queryDepositOrder(request);
     }
 
     /**
@@ -251,9 +281,9 @@ public class WasabiCardApiController {
      */
     @PostMapping("/card/password/reset")
     public BaseResultDto<WasabiUpdatePinDto> resetPassword(@RequestBody WasabiUpdatePinEntity entity,
-                                                           InfoEntity infoEntity) throws ServiceException {
+                                                           InfoEntity infoEntity) throws Exception {
         entity.setCId(infoEntity.getCustomInfo().getCId());
-        return wasabiCardService.updatePin(entity);
+        return ucardCardService.updatePin(entity);
     }
 
     /**
@@ -262,7 +292,7 @@ public class WasabiCardApiController {
     @PostMapping("/card/freeze")
     public BaseResultDto freezeCard(@RequestBody WasabiFreezeAndUnfreezeEntity request, InfoEntity infoEntity) throws Exception {
         request.setCId(infoEntity.getCustomInfo().getCId());
-        return wasabiCardService.cardFreeze(request);
+        return ucardCardService.cardFreeze(request);
     }
 
     /**
@@ -271,7 +301,7 @@ public class WasabiCardApiController {
     @PostMapping("/card/unfreeze")
     public BaseResultDto unfreezeCard(@RequestBody WasabiFreezeAndUnfreezeEntity request, InfoEntity infoEntity) throws Exception {
         request.setCId(infoEntity.getCustomInfo().getCId());
-        return wasabiCardService.cardUnfreeze(request);
+        return ucardCardService.cardUnfreeze(request);
     }
 
     /**
@@ -279,7 +309,7 @@ public class WasabiCardApiController {
      */
     @PostMapping("/card/transac/page")
     public ResultWithPagerDto<CardTransacOrderDto> getTransactionPageList(@RequestBody CardTransacOrderPageEntity request) throws ServiceException {
-        return ucardService.getTransacOrderPageList(request);
+        return ucardCardService.getTransacOrderPageList(request);
     }
 
     /**
@@ -287,7 +317,7 @@ public class WasabiCardApiController {
      */
     @PostMapping("/card/transac/single")
     public BaseResultDto getTransactionSingle(@RequestBody SingleLongEntity entity) throws ServiceException {
-        return BaseResultDto.success(ucardApiService.getTransactionSingle(entity));
+        return BaseResultDto.success(ucardCardService.getTransactionSingle(entity));
     }
 
     /**
@@ -296,8 +326,8 @@ public class WasabiCardApiController {
     @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);
+        wasabiDocumentApiService.validatedFile(file);
+        String path = ucardFileService.commonUpload(file, middlePath);
         return BaseResultDto.success(Constants.UPLOAD_SUCCESS, path);
     }
 
@@ -307,7 +337,7 @@ public class WasabiCardApiController {
     @PostMapping("/card/country")
     public BaseResultDto getCardCountry(@RequestBody CardCountryEntity request) throws ServiceException {
         request.setCardCategory(2);
-        return BaseResultDto.success(ucardService.getCardCountryList(request));
+        return BaseResultDto.success(ucardCardService.getCardCountryList(request));
     }
 
     /**
@@ -315,7 +345,7 @@ public class WasabiCardApiController {
      */
     @PostMapping("/card/occupation/list")
     public BaseResultDto<List<WasabiOccupationsDto>> getOccupationList() throws ServiceException {
-        return wasabiCardService.getOccupationList();
+        return ucardCardService.getOccupationList();
     }
 
     /**
@@ -323,15 +353,7 @@ public class WasabiCardApiController {
      */
     @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);
+        return ucardPermissionService.permissionVerify(infoEntity.getCustomInfo());
     }
 
     /**
@@ -339,7 +361,7 @@ public class WasabiCardApiController {
      */
     @PostMapping("/card/id/type/config/list")
     public ResultWithPagerDto<CardIdTypeConfigDto> getCardIdTypeConfigList(@RequestBody CardIdTypeConfigPageEntity entity) throws ServiceException {
-        return wasabiCardService.getCardIdTypeConfigList(entity);
+        return ucardTypeConfigService.getCardIdTypeConfigList(entity);
     }
 
     /**
@@ -347,19 +369,19 @@ public class WasabiCardApiController {
      */
     @PostMapping("/global/query/bank/cities")
     public BaseResultDto queryBankCities(@RequestBody CardBankCitiesEntity entity) throws ServiceException {
-        return wasabiCardService.queryBankCities(entity);
+        return globalService.queryBankCities(entity);
     }
 
     /**
      * 查询CVV 发送短信验证码
      */
     @PostMapping("/query/cvv/send/code")
-    public BaseResultDto queryCvvSendCode(@RequestBody @Validated CardQueryCvvSendEmailCodeEntity entity,
+    public BaseResultDto queryCvvSendCode(@RequestBody @Validated CardSendEmailCodeEntity entity,
                                           HttpServletRequest req) throws ServiceException {
 
         entity.setIp(GetIpAndMac.getIp(req));
         entity.setTime(new Date());
-        wasabiCardService.queryCvvSendCode(entity);
+        ucardEmailService.queryCvvSendCode(entity);
         return BaseResultDto.success(Constants.SEND_SUCCESS);
     }
 
@@ -368,7 +390,7 @@ public class WasabiCardApiController {
      */
     @PostMapping("/query/cvv/verify/code")
     public BaseResultDto queryCvvVerifyCode(@RequestBody @Validated CardQueryCvvVerifyEmailCodeEntity entity) throws Exception {
-        return wasabiCardService.queryCvvVerifyCode(entity);
+        return ucardEmailService.queryCvvVerifyCode(entity);
     }
 
     @PostMapping("/account/dropdown")
@@ -396,18 +418,18 @@ public class WasabiCardApiController {
      * 查询汇率
      */
     @PostMapping("/global/query/exchange/rate")
-    public BaseResultDto queryExchangeRate(@RequestBody GlobalQueryExchangeRateEntity entity) throws ServiceException {
-        return BaseResultDto.success(wasabiCardService.queryExchangeRate(entity));
+    public BaseResultDto queryExchangeRate(@RequestBody GlobalQueryExchangeRateEntity entity) throws Exception {
+        return BaseResultDto.success(globalService.queryExchangeRate(entity));
     }
 
     /**
      * 查询账户信息
      */
     @PostMapping("/card/account/dropdown")
-    public BaseResultDto cardAccountDropdown(InfoEntity infoEntity) throws ServiceException {
+    public BaseResultDto cardAccountDropdown(InfoEntity infoEntity) throws Exception {
         CardAccountDropdownEntity entity = new CardAccountDropdownEntity();
         entity.setCId(infoEntity.getCustomInfo().getCId());
-        return wasabiCardService.cardAccountDropdown(entity);
+        return ucardCardService.cardAccountDropdown(entity);
     }
 
     /**
@@ -416,16 +438,16 @@ public class WasabiCardApiController {
     @PostMapping("/global/create/order")
     public BaseResultDto globalCreateOrder(@RequestBody GlobalCreateOrderEntity entity, InfoEntity infoEntity) throws Exception {
         entity.setCId(infoEntity.getCustomInfo().getCId());
-        return wasabiCardService.globalCreateOrder(entity);
+        return globalService.globalCreateOrder(entity);
     }
 
     /**
      * 速汇订单分页列表
      */
     @PostMapping("/global/order/page/list")
-    public ResultWithPagerDto<GlobalOrderDto> globalOrderPageList(@RequestBody GlobalOrderPageEntity entity, InfoEntity infoEntity) throws Exception {
+    public BaseReportResultDto<List<GlobalOrderDto>, GlobalOrderSumDto> globalOrderPageList(@RequestBody GlobalOrderPageEntity entity, InfoEntity infoEntity) throws Exception {
         entity.setCId(infoEntity.getCustomInfo().getCId());
-        return wasabiCardService.globalOrderPageList(entity);
+        return globalService.globalOrderPageList(entity);
     }
 
     /**
@@ -434,7 +456,7 @@ public class WasabiCardApiController {
     @PostMapping("/global/supplementary/data")
     public BaseResultDto supplementaryData(@RequestBody WasabiTransactionSubmitRfiEntity entity, InfoEntity infoEntity) throws Exception {
         entity.setCId(infoEntity.getCustomInfo().getCId());
-        return wasabiCardService.supplementaryData(entity);
+        return globalService.supplementaryData(entity);
     }
 
     /**
@@ -442,7 +464,7 @@ public class WasabiCardApiController {
      */
     @PostMapping("/global/currencies/dropdown")
     public BaseResultDto getCurrenciesDropdown(@RequestBody GlobalCurrenciesDropdownEntity entity) throws ServiceException {
-        return wasabiCardService.getCurrenciesDropdown(entity);
+        return globalService.getCurrenciesDropdown(entity);
     }
 
     /**
@@ -450,7 +472,7 @@ public class WasabiCardApiController {
      */
     @PostMapping("/global/currencies/field/list")
     public BaseResultDto getCurrenciesFieldList(@RequestBody @Validated GlobalCurrenciesFieldListEntity entity) throws ServiceException {
-        return wasabiCardService.getCurrenciesFieldList(entity);
+        return globalService.getCurrenciesFieldList(entity);
     }
 
     /**
@@ -458,7 +480,7 @@ public class WasabiCardApiController {
      */
     @PostMapping("/global/order/details")
     public BaseResultDto queryGlobalOrderDetails(@RequestBody BaseEntity entity) throws ServiceException {
-        return wasabiCardService.queryGlobalOrderDetails(entity);
+        return globalService.queryGlobalOrderDetails(entity);
     }
 
     /**
@@ -467,7 +489,7 @@ public class WasabiCardApiController {
     @PostMapping("/global/cancel/order")
     public BaseResultDto globalCancelOrder(@RequestBody GlobalCancelOrderEntity entity, InfoEntity infoEntity) throws Exception {
         entity.setCId(infoEntity.getCustomInfo().getCId());
-        return wasabiCardService.globalCancelOrder(entity);
+        return globalService.globalCancelOrder(entity);
     }
 
     /**
@@ -475,7 +497,7 @@ public class WasabiCardApiController {
      */
     @PostMapping("/global/user/details")
     public BaseResultDto findGlobalUserDetails(InfoEntity entity) throws ServiceException {
-        return wasabiCardService.findGlobalUserDetails(entity);
+        return globalService.findGlobalUserDetails(entity);
     }
 
     /**
@@ -483,7 +505,7 @@ public class WasabiCardApiController {
      */
     @PostMapping("/global/receiver/user/list")
     BaseResultDto getGlobalReceiverUserList(@RequestBody GlobalReceiverUserEntity entity) throws ServiceException {
-        return wasabiCardService.getGlobalReceiverUserList(entity);
+        return globalService.getGlobalReceiverUserList(entity);
     }
 
     /**
@@ -491,7 +513,7 @@ public class WasabiCardApiController {
      */
     @PostMapping("/global/receiver/user/delete")
     BaseResultDto deleteGlobalReceiverUser(@RequestBody BaseEntity entity) throws ServiceException {
-        return wasabiCardService.deleteGlobalReceiverUser(entity);
+        return globalService.deleteGlobalReceiverUser(entity);
     }
 
     /**
@@ -499,16 +521,16 @@ public class WasabiCardApiController {
      */
     @PostMapping("/card/blockchain/config/dropdown")
     BaseResultDto getCardBlockchainConfigDropdown(@RequestBody CardBlockchainConfigDropdownEntity entity) throws ServiceException {
-        return wasabiCardService.getCardBlockchainConfigDropdown(entity);
+        return ucardBlockchainService.getCardBlockchainConfigDropdown(entity);
     }
 
     /**
      * 加密货币交易分页列表
      */
     @PostMapping("/encrypted/wallet/transaction/page")
-    ResultWithPagerDto<EncryptedWalletTransactionDto> getEncryptedWalletTransactionPage(@RequestBody EncryptedWalletTransactionPageEntity entity, InfoEntity infoEntity) throws ServiceException {
+    ResultWithPagerDto<UcardWalletDepositTransactionDto> getWalletDepositTransactionPage(@RequestBody UcardWalletDepositTransactionPageEntity entity, InfoEntity infoEntity) throws ServiceException {
         entity.setCId(infoEntity.getCustomInfo().getCId());
-        return wasabiCardService.getEncryptedWalletTransactionPage(entity);
+        return vaultodyService.getWalletDepositTransactionPage(entity);
     }
 
     /**
@@ -517,7 +539,70 @@ public class WasabiCardApiController {
     @PostMapping("/card/withdraw/page")
     ResultWithPagerDto<CardWithdrawDto> queryCardWithdrawPage(@RequestBody CardWithdrawPageEntity entity, InfoEntity infoEntity) throws ServiceException{
         entity.setCId(infoEntity.getCustomInfo().getCId());
-        return wasabiCardService.queryCardWithdrawPage(entity);
+        return ucardCardService.queryCardWithdrawPage(entity);
+    }
+
+    /**
+     * 拒绝理由单个查询
+     *
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/reasons/refusal/search/single")
+    public BaseResultDto searchLingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+
+        SysReasonsRefusalSearchDto result = sysReasonsRefusalService.searchSingle(entity);
+
+        return BaseResultDto.success(result);
+    }
+
+    @PostMapping("/reasons/refusal/list")
+    public BaseResultDto list(@RequestBody @Validated SysReasonsRefusalSearchEntity entity) throws Exception {
+
+        BaseResultDto<Map<String, SysReasonsRefusalSearchDto>> result = sysReasonsRefusalService.searchList(entity);
+
+        return result;
+    }
+
+    /**
+     * 币种所有字段名称
+     */
+    @PostMapping("/global/field/params")
+    public BaseResultDto getGlobalFieldParams() throws ServiceException {
+        return globalService.getGlobalFieldParams();
+    }
+
+    /**
+     * 获取最新一条app版本配置
+     */
+    @PostMapping("/card/app/version/detail")
+    public BaseResultDto getLatestCardAppVersion(@RequestBody @Validated CardAppVersionDetailEntity entity) throws ServiceException {
+        return ucardAppVersionService.getLatestCardAppVersion(entity);
+    }
+
+    /**
+     * app常见问题列表
+     */
+    @PostMapping("/card/app/common/problem/page")
+    ResultWithPagerDto<CardAppCommonProblemDto> getCardAppCommonProblemPageList(@RequestBody CardAppCommonProblemPageEntity entity) throws ServiceException{
+        return ucardAppCommonProblemService.getCardAppCommonProblemPageList(entity);
+    }
+
+    /**
+     * app隐私政策列表
+     */
+    @PostMapping("/card/app/privacy/policy/page")
+    ResultWithPagerDto<CardAppPrivacyPolicyDto> getCardAppPrivacyPolicyPageList(@RequestBody CardAppPrivacyPolicyPageEntity entity) throws ServiceException{
+        return ucardAppPrivacyPolicyService.getCardAppPrivacyPolicyPageList(entity);
+    }
+
+    /**
+     * 常见问题类型下拉列表
+     */
+    @PostMapping("/card/app/common/problem/type/dropdown")
+    BaseResultDto cardAppCommonProblemTypeDropdown(@RequestBody @Validated CardAppCommonProblemTypeDropdown entity) throws ServiceException{
+        return ucardAppCommonProblemTypeService.cardAppCommonProblemTypeDropdown(entity);
     }
 
 }

Diferenças do arquivo suprimidas por serem muito extensas
+ 97 - 411
ucard-cloud/src/main/java/com/crm/ucard/controller/WasabiCardController.java


+ 17 - 18
ucard-cloud/src/main/java/com/crm/ucard/controller/WasabiCardNotifyController.java

@@ -3,11 +3,11 @@ 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.core.pojo.table.ucard.SysUcardConfigTable;
 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.service.SysUcardConfigService;
+import com.crm.ucard.service.UcardNotifyService;
 import com.crm.ucard.util.RsaUtils;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -19,10 +19,9 @@ import org.springframework.web.bind.annotation.*;
 public class WasabiCardNotifyController {
 
     @Autowired
-    private SysConfigService sysConfigService;
-
+    private SysUcardConfigService sysUcardConfigService;
     @Autowired
-    private WasabiCardService wasabiCardService;
+    private UcardNotifyService ucardNotifyService;
 
     @PostMapping("/callback")
     public WasabiNotifyResultDto notify(@RequestHeader("x-wsb-category") String category,
@@ -30,7 +29,7 @@ public class WasabiCardNotifyController {
                                 @RequestHeader("x-wsb-request-id") String requestId,
                                 @RequestBody String request) throws Exception {
         try {
-            log.info("wasabi回调通知开始:" + JSON.toJSONString(request));
+            log.info("wasabi回调通知开始:" + category + ":" + JSON.toJSONString(request));
             WasabiConfig config = getWasabiConfig();
             // 验证签名
             if (!RsaUtils.verify(request, config.getWsbPublicKey(), signature)) {
@@ -39,33 +38,33 @@ public class WasabiCardNotifyController {
             switch (category) {
                 case "card_transaction":
                     WasabiTransactionDto transactionNotifyDto = JSON.parseObject(request, WasabiTransactionDto.class);
-                    wasabiCardService.cardTransactionNotify(transactionNotifyDto);
+                    ucardNotifyService.cardTransactionNotify(transactionNotifyDto);
                     break;
                 case "card_auth_transaction":
                     WasabiAuthTransactionDto authTransactionNotifyDto = JSON.parseObject(request, WasabiAuthTransactionDto.class);
-                    wasabiCardService.cardAuthTransactionNotify(authTransactionNotifyDto);
+                    ucardNotifyService.cardAuthTransactionNotify(authTransactionNotifyDto);
                     break;
                 case "card_fee_patch":
                     WasabiFeePatchNotifyDto feePatchNotifyDto = JSON.parseObject(request, WasabiFeePatchNotifyDto.class);
-                    wasabiCardService.cardFeePatchNotify(feePatchNotifyDto);
+                    ucardNotifyService.cardFeePatchNotify(feePatchNotifyDto);
                     break;
                 case "card_3ds":
                     WasabiThird3dsTransactionDto card3dsNotifyDto = JSON.parseObject(request, WasabiThird3dsTransactionDto.class);
-                    wasabiCardService.card3dsNotify(card3dsNotifyDto);
+                    ucardNotifyService.card3dsNotify(card3dsNotifyDto);
                     break;
                 case "card_holder":
                     WasabiHolderQueryDto holderNotifyDto = JSON.parseObject(request, WasabiHolderQueryDto.class);
-                    wasabiCardService.cardHolderNotify(holderNotifyDto);
+                    ucardNotifyService.cardHolderNotify(holderNotifyDto);
                     break;
                 case "physical_card":
                     WasabiPhysicalCardNotifyDto physicalCardNotifyDto = JSON.parseObject(request, WasabiPhysicalCardNotifyDto.class);
-                    wasabiCardService.physicalCardNotify(physicalCardNotifyDto);
+                    ucardNotifyService.physicalCardNotify(physicalCardNotifyDto);
                     break;
                 case "work":
                     break;
                 case "gt_transaction":
                     WasabiTransactionTransferDto transferDto = JSON.parseObject(request, WasabiTransactionTransferDto.class);
-                    wasabiCardService.expressRemittanceTransactionNotify(transferDto);
+                    ucardNotifyService.expressRemittanceTransactionNotify(transferDto);
                     break;
                 default:
                     return WasabiNotifyResultDto.error();
@@ -78,12 +77,12 @@ public class WasabiCardNotifyController {
         }
     }
 
-    public WasabiConfig getWasabiConfig() throws ServiceException {
-        SysConfigTable sysConfigTable = sysConfigService.getByCode(Constants.WASABI_CARD);
-        if (sysConfigTable == null) {
+    public WasabiConfig getWasabiConfig() throws Exception {
+        SysUcardConfigTable sysUcardConfigTable = sysUcardConfigService.getByCode(Constants.WASABI_CARD);
+        if (sysUcardConfigTable == null) {
             throw ServiceException.exception(Constants.SYSTEM_ERROR);
         }
-        WasabiConfig wasabiConfig = JSON.parseObject(sysConfigTable.getValue(), WasabiConfig.class);
+        WasabiConfig wasabiConfig = JSON.parseObject(sysUcardConfigTable.getValue(), WasabiConfig.class);
         return wasabiConfig;
     }
 

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

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

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

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

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

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

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

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

+ 5 - 1
ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/CardBlockchainConfigMapper.java

@@ -2,7 +2,8 @@ package com.crm.ucard.dao.mapper;
 
 
 import com.crm.rely.backend.core.dto.ucard.CardBlockchainConfigDto;
-import com.crm.rely.backend.core.entity.ucard.*;
+import com.crm.rely.backend.core.entity.ucard.CardBlockchainConfigAddEntity;
+import com.crm.rely.backend.core.entity.ucard.CardBlockchainConfigPageEntity;
 import org.springframework.stereotype.Repository;
 
 import java.util.List;
@@ -16,4 +17,7 @@ public interface CardBlockchainConfigMapper {
 
     void insert(CardBlockchainConfigAddEntity table);
 
+    List<CardBlockchainConfigDto> findWithdrawalAllByEnableStatus();
+    List<CardBlockchainConfigDto> findRechargeAllByEnableStatus();
+
 }

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

@@ -1,8 +1,8 @@
 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 com.crm.rely.backend.core.dto.ucard.UcardWalletDepositTransactionDto;
+import com.crm.rely.backend.core.entity.ucard.UcardWalletDepositTransactionPageEntity;
 import org.springframework.stereotype.Repository;
 
 import java.util.List;
@@ -10,8 +10,8 @@ import java.util.List;
 @Repository
 public interface CardCryptoCallbackRecordMapper {
 
-    Integer countList(EncryptedWalletTransactionPageEntity entity);
+    Integer countList(UcardWalletDepositTransactionPageEntity entity);
 
-    List<EncryptedWalletTransactionDto> pageList(EncryptedWalletTransactionPageEntity entity);
+    List<UcardWalletDepositTransactionDto> pageList(UcardWalletDepositTransactionPageEntity entity);
 
 }

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

@@ -1,15 +0,0 @@
-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();
-
-}

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

@@ -1,6 +1,8 @@
 package com.crm.ucard.dao.mapper;
 
 import com.crm.rely.backend.core.dto.wasabi.WasabiFieldDto;
+import com.crm.rely.backend.core.dto.wasabi.WasabiFieldParamsDto;
+import com.crm.rely.backend.core.pojo.table.ucard.CardGlobalCurrenciesFieldTable;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
 
@@ -15,4 +17,8 @@ public interface CardGlobalCurrenciesFieldMapper {
                                              @Param("transferTypeId") String transferTypeId,
                                              @Param("payoutMethodId") String payoutMethodId,
                                              @Param("fieldType") String fieldType);
+
+    List<WasabiFieldParamsDto> getDistinctAll();
+
+    void batchSave(List<CardGlobalCurrenciesFieldTable> list);
 }

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

@@ -2,6 +2,7 @@ package com.crm.ucard.dao.mapper;
 
 
 import com.crm.rely.backend.core.dto.ucard.GlobalOrderDto;
+import com.crm.rely.backend.core.dto.ucard.GlobalOrderSumDto;
 import com.crm.rely.backend.core.entity.ucard.GlobalOrderPageEntity;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Repository;
@@ -20,4 +21,6 @@ public interface CardGlobalOrderMapper {
      * 根据用户和币种信息查询已用额度
      */
     BigDecimal findAllByCId(@Param("cId") Long cId,@Param("payoutCurrency") String payoutCurrency,@Param("transferType") String transferType,@Param("payoutMethod") String payoutMethod);
+
+    GlobalOrderSumDto globalOrderSum(GlobalOrderPageEntity entity);
 }

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

@@ -3,9 +3,11 @@ 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 org.springframework.stereotype.Repository;
 
 import java.util.List;
 
+@Repository
 public interface CardGlobalPaymentOrderMapper {
 
     Integer countList(GlobalPaymentPageEntity entity);

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

@@ -14,5 +14,5 @@ public interface CardRechargeOrderMapper {
 
     List<CardRechargeOrderDto> pageList(CardRechargePageEntity entity);
 
-    CardRechargeOrderSumDto sumPage(CardRechargePageEntity entity);
+    CardRechargeOrderSumDto rechargeOrderSum(CardRechargePageEntity entity);
 }

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

@@ -2,7 +2,7 @@ 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 com.crm.rely.backend.core.entity.ucard.vaultody.VaultodyDepositAddressPageEntity;
 import org.springframework.stereotype.Repository;
 
 import java.util.List;

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

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

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

@@ -0,0 +1,13 @@
+package com.crm.ucard.dao.mapper;
+
+import com.crm.rely.backend.core.entity.system.reasons.refusal.SysReasonsRefusalSearchEntity;
+import com.crm.rely.backend.core.pojo.table.SysReasonsRefusalTable;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Repository
+public interface SysReasonsRefusalMapper {
+
+    List<SysReasonsRefusalTable> searchList(SysReasonsRefusalSearchEntity entity);
+}

+ 10 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/mapper/UcardKycVerifyRecodeMapper.java

@@ -0,0 +1,10 @@
+package com.crm.ucard.dao.mapper;
+
+import com.crm.rely.backend.core.pojo.table.CustomKycVerifyRecodeTable;
+import org.springframework.stereotype.Repository;
+
+@Repository
+public interface UcardKycVerifyRecodeMapper {
+
+    CustomKycVerifyRecodeTable findCustomKycVerifyRecodeTableByExternalUserId(String externalUserId);
+}

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

@@ -0,0 +1,16 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardAppCommonProblemTable;
+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 CardAppCommonProblemRepository extends BaseRepository<CardAppCommonProblemTable> {
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardAppCommonProblemTable findFirstById(Long id);
+
+}

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

@@ -0,0 +1,23 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardAppCommonProblemTypeTable;
+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 CardAppCommonProblemTypeRepository extends BaseRepository<CardAppCommonProblemTypeTable> {
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardAppCommonProblemTypeTable findFirstById(Long id);
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardAppCommonProblemTypeTable findFirstByLanguage(String language);
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardAppCommonProblemTypeTable findFirstByLanguageAndType(String language, String type);
+
+    List<CardAppCommonProblemTypeTable> findAllByLanguage(String language);
+}

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

@@ -0,0 +1,19 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardAppPrivacyPolicyTable;
+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 CardAppPrivacyPolicyRepository extends BaseRepository<CardAppPrivacyPolicyTable> {
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardAppPrivacyPolicyTable findFirstById(Long id);
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardAppPrivacyPolicyTable findFirstByType(String type);
+
+}

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

@@ -0,0 +1,18 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.CardAppVersionTable;
+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 CardAppVersionRepository extends BaseRepository<CardAppVersionTable> {
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardAppVersionTable findFirstById(Long id);
+
+    CardAppVersionTable findFirstByEquipmentTypeOrderByAddTimeDesc(String equipmentType);
+
+}

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

@@ -1,11 +0,0 @@
-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> {
-
-
-}

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

@@ -6,7 +6,6 @@ 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> {
@@ -14,5 +13,6 @@ public interface CardBlockchainConfigRepository extends BaseRepository<CardBlock
     @Lock(LockModeType.PESSIMISTIC_WRITE)
     CardBlockchainConfigTable findFirstById(Long id);
 
-    List<CardBlockchainConfigTable> findAllByEnableStatus(Integer enableStatus);
+    @Lock(value = LockModeType.PESSIMISTIC_WRITE)
+    CardBlockchainConfigTable findFirstByAlias(String alias);
 }

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

@@ -6,6 +6,7 @@ import org.springframework.data.jpa.repository.Lock;
 import org.springframework.stereotype.Repository;
 
 import javax.persistence.LockModeType;
+import java.util.List;
 
 @Repository
 public interface CardBlockchainRateConfigRepository extends BaseRepository<CardBlockchainRateConfigTable> {
@@ -13,5 +14,12 @@ public interface CardBlockchainRateConfigRepository extends BaseRepository<CardB
     @Lock(LockModeType.PESSIMISTIC_WRITE)
     CardBlockchainRateConfigTable findFirstById(Long id);
 
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    List<CardBlockchainRateConfigTable> findAllByIdIn(List<Long> ids);
+
+    boolean existsByCurrencyAndConvertCurrencyAndType(String currency, String convertCurrency, Integer type);
+
     CardBlockchainRateConfigTable getByCurrencyAndConvertCurrencyAndEnableStatus(String currency, String convertCurrency, Integer enableStatus);
+
+    CardBlockchainRateConfigTable getByTypeAndCurrencyAndConvertCurrencyAndEnableStatus(Integer type, String convertCurrency, String currency, Integer enableStatus);
 }

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

@@ -1,14 +0,0 @@
-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);
-}

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

@@ -4,13 +4,9 @@ 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);
 
 }

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

@@ -28,6 +28,8 @@ public interface CardMerchantUserRepository extends BaseRepository<CardMerchantU
     CardMerchantUserTable findFirstByCustomIdAndCardCategory(Long customId, Integer cardCategory);
 
     CardMerchantUserTable getFirstByCustomId(Long customId);
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    CardMerchantUserTable findFirstByCustomId(Long customId);
 
     @Lock(LockModeType.PESSIMISTIC_WRITE)
     CardMerchantUserTable findFirstById(Long cardId);

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

@@ -18,5 +18,6 @@ public interface CardRechargeOrderRepository extends BaseRepository<CardRecharge
 
     CardRechargeOrderTable getFirstByCardNoAndStatusAndRechargeType(String cardNo, String status, String rechargeType);
 
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
     CardRechargeOrderTable getFirstByCardNoAndRechargeType(String cardNo, String rechargeType);
 }

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

@@ -17,4 +17,9 @@ public interface CardWalletAddressRepository extends BaseRepository<CardWalletAd
 
     @Lock(value = LockModeType.PESSIMISTIC_WRITE)
     CardWalletAddressTable findFirstById(Long id);
+
+    @Lock(value = LockModeType.PESSIMISTIC_WRITE)
+    CardWalletAddressTable findFirstByAddressAndBlockchain(String address, String blockchain);
+
+
 }

+ 1 - 8
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/CustomInfoRepository.java

@@ -6,14 +6,7 @@ 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> {
 

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

@@ -6,10 +6,6 @@ import org.springframework.stereotype.Repository;
 
 import java.util.List;
 
-
-/**
- * Created by max on 2020/7/14.
- */
 @Repository
 public interface CustomKycApproveRepository extends BaseRepository<CustomKycApproveTable> {
 

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

@@ -10,4 +10,9 @@ public interface CustomKycImageRepository extends BaseRepository<CustomKycImageT
     List<CustomKycImageTable> findAllByExternalUserId(String externalUserId);
 
     List<CustomKycImageTable> findAllByExternalUserIdIn(List<String> externalUserIds);
+
+    List<CustomKycImageTable> getCustomKycImageTableByExternalUserIdAndType(String endUserId, Integer type);
+
+    List<CustomKycImageTable> getCustomKycImageTableByApplicantIdAndVerifyType(String applicantId, Integer verifyType);
+
 }

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

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

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

@@ -6,8 +6,6 @@ import org.springframework.stereotype.Repository;
 
 /**
  * 登录记录
- *
- * @author: houn
  */
 @Repository
 public interface CustomLoginHistoryRepository extends BaseRepository<CustomLoginHistoryTable> {

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

@@ -1,17 +0,0 @@
-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);
-
-}

+ 52 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/FinanceDepositRepository.java

@@ -0,0 +1,52 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.FinanceDepositTable;
+import com.crm.rely.backend.dao.repository.BaseRepository;
+import org.springframework.data.jpa.repository.Lock;
+import org.springframework.data.jpa.repository.Query;
+import org.springframework.stereotype.Repository;
+
+import javax.persistence.LockModeType;
+import java.util.Date;
+import java.util.List;
+
+
+@Repository
+public interface FinanceDepositRepository extends BaseRepository<FinanceDepositTable> {
+
+    /**
+     * 根据入金流水号获取入金信息(加锁-行级锁)
+     *
+     * @param serial
+     * @return
+     */
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    FinanceDepositTable findFirstBySerial(String serial);
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    FinanceDepositTable findFirstByChannelSerial(String ticket);
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    FinanceDepositTable getFirstBySerial(String serial);
+
+    List<FinanceDepositTable> getAllByCustomId(Long customId);
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    FinanceDepositTable findFirstById(Long id);
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    List<FinanceDepositTable> findAllByIdIn(List<Long> ids);
+
+    boolean existsByCustomIdAndPayTypeAndAddTimeGreaterThanEqual(Long customId, String payType, Date date);
+
+    @Query(value = "SELECT count(*) from finance_deposit where custom_id=?1 and callback_status=1 and status in (0,1," +
+            "2)",
+            nativeQuery = true)
+    Integer countByCustomIdAndCallbackStatus(Long customId);
+
+    @Query(value = "SELECT count(*) from finance_deposit where custom_id=?1 " +
+            "and callback_status=1 and status in (0," +
+            "1,2) and serial!=?2",
+            nativeQuery = true)
+    Integer countByCustomIdAndCallbackStatusAndSerialNot(Long customId, String serial);
+}

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

@@ -8,9 +8,6 @@ import org.springframework.stereotype.Repository;
 import javax.persistence.LockModeType;
 import java.util.List;
 
-/**
- * @author: houn
- */
 @Repository
 public interface SysConfigRepository extends BaseRepository<SysConfigTable> {
 

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

@@ -2,12 +2,8 @@ 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> {

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

@@ -2,12 +2,18 @@ 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.data.jpa.repository.Lock;
 import org.springframework.stereotype.Repository;
 
+import javax.persistence.LockModeType;
+
 
 @Repository
 public interface SysReasonsRefusalRepository extends BaseRepository<SysReasonsRefusalTable> {
 
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    SysReasonsRefusalTable findFirstById(Long id);
+
     SysReasonsRefusalTable getFirstById(Long id);
 
 }

+ 33 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/SysUcardConfigRepository.java

@@ -0,0 +1,33 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.SysUcardConfigTable;
+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 SysUcardConfigRepository extends BaseRepository<SysUcardConfigTable> {
+
+    /**
+     * 根据codes 获取系统配置信息
+     *
+     * @param codes code的列表
+     * @return
+     */
+    List<SysUcardConfigTable> getByCodeIn(List<String> codes);
+
+    /**
+     * 根据银行code 获取系统配置信息
+     *
+     * @param code code
+     * @return
+     */
+    SysUcardConfigTable getByCode(String code);
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    SysUcardConfigTable findFirstByCode(String code);
+
+}

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

@@ -1,18 +0,0 @@
-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> {
-
-
-}

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

@@ -18,6 +18,8 @@ public interface UcardCardRepository extends BaseRepository<UcardCardTable> {
 
     UcardCardTable findByUniqueIdAndCardTypeId(String uniqueId, Integer cardTypeId);
 
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    UcardCardTable findFirstById(Long id);
     UcardCardTable getFirstById(Long id);
 
     List<UcardCardTable> findAllByStatus(String status);

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

@@ -1,16 +0,0 @@
-package com.crm.ucard.dao.repository;
-
-import com.crm.rely.backend.core.pojo.table.ucard.UcardCryptoCallbackRecordTable;
-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 UcardCryptoCallbackRecordRepository extends BaseRepository<UcardCryptoCallbackRecordTable> {
-
-    @Lock(value = LockModeType.PESSIMISTIC_WRITE)
-    UcardCryptoCallbackRecordTable findFirstByIdempotencyKey(String idempotencyKey);
-
-}

+ 1 - 1
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/UcardGlobalReceiverInfoRepository.java

@@ -12,7 +12,7 @@ import java.util.List;
 public interface UcardGlobalReceiverInfoRepository extends BaseRepository<CardGlobalReceiverInfoTable> {
 
     @Lock(LockModeType.PESSIMISTIC_WRITE)
-    CardGlobalReceiverInfoTable findByUniqueIdAndReceiverBankAccountNumber(String uniqueId, String receiverBankAccountNumber);
+    CardGlobalReceiverInfoTable findByUniqueIdAndPayoutCurrencyAndTransferTypeAndPayoutMethodAndReceiverBankAccountNumber(String uniqueId, String payoutCurrency, String transferType, String payoutMethod, String receiverBankAccountNumber);
 
     @Lock(LockModeType.PESSIMISTIC_WRITE)
     CardGlobalReceiverInfoTable findFirstById(Long id);

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

@@ -0,0 +1,19 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.UcardVaultodyCallbackRecordTable;
+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 UcardVaultodyCallbackRecordRepository extends BaseRepository<UcardVaultodyCallbackRecordTable> {
+
+    @Lock(value = LockModeType.PESSIMISTIC_WRITE)
+    UcardVaultodyCallbackRecordTable findFirstByIdempotencyKey(String idempotencyKey);
+
+    @Lock(value = LockModeType.PESSIMISTIC_WRITE)
+    UcardVaultodyCallbackRecordTable findFirstByTransactionId(String transactionId);
+
+}

+ 21 - 0
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/UcardWalletWithdrawRepository.java

@@ -0,0 +1,21 @@
+package com.crm.ucard.dao.repository;
+
+import com.crm.rely.backend.core.pojo.table.ucard.UcardWalletWithdrawTable;
+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 UcardWalletWithdrawRepository extends BaseRepository<UcardWalletWithdrawTable> {
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    UcardWalletWithdrawTable findFirstById(Long id);
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    UcardWalletWithdrawTable findFirstByRequestIdAndAddress(String requestId, String address);
+
+    @Lock(LockModeType.PESSIMISTIC_WRITE)
+    UcardWalletWithdrawTable findFirstByAddressAndBlockchain(String address, String blockchain);
+}

+ 0 - 4
ucard-cloud/src/main/java/com/crm/ucard/dao/repository/UserRoleRepository.java

@@ -2,12 +2,8 @@ package com.crm.ucard.dao.repository;
 
 import com.crm.rely.backend.core.pojo.table.UserRoleTable;
 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 UserRoleRepository extends BaseRepository<UserRoleTable> {
 

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff