From 11e61cc9f438225d778c3b688e55caa8a4989cfa Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期五, 10 一月 2025 20:11:38 +0800
Subject: [PATCH] 修改bug
---
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/util/payment/TransferUtil.java | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/util/payment/TransferUtil.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/util/payment/TransferUtil.java
index f8d6139..6718780 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/util/payment/TransferUtil.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/util/payment/TransferUtil.java
@@ -1,5 +1,6 @@
package com.ruoyi.other.util.payment;
+import cn.hutool.http.ContentType;
import cn.hutool.http.HttpRequest;
import cn.hutool.http.HttpResponse;
import cn.hutool.http.HttpUtil;
@@ -42,6 +43,7 @@
public static SinglePayResult singlePay(SinglePay singlePay){
String url = "https://www.joinpay.com/payment/pay/singlePay";
HttpRequest post = HttpUtil.createPost(url);
+ post.contentType(ContentType.JSON.toString());
JSONObject body = new JSONObject();
//商户编号
body.put("userNo", merchantNo);
@@ -124,6 +126,7 @@
public static SinglePayQueryResult singlePayQuery(String merchantOrderNo){
String url = "https://www.joinpay.com/payment/pay/singlePayQuery";
HttpRequest post = HttpUtil.createPost(url);
+ post.contentType(ContentType.JSON.toString());
JSONObject body = new JSONObject();
//商户编号
body.put("userNo", merchantNo);
@@ -167,6 +170,7 @@
public static AccountBalanceQueryResult accountBalanceQuery(){
String url = "https://www.joinpay.com/payment/pay/accountBalanceQuery";
HttpRequest post = HttpUtil.createPost(url);
+ post.contentType(ContentType.JSON.toString());
JSONObject body = new JSONObject();
//商户编号
body.put("userNo", merchantNo);
@@ -226,4 +230,9 @@
return MD5AndKL.MD5(sb.toString());
}
+
+ public static void main(String[] args) {
+ TransferUtil.accountBalanceQuery();
+ }
+
}
--
Gitblit v1.7.1