feat: 订单优惠券信息修改

This commit is contained in:
张松 2024-11-15 14:27:41 +08:00
parent 641b5cb0a9
commit ab78aa6ac8
1 changed files with 7 additions and 1 deletions

View File

@ -2034,7 +2034,13 @@ public class TbShopTableServiceImpl implements TbShopTableService {
// 消耗优惠券并返回上次未使用的券
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
mpOrderDetailService.saveOrUpdateBatch(priceDTO.getOrderDetailList());