Browse Source

12月5日消费

milestone-20251205-消费
sunjiabei 1 month ago
parent
commit
fa719da156
  1. 6
      src/main/java/com/example/demo/serviceImpl/Temporary/RedServiceImpl.java

6
src/main/java/com/example/demo/serviceImpl/Temporary/RedServiceImpl.java

@ -39,7 +39,7 @@ public class RedServiceImpl implements RedService {
private String BASE_URLProd ;
private static final String BASE_URLDev = "http://gf977328.natappfree.cc";
private static final String PATH = "/api/coupon/IssueRechargeRedPacket";
private static final String CONSUME_PATH = "/api/coupon/updateCostRedPacket";
private static final HttpClient CLIENT = HttpClient.newHttpClient();
@Autowired
@ -111,9 +111,9 @@ public class RedServiceImpl implements RedService {
@Override
public String sendConsumeJwcode(Integer jwcode, Integer price) {
try {
String body = JSON.toJSONString(java.util.Map.of("jwcode", jwcode,"price",price));
String body = JSON.toJSONString(java.util.Map.of("jwcode", jwcode,"discount",price));
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(BASE_URLProd + PATH)) //URL记得换
.uri(URI.create(BASE_URLProd + CONSUME_PATH)) //URL记得换
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();

Loading…
Cancel
Save