From 9764afb6bddbd5d5b049a75491995df30584bb29 Mon Sep 17 00:00:00 2001 From: tangqian Date: Fri, 19 May 2023 19:10:18 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=AF=E4=BB=98=E5=AE=9D=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E6=94=AF=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/shop/service/order/impl/StoreOrderServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/order/impl/StoreOrderServiceImpl.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/order/impl/StoreOrderServiceImpl.java index e620add2b..981a0a3a6 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/order/impl/StoreOrderServiceImpl.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/order/impl/StoreOrderServiceImpl.java @@ -1408,7 +1408,9 @@ public class StoreOrderServiceImpl extends ServiceImpl> collect1 = infoDOS.stream().collect(Collectors.groupingBy(PhoneRecordDO::getRechargeGearId)); orderInfos.forEach(info -> { - Assert.isTrue(CollectionUtils.isEmpty(collect1.get(info.getGearId())), "该挡位:" + info.getName() + "你已购买,请勿重复操作"); + if (!CollectionUtils.isEmpty(collect1.get(info.getGearId()))) { + throw new ServiceException("该挡位:" + info.getName() + "你已购买,请勿重复操作"); + } }); } if (StringUtils.isNotBlank(request.getUserPhone()) && StringUtils.isNotBlank(request.getConfirmPhone())) {