From 9b7f5f30fac3f3aeb94b7a955d002cd49c60138f Mon Sep 17 00:00:00 2001 From: Chopper Date: Thu, 5 Aug 2021 18:13:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E9=97=AD=E5=BA=97=E9=93=BA=EF=BC=8C?= =?UTF-8?q?=E5=A6=82=E6=9E=9C=E5=95=86=E5=93=81id=E9=9B=86=E5=90=88?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA=EF=BC=8C=E5=88=99=E4=B8=8D=E5=81=9A=E5=A4=84?= =?UTF-8?q?=E7=90=86=EF=BC=8C=E8=A7=A3=E5=86=B3=E7=A9=BA=E6=8C=87=E9=92=88?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/lili/modules/goods/serviceimpl/GoodsServiceImpl.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsServiceImpl.java b/framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsServiceImpl.java index 50750b80..9d57ebcb 100644 --- a/framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsServiceImpl.java @@ -278,6 +278,12 @@ public class GoodsServiceImpl extends ServiceImpl implements @Override public Boolean updateGoodsMarketAble(List goodsIds, GoodsStatusEnum goodsStatusEnum, String underReason) { + + //如果商品为空,直接返回 + if (goodsIds == null || goodsIds.isEmpty()) { + return true; + } + LambdaUpdateWrapper updateWrapper = Wrappers.lambdaUpdate(); updateWrapper.set(Goods::getMarketEnable, goodsStatusEnum.name()); updateWrapper.set(Goods::getUnderMessage, underReason);