| | |
| | | package com.ruoyi.account.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.account.api.vo.CouponInfoVo; |
| | | import com.ruoyi.account.api.vo.PaymentUserCoupon; |
| | | import com.ruoyi.account.service.UserCouponService; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @RequestMapping("/user-coupon") |
| | | public class UserCouponController { |
| | | |
| | | @Resource |
| | | private UserCouponService userCouponService; |
| | | |
| | | |
| | | /** |
| | | * 获取支付页面用户优惠券列表数据 |
| | | * @param paymentUserCoupon |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/getPaymentUserCoupon") |
| | | public R<List<CouponInfoVo>> getPaymentUserCoupon(@RequestBody PaymentUserCoupon paymentUserCoupon){ |
| | | List<CouponInfoVo> userCoupon = userCouponService.getUserCoupon(paymentUserCoupon.getUserId(), paymentUserCoupon.getOrderMoney(), paymentUserCoupon.getType()); |
| | | return R.ok(userCoupon); |
| | | } |
| | | |
| | | } |
| | | |