Commit 6201a48d authored by 信 赵's avatar 信 赵
Browse files

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/main/java/net/mingsoft/cms/action/web/MCmsAction.java
#	src/main/java/net/mingsoft/cms/biz/IArticleBiz.java
#	src/main/java/net/mingsoft/cms/biz/impl/ArticleBizImpl.java
#	src/main/java/net/mingsoft/cms/dao/IArticleDao.java
#	src/main/java/net/mingsoft/cms/dao/IArticleDao.xml
#	src/main/java/net/mingsoft/cms/resources/resources_zh_CN.properties
parents dfad56af 2d19a084
# 铭飞业务系统基础开发平台
当前版本:4.7.0 <br/>
铭飞MS官网:http://ms.mingsoft.net<br/>
官网同时提供一键运行版本下载,请步移官网....<br/>
QQ交流群号:[![加入QQ群](https://img.shields.io/badge/三群-242805203-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)
很多人说铭飞MCMS是大天朝国唯一完整开源的J2EE系统!团队希望看到更多的优秀好用的开源系统,我们一直会努力下去!
# 开源说明
* 系统100%开源
* 模块化开发模式,铭飞所开发的模块都发布到了maven中央库。 可以通过pom.xml文件的方式拉取源代码
```
<dependency>
<groupId>net.mingsoft</groupId>
<artifactId>模块</artifactId>
<version>版本号</version>
<classifier>sources</classifier>
<scope>provided</scope>
</dependency>
```
# 商用使用
基于[MIT](https://www.oschina.net/question/12_2829)开源协议,可直接商用无需授权,但请尊重开源精神不要去掉代码中铭飞的注释和版权信息
# 特点
* 免费完整开源:基于MIT协议,源代码完全开源,无商业限制,MS开发团队承诺将MCMS内容系统永久完整开源;<br/>
* 标签化建站:不需要专业的后台开发技能,只要使用系统提供的标签,就能轻松建设网站;<br/>
* html静态化:系统支持全站静态化;<br/>
* 跨终端:站点同时支持PC与移动端访问,同时会自动根据访问的终端切换到对应的界面,数据由系统统一管理;<br/>
* 海量模版:铭飞通过MStore(MS商城)分享更多免费、精美的企业网站模版,降低建站成本;<br/>
* 丰富插件:为了让MCms适应更多的业务场景,在MStore用户可以下载对应的插件,如:站群插件、微信插件、商城插件等;<br/>
* 每月更新:铭飞团队承诺每月28日为系统升级日,分享更多好用等模版与插件;<br/>
* 文档丰富:为了让用户更快速的使用MCms系统进行开发,铭飞团队持续更新开发相关文档,如标签文档、使用文档、视频教程等;<br/>
# 面向对象
* 企 业:帮助创立初期的公司或团队快速搭建产品的技术平台,加快公司项目开发进度;
* 开发者:帮助开发者快速完成承接外包的项目,避免从零搭建系统;
* 学习者:初学JAVA的同学可以下载源代码来进行学习交流;
# 快速体验
* 将项目源码导入eclipse;
* 创建数据库db-mcms-open,注意:数据库使用utf-8编码,导入doc/db-mcms-open-版本号.sql,如果升级现有系统请使用*-up-*.sql升级,如果导入了系统对应的完整版SQL,sql升级补丁不需要重复导入;
* 修改src\main\resources\application-dev.yml文件中的数据库设置参数;
* 首先先访问后台地址:http://ip|域名/项目发布名/ms/login.do,进入后台点击内容管理->静态化菜单,进行"生成主页","生成栏目","生成文章"操作 (注意!!!)
* 管理员账号,用户名:msopen 密码:msopen
# 开发环境
建议开发者使用以下环境,这样避免版本带来的问题
* IDE:eclipse、idea
* DB:Mysql5.7
* JDK:JAVA 8
* WEB:Tomcat8
# 运行环境
* WEB服务器:Weblogic、Tomcat、WebSphere、JBoss、Jetty 等
* 数据库服务器:Mysql5.7
* 操作系统:Windows、Linux、Unix 等
### 后端框架
| 技术 | 名称 | 官网 |
| :--- | :--- | :--- |
| Spring Framework | 容器 | [http://projects.spring.io/spring-framework](http://projects.spring.io/spring-framework/) |
| Spring Boot | MVC框架 | [https://spring.io/projects/spring-boot](https://spring.io/projects/spring-boot) |
| Apache Shiro | 安全框架 | [http://shiro.apache.org](http://shiro.apache.org/) |
| Spring session | 分布式Session管理 | [http://projects.spring.io/spring-session](http://projects.spring.io/spring-session) |
| MyBatis | ORM框架 | [http://www.mybatis.org](http://www.mybatis.org/mybatis-3/zh/index.html) |
| Freemarker | 视图框架 | [http://freemarker.foofun.cn](http://freemarker.foofun.cn/) |
| PageHelper | MyBatis分页插件 | [http://git.oschina.net/free/Mybatis\_PageHelper](http://git.oschina.net/free/Mybatis_PageHelper) |
| Log4J | 日志组件 | [http://logging.apache.org](http://logging.apache.org) |
| Maven | 项目构建 | [http://maven.apache.org](http://maven.apache.org/) |
| Elasticsearch | 分布式搜索引擎 | [https://www.elastic.co](https://www.elastic.co/) |
| Redis | 分布式缓存数据库 | [https://redis.io](https://redis.io) |
| hutool | 工具类 | [http://hutool.mydoc.io](http://hutool.mydoc.io) |
### 前端框架
| 技术 | 名称 | 官网 |
| :--- | :--- | :--- |
| vue| 函式库 | [https://cn.vuejs.org//](https://cn.vuejs.org//) |
| element ui| UI库 | [https://element.eleme.cn/2.0/#/zh-CN](https://element.eleme.cn/2.0/#/zh-CN) |
| jQuery | 函式库 | [http://jquery.com/](http://jquery.com/) |
| Bootstrap | 前端框架 | [http://getbootstrap.com/](http://getbootstrap.com/) |
| Bootstrap-table | Bootstrap数据表格 | [http://bootstrap-table.wenzhixin.net.cn/](http://bootstrap-table.wenzhixin.net.cn/) |
| BootstrapValidator | 表单验证 | [http://bootstrapvalidator.com/](http://bootstrapvalidator.com) |
| Font-awesome | 字体图标 | [http://fontawesome.io/](http://fontawesome.io/) |
| Waves | 点击效果插件 | [https://github.com/fians/Waves/](https://github.com/fians/Waves) |
| zTree | 树插件 | [http://www.treejs.cn/v3/](http://www.treejs.cn/v3/) |
| Select2 | 选择框插件 | [https://github.com/select2/select2](https://github.com/select2/select2) |
| Vue | MVVM框架 | [https://cn.vuejs.org/](https://cn.vuejs.org/) |
| AmazeUI | 移动端UI | [http://amazeui.org/](http://amazeui.org/) |
| Plupload | 上传控件 | [http://www.plupload.com/](http://www.plupload.com/) |
| freemarker | 模板引擎 | [http://freemarker.foofun.cn/toc.html](http://freemarker.foofun.cn/toc.html) |
| validator | 验证库 | [https://github.com/chriso/validator.js](https://github.com/chriso/validator.js) |
| animate | 动画 | [http://daneden.github.io/animate.css/](http://daneden.github.io/animate.css/) |
| icon | 矢量小图标\(待更新\) | [http://ms.mingsoft.net/html/86//6048/index.html](http://ms.mingsoft.net/html/86//6048/index.html) |
# 系统结构
![输入图片说明](http://doc.ms.mingsoft.net/dev-guide/%E9%93%AD%E9%A3%9E%E5%BA%95%E5%B1%82%E6%95%B4%E4%BD%93%E7%BB%93%E6%9E%84%E5%9B%BE/%E6%95%B4%E4%BD%93%E7%BB%93%E6%9E%84.png "铭飞系统结构")
# 文件说明
* doc 项目文档文件夹,里面有数据库文件
* src/main/java java源代码
* src/main/resources 项目的资源配置文件
* src/main/webapp
* src/main/webapp/static 静态资源文件,如:js、css、image、等第三方前端插件库
* src/main/webapp/html 生成的静态页面,实际项目需要删除,只是提供给开发者快速预览生成后的静态页面
* src/main/webapp/templets 模版文件夹
* src/main/webapp/upload 上传资源文件夹
* src/main/webapp/WEB-INF/manager 后端视图页面
* LICENSE 项目协议说明
* README.md 项目说明文档
* pom.xml 依赖配置文件
# 代码部署与常见问题
* 铭飞MCms 部署视频 http://ms.mingsoft.net/mbbs/13988/detail.do
* MCms环境配置常见问题 http://ms.mingsoft.net/mbbs/13000/detail.do
* MStore使用方式:http://ms.mingsoft.net/mbbs/13008/detail.do
# 文档
* MCms标签手册 http://doc.ms.mingsoft.net/mcms-tag-guide
* 快速开发手册 http://doc.ms.mingsoft.net/dev-guide/
# 系统美图
<table>
<tr>
<td><img src="https://images.gitee.com/uploads/images/2019/0523/121402_82521059_1795833.png"/></td>
<td><img src="https://images.gitee.com/uploads/images/2019/0523/120809_88b6fcd4_1795833.png"/></td>
</tr>
<tr>
<td><img src="https://images.gitee.com/uploads/images/2019/0523/120836_8a943ad5_1795833.png"/></td>
<td><img src="https://images.gitee.com/uploads/images/2019/0523/120910_ce119f66_1795833.png"/></td>
</tr>
<tr>
<td><img src="https://images.gitee.com/uploads/images/2019/0523/120927_8a3f93e3_1795833.png"/></td>
<td><img src="https://images.gitee.com/uploads/images/2019/0523/120939_7e5281db_1795833.png"/></td>
</tr>
<tr>
<td><img src="https://images.gitee.com/uploads/images/2019/0523/120951_9d3a50b2_1795833.png"/></td>
<td><img src="https://images.gitee.com/uploads/images/2019/0523/121003_9c68e090_1795833.png"/></td>
</tr>
<tr>
<td><img src="https://images.gitee.com/uploads/images/2019/0523/121020_34c8e0ab_1795833.png"/></td>
<td><img src="https://images.gitee.com/uploads/images/2019/0523/121033_b425e406_1795833.png"/></td>
</tr>
<tr>
<td><img src="https://images.gitee.com/uploads/images/2019/0523/121044_41cc0d00_1795833.png"/></td>
<td><img src="https://images.gitee.com/uploads/images/2019/0523/121059_48b4cd7b_1795833.png"/></td>
</tr>
<tr>
<td><img src="https://images.gitee.com/uploads/images/2019/0523/121112_8581de9a_1795833.png"/></td>
<td><img src="https://images.gitee.com/uploads/images/2019/0523/121122_8b513dd1_1795833.png"/></td>
</tr>
</table>
<p align="center">
<a href="https://ms.mingsoft.net/"><img src="http://ms.mingsoft.net/templets/1/ms/images/logo-blue.png" ></a>
</p>
<p align="center">
<strong>价值源自分享</strong>
</p>
<p align="center">
<a target="_blank" href="https://search.maven.org/search?q=ms-mcms">
<img src="https://img.shields.io/maven-central/v/net.mingsoft/ms-mcms.svg?label=Maven%20Central" />
</a>
<a target="_blank" href="hhttps://baike.baidu.com/item/MIT%E8%AE%B8%E5%8F%AF%E8%AF%81/6671281?fr=aladdin">
<img src="https://img.shields.io/:license-MIT-blue.svg" />
</a>
<a target="_blank" href="https://www.oracle.com/technetwork/java/javase/downloads/index.html">
<img src="https://img.shields.io/badge/JDK-8+-green.svg" />
</a>
<a target="_blank" href="https://gitee.com/mingSoft/MCMS/stargazers">
<img src="https://gitee.com/mingSoft/MCMS/badge/star.svg?theme=dark" alt='gitee star'/>
</a>
<a target="_blank" href='https://github.com/ming-soft/mcms'>
<img src="https://img.shields.io/github/stars/ming-soft/mcms.svg?style=social" alt="github star"/>
</a>
</p>
<p align="center">
<a href="https://ms.mingsoft.net" target="_blank">铭飞平台</a>
<a href="http://demo.cms.mingsoft.net/ms/login.do" target="_blank">在线演示</a>
<a href="http://doc.ms.mingsoft.net/plugs-cms/" target="_blank">在线使用手册</a>
<a href="https://mingsoft.ke.qq.com/?tuin=383187f3#tab=1&category=-1" target="_blank">腾讯课堂在线视频</a><br/>
<a href="https://ke.qq.com/course/478498" target="_blank">代码生成器视频教程</a><br/>
<a href="http://file.mingsoft.net/ms-runner-5.0.0.zip" target="_blank">Windows一键运行版本\Linux一键运行版本</a>
</p>
-------------------------------------------------------------------------------
很多人说铭飞是大天朝国唯一完整开源的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)
# 开源说明
* 系统100%开源
* 模块化开发模式,铭飞所开发的模块都发布到了maven中央库。 可以通过pom.xml文件的方式拉取源代码
```
<dependency>
<groupId>net.mingsoft</groupId>
<artifactId>模块</artifactId>
<version>版本号</version>
<classifier>sources</classifier>
<scope>provided</scope>
</dependency>
```
# 商用
基于[MIT](https://www.oschina.net/question/12_2829)开源协议,可直接商用无需授权,但请尊重开源精神不要去掉代码中铭飞的注释和版权信息
# 特点
* 免费完整开源:基于MIT协议,源代码完全开源,无商业限制,MS开发团队承诺将MCMS内容系统永久完整开源;<br/>
* 标签化建站:不需要专业的后台开发技能,只要使用系统提供的标签,就能轻松建设网站;<br/>
* html静态化:系统支持全站静态化;<br/>
* 跨终端:站点同时支持PC与移动端访问,同时会自动根据访问的终端切换到对应的界面,数据由系统统一管理;<br/>
* 海量模版:铭飞通过MStore(MS商城)分享更多免费、精美的企业网站模版,降低建站成本;<br/>
* 丰富插件:为了让MCms适应更多的业务场景,在MStore用户可以下载对应的插件,如:站群插件、微信插件、商城插件等;<br/>
* 每月更新:铭飞团队承诺每月28日为系统升级日,分享更多好用等模版与插件;<br/>
* 文档丰富:为了让用户更快速的使用MCms系统进行开发,铭飞团队持续更新开发相关文档,如标签文档、使用文档、视频教程等;<br/>
# 面向对象
* 企 业:帮助创立初期的公司或团队快速搭建产品的技术平台,加快公司项目开发进度;
* 开发者:帮助开发者快速完成承接外包的项目,避免从零搭建系统;
* 学习者:初学JAVA的同学可以下载源代码来进行学习交流;
# 开发环境
建议开发者使用以下环境,这样避免版本带来的问题
* Windows、Linux
* Eclipse、Idea
* Mysql≧5.7
* JDK≧8
* Tomcat≧8
# 快速体验(导入到 Eclipse 或 IDEA)
1、检出源代码:
git clone https://gitee.com/mingSoft/MCMS.git<br/>
2、导入项目<br/>
* Eclipse导入,菜单 File -> Import,然后选择 Maven -> Existing Maven Projects,点击 Next> 按钮,选择检出的项目MCMS文件夹,然后点击 Finish 按钮,即可成功导入
* IDEA导入,点击 Import Project,选择 pom.xml 文件,点击 Next 按钮,选择 Import Maven projects automatically 复选框,然后一直点击 Next 按钮,直到点击 Finish 按钮,即可成功导入<br/>
4、Eclipse(IDEA)会自动加载 Maven 依赖包,初次加载会比较慢(根据自身网络情况而定),若工程上有小叉号,请打开 Problems 窗口,查看具体错误内容,直到无错误为止<br/>
5、创建数据库db-mcms-open(数据库使用utf-8编码),导入doc/db-mcms-open-版本号.sql,如果升级现有系统请使用*-up-*.sql升级,如果导入了系统对应的完整版SQL,sql升级补丁不需要重复导入;<br/>
6、修改src\main\resources\application-dev.yml文件中的数据库设置参数;<br/>
7、运行MSApplication.java main方法<br/>
8、首先先访问后台地址:http://ip|域名/项目发布名/ms/login.do,管理员账号,用户名:msopen 密码:msopen,进入后台点击内容管理->静态化菜单,进行"生成主页","生成栏目","生成文章"操作一遍 (注意!!!是后台登录界面,不是会员中心登录界面)
# 技术选型
## 后端框架
| 技术 | 名称 | 官网 |
| :--- | :--- | :--- |
| Spring Framework | 容器 | [http://projects.spring.io/spring-framework](http://projects.spring.io/spring-framework/) |
| Spring Boot | MVC框架 | [https://spring.io/projects/spring-boot](https://spring.io/projects/spring-boot) |
| Apache Shiro | 安全框架 | [http://shiro.apache.org](http://shiro.apache.org/) |
| Spring session | 分布式Session管理 | [http://projects.spring.io/spring-session](http://projects.spring.io/spring-session) |
| MyBatis | ORM框架 | [http://www.mybatis.org](http://www.mybatis.org/mybatis-3/zh/index.html) |
| Freemarker | 视图框架 | [http://freemarker.foofun.cn](http://freemarker.foofun.cn/) |
| PageHelper | MyBatis分页插件 | [http://git.oschina.net/free/Mybatis\_PageHelper](http://git.oschina.net/free/Mybatis_PageHelper) |
| Log4J | 日志组件 | [http://logging.apache.org](http://logging.apache.org) |
| Maven | 项目构建 | [http://maven.apache.org](http://maven.apache.org/) |
| Elasticsearch | 分布式搜索引擎 | [https://www.elastic.co](https://www.elastic.co/) |
| Redis | 分布式缓存数据库 | [https://redis.io](https://redis.io) |
| hutool | 工具类 | [http://hutool.mydoc.io](http://hutool.mydoc.io) |
## 前端框架
| 技术 | 名称 | 官网 |
| :--- | :--- | :--- |
| vue| 函式库 | [https://cn.vuejs.org//](https://cn.vuejs.org//) |
| element ui| UI库 | [https://element.eleme.cn/2.0/#/zh-CN](https://element.eleme.cn/2.0/#/zh-CN) |
| jQuery | 函式库 | [http://jquery.com/](http://jquery.com/) |
| Bootstrap | 前端框架 | [http://getbootstrap.com/](http://getbootstrap.com/) |
| Bootstrap-table | Bootstrap数据表格 | [http://bootstrap-table.wenzhixin.net.cn/](http://bootstrap-table.wenzhixin.net.cn/) |
| BootstrapValidator | 表单验证 | [http://bootstrapvalidator.com/](http://bootstrapvalidator.com) |
| Font-awesome | 字体图标 | [http://fontawesome.io/](http://fontawesome.io/) |
| Waves | 点击效果插件 | [https://github.com/fians/Waves/](https://github.com/fians/Waves) |
| zTree | 树插件 | [http://www.treejs.cn/v3/](http://www.treejs.cn/v3/) |
| Select2 | 选择框插件 | [https://github.com/select2/select2](https://github.com/select2/select2) |
| Vue | MVVM框架 | [https://cn.vuejs.org/](https://cn.vuejs.org/) |
| AmazeUI | 移动端UI | [http://amazeui.org/](http://amazeui.org/) |
| Plupload | 上传控件 | [http://www.plupload.com/](http://www.plupload.com/) |
| freemarker | 模板引擎 | [http://freemarker.foofun.cn/toc.html](http://freemarker.foofun.cn/toc.html) |
| validator | 验证库 | [https://github.com/chriso/validator.js](https://github.com/chriso/validator.js) |
| animate | 动画 | [http://daneden.github.io/animate.css/](http://daneden.github.io/animate.css/) |
| icon | 矢量小图标\(待更新\) | [http://ms.mingsoft.net/html/86//6048/index.html](http://ms.mingsoft.net/html/86//6048/index.html) |
# 文件说明
* doc 项目文档文件夹,里面有数据库文件
* src/main/java java源代码
* src/main/resources 项目的资源配置文件
* src/main/webapp
* src/main/webapp/static 静态资源文件,如:js、css、image、等第三方前端插件库
* src/main/webapp/html 生成的静态页面,实际项目需要删除,只是提供给开发者快速预览生成后的静态页面
* src/main/webapp/templets 模版文件夹
* src/main/webapp/upload 上传资源文件夹
* src/main/webapp/WEB-INF/manager 后端视图页面
* LICENSE 项目协议说明
* README.md 项目说明文档
* pom.xml 依赖配置文件
# 文档
* MCms标签手册 http://doc.ms.mingsoft.net/mcms-tag-guide
* 快速开发手册 http://doc.ms.mingsoft.net/dev-guide/
# 软件截图
<table>
<tr>
<td><img src="https://images.gitee.com/uploads/images/2019/0523/121402_82521059_1795833.png"/></td>
<td><img src="https://images.gitee.com/uploads/images/2019/0523/120836_8a943ad5_1795833.png"/></td>
</tr>
<tr>
<td><img src="https://images.gitee.com/uploads/images/2019/0523/120927_8a3f93e3_1795833.png"/></td>
<td><img src="https://images.gitee.com/uploads/images/2019/0523/120939_7e5281db_1795833.png"/></td>
</tr>
<tr>
<td><img src="https://images.gitee.com/uploads/images/2019/0523/120951_9d3a50b2_1795833.png"/></td>
<td><img src="https://images.gitee.com/uploads/images/2019/0523/121003_9c68e090_1795833.png"/></td>
</tr>
<tr>
<td><img src="https://images.gitee.com/uploads/images/2019/0523/121020_34c8e0ab_1795833.png"/></td>
<td><img src="https://images.gitee.com/uploads/images/2019/0523/121033_b425e406_1795833.png"/></td>
</tr>
<tr>
<td><img src="https://images.gitee.com/uploads/images/2019/0523/121044_41cc0d00_1795833.png"/></td>
<td><img src="https://images.gitee.com/uploads/images/2019/0523/121059_48b4cd7b_1795833.png"/></td>
</tr>
<tr>
<td><img src="https://images.gitee.com/uploads/images/2019/0523/121112_8581de9a_1795833.png"/></td>
<td><img src="https://images.gitee.com/uploads/images/2019/0523/121122_8b513dd1_1795833.png"/></td>
</tr>
</table>
# 铭飞平台
做开源我们是业余的,写代码我们是认真的。研发产品的路上我们一直在探索、一直在学习、一直在用心投入,希望能给更多的企业与开发者提供一些更有价值的服务。
## 项目管理
<table>
<tr>
<td><img src="http://ms.mingsoft.net/upload/1/article/1572421127803.gif"/></td>
</tr>
<tr>
<td><img src="http://ms.mingsoft.net/upload/1/article/1572421308885.gif"/></td>
</tr>
</table>
## 代码生成器
<table>
<tr>
<td><img src="http://ms.mingsoft.net/upload/1/article/1572419454270.gif"/></td>
</tr>
<tr>
<td><img src="http://ms.mingsoft.net/upload/1/article/1572419347761.gif"/></td>
</tr>
</table>
ALTER TABLE `model` ADD COLUMN `is_child` varchar(255) COMMENT '扩展业务标记' AFTER `model_parent_ids`;
ALTER TABLE `mdiy_dict` ADD COLUMN `is_child` varchar(255) COMMENT '扩展业务标记' AFTER `dict_description`;
ALTER TABLE `role` MODIFY COLUMN `app_id` int(11) COMMENT '应用编号' AFTER `role_managerid`;
ALTER TABLE `mdiy_dict` MODIFY COLUMN `dict_value` varchar(100) COMMENT '数据值' AFTER `app_id`;
ALTER TABLE `people` ADD COLUMN `people_ip` varchar(100) COMMENT '用户登录ip' AFTER `people_maillcheck`;
DROP TABLE IF EXISTS `file`;
CREATE TABLE `file` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '文件编号',
`category_id` int(11) DEFAULT NULL COMMENT '文件分类编号',
`app_id` int(11) DEFAULT NULL COMMENT 'APP编号',
`file_name` varchar(200) DEFAULT NULL COMMENT '文件名称',
`file_url` varchar(500) DEFAULT NULL COMMENT '文件链接',
`file_size` int(11) DEFAULT NULL COMMENT '文件大小',
`file_json` varchar(500) DEFAULT NULL COMMENT '文件详情Json数据',
`file_type` varchar(50) DEFAULT NULL COMMENT '文件类型:图片、音频、视频等',
`is_child` varchar(50) DEFAULT NULL COMMENT '子业务',
`update_date` datetime DEFAULT NULL COMMENT '更新时间',
`update_by` int(11) DEFAULT NULL COMMENT '更新者',
`create_by` int(11) DEFAULT NULL COMMENT '创建者',
`create_date` datetime DEFAULT NULL COMMENT '创建时间',
`del` int(1) DEFAULT NULL COMMENT '删除标记',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='基础文件表';
DROP TABLE IF EXISTS `mdiy_tag`;
CREATE TABLE `mdiy_tag` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`tag_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '标签名称',
`tag_type` int(1) DEFAULT NULL COMMENT '标签类型',
`tag_description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '描述',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 14 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '标签' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of mdiy_tag
-- ----------------------------
INSERT INTO `mdiy_tag` VALUES (3, 'arclist', 3, '文章列表');
INSERT INTO `mdiy_tag` VALUES (4, 'channel', 3, '通用栏目');
INSERT INTO `mdiy_tag` VALUES (5, 'global', 2, '全局');
INSERT INTO `mdiy_tag` VALUES (7, 'field', 3, '文章内容');
INSERT INTO `mdiy_tag` VALUES (8, 'pre', 0, '文章上一篇');
INSERT INTO `mdiy_tag` VALUES (9, 'page', 2, '通用分页');
INSERT INTO `mdiy_tag` VALUES (10, 'next', 0, '文章下一篇');
INSERT INTO `mdiy_tag` VALUES (12, 'prclist', 3, '商品列表');
INSERT INTO `mdiy_tag` VALUES (13, 'goods', 3, '商品详情');
-- ----------------------------
-- Table structure for mdiy_tag_sql
-- ----------------------------
DROP TABLE IF EXISTS `mdiy_tag_sql`;
CREATE TABLE `mdiy_tag_sql` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`tag_id` int(11) NOT NULL COMMENT '自定义标签编号',
`tag_sql` text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '自定义sql支持ftl写法',
`sort` int(11) DEFAULT NULL COMMENT '排序升序',
PRIMARY KEY (`id`) USING BTREE,
INDEX `fk_mdiy_tag_id`(`tag_id`) USING BTREE,
CONSTRAINT `mdiy_tag_sql_ibfk_1` FOREIGN KEY (`tag_id`) REFERENCES `mdiy_tag` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE = InnoDB AUTO_INCREMENT = 15 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '标签对应多个sql语句' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of mdiy_tag_sql
-- ----------------------------
INSERT INTO `mdiy_tag_sql` VALUES (5, 3, '<#assign _typeid=\"\"/>\r\n<#if column?? && column.categoryId??>\r\n <#assign _typeid=\"${column.categoryId}\">\r\n</#if>\r\n<#if typeid??>\r\n <#assign _typeid=\"${typeid}\">\r\n</#if>\r\nSELECT\r\n basic_id AS id,\r\n @rownum := @rownum + 1 AS `index`,\r\n LEFT (basic_title, ${titlelen ?default(40)}) AS title,\r\n basic_title AS fulltitle,\r\n article_author AS author,\r\n article_source AS source,\r\n article_content AS content,\r\n category.category_title AS typename,\r\n category.category_id AS typeid,\r\n category.category_smallimg AS typelitpic,\r\n <#--列表页动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\"/${modelName}/list.do?typeid=\", category.category_id) as typelink,\r\n <#else>\r\n (SELECT \"index.html\") AS typelink,\r\n </#if>\r\n basic.basic_thumbnails AS litpic,\r\n <#--内容页动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\"/${modelName}/view.do?id=\", basic_id) as link,\r\n <#else>\r\n cms_article.article_url AS link,\r\n </#if>\r\n basic_datetime AS date,<#if tableName??>${tableName}.*,</#if>\r\n basic_description AS descrip,\r\n basic_hit AS hit,\r\n article_type AS flag,\r\n category_title AS typetitle,\r\n cms_article.article_keyword AS keyword \r\nFROM\r\n (SELECT @rownum := 0) r,\r\n basic\r\n LEFT JOIN cms_article ON cms_article.article_basicid = basic.basic_id\r\n LEFT JOIN category ON basic_categoryid = category.category_id\r\n LEFT JOIN basic_column ON basic_column.column_category_id = basic.basic_categoryid \r\n <#--判断是否有自定义模型表-->\r\n <#if tableName??>LEFT JOIN ${tableName} ON ${tableName}.basicId=cms_article.article_basicid </#if>\r\nWHERE <#--查询栏目-->\r\n basic.basic_display=0 \r\n <#--根据模块编号查询分类-->\r\n <#if column?? && column.categoryModelId?has_content>\r\n and category_modelid=${column.categoryModelId}\r\n </#if>\r\n <#--判断是否有搜索分类集合-->\r\n <#if _typeid?has_content>\r\n and (basic_categoryid=${_typeid} or basic_categoryid in \r\n (select category_id FROM category where category.del=0 and find_in_set(${_typeid},CATEGORY_PARENT_ID)))\r\n <#else>\r\n <#if search??> \r\n <#if search.categoryIds??>and FIND_IN_SET(category_categoryid,\'${search.categoryIds}\')</#if>\r\n <#--标题-->\r\n <#if search.basic_title??> and basic_title like CONCAT(\"%\",\'${search.basic_title}\',\"%\")</#if>\r\n <#--作者-->\r\n <#if search.article_author??> and article_author like CONCAT(\"%\",\'${search.article_author}\',\"%\")</#if>\r\n <#--来源-->\r\n <#if search.article_source??> and article_source like CONCAT(\"%\",\'${search.article_source}\',\"%\")</#if>\r\n <#--属性-->\r\n <#if search.article_type??> and article_type like CONCAT(\"%\",\'${search.article_type}\',\"%\")</#if>\r\n <#--图片-->\r\n <#if search.basic_thumbnails??> and basic_thumbnails like CONCAT(\"%\",\'${search.basic_thumbnails}\',\"%\")</#if>\r\n <#--描述-->\r\n <#if search.basic_description??> and basic_description like CONCAT(\"%\",\'${search.basic_description}\',\"%\")</#if>\r\n <#--关键字-->\r\n <#if search.article_keyword??> and article_keyword like CONCAT(\"%\",\'${search.article_keyword}\',\"%\")</#if>\r\n <#--内容-->\r\n <#if search.article_content??> and article_content like CONCAT(\"%\",\'${search.article_content}\',\"%\")</#if>\r\n <#--自定义顺序-->\r\n <#if search.article_freeorder??> and article_freeorder=${search.article_freeorder}</#if>\r\n </#if>\r\n </#if>\r\n <#--标题-->\r\n <#if basic_title??> and basic_title like CONCAT(\"%\",\'${basic_title}\',\"%\")</#if>\r\n <#--作者-->\r\n <#if article_author??> and article_author like CONCAT(\"%\",\'${article_author}\',\"%\")</#if>\r\n <#--来源-->\r\n <#if article_source??> and article_source like CONCAT(\"%\",\'${article_source}\',\"%\")</#if>\r\n <#--属性-->\r\n <#if article_type??> and article_type like CONCAT(\"%\",\'${article_type}\',\"%\")</#if>\r\n <#--图片-->\r\n <#if basic_thumbnails??> and basic_thumbnails like CONCAT(\"%\",\'${basic_thumbnails}\',\"%\")</#if>\r\n <#--描述-->\r\n <#if basic_description??> and basic_description like CONCAT(\"%\",\'${basic_description}\',\"%\")</#if>\r\n <#--关键字-->\r\n <#if article_keyword??> and article_keyword like CONCAT(\"%\",\'${article_keyword}\',\"%\")</#if>\r\n <#--内容-->\r\n <#if article_content??> and article_content like CONCAT(\"%\",\'${article_content}\',\"%\")</#if>\r\n <#--自定义顺序-->\r\n <#if article_freeorder??> and article_freeorder=${article_freeorder}</#if>\r\n <#--自定义模型-->\r\n <#if diyModel??> \r\n <#list diyModel as dm>\r\n and ${tableName}.${dm.key} = \"${dm.value}\" \r\n </#list>\r\n </#if>\r\n <#--文章属性-->\r\n <#if flag?? >\r\n and cms_article.article_type like CONCAT(\'%\',\'${flag}\',\'%\') \r\n </#if>\r\n <#if noflag?? >\r\n and cms_article.article_type not like CONCAT(\'%\',\'${noflag}\',\'%\') \r\n </#if>\r\n <#--字段排序-->\r\n <#if orderby?? >\r\n ORDER BY \r\n <#if orderby==\"date\"> basic.basic_datetime</#if> \r\n <#if orderby==\"updatedate\"> basic.basic_updatetime</#if> \r\n <#if orderby==\"hit\"> basic.basic_hit</#if>\r\n <#if orderby==\"sort\"> basic.basic_sort</#if>\r\n <#if orderby==\"id\"> basic.basic_id</#if>\r\n </#if>\r\n <#if order?? >\r\n <#if order==\"desc\"> desc</#if>\r\n <#if order==\"asc\"> asc</#if>\r\n </#if>\r\n LIMIT \r\n <#--判断是否分页-->\r\n <#if ispaging?? && (pageTag.pageNo)??>${(pageTag.pageNo-1)*size?eval},${size?default(20)}\r\n <#else>${size?default(20)}</#if>\r\n', 1);
INSERT INTO `mdiy_tag_sql` VALUES (6, 4, '<#--freemarker格式化数字-->\r\n<#setting number_format=\"#\">\r\n<#assign _typeid=\"\"/>\r\n<#if column?? && column.categoryId??>\r\n <#assign _typeid=\"${column.categoryId}\">\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 category_id as id,\r\n category_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 _typeid?has_content>${_typeid}<#else>0</#if> = category_id ,\"${class!\'\'}\",\"\") as class,\r\n <#--动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\"/${modelName}/list.do?typeid=\", category_id) as typelink,\r\n <#else>\r\n CONCAT(column_path,\"/index.html\") as typelink,\r\n </#if>\r\n column_keyword as typekeyword,\r\n column_descrip as typedescrip,\r\n category_smallimg as typelitpic \r\n from (SELECT @rownum := 0) r,basic_column bc \r\n LEFT JOIN category on bc.column_category_id=category.category_id where \r\n category.del=0 \r\n <#--根据模块编号查询分类-->\r\n <#if column?? && column.categoryModelId?has_content>\r\n and category_modelid=${column.categoryModelId}\r\n </#if>\r\n<#if type?has_content>\r\n <#--顶级栏目(单个)-->\r\n <#if type==\"top\">\r\n and category_id=(select left(category_parent_id,LOCATE(\",\",category_parent_id)-1) from category where category_id = ${_typeid})\r\n <#elseif type==\"nav\">\r\n and(category_categoryid=0 or category_categoryid is null)\r\n <#--同级栏目(多个)-->\r\n <#elseif type==\"level\">\r\n and\r\n <#if _typeid?has_content>\r\n category_categoryid=(select category_categoryid from category where category_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 category_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 category_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_categoryid=${_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.categoryCategoryId?? && column.categoryCategoryId!=0>\r\n category_id=${column.categoryCategoryId}\r\n <#else>\r\n category_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_categoryid= if((SELECT count(*) FROM category\r\n LEFT JOIN basic_column bc ON bc.column_category_id = category.category_id \r\n WHERE category_categoryid=${_typeid})>0,${_typeid},(select category_categoryid from category where category_id=${_typeid}))\r\n <#else>\r\n 1=1\r\n </#if>\r\n </#if>\r\n<#else> <#--默认son-->\r\n and\r\n <#if _typeid?has_content>\r\n category_categoryid=${_typeid}\r\n <#else>\r\n (category_categoryid=0 or category_categoryid is null)\r\n </#if>\r\n</#if>', 1);
INSERT INTO `mdiy_tag_sql` VALUES (7, 5, 'select \r\nAPP_NAME as name,\r\napp_logo as logo,\r\napp_keyword as keyword,\r\napp_description as descrip,\r\napp_copyright as copyright,\r\n<#--动态解析 -->\r\n<#if isDo?? && isDo>\r\n\"${url}\" as url,\r\n\"${url}\" as host,\r\n<#--使用地址栏的域名 -->\r\n<#elseif url??>\r\nCONCAT(\"${url}\",\"/${html}/\",app_id,\"/<#if m??>${m}</#if>\") as url,\r\n\"${url}\" as host,\r\n<#else>\r\nCONCAT(REPLACE(REPLACE(TRIM(substring_index(app_url,\"\\n\",1)), CHAR(10),\'\'), CHAR(13),\'\'),\"/html/\",app_id,\"/<#if m??>${m}</#if>\") as url,\r\nREPLACE(REPLACE(TRIM(substring_index(app_url,\"\\n\",1)), CHAR(10),\'\'), CHAR(13),\'\') as host,\r\n</#if>\r\nCONCAT(\"templets/\",app_id,\"/\",<#if m??>CONCAT(app_style,\"/${m}\")<#else>app_style</#if>) as style <#-- 判断是否为手机端 -->\r\nfrom app limit 1', 1);
INSERT INTO `mdiy_tag_sql` VALUES (8, 7, 'SELECT \r\nbasic_id as id,\r\nleft(basic_title,${titlelen?default(40)}) as title,\r\nbasic_title as fulltitle,\r\narticle_author as author, \r\narticle_source as source, \r\narticle_content as content,\r\ncategory.category_title as typetitle,\r\ncategory.category_id as typeid,\r\ncategory.category_smallimg AS typelitpic,\r\n<#--动态链接-->\r\n<#if isDo?? && isDo>\r\nCONCAT(\"/${modelName}/list.do?typeid=\", category.category_id) as typelink,\r\n<#else>\r\n(SELECT \"index.html\") as typelink,\r\n</#if>\r\nbasic.basic_thumbnails as litpic,\r\n<#--内容页动态链接-->\r\n<#if isDo?? && isDo>\r\nCONCAT(\"/mcms/view.do?id=\", basic_id) as link,\r\n<#else>\r\ncms_article.article_url AS link,\r\n</#if>\r\nbasic_datetime as date,\r\nbasic_description as descrip,\r\nCONCAT(\"<script type=\'text/javascript\' src=\'${url}/basic/\",basic_id,\"/hit.do\'></script>\") as hit,\r\narticle_type as flag,\r\ncategory_title as typetitle,\r\n<#if tableName??>${tableName}.*,</#if>\r\ncms_article.article_keyword as keyword\r\nFROM basic LEFT JOIN cms_article ON cms_article.article_basicid = basic.basic_id \r\nLEFT JOIN category ON basic_categoryid=category.category_id \r\nLEFT JOIN basic_column ON basic_column.column_category_id=basic.basic_categoryid\r\n<#--判断是否有自定义模型表-->\r\n<#if tableName??>left join ${tableName} on ${tableName}.basicId=cms_article.ARTICLE_BASICID</#if>\r\nWHERE \r\n1=1\r\n<#if id??> and basic_id=${id}</#if>', 1);
INSERT INTO `mdiy_tag_sql` VALUES (9, 8, '<#assign select=\"(SELECT \'\')\"/>\r\n<#if (pageTag.preId)gt 0>\r\nSELECT \r\nbasic_id as id,\r\nleft(basic_title,${titlelen?default(40)}) as title,\r\nbasic_title as fulltitle,\r\narticle_author as author, \r\narticle_source as source, \r\narticle_content as content,\r\ncategory.category_title as typename,\r\ncategory.category_id as typeid,\r\n(SELECT \"index.html\") AS typelink,\r\nbasic.basic_thumbnails as litpic,\r\ncms_article.article_url as link,\r\nbasic_datetime as date,\r\nbasic_description as descrip,\r\nbasic_hit as hit,\r\narticle_type as flag,\r\ncms_article.article_keyword as keyword \r\nFROM basic LEFT JOIN cms_article ON cms_article.article_basicid = basic.basic_id \r\nLEFT JOIN category ON basic_categoryid=category.category_id \r\nLEFT JOIN basic_column ON basic_column.column_category_id=basic.basic_categoryid \r\nWHERE basic_id=${pageTag.preId}\r\n<#else><#--没有上一页返回空字符串-->\r\nSELECT \r\n${select} as id,\r\n${select} as title,\r\n${select} as fulltitle,\r\n${select} as author, \r\n${select} as source, \r\n${select} as content,\r\n${select} as typename,\r\n${select} as typeid,\r\n${select} as typelink,\r\n${select} as litpic,\r\n${select} as link,\r\n${select} as date,\r\n${select} as descrip,\r\n${select} as hit,\r\n${select} as flag,\r\n${select} as keyword FROM basic\r\n</#if>', NULL);
INSERT INTO `mdiy_tag_sql` VALUES (10, 9, ' select\r\n <#if !(pageTag.indexUrl??)>\r\n <#--判断是否有栏目对象,用于搜索不传栏目-->\r\n <#if column??>\r\n <#--顶级栏目处理-->\r\n <#if column.categoryCategoryId==0>\r\n <#assign path=column.columnPath/>\r\n <#else>\r\n <#assign path=column.columnPath/>\r\n </#if>\r\n <#else>\r\n <#assign path=\"\"/>\r\n </#if>\r\n <#--总记录数、总页数-->\r\n (SELECT ${pageTag.total}) as total,\r\n <#--记录总数-->\r\n (SELECT ${pageTag.size}) as rcount,\r\n <#--当前页码-->\r\n (SELECT ${pageTag.pageNo}) as cur,\r\n <#--首页-->\r\n CONCAT(\"${path}\", \"/index.html\") as `index`,\r\n <#--上一页-->\r\n <#if (pageTag.pageNo?eval-1) gt 1>\r\n CONCAT(\"${path}\",\"/list-${pageTag.pageNo?eval-1}.html\") as pre,\r\n <#else>\r\n CONCAT(\"${path}\",\"/index.html\") as pre,\r\n </#if>\r\n <#--下一页-->\r\n <#if pageTag.total==1>\r\n CONCAT(\"${path}\", \"/index.html\") as `next`,\r\n CONCAT(\"${path}\", \"/index.html\") as `last`\r\n <#else>\r\n <#if pageTag.pageNo?eval gte pageTag.total>\r\n CONCAT(\"${path}\",\"/list-${pageTag.total}.html\") as next,\r\n <#else>\r\n CONCAT(\"${path}\",\"/list-${pageTag.pageNo?eval+1}.html\") as next,\r\n </#if>\r\n <#--最后一页-->\r\n CONCAT(\"${path}\",\"/list-${pageTag.total}.html\") as last\r\n </#if>\r\n<#else><#--判断是否是搜索页面-->\r\n \"${pageTag.indexUrl}\" as `index`,\"${pageTag.lastUrl}\" as `last`,\"${pageTag.preUrl}\" as `pre`,\"${pageTag.nextUrl}\" as `next`,\'${pageTag.total}\' as total,\'${pageTag.size}\' as rcount,\'${pageTag.pageNo}\' as cur\r\n</#if>', NULL);
INSERT INTO `mdiy_tag_sql` VALUES (11, 10, '<#assign select=\"(SELECT \'\')\"/>\r\n<#if (pageTag.nextId)gt 0>\r\nSELECT \r\nbasic_id as id,\r\nleft(basic_title,${titlelen?default(40)}) as title,\r\nbasic_title as fulltitle,\r\narticle_author as author, \r\narticle_source as source, \r\narticle_content as content,\r\ncategory.category_title as typename,\r\ncategory.category_id as typeid,\r\n(SELECT \"index.html\") as typelink,\r\nbasic.basic_thumbnails as litpic,\r\ncms_article.article_url as link,\r\nbasic_datetime as date,\r\nbasic_description as descrip,\r\nbasic_hit as hit,\r\narticle_type as flag,\r\ncms_article.article_keyword as keyword \r\nFROM basic LEFT JOIN cms_article ON cms_article.article_basicid = basic.basic_id \r\nLEFT JOIN category ON basic_categoryid=category.category_id \r\nLEFT JOIN basic_column ON basic_column.column_category_id=basic.basic_categoryid \r\nWHERE basic_id=${pageTag.nextId}\r\n<#else>\r\nSELECT \r\n${select} as id,\r\n${select} as title,\r\n${select} as fulltitle,\r\n${select} as author, \r\n${select} as source, \r\n${select} as content,\r\n${select} as typename,\r\n${select} as typeid,\r\n${select} as typelink,\r\n${select} as litpic,\r\n${select} as link,\r\n${select} as date,\r\n${select} as descrip,\r\n${select} as hit,\r\n${select} as flag,\r\n${select} as keyword FROM basic\r\n</#if>', NULL);
INSERT INTO `mdiy_tag_sql` VALUES (13, 12, 'SELECT\r\n basic_id AS id,\r\n product_price as price,\r\n product_cost_price AS costprice,\r\n product_content AS content,\r\n product_code AS code,\r\n <#--详情页动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\"/${modelName}/view.do?id=\", basic_id) as link,\r\n <#else>\r\n product_linkUrl AS link,\r\n </#if>\r\n basic_title AS title,\r\n product_sale AS sale,\r\n product_good AS specification,\r\n product_inventory AS stock,\r\n basic.basic_categoryid AS typeid,\r\n basic_thumbnails AS litpic,\r\n <#--列表页动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\"/mmall/list.do?typeid=\", category.category_id) as typelink,\r\n <#else>\r\n (SELECT \"index.html\") AS typelink,\r\n </#if>\r\n <#--判断是否有自定义模型表-->\r\n <#if tableNname??>${tableNname}.*,</#if>\r\n category_title AS typetitle\r\nFROM\r\n mall_product \r\n LEFT JOIN basic ON mall_product.product_basicID = basic.basic_id\r\n LEFT JOIN category ON basic_categoryid = category.category_id\r\n <#--判断是否有自定义模型表-->\r\n <#if tableNname??>LEFT JOIN ${tableNname} ON ${tableNname}.basicId=mall_product.product_basicID </#if>\r\nWHERE\r\n 1 = 1 <#--查询栏目-->\r\n <#if (typeid)??> and (basic_categoryid=${typeid} or basic_categoryid in \r\n (select category_id FROM category where find_in_set(${typeid},CATEGORY_PARENT_ID)))\r\n </#if>\r\n <#--模糊查询商品标题-->\r\n <#if basic_title??> and basic_title like CONCAT(\"%\",\'${basic_title}\',\"%\")</#if> \r\n LIMIT <#--判断是否分页-->\r\n <#if ispaging?? && pageNo??>${(pageNo?eval-1)*size?eval},${size?default(20)}\r\n <#else>${size?default(20)}</#if>', NULL);
INSERT INTO `mdiy_tag_sql` VALUES (14, 13, 'SELECT\r\n basic_id AS id,\r\n product_price as price,\r\n product_cost_price AS costprice,\r\n product_content AS content,\r\n product_code AS code,\r\n <#--详情页动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\"/${modelName}/view.do?id=\", basic_id) as link,\r\n <#else>\r\n product_linkUrl AS link,\r\n </#if>\r\n basic_title AS title,\r\n product_sale AS sale,\r\n product_good AS specification,\r\n product_inventory AS stock,\r\n basic.basic_categoryid AS typeid,\r\n basic_thumbnails AS litpic,\r\n <#--列表页动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\"/mmall/list.do?id=\", category.category_id) as typelink,\r\n <#else>\r\n (SELECT \"index.html\") AS typelink,\r\n </#if>\r\n <#--判断是否有自定义模型表-->\r\n <#if tableNname??>${tableNname}.*,</#if>\r\n category_title AS typetitle\r\nFROM\r\n mall_product \r\n LEFT JOIN basic ON mall_product.product_basicID = basic.basic_id\r\n LEFT JOIN category ON basic_categoryid = category.category_id\r\n LEFT JOIN basic_column ON basic_column.column_category_id = basic.basic_categoryid\r\n <#--判断是否有自定义模型表-->\r\n <#if tableNname??>LEFT JOIN ${tableNname} ON ${tableNname}.basicId=mall_product.product_basicID </#if>\r\nWHERE\r\n 1 = 1 <#if id??> and basic_id=${id} </#if>', NULL);
INSERT INTO `model` VALUES ('155', '自定义标签', '20060000', '104', 'mdiy/tag/index.do', '2017-09-04 11:18:51', '', '0', '0', '1', '104','');
INSERT INTO `model` VALUES ('156', '新增', '20060001', '155', 'mdiy:tag:save', '2017-09-04 14:28:41', '', '0', '0', '0', '104,155','');
INSERT INTO `model` VALUES ('157', '查看', '20060002', '155', 'mdiy:tag:view', '2018-06-20 17:53:51', '', '0', '0', '0', '104,155','');
INSERT INTO `model` VALUES ('158', '修改', '20060003', '155', 'mdiy:tag:update', '2018-06-20 17:54:43', null, '0', '0', '0', '104,155','');
INSERT INTO `model` VALUES ('159', '删除', '20060004', '155', 'mdiy:tag:del', '2018-06-20 17:55:26', null, '0', '0', '0', '104,155','');
INSERT INTO `model` VALUES ('160', '新增SQL', '20060005', '155', 'mdiy:tagSql:save', '2017-09-04 14:28:41', '', '0', '0', '0', '104,155','');
INSERT INTO `model` VALUES ('161', '查看SQL', '20060006', '155', 'mdiy:tagSql:view', '2018-06-20 17:53:51', '', '0', '0', '0', '104,155','');
INSERT INTO `model` VALUES ('162', '修改SQL', '20060007', '155', 'mdiy:tagSql:update', '2018-06-20 17:54:43', null, '0', '0', '0', '104,155','');
INSERT INTO `model` VALUES ('163', '删除SQL', '20060008', '155', 'mdiy:tagSql:del', '2018-06-20 17:55:26', null, '0', '0', '0', '104,155','');
INSERT INTO `role_model` VALUES ('155', '48');
INSERT INTO `role_model` VALUES ('156', '48');
INSERT INTO `role_model` VALUES ('157', '48');
INSERT INTO `role_model` VALUES ('158', '48');
INSERT INTO `role_model` VALUES ('159', '48');
INSERT INTO `role_model` VALUES ('160', '48');
INSERT INTO `role_model` VALUES ('161', '48');
INSERT INTO `role_model` VALUES ('162', '48');
INSERT INTO `role_model` VALUES ('163', '48');
ALTER TABLE [dbo].[model] ADD [is_child] varchar(255) NULL
GO
ALTER TABLE [dbo].[mdiy_dict] ALTER COLUMN [dict_value] nvarchar ( 100 ) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
EXEC sp_addextendedproperty
'MS_Description', N'扩展业务标记',
'SCHEMA', N'dbo',
'TABLE', N'model',
'COLUMN', N'is_child';
ALTER TABLE [dbo].[mdiy_dict] ADD [is_child] varchar(255) NULL
GO
EXEC sp_addextendedproperty
'MS_Description', N'扩展业务标记',
'SCHEMA', N'dbo',
'TABLE', N'mdiy_dict',
'COLUMN', N'is_child';
ALTER TABLE [dbo].[role] ALTER COLUMN [app_id] int NULL;
-- ----------------------------
-- Records of [model]
-- ----------------------------
SET IDENTITY_INSERT [dbo].[model] ON
GO
INSERT INTO [dbo].[model] ([model_id], [model_title], [model_code], [model_modelid], [model_url], [model_datetime], [model_icon], [model_modelmanagerid], [model_sort], [model_ismenu], [model_parent_ids], [is_child]) VALUES (N'153', N'自定义标签', N'20060000', N'104', N'mdiy/tag/index.do', N'2019-02-19 11:34:02.0000000', NULL, N'0', N'0', N'1', N'104', NULL)
GO
INSERT INTO [dbo].[model] ([model_id], [model_title], [model_code], [model_modelid], [model_url], [model_datetime], [model_icon], [model_modelmanagerid], [model_sort], [model_ismenu], [model_parent_ids], [is_child]) VALUES (N'154', N'新增', N'20060001', N'153', N'mdiy:tag:save', N'2019-02-19 11:34:02.0000000', NULL, N'0', N'0', N'0', N'104,153', NULL)
GO
INSERT INTO [dbo].[model] ([model_id], [model_title], [model_code], [model_modelid], [model_url], [model_datetime], [model_icon], [model_modelmanagerid], [model_sort], [model_ismenu], [model_parent_ids], [is_child]) VALUES (N'155', N'查看', N'20060002', N'153', N'mdiy:tag:view', N'2019-02-19 11:34:02.0000000', NULL, N'0', N'0', N'0', N'104,153', NULL)
GO
INSERT INTO [dbo].[model] ([model_id], [model_title], [model_code], [model_modelid], [model_url], [model_datetime], [model_icon], [model_modelmanagerid], [model_sort], [model_ismenu], [model_parent_ids], [is_child]) VALUES (N'156', N'修改', N'20060003', N'153', N'mdiy:tag:update', N'2019-02-19 11:34:02.0000000', NULL, N'0', N'0', N'0', N'104,153', NULL)
GO
INSERT INTO [dbo].[model] ([model_id], [model_title], [model_code], [model_modelid], [model_url], [model_datetime], [model_icon], [model_modelmanagerid], [model_sort], [model_ismenu], [model_parent_ids], [is_child]) VALUES (N'157', N'删除', N'20060004', N'153', N'mdiy:tag:del', N'2019-02-19 11:34:02.0000000', NULL, N'0', N'0', N'0', N'104,153', NULL)
GO
INSERT INTO [dbo].[model] ([model_id], [model_title], [model_code], [model_modelid], [model_url], [model_datetime], [model_icon], [model_modelmanagerid], [model_sort], [model_ismenu], [model_parent_ids], [is_child]) VALUES (N'158', N'新增SQL', N'20060005', N'153', N'mdiy:tagSql:save', N'2019-02-19 11:34:02.0000000', NULL, N'0', N'0', N'0', N'104,153', NULL)
GO
INSERT INTO [dbo].[model] ([model_id], [model_title], [model_code], [model_modelid], [model_url], [model_datetime], [model_icon], [model_modelmanagerid], [model_sort], [model_ismenu], [model_parent_ids], [is_child]) VALUES (N'159', N'查看SQL', N'20060006', N'153', N'mdiy:tagSql:view', N'2019-02-19 11:34:02.0000000', NULL, N'0', N'0', N'0', N'104,153', NULL)
GO
INSERT INTO [dbo].[model] ([model_id], [model_title], [model_code], [model_modelid], [model_url], [model_datetime], [model_icon], [model_modelmanagerid], [model_sort], [model_ismenu], [model_parent_ids], [is_child]) VALUES (N'160', N'修改SQL', N'20060007', N'153', N'mdiy:tagSql:update', N'2019-02-19 11:34:02.0000000', NULL, N'0', N'0', N'0', N'104,153', NULL)
GO
INSERT INTO [dbo].[model] ([model_id], [model_title], [model_code], [model_modelid], [model_url], [model_datetime], [model_icon], [model_modelmanagerid], [model_sort], [model_ismenu], [model_parent_ids], [is_child]) VALUES (N'161', N'删除SQL', N'20060008', N'153', N'mdiy:tagSql:del', N'2019-02-19 11:34:02.0000000', NULL, N'0', N'0', N'0', N'104,153', NULL)
GO
SET IDENTITY_INSERT [dbo].[model] OFF
GO
-- ----------------------------
-- Table structure for file
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[file]') AND type IN ('U'))
DROP TABLE [dbo].[file]
GO
CREATE TABLE [dbo].[file] (
[id] int NOT NULL,
[category_id] int NULL,
[app_id] int NULL,
[file_name] nvarchar(200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[file_url] nvarchar(500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[file_size] int NULL,
[file_json] nvarchar(500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[file_type] nvarchar(50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[is_child] nvarchar(50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[update_date] datetime2(7) NULL,
[update_by] int NULL,
[create_by] int NULL,
[create_date] datetime2(7) NULL,
[del] int NULL
)
GO
ALTER TABLE [dbo].[file] SET (LOCK_ESCALATION = TABLE)
GO
EXEC sp_addextendedproperty
'MS_Description', N'文件编号',
'SCHEMA', N'dbo',
'TABLE', N'file',
'COLUMN', N'id'
GO
EXEC sp_addextendedproperty
'MS_Description', N'文件分类编号',
'SCHEMA', N'dbo',
'TABLE', N'file',
'COLUMN', N'category_id'
GO
EXEC sp_addextendedproperty
'MS_Description', N'APP编号',
'SCHEMA', N'dbo',
'TABLE', N'file',
'COLUMN', N'app_id'
GO
EXEC sp_addextendedproperty
'MS_Description', N'文件名称',
'SCHEMA', N'dbo',
'TABLE', N'file',
'COLUMN', N'file_name'
GO
EXEC sp_addextendedproperty
'MS_Description', N'文件链接',
'SCHEMA', N'dbo',
'TABLE', N'file',
'COLUMN', N'file_url'
GO
EXEC sp_addextendedproperty
'MS_Description', N'文件大小',
'SCHEMA', N'dbo',
'TABLE', N'file',
'COLUMN', N'file_size'
GO
EXEC sp_addextendedproperty
'MS_Description', N'文件详情Json数据',
'SCHEMA', N'dbo',
'TABLE', N'file',
'COLUMN', N'file_json'
GO
EXEC sp_addextendedproperty
'MS_Description', N'文件类型:图片、音频、视频等',
'SCHEMA', N'dbo',
'TABLE', N'file',
'COLUMN', N'file_type'
GO
EXEC sp_addextendedproperty
'MS_Description', N'子业务',
'SCHEMA', N'dbo',
'TABLE', N'file',
'COLUMN', N'is_child'
GO
EXEC sp_addextendedproperty
'MS_Description', N'更新时间',
'SCHEMA', N'dbo',
'TABLE', N'file',
'COLUMN', N'update_date'
GO
EXEC sp_addextendedproperty
'MS_Description', N'更新者',
'SCHEMA', N'dbo',
'TABLE', N'file',
'COLUMN', N'update_by'
GO
EXEC sp_addextendedproperty
'MS_Description', N'创建者',
'SCHEMA', N'dbo',
'TABLE', N'file',
'COLUMN', N'create_by'
GO
EXEC sp_addextendedproperty
'MS_Description', N'创建时间',
'SCHEMA', N'dbo',
'TABLE', N'file',
'COLUMN', N'create_date'
GO
EXEC sp_addextendedproperty
'MS_Description', N'删除标记',
'SCHEMA', N'dbo',
'TABLE', N'file',
'COLUMN', N'del'
GO
EXEC sp_addextendedproperty
'MS_Description', N'基础文件表',
'SCHEMA', N'dbo',
'TABLE', N'file'
GO
-- ----------------------------
-- Primary Key structure for table file
-- ----------------------------
ALTER TABLE [dbo].[file] ADD CONSTRAINT [PK__file__3213E83FB0167B55] PRIMARY KEY CLUSTERED ([id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = OFF, ALLOW_PAGE_LOCKS = OFF)
ON [PRIMARY]
GO
-- ----------------------------
-- Table structure for mdiy_tag
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[mdiy_tag]') AND type IN ('U'))
DROP TABLE [dbo].[mdiy_tag]
GO
CREATE TABLE [dbo].[mdiy_tag] (
[id] int NOT NULL,
[tag_name] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[tag_type] int NULL,
[tag_description] nvarchar(255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
)
GO
ALTER TABLE [dbo].[mdiy_tag] SET (LOCK_ESCALATION = TABLE)
GO
EXEC sp_addextendedproperty
'MS_Description', N'标签名称',
'SCHEMA', N'dbo',
'TABLE', N'mdiy_tag',
'COLUMN', N'tag_name'
GO
EXEC sp_addextendedproperty
'MS_Description', N'标签类型',
'SCHEMA', N'dbo',
'TABLE', N'mdiy_tag',
'COLUMN', N'tag_type'
GO
EXEC sp_addextendedproperty
'MS_Description', N'描述',
'SCHEMA', N'dbo',
'TABLE', N'mdiy_tag',
'COLUMN', N'tag_description'
GO
EXEC sp_addextendedproperty
'MS_Description', N'标签',
'SCHEMA', N'dbo',
'TABLE', N'mdiy_tag'
GO
-- ----------------------------
-- Records of [mdiy_tag]
-- ----------------------------
INSERT INTO [dbo].[mdiy_tag] VALUES (N'3', N'arclist', N'3', N'文章列表')
GO
INSERT INTO [dbo].[mdiy_tag] VALUES (N'4', N'channel', N'3', N'通用栏目')
GO
INSERT INTO [dbo].[mdiy_tag] VALUES (N'5', N'global', N'2', N'全局')
GO
INSERT INTO [dbo].[mdiy_tag] VALUES (N'7', N'field', N'3', N'文章内容')
GO
INSERT INTO [dbo].[mdiy_tag] VALUES (N'8', N'pre', N'0', N'文章上一篇')
GO
INSERT INTO [dbo].[mdiy_tag] VALUES (N'9', N'page', N'2', N'通用分页')
GO
INSERT INTO [dbo].[mdiy_tag] VALUES (N'10', N'next', N'0', N'文章下一篇')
GO
INSERT INTO [dbo].[mdiy_tag] VALUES (N'12', N'prclist', N'3', N'商品列表')
GO
INSERT INTO [dbo].[mdiy_tag] VALUES (N'13', N'goods', N'3', N'商品详情')
GO
-- ----------------------------
-- Primary Key structure for table mdiy_tag
-- ----------------------------
ALTER TABLE [dbo].[mdiy_tag] ADD CONSTRAINT [PK__mdiy_tag__3213E83FB83AEC2F] PRIMARY KEY CLUSTERED ([id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = OFF, ALLOW_PAGE_LOCKS = OFF)
ON [PRIMARY]
GO
-- ----------------------------
-- Table structure for mdiy_tag_sql
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[mdiy_tag_sql]') AND type IN ('U'))
DROP TABLE [dbo].[mdiy_tag_sql]
GO
CREATE TABLE [dbo].[mdiy_tag_sql] (
[id] int NOT NULL,
[tag_id] int NOT NULL,
[tag_sql] nvarchar(max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[sort] int NULL
)
GO
ALTER TABLE [dbo].[mdiy_tag_sql] SET (LOCK_ESCALATION = TABLE)
GO
EXEC sp_addextendedproperty
'MS_Description', N'自定义标签编号',
'SCHEMA', N'dbo',
'TABLE', N'mdiy_tag_sql',
'COLUMN', N'tag_id'
GO
EXEC sp_addextendedproperty
'MS_Description', N'自定义sql支持ftl写法',
'SCHEMA', N'dbo',
'TABLE', N'mdiy_tag_sql',
'COLUMN', N'tag_sql'
GO
EXEC sp_addextendedproperty
'MS_Description', N'排序升序',
'SCHEMA', N'dbo',
'TABLE', N'mdiy_tag_sql',
'COLUMN', N'sort'
GO
EXEC sp_addextendedproperty
'MS_Description', N'标签对应多个sql语句',
'SCHEMA', N'dbo',
'TABLE', N'mdiy_tag_sql'
GO
-- ----------------------------
-- Records of mdiy_tag_sql
-- ----------------------------
INSERT INTO [dbo].[mdiy_tag_sql] VALUES (N'5', N'3', N'select
basic_id AS id,
LEFT (basic_title, ${titlelen ?default(40)}) AS title,
basic_title AS fulltitle,
article_author AS author,
article_source AS source,
article_content AS content,
category.category_title AS typename,
category.category_id AS typeid,
<#--列表页动态链接-->
<#if isDo?? && isDo>
''/${modelName}/list.do?typeid=''+convert(varchar(50),category.category_id) as typelink,
<#else>
(SELECT ''index.html'') AS typelink,
</#if>
basic.basic_thumbnails AS litpic,
<#--内容页动态链接-->
<#if isDo?? && isDo>
+''/mcms/view.do?id=''+convert(varchar(50),basic_id) as link,
<#else>
cms_article.article_url AS link,
</#if>
basic_datetime AS date,<#if tableNname??>${tableNname}.*,</#if>
basic_description AS descrip,
basic_hit AS hit,
article_type AS flag,
category_title AS typetitle,
cms_article.article_keyword AS keyword
<#if ispaging?? && pageNo??> <#--分页-->
from
( SELECT ROW_NUMBER ( ) OVER ( ORDER BY dbo.basic.basic_id DESC ) AS rownum, * FROM basic ) AS basic
<#else>
from basic
</#if>
LEFT JOIN cms_article ON cms_article.article_basicid = basic.basic_id
LEFT JOIN category ON basic_categoryid = category.category_id
LEFT JOIN basic_column ON basic_column.column_category_id = basic.basic_categoryid
<#--判断是否有自定义模型表-->
<#if tableNname??>LEFT JOIN ${tableNname} ON ${tableNname}.basicId=cms_article.article_basicid </#if>
where
1 = 1 <#if typeid??> and (basic_categoryid=${typeid} or basic_categoryid in
(select category_id FROM category where category.del=0 and CHARINDEX('',''+''${typeid}''+'','' , '',''+CATEGORY_PARENT_ID +'','')>0))</#if>
<#--标题-->
<#if basic_title??> and basic_title like ''%''+''${basic_title}''+''%'')</#if>
<#--作者-->
<#if article_author??> and article_author like ''%''+''${article_author}''+''%'')</#if>
<#--来源-->
<#if article_source??> and article_source like ''%''+''${article_source}''+''%'')</#if>
<#--属性-->
<#if article_type??> and article_type like ''%''+''${article_type}''+''%'')</#if>
<#--图片-->
<#if basic_thumbnails??> and basic_thumbnails like ''%''+''${basic_thumbnails}''+''%'')</#if>
<#--描述-->
<#if basic_description??> and basic_description like ''%''+''${basic_description}''+''%'')</#if>
<#--关键字-->
<#if article_keyword??> and article_keyword like ''%''+''${article_keyword}''+''%'')</#if>
<#--内容-->
<#if article_content??> and article_content like ''%''+''${article_content}''+''%'')</#if>
<#--自定义顺序-->
<#if article_freeorder??> and article_freeorder=${article_freeorder}</#if>
<#if ispaging?? && pageNo??><#--分页-->
and basic.rownum BETWEEN ${(pageNo?eval-1)*size?eval} AND ${size?default(20)}
</#if>', N'1')
GO
INSERT INTO [dbo].[mdiy_tag_sql] VALUES (N'6', N'4', N'select category_id as id,category_id as typeid,category_title as typetitle,
<#--动态链接-->
<#if isDo?? && isDo>
''/${modelName}/list.do?typeid=''+convert(varchar(50),category_id) as typelink,
<#else>
column_path+''/index.html'' as typelink,
</#if>column_keyword as typekeyword,column_descrip as typedescrip,category_smallimg as typelitpic from category
LEFT JOIN basic_column bc on bc.column_category_id=category.category_id where
<#if type?has_content>
<#--顶级栏目-->
<#if type==''top''>
<#if typeid??>
category_categoryid=(select category_categoryid from category where category_id=(select category_categoryid from category where category_id=${typeid}))
<#else>
category_categoryid=0
</#if>
<#--同级栏目-->
<#elseif type==''level''>
<#if typeid??>
category_categoryid=(select category_categoryid from category where category_id=${typeid})
<#else>
1=1
</#if>
<#--当前栏目-->
<#elseif type==''self''>
<#if typeid??>
category_id=${typeid}
<#else>
1=1
</#if>
<#--子栏目-->
<#elseif type==''son''>
<#if typeid??>
category_categoryid=${typeid}
<#else>
1=1
</#if>
</#if>
<#else> <#--默认son-->
<#if typeid??>
category_categoryid=${typeid}
<#else>
category_categoryid=0
</#if>
</#if>', N'1')
GO
INSERT INTO [dbo].[mdiy_tag_sql] VALUES (N'7', N'5', N'select
APP_NAME as name,
app_logo as logo,
app_keyword as keyword,
app_description as descrip,
app_copyright as copyright,
<#--动态解析 -->
<#if isDo?? && isDo>
''${url}'' as url,
''${url}'' as host,
<#--使用地址栏的域名 -->
<#elseif url??>
''${url}/${html}/''+app_id+''/<#if m??>${m}</#if>'' as url,
''${url}'' as host,
<#else>
REPLACE(<#-- 剔除换行符 -->
substring( app_url, 0, CHARINDEX ( CHAR ( 10 ), app_url ) ),CHAR ( 13 ),'''')+''/${html}/''+convert(varchar(50),app_id)+''/<#if m??>${m}</#if>'' as url,
REPLACE(<#-- 剔除换行符 -->
substring( app_url, 0, CHARINDEX ( CHAR ( 10 ), app_url ) ),CHAR ( 13 ),'''') as host,
</#if>
''templets/''+convert(varchar(50),app_id)+''/''<#if m??>+app_style+''/${m}''<#else>+app_style</#if> as style <#-- 判断是否为手机端 -->
from app', N'1')
GO
INSERT INTO [dbo].[mdiy_tag_sql] VALUES (N'8', N'7', N'SELECT
basic_id as id,
left(basic_title,${titlelen?default(40)}) as title,
basic_title as fulltitle,
article_author as author,
article_source as source,
article_content as content,
category.category_title as typename,
category.category_id as typeid,
<#--动态链接-->
<#if isDo?? && isDo>
''/${modelName}/list.do?typeid=''+convert(varchar(50),category.category_id) as typelink,
<#else>
(SELECT ''index.html'') as typelink,
</#if>
basic.basic_thumbnails as litpic,
<#--内容页动态链接-->
<#if isDo?? && isDo>
''/mcms/view.do?id=''+convert(varchar(50),basic_id) as link,
<#else>
cms_article.article_url AS link,
</#if>
basic_datetime as date,
basic_description as descrip,
basic_hit as hit,
article_type as flag,
category_title as typetitle,
<#if tableName??>${tableName}.*,</#if>
cms_article.article_keyword as keyword
FROM basic LEFT JOIN cms_article ON cms_article.article_basicid = basic.basic_id
LEFT JOIN category ON basic_categoryid=category.category_id
LEFT JOIN basic_column ON basic_column.column_category_id=basic.basic_categoryid
<#--判断是否有自定义模型表-->
<#if tableName??>left join ${tableName} on ${tableName}.basicId=cms_article.ARTICLE_BASICID</#if>
WHERE
1=1
<#if id??> and basic_id=${id}</#if>', N'1')
GO
INSERT INTO [dbo].[mdiy_tag_sql] VALUES (N'9', N'8', N'<#assign select="(SELECT '''')"/>
<#if preId??>
SELECT
basic_id as id,
left(basic_title,${titlelen?default(40)}) as title,
basic_title as fulltitle,
article_author as author,
article_source as source,
article_content as content,
category.category_title as typename,
category.category_id as typeid,
(SELECT ''index.html'') AS typelink,
basic.basic_thumbnails as litpic,
cms_article.article_url as link,
basic_datetime as date,
basic_description as descrip,
basic_hit as hit,
article_type as flag,
cms_article.article_keyword as keyword
FROM basic LEFT JOIN cms_article ON cms_article.article_basicid = basic.basic_id
LEFT JOIN category ON basic_categoryid=category.category_id
LEFT JOIN basic_column ON basic_column.column_category_id=basic.basic_categoryid
WHERE basic_id=${preId}
<#else><#--没有上一页返回空字符串-->
SELECT
${select} as id,
${select} as title,
${select} as fulltitle,
${select} as author,
${select} as source,
${select} as content,
${select} as typename,
${select} as typeid,
${select} as typelink,
${select} as litpic,
${select} as link,
${select} as date,
${select} as descrip,
${select} as hit,
${select} as flag,
${select} as keyword FROM basic
</#if>', NULL)
GO
INSERT INTO [dbo].[mdiy_tag_sql] VALUES (N'10', N'9', N' select
<#--判断是否有栏目对象,用于搜索不传栏目-->
<#if column??>
<#--顶级栏目处理-->
<#if column.categoryCategoryId==0>
<#assign path=column.columnPath/>
<#else>
<#assign path=column.columnPath/>
</#if>
<#else>
<#assign path=''''/>
</#if>
<#--总记录数、总页数-->
(SELECT ${total}) as total,
<#--记录总数-->
(SELECT ${rcount}) as rcount,
<#--当前页码-->
(SELECT ${pageNo}) as cur,
<#--首页-->
''${path}''+''/index.html'' as [index],
<#--上一页-->
<#if (pageNo?eval-1) gt 1>
''${path}''+''/list-${pageNo?eval-1}.html'' as pre,
<#else>
''${path}''+''/index.html'' as pre,
</#if>
<#--下一页-->
<#if total==1>
''${path}''+''/index.html'' as [next],
''${path}''+''/index.html'' as [last]
<#else>
<#if pageNo?eval gte total>
''${path}''+''/list-${total}.html'' as next,
<#else>
''${path}''+''/list-${pageNo?eval+1}.html'' as [next],
</#if>
<#--最后一页-->
''${path}''+''/list-${total}.html'' as [last]
</#if>', NULL)
GO
INSERT INTO [dbo].[mdiy_tag_sql] VALUES (N'11', N'10', N'<#assign select="(SELECT '''')"/>
<#if nextId??>
SELECT
basic_id as id,
left(basic_title,${titlelen?default(40)}) as title,
basic_title as fulltitle,
article_author as author,
article_source as source,
article_content as content,
category.category_title as typename,
category.category_id as typeid,
(SELECT ''index.html'') as typelink,
basic.basic_thumbnails as litpic,
cms_article.article_url as link,
basic_datetime as date,
basic_description as descrip,
basic_hit as hit,
article_type as flag,
cms_article.article_keyword as keyword
FROM basic LEFT JOIN cms_article ON cms_article.article_basicid = basic.basic_id
LEFT JOIN category ON basic_categoryid=category.category_id
LEFT JOIN basic_column ON basic_column.column_category_id=basic.basic_categoryid
WHERE basic_id=${nextId}
<#else>
SELECT
${select} as id,
${select} as title,
${select} as fulltitle,
${select} as author,
${select} as source,
${select} as content,
${select} as typename,
${select} as typeid,
${select} as typelink,
${select} as litpic,
${select} as link,
${select} as date,
${select} as descrip,
${select} as hit,
${select} as flag,
${select} as keyword FROM basic
</#if>', NULL)
GO
INSERT INTO [dbo].[mdiy_tag_sql] VALUES (N'13', N'12', N'SELECT
basic_id AS id,
product_price as price,
product_cost_price AS costprice,
product_content AS content,
product_code AS code,
<#--详情页动态链接-->
<#if isDo?? && isDo>
''/${modelName}/view.do?id=''+convert(varchar(50),basic_id) as link,
<#else>
product_linkUrl AS link,
</#if>
basic_title AS title,
product_sale AS sale,
product_good AS specification,
product_inventory AS stock,
basic.basic_categoryid AS typeid,
basic_thumbnails AS litpic,
<#--列表页动态链接-->
<#if isDo?? && isDo>
''/mmall/list.do?typeid=''+convert(varchar(50),category.category_id) as typelink,
<#else>
(SELECT ''index.html'') AS typelink,
</#if>
<#--判断是否有自定义模型表-->
<#if tableNname??>${tableNname}.*,</#if>
category_title AS typetitle
FROM
mall_product
LEFT JOIN basic ON mall_product.product_basicID = basic.basic_id
LEFT JOIN category ON basic_categoryid = category.category_id
<#--判断是否有自定义模型表-->
<#if tableNname??>LEFT JOIN ${tableNname} ON ${tableNname}.basicId=mall_product.product_basicID </#if>
WHERE
1 = 1 <#--查询栏目-->
<#if (typeid)??> and (basic_categoryid=${typeid} or basic_categoryid in
(select category_id FROM category where CHARINDEX('',''+''${categoryId}''+'','' , '',''+CATEGORY_PARENT_ID +'','')>0))
</#if>
<#--模糊查询商品标题-->
<#if basic_title??> and basic_title like ''%''+''${basic_title}''+''%''</#if>
LIMIT <#--判断是否分页-->
<#if ispaging?? && pageNo??>${(pageNo?eval-1)*size?eval},${size?default(20)}
<#else>${size?default(20)}</#if>', NULL)
GO
INSERT INTO [dbo].[mdiy_tag_sql] VALUES (N'14', N'13', N'SELECT
basic_id AS id,
product_price as price,
product_cost_price AS costprice,
product_content AS content,
product_code AS code,
<#--详情页动态链接-->
<#if isDo?? && isDo>
CONCAT("/${modelName}/view.do?id=", basic_id) as link,
<#else>
product_linkUrl AS link,
</#if>
basic_title AS title,
product_sale AS sale,
product_good AS specification,
product_inventory AS stock,
basic.basic_categoryid AS typeid,
basic_thumbnails AS litpic,
<#--列表页动态链接-->
<#if isDo?? && isDo>
CONCAT("/mmall/list.do?id=", category.category_id) as typelink,
<#else>
(SELECT "index.html") AS typelink,
</#if>
<#--判断是否有自定义模型表-->
<#if tableNname??>${tableNname}.*,</#if>
category_title AS typetitle
FROM
mall_product
LEFT JOIN basic ON mall_product.product_basicID = basic.basic_id
LEFT JOIN category ON basic_categoryid = category.category_id
LEFT JOIN basic_column ON basic_column.column_category_id = basic.basic_categoryid
<#--判断是否有自定义模型表-->
<#if tableNname??>LEFT JOIN ${tableNname} ON ${tableNname}.basicId=mall_product.product_basicID </#if>
WHERE
1 = 1 <#if id??> and basic_id=${id} </#if>', NULL)
GO
-- ----------------------------
-- Indexes structure for table mdiy_tag_sql
-- ----------------------------
CREATE NONCLUSTERED INDEX [fk_mdiy_tag_id]
ON [dbo].[mdiy_tag_sql] (
[tag_id] ASC
)
GO
-- ----------------------------
-- Primary Key structure for table mdiy_tag_sql
-- ----------------------------
ALTER TABLE [dbo].[mdiy_tag_sql] ADD CONSTRAINT [PK__mdiy_tag__3213E83F3CD78087] PRIMARY KEY CLUSTERED ([id])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = OFF, ALLOW_PAGE_LOCKS = OFF)
ON [PRIMARY]
GO
-- ----------------------------
-- Foreign Keys structure for table mdiy_tag_sql
-- ----------------------------
ALTER TABLE [dbo].[mdiy_tag_sql] ADD CONSTRAINT [mdiy_tag_sql_ibfk_1] FOREIGN KEY ([tag_id]) REFERENCES [mdiy_tag] ([id]) ON DELETE NO ACTION ON UPDATE NO ACTION
GO
-- ----------------------------
-- Records of role_model
-- ----------------------------
INSERT INTO [role_model] VALUES (N'153', N'48')
GO
INSERT INTO [role_model] VALUES (N'154', N'48')
GO
INSERT INTO [role_model] VALUES (N'155', N'48')
GO
INSERT INTO [role_model] VALUES (N'156', N'48')
GO
INSERT INTO [role_model] VALUES (N'157', N'48')
GO
INSERT INTO [role_model] VALUES (N'158', N'48')
GO
INSERT INTO [role_model] VALUES (N'159', N'48')
GO
INSERT INTO [role_model] VALUES (N'160', N'48')
GO
INSERT INTO [role_model] VALUES (N'161', N'48')
GO
# 温馨提示,请使用master分支
db-mcms-mysql-4.7.0 最低版本mysql 5.7
db-mcms-sqlserver-4.7.0 最低版本 SQLServer2012
如果使用低与要求版本数据库会出现如下错误
1、导入 mysql文件 datetime时间函数报错,请使用4.6.5版本以下的SQL文件(不包含4.6.5)
2、SQLServer数据库版本 自定义标签 使用了SQLServer2012最新的分页函数 ,
请自行修改mdiy_tag_sql表中的分页函数
数据库类型切换 :修改application.yml中
database-id: mysql、sqlServer、oracle
数据库连接切换:修改
spring:
http.multipart.enabled: false
profiles:
active: dev、prod、test
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
SET FOREIGN_KEY_CHECKS = 0;
ALTER TABLE `basic_column`
ADD COLUMN `column_flag` varchar(100) NULL DEFAULT NULL COMMENT '栏目属性' AFTER `column_cm_id`,
ADD COLUMN `column_diy_url` varchar(50) NULL DEFAULT NULL COMMENT '自定义链接' AFTER `column_flag`;
-- ----------------------------
-- Table structure for mdiy_tag
-- ----------------------------
DROP TABLE IF EXISTS `mdiy_tag`;
CREATE TABLE `mdiy_tag` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`tag_name` varchar(255) DEFAULT NULL COMMENT '标签名称',
`tag_type` int(1) DEFAULT NULL COMMENT '标签类型',
`tag_description` varchar(255) DEFAULT NULL COMMENT '描述',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='标签';
-- ----------------------------
-- Records of mdiy_tag
-- ----------------------------
BEGIN;
INSERT INTO `mdiy_tag` VALUES (3, 'arclist', 3, '文章列表');
INSERT INTO `mdiy_tag` VALUES (4, 'channel', 3, '通用栏目');
INSERT INTO `mdiy_tag` VALUES (5, 'global', 2, '全局');
INSERT INTO `mdiy_tag` VALUES (7, 'field', 3, '文章内容');
INSERT INTO `mdiy_tag` VALUES (8, 'pre', 0, '文章上一篇');
INSERT INTO `mdiy_tag` VALUES (9, 'page', 2, '通用分页');
INSERT INTO `mdiy_tag` VALUES (10, 'next', 0, '文章下一篇');
COMMIT;
-- ----------------------------
-- Table structure for `mdiy_tag_sql`
-- ----------------------------
-- ----------------------------
-- Table structure for `mdiy_tag_sql`
-- ----------------------------
DROP TABLE IF EXISTS `mdiy_tag_sql`;
CREATE TABLE `mdiy_tag_sql` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`tag_id` int(11) NOT NULL COMMENT '自定义标签编号',
`tag_sql` text COMMENT '自定义sql支持ftl写法',
`sort` int(11) DEFAULT NULL COMMENT '排序升序',
PRIMARY KEY (`id`) USING BTREE,
KEY `fk_mdiy_tag_id` (`tag_id`) USING BTREE,
CONSTRAINT `mdiy_tag_sql_ibfk_1` FOREIGN KEY (`tag_id`) REFERENCES `mdiy_tag` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='标签对应多个sql语句';
-- ----------------------------
-- Records of mdiy_tag_sql
-- ----------------------------
INSERT INTO `mdiy_tag_sql` VALUES ('5', '3', '<#assign _typeid=\"\"/>\r\n<#assign _size=\"20\"/>\r\n<#if column?? && column.categoryId gt 0 >\r\n <#assign _typeid=\"${column.categoryId}\">\r\n</#if>\r\n<#if typeid??>\r\n <#assign _typeid=\"${typeid}\">\r\n</#if>\r\n<#if size??>\r\n <#assign _size=\"${size}\">\r\n</#if>\r\n<#if orderby?? >\r\n <#if orderby==\"date\"> \r\n <#assign _orderby=\"basic_datetime\">\r\n <#elseif orderby==\"updatedate\">\r\n <#assign _orderby=\"basic_updatetime\">\r\n <#elseif orderby==\"hit\"> \r\n <#assign _orderby=\"basic_hit\">\r\n <#elseif orderby==\"sort\">\r\n <#assign _orderby=\"basic_sort\">\r\n <#else><#assign _orderby=\"basic_id\"></#if>\r\n <#else>\r\n <#assign _orderby=\"basic_id\">\r\n </#if>\r\nSELECT\r\n basic_id AS id,\r\n @rownum := @rownum + 1 AS `index`,\r\n LEFT (basic_title, ${titlelen ?default(40)}) AS title,\r\n basic_title AS fulltitle,\r\n article_author AS author,\r\n article_source AS source,\r\n article_content AS content,\r\n category.category_title AS typename,\r\n category.category_id AS typeid,\r\n category.category_smallimg AS typelitpic,\r\n <#--列表页动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\"/${modelName}/list.do?typeid=\", category.category_id) as typelink,\r\n <#else>\r\n (SELECT \"index.html\") AS typelink,\r\n </#if>\r\n basic.basic_thumbnails AS litpic,\r\n <#--内容页动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\"/${modelName}/view.do?id=\", basic_id,\"&orderby=${_orderby}\",\"&order=${order!\'ASC\'}\") as link,\r\n <#else>\r\n\r\n CONCAT(basic_column.column_path,\"/\",basic_id,\".html\") AS link,\r\n </#if>\r\n basic_datetime AS date,<#if tableName??>${tableName}.*,</#if>\r\n basic_description AS descrip,\r\n basic_hit AS hit,\r\n article_type AS flag,\r\n category_title AS typetitle,\r\n cms_article.article_keyword AS keyword \r\nFROM\r\n (SELECT @rownum := 0) r,\r\n basic\r\n LEFT JOIN cms_article ON cms_article.article_basicid = basic.basic_id\r\n LEFT JOIN category ON basic_categoryid = category.category_id\r\n LEFT JOIN basic_column ON basic_column.column_category_id = basic.basic_categoryid \r\n <#--判断是否有自定义模型表-->\r\n <#if tableName??>LEFT JOIN ${tableName} ON ${tableName}.basicId=cms_article.article_basicid </#if>\r\nWHERE \r\n basic.basic_display=0 \r\n <#--根据站点编号查询-->\r\n <#if appId?? >\r\n and (basic.basic_appid=${appId} or cms_article.ARTICLE_WEBID=${appId})\r\n and cms_article.article_basicid>0\r\n </#if>\r\n <#--根据模块编号查询分类-->\r\n <#if column?? && column.categoryModelId?has_content>\r\n and category_modelid=${column.categoryModelId}\r\n </#if>\r\n <#--判断是否有搜索分类集合-->\r\n <#if search??>\r\n <#if search.categoryIds??>and FIND_IN_SET(category_categoryid,\'${search.categoryIds}\')</#if>\r\n <#--标题-->\r\n <#if search.basic_title??> and basic_title like CONCAT(\"%\",\'${search.basic_title}\',\"%\")</#if>\r\n <#--作者-->\r\n <#if search.article_author??> and article_author like CONCAT(\"%\",\'${search.article_author}\',\"%\")</#if>\r\n <#--来源-->\r\n <#if search.article_source??> and article_source like CONCAT(\"%\",\'${search.article_source}\',\"%\")</#if>\r\n <#--属性-->\r\n <#if search.article_type??> and article_type like CONCAT(\"%\",\'${search.article_type}\',\"%\")</#if>\r\n <#--图片-->\r\n <#if search.basic_thumbnails??> and basic_thumbnails like CONCAT(\"%\",\'${search.basic_thumbnails}\',\"%\")</#if>\r\n <#--描述-->\r\n <#if search.basic_description??> and basic_description like CONCAT(\"%\",\'${search.basic_description}\',\"%\")</#if>\r\n <#--关键字-->\r\n <#if search.article_keyword??> and article_keyword like CONCAT(\"%\",\'${search.article_keyword}\',\"%\")</#if>\r\n <#--内容-->\r\n <#if search.article_content??> and article_content like CONCAT(\"%\",\'${search.article_content}\',\"%\")</#if>\r\n <#--自定义顺序-->\r\n <#if search.article_freeorder??> and article_freeorder=${search.article_freeorder}</#if>\r\n <#else><#--查询栏目-->\r\n <#if _typeid?has_content> and (basic_categoryid=${_typeid} or basic_categoryid in \r\n (select category_id FROM category where category.del=0 and find_in_set(${_typeid},CATEGORY_PARENT_ID))) </#if>\r\n </#if>\r\n <#--标题-->\r\n <#if basic_title??> and basic_title like CONCAT(\"%\",\'${basic_title}\',\"%\")</#if>\r\n <#--作者-->\r\n <#if article_author??> and article_author like CONCAT(\"%\",\'${article_author}\',\"%\")</#if>\r\n <#--来源-->\r\n <#if article_source??> and article_source like CONCAT(\"%\",\'${article_source}\',\"%\")</#if>\r\n <#--属性-->\r\n <#if article_type??> and article_type like CONCAT(\"%\",\'${article_type}\',\"%\")</#if>\r\n <#--图片-->\r\n <#if basic_thumbnails??> and basic_thumbnails like CONCAT(\"%\",\'${basic_thumbnails}\',\"%\")</#if>\r\n <#--描述-->\r\n <#if basic_description??> and basic_description like CONCAT(\"%\",\'${basic_description}\',\"%\")</#if>\r\n <#--关键字-->\r\n <#if article_keyword??> and article_keyword like CONCAT(\"%\",\'${article_keyword}\',\"%\")</#if>\r\n <#--内容-->\r\n <#if article_content??> and article_content like CONCAT(\"%\",\'${article_content}\',\"%\")</#if>\r\n <#--自定义顺序-->\r\n <#if article_freeorder??> and article_freeorder=${article_freeorder}</#if>\r\n <#--自定义模型-->\r\n <#if diyModel??> \r\n <#list diyModel as dm>\r\n and ${tableName}.${dm.key} = \"${dm.value}\" \r\n </#list>\r\n </#if>\r\n <#--文章属性-->\r\n <#if flag?? >\r\n and cms_article.article_type like CONCAT(\'%\',\'${flag}\',\'%\') \r\n </#if>\r\n <#if noflag?? >\r\n and cms_article.article_type not like CONCAT(\'%\',\'${noflag}\',\'%\') \r\n </#if>\r\n <#--字段排序-->\r\n <#if orderby?? >\r\n ORDER BY \r\n <#if orderby==\"date\"> basic.basic_datetime\r\n <#elseif orderby==\"updatedate\"> basic.basic_updatetime\r\n <#elseif orderby==\"hit\"> basic.basic_hit\r\n <#elseif orderby==\"sort\"> basic.basic_sort\r\n <#else>basic.basic_id</#if>\r\n <#else>\r\n ORDER BY basic.basic_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>\r\n LIMIT \r\n <#--判断是否分页-->\r\n <#if ispaging?? && (pageTag.pageNo)??>${((pageTag.pageNo-1)*_size?eval)?c},${_size?default(20)}\r\n <#else>${_size?default(20)}</#if>', '1');
INSERT INTO `mdiy_tag_sql` VALUES ('6', '4', '<#assign _typeid=\"\"/>\r\n<#if column?? && column.categoryId gt 0>\r\n <#assign _typeid=\"${column.categoryId}\">\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 category_id as id,\r\n category_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 _typeid?has_content>${_typeid}<#else>0</#if> = category_id ,\"${class!\'\'}\",\"\") as class,\r\n <#--动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\"/${modelName}/list.do?typeid=\", category_id) as typelink,\r\n <#else>\r\n CONCAT(column_path,\"/index.html\") as typelink,\r\n </#if>\r\n column_keyword as typekeyword,\r\n column_diy_url as typeurl,\r\n column_flag as flag,\r\n column_descrip as typedescrip,\r\n category_smallimg as typelitpic \r\n from (SELECT @rownum := 0) r,category \r\n LEFT JOIN basic_column bc on bc.column_category_id=category.category_id where \r\n category.del=0 \r\n <#--根据站点编号查询-->\r\n <#if appId?? >\r\n and category.category_appid=${appId}\r\n </#if>\r\n <#--根据模块编号查询分类-->\r\n <#if column?? && column.categoryModelId?has_content>\r\n and category_modelid=${column.categoryModelId}\r\n </#if>\r\n <#--栏目属性-->\r\n <#if flag?? >\r\n and bc.column_flag like CONCAT(\'%\',\'${flag}\',\'%\') \r\n </#if>\r\n <#if noflag?? >\r\n and bc.column_flag not like CONCAT(\'%\',\'${noflag}\',\'%\') \r\n </#if>\r\n<#if type?has_content>\r\n <#--顶级栏目(单个)-->\r\n <#if type==\"top\">\r\n and category_id=(select left(category_parent_id,LOCATE(\",\",category_parent_id)-1) from category where category_id = ${_typeid})\r\n <#elseif type==\"nav\">\r\n and(category_categoryid=0 or category_categoryid is null)\r\n <#--同级栏目(多个)-->\r\n <#elseif type==\"level\">\r\n and\r\n <#if _typeid?has_content>\r\n category_categoryid=(select category_categoryid from category where category_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 category_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 category_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_categoryid=${_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.categoryCategoryId?? && column.categoryCategoryId!=0>\r\n category_id=${column.categoryCategoryId}\r\n <#else>\r\n category_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_categoryid= if((SELECT count(*) FROM category\r\n LEFT JOIN basic_column bc ON bc.column_category_id = category.category_id \r\n WHERE category_categoryid=${_typeid})>0,${_typeid},(select category_categoryid from category where category_id=${_typeid}))\r\n <#else>\r\n 1=1\r\n </#if>\r\n </#if>\r\n<#else> <#--默认son-->\r\n and\r\n <#if _typeid?has_content>\r\n category_categoryid=${_typeid}\r\n <#else>\r\n (category_categoryid=0 or category_categoryid is null)\r\n </#if>\r\n</#if>', '1');
INSERT INTO `mdiy_tag_sql` VALUES ('7', '5', 'select \r\nAPP_NAME as name,\r\napp_logo as logo,\r\napp_keyword as keyword,\r\napp_description as descrip,\r\napp_copyright as copyright,\r\n<#--动态解析 -->\r\n<#if isDo?? && isDo>\r\n\"${url}\" as url,\r\n\"${url}\" as host,\r\n<#--使用地址栏的域名 -->\r\n<#elseif url??>\r\nCONCAT(\"${url}\",\"/${html}/\",app_id,\"/<#if m??>${m}</#if>\") as url,\r\n\"${url}\" as host,\r\n<#else>\r\nCONCAT(REPLACE(REPLACE(TRIM(substring_index(app_url,\"\\n\",1)), CHAR(10),\'\'), CHAR(13),\'\'),\"/html/\",app_id,\"/<#if m??>${m}</#if>\") as url,\r\nREPLACE(REPLACE(TRIM(substring_index(app_url,\"\\n\",1)), CHAR(10),\'\'), CHAR(13),\'\') as host,\r\n</#if>\r\nCONCAT(\"templets/\",app_id,\"/\",<#if m??>CONCAT(app_style,\"/${m}\")<#else>app_style</#if>) as style <#-- 判断是否为手机端 -->\r\nfrom app where app_id = ${appId} limit 1', '1');
INSERT INTO `mdiy_tag_sql` VALUES ('8', '7', 'SELECT \r\nbasic_id as id,\r\nleft(basic_title,${titlelen?default(40)}) as title,\r\nbasic_title as fulltitle,\r\narticle_author as author, \r\narticle_source as source, \r\narticle_content as content,\r\ncategory.category_title as typetitle,\r\ncategory.category_id as typeid,\r\ncategory.category_smallimg AS typelitpic,\r\n<#--动态链接-->\r\n<#if isDo?? && isDo>\r\nCONCAT(\"/${modelName}/list.do?typeid=\", category.category_id) as typelink,\r\n<#else>\r\n(SELECT \"index.html\") as typelink,\r\n</#if>\r\nbasic.basic_thumbnails as litpic,\r\n<#--内容页动态链接-->\r\n<#if isDo?? && isDo>\r\nCONCAT(\"/mcms/view.do?id=\", basic_id) as link,\r\n<#else>\r\ncms_article.article_url AS link,\r\n</#if>\r\nbasic_datetime as date,\r\nbasic_description as descrip,\r\nCONCAT(\"<script type=\'text/javascript\' src=\'${url}/basic/\",basic_id,\"/hit.do\'></script>\") as hit,\r\narticle_type as flag,\r\ncategory_title as typetitle,\r\n<#if tableName??>${tableName}.*,</#if>\r\ncms_article.article_keyword as keyword\r\nFROM basic LEFT JOIN cms_article ON cms_article.article_basicid = basic.basic_id \r\nLEFT JOIN category ON basic_categoryid=category.category_id \r\nLEFT JOIN basic_column ON basic_column.column_category_id=basic.basic_categoryid\r\n<#--判断是否有自定义模型表-->\r\n<#if tableName??>left join ${tableName} on ${tableName}.basicId=cms_article.ARTICLE_BASICID</#if>\r\nWHERE \r\n1=1\r\n<#if id??> and basic_id=${id}</#if>', '1');
INSERT INTO `mdiy_tag_sql` VALUES ('9', '8', '<#assign select=\"(SELECT \'\')\"/>\r\n<#if orderby?? >\r\n <#if orderby==\"date\"> \r\n <#assign _orderby=\"basic_datetime\">\r\n <#elseif orderby==\"updatedate\">\r\n <#assign _orderby=\"basic_updatetime\">\r\n <#elseif orderby==\"hit\"> \r\n <#assign _orderby=\"basic_hit\">\r\n <#elseif orderby==\"sort\">\r\n <#assign _orderby=\"basic_sort\">\r\n <#else><#assign _orderby=\"basic_id\"></#if>\r\n <#else>\r\n <#assign _orderby=\"basic_id\">\r\n </#if>\r\n<#if (pageTag.preId) gt 0>\r\nSELECT \r\nbasic_id as id,\r\nleft(basic_title,${titlelen?default(40)}) as title,\r\nbasic_title as fulltitle,\r\narticle_author as author, \r\narticle_source as source, \r\narticle_content as content,\r\ncategory.category_title as typename,\r\ncategory.category_id as typeid,\r\n(SELECT \"index.html\") AS typelink,\r\nbasic.basic_thumbnails as litpic,\r\n<#--内容页动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\"/${modelName}/view.do?id=\", basic_id,\"&orderby=${_orderby}\",\"&order=${order!\'ASC\'}\") as link,\r\n <#else>\r\n CONCAT(basic_column.column_path,\"/\",basic_id,\".html\") AS link,\r\n </#if>\r\nbasic_datetime as date,\r\nbasic_description as descrip,\r\nbasic_hit as hit,\r\narticle_type as flag,\r\ncms_article.article_keyword as keyword \r\nFROM basic LEFT JOIN cms_article ON cms_article.article_basicid = basic.basic_id \r\nLEFT JOIN category ON basic_categoryid=category.category_id \r\nLEFT JOIN basic_column ON basic_column.column_category_id=basic.basic_categoryid \r\nWHERE basic_id=${pageTag.preId}\r\n<#else><#--没有上一页返回空字符串-->\r\nSELECT \r\n${select} as id,\r\n${select} as title,\r\n${select} as fulltitle,\r\n${select} as author, \r\n${select} as source, \r\n${select} as content,\r\n${select} as typename,\r\n${select} as typeid,\r\n${select} as typelink,\r\n${select} as litpic,\r\n${select} as link,\r\n${select} as date,\r\n${select} as descrip,\r\n${select} as hit,\r\n${select} as flag,\r\n${select} as keyword FROM basic\r\n</#if>', null);
INSERT INTO `mdiy_tag_sql` VALUES ('10', '9', ' select\r\n <#if !(pageTag.indexUrl??)>\r\n <#--判断是否有栏目对象,用于搜索不传栏目-->\r\n <#if column??>\r\n <#--顶级栏目处理-->\r\n <#if column.categoryCategoryId==0>\r\n <#assign path=column.columnPath/>\r\n <#else>\r\n <#assign path=column.columnPath/>\r\n </#if>\r\n <#else>\r\n <#assign path=\"\"/>\r\n </#if>\r\n <#--总记录数、总页数-->\r\n (SELECT ${pageTag.total}) as total,\r\n <#--记录总数-->\r\n (SELECT ${pageTag.size}) as rcount,\r\n <#--当前页码-->\r\n (SELECT ${pageTag.pageNo}) as cur,\r\n <#--首页-->\r\n CONCAT(\"${path}\", \"/index.html\") as `index`,\r\n <#--上一页-->\r\n <#if (pageTag.pageNo?eval-1) gt 1>\r\n CONCAT(\"${path}\",\"/list-${pageTag.pageNo?eval-1}.html\") as pre,\r\n <#else>\r\n CONCAT(\"${path}\",\"/index.html\") as pre,\r\n </#if>\r\n <#--下一页-->\r\n <#if pageTag.total==1>\r\n CONCAT(\"${path}\", \"/index.html\") as `next`,\r\n CONCAT(\"${path}\", \"/index.html\") as `last`\r\n <#else>\r\n <#if pageTag.pageNo?eval gte pageTag.total>\r\n CONCAT(\"${path}\",\"/list-${pageTag.total}.html\") as next,\r\n <#else>\r\n CONCAT(\"${path}\",\"/list-${pageTag.pageNo?eval+1}.html\") as next,\r\n </#if>\r\n <#--最后一页-->\r\n CONCAT(\"${path}\",\"/list-${pageTag.total}.html\") as last\r\n </#if>\r\n<#else><#--判断是否是搜索页面-->\r\n \"${pageTag.indexUrl}\" as `index`,\"${pageTag.lastUrl}\" as `last`,\"${pageTag.preUrl}\" as `pre`,\"${pageTag.nextUrl}\" as `next`,\'${pageTag.total}\' as total,\'${pageTag.size}\' as rcount,\'${pageTag.pageNo}\' as cur\r\n</#if>', null);
INSERT INTO `mdiy_tag_sql` VALUES ('11', '10', '<#assign select=\"(SELECT \'\')\"/>\r\n<#if orderby?? >\r\n <#if orderby==\"date\"> \r\n <#assign _orderby=\"basic_datetime\">\r\n <#elseif orderby==\"updatedate\">\r\n <#assign _orderby=\"basic_updatetime\">\r\n <#elseif orderby==\"hit\"> \r\n <#assign _orderby=\"basic_hit\">\r\n <#elseif orderby==\"sort\">\r\n <#assign _orderby=\"basic_sort\">\r\n <#else><#assign _orderby=\"basic_id\"></#if>\r\n <#else>\r\n <#assign _orderby=\"basic_id\">\r\n </#if>\r\n<#if (pageTag.nextId) gt 10>\r\nSELECT \r\nbasic_id as id,\r\nleft(basic_title,${titlelen?default(40)}) as title,\r\nbasic_title as fulltitle,\r\narticle_author as author, \r\narticle_source as source, \r\narticle_content as content,\r\ncategory.category_title as typename,\r\ncategory.category_id as typeid,\r\n(SELECT \"index.html\") as typelink,\r\nbasic.basic_thumbnails as litpic,\r\n<#--内容页动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\"/${modelName}/view.do?id=\", basic_id,\"&orderby=${_orderby}\",\"&order=${order!\'ASC\'}\") as link,\r\n <#else>\r\n CONCAT(basic_column.column_path,\"/\",basic_id,\".html\") AS link,\r\n </#if>\r\nbasic_datetime as date,\r\nbasic_description as descrip,\r\nbasic_hit as hit,\r\narticle_type as flag,\r\ncms_article.article_keyword as keyword \r\nFROM basic LEFT JOIN cms_article ON cms_article.article_basicid = basic.basic_id \r\nLEFT JOIN category ON basic_categoryid=category.category_id \r\nLEFT JOIN basic_column ON basic_column.column_category_id=basic.basic_categoryid \r\nWHERE basic_id=${pageTag.nextId}\r\n<#else>\r\nSELECT \r\n${select} as id,\r\n${select} as title,\r\n${select} as fulltitle,\r\n${select} as author, \r\n${select} as source, \r\n${select} as content,\r\n${select} as typename,\r\n${select} as typeid,\r\n${select} as typelink,\r\n${select} as litpic,\r\n${select} as link,\r\n${select} as date,\r\n${select} as descrip,\r\n${select} as hit,\r\n${select} as flag,\r\n${select} as keyword FROM basic\r\n</#if>', null);
INSERT INTO `mdiy_tag_sql` VALUES ('13', '12', 'SELECT\r\n basic_id AS id,\r\n product_price as price,\r\n product_cost_price AS costprice,\r\n product_content AS content,\r\n product_code AS code,\r\n <#--详情页动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\"/${modelName}/view.do?id=\", basic_id) as link,\r\n <#else>\r\n product_linkUrl AS link,\r\n </#if>\r\n basic_title AS title,\r\n product_sale AS sale,\r\n product_good AS specification,\r\n product_inventory AS stock,\r\n basic.basic_categoryid AS typeid,\r\n basic_thumbnails AS litpic,\r\n <#--列表页动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\"/mmall/list.do?typeid=\", category.category_id) as typelink,\r\n <#else>\r\n (SELECT \"index.html\") AS typelink,\r\n </#if>\r\n <#--判断是否有自定义模型表-->\r\n <#if tableNname??>${tableNname}.*,</#if>\r\n category_title AS typetitle\r\nFROM\r\n mall_product \r\n LEFT JOIN basic ON mall_product.product_basicID = basic.basic_id\r\n LEFT JOIN category ON basic_categoryid = category.category_id\r\n <#--判断是否有自定义模型表-->\r\n <#if tableNname??>LEFT JOIN ${tableNname} ON ${tableNname}.basicId=mall_product.product_basicID </#if>\r\nWHERE\r\n 1 = 1 <#--查询栏目-->\r\n <#if (typeid)??> and (basic_categoryid=${typeid} or basic_categoryid in \r\n (select category_id FROM category where find_in_set(${typeid},CATEGORY_PARENT_ID)))\r\n </#if>\r\n <#--模糊查询商品标题-->\r\n <#if basic_title??> and basic_title like CONCAT(\"%\",\'${basic_title}\',\"%\")</#if> \r\n LIMIT <#--判断是否分页-->\r\n <#if ispaging?? && pageNo??>${(pageNo?eval-1)*size?eval},${size?default(20)}\r\n <#else>${size?default(20)}</#if>', null);
INSERT INTO `mdiy_tag_sql` VALUES ('14', '13', 'SELECT\r\n basic_id AS id,\r\n product_price as price,\r\n product_cost_price AS costprice,\r\n product_content AS content,\r\n product_code AS code,\r\n <#--详情页动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\"/${modelName}/view.do?id=\", basic_id) as link,\r\n <#else>\r\n product_linkUrl AS link,\r\n </#if>\r\n basic_title AS title,\r\n product_sale AS sale,\r\n product_good AS specification,\r\n product_inventory AS stock,\r\n basic.basic_categoryid AS typeid,\r\n basic_thumbnails AS litpic,\r\n <#--列表页动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\"/mmall/list.do?id=\", category.category_id) as typelink,\r\n <#else>\r\n (SELECT \"index.html\") AS typelink,\r\n </#if>\r\n <#--判断是否有自定义模型表-->\r\n <#if tableNname??>${tableNname}.*,</#if>\r\n category_title AS typetitle\r\nFROM\r\n mall_product \r\n LEFT JOIN basic ON mall_product.product_basicID = basic.basic_id\r\n LEFT JOIN category ON basic_categoryid = category.category_id\r\n LEFT JOIN basic_column ON basic_column.column_category_id = basic.basic_categoryid\r\n <#--判断是否有自定义模型表-->\r\n <#if tableNname??>LEFT JOIN ${tableNname} ON ${tableNname}.basicId=mall_product.product_basicID </#if>\r\nWHERE\r\n 1 = 1 <#if id??> and basic_id=${id} </#if>', null);
SET FOREIGN_KEY_CHECKS = 1;
\ No newline at end of file
UPDATE `model` SET `model_icon` = 'icon-neirongguanli' WHERE `model_id` = 1;
UPDATE `model` SET `model_icon` = 'icon-huiyuanzhongxin' WHERE `model_id` = 22;
UPDATE `model` SET `model_icon` = 'icon-quanxianguanli' WHERE `model_id` = 23;
UPDATE `model` SET `model_icon` = 'icon-xitongguanli' WHERE `model_id` = 84;
UPDATE `model` SET `model_icon` = 'icon-zidingyiguanli' WHERE `model_id` = 104;
UPDATE `mdiy_tag_sql` SET `tag_sql`='<#assign _typeid=\"\"/>\r\n<#if column?? && column.categoryId gt 0>\r\n <#assign _typeid=\"${column.categoryId}\">\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 category_id as id,\r\n category_id as typeid,\r\n category_title as typetitle,\r\n (select count(*) from category c where c.category_categoryid=typeid and c.del=0) as childsize,\r\n <#--返回父id集合-->\r\n category_parent_id as pids,\r\n <#--栏目选中的样式-->\r\n IF(<#if column?? && column.categoryId gt 0>${column.categoryId}<#else>${_typeid}</#if> = category_id ,\"${class!\'\'}\",\"\") as class,\r\n <#--动态链接-->\r\n <#if isDo?? && isDo>\r\n CONCAT(\"/${modelName}/list.do?typeid=\", category_id) as typelink,\r\n <#else>\r\n CONCAT(column_path,\"/index.html\") as typelink,\r\n </#if>\r\n column_keyword as typekeyword,\r\n column_diy_url as typeurl,\r\n column_flag as flag,\r\n column_descrip as typedescrip,\r\n category_smallimg as typelitpic \r\n from (SELECT @rownum := 0) r,category \r\n LEFT JOIN basic_column bc on bc.column_category_id=category.category_id where \r\n category.del=0 \r\n <#--根据站点编号查询-->\r\n <#if appId?? >\r\n and category.category_appid=${appId}\r\n </#if>\r\n <#--根据模块编号查询分类-->\r\n <#if column?? && column.categoryModelId?has_content>\r\n and category_modelid=${column.categoryModelId}\r\n </#if>\r\n <#--栏目属性-->\r\n <#if flag?? && flag != \'\'>\r\n and bc.column_flag like CONCAT(\'%\',\'${flag}\',\'%\') \r\n </#if>\r\n <#if noflag?? && noflag != \'\'>\r\n and bc.column_flag not like CONCAT(\'%\',\'${noflag}\',\'%\') \r\n </#if>\r\n<#if type?has_content>\r\n <#--顶级栏目(单个)-->\r\n <#if type==\"top\">\r\n and category_id=(select left(category_parent_id,LOCATE(\",\",category_parent_id)-1) from category where category_id = ${_typeid})\r\n <#elseif type==\"nav\">\r\n and(category_categoryid=0 or category_categoryid is null)\r\n <#--同级栏目(多个)-->\r\n <#elseif type==\"level\">\r\n and\r\n <#if _typeid?has_content>\r\n category_categoryid=(select category_categoryid from category where category_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 category_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 category_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_categoryid=${_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.categoryCategoryId?? && column.categoryCategoryId!=0>\r\n category_id=${column.categoryCategoryId}\r\n <#else>\r\n category_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_categoryid= if((SELECT count(*) FROM category\r\n LEFT JOIN basic_column bc ON bc.column_category_id = category.category_id \r\n WHERE category_categoryid=${_typeid})>0,${_typeid},(select category_categoryid from category where category_id=${_typeid}))\r\n <#else>\r\n 1=1\r\n </#if>\r\n </#if>\r\n<#else> <#--默认son-->\r\n and\r\n <#if _typeid?has_content>\r\n category_categoryid=${_typeid}\r\n <#else>\r\n (category_categoryid=0 or category_categoryid is null)\r\n </#if>\r\n</#if>\r\n<#if order?? >\r\n <#if order==\"desc\"> desc</#if>\r\n <#if order==\"asc\"> asc</#if>\r\n </#if>' WHERE (`id`='6')
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
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">
<modelVersion>4.0.0</modelVersion>
<groupId>net.mingsoft</groupId>
<artifactId>mcms</artifactId>
<version>4.7.0-SNAPSHOT</version>
<name>ms-mcms</name>
<properties>
<java.version>1.8</java.version>
</properties>
<repositories>
<repository>
<id>sonatype-nexus-snapshots</id>
<name>Sonatype Nexus Snapshots</name>
<url>http://repo1.maven.org/maven2/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>sonatype</id>
<name>Sonatype Snapshots</name>
<url>https://oss.sonatype.org/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>net.mingsoft</groupId>
<artifactId>ms-mpeople</artifactId>
<version>1.0.7</version>
</dependency>
<dependency>
<groupId>net.mingsoft</groupId>
<artifactId>ms-upgrader</artifactId>
<version>1.0.5-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<version>9.0.16</version>
</dependency>
</dependencies>
<build>
<finalName>ms-mcms</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
<configuration>
<fork>true</fork>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<!-- 打包时候需需要启用,注意避免快照依赖的冗余jar包 -->
<!-- outputFileNameMapping>@{artifactId}@- @{baseVersion}@. @{extension}@</outputFileNameMapping -->
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/webapp</directory>
</resource>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>src/main/java</directory>
</resource>
</resources>
<defaultGoal>compile</defaultGoal>
</build>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
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">
<parent>
<groupId>net.mingsoft</groupId>
<artifactId>ms-pom</artifactId>
<version>1.0.0</version>
<relativePath/>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>net.mingsoft</groupId>
<artifactId>ms-mcms</artifactId>
<version>5.0.0</version>
<name>${project.groupId}:${project.artifactId}</name>
<description>ms-mcms tools Library</description>
<url>https://github.com/ming-soft/ms-mcms</url>
<licenses>
<license>
<name>The MIT License (MIT)</name>
<url>http://mit-license.org</url>
</license>
</licenses>
<developers>
<developer>
<name>mingsoft develop group</name>
<email>service@mingsoft.net</email>
<organization>mingsoft</organization>
<organizationUrl>http://www.mingsoft.net</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git://github.com/ming-soft/ms-mcms.git</connection>
<developerConnection>scm:git@github.com:ming-soft/ms-mcms.git</developerConnection>
<url>https://github.com/ming-soft/ms-mcms</url>
</scm>
<distributionManagement>
<snapshotRepository>
<id>sonatype-nexus-snapshots</id>
<name>Sonatype Nexus snapshot repository</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>sonatype-nexus-staging</id>
<name>Sonatype Nexus release repository</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<properties>
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<!-- 如果使用的是mysql8.0需要使用8.0的驱动 -->
<!-- <dependency>-->
<!-- <groupId>mysql</groupId>-->
<!-- <artifactId>mysql-connector-java</artifactId>-->
<!-- <version>8.0.11</version>-->
<!-- </dependency>-->
<dependency>
<groupId>net.mingsoft</groupId>
<artifactId>ms-mpeople</artifactId>
</dependency>
<dependency>
<groupId>net.mingsoft</groupId>
<artifactId>ms-upgrader</artifactId>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/java</directory>
</resource>
<resource>
<directory>src/main/webapp</directory>
<excludes>
<exclude>html/</exclude>
<exclude>static/</exclude>
<exclude>upload/</exclude>
<exclude>templets/</exclude>
</excludes>
</resource>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<excludes>
<!--注意这玩意从编译结果目录开始算目录结构 -->
<exclude>**/static/plugins/</exclude>
<exclude>**/static/skin/</exclude>
<exclude>**/Dockerfile</exclude>
<exclude>**/ehcache.xml</exclude>
<exclude>**/upgrade/</exclude>
<exclude>**/*.java</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<configuration>
<excludes>
<exclude>**/static/plugins/</exclude>
<exclude>**/static/skin/</exclude>
<exclude>**/application*.yml</exclude>
<exclude>**/Dockerfile</exclude>
<exclude>**/ehcache.xml</exclude>
<exclude>**/upgrade/</exclude>
<exclude>**/config/</exclude>
<exclude>**/MSApplication.java</exclude>
<exclude>**/MSServletInitializer.java</exclude>
</excludes>
</configuration>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.8</version>
<configuration>
<additionalConfig>
<file>
<name>.settings/org.eclipse.core.resources.prefs</name>
<content>
<![CDATA[
eclipse.preferences.version=1
encoding/<project>=${project.build.sourceEncoding}
]]>
</content>
</file>
</additionalConfig>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Xmx256m</argLine>
</configuration>
</plugin>
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-clover2-plugin</artifactId>
<version>2.6.3</version>
<configuration>
<licenseLocation>${clover.license.file}</licenseLocation>
<encoding>${project.build.sourceEncoding}</encoding>
<generateXml>true</generateXml>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>1.2</version>
<configuration>
<findbugsXmlOutput>true</findbugsXmlOutput>
<findbugsXmlWithMessages>true</findbugsXmlWithMessages>
<xmlOutput>true</xmlOutput>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<charset>UTF-8</charset>
<encoding>UTF-8</encoding>
<docencoding>UTF-8</docencoding>
<javadocExecutable>${java.home}/../bin/javadoc</javadocExecutable>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<webResources>
<resource>
<directory>src/main/webapp/WEB-INF</directory>
<targetPath>WEB-INF</targetPath>
<filtering>true</filtering>
<includes>
<include>**/*.xml</include>
</includes>
<excludes>
<exclude>web.xml</exclude>
</excludes>
</resource>
</webResources>
<attachClasses>true</attachClasses>
<warSourceExcludes>*/web.xml,static</warSourceExcludes>
<failOnMissingWebXml>false</failOnMissingWebXml>
<packagingExcludes>
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
</packagingExcludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<arguments>-Dgpg.passphrase=${gpg.passphrase}</arguments>
</configuration>
</plugin>
</plugins>
<defaultGoal>compile</defaultGoal>
<finalName>ms-mcms</finalName>
</build>
</project>
......@@ -13,7 +13,6 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@ComponentScan(basePackages = {"net.mingsoft"})
@MapperScan(basePackages={"**.dao"})
@ServletComponentScan(basePackages = {"net.mingsoft"})
@EnableSwagger2
public class MSApplication {
public static void main(String[] args) {
SpringApplication.run(MSApplication.class, args);
......
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