"0002-Add-Two-Numbers/vscode:/vscode.git/clone" did not exist on "1cf14b1d54f371929c1597b0fa11152de6156cae"
Commit 2d3b0160 authored by msgroup's avatar msgroup
Browse files

5.2.1发布

parent 6c759ad9
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
很多人说铭飞是大天朝国唯一完整开源的J2EE系统!团队希望看到更多的优秀好用的开源系统,我们一直会努力下去!<br/> 很多人说铭飞是大天朝国唯一完整开源的J2EE系统!团队希望看到更多的优秀好用的开源系统,我们一直会努力下去!<br/>
QQ交流群号:[![加入QQ群](https://img.shields.io/badge/一群-231212174-blue.svg)](https://jq.qq.com/?_wv=1027&k=5zykX7V) [![加入QQ群](https://img.shields.io/badge/二群-221335098-blue.svg)](https://jq.qq.com/?_wv=1027&k=56BqFKu) [![加入QQ群](https://img.shields.io/badge/三群-242805203-blue.svg)](https://jq.qq.com/?_wv=1027&k=5oF19sl) QQ交流群号: [![加入QQ群](https://img.shields.io/badge/五群-231211521-blue.svg)](https://jq.qq.com/?_wv=1027&k=5oF19sl) [![加入QQ群](https://img.shields.io/badge/四群-881894877-blue.svg)](https://jq.qq.com/?_wv=1027&k=5oF19sl) [![加入QQ群](https://img.shields.io/badge/一群-231212174-blue.svg)](https://jq.qq.com/?_wv=1027&k=5zykX7V) [![加入QQ群](https://img.shields.io/badge/二群-221335098-blue.svg)](https://jq.qq.com/?_wv=1027&k=56BqFKu) [![加入QQ群](https://img.shields.io/badge/三群-242805203-blue.svg)](https://jq.qq.com/?_wv=1027&k=5oF19sl)
# 开源说明 # 开源说明
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
UPDATE `mdiy_tag_sql` SET `tag_id` = 4, `tag_sql` = '<#assign _typeid=\"0\"/>\r\n<#if column?? && column.id?? && column.id?number gt 0>\r\n <#assign _typeid=\"${column.id}\">\r\n <#assign selfid=\"${column.id}\">\r\n</#if>\r\n<#if typeid??>\r\n <#assign _typeid=\"${typeid}\">\r\n</#if>\r\nselect \r\n @rownum := @rownum + 1 AS typeindex,\r\n id,\r\n id as typeid,\r\n category_title as typetitle,\r\n <#--返回父id集合-->\r\n category_parent_id as pids,\r\n <#--栏目选中的样式-->\r\n IF(<#if selfid?has_content>${selfid}<#else>${_typeid}</#if> = id ,\"${class!\'\'}\",\"\") as class,\r\n <#--动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\"/${modelName}/list.do?typeid=\", id) as typelink,\r\n <#else>\r\n <#--栏目类型为链接-->\r\n IF(\"3\" = category_type,category_diy_url,CONCAT(category_path,\"/index.html\")) as typelink,\r\n </#if>\r\n category_keyword as typekeyword,\r\n category_diy_url as typeurl,\r\n category_flag as flag,\r\n category_parent_id as parentid,\r\ncategory_descrip as typedescrip,\r\n ( CASE category_img WHEN \'\' THEN category_img ELSE CONVERT ( JSON_UNQUOTE( JSON_EXTRACT( category_img -> \'$[0]\', \'$.path\' ) ) USING utf8 ) END ) as typelitpic ,\r\n(select count(*) from cms_category c where c.category_id=typeid and c.del=0) as childsize\r\n from (SELECT @rownum := 0) r,cms_category \r\n where \r\n cms_category.del=0 \r\n <#--根据站点编号查询-->\r\n <#if appId?? >\r\n and cms_category.app_id=${appId}\r\n </#if>\r\n <#--栏目属性-->\r\n <#if flag?? >\r\n and\r\n ( <#list flag?split(\',\') as item>\r\n <#if item?index gt 0> or</#if>\r\n FIND_IN_SET(\'${item}\',category_flag)\r\n </#list>)\r\n </#if>\r\n\r\n <#if noflag?? >\r\n and\r\n (\r\n <#list noflag?split(\',\') as item>\r\n <#if item?index gt 0> and</#if>\r\n FIND_IN_SET(\'${item}\',category_flag)=0\r\n </#list> or category_flag is null)\r\n </#if>\r\n <#--type默认son-->\r\n<#if !type??||!type?has_content>\r\n<#assign type=\"son\"/>\r\n</#if>\r\n<#if type?has_content>\r\n <#--顶级栏目(单个)-->\r\n <#if type==\"top\">\r\n <#if _typeid != \"0\">\r\n and id=(SELECT IF(IF(LEFT ( category_parent_id, LOCATE( \",\", category_parent_id ) - 1 ),LEFT ( category_parent_id, LOCATE( \",\", category_parent_id ) - 1 ),category_parent_id),IF(LEFT ( category_parent_id, LOCATE( \",\", category_parent_id ) - 1 ),LEFT ( category_parent_id, LOCATE( \",\", category_parent_id ) - 1 ),category_parent_id),id)FROM cms_category WHERE id = ${_typeid})\r\n </#if>\r\n <#elseif type==\"nav\">\r\n and(category_id=0 or category_id is null)\r\n <#--同级栏目(多个)-->\r\n <#elseif type==\"level\">\r\n and\r\n <#if _typeid?has_content>\r\n category_id=(select category_id from cms_category where id=${_typeid})\r\n <#else>\r\n 1=1\r\n </#if>\r\n <#--当前栏目(单个)-->\r\n <#elseif type==\"self\">\r\n and \r\n <#if _typeid?has_content>\r\n id=${_typeid}\r\n <#else>\r\n 1=1\r\n </#if>\r\n <#--当前栏目的所属栏目(多个)-->\r\n <#elseif type==\"path\">\r\n and \r\n <#if _typeid?has_content>\r\n id in (<#if column?? && column.categoryParentId??>${column.categoryParentId},</#if>${_typeid})\r\n <#else>\r\n 1=1\r\n </#if>\r\n <#--子栏目(多个)-->\r\n <#elseif type==\"son\">\r\n and \r\n <#if _typeid?has_content>\r\n category_id=${_typeid}\r\n <#else>\r\n 1=1\r\n </#if>\r\n <#--上一级栏目没有则取当前栏目(单个)-->\r\n <#elseif type==\"parent\">\r\n and \r\n <#if _typeid?has_content>\r\n <#if column?? && column.categoryId??>\r\n id=${column.categoryId}\r\n <#else>\r\n id=${_typeid}\r\n </#if>\r\n <#else>\r\n 1=1\r\n </#if>\r\n <#--子栏目或同级栏目(多个)-->\r\n <#elseif type==\"sonOrLevel\">\r\n and \r\n <#if _typeid?has_content>\r\n category_id= if((SELECT count(*) FROM cms_category\r\n WHERE category_id=${_typeid})>0,${_typeid},(select category_id from cms_category where id=${_typeid}))\r\n <#else>\r\n 1=1\r\n </#if>\r\n </#if>\r\n<#else> <#--默认顶级栏目-->\r\n and\r\n <#if _typeid?has_content>\r\n id=${_typeid}\r\n <#else>\r\n (category_id=0 or category_id is null)\r\n </#if>\r\n</#if>\r\n<#--字段排序-->\r\n <#if orderby?? >\r\n ORDER BY \r\n <#if orderby==\"date\"> category_datetime\r\n <#elseif orderby==\"sort\"> category_sort\r\n <#else>cms_content.id</#if>\r\n <#else>\r\n ORDER BY id\r\n </#if>\r\n <#if order?? >\r\n <#if order==\"desc\"> desc</#if>\r\n <#if order==\"asc\"> asc</#if>\r\n </#if>', `sort` = 1 WHERE `id` = 6;
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>net.mingsoft</groupId> <groupId>net.mingsoft</groupId>
<artifactId>ms-mcms</artifactId> <artifactId>ms-mcms</artifactId>
<version>5.2.0.RELEASE</version> <version>5.2.1</version>
<name>ms-mcms</name> <name>ms-mcms</name>
<!-- 打包war包 --> <!-- 打包war包 -->
<!-- <packaging>war</packaging>--> <!-- <packaging>war</packaging>-->
<properties> <properties>
<java.version>1.8</java.version> <java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
...@@ -49,23 +49,17 @@ ...@@ -49,23 +49,17 @@
<dependency> <dependency>
<groupId>net.mingsoft</groupId> <groupId>net.mingsoft</groupId>
<artifactId>ms-basic</artifactId> <artifactId>ms-basic</artifactId>
<version>1.0.37</version> <version>2.1.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.mingsoft</groupId> <groupId>net.mingsoft</groupId>
<artifactId>ms-mdiy</artifactId> <artifactId>ms-mdiy</artifactId>
<version>1.0.28</version> <version>2.1.0</version>
</dependency>
<dependency>
<groupId>net.mingsoft</groupId>
<artifactId>ms-mpeople</artifactId>
<version>1.0.33</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>net.mingsoft</groupId> <groupId>net.mingsoft</groupId>
<artifactId>store-client</artifactId> <artifactId>store-client</artifactId>
<version>5.2</version> <version>2.1.0</version>
</dependency> </dependency>
</dependencies> </dependencies>
...@@ -129,4 +123,4 @@ ...@@ -129,4 +123,4 @@
</plugins> </plugins>
<defaultGoal>compile</defaultGoal> <defaultGoal>compile</defaultGoal>
</build> </build>
</project> </project>
\ No newline at end of file
...@@ -32,14 +32,12 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2; ...@@ -32,14 +32,12 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
import java.util.Locale; import java.util.Locale;
@SpringBootApplication @SpringBootApplication(scanBasePackages = {"net.mingsoft"})
@ComponentScan(basePackages = {"net.mingsoft"})
@MapperScan(basePackages={"**.dao","com.baomidou.**.mapper"}) @MapperScan(basePackages={"**.dao","com.baomidou.**.mapper"})
@ServletComponentScan(basePackages = {"net.mingsoft"}) @ServletComponentScan(basePackages = {"net.mingsoft"})
@EnableCaching
public class MSApplication { public class MSApplication {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(MSApplication.class, args); SpringApplication.run(MSApplication.class, args);
} }
} }
\ No newline at end of file
...@@ -295,7 +295,8 @@ public class CategoryAction extends BaseAction { ...@@ -295,7 +295,8 @@ public class CategoryAction extends BaseAction {
return ResultData.build().error(getResString("cannot.select.child")); return ResultData.build().error(getResString("cannot.select.child"));
} }
} }
categoryBiz.updateEntity(category); // 这里不能使用mybitsplus 存在业务
categoryBiz.updateEntity(category);
return ResultData.build().success(category); return ResultData.build().success(category);
} }
......
...@@ -285,7 +285,7 @@ public class ContentAction extends BaseAction { ...@@ -285,7 +285,7 @@ public class ContentAction extends BaseAction {
if(!StringUtil.checkLength(content.getContentUrl()+"", 0, 200)){ if(!StringUtil.checkLength(content.getContentUrl()+"", 0, 200)){
return ResultData.build().error(getResString("err.length", this.getResString("content.url"), "0", "200")); return ResultData.build().error(getResString("err.length", this.getResString("content.url"), "0", "200"));
} }
contentBiz.updateEntity(content); contentBiz.saveOrUpdate(content);
return ResultData.build().success(content); return ResultData.build().success(content);
} }
......
...@@ -133,7 +133,7 @@ public class GeneraterAction extends BaseAction { ...@@ -133,7 +133,7 @@ public class GeneraterAction extends BaseAction {
String generateFileName = request.getParameter("position"); String generateFileName = request.getParameter("position");
// 获取文件所在路径 首先判断用户输入的模版文件是否存在 // 获取文件所在路径 首先判断用户输入的模版文件是否存在
if (!FileUtil.exist(ParserUtil.buildTempletPath())) { if (!FileUtil.exist(ParserUtil.buildTemplatePath())) {
return ResultData.build().error(getResString("templet.file")); return ResultData.build().error(getResString("templet.file"));
} else { } else {
...@@ -186,7 +186,7 @@ public class GeneraterAction extends BaseAction { ...@@ -186,7 +186,7 @@ public class GeneraterAction extends BaseAction {
case LIST: // 列表 case LIST: // 列表
// 判断模板文件是否存在 // 判断模板文件是否存在
if (!FileUtil.exist(ParserUtil.buildTempletPath(column.getCategoryListUrl()))) { if (!FileUtil.exist(ParserUtil.buildTemplatePath(column.getCategoryListUrl()))) {
LOG.error("模板不存在:{}", column.getCategoryUrl()); LOG.error("模板不存在:{}", column.getCategoryUrl());
continue; continue;
} }
...@@ -244,7 +244,7 @@ public class GeneraterAction extends BaseAction { ...@@ -244,7 +244,7 @@ public class GeneraterAction extends BaseAction {
// 分类是列表 // 分类是列表
if (category.getCategoryType().equals(CategoryTypeEnum.LIST.toString())) { if (category.getCategoryType().equals(CategoryTypeEnum.LIST.toString())) {
// 判断模板文件是否存在 // 判断模板文件是否存在
if (!FileUtil.exist(ParserUtil.buildTempletPath(category.getCategoryListUrl())) || StringUtils.isEmpty(category.getCategoryListUrl())) { if (!FileUtil.exist(ParserUtil.buildTemplatePath(category.getCategoryListUrl())) || StringUtils.isEmpty(category.getCategoryListUrl())) {
LOG.error("模板不存在:{}", category.getCategoryUrl()); LOG.error("模板不存在:{}", category.getCategoryUrl());
continue; continue;
} }
......
...@@ -129,7 +129,7 @@ public class CategoryAction extends net.mingsoft.cms.action.BaseAction{ ...@@ -129,7 +129,7 @@ public class CategoryAction extends net.mingsoft.cms.action.BaseAction{
if(category.getId()==null) { if(category.getId()==null) {
return ResultData.build().error(); return ResultData.build().error();
} }
CategoryEntity _category = (CategoryEntity)categoryBiz.getEntity(Integer.parseInt(category.getId())); CategoryEntity _category = (CategoryEntity)categoryBiz.getById(category.getId());
return ResultData.build().success(_category); return ResultData.build().success(_category);
} }
......
...@@ -118,7 +118,7 @@ public class ContentAction extends net.mingsoft.cms.action.BaseAction{ ...@@ -118,7 +118,7 @@ public class ContentAction extends net.mingsoft.cms.action.BaseAction{
if(content.getId()==null) { if(content.getId()==null) {
return ResultData.build().error(); return ResultData.build().error();
} }
ContentEntity _content = (ContentEntity)contentBiz.getEntity(Integer.parseInt(content.getId())); ContentEntity _content = (ContentEntity)contentBiz.getById(content.getId());;
return ResultData.build().success(_content); return ResultData.build().success(_content);
} }
......
...@@ -347,30 +347,33 @@ public class MCmsAction extends net.mingsoft.cms.action.BaseAction { ...@@ -347,30 +347,33 @@ public class MCmsAction extends net.mingsoft.cms.action.BaseAction {
//获取栏目信息 //获取栏目信息
String typeId = null; String typeId = null;
String categoryIds = BasicUtil.getString("categoryIds"); String categoryIds = BasicUtil.getString("categoryIds");
List categoryIdList = CollectionUtil.newArrayList();
//List categoryIdList = CollectionUtil.newArrayList();
//当传递了栏目编号,但不是栏目集合 //当传递了栏目编号,但不是栏目集合
if (StringUtils.isNotBlank(categoryIds) && !categoryIds.contains(",")) { if (StringUtils.isNotBlank(categoryIds) && !categoryIds.contains(",")) {
typeId = categoryIds; typeId = categoryIds;
} else {
//取出所有的子栏目
String[] ids = categoryIds.split(",");
List<CategoryEntity> categoryList = categoryBiz.list(Wrappers.<CategoryEntity>lambdaQuery().ne(CategoryEntity::getCategoryType, CategoryTypeEnum.LINK.toString()));
categoryIdList = CollectionUtil.newArrayList(ids);
for(CategoryEntity c:categoryList) {
if(StringUtils.isNotEmpty(c.getParentids())) {
for(String id:ids) {
if(c.getParentids().indexOf(id)>-1) {
categoryIdList.add(c.getId());
break;
}
}
}
}
} }
// else {
// //取出所有的子栏目
// String[] ids = categoryIds.split(",");
// List<CategoryEntity> categoryList = categoryBiz.list(Wrappers.<CategoryEntity>lambdaQuery().ne(CategoryEntity::getCategoryType, CategoryTypeEnum.LINK.toString()));
//
// categoryIdList = CollectionUtil.newArrayList(ids);
// for(CategoryEntity c:categoryList) {
// if(StringUtils.isNotEmpty(c.getParentids())) {
// for(String id:ids) {
// if(c.getParentids().indexOf(id)>-1) {
// categoryIdList.add(c.getId());
// break;
// }
// }
// }
// }
// }
//重新组织 ID //重新组织 ID
categoryIds = StringUtils.join(categoryIdList, ","); //categoryIds = StringUtils.join(categoryIdList, ",");
//根据栏目确定自定义模型 //根据栏目确定自定义模型
......
...@@ -71,7 +71,7 @@ public class ContentAop extends BaseAop { ...@@ -71,7 +71,7 @@ public class ContentAop extends BaseAop {
if(content.getId()==null) { if(content.getId()==null) {
return pjp.proceed(); return pjp.proceed();
} }
content = (ContentEntity)contentBiz.getEntity(Integer.parseInt(content.getId())); content = contentBiz.getById(content.getId());
//如果文章不存在则直接发行 //如果文章不存在则直接发行
if(content == null){ if(content == null){
return pjp.proceed(); return pjp.proceed();
......
...@@ -439,6 +439,13 @@ public class CategoryEntity extends BaseEntity { ...@@ -439,6 +439,13 @@ public class CategoryEntity extends BaseEntity {
return this.id; return this.id;
} }
/**
* 获取栏目Id(标签使用)
*/
public Boolean getTypeleaf() {
return this.leaf; }
/** /**
* 获取栏目图片 (标签使用) * 获取栏目图片 (标签使用)
*/ */
......
...@@ -239,7 +239,7 @@ public class CmsParserUtil { ...@@ -239,7 +239,7 @@ public class CmsParserUtil {
} }
// 判断文件是否存在,若不存在弹出返回信息 // 判断文件是否存在,若不存在弹出返回信息
if (!FileUtil.exist(ParserUtil.buildTempletPath(columnUrl)) || categoryBean.getId() == null || categoryBean.getCategoryType() == null) { if (!FileUtil.exist(ParserUtil.buildTemplatePath(columnUrl)) || categoryBean.getId() == null || categoryBean.getCategoryType() == null) {
artId++; artId++;
continue; continue;
} }
......
...@@ -65,6 +65,11 @@ public class WebConfig implements WebMvcConfigurer { ...@@ -65,6 +65,11 @@ public class WebConfig implements WebMvcConfigurer {
*/ */
@Value("${ms.upload.mapping}") @Value("${ms.upload.mapping}")
private String uploadMapping; private String uploadMapping;
/**
* 上传路径映射
*/
@Value("${ms.diy.html-dir}")
private String htmlDir;
@Bean @Bean
public ActionInterceptor actionInterceptor() { public ActionInterceptor actionInterceptor() {
return new ActionInterceptor(); return new ActionInterceptor();
...@@ -88,7 +93,8 @@ public class WebConfig implements WebMvcConfigurer { ...@@ -88,7 +93,8 @@ public class WebConfig implements WebMvcConfigurer {
public void addResourceHandlers(ResourceHandlerRegistry registry) { public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler(uploadMapping).addResourceLocations(File.separator+uploadFloderPath+File.separator,"file:"+uploadFloderPath+File.separator,"classpath:/template/"); registry.addResourceHandler(uploadMapping).addResourceLocations(File.separator+uploadFloderPath+File.separator,"file:"+uploadFloderPath+File.separator,"classpath:/template/");
registry.addResourceHandler("/template/**").addResourceLocations(File.separator+template+File.separator,"file:"+template+File.separator,"classpath:/html/"); registry.addResourceHandler("/template/**").addResourceLocations(File.separator+template+File.separator,"file:"+template+File.separator,"classpath:/html/");
registry.addResourceHandler("/html/**").addResourceLocations("/html/","file:html/"); //注意这里的htmlDir资源不能使用File.separator替代"/",会导致Windows一键版访问失效
registry.addResourceHandler("/".concat(htmlDir).concat("/**")).addResourceLocations("/".concat(htmlDir).concat("/"),"file:".concat(htmlDir).concat("/"));
//三种映射方式 webapp下、当前目录下、jar内 //三种映射方式 webapp下、当前目录下、jar内
registry.addResourceHandler("/app/**").addResourceLocations("/app/","file:app/", "classpath:/app/"); registry.addResourceHandler("/app/**").addResourceLocations("/app/","file:app/", "classpath:/app/");
registry.addResourceHandler("/static/**").addResourceLocations("/static/","file:static/","classpath:/static/","classpath:/META-INF/resources/"); registry.addResourceHandler("/static/**").addResourceLocations("/static/","file:static/","classpath:/static/","classpath:/META-INF/resources/");
......
...@@ -4,4 +4,4 @@ spring: ...@@ -4,4 +4,4 @@ spring:
username: root username: root
password: root password: root
filters: wall,mergeStat filters: wall,mergeStat
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
\ No newline at end of file
...@@ -20,7 +20,7 @@ ms: ...@@ -20,7 +20,7 @@ ms:
manager: manager:
path: /ms #后台访问的路径,如:http://项目/ms/login.do,生产的时候建议修改 path: /ms #后台访问的路径,如:http://项目/ms/login.do,生产的时候建议修改
view-path: /WEB-INF/manager #后台视图层路径配置 view-path: /WEB-INF/manager #后台视图层路径配置
check-code: true #默认开启验证码验证,false验证码不验证 check-code: false #默认开启验证码验证,false验证码不验证
upload: upload:
enable-web: true #启用web层的上传 enable-web: true #启用web层的上传
...@@ -91,4 +91,4 @@ mybatis-plus: ...@@ -91,4 +91,4 @@ mybatis-plus:
db-config: db-config:
id-type: auto id-type: auto
configuration: configuration:
database-id: mysql database-id: mysql
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment