From d072b840467be1fcdcf13cf80d9671f3abf6ed0e Mon Sep 17 00:00:00 2001 From: liujie <liujie> Date: 星期一, 11 十二月 2023 09:41:03 +0800 Subject: [PATCH] 12.11 --- cloud-server-other/src/main/java/com/dsh/other/controller/SiteController.java | 31 ++++++++++++++++++++++++++++++- 1 files changed, 30 insertions(+), 1 deletions(-) diff --git a/cloud-server-other/src/main/java/com/dsh/other/controller/SiteController.java b/cloud-server-other/src/main/java/com/dsh/other/controller/SiteController.java index da42599..71470b8 100644 --- a/cloud-server-other/src/main/java/com/dsh/other/controller/SiteController.java +++ b/cloud-server-other/src/main/java/com/dsh/other/controller/SiteController.java @@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.dsh.other.entity.*; +import com.dsh.other.feignclient.CourseRecordClient; import com.dsh.other.feignclient.account.CityManagerClient; import com.dsh.other.feignclient.activity.UserCouponClient; import com.dsh.other.feignclient.activity.model.QueryUserCouponByIdAndUserId; @@ -372,7 +373,13 @@ } } + @Autowired + private TGameConfigService gameConfigService; + @Autowired + private TGameRecordService gameRecordService; + @Resource + private CourseRecordClient courseRecordClient; /** * 启动游戏支付宝回调 * @@ -388,7 +395,7 @@ if (null != map) { String code = map.get("passback_params"); -// String trade_no = map.get("trade_no"); + String trade_no = map.get("trade_no"); // SiteBooking siteBooking = siteBookingService.getOne(new QueryWrapper<SiteBooking>().eq("orderNo", code).eq("state", 1)); // if(siteBooking.getStatus() == 0){ // siteBooking.setPayTime(new Date()); @@ -399,6 +406,28 @@ String[] s = code.split("_"); Integer i = startGame(Integer.valueOf(s[0]), Integer.valueOf(s[1]), Integer.valueOf(s[2]), Integer.valueOf(s[3])); + List<TGameRecord> list = gameRecordService.list(new QueryWrapper<TGameRecord>().eq("number", s[4]).eq("payType", 2)); + TGameRecord one = list.get(0); + TGameConfig config = gameConfigService.getById(s[5]); + for (TGameRecord coursePackagePayment : list) { + coursePackagePayment.setStatus(1); + coursePackagePayment.setMoney(config.getCash()); + coursePackagePayment.setOrderNo(trade_no); + + CourseCounsum courseCounsum = new CourseCounsum(); +// courseCounsum.setPaymentId(paymentId); + courseCounsum.setChangeType(3); + courseCounsum.setInsertTime(new Date()); + courseCounsum.setReason("智慧球场;" + config.getCash()); + courseCounsum.setAppUserId(Integer.valueOf(s[0])); + courseRecordClient.save(courseCounsum); + + } + gameRecordService.updateBatchById(list); + + + + System.err.println("===========游戏回调游戏回调=========" + i); PrintWriter out = response.getWriter(); out.write("success"); -- Gitblit v1.7.1