From f4894c44735012e51b7f3ade126b5bf9d7757202 Mon Sep 17 00:00:00 2001
From: mitao <2763622819@qq.com>
Date: 星期五, 11 四月 2025 21:37:34 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/2.0' into 2.0
---
cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupServiceImpl.java | 28 ++++++++++++++++++----------
1 files changed, 18 insertions(+), 10 deletions(-)
diff --git a/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupServiceImpl.java b/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupServiceImpl.java
index aa8c625..4823159 100644
--- a/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupServiceImpl.java
+++ b/cloud-server-communityWorldCup/src/main/java/com/dsh/communityWorldCup/service/impl/WorldCupServiceImpl.java
@@ -173,6 +173,7 @@
ids.add(worldCupCompetitor.getId());
//已参赛
if(0 == worldCupPaymentParticipant.getAlreadyEntered()){
+ worldCupPaymentParticipant.setWorldCupId(null);
worldCupPaymentParticipant.setAlreadyEntered(1);
worldCupPaymentParticipantService.updateById(worldCupPaymentParticipant);
}
@@ -180,19 +181,22 @@
worldCup.setMatchNumber(worldCup.getMatchNumber() + 1);
this.updateById(worldCup);
+ JSONObject jsonObject = new JSONObject();
+ jsonObject.put("gameType", 1);
+ jsonObject.put("ids", ids);
//2、调起开启游戏的接口。
HashMap<String, String> map = new HashMap<>();
map.put("sign", "0DB011836143EEE2C2E072967C9F4E4B");
- map.put("space_id", tGame.getStoreId() + "");
+ map.put("space_id", tGame.getSiteId() + "");
map.put("red_sutu_id", tGame.getRed());
map.put("blue_sutu_id", tGame.getBlue());
- map.put("api_url", "http://221.182.45.100:56666/communityWorldCup/base/worldCup/endWorldCupCallback");
- map.put("custom", JSON.toJSONString(ids));
+ map.put("api_url", "https://online.daowepark.com:443/communityWorldCup/base/worldCup/endWorldCupCallback");
+ map.put("custom", jsonObject.toJSONString());
- String s = HttpRequestUtil.postRequest("https://try.daowepark.com/v7/user_api/general/quickStart", map);
- JSONObject jsonObject = JSONObject.parseObject(s);
- Integer code1 = jsonObject.getInteger("code");
- String message = jsonObject.getString("message");
+ String s = HttpRequestUtil.postRequest("https://port.daowepark.com/v7/user_api/general/quickStart", map);
+ JSONObject jsonObject1 = JSONObject.parseObject(s);
+ Integer code1 = jsonObject1.getInteger("code");
+ String message = jsonObject1.getString("message");
if (200 == code1) {
return ResultUtil.success();
} else {
@@ -536,7 +540,7 @@
worldCupPayment.setUnitPrice(worldCupPayment.getAmount().divide(new BigDecimal(num)));
worldCupPaymentService.save(worldCupPayment);
return payMoneyUtil.weixinpay("社区世界杯报名", "", worldCupPayment.getCode(),
- worldCup.getCash().toString(), "/base/worldCup/wxPayWorldCupCallback", "APP", "");
+ worldCupPayment.getAmount().toString(), "/base/worldCup/wxPayWorldCupCallback", "APP", "");
}
//支付宝
if(payType == 2){
@@ -544,7 +548,7 @@
worldCupPayment.setUnitPrice(worldCupPayment.getAmount().divide(new BigDecimal(num)));
worldCupPaymentService.save(worldCupPayment);
return payMoneyUtil.alipay("2088330203191220", "社区世界杯报名", "世界杯报名", "", worldCupPayment.getCode(),
- worldCup.getCash().toString(), "/base/worldCup/aliPayWorldCupCallback");
+ worldCupPayment.getAmount().toString(), "/base/worldCup/aliPayWorldCupCallback");
}
//玩湃币
if(payType == 3){
@@ -593,7 +597,7 @@
List<CoursePackageOrderStudent> coursePackageOrderStudent = coursePackageOrderStudentClient.getCoursePackageOrderUser(paymentWorldCup.getUid());
int sum = coursePackageOrderStudent.stream().mapToInt(CoursePackageOrderStudent::getLaveClassHours).sum();
- if(sum < worldCup.getClassHour()){
+ if(sum < worldCup.getClassHour() * num){
return ResultUtil.error("报名失败,课时不足,请续课!");
}
@@ -840,6 +844,10 @@
}
}
+
+ WorldCup worldCup = this.getById(id);
+ worldCup.setStatus(4);
+ this.updateById(worldCup);
}
--
Gitblit v1.7.1