puzhibing
2023-07-26 818e8d1810bcdcbeae5a948ecd115ff0ce5a1f54
cloud-server-competition/src/main/java/com/dsh/competition/service/impl/CompetitionServiceImpl.java
@@ -226,6 +226,8 @@
            appUser.setPlayPaiCoins(appUser.getPlayPaiCoins() - money.intValue());
            appUserClient.updateAppUser(appUser);
            paymentCompetition = paymentCompetitionService.getById(paymentCompetition.getId());
            paymentCompetition.setAppUserId(null);
            paymentCompetition.setPayStatus(2);
            paymentCompetition.setPayTime(new Date());
            paymentCompetition.setPayOrderNo("");
@@ -244,6 +246,8 @@
                paymentDeductionClassHour.setCode(code);
                coursePackagePaymentClient.paymentDeductionClassHour(paymentDeductionClassHour);
            }
            paymentCompetition = paymentCompetitionService.getById(paymentCompetition.getId());
            paymentCompetition.setAppUserId(null);
            paymentCompetition.setPayStatus(2);
            paymentCompetition.setPayTime(new Date());
            paymentCompetition.setPayOrderNo("");
@@ -295,11 +299,13 @@
                                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){
                                    paymentCompetition.setAppUserId(null);
                                    paymentCompetition.setState(3);
                                    userCompetitionService.remove(new QueryWrapper<UserCompetition>().eq("paymentCompetitionId", paymentCompetition.getId()));
                                    break;
                                }
                                if("SUCCESS".equals(s)){
                                    paymentCompetition.setAppUserId(null);
                                    paymentCompetition.setPayStatus(2);
                                    paymentCompetition.setPayTime(new Date());
                                    paymentCompetition.setPayOrderNo(transaction_id);
@@ -357,11 +363,13 @@
                                String s = data1.get("tradeStatus");
                                String tradeNo = data1.get("tradeNo");
                                if("TRADE_CLOSED".equals(s) || "TRADE_FINISHED".equals(s) || num == 10){
                                    paymentCompetition.setAppUserId(null);
                                    paymentCompetition.setState(3);
                                    userCompetitionService.remove(new QueryWrapper<UserCompetition>().eq("paymentCompetitionId", paymentCompetition.getId()));
                                    break;
                                }
                                if("TRADE_SUCCESS".equals(s)){
                                    paymentCompetition.setAppUserId(null);
                                    paymentCompetition.setPayStatus(2);
                                    paymentCompetition.setPayTime(new Date());
                                    paymentCompetition.setPayOrderNo(tradeNo);