diff --git a/pom.xml b/pom.xml index 5da245d4..3e4cc33f 100644 --- a/pom.xml +++ b/pom.xml @@ -1,291 +1,258 @@  - - net.mingsoft - ms-pom - 1.0.0 - - - 4.0.0 - net.mingsoft - ms-mcms - 5.0.0 - ${project.groupId}:${project.artifactId} - ms-mcms tools Library - https://github.com/ming-soft/ms-mcms - - - The MIT License (MIT) - http://mit-license.org - - - - - mingsoft develop group - service@mingsoft.net - mingsoft - http://www.mingsoft.net - - + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + + net.mingsoft + ms-pom + 1.0.0 + + + 4.0.0 + net.mingsoft + ms-mcms + 5.0.0 + ${project.groupId}:${project.artifactId} + ms-mcms tools Library + https://github.com/ming-soft/ms-mcms + + + The MIT License (MIT) + http://mit-license.org + + + + + mingsoft develop group + service@mingsoft.net + mingsoft + http://www.mingsoft.net + + - - scm:git://github.com/ming-soft/ms-mcms.git - scm:git@github.com:ming-soft/ms-mcms.git - https://github.com/ming-soft/ms-mcms - - - - sonatype-nexus-snapshots - Sonatype Nexus snapshot repository - https://oss.sonatype.org/content/repositories/snapshots - - - sonatype-nexus-staging - Sonatype Nexus release repository - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - - - 1.8 - UTF-8 - - - - - - - - - - net.mingsoft - ms-mpeople - - - net.mingsoft - ms-upgrader - - - - - - src/main/java - - - src/main/webapp - - html/ - static/ - upload/ - templets/ - - - - src/main/resources - - - - - org.apache.maven.plugins - maven-jar-plugin - 2.6 - - - package - - jar - - - - - - - **/static/plugins/ - **/static/skin/ - **/application*.yml - **/Dockerfile - **/ehcache.xml - **/upgrade/ - **/*.java - - - - - org.apache.maven.plugins - maven-source-plugin - 2.2.1 - - - **/static/plugins/ - **/static/skin/ - **/application*.yml - **/Dockerfile - **/ehcache.xml - **/upgrade/ - **/config/ - **/MSApplication.java - **/MSServletInitializer.java - - - - - attach-sources - - jar-no-fork - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.1 - - ${java.version} - ${java.version} - ${project.build.sourceEncoding} - true - true - - - ${java.home}/lib/rt.jar:${java.home}/lib/jce.jar - - -Xlint:unchecked - - - - org.codehaus.plexus - plexus-compiler-eclipse - 2.1 - - - - - org.apache.maven.plugins - maven-eclipse-plugin - 2.8 - - - - .settings/org.eclipse.core.resources.prefs - - + scm:git://github.com/ming-soft/ms-mcms.git + scm:git@github.com:ming-soft/ms-mcms.git + https://github.com/ming-soft/ms-mcms + + + + sonatype-nexus-snapshots + Sonatype Nexus snapshot repository + https://oss.sonatype.org/content/repositories/snapshots + + + sonatype-nexus-staging + Sonatype Nexus release repository + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + + + 1.8 + UTF-8 + + + + + + + + + + net.mingsoft + ms-mpeople + + + net.mingsoft + ms-upgrader + + + + + + src/main/java + + + src/main/webapp + + html/ + static/ + upload/ + templets/ + + + + src/main/resources + + + + + org.apache.maven.plugins + maven-jar-plugin + 2.6 + + + package + + jar + + + + + + + **/static/plugins/ + **/static/skin/ + **/Dockerfile + **/ehcache.xml + **/upgrade/ + **/*.java + + + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + **/static/plugins/ + **/static/skin/ + **/application*.yml + **/Dockerfile + **/ehcache.xml + **/upgrade/ + **/config/ + **/MSApplication.java + **/MSServletInitializer.java + + + + + attach-sources + + jar-no-fork + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + ${java.version} + ${java.version} + ${project.build.sourceEncoding} + + + + org.apache.maven.plugins + maven-eclipse-plugin + 2.8 + + + + .settings/org.eclipse.core.resources.prefs + + =${project.build.sourceEncoding} ]]> - - - - - + + + + + - - maven-surefire-plugin - - -Xmx256m - - - - com.atlassian.maven.plugins - maven-clover2-plugin - 2.6.3 - - ${clover.license.file} - ${project.build.sourceEncoding} - true - - - - org.codehaus.mojo - findbugs-maven-plugin - 1.2 - - true - true - true - - + + maven-surefire-plugin + + -Xmx256m + + + + com.atlassian.maven.plugins + maven-clover2-plugin + 2.6.3 + + ${clover.license.file} + ${project.build.sourceEncoding} + true + + + + org.codehaus.mojo + findbugs-maven-plugin + 1.2 + + true + true + true + + - - org.apache.maven.plugins - maven-javadoc-plugin - 2.9.1 - - UTF-8 - UTF-8 - UTF-8 - ${java.home}/../bin/javadoc - -Xdoclint:none - - - - attach-javadocs - - jar - - - - - - org.apache.maven.plugins - maven-war-plugin - 2.6 - - - - src/main/webapp/WEB-INF - WEB-INF - true - - **/*.xml - - - web.xml - - - - true - */web.xml,static - false - ms.install,html/,static/,temp,upgrader,WEB-INF/web.xml,WEB-INF/lib/,templets/,upload/,WEB-INF/classes/*.xml,WEB-INF/classes/*.properties,*.sh,WEB-INF/classes/net/mingsoft/config/,WEB-INF/classes/net/mingsoft/*.class - - - - org.apache.maven.plugins - maven-release-plugin - - -Dgpg.passphrase=${gpg.passphrase} - - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.7 - true - - sonatype-nexus-staging - https://oss.sonatype.org/ - true - - - - org.apache.maven.plugins - maven-gpg-plugin - 1.5 - - - sign-artifacts - verify - - sign - - - - - - compile + + org.apache.maven.plugins + maven-javadoc-plugin + 2.9.1 + + UTF-8 + UTF-8 + UTF-8 + ${java.home}/../bin/javadoc + -Xdoclint:none + + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-war-plugin + 2.6 + + + + src/main/webapp/WEB-INF + WEB-INF + true + + **/*.xml + + + web.xml + + + + true + */web.xml,static + false + + ms.install,html/,static/,temp,upgrader,WEB-INF/web.xml,WEB-INF/lib/,templets/,upload/,WEB-INF/classes/*.xml,WEB-INF/classes/*.properties,*.sh,WEB-INF/classes/net/mingsoft/config/,WEB-INF/classes/net/mingsoft/*.class + + + + + org.apache.maven.plugins + maven-release-plugin + + -Dgpg.passphrase=${gpg.passphrase} + + - ms-mcms - - \ No newline at end of file + + compile + + ms-mcms + + diff --git a/src/main/java/net/mingsoft/cms/action/GeneraterAction.java b/src/main/java/net/mingsoft/cms/action/GeneraterAction.java index b02df132..ab64edd6 100644 --- a/src/main/java/net/mingsoft/cms/action/GeneraterAction.java +++ b/src/main/java/net/mingsoft/cms/action/GeneraterAction.java @@ -24,7 +24,6 @@ package net.mingsoft.cms.action; 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; @@ -52,12 +51,12 @@ import java.util.ArrayList; import java.util.List; /** - * + * * @ClassName: GeneraterAction * @Description:TODO 生成器 * @author: 铭飞开发团队 * @date: 2018年1月31日 下午2:52:07 - * + * * @Copyright: 2018 www.mingsoft.net Inc. All rights reserved. */ @Controller("cmsGenerater") @@ -92,7 +91,7 @@ public class GeneraterAction extends BaseAction { /** * 更新主页 - * + * * @return */ @RequestMapping("/index") @@ -102,7 +101,7 @@ public class GeneraterAction extends BaseAction { /** * 生成主页 - * + * * @param request * @param response */ @@ -114,7 +113,7 @@ public class GeneraterAction extends BaseAction { String tmpFileName = request.getParameter("url"); // 生成后的文件名称 String generateFileName = request.getParameter("position"); - + // 获取文件所在路径 首先判断用户输入的模版文件是否存在 if (!FileUtil.exist(ParserUtil.buildTempletPath())) { this.outJson(response, false, getResString("templet.file")); @@ -128,12 +127,12 @@ public class GeneraterAction extends BaseAction { } } } - + /** * 生成列表的静态页面 - * + * * @param request * @param response * @param CategoryId @@ -194,7 +193,7 @@ public class GeneraterAction extends BaseAction { /** * 根据栏目id更新所有的文章 - * + * * @param request * @param response * @param columnId @@ -219,12 +218,12 @@ public class GeneraterAction extends BaseAction { this.outJson(response, false); } } - + /** * 用户预览主页 - * + * * @param request * @return */ @@ -236,4 +235,4 @@ public class GeneraterAction extends BaseAction { + File.separator + position + ParserUtil.HTML_SUFFIX; return "redirect:" + indexPosition; } -} \ No newline at end of file +} diff --git a/src/main/java/net/mingsoft/cms/dao/ICategoryDao.xml b/src/main/java/net/mingsoft/cms/dao/ICategoryDao.xml index a5bc84f3..3763ba70 100644 --- a/src/main/java/net/mingsoft/cms/dao/ICategoryDao.xml +++ b/src/main/java/net/mingsoft/cms/dao/ICategoryDao.xml @@ -174,7 +174,7 @@ and ( - CATEGORY_PARENT_ID like '%${categoryParentId}%' + find_in_set(#{categoryParentId},CATEGORY_PARENT_ID) @@ -237,4 +237,4 @@ order by id desc - \ No newline at end of file + diff --git a/src/main/java/net/mingsoft/cms/resources/resources.properties b/src/main/java/net/mingsoft/cms/resources/resources.properties index 61730331..4bf15c7b 100644 --- a/src/main/java/net/mingsoft/cms/resources/resources.properties +++ b/src/main/java/net/mingsoft/cms/resources/resources.properties @@ -33,3 +33,4 @@ category.id=\u6240\u5C5E\u680F\u76EE content.sort=\u81EA\u5B9A\u4E49\u987A\u5E8F category.diy.url=\u81EA\u5B9A\u4E49\u94FE\u63A5 content.keyword=\u5173\u952E\u5B57 +templet.file=\u672A\u627E\u5230\u6A21\u677F\u6587\u4EF6 diff --git a/src/main/java/net/mingsoft/cms/resources/resources_zh_CN.properties b/src/main/java/net/mingsoft/cms/resources/resources_zh_CN.properties index 61730331..4bf15c7b 100644 --- a/src/main/java/net/mingsoft/cms/resources/resources_zh_CN.properties +++ b/src/main/java/net/mingsoft/cms/resources/resources_zh_CN.properties @@ -33,3 +33,4 @@ category.id=\u6240\u5C5E\u680F\u76EE content.sort=\u81EA\u5B9A\u4E49\u987A\u5E8F category.diy.url=\u81EA\u5B9A\u4E49\u94FE\u63A5 content.keyword=\u5173\u952E\u5B57 +templet.file=\u672A\u627E\u5230\u6A21\u677F\u6587\u4EF6 diff --git a/src/main/webapp/WEB-INF/manager/cms/generate/index.ftl b/src/main/webapp/WEB-INF/manager/cms/generate/index.ftl index 45257583..3b4a4a2c 100644 --- a/src/main/webapp/WEB-INF/manager/cms/generate/index.ftl +++ b/src/main/webapp/WEB-INF/manager/cms/generate/index.ftl @@ -128,7 +128,7 @@ homeLoading:false, articleLoading:false, columnLoading:false, - template:'index.htm',//主题模板 + template:'',//主题模板 templateOptions:[], position:'index', //位置 contentSection:'0', //文章栏目 @@ -205,6 +205,12 @@ var that = this; ms.http.get(ms.manager+'/template/queryTemplateFileForColumn.do', {pageSize:99999}).then(function (data) { that.templateOptions = data.data; + //寻找主页 + var template = that.templateOptions.find(function (x) { + return x.indexOf("index")!=-1||x.indexOf("default")!=-1; + }) + //没有就找其他的 + that.template = template||(that.templateOptions.length>0?that.templateOptions[0]:""); }).catch(function (err) { console.log(err); }); @@ -702,4 +708,4 @@ .el-date-editor{ width: 100%; } - \ No newline at end of file + diff --git a/src/main/webapp/static/ms-admin/5.0.0/images/1577692394350.jpg b/src/main/webapp/static/ms-admin/5.0.0/images/1577692394350.jpg new file mode 100644 index 00000000..c9c79e6f Binary files /dev/null and b/src/main/webapp/static/ms-admin/5.0.0/images/1577692394350.jpg differ diff --git a/src/main/webapp/static/ms-admin/5.0.0/images/1577694374686.png b/src/main/webapp/static/ms-admin/5.0.0/images/1577694374686.png new file mode 100644 index 00000000..c985e30b Binary files /dev/null and b/src/main/webapp/static/ms-admin/5.0.0/images/1577694374686.png differ