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
3c3a8c82
Commit
3c3a8c82
authored
Jul 11, 2021
by
msgroup
Browse files
规范栏目属性字段名称
parent
77e48cdb
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/main/java/net/mingsoft/cms/action/GeneraterAction.java
View file @
3c3a8c82
...
...
@@ -178,7 +178,7 @@ public class GeneraterAction extends BaseAction {
ContentBean
contentBean
=
new
ContentBean
();
contentBean
.
setCategoryId
(
column
.
getId
());
contentBean
.
setCategoryType
(
column
.
getCategoryType
());
articleIdList
=
contentBiz
.
queryIdsByCategoryIdForParser
(
contentBean
);
// 判断列表类型
switch
(
CategoryTypeEnum
.
get
(
column
.
getCategoryType
()))
{
...
...
src/main/java/net/mingsoft/cms/bean/ContentBean.java
View file @
3c3a8c82
...
...
@@ -62,6 +62,11 @@ public class ContentBean extends ContentEntity {
*/
private
String
categoryType
;
/**
* 栏目属性,用于筛选文章列表
*/
private
String
categoryFlag
;
public
String
getCategoryType
()
{
return
categoryType
;
}
...
...
@@ -70,6 +75,14 @@ public class ContentBean extends ContentEntity {
this
.
categoryType
=
categoryType
;
}
public
String
getCategoryFlag
()
{
return
categoryFlag
;
}
public
void
setCategoryFlag
(
String
categoryFlag
)
{
this
.
categoryFlag
=
categoryFlag
;
}
public
String
getBeginTime
()
{
return
beginTime
;
}
...
...
src/main/java/net/mingsoft/cms/dao/IContentDao.xml
View file @
3c3a8c82
...
...
@@ -250,10 +250,13 @@
where ct.del=0
<!-- 查询子栏目数据 -->
<if
test=
"categoryId
> 0
"
>
<if
test=
"categoryId
!=null and categoryId!='' and categoryType==1
"
>
and (ct.category_id=#{categoryId} or ct.category_id in
(select id FROM cms_category where find_in_set('${categoryId}',CATEGORY_PARENT_IDS)>0))
</if>
<if
test=
"categoryId!=null and categoryId!='' and categoryType==2"
>
ct.category_id=#{categoryId}
</if>
<if
test=
"beginTime!=null and beginTime!=''"
>
<if
test=
"_databaseId == 'mysql'"
>
and content_datetime
>
= #{beginTime}
...
...
src/main/webapp/WEB-INF/manager/cms/content/main.ftl
View file @
3c3a8c82
...
...
@@ -33,8 +33,8 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="文章类型" prop="c
ontentType
">
<el-select v-model="form.c
ontentType
"
<el-form-item label="文章类型" prop="c
ategoryFlag
">
<el-select v-model="form.c
ategoryFlag
"
:style="
{
width
:
'
100
%'
}
"
:filterable="false"
:disabled="false"
...
...
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