feat: 题目详情 上一题/下一题功能
This commit is contained in:
@@ -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 < #{subjectId}
|
||||
</if>
|
||||
limit 0,1
|
||||
</select>
|
||||
|
||||
<select id="queryPage" resultMap="SubjectInfoMap">
|
||||
select a.id,
|
||||
a.subject_name,
|
||||
|
Reference in New Issue
Block a user