feat: 题目详情 上一题/下一题功能

This commit is contained in:
2024-03-08 16:47:13 +08:00
parent 9c93cf950d
commit 004fcf10bb
6 changed files with 45 additions and 0 deletions

View File

@@ -140,6 +140,23 @@
and a.subject_type = #{subjectInfo.subjectType}
</if>
</select>
<select id="querySubjectIdCursor" resultType="java.lang.Long">
select a.id
from subject_info a,
subject_mapping b
where a.id = b.subject_id
and b.category_id = #{categoryId}
and b.label_id = #{labelId}
<if test="cursor !=null and cursor == 1">
and a.id > #{subjectId}
</if>
<if test="cursor !=null and cursor == 0">
and a.id &lt; #{subjectId}
</if>
limit 0,1
</select>
<select id="queryPage" resultMap="SubjectInfoMap">
select a.id,
a.subject_name,