From af54386730a05042495d86e21ab6a943ad5a81f1 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Mon, 11 Sep 2023 16:24:50 +0800
Subject: [PATCH] 优惠卷

---
 src/main/java/cc/mrbird/febs/mall/dto/MallMemberCouponDto.java               |    5 +++++
 src/main/resources/mapper/modules/MallMemberCouponMapper.xml                 |    1 +
 src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java |    1 +
 3 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/main/java/cc/mrbird/febs/mall/dto/MallMemberCouponDto.java b/src/main/java/cc/mrbird/febs/mall/dto/MallMemberCouponDto.java
index dd7e687..044a411 100644
--- a/src/main/java/cc/mrbird/febs/mall/dto/MallMemberCouponDto.java
+++ b/src/main/java/cc/mrbird/febs/mall/dto/MallMemberCouponDto.java
@@ -4,6 +4,8 @@
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
+import java.util.Date;
+
 @Data
 @ApiModel(value = "MallMemberCouponDto", description = "参数类")
 public class MallMemberCouponDto {
@@ -23,4 +25,7 @@
     @ApiModelProperty(hidden = true)
     private Long memberId;
 
+    @ApiModelProperty(hidden = true)
+    private Date expireTime;
+
 }
diff --git a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java
index 3a1332e..bb681a5 100644
--- a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java
+++ b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java
@@ -907,6 +907,7 @@
         Long memberId = LoginUserUtil.getLoginUser().getId();
         IPage<MallMemberCouponVo> page = new Page<>(mallMemberCouponDto.getPageNum(), mallMemberCouponDto.getPageSize());
         mallMemberCouponDto.setMemberId(memberId);
+        mallMemberCouponDto.setExpireTime(DateUtil.date());
         IPage<MallMemberCouponVo> pages = mallMemberCouponMapper.selectListInPage(page, mallMemberCouponDto);
         return new FebsResponse().success().data(pages);
     }
diff --git a/src/main/resources/mapper/modules/MallMemberCouponMapper.xml b/src/main/resources/mapper/modules/MallMemberCouponMapper.xml
index 1e6aac9..999d7cb 100644
--- a/src/main/resources/mapper/modules/MallMemberCouponMapper.xml
+++ b/src/main/resources/mapper/modules/MallMemberCouponMapper.xml
@@ -11,6 +11,7 @@
         left join mall_goods_coupon b on b.id = a.coupon_id
         <where>
             a.member_id=#{record.memberId}
+            and a.expire_time &gt;= #{record.expireTime}
             <if test="record.state != null and record.state != ''">
                 and a.state=#{record.state}
             </if>

--
Gitblit v1.9.1