查询逻辑修改

This commit is contained in:
张松
2025-01-03 22:19:53 +08:00
parent 3841c95b56
commit 5aeee2da3a
4 changed files with 25 additions and 2 deletions

View File

@@ -61,5 +61,18 @@
from course_details
where course_id = #{courseId}
</select>
<select id="countByCourseId" resultType="com.sqx.modules.course.entity.CourseDetails">
SELECT
course_id as courseId,
COUNT(*) AS courseDetailsCount
FROM
course_details
where course_details_id in
<foreach collection="detailIdList" item="ids" open="(" separator="," close=")">
#{ids}
</foreach>
GROUP BY
course_id
</select>
</mapper>