优惠券弹窗
This commit is contained in:
@@ -2,12 +2,15 @@ package com.czg.controller.user;
|
||||
|
||||
import com.czg.account.vo.ShopInfoCouponVO;
|
||||
import com.czg.account.vo.UserCouponVo;
|
||||
import com.czg.market.entity.ShopCoupon;
|
||||
import com.czg.market.service.ShopCouponService;
|
||||
import com.czg.market.vo.ShopCouponPopUp;
|
||||
import com.czg.market.vo.UserCouponVO;
|
||||
import com.czg.resp.CzgResult;
|
||||
import com.czg.sa.StpKit;
|
||||
import com.czg.utils.AssertUtil;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.query.QueryWrapper;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -23,6 +26,30 @@ public class UShopCouponController {
|
||||
@Resource
|
||||
private ShopCouponService couponService;
|
||||
|
||||
/**
|
||||
* 优惠券弹窗
|
||||
*
|
||||
* @param getMode 首页home/用餐eat/订单order
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/popUp")
|
||||
public CzgResult<List<ShopCouponPopUp>> getPopUp(String getMode) {
|
||||
Long shopId = StpKit.USER.getShopId();
|
||||
return CzgResult.success(couponService.getPopUp(shopId, StpKit.USER.getLoginIdAsLong(), getMode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 优惠券弹窗领取
|
||||
*
|
||||
* @param getMode 首页home/用餐eat/订单order
|
||||
*/
|
||||
@GetMapping("/receivePopUp")
|
||||
public CzgResult<Void> receivePopUp(String getMode) {
|
||||
Long shopId = StpKit.USER.getShopId();
|
||||
couponService.receivePopUp(shopId, StpKit.USER.getLoginIdAsLong(), getMode);
|
||||
return CzgResult.success();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取当前店铺会员信息
|
||||
|
||||
Reference in New Issue
Block a user