From f72028b3b909d1a7dbd2c5e20a93c1c7dccac080 Mon Sep 17 00:00:00 2001 From: cun-nan <19819293608@163.com> Date: Wed, 6 Mar 2024 14:22:45 +0800 Subject: [PATCH] bug --- .../impl/CardFuelRecordServiceImpl.java | 15 ++++--- .../impl/CardValueRecordServiceImpl.java | 3 +- .../pagesHome/oilRecharge/oilRecharge.vue | 41 +++++++++++++------ 3 files changed, 41 insertions(+), 18 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 f7ac145f6..9bd39092a 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 @@ -463,7 +463,9 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService { //会员信息 LJUserVo ljUserVo = ljUserMapper.queryUserByChainStoreId(nowAccountInfo.getId(),store.getChainStoreId()); //员工信息 - LJStaff ljStaff = mtStaffService.selectStaffById(cardFuelRecordDTO.getMtStaffId()); + LJStaff ljStaff = new LJStaff(); + if (ObjectUtil.isNotEmpty(cardFuelRecordDTO.getMtStaffId())) + ljStaff = mtStaffService.selectStaffById(cardFuelRecordDTO.getMtStaffId()); //查询囤油卡信息 CardFuelDiesel cardFuelDiesel = cardFuelDieselService.getById(cardFuelRecordDTO.getId()); cardFuleOrders.setCardFuleId(cardFuelDiesel.getId()); @@ -491,9 +493,11 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService { cardFuleOrders.setName(ljUserVo.getName()); cardFuleOrders.setMobile(ljUserVo.getMobile()); //员工信息 - cardFuleOrders.setStaffId(ljStaff.getId()); - cardFuleOrders.setRealName(ljStaff.getRealName()); - cardFuleOrders.setStaffMobile(ljStaff.getMobile()); + if (ObjectUtil.isNotEmpty(ljStaff)) { + cardFuleOrders.setStaffId(ljStaff.getId()); + cardFuleOrders.setRealName(ljStaff.getRealName()); + cardFuleOrders.setStaffMobile(ljStaff.getMobile()); + } //订单金额 cardFuleOrders.setAmount(cardFuelDiesel.getRechargeBalance()); //支付金额 @@ -522,7 +526,8 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService { if (map.get("code").equals("success")){ return JSONObject.parseObject(JSONObject.toJSONString(map.get("data")),ReturnParameter.class); }else { - throw new Exception(map.get("msg").toString()); +// throw new Exception(map.get("msg").toString()); + return new ReturnParameter(); } } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java index 289ffe872..9fa2fd3ad 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/service/impl/CardValueRecordServiceImpl.java @@ -282,7 +282,8 @@ public class CardValueRecordServiceImpl extends ServiceImpl{ - console.log(res); - }) */ uni.reLaunch({ url: '/pagesRefuel/orderSuccess/index' })