From c55335539954a0f8568acf153281c793e8a72057 Mon Sep 17 00:00:00 2001 From: "996472796@qq.com" <996472796@qq.com> Date: Fri, 12 Apr 2024 15:32:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9Evpi=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/order/OrderApplicationService.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/dating-agency-mall-server/src/main/java/com/qniao/dam/application/service/order/OrderApplicationService.java b/dating-agency-mall-server/src/main/java/com/qniao/dam/application/service/order/OrderApplicationService.java index 382e805..0fe1c3d 100644 --- a/dating-agency-mall-server/src/main/java/com/qniao/dam/application/service/order/OrderApplicationService.java +++ b/dating-agency-mall-server/src/main/java/com/qniao/dam/application/service/order/OrderApplicationService.java @@ -95,10 +95,12 @@ public class OrderApplicationService { orderItem.setUnitSettlementPrice(activityProduct.getActivityUnitSellingPrice()); } //1.1. 同类型权益,不同规格,限制购买和提醒 - if (ProductTypeEnum.VIRTUAL.equals(product.getProductType())) { - boolean diffFlag = orderQueryService.checkDiffSpecRight(order, orderItem, productSpec); - if (diffFlag) { - throw new BizException("您已经拥有相同类型的权益"); + if(order.getGroupType() == null || order.getGroupType() == 0) { + if (ProductTypeEnum.VIRTUAL.equals(product.getProductType())) { + boolean diffFlag = orderQueryService.checkDiffSpecRight(order, orderItem, productSpec); + if (diffFlag) { + throw new BizException("您已经拥有相同类型的权益"); + } } } }