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
818f5552
Commit
818f5552
authored
Aug 14, 2019
by
sgjj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
0fd4a57a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
533 additions
and
240 deletions
+533
-240
pom.xml
pom.xml
+9
-15
ColumnAction.java
src/main/java/net/mingsoft/cms/action/ColumnAction.java
+35
-14
GeneraterAction.java
src/main/java/net/mingsoft/cms/action/GeneraterAction.java
+11
-0
MCmsAction.java
src/main/java/net/mingsoft/cms/action/web/MCmsAction.java
+76
-9
IArticleBiz.java
src/main/java/net/mingsoft/cms/biz/IArticleBiz.java
+73
-63
ArticleBizImpl.java
src/main/java/net/mingsoft/cms/biz/impl/ArticleBizImpl.java
+24
-18
IArticleDao.java
src/main/java/net/mingsoft/cms/dao/IArticleDao.java
+72
-69
IArticleDao.xml
src/main/java/net/mingsoft/cms/dao/IArticleDao.xml
+0
-0
resources_zh_CN.properties
...ava/net/mingsoft/cms/resources/resources_zh_CN.properties
+5
-4
WebConfig.java
src/main/java/net/mingsoft/config/WebConfig.java
+31
-20
application.yml
src/main/resources/application.yml
+1
-1
article_main.ftl
src/main/webapp/WEB-INF/manager/cms/article/article_main.ftl
+1
-1
login.ftl
src/main/webapp/WEB-INF/manager/login.ftl
+165
-0
main.ftl
src/main/webapp/WEB-INF/manager/main.ftl
+0
-0
about.htm
src/main/webapp/templets/1/default/about.htm
+1
-1
advice.htm
src/main/webapp/templets/1/default/advice.htm
+1
-1
case-list.htm
src/main/webapp/templets/1/default/case-list.htm
+1
-1
head-file.htm
src/main/webapp/templets/1/default/head-file.htm
+1
-0
about.htm
src/main/webapp/templets/1/default/m/about.htm
+4
-3
advice.htm
src/main/webapp/templets/1/default/m/advice.htm
+3
-3
case-list.htm
src/main/webapp/templets/1/default/m/case-list.htm
+3
-3
contact.htm
src/main/webapp/templets/1/default/m/contact.htm
+4
-3
news-list.htm
src/main/webapp/templets/1/default/m/news-list.htm
+4
-3
news-show.htm
src/main/webapp/templets/1/default/m/news-show.htm
+3
-3
news-show.htm
src/main/webapp/templets/1/default/news-show.htm
+1
-1
search.htm
src/main/webapp/templets/1/default/search.htm
+4
-4
No files found.
pom.xml
View file @
818f5552
...
...
@@ -3,10 +3,9 @@
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
net.mingsoft
</groupId>
<artifactId>
mcms
</artifactId>
<version>
4.7.
0-SNAPSHOT
</version>
<version>
4.7.
1
</version>
<name>
ms-mcms
</name>
<properties>
<java.version>
1.8
</java.version>
...
...
@@ -38,24 +37,19 @@
<dependencies>
<dependency>
<groupId>
net.mingsoft
</groupId>
<artifactId>
ms-
mpeople
</artifactId>
<version>
1.0.
7
</version>
<artifactId>
ms-
basic
</artifactId>
<version>
1.0.
11
</version>
</dependency>
<dependency>
<groupId>
net.mingsoft
</groupId>
<artifactId>
ms-upgrader
</artifactId>
<version>
1.0.5-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
javax.servlet
</groupId>
<artifactId>
javax.servlet-api
</artifactId>
<version>
3.1.0
</version>
<scope>
test
</scope>
<artifactId>
ms-mpeople
</artifactId>
<version>
1.0.8
</version>
</dependency>
<!-- 此部分是铭飞平台MStroe的客户端(MStore不在铭飞开源产品范围),如果不需要使用MStore可以删除掉 -->
<dependency>
<groupId>
org.apache.tomcat.embed
</groupId>
<artifactId>
tomcat-embed-jasp
er
</artifactId>
<version>
9.0.16
</version>
<groupId>
net.mingsoft
</groupId>
<artifactId>
ms-upgrad
er
</artifactId>
<version>
1.0.8
</version>
</dependency>
</dependencies>
<build>
...
...
src/main/java/net/mingsoft/cms/action/ColumnAction.java
View file @
818f5552
...
...
@@ -9,6 +9,8 @@ import java.util.List;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
net.mingsoft.basic.util.ArrysUtil
;
import
net.mingsoft.mdiy.util.DictUtil
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -41,7 +43,7 @@ import net.mingsoft.mdiy.util.ParserUtil;
/**
* 铭飞MS平台,通用栏目分类,为了区分文章栏目与其他栏目的权限,该类是从basic模块复制过来
* @author 铭飞开发团队
* @version
* @version
* 版本号:100-000-000<br/>
* 创建日期:2017年8月9日<br/>
* 历史修订:<br/>
...
...
@@ -49,8 +51,8 @@ import net.mingsoft.mdiy.util.ParserUtil;
@Controller
(
"articleColumnAction"
)
@RequestMapping
(
"/${ms.manager.path}/cms/column"
)
public
class
ColumnAction
extends
BaseAction
{
/**
* 栏目业务层
*/
...
...
@@ -58,7 +60,7 @@ public class ColumnAction extends BaseAction{
private
IColumnBiz
columnBiz
;
@Autowired
private
ICategoryBiz
categoryBiz
;
/**
* 模块业务层注入
*/
...
...
@@ -75,7 +77,7 @@ public class ColumnAction extends BaseAction{
}
/**
* 栏目添加跳转页面
*
*
* @return
*/
@RequestMapping
(
"/add"
)
...
...
@@ -84,6 +86,8 @@ public class ColumnAction extends BaseAction{
int
appId
=
BasicUtil
.
getAppId
();
List
<
ColumnEntity
>
list
=
columnBiz
.
queryAll
(
appId
,
BasicUtil
.
getModelCodeId
(
net
.
mingsoft
.
cms
.
constant
.
ModelCode
.
CMS_COLUMN
.
toString
()));
ColumnEntity
columnSuper
=
new
ColumnEntity
();
// 栏目属性
model
.
addAttribute
(
"columnFlag"
,
DictUtil
.
list
(
"栏目属性"
));
model
.
addAttribute
(
"appId"
,
appId
);
model
.
addAttribute
(
"columnSuper"
,
columnSuper
);
model
.
addAttribute
(
"column"
,
new
ColumnEntity
());
...
...
@@ -114,7 +118,7 @@ public class ColumnAction extends BaseAction{
this
.
outJson
(
response
,
ModelCode
.
COLUMN
,
false
,
getResString
(
"err.empty"
,
this
.
getResString
(
"columnType"
)));
return
false
;
}
return
true
;
}
...
...
@@ -154,9 +158,9 @@ public class ColumnAction extends BaseAction{
columnBiz
.
updateEntity
(
column
);
//生成文件夹
File
fileName
=
new
File
(
file
);
fileName
.
mkdir
();
fileName
.
mkdir
();
}
/**
* @param column 栏目表实体
* <i>column参数包含字段信息参考:</i><br/>
...
...
@@ -180,7 +184,7 @@ public class ColumnAction extends BaseAction{
};
this
.
outJson
(
response
,
true
);
}
/**
* 栏目更新页面跳转
* @param columnId 栏目ID
...
...
@@ -199,6 +203,8 @@ public class ColumnAction extends BaseAction{
list
=
columnBiz
.
queryAll
(
appId
,
BasicUtil
.
getModelCodeId
(
net
.
mingsoft
.
cms
.
constant
.
ModelCode
.
CMS_COLUMN
.
toString
()));
//查询当前栏目实体
ColumnEntity
column
=
(
ColumnEntity
)
columnBiz
.
getEntity
(
columnId
);
// 栏目属性
model
.
addAttribute
(
"columnFlag"
,
DictUtil
.
list
(
"栏目属性"
));
model
.
addAttribute
(
"appId"
,
appId
);
model
.
addAttribute
(
"column"
,
column
);
model
.
addAttribute
(
"columnc"
,
column
.
getCategoryId
());
...
...
@@ -212,7 +218,7 @@ public class ColumnAction extends BaseAction{
model
.
addAttribute
(
"model"
,
"cms"
);
return
"/basic/column/form"
;
}
/**
* 栏目首页面列表显示
*/
...
...
@@ -227,10 +233,10 @@ public class ColumnAction extends BaseAction{
EUListBean
_list
=
new
EUListBean
(
list
,
list
.
size
());
this
.
outJson
(
response
,
net
.
mingsoft
.
base
.
util
.
JSONArray
.
toJSONString
(
_list
));
}
/**
* 栏目添加
*
*
* @param column
* 栏目对象
* @return 返回页面跳转
...
...
@@ -245,6 +251,13 @@ public class ColumnAction extends BaseAction{
column
.
setCategoryManagerId
(
getManagerBySession
(
request
).
getManagerId
());
column
.
setCategoryDateTime
(
new
Timestamp
(
System
.
currentTimeMillis
()));
column
.
setCategoryModelId
(
BasicUtil
.
getModelCodeId
(
net
.
mingsoft
.
cms
.
constant
.
ModelCode
.
CMS_COLUMN
.
toString
()));
String
checkboxType
=
BasicUtil
.
getString
(
"checkboxType"
);
//如果选择一个属性不做排序操作
if
(!
StringUtils
.
isEmpty
(
checkboxType
)
&&
checkboxType
.
length
()>
2
){
column
.
setColumnFlag
(
ArrysUtil
.
sort
(
checkboxType
,
","
)+
","
);
}
else
{
column
.
setColumnFlag
(
checkboxType
);
}
if
(
column
.
getColumnType
()==
ColumnEntity
.
ColumnTypeEnum
.
COLUMN_TYPE_COVER
.
toInt
()){
column
.
setColumnListUrl
(
null
);
}
...
...
@@ -252,7 +265,7 @@ public class ColumnAction extends BaseAction{
this
.
columnPath
(
request
,
column
);
this
.
outJson
(
response
,
ModelCode
.
COLUMN
,
true
,
null
,
JSONArray
.
toJSONString
(
column
.
getCategoryId
()));
}
/**
* 更新栏目
* @param column 栏目实体
...
...
@@ -274,6 +287,13 @@ public class ColumnAction extends BaseAction{
}
column
.
setCategoryManagerId
(
getManagerBySession
(
request
).
getManagerId
());
column
.
setAppId
(
websiteId
);
String
checkboxType
=
BasicUtil
.
getString
(
"checkboxType"
);
//如果选择一个属性不做排序操作
if
(!
StringUtils
.
isEmpty
(
checkboxType
)
&&
checkboxType
.
length
()>
2
){
column
.
setColumnFlag
(
ArrysUtil
.
sort
(
checkboxType
,
","
)+
","
);
}
else
{
column
.
setColumnFlag
(
checkboxType
);
}
columnBiz
.
updateCategory
(
column
);
this
.
columnPath
(
request
,
column
);
//查询当前栏目是否有子栏目,
...
...
@@ -291,4 +311,4 @@ public class ColumnAction extends BaseAction{
}
this
.
outJson
(
response
,
ModelCode
.
COLUMN
,
true
,
null
,
JSONArray
.
toJSONString
(
column
.
getCategoryId
()));
}
}
}
\ No newline at end of file
src/main/java/net/mingsoft/cms/action/GeneraterAction.java
View file @
818f5552
...
...
@@ -30,6 +30,8 @@ import java.util.List;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.copier.CopyOptions
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
...
...
@@ -194,8 +196,17 @@ public class GeneraterAction extends BaseAction {
CmsParserUtil
.
generateList
(
column
,
articleIdList
.
size
());
break
;
case
ColumnEntity
.
COLUMN_TYPE_COVER
:
// 单页
if
(
articleIdList
.
size
()==
0
){
ColumnArticleIdBean
columnArticleIdBean
=
new
ColumnArticleIdBean
();
CopyOptions
copyOptions
=
CopyOptions
.
create
();
copyOptions
.
setIgnoreError
(
true
);
BeanUtil
.
copyProperties
(
column
,
columnArticleIdBean
,
copyOptions
);
articleIdList
.
add
(
columnArticleIdBean
);
}
CmsParserUtil
.
generateBasic
(
articleIdList
);
break
;
default
:
throw
new
IllegalStateException
(
"Unexpected value: "
+
column
.
getColumnType
());
}
}
}
catch
(
IOException
e
)
{
...
...
src/main/java/net/mingsoft/cms/action/web/MCmsAction.java
View file @
818f5552
/**
The MIT License (MIT) * Copyright (c) 2016 铭飞科技(mingsoft.net)
The MIT License (MIT) * Copyright (c) 2016 铭飞科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
...
...
@@ -21,13 +21,23 @@ The MIT License (MIT) * Copyright (c) 2016 铭飞科技(mingsoft.net)
package
net
.
mingsoft
.
cms
.
action
.
web
;
import
java.io.File
;
import
java.io.IOException
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
cn.hutool.core.io.FileUtil
;
import
com.github.pagehelper.PageHelper
;
import
net.mingsoft.base.constant.Const
;
import
net.mingsoft.basic.util.SpringUtil
;
import
net.mingsoft.cms.constant.e.ColumnTypeEnum
;
import
net.mingsoft.mdiy.biz.IContentModelBiz
;
import
net.mingsoft.mdiy.entity.ContentModelEntity
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
...
...
@@ -54,13 +64,13 @@ import net.mingsoft.mdiy.util.ParserUtil;
/**
* 动态生成页面,需要后台配置自定义页数据
*
*
* @author 铭飞开源团队
* @date 2018年12月17日
*/
@Controller
(
"dynamicPageAction"
)
@RequestMapping
(
"/mcms"
)
public
class
MCmsAction
extends
net
.
mingsoft
.
mdiy
.
action
.
BaseAction
{
public
class
MCmsAction
extends
net
.
mingsoft
.
cms
.
action
.
BaseAction
{
/**
* 自定义页面业务层
...
...
@@ -84,7 +94,7 @@ public class MCmsAction extends net.mingsoft.mdiy.action.BaseAction {
// 如商城就为:/mall/{key}.do
/**
* 前段会员中心所有页面都可以使用该方法 请求地址例如: /{diy}.do,例如登陆界面,与注册界面都可以使用
*
*
* @param key
*/
@RequestMapping
(
"/{diy}.do"
)
...
...
@@ -158,7 +168,7 @@ public class MCmsAction extends net.mingsoft.mdiy.action.BaseAction {
//获取栏目编号
int
typeId
=
BasicUtil
.
getInt
(
ParserUtil
.
TYPE_ID
,
0
);
int
size
=
BasicUtil
.
getInt
(
ParserUtil
.
SIZE
,
10
);
//获取文章总数
List
<
ColumnArticleIdBean
>
columnArticles
=
articleBiz
.
queryIdsByCategoryIdForParser
(
typeId
,
null
,
null
);
//判断栏目下是否有文章
...
...
@@ -175,7 +185,7 @@ public class MCmsAction extends net.mingsoft.mdiy.action.BaseAction {
map
.
put
(
ParserUtil
.
TYPE_ID
,
typeId
);
//设置列表当前页
map
.
put
(
ParserUtil
.
PAGE_NO
,
BasicUtil
.
getInt
(
ParserUtil
.
PAGE_NO
,
1
));
map
.
put
(
ParserUtil
.
URL
,
BasicUtil
.
getUrl
());
map
.
put
(
ParserUtil
.
PAGE
,
page
);
//动态解析
...
...
@@ -198,19 +208,27 @@ public class MCmsAction extends net.mingsoft.mdiy.action.BaseAction {
}
this
.
outString
(
resp
,
content
);
}
/**
* 动态详情页
* @param id 文章编号
*/
@GetMapping
(
"/view.do"
)
public
void
view
(
HttpServletRequest
req
,
HttpServletResponse
resp
)
{
public
void
view
(
String
orderby
,
String
order
,
HttpServletRequest
req
,
HttpServletResponse
resp
)
{
//参数文章编号
ArticleEntity
article
=
(
ArticleEntity
)
articleBiz
.
getEntity
(
BasicUtil
.
getInt
(
ParserUtil
.
ID
));
if
(
ObjectUtil
.
isNull
(
article
)){
this
.
outJson
(
resp
,
null
,
false
,
getResString
(
"err.empty"
,
this
.
getResString
(
"id"
)));
return
;
return
;
}
if
(
StringUtils
.
isNotBlank
(
order
)){
//防注入
if
(!
order
.
toLowerCase
().
equals
(
"asc"
)&&!
order
.
toLowerCase
().
equals
(
"desc"
)){
this
.
outJson
(
resp
,
null
,
false
,
getResString
(
"err.error"
,
this
.
getResString
(
"order"
)));
return
;
}
}
PageBean
page
=
new
PageBean
();
//根据文章编号查询栏目详情模版
ColumnEntity
column
=
(
ColumnEntity
)
columnBiz
.
getEntity
(
article
.
getBasicCategoryId
());
//解析后的内容
...
...
@@ -221,6 +239,55 @@ public class MCmsAction extends net.mingsoft.mdiy.action.BaseAction {
//设置动态请求的模块路径
map
.
put
(
ParserUtil
.
MODEL_NAME
,
"mcms"
);
map
.
put
(
ParserUtil
.
URL
,
BasicUtil
.
getUrl
());
map
.
put
(
ParserUtil
.
PAGE
,
page
);
map
.
put
(
ParserUtil
.
ID
,
article
.
getArticleID
());
List
<
ColumnArticleIdBean
>
articleIdList
=
articleBiz
.
queryIdsByCategoryIdForParser
(
column
.
getCategoryCategoryId
(),
null
,
null
,
orderby
,
order
);
Map
<
Object
,
Object
>
contentModelMap
=
new
HashMap
<
Object
,
Object
>();
ContentModelEntity
contentModel
=
null
;
for
(
int
artId
=
0
;
artId
<
articleIdList
.
size
();)
{
//如果不是当前文章则跳过
if
(
articleIdList
.
get
(
artId
).
getArticleId
()
!=
article
.
getArticleID
()){
artId
++;
continue
;
}
// 文章的栏目路径
String
articleColumnPath
=
articleIdList
.
get
(
artId
).
getColumnPath
();
// 文章的栏目模型编号
int
columnContentModelId
=
articleIdList
.
get
(
artId
).
getColumnContentModelId
();
Map
<
String
,
Object
>
parserParams
=
new
HashMap
<
String
,
Object
>();
parserParams
.
put
(
ParserUtil
.
COLUMN
,
articleIdList
.
get
(
artId
));
// 判断当前栏目是否有自定义模型
if
(
columnContentModelId
>
0
)
{
// 通过当前栏目的模型编号获取,自定义模型表名
if
(
contentModelMap
.
containsKey
(
columnContentModelId
))
{
parserParams
.
put
(
ParserUtil
.
TABLE_NAME
,
contentModel
.
getCmTableName
());
}
else
{
// 通过栏目模型编号获取自定义模型实体
contentModel
=
(
ContentModelEntity
)
SpringUtil
.
getBean
(
IContentModelBiz
.
class
)
.
getEntity
(
columnContentModelId
);
// 将自定义模型编号设置为key值
contentModelMap
.
put
(
columnContentModelId
,
contentModel
.
getCmTableName
());
parserParams
.
put
(
ParserUtil
.
TABLE_NAME
,
contentModel
.
getCmTableName
());
}
}
// 第一篇文章没有上一篇
if
(
artId
>
0
)
{
ColumnArticleIdBean
preCaBean
=
articleIdList
.
get
(
artId
-
1
);
//判断当前文档是否与上一页文章在同一栏目下,并且不能使用父栏目字符串,因为父栏目中没有所属栏目编号
if
(
articleColumnPath
.
contains
(
preCaBean
.
getCategoryId
()+
""
)){
page
.
setPreId
(
preCaBean
.
getArticleId
());
}
}
// 最后一篇文章没有下一篇
if
(
artId
+
1
<
articleIdList
.
size
())
{
ColumnArticleIdBean
nextCaBean
=
articleIdList
.
get
(
artId
+
1
);
//判断当前文档是否与下一页文章在同一栏目下并且不能使用父栏目字符串,因为父栏目中没有所属栏目编号
if
(
articleColumnPath
.
contains
(
nextCaBean
.
getCategoryId
()+
""
)){
page
.
setNextId
(
nextCaBean
.
getArticleId
());
}
}
break
;
}
try
{
//根据模板路径,参数生成
content
=
CmsParserUtil
.
generate
(
column
.
getColumnUrl
(),
map
,
isMobileDevice
(
req
));
...
...
src/main/java/net/mingsoft/cms/biz/IArticleBiz.java
View file @
818f5552
/**
The MIT License (MIT) * Copyright (c) 2016 铭飞科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/**
The MIT License (MIT) * Copyright (c) 2016 铭飞科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package
net
.
mingsoft
.
cms
.
biz
;
import
java.util.List
;
import
java.util.Map
;
import
net.mingsoft.basic.biz.IBasicBiz
;
import
net.mingsoft.cms.bean.ColumnArticleIdBean
;
import
net.mingsoft.cms.entity.ArticleEntity
;
import
net.mingsoft.mdiy.entity.ContentModelEntity
;
/**
*
* @ClassName: IArticleBiz
* @Description:TODO(文章管理业务处理层 || 继承IBasicBiz业务处理层)
* @author: 铭飞开发团队
* @date: 2018年1月31日 下午2:53:32
*
* @Copyright: 2018 www.mingsoft.net Inc. All rights reserved.
import
java.util.List
;
import
java.util.Map
;
import
net.mingsoft.basic.biz.IBasicBiz
;
import
net.mingsoft.cms.bean.ColumnArticleIdBean
;
import
net.mingsoft.cms.entity.ArticleEntity
;
import
net.mingsoft.mdiy.entity.ContentModelEntity
;
/**
*
* @ClassName: IArticleBiz
* @Description:TODO(文章管理业务处理层 || 继承IBasicBiz业务处理层)
* @author: 铭飞开发团队
* @date: 2018年1月31日 下午2:53:32
*
* @Copyright: 2018 www.mingsoft.net Inc. All rights reserved.
*/
public
interface
IArticleBiz
extends
IBasicBiz
{
...
...
@@ -52,14 +52,14 @@ public interface IArticleBiz extends IBasicBiz {
* @param article
* 文件实体
* @return
*/
*/
@Deprecated
int
count
(
int
webId
,
int
[]
basicCategoryId
,
String
flag
,
String
noFlag
,
ArticleEntity
article
);
/**
* 通过分类id获取文章内容
*
*
* @param categoryId
* 分类编号
* @return
...
...
@@ -69,7 +69,7 @@ public interface IArticleBiz extends IBasicBiz {
/**
* 通过视图表来查询文章总数
*
*
* @param basicId
* 文章编号
*/
...
...
@@ -78,31 +78,31 @@ public interface IArticleBiz extends IBasicBiz {
/**
* 查找basicId下一篇文章
*
*
* @param appId
* 应用编号
* @param basicId
* 文章编号
* @return
*/
*/
@Deprecated
public
ArticleEntity
getNext
(
int
appId
,
int
basicId
,
Integer
categoryId
);
/**
* 查找basicId上一篇文章
*
*
* @param appId
* 应用编号
* @param basicId
* 文章编号
* @return
*/
*/
@Deprecated
public
ArticleEntity
getPrevious
(
int
appId
,
int
basicId
,
Integer
categoryId
);
/**
* 高级查询接口,主要提供给有自定义模型的栏目,返回總數
*
*
* @param contentModel
* 自定义模型
* @param whereMap
...
...
@@ -118,7 +118,7 @@ public interface IArticleBiz extends IBasicBiz {
/**
* 文章查询
*
*
* @para webId 网站编号
* @param basicCategoryIds
* 栏目编号集合
...
...
@@ -129,28 +129,37 @@ public interface IArticleBiz extends IBasicBiz {
* @param orderBy
* 排序字段
* @param order
* true 升序 false 降序 排序方式
* @param beginTime 开始时间
* @param endTime 结束时间
* true 升序 false 降序 排序方式
* @param beginTime 开始时间
* @param endTime 结束时间
* @param article
* 文章实体,便于扩展查询
* 文章实体,便于扩展查询
* @return 文章集合
*/
List
<
ArticleEntity
>
query
(
int
webId
,
int
[]
basicCategoryIds
,
String
flag
,
String
noFlag
,
String
orderBy
,
boolean
order
,
String
beginTime
,
String
endTime
,
ArticleEntity
article
);
/**
* 查询文章编号集合
* @param categoryId 栏目编号
* @param beginTime 开始时间
* @param endTime 结束时间
* @return
boolean
order
,
String
beginTime
,
String
endTime
,
ArticleEntity
article
);
/**
* 查询文章编号集合
* @param categoryId 栏目编号
* @param beginTime 开始时间
* @param endTime 结束时间
* @return
*/
public
List
<
ColumnArticleIdBean
>
queryIdsByCategoryIdForParser
(
int
categoryId
,
String
beginTime
,
String
endTime
);
/**
* 查询文章编号集合
* @param categoryId 栏目编号
* @param beginTime 开始时间
* @param endTime 结束时间
* @param orderBy 排序字段
* @param order 排序方式
* @return
*/
public
List
<
ColumnArticleIdBean
>
queryIdsByCategoryIdForParser
(
int
categoryId
,
String
beginTime
,
String
endTime
,
String
orderBy
,
String
order
);
/**
* 根据页面栏目的id获取与其绑定的文章实体
*
*
* @param basicCategoryId
* @return 文章实体
*/
...
...
@@ -162,7 +171,7 @@ public interface IArticleBiz extends IBasicBiz {
/**
* 高级查询接口,主要提供给有自定义模型的栏目,
*
*
* @param conntentModel
* 自定义模型
* @param whereMap
...
...
@@ -177,6 +186,6 @@ public interface IArticleBiz extends IBasicBiz {
*/
@Deprecated
public
List
<
ArticleEntity
>
queryListForSearch
(
ContentModelEntity
conntentModel
,
Map
whereMap
,
int
appId
,
List
ids
,
Map
orders
);
int
appId
,
List
ids
,
Map
orders
);
}
\ No newline at end of file
src/main/java/net/mingsoft/cms/biz/impl/ArticleBizImpl.java
View file @
818f5552
/**
The MIT License (MIT) * Copyright (c) 2016 铭飞科技(mingsoft.net)
The MIT License (MIT) * Copyright (c) 2016 铭飞科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
...
...
@@ -25,6 +25,7 @@ import java.util.ArrayList;
import
java.util.List
;
import
java.util.Map
;
import
com.github.pagehelper.PageHelper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -42,43 +43,43 @@ import net.mingsoft.mdiy.biz.IContentModelBiz;
import
net.mingsoft.mdiy.entity.ContentModelEntity
;
/**
*
* @ClassName: ArticleBizImpl
* @Description:TODO(文章管理业务层实现类 || 继承BasicBizImpl || 实现IArticleBiz)
*
* @ClassName: ArticleBizImpl
* @Description:TODO(文章管理业务层实现类 || 继承BasicBizImpl || 实现IArticleBiz)
* @author: 铭飞开发团队
* @date: 2018年1月31日 下午2:53:53
*
* @date: 2018年1月31日 下午2:53:53
*
* @Copyright: 2018 www.mingsoft.net Inc. All rights reserved.
*/
@Service
(
"ArticleBizImpl"
)
public
class
ArticleBizImpl
extends
BasicBizImpl
implements
IArticleBiz
{
/**
* 文章持久化处理
*/
private
IArticleDao
articleDao
;
/**
* 栏目业务处理
*/
@Autowired
private
ICategoryBiz
categoryBiz
;
private
ICategoryBiz
categoryBiz
;
/**
* 自定类型义业务处理
*/
@Autowired
private
IColumnBiz
columnBiz
;
/**
* 自定义模型
*/
@Autowired
private
IContentModelBiz
contentModelBiz
;
/**
* 模块管理业务层
*/
...
...
@@ -94,7 +95,7 @@ public class ArticleBizImpl extends BasicBizImpl implements IArticleBiz {
/**
* 获取Article的持久化层
*
*
* @return 返回持Article的久化对象
*/
public
IArticleDao
getArticleDao
()
{
...
...
@@ -133,7 +134,7 @@ public class ArticleBizImpl extends BasicBizImpl implements IArticleBiz {
/**
* 获取IBaseDao的持久化层
*
*
* @return 返回持articleDao的久化对象
*/
@Override
...
...
@@ -165,7 +166,7 @@ public class ArticleBizImpl extends BasicBizImpl implements IArticleBiz {
@Override
public
List
<
ArticleEntity
>
query
(
int
webId
,
int
[]
basicCategoryIds
,
String
flag
,
String
noFlag
,
String
orderBy
,
boolean
order
,
String
beginTime
,
String
endTime
,
ArticleEntity
article
)
{
boolean
order
,
String
beginTime
,
String
endTime
,
ArticleEntity
article
)
{
// TODO Auto-generated method stub
if
(
article
==
null
)
{
article
=
new
ArticleEntity
();
...
...
@@ -175,7 +176,7 @@ public class ArticleBizImpl extends BasicBizImpl implements IArticleBiz {
/**
* 根据页面栏目的id获取与其绑定的文章实体
*
*
* @param basicCategoryId
* @return 文章实体
*/
...
...
@@ -201,7 +202,7 @@ public class ArticleBizImpl extends BasicBizImpl implements IArticleBiz {
/**
* 设置Article的持久化层
*
*
* @param articleDao
*/
@Autowired
...
...
@@ -212,6 +213,10 @@ public class ArticleBizImpl extends BasicBizImpl implements IArticleBiz {
@Override
public
List
<
ColumnArticleIdBean
>
queryIdsByCategoryIdForParser
(
int
categoryId
,
String
beginTime
,
String
endTime
)
{
return
this
.
articleDao
.
queryIdsByCategoryIdForParser
(
categoryId
,
BasicUtil
.
getAppId
(),
beginTime
,
endTime
);
return
this
.
articleDao
.
queryIdsByCategoryIdForParser
(
categoryId
,
BasicUtil
.
getAppId
(),
beginTime
,
endTime
,
null
,
null
);
}
@Override
public
List
<
ColumnArticleIdBean
>
queryIdsByCategoryIdForParser
(
int
categoryId
,
String
beginTime
,
String
endTime
,
String
orderBy
,
String
order
)
{
return
this
.
articleDao
.
queryIdsByCategoryIdForParser
(
categoryId
,
BasicUtil
.
getAppId
(),
beginTime
,
endTime
,
orderBy
,
order
);
}
}
\ No newline at end of file
src/main/java/net/mingsoft/cms/dao/IArticleDao.java
View file @
818f5552
/**
The MIT License (MIT) * Copyright (c) 2016 铭飞科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/**
The MIT License (MIT) * Copyright (c) 2016 铭飞科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package
net
.
mingsoft
.
cms
.
dao
;
import
java.util.List
;
import
java.util.Map
;
import
org.apache.ibatis.annotations.Param
;
import
net.mingsoft.cms.bean.ColumnArticleIdBean
;
import
net.mingsoft.cms.entity.ArticleEntity
;
import
net.mingsoft.base.dao.IBaseDao
;
/**
*
* @ClassName: IArticleDao
* @Description:TODO(文章管理持久化层 || 继承IBaseDao持久化层)
* @author: 铭飞开发团队
* @date: 2018年1月31日 下午2:55:33
*
* @Copyright: 2018 www.mingsoft.net Inc. All rights reserved.
import
java.util.List
;
import
java.util.Map
;
import
org.apache.ibatis.annotations.Param
;
import
net.mingsoft.cms.bean.ColumnArticleIdBean
;
import
net.mingsoft.cms.entity.ArticleEntity
;
import
net.mingsoft.base.dao.IBaseDao
;
/**
*
* @ClassName: IArticleDao
* @Description:TODO(文章管理持久化层 || 继承IBaseDao持久化层)
* @author: 铭飞开发团队
* @date: 2018年1月31日 下午2:55:33
*
* @Copyright: 2018 www.mingsoft.net Inc. All rights reserved.
*/
public
interface
IArticleDao
extends
IBaseDao
{
...
...
@@ -54,24 +54,24 @@ public interface IArticleDao extends IBaseDao {
* @param article
* 文章实体,便于扩展查询
* @return 文章总数
*/
*/
@Deprecated
int
count
(
@Param
(
"webId"
)
int
webId
,
@Param
(
"basicCategoryIds"
)
int
[]
basicCategoryIds
,
@Param
(
"flag"
)
String
flag
,
@Param
(
"noFlag"
)
String
noFlag
,
@Param
(
"article"
)
ArticleEntity
article
);
@Param
(
"noFlag"
)
String
noFlag
,
@Param
(
"article"
)
ArticleEntity
article
);
/**
* 通过分类id获取文章内容
*
*
* @param categoryId
* 分类编号
* @return 文章集合
*/
*/
@Deprecated
List
getByCategoryId
(
@Param
(
"categoryId"
)
int
categoryId
);
/**
* 通过视图表来查询文章总数
*
*
* @param basicId
* 文章编号
* @param contentModelTableName
...
...
@@ -81,7 +81,7 @@ public interface IArticleDao extends IBaseDao {
/**
* 查找basicId上一篇文章
*
*
* @param appId
* 应用编号
* @param basicId
...
...
@@ -91,11 +91,11 @@ public interface IArticleDao extends IBaseDao {
* @return
*/
ArticleEntity
getNextOrPrevious
(
@Param
(
"appId"
)
int
appId
,
@Param
(
"basicId"
)
int
basicId
,
@Param
(
"flag"
)
boolean
flag
,
@Param
(
"categoryId"
)
Integer
categoryId
);
@Param
(
"flag"
)
boolean
flag
,
@Param
(
"categoryId"
)
Integer
categoryId
);
/**
* 根据查询文章实体总数
*
*
* @param tableName
* :自定义生成的表名
* @param map
...
...
@@ -104,11 +104,11 @@ public interface IArticleDao extends IBaseDao {
* @return 文章实体总数
*/
int
getSearchCount
(
@Param
(
"tableName"
)
String
tableName
,
@Param
(
"map"
)
Map
<
String
,
List
>
map
,
@Param
(
"websiteId"
)
int
websiteId
,
@Param
(
"ids"
)
String
ids
);
@Param
(
"websiteId"
)
int
websiteId
,
@Param
(
"ids"
)
String
ids
);
/**
* 文章查询
*
*
* @para webId 网站编号
* @param basicCategoryIds
* 栏目编号集合
...
...
@@ -121,19 +121,19 @@ public interface IArticleDao extends IBaseDao {
* @param order
* true 升序 false 降序 排序方式
* @param article
* 文章实体,便于扩展查询
* @param beginTime 开始时间
* 文章实体,便于扩展查询
* @param beginTime 开始时间
* @param endTime 结束时间
* @return 文章集合
*/
List
<
ArticleEntity
>
query
(
@Param
(
"webId"
)
int
webId
,
@Param
(
"basicCategoryIds"
)
int
[]
basicCategoryIds
,
@Param
(
"flag"
)
String
flag
,
@Param
(
"noFlag"
)
String
noFlag
,
@Param
(
"orderBy"
)
String
orderBy
,
@Param
(
"order"
)
boolean
order
,
@Param
(
"beginTime"
)
String
beginTime
,
@Param
(
"endTime"
)
String
endTime
,
@Param
(
"article"
)
ArticleEntity
article
);
@Param
(
"flag"
)
String
flag
,
@Param
(
"noFlag"
)
String
noFlag
,
@Param
(
"orderBy"
)
String
orderBy
,
@Param
(
"order"
)
boolean
order
,
@Param
(
"beginTime"
)
String
beginTime
,
@Param
(
"endTime"
)
String
endTime
,
@Param
(
"article"
)
ArticleEntity
article
);
/**
* 根据页面栏目的id获取与其绑定的文章实体
*
*
* @param basicCategoryId
* @return 文章实体
*/
...
...
@@ -142,7 +142,7 @@ public interface IArticleDao extends IBaseDao {
/**
* 根据查询文章实体
*
*
* @param tableName
* :自定义生成的表名
* @param map
...
...
@@ -152,16 +152,18 @@ public interface IArticleDao extends IBaseDao {
*/
@Deprecated
List
<
ArticleEntity
>
queryListForSearch
(
@Param
(
"tableName"
)
String
tableName
,
@Param
(
"map"
)
Map
<
String
,
List
>
map
,
@Param
(
"websiteId"
)
int
websiteId
,
@Param
(
"ids"
)
List
ids
,
@Param
(
"sortMap"
)
Map
sortMap
);
/**
* 查询文章编号集合
* @param categoryId 栏目编号
* @param appId 站点编号
* @param beginTime 开始时间
* @param endTime 结束时间
* @return
*/
public
List
<
ColumnArticleIdBean
>
queryIdsByCategoryIdForParser
(
@Param
(
"categoryId"
)
int
categoryId
,
@Param
(
"appId"
)
int
appId
,
@Param
(
"beginTime"
)
String
beginTime
,
@Param
(
"endTime"
)
String
endTime
);
@Param
(
"websiteId"
)
int
websiteId
,
@Param
(
"ids"
)
List
ids
,
@Param
(
"sortMap"
)
Map
sortMap
);
/**
* 查询文章编号集合
* @param categoryId 栏目编号
* @param appId 站点编号
* @param beginTime 开始时间
* @param endTime 结束时间
* @return
*/
public
List
<
ColumnArticleIdBean
>
queryIdsByCategoryIdForParser
(
@Param
(
"categoryId"
)
int
categoryId
,
@Param
(
"appId"
)
int
appId
,
@Param
(
"beginTime"
)
String
beginTime
,
@Param
(
"endTime"
)
String
endTime
,
@Param
(
"orderBy"
)
String
orderBy
,
@Param
(
"order"
)
String
order
);
}
\ No newline at end of file
src/main/java/net/mingsoft/cms/dao/IArticleDao.xml
View file @
818f5552
This diff is collapsed.
Click to expand it.
src/main/java/net/mingsoft/cms/resources/resources_zh_CN.properties
View file @
818f5552
#mcms\u7248\u672
c
#mcms\u7248\u672
C
version
=
d3a98fefcb242db78da5fc31608ff247
templet.file
=
\u
6a21
\u
677f
\u6587\u
4ef6
\u
4e0d
\u
5b58
\u5728
id
=
\u6587\u
7ae0
\u
7f16
\u
53f7
typeid
=
\u
680f
\u
76ee
\u
7f16
\u
53f7
templet.file
=
\u
6A21
\u
677F
\u6587\u
4EF6
\u
4E0D
\u
5B58
\u5728
id
=
\u6587\u
7AE0
\u
7F16
\u
53F7
typeid
=
\u
680F
\u
76EE
\u
7F16
\u
53F7
order
=
\u6392\u
5E8F
src/main/java/net/mingsoft/config/WebConfig.java
View file @
818f5552
package
net
.
mingsoft
.
config
;
import
java.io.File
;
import
java.util.Arrays
;
import
net.mingsoft.basic.filter.XSSEscapeFilter
;
import
org.springframework.aop.Advisor
;
import
org.springframework.aop.support.DefaultPointcutAdvisor
;
import
org.springframework.aop.support.JdkRegexpMethodPointcut
;
...
...
@@ -23,6 +27,7 @@ import com.alibaba.druid.support.spring.stat.BeanTypeAutoProxyCreator;
import
com.alibaba.druid.support.spring.stat.DruidStatInterceptor
;
import
net.mingsoft.basic.interceptor.ActionInterceptor
;
import
net.mingsoft.basic.util.BasicUtil
;
@Configuration
public
class
WebConfig
implements
WebMvcConfigurer
{
...
...
@@ -50,15 +55,23 @@ public class WebConfig implements WebMvcConfigurer {
@Override
public
void
addResourceHandlers
(
ResourceHandlerRegistry
registry
)
{
registry
.
addResourceHandler
(
"/html/**"
).
addResourceLocations
(
"/html/"
);
registry
.
addResourceHandler
(
"/app/**"
).
addResourceLocations
(
"classpath:/app/"
);
registry
.
addResourceHandler
(
"/static/**"
).
addResourceLocations
(
"classpath:/static/"
);
registry
.
addResourceHandler
(
"/api/**"
).
addResourceLocations
(
"classpath:/api/"
);
//jar包方式映射处理
String
classPath
=
BasicUtil
.
getClassPath
(
""
);
if
(
classPath
.
startsWith
(
"file"
))
{
registry
.
addResourceHandler
(
"/upload/**"
).
addResourceLocations
(
"file:"
+
BasicUtil
.
getRealPath
(
"upload"
)
+
File
.
separator
);
registry
.
addResourceHandler
(
"/html/**"
).
addResourceLocations
(
"file:"
+
BasicUtil
.
getRealPath
(
"html"
)
+
File
.
separator
);
registry
.
addResourceHandler
(
"/templets/**"
).
addResourceLocations
(
"file:"
+
BasicUtil
.
getRealPath
(
"templets"
)
+
File
.
separator
);
}
else
{
//必须做判断,不然jar运行的html路径会被覆盖掉
registry
.
addResourceHandler
(
"/html/**"
).
addResourceLocations
(
"/html/"
);
}
registry
.
addResourceHandler
(
"/app/**"
).
addResourceLocations
(
"/app/"
,
"classpath:/app/"
);
registry
.
addResourceHandler
(
"/static/**"
).
addResourceLocations
(
"/static/"
,
"classpath:/static/"
);
registry
.
addResourceHandler
(
"/api/**"
).
addResourceLocations
(
"/api/"
,
"classpath:/api/"
);
}
/**
* druidServlet注册
*/
/**
* druidServlet注册
*/
@Bean
public
ServletRegistrationBean
druidServletRegistration
()
{
ServletRegistrationBean
registration
=
new
ServletRegistrationBean
(
new
StatViewServlet
());
...
...
@@ -120,18 +133,16 @@ public class WebConfig implements WebMvcConfigurer {
return
new
DefaultPointcutAdvisor
(
druidStatPointcut
(),
druidStatInterceptor
());
}
// /**
// * xssFilter注册
// */
// @Bean
// public FilterRegistrationBean xssFilterRegistration() {
// XssFilter xssFilter = new XssFilter();
// xssFilter.setUrlExclusion(Arrays.asList("/static/"));
// FilterRegistrationBean registration = new
// FilterRegistrationBean(xssFilter);
// registration.addUrlPatterns("/*");
// return registration;
// }
/**
* xssFilter注册
*/
@Bean
public
FilterRegistrationBean
xssFilterRegistration
()
{
XSSEscapeFilter
xssFilter
=
new
XSSEscapeFilter
();
FilterRegistrationBean
registration
=
new
FilterRegistrationBean
(
xssFilter
);
registration
.
addUrlPatterns
(
"/*"
);
return
registration
;
}
/**
* RequestContextListener注册
...
...
src/main/resources/application.yml
View file @
818f5552
...
...
@@ -13,7 +13,7 @@ ms:
upload
:
path
:
/upload
denied
:
exe
denied
:
.exe,.jsp
allowed
:
jpg
max-size
:
1
memory-size
:
4096
...
...
src/main/webapp/WEB-INF/manager/cms/article/article_main.ftl
View file @
818f5552
...
...
@@ -87,7 +87,7 @@
field: 'basicDateTime',
title: '发布时间',
align: 'center',
width:
9
0
width:
15
0
}]
});
//查询文章标题
...
...
src/main/webapp/WEB-INF/manager/login.ftl
0 → 100644
View file @
818f5552
<!DOCTYPE html>
<html
lang=
"zh"
>
<head>
<title>
${app.appName}
</title>
<
#
include
"/
include
/
head-file
.
ftl
"
/>
<script
src=
"${base}/static/plugins/jquery/3.2.1/jquery.min.js"
></script>
<script
src=
"${base}/static/plugins/jquery.cookie/1.4.1/jquery.cookie.min.js"
></script>
<link
rel=
"stylesheet"
href=
"${base}/static/ms-admin/4.7.0/css/login.css"
>
</head>
<body>
<div
id=
"login"
class=
"login"
>
<el-container
class=
"ms-admin-login-container"
>
<el-main
class=
"ms-admin-login-main"
>
<div
class=
"ms-admin-login-warp"
@
keydown
.
13=
'checkLogin'
>
<img
style=
"height: 360px"
:src=
"ms.base+'/static/ms-admin/4.7.0/images/login-slogn.png'"
>
<el-form
:model=
"loginForm"
status-icon
:rules=
"loginFormRule"
style=
"height: 360px"
ref=
"loginForm"
label-width=
"100px"
class=
"ms-admin-login-form"
>
<el-alert
style=
"margin-bottom: 10px;"
title=
"演示版部分删除功能已去除"
type=
"warning"
center
:closable=
"false"
show-icon
>
</el-alert>
<h1>
<span>
账户登录 /
</span>
User login
</h1>
<el-form-item
class=
"ms-admin-form-item"
prop=
"managerName"
>
<el-input
type=
"text"
placeholder=
'用户名/admin'
v-model=
"loginForm.managerName"
></el-input>
</el-form-item>
<el-form-item
class=
"ms-admin-form-item"
prop=
"managerPassword"
>
<el-input
type=
"password"
placeholder=
'密码/123456'
v-model=
"loginForm.managerPassword"
></el-input>
</el-form-item>
<el-form-item
class=
"ms-admin-form-item ms-admin-form-item-code"
prop=
"rand_code"
>
<el-input
type=
"text"
placeholder=
'验证码'
v-model=
"loginForm.rand_code"
autocomplete=
"off"
></el-input>
<img
:src=
"verifCode"
class=
"code-img"
@
click=
"code"
/>
<p>
<span>
看不清?
</span>
<span
@
click=
"code"
>
换一张
</span>
</p>
</el-form-item>
<el-form-item
class=
"ms-admin-form-item ms-admin-form-item-checkout"
>
<el-checkbox
v-model=
"rememberPass"
>
记住密码
</el-checkbox>
</el-form-item>
<el-form-item
class=
"ms-admin-form-item"
>
<el-button
type=
"primary"
@
click=
"checkLogin"
class=
"ms-admin-login-btn"
>
登录
</el-button>
</el-form-item>
</el-form>
</div>
</el-main>
</el-container>
</div>
</body>
</html>
<script>
var
loginVue
=
new
Vue
({
el
:
'#login'
,
data
:
{
loginForm
:
{
managerName
:
'admin'
,
managerPassword
:
"123456"
,
rand_code
:
''
},
verifCode
:
ms
.
manager
+
"/code?t="
+
new
Date
().
getTime
(),
rememberPass
:
''
,
loginFormRule
:
{
managerName
:
[{
required
:
true
,
message
:
'请输入用户名'
,
trigger
:
'blur'
},
{
min
:
1
,
max
:
30
,
message
:
'长度在 1 到 30 个字符'
,
trigger
:
'blur'
}
],
managerPassword
:
[{
required
:
true
,
message
:
'请输入密码'
,
trigger
:
'blur'
},
{
min
:
1
,
max
:
30
,
message
:
'长度在 1 到 30 个字符'
,
trigger
:
'blur'
}
],
rand_code
:
[{
required
:
true
,
message
:
'请填写验证码'
,
trigger
:
'blur'
},
{
min
:
1
,
max
:
4
,
message
:
'长度在1 到 4 个字符'
,
trigger
:
'blur'
}
],
}
},
methods
:
{
// 登录
checkLogin
:
function
()
{
var
that
=
this
;
this
.
$refs
[
'loginForm'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
ms
.
http
.
post
(
ms
.
manager
+
"/checkLogin.do"
,
that
.
loginForm
).
then
(
function
(
data
)
{
if
(
data
.
result
)
{
if
(
that
.
rememberPass
)
{
$
.
cookie
(
'managerName'
,
that
.
loginForm
.
managerName
,
{
expires
:
365
});
$
.
cookie
(
'managerPassword'
,
that
.
loginForm
.
managerPassword
,
{
expires
:
365
});
}
else
{
$
.
cookie
(
'managerName'
,
""
);
$
.
cookie
(
'managerPassword'
,
""
);
}
that
.
$notify
({
title
:
'成功'
,
message
:
'登录成功'
,
type
:
'success'
});
location
.
href
=
ms
.
manager
+
"/index.do"
;
}
else
{
that
.
$notify
({
title
:
'失败'
,
message
:
data
.
resultMsg
,
type
:
'warning'
});
that
.
code
();
}
},
(
err
)
=>
{
that
.
$message
.
error
(
data
.
resultMsg
);
})
}
});
},
code
:
function
()
{
this
.
verifCode
=
ms
.
web
+
"/code?t="
+
new
Date
().
getTime
();
},
},
mounted
:
function
()
{
this
.
verifCode
=
ms
.
web
+
"/code?t="
+
new
Date
().
getTime
();
if
(
$
.
cookie
(
'managerName'
)){
this
.
loginForm
.
managerName
=
$
.
cookie
(
'managerName'
);
this
.
loginForm
.
managerPassword
=
$
.
cookie
(
'managerPassword'
);
}
if
(
top
.
location
!=
self
.
location
){
top
.
location
=
self
.
location
;
}
}
})
</script>
\ No newline at end of file
src/main/webapp/WEB-INF/manager/main.ftl
View file @
818f5552
This diff is collapsed.
Click to expand it.
src/main/webapp/templets/1/default/about.htm
View file @
818f5552
...
...
@@ -6,7 +6,7 @@
<body>
<
#
include
"
head
.
htm
"
/>
<div
class=
"ms-banner"
style=
"background:url({ms:global.host/}/{ms:global.style/}images/about_us.jpg) no-repeat center;"
>
<div
class=
"ms-banner"
style=
"background:url({ms:global.host/}/{ms:global.style/}
/
images/about_us.jpg) no-repeat center;"
>
<p
class=
"banner_tit_about animated fadeInLeft"
>
关于我们
</p>
<p
class=
"banner_tit_about_des animated fadeInRight"
>
About us
</p>
</div>
...
...
src/main/webapp/templets/1/default/advice.htm
View file @
818f5552
...
...
@@ -5,7 +5,7 @@
</head>
<body>
<
#
include
"
head
.
htm
"
/>
<div
class=
"ms-banner"
style=
"background:url({ms:global.host/}/{ms:global.style/}images/talk_online.jpeg) no-repeat center;"
>
<div
class=
"ms-banner"
style=
"background:url({ms:global.host/}/{ms:global.style/}
/
images/talk_online.jpeg) no-repeat center;"
>
<p
class=
"banner_tit_other animated fadeInLeft"
>
在线留言
</p>
<p
class=
"banner_tit_other_des animated fadeInRight"
>
Talk online
</p>
</div>
...
...
src/main/webapp/templets/1/default/case-list.htm
View file @
818f5552
...
...
@@ -6,7 +6,7 @@
<body>
<
#
include
"
head
.
htm
"
/>
<div
class=
"ms-banner"
style=
"background:url({ms:global.host/}/{ms:global.style/}images/00.png) no-repeat center;"
>
<div
class=
"ms-banner"
style=
"background:url({ms:global.host/}/{ms:global.style/}
/
images/00.png) no-repeat center;"
>
<p
class=
"banner_tit_other animated fadeInLeft"
>
案
例
</p>
<p
class=
"banner_tit_other_des animated fadeInRight"
>
Case list
</p>
</div>
...
...
src/main/webapp/templets/1/default/head-file.htm
View file @
818f5552
<title>
{ms:global.name/}
</title>
<meta
charset=
"utf-8"
>
<link
rel=
"icon"
href=
"http://cdn.mingsoft.net/global/images/ms.ico"
type=
"x-icon"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{ms:global.host/}/plugins/iconfont/1.0.0/iconfont.css"
/>
<link
rel=
"stylesheet/less"
type=
"text/css"
href=
"{ms:global.host/}/{ms:global.style/}/less/base.less"
>
<link
rel=
"stylesheet/less"
type=
"text/css"
href=
"{ms:global.host/}/{ms:global.style/}/less/index.less"
>
...
...
src/main/webapp/templets/1/default/m/about.htm
View file @
818f5552
<!DOCTYPE html>
<html>
<
#
include
"
m
/
head-file
.
htm
"
/>
<
#
include
"
/
m
/
head-file
.
htm
"
/>
<body>
<
#
include
"
m
/
head
.
htm
"
/>
<
#
include
"
/
m
/
head
.
htm
"
/>
<div
class=
"ms-banner"
>
<img
src=
"{ms:global.host/}/{ms:global.style/}/images/about.png"
class=
"am-img-responsive"
alt=
""
/>
</div>
...
...
@@ -30,6 +30,6 @@
</div>
</div>
</div>
<
#
include
"
m
/
footer
.
htm
"
/>
<
#
include
"
/
m
/
footer
.
htm
"
/>
</body>
</html>
\ No newline at end of file
src/main/webapp/templets/1/default/m/advice.htm
View file @
818f5552
<!DOCTYPE html>
<html>
<
#
include
"
m
/
head-file
.
htm
"
/>
<
#
include
"
/
m
/
head-file
.
htm
"
/>
<body>
<
#
include
"
m
/
head
.
htm
"
/>
<
#
include
"
/
m
/
head
.
htm
"
/>
<div
class=
"ms-banner"
>
<img
src=
"{ms:global.host/}/{ms:global.style/}/images/message.png"
alt=
""
width=
"100%"
/>
</div>
...
...
@@ -20,7 +20,7 @@
<button
type=
"button"
class=
"am-btn am-btn-primary ms-content-button"
>
提交
</button>
</form>
</div>
<
#
include
"
m
/
footer
.
htm
"
/>
<
#
include
"
/
m
/
footer
.
htm
"
/>
</body>
</html>
<script>
...
...
src/main/webapp/templets/1/default/m/case-list.htm
View file @
818f5552
<!DOCTYPE html>
<html>
<
#
include
"
m
/
head-file
.
htm
"
/>
<
#
include
"
/
m
/
head-file
.
htm
"
/>
<body>
<
#
include
"
m
/
head
.
htm
"
/>
<
#
include
"
/
m
/
head
.
htm
"
/>
<div
class=
"ms-banner"
>
<img
src=
"{ms:global.host/}/{ms:global.style/}/images/mo.png"
class=
"am-img-responsive"
alt=
""
/>
</div>
...
...
@@ -17,7 +17,7 @@
{/ms:arclist}
</ul>
</div>
<
#
include
"
m
/
footer
.
htm
"
/>
<
#
include
"
/
m
/
footer
.
htm
"
/>
</body>
</html>
<script>
...
...
src/main/webapp/templets/1/default/m/contact.htm
View file @
818f5552
<!DOCTYPE html>
<html>
<
#
include
"
m
/
head-file
.
htm
"
/>
<
#
include
"
/
m
/
head-file
.
htm
"
/>
<body>
<
#
include
"
m
/
head
.
htm
"
/>
<
#
include
"
/
m
/
head
.
htm
"
/>
<div
class=
"ms-banner"
>
<img
src=
"{ms:global.host/}/{ms:global.style/}/images/about.png"
class=
"am-img-responsive"
alt=
""
/>
</div>
...
...
@@ -30,6 +30,6 @@
</div>
</div>
</div>
<
#
include
"
m
/
footer
.
htm
"
/>
<
#
include
"
/
m
/
footer
.
htm
"
/>
</body>
</html>
\ No newline at end of file
src/main/webapp/templets/1/default/m/news-list.htm
View file @
818f5552
<!DOCTYPE html>
<html>
<
#
include
"
m
/
head-file
.
htm
"
/>
<
#
include
"
/
m
/
head-file
.
htm
"
/>
<body>
<
#
include
"
m
/
head
.
htm
"
/>
<
#
include
"
/
m
/
head
.
htm
"
/>
<div
class=
"ms-banner"
>
<img
src=
"{ms:global.host/}/{ms:global.style/}/images/case.png"
class=
"am-img-responsive"
alt=
""
/>
</div>
...
...
@@ -20,6 +20,6 @@
</div>
</div>
</div>
<
#
include
"
m
/
footer
.
htm
"
/>
<
#
include
"
/
m
/
footer
.
htm
"
/>
</body>
</html>
\ No newline at end of file
src/main/webapp/templets/1/default/m/news-show.htm
View file @
818f5552
<!DOCTYPE html>
<html>
<head>
<
#
include
"
m
/
head-file
.
htm
"
/>
<
#
include
"
/
m
/
head-file
.
htm
"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{ms:global.host/}/{ms:global.style/}/css/jquery.sinaemotion.css"
/>
<script
type=
"text/javascript"
src=
"{ms:global.host/}/{ms:global.style/}/js/jquery.sinaEmotion.js"
></script>
</head>
<body>
<
#
include
"
m
/
head
.
htm
"
/>
<
#
include
"
/
m
/
head
.
htm
"
/>
<div
class=
"ms-banner"
>
<img
src=
"{ms:global.host/}/{ms:global.style/}/images/case.png"
class=
"am-img-responsive"
alt=
""
/>
</div>
...
...
@@ -81,7 +81,7 @@
</div>
</div>
</div>
<
#
include
"
m
/
footer
.
htm
"
/>
<
#
include
"
/
m
/
footer
.
htm
"
/>
</body>
<script>
var
newsShowVue
=
new
Vue
({
...
...
src/main/webapp/templets/1/default/news-show.htm
View file @
818f5552
...
...
@@ -8,7 +8,7 @@
<body>
<
#
include
"
head
.
htm
"
>
<div
class=
"ms-banner"
style=
"background:url({ms:global.host/}/{ms:global.style/}images/news2.png) no-repeat center;"
>
<div
class=
"ms-banner"
style=
"background:url({ms:global.host/}/{ms:global.style/}
/
images/news2.png) no-repeat center;"
>
<p
class=
"banner_tit_other animated fadeInLeft"
>
公司动态
</p>
<p
class=
"banner_tit_other_des animated fadeInRight"
>
Our company
</p>
...
...
src/main/webapp/templets/1/default/search.htm
View file @
818f5552
...
...
@@ -27,10 +27,10 @@
</ul>
</div>
<div
class=
"ms-content-main-page"
>
<a
class=
"ms-content-main-page-first"
href=
"{ms:
global.url/}{ms:
page.index/}"
>
首页
</a>
<a
class=
"ms-content-main-page-upper"
href=
"{ms:
global.url/}{ms:
page.pre/}"
>
上一页
</a>
<a
class=
"ms-content-main-page-next"
href=
"{ms:
global.url/}{ms:
page.next/}"
>
下一页
</a>
<a
class=
"ms-content-main-page-last"
href=
"{ms:
global.url/}{ms:
page.last/}"
>
末页
</a>
<a
class=
"ms-content-main-page-first"
href=
"{ms:page.index/}"
>
首页
</a>
<a
class=
"ms-content-main-page-upper"
href=
"{ms:page.pre/}"
>
上一页
</a>
<a
class=
"ms-content-main-page-next"
href=
"{ms:page.next/}"
>
下一页
</a>
<a
class=
"ms-content-main-page-last"
href=
"{ms:page.last/}"
>
末页
</a>
</div>
</div>
</div>
...
...
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