From 285616700bc428017f20b1a5522d1b746cebb0d6 Mon Sep 17 00:00:00 2001 From: N <19819293608@163.com> Date: Sun, 28 Jan 2024 18:55:43 +0800 Subject: [PATCH] bug --- .../com/fuint/api/fuyou/service/impl/FyPayServiceImpl.java | 4 ++++ .../fuint/api/fuyou/service/impl/OilConfigServiceImpl.java | 2 +- .../main/java/com/fuint/business/order/entity/OilOrder.java | 4 ++++ .../business/order/service/impl/OilOrderServiceImpl.java | 3 ++- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/FyPayServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/FyPayServiceImpl.java index bd88c2538..71c2064c9 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/FyPayServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/FyPayServiceImpl.java @@ -184,6 +184,7 @@ public class FyPayServiceImpl implements FyPayService { // 油品订单 oilOrder.setOrderStatus("paid"); oilOrder.setPayTime(date); + oilOrderService.updateCardAndActiveById(oilOrder.getStoreId(),oilOrder.getUserId(),oilOrder.getActiveId(),oilOrder.getCouponId(),oilOrder.getActiveType(),oilOrder.getOrderAmount(), Integer.valueOf(oilOrder.getOils())); staffCommissionService.countStaffCommission(oilOrder.getStaffId(),oilOrder.getStoreId(),oilOrder.getOrderAmount(),oilOrder.getPayAmount(),oilOrder.getOilNum(),"1",orderNo); // 修改油罐容量 List jsonObjects = JSONArray.parseArray(map1.get("oilOrder"), JSONObject.class); @@ -253,6 +254,9 @@ public class FyPayServiceImpl implements FyPayService { order.setOrderStatus("paid"); order.setPayTime(date); oilOrderService.updateOilOrder(order); + + oilOrderService.updateCardAndActiveById(order.getStoreId(),order.getUserId(),order.getActiveId(),order.getCouponId(),order.getActiveType(),order.getOrderAmount(), Integer.valueOf(order.getOils())); + // 修改油罐容量 List jsonObjects = JSONArray.parseArray(map1.get("oilOrder"), JSONObject.class); for (JSONObject jsonObject : jsonObjects) { diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/OilConfigServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/OilConfigServiceImpl.java index 886f5306b..7599d6ad8 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/OilConfigServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/OilConfigServiceImpl.java @@ -119,9 +119,9 @@ public class OilConfigServiceImpl extends ServiceImpl i order.setTankId(Integer.valueOf(jsonObjects.get(0).get("tankId").toString())); order.setActiveId(Integer.valueOf(jsonObjects.get(i).get("activeId").toString())); order.setCouponId(Integer.valueOf(jsonObjects.get(i).get("cardFavorableId").toString())); + order.setActiveType(jsonObjects.get(i).get("type").toString()); if (payType.equals("CASH")){ order.setPayTime(new Date()); this.addOilTrack(jsonObjects.get(i),storeId); - this.updateCardAndActiveById(storeId,userId,order.getActiveId(),order.getCouponId(),jsonObjects.get(i).get("type").toString(),order.getOrderAmount(), Integer.valueOf(order.getOils())); + this.updateCardAndActiveById(storeId,userId,order.getActiveId(),order.getCouponId(),order.getActiveType(),order.getOrderAmount(), Integer.valueOf(order.getOils())); } if (map.get("allAmount").equals("0")){ order.setPayTime(new Date());