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