From 7154546662bb3c36bbecef320d4336c1479ac54c 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, 2 Jan 2024 09:18:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=85=E5=80=BC=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/CardFuelRecordServiceImpl.java | 18 ++++++++++----- gasStation-uni/pagesHome/activeIn/index.vue | 8 ++++++- .../pagesHome/oilRecharge/oilRecharge.vue | 12 +++++++--- gasStation-uni/pagesHome/order/order.vue | 1 - gasStation-uni/pagesMy/invite/invite.vue | 22 ++++++++++++++++++- 5 files changed, 50 insertions(+), 11 deletions(-) diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelRecordServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelRecordServiceImpl.java index 37496c45a..f30ebe18f 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelRecordServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelRecordServiceImpl.java @@ -218,7 +218,6 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService { map.put("privateKey", merchantConfig.getPrivateKey()); map.put("type", "CFR"); map.put("orderId", cardFuelRecordDTO.getId().toString()); - map.put("storeId", nowAccountInfo.getStoreId().toString()); // 调用支付接口 try { fyPayService.pay(map); @@ -483,12 +482,21 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService { String refuelMoney = userBalance.getRefuelMoney(); List jsonObjectList = JSONArray.parseArray(refuelMoney, JSONObject.class); for (JSONObject jsonObject : jsonObjectList) { + if (cardFuleOrders.getOilType().equals(jsonObject.getString("oilType"))){ + double refuelMoney1 = jsonObject.getDouble("refuelMoney"); + refuelMoney1 = (cardFuleOrders.getIncomeLitres() + refuelMoney1); + jsonObject.put("refuelMoney", refuelMoney1).toString(); + }else { + JSONObject jsonObject1 = new JSONObject(); + jsonObject1.put("type",cardFuleOrders.getType()); + jsonObject1.put("oilType",cardFuleOrders.getOilType()); + jsonObject1.put("incomeLitres",cardFuleOrders.getIncomeLitres()); + jsonObjectList.add(jsonObject1); + } } - //String type = json.getString("type"); - - //afterLitres = userBalance.getRefuelMoney() + cardFuleOrders.getIncomeLitres(); - //userBalance.setCardBalance(afterBalance); + String userBnlancce = jsonObjectList.toString(); + userBalance.setRefuelMoney(userBnlancce); } userBalanceService.updateUserBalance(userBalance); }else { diff --git a/gasStation-uni/pagesHome/activeIn/index.vue b/gasStation-uni/pagesHome/activeIn/index.vue index f27f34cfd..027b96e89 100644 --- a/gasStation-uni/pagesHome/activeIn/index.vue +++ b/gasStation-uni/pagesHome/activeIn/index.vue @@ -201,11 +201,17 @@ }, onLoad(option) { this.title = option.name - + console.log(option.name); this.getData(option.name); }, methods: { goTopup() { + // pagesMy/invite/invite + if (this.title == '推荐有礼活动') { + uni.navigateTo({ + url: '/pagesMy/invite/invite' + }) + } uni.navigateTo({ url: '/pagesHome/oilRecharge/oilRecharge' }) diff --git a/gasStation-uni/pagesHome/oilRecharge/oilRecharge.vue b/gasStation-uni/pagesHome/oilRecharge/oilRecharge.vue index 0956ea005..cdd91ff56 100644 --- a/gasStation-uni/pagesHome/oilRecharge/oilRecharge.vue +++ b/gasStation-uni/pagesHome/oilRecharge/oilRecharge.vue @@ -43,8 +43,8 @@ - - + + 立即充值 @@ -124,7 +124,7 @@ 立即兑换 - + 兑换记录 @@ -393,6 +393,12 @@ console.log("columns", this.columns); }) + }, + golpk() { + uni.navigateTo({ + url: '/pagesHome/RechargeRecords/RechargeRecords' + }) + } } } diff --git a/gasStation-uni/pagesHome/order/order.vue b/gasStation-uni/pagesHome/order/order.vue index b036d73a7..352ddf01f 100644 --- a/gasStation-uni/pagesHome/order/order.vue +++ b/gasStation-uni/pagesHome/order/order.vue @@ -115,7 +115,6 @@