From ab78aa6ac8cfc89967a889da998d9e7ad6322e0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=9D=BE?= <8605635+zhang3064194730@user.noreply.gitee.com> Date: Fri, 15 Nov 2024 14:27:41 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=AE=A2=E5=8D=95=E4=BC=98=E6=83=A0?= =?UTF-8?q?=E5=88=B8=E4=BF=A1=E6=81=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/shopimpl/TbShopTableServiceImpl.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/shopimpl/TbShopTableServiceImpl.java b/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/shopimpl/TbShopTableServiceImpl.java index 33d05fac..fe28005b 100644 --- a/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/shopimpl/TbShopTableServiceImpl.java +++ b/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/shopimpl/TbShopTableServiceImpl.java @@ -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 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());