Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
cms_sys
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
西魏
cms_sys
Commits
56de9439
Commit
56de9439
authored
Dec 17, 2019
by
tianbj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文章分类
parent
3932bb6b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
10 deletions
+13
-10
IContentDao.xml
src/main/java/net/mingsoft/cms/dao/IContentDao.xml
+6
-6
form.ftl
src/main/webapp/WEB-INF/manager/cms/content/form.ftl
+5
-2
index.ftl
src/main/webapp/WEB-INF/manager/cms/content/index.ftl
+1
-1
main.ftl
src/main/webapp/WEB-INF/manager/cms/content/main.ftl
+1
-1
No files found.
src/main/java/net/mingsoft/cms/dao/IContentDao.xml
View file @
56de9439
...
...
@@ -185,7 +185,7 @@
</select>
<!--条件查询-->
<select
id=
"query"
resultMap=
"resultMap"
>
select
* from cms_content
select
ct.* from cms_content ct join cms_category cc on ct.content_category_id=cc.id
<where>
<if
test=
"contentTitle != null and contentTitle != ''"
>
and content_title like CONCAT('%',#{contentTitle},'%')
</if>
<if
test=
"contentCategoryId != null and contentCategoryId != ''"
>
and content_category_id=#{contentCategoryId}
</if>
...
...
@@ -201,12 +201,12 @@
<if
test=
"contentDetails != null and contentDetails != ''"
>
and content_details=#{contentDetails}
</if>
<if
test=
"contentUrl != null and contentUrl != ''"
>
and content_url=#{contentUrl}
</if>
<if
test=
"contentHit != null"
>
and content_hit=#{contentHit}
</if>
<if
test=
"appId != null"
>
and app_id=#{appId}
</if>
<if
test=
"createBy > 0"
>
and create_by=#{createBy}
</if>
<if
test=
"createDate != null"
>
and create_date=#{createDate}
</if>
<if
test=
"updateBy > 0"
>
and update_by=#{updateBy}
</if>
<if
test=
"appId != null"
>
and
ct.
app_id=#{appId}
</if>
<if
test=
"createBy > 0"
>
and c
t.c
reate_by=#{createBy}
</if>
<if
test=
"createDate != null"
>
and c
t.c
reate_date=#{createDate}
</if>
<if
test=
"updateBy > 0"
>
and
ct.
update_by=#{updateBy}
</if>
<if
test=
"updateDate != null"
>
and update_date=#{updateDate}
</if>
<if
test=
"del != null"
>
and del=#{del}
</if>
<if
test=
"del != null"
>
and
ct.
del=#{del}
</if>
<include
refid=
"net.mingsoft.base.dao.IBaseDao.sqlWhere"
></include>
</where>
order by id desc
...
...
src/main/webapp/WEB-INF/manager/cms/content/form.ftl
View file @
56de9439
...
...
@@ -213,6 +213,7 @@
},
contentCategoryIdOptions
:
[],
returnIsShow
:
true
,
type
:
''
,
//表单数据
form
:
{
// 文章标题
...
...
@@ -274,7 +275,8 @@
this
.
$refs
.
form
[
0
].
validate
((
valid
)
=>
{
if
(
valid
)
{
that
.
saveDisabled
=
true
;
if
(
that
.
categoryIdOptions
.
filter
(
f
=>
f
[
'id'
]
==
that
.
form
.
contentCategoryId
)[
0
].
categoryType
==
'2'
){
//判断
if
(
that
.
categoryIdOptions
.
filter
(
f
=>
f
[
'id'
]
==
that
.
form
.
contentCategoryId
)[
0
].
categoryType
==
'2'
&&
that
.
returnIsShow
){
that
.
$notify
({
title
:
'提示'
,
message
:
'所属栏目不能为封面'
,
...
...
@@ -487,10 +489,11 @@
this
.
contentTypeOptionsGet
();
this
.
form
.
id
=
ms
.
util
.
getParameter
(
"id"
);
this
.
form
.
contentCategoryId
=
ms
.
util
.
getParameter
(
"categoryId"
);
this
.
type
=
ms
.
util
.
getParameter
(
"type"
);
if
(
this
.
form
.
id
)
{
this
.
get
(
this
.
form
.
id
);
}
if
(
this
.
form
.
contentCategoryId
)
{
if
(
this
.
type
)
{
this
.
list
(
this
.
form
.
contentCategoryId
);
this
.
returnIsShow
=
false
;
}
...
...
src/main/webapp/WEB-INF/manager/cms/content/index.ftl
View file @
56de9439
...
...
@@ -37,7 +37,7 @@
if
(
data
.
categoryType
==
'1'
){
this
.
action
=
ms
.
manager
+
"/cms/content/main.do?categoryId="
+
data
.
id
;
}
else
if
(
data
.
categoryType
==
'2'
){
this
.
action
=
ms
.
manager
+
"/cms/content/form.do?categoryId="
+
data
.
id
;
this
.
action
=
ms
.
manager
+
"/cms/content/form.do?categoryId="
+
data
.
id
+
"&type=2"
;
}
else
{
this
.
action
=
ms
.
manager
+
"/cms/content/main.do"
;
}
...
...
src/main/webapp/WEB-INF/manager/cms/content/main.ftl
View file @
56de9439
...
...
@@ -239,7 +239,7 @@
if
(
id
){
location
.
href
=
this
.
manager
+
"/cms/content/form.do?id="
+
id
;
}
else
{
location
.
href
=
this
.
manager
+
"/cms/content/form.do
"
;
location
.
href
=
this
.
manager
+
"/cms/content/form.do
?categoryId="
+
this
.
form
.
contentCategoryId
;
}
},
//表格数据转换
...
...
Write
Preview
Markdown
is supported
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