From 3a1579d2813421c3e29bdd2a6733b1efa4fed063 Mon Sep 17 00:00:00 2001 From: wangw <1594593906@qq.com> Date: Wed, 21 Jan 2026 16:06:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E6=83=A0=E5=88=B8=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../czg/controller/user/UPointGoodsController.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cash-api/order-server/src/main/java/com/czg/controller/user/UPointGoodsController.java b/cash-api/order-server/src/main/java/com/czg/controller/user/UPointGoodsController.java index 79b2e832b..f6274bd62 100644 --- a/cash-api/order-server/src/main/java/com/czg/controller/user/UPointGoodsController.java +++ b/cash-api/order-server/src/main/java/com/czg/controller/user/UPointGoodsController.java @@ -2,8 +2,10 @@ package com.czg.controller.user; import com.czg.market.entity.MkPointsGoods; import com.czg.market.entity.MkPointsGoodsRecord; +import com.czg.market.entity.ShopCoupon; import com.czg.market.service.MkPointsGoodsRecordService; import com.czg.market.service.MkPointsGoodsService; +import com.czg.market.service.ShopCouponService; import com.czg.order.dto.CommonRefundDTO; import com.czg.order.dto.LtPayOtherDTO; import com.czg.order.service.PointsGoodPayService; @@ -35,6 +37,8 @@ public class UPointGoodsController { private MkPointsGoodsRecordService goodsRecordService; @Resource private PointsGoodPayService goodPayService; + @Resource + private ShopCouponService shopCouponService; /** * 商品列表 @@ -57,6 +61,14 @@ public class UPointGoodsController { */ @GetMapping("/{id}") public CzgResult getPointsGoodsSettingById(@PathVariable("id") Long id) { + MkPointsGoods goods = pointsGoodsService.getById(id); + if ("优惠券".equals(goods.getGoodsCategory())) { + ShopCoupon one = shopCouponService.getOne(QueryWrapper.create().eq(ShopCoupon::getId, goods.getCouponId()) + .eq(ShopCoupon::getShopId, goods.getShopId()) + .eq(ShopCoupon::getStatus, 1) + .eq(ShopCoupon::getIsDel, 0)); + goods.setCouponInfo(one); + } return CzgResult.success(pointsGoodsService.getById(id)); }