From 81932e21cb584b992bdbde80df84eb81f77073d0 Mon Sep 17 00:00:00 2001
From: lisy <linlangsur163@163.com>
Date: 星期四, 27 七月 2023 11:36:18 +0800
Subject: [PATCH] 管理后台的优惠券管理的角色模块修复

---
 cloud-server-activity/src/main/resources/mapper/CouponMapper.xml |   36 ++++++++++++++++++++++++++++++++++++
 1 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/cloud-server-activity/src/main/resources/mapper/CouponMapper.xml b/cloud-server-activity/src/main/resources/mapper/CouponMapper.xml
index 142c094..e63a5c6 100644
--- a/cloud-server-activity/src/main/resources/mapper/CouponMapper.xml
+++ b/cloud-server-activity/src/main/resources/mapper/CouponMapper.xml
@@ -12,5 +12,41 @@
             and  `id` = #{id}
         </if>
     </select>
+    <select id="queryCouponListOfSearch" resultType="java.util.Map">
+        SELECT id,
+        `name`,
+        useScope,
+        `type`,
+        distributionMethod,
+        date_format(startTime ,'%Y-%m-%d') as startTime,
+        date_format(endTime ,'%Y-%m-%d') as endTime,
+        userPopulation,
+        quantityIssued,
+        pickUpQuantity,
+        `status`,
+        state
+        from t_coupon
+        where 1 = 1
+          <if test="name != null">
+              and `name` like concat('%', #{}, '%')
+          </if>
+        <if test="type != null">
+            and type = #{type}
+        </if>
+        <if test="distributionMethod != null">
+            and distributionMethod = #{distributionMethod}
+        </if>
+        <if test="userPopulation != null">
+            and userPopulation = #{userPopulation}
+        </if>
+        <if test="status !=null">
+            and `status` = #{status}
+        </if>
+        <if test="state != null">
+            and `state` = #{state}
+        </if>
+          order by insertTime desc
+    </select>
+
 
 </mapper>

--
Gitblit v1.7.1