|
|
|
@ -126,7 +126,7 @@ public class RedServiceImpl implements RedService { |
|
|
|
String body = JSON.toJSONString(java.util.Map.of("jwcode", jwcode,"order_id",orderId)); |
|
|
|
|
|
|
|
HttpRequest request = HttpRequest.newBuilder() |
|
|
|
.uri(URI.create(BASE_URL_Margen + PATH)) //URL记得换 |
|
|
|
.uri(URI.create(BASE_URLProd + PATH)) //URL记得换 |
|
|
|
.header("Content-Type", "application/json") |
|
|
|
.POST(HttpRequest.BodyPublishers.ofString(body)) |
|
|
|
.build(); |
|
|
|
@ -147,7 +147,7 @@ public class RedServiceImpl implements RedService { |
|
|
|
try { |
|
|
|
String body = JSON.toJSONString(java.util.Map.of("jwcode", jwcode,"coupon_ids",redIds,"order_id",orderId)); |
|
|
|
HttpRequest request = HttpRequest.newBuilder() |
|
|
|
.uri(URI.create(BASE_URL_Margen + CONSUME_PATH)) //URL记得换 |
|
|
|
.uri(URI.create(BASE_URLProd + CONSUME_PATH)) //URL记得换 |
|
|
|
.header("Content-Type", "application/json") |
|
|
|
.POST(HttpRequest.BodyPublishers.ofString(body)) |
|
|
|
.build(); |
|
|
|
@ -238,7 +238,7 @@ public class RedServiceImpl implements RedService { |
|
|
|
// 构造参数 |
|
|
|
String body = "{\"order_id\":\"" + linkId + "\",\"amount\":" + price.divideToIntegralValue(BigDecimal.valueOf(100)).intValue() + "}"; |
|
|
|
// 构建 HttpRequest |
|
|
|
HttpRequest request = HttpRequest.newBuilder().uri(URI.create(BASE_URL_Margen+PATH_CHECK)) |
|
|
|
HttpRequest request = HttpRequest.newBuilder().uri(URI.create(BASE_URLProd+PATH_CHECK)) |
|
|
|
.header("Content-Type", "application/json") |
|
|
|
.POST(HttpRequest.BodyPublishers.ofString(body)) |
|
|
|
.build(); |
|
|
|
@ -300,7 +300,7 @@ public class RedServiceImpl implements RedService { |
|
|
|
// 构造参数 |
|
|
|
String body = "{\"order_id\":\"" + linkId + "}"; |
|
|
|
// 构建 HttpRequest |
|
|
|
HttpRequest request = HttpRequest.newBuilder() .uri(URI.create(BASE_URL_Margen+PATH_REFUND)) |
|
|
|
HttpRequest request = HttpRequest.newBuilder() .uri(URI.create(BASE_URLProd+PATH_REFUND)) |
|
|
|
.header("Content-Type", "application/json") |
|
|
|
.POST(HttpRequest.BodyPublishers.ofString(body)) |
|
|
|
.build(); |
|
|
|
|