Просмотр исходного кода

refactor(export): 优化交易项目导出模型和保险库服务实现

- 移除转出和收款钱包的内部钱包标识字段
- 调整Excel导出字段索引顺序以保持连续性
- 删除调试用的系统输出语句
- 修复保险库服务中的逻辑判断条件
- 添加对无效保险库ID的异常处理机制
kongxiangyang 2 месяцев назад
Родитель
Сommit
ae29204a27

+ 3 - 4
crm-manager/src/main/java/com/crm/manager/service/impl/VaultodyServiceImpl.java

@@ -210,7 +210,6 @@ public class VaultodyServiceImpl implements VaultodyService {
         String aesKey = getPropertyKey();
 
         String property = AESUtil.decrypt(configTable.getValue(), aesKey);
-        System.out.println(property);
         VaultodyConfig vaultodyConfig = JSON.parseObject(property, VaultodyConfig.class);
         List<VaultodyConfig> vaultodyList = vaultodyConfig.getVaultodyList();
         if(CollectionUtils.isEmpty(vaultodyList)){
@@ -219,10 +218,10 @@ public class VaultodyServiceImpl implements VaultodyService {
 
         Map<String, VaultodyConfig> list = vaultodyList.stream().collect(Collectors.toMap(VaultodyConfig::getVaultId, v -> v));
         VaultodyConfig config = new VaultodyConfig();
-        if(list.containsKey(vaultId)){
-            config = list.get(vaultId);
+        if(!list.containsKey(vaultId)){
+            throw ServiceException.exception(ManagerConstants.NOT_PERMIT);
         }
-
+        config = list.get(vaultId);
         return config;
     }
 

+ 11 - 15
crm-model/src/main/java/com/crm/rely/backend/model/dto/export/TransactionItemExport.java

@@ -18,32 +18,28 @@ public class TransactionItemExport {
 
     @ExcelProperty(value = "转出钱包地址", index = 5)
     private String senderAddress;
-    @ExcelProperty(value = "转出钱包是否内部钱包", index = 6)
-    private String senderIsVaultAddress;
-    @ExcelProperty(value = "转出钱包币种", index = 7)
+    @ExcelProperty(value = "转出钱包币种", index = 6)
     private String senderAmountUnit;
-    @ExcelProperty(value = "转出货币金额", index = 8)
+    @ExcelProperty(value = "转出货币金额", index = 7)
     private String senderAmount;
-    @ExcelProperty(value = "转出钱包名称", index = 9)
+    @ExcelProperty(value = "转出钱包名称", index = 8)
     private String senderLabel;
 
-    @ExcelProperty(value = "收款钱包地址", index = 10)
+    @ExcelProperty(value = "收款钱包地址", index = 9)
     private String recipientAddress;
-    @ExcelProperty(value = "收款钱包是否内部钱包", index = 11)
-    private String recipientIsVaultAddress;
-    @ExcelProperty(value = "收款钱包币种", index = 12)
+    @ExcelProperty(value = "收款钱包币种", index = 10)
     private String recipientAmountUnit;
-    @ExcelProperty(value = "收到货币金额", index = 13)
+    @ExcelProperty(value = "收到货币金额", index = 11)
     private String recipientAmount;
-    @ExcelProperty(value = "收款钱包名称", index = 14)
+    @ExcelProperty(value = "收款钱包名称", index = 12)
     private String recipientLabel;
 
-    @ExcelProperty(value = "所属区块链", index = 15)
+    @ExcelProperty(value = "所属区块链", index = 13)
     private String blockchain;
-    @ExcelProperty(value = "区块高度", index = 16)
+    @ExcelProperty(value = "区块高度", index = 14)
     private String minedInBlockHeight;
-    @ExcelProperty(value = "区块链手续费", index = 17)
+    @ExcelProperty(value = "区块链手续费", index = 15)
     private String feeAmount;
-    @ExcelProperty(value = "区块链手续费币种", index = 18)
+    @ExcelProperty(value = "区块链手续费币种", index = 16)
     private String feeAmountUnit;
 }