From ae9bfd2d66f68a553786ac78b12f4390e65e4e09 Mon Sep 17 00:00:00 2001 From: 44323 <443237572@qq.com> Date: 星期五, 24 十一月 2023 18:30:18 +0800 Subject: [PATCH] 后台bug修改 --- cloud-server-course/src/main/resources/mapper/CoursePackageSchedulingMapper.xml | 38 +++++++++++++++++++++++++++++--------- 1 files changed, 29 insertions(+), 9 deletions(-) diff --git a/cloud-server-course/src/main/resources/mapper/CoursePackageSchedulingMapper.xml b/cloud-server-course/src/main/resources/mapper/CoursePackageSchedulingMapper.xml index fdf9e32..66183af 100644 --- a/cloud-server-course/src/main/resources/mapper/CoursePackageSchedulingMapper.xml +++ b/cloud-server-course/src/main/resources/mapper/CoursePackageSchedulingMapper.xml @@ -17,14 +17,34 @@ <select id="queryCoursePackageSchedulingList" resultType="map"> - select - CAST(id AS CHAR(20)) as id, - DATE_FORMAT(classDate, '%Y-%m-%d') as classDate, - courseId, - `status`, - cancelClasses, - deductClassHour, - integral - from t_course_package_scheduling where coursePackageId = #{item.coursePackageId} order by classDate desc + SELECT + CAST(id AS CHAR(20)) AS id, + CONCAT(DATE_FORMAT(classDate, '%Y-%m-%d %H:%i'),'-',DATE_FORMAT(endDate, '%H:%i')) AS classDate, + courseId, + `status`, + cancelClasses, + deductClassHour, + integral + FROM t_course_package_scheduling where coursePackageId = #{item.coursePackageId} GROUP BY classDate + order by classDate desc + + </select> + <select id="queryAll" resultType="com.dsh.course.model.vo.response.AppUserVideoResponse"> + + SELECT cs.courseId as videoId,cs.coursePackageId as coursePackageId,tc.coverDrawing as coverImage,tc.name as videoName,tc.introduce as synopsis,cs.integral,tc.courseVideo as courseVideo,cp.name as packageName,cs.id as scId + FROM t_course_package_scheduling cs + LEFT JOIN t_course tc ON cs.courseId = tc.id + left join t_course_package cp on cs.coursePackageId = cp.id + WHERE cs.courseId IS NOT NULL + <if test="longs != null"> + AND cs.id IN + <foreach collection="longs" item="item" open="(" close=")" separator=","> + #{item} + </foreach> + </if> + + </select> + <select id="isHave" resultType="int"> + SELECT COUNT(1) FROM t_user_video_details WHERE courseId = #{videoId} </select> </mapper> \ No newline at end of file -- Gitblit v1.7.1