From eb5d7885fa9e4bd20c0827eec9b4cdd48c47b509 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期二, 07 一月 2025 09:11:20 +0800
Subject: [PATCH] 修改bug

---
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/CouponInfoController.java |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 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 f7de2e1..45f16c3 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
@@ -205,9 +205,14 @@
     }
 
 
-
-
-
+    /**
+     * 根据类型获取有效优惠券列表
+     */
+    @PostMapping("/getCouponInfoByPersonType")
+    public R<List<CouponInfo>> getCouponInfoByPersonType(@RequestParam("personType") Integer personType){
+        List<CouponInfo> list = couponInfoService.list(new LambdaUpdateWrapper<CouponInfo>().eq(CouponInfo::getPersonType, personType).eq(CouponInfo::getDelFlag, 0).eq(CouponInfo::getShelfStatus, 1).last(" and now() between period_start_time and period_end_time"));
+        return R.ok(list);
+    }
 
 
 }

--
Gitblit v1.7.1