From b95712aef33d827d81298c85985de165a8d2460e Mon Sep 17 00:00:00 2001 From: Chopper711 Date: Thu, 23 Mar 2023 16:45:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BA=97=E9=93=BA=E8=A2=AB=E6=8B=92?= =?UTF-8?q?=E7=BB=9D=E5=90=8E=E6=97=A0=E6=B3=95=E5=86=8D=E6=AC=A1=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E5=BA=97=E9=93=BA=E9=97=AE=E9=A2=98=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=E3=80=82=E4=BF=AE=E6=94=B9=E4=B8=BA=E5=BA=97=E9=93=BA=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E5=9C=A8=E7=94=B3=E8=AF=B7=E4=B8=AD=E3=80=81=E5=BC=80?= =?UTF-8?q?=E5=90=AF=E3=80=81=E5=85=B3=E9=97=AD=E7=8A=B6=E6=80=81=E6=97=B6?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E7=94=B3=E8=AF=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/store/serviceimpl/StoreServiceImpl.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/framework/src/main/java/cn/lili/modules/store/serviceimpl/StoreServiceImpl.java b/framework/src/main/java/cn/lili/modules/store/serviceimpl/StoreServiceImpl.java index 4c6931c9..ea77b45b 100644 --- a/framework/src/main/java/cn/lili/modules/store/serviceimpl/StoreServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/store/serviceimpl/StoreServiceImpl.java @@ -342,10 +342,11 @@ public class StoreServiceImpl extends ServiceImpl implements */ private void checkStoreStatus(Store store) { - //如果店铺状态为申请中或者已申请,则正常走流程,否则抛出异常 - if (store.getStoreDisable().equals(StoreStatusEnum.APPLY.name()) || store.getStoreDisable().equals(StoreStatusEnum.APPLYING.name())) { - return; - } else { + //如果店铺状态为已开启、已关闭、申请中,则抛出异常 + if (store.getStoreDisable().equals(StoreStatusEnum.OPEN.name()) + || store.getStoreDisable().equals(StoreStatusEnum.CLOSED.name()) + || store.getStoreDisable().equals(StoreStatusEnum.APPLYING.name()) + ) { throw new ServiceException(ResultCode.STORE_STATUS_ERROR); } @@ -381,7 +382,7 @@ public class StoreServiceImpl extends ServiceImpl implements AuthUser currentUser = UserContext.getCurrentUser(); List skuIdList = new ArrayList<>(); for (FootPrint footPrint : footprintService.list(new LambdaUpdateWrapper().eq(FootPrint::getStoreId, currentUser.getStoreId()).eq(FootPrint::getMemberId, memberId))) { - if(footPrint.getSkuId() != null){ + if (footPrint.getSkuId() != null) { skuIdList.add(footPrint.getSkuId()); } }