feat:订单多次退款

This commit is contained in:
dzc committed 2025-05-29 18:45:34 +08:00
1 parent 189cb4a3e4
commit d695a2c63b
5 files changed
+54 -25

No files matched your search

@@ -24,6 +24,7 @@ public enum ThirdPayVoStatusEnum {
ORDER_HAVE_PAY(506, "订单已支付"),
ORDER_HAVE_REFUND(507, "订单已退款"),
DETAIL_ITEM_NOT_ONE(508, "查询详情条目不为一"),
REFUND_TOTAL_PRICE(509, "退款总金额大于支付总金额"),
UNKNOWN_ERROR(599, "未知错误,请联系管理员"),
;
@@ -29,8 +29,8 @@ import java.util.Map;
@SpringBootTest(classes = ThirdPartyApp.class)
public class PayTest {
private final String baseUrl = "http://123.156.230.15:8089/api";
// private final String baseUrl = "http://127.0.0.1:9999";
// private final String baseUrl = "http://123.156.230.15:8089/api";
private final String baseUrl = "http://127.0.0.1:9999";
private final String walletInfoUrl = "/third/third-pay-api/user-wallet";
@@ -80,7 +80,7 @@ public class PayTest {
Map<String, Object> paramsMap = new HashMap<>();
paramsMap.put("userId", 1875049673022279681L);
paramsMap.put("thirdOrderId", System.currentTimeMillis());
paramsMap.put("price", 100);
paramsMap.put("price", 1000);
paramsMap.put("products", null);
String body = JSONUtil.toJsonStr(paramsMap);
// 发送请求
@@ -119,9 +119,9 @@ public class PayTest {
public void walletRefund() throws Exception {
ThirdKeyManageEntity config = getLbConfig();
Map<String, Object> paramsMap = new HashMap<>();
paramsMap.put("platformOrderId", "1919704180908027905");
paramsMap.put("thirdRefundId", "10");
paramsMap.put("price", "1000");
paramsMap.put("platformOrderId", "1928019909587054593");
paramsMap.put("thirdRefundId", System.currentTimeMillis());
paramsMap.put("price", "300");
String body = JSONUtil.toJsonStr(paramsMap);
// 发送请求
String res = HttpRequest.post(baseUrl + walletRefundUrl).contentType("application/json").header(apiCountersign(body)).body(body).execute().body();