Service层修改 单元测试
This commit is contained in:
@@ -141,6 +141,15 @@
|
||||
order by articleId desc
|
||||
</select>
|
||||
|
||||
<select id="findAllByCategoryIdAndOpen" resultMap="articleViewResultMap">
|
||||
select *
|
||||
from articleView
|
||||
where categoryId = #{id}
|
||||
and isDelete = false
|
||||
and isOpen = true
|
||||
order by articleId desc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="findAll" resultMap="articleViewResultMap">
|
||||
select *
|
||||
@@ -155,5 +164,22 @@
|
||||
from article;
|
||||
</select>
|
||||
|
||||
<select id="getPreArticle" resultMap="articleViewResultMap">
|
||||
select *
|
||||
from articleView
|
||||
where articleId = (select max(articleId)
|
||||
from articleView
|
||||
where articleId < #{id}
|
||||
)
|
||||
</select>
|
||||
<select id="getNextArticle" resultMap="articleViewResultMap">
|
||||
select *
|
||||
from articleView
|
||||
where articleId = (select min(articleId)
|
||||
from articleView
|
||||
where articleId > #{id}
|
||||
)
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user