From 2ad97245d64b65132507cab36ad89d968edb7705 Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期四, 20 三月 2025 09:50:09 +0800
Subject: [PATCH] sql文件

---
 guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/CourseMapper.xml |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/CourseMapper.xml b/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/CourseMapper.xml
index 2b56d69..5aea530 100644
--- a/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/CourseMapper.xml
+++ b/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/CourseMapper.xml
@@ -20,9 +20,10 @@
     <sql id="Base_Column_List">
         id, courseName, coverImg, introduce, type, difficulty, time, isFree, sort, state
     </sql>
+
     <select id="courseSearch" resultType="com.stylefeng.guns.modular.system.vo.CourseList">
         select t1.id,t1.courseName,t1.allTime as `time`,t1.isFree,t1.difficulty,t1.coverImg,
-        CONCAT(t3.name,'|',t2.name) as typeName
+        CONCAT(t3.name,'|',t2.name) as typeName,t2.appleAmount
         from t_course t1
         left join t_fitness_position t2 on t1.positionId = t2.id
         left join t_fitness_type t3 on t2.typeId = t3.id
@@ -30,8 +31,11 @@
         <if test="null != req.courseName and '' != req.courseName">
             and t1.courseName like CONCAT('%', #{req.courseName}, '%')
         </if>
-        <if test="null != req.positionName1 and '' != req.positionName1">
-            and t2.name like CONCAT('%', #{req.positionName1}, '%')
+        <if test="null != req.positionName and req.positionName.size()>0" >
+            and t2.name in
+            <foreach collection="req.positionName" item="item" index="index" separator="," open="(" close=")">
+                #{item}
+            </foreach>
         </if>
         <if test="null != req.time">
             and (t1.time between #{req.startTime} and #{req.endTime}
@@ -63,12 +67,11 @@
             </foreach>
         </if>
         order by t1.isFree desc , t1.sort desc
-        limit #{req.pageNum}, #{req.pageSize}
     </select>
     <select id="courseSearch1" resultType="com.stylefeng.guns.modular.system.vo.CourseList">
         select t1.id,t1.courseName,t1.allTime as `time`,t1.isFree,t1.difficulty,t1.coverImg,t1.introduce,
-        t2.amount as price,
-        CONCAT(t3.name,'|',t2.name) as typeName
+        t2.amount as price,t2.appleAmount,t2.id as positionId,
+        CONCAT(t3.name,'|',t2.name,'|H', t1.difficulty) as typeName
         from t_course t1
         left join t_fitness_position t2 on t1.positionId = t2.id
         left join t_fitness_type t3 on t2.typeId = t3.id

--
Gitblit v1.7.1