Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
MCMS
Commits
0e8d961b
"vscode:/vscode.git/clone" did not exist on "22b397816fa2b81a5d06086139e54f0e8e67e6fb"
Commit
0e8d961b
authored
Nov 21, 2020
by
wujj
Browse files
字段规范
parent
450c72bc
Changes
19
Hide whitespace changes
Inline
Side-by-side
doc/5.2-patch.sql
View file @
0e8d961b
...
...
@@ -42,3 +42,105 @@ SET FOREIGN_KEY_CHECKS=1;
ALTER
TABLE
`mdiy_dict`
MODIFY
COLUMN
`dict_remarks`
varchar
(
1000
)
CHARACTER
SET
utf8
COLLATE
utf8_bin
NULL
DEFAULT
NULL
COMMENT
'备注信息'
AFTER
`dict_parent_id`
;
ALTER
TABLE
`cms_content`
CHANGE
COLUMN
`content_category_id`
`category_id`
bigint
(
20
)
UNSIGNED
NULL
COMMENT
'所属栏目'
AFTER
`id`
;
ALTER
TABLE
`cms_content`
ADD
CONSTRAINT
`fk_category_id`
FOREIGN
KEY
(
`category_id`
)
REFERENCES
`cms_category`
(
`id`
)
ON
DELETE
CASCADE
ON
UPDATE
NO
ACTION
;
ALTER
TABLE
`mcms-5.2`
.
`cms_category`
MODIFY
COLUMN
`category_id`
bigint
(
20
)
NULL
DEFAULT
NULL
COMMENT
'所属栏目'
AFTER
`id`
;
ALTER
TABLE
`role`
CHANGE
COLUMN
`role_managerid`
`manager_id`
int
(
11
)
NULL
DEFAULT
0
COMMENT
'角色管理员编号'
AFTER
`role_name`
;
ALTER
TABLE
`role`
CHANGE
COLUMN
`role_managerid`
`manager_id`
int
(
11
)
NULL
DEFAULT
0
COMMENT
'角色管理员编号'
AFTER
`role_name`
,
DROP
INDEX
`role_managerid`
,
ADD
INDEX
`inx_role_manage_id`
(
`manager_id`
)
USING
BTREE
;
ALTER
TABLE
`role_model`
CHANGE
COLUMN
`rm_modelid`
`model_id`
int
(
22
)
NULL
DEFAULT
NULL
COMMENT
'模块编号'
FIRST
,
CHANGE
COLUMN
`rm_roleid`
`role_id`
int
(
22
)
NULL
DEFAULT
NULL
COMMENT
'角色编号'
AFTER
`model_id`
;
ALTER
TABLE
`role_model`
DROP
FOREIGN
KEY
`role_model_ibfk_1`
;
ALTER
TABLE
`role_model`
DROP
FOREIGN
KEY
`role_model_ibfk_2`
;
ALTER
TABLE
`role_model`
ADD
CONSTRAINT
`fk_rm_role_id`
FOREIGN
KEY
(
`role_id`
)
REFERENCES
`role`
(
`id`
)
ON
DELETE
CASCADE
ON
UPDATE
NO
ACTION
,
ADD
CONSTRAINT
`fk_rm_model_id`
FOREIGN
KEY
(
`model_id`
)
REFERENCES
`model`
(
`id`
)
ON
DELETE
CASCADE
ON
UPDATE
NO
ACTION
;
ALTER
TABLE
`role_model`
RENAME
INDEX
`rm_modelid`
TO
`fk_model_id`
,
RENAME
INDEX
`fk_role_model_role_1`
TO
`fk_role_id`
,
DROP
INDEX
`index`
;
ALTER
TABLE
`model`
CHANGE
COLUMN
`model_modelid`
`model_id`
int
(
22
)
NULL
DEFAULT
NULL
COMMENT
'模块的父模块id'
AFTER
`model_code`
,
CHANGE
COLUMN
`model_modelmanagerid`
`manager_id`
int
(
11
)
NULL
DEFAULT
NULL
COMMENT
'模块关联的关联员id'
AFTER
`model_icon`
;
ALTER
TABLE
`model`
DROP
FOREIGN
KEY
`model_ibfk_1`
;
ALTER
TABLE
`model`
RENAME
INDEX
`model_modelid`
TO
`idx_model_id`
,
DROP
INDEX
`sys_c009201`
,
DROP
INDEX
`model_code`
,
ADD
CONSTRAINT
`fk_model_id`
FOREIGN
KEY
(
`model_id`
)
REFERENCES
`model`
(
`id`
)
ON
DELETE
CASCADE
ON
UPDATE
NO
ACTION
;
ALTER
TABLE
`manager`
DROP
FOREIGN
KEY
`manager_ibfk_1`
;
ALTER
TABLE
`manager`
CHANGE
COLUMN
`manager_roleid`
`role_id`
int
(
11
)
NULL
DEFAULT
NULL
COMMENT
'角色编号'
AFTER
`id`
,
CHANGE
COLUMN
`manager_peopleid`
`people_id`
int
(
11
)
NULL
DEFAULT
0
COMMENT
'用户编号即商家编号'
AFTER
`role_id`
;
ALTER
TABLE
`manager`
ADD
CONSTRAINT
`fk_role_id`
FOREIGN
KEY
(
`role_id`
)
REFERENCES
`role`
(
`id`
)
ON
DELETE
SET
NULL
ON
UPDATE
NO
ACTION
;
ALTER
TABLE
`manager`
RENAME
INDEX
`fk_manager_role_1`
TO
`fk_manager_role_id`
;
ALTER
TABLE
`cms_history_log`
CHANGE
COLUMN
`hl_people_id`
`people_id`
int
(
20
)
NULL
DEFAULT
NULL
COMMENT
'用户id'
AFTER
`content_id`
,
MODIFY
COLUMN
`content_id`
bigint
(
20
)
UNSIGNED
NOT
NULL
COMMENT
'文章编号'
AFTER
`id`
;
ALTER
TABLE
`mdiy_dict`
RENAME
INDEX
`dict_value`
TO
`inx_dict_value`
,
RENAME
INDEX
`dict_label`
TO
`inx_dict_label`
;
ALTER
TABLE
`mdiy_tag_sql`
DROP
FOREIGN
KEY
`mdiy_tag_sql_ibfk_1`
;
ALTER
TABLE
`mdiy_tag_sql`
ADD
CONSTRAINT
`fk_tag_id`
FOREIGN
KEY
(
`tag_id`
)
REFERENCES
`mdiy_tag`
(
`id`
)
ON
DELETE
CASCADE
ON
UPDATE
NO
ACTION
;
ALTER
TABLE
`mdiy_tag_sql`
RENAME
INDEX
`fk_mdiy_tag_id`
TO
`fk_ts_tag_id`
;
ALTER
TABLE
`people_address`
DROP
FOREIGN
KEY
`people_address_ibfk_1`
;
ALTER
TABLE
`people_address`
CHANGE
COLUMN
`PA_PEOPLE_ID`
`PEOPLE_ID`
int
(
11
)
NOT
NULL
COMMENT
'对应用户基础信息拓展表的id'
AFTER
`id`
,
ADD
CONSTRAINT
`fk_pa_people_id`
FOREIGN
KEY
(
`PEOPLE_ID`
)
REFERENCES
`people`
(
`id`
)
ON
DELETE
CASCADE
ON
UPDATE
RESTRICT
;
ALTER
TABLE
`people_address`
RENAME
INDEX
`PA_PEOPLE_ID`
TO
`inx_people_id`
;
ALTER
TABLE
`people_user`
CHANGE
COLUMN
`pu_people_id`
`people_id`
int
(
11
)
NOT
NULL
COMMENT
'用户id关联people表的(people_id)'
FIRST
,
DROP
PRIMARY
KEY
,
ADD
PRIMARY
KEY
(
`people_id`
)
USING
BTREE
;
ALTER
TABLE
`people_user`
RENAME
INDEX
`pu_people_id`
TO
`inx_people_id`
;
ALTER
TABLE
`people_user`
ADD
CONSTRAINT
`fk_pu_people_id`
FOREIGN
KEY
(
`people_id`
)
REFERENCES
`people`
(
`id`
)
ON
DELETE
CASCADE
ON
UPDATE
NO
ACTION
;
ALTER
TABLE
`people_user`
RENAME
INDEX
`pu_people_id`
TO
`inx_people_id`
;
ALTER
TABLE
`system_log`
DROP
COLUMN
`app_id`
;
pom.xml
View file @
0e8d961b
...
...
@@ -39,49 +39,49 @@
<artifactId>
ms-mpeople
</artifactId>
</dependency>
<!--
<dependency>
-->
<!--
<groupId>net.mingsoft</groupId>
-->
<!--
<artifactId>ms-ad</artifactId>
-->
<!--
</dependency>
-->
<dependency>
<groupId>
net.mingsoft
</groupId>
<artifactId>
ms-ad
</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>net.mingsoft</groupId>-->
<!-- <artifactId>ms-clean</artifactId>-->
<!-- </dependency>-->
<!--
<dependency>
-->
<!--
<groupId>net.mingsoft</groupId>
-->
<!--
<artifactId>ms-mattention</artifactId>
-->
<!--
</dependency>
-->
<!--
<dependency>
-->
<!--
<groupId>net.mingsoft</groupId>
-->
<!--
<artifactId>ms-mcomment</artifactId>
-->
<!--
</dependency>
-->
<!--
<dependency>
-->
<!--
<groupId>net.mingsoft</groupId>
-->
<!--
<artifactId>ms-mpay</artifactId>
-->
<!--
</dependency>
-->
<!--
<dependency>
-->
<!--
<groupId>net.mingsoft</groupId>
-->
<!--
<artifactId>ms-msend</artifactId>
-->
<!--
</dependency>
-->
<dependency>
<groupId>
net.mingsoft
</groupId>
<artifactId>
ms-mattention
</artifactId>
</dependency>
<dependency>
<groupId>
net.mingsoft
</groupId>
<artifactId>
ms-mcomment
</artifactId>
</dependency>
<dependency>
<groupId>
net.mingsoft
</groupId>
<artifactId>
ms-mpay
</artifactId>
</dependency>
<dependency>
<groupId>
net.mingsoft
</groupId>
<artifactId>
ms-msend
</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>net.mingsoft</groupId>-->
<!-- <artifactId>ms-quartz</artifactId>-->
<!-- </dependency>-->
<!--
<dependency>
-->
<!--
<groupId>net.mingsoft</groupId>
-->
<!--
<artifactId>ms-spider</artifactId>
-->
<!--
</dependency>
-->
<!--
<dependency>
-->
<!--
<groupId>net.mingsoft</groupId>
-->
<!--
<artifactId>ms-mweixin</artifactId>
-->
<!--
</dependency>
-->
<dependency>
<groupId>
net.mingsoft
</groupId>
<artifactId>
ms-spider
</artifactId>
</dependency>
<dependency>
<groupId>
net.mingsoft
</groupId>
<artifactId>
ms-mweixin
</artifactId>
</dependency>
<!-- 此部分是铭飞平台MStroe的客户端(MStore不在铭飞开源产品范围),如果不需要使用MStore可以删除掉 -->
<dependency>
<groupId>
net.mingsoft
</groupId>
<artifactId>
store-client
</artifactId>
<version>
5.
1
</version>
<version>
5.
2-SNAPSHOT
</version>
</dependency>
</dependencies>
...
...
src/main/java/net/mingsoft/cms/action/ContentAction.java
View file @
0e8d961b
...
...
@@ -65,7 +65,7 @@ public class ContentAction extends BaseAction {
@ApiOperation
(
value
=
"查询文章列表接口"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"contentTitle"
,
value
=
"文章标题"
,
required
=
false
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"c
ontentC
ategoryId"
,
value
=
"所属栏目"
,
required
=
false
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"categoryId"
,
value
=
"所属栏目"
,
required
=
false
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"contentType"
,
value
=
"文章类型"
,
required
=
false
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"contentDisplay"
,
value
=
"是否显示"
,
required
=
false
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"contentAuthor"
,
value
=
"文章作者"
,
required
=
false
,
paramType
=
"query"
),
...
...
@@ -121,7 +121,7 @@ public class ContentAction extends BaseAction {
@ApiOperation
(
value
=
"保存文章列表接口"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"contentTitle"
,
value
=
"文章标题"
,
required
=
true
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"c
ontentC
ategoryId"
,
value
=
"所属栏目"
,
required
=
false
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"categoryId"
,
value
=
"所属栏目"
,
required
=
false
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"contentType"
,
value
=
"文章类型"
,
required
=
false
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"contentDisplay"
,
value
=
"是否显示"
,
required
=
false
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"contentAuthor"
,
value
=
"文章作者"
,
required
=
false
,
paramType
=
"query"
),
...
...
@@ -199,7 +199,7 @@ public class ContentAction extends BaseAction {
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"编号"
,
required
=
true
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"contentTitle"
,
value
=
"文章标题"
,
required
=
true
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"c
ontentC
ategoryId"
,
value
=
"所属栏目"
,
required
=
false
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"categoryId"
,
value
=
"所属栏目"
,
required
=
false
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"contentType"
,
value
=
"文章类型"
,
required
=
false
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"contentDisplay"
,
value
=
"是否显示"
,
required
=
false
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"contentAuthor"
,
value
=
"文章作者"
,
required
=
false
,
paramType
=
"query"
),
...
...
src/main/java/net/mingsoft/cms/action/GeneraterAction.java
View file @
0e8d961b
...
...
@@ -172,7 +172,7 @@ public class GeneraterAction extends BaseAction {
// 获取栏目列表模版
for
(
CategoryEntity
column
:
columns
)
{
ContentBean
contentBean
=
new
ContentBean
();
contentBean
.
setC
ontentC
ategoryId
(
column
.
getId
());
contentBean
.
setCategoryId
(
column
.
getId
());
// 分类是列表
if
(
column
.
getCategoryType
().
equals
(
"1"
))
{
// 判断模板文件是否存在
...
...
@@ -252,7 +252,7 @@ public class GeneraterAction extends BaseAction {
CategoryEntity
categoryEntity
=
new
CategoryEntity
();
categoryList
=
categoryBiz
.
query
(
categoryEntity
);
for
(
CategoryEntity
category
:
categoryList
){
contentBean
.
setC
ontentC
ategoryId
(
category
.
getId
());
contentBean
.
setCategoryId
(
category
.
getId
());
// 分类是列表
if
(
category
.
getCategoryType
().
equals
(
"1"
)){
// 判断模板文件是否存在
...
...
@@ -276,7 +276,7 @@ public class GeneraterAction extends BaseAction {
}
}
else
{
CategoryEntity
category
=
(
CategoryEntity
)
categoryBiz
.
getById
(
columnId
);
contentBean
.
setC
ontentC
ategoryId
(
columnId
);
contentBean
.
setCategoryId
(
columnId
);
// 分类是列表
if
(
category
.
getCategoryType
().
equals
(
"1"
)){
// 获取文章列表表属性
...
...
src/main/java/net/mingsoft/cms/action/web/ContentAction.java
View file @
0e8d961b
...
...
@@ -56,7 +56,7 @@ public class ContentAction extends net.mingsoft.cms.action.BaseAction{
@ApiOperation
(
value
=
"查询文章列表接口"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"contentTitle"
,
value
=
"文章标题"
,
required
=
false
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"c
ontentC
ategoryId"
,
value
=
"所属栏目"
,
required
=
false
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"categoryId"
,
value
=
"所属栏目"
,
required
=
false
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"contentType"
,
value
=
"文章类型"
,
required
=
false
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"contentDisplay"
,
value
=
"是否显示"
,
required
=
false
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"contentAuthor"
,
value
=
"文章作者"
,
required
=
false
,
paramType
=
"query"
),
...
...
@@ -133,12 +133,7 @@ public class ContentAction extends net.mingsoft.cms.action.BaseAction{
entity
.
setContentId
(
content
.
getId
());
entity
.
setCreateDate
(
new
Date
());
historyLogBiz
.
saveEntity
(
entity
);
// 单站点不存在appid
if
(
content
.
getAppId
()
==
null
){
return
"document.write("
+
content
.
getContentHit
()
+
")"
;
}
else
if
(
content
.
getAppId
()
!=
BasicUtil
.
getApp
().
getAppId
()){
return
"document.write(0)"
;
}
return
"document.write("
+
content
.
getContentHit
()
+
")"
;
}
...
...
src/main/java/net/mingsoft/cms/action/web/MCmsAction.java
View file @
0e8d961b
...
...
@@ -151,7 +151,7 @@ public class MCmsAction extends net.mingsoft.cms.action.BaseAction {
int
typeId
=
BasicUtil
.
getInt
(
ParserUtil
.
TYPE_ID
,
0
);
int
size
=
BasicUtil
.
getInt
(
ParserUtil
.
SIZE
,
10
);
ContentBean
contentBean
=
new
ContentBean
();
contentBean
.
setC
ontentC
ategoryId
(
String
.
valueOf
(
typeId
));
contentBean
.
setCategoryId
(
String
.
valueOf
(
typeId
));
//获取文章总数
List
<
CategoryBean
>
columnArticles
=
contentBiz
.
queryIdsByCategoryIdForParser
(
contentBean
);
//判断栏目下是否有文章
...
...
@@ -214,7 +214,7 @@ public class MCmsAction extends net.mingsoft.cms.action.BaseAction {
orderby
=
orderby
.
replaceAll
(
"('|\"|\\\\)"
,
"\\\\$1"
);
PageBean
page
=
new
PageBean
();
//用于详情上下页获取当前文章列表对应的分类,根据文章查询只能获取自身分类
String
typeId
=
BasicUtil
.
getString
(
ParserUtil
.
TYPE_ID
,
article
.
getC
ontentC
ategoryId
());
String
typeId
=
BasicUtil
.
getString
(
ParserUtil
.
TYPE_ID
,
article
.
getCategoryId
());
//根据文章编号查询栏目详情模版
CategoryEntity
column
=
(
CategoryEntity
)
categoryBiz
.
getEntity
(
Integer
.
parseInt
(
typeId
));
//解析后的内容
...
...
@@ -234,7 +234,7 @@ public class MCmsAction extends net.mingsoft.cms.action.BaseAction {
map
.
put
(
ParserUtil
.
PAGE
,
page
);
map
.
put
(
ParserUtil
.
ID
,
article
.
getId
());
ContentBean
contentBean
=
new
ContentBean
();
contentBean
.
setC
ontentC
ategoryId
(
String
.
valueOf
(
typeId
));
contentBean
.
setCategoryId
(
String
.
valueOf
(
typeId
));
contentBean
.
setOrderBy
(
orderby
);
contentBean
.
setOrder
(
order
);
List
<
CategoryBean
>
articleIdList
=
contentBiz
.
queryIdsByCategoryIdForParser
(
contentBean
);
...
...
src/main/java/net/mingsoft/cms/biz/impl/ContentBizImpl.java
View file @
0e8d961b
...
...
@@ -83,9 +83,6 @@ public class ContentBizImpl extends BaseBizImpl<IContentDao, ContentEntity> imp
@Override
public
List
<
CategoryBean
>
queryIdsByCategoryIdForParser
(
ContentBean
contentBean
)
{
if
(
BasicUtil
.
getWebsiteApp
()
!=
null
){
contentBean
.
setAppId
(
BasicUtil
.
getWebsiteApp
().
getAppId
());
}
return
this
.
contentDao
.
queryIdsByCategoryIdForParser
(
contentBean
);
}
...
...
@@ -140,7 +137,7 @@ public class ContentBizImpl extends BaseBizImpl<IContentDao, ContentEntity> imp
CategoryEntity
categoryEntity
=
new
CategoryEntity
();
categoryList
=
categoryDao
.
query
(
categoryEntity
);
for
(
CategoryEntity
category
:
categoryList
){
contentBean
.
setC
ontentC
ategoryId
(
category
.
getId
());
contentBean
.
setCategoryId
(
category
.
getId
());
// 分类是列表
if
(
category
.
getCategoryType
().
equals
(
"1"
)){
// 判断模板文件是否存在
...
...
@@ -170,16 +167,13 @@ public class ContentBizImpl extends BaseBizImpl<IContentDao, ContentEntity> imp
List
<
CategoryEntity
>
columns
=
new
ArrayList
<>();
// 获取所有的内容管理栏目
CategoryEntity
categoryEntity
=
new
CategoryEntity
();
if
(
BasicUtil
.
getWebsiteApp
()
!=
null
){
categoryEntity
.
setAppId
(
BasicUtil
.
getWebsiteApp
().
getAppId
());
}
columns
=
categoryDao
.
query
(
categoryEntity
);
List
<
CategoryBean
>
articleIdList
=
null
;
// 1、设置模板文件夹路径
// 获取栏目列表模版
for
(
CategoryEntity
column
:
columns
)
{
ContentBean
contentBean
=
new
ContentBean
();
contentBean
.
setC
ontentC
ategoryId
(
column
.
getId
());
contentBean
.
setCategoryId
(
column
.
getId
());
// 分类是列表
if
(
column
.
getCategoryType
().
equals
(
"1"
))
{
// 判断模板文件是否存在
...
...
src/main/java/net/mingsoft/cms/dao/ICmsHistoryLogDao.xml
View file @
0e8d961b
...
...
@@ -6,7 +6,7 @@
<id
column=
"id"
property=
"id"
/>
<!--编号 -->
<result
column=
"content_id"
property=
"contentId"
/>
<!--文章编号 -->
<result
column=
"hl_ip"
property=
"hlIp"
/>
<!--浏览ip -->
<result
column=
"
hl_
people_id"
property=
"
hlP
eopleId"
/>
<!--用户id -->
<result
column=
"people_id"
property=
"
p
eopleId"
/>
<!--用户id -->
<result
column=
"hl_is_mobile"
property=
"hlIsMobile"
/>
<!--是否为移动端 -->
<result
column=
"create_by"
property=
"createBy"
/>
<!--创建人 -->
<result
column=
"create_date"
property=
"createDate"
/>
<!--创建时间 -->
...
...
@@ -22,7 +22,7 @@
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"contentId != null and contentId != ''"
>
content_id,
</if>
<if
test=
"hlIp != null and hlIp != ''"
>
hl_ip,
</if>
<if
test=
"
hlP
eopleId != null and
hlP
eopleId != ''"
>
hl_
people_id,
</if>
<if
test=
"
p
eopleId != null and
p
eopleId != ''"
>
people_id,
</if>
<if
test=
"hlIsMobile != null"
>
hl_is_mobile,
</if>
<if
test=
"createBy > 0"
>
create_by,
</if>
<if
test=
"createDate != null"
>
create_date,
</if>
...
...
@@ -33,7 +33,7 @@
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"contentId != null and contentId != ''"
>
#{contentId},
</if>
<if
test=
"hlIp != null and hlIp != ''"
>
#{hlIp},
</if>
<if
test=
"
hlP
eopleId != null and
hlP
eopleId != ''"
>
#{
hlP
eopleId},
</if>
<if
test=
"
p
eopleId != null and
p
eopleId != ''"
>
#{
p
eopleId},
</if>
<if
test=
"hlIsMobile != null"
>
#{hlIsMobile},
</if>
<if
test=
"createBy > 0"
>
#{createBy},
</if>
<if
test=
"createDate != null"
>
#{createDate},
</if>
...
...
@@ -49,7 +49,7 @@
<set>
<if
test=
"contentId != null and contentId != ''"
>
content_id=#{contentId},
</if>
<if
test=
"hlIp != null and hlIp != ''"
>
hl_ip=#{hlIp},
</if>
<if
test=
"
hlP
eopleId != null and
hlP
eopleId != ''"
>
hl_
people_id=#{
hlP
eopleId},
</if>
<if
test=
"
p
eopleId != null and
p
eopleId != ''"
>
people_id=#{
p
eopleId},
</if>
<if
test=
"hlIsMobile != null"
>
hl_is_mobile=#{hlIsMobile},
</if>
<if
test=
"createBy > 0"
>
create_by=#{createBy},
</if>
<if
test=
"createDate != null"
>
create_date=#{createDate},
</if>
...
...
@@ -71,7 +71,7 @@
<where>
<if
test=
"contentId != null and contentId != ''"
>
and content_id=#{contentId}
</if>
<if
test=
"hlIp != null and hlIp != ''"
>
and hl_ip=#{hlIp}
</if>
<if
test=
"
hlP
eopleId != null and
hlP
eopleId != ''"
>
and
hl_
people_id=#{
hlP
eopleId}
</if>
<if
test=
"
p
eopleId != null and
p
eopleId != ''"
>
and people_id=#{
p
eopleId}
</if>
<if
test=
"hlIsMobile != null"
>
and hl_is_mobile=#{hlIsMobile}
</if>
<if
test=
"createBy > 0"
>
and create_by=#{createBy}
</if>
<if
test=
"createDate != null"
>
and create_date=#{createDate}
</if>
...
...
@@ -106,7 +106,7 @@
<where>
<if
test=
"contentId != null and contentId != ''"
>
and content_id=#{contentId}
</if>
<if
test=
"hlIp != null and hlIp != ''"
>
and hl_ip=#{hlIp}
</if>
<if
test=
"
hlP
eopleId != null and
hlP
eopleId != ''"
>
and
hl_
people_id=#{
hlP
eopleId}
</if>
<if
test=
"
p
eopleId != null and
p
eopleId != ''"
>
and people_id=#{
p
eopleId}
</if>
<if
test=
"hlIsMobile != null"
>
and hl_is_mobile=#{hlIsMobile}
</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/dao/IContentDao.xml
View file @
0e8d961b
...
...
@@ -5,7 +5,7 @@
<resultMap
id=
"resultMap"
type=
"net.mingsoft.cms.entity.ContentEntity"
>
<id
column=
"id"
property=
"id"
/>
<!--编号 -->
<result
column=
"content_title"
property=
"contentTitle"
/>
<!--文章标题 -->
<result
column=
"
content_
category_id"
property=
"c
ontentC
ategoryId"
/>
<!--所属栏目 -->
<result
column=
"category_id"
property=
"categoryId"
/>
<!--所属栏目 -->
<result
column=
"content_type"
property=
"contentType"
/>
<!--文章类型 -->
<result
column=
"content_display"
property=
"contentDisplay"
/>
<!--是否显示 -->
<result
column=
"content_author"
property=
"contentAuthor"
/>
<!--文章作者 -->
...
...
@@ -29,7 +29,7 @@
<resultMap
id=
"resultContentMap"
type=
"net.mingsoft.cms.bean.ContentBean"
>
<id
column=
"id"
property=
"id"
/>
<!--编号 -->
<result
column=
"content_title"
property=
"contentTitle"
/>
<!--文章标题 -->
<result
column=
"
content_
category_id"
property=
"c
ontentC
ategoryId"
/>
<!--所属栏目 -->
<result
column=
"category_id"
property=
"categoryId"
/>
<!--所属栏目 -->
<result
column=
"content_type"
property=
"contentType"
/>
<!--文章类型 -->
<result
column=
"content_display"
property=
"contentDisplay"
/>
<!--是否显示 -->
<result
column=
"content_author"
property=
"contentAuthor"
/>
<!--文章作者 -->
...
...
@@ -83,7 +83,7 @@
insert into cms_content
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"contentTitle != null and contentTitle != ''"
>
content_title,
</if>
<if
test=
"c
ontentC
ategoryId != null and c
ontentC
ategoryId != ''"
>
content_
category_id,
</if>
<if
test=
"categoryId != null and categoryId != ''"
>
category_id,
</if>
<if
test=
"contentType != null "
>
content_type,
</if>
<if
test=
"contentDisplay != null and contentDisplay != ''"
>
content_display,
</if>
<if
test=
"contentAuthor != null and contentAuthor != ''"
>
content_author,
</if>
...
...
@@ -104,7 +104,7 @@
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"contentTitle != null and contentTitle != ''"
>
#{contentTitle},
</if>
<if
test=
"c
ontentC
ategoryId != null and c
ontentC
ategoryId != ''"
>
#{c
ontentC
ategoryId},
</if>
<if
test=
"categoryId != null and categoryId != ''"
>
#{categoryId},
</if>
<if
test=
"contentType != null "
>
#{contentType},
</if>
<if
test=
"contentDisplay != null and contentDisplay != ''"
>
#{contentDisplay},
</if>
<if
test=
"contentAuthor != null and contentAuthor != ''"
>
#{contentAuthor},
</if>
...
...
@@ -130,7 +130,7 @@
update cms_content
<set>
<if
test=
"contentTitle != null and contentTitle != ''"
>
content_title=#{contentTitle},
</if>
<if
test=
"c
ontentC
ategoryId != null and c
ontentC
ategoryId != ''"
>
content_
category_id=#{c
ontentC
ategoryId},
</if>
<if
test=
"categoryId != null and categoryId != ''"
>
category_id=#{categoryId},
</if>
<if
test=
"contentType != null "
>
content_type=#{contentType},
</if>
<if
test=
"contentDisplay != null and contentDisplay != ''"
>
content_display=#{contentDisplay},
</if>
<if
test=
"contentAuthor != null "
>
content_author=#{contentAuthor},
</if>
...
...
@@ -163,7 +163,7 @@
<where>
del=0
<if
test=
"contentTitle != null and contentTitle != ''"
>
and content_title like CONCAT('%',#{contentTitle},'%')
</if>
<if
test=
"c
ontentC
ategoryId != null and c
ontentC
ategoryId != ''"
>
and
content_
category_id=#{c
ontentC
ategoryId}
</if>
<if
test=
"categoryId != null and categoryId != ''"
>
and category_id=#{categoryId}
</if>
<if
test=
"contentType != null and contentType != ''"
>
and content_type=#{contentType}
</if>
<if
test=
"contentDisplay != null and contentDisplay != ''"
>
and content_display=#{contentDisplay}
</if>
<if
test=
"contentAuthor != null and contentAuthor != ''"
>
and content_author=#{contentAuthor}
</if>
...
...
@@ -194,7 +194,7 @@
<delete
id=
"deleteEntityByCategoryIds"
>
update cms_content set del=1
<where>
content_
category_id in
<foreach
collection=
"ids"
item=
"item"
index=
"index"
category_id in
<foreach
collection=
"ids"
item=
"item"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</where>
</delete>
...
...
@@ -215,11 +215,11 @@
<select
id=
"query"
resultMap=
"resultContentMap"
>
select ct.*,CONCAT('/html/',ct.app_id,category_path,'/',ct.id,'.html') AS static_url from (
select ct.*,cc.category_path from cms_content ct
join cms_category cc on ct.
content_
category_id=cc.id
join cms_category cc on ct.category_id=cc.id
<where>
ct.del=0
<if
test=
"contentTitle != null and contentTitle != ''"
>
and content_title like CONCAT('%',#{contentTitle},'%')
</if>
<if
test=
"c
ontentC
ategoryId != null and c
ontentC
ategoryId != ''"
>
and (
content_
category_id=#{c
ontentC
ategoryId} or
content_
category_id in
<if
test=
"categoryId != null and categoryId != ''"
>
and (category_id=#{categoryId} or category_id in
(select id FROM cms_category where
<include
refid=
"queryWhereCategoryId"
></include>
))
</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>
...
...
@@ -242,13 +242,13 @@
</select>
<sql
id=
"queryWhereCategoryId"
databaseId=
"mysql"
>
find_in_set('${c
ontentC
ategoryId}',CATEGORY_PARENT_ID)
find_in_set('${categoryId}',CATEGORY_PARENT_ID)
</sql>
<sql
id=
"queryWhereCategoryId"
databaseId=
"oracle"
>
instr(','||'${c
ontentC
ategoryId}'||',', ','||CATEGORY_PARENT_ID||',')>0
instr(','||'${categoryId}'||',', ','||CATEGORY_PARENT_ID||',')>0
</sql>
<sql
id=
"queryWhereCategoryId"
databaseId=
"sqlServer"
>
CHARINDEX(','+'${c
ontentC
ategoryId}'+',' , ','+CATEGORY_PARENT_ID +',')>0
CHARINDEX(','+'${categoryId}'+',' , ','+CATEGORY_PARENT_ID +',')>0
</sql>
<!-- 根据站点编号、开始、结束时间和栏目编号查询文章编号集合 -->
...
...
@@ -256,12 +256,12 @@
select
ct.id article_id,c.*
FROM cms_content ct
LEFT JOIN cms_category c ON
content_
category_id = c.id
LEFT JOIN cms_category c ON category_id = c.id
where ct.del=0
<!-- 查询子栏目数据 -->
<if
test=
"c
ontentC
ategoryId > 0"
>
and (
content_
category_id=#{c
ontentC
ategoryId} or
content_
category_id in
<if
test=
"categoryId > 0"
>
and (category_id=#{categoryId} or category_id in
(select id FROM cms_category where
<include
refid=
"queryWhereCategoryId"
></include>
))
</if>
<if
test=
"beginTime!=null and beginTime!=''"
>
...
...
@@ -298,14 +298,14 @@
select count(*) from
cms_content a
left join cms_category c
ON a.
content_
category_id
ON a.category_id
= c.id
<if
test=
"tableName!=null and tableName!='' and diyMap!=null"
>
left join ${tableName} d on d.link_id=a.id
</if>
<where>
a.del=0
<if
test=
"ids!=null and ids!=''"
>
and FIND_IN_SET(
content_
category_id,#{ids})
and FIND_IN_SET(category_id,#{ids})
</if>
<if
test=
"map.content_title!=null"
>
and a.content_title like CONCAT("%",#{map.content_title},"%")
...
...
src/main/java/net/mingsoft/cms/entity/CategoryEntity.java
View file @
0e8d961b
...
...
@@ -82,11 +82,7 @@ private static final long serialVersionUID = 1574925152750L;
* 发布用户id
*/
private
Integer
categoryManagerId
;
/**
* 应用编号
*/
@TableField
(
exist
=
false
)
private
Integer
appId
;
/**
* 字典对应编号
*/
...
...
@@ -307,19 +303,7 @@ private static final long serialVersionUID = 1574925152750L;
public
Integer
getCategoryManagerId
()
{
return
this
.
categoryManagerId
;
}
/**
* 设置应用编号
*/
public
void
setAppId
(
Integer
appId
)
{
this
.
appId
=
appId
;
}
/**
* 获取应用编号
*/
public
Integer
getAppId
()
{
return
this
.
appId
;
}
/**
* 设置字典对应编号
*/
...
...
src/main/java/net/mingsoft/cms/entity/ContentEntity.java
View file @
0e8d961b
...
...
@@ -27,7 +27,7 @@ private static final long serialVersionUID = 1574925152617L;
/**
* 所属栏目
*/
private
String
c
ontentC
ategoryId
;
private
String
categoryId
;
/**
* 文章类型
*/
...
...
@@ -78,8 +78,7 @@ private static final long serialVersionUID = 1574925152617L;
/**
* 文章管理的应用id
*/
@TableField
(
exist
=
false
)
private
Integer
appId
;
/**
* 点击次数
*/
...
...
@@ -106,19 +105,15 @@ private static final long serialVersionUID = 1574925152617L;
public
String
getContentTitle
()
{
return
this
.
contentTitle
;
}
/**
* 设置所属栏目
*/
public
void
setContentCategoryId
(
String
contentCategoryId
)
{
this
.
contentCategoryId
=
contentCategoryId
;
public
String
getCategoryId
()
{
return
categoryId
;
}
/**
* 获取所属栏目
*/
public
String
getContentCategoryId
()
{
return
this
.
contentCategoryId
;
public
void
setCategoryId
(
String
categoryId
)
{
this
.
categoryId
=
categoryId
;
}
/**
* 设置文章类型
*/
...
...
@@ -262,17 +257,5 @@ private static final long serialVersionUID = 1574925152617L;
public
String
getContentUrl
()
{
return
this
.
contentUrl
;
}
/**
* 设置文章管理的应用id
*/
public
void
setAppId
(
Integer
appId
)
{
this
.
appId
=
appId
;
}
/**
* 获取文章管理的应用id
*/
public
Integer
getAppId
()
{
return
this
.
appId
;
}
}
\ No newline at end of file
src/main/java/net/mingsoft/cms/entity/HistoryLogEntity.java
View file @
0e8d961b
...
...
@@ -24,9 +24,9 @@ private static final long serialVersionUID = 1577064243576L;
*/
private
String
hlIp
;
/**
* 用户id
* 用户id
p
*/
private
String
hlP
eopleId
;
private
String
p
eopleId
;
/**
* 是否为移动端
*/
...
...
@@ -59,19 +59,15 @@ private static final long serialVersionUID = 1577064243576L;
public
String
getHlIp
()
{
return
this
.
hlIp
;
}
/**
* 设置用户id
*/
public
void
setHlPeopleId
(
String
hlPeopleId
)
{
this
.
hlPeopleId
=
hlPeopleId
;
public
String
getPeopleId
()
{
return
peopleId
;
}
/**
* 获取用户id
*/
public
String
getHlPeopleId
()
{
return
this
.
hlPeopleId
;
public
void
setPeopleId
(
String
peopleId
)
{
this
.
peopleId
=
peopleId
;
}
/**
* 设置是否为移动端
*/
...
...
src/main/resources/application-dev.yml
View file @
0e8d961b
spring
:
datasource
:
url
:
jdbc:mysql://
localhost
:33
0
6/mcms
?autoReconnect=true&
useUnicode=true&characterEncoding=utf8&
useSSL=fals
e&allowMultiQueries=true&se
rverTimezone=Asia/Shanghai
username
:
root
password
:
123456
url
:
jdbc:mysql://
192.168.0.8
:33
1
6/mcms
-dev-5.2-4?
useUnicode=true&characterEncoding=utf
-
8&
zeroDateTimeBehavior=convertToNull&autoReconnect=tru
e&allowMultiQueries=true&
u
se
SSL=true
username
:
mcms
password
:
mcms
filters
:
wall,mergeStat
type
:
com.alibaba.druid.pool.DruidDataSource
src/main/resources/application.yml
View file @
0e8d961b
...
...
@@ -11,9 +11,12 @@ logging:
file
:
name
:
mcms.log
#会在项目的根目录下生成对应的mcms.log文件,也可以根据实际情况写绝对路径,例如:d:/mcms.log
path
:
log
#会在项目的根目录下生成log目录,里面会生成对应的日期目录,日期目录下面生成日志压缩包备份文件,默认按每10M分割一个日志文件,例如:log/2020-01/app-2020-01-03-18.1.log.gz(表示2020年1月3号下午六点的第一个备份),也可以根据实际情况写绝对路径,例如:d:/log
ms
:
database
:
demo-cms-dev-4
mstore
:
http
:
http://store.i.mingsoft.net/
host
:
store.i.mingsoft.net
login
:
http://ms.i.mingsoft.net/sso/login.do
database
:
mcms-dev-5.2-4
# scheme: https #解决使用代理服务器代理应用时标签解析域名依旧为http的问题
swagger
:
enable
:
true
#启用swagger文档,生产的时候务必关掉 访问地址:http://ip|域名/项目发布名/swagger-ui.html
...
...
src/main/webapp/WEB-INF/manager/cms/category/form.ftl
View file @
0e8d961b
...
...
@@ -521,7 +521,7 @@
contentList: function (id) {
var that = this;
ms.http.post(ms.manager + "
/
cms
/
content
/
list
.do
", {
c
ontentC
ategoryId: id
categoryId: id
}).then(function (data) {
if(data.result){
if (data.data.total > 0) {
...
...
src/main/webapp/WEB-INF/manager/cms/content/form.ftl
View file @
0e8d961b
...
...
@@ -38,7 +38,7 @@
</el-form-item>
</el-col>
<el-col span="12" v-if="returnIsShow">
<el-form-item label="所属栏目" prop="c
ontentC
ategoryId">
<el-form-item label="所属栏目" prop="categoryId">
<template slot='label'>所属栏目
<el-popover placement="top-start" title="提示" trigger="hover">
<a href="http://doc.mingsoft.net/plugs-cms/biao-qian/wen-zhang-lie-biao-ms-arclist.html"
...
...
@@ -49,7 +49,7 @@
<tree-select :props="
{
value
:
'
id
'
,
label
:
'
categoryTitle
'
,
children
:
'
children
'
}
"
:options="contentCategoryIdOptions" :style="
{
width
:
'
100
%'
}
"
@change="categoryChange"
v-model="form.c
ontentC
ategoryId"></tree-select>
v-model="form.categoryId"></tree-select>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -285,7 +285,7 @@
//
文章标题
contentTitle
:
''
,
//
所属栏目
c
ontentC
ategoryId
:
''
,
categoryId
:
''
,
//
文章类型
contentType
:
[]
,
//
是否显示
...
...
@@ -327,7 +327,7 @@
"required"
:
true
,
"message"
:
"发布时间不能为空"
}
]
,
c
ontentC
ategoryId
:
[
{
categoryId
:
[
{
"required"
:
true
,
"message"
:
"所属栏目不能为空"
}
]
...
...
@@ -339,7 +339,7 @@
currCategory
:
function
()
{
var
that
=
this
;
return
this
.categoryIdOptions.find
(
function
(
value
)
{
return
value
.id
===
that
.form.c
ontentC
ategoryId
;
return
value
.id
===
that
.form.categoryId
;
})
;
}
},
...
...
@@ -365,7 +365,7 @@
that
.saveDisabled
=
true
;
//判断
if
(
that
.categoryIdOptions.filter
(
function
(
f
)
{
return
f
['
id
']
==
that
.form.c
ontentC
ategoryId
;
return
f
['
id
']
==
that
.form.categoryId
;
})[
0
]
.categoryType == '2' && that.returnIsShow)
{
that
.
$notify
({
title
:
'提示'
,
...
...
@@ -401,7 +401,7 @@
javascript
:
history
.go
(
-1
)
;
}
else
{
//如果是顶级封面或封面,则重新拿到当前封面
id
,
避免重复保存
that
.list
(
that
.form.c
ontentC
ategoryId
)
;
that
.list
(
that
.form.categoryId
)
;
}
}
else
{
...
...
@@ -483,7 +483,7 @@
})
;
},
getValue
:
function
(
data
)
{
this
.form.c
ontentC
ategoryId
=
data
.id
;
this
.form.categoryId
=
data
.id
;
},
//获取当前文章
get
:
function
(
id
)
{
...
...
@@ -509,7 +509,7 @@
that
.form
=
res
.data
;
var
category
=
that
.categoryIdOptions.filter
(
function
(
f
)
{
return
f
['
id
']
==
that
.form.c
ontentC
ategoryId
;
return
f
['
id
']
==
that
.form.categoryId
;
})
;
if
(
category
.length
==
1
)
{
...
...
@@ -580,10 +580,10 @@
})
;
},
//查询列表
list
:
function
(
c
ontentC
ategoryId
)
{
list
:
function
(
categoryId
)
{
var
that
=
this
;
ms
.http.post
(
ms
.manager
+
"/cms/content/list.do"
,
{
c
ontentC
ategoryId
:
c
ontentC
ategoryId
categoryId
:
categoryId
})
.then
(
function
(
res
)
{
if
(
res
.result
&&
res
.data.total
>
0
)
{
if
(
res
.data.rows
[
0
]
.contentType)
{
...
...
@@ -612,7 +612,7 @@
this
.form.id
=
ms
.util.getParameter
(
"id"
)
;
if
(
ms
.util.getParameter
(
"categoryId"
))
{
this
.form.c
ontentC
ategoryId
=
ms
.util.getParameter
(
"categoryId"
)
;
this
.form.categoryId
=
ms
.util.getParameter
(
"categoryId"
)
;
}
this
.type
=
ms
.util.getParameter
(
"type"
)
;
...
...
@@ -621,7 +621,7 @@
}
if
(
this
.type
)
{
this
.list
(
this
.form.c
ontentC
ategoryId
)
;
this
.list
(
this
.form.categoryId
)
;
this
.returnIsShow
=
false
;
}
}
...
...
src/main/webapp/WEB-INF/manager/cms/content/main.ftl
View file @
0e8d961b
...
...
@@ -68,7 +68,7 @@
</el-popover>
</template>
</el-table-column>
<el-table-column label="栏目名" align="left" prop="c
ontentC
ategoryId" :formatter="contentCategoryIdFormat" width="100">
<el-table-column label="栏目名" align="left" prop="categoryId" :formatter="contentCategoryIdFormat" width="100">
</el-table-column>
<el-table-column label="文章标题" align="left" prop="contentTitle" show-overflow-tooltip>
</el-table-column>
...
...
@@ -129,9 +129,9 @@
type
:
'
input
'
},
{
action
:
'
and
'
,
field
:
'
content_
category_id
'
,
field
:
'
category_id
'
,
el
:
'
eq
'
,
model
:
'
c
ontentC
ategoryId
'
,
model
:
'
categoryId
'
,
name
:
'所属栏目'
,
key
:
'
id
'
,
title
:
'
categoryTitle
'
,
...
...
@@ -268,7 +268,7 @@
contentTitle
:
null
,
//
文章类型
contentType
:
null
,
c
ontentC
ategoryId
:
''
categoryId
:
''
}
},
methods
:
{
...
...
@@ -371,7 +371,7 @@
if
(
id
)
{
location
.href
=
this
.manager
+
"/cms/content/form.do?id="
+
id
;
}
else
{
location
.href
=
this
.manager
+
"/cms/content/form.do?categoryId="
+
this
.form.c
ontentC
ategoryId
;
location
.href
=
this
.manager
+
"/cms/content/form.do?categoryId="
+
this
.form.categoryId
;
}
},
//表格数据转换
...
...
@@ -468,7 +468,7 @@
mounted
:
function
()
{
this
.contentCategoryIdOptionsGet
()
;
this
.contentTypeOptionsGet
()
;
this
.form.c
ontentC
ategoryId
=
ms
.util.getParameter
(
"categoryId"
)
;
this
.form.categoryId
=
ms
.util.getParameter
(
"categoryId"
)
;
if
(
history
.hasOwnProperty
(
"state"
))
{
this
.form
=
history
.state.form
;
this
.currentPage
=
history
.state.page.pageNo
;
...
...
src/main/webapp/WEB-INF/manager/index.ftl
View file @
0e8d961b
...
...
@@ -42,7 +42,7 @@
<!-- 子菜单 -->
<el-menu-item :index="sub.id+''" :data-index="sub.id"
v-for="(sub,index) in getSubMenu(menu.id)"
:key='sub.model
Model
Id' v-text="sub.modelTitle"
:key='sub.modelId' v-text="sub.modelTitle"
@click.self='open(sub)'></el-menu-item>
</el-submenu>
<!-- 收缩按钮 -->
...
...
@@ -149,7 +149,7 @@
@tab-click='tabClick'>
<el-tab-pane v-for="(item, index) in editableTabs" :key="index" :label="item.modelTitle"
:name="item.modelTitle"
:data-id='item.id' :data-model
Model
Id='item.model
Model
Id'>
:data-id='item.id' :data-modelId='item.modelId'>
<keep-alive>
<iframe :src='item.isStore?item.modelUrl:ms.manager+"/"+item.modelUrl+(item.modelUrl.indexOf("?")==-1?"?":"&")+"id="+item.id+"&modelCode="+item.modelCode+"&modelTitle="+encodeURI(item.modelTitle)'
:ref="item.modelTitle"></iframe>
...
...
@@ -234,7 +234,7 @@
menuList
:
function
(
n
,
o
)
{
var
that
=
this
;
n
&&
n
.forEach
(
function
(
item
,
index
)
{
item
.model
Model
Id
?
that
.subMenuList.push
(
item
)
:
that
.parentMenuList.push
(
item
)
item
.modelId
?
that
.subMenuList.push
(
item
)
:
that
.parentMenuList.push
(
item
)
})
},
parentMenuList
:
function
(
n
,
o
)
{
...
...
@@ -337,7 +337,7 @@
}
this
.currentTab
=
sub
.modelTitle
;
this
.headMenuActive
=
sub
.model
Model
Id
this
.headMenuActive
=
sub
.modelId
this
.
$nextTick
(
function
()
{
that
.asideMenuActive
=
sub
.id
;
})
...
...
@@ -352,7 +352,7 @@
},
tabClick
:
function
(
tab
)
{
this
.asideMenuActive
=
tab
.
$el
.dataset.id
this
.headMenuActive
=
tab
.
$el
.dataset.model
modeli
d
this
.headMenuActive
=
tab
.
$el
.dataset.model
I
d
console
.log
(
this
.editableTabs
)
},
//
获取当前菜单的子菜单
...
...
@@ -360,7 +360,7 @@
var
result
=
[];
var
that
=
this
;
that
.subMenuList
&&
that
.subMenuList.forEach
(
function
(
item
)
{
item
.model
Model
Id
==
id
?
result
.push
(
item
)
:
''
item
.modelId
==
id
?
result
.push
(
item
)
:
''
})
return
result
;
},
...
...
@@ -369,15 +369,15 @@
var
that
=
this
;
//
关闭的面板是当前激活面板
if
(
that
.currentTab
==
targetName
)
{
var
model
Model
Id
=
null
var
modelId
=
null
that
.editableTabs.forEach
(
function
(
tab
,
index
,
arr
)
{
if
(
tab
.modelTitle
==
targetName
)
{
model
Model
Id
=
arr
[
index
]
.model
Model
Id
modelId
=
arr
[
index
]
.modelId
var
nextTab
=
arr
[
index
+
1
]
||
arr
[
index
-
1
];
if
(
nextTab
)
{
that
.currentTab
=
nextTab
.modelTitle
that
.asideMenuActive
=
nextTab
.id
that
.headMenuActive
=
nextTab
.model
Model
Id
that
.headMenuActive
=
nextTab
.modelId
}
}
})
...
...
@@ -390,11 +390,11 @@
//
关闭左侧父菜单
if
(
that
.editableTabs.length
)
{
var
result
=
that
.editableTabs.every
(
function
(
item
)
{
return
item
.model
Model
Id
!==
model
Model
Id
return
item
.modelId
!==
modelId
})
if
(
result
)
{
that
.asideMenuList.forEach
(
function
(
menu
,
index
,
arr
)
{
if
(
menu
.id
==
model
Model
Id
)
{
if
(
menu
.id
==
modelId
)
{
var
flag
=
false
;
that
.markList.forEach
(
function
(
item
,
index
,
array
)
{
if
(
item
.title
==
menu
.modelTitle
)
{
...
...
@@ -434,7 +434,7 @@
//
this
.getSubMenu
(
menu
.id
)[
0
]
&& this.$refs.menu.open(this.getSubMenu(menu.id)[0].modelTitle);
var
children
=
[];
this
.menuList.forEach
(
function
(
tab
)
{
if
(
tab
.model
Model
Id
==
menu
.id
)
{
if
(
tab
.modelId
==
menu
.id
)
{
children
.push
(
tab
)
}
})
...
...
src/main/webapp/WEB-INF/manager/main.ftl
View file @
0e8d961b
...
...
@@ -448,7 +448,7 @@
var
that
=
this
;
axios
.create
({
withCredentials
:
true
})
.get
(
"https://mingsoft.net/cms/content/list.do?c
ontentC
ategoryId=202"
)
.then
(
function
(
res
)
{
})
.get
(
"https://mingsoft.net/cms/content/list.do?categoryId=202"
)
.then
(
function
(
res
)
{
that
.msNewsLast
=
res
.data.data.rows
[
0
]
.contentTitle.toString();
that
.msNewsPath
=
'
https
:
//
mingsoft
.net
/
html
/
1
/
203
/
202
/'
+
res
.data.data.rows
[
0
]
.id + '.html';
})
;
...
...
Write
Preview
Supports
Markdown
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