xuhy
2026-02-26 75e876d8e6f5123a4b346c25c35a8fa56302ef5c
xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpCouponController.java
@@ -1,9 +1,14 @@
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>
@@ -14,7 +19,20 @@
 * @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);
    }
}