优惠券详情
This commit is contained in:
@@ -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<MkPointsGoods> 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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user