From 7e7f901b2172281dc294dfbc67e6ad00625f09f4 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期一, 04 三月 2024 10:11:21 +0800
Subject: [PATCH] 合并代码

---
 cloud-server-communityWorldCup/src/main/resources/mapper/WorldCupMapper.xml |   49 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 49 insertions(+), 0 deletions(-)

diff --git a/cloud-server-communityWorldCup/src/main/resources/mapper/WorldCupMapper.xml b/cloud-server-communityWorldCup/src/main/resources/mapper/WorldCupMapper.xml
index 9c0a23a..f562bdf 100644
--- a/cloud-server-communityWorldCup/src/main/resources/mapper/WorldCupMapper.xml
+++ b/cloud-server-communityWorldCup/src/main/resources/mapper/WorldCupMapper.xml
@@ -71,4 +71,53 @@
         from t_world_cup  a
         where a.id = #{id}
     </select>
+
+
+
+    <select id="getWorldCupListAll" resultType="map">
+        select
+        id,
+        `name`,
+        DATE_FORMAT(startTime, '%Y.%m.%d %H:%i') as startTime,
+        DATE_FORMAT(endTime, '%Y.%m.%d %H:%i') as endTime,
+        CONCAT(startAge, '至', endAge) as age,
+        gender,
+        maxPeople,
+        status
+        from t_world_cup
+        where 1 = 1
+        <if test="null != item.name and '' != item.name">
+            and `name` like CONCAT('%', #{item.name}, '%')
+        </if>
+        <if test="null != item.startTime and '' != item.startTime">
+            and DATE_FORMAT(startTime, '%Y-%m-%d') &gt;= #{item.startTime}
+        </if>
+        <if test="null != item.endTime and '' != item.endTime">
+            and DATE_FORMAT(endTime, '%Y-%m-%d') &lt;= #{item.endTime}
+        </if>
+        <if test="null != item.status">
+            and status= #{item.status}
+        </if>
+        order by createTime desc limit #{item.offset}, #{item.limit}
+    </select>
+
+
+    <select id="getWorldCupListAllCount" resultType="int">
+        select
+        count(*)
+        from t_world_cup
+        where 1 = 1
+        <if test="null != item.name and '' != item.name">
+            and `name` like CONCAT('%', #{item.name}, '%')
+        </if>
+        <if test="null != item.startTime and '' != item.startTime">
+            and DATE_FORMAT(startTime, '%Y-%m-%d') &gt;= #{item.startTime}
+        </if>
+        <if test="null != item.endTime and '' != item.endTime">
+            and DATE_FORMAT(endTime, '%Y-%m-%d') &lt;= #{item.endTime}
+        </if>
+        <if test="null != item.status">
+            and status= #{item.status}
+        </if>
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.7.1