From deb613b44ef4591f94046e583fc9efe83df5b1ca Mon Sep 17 00:00:00 2001 From: cun-nan <19819293608@163.com> Date: Wed, 12 Jun 2024 16:21:04 +0800 Subject: [PATCH] bug --- .../order/service/impl/OilOrderServiceImpl.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java index 18a1d2202..c4bc0f56d 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java @@ -1479,10 +1479,12 @@ public class OilOrderServiceImpl extends ServiceImpl i oilOrder.setUserId(nowAccountInfo.getId()); oilOrder.setOilTagSn(oilOrder.getOilTagSn()); TagCode tagCode = tagCodeService.selectByTagCodeSn(oilOrder.getOilTagSn()); - String collection = tagCode.getCollection(); - if (collection.contains("staffId")){ - String[] split = collection.split("staffId="); - oilOrder.setStaffId(Integer.parseInt(split[1])); + if (ObjectUtil.isNotEmpty(tagCode)) { + String collection = tagCode.getCollection(); + if (collection.contains("staffId")) { + String[] split = collection.split("staffId="); + oilOrder.setStaffId(Integer.parseInt(split[1])); + } } // 判断当前店铺是否存在此用户的会员信息,没有的话进行添加 LJStore store = storeService.selectStoreByStoreId(oilOrder.getStoreId());