From e6ee956618b3c1a6371a6c22dfbb70868dbd3f17 Mon Sep 17 00:00:00 2001
From: 44323 <443237572@qq.com>
Date: 星期六, 07 十月 2023 15:23:06 +0800
Subject: [PATCH] 后台代码

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

diff --git a/cloud-server-activity/src/main/resources/mapper/PointsMerchandiseMapper.xml b/cloud-server-activity/src/main/resources/mapper/PointsMerchandiseMapper.xml
index 38bcc37..5969172 100644
--- a/cloud-server-activity/src/main/resources/mapper/PointsMerchandiseMapper.xml
+++ b/cloud-server-activity/src/main/resources/mapper/PointsMerchandiseMapper.xml
@@ -35,4 +35,50 @@
         </if>
         order by insertTime desc
     </select>
+    <select id="ticketList" resultType="java.util.Map">
+        SELECT id,
+        `name`,
+        cardType,
+        `cover`,
+        date_format(startTime ,'%Y-%m-%d') as startTime,
+        date_format(endTime ,'%Y-%m-%d') as endTime,
+        `type`,
+        useScope,
+        userPopulation,
+        quantityIssued,
+        pickUpQuantity,
+        `sort`,
+        shelves
+        from t_points_merchandise
+        where 1 = 1
+        <if test="query.name != null">
+            and `name` like concat('%', #{query.name}, '%')
+        </if>
+        <if test="query.type != null">
+            and cardType = #{query.type}
+        </if>
+        <if test="query.redemptionMethod != null">
+            and redemptionMethod = #{query.redemptionMethod}
+        </if>
+        <if test="query.userPopulation != null">
+            and userPopulation = #{query.userPopulation}
+        </if>
+        <if test="query.state != null">
+            and `state` = #{query.state}
+        </if>
+        and `type` = 3
+        order by sort desc
+    </select>
+    <select id="changeState" resultType="java.lang.Integer">
+        update t_points_merchandise set
+        shelves = #{query.state}
+        <where>
+            <if test="query.ids != null and query.ids.size()>0">
+                AND t_points_merchandise.id IN
+                <foreach collection="query.ids" separator="," item="id" open="(" close=")">
+                    #{id}
+                </foreach>
+            </if>
+        </where>
+    </select>
 </mapper>

--
Gitblit v1.7.1