From 0e8d961bcc36661722451f0f52e3bd6d0ae801fd Mon Sep 17 00:00:00 2001
From: wujj <1027418825@qq.com>
Date: Sat, 21 Nov 2020 08:39:54 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AD=97=E6=AE=B5=E8=A7=84=E8=8C=83?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
doc/5.2-patch.sql | 102 ++++++++++++++++++
pom.xml | 58 +++++-----
.../mingsoft/cms/action/ContentAction.java | 6 +-
.../mingsoft/cms/action/GeneraterAction.java | 6 +-
.../cms/action/web/ContentAction.java | 9 +-
.../mingsoft/cms/action/web/MCmsAction.java | 6 +-
.../mingsoft/cms/biz/impl/ContentBizImpl.java | 10 +-
.../mingsoft/cms/dao/ICmsHistoryLogDao.xml | 12 +--
.../java/net/mingsoft/cms/dao/IContentDao.xml | 34 +++---
.../mingsoft/cms/entity/CategoryEntity.java | 18 +---
.../mingsoft/cms/entity/ContentEntity.java | 33 ++----
.../mingsoft/cms/entity/HistoryLogEntity.java | 20 ++--
src/main/resources/application-dev.yml | 6 +-
src/main/resources/application.yml | 7 +-
.../WEB-INF/manager/cms/category/form.ftl | 2 +-
.../WEB-INF/manager/cms/content/form.ftl | 26 ++---
.../WEB-INF/manager/cms/content/main.ftl | 12 +--
src/main/webapp/WEB-INF/manager/index.ftl | 24 ++---
src/main/webapp/WEB-INF/manager/main.ftl | 2 +-
19 files changed, 225 insertions(+), 168 deletions(-)
diff --git a/doc/5.2-patch.sql b/doc/5.2-patch.sql
index 8ccedac9..3e0d9ed4 100644
--- a/doc/5.2-patch.sql
+++ b/doc/5.2-patch.sql
@@ -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`;
+
+
+
+
diff --git a/pom.xml b/pom.xml
index fe666ad9..a403e5bc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -39,49 +39,49 @@
ms-mpeople
-
-
-
-
+
+ net.mingsoft
+ ms-ad
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ net.mingsoft
+ ms-mattention
+
+
+ net.mingsoft
+ ms-mcomment
+
+
+ net.mingsoft
+ ms-mpay
+
+
+ net.mingsoft
+ ms-msend
+
-
-
-
-
-
-
-
-
+
+ net.mingsoft
+ ms-spider
+
+
+ net.mingsoft
+ ms-mweixin
+
net.mingsoft
store-client
- 5.1
+ 5.2-SNAPSHOT
diff --git a/src/main/java/net/mingsoft/cms/action/ContentAction.java b/src/main/java/net/mingsoft/cms/action/ContentAction.java
index 1470a27c..5e360bc1 100644
--- a/src/main/java/net/mingsoft/cms/action/ContentAction.java
+++ b/src/main/java/net/mingsoft/cms/action/ContentAction.java
@@ -65,7 +65,7 @@ public class ContentAction extends BaseAction {
@ApiOperation(value = "查询文章列表接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "contentTitle", value = "文章标题", required =false,paramType="query"),
- @ApiImplicitParam(name = "contentCategoryId", 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 = "contentCategoryId", 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 = "contentCategoryId", 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"),
diff --git a/src/main/java/net/mingsoft/cms/action/GeneraterAction.java b/src/main/java/net/mingsoft/cms/action/GeneraterAction.java
index 9883b4ae..12a1ba15 100644
--- a/src/main/java/net/mingsoft/cms/action/GeneraterAction.java
+++ b/src/main/java/net/mingsoft/cms/action/GeneraterAction.java
@@ -172,7 +172,7 @@ public class GeneraterAction extends BaseAction {
// 获取栏目列表模版
for (CategoryEntity column : columns) {
ContentBean contentBean = new ContentBean();
- contentBean.setContentCategoryId(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.setContentCategoryId(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.setContentCategoryId(columnId);
+ contentBean.setCategoryId(columnId);
// 分类是列表
if(category.getCategoryType().equals("1")){
// 获取文章列表表属性
diff --git a/src/main/java/net/mingsoft/cms/action/web/ContentAction.java b/src/main/java/net/mingsoft/cms/action/web/ContentAction.java
index 25a59d83..969d689b 100644
--- a/src/main/java/net/mingsoft/cms/action/web/ContentAction.java
+++ b/src/main/java/net/mingsoft/cms/action/web/ContentAction.java
@@ -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 = "contentCategoryId", 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() + ")";
}
diff --git a/src/main/java/net/mingsoft/cms/action/web/MCmsAction.java b/src/main/java/net/mingsoft/cms/action/web/MCmsAction.java
index 96d253b3..72230d3a 100644
--- a/src/main/java/net/mingsoft/cms/action/web/MCmsAction.java
+++ b/src/main/java/net/mingsoft/cms/action/web/MCmsAction.java
@@ -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.setContentCategoryId(String.valueOf(typeId));
+ contentBean.setCategoryId(String.valueOf(typeId));
//获取文章总数
List 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.getContentCategoryId());
+ 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.setContentCategoryId(String.valueOf(typeId));
+ contentBean.setCategoryId(String.valueOf(typeId));
contentBean.setOrderBy(orderby);
contentBean.setOrder(order);
List articleIdList = contentBiz.queryIdsByCategoryIdForParser(contentBean);
diff --git a/src/main/java/net/mingsoft/cms/biz/impl/ContentBizImpl.java b/src/main/java/net/mingsoft/cms/biz/impl/ContentBizImpl.java
index e21790ec..2836939f 100644
--- a/src/main/java/net/mingsoft/cms/biz/impl/ContentBizImpl.java
+++ b/src/main/java/net/mingsoft/cms/biz/impl/ContentBizImpl.java
@@ -83,9 +83,6 @@ public class ContentBizImpl extends BaseBizImpl imp
@Override
public List 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 imp
CategoryEntity categoryEntity = new CategoryEntity();
categoryList = categoryDao.query(categoryEntity);
for(CategoryEntity category : categoryList){
- contentBean.setContentCategoryId(category.getId());
+ contentBean.setCategoryId(category.getId());
// 分类是列表
if(category.getCategoryType().equals("1")){
// 判断模板文件是否存在
@@ -170,16 +167,13 @@ public class ContentBizImpl extends BaseBizImpl imp
List columns = new ArrayList<>();
// 获取所有的内容管理栏目
CategoryEntity categoryEntity=new CategoryEntity();
- if(BasicUtil.getWebsiteApp() !=null){
- categoryEntity.setAppId( BasicUtil.getWebsiteApp().getAppId());
- }
columns = categoryDao.query(categoryEntity);
List articleIdList = null;
// 1、设置模板文件夹路径
// 获取栏目列表模版
for (CategoryEntity column : columns) {
ContentBean contentBean = new ContentBean();
- contentBean.setContentCategoryId(column.getId());
+ contentBean.setCategoryId(column.getId());
// 分类是列表
if(column.getCategoryType().equals("1")) {
// 判断模板文件是否存在
diff --git a/src/main/java/net/mingsoft/cms/dao/ICmsHistoryLogDao.xml b/src/main/java/net/mingsoft/cms/dao/ICmsHistoryLogDao.xml
index 01dd4ab8..60ab9390 100644
--- a/src/main/java/net/mingsoft/cms/dao/ICmsHistoryLogDao.xml
+++ b/src/main/java/net/mingsoft/cms/dao/ICmsHistoryLogDao.xml
@@ -6,7 +6,7 @@
-
+
@@ -22,7 +22,7 @@
content_id,
hl_ip,
- hl_people_id,
+ people_id,
hl_is_mobile,
create_by,
create_date,
@@ -33,7 +33,7 @@
#{contentId},
#{hlIp},
- #{hlPeopleId},
+ #{peopleId},
#{hlIsMobile},
#{createBy},
#{createDate},
@@ -49,7 +49,7 @@
content_id=#{contentId},
hl_ip=#{hlIp},
- hl_people_id=#{hlPeopleId},
+ people_id=#{peopleId},
hl_is_mobile=#{hlIsMobile},
create_by=#{createBy},
create_date=#{createDate},
@@ -71,7 +71,7 @@
and content_id=#{contentId}
and hl_ip=#{hlIp}
- and hl_people_id=#{hlPeopleId}
+ and people_id=#{peopleId}
and hl_is_mobile=#{hlIsMobile}
and create_by=#{createBy}
and create_date=#{createDate}
@@ -106,7 +106,7 @@
and content_id=#{contentId}
and hl_ip=#{hlIp}
- and hl_people_id=#{hlPeopleId}
+ and people_id=#{peopleId}
and hl_is_mobile=#{hlIsMobile}
and create_by=#{createBy}
and create_date=#{createDate}
diff --git a/src/main/java/net/mingsoft/cms/dao/IContentDao.xml b/src/main/java/net/mingsoft/cms/dao/IContentDao.xml
index fe0bfd69..8d023989 100644
--- a/src/main/java/net/mingsoft/cms/dao/IContentDao.xml
+++ b/src/main/java/net/mingsoft/cms/dao/IContentDao.xml
@@ -5,7 +5,7 @@
-
+
@@ -29,7 +29,7 @@
-
+
@@ -83,7 +83,7 @@
insert into cms_content
content_title,
- content_category_id,
+ category_id,
content_type,
content_display,
content_author,
@@ -104,7 +104,7 @@
#{contentTitle},
- #{contentCategoryId},
+ #{categoryId},
#{contentType},
#{contentDisplay},
#{contentAuthor},
@@ -130,7 +130,7 @@
update cms_content
content_title=#{contentTitle},
- content_category_id=#{contentCategoryId},
+ category_id=#{categoryId},
content_type=#{contentType},
content_display=#{contentDisplay},
content_author=#{contentAuthor},
@@ -163,7 +163,7 @@
del=0
and content_title like CONCAT('%',#{contentTitle},'%')
- and content_category_id=#{contentCategoryId}
+ and category_id=#{categoryId}
and content_type=#{contentType}
and content_display=#{contentDisplay}
and content_author=#{contentAuthor}
@@ -194,7 +194,7 @@
update cms_content set del=1
- content_category_id in #{item}
@@ -215,11 +215,11 @@
- find_in_set('${contentCategoryId}',CATEGORY_PARENT_ID)
+ find_in_set('${categoryId}',CATEGORY_PARENT_ID)
- instr(','||'${contentCategoryId}'||',', ','||CATEGORY_PARENT_ID||',')>0
+ instr(','||'${categoryId}'||',', ','||CATEGORY_PARENT_ID||',')>0
- CHARINDEX(','+'${contentCategoryId}'+',' , ','+CATEGORY_PARENT_ID +',')>0
+ CHARINDEX(','+'${categoryId}'+',' , ','+CATEGORY_PARENT_ID +',')>0
@@ -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
-
- and (content_category_id=#{contentCategoryId} or content_category_id in
+
+ and (category_id=#{categoryId} or category_id in
(select id FROM cms_category where ))
@@ -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
left join ${tableName} d on d.link_id=a.id
a.del=0
- and FIND_IN_SET(content_category_id,#{ids})
+ and FIND_IN_SET(category_id,#{ids})
and a.content_title like CONCAT("%",#{map.content_title},"%")
diff --git a/src/main/java/net/mingsoft/cms/entity/CategoryEntity.java b/src/main/java/net/mingsoft/cms/entity/CategoryEntity.java
index 4c43ba18..168132ef 100644
--- a/src/main/java/net/mingsoft/cms/entity/CategoryEntity.java
+++ b/src/main/java/net/mingsoft/cms/entity/CategoryEntity.java
@@ -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;
- }
/**
* 设置字典对应编号
*/
diff --git a/src/main/java/net/mingsoft/cms/entity/ContentEntity.java b/src/main/java/net/mingsoft/cms/entity/ContentEntity.java
index a01fb64d..4eaa5e59 100644
--- a/src/main/java/net/mingsoft/cms/entity/ContentEntity.java
+++ b/src/main/java/net/mingsoft/cms/entity/ContentEntity.java
@@ -27,7 +27,7 @@ private static final long serialVersionUID = 1574925152617L;
/**
* 所属栏目
*/
- private String contentCategoryId;
+ 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
diff --git a/src/main/java/net/mingsoft/cms/entity/HistoryLogEntity.java b/src/main/java/net/mingsoft/cms/entity/HistoryLogEntity.java
index afe31b11..b5498f26 100644
--- a/src/main/java/net/mingsoft/cms/entity/HistoryLogEntity.java
+++ b/src/main/java/net/mingsoft/cms/entity/HistoryLogEntity.java
@@ -24,9 +24,9 @@ private static final long serialVersionUID = 1577064243576L;
*/
private String hlIp;
/**
- * 用户id
+ * 用户idp
*/
- private String hlPeopleId;
+ private String peopleId;
/**
* 是否为移动端
*/
@@ -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;
}
+
/**
* 设置是否为移动端
*/
diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml
index 1d97891c..e27d6086 100644
--- a/src/main/resources/application-dev.yml
+++ b/src/main/resources/application-dev.yml
@@ -1,8 +1,8 @@
spring:
datasource:
- url: jdbc:mysql://localhost:3306/mcms?autoReconnect=true&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai
- username: root
- password: 123456
+ url: jdbc:mysql://192.168.0.8:3316/mcms-dev-5.2-4?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&allowMultiQueries=true&useSSL=true
+ username: mcms
+ password: mcms
filters: wall,mergeStat
type: com.alibaba.druid.pool.DruidDataSource
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index c3963b07..5dc80c61 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -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
diff --git a/src/main/webapp/WEB-INF/manager/cms/category/form.ftl b/src/main/webapp/WEB-INF/manager/cms/category/form.ftl
index 38251cbe..0a7f2057 100644
--- a/src/main/webapp/WEB-INF/manager/cms/category/form.ftl
+++ b/src/main/webapp/WEB-INF/manager/cms/category/form.ftl
@@ -521,7 +521,7 @@
contentList: function (id) {
var that = this;
ms.http.post(ms.manager + "/cms/content/list.do", {
- contentCategoryId: id
+ categoryId: id
}).then(function (data) {
if(data.result){
if (data.data.total > 0) {
diff --git a/src/main/webapp/WEB-INF/manager/cms/content/form.ftl b/src/main/webapp/WEB-INF/manager/cms/content/form.ftl
index f172adb1..765cc68f 100644
--- a/src/main/webapp/WEB-INF/manager/cms/content/form.ftl
+++ b/src/main/webapp/WEB-INF/manager/cms/content/form.ftl
@@ -38,7 +38,7 @@
-
+
所属栏目
+ v-model="form.categoryId">
@@ -285,7 +285,7 @@
// 文章标题
contentTitle: '',
// 所属栏目
- contentCategoryId: '',
+ categoryId: '',
// 文章类型
contentType: [],
// 是否显示
@@ -327,7 +327,7 @@
"required": true,
"message": "发布时间不能为空"
}],
- contentCategoryId: [{
+ categoryId: [{
"required": true,
"message": "所属栏目不能为空"
}]
@@ -339,7 +339,7 @@
currCategory: function () {
var that = this;
return this.categoryIdOptions.find(function (value) {
- return value.id === that.form.contentCategoryId;
+ return value.id === that.form.categoryId;
});
}
},
@@ -365,7 +365,7 @@
that.saveDisabled = true; //判断
if (that.categoryIdOptions.filter(function (f) {
- return f['id'] == that.form.contentCategoryId;
+ 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.contentCategoryId);
+ that.list(that.form.categoryId);
}
} else {
@@ -483,7 +483,7 @@
});
},
getValue: function (data) {
- this.form.contentCategoryId = 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.contentCategoryId;
+ return f['id'] == that.form.categoryId;
});
if (category.length == 1) {
@@ -580,10 +580,10 @@
});
},
//查询列表
- list: function (contentCategoryId) {
+ list: function (categoryId) {
var that = this;
ms.http.post(ms.manager + "/cms/content/list.do", {
- contentCategoryId: contentCategoryId
+ 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.contentCategoryId = 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.contentCategoryId);
+ this.list(this.form.categoryId);
this.returnIsShow = false;
}
}
diff --git a/src/main/webapp/WEB-INF/manager/cms/content/main.ftl b/src/main/webapp/WEB-INF/manager/cms/content/main.ftl
index c6902eaf..3c0c134d 100644
--- a/src/main/webapp/WEB-INF/manager/cms/content/main.ftl
+++ b/src/main/webapp/WEB-INF/manager/cms/content/main.ftl
@@ -68,7 +68,7 @@
-
+
@@ -129,9 +129,9 @@
type: 'input'
}, {
action: 'and',
- field: 'content_category_id',
+ field: 'category_id',
el: 'eq',
- model: 'contentCategoryId',
+ model: 'categoryId',
name: '所属栏目',
key: 'id',
title: 'categoryTitle',
@@ -268,7 +268,7 @@
contentTitle: null,
// 文章类型
contentType: null,
- contentCategoryId: ''
+ 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.contentCategoryId;
+ location.href = this.manager + "/cms/content/form.do?categoryId=" + this.form.categoryId;
}
},
//表格数据转换
@@ -468,7 +468,7 @@
mounted: function () {
this.contentCategoryIdOptionsGet();
this.contentTypeOptionsGet();
- this.form.contentCategoryId = 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;
diff --git a/src/main/webapp/WEB-INF/manager/index.ftl b/src/main/webapp/WEB-INF/manager/index.ftl
index dd786205..155ce328 100644
--- a/src/main/webapp/WEB-INF/manager/index.ftl
+++ b/src/main/webapp/WEB-INF/manager/index.ftl
@@ -42,7 +42,7 @@
@@ -149,7 +149,7 @@
@tab-click='tabClick'>
+ :data-id='item.id' :data-modelId='item.modelId'>
@@ -234,7 +234,7 @@
menuList: function (n, o) {
var that = this;
n && n.forEach(function (item, index) {
- item.modelModelId ? 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.modelModelId
+ 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.modelmodelid
+ this.headMenuActive = tab.$el.dataset.modelId
console.log(this.editableTabs)
},
// 获取当前菜单的子菜单
@@ -360,7 +360,7 @@
var result = [];
var that = this;
that.subMenuList && that.subMenuList.forEach(function (item) {
- item.modelModelId == id ? result.push(item) : ''
+ item.modelId == id ? result.push(item) : ''
})
return result;
},
@@ -369,15 +369,15 @@
var that = this;
// 关闭的面板是当前激活面板
if (that.currentTab == targetName) {
- var modelModelId = null
+ var modelId = null
that.editableTabs.forEach(function (tab, index, arr) {
if (tab.modelTitle == targetName) {
- modelModelId = arr[index].modelModelId
+ 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.modelModelId
+ that.headMenuActive = nextTab.modelId
}
}
})
@@ -390,11 +390,11 @@
// 关闭左侧父菜单
if (that.editableTabs.length) {
var result = that.editableTabs.every(function (item) {
- return item.modelModelId !== modelModelId
+ return item.modelId !== modelId
})
if (result) {
that.asideMenuList.forEach(function (menu, index, arr) {
- if (menu.id == modelModelId) {
+ 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.modelModelId == menu.id) {
+ if (tab.modelId == menu.id) {
children.push(tab)
}
})
diff --git a/src/main/webapp/WEB-INF/manager/main.ftl b/src/main/webapp/WEB-INF/manager/main.ftl
index bdd7a093..9d6e853e 100644
--- a/src/main/webapp/WEB-INF/manager/main.ftl
+++ b/src/main/webapp/WEB-INF/manager/main.ftl
@@ -448,7 +448,7 @@
var that = this;
axios.create({
withCredentials: true
- }).get("https://mingsoft.net/cms/content/list.do?contentCategoryId=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';
});