用户获取优惠券
This commit is contained in:
parent
ce2af8c5be
commit
39b37ea8bc
|
|
@ -2,6 +2,7 @@ package com.czg.controller.admin;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.thread.ThreadUtil;
|
import cn.hutool.core.thread.ThreadUtil;
|
||||||
|
import com.czg.account.vo.UserCouponVo;
|
||||||
import com.czg.log.annotation.OperationLog;
|
import com.czg.log.annotation.OperationLog;
|
||||||
import com.czg.market.dto.*;
|
import com.czg.market.dto.*;
|
||||||
import com.czg.market.service.MkCouponGiftService;
|
import com.czg.market.service.MkCouponGiftService;
|
||||||
|
|
@ -177,4 +178,15 @@ public class ACouponController {
|
||||||
return CzgResult.success(couponRecordService.grant(rewardCouponDTO.getShopId() != null ? rewardCouponDTO.getShopId() : StpKit.USER.getShopId(), rewardCouponDTO));
|
return CzgResult.success(couponRecordService.grant(rewardCouponDTO.getShopId() != null ? rewardCouponDTO.getShopId() : StpKit.USER.getShopId(), rewardCouponDTO));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生成订单后使用
|
||||||
|
* 通过用户Id 查找优惠券
|
||||||
|
*
|
||||||
|
* @param shopUserId 店铺用户Id
|
||||||
|
*/
|
||||||
|
@GetMapping("/findCoupon")
|
||||||
|
public CzgResult<List<UserCouponVo>> findCoupon(@RequestParam Long shopUserId, @RequestParam(required = false) Integer type) {
|
||||||
|
return CzgResult.success(shopCouponService.findCoupon(StpKit.USER.getShopId(), shopUserId, type));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue