feat: 订单优惠券信息修改
This commit is contained in:
@@ -2034,7 +2034,13 @@ public class TbShopTableServiceImpl implements TbShopTableService {
|
|||||||
// 消耗优惠券并返回上次未使用的券
|
// 消耗优惠券并返回上次未使用的券
|
||||||
consumeCoupon(couponInfo.getOutRecordList(), payDTO.getVipUserId(), orderInfo);
|
consumeCoupon(couponInfo.getOutRecordList(), payDTO.getVipUserId(), orderInfo);
|
||||||
|
|
||||||
orderInfo.setCouponInfoList(JSONObject.toJSONString(couponInfo));
|
couponInfo.setProductCouponMap(BeanUtil.copyProperties(couponInfo.getProductCouponMap(), HashMap.class));
|
||||||
|
HashMap<String, Object> map = new HashMap<>();
|
||||||
|
map.put("outRecordList", couponInfo.getOutRecordList());
|
||||||
|
map.put("fullReductionCoupon", couponInfo.getFullReductionCouponMap().values());
|
||||||
|
map.put("productCoupon", couponInfo.getProductCouponMap().values());
|
||||||
|
orderInfo.setCouponInfoList(JSONObject.toJSONString(map));
|
||||||
|
// orderInfo.setCouponInfoList(JSONObject.toJSONString(couponInfo));
|
||||||
|
|
||||||
// 修改订单detail
|
// 修改订单detail
|
||||||
mpOrderDetailService.saveOrUpdateBatch(priceDTO.getOrderDetailList());
|
mpOrderDetailService.saveOrUpdateBatch(priceDTO.getOrderDetailList());
|
||||||
|
|||||||
Reference in New Issue
Block a user