| | |
| | | import com.xiaopeng.operation.service.IXpCouponService; |
| | | import com.xiaopeng.operation.vo.XpBannerListVo; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @author mitao |
| | | * @since 2026-02-03 |
| | | */ |
| | | @Controller |
| | | @RestController |
| | | @RequestMapping("") |
| | | public class XpCouponController { |
| | | |
| | |
| | | * 优惠券列表 |
| | | */ |
| | | @PostMapping("/v1/api/xp-coupon/list") |
| | | @ApiOperation(value = "优惠券列表",tags = {"管理后台-优惠券列表"},response = XpCoupon.class) |
| | | @ApiOperation(value = "优惠券列表",tags = {"管理后台-优惠券"},response = XpCoupon.class) |
| | | public R<Page<XpCoupon>> list(@RequestBody XpCouponListQuery query ){ |
| | | return R.ok(xpCouponService.getList(query)); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/v1/api/xp-coupon/add") |
| | | @ApiOperation(value = "添加优惠券",tags = {"管理后台-添加优惠券"},response = XpCoupon.class) |
| | | @ApiOperation(value = "添加优惠券",tags = {"管理后台-优惠券"},response = XpCoupon.class) |
| | | public R<?> add(@RequestBody XpCoupon xpCoupon){ |
| | | xpCouponService.save(xpCoupon); |
| | | return R.ok(); |