完善了订单信息

This commit is contained in:
chen-xin-zhi 2024-11-10 20:08:49 +08:00
parent f88b3d60e5
commit f0fcb85236

View File

@ -108,6 +108,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
ThrowUtils.throwIf(orderTypeEnum == null, ErrorCode.PARAMS_ERROR);
AddressSnapshot addressSnapshot = null;
ContactsSnapshot contactsSnapshot = null;
CouponSnapshot couponSnapshot = null;
// 获取订单地址信息
if (orderTypeEnum.equals(GoodTypeEnum.PRODUCT)) {
@ -118,8 +119,9 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
contactsSnapshot = getSnapshot(contactsId, contactsMapper, ContactsSnapshot.class);
}
// 获取订单优惠券信息
CouponSnapshot couponSnapshot = getSnapshot(couponId, couponMapper, CouponSnapshot.class);
if (couponId != null) {
couponSnapshot = getSnapshot(couponId, couponMapper, CouponSnapshot.class);
}
// 封装订单明细信息
List<OrderItemAddRequest> orderItemAddRequestList = orderItemMainInfoAddRequestList.stream().map(orderItemMainInfoAddRequest -> {
Long goodId = orderItemMainInfoAddRequest.getGoodId();