|
|
|
@ -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<Product> 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<Product> productList) { |
|
|
|
private void fillMarriageBountyOrderInfo(Order order, List<Product> 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); |
|
|
|
} |
|
|
|
|