Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
MCMS
Commits
10c3e4c9
Commit
10c3e4c9
authored
Mar 05, 2019
by
sunxin
Browse files
上下页修改
parent
3ddd0162
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/java/net/mingsoft/cms/dao/IArticleDao.xml
View file @
10c3e4c9
...
...
@@ -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
...
...
src/main/java/net/mingsoft/cms/util/CmsParserUtil.java
View file @
10c3e4c9
...
...
@@ -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
());
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment