puzhibing
2025-01-08 b22df417e0bc423c788b013feaad686531d69eed
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);
    }
}