From 49ac39e9086fda091407ab532bbf0e5be774b4e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BD=90=E5=A4=A9=E5=A4=A7=E5=9C=A3?= <17615834396@163.com> Date: Tue, 23 Jan 2024 10:42:12 +0800 Subject: [PATCH] bug --- .../impl/CardFavorableRecordServiceImpl.java | 2 - .../pagesHome/oilRecharge/oilRecharge.vue | 78 +++++++++++++++++++ 2 files changed, 78 insertions(+), 2 deletions(-) diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableRecordServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableRecordServiceImpl.java index ff68cdff0..c2d2cf090 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableRecordServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFavorable/service/impl/CardFavorableRecordServiceImpl.java @@ -71,8 +71,6 @@ public class CardFavorableRecordServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); if (ObjectUtils.isNotEmpty(cardFavorableRecord.getMobile())){ diff --git a/gasStation-uni/pagesHome/oilRecharge/oilRecharge.vue b/gasStation-uni/pagesHome/oilRecharge/oilRecharge.vue index 409e28d51..ce2cf6133 100644 --- a/gasStation-uni/pagesHome/oilRecharge/oilRecharge.vue +++ b/gasStation-uni/pagesHome/oilRecharge/oilRecharge.vue @@ -312,6 +312,45 @@ } }); } + if (_this.appltType == "ALIPAY") { + my.tradePay({ + tradeNO: res.data.data.reservedTransactionId + }, function(resp) { + if (resp.resultCode == '9000') { + console.log("支付成功") + // 支付成功后调用修改使用后的优惠券情况 + /* _this.preferentialData.storeId = _this.oilOrder.storeId + _this.preferentialData.orderAmount = _this.oilOrder.orderAmount + _this.preferentialData.oilId = _this.oilOrder.oils + _this.preferentialData.mtUserLevel = _this.user.gradeId + request({ + url: "business/marketingActivity/cardFavorableRecord/updateCardAndActiveById", + method: 'post', + data: _this.preferentialData, + }).then((res)=>{ + console.log(res); + }) */ + uni.reLaunch({ + url: '/pagesRefuel/orderSuccess/index' + }) + } else { + request({ + url: "/business/allOrderInfo/orderStatus", + method: 'post', + data: { + "orderNo": res.data.data.orderNo, + "status": "payFail" + }, + }).then((res) => { + uni.showToast({ + title: "支付失败!", + icon: "error" + }) + }) + console.log('支付失败,' + resp.resultCode); + } + }); + } }) }, @@ -381,6 +420,45 @@ } }); } + if (_this.appltType == "ALIPAY") { + my.tradePay({ + tradeNO: res.data.data.reservedTransactionId + }, function(resp) { + if (resp.resultCode == '9000') { + console.log("支付成功") + // 支付成功后调用修改使用后的优惠券情况 + /* _this.preferentialData.storeId = _this.oilOrder.storeId + _this.preferentialData.orderAmount = _this.oilOrder.orderAmount + _this.preferentialData.oilId = _this.oilOrder.oils + _this.preferentialData.mtUserLevel = _this.user.gradeId + request({ + url: "business/marketingActivity/cardFavorableRecord/updateCardAndActiveById", + method: 'post', + data: _this.preferentialData, + }).then((res)=>{ + console.log(res); + }) */ + uni.reLaunch({ + url: '/pagesRefuel/orderSuccess/index' + }) + } else { + request({ + url: "/business/allOrderInfo/orderStatus", + method: 'post', + data: { + "orderNo": res.data.data.orderNo, + "status": "payFail" + }, + }).then((res) => { + uni.showToast({ + title: "支付失败!", + icon: "error" + }) + }) + console.log('支付失败,' + resp.resultCode); + } + }); + } }) },