This commit is contained in:
GYJ
2025-01-02 20:45:51 +08:00
parent e3de8c009f
commit d56a5df40e
47 changed files with 221 additions and 382 deletions

View File

@@ -1,14 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.sqx.modules.course.dao.CourseClassificationDao">
<select id="selectCourseClassificationPage" resultType="com.sqx.modules.course.entity.CourseClassification">
select * from course_classification where 1=1 and is_delete=0
<if test ='null != classificationName'>
and classification_name LIKE CONCAT('%', #{classificationName}, '%')
</if>
order by sort
</select>
<select id="selectCourseClassificationList" resultType="com.sqx.modules.course.entity.CourseClassification">
select * from course_classification where 1=1 and is_delete=0
<if test ='null != classificationName'>
@@ -23,4 +15,4 @@
<select id="queryClassification" resultType="com.sqx.modules.course.response.ClassificationResponse">
select classification_id ,classification_name from course_classification where is_delete=0;
</select>
</mapper>
</mapper>

View File

@@ -27,49 +27,6 @@
u.course_id, c.course_id, d.course_details_name, d.course_details_id
ORDER BY
produceEndTime DESC;
<!-- SELECT
MAX( u.update_time ) AS produceEndTime,
c.*,
(
SELECT
d.course_details_name
FROM
course_collect cc
LEFT JOIN course_details d ON cc.course_details_id = d.course_details_id
WHERE
d.course_id = u.course_id
AND cc.classify = 3 and cc.user_id=#{userId}
ORDER BY
cc.update_time DESC
LIMIT 1
) AS courseDetailsName,
(
SELECT
d.course_details_id
FROM
course_collect cc
LEFT JOIN course_details d ON cc.course_details_id = d.course_details_id
WHERE
d.course_id = u.course_id
AND cc.classify = 3 and cc.user_id=#{userId}
ORDER BY
cc.update_time DESC
LIMIT 1
) AS courseDetailsId,
( SELECT count(*) FROM course_details d WHERE d.course_id = c.course_id ) AS courseDetailsCount
FROM
course_collect u
LEFT JOIN course c ON u.course_id = c.course_id
WHERE
u.user_id = #{userId}
AND c.course_id IS NOT NULL
AND u.classify = #{classify}
GROUP BY
u.course_id
ORDER BY
produceEndTime DESC
-->
</select>
</mapper>

View File

@@ -265,7 +265,7 @@
WHERE
c.is_delete = 0 and c.status=1
<if test='null != title'>
and c.title LIKE #{title}
and c.title LIKE concat("%",#{title},"%")
</if>
order by create_time desc
</select>