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
52a22ab6
Commit
52a22ab6
authored
Jan 07, 2020
by
走散在时光里
Browse files
Options
Browse Files
Download
Plain Diff
后台管理页主页的完善
parents
d5bb791c
18aab037
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
38 additions
and
145 deletions
+38
-145
pom.xml
pom.xml
+7
-3
GeneraterAction.java
src/main/java/net/mingsoft/cms/action/GeneraterAction.java
+14
-22
FieldAction.java
src/main/java/net/mingsoft/cms/action/web/FieldAction.java
+0
-104
MCmsAction.java
src/main/java/net/mingsoft/cms/action/web/MCmsAction.java
+9
-10
index.ftl
src/main/webapp/WEB-INF/manager/cms/generate/index.ftl
+2
-0
advice.htm
src/main/webapp/templets/1/default/advice.htm
+2
-2
index.htm
src/main/webapp/templets/1/default/index.htm
+4
-4
1578375538540.jpg
src/main/webapp/upload/1/appLogo/1578375538540.jpg
+0
-0
No files found.
pom.xml
View file @
52a22ab6
...
...
@@ -35,7 +35,6 @@
</repository>
</repositories>
<dependencies>
<!-- 8.0数据库取消下面注解-->
<!-- <dependency>-->
<!-- <groupId>mysql</groupId>-->
<!-- <artifactId>mysql-connector-java</artifactId>-->
...
...
@@ -44,12 +43,17 @@
<dependency>
<groupId>
net.mingsoft
</groupId>
<artifactId>
ms-mpeople
</artifactId>
<version>
1.0.13
</version>
<version>
1.0.14-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
net.mingsoft
</groupId>
<artifactId>
ms-mdiy
</artifactId>
<version>
1.0.12-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
net.mingsoft
</groupId>
<artifactId>
ms-upgrader
</artifactId>
<version>
1.0.1
4
</version>
<version>
1.0.1
5-SNAPSHOT
</version>
</dependency>
</dependencies>
...
...
src/main/java/net/mingsoft/cms/action/GeneraterAction.java
View file @
52a22ab6
...
...
@@ -21,21 +21,19 @@ The MIT License (MIT) * Copyright (c) 2016 铭飞科技(mingsoft.net)
package
net
.
mingsoft
.
cms
.
action
;
import
java.io.File
;
import
java.io.IOException
;
import
java.util.ArrayList
;
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
cn.hutool.core.io.FileUtil
;
import
net.mingsoft.basic.action.BaseAction
;
import
net.mingsoft.basic.biz.IModelBiz
;
import
net.mingsoft.basic.entity.AppEntity
;
import
net.mingsoft.basic.util.BasicUtil
;
import
net.mingsoft.cms.bean.ContentBean
;
import
net.mingsoft.cms.biz.ICategoryBiz
;
import
net.mingsoft.cms.biz.IContentBiz
;
import
net.mingsoft.cms.entity.CategoryEntity
;
import
org.apache.commons.lang3.StringUtils
;
import
net.mingsoft.cms.util.CmsParserUtil
;
import
net.mingsoft.mdiy.util.ParserUtil
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
...
...
@@ -46,15 +44,12 @@ import org.springframework.web.bind.annotation.PathVariable;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
net.mingsoft.basic.action.BaseAction
;
import
net.mingsoft.basic.biz.IModelBiz
;
import
net.mingsoft.basic.entity.AppEntity
;
import
net.mingsoft.cms.util.CmsParserUtil
;
import
net.mingsoft.mdiy.biz.IContentModelFieldBiz
;
import
cn.hutool.core.io.FileUtil
;
import
net.mingsoft.basic.util.BasicUtil
;
import
net.mingsoft.mdiy.util.ParserUtil
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.File
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
*
...
...
@@ -92,10 +87,7 @@ public class GeneraterAction extends BaseAction {
private
String
managerPath
;
/**
* 新增字段业务层
*/
@Autowired
protected
IContentModelFieldBiz
fieldBiz
;
/**
...
...
src/main/java/net/mingsoft/cms/action/web/FieldAction.java
deleted
100644 → 0
View file @
d5bb791c
/**
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
.
action
.
web
;
import
com.alibaba.fastjson.JSONObject
;
import
net.mingsoft.base.action.BaseAction
;
import
net.mingsoft.basic.biz.IColumnBiz
;
import
net.mingsoft.basic.entity.ColumnEntity
;
import
net.mingsoft.mdiy.biz.IContentModelBiz
;
import
net.mingsoft.mdiy.biz.IContentModelFieldBiz
;
import
net.mingsoft.mdiy.entity.ContentModelEntity
;
import
net.mingsoft.mdiy.entity.ContentModelFieldEntity
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
/**
* 供前端页面获取自定义模型中字段实体信息
* @author 铭飞开发团队
* 创建日期:2019-11-28 15:12:32<br/>
* 历史修订:<br/>
*/
@Controller
(
"webField"
)
@RequestMapping
(
"/field"
)
public
class
FieldAction
extends
BaseAction
{
/**
* 栏目业务层
*/
@Autowired
private
IColumnBiz
columnBiz
;
/**
* 内容模型业务层
*/
@Autowired
private
IContentModelBiz
contentModelBiz
;
/**
* 字段管理业务层
*/
@Autowired
private
IContentModelFieldBiz
fieldBiz
;
/**
*
* 根据当前栏目id和字段名称获取自定义模型中的字段实体信息
* @param request
* @param response
*/
@RequestMapping
(
"/{columId}/getEntity"
)
@ResponseBody
public
void
getEntity
(
@PathVariable
int
columId
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
//获取字段名称
String
fieldFieldName
=
request
.
getParameter
(
"fieldFieldName"
);
//根据栏目id获取栏目实体
ColumnEntity
column
=
(
ColumnEntity
)
this
.
columnBiz
.
getEntity
(
columId
);
if
(
column
==
null
){
this
.
outJson
(
response
,
this
.
getResString
(
"err"
));
return
;
}
else
{
//判断该栏目下是存在内容模型
if
(
column
.
getColumnContentModelId
()>
0
){
//获取当前栏目对应的内容模型
ContentModelEntity
contentModel
=
(
ContentModelEntity
)
this
.
contentModelBiz
.
getEntity
(
column
.
getColumnContentModelId
());
if
(
contentModel
==
null
){
this
.
outJson
(
response
,
this
.
getResString
(
"err"
));
return
;
}
//获取字段实体
ContentModelFieldEntity
field
=
fieldBiz
.
getEntityByCmId
(
column
.
getColumnContentModelId
(),
fieldFieldName
);
//返回字段实体
this
.
outJson
(
response
,
JSONObject
.
toJSONString
(
field
));
}
}
}
}
\ No newline at end of file
src/main/java/net/mingsoft/cms/action/web/MCmsAction.java
View file @
52a22ab6
...
...
@@ -28,7 +28,6 @@ import freemarker.template.MalformedTemplateNameException;
import
freemarker.template.TemplateNotFoundException
;
import
net.mingsoft.base.constant.Const
;
import
net.mingsoft.basic.util.BasicUtil
;
import
net.mingsoft.basic.util.SpringUtil
;
import
net.mingsoft.basic.util.StringUtil
;
import
net.mingsoft.cms.bean.ContentBean
;
import
net.mingsoft.cms.biz.ICategoryBiz
;
...
...
@@ -37,10 +36,8 @@ import net.mingsoft.cms.entity.CategoryEntity;
import
net.mingsoft.cms.entity.ContentEntity
;
import
net.mingsoft.cms.util.CmsParserUtil
;
import
net.mingsoft.mdiy.bean.PageBean
;
import
net.mingsoft.mdiy.biz.IContentModelBiz
;
import
net.mingsoft.mdiy.biz.IModelBiz
;
import
net.mingsoft.mdiy.biz.IPageBiz
;
import
net.mingsoft.mdiy.entity.ContentModelEntity
;
import
net.mingsoft.mdiy.entity.ModelEntity
;
import
net.mingsoft.mdiy.entity.PageEntity
;
import
net.mingsoft.mdiy.parser.TagParser
;
...
...
@@ -54,7 +51,10 @@ import javax.servlet.http.HttpServletRequest;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
import
java.io.UnsupportedEncodingException
;
import
java.util.*
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 动态生成页面,需要后台配置自定义页数据
...
...
@@ -245,7 +245,7 @@ public class MCmsAction extends net.mingsoft.cms.action.BaseAction {
map
.
put
(
ParserUtil
.
ID
,
article
.
getId
());
List
<
ContentBean
>
articleIdList
=
contentBiz
.
queryIdsByCategoryIdForParser
(
column
.
getCategoryId
(),
null
,
null
,
orderby
,
order
);
Map
<
Object
,
Object
>
contentModelMap
=
new
HashMap
<
Object
,
Object
>();
Content
ModelEntity
contentModel
=
null
;
ModelEntity
contentModel
=
null
;
for
(
int
artId
=
0
;
artId
<
articleIdList
.
size
();)
{
//如果不是当前文章则跳过
if
(
articleIdList
.
get
(
artId
).
getArticleId
()
!=
Integer
.
parseInt
(
article
.
getId
())){
...
...
@@ -262,14 +262,13 @@ public class MCmsAction extends net.mingsoft.cms.action.BaseAction {
if
(
StringUtils
.
isNotBlank
(
columnContentModelId
))
{
// 通过当前栏目的模型编号获取,自定义模型表名
if
(
contentModelMap
.
containsKey
(
columnContentModelId
))
{
parserParams
.
put
(
ParserUtil
.
TABLE_NAME
,
contentModel
.
get
Cm
TableName
());
parserParams
.
put
(
ParserUtil
.
TABLE_NAME
,
contentModel
.
get
Model
TableName
());
}
else
{
// 通过栏目模型编号获取自定义模型实体
contentModel
=
(
ContentModelEntity
)
SpringUtil
.
getBean
(
IContentModelBiz
.
class
)
.
getEntity
(
Integer
.
parseInt
(
columnContentModelId
));
contentModel
=(
ModelEntity
)
modelBiz
.
getEntity
(
Integer
.
parseInt
(
columnContentModelId
));
// 将自定义模型编号设置为key值
contentModelMap
.
put
(
columnContentModelId
,
contentModel
.
get
Cm
TableName
());
parserParams
.
put
(
ParserUtil
.
TABLE_NAME
,
contentModel
.
get
Cm
TableName
());
contentModelMap
.
put
(
columnContentModelId
,
contentModel
.
get
Model
TableName
());
parserParams
.
put
(
ParserUtil
.
TABLE_NAME
,
contentModel
.
get
Model
TableName
());
}
}
// 第一篇文章没有上一篇
...
...
src/main/webapp/WEB-INF/manager/cms/generate/index.ftl
View file @
52a22ab6
...
...
@@ -152,6 +152,8 @@
ms
.
http
.
post
(
ms
.
manager
+
'/cms/generate//generateIndex.do'
,
{
url
:
that
.
template
,
position
:
that
.
position
}).
then
(
function
(
data
)
{
if
(
data
.
result
){
that
.
$notify
({
title
:
'更新成功!'
,
type
:
'success'
});
}
else
{
that
.
$notify
({
title
:
'更新失败!'
,
message
:
"错误"
,
type
:
'error'
});
}
}).
catch
(
function
(
err
)
{
that
.
$notify
({
title
:
'更新失败!'
,
message
:
err
,
type
:
'error'
});
...
...
src/main/webapp/templets/1/default/advice.htm
View file @
52a22ab6
...
...
@@ -14,7 +14,7 @@
<form
class=
"ms-content-form"
method=
"post"
id=
"postForm"
>
<input
class=
"ms-content-form-name"
type=
"text"
name=
"name"
placeholder=
"姓名"
>
<input
class=
"ms-content-form-phone"
type=
"text"
name=
"phone"
placeholder=
"手机"
>
<textarea
class=
"ms-content-form-message"
name=
"
content
"
placeholder=
"留言"
></textarea>
<textarea
class=
"ms-content-form-message"
name=
"
words
"
placeholder=
"留言"
></textarea>
<div
class=
"ms-login-button"
>
提交
</div>
</form>
</div>
...
...
@@ -29,7 +29,7 @@
if
(
!
flag
)
{
$
.
ajax
({
type
:
"POST"
,
url
:
"{ms:global.host/}/mdiy/
diyForm/f2c131968438246e885e0feed7256dbc
.do"
,
url
:
"{ms:global.host/}/mdiy/
post/7df6529f9eaa26da7ae4e01c7f73aa06
.do"
,
data
:
$
(
"#postForm"
).
serialize
(),
success
:
function
(
msg
)
{
flag
=
true
;
...
...
src/main/webapp/templets/1/default/index.htm
View file @
52a22ab6
...
...
@@ -65,11 +65,11 @@
<template
v-for=
"model in modelList"
>
<div
class=
"ms-model-list"
>
<a
class=
"ms-model-img"
:href=
"model.upgraderVersionUrl"
target=
"_blank"
>
<img
@
mouseout=
"imgMout()"
@
mouseover=
"imgMover()"
:src=
"'http://store.mingsoft.net/'+model.
upgraderVersionI
mg"
onerror=
"this.src='{ms:global.host/}/{ms:global.style/}/images/no-data.png'"
/>
<img
@
mouseout=
"imgMout()"
@
mouseover=
"imgMover()"
:src=
"'http://store.mingsoft.net/'+model.
i
mg"
onerror=
"this.src='{ms:global.host/}/{ms:global.style/}/images/no-data.png'"
/>
</a>
<div
class=
"ms-model-mobile-img"
v-if=
"model.
upgraderVersionMobileImg != '' && model.upgraderVersionM
obileImg != undefined"
style=
"background: url({ms:global.host/}/{ms:global.style/}/images/mobile.png)"
>
<div
class=
"ms-model-mobile-img"
v-if=
"model.
mobileImg != '' && model.m
obileImg != undefined"
style=
"background: url({ms:global.host/}/{ms:global.style/}/images/mobile.png)"
>
<div>
<img
@
mouseout=
"imgMout()"
@
mouseover=
"imgMover()"
:src=
"'http://store.mingsoft.net/'+model.
upgraderVersionM
obileImg"
onerror=
"this.src='{ms:global.host/}/{ms:global.style/}/images/no-data.png'"
/>
<img
@
mouseout=
"imgMout()"
@
mouseover=
"imgMover()"
:src=
"'http://store.mingsoft.net/'+model.
m
obileImg"
onerror=
"this.src='{ms:global.host/}/{ms:global.style/}/images/no-data.png'"
/>
</div>
</div>
<div
class=
"ms-model-info"
>
...
...
@@ -92,7 +92,7 @@
<template
v-for=
"pulg in pulgList"
>
<div
class=
"ms-model-list"
>
<a
class=
"ms-model-img"
:href=
"pulg.upgraderVersionUrl"
target=
"_blank"
>
<img
:src=
"'http://store.mingsoft.net/'+pulg.
upgraderVersionI
mg"
onerror=
"this.src='{ms:global.host/}/{ms:global.style/}/images/no-data.png'"
/>
<img
:src=
"'http://store.mingsoft.net/'+pulg.
i
mg"
onerror=
"this.src='{ms:global.host/}/{ms:global.style/}/images/no-data.png'"
/>
</a>
<div
class=
"ms-model-info"
>
<span
v-text=
"pulg.upgraderVersionName"
></span>
...
...
src/main/webapp/upload/1/appLogo/1578375538540.jpg
0 → 100644
View file @
52a22ab6
32.1 KB
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