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
5a73e33c
Commit
5a73e33c
authored
Nov 29, 2019
by
tianbj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
d15c5508
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
5 deletions
+37
-5
IContentDao.xml
src/main/java/net/mingsoft/cms/dao/IContentDao.xml
+7
-1
ContentEntity.java
src/main/java/net/mingsoft/cms/entity/ContentEntity.java
+11
-0
main.ftl
src/main/webapp/WEB-INF/manager/cms/content/main.ftl
+19
-4
No files found.
src/main/java/net/mingsoft/cms/dao/IContentDao.xml
View file @
5a73e33c
...
...
@@ -17,6 +17,7 @@
<result
column=
"content_keyword"
property=
"contentKeyword"
/>
<!--关键字 -->
<result
column=
"content_details"
property=
"contentDetails"
/>
<!--文章内容 -->
<result
column=
"content_url"
property=
"contentUrl"
/>
<!--文章跳转链接地址 -->
<result
column=
"content_hit"
property=
"contentHit"
/>
<!--点击次数 -->
<result
column=
"appid"
property=
"appid"
/>
<!--文章管理的应用id -->
<result
column=
"create_by"
property=
"createBy"
/>
<!--创建人 -->
<result
column=
"create_date"
property=
"createDate"
/>
<!--创建时间 -->
...
...
@@ -43,6 +44,7 @@
<if
test=
"contentKeyword != null and contentKeyword != ''"
>
content_keyword,
</if>
<if
test=
"contentDetails != null and contentDetails != ''"
>
content_details,
</if>
<if
test=
"contentUrl != null and contentUrl != ''"
>
content_url,
</if>
<if
test=
"contentHit != null"
>
content_hit,
</if>
<if
test=
"appid != null"
>
appid,
</if>
<if
test=
"createBy > 0"
>
create_by,
</if>
<if
test=
"createDate != null"
>
create_date,
</if>
...
...
@@ -64,6 +66,7 @@
<if
test=
"contentKeyword != null and contentKeyword != ''"
>
#{contentKeyword},
</if>
<if
test=
"contentDetails != null and contentDetails != ''"
>
#{contentDetails},
</if>
<if
test=
"contentUrl != null and contentUrl != ''"
>
#{contentUrl},
</if>
<if
test=
"contentHit != null"
>
#{contentHit},
</if>
<if
test=
"appid != null"
>
#{appid},
</if>
<if
test=
"createBy > 0"
>
#{createBy},
</if>
<if
test=
"createDate != null"
>
#{createDate},
</if>
...
...
@@ -90,6 +93,7 @@
<if
test=
"contentKeyword != null and contentKeyword != ''"
>
content_keyword=#{contentKeyword},
</if>
<if
test=
"contentDetails != null and contentDetails != ''"
>
content_details=#{contentDetails},
</if>
<if
test=
"contentUrl != null and contentUrl != ''"
>
content_url=#{contentUrl},
</if>
<if
test=
"contentHit != null"
>
content_hit=#{contentHit},
</if>
<if
test=
"appid != null"
>
appid=#{appid},
</if>
<if
test=
"createBy > 0"
>
create_by=#{createBy},
</if>
<if
test=
"createDate != null"
>
create_date=#{createDate},
</if>
...
...
@@ -122,6 +126,7 @@
<if
test=
"contentKeyword != null and contentKeyword != ''"
>
and content_keyword=#{contentKeyword}
</if>
<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 appid=#{appid}
</if>
<if
test=
"createBy > 0"
>
and create_by=#{createBy}
</if>
<if
test=
"createDate != null"
>
and create_date=#{createDate}
</if>
...
...
@@ -156,7 +161,7 @@
<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>
<if
test=
"contentType != null and contentType != ''"
>
and content_type
=#{contentType}
</if>
<if
test=
"contentType != null and contentType != ''"
>
and content_type
LIKE CONCAT('%',#{contentType},'%')
</if>
<if
test=
"contentDisplay != null and contentDisplay != ''"
>
and content_display=#{contentDisplay}
</if>
<if
test=
"contentAuthor != null and contentAuthor != ''"
>
and content_author=#{contentAuthor}
</if>
<if
test=
"contentSource != null and contentSource != ''"
>
and content_source=#{contentSource}
</if>
...
...
@@ -167,6 +172,7 @@
<if
test=
"contentKeyword != null and contentKeyword != ''"
>
and content_keyword=#{contentKeyword}
</if>
<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 appid=#{appid}
</if>
<if
test=
"createBy > 0"
>
and create_by=#{createBy}
</if>
<if
test=
"createDate != null"
>
and create_date=#{createDate}
</if>
...
...
src/main/java/net/mingsoft/cms/entity/ContentEntity.java
View file @
5a73e33c
...
...
@@ -74,7 +74,18 @@ private static final long serialVersionUID = 1574925152617L;
* 文章管理的应用id
*/
private
Integer
appid
;
/**
* 点击次数
*/
private
Integer
contentHit
;
public
Integer
getContentHit
()
{
return
contentHit
;
}
public
void
setContentHit
(
Integer
contentHit
)
{
this
.
contentHit
=
contentHit
;
}
/**
* 设置文章标题
...
...
src/main/webapp/WEB-INF/manager/cms/content/main.ftl
View file @
5a73e33c
...
...
@@ -62,13 +62,18 @@
<el-table-column
type=
"selection"
width=
"40"
></el-table-column>
<el-table-column
label=
"栏目名"
align=
"left"
prop=
"contentCategoryId"
:formatter=
"contentCategoryIdFormat"
width=
"100"
>
</el-table-column>
<el-table-column
label=
"文章标题"
align=
"left"
prop=
"contentTitle"
>
<el-table-column
label=
"文章标题"
align=
"left"
prop=
"contentTitle"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
label=
"作者"
align=
"left"
prop=
"contentAuthor"
width=
"100"
>
<el-table-column
label=
"作者"
align=
"left"
prop=
"contentAuthor"
width=
"100"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
label=
"排序"
width=
"
60
"
align=
"right"
prop=
"contentSort"
>
<el-table-column
label=
"排序"
width=
"
55
"
align=
"right"
prop=
"contentSort"
>
</el-table-column>
<el-table-column
label=
"发布时间"
align=
"center"
prop=
"contentDatetime"
width=
"120"
>
<el-table-column
label=
"点击"
width=
"55"
align=
"right"
prop=
"contentHit"
>
<template
slot-scope=
"scope"
>
{{scope.row.contentHit?scope.row.contentHit:0}}
</template>
</el-table-column>
<el-table-column
label=
"发布时间"
align=
"center"
prop=
"contentDatetime"
:formatter=
"dateFormat"
width=
"120"
>
</el-table-column>
<el-table-column
label=
"操作"
width=
"120"
align=
"center"
>
<template
slot-scope=
"scope"
>
...
...
@@ -151,6 +156,9 @@
pageSize
:
that
.
pageSize
}
var
form
=
JSON
.
parse
(
JSON
.
stringify
(
that
.
form
))
if
(
form
.
contentType
.
length
>
0
){
form
.
contentType
=
form
.
contentType
.
join
(
','
);
}
for
(
key
in
form
){
if
(
!
form
[
key
]){
delete
form
[
key
]
...
...
@@ -244,6 +252,13 @@
}
return
value
;
},
dateFormat
:
function
(
row
,
column
,
cellValue
,
index
){
if
(
cellValue
){
return
ms
.
util
.
date
.
fmt
(
cellValue
,
'yyyy-MM-dd'
);
}
else
{
return
''
}
},
contentDisplayFormat
(
row
,
column
,
cellValue
,
index
){
var
value
=
""
;
if
(
cellValue
){
...
...
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