From 06c7348b197ede0b68e6d02f019bf81892329b88 Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期二, 19 三月 2024 18:07:12 +0800 Subject: [PATCH] 修改bug --- cloud-server-other/src/main/java/com/dsh/other/controller/GameController.java | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cloud-server-other/src/main/java/com/dsh/other/controller/GameController.java b/cloud-server-other/src/main/java/com/dsh/other/controller/GameController.java index 73b6c4e..c2abaf0 100644 --- a/cloud-server-other/src/main/java/com/dsh/other/controller/GameController.java +++ b/cloud-server-other/src/main/java/com/dsh/other/controller/GameController.java @@ -205,11 +205,12 @@ try { int num = 1; int wait = 0; - while (num <= 10) { + while (num <= 15) { int min = 5000; wait += (min * num); Thread.sleep(wait); - List<TGameRecord> list = gameRecordService.list(new QueryWrapper<TGameRecord>().eq("code", code).eq("payType", 2)); + List<TGameRecord> list = gameRecordService + .list(new QueryWrapper<TGameRecord>().eq("number", code).eq("payType", 1)); TGameRecord one = list.get(0); if (one.getStatus() == 1) { @@ -229,7 +230,7 @@ Map<String, String> data1 = resultUtil.getData(); String s = data1.get("trade_state"); String transaction_id = data1.get("transaction_id"); - if ("REFUND".equals(s) || "NOTPAY".equals(s) || "CLOSED".equals(s) || "REVOKED".equals(s) || "PAYERROR".equals(s) || num == 10) { + if ("REFUND".equals(s) || "CLOSED".equals(s) || "REVOKED".equals(s) || "PAYERROR".equals(s) || num == 10) { break; } if ("SUCCESS".equals(s)) { @@ -237,12 +238,13 @@ coursePackagePayment.setStatus(1); coursePackagePayment.setMoney(config.getCash()); coursePackagePayment.setOrderNo(transaction_id); + } gameRecordService.updateBatchById(list); Integer integer = startGame(uid, gameId, spaceId, sutuId); break; } - if ("USERPAYING".equals(s)) { + if ("USERPAYING".equals(s) || "NOTPAY".equals(s)) { num++; } } -- Gitblit v1.7.1