mirror of
https://github.com/PlayEdu/PlayEdu
synced 2026-01-02 17:19:31 +08:00
user/courses返回学员的线上课学习课时数量
This commit is contained in:
@@ -39,4 +39,17 @@
|
||||
order by `t1`.`updated_at` desc
|
||||
limit #{size};
|
||||
</select>
|
||||
<select id="getUserCourseHourCount"
|
||||
resultType="xyz.playedu.api.types.mapper.UserCourseHourRecordCountMapper">
|
||||
SELECT `course_id`, count(1) AS `total`
|
||||
FROM `user_course_hour_records`
|
||||
WHERE `user_id` = #{userId}
|
||||
<if test="courseIds != null and #{courseIds}.size() > 0">
|
||||
AND `course_id` IN (<foreach collection="courseIds" item="courseId" separator=",">#{courseId}</foreach>)
|
||||
</if>
|
||||
<if test="isFinished != null">
|
||||
AND `is_finisehd` = #{isFinished}
|
||||
</if>
|
||||
GROUP BY `course_id`;
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user