| | |
| | | package com.xiaopeng.operation.controller; |
| | | |
| | | |
| | | import com.xiaopeng.api.model.operation.XpCoupon; |
| | | import com.xiaopeng.common.core.domain.R; |
| | | import com.xiaopeng.operation.service.IXpCouponService; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @since 2026-02-03 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/xp-coupon") |
| | | @RequestMapping("") |
| | | public class XpCouponController { |
| | | |
| | | private final IXpCouponService xpCouponService; |
| | | |
| | | public XpCouponController(IXpCouponService xpCouponService) { |
| | | this.xpCouponService = xpCouponService; |
| | | } |
| | | |
| | | |
| | | @PostMapping("/inner/xp-coupon/getCouponById") |
| | | public R<XpCoupon> getCouponById(@RequestParam Long couponId){ |
| | | XpCoupon xpCoupon = xpCouponService.getById(couponId); |
| | | return R.ok(xpCoupon); |
| | | } |
| | | |
| | | } |