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
5c770f51
Commit
5c770f51
authored
Jan 09, 2020
by
铭飞
Committed by
Gitee
Jan 09, 2020
Browse files
Options
Browse Files
Download
Plain Diff
!209 修复无法保存空值问题,与后台管理首页获取并显示铭飞最新动态信息
Merge pull request !209 from 熊志伟123123/5.0.0
parents
718ac960
42c9e189
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
70 additions
and
22 deletions
+70
-22
CategoryAction.java
src/main/java/net/mingsoft/cms/action/CategoryAction.java
+2
-6
ICategoryDao.xml
src/main/java/net/mingsoft/cms/dao/ICategoryDao.xml
+3
-3
IContentDao.xml
src/main/java/net/mingsoft/cms/dao/IContentDao.xml
+6
-6
resources.properties
...main/java/net/mingsoft/cms/resources/resources.properties
+33
-5
form.ftl
src/main/webapp/WEB-INF/manager/cms/category/form.ftl
+3
-0
form.ftl
src/main/webapp/WEB-INF/manager/cms/content/form.ftl
+3
-0
main.ftl
src/main/webapp/WEB-INF/manager/main.ftl
+20
-2
No files found.
src/main/java/net/mingsoft/cms/action/CategoryAction.java
View file @
5c770f51
...
...
@@ -163,9 +163,7 @@ public class CategoryAction extends BaseAction{
if
(!
StringUtil
.
checkLength
(
category
.
getCategoryTitle
()+
""
,
1
,
100
)){
return
ResultData
.
build
().
error
(
getResString
(
"err.length"
,
this
.
getResString
(
"category.title"
),
"1"
,
"100"
));
}
if
(!
StringUtil
.
checkLength
(
category
.
getCategoryFlag
()+
""
,
1
,
100
)){
return
ResultData
.
build
().
error
(
getResString
(
"err.length"
,
this
.
getResString
(
"category.flag"
),
"1"
,
"100"
));
}
if
(!
StringUtil
.
checkLength
(
category
.
getCategoryPath
()+
""
,
1
,
100
)){
return
ResultData
.
build
().
error
(
getResString
(
"err.length"
,
this
.
getResString
(
"category.path"
),
"1"
,
"100"
));
}
...
...
@@ -236,9 +234,7 @@ public class CategoryAction extends BaseAction{
if
(!
StringUtil
.
checkLength
(
category
.
getCategoryTitle
()+
""
,
1
,
100
)){
return
ResultData
.
build
().
error
(
getResString
(
"err.length"
,
this
.
getResString
(
"category.title"
),
"1"
,
"100"
));
}
if
(!
StringUtil
.
checkLength
(
category
.
getCategoryFlag
()+
""
,
0
,
100
)){
return
ResultData
.
build
().
error
(
getResString
(
"err.length"
,
this
.
getResString
(
"category.flag"
),
"1"
,
"100"
));
}
if
(!
StringUtil
.
checkLength
(
category
.
getCategoryPath
()+
""
,
0
,
100
)){
return
ResultData
.
build
().
error
(
getResString
(
"err.length"
,
this
.
getResString
(
"category.path"
),
"1"
,
"100"
));
}
...
...
src/main/java/net/mingsoft/cms/dao/ICategoryDao.xml
View file @
5c770f51
...
...
@@ -96,10 +96,10 @@
<if
test=
"categorySort != null"
>
category_sort=#{categorySort},
</if>
<if
test=
"categoryListUrl != null and categoryListUrl != ''"
>
category_list_url=#{categoryListUrl},
</if>
<if
test=
"categoryUrl != null and categoryUrl != ''"
>
category_url=#{categoryUrl},
</if>
<if
test=
"categoryKeyword != null
and categoryKeyword != ''
"
>
category_keyword=#{categoryKeyword},
</if>
<if
test=
"categoryDescrip != null
and categoryDescrip != ''
"
>
category_descrip=#{categoryDescrip},
</if>
<if
test=
"categoryKeyword != null "
>
category_keyword=#{categoryKeyword},
</if>
<if
test=
"categoryDescrip != null "
>
category_descrip=#{categoryDescrip},
</if>
<if
test=
"categoryImg != null and categoryImg != ''"
>
category_img=#{categoryImg},
</if>
<if
test=
"categoryDiyUrl != null
and categoryDiyUrl != ''
"
>
category_diy_url=#{categoryDiyUrl},
</if>
<if
test=
"categoryDiyUrl != null"
>
category_diy_url=#{categoryDiyUrl},
</if>
<if
test=
"mdiyModelId != null and mdiyModelId != ''"
>
mdiy_model_id=#{mdiyModelId},
</if>
<if
test=
"categoryDatetime != null"
>
category_datetime=#{categoryDatetime},
</if>
<if
test=
"categoryManagerId != null"
>
category_manager_id=#{categoryManagerId},
</if>
...
...
src/main/java/net/mingsoft/cms/dao/IContentDao.xml
View file @
5c770f51
...
...
@@ -83,7 +83,7 @@
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"contentTitle != null and contentTitle != ''"
>
#{contentTitle},
</if>
<if
test=
"contentCategoryId != null and contentCategoryId != ''"
>
#{contentCategoryId},
</if>
<if
test=
"contentType != null
and contentType != ''
"
>
#{contentType},
</if>
<if
test=
"contentType != null "
>
#{contentType},
</if>
<if
test=
"contentDisplay != null and contentDisplay != ''"
>
#{contentDisplay},
</if>
<if
test=
"contentAuthor != null and contentAuthor != ''"
>
#{contentAuthor},
</if>
<if
test=
"contentSource != null and contentSource != ''"
>
#{contentSource},
</if>
...
...
@@ -112,14 +112,14 @@
<if
test=
"contentCategoryId != null and contentCategoryId != ''"
>
content_category_id=#{contentCategoryId},
</if>
<if
test=
"contentType != null "
>
content_type=#{contentType},
</if>
<if
test=
"contentDisplay != null and contentDisplay != ''"
>
content_display=#{contentDisplay},
</if>
<if
test=
"contentAuthor != null
and contentAuthor != ''
"
>
content_author=#{contentAuthor},
</if>
<if
test=
"contentSource != null
and contentSource != ''
"
>
content_source=#{contentSource},
</if>
<if
test=
"contentAuthor != null "
>
content_author=#{contentAuthor},
</if>
<if
test=
"contentSource != null "
>
content_source=#{contentSource},
</if>
<if
test=
"contentDatetime != null"
>
content_datetime=#{contentDatetime},
</if>
<if
test=
"contentSort != null"
>
content_sort=#{contentSort},
</if>
<if
test=
"contentImg != null and contentImg != ''"
>
content_img=#{contentImg},
</if>
<if
test=
"contentDescription != null
and contentDescription != ''
"
>
content_description=#{contentDescription},
</if>
<if
test=
"contentKeyword != null
and contentKeyword != ''
"
>
content_keyword=#{contentKeyword},
</if>
<if
test=
"contentDetails != null
and contentDetails != ''
"
>
content_details=#{contentDetails},
</if>
<if
test=
"contentDescription != null "
>
content_description=#{contentDescription},
</if>
<if
test=
"contentKeyword != null "
>
content_keyword=#{contentKeyword},
</if>
<if
test=
"contentDetails != null "
>
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"
>
app_id=#{appId},
</if>
...
...
src/main/java/net/mingsoft/cms/resources/resources.properties
View file @
5c770f51
#
#Mon Dec 23 09:24:03 CST 2019
content.id
=
\u6587\u
7AE0
\u
7F16
\u
53F7
hl.ip
=
\u
6D4F
\u
89C8ip
hl.people.id
=
\u7528\u6237
id
hl.is.mobile
=
\u
662F
\u5426\u
4E3A
\u
79FB
\u
52A8
\u
7AEF
#Thu Nov 28 15:12:32 CST 2019
category.img
=
\u
7F29
\u7565\u
56FE
appid
=
\u6587\u
7AE0
\u
7BA1
\u7406\u7684\u
5E94
\u7528
id
content.datetime
=
\u
53D1
\u
5E03
\u
65F6
\u
95F4
category.manager.id
=
\u
53D1
\u
5E03
\u7528\u6237
id
category.title
=
\u
680F
\u
76EE
\u
7BA1
\u7406\u
540D
\u
79F0
category.keyword
=
\u
680F
\u
76EE
\u
7BA1
\u7406\u5173\u
952E
\u
5B57
content.img
=
\u6587\u
7AE0
\u
7F29
\u7565\u
56FE
category.path
=
\u
680F
\u
76EE
\u
8DEF
\u
5F84
content.type
=
\u6587\u
7AE0
\u
7C7B
\u
578B
category.url
=
\u5185\u
5BB9
\u
6A21
\u
677F
dict.id
=
\u
5B57
\u5178\u
5BF9
\u
5E94
\u
7F16
\u
53F7
content.author
=
\u6587\u
7AE0
\u
4F5C
\u8005
category.parent.id
=
\u7236\u
7C7B
\u
578B
\u
7F16
\u
53F7
category.datetime
=
\u
7C7B
\u
522B
\u
53D1
\u
5E03
\u
65F6
\u
95F4
category.flag
=
\u
680F
\u
76EE
\u
5C5E
\u6027
content.description
=
\u
63CF
\u
8FF0
content.url
=
\u6587\u
7AE0
\u
8DF3
\u
8F6C
\u
94FE
\u
63A5
\u5730\u5740
category.sort
=
\u
81EA
\u
5B9A
\u
4E49
\u
987A
\u
5E8F
content.title
=
\u6587\u
7AE0
\u6807\u9898
content.category.id
=
\u6240\u
5C5E
\u
680F
\u
76EE
id
=
\u
7F16
\u
53F7
app.id
=
\u
5E94
\u7528\u
7F16
\u
53F7
category.list.url
=
\u5217\u8868\u
6A21
\u
677F
mdiy.model.id
=
\u
680F
\u
76EE
\u
7BA1
\u7406\u7684\u5185\u
5BB9
\u
6A21
\u
578Bid
content.source
=
\u6587\u
7AE0
\u6765\u
6E90
content.display
=
\u
662F
\u5426\u
663E
\u
793A
category.type
=
\u
680F
\u
76EE
\u
7BA1
\u7406\u
5C5E
\u6027
category.descrip
=
\u
680F
\u
76EE
\u
7BA1
\u7406\u
63CF
\u
8FF0
content.details
=
\u6587\u
7AE0
\u5185\u
5BB9
category.id
=
\u6240\u
5C5E
\u
680F
\u
76EE
content.sort
=
\u
81EA
\u
5B9A
\u
4E49
\u
987A
\u
5E8F
category.diy.url
=
\u
81EA
\u
5B9A
\u
4E49
\u
94FE
\u
63A5
content.keyword
=
\u5173\u
952E
\u
5B57
src/main/webapp/WEB-INF/manager/cms/category/form.ftl
View file @
5c770f51
...
...
@@ -283,6 +283,9 @@
"required"
:
true
,
"message"
:
"请选择栏目管理名称"
},
{
"pattern"
:
/^
[
^
[
!
@
#
$
%^&*
()
_
+-
/~
?
!@#¥%…&*()——+—?》《:“‘’]+$/
,
"message"
:
"栏目管理名称格式不匹配"
}],
categoryListUrl
:
[{
"required"
:
true
,
"message"
:
"请选择列表模板"
}],
// 内容模板
categoryUrl
:
[{
"required"
:
true
,
"message"
:
"请选择内容模板"
}],
},
}
...
...
src/main/webapp/WEB-INF/manager/cms/content/form.ftl
View file @
5c770f51
...
...
@@ -448,6 +448,9 @@
if
(
res
.
data
.
contentType
)
{
res
.
data
.
contentType
=
res
.
data
.
contentType
.
split
(
','
);
}
else
{
res
.
data
.
contentType
=
[];
}
if
(
res
.
data
.
contentImg
)
{
res
.
data
.
contentImg
=
JSON
.
parse
(
res
.
data
.
contentImg
);
res
.
data
.
contentImg
.
forEach
(
function
(
value
)
{
...
...
src/main/webapp/WEB-INF/manager/main.ftl
View file @
5c770f51
...
...
@@ -212,12 +212,12 @@
</div>
</div>
<div
class=
"class-56"
>
<div
class=
"class-57"
>
<div
class=
"class-57"
@
click=
"openMCMSNews"
>
<div
class=
"class-58"
>
<div
class=
"class-59"
>
</div>
<div
class=
"class-60"
>
铭飞商城多商户功能现已正式上线试...
{{ msNewsLast }}
</div>
</div>
</div>
...
...
@@ -432,6 +432,8 @@
},
data
:
{
base
:
ms
.
base
,
msNewsLast
:
''
,
msNewsPath
:
''
},
methods
:
{
jumpArtcleManager
(){
...
...
@@ -493,8 +495,23 @@
window
.
open
(
"http://wpa.qq.com/msgrd?v=3&uin=3336073455&site=qq&menu=yes"
);
},
//打开铭飞消息页面
openMCMSNews
(){
window
.
open
(
this
.
msNewsPath
);
},
getNewsLast
(){
var
that
=
this
;
axios
.
create
({
withCredentials
:
true
}).
get
(
"https://ms.mingsoft.net/cms/content/list.do?contentCategoryId=202"
).
then
(
function
(
res
){
console
.
log
(
res
.
data
.
data
.
rows
[
0
]);
that
.
msNewsLast
=
res
.
data
.
data
.
rows
[
0
].
contentTitle
.
toString
();
that
.
msNewsPath
=
'https://ms.mingsoft.net/html/1/203/202/'
+
res
.
data
.
data
.
rows
[
0
].
id
+
'.html'
})
}
},
created
(){
this
.
getNewsLast
()
}
})
</script>
...
...
@@ -1243,6 +1260,7 @@
}
.class-57
{
cursor
:
pointer
;
color
:
#333333
;
outline
:
none
;
outline-offset
:
-1px
;
...
...
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