From 2ccdf86ac2599562ca994bc4047ded2d925e8bae Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期五, 29 十一月 2024 16:33:12 +0800 Subject: [PATCH] 开发确认购物车订单逻辑 --- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/CouponInfoController.java | 25 +++++++++++++++++++++++-- 1 files changed, 23 insertions(+), 2 deletions(-) diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/CouponInfoController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/CouponInfoController.java index e63b87b..75f6893 100644 --- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/CouponInfoController.java +++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/CouponInfoController.java @@ -1,8 +1,13 @@ package com.ruoyi.other.controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.core.domain.R; +import com.ruoyi.other.api.domain.CouponInfo; +import com.ruoyi.other.service.CouponInfoService; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.List; /** * <p> @@ -16,5 +21,21 @@ @RequestMapping("/coupon-info") public class CouponInfoController { + @Resource + private CouponInfoService couponInfoService; + + + /** + * 根据id获取优惠券数据 + * @param ids + * @return + */ + @ResponseBody + @PostMapping("/getCouponInfoList") + public R<List<CouponInfo>> getCouponInfoList(@RequestParam("ids") List<Integer> ids){ + List<CouponInfo> couponInfos = couponInfoService.listByIds(ids); + return R.ok(couponInfos); + } + } -- Gitblit v1.7.1