From 9bcc40d213a44498c46dae5e678e592b918b40b0 Mon Sep 17 00:00:00 2001 From: rentaiming <806181062@qq.com> Date: 星期四, 30 五月 2024 18:33:54 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsGroupPurchaseServiceImpl.java | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsGroupPurchaseServiceImpl.java b/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsGroupPurchaseServiceImpl.java index 6423dd4..ba23349 100644 --- a/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsGroupPurchaseServiceImpl.java +++ b/ruoyi-modules/ruoyi-goods/src/main/java/com/ruoyi/goods/service/impl/GoodsGroupPurchaseServiceImpl.java @@ -100,6 +100,12 @@ if (StringUtils.isNull(groupPurchase)) { throw new ServiceException("团购商品不存在"); } + if (groupPurchase.getStartStatus().equals(StartStatusEnum.STARTED)) { + throw new ServiceException("已开始的团购商品不能编辑"); + } + if (groupPurchase.getStartStatus().equals(StartStatusEnum.ENDED)) { + throw new ServiceException("已结束的团购商品不能编辑"); + } int originGroupStock = groupPurchase.getLimitNumber() * groupPurchase.getGroupSize(); GoodsSku goodsSku = goodsSkuService.getById(dto.getGoodsSkuId()); if (StringUtils.isNull(goodsSku)) { -- Gitblit v1.7.1