上下页修改
This commit is contained in:
parent
3ddd016266
commit
10c3e4c912
|
@ -320,7 +320,7 @@
|
|||
<!-- 根据站点编号、开始、结束时间和栏目编号查询文章编号集合 -->
|
||||
<select id="queryIdsByCategoryIdForParser" resultMap="resultMapBean" >
|
||||
select
|
||||
ARTICLE_BASICID,cl.*
|
||||
ARTICLE_BASICID,cl.*,c.*
|
||||
FROM cms_article a LEFT JOIN basic b ON a.ARTICLE_BASICID = b.BASIC_ID
|
||||
LEFT JOIN basic_column cl ON b.BASIC_CATEGORYID = cl.COLUMN_CATEGORY_ID
|
||||
JOIN category c ON c.CATEGORY_ID = cl.COLUMN_CATEGORY_ID
|
||||
|
|
|
@ -213,14 +213,16 @@ public class CmsParserUtil extends ParserUtil {
|
|||
// 第一篇文章没有上一篇
|
||||
if (ai > 0) {
|
||||
ColumnArticleIdBean preCaBean = articleIdList.get(ai - 1);
|
||||
if(articleIdList.get(ai).getColumnPath().contains(preCaBean.getCategoryId()+"")){
|
||||
//判断当前文档是否与上一页文档在同一栏目下,并且不能使用父栏目字符串,因为父栏目中没有所属栏目编号
|
||||
if(articleColumnPath.contains(preCaBean.getCategoryId()+"")){
|
||||
parserParams.put(PRE_ID, preCaBean.getArticleId());
|
||||
}
|
||||
}
|
||||
// 最后一篇文章没有下一篇
|
||||
if (ai + 1 < articleIdList.size()) {
|
||||
ColumnArticleIdBean nextCaBean = articleIdList.get(ai + 1);
|
||||
if(articleIdList.get(ai).getColumnPath().contains(nextCaBean.getCategoryId()+"")){
|
||||
//判断当前文档是否与上一页文档在同一栏目下并且不能使用父栏目字符串,因为父栏目中没有所属栏目编号
|
||||
if(articleColumnPath.contains(nextCaBean.getCategoryId()+"")){
|
||||
parserParams.put(NEXT_ID, nextCaBean.getArticleId());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue