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())) {