package cn.lili.controller.lmk;
|
|
import cn.lili.base.Result;
|
import cn.lili.modules.lmk.domain.form.StoreCouponForm;
|
import cn.lili.modules.lmk.domain.query.StoreCouponQuery;
|
import cn.lili.modules.lmk.service.StoreCouponService;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import lombok.AllArgsConstructor;
|
import org.springframework.web.bind.annotation.*;
|
|
/**
|
* 商家端生成店铺优惠卷信息
|
*
|
* @author : peng
|
* @date : 2025-09-16 16:36
|
**/
|
@RestController
|
@AllArgsConstructor
|
@RequestMapping("/manager/lmk/storeCoupon")
|
public class StoreCouponController {
|
|
private final StoreCouponService storeCouponService;
|
|
/**
|
* 创建店铺与优惠卷关联关系
|
* @param storeCoupon
|
* @return
|
*/
|
@PostMapping
|
public Result addStoreCoupon(@RequestBody StoreCouponForm storeCoupon){
|
return storeCouponService.addStoreCoupon(storeCoupon);
|
}
|
|
/**
|
* 根据店铺关联关系生成单品
|
* @param id
|
* @return
|
*/
|
@PostMapping("/generateStoreCoupon/{id}")
|
public Result generateStoreCoupon(@PathVariable String id){
|
return storeCouponService.generateStoreCoupon(id);
|
}
|
|
/**
|
* 获取店铺列表
|
* @param query
|
* @return
|
*/
|
@GetMapping
|
public Result getPage(StoreCouponQuery query){
|
return storeCouponService.page(query);
|
}
|
}
|