liujie
2023-12-11 d072b840467be1fcdcf13cf80d9671f3abf6ed0e
12.11
2个文件已修改
33 ■■■■■ 已修改文件
cloud-server-other/src/main/java/com/dsh/other/controller/GameController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-other/src/main/java/com/dsh/other/controller/SiteController.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cloud-server-other/src/main/java/com/dsh/other/controller/GameController.java
@@ -213,7 +213,7 @@
            } else if (type == 2) {
//                Integer gameId, Integer configId,Integer type,Integer sutuId,Integer spaceId;
                String params = uid + "_" + gameId + "_" + spaceId + "_" + sutuId;
                String params = uid + "_" + gameId + "_" + spaceId + "_" + sutuId+"_"+code+"_"+configId;
                ResultUtil alipay = payMoneyUtil.alipay("游戏支付", "游戏支付", params, code, config.getCash().toString(), "/base/site/gameCallback");
                if (alipay.getCode() == 200) {
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");