diff --git a/open-api/src/main/java/com/api/controller/v1/FundManageController.java b/open-api/src/main/java/com/api/controller/v1/FundManageController.java index 2e7904e..38d8686 100644 --- a/open-api/src/main/java/com/api/controller/v1/FundManageController.java +++ b/open-api/src/main/java/com/api/controller/v1/FundManageController.java @@ -30,6 +30,7 @@ import org.springframework.web.bind.annotation.ResponseBody; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; +import java.math.BigDecimal; import java.util.Map; /** @@ -83,7 +84,7 @@ public class FundManageController { transferAccounts.setMerName(mer.getMerName()); transferAccounts.setMerAbbreviate(mer.getMerAbbreviate()); transferAccounts.setOrderNo(body.getOrderNo()); - transferAccounts.setAmount(body.getAmount()); + transferAccounts.setAmount(new BigDecimal(body.getAmount())); transferAccounts.setContent(body.getContent()); // 转账 Map returnParam = openApiTransferAccountsService.transfer(transferAccounts); diff --git a/service/src/main/java/com/hfkj/openapi/v1/model/request/RequestTransferAccountsModel.java b/service/src/main/java/com/hfkj/openapi/v1/model/request/RequestTransferAccountsModel.java index 4760129..8fde763 100644 --- a/service/src/main/java/com/hfkj/openapi/v1/model/request/RequestTransferAccountsModel.java +++ b/service/src/main/java/com/hfkj/openapi/v1/model/request/RequestTransferAccountsModel.java @@ -34,7 +34,7 @@ public class RequestTransferAccountsModel { @DecimalMax(value = "99999999", message = "转账最大金额99999999元") @DecimalMin(value = "0.01", message = "转账最小金额0.01元") @NotBlank(message = "转账金额必填项") - private BigDecimal amount; + private String amount; /** * 转账金额 diff --git a/service/src/main/java/com/hfkj/openapi/v1/service/impl/OpenApiTransferAccountsServiceImpl.java b/service/src/main/java/com/hfkj/openapi/v1/service/impl/OpenApiTransferAccountsServiceImpl.java index 9bcb5ba..8a96830 100644 --- a/service/src/main/java/com/hfkj/openapi/v1/service/impl/OpenApiTransferAccountsServiceImpl.java +++ b/service/src/main/java/com/hfkj/openapi/v1/service/impl/OpenApiTransferAccountsServiceImpl.java @@ -61,7 +61,7 @@ public class OpenApiTransferAccountsServiceImpl implements OpenApiTransferAccoun transferAccounts.setReceiverPlatformNo(platform.getPlatformNo()); transferAccountsService.editData(transferAccounts); - /* // 调用渠道转账 + // 调用渠道转账 JSONObject orgTransfer = tianQueFundManageService.orgTransfer( transferAccounts.getReceiverPlatformNo(), transferAccounts.getOrderNo(), @@ -72,7 +72,7 @@ public class OpenApiTransferAccountsServiceImpl implements OpenApiTransferAccoun transferAccounts.setReceiverPlatformNo(orgTransfer.getString("transactionNo")); transferAccounts.setSettleDate(DateUtil.format(orgTransfer.getString("clrDt"), "yyyyMMdd")); transferAccounts.setTransferTime(DateUtil.format(orgTransfer.getString("transactionTime"), "yyyy-MM-dd HH:mm:ss")); - transferAccountsService.editData(transferAccounts);*/ + transferAccountsService.editData(transferAccounts); Map map = new HashMap<>(); map.put("orderNo", transferAccounts.getOrderNo()); diff --git a/service/src/main/java/com/hfkj/openapi/v1/utils/SignatureUtil.java b/service/src/main/java/com/hfkj/openapi/v1/utils/SignatureUtil.java index 51875c4..e615b6f 100644 --- a/service/src/main/java/com/hfkj/openapi/v1/utils/SignatureUtil.java +++ b/service/src/main/java/com/hfkj/openapi/v1/utils/SignatureUtil.java @@ -84,12 +84,11 @@ public class SignatureUtil { public static void main(String[] args) throws Exception { String paramStr = "{\n" + - " \"merchantNo\": \"2023053014340172109\",\n" + - " \"billDateS\": 1693584000000,\n" + - " \"billDateE\": 1693584000000,\n" + + " \"merchantNo\": \"2023090616352962600\",\n" + + " \"orderNo\": \"100001\"" + "}"; - String sign = createSign(JSONObject.parseObject(paramStr), "uAZAmX9CLJ3VmPhfi4GN8qpFifyfw0cF"); + String sign = createSign(JSONObject.parseObject(paramStr), "tglpZHbMLS8URfGeNqn82MGMcVRU9GtO"); System.out.println(sign); } diff --git a/service/src/main/java/com/hfkj/sysenum/TransferAccountsCreateType.java b/service/src/main/java/com/hfkj/sysenum/TransferAccountsCreateType.java index 7d23b72..f9e3979 100644 --- a/service/src/main/java/com/hfkj/sysenum/TransferAccountsCreateType.java +++ b/service/src/main/java/com/hfkj/sysenum/TransferAccountsCreateType.java @@ -9,8 +9,8 @@ import java.util.Objects; * @date: 2023/10/23 **/ public enum TransferAccountsCreateType { - type1(0, "系统自动"), - type2(1, "API"), + type1(1, "系统自动"), + type2(2, "API"), ; private Integer number;