From 08224daa6e11c5448247c788b5485a7aa932c0a6 Mon Sep 17 00:00:00 2001 From: Derran Date: Mon, 5 Aug 2024 17:36:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=82=AC=E8=B5=8F=E6=8B=9B=E4=BA=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../command/order/user/OrderUserCommandController.java | 2 +- .../service/order/OrderApplicationService.java | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dating-agency-mall-server/src/main/java/com/qniao/dam/api/command/order/user/OrderUserCommandController.java b/dating-agency-mall-server/src/main/java/com/qniao/dam/api/command/order/user/OrderUserCommandController.java index aa64cf8..4b2f191 100644 --- a/dating-agency-mall-server/src/main/java/com/qniao/dam/api/command/order/user/OrderUserCommandController.java +++ b/dating-agency-mall-server/src/main/java/com/qniao/dam/api/command/order/user/OrderUserCommandController.java @@ -51,7 +51,7 @@ public class OrderUserCommandController { productList.forEach(product -> product.setUserId(userId)); MarriageBountyOrder marriageBountyOrder = dto.trans2MarriageBountyOrder(); marriageBountyOrder.setUserId(userId); - return orderApplicationService.submitMarriageBountyOrder(order, productList,marriageBountyOrder); + return orderApplicationService.submitMarriageBountyOrder(order, productList, marriageBountyOrder, dto.getMeetingQuantity()); } @ApiOperation("用户计算线下活动订单费用") 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 f5cd358..3271494 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 @@ -28,7 +28,6 @@ import com.qniao.dam.domian.aggregate.product.constant.ProductSubCategoryEnum; import com.qniao.dam.domian.aggregate.product.constant.ProductTypeEnum; import com.qniao.dam.infrastructure.persistent.dao.activity.ActivityProductDao; import com.qniao.dam.infrastructure.persistent.dao.domain.MarriageInformationDao; -import com.qniao.dam.infrastructure.persistent.dao.domain.SiteActivityDao; import com.qniao.dam.infrastructure.utils.SnowFlakeUtil; import com.qniao.dam.query.marriagebounty.MarriageBountyOrderQueryService; import com.qniao.dam.query.matchmaker.MatchmakerQueryService; @@ -182,11 +181,12 @@ public class OrderApplicationService extends BaseApplicationService { */ public UserSubmitOrderVo submitMarriageBountyOrder(Order order, List productList, - MarriageBountyOrder marriageBountyOrder) { + MarriageBountyOrder marriageBountyOrder, + Integer meetingQuantity) { //1. 提交产品信息 productList.forEach(product -> handleProduct(product, product.getProductSpecList())); //2. 填充订单信息 - fillMarriageBountyOrderInfo(order, productList); + fillMarriageBountyOrderInfo(order, productList,meetingQuantity); //3. 订单金额计算 countOrderAmount(order, false); //4. 设置订单号 @@ -213,7 +213,7 @@ public class OrderApplicationService extends BaseApplicationService { } } - private void fillMarriageBountyOrderInfo(Order order, List productList) { + private void fillMarriageBountyOrderInfo(Order order, List productList, Integer meetingQuantity) { MarriageBountyOrder marriageBountyOrder = marriageBountyOrderQueryService.queryBy(order.getUserId(), order.getMiId(), MarriageBountyOrderStatusEnum.MATCHMAKING, MarriageBountyOrderPaymentStatusEnum.PAID); order.setOrderBelonging(OrderBelongingEnum.CUSTOMER); MarriageInformation marriageInformation = marriageInformationDao.selectById(order.getMiId()); @@ -235,7 +235,7 @@ public class OrderApplicationService extends BaseApplicationService { orderItem.setUnitSettlementPrice(productSpec.getUnitSellingPrice()); orderItem.setQuantity(1); if (ProductSubCategoryEnum.MARRIAGE_BOUNTY_MEETING_FEE.equals(product.getSubCategory())) { - orderItem.setQuantity(marriageBountyMeetingQuantity); + orderItem.setQuantity(meetingQuantity); } orderItemList.add(orderItem); }