Compare commits
24 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a872b9e02e | ||
|
|
4ef6d1a981 | ||
|
|
6959238eec | ||
|
|
a94de0c372 | ||
|
|
1d250a126a | ||
|
|
57f67c0a0e | ||
|
|
7dc85de589 | ||
|
|
ebf7b52656 | ||
|
|
021672b180 | ||
|
|
0c84378419 | ||
|
|
968e5fe357 | ||
|
|
bc66796ca7 | ||
|
|
c16e81b410 | ||
|
|
8a64867ed3 | ||
|
|
43a6f86115 | ||
|
|
38f8c6cda3 | ||
|
|
41db27ae0d | ||
|
|
90ec91cc69 | ||
|
|
1ce27089e2 | ||
|
|
8ebb5b07f6 | ||
|
|
2717f036ec | ||
|
|
34125ee274 | ||
|
|
7d6e99c8fb | ||
|
|
d9e18a70c7 |
11
.gitignore
vendored
11
.gitignore
vendored
@@ -2,23 +2,18 @@
|
||||
**/target
|
||||
**/webapp/userfiles
|
||||
**/WEB-INF/classes
|
||||
**/transaction-logs
|
||||
**/logs/*.log*
|
||||
*.epoch
|
||||
*.lic
|
||||
|
||||
.settings
|
||||
.apt_generated
|
||||
.factorypath
|
||||
.classpath
|
||||
.project
|
||||
.vscode
|
||||
|
||||
.idea
|
||||
*.ipr
|
||||
*.iml
|
||||
*.iws
|
||||
*.lic
|
||||
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
rebel.xml
|
||||
|
||||
*.epoch
|
||||
2
.settings/org.eclipse.core.resources.prefs
Normal file
2
.settings/org.eclipse.core.resources.prefs
Normal file
@@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
||||
4
.settings/org.eclipse.m2e.core.prefs
Normal file
4
.settings/org.eclipse.m2e.core.prefs
Normal file
@@ -0,0 +1,4 @@
|
||||
activeProfiles=
|
||||
eclipse.preferences.version=1
|
||||
resolveWorkspaceProjects=true
|
||||
version=1
|
||||
3
LICENSE
3
LICENSE
@@ -877,5 +877,4 @@ For more information on this, and how to apply and follow the GNU AGPL, see
|
||||
理解您的用意。
|
||||
5. 在延伸的代码中(修改和有源代码衍生的代码中)需要带有原来代码中的协议、版权声明和其他
|
||||
原作者规定需要包含的说明(请尊重原作者的著作权,不要删除或修改文件中的`@author`信息)。
|
||||
6. 您可以应用于商业软件,但必须遵循以上条款原则(请协助改进本作品 http://jeesite.com)。
|
||||
7. 您若套用本平台的一些代码或功能参考,需要在您的软件介绍明显位置说明出处。
|
||||
6. 您可以应用于商业软件,但必须遵循以上条款原则(请协助改进本作品)。
|
||||
|
||||
114
README.md
114
README.md
@@ -1,51 +1,46 @@
|
||||
# 引言
|
||||
|
||||
## 交流方式
|
||||
|
||||
* 交流 QQ 群(千人大群):`127515876`、`209330483`、`223507718`、`709534275`、`730390092`、`1373527`、`183903863(外包)`
|
||||
* 问题反馈:<https://gitee.com/thinkgem/jeesite4/issues> [【新手必读】](https://gitee.com/thinkgem/jeesite4/issues/I18ARR)
|
||||
* 码云Gitee:<https://gitee.com/thinkgem/jeesite4>
|
||||
* GitHub:<https://github.com/thinkgem/jeesite4>
|
||||
* 作者博客:<https://my.oschina.net/thinkgem>
|
||||
* **技术服务:**<http://s.jeesite.com>
|
||||
* 官方网站:<http://jeesite.com>
|
||||
* 官方论坛:<http://jeesite.net>
|
||||
* 关注微信公众号,了解最新动态:
|
||||
|
||||

|
||||
|
||||
## 平台介绍
|
||||
|
||||
JeeSite 快速开发平台,不仅仅是一个后台开发框架,它是一个企业级快速开发解决方案,基于经典技术组合(Spring Boot、Spring MVC、Apache Shiro、MyBatis、Beetl、Bootstrap、AdminLTE)采用经典开发模式,让初学者能够更快的入门并投入到团队开发中去。在线代码生成功能,包括模块如:组织机构、角色用户、菜单及按钮授权、数据权限、系统参数、内容管理、工作流等。采用松耦合设计,模块增减便捷;界面无刷新,一键换肤;众多账号安全设置,密码策略;文件在线预览;消息推送;多元化第三方登录;在线定时任务配置;支持集群,支持SAAS;支持多数据源;支持读写分离、分库分表;支持微服务应用。
|
||||
JeeSite 是一个 Java EE 企业级快速开发平台,基于经典技术组合(Spring Boot、Spring MVC、Apache Shiro、MyBatis、Beetl、Bootstrap、AdminLTE),在线代码生成功能,包括核心模块如:组织机构、角色用户、菜单及按钮授权、数据权限、系统参数、内容管理、工作流等。采用松耦合设计;界面无刷新,一键换肤;众多账号安全设置,密码策略;在线定时任务配置;支持集群,支持SAAS;支持多数据源。
|
||||
|
||||
JeeSite 快速开发平台的主要目的是能够让初级的研发人员快速的开发出复杂的业务功能(经典架构会的人多),让开发者注重专注业务,其余有平台来封装技术细节,降低技术难度,从而节省人力成本,缩短项目周期,提高软件安全质量。
|
||||
|
||||
JeeSite 自 2013 年发布以来已被广大爱好者用到了企业、政府、医疗、金融、互联网等各个领域中,JeeSite 架构精良、易于扩展、大众思维的设计模式、工匠精神打磨每一个细节,深入开发者的内心,并荣获开源中国《最受欢迎中国开源软件》奖杯,期间也帮助了不少刚毕业的大学生,教师作为入门教材,快速的去实践。
|
||||
JeeSite 自开源以来已被广大爱好者用到了企业、政府、医疗、金融、互联网等各个领域中,JeeSite 依架构简单精良、易于扩展、大众思维的设计模式,深入开发者的内心,并得到一致好评,于[2016](http://www.oschina.net/project/top_cn_2016?sort=1)和[2017](http://www.oschina.net/project/top_cn_2017?sort=1)连续两年获得开源中国《最受欢迎中国开源软件》奖杯,期间也帮助了不少刚毕业的大学生作为入门教材,快速的去实践。
|
||||
|
||||
JeeSite4 的升级,作者结合了多年总结和经验,以及各方面的应用案例,对架构完成了一次全部重构,也纳入很多新的思想。不管是从开发者模式、底层架构、逻辑处理还是到用户界面,用户交互体验上都有很大的进步,在不忘学习成本、提高开发效率的情况下,安全方面也做和很多工作,包括:身份认证、密码策略、安全审计、日志收集。努力为大中小微企业打造全方位企业级快速开发解决方案。
|
||||
4.0的升级,作者结合了多年总结和经验,以及各方面的应用案例,对架构完成了一次全部重构,也纳入很多新的思想。不管是从开发者模式、底层架构、逻辑处理还是到用户界面,用户交互体验上都有很大的进步,在不忘学习成本、提高开发效率的情况下,安全方面也做和很多工作,包括:身份认证、密码策略、安全审计、日志收集。
|
||||
|
||||
学会使用 JeeSite 的知识点非常多,也非常少,因为她使用的都是一些通用的技术,通俗的设计风格,多数基础知识点大家都能掌握。 你只需要学会 JeeSite 的功能使用及组件应用就可以完成开发了。
|
||||
**我们的优势:** 架构清晰、技术先进、入门简单、易于维护、易于扩展、安全稳定。
|
||||
|
||||
### 4.x 的新特性及优势:<http://jeesite.com/docs/feature/>
|
||||
### 4.0 新特性
|
||||
|
||||
* <http://jeesite4.mydoc.io/?t=281645>
|
||||
|
||||
## 技术选型
|
||||
|
||||
* 主框架:Spring Boot 1.5、Spring Framework 4.3、Apache Shiro 1.6
|
||||
* 主框架:Spring Boot 1.5、Spring Framework 4.3、Apache Shiro 1.4
|
||||
* 持久层:Apache MyBatis 3.4、Hibernate Validation 5.3、Alibaba Druid 1.1
|
||||
* 视图层:Spring MVC 4.3、Beetl 2.7 替换JSP、Bootstrap 3.3、AdminLTE 2.4
|
||||
* 前端组件:jQuery 1.12、jqGrid 4.7、layer 3.0、zTree 3.5、jquery-validation
|
||||
* 工具组件:Apache Commons、Logback 1.1、Jackson 2.8、POI 3.14、Quartz 2.2
|
||||
* 技术选型详情:<http://jeesite.com/docs/technology/>
|
||||
|
||||
## 内置功能
|
||||
|
||||
* <http://jeesite.com/docs/function/>
|
||||
|
||||
## 生态系统
|
||||
|
||||
* 分布式微服务系统(Spring Cloud):<https://gitee.com/thinkgem/jeesite4-cloud>
|
||||
* JFlow工作流引擎:<https://gitee.com/thinkgem/jeesite4-jflow> :<http://ccflow.org>
|
||||
* Flowable业务流程模块(BPM):<http://jeesite.com/docs/bpm/>
|
||||
* 内容管理模块(CMS):<https://gitee.com/thinkgem/jeesite4-cms>
|
||||
* 乐云短信网关:SmsUtils.java :<http://www.lehuo520.cn>
|
||||
* 技术选型详情:<http://jeesite4.mydoc.io/?t=273599>
|
||||
|
||||
## 内置功能菜单
|
||||
|
||||
* <http://jeesite4.mydoc.io/?t=270187>
|
||||
|
||||
## 开发手册
|
||||
|
||||
* 持久层开发手册 (Dao):<http://jeesite4.mydoc.io/?t=267351>
|
||||
* 业务层开发手册 (Service):<http://jeesite4.mydoc.io/?t=267352>
|
||||
* 视图层开发手册 (WebView):<http://jeesite4.mydoc.io/?t=267353>
|
||||
* 权限管理应用基础 (Shiro):<http://jeesite4.mydoc.io/?t=298473>
|
||||
* 常用JS类库API (jeesite.js):<http://jeesite4.mydoc.io/?t=301473>
|
||||
* 数据表格API (DataGrid.js):<http://jeesite4.mydoc.io/?t=301488>
|
||||
* 修改 (默认) 视图,新增主题:<http://jeesite4.mydoc.io/?t=267355>
|
||||
* 手机 API 接口调用、前后分离:<http://jeesite4.mydoc.io/?t=270527>
|
||||
* 代码生成工具使用手册:<http://jeesite4.mydoc.io/?t=316743>
|
||||
* 常见问题:<http://jeesite4.mydoc.io/?t=284210>
|
||||
|
||||
# 快速体验
|
||||
|
||||
@@ -58,49 +53,56 @@ JeeSite4 的升级,作者结合了多年总结和经验,以及各方面的
|
||||
### 本地运行
|
||||
|
||||
1. 环境准备:`JDK 1.8`、`Maven 3.3`、`MySQL 5.7`
|
||||
2. 执行命令:`git clone https://gitee.com/thinkgem/jeesite4.git` 下载源码
|
||||
3. 打开文件:`/web/src/main/resources/config/jeesite.yml` 配置JDBC连接
|
||||
4. 执行脚本:`/web/bin/init-data.bat` 初始化数据库
|
||||
5. 执行脚本:`/web/bin/run-tomcat.bat` 启动服务即可
|
||||
2. 下载源码:<https://gitee.com/thinkgem/jeesite4/attach_files>
|
||||
3. 打开文件:/web`/src/main/resources/config/jeesite.yml` 配置JDBC连接
|
||||
4. 执行脚本:/web`/bin/init-data.bat` 初始化数据库
|
||||
5. 执行脚本:/web`/bin/run-tomcat.bat` 启动服务即可
|
||||
6. 浏览器访问:<http://127.0.0.1:8980/js/> 账号 system 密码 admin
|
||||
7. 部署常见问题:<http://jeesite.com/docs/faq/>
|
||||
7. 常见问题:<http://jeesite4.mydoc.io/?t=284210>
|
||||
|
||||
### 开发环境
|
||||
|
||||
1. 部署运行文档:<http://jeesite.com/docs/install-deploy/>
|
||||
2. 部署常见问题:<http://jeesite.com/docs/faq/>
|
||||
1. 部署运行:<http://jeesite4.mydoc.io/?t=267354>
|
||||
2. 常见问题:<http://jeesite4.mydoc.io/?t=284210>
|
||||
|
||||
## 在线文档
|
||||
# 今后如何升级?
|
||||
|
||||
* 在线文档学习地址:<http://docs.jeesite.com>
|
||||
尽量不修改web项目以外的源码项目,如 jeesite-common、jeesite-modele-core,如果修改了,请 Pull Requests 上来,否则代码编码将与官方不同步,将对你的日后升级带来困难。
|
||||
|
||||
## 技术服务与支持
|
||||
JeeSite的小版本(4.0.x)升级是非常便捷的,你只需要将 pom.xml 文件中的 parent.version 版本修改到最新版本即可,同版本下你可进行Maven快照强制更新,即可将最新版的依赖jar更新到本地,下面介绍一下在Eclipse里如何操作:
|
||||
|
||||
* 没有资金的支撑就很难得到发展,特别是一个好的产品,如果 JeeSite 帮助了您,请为我们点赞。支持我们,您可以得到一些回报,有了这些我们会把公益事业做的更好,回报社区和社会,请给我们一些动力吧,在此非常感谢已支持我们的朋友!
|
||||
* **联系方式(官方商务)QQ:[1766571055](http://wpa.qq.com/msgrd?v=3&uin=1766571055&site=qq&menu=yes)**
|
||||
* 技术服务支持网页:<http://s.jeesite.com>
|
||||
在web项目上右键,选择菜单 -> Maven -> Update Project...(或按Alt+F5) -> 点击 Select All 按钮 -> 选择 Force Update of Snapshots/Releases 复选框 -> 点击OK按钮即可。
|
||||
|
||||
## 授权协议声明
|
||||
如果进行相对大的版本(4.x.x)升级这里我们会附加一个声明,帮助你进行迁移操作。
|
||||
|
||||
# 授权协议声明
|
||||
|
||||
1. 已开源的代码,授权协议采用 AGPL v3 + Apache Licence v2 进行发行。
|
||||
2. 您可以免费使用、修改和衍生代码,但不允许修改后和衍生的代码做为闭源软件发布。
|
||||
3. 修改后和衍生的代码必须也按照AGPL协议进行流通,对修改后和衍生的代码必须向社会公开。
|
||||
4. 如果您修改了代码,需要在被修改的文件中进行说明,并遵守代码格式规范,帮助他人更好的理解您的用意。
|
||||
5. 在延伸的代码中(修改和有源代码衍生的代码中)需要带有原来代码中的协议、版权声明和其他原作者规定
|
||||
需要包含的说明(请尊重原作者的著作权,不要删除或修改文件中的`@author`信息)。
|
||||
5. 在延伸的代码中(修改和有源代码衍生的代码中)需要带有原来代码中的协议、版权声明和其他原作者规定需要包含的说明(请尊重原作者的著作权,不要删除或修改文件中的`@author`信息)。
|
||||
6. 您可以应用于商业软件,但必须遵循以上条款原则(请协助改进本作品)。
|
||||
7. 您若套用本平台的一些代码或功能参考,需要在您的软件介绍明显位置说明出处。
|
||||
8. **当前 v4.0.8 版本,没有系统用户数量限制,没有最大在线人数限制。**
|
||||
7. 关系平台的发展战略考虑,底层部分代码暂未开源,但这不影响您的二次开发。
|
||||
8. 请知悉社区版,用户数不可超过100个,最大允许10个用户同时在线(不含匿名)。
|
||||
|
||||
## 今后如何升级?
|
||||
### 获得技术服务支持:<http://jeesite4.mydoc.io/?t=267685>
|
||||
|
||||
尽量不修改 web 项目以外的源码项目,如 jeesite-common、jeesite-modele-core,如果修改了,请 Pull Requests 上来,否则代码与官方不同步,会将对你的日后升级增加难度。
|
||||
* 随着JeeSite发展,我们也需要有相应的资金支持才能持续的开发和维护。支持我们,您可以得到一些回报,我们有了这些也会把开源事业做的更好,请给我们一些动力吧,谢谢您的支持!
|
||||
|
||||
如果您修改了依赖模块代码,也没关系,这时你需要利用 Git 版本控制工具,与官方仓库代码进行同步,合并代码即可。
|
||||
# 技术交流方式
|
||||
|
||||
每个版本升级,我们都会附带详细更新日志:<http://jeesite.com/docs/upgrade/>。
|
||||
* QQ 群号: `127515876(已满)` `209330483(已满)` `223507718(已满)` `709534275` `730390092`
|
||||
* 问题反馈:<https://gitee.com/thinkgem/jeesite4/issues> [【新手必读】](http://www.dianbo.org/9238/stone/tiwendezhihui.htm)
|
||||
* 码云Gitee:<https://gitee.com/thinkgem/jeesite4>
|
||||
* GitHub:<https://github.com/thinkgem/jeesite4>
|
||||
* 作者博客:<https://my.oschina.net/thinkgem>
|
||||
* 官方网站:<http://jeesite.com>
|
||||
* 官方论坛:<http://jeesite.net>
|
||||
* 微信公众号:
|
||||
|
||||

|
||||
|
||||
在这里,你可以看到 JeeSite 新增哪些新功能和改进,在每个版本下都有对应升级方法。
|
||||
|
||||
# Git 全局设置技巧
|
||||
|
||||
|
||||
5
common/.settings/org.eclipse.core.resources.prefs
Normal file
5
common/.settings/org.eclipse.core.resources.prefs
Normal file
@@ -0,0 +1,5 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding//src/main/java=UTF-8
|
||||
encoding//src/main/resources=UTF-8
|
||||
encoding//src/test/java=UTF-8
|
||||
encoding/<project>=UTF-8
|
||||
8
common/.settings/org.eclipse.jdt.core.prefs
Normal file
8
common/.settings/org.eclipse.jdt.core.prefs
Normal file
@@ -0,0 +1,8 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
4
common/.settings/org.eclipse.m2e.core.prefs
Normal file
4
common/.settings/org.eclipse.m2e.core.prefs
Normal file
@@ -0,0 +1,4 @@
|
||||
activeProfiles=
|
||||
eclipse.preferences.version=1
|
||||
resolveWorkspaceProjects=true
|
||||
version=1
|
||||
6
common/.settings/org.eclipse.wst.common.component
Normal file
6
common/.settings/org.eclipse.wst.common.component
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||
<wb-module deploy-name="jeesite-common">
|
||||
<wb-resource deploy-path="/" source-path="/src/main/java"/>
|
||||
<wb-resource deploy-path="/" source-path="/src/main/resources"/>
|
||||
</wb-module>
|
||||
</project-modules>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<faceted-project>
|
||||
<installed facet="jst.utility" version="1.0"/>
|
||||
<installed facet="java" version="1.8"/>
|
||||
</faceted-project>
|
||||
2
common/.settings/org.eclipse.wst.validation.prefs
Normal file
2
common/.settings/org.eclipse.wst.validation.prefs
Normal file
@@ -0,0 +1,2 @@
|
||||
disabled=06target
|
||||
eclipse.preferences.version=1
|
||||
227
common/pom.xml
227
common/pom.xml
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-parent</artifactId>
|
||||
<version>4.0.8-SNAPSHOT</version>
|
||||
<version>4.1.0-SNAPSHOT</version>
|
||||
<relativePath>../parent/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -27,17 +27,16 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>${commons-lang3.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>${commons-io.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
@@ -46,19 +45,33 @@
|
||||
<dependency>
|
||||
<groupId>commons-beanutils</groupId>
|
||||
<artifactId>commons-beanutils</artifactId>
|
||||
<version>${commons-beanutils.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-text</artifactId>
|
||||
<version>${commons-text.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Apache Tools Ant Tar Zip -->
|
||||
<dependency>
|
||||
<groupId>org.apache.ant</groupId>
|
||||
<artifactId>ant</artifactId>
|
||||
<version>${ant.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Java serialization -->
|
||||
<dependency>
|
||||
<groupId>de.ruedigermoeller</groupId>
|
||||
<artifactId>fst</artifactId>
|
||||
<version>${ruedigermoeller-fst.version}</version>
|
||||
<version>${fst.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Json in java -->
|
||||
<!-- Json in java -->
|
||||
<dependency>
|
||||
<groupId>org.json</groupId>
|
||||
<artifactId>json</artifactId>
|
||||
<version>${json.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Jackson json -->
|
||||
@@ -93,11 +106,91 @@
|
||||
<artifactId>snakeyaml</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Bean To Bean copy -->
|
||||
<!-- Apache HTTP -->
|
||||
<dependency>
|
||||
<groupId>net.sf.dozer</groupId>
|
||||
<artifactId>dozer</artifactId>
|
||||
<version>${dozer.version}</version>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Jsoup HTTP -->
|
||||
<dependency>
|
||||
<groupId>org.jsoup</groupId>
|
||||
<artifactId>jsoup</artifactId>
|
||||
<version>${jsoup.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Email -->
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-email</artifactId>
|
||||
<version>${commons-email.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.activation</groupId>
|
||||
<artifactId>activation</artifactId>
|
||||
<version>${activation.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- User Agent -->
|
||||
<dependency>
|
||||
<groupId>eu.bitwalker</groupId>
|
||||
<artifactId>UserAgentUtils</artifactId>
|
||||
<version>${UserAgentUtils.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 图片Meta获取 -->
|
||||
<dependency>
|
||||
<groupId>com.drewnoakes</groupId>
|
||||
<artifactId>metadata-extractor</artifactId>
|
||||
<version>${metadata-extractor.version}</version>
|
||||
</dependency>
|
||||
<!-- 缩略图工具 -->
|
||||
<dependency>
|
||||
<groupId>net.coobird</groupId>
|
||||
<artifactId>thumbnailator</artifactId>
|
||||
<version>${thumbnailator.version}</version>
|
||||
</dependency>
|
||||
<!-- 图片验证码生成 -->
|
||||
<dependency>
|
||||
<groupId>com.bladejava</groupId>
|
||||
<artifactId>blade-patchca</artifactId>
|
||||
<version>${blade-patchca.version}</version>
|
||||
</dependency>
|
||||
<!-- File MimeType ContentType -->
|
||||
<dependency>
|
||||
<groupId>net.sf.jmimemagic</groupId>
|
||||
<artifactId>jmimemagic</artifactId>
|
||||
<version>${jmimemagic.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>xerces</groupId>
|
||||
<artifactId>xercesImpl</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.codehaus.jackson</groupId>
|
||||
<artifactId>jackson-xc</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.codehaus.jackson</groupId>
|
||||
<artifactId>jackson-jaxrs</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>log4j</artifactId>
|
||||
<groupId>log4j</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!-- 条形码、二维码生成 -->
|
||||
<dependency>
|
||||
<groupId>com.google.zxing</groupId>
|
||||
<artifactId>core</artifactId>
|
||||
<version>${zxing.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.zxing</groupId>
|
||||
<artifactId>javase</artifactId>
|
||||
<version>${zxing.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- POI Office Tools -->
|
||||
@@ -128,109 +221,14 @@
|
||||
<version>${poi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Email -->
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-email</artifactId>
|
||||
<version>1.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.activation</groupId>
|
||||
<artifactId>activation</artifactId>
|
||||
<version>1.1.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 条形码、二维码生成 -->
|
||||
<dependency>
|
||||
<groupId>com.google.zxing</groupId>
|
||||
<artifactId>core</artifactId>
|
||||
<version>3.3.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.zxing</groupId>
|
||||
<artifactId>javase</artifactId>
|
||||
<version>3.3.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- User Agent -->
|
||||
<dependency>
|
||||
<groupId>eu.bitwalker</groupId>
|
||||
<artifactId>UserAgentUtils</artifactId>
|
||||
<version>1.20</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Apache HTTP -->
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Jsoup HTTP -->
|
||||
<dependency>
|
||||
<groupId>org.jsoup</groupId>
|
||||
<artifactId>jsoup</artifactId>
|
||||
<version>1.9.1</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 图片Meta获取 -->
|
||||
<dependency>
|
||||
<groupId>com.drewnoakes</groupId>
|
||||
<artifactId>metadata-extractor</artifactId>
|
||||
<version>2.9.1</version>
|
||||
</dependency>
|
||||
<!-- 缩略图工具 -->
|
||||
<dependency>
|
||||
<groupId>net.coobird</groupId>
|
||||
<artifactId>thumbnailator</artifactId>
|
||||
<version>0.4.8</version>
|
||||
</dependency>
|
||||
<!-- 图片验证码生成 -->
|
||||
<dependency>
|
||||
<groupId>com.bladejava</groupId>
|
||||
<artifactId>blade-patchca</artifactId>
|
||||
<version>1.0.5</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Apache Tools Ant Tar Zip -->
|
||||
<dependency>
|
||||
<groupId>org.apache.ant</groupId>
|
||||
<artifactId>ant</artifactId>
|
||||
<version>1.9.7</version>
|
||||
</dependency>
|
||||
|
||||
<!-- File MimeType ContentType -->
|
||||
<dependency>
|
||||
<groupId>net.sf.jmimemagic</groupId>
|
||||
<artifactId>jmimemagic</artifactId>
|
||||
<version>0.1.3</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>xerces</groupId>
|
||||
<artifactId>xercesImpl</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.codehaus.jackson</groupId>
|
||||
<artifactId>jackson-xc</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<groupId>org.codehaus.jackson</groupId>
|
||||
<artifactId>jackson-jaxrs</artifactId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>log4j</artifactId>
|
||||
<groupId>log4j</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!-- pinyin4j -->
|
||||
<dependency>
|
||||
<groupId>com.belerweb</groupId>
|
||||
<artifactId>pinyin4j</artifactId>
|
||||
<version>2.5.0</version>
|
||||
<version>${pinyin4j.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- LOGGING begin -->
|
||||
<!-- Logging begin -->
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
@@ -255,9 +253,9 @@
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
</dependency>
|
||||
<!-- LOGGING end -->
|
||||
<!-- Logging end -->
|
||||
|
||||
<!-- Spring Core Web-->
|
||||
<!-- Spring begin -->
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-core</artifactId>
|
||||
@@ -266,12 +264,7 @@
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Bean validate -->
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<artifactId>hibernate-validator</artifactId>
|
||||
</dependency>
|
||||
<!-- Spring end -->
|
||||
|
||||
<!-- JUnit Test -->
|
||||
<dependency>
|
||||
|
||||
@@ -15,7 +15,7 @@ import java.util.regex.Pattern;
|
||||
import org.apache.commons.codec.DecoderException;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
import org.apache.commons.codec.binary.Hex;
|
||||
import org.apache.commons.lang3.StringEscapeUtils;
|
||||
import org.apache.commons.text.StringEscapeUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
||||
@@ -76,13 +76,12 @@ public class Md5Utils {
|
||||
|
||||
/**
|
||||
* 获取文件的MD5值,支持获取文件部分的MD5值
|
||||
* uploader.md5File(file, 0, 10 * 1024 * 1024)
|
||||
*/
|
||||
public static String md5File(File file, int size) {
|
||||
if (file != null && file.exists()){
|
||||
InputStream in = null;
|
||||
try {
|
||||
try (InputStream in = FileUtils.openInputStream(file)){
|
||||
byte[] bytes = null;
|
||||
in = FileUtils.openInputStream(file);
|
||||
if (size != -1 && file.length() >= size){
|
||||
bytes = IOUtils.toByteArray(in, size);
|
||||
}else{
|
||||
@@ -91,8 +90,6 @@ public class Md5Utils {
|
||||
return EncodeUtils.encodeHex(md5(bytes));
|
||||
} catch (IOException e) {
|
||||
return StringUtils.EMPTY;
|
||||
} finally {
|
||||
IOUtils.closeQuietly(in);
|
||||
}
|
||||
}
|
||||
return StringUtils.EMPTY;
|
||||
|
||||
@@ -242,14 +242,10 @@ public class FileUtils extends org.apache.commons.io.FileUtils {
|
||||
* @author ThinkGem 2016-7-4
|
||||
*/
|
||||
public static String readFileToString(String classResourcePath){
|
||||
InputStream in = null;
|
||||
try {
|
||||
in = new ClassPathResource(classResourcePath).getInputStream();
|
||||
try (InputStream in = new ClassPathResource(classResourcePath).getInputStream()){
|
||||
return IOUtils.toString(in, Charsets.toCharset("UTF-8"));
|
||||
} catch (IOException e) {
|
||||
logger.warn("Error file convert: {}", e.getMessage());
|
||||
}finally{
|
||||
IOUtils.closeQuietly(in);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -758,7 +754,7 @@ public class FileUtils extends org.apache.commons.io.FileUtils {
|
||||
try {
|
||||
response.addHeader("Content-Disposition", "attachment; filename=\"" +
|
||||
EncodeUtils.encodeUrl(StringUtils.isBlank(fileName) ? file.getName() : fileName) + "\"");
|
||||
response.setContentType(getContentType(file.getName())); // set the MIME type.
|
||||
response.setContentType(FileUtils.getContentType(file.getName())); // set the MIME type.
|
||||
response.addHeader("Content-Length", String.valueOf(contentLength));
|
||||
os = response.getOutputStream();
|
||||
out = new BufferedOutputStream(os);
|
||||
@@ -808,7 +804,7 @@ public class FileUtils extends org.apache.commons.io.FileUtils {
|
||||
logger.debug("提醒:向客户端传输时出现IO异常,但此异常是允许的,有可能客户端取消了下载,导致此异常,不用关心!");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getMessage(), e);
|
||||
logger.debug(e.getMessage(), e);
|
||||
} finally {
|
||||
if (out != null) {
|
||||
try {
|
||||
@@ -944,9 +940,9 @@ public class FileUtils extends org.apache.commons.io.FileUtils {
|
||||
projectPath = file.toString();
|
||||
}
|
||||
} catch (FileNotFoundException e) {
|
||||
;
|
||||
// 忽略异常
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
// 忽略异常
|
||||
}
|
||||
// 取不到,取当前工作路径
|
||||
if (StringUtils.isBlank(projectPath)){
|
||||
@@ -982,9 +978,9 @@ public class FileUtils extends org.apache.commons.io.FileUtils {
|
||||
webappPath = file.toString();
|
||||
}
|
||||
} catch (FileNotFoundException e) {
|
||||
;
|
||||
// 忽略异常
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
// 忽略异常
|
||||
}
|
||||
// 取不到,取当前工作路径
|
||||
if (StringUtils.isBlank(webappPath)){
|
||||
|
||||
@@ -3,10 +3,13 @@
|
||||
*/
|
||||
package com.jeesite.common.io;
|
||||
|
||||
import java.io.Closeable;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
/**
|
||||
* 数据流工具类
|
||||
@@ -80,4 +83,24 @@ public class IOUtils extends org.apache.commons.io.IOUtils {
|
||||
return fileOutputStream;
|
||||
}
|
||||
|
||||
/**
|
||||
* Closes a <code>Closeable</code> unconditionally.
|
||||
*/
|
||||
public static void closeQuietly(final InputStream input) {
|
||||
closeQuietly((Closeable) input);
|
||||
}
|
||||
|
||||
/**
|
||||
* Closes a <code>Closeable</code> unconditionally.
|
||||
*/
|
||||
public static void closeQuietly(final Closeable closeable) {
|
||||
try {
|
||||
if (closeable != null) {
|
||||
closeable.close();
|
||||
}
|
||||
} catch (final IOException ioe) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -12,7 +12,6 @@ import java.util.Set;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.config.YamlPropertiesFactoryBean;
|
||||
@@ -37,7 +36,7 @@ public class PropertiesUtils {
|
||||
"classpath:config/application.yml", "classpath:application.yml"};
|
||||
|
||||
private static Logger logger = PropertiesUtils.initLogger();
|
||||
|
||||
private final Set<String> configSet = SetUtils.newLinkedHashSet();
|
||||
private final Properties properties = new Properties();
|
||||
|
||||
/**
|
||||
@@ -55,7 +54,7 @@ public class PropertiesUtils {
|
||||
for(Resource resource : resources){
|
||||
configSet.add("classpath:config/"+resource.getFilename());
|
||||
}
|
||||
configSet.add("classpath:config/jeesite.yml");
|
||||
//configSet.add("classpath:config/jeesite.yml");
|
||||
// 获取全局设置默认的配置文件(以下是支持环境配置的属性文件)
|
||||
Set<String> set = SetUtils.newLinkedHashSet();
|
||||
for (String configFile : DEFAULT_CONFIG_FILE){
|
||||
@@ -83,7 +82,7 @@ public class PropertiesUtils {
|
||||
}
|
||||
for (String location : configFiles){
|
||||
configSet.add(location);
|
||||
if (StringUtils.isNotBlank(profiles) && !StringUtils.equals(profiles, "default")){
|
||||
if (StringUtils.isNotBlank(profiles)){
|
||||
if (location.endsWith(".properties")){
|
||||
configSet.add(StringUtils.substringBeforeLast(location, ".properties")
|
||||
+ "-" + profiles + ".properties");
|
||||
@@ -108,14 +107,11 @@ public class PropertiesUtils {
|
||||
Resource resource = ResourceUtils.getResource(location);
|
||||
if (resource.exists()){
|
||||
if (location.endsWith(".properties")){
|
||||
InputStreamReader is = null;
|
||||
try {
|
||||
is = new InputStreamReader(resource.getInputStream(), "UTF-8");
|
||||
try (InputStreamReader is = new InputStreamReader(resource.getInputStream(), "UTF-8")){
|
||||
properties.load(is);
|
||||
configSet.add(location);
|
||||
} catch (IOException ex) {
|
||||
logger.error("Load " + location + " failure. ", ex);
|
||||
} finally {
|
||||
IOUtils.closeQuietly(is);
|
||||
}
|
||||
}
|
||||
else if (location.endsWith(".yml")){
|
||||
@@ -125,18 +121,24 @@ public class PropertiesUtils {
|
||||
properties.put(ObjectUtils.toString(entry.getKey()),
|
||||
ObjectUtils.toString(entry.getValue()));
|
||||
}
|
||||
configSet.add(location);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("Load " + location + " failure. ", e);
|
||||
}
|
||||
// 存储当前加载的配置文件路径和名称
|
||||
properties.setProperty("configFiles", StringUtils.join(configFiles, ","));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前加载的属性
|
||||
* 获取当前加载的属性文件
|
||||
*/
|
||||
public Set<String> getConfigSet() {
|
||||
return configSet;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前加载的属性数据
|
||||
*/
|
||||
public Properties getProperties() {
|
||||
return properties;
|
||||
|
||||
@@ -67,14 +67,10 @@ public class ResourceUtils extends org.springframework.util.ResourceUtils {
|
||||
* @author ThinkGem
|
||||
*/
|
||||
public static String getResourceFileContent(String location){
|
||||
InputStream is = null;
|
||||
try{
|
||||
is = ResourceUtils.getResourceFileStream(location);
|
||||
try(InputStream is = ResourceUtils.getResourceFileStream(location)){
|
||||
return IOUtils.toString(is, "UTF-8");
|
||||
}catch (IOException e) {
|
||||
throw ExceptionUtils.unchecked(e);
|
||||
}finally{
|
||||
IOUtils.closeQuietly(is);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,8 +16,6 @@ import org.nustaq.serialization.FSTConfiguration;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.core.NamedThreadLocal;
|
||||
|
||||
import com.jeesite.common.io.IOUtils;
|
||||
|
||||
/**
|
||||
* 对象操作工具类, 继承org.apache.commons.lang3.ObjectUtils类
|
||||
* @author ThinkGem
|
||||
@@ -118,9 +116,13 @@ public class ObjectUtils extends org.apache.commons.lang3.ObjectUtils {
|
||||
if (source == null){
|
||||
return null;
|
||||
}
|
||||
Object target = BeanUtils.instantiate(source.getClass());
|
||||
BeanUtils.copyProperties(source, target, ignoreProperties);
|
||||
return target;
|
||||
try {
|
||||
Object target = source.getClass().newInstance();
|
||||
BeanUtils.copyProperties(source, target, ignoreProperties);
|
||||
return target;
|
||||
} catch (InstantiationException | IllegalAccessException e) {
|
||||
throw ExceptionUtils.unchecked(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -162,18 +164,12 @@ public class ObjectUtils extends org.apache.commons.lang3.ObjectUtils {
|
||||
}
|
||||
long beginTime = System.currentTimeMillis();
|
||||
byte[] bytes = null;
|
||||
ObjectOutputStream oos = null;
|
||||
ByteArrayOutputStream baos = null;
|
||||
try {
|
||||
baos = new ByteArrayOutputStream();
|
||||
oos = new ObjectOutputStream(baos);
|
||||
try (ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
ObjectOutputStream oos = new ObjectOutputStream(baos);) {
|
||||
oos.writeObject(object);
|
||||
bytes = baos.toByteArray();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
IOUtils.closeQuietly(oos);
|
||||
IOUtils.closeQuietly(baos);
|
||||
}
|
||||
long totalTime = System.currentTimeMillis() - beginTime;
|
||||
if (totalTime > 3000){
|
||||
@@ -193,19 +189,13 @@ public class ObjectUtils extends org.apache.commons.lang3.ObjectUtils {
|
||||
}
|
||||
long beginTime = System.currentTimeMillis();
|
||||
Object object = null;
|
||||
ByteArrayInputStream bais = null;
|
||||
ObjectInputStream ois = null;
|
||||
try {
|
||||
if (bytes.length > 0) {
|
||||
bais = new ByteArrayInputStream(bytes);
|
||||
ois = new ObjectInputStream(bais);
|
||||
if (bytes.length > 0) {
|
||||
try (ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
|
||||
ObjectInputStream ois = new ObjectInputStream(bais);) {
|
||||
object = ois.readObject();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
IOUtils.closeQuietly(ois);
|
||||
IOUtils.closeQuietly(bais);
|
||||
}
|
||||
long totalTime = System.currentTimeMillis() - beginTime;
|
||||
if (totalTime > 3000){
|
||||
|
||||
@@ -9,8 +9,6 @@ import java.util.Random;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.apache.commons.lang3.StringEscapeUtils;
|
||||
|
||||
import com.jeesite.common.codec.EncodeUtils;
|
||||
import com.jeesite.common.collect.ListUtils;
|
||||
|
||||
@@ -140,7 +138,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils {
|
||||
try {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
int currentLength = 0;
|
||||
for (char c : stripHtml(StringEscapeUtils.unescapeHtml4(str)).toCharArray()) {
|
||||
for (char c : stripHtml(EncodeUtils.decodeHtml(str)).toCharArray()) {
|
||||
currentLength += String.valueOf(c).getBytes("GBK").length;
|
||||
if (currentLength <= length - 3) {
|
||||
sb.append(c);
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
*/
|
||||
package com.jeesite.common.mail;
|
||||
|
||||
/**
|
||||
* 发送电子邮件
|
||||
*/
|
||||
@Deprecated
|
||||
public class EmailUtils {
|
||||
|
||||
/**
|
||||
* 发送邮件
|
||||
* @param toAddress 接收地址
|
||||
* @param subject 标题
|
||||
* @param content 内容
|
||||
* @return
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean sendEmail(String toAddress, String subject, String content) {
|
||||
return com.jeesite.common.msg.EmailUtils.send(toAddress, subject, content);
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送邮件
|
||||
* @param toAddress 接收地址
|
||||
* @param subject 标题
|
||||
* @param content 内容
|
||||
* @return
|
||||
*/
|
||||
@Deprecated
|
||||
public static boolean sendEmail(String fromAddress, String fromPassword, String fromHostName,
|
||||
String sslOnConnect, String sslSmtpPort, String toAddress, String subject, String content) {
|
||||
return com.jeesite.common.msg.EmailUtils.send(fromAddress, fromPassword, fromHostName, sslOnConnect, sslSmtpPort, toAddress, subject, content);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2005-2012 springside.org.cn
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
*/
|
||||
package com.jeesite.common.mapper;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import org.dozer.DozerBeanMapper;
|
||||
|
||||
import com.jeesite.common.collect.ListUtils;
|
||||
|
||||
/**
|
||||
* 简单封装Dozer, 实现深度转换Bean<->Bean的Mapper.实现:
|
||||
*
|
||||
* 1. 持有Mapper的单例.
|
||||
* 2. 返回值类型转换.
|
||||
* 3. 批量转换Collection中的所有对象.
|
||||
* 4. 区分创建新的B对象与将对象A值复制到已存在的B对象两种函数.
|
||||
*
|
||||
* @author calvin
|
||||
* @version 2013-01-15
|
||||
*/
|
||||
public class BeanMapper {
|
||||
|
||||
/**
|
||||
* 持有Dozer单例, 避免重复创建DozerMapper消耗资源.
|
||||
*/
|
||||
private static DozerBeanMapper dozer = new DozerBeanMapper();
|
||||
|
||||
/**
|
||||
* 基于Dozer转换对象的类型.
|
||||
*/
|
||||
public static <T> T map(Object source, Class<T> destinationClass) {
|
||||
return dozer.map(source, destinationClass);
|
||||
}
|
||||
|
||||
/**
|
||||
* 基于Dozer转换Collection中对象的类型.
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public static <T> List<T> mapList(Collection sourceList, Class<T> destinationClass) {
|
||||
List<T> destinationList = ListUtils.newArrayList();
|
||||
for (Object sourceObject : sourceList) {
|
||||
T destinationObject = dozer.map(sourceObject, destinationClass);
|
||||
destinationList.add(destinationObject);
|
||||
}
|
||||
return destinationList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 基于Dozer将对象A的值拷贝到对象B中.
|
||||
*/
|
||||
public static void copy(Object source, Object destinationObject) {
|
||||
dozer.map(source, destinationObject);
|
||||
}
|
||||
}
|
||||
@@ -43,20 +43,21 @@ public class ReflectUtils {
|
||||
* 调用Getter方法.
|
||||
* 支持多级,如:对象名.对象名.方法
|
||||
*/
|
||||
public static Object invokeGetter(Object obj, String propertyName) {
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <E> E invokeGetter(Object obj, String propertyName) {
|
||||
Object object = obj;
|
||||
for (String name : StringUtils.split(propertyName, ".")){
|
||||
String getterMethodName = GETTER_PREFIX + StringUtils.capitalize(name);
|
||||
object = invokeMethod(object, getterMethodName, new Class[] {}, new Object[] {});
|
||||
}
|
||||
return object;
|
||||
return (E)object;
|
||||
}
|
||||
|
||||
/**
|
||||
* 调用Setter方法, 仅匹配方法名。
|
||||
* 支持多级,如:对象名.对象名.方法
|
||||
*/
|
||||
public static void invokeSetter(Object obj, String propertyName, Object value) {
|
||||
public static <E> void invokeSetter(Object obj, String propertyName, E value) {
|
||||
Object object = obj;
|
||||
String[] names = StringUtils.split(propertyName, ".");
|
||||
for (int i=0; i<names.length; i++){
|
||||
@@ -73,16 +74,17 @@ public class ReflectUtils {
|
||||
/**
|
||||
* 直接读取对象属性值, 无视private/protected修饰符, 不经过getter函数.
|
||||
*/
|
||||
public static Object getFieldValue(final Object obj, final String fieldName) {
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <E> E getFieldValue(final Object obj, final String fieldName) {
|
||||
Field field = getAccessibleField(obj, fieldName);
|
||||
if (field == null) {
|
||||
//throw new IllegalArgumentException("在 [" + obj.getClass() + "] 中,没有找到 [" + fieldName + "] 字段 ");
|
||||
logger.warn("在 [" + obj.getClass() + "] 中,没有找到 [" + fieldName + "] 字段 ");
|
||||
logger.debug("在 [" + obj.getClass() + "] 中,没有找到 [" + fieldName + "] 字段 ");
|
||||
return null;
|
||||
}
|
||||
Object result = null;
|
||||
E result = null;
|
||||
try {
|
||||
result = field.get(obj);
|
||||
result = (E)field.get(obj);
|
||||
} catch (IllegalAccessException e) {
|
||||
logger.error("不可能抛出的异常{}", e.getMessage());
|
||||
}
|
||||
@@ -92,11 +94,11 @@ public class ReflectUtils {
|
||||
/**
|
||||
* 直接设置对象属性值, 无视private/protected修饰符, 不经过setter函数.
|
||||
*/
|
||||
public static void setFieldValue(final Object obj, final String fieldName, final Object value) {
|
||||
public static <E> void setFieldValue(final Object obj, final String fieldName, final E value) {
|
||||
Field field = getAccessibleField(obj, fieldName);
|
||||
if (field == null) {
|
||||
//throw new IllegalArgumentException("在 [" + obj.getClass() + "] 中,没有找到 [" + fieldName + "] 字段 ");
|
||||
logger.warn("在 [" + obj.getClass() + "] 中,没有找到 [" + fieldName + "] 字段 ");
|
||||
logger.debug("在 [" + obj.getClass() + "] 中,没有找到 [" + fieldName + "] 字段 ");
|
||||
return;
|
||||
}
|
||||
try {
|
||||
@@ -111,7 +113,8 @@ public class ReflectUtils {
|
||||
* 用于一次性调用的情况,否则应使用getAccessibleMethod()函数获得Method后反复调用.
|
||||
* 同时匹配方法名+参数类型,
|
||||
*/
|
||||
public static Object invokeMethod(final Object obj, final String methodName, final Class<?>[] parameterTypes,
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <E> E invokeMethod(final Object obj, final String methodName, final Class<?>[] parameterTypes,
|
||||
final Object[] args) {
|
||||
if (obj == null || methodName == null){
|
||||
return null;
|
||||
@@ -119,11 +122,11 @@ public class ReflectUtils {
|
||||
Method method = getAccessibleMethod(obj, methodName, parameterTypes);
|
||||
if (method == null) {
|
||||
//throw new IllegalArgumentException("在 [" + obj.getClass() + "] 中,没有找到 [" + methodName + "] 方法 ");
|
||||
logger.warn("在 [" + obj.getClass() + "] 中,没有找到 [" + methodName + "] 方法 ");
|
||||
logger.debug("在 [" + obj.getClass() + "] 中,没有找到 [" + methodName + "] 方法 ");
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return method.invoke(obj, args);
|
||||
return (E)method.invoke(obj, args);
|
||||
} catch (Exception e) {
|
||||
String msg = "method: "+method+", obj: "+obj+", args: "+args+"";
|
||||
throw convertReflectionExceptionToUnchecked(msg, e);
|
||||
@@ -135,12 +138,13 @@ public class ReflectUtils {
|
||||
* 用于一次性调用的情况,否则应使用getAccessibleMethodByName()函数获得Method后反复调用.
|
||||
* 只匹配函数名,如果有多个同名函数调用第一个。
|
||||
*/
|
||||
public static Object invokeMethodByName(final Object obj, final String methodName, final Object[] args) {
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <E> E invokeMethodByName(final Object obj, final String methodName, final Object[] args) {
|
||||
Method method = getAccessibleMethodByName(obj, methodName, args.length);
|
||||
if (method == null) {
|
||||
// 如果为空不报错,直接返回空。
|
||||
// throw new IllegalArgumentException("在 [" + obj.getClass() + "] 中,没有找到 [" + methodName + "] 方法 ");
|
||||
logger.warn("在 [" + obj.getClass() + "] 中,没有找到 [" + methodName + "] 方法 ");
|
||||
logger.debug("在 [" + obj.getClass() + "] 中,没有找到 [" + methodName + "] 方法 ");
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
@@ -171,7 +175,7 @@ public class ReflectUtils {
|
||||
}
|
||||
}
|
||||
}
|
||||
return method.invoke(obj, args);
|
||||
return (E)method.invoke(obj, args);
|
||||
} catch (Exception e) {
|
||||
String msg = "method: "+method+", obj: "+obj+", args: "+args+"";
|
||||
throw convertReflectionExceptionToUnchecked(msg, e);
|
||||
@@ -300,19 +304,19 @@ public class ReflectUtils {
|
||||
Type genType = clazz.getGenericSuperclass();
|
||||
|
||||
if (!(genType instanceof ParameterizedType)) {
|
||||
logger.warn(clazz.getSimpleName() + "'s superclass not ParameterizedType");
|
||||
logger.debug(clazz.getSimpleName() + "'s superclass not ParameterizedType");
|
||||
return Object.class;
|
||||
}
|
||||
|
||||
Type[] params = ((ParameterizedType) genType).getActualTypeArguments();
|
||||
|
||||
if (index >= params.length || index < 0) {
|
||||
logger.warn("Index: " + index + ", Size of " + clazz.getSimpleName() + "'s Parameterized Type: "
|
||||
logger.debug("Index: " + index + ", Size of " + clazz.getSimpleName() + "'s Parameterized Type: "
|
||||
+ params.length);
|
||||
return Object.class;
|
||||
}
|
||||
if (!(params[index] instanceof Class)) {
|
||||
logger.warn(clazz.getSimpleName() + " not set the actual class on superclass generic parameter");
|
||||
logger.debug(clazz.getSimpleName() + " not set the actual class on superclass generic parameter");
|
||||
return Object.class;
|
||||
}
|
||||
|
||||
|
||||
@@ -585,18 +585,18 @@ public class ExcelExport implements Closeable{
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 清理临时文件
|
||||
* @deprecated see close()
|
||||
*/
|
||||
public ExcelExport dispose(){
|
||||
try {
|
||||
this.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return this;
|
||||
}
|
||||
// /**
|
||||
// * 清理临时文件
|
||||
// * @deprecated see close()
|
||||
// */
|
||||
// public ExcelExport dispose(){
|
||||
// try {
|
||||
// this.close();
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// return this;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
|
||||
@@ -1,159 +0,0 @@
|
||||
/*
|
||||
* Skin: Black
|
||||
* ----------
|
||||
*/
|
||||
.main-header .navbar {
|
||||
background-color: #303643;
|
||||
}
|
||||
.main-header .navbar .nav > li > a {
|
||||
color: #eaeaea;
|
||||
}
|
||||
.main-header .navbar .nav > li > a:hover,
|
||||
.main-header .navbar .nav > li > a:active,
|
||||
.main-header .navbar .nav > li > a:focus,
|
||||
.main-header .navbar .nav .open > a,
|
||||
.main-header .navbar .nav .open > a:hover,
|
||||
.main-header .navbar .nav .open > a:focus,
|
||||
.main-header .navbar .nav > .active > a {
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
color: #f6f6f6;
|
||||
}
|
||||
.main-header .navbar .sidebar-toggle {
|
||||
color: #ffffff;
|
||||
}
|
||||
.main-header .navbar .sidebar-toggle:hover {
|
||||
color: #f6f6f6;
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.main-header .navbar .sidebar-toggle {
|
||||
color: #fff;
|
||||
}
|
||||
.main-header .navbar .sidebar-toggle:hover {
|
||||
background-color: #367fa9;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.main-header .navbar .dropdown-menu li.divider {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
.main-header .navbar .dropdown-menu li a {
|
||||
color: #fff;
|
||||
}
|
||||
.main-header .navbar .dropdown-menu li a:hover {
|
||||
background: #367fa9;
|
||||
}
|
||||
}
|
||||
.main-header .logo {
|
||||
/* background-color: #2A579A; */
|
||||
color: #f6f6f6;
|
||||
border-bottom: 0 solid transparent;
|
||||
}
|
||||
.main-header .logo:hover {
|
||||
/* background-color: #204F93; */
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.main-header li.user-header {
|
||||
background-color: #2A579A;
|
||||
}
|
||||
.content-header {
|
||||
background: transparent;
|
||||
}
|
||||
.sidebar,
|
||||
.left-side {
|
||||
background-color: #E3E7EC;
|
||||
}
|
||||
.content-wrapper,
|
||||
.main-footer {
|
||||
border-left: 1px solid #d2d6de;
|
||||
}
|
||||
.user-panel > .info,
|
||||
.user-panel > .info > a {
|
||||
color: #555;
|
||||
}
|
||||
.sidebar-menu > li {
|
||||
-webkit-transition: border-left-color 0.3s ease;
|
||||
-o-transition: border-left-color 0.3s ease;
|
||||
transition: border-left-color 0.3s ease;
|
||||
}
|
||||
.sidebar-menu > li.header {
|
||||
color: #848484;
|
||||
background: #E3E7EC;
|
||||
}
|
||||
.sidebar-menu > li > a {
|
||||
border-left: 3px solid transparent;
|
||||
font-weight: 600;
|
||||
}
|
||||
.sidebar-menu > li:hover > a,
|
||||
.sidebar-menu > li.active > a {
|
||||
color: #000;
|
||||
background: #EAEDF1;
|
||||
}
|
||||
.sidebar-menu > li.active {
|
||||
border-left-color: #2A579A;
|
||||
}
|
||||
.sidebar-menu > li.active > a {
|
||||
font-weight: 600;
|
||||
}
|
||||
.sidebar-menu > li.menu-open > a,
|
||||
.sidebar-menu > li > .treeview-menu {
|
||||
background: #EAEDF1;
|
||||
}
|
||||
.sidebar a {
|
||||
color: #555;
|
||||
}
|
||||
.sidebar a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
.treeview-menu > li > a {
|
||||
color: #555;
|
||||
}
|
||||
.treeview-menu > li.active > a,
|
||||
.treeview-menu > li > a:hover {
|
||||
color: #000;
|
||||
}
|
||||
.sidebar-form {
|
||||
border-radius: 3px;
|
||||
border: 1px solid #d2d6de;
|
||||
margin: 10px 10px;
|
||||
}
|
||||
.sidebar-form input[type="text"],
|
||||
.sidebar-form .btn {
|
||||
box-shadow: none;
|
||||
background-color: #fff;
|
||||
border: 1px solid transparent;
|
||||
height: 35px;
|
||||
}
|
||||
.sidebar-form input[type="text"] {
|
||||
color: #666;
|
||||
border-top-left-radius: 2px;
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
border-bottom-left-radius: 2px;
|
||||
}
|
||||
.sidebar-form input[type="text"]:focus,
|
||||
.sidebar-form input[type="text"]:focus + .input-group-btn .btn {
|
||||
background-color: #fff;
|
||||
color: #666;
|
||||
}
|
||||
.sidebar-form input[type="text"]:focus + .input-group-btn .btn {
|
||||
border-left-color: #fff;
|
||||
}
|
||||
.sidebar-form .btn {
|
||||
color: #999;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 2px;
|
||||
border-bottom-right-radius: 2px;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
.main-footer {
|
||||
border-top-color: #d2d6de;
|
||||
}
|
||||
.skin-blue.layout-top-nav .main-header > .logo {
|
||||
background-color: #2A579A;
|
||||
color: #ffffff;
|
||||
border-bottom: 0 solid transparent;
|
||||
}
|
||||
.skin-blue.layout-top-nav .main-header > .logo:hover {
|
||||
background-color: #3b8ab8;
|
||||
}
|
||||
|
||||
.sidebar-menu .treeview-item.active > a {color:#000;background-color:#fff;}
|
||||
@@ -76,6 +76,7 @@
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
}
|
||||
.wrapper,
|
||||
.sidebar,
|
||||
.left-side {
|
||||
background-color: #263238;
|
||||
|
||||
@@ -1,141 +0,0 @@
|
||||
/*
|
||||
* Skin: Black
|
||||
* ----------
|
||||
*/
|
||||
.main-header .navbar {
|
||||
background-color: #263238;
|
||||
}
|
||||
.main-header .navbar .nav > li > a {
|
||||
color: #eaeaea;
|
||||
}
|
||||
.main-header .navbar .nav > li > a:hover,
|
||||
.main-header .navbar .nav > li > a:active,
|
||||
.main-header .navbar .nav > li > a:focus,
|
||||
.main-header .navbar .nav .open > a,
|
||||
.main-header .navbar .nav .open > a:hover,
|
||||
.main-header .navbar .nav .open > a:focus,
|
||||
.main-header .navbar .nav > .active > a {
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
color: #f6f6f6;
|
||||
}
|
||||
.main-header .navbar .sidebar-toggle {
|
||||
color: #ffffff;
|
||||
}
|
||||
.main-header .navbar .sidebar-toggle:hover {
|
||||
color: #f6f6f6;
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.main-header .navbar .sidebar-toggle {
|
||||
color: #fff;
|
||||
}
|
||||
.main-header .navbar .sidebar-toggle:hover {
|
||||
background-color: #367fa9;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.main-header .navbar .dropdown-menu li.divider {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
.main-header .navbar .dropdown-menu li a {
|
||||
color: #fff;
|
||||
}
|
||||
.main-header .navbar .dropdown-menu li a:hover {
|
||||
background: #367fa9;
|
||||
}
|
||||
}
|
||||
.main-header .logo {
|
||||
/* background-color: #367fa9; */
|
||||
color: #f6f6f6;
|
||||
border-bottom: 0 solid transparent;
|
||||
}
|
||||
.main-header .logo:hover {
|
||||
/* background-color: #357ca5; */
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.main-header li.user-header {
|
||||
background-color: #3c8dbc;
|
||||
}
|
||||
.content-header {
|
||||
background: transparent;
|
||||
}
|
||||
.sidebar,
|
||||
.left-side {
|
||||
background-color: #263238;
|
||||
}
|
||||
.user-panel > .info,
|
||||
.user-panel > .info > a {
|
||||
color: #fff;
|
||||
}
|
||||
.sidebar-menu > li.header {
|
||||
color: #4b646f;
|
||||
background: #1a2226;
|
||||
}
|
||||
.sidebar-menu > li > a {
|
||||
border-left: 3px solid transparent;
|
||||
}
|
||||
.sidebar-menu > li:hover > a,
|
||||
.sidebar-menu > li.active > a {
|
||||
color: #ffffff;
|
||||
background: #2c3b41;
|
||||
/* border-left-color: #3c8dbc; */
|
||||
}
|
||||
.sidebar-menu > li.menu-open > a,
|
||||
.sidebar-menu > li > .treeview-menu {
|
||||
background: #2c3b41;
|
||||
}
|
||||
.sidebar a {
|
||||
color: #eaeaea;
|
||||
}
|
||||
.sidebar a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
.treeview-menu > li > a {
|
||||
color: #c7d0da;
|
||||
}
|
||||
.treeview-menu > li.active > a,
|
||||
.treeview-menu > li > a:hover {
|
||||
color: #ffffff;
|
||||
}
|
||||
.sidebar-form {
|
||||
border-radius: 3px;
|
||||
border: 1px solid #374850;
|
||||
margin: 10px 10px;
|
||||
}
|
||||
.sidebar-form input[type="text"],
|
||||
.sidebar-form .btn {
|
||||
box-shadow: none;
|
||||
background-color: #374850;
|
||||
border: 1px solid transparent;
|
||||
height: 35px;
|
||||
}
|
||||
.sidebar-form input[type="text"] {
|
||||
color: #666;
|
||||
border-top-left-radius: 2px;
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
border-bottom-left-radius: 2px;
|
||||
}
|
||||
.sidebar-form input[type="text"]:focus,
|
||||
.sidebar-form input[type="text"]:focus + .input-group-btn .btn {
|
||||
background-color: #fff;
|
||||
color: #666;
|
||||
}
|
||||
.sidebar-form input[type="text"]:focus + .input-group-btn .btn {
|
||||
border-left-color: #fff;
|
||||
}
|
||||
.sidebar-form .btn {
|
||||
color: #999;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 2px;
|
||||
border-bottom-right-radius: 2px;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
.skin-blue.layout-top-nav .main-header > .logo {
|
||||
background-color: #3c8dbc;
|
||||
color: #ffffff;
|
||||
border-bottom: 0 solid transparent;
|
||||
}
|
||||
.skin-blue.layout-top-nav .main-header > .logo:hover {
|
||||
background-color: #3b8ab8;
|
||||
}
|
||||
|
||||
.sidebar-menu .treeview-item.active > a {color:#fff;background-color:#3c8dbc;}
|
||||
@@ -1,214 +0,0 @@
|
||||
/*
|
||||
* http://jeesite.com
|
||||
*/
|
||||
a, a:hover, a:active, a:focus, .form-unit, th[aria-selected=true] .ui-jqgrid-sortable {
|
||||
color:#1890ff;
|
||||
}
|
||||
.main-header .navbar {
|
||||
background-color: #1890ff;
|
||||
}
|
||||
.main-header .navbar .nav > li > a {
|
||||
color: #ffffff;
|
||||
}
|
||||
.main-header .navbar .nav > li > a:hover,
|
||||
.main-header .navbar .nav > li > a:active,
|
||||
.main-header .navbar .nav > li > a:focus,
|
||||
.main-header .navbar .nav .open > a,
|
||||
.main-header .navbar .nav .open > a:hover,
|
||||
.main-header .navbar .nav .open > a:focus,
|
||||
.main-header .navbar .nav > .active > a {
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
color: #f6f6f6;
|
||||
}
|
||||
.main-header .navbar .sidebar-toggle {
|
||||
color: #ffffff;
|
||||
}
|
||||
.main-header .navbar .sidebar-toggle:hover {
|
||||
color: #f6f6f6;
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.main-header .navbar .sidebar-toggle {
|
||||
color: #fff;
|
||||
}
|
||||
.main-header .navbar .sidebar-toggle:hover {
|
||||
background-color: #367fa9;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.main-header .navbar .dropdown-menu li.divider {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
.main-header .navbar .dropdown-menu li a {
|
||||
color: #fff;
|
||||
}
|
||||
.main-header .navbar .dropdown-menu li a:hover {
|
||||
background: #367fa9;
|
||||
}
|
||||
}
|
||||
.main-header .logo {
|
||||
background-color: #1890ff;
|
||||
color: #ffffff;
|
||||
border-bottom: 0 solid transparent;
|
||||
}
|
||||
.main-header .logo:hover {
|
||||
background-color: #1890ff;
|
||||
}
|
||||
.main-header li.user-header {
|
||||
background-color: #1890ff;
|
||||
}
|
||||
.content-header {
|
||||
background: transparent;
|
||||
}
|
||||
.sidebar,
|
||||
.left-side {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
.content-wrapper,
|
||||
.main-footer {
|
||||
border-left: 1px solid #eeeeee;
|
||||
}
|
||||
.user-panel > .info,
|
||||
.user-panel > .info > a {
|
||||
color: #555;
|
||||
}
|
||||
.sidebar-menu > li {
|
||||
-webkit-transition: border-left-color 0.3s ease;
|
||||
-o-transition: border-left-color 0.3s ease;
|
||||
transition: border-left-color 0.3s ease;
|
||||
}
|
||||
.sidebar-menu > li.header {
|
||||
color: #848484;
|
||||
background: #f8f8f8;
|
||||
}
|
||||
.sidebar-menu > li > a {
|
||||
border-left: 3px solid transparent;
|
||||
font-weight: 600;
|
||||
}
|
||||
.sidebar-menu > li:hover > a,
|
||||
.sidebar-menu > li.active > a {
|
||||
color: #000;
|
||||
background: #ffffff;
|
||||
}
|
||||
.sidebar-menu > li.active {
|
||||
border-left-color: #1890ff;
|
||||
}
|
||||
.sidebar-menu > li.active > a {
|
||||
font-weight: 600;
|
||||
}
|
||||
.sidebar-menu > li.menu-open > a,
|
||||
.sidebar-menu > li > .treeview-menu {
|
||||
background: #ffffff;
|
||||
}
|
||||
.sidebar a {
|
||||
color: #555;
|
||||
}
|
||||
.sidebar a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
.treeview-menu > li > a {
|
||||
color: #555;
|
||||
}
|
||||
.treeview-menu > li.active > a,
|
||||
.treeview-menu > li > a:hover {
|
||||
color: #000;
|
||||
}
|
||||
.sidebar-form {
|
||||
border-radius: 3px;
|
||||
border: 1px solid #d2d6de;
|
||||
margin: 10px 10px;
|
||||
}
|
||||
.sidebar-form input[type="text"],
|
||||
.sidebar-form .btn {
|
||||
box-shadow: none;
|
||||
background-color: #fff;
|
||||
border: 1px solid transparent;
|
||||
height: 35px;
|
||||
}
|
||||
.sidebar-form input[type="text"] {
|
||||
color: #666;
|
||||
border-top-left-radius: 2px;
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
border-bottom-left-radius: 2px;
|
||||
}
|
||||
.sidebar-form input[type="text"]:focus,
|
||||
.sidebar-form input[type="text"]:focus + .input-group-btn .btn {
|
||||
background-color: #fff;
|
||||
color: #666;
|
||||
}
|
||||
.sidebar-form input[type="text"]:focus + .input-group-btn .btn {
|
||||
border-left-color: #fff;
|
||||
}
|
||||
.sidebar-form .btn {
|
||||
color: #999;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 2px;
|
||||
border-bottom-right-radius: 2px;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
.main-footer {
|
||||
border-top-color: #d2d6de;
|
||||
}
|
||||
.skin-blue.layout-top-nav .main-header > .logo {
|
||||
background-color: #1890ff;
|
||||
color: #ffffff;
|
||||
border-bottom: 0 solid transparent;
|
||||
}
|
||||
.skin-blue.layout-top-nav .main-header > .logo:hover {
|
||||
background-color: #3b8ab8;
|
||||
}
|
||||
|
||||
.sidebar-menu .treeview-item.active > a {color:#1890ff;background-color:#e1f1ff;border-right:solid #57a6ee;}
|
||||
|
||||
.content-wrapper, .right-side, body {background-color:#f8f8f8;}
|
||||
|
||||
.btn-primary, .btn-primary:hover, .btn-primary:active,
|
||||
.btn-primary.hover, .btn-primary.focus, .btn-primary:focus,
|
||||
.btn-primary.active.focus, .btn-primary.active:focus, .btn-primary.active:hover,
|
||||
.btn-primary:active.focus, .btn-primary:active:focus, .btn-primary:active:hover,
|
||||
.open>.dropdown-toggle.btn-primary.focus, .open>.dropdown-toggle.btn-primary:focus,
|
||||
.open>.dropdown-toggle.btn-primary:hover, .layui-layer-btn .layui-layer-btn0,
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice,
|
||||
.select2-container--default .select2-results__option--highlighted[aria-selected],
|
||||
.wup_container .placeholder .webuploader-pick {background-color:#1890ff!important;border-color:#1890ff;}
|
||||
.form-unit, th[aria-selected=true] .ui-jqgrid-sortable {color:#1890ff;}
|
||||
.form-unit {border-bottom: 1px solid #eee;}
|
||||
|
||||
.tabpanel_mover li {padding:1px 16px 2px 3px;margin:6px 0 6px 6px;border:1px solid #e4e4e4;
|
||||
border-radius:3px;background:#fff;box-shadow:0 0 5px #e6e6e6;}
|
||||
.tabpanel_mover li.active {background-color:#3aa0ff;}
|
||||
.tabpanel_mover li.active div {color:#fff;}
|
||||
.tabpanel_mover li .closer {font:11px/1 FontAwesome;top:6px;right:2px;background:none;opacity:0.7;}
|
||||
.tabpanel_mover li .closer:before {content:"\f00d";}
|
||||
.tabpanel_mover li .closer:hover {background:none;-moz-transform: scale(1.2);-webkit-transform: scale(1.2);
|
||||
-o-transform: scale(1.2);-ms-transform: scale(1.2);transform: scale(1.2);color:#d30606;}
|
||||
.tabpanel_mover li.active .closer:hover {color:#fff;opacity:0.9;}
|
||||
.tabpanel_tab_content {background-color:#fafafa;border-bottom-color:#eeeeee;overflow:visible;}
|
||||
/* .tabpanel_mover li {background:#fff;border-right:1px solid #eee;padding:8px 16px 8px 5px;}
|
||||
.tabpanel_mover li.active {background-color:#fff;border-bottom:3px solid #3aa0ff;}
|
||||
.tabpanel_mover li.active div {color:#0975d9;}
|
||||
.tabpanel_mover li .closer {background:none;font:11px/1 FontAwesome;opacity:0.7;}
|
||||
.tabpanel_mover li .closer:before {content:"\f00d";}
|
||||
.tabpanel_mover li .closer:hover {background:none;-moz-transform: scale(1.2);-webkit-transform: scale(1.2);
|
||||
-o-transform: scale(1.2);-ms-transform: scale(1.2);transform: scale(1.2);color:#d30606;}
|
||||
.tabpanel_tab_content {background-color:#fafafa;border-bottom-color:#eeeeee;overflow:visible;} 替换上面 tab 样式,改变 tab 风格。*/
|
||||
|
||||
/* .main-content {padding:10px;}
|
||||
.ui-layout-container {padding:10px;}
|
||||
.ui-layout-resizer {background:transparent;}
|
||||
.ui-layout-pane {box-shadow:0 0 5px #e0e0e0;}
|
||||
.ui-layout-pane>.main-content {padding:0;}
|
||||
.ui-layout-content>.wrapper>.main-content {padding:0;}
|
||||
.box-main,.nav-main{border-radius:3px;box-shadow:0 0 5px #e0e0e0;} 解开注释,可给内容页面,添加内边距样式 */
|
||||
.box-main>.box-header {border-bottom-color:#eeeeee;}
|
||||
.box-main>.box-header .box-title .fa {color:#1890ff;}
|
||||
.nav-tabs-custom>.nav-tabs>li.active {border-top-color:#3aa0ff;}
|
||||
.form-control:focus,.select2-container--default.select2-container--focus .select2-selection--multiple,
|
||||
.select2-container--default .select2-search--dropdown .select2-search__field {border-color:#66afe9!important;}
|
||||
.table thead tr, .ui-jqgrid-htable thead tr, .ui-jqgrid-hdiv, .ui-jqgrid-hbox {background-color:#f6f6f6;}
|
||||
.ui-jqgrid .ui-jqgrid-htable th.ui-th-column-header, .ui-jqgrid .ui-jqgrid-htable th.ui-th-column,
|
||||
.ui-jqgrid .ui-jqgrid-labels th, .ui-jqgrid .ui-widget-content, .ui-jqgrid tr.ui-row-ltr td,
|
||||
.ui-jqgrid tr.ui-row-rtl td, .ui-jqgrid tr.ui-row-ltr td:last-child {border-color:#eaeaea;}
|
||||
.ui-state-hover td, .ui-widget-content .ui-state-hover td, .ui-widget-header .ui-state-hover td,
|
||||
.ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus {background:#f5f5f5;}
|
||||
.ui-jqgrid tr.ui-state-highlight.ui-row-ltr td {background-color:#e5f3ff;}
|
||||
/* .ui-jqgrid tr.ui-row-ltr td {border-right:0!important;} 解开注释,可去除表格单元格的竖边框线 */
|
||||
@@ -56,6 +56,7 @@
|
||||
.content-header {
|
||||
background: transparent;
|
||||
}
|
||||
.wrapper,
|
||||
.sidebar,
|
||||
.left-side {
|
||||
background-color: #263238;
|
||||
|
||||
@@ -1,214 +0,0 @@
|
||||
/*
|
||||
* http://jeesite.com
|
||||
*/
|
||||
a, a:hover, a:active, a:focus, .form-unit, th[aria-selected=true] .ui-jqgrid-sortable {
|
||||
color:#1e5edb;
|
||||
}
|
||||
.main-header .navbar {
|
||||
background-color: #1951be;
|
||||
}
|
||||
.main-header .navbar .nav > li > a {
|
||||
color: #ffffff;
|
||||
}
|
||||
.main-header .navbar .nav > li > a:hover,
|
||||
.main-header .navbar .nav > li > a:active,
|
||||
.main-header .navbar .nav > li > a:focus,
|
||||
.main-header .navbar .nav .open > a,
|
||||
.main-header .navbar .nav .open > a:hover,
|
||||
.main-header .navbar .nav .open > a:focus,
|
||||
.main-header .navbar .nav > .active > a {
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
color: #f6f6f6;
|
||||
}
|
||||
.main-header .navbar .sidebar-toggle {
|
||||
color: #ffffff;
|
||||
}
|
||||
.main-header .navbar .sidebar-toggle:hover {
|
||||
color: #f6f6f6;
|
||||
background: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.main-header .navbar .sidebar-toggle {
|
||||
color: #fff;
|
||||
}
|
||||
.main-header .navbar .sidebar-toggle:hover {
|
||||
background-color: #367fa9;
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.main-header .navbar .dropdown-menu li.divider {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
.main-header .navbar .dropdown-menu li a {
|
||||
color: #fff;
|
||||
}
|
||||
.main-header .navbar .dropdown-menu li a:hover {
|
||||
background: #367fa9;
|
||||
}
|
||||
}
|
||||
.main-header .logo {
|
||||
background-color: #1951be;
|
||||
color: #ffffff;
|
||||
border-bottom: 0 solid transparent;
|
||||
}
|
||||
.main-header .logo:hover {
|
||||
background-color: #1951be;
|
||||
}
|
||||
.main-header li.user-header {
|
||||
background-color: #1951be;
|
||||
}
|
||||
.content-header {
|
||||
background: transparent;
|
||||
}
|
||||
.sidebar,
|
||||
.left-side {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
.content-wrapper,
|
||||
.main-footer {
|
||||
border-left: 1px solid #eeeeee;
|
||||
}
|
||||
.user-panel > .info,
|
||||
.user-panel > .info > a {
|
||||
color: #555;
|
||||
}
|
||||
.sidebar-menu > li {
|
||||
-webkit-transition: border-left-color 0.3s ease;
|
||||
-o-transition: border-left-color 0.3s ease;
|
||||
transition: border-left-color 0.3s ease;
|
||||
}
|
||||
.sidebar-menu > li.header {
|
||||
color: #848484;
|
||||
background: #f8f8f8;
|
||||
}
|
||||
.sidebar-menu > li > a {
|
||||
border-left: 3px solid transparent;
|
||||
font-weight: 600;
|
||||
}
|
||||
.sidebar-menu > li:hover > a,
|
||||
.sidebar-menu > li.active > a {
|
||||
color: #000;
|
||||
background: #ffffff;
|
||||
}
|
||||
.sidebar-menu > li.active {
|
||||
border-left-color: #1e5edb;
|
||||
}
|
||||
.sidebar-menu > li.active > a {
|
||||
font-weight: 600;
|
||||
}
|
||||
.sidebar-menu > li.menu-open > a,
|
||||
.sidebar-menu > li > .treeview-menu {
|
||||
background: #ffffff;
|
||||
}
|
||||
.sidebar a {
|
||||
color: #555;
|
||||
}
|
||||
.sidebar a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
.treeview-menu > li > a {
|
||||
color: #555;
|
||||
}
|
||||
.treeview-menu > li.active > a,
|
||||
.treeview-menu > li > a:hover {
|
||||
color: #000;
|
||||
}
|
||||
.sidebar-form {
|
||||
border-radius: 3px;
|
||||
border: 1px solid #d2d6de;
|
||||
margin: 10px 10px;
|
||||
}
|
||||
.sidebar-form input[type="text"],
|
||||
.sidebar-form .btn {
|
||||
box-shadow: none;
|
||||
background-color: #fff;
|
||||
border: 1px solid transparent;
|
||||
height: 35px;
|
||||
}
|
||||
.sidebar-form input[type="text"] {
|
||||
color: #666;
|
||||
border-top-left-radius: 2px;
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
border-bottom-left-radius: 2px;
|
||||
}
|
||||
.sidebar-form input[type="text"]:focus,
|
||||
.sidebar-form input[type="text"]:focus + .input-group-btn .btn {
|
||||
background-color: #fff;
|
||||
color: #666;
|
||||
}
|
||||
.sidebar-form input[type="text"]:focus + .input-group-btn .btn {
|
||||
border-left-color: #fff;
|
||||
}
|
||||
.sidebar-form .btn {
|
||||
color: #999;
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 2px;
|
||||
border-bottom-right-radius: 2px;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
.main-footer {
|
||||
border-top-color: #d2d6de;
|
||||
}
|
||||
.skin-blue.layout-top-nav .main-header > .logo {
|
||||
background-color: #1e5edb;
|
||||
color: #ffffff;
|
||||
border-bottom: 0 solid transparent;
|
||||
}
|
||||
.skin-blue.layout-top-nav .main-header > .logo:hover {
|
||||
background-color: #3b8ab8;
|
||||
}
|
||||
|
||||
.sidebar-menu .treeview-item.active > a {color:#001C6B;background-color:#e1f1ff;border-right:solid #7791ce;}
|
||||
|
||||
.content-wrapper, .right-side, body {background-color:#f8f8f8;}
|
||||
|
||||
.btn-primary, .btn-primary:hover, .btn-primary:active,
|
||||
.btn-primary.hover, .btn-primary.focus, .btn-primary:focus,
|
||||
.btn-primary.active.focus, .btn-primary.active:focus, .btn-primary.active:hover,
|
||||
.btn-primary:active.focus, .btn-primary:active:focus, .btn-primary:active:hover,
|
||||
.open>.dropdown-toggle.btn-primary.focus, .open>.dropdown-toggle.btn-primary:focus,
|
||||
.open>.dropdown-toggle.btn-primary:hover, .layui-layer-btn .layui-layer-btn0,
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice,
|
||||
.select2-container--default .select2-results__option--highlighted[aria-selected],
|
||||
.wup_container .placeholder .webuploader-pick {background-color:#1e5edb!important;border-color:#1e5edb!important;}
|
||||
.form-unit, th[aria-selected=true] .ui-jqgrid-sortable {color:#1e5edb;}
|
||||
.form-unit {border-bottom: 1px solid #eee;}
|
||||
|
||||
.tabpanel_mover li {padding:1px 16px 2px 3px;margin:6px 0 6px 6px;border:1px solid #e4e4e4;
|
||||
border-radius:3px;background:#fff;box-shadow:0 0 5px #e6e6e6;}
|
||||
.tabpanel_mover li.active {background-color:#1e5edb;}
|
||||
.tabpanel_mover li.active div {color:#fff;}
|
||||
.tabpanel_mover li .closer {font:11px/1 FontAwesome;top:6px;right:2px;background:none;opacity:0.7;}
|
||||
.tabpanel_mover li .closer:before {content:"\f00d";}
|
||||
.tabpanel_mover li .closer:hover {background:none;-moz-transform: scale(1.2);-webkit-transform: scale(1.2);
|
||||
-o-transform: scale(1.2);-ms-transform: scale(1.2);transform: scale(1.2);color:#d30606;}
|
||||
.tabpanel_mover li.active .closer:hover {color:#fff;opacity:0.9;}
|
||||
.tabpanel_tab_content {background-color:#fafafa;border-bottom-color:#eeeeee;overflow:visible;}
|
||||
/* .tabpanel_mover li {background:#fff;border-right:1px solid #eee;padding:8px 16px 8px 5px;}
|
||||
.tabpanel_mover li.active {background-color:#fff;border-bottom:3px solid #1e5edb;}
|
||||
.tabpanel_mover li.active div {color:#0975d9;}
|
||||
.tabpanel_mover li .closer {background:none;font:11px/1 FontAwesome;opacity:0.7;}
|
||||
.tabpanel_mover li .closer:before {content:"\f00d";}
|
||||
.tabpanel_mover li .closer:hover {background:none;-moz-transform: scale(1.2);-webkit-transform: scale(1.2);
|
||||
-o-transform: scale(1.2);-ms-transform: scale(1.2);transform: scale(1.2);color:#d30606;}
|
||||
.tabpanel_tab_content {background-color:#fafafa;border-bottom-color:#eeeeee;overflow:visible;} 替换上面 tab 样式,改变 tab 风格。*/
|
||||
|
||||
/* .main-content {padding:10px;}
|
||||
.ui-layout-container {padding:10px;}
|
||||
.ui-layout-resizer {background:transparent;}
|
||||
.ui-layout-pane {box-shadow:0 0 5px #e0e0e0;}
|
||||
.ui-layout-pane>.main-content {padding:0;}
|
||||
.ui-layout-content>.wrapper>.main-content {padding:0;}
|
||||
.box-main,.nav-main{border-radius:3px;box-shadow:0 0 5px #e0e0e0;} 解开注释,可给内容页面,添加内边距样式 */
|
||||
.box-main>.box-header {border-bottom-color:#eeeeee;}
|
||||
.box-main>.box-header .box-title .fa {color:#1e5edb;}
|
||||
.nav-tabs-custom>.nav-tabs>li.active {border-top-color:#1e5edb;}
|
||||
.form-control:focus,.select2-container--default.select2-container--focus .select2-selection--multiple,
|
||||
.select2-container--default .select2-search--dropdown .select2-search__field {border-color:#6980c3!important;}
|
||||
.table thead tr, .ui-jqgrid-htable thead tr, .ui-jqgrid-hdiv, .ui-jqgrid-hbox {background-color:#f6f6f6;}
|
||||
.ui-jqgrid .ui-jqgrid-htable th.ui-th-column-header, .ui-jqgrid .ui-jqgrid-htable th.ui-th-column,
|
||||
.ui-jqgrid .ui-jqgrid-labels th, .ui-jqgrid .ui-widget-content, .ui-jqgrid tr.ui-row-ltr td,
|
||||
.ui-jqgrid tr.ui-row-rtl td, .ui-jqgrid tr.ui-row-ltr td:last-child {border-color:#eaeaea;}
|
||||
.ui-state-hover td, .ui-widget-content .ui-state-hover td, .ui-widget-header .ui-state-hover td,
|
||||
.ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus {background:#f5f5f5;}
|
||||
.ui-jqgrid tr.ui-state-highlight.ui-row-ltr td {background-color:#e5f3ff;}
|
||||
/* .ui-jqgrid tr.ui-row-ltr td {border-right:0!important;} 解开注释,可去除表格单元格的竖边框线 */
|
||||
@@ -56,6 +56,7 @@
|
||||
.content-header {
|
||||
background: transparent;
|
||||
}
|
||||
.wrapper,
|
||||
.sidebar,
|
||||
.left-side {
|
||||
background-color: #263238;
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
.content-header {
|
||||
background: transparent;
|
||||
}
|
||||
.wrapper,
|
||||
.sidebar,
|
||||
.left-side {
|
||||
background-color: #263238;
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
.content-header {
|
||||
background: transparent;
|
||||
}
|
||||
.wrapper,
|
||||
.sidebar,
|
||||
.left-side {
|
||||
background-color: #263238;
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
.content-header {
|
||||
background: transparent;
|
||||
}
|
||||
.wrapper,
|
||||
.sidebar,
|
||||
.left-side {
|
||||
background-color: #263238;
|
||||
|
||||
@@ -0,0 +1,249 @@
|
||||
/*
|
||||
* Default Layout Theme
|
||||
*
|
||||
* Created for jquery.layout
|
||||
*
|
||||
* Copyright (c) 2010
|
||||
* Fabrizio Balliano (http://www.fabrizioballiano.net)
|
||||
* Kevin Dalman (http://allpro.net)
|
||||
*
|
||||
* Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
|
||||
* and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
|
||||
*
|
||||
* Last Updated: 2010-02-10
|
||||
* NOTE: For best code readability, view this with a fixed-space font and tabs equal to 4-chars
|
||||
*/
|
||||
|
||||
.ui-draggable-handle{-ms-touch-action:none;touch-action:none}
|
||||
|
||||
/*
|
||||
* DEFAULT FONT
|
||||
* Just to make demo-pages look better - not actually relevant to Layout!
|
||||
*/
|
||||
/* body { */
|
||||
/* font-family: Geneva, Arial, Helvetica, sans-serif; */
|
||||
/* font-size: 100%; */
|
||||
/* *font-size: 80%; */
|
||||
/* } */
|
||||
|
||||
/*
|
||||
* PANES & CONTENT-DIVs
|
||||
*/
|
||||
.ui-layout-pane { /* all 'panes' */
|
||||
/* background: #FFF; */
|
||||
/* border: 1px solid #eee; */
|
||||
/* padding: 10px; */
|
||||
overflow: auto;
|
||||
/* DO NOT add scrolling (or padding) to 'panes' that have a content-div,
|
||||
otherwise you may get double-scrollbars - on the pane AND on the content-div
|
||||
- use ui-layout-wrapper class if pane has a content-div
|
||||
- use ui-layout-container if pane has an inner-layout
|
||||
*/
|
||||
}
|
||||
/* (scrolling) content-div inside pane allows for fixed header(s) and/or footer(s) */
|
||||
.ui-layout-content {
|
||||
padding: 10px;
|
||||
position: relative; /* contain floated or positioned elements */
|
||||
overflow: auto; /* add scrolling to content-div */
|
||||
width: 100%;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* UTILITY CLASSES
|
||||
* Must come AFTER pane-class above so will override
|
||||
* These classes are NOT auto-generated and are NOT used by Layout
|
||||
*/
|
||||
.layout-child-container,
|
||||
.layout-content-container {
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
.layout-child-container {
|
||||
border: 0; /* remove border because inner-layout-panes probably have borders */
|
||||
}
|
||||
.layout-scroll {
|
||||
overflow: auto;
|
||||
}
|
||||
.layout-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/*
|
||||
* RESIZER-BARS
|
||||
*/
|
||||
.ui-layout-resizer { /* all 'resizer-bars' */
|
||||
background: #fafafa;
|
||||
border: 1px solid #eee;
|
||||
border-width: 0;
|
||||
}
|
||||
.ui-layout-resizer-drag { /* REAL resizer while resize in progress */
|
||||
}
|
||||
.ui-layout-resizer-hover { /* affects both open and closed states */
|
||||
}
|
||||
/* NOTE: It looks best when 'hover' and 'dragging' are set to the same color,
|
||||
otherwise color shifts while dragging when bar can't keep up with mouse */
|
||||
.ui-layout-resizer-open-hover , /* hover-color to 'resize' */
|
||||
.ui-layout-resizer-dragging { /* resizer beging 'dragging' */
|
||||
background: #fafafa;
|
||||
}
|
||||
.ui-layout-resizer-dragging { /* CLONED resizer being dragged */
|
||||
border: 1px solid #eee;
|
||||
}
|
||||
.ui-layout-resizer-north-dragging,
|
||||
.ui-layout-resizer-south-dragging {
|
||||
border-width: 1px 0;
|
||||
}
|
||||
.ui-layout-resizer-west-dragging,
|
||||
.ui-layout-resizer-east-dragging {
|
||||
border-width: 0 1px;
|
||||
}
|
||||
/* NOTE: Add a 'dragging-limit' color to provide visual feedback when resizer hits min/max size limits */
|
||||
.ui-layout-resizer-dragging-limit { /* CLONED resizer at min or max size-limit */
|
||||
background: #E1A4A4; /* red */
|
||||
}
|
||||
|
||||
.ui-layout-resizer-closed-hover { /* hover-color to 'slide open' */
|
||||
background: #EBD5AA;
|
||||
}
|
||||
.ui-layout-resizer-sliding { /* resizer when pane is 'slid open' */
|
||||
/* opacity: .10; show only a slight shadow */
|
||||
/* filter: alpha(opacity=10); */
|
||||
}
|
||||
.ui-layout-resizer-sliding-hover { /* sliding resizer - hover */
|
||||
/* opacity: 1.00; on-hover, show the resizer-bar normally */
|
||||
/* filter: alpha(opacity=100); */
|
||||
}
|
||||
/* sliding resizer - add 'outside-border' to resizer on-hover
|
||||
* this sample illustrates how to target specific panes and states */
|
||||
.ui-layout-resizer-north-sliding-hover { border-bottom-width: 1px; }
|
||||
.ui-layout-resizer-south-sliding-hover { border-top-width: 1px; }
|
||||
.ui-layout-resizer-west-sliding-hover { border-right-width: 1px; }
|
||||
.ui-layout-resizer-east-sliding-hover { border-left-width: 1px; }
|
||||
|
||||
/*
|
||||
* TOGGLER-BUTTONS
|
||||
*/
|
||||
.ui-layout-toggler {
|
||||
border: 1px solid #eee; /* match pane-border */
|
||||
background-color: #eee;
|
||||
}
|
||||
.ui-layout-resizer-hover .ui-layout-toggler {
|
||||
opacity: 1.00;
|
||||
filter: alpha(opacity=100);
|
||||
}
|
||||
.ui-layout-toggler-hover , /* need when NOT resizable */
|
||||
.ui-layout-resizer-hover .ui-layout-toggler-hover { /* need specificity when IS resizable */
|
||||
background-color: #FC6;
|
||||
opacity: 1.00;
|
||||
filter: alpha(opacity=100);
|
||||
}
|
||||
.ui-layout-toggler-north ,
|
||||
.ui-layout-toggler-south {
|
||||
border-width: 0 1px; /* left/right borders */
|
||||
}
|
||||
.ui-layout-toggler-west ,
|
||||
.ui-layout-toggler-east {
|
||||
border-width: 1px 0; /* top/bottom borders */
|
||||
}
|
||||
/* hide the toggler-button when the pane is 'slid open' */
|
||||
.ui-layout-resizer-sliding .ui-layout-toggler {
|
||||
display: none;
|
||||
}
|
||||
/*
|
||||
* style the text we put INSIDE the togglers
|
||||
*/
|
||||
.ui-layout-toggler .ui-content {
|
||||
color: #666;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
line-height: 8px;
|
||||
width: 100%;
|
||||
padding-bottom: 0.35ex; /* to 'vertically center' text inside text-span */
|
||||
}
|
||||
.ui-layout-toggler .ui-content .fa{
|
||||
line-height: 8px;
|
||||
}
|
||||
|
||||
.ui-layout-toggler-north-closed .fa:before,
|
||||
.ui-layout-toggler-south-open .fa:before {
|
||||
content: "\f0d7";/* 下 */
|
||||
}
|
||||
.ui-layout-toggler-south-closed .fa:before,
|
||||
.ui-layout-toggler-north-open .fa:before {
|
||||
content: "\f0d8";/* 上 */
|
||||
}
|
||||
.ui-layout-toggler-west-closed .fa:before,
|
||||
.ui-layout-toggler-east-open .fa:before {
|
||||
content: "\f0da";/* 右 */
|
||||
}
|
||||
.ui-layout-toggler-east-closed .fa:before,
|
||||
.ui-layout-toggler-west-open .fa:before {
|
||||
content: "\f0d9";/* 左 */
|
||||
}
|
||||
|
||||
/*
|
||||
* PANE-MASKS
|
||||
* these styles are hard-coded on mask elems, but are also
|
||||
* included here as !important to ensure will overrides any generic styles
|
||||
*/
|
||||
.ui-layout-mask {
|
||||
border: none !important;
|
||||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
overflow: hidden !important;
|
||||
position: absolute !important;
|
||||
opacity: 0 !important;
|
||||
filter: Alpha(Opacity="0") !important;
|
||||
}
|
||||
.ui-layout-mask-inside-pane { /* masks always inside pane EXCEPT when pane is an iframe */
|
||||
top: 0 !important;
|
||||
left: 0 !important;
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
}
|
||||
div.ui-layout-mask {} /* standard mask for iframes */
|
||||
iframe.ui-layout-mask {} /* extra mask for objects/applets */
|
||||
|
||||
/*
|
||||
* Default printing styles
|
||||
*/
|
||||
@media print {
|
||||
/*
|
||||
* Unless you want to print the layout as it appears onscreen,
|
||||
* these html/body styles are needed to allow the content to 'flow'
|
||||
*/
|
||||
html {
|
||||
height: auto !important;
|
||||
overflow: visible !important;
|
||||
}
|
||||
body.ui-layout-container {
|
||||
position: static !important;
|
||||
top: auto !important;
|
||||
bottom: auto !important;
|
||||
left: auto !important;
|
||||
right: auto !important;
|
||||
/* only IE6 has container width & height set by Layout */
|
||||
_width: auto !important;
|
||||
_height: auto !important;
|
||||
}
|
||||
.ui-layout-resizer, .ui-layout-toggler {
|
||||
display: none !important;
|
||||
}
|
||||
/*
|
||||
* Default pane print styles disables positioning, borders and backgrounds.
|
||||
* You can modify these styles however it suit your needs.
|
||||
*/
|
||||
.ui-layout-pane {
|
||||
border: none !important;
|
||||
background: transparent !important;
|
||||
position: relative !important;
|
||||
top: auto !important;
|
||||
bottom: auto !important;
|
||||
left: auto !important;
|
||||
right: auto !important;
|
||||
width: auto !important;
|
||||
height: auto !important;
|
||||
overflow: visible !important;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
5
modules/core/.settings/org.eclipse.core.resources.prefs
Normal file
5
modules/core/.settings/org.eclipse.core.resources.prefs
Normal file
@@ -0,0 +1,5 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding//src/main/java=UTF-8
|
||||
encoding//src/main/resources=UTF-8
|
||||
encoding//src/test/java=UTF-8
|
||||
encoding/<project>=UTF-8
|
||||
8
modules/core/.settings/org.eclipse.jdt.core.prefs
Normal file
8
modules/core/.settings/org.eclipse.jdt.core.prefs
Normal file
@@ -0,0 +1,8 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
4
modules/core/.settings/org.eclipse.m2e.core.prefs
Normal file
4
modules/core/.settings/org.eclipse.m2e.core.prefs
Normal file
@@ -0,0 +1,4 @@
|
||||
activeProfiles=
|
||||
eclipse.preferences.version=1
|
||||
resolveWorkspaceProjects=true
|
||||
version=1
|
||||
6
modules/core/.settings/org.eclipse.wst.common.component
Normal file
6
modules/core/.settings/org.eclipse.wst.common.component
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||
<wb-module deploy-name="jeesite-module-core">
|
||||
<wb-resource deploy-path="/" source-path="/src/main/java"/>
|
||||
<wb-resource deploy-path="/" source-path="/src/main/resources"/>
|
||||
</wb-module>
|
||||
</project-modules>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<faceted-project>
|
||||
<fixed facet="jst.utility"/>
|
||||
<fixed facet="java"/>
|
||||
<installed facet="jst.utility" version="1.0"/>
|
||||
<installed facet="java" version="1.8"/>
|
||||
</faceted-project>
|
||||
2
modules/core/.settings/org.eclipse.wst.validation.prefs
Normal file
2
modules/core/.settings/org.eclipse.wst.validation.prefs
Normal file
@@ -0,0 +1,2 @@
|
||||
disabled=06target
|
||||
eclipse.preferences.version=1
|
||||
7
modules/core/.settings/org.maven.ide.eclipse.prefs
Normal file
7
modules/core/.settings/org.maven.ide.eclipse.prefs
Normal file
@@ -0,0 +1,7 @@
|
||||
activeProfiles=
|
||||
eclipse.preferences.version=1
|
||||
fullBuildGoals=process-test-resources
|
||||
resolveWorkspaceProjects=true
|
||||
resourceFilterGoals=process-resources resources\:testResources
|
||||
skipCompilerPlugin=true
|
||||
version=1
|
||||
File diff suppressed because it is too large
Load Diff
919
modules/core/db/db2/core.sql
Normal file
919
modules/core/db/db2/core.sql
Normal file
@@ -0,0 +1,919 @@
|
||||
|
||||
/* Drop Tables */
|
||||
|
||||
DROP TABLE js_gen_table_column;
|
||||
DROP TABLE js_gen_table;
|
||||
DROP TABLE js_sys_company_office;
|
||||
DROP TABLE js_sys_employee_post;
|
||||
DROP TABLE js_sys_user_data_scope;
|
||||
DROP TABLE js_sys_user_role;
|
||||
DROP TABLE js_sys_user;
|
||||
DROP TABLE js_sys_employee;
|
||||
DROP TABLE js_sys_company;
|
||||
DROP TABLE js_sys_area;
|
||||
DROP TABLE js_sys_config;
|
||||
DROP TABLE js_sys_dict_data;
|
||||
DROP TABLE js_sys_dict_type;
|
||||
DROP TABLE js_sys_file_upload;
|
||||
DROP TABLE js_sys_file_entity;
|
||||
DROP TABLE js_sys_job_log;
|
||||
DROP TABLE js_sys_job;
|
||||
DROP TABLE js_sys_lang;
|
||||
DROP TABLE js_sys_log;
|
||||
DROP TABLE js_sys_role_menu;
|
||||
DROP TABLE js_sys_menu;
|
||||
DROP TABLE js_sys_module;
|
||||
DROP TABLE js_sys_msg_inner_record;
|
||||
DROP TABLE js_sys_msg_inner;
|
||||
DROP TABLE js_sys_msg_push;
|
||||
DROP TABLE js_sys_msg_pushed;
|
||||
DROP TABLE js_sys_msg_template;
|
||||
DROP TABLE js_sys_office;
|
||||
DROP TABLE js_sys_post;
|
||||
DROP TABLE js_sys_role_data_scope;
|
||||
DROP TABLE js_sys_role;
|
||||
|
||||
|
||||
|
||||
|
||||
/* Create Tables */
|
||||
|
||||
-- 代码生成表
|
||||
CREATE TABLE js_gen_table
|
||||
(
|
||||
table_name varchar(64) NOT NULL,
|
||||
class_name varchar(100) NOT NULL,
|
||||
comments varchar(500) NOT NULL,
|
||||
parent_table_name varchar(64),
|
||||
parent_table_fk_name varchar(64),
|
||||
data_source_name varchar(64),
|
||||
tpl_category varchar(200),
|
||||
package_name varchar(500),
|
||||
module_name varchar(30),
|
||||
sub_module_name varchar(30),
|
||||
function_name varchar(200),
|
||||
function_name_simple varchar(50),
|
||||
function_author varchar(50),
|
||||
gen_base_dir varchar(1000),
|
||||
options varchar(1000),
|
||||
create_by varchar(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
update_by varchar(64) NOT NULL,
|
||||
update_date timestamp NOT NULL,
|
||||
remarks varchar(500),
|
||||
PRIMARY KEY (table_name)
|
||||
);
|
||||
|
||||
|
||||
-- 代码生成表列
|
||||
CREATE TABLE js_gen_table_column
|
||||
(
|
||||
id varchar(64) NOT NULL,
|
||||
table_name varchar(64) NOT NULL,
|
||||
column_name varchar(64) NOT NULL,
|
||||
column_sort decimal(10),
|
||||
column_type varchar(100) NOT NULL,
|
||||
column_label varchar(50),
|
||||
comments varchar(500) NOT NULL,
|
||||
attr_name varchar(200) NOT NULL,
|
||||
attr_type varchar(200) NOT NULL,
|
||||
is_pk char(1),
|
||||
is_null char(1),
|
||||
is_insert char(1),
|
||||
is_update char(1),
|
||||
is_list char(1),
|
||||
is_query char(1),
|
||||
query_type varchar(200),
|
||||
is_edit char(1),
|
||||
show_type varchar(200),
|
||||
options varchar(1000),
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
|
||||
-- 行政区划
|
||||
CREATE TABLE js_sys_area
|
||||
(
|
||||
area_code varchar(100) NOT NULL,
|
||||
parent_code varchar(64) NOT NULL,
|
||||
parent_codes varchar(1000) NOT NULL,
|
||||
tree_sort decimal(10) NOT NULL,
|
||||
tree_sorts varchar(1000) NOT NULL,
|
||||
tree_leaf char(1) NOT NULL,
|
||||
tree_level decimal(4) NOT NULL,
|
||||
tree_names varchar(1000) NOT NULL,
|
||||
area_name varchar(100) NOT NULL,
|
||||
area_type char(1),
|
||||
status char(1) DEFAULT '0' NOT NULL,
|
||||
create_by varchar(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
update_by varchar(64) NOT NULL,
|
||||
update_date timestamp NOT NULL,
|
||||
remarks varchar(500),
|
||||
PRIMARY KEY (area_code)
|
||||
);
|
||||
|
||||
|
||||
-- 公司表
|
||||
CREATE TABLE js_sys_company
|
||||
(
|
||||
company_code varchar(64) NOT NULL,
|
||||
parent_code varchar(64) NOT NULL,
|
||||
parent_codes varchar(1000) NOT NULL,
|
||||
tree_sort decimal(10) NOT NULL,
|
||||
tree_sorts varchar(1000) NOT NULL,
|
||||
tree_leaf char(1) NOT NULL,
|
||||
tree_level decimal(4) NOT NULL,
|
||||
tree_names varchar(1000) NOT NULL,
|
||||
view_code varchar(100) NOT NULL,
|
||||
company_name varchar(200) NOT NULL,
|
||||
full_name varchar(200) NOT NULL,
|
||||
area_code varchar(100),
|
||||
status char(1) DEFAULT '0' NOT NULL,
|
||||
create_by varchar(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
update_by varchar(64) NOT NULL,
|
||||
update_date timestamp NOT NULL,
|
||||
remarks varchar(500),
|
||||
corp_code varchar(64) DEFAULT '0' NOT NULL,
|
||||
corp_name varchar(100) DEFAULT 'JeeSite' NOT NULL,
|
||||
extend_s1 varchar(500),
|
||||
extend_s2 varchar(500),
|
||||
extend_s3 varchar(500),
|
||||
extend_s4 varchar(500),
|
||||
extend_s5 varchar(500),
|
||||
extend_s6 varchar(500),
|
||||
extend_s7 varchar(500),
|
||||
extend_s8 varchar(500),
|
||||
extend_i1 decimal(19),
|
||||
extend_i2 decimal(19),
|
||||
extend_i3 decimal(19),
|
||||
extend_i4 decimal(19),
|
||||
extend_f1 decimal(19,4),
|
||||
extend_f2 decimal(19,4),
|
||||
extend_f3 decimal(19,4),
|
||||
extend_f4 decimal(19,4),
|
||||
extend_d1 timestamp,
|
||||
extend_d2 timestamp,
|
||||
extend_d3 timestamp,
|
||||
extend_d4 timestamp,
|
||||
PRIMARY KEY (company_code)
|
||||
);
|
||||
|
||||
|
||||
-- 公司部门关联表
|
||||
CREATE TABLE js_sys_company_office
|
||||
(
|
||||
company_code varchar(64) NOT NULL,
|
||||
office_code varchar(64) NOT NULL,
|
||||
PRIMARY KEY (company_code, office_code)
|
||||
);
|
||||
|
||||
|
||||
-- 参数配置表
|
||||
CREATE TABLE js_sys_config
|
||||
(
|
||||
id varchar(64) NOT NULL,
|
||||
config_name varchar(100) NOT NULL,
|
||||
config_key varchar(100) NOT NULL,
|
||||
config_value varchar(1000),
|
||||
is_sys char(1) NOT NULL,
|
||||
create_by varchar(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
update_by varchar(64) NOT NULL,
|
||||
update_date timestamp NOT NULL,
|
||||
remarks varchar(500),
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
|
||||
-- 字典数据表
|
||||
CREATE TABLE js_sys_dict_data
|
||||
(
|
||||
dict_code varchar(64) NOT NULL,
|
||||
parent_code varchar(64) NOT NULL,
|
||||
parent_codes varchar(1000) NOT NULL,
|
||||
tree_sort decimal(10) NOT NULL,
|
||||
tree_sorts varchar(1000) NOT NULL,
|
||||
tree_leaf char(1) NOT NULL,
|
||||
tree_level decimal(4) NOT NULL,
|
||||
tree_names varchar(1000) NOT NULL,
|
||||
dict_label varchar(100) NOT NULL,
|
||||
dict_value varchar(100) NOT NULL,
|
||||
dict_type varchar(100) NOT NULL,
|
||||
is_sys char(1) NOT NULL,
|
||||
description varchar(500),
|
||||
css_style varchar(500),
|
||||
css_class varchar(500),
|
||||
status char(1) DEFAULT '0' NOT NULL,
|
||||
create_by varchar(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
update_by varchar(64) NOT NULL,
|
||||
update_date timestamp NOT NULL,
|
||||
remarks varchar(500),
|
||||
corp_code varchar(64) DEFAULT '0' NOT NULL,
|
||||
corp_name varchar(100) DEFAULT 'JeeSite' NOT NULL,
|
||||
extend_s1 varchar(500),
|
||||
extend_s2 varchar(500),
|
||||
extend_s3 varchar(500),
|
||||
extend_s4 varchar(500),
|
||||
extend_s5 varchar(500),
|
||||
extend_s6 varchar(500),
|
||||
extend_s7 varchar(500),
|
||||
extend_s8 varchar(500),
|
||||
extend_i1 decimal(19),
|
||||
extend_i2 decimal(19),
|
||||
extend_i3 decimal(19),
|
||||
extend_i4 decimal(19),
|
||||
extend_f1 decimal(19,4),
|
||||
extend_f2 decimal(19,4),
|
||||
extend_f3 decimal(19,4),
|
||||
extend_f4 decimal(19,4),
|
||||
extend_d1 timestamp,
|
||||
extend_d2 timestamp,
|
||||
extend_d3 timestamp,
|
||||
extend_d4 timestamp,
|
||||
PRIMARY KEY (dict_code)
|
||||
);
|
||||
|
||||
|
||||
-- 字典类型表
|
||||
CREATE TABLE js_sys_dict_type
|
||||
(
|
||||
id varchar(64) NOT NULL,
|
||||
dict_name varchar(100) NOT NULL,
|
||||
dict_type varchar(100) NOT NULL,
|
||||
is_sys char(1) NOT NULL,
|
||||
status char(1) DEFAULT '0' NOT NULL,
|
||||
create_by varchar(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
update_by varchar(64) NOT NULL,
|
||||
update_date timestamp NOT NULL,
|
||||
remarks varchar(500),
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
|
||||
-- 员工表
|
||||
CREATE TABLE js_sys_employee
|
||||
(
|
||||
emp_code varchar(64) NOT NULL,
|
||||
emp_name varchar(100) NOT NULL,
|
||||
emp_name_en varchar(100),
|
||||
office_code varchar(64) NOT NULL,
|
||||
office_name varchar(100) NOT NULL,
|
||||
company_code varchar(64),
|
||||
company_name varchar(200),
|
||||
status char(1) NOT NULL,
|
||||
create_by varchar(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
update_by varchar(64) NOT NULL,
|
||||
update_date timestamp NOT NULL,
|
||||
remarks varchar(500),
|
||||
corp_code varchar(64) DEFAULT '0' NOT NULL,
|
||||
corp_name varchar(100) DEFAULT 'JeeSite' NOT NULL,
|
||||
PRIMARY KEY (emp_code)
|
||||
);
|
||||
|
||||
|
||||
-- 员工与岗位关联表
|
||||
CREATE TABLE js_sys_employee_post
|
||||
(
|
||||
emp_code varchar(64) NOT NULL,
|
||||
post_code varchar(64) NOT NULL,
|
||||
PRIMARY KEY (emp_code, post_code)
|
||||
);
|
||||
|
||||
|
||||
-- 文件实体表
|
||||
CREATE TABLE js_sys_file_entity
|
||||
(
|
||||
file_id varchar(64) NOT NULL,
|
||||
file_md5 varchar(64) NOT NULL UNIQUE,
|
||||
file_path varchar(1000) NOT NULL,
|
||||
file_content_type varchar(200) NOT NULL,
|
||||
file_extension varchar(100) NOT NULL,
|
||||
file_size decimal(31) NOT NULL,
|
||||
PRIMARY KEY (file_id)
|
||||
);
|
||||
|
||||
|
||||
-- 文件上传表
|
||||
CREATE TABLE js_sys_file_upload
|
||||
(
|
||||
id varchar(64) NOT NULL,
|
||||
file_id varchar(64) NOT NULL,
|
||||
file_name varchar(500) NOT NULL,
|
||||
file_type varchar(20) NOT NULL,
|
||||
biz_key varchar(64),
|
||||
biz_type varchar(64),
|
||||
status char(1) DEFAULT '0' NOT NULL,
|
||||
create_by varchar(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
update_by varchar(64) NOT NULL,
|
||||
update_date timestamp NOT NULL,
|
||||
remarks varchar(500),
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
|
||||
-- 作业调度表
|
||||
CREATE TABLE js_sys_job
|
||||
(
|
||||
job_name varchar(64) NOT NULL,
|
||||
job_group varchar(64) NOT NULL,
|
||||
description varchar(100) NOT NULL,
|
||||
invoke_target varchar(1000) NOT NULL,
|
||||
cron_expression varchar(255) NOT NULL,
|
||||
misfire_instruction decimal(1) NOT NULL,
|
||||
concurrent char(1) NOT NULL,
|
||||
status char(1) NOT NULL,
|
||||
create_by varchar(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
update_by varchar(64) NOT NULL,
|
||||
update_date timestamp NOT NULL,
|
||||
remarks varchar(500),
|
||||
PRIMARY KEY (job_name, job_group)
|
||||
);
|
||||
|
||||
|
||||
-- 作业调度日志表
|
||||
CREATE TABLE js_sys_job_log
|
||||
(
|
||||
id varchar(64) NOT NULL,
|
||||
job_name varchar(64) NOT NULL,
|
||||
job_group varchar(64) NOT NULL,
|
||||
job_type varchar(50),
|
||||
job_event varchar(200),
|
||||
job_message varchar(500),
|
||||
is_exception char(1),
|
||||
exception_info clob,
|
||||
create_date timestamp,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
|
||||
-- 国际化语言
|
||||
CREATE TABLE js_sys_lang
|
||||
(
|
||||
id varchar(64) NOT NULL,
|
||||
module_code varchar(64) NOT NULL,
|
||||
lang_code varchar(500) NOT NULL,
|
||||
lang_text varchar(500) NOT NULL,
|
||||
lang_type varchar(50) NOT NULL,
|
||||
create_by varchar(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
update_by varchar(64) NOT NULL,
|
||||
update_date timestamp NOT NULL,
|
||||
remarks varchar(500),
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
|
||||
-- 操作日志表
|
||||
CREATE TABLE js_sys_log
|
||||
(
|
||||
id varchar(64) NOT NULL,
|
||||
log_type varchar(50) NOT NULL,
|
||||
log_title varchar(500) NOT NULL,
|
||||
create_by varchar(64) NOT NULL,
|
||||
create_by_name varchar(100) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
request_uri varchar(500),
|
||||
request_method varchar(10),
|
||||
request_params clob,
|
||||
diff_modify_data clob,
|
||||
biz_key varchar(64),
|
||||
biz_type varchar(64),
|
||||
remote_addr varchar(255) NOT NULL,
|
||||
server_addr varchar(255) NOT NULL,
|
||||
is_exception char(1),
|
||||
exception_info clob,
|
||||
user_agent varchar(500),
|
||||
device_name varchar(100),
|
||||
browser_name varchar(100),
|
||||
execute_time decimal(19),
|
||||
corp_code varchar(64) DEFAULT '0' NOT NULL,
|
||||
corp_name varchar(100) DEFAULT 'JeeSite' NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
|
||||
-- 菜单表
|
||||
CREATE TABLE js_sys_menu
|
||||
(
|
||||
menu_code varchar(64) NOT NULL,
|
||||
parent_code varchar(64) NOT NULL,
|
||||
parent_codes varchar(1000) NOT NULL,
|
||||
tree_sort decimal(10) NOT NULL,
|
||||
tree_sorts varchar(1000) NOT NULL,
|
||||
tree_leaf char(1) NOT NULL,
|
||||
tree_level decimal(4) NOT NULL,
|
||||
tree_names varchar(1000) NOT NULL,
|
||||
menu_name varchar(100) NOT NULL,
|
||||
menu_type char(1) NOT NULL,
|
||||
menu_href varchar(1000),
|
||||
menu_target varchar(20),
|
||||
menu_icon varchar(100),
|
||||
menu_color varchar(50),
|
||||
permission varchar(1000),
|
||||
weight decimal(4),
|
||||
is_show char(1) NOT NULL,
|
||||
sys_code varchar(64) NOT NULL,
|
||||
module_codes varchar(500) NOT NULL,
|
||||
status char(1) DEFAULT '0' NOT NULL,
|
||||
create_by varchar(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
update_by varchar(64) NOT NULL,
|
||||
update_date timestamp NOT NULL,
|
||||
remarks varchar(500),
|
||||
extend_s1 varchar(500),
|
||||
extend_s2 varchar(500),
|
||||
extend_s3 varchar(500),
|
||||
extend_s4 varchar(500),
|
||||
extend_s5 varchar(500),
|
||||
extend_s6 varchar(500),
|
||||
extend_s7 varchar(500),
|
||||
extend_s8 varchar(500),
|
||||
extend_i1 decimal(19),
|
||||
extend_i2 decimal(19),
|
||||
extend_i3 decimal(19),
|
||||
extend_i4 decimal(19),
|
||||
extend_f1 decimal(19,4),
|
||||
extend_f2 decimal(19,4),
|
||||
extend_f3 decimal(19,4),
|
||||
extend_f4 decimal(19,4),
|
||||
extend_d1 timestamp,
|
||||
extend_d2 timestamp,
|
||||
extend_d3 timestamp,
|
||||
extend_d4 timestamp,
|
||||
PRIMARY KEY (menu_code)
|
||||
);
|
||||
|
||||
|
||||
-- 模块表
|
||||
CREATE TABLE js_sys_module
|
||||
(
|
||||
module_code varchar(64) NOT NULL,
|
||||
module_name varchar(100) NOT NULL,
|
||||
description varchar(500),
|
||||
main_class_name varchar(500),
|
||||
current_version varchar(50),
|
||||
upgrade_info varchar(300),
|
||||
status char(1) DEFAULT '0' NOT NULL,
|
||||
create_by varchar(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
update_by varchar(64) NOT NULL,
|
||||
update_date timestamp NOT NULL,
|
||||
remarks varchar(500),
|
||||
PRIMARY KEY (module_code)
|
||||
);
|
||||
|
||||
|
||||
-- 内部消息
|
||||
CREATE TABLE js_sys_msg_inner
|
||||
(
|
||||
id varchar(64) NOT NULL,
|
||||
msg_title varchar(200) NOT NULL,
|
||||
content_level char(1) NOT NULL,
|
||||
content_type char(1),
|
||||
msg_content clob NOT NULL,
|
||||
receive_type char(1) NOT NULL,
|
||||
receive_codes clob NOT NULL,
|
||||
receive_names clob NOT NULL,
|
||||
send_user_code varchar(64) NOT NULL,
|
||||
send_user_name varchar(100) NOT NULL,
|
||||
send_date timestamp NOT NULL,
|
||||
is_attac char(1),
|
||||
notify_types varchar(100) NOT NULL,
|
||||
status char(1) NOT NULL,
|
||||
create_by varchar(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
update_by varchar(64) NOT NULL,
|
||||
update_date timestamp NOT NULL,
|
||||
remarks varchar(500),
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
|
||||
-- 内部消息发送记录表
|
||||
CREATE TABLE js_sys_msg_inner_record
|
||||
(
|
||||
id varchar(64) NOT NULL,
|
||||
msg_inner_id varchar(64) NOT NULL,
|
||||
receive_user_code varchar(64),
|
||||
receive_user_name varchar(100) NOT NULL,
|
||||
read_status char(1) NOT NULL,
|
||||
read_date timestamp,
|
||||
is_star char(1),
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
|
||||
-- 消息推送表
|
||||
CREATE TABLE js_sys_msg_push
|
||||
(
|
||||
id varchar(64) NOT NULL,
|
||||
msg_type varchar(16) NOT NULL,
|
||||
msg_title varchar(200) NOT NULL,
|
||||
msg_content clob NOT NULL,
|
||||
biz_key varchar(64),
|
||||
biz_type varchar(64),
|
||||
receive_code varchar(64) NOT NULL,
|
||||
receive_user_code varchar(64) NOT NULL,
|
||||
receive_user_name varchar(100) NOT NULL,
|
||||
send_user_code varchar(64) NOT NULL,
|
||||
send_user_name varchar(100) NOT NULL,
|
||||
send_date timestamp NOT NULL,
|
||||
is_merge_push char(1),
|
||||
plan_push_date timestamp,
|
||||
push_number int,
|
||||
push_return_code varchar(200),
|
||||
push_return_msg_id varchar(200),
|
||||
push_return_content clob,
|
||||
push_status char(1),
|
||||
push_date timestamp,
|
||||
read_status char(1),
|
||||
read_date timestamp,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
|
||||
-- 消息已推送表
|
||||
CREATE TABLE js_sys_msg_pushed
|
||||
(
|
||||
id varchar(64) NOT NULL,
|
||||
msg_type varchar(16) NOT NULL,
|
||||
msg_title varchar(200) NOT NULL,
|
||||
msg_content clob NOT NULL,
|
||||
biz_key varchar(64),
|
||||
biz_type varchar(64),
|
||||
receive_code varchar(64) NOT NULL,
|
||||
receive_user_code varchar(64) NOT NULL,
|
||||
receive_user_name varchar(100) NOT NULL,
|
||||
send_user_code varchar(64) NOT NULL,
|
||||
send_user_name varchar(100) NOT NULL,
|
||||
send_date timestamp NOT NULL,
|
||||
is_merge_push char(1),
|
||||
plan_push_date timestamp,
|
||||
push_number int,
|
||||
push_return_content clob,
|
||||
push_return_code varchar(200),
|
||||
push_return_msg_id varchar(200),
|
||||
push_status char(1),
|
||||
push_date timestamp,
|
||||
read_status char(1),
|
||||
read_date timestamp,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
|
||||
-- 消息模板
|
||||
CREATE TABLE js_sys_msg_template
|
||||
(
|
||||
id varchar(64) NOT NULL,
|
||||
module_code varchar(64),
|
||||
tpl_key varchar(100) NOT NULL,
|
||||
tpl_name varchar(100) NOT NULL,
|
||||
tpl_type varchar(16) NOT NULL,
|
||||
tpl_content clob NOT NULL,
|
||||
status char(1) DEFAULT '0' NOT NULL,
|
||||
create_by varchar(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
update_by varchar(64) NOT NULL,
|
||||
update_date timestamp NOT NULL,
|
||||
remarks varchar(500),
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
|
||||
-- 组织机构表
|
||||
CREATE TABLE js_sys_office
|
||||
(
|
||||
office_code varchar(64) NOT NULL,
|
||||
parent_code varchar(64) NOT NULL,
|
||||
parent_codes varchar(1000) NOT NULL,
|
||||
tree_sort decimal(10) NOT NULL,
|
||||
tree_sorts varchar(1000) NOT NULL,
|
||||
tree_leaf char(1) NOT NULL,
|
||||
tree_level decimal(4) NOT NULL,
|
||||
tree_names varchar(1000) NOT NULL,
|
||||
view_code varchar(100) NOT NULL,
|
||||
office_name varchar(100) NOT NULL,
|
||||
full_name varchar(200) NOT NULL,
|
||||
office_type char(1) NOT NULL,
|
||||
leader varchar(100),
|
||||
phone varchar(100),
|
||||
address varchar(255),
|
||||
zip_code varchar(100),
|
||||
email varchar(300),
|
||||
status char(1) DEFAULT '0' NOT NULL,
|
||||
create_by varchar(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
update_by varchar(64) NOT NULL,
|
||||
update_date timestamp NOT NULL,
|
||||
remarks varchar(500),
|
||||
corp_code varchar(64) DEFAULT '0' NOT NULL,
|
||||
corp_name varchar(100) DEFAULT 'JeeSite' NOT NULL,
|
||||
extend_s1 varchar(500),
|
||||
extend_s2 varchar(500),
|
||||
extend_s3 varchar(500),
|
||||
extend_s4 varchar(500),
|
||||
extend_s5 varchar(500),
|
||||
extend_s6 varchar(500),
|
||||
extend_s7 varchar(500),
|
||||
extend_s8 varchar(500),
|
||||
extend_i1 decimal(19),
|
||||
extend_i2 decimal(19),
|
||||
extend_i3 decimal(19),
|
||||
extend_i4 decimal(19),
|
||||
extend_f1 decimal(19,4),
|
||||
extend_f2 decimal(19,4),
|
||||
extend_f3 decimal(19,4),
|
||||
extend_f4 decimal(19,4),
|
||||
extend_d1 timestamp,
|
||||
extend_d2 timestamp,
|
||||
extend_d3 timestamp,
|
||||
extend_d4 timestamp,
|
||||
PRIMARY KEY (office_code)
|
||||
);
|
||||
|
||||
|
||||
-- 员工岗位表
|
||||
CREATE TABLE js_sys_post
|
||||
(
|
||||
post_code varchar(64) NOT NULL,
|
||||
post_name varchar(100) NOT NULL,
|
||||
post_type varchar(100),
|
||||
post_sort decimal(10),
|
||||
status char(1) DEFAULT '0' NOT NULL,
|
||||
create_by varchar(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
update_by varchar(64) NOT NULL,
|
||||
update_date timestamp NOT NULL,
|
||||
remarks varchar(500),
|
||||
corp_code varchar(64) DEFAULT '0' NOT NULL,
|
||||
corp_name varchar(100) DEFAULT 'JeeSite' NOT NULL,
|
||||
PRIMARY KEY (post_code)
|
||||
);
|
||||
|
||||
|
||||
-- 角色表
|
||||
CREATE TABLE js_sys_role
|
||||
(
|
||||
role_code varchar(64) NOT NULL,
|
||||
role_name varchar(100) NOT NULL,
|
||||
role_type varchar(100),
|
||||
role_sort decimal(10),
|
||||
is_sys char(1),
|
||||
user_type varchar(16),
|
||||
data_scope char(1),
|
||||
status char(1) DEFAULT '0' NOT NULL,
|
||||
create_by varchar(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
update_by varchar(64) NOT NULL,
|
||||
update_date timestamp NOT NULL,
|
||||
remarks varchar(500),
|
||||
corp_code varchar(64) DEFAULT '0' NOT NULL,
|
||||
corp_name varchar(100) DEFAULT 'JeeSite' NOT NULL,
|
||||
PRIMARY KEY (role_code)
|
||||
);
|
||||
|
||||
|
||||
-- 角色数据权限表
|
||||
CREATE TABLE js_sys_role_data_scope
|
||||
(
|
||||
role_code varchar(64) NOT NULL,
|
||||
ctrl_type varchar(20) NOT NULL,
|
||||
ctrl_data varchar(64) NOT NULL,
|
||||
ctrl_permi varchar(64) NOT NULL,
|
||||
PRIMARY KEY (role_code, ctrl_type, ctrl_data, ctrl_permi)
|
||||
);
|
||||
|
||||
|
||||
-- 角色与菜单关联表
|
||||
CREATE TABLE js_sys_role_menu
|
||||
(
|
||||
role_code varchar(64) NOT NULL,
|
||||
menu_code varchar(64) NOT NULL,
|
||||
PRIMARY KEY (role_code, menu_code)
|
||||
);
|
||||
|
||||
|
||||
-- 用户表
|
||||
CREATE TABLE js_sys_user
|
||||
(
|
||||
user_code varchar(100) NOT NULL,
|
||||
login_code varchar(100) NOT NULL,
|
||||
user_name varchar(100) NOT NULL,
|
||||
password varchar(100) NOT NULL,
|
||||
email varchar(300),
|
||||
mobile varchar(100),
|
||||
phone varchar(100),
|
||||
sex char(1),
|
||||
avatar varchar(1000),
|
||||
sign varchar(200),
|
||||
wx_openid varchar(100),
|
||||
mobile_imei varchar(100),
|
||||
user_type varchar(16) NOT NULL,
|
||||
ref_code varchar(64),
|
||||
ref_name varchar(100),
|
||||
mgr_type char(1) NOT NULL,
|
||||
pwd_security_level decimal(1),
|
||||
pwd_update_date timestamp,
|
||||
pwd_update_record varchar(1000),
|
||||
pwd_question varchar(200),
|
||||
pwd_question_answer varchar(200),
|
||||
pwd_question_2 varchar(200),
|
||||
pwd_question_answer_2 varchar(200),
|
||||
pwd_question_3 varchar(200),
|
||||
pwd_question_answer_3 varchar(200),
|
||||
pwd_quest_update_date timestamp,
|
||||
last_login_ip varchar(100),
|
||||
last_login_date timestamp,
|
||||
freeze_date timestamp,
|
||||
freeze_cause varchar(200),
|
||||
user_weight decimal(8) DEFAULT 0,
|
||||
status char NOT NULL,
|
||||
create_by varchar(64) NOT NULL,
|
||||
create_date timestamp NOT NULL,
|
||||
update_by varchar(64) NOT NULL,
|
||||
update_date timestamp NOT NULL,
|
||||
remarks varchar(500),
|
||||
corp_code varchar(64) DEFAULT '0' NOT NULL,
|
||||
corp_name varchar(100) DEFAULT 'JeeSite' NOT NULL,
|
||||
extend_s1 varchar(500),
|
||||
extend_s2 varchar(500),
|
||||
extend_s3 varchar(500),
|
||||
extend_s4 varchar(500),
|
||||
extend_s5 varchar(500),
|
||||
extend_s6 varchar(500),
|
||||
extend_s7 varchar(500),
|
||||
extend_s8 varchar(500),
|
||||
extend_i1 decimal(19),
|
||||
extend_i2 decimal(19),
|
||||
extend_i3 decimal(19),
|
||||
extend_i4 decimal(19),
|
||||
extend_f1 decimal(19,4),
|
||||
extend_f2 decimal(19,4),
|
||||
extend_f3 decimal(19,4),
|
||||
extend_f4 decimal(19,4),
|
||||
extend_d1 timestamp,
|
||||
extend_d2 timestamp,
|
||||
extend_d3 timestamp,
|
||||
extend_d4 timestamp,
|
||||
PRIMARY KEY (user_code)
|
||||
);
|
||||
|
||||
|
||||
-- 用户数据权限表
|
||||
CREATE TABLE js_sys_user_data_scope
|
||||
(
|
||||
user_code varchar(100) NOT NULL,
|
||||
ctrl_type varchar(20) NOT NULL,
|
||||
ctrl_data varchar(64) NOT NULL,
|
||||
ctrl_permi varchar(64) NOT NULL,
|
||||
PRIMARY KEY (user_code, ctrl_type, ctrl_data, ctrl_permi)
|
||||
);
|
||||
|
||||
|
||||
-- 用户与角色关联表
|
||||
CREATE TABLE js_sys_user_role
|
||||
(
|
||||
user_code varchar(100) NOT NULL,
|
||||
role_code varchar(64) NOT NULL,
|
||||
PRIMARY KEY (user_code, role_code)
|
||||
);
|
||||
|
||||
|
||||
|
||||
/* Create Indexes */
|
||||
|
||||
CREATE INDEX idx_gen_table_ptn ON js_gen_table (parent_table_name);
|
||||
CREATE INDEX idx_gen_table_column_tn ON js_gen_table_column (table_name);
|
||||
CREATE INDEX idx_sys_area_pc ON js_sys_area (parent_code);
|
||||
CREATE INDEX idx_sys_area_ts ON js_sys_area (tree_sort);
|
||||
CREATE INDEX idx_sys_area_status ON js_sys_area (status);
|
||||
CREATE INDEX idx_sys_area_pcs ON js_sys_area (parent_codes);
|
||||
CREATE INDEX idx_sys_area_tss ON js_sys_area (tree_sorts);
|
||||
CREATE INDEX idx_sys_company_cc ON js_sys_company (corp_code);
|
||||
CREATE INDEX idx_sys_company_pc ON js_sys_company (parent_code);
|
||||
CREATE INDEX idx_sys_company_ts ON js_sys_company (tree_sort);
|
||||
CREATE INDEX idx_sys_company_status ON js_sys_company (status);
|
||||
CREATE INDEX idx_sys_company_vc ON js_sys_company (view_code);
|
||||
CREATE INDEX idx_sys_company_pcs ON js_sys_company (parent_codes);
|
||||
CREATE INDEX idx_sys_company_tss ON js_sys_company (tree_sorts);
|
||||
CREATE INDEX idx_sys_config_key ON js_sys_config (config_key);
|
||||
CREATE INDEX idx_sys_dict_data_cc ON js_sys_dict_data (corp_code);
|
||||
CREATE INDEX idx_sys_dict_data_dt ON js_sys_dict_data (dict_type);
|
||||
CREATE INDEX idx_sys_dict_data_pc ON js_sys_dict_data (parent_code);
|
||||
CREATE INDEX idx_sys_dict_data_status ON js_sys_dict_data (status);
|
||||
CREATE INDEX idx_sys_dict_data_pcs ON js_sys_dict_data (parent_codes);
|
||||
CREATE INDEX idx_sys_dict_data_ts ON js_sys_dict_data (tree_sort);
|
||||
CREATE INDEX idx_sys_dict_data_tss ON js_sys_dict_data (tree_sorts);
|
||||
CREATE INDEX idx_sys_dict_data_dv ON js_sys_dict_data (dict_value);
|
||||
CREATE INDEX idx_sys_dict_type_is ON js_sys_dict_type (is_sys);
|
||||
CREATE INDEX idx_sys_dict_type_status ON js_sys_dict_type (status);
|
||||
CREATE INDEX idx_sys_employee_cco ON js_sys_employee (company_code);
|
||||
CREATE INDEX idx_sys_employee_cc ON js_sys_employee (corp_code);
|
||||
CREATE INDEX idx_sys_employee_ud ON js_sys_employee (update_date);
|
||||
CREATE INDEX idx_sys_employee_oc ON js_sys_employee (office_code);
|
||||
CREATE INDEX idx_sys_employee_status ON js_sys_employee (status);
|
||||
CREATE INDEX idx_sys_file_entity_md5 ON js_sys_file_entity (file_md5);
|
||||
CREATE INDEX idx_sys_file_entity_size ON js_sys_file_entity (file_size);
|
||||
CREATE INDEX idx_sys_file_biz_ft ON js_sys_file_upload (file_type);
|
||||
CREATE INDEX idx_sys_file_biz_fi ON js_sys_file_upload (file_id);
|
||||
CREATE INDEX idx_sys_file_biz_status ON js_sys_file_upload (status);
|
||||
CREATE INDEX idx_sys_file_biz_cb ON js_sys_file_upload (create_by);
|
||||
CREATE INDEX idx_sys_file_biz_ud ON js_sys_file_upload (update_date);
|
||||
CREATE INDEX idx_sys_file_biz_bt ON js_sys_file_upload (biz_type);
|
||||
CREATE INDEX idx_sys_file_biz_bk ON js_sys_file_upload (biz_key);
|
||||
CREATE INDEX idx_sys_job_status ON js_sys_job (status);
|
||||
CREATE INDEX idx_sys_job_log_jn ON js_sys_job_log (job_name);
|
||||
CREATE INDEX idx_sys_job_log_jg ON js_sys_job_log (job_group);
|
||||
CREATE INDEX idx_sys_job_log_t ON js_sys_job_log (job_type);
|
||||
CREATE INDEX idx_sys_job_log_e ON js_sys_job_log (job_event);
|
||||
CREATE INDEX idx_sys_job_log_ie ON js_sys_job_log (is_exception);
|
||||
CREATE INDEX idx_sys_lang_code ON js_sys_lang (lang_code);
|
||||
CREATE INDEX idx_sys_lang_type ON js_sys_lang (lang_type);
|
||||
CREATE INDEX idx_sys_log_cb ON js_sys_log (create_by);
|
||||
CREATE INDEX idx_sys_log_cc ON js_sys_log (corp_code);
|
||||
CREATE INDEX idx_sys_log_lt ON js_sys_log (log_type);
|
||||
CREATE INDEX idx_sys_log_bk ON js_sys_log (biz_key);
|
||||
CREATE INDEX idx_sys_log_bt ON js_sys_log (biz_type);
|
||||
CREATE INDEX idx_sys_log_ie ON js_sys_log (is_exception);
|
||||
CREATE INDEX idx_sys_log_cd ON js_sys_log (create_date);
|
||||
CREATE INDEX idx_sys_menu_pc ON js_sys_menu (parent_code);
|
||||
CREATE INDEX idx_sys_menu_ts ON js_sys_menu (tree_sort);
|
||||
CREATE INDEX idx_sys_menu_status ON js_sys_menu (status);
|
||||
CREATE INDEX idx_sys_menu_mt ON js_sys_menu (menu_type);
|
||||
CREATE INDEX idx_sys_menu_pss ON js_sys_menu (parent_codes);
|
||||
CREATE INDEX idx_sys_menu_tss ON js_sys_menu (tree_sorts);
|
||||
CREATE INDEX idx_sys_menu_sc ON js_sys_menu (sys_code);
|
||||
CREATE INDEX idx_sys_menu_is ON js_sys_menu (is_show);
|
||||
CREATE INDEX idx_sys_menu_mcs ON js_sys_menu (module_codes);
|
||||
CREATE INDEX idx_sys_menu_wt ON js_sys_menu (weight);
|
||||
CREATE INDEX idx_sys_module_status ON js_sys_module (status);
|
||||
CREATE INDEX idx_sys_msg_inner_cb ON js_sys_msg_inner (create_by);
|
||||
CREATE INDEX idx_sys_msg_inner_status ON js_sys_msg_inner (status);
|
||||
CREATE INDEX idx_sys_msg_inner_cl ON js_sys_msg_inner (content_level);
|
||||
CREATE INDEX idx_sys_msg_inner_sc ON js_sys_msg_inner (send_user_code);
|
||||
CREATE INDEX idx_sys_msg_inner_sd ON js_sys_msg_inner (send_date);
|
||||
CREATE INDEX idx_sys_msg_inner_r_mi ON js_sys_msg_inner_record (msg_inner_id);
|
||||
CREATE INDEX idx_sys_msg_inner_r_rc ON js_sys_msg_inner_record (receive_user_code);
|
||||
CREATE INDEX idx_sys_msg_inner_r_ruc ON js_sys_msg_inner_record (receive_user_code);
|
||||
CREATE INDEX idx_sys_msg_inner_r_status ON js_sys_msg_inner_record (read_status);
|
||||
CREATE INDEX idx_sys_msg_inner_r_star ON js_sys_msg_inner_record (is_star);
|
||||
CREATE INDEX idx_sys_msg_push_type ON js_sys_msg_push (msg_type);
|
||||
CREATE INDEX idx_sys_msg_push_rc ON js_sys_msg_push (receive_code);
|
||||
CREATE INDEX idx_sys_msg_push_uc ON js_sys_msg_push (receive_user_code);
|
||||
CREATE INDEX idx_sys_msg_push_suc ON js_sys_msg_push (send_user_code);
|
||||
CREATE INDEX idx_sys_msg_push_pd ON js_sys_msg_push (plan_push_date);
|
||||
CREATE INDEX idx_sys_msg_push_ps ON js_sys_msg_push (push_status);
|
||||
CREATE INDEX idx_sys_msg_push_rs ON js_sys_msg_push (read_status);
|
||||
CREATE INDEX idx_sys_msg_push_bk ON js_sys_msg_push (biz_key);
|
||||
CREATE INDEX idx_sys_msg_push_bt ON js_sys_msg_push (biz_type);
|
||||
CREATE INDEX idx_sys_msg_push_imp ON js_sys_msg_push (is_merge_push);
|
||||
CREATE INDEX idx_sys_msg_pushed_type ON js_sys_msg_pushed (msg_type);
|
||||
CREATE INDEX idx_sys_msg_pushed_rc ON js_sys_msg_pushed (receive_code);
|
||||
CREATE INDEX idx_sys_msg_pushed_uc ON js_sys_msg_pushed (receive_user_code);
|
||||
CREATE INDEX idx_sys_msg_pushed_suc ON js_sys_msg_pushed (send_user_code);
|
||||
CREATE INDEX idx_sys_msg_pushed_pd ON js_sys_msg_pushed (plan_push_date);
|
||||
CREATE INDEX idx_sys_msg_pushed_ps ON js_sys_msg_pushed (push_status);
|
||||
CREATE INDEX idx_sys_msg_pushed_rs ON js_sys_msg_pushed (read_status);
|
||||
CREATE INDEX idx_sys_msg_pushed_bk ON js_sys_msg_pushed (biz_key);
|
||||
CREATE INDEX idx_sys_msg_pushed_bt ON js_sys_msg_pushed (biz_type);
|
||||
CREATE INDEX idx_sys_msg_pushed_imp ON js_sys_msg_pushed (is_merge_push);
|
||||
CREATE INDEX idx_sys_msg_tpl_key ON js_sys_msg_template (tpl_key);
|
||||
CREATE INDEX idx_sys_msg_tpl_type ON js_sys_msg_template (tpl_type);
|
||||
CREATE INDEX idx_sys_msg_tpl_status ON js_sys_msg_template (status);
|
||||
CREATE INDEX idx_sys_office_cc ON js_sys_office (corp_code);
|
||||
CREATE INDEX idx_sys_office_pc ON js_sys_office (parent_code);
|
||||
CREATE INDEX idx_sys_office_pcs ON js_sys_office (parent_codes);
|
||||
CREATE INDEX idx_sys_office_status ON js_sys_office (status);
|
||||
CREATE INDEX idx_sys_office_ot ON js_sys_office (office_type);
|
||||
CREATE INDEX idx_sys_office_vc ON js_sys_office (view_code);
|
||||
CREATE INDEX idx_sys_office_ts ON js_sys_office (tree_sort);
|
||||
CREATE INDEX idx_sys_office_tss ON js_sys_office (tree_sorts);
|
||||
CREATE INDEX idx_sys_post_cc ON js_sys_post (corp_code);
|
||||
CREATE INDEX idx_sys_post_status ON js_sys_post (status);
|
||||
CREATE INDEX idx_sys_post_ps ON js_sys_post (post_sort);
|
||||
CREATE INDEX idx_sys_role_cc ON js_sys_role (corp_code);
|
||||
CREATE INDEX idx_sys_role_is ON js_sys_role (is_sys);
|
||||
CREATE INDEX idx_sys_role_status ON js_sys_role (status);
|
||||
CREATE INDEX idx_sys_role_rs ON js_sys_role (role_sort);
|
||||
CREATE INDEX idx_sys_user_lc ON js_sys_user (login_code);
|
||||
CREATE INDEX idx_sys_user_email ON js_sys_user (email);
|
||||
CREATE INDEX idx_sys_user_mobile ON js_sys_user (mobile);
|
||||
CREATE INDEX idx_sys_user_wo ON js_sys_user (wx_openid);
|
||||
CREATE INDEX idx_sys_user_imei ON js_sys_user (mobile_imei);
|
||||
CREATE INDEX idx_sys_user_rt ON js_sys_user (user_type);
|
||||
CREATE INDEX idx_sys_user_rc ON js_sys_user (ref_code);
|
||||
CREATE INDEX idx_sys_user_mt ON js_sys_user (mgr_type);
|
||||
CREATE INDEX idx_sys_user_us ON js_sys_user (user_weight);
|
||||
CREATE INDEX idx_sys_user_ud ON js_sys_user (update_date);
|
||||
CREATE INDEX idx_sys_user_status ON js_sys_user (status);
|
||||
CREATE INDEX idx_sys_user_cc ON js_sys_user (corp_code);
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,40 @@
|
||||
|
||||
/* Drop Tables */
|
||||
|
||||
IF OBJECT_ID('[js_gen_table_column]') IS NOT NULL DROP TABLE [js_gen_table_column];
|
||||
IF OBJECT_ID('[js_gen_table]') IS NOT NULL DROP TABLE [js_gen_table];
|
||||
IF OBJECT_ID('[js_sys_company_office]') IS NOT NULL DROP TABLE [js_sys_company_office];
|
||||
IF OBJECT_ID('[js_sys_employee_post]') IS NOT NULL DROP TABLE [js_sys_employee_post];
|
||||
IF OBJECT_ID('[js_sys_user_data_scope]') IS NOT NULL DROP TABLE [js_sys_user_data_scope];
|
||||
IF OBJECT_ID('[js_sys_user_role]') IS NOT NULL DROP TABLE [js_sys_user_role];
|
||||
IF OBJECT_ID('[js_sys_user]') IS NOT NULL DROP TABLE [js_sys_user];
|
||||
IF OBJECT_ID('[js_sys_employee]') IS NOT NULL DROP TABLE [js_sys_employee];
|
||||
IF OBJECT_ID('[js_sys_company]') IS NOT NULL DROP TABLE [js_sys_company];
|
||||
IF OBJECT_ID('[js_sys_area]') IS NOT NULL DROP TABLE [js_sys_area];
|
||||
IF OBJECT_ID('[js_sys_config]') IS NOT NULL DROP TABLE [js_sys_config];
|
||||
IF OBJECT_ID('[js_sys_dict_data]') IS NOT NULL DROP TABLE [js_sys_dict_data];
|
||||
IF OBJECT_ID('[js_sys_dict_type]') IS NOT NULL DROP TABLE [js_sys_dict_type];
|
||||
IF OBJECT_ID('[js_sys_file_upload]') IS NOT NULL DROP TABLE [js_sys_file_upload];
|
||||
IF OBJECT_ID('[js_sys_file_entity]') IS NOT NULL DROP TABLE [js_sys_file_entity];
|
||||
IF OBJECT_ID('[js_sys_job_log]') IS NOT NULL DROP TABLE [js_sys_job_log];
|
||||
IF OBJECT_ID('[js_sys_job]') IS NOT NULL DROP TABLE [js_sys_job];
|
||||
IF OBJECT_ID('[js_sys_lang]') IS NOT NULL DROP TABLE [js_sys_lang];
|
||||
IF OBJECT_ID('[js_sys_log]') IS NOT NULL DROP TABLE [js_sys_log];
|
||||
IF OBJECT_ID('[js_sys_role_menu]') IS NOT NULL DROP TABLE [js_sys_role_menu];
|
||||
IF OBJECT_ID('[js_sys_menu]') IS NOT NULL DROP TABLE [js_sys_menu];
|
||||
IF OBJECT_ID('[js_sys_module]') IS NOT NULL DROP TABLE [js_sys_module];
|
||||
IF OBJECT_ID('[js_sys_msg_inner_record]') IS NOT NULL DROP TABLE [js_sys_msg_inner_record];
|
||||
IF OBJECT_ID('[js_sys_msg_inner]') IS NOT NULL DROP TABLE [js_sys_msg_inner];
|
||||
IF OBJECT_ID('[js_sys_msg_push]') IS NOT NULL DROP TABLE [js_sys_msg_push];
|
||||
IF OBJECT_ID('[js_sys_msg_pushed]') IS NOT NULL DROP TABLE [js_sys_msg_pushed];
|
||||
IF OBJECT_ID('[js_sys_msg_template]') IS NOT NULL DROP TABLE [js_sys_msg_template];
|
||||
IF OBJECT_ID('[js_sys_office]') IS NOT NULL DROP TABLE [js_sys_office];
|
||||
IF OBJECT_ID('[js_sys_post]') IS NOT NULL DROP TABLE [js_sys_post];
|
||||
IF OBJECT_ID('[js_sys_role_data_scope]') IS NOT NULL DROP TABLE [js_sys_role_data_scope];
|
||||
IF OBJECT_ID('[js_sys_role]') IS NOT NULL DROP TABLE [js_sys_role];
|
||||
|
||||
|
||||
|
||||
|
||||
/* Create Tables */
|
||||
|
||||
@@ -10,6 +46,7 @@ CREATE TABLE [js_gen_table]
|
||||
[comments] nvarchar(500) NOT NULL,
|
||||
[parent_table_name] varchar(64),
|
||||
[parent_table_fk_name] varchar(64),
|
||||
[data_source_name] varchar(64),
|
||||
[tpl_category] varchar(200),
|
||||
[package_name] varchar(500),
|
||||
[module_name] varchar(30),
|
||||
|
||||
@@ -1,5 +1,41 @@
|
||||
SET SESSION FOREIGN_KEY_CHECKS=0;
|
||||
|
||||
/* Drop Tables */
|
||||
|
||||
DROP TABLE IF EXISTS js_gen_table_column;
|
||||
DROP TABLE IF EXISTS js_gen_table;
|
||||
DROP TABLE IF EXISTS js_sys_company_office;
|
||||
DROP TABLE IF EXISTS js_sys_employee_post;
|
||||
DROP TABLE IF EXISTS js_sys_user_data_scope;
|
||||
DROP TABLE IF EXISTS js_sys_user_role;
|
||||
DROP TABLE IF EXISTS js_sys_user;
|
||||
DROP TABLE IF EXISTS js_sys_employee;
|
||||
DROP TABLE IF EXISTS js_sys_company;
|
||||
DROP TABLE IF EXISTS js_sys_area;
|
||||
DROP TABLE IF EXISTS js_sys_config;
|
||||
DROP TABLE IF EXISTS js_sys_dict_data;
|
||||
DROP TABLE IF EXISTS js_sys_dict_type;
|
||||
DROP TABLE IF EXISTS js_sys_file_upload;
|
||||
DROP TABLE IF EXISTS js_sys_file_entity;
|
||||
DROP TABLE IF EXISTS js_sys_job_log;
|
||||
DROP TABLE IF EXISTS js_sys_job;
|
||||
DROP TABLE IF EXISTS js_sys_lang;
|
||||
DROP TABLE IF EXISTS js_sys_log;
|
||||
DROP TABLE IF EXISTS js_sys_role_menu;
|
||||
DROP TABLE IF EXISTS js_sys_menu;
|
||||
DROP TABLE IF EXISTS js_sys_module;
|
||||
DROP TABLE IF EXISTS js_sys_msg_inner_record;
|
||||
DROP TABLE IF EXISTS js_sys_msg_inner;
|
||||
DROP TABLE IF EXISTS js_sys_msg_push;
|
||||
DROP TABLE IF EXISTS js_sys_msg_pushed;
|
||||
DROP TABLE IF EXISTS js_sys_msg_template;
|
||||
DROP TABLE IF EXISTS js_sys_office;
|
||||
DROP TABLE IF EXISTS js_sys_post;
|
||||
DROP TABLE IF EXISTS js_sys_role_data_scope;
|
||||
DROP TABLE IF EXISTS js_sys_role;
|
||||
|
||||
|
||||
|
||||
|
||||
/* Create Tables */
|
||||
|
||||
@@ -11,6 +47,7 @@ CREATE TABLE js_gen_table
|
||||
comments varchar(500) NOT NULL COMMENT '表说明',
|
||||
parent_table_name varchar(64) COMMENT '关联父表的表名',
|
||||
parent_table_fk_name varchar(64) COMMENT '本表关联父表的外键名',
|
||||
data_source_name varchar(64) COMMENT '数据源名称',
|
||||
tpl_category varchar(200) COMMENT '使用的模板',
|
||||
package_name varchar(500) COMMENT '生成包路径',
|
||||
module_name varchar(30) COMMENT '生成模块名',
|
||||
|
||||
@@ -1,4 +1,40 @@
|
||||
|
||||
/* Drop Tables */
|
||||
|
||||
DROP TABLE js_gen_table_column CASCADE CONSTRAINTS;
|
||||
DROP TABLE js_gen_table CASCADE CONSTRAINTS;
|
||||
DROP TABLE js_sys_company_office CASCADE CONSTRAINTS;
|
||||
DROP TABLE js_sys_employee_post CASCADE CONSTRAINTS;
|
||||
DROP TABLE js_sys_user_data_scope CASCADE CONSTRAINTS;
|
||||
DROP TABLE js_sys_user_role CASCADE CONSTRAINTS;
|
||||
DROP TABLE js_sys_user CASCADE CONSTRAINTS;
|
||||
DROP TABLE js_sys_employee CASCADE CONSTRAINTS;
|
||||
DROP TABLE js_sys_company CASCADE CONSTRAINTS;
|
||||
DROP TABLE js_sys_area CASCADE CONSTRAINTS;
|
||||
DROP TABLE js_sys_config CASCADE CONSTRAINTS;
|
||||
DROP TABLE js_sys_dict_data CASCADE CONSTRAINTS;
|
||||
DROP TABLE js_sys_dict_type CASCADE CONSTRAINTS;
|
||||
DROP TABLE js_sys_file_upload CASCADE CONSTRAINTS;
|
||||
DROP TABLE js_sys_file_entity CASCADE CONSTRAINTS;
|
||||
DROP TABLE js_sys_job_log CASCADE CONSTRAINTS;
|
||||
DROP TABLE js_sys_job CASCADE CONSTRAINTS;
|
||||
DROP TABLE js_sys_lang CASCADE CONSTRAINTS;
|
||||
DROP TABLE js_sys_log CASCADE CONSTRAINTS;
|
||||
DROP TABLE js_sys_role_menu CASCADE CONSTRAINTS;
|
||||
DROP TABLE js_sys_menu CASCADE CONSTRAINTS;
|
||||
DROP TABLE js_sys_module CASCADE CONSTRAINTS;
|
||||
DROP TABLE js_sys_msg_inner_record CASCADE CONSTRAINTS;
|
||||
DROP TABLE js_sys_msg_inner CASCADE CONSTRAINTS;
|
||||
DROP TABLE js_sys_msg_push CASCADE CONSTRAINTS;
|
||||
DROP TABLE js_sys_msg_pushed CASCADE CONSTRAINTS;
|
||||
DROP TABLE js_sys_msg_template CASCADE CONSTRAINTS;
|
||||
DROP TABLE js_sys_office CASCADE CONSTRAINTS;
|
||||
DROP TABLE js_sys_post CASCADE CONSTRAINTS;
|
||||
DROP TABLE js_sys_role_data_scope CASCADE CONSTRAINTS;
|
||||
DROP TABLE js_sys_role CASCADE CONSTRAINTS;
|
||||
|
||||
|
||||
|
||||
|
||||
/* Create Tables */
|
||||
|
||||
@@ -10,6 +46,7 @@ CREATE TABLE js_gen_table
|
||||
comments nvarchar2(500) NOT NULL,
|
||||
parent_table_name varchar2(64),
|
||||
parent_table_fk_name varchar2(64),
|
||||
data_source_name varchar2(64),
|
||||
tpl_category varchar2(200),
|
||||
package_name varchar2(500),
|
||||
module_name varchar2(30),
|
||||
@@ -888,6 +925,7 @@ COMMENT ON COLUMN js_gen_table.class_name IS '实体类名称';
|
||||
COMMENT ON COLUMN js_gen_table.comments IS '表说明';
|
||||
COMMENT ON COLUMN js_gen_table.parent_table_name IS '关联父表的表名';
|
||||
COMMENT ON COLUMN js_gen_table.parent_table_fk_name IS '本表关联父表的外键名';
|
||||
COMMENT ON COLUMN js_gen_table.data_source_name IS '数据源名称';
|
||||
COMMENT ON COLUMN js_gen_table.tpl_category IS '使用的模板';
|
||||
COMMENT ON COLUMN js_gen_table.package_name IS '生成包路径';
|
||||
COMMENT ON COLUMN js_gen_table.module_name IS '生成模块名';
|
||||
|
||||
@@ -1,4 +1,40 @@
|
||||
|
||||
/* Drop Tables */
|
||||
|
||||
DROP TABLE IF EXISTS js_gen_table_column;
|
||||
DROP TABLE IF EXISTS js_gen_table;
|
||||
DROP TABLE IF EXISTS js_sys_company_office;
|
||||
DROP TABLE IF EXISTS js_sys_employee_post;
|
||||
DROP TABLE IF EXISTS js_sys_user_data_scope;
|
||||
DROP TABLE IF EXISTS js_sys_user_role;
|
||||
DROP TABLE IF EXISTS js_sys_user;
|
||||
DROP TABLE IF EXISTS js_sys_employee;
|
||||
DROP TABLE IF EXISTS js_sys_company;
|
||||
DROP TABLE IF EXISTS js_sys_area;
|
||||
DROP TABLE IF EXISTS js_sys_config;
|
||||
DROP TABLE IF EXISTS js_sys_dict_data;
|
||||
DROP TABLE IF EXISTS js_sys_dict_type;
|
||||
DROP TABLE IF EXISTS js_sys_file_upload;
|
||||
DROP TABLE IF EXISTS js_sys_file_entity;
|
||||
DROP TABLE IF EXISTS js_sys_job_log;
|
||||
DROP TABLE IF EXISTS js_sys_job;
|
||||
DROP TABLE IF EXISTS js_sys_lang;
|
||||
DROP TABLE IF EXISTS js_sys_log;
|
||||
DROP TABLE IF EXISTS js_sys_role_menu;
|
||||
DROP TABLE IF EXISTS js_sys_menu;
|
||||
DROP TABLE IF EXISTS js_sys_module;
|
||||
DROP TABLE IF EXISTS js_sys_msg_inner_record;
|
||||
DROP TABLE IF EXISTS js_sys_msg_inner;
|
||||
DROP TABLE IF EXISTS js_sys_msg_push;
|
||||
DROP TABLE IF EXISTS js_sys_msg_pushed;
|
||||
DROP TABLE IF EXISTS js_sys_msg_template;
|
||||
DROP TABLE IF EXISTS js_sys_office;
|
||||
DROP TABLE IF EXISTS js_sys_post;
|
||||
DROP TABLE IF EXISTS js_sys_role_data_scope;
|
||||
DROP TABLE IF EXISTS js_sys_role;
|
||||
|
||||
|
||||
|
||||
|
||||
/* Create Tables */
|
||||
|
||||
@@ -10,6 +46,7 @@ CREATE TABLE js_gen_table
|
||||
comments varchar(500) NOT NULL,
|
||||
parent_table_name varchar(64),
|
||||
parent_table_fk_name varchar(64),
|
||||
data_source_name varchar(64),
|
||||
tpl_category varchar(200),
|
||||
package_name varchar(500),
|
||||
module_name varchar(30),
|
||||
@@ -888,6 +925,7 @@ COMMENT ON COLUMN js_gen_table.class_name IS '实体类名称';
|
||||
COMMENT ON COLUMN js_gen_table.comments IS '表说明';
|
||||
COMMENT ON COLUMN js_gen_table.parent_table_name IS '关联父表的表名';
|
||||
COMMENT ON COLUMN js_gen_table.parent_table_fk_name IS '本表关联父表的外键名';
|
||||
COMMENT ON COLUMN js_gen_table.data_source_name IS '数据源名称';
|
||||
COMMENT ON COLUMN js_gen_table.tpl_category IS '使用的模板';
|
||||
COMMENT ON COLUMN js_gen_table.package_name IS '生成包路径';
|
||||
COMMENT ON COLUMN js_gen_table.module_name IS '生成模块名';
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-parent</artifactId>
|
||||
<version>4.0.8-SNAPSHOT</version>
|
||||
<version>4.1.0-SNAPSHOT</version>
|
||||
<relativePath>../../parent/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -23,12 +23,38 @@
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- JDBC device begin -->
|
||||
<dependency>
|
||||
<groupId>com.oracle</groupId>
|
||||
<artifactId>ojdbc6</artifactId>
|
||||
<version>11.2.0.3</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.sourceforge.jtds</groupId>
|
||||
<artifactId>jtds</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<!-- JDBC device end -->
|
||||
|
||||
<!-- Common -->
|
||||
<dependency>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-common</artifactId>
|
||||
<version>${project.parent.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Framework -->
|
||||
<dependency>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-framework</artifactId>
|
||||
@@ -58,4 +84,42 @@
|
||||
<url>http://jeesite.com</url>
|
||||
</organization>
|
||||
|
||||
<repositories>
|
||||
|
||||
<repository>
|
||||
<id>aliyun-repos</id>
|
||||
<name>Aliyun Repository</name>
|
||||
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
|
||||
<releases><enabled>true</enabled></releases>
|
||||
<snapshots><enabled>false</enabled></snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>sonatype-repos</id>
|
||||
<name>Sonatype Repository</name>
|
||||
<url>https://oss.sonatype.org/content/groups/public</url>
|
||||
<releases><enabled>true</enabled></releases>
|
||||
<snapshots><enabled>false</enabled></snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>sonatype-repos-s</id>
|
||||
<name>Sonatype Repository</name>
|
||||
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
||||
<releases><enabled>false</enabled></releases>
|
||||
<snapshots><enabled>true</enabled></snapshots>
|
||||
</repository>
|
||||
|
||||
</repositories>
|
||||
|
||||
<pluginRepositories>
|
||||
|
||||
<pluginRepository>
|
||||
<id>aliyun-repos</id>
|
||||
<name>Aliyun Repository</name>
|
||||
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
|
||||
<releases><enabled>true</enabled></releases>
|
||||
<snapshots><enabled>false</enabled></snapshots>
|
||||
</pluginRepository>
|
||||
|
||||
</pluginRepositories>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -18,9 +18,6 @@ import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.shiro.realm.BaseAuthorizingRealm;
|
||||
import com.jeesite.common.shiro.realm.LoginInfo;
|
||||
import com.jeesite.common.web.http.ServletUtils;
|
||||
import com.jeesite.modules.sys.entity.Log;
|
||||
import com.jeesite.modules.sys.utils.LogUtils;
|
||||
import com.jeesite.modules.sys.utils.UserUtils;
|
||||
|
||||
/**
|
||||
* 登出过滤器
|
||||
@@ -41,16 +38,16 @@ public class LogoutFilter extends org.apache.shiro.web.filter.authc.LogoutFilter
|
||||
try {
|
||||
Object principal = subject.getPrincipal();
|
||||
if (principal != null){
|
||||
// 记录用户退出日志(@Deprecated v4.0.5支持setAuthorizingRealm,之后版本可删除此if子句)
|
||||
if (authorizingRealm == null){
|
||||
LogUtils.saveLog(UserUtils.getUser(), ServletUtils.getRequest(),
|
||||
"系统退出", Log.TYPE_LOGIN_LOGOUT);
|
||||
}
|
||||
// 退出成功之前初始化授权信息并处理登录后的操作
|
||||
else{
|
||||
// // 记录用户退出日志(@Deprecated v4.0.5支持setAuthorizingRealm,之后版本可删除此if子句)
|
||||
// if (authorizingRealm == null){
|
||||
// LogUtils.saveLog(UserUtils.getUser(), ServletUtils.getRequest(),
|
||||
// "系统退出", Log.TYPE_LOGIN_LOGOUT);
|
||||
// }
|
||||
// else{
|
||||
// 退出成功之前初始化授权信息并处理登录后的操作
|
||||
authorizingRealm.onLogoutSuccess((LoginInfo)subject.getPrincipal(),
|
||||
(HttpServletRequest)request);
|
||||
}
|
||||
// }
|
||||
}
|
||||
// 退出登录
|
||||
subject.logout();
|
||||
|
||||
@@ -5,6 +5,10 @@ package com.jeesite.common.shiro.realm;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.apache.shiro.authc.credential.HashedCredentialsMatcher;
|
||||
|
||||
import com.jeesite.common.codec.EncodeUtils;
|
||||
import com.jeesite.common.codec.Sha1Utils;
|
||||
import com.jeesite.common.utils.SpringUtils;
|
||||
import com.jeesite.modules.sys.entity.Log;
|
||||
import com.jeesite.modules.sys.entity.User;
|
||||
@@ -18,11 +22,48 @@ import com.jeesite.modules.sys.utils.UserUtils;
|
||||
* @version 2018-7-11
|
||||
*/
|
||||
public class AuthorizingRealm extends BaseAuthorizingRealm {
|
||||
|
||||
|
||||
public static final String HASH_ALGORITHM = "SHA-1";
|
||||
public static final int HASH_INTERATIONS = 1024;
|
||||
public static final int SALT_SIZE = 8;
|
||||
|
||||
private UserService userService;
|
||||
|
||||
public AuthorizingRealm() {
|
||||
super();
|
||||
// 设定密码校验的Hash算法与迭代次数
|
||||
HashedCredentialsMatcher matcher = new HashedCredentialsMatcher(HASH_ALGORITHM);
|
||||
matcher.setHashIterations(HASH_INTERATIONS);
|
||||
this.setCredentialsMatcher(matcher);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成密文密码,生成随机的16位salt并经过1024次 sha-1 hash
|
||||
* @param plainPassword 明文密码
|
||||
* @return 16位salt密钥 + 40位hash密码
|
||||
*/
|
||||
public String encryptPassword(String plainPassword) {
|
||||
String plain = EncodeUtils.decodeHtml(plainPassword);
|
||||
byte[] salt = Sha1Utils.genSalt(SALT_SIZE);
|
||||
byte[] hashPassword = Sha1Utils.sha1(plain.getBytes(), salt, HASH_INTERATIONS);
|
||||
return EncodeUtils.encodeHex(salt) + EncodeUtils.encodeHex(hashPassword);
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证密码正确性
|
||||
* @param plainPassword 明文密码
|
||||
* @param password 密文密码
|
||||
* @return 验证成功返回true
|
||||
*/
|
||||
public boolean validatePassword(String plainPassword, String password) {
|
||||
try{
|
||||
String plain = EncodeUtils.decodeHtml(plainPassword);
|
||||
byte[] salt = EncodeUtils.decodeHex(password.substring(0, 16));
|
||||
byte[] hashPassword = Sha1Utils.sha1(plain.getBytes(), salt, HASH_INTERATIONS);
|
||||
return password.equals(EncodeUtils.encodeHex(salt) + EncodeUtils.encodeHex(hashPassword));
|
||||
}catch(Exception e){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -54,8 +54,8 @@ public class ShiroConfig {
|
||||
@Bean
|
||||
@Order(3000)
|
||||
@ConditionalOnMissingBean(name="shiroFilterProxy")
|
||||
public FilterRegistrationBean shiroFilterProxy(ShiroFilterFactoryBean shiroFilter) throws Exception {
|
||||
FilterRegistrationBean bean = new FilterRegistrationBean();
|
||||
public FilterRegistrationBean<Filter> shiroFilterProxy(ShiroFilterFactoryBean shiroFilter) throws Exception {
|
||||
FilterRegistrationBean<Filter> bean = new FilterRegistrationBean<>();
|
||||
bean.setFilter((Filter) shiroFilter.getInstance());
|
||||
bean.addUrlPatterns("/*");
|
||||
return bean;
|
||||
|
||||
@@ -25,8 +25,8 @@ public class DruidStatConfig {
|
||||
* 注册DruidFilter拦截
|
||||
*/
|
||||
@Bean
|
||||
public FilterRegistrationBean duridFilter() {
|
||||
FilterRegistrationBean bean = new FilterRegistrationBean();
|
||||
public FilterRegistrationBean<WebStatFilter> duridFilter() {
|
||||
FilterRegistrationBean<WebStatFilter> bean = new FilterRegistrationBean<>();
|
||||
bean.setFilter(new WebStatFilter());
|
||||
bean.addInitParameter("exclusions", "*.css,*.js,*.png,"
|
||||
+ "*.jpg,*.gif,*.jpeg,*.bmp,*.ico,*.swf,*.psd,*.htc,*.htm,*.html,"
|
||||
@@ -40,8 +40,8 @@ public class DruidStatConfig {
|
||||
* 注册DruidServlet
|
||||
*/
|
||||
@Bean
|
||||
public ServletRegistrationBean druidServlet() {
|
||||
ServletRegistrationBean bean = new ServletRegistrationBean();
|
||||
public ServletRegistrationBean<StatViewServlet> druidServlet() {
|
||||
ServletRegistrationBean<StatViewServlet> bean = new ServletRegistrationBean<>();
|
||||
bean.setServlet(new StatViewServlet());
|
||||
bean.addUrlMappings("/druid/*");
|
||||
return bean;
|
||||
|
||||
@@ -3,42 +3,47 @@
|
||||
*/
|
||||
package com.jeesite.modules.config.web;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
||||
import org.springframework.cache.ehcache.EhCacheManagerFactoryBean;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.annotation.Order;
|
||||
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.web.PageCachingFilter;
|
||||
|
||||
/**
|
||||
* Filter 配置
|
||||
* 页面缓存,如果需要,则加入如下依赖并取消下面注释
|
||||
|
||||
1、pom.xml:
|
||||
<dependency>
|
||||
<groupId>net.sf.ehcache</groupId>
|
||||
<artifactId>ehcache-web</artifactId>
|
||||
<version>2.0.4</version>
|
||||
</dependency>
|
||||
|
||||
2、application.yml:
|
||||
# 页面缓存配置
|
||||
ehcache:
|
||||
pageCaching:
|
||||
enabled: false
|
||||
urlPatterns: "*.html"
|
||||
|
||||
* @author ThinkGem
|
||||
* @version 2017年11月30日
|
||||
*/
|
||||
@Configuration
|
||||
public class PageCacheConfig {
|
||||
|
||||
/**
|
||||
* PageCache Filter, cache .html suffix.
|
||||
*/
|
||||
@Bean
|
||||
@Order(2000)
|
||||
@ConditionalOnProperty(name = "ehcache.pageCaching.enabled", havingValue = "true")
|
||||
@ConditionalOnMissingBean(name="pageCachingFilter")
|
||||
public FilterRegistrationBean pageCachingFilter(EhCacheManagerFactoryBean ehCacheManager) {
|
||||
FilterRegistrationBean bean = new FilterRegistrationBean();
|
||||
PageCachingFilter pageCachingFilter = new PageCachingFilter();
|
||||
pageCachingFilter.setCacheManager(ehCacheManager.getObject());
|
||||
bean.setFilter(pageCachingFilter);
|
||||
bean.addInitParameter("cacheName", "pageCachingFilter");
|
||||
bean.addUrlPatterns(StringUtils.split(Global.getProperty(
|
||||
"ehcache.pageCaching.urlPatterns"), ","));
|
||||
return bean;
|
||||
}
|
||||
|
||||
// /**
|
||||
// * PageCache Filter, cache .html suffix.
|
||||
// */
|
||||
// @Bean
|
||||
// @Order(2000)
|
||||
// @ConditionalOnProperty(name = "ehcache.pageCaching.enabled", havingValue = "true")
|
||||
// @ConditionalOnMissingBean(name="pageCachingFilter")
|
||||
// public FilterRegistrationBean<PageCachingFilter> pageCachingFilter(EhCacheManagerFactoryBean ehCacheManager) {
|
||||
// FilterRegistrationBean<PageCachingFilter> bean = new FilterRegistrationBean<>();
|
||||
// SimplePageCachingFilter pageCachingFilter = new SimplePageCachingFilter();
|
||||
// pageCachingFilter.setCacheManager(ehCacheManager.getObject());
|
||||
// bean.setFilter(pageCachingFilter);
|
||||
// bean.addInitParameter("cacheName", "pageCachingFilter");
|
||||
// bean.addUrlPatterns(StringUtils.split(Global.getProperty(
|
||||
// "ehcache.pageCaching.urlPatterns"), ","));
|
||||
// return bean;
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||
import org.springframework.web.servlet.config.annotation.InterceptorRegistration;
|
||||
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.lang.StringUtils;
|
||||
@@ -22,7 +22,7 @@ import com.jeesite.modules.sys.interceptor.LogInterceptor;
|
||||
@Configuration
|
||||
@EnableWebMvc
|
||||
@ConditionalOnProperty(name="web.interceptor.log.enabled", havingValue="true", matchIfMissing=true)
|
||||
public class LogInterceptorConfig extends WebMvcConfigurerAdapter {
|
||||
public class LogInterceptorConfig implements WebMvcConfigurer {
|
||||
|
||||
@Override
|
||||
public void addInterceptors(InterceptorRegistry registry) {
|
||||
|
||||
@@ -8,7 +8,7 @@ import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||
import org.springframework.web.servlet.config.annotation.InterceptorRegistration;
|
||||
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.lang.StringUtils;
|
||||
@@ -22,7 +22,7 @@ import com.jeesite.modules.sys.interceptor.MobileInterceptor;
|
||||
@Configuration
|
||||
@EnableWebMvc
|
||||
@ConditionalOnProperty(name="web.interceptor.mobile.enabled", havingValue="true", matchIfMissing=false)
|
||||
public class MobileViewInterceptorConfig extends WebMvcConfigurerAdapter {
|
||||
public class MobileViewInterceptorConfig implements WebMvcConfigurer {
|
||||
|
||||
@Override
|
||||
public void addInterceptors(InterceptorRegistry registry) {
|
||||
|
||||
Binary file not shown.
@@ -4,7 +4,7 @@
|
||||
package com.jeesite.modules.sys.entity;
|
||||
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import com.jeesite.common.entity.DataEntity;
|
||||
import com.jeesite.common.entity.TreeEntity;
|
||||
|
||||
@@ -9,7 +9,7 @@ import javax.validation.constraints.Pattern;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import com.jeesite.common.collect.ListUtils;
|
||||
import com.jeesite.common.entity.BaseEntity;
|
||||
|
||||
@@ -61,7 +61,9 @@ import com.jeesite.common.utils.excel.fieldtype.OfficeType;
|
||||
@Column(name="area_name", label="区域名称", isQuery=false),
|
||||
@Column(name="area_type", label="区域类型"),
|
||||
}),
|
||||
}, extWhereKeys="dsfOffice, dsfCompany", orderBy="a.user_weight DESC, a.update_date DESC"
|
||||
},
|
||||
extWhereKeys="dsfOffice, dsfCompany",
|
||||
orderBy="a.user_weight DESC, a.update_date DESC"
|
||||
)
|
||||
public class EmpUser extends User {
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import com.jeesite.common.collect.MapUtils;
|
||||
import com.jeesite.common.entity.BaseEntity;
|
||||
|
||||
@@ -6,7 +6,7 @@ package com.jeesite.modules.sys.entity;
|
||||
import javax.validation.constraints.Pattern;
|
||||
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.jeesite.common.entity.BaseEntity;
|
||||
@@ -47,7 +47,7 @@ public class Office extends TreeEntity<Office> {
|
||||
private String viewCode; // 机构代码(作为显示用,多租户内唯一)
|
||||
private String officeName; // 机构名称
|
||||
private String fullName; // 机构全称
|
||||
private String officeType; // 机构类型(1:公司;2:部门;3:小组)
|
||||
private String officeType; // 机构类型(1:省级公司;2:市级公司;3:部门)
|
||||
private String leader; // 负责人
|
||||
private String phone; // 电话
|
||||
private String address; // 联系地址
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
package com.jeesite.modules.sys.entity;
|
||||
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import com.jeesite.common.entity.BaseEntity;
|
||||
import com.jeesite.common.entity.DataEntity;
|
||||
@@ -16,7 +16,7 @@ import com.jeesite.common.mybatis.mapper.query.QueryType;
|
||||
@Column(includeEntity=BaseEntity.class),
|
||||
@Column(includeEntity=DataEntity.class),
|
||||
@Column(name="post_code", attrName="postCode", label="岗位编码", isPK=true),
|
||||
@Column(name="post_name", attrName="postName", label="岗位名称", queryType=QueryType.LIKE),
|
||||
@Column(name="post_name", attrName="postName", label="岗位名称"),
|
||||
@Column(name="post_type", attrName="postType", label="岗位分类", comment="岗位分类(高管、中层、基层)"),
|
||||
@Column(name="post_sort", attrName="postSort", label="岗位排序", comment="岗位排序(升序)"),
|
||||
}, orderBy="a.update_date DESC"
|
||||
@@ -57,6 +57,14 @@ public class Post extends DataEntity<Post> {
|
||||
this.postName = postName;
|
||||
}
|
||||
|
||||
public String getPostName_like() {
|
||||
return getSqlMap().getWhere().getValue("post_name", QueryType.LIKE);
|
||||
}
|
||||
|
||||
public void setPostName_like(String roleName) {
|
||||
getSqlMap().getWhere().and("post_name", QueryType.LIKE, roleName);
|
||||
}
|
||||
|
||||
@Length(min=0, max=100, message="岗位分类长度不能超过 100 个字符")
|
||||
public String getPostType() {
|
||||
return postType;
|
||||
|
||||
@@ -68,8 +68,8 @@ public class EmpUserService extends CrudService<EmpUserDao, EmpUser> {
|
||||
* 分页查询数据
|
||||
*/
|
||||
@Override
|
||||
public Page<EmpUser> findPage(Page<EmpUser> page, EmpUser empUser) {
|
||||
return super.findPage(page, empUser);
|
||||
public Page<EmpUser> findPage(EmpUser empUser) {
|
||||
return super.findPage(empUser);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -41,8 +41,8 @@ public class EmployeeService extends CrudService<EmployeeDao, Employee> {
|
||||
* 查询分页数据
|
||||
*/
|
||||
@Override
|
||||
public Page<Employee> findPage(Page<Employee> page, Employee employee) {
|
||||
return super.findPage(page, employee);
|
||||
public Page<Employee> findPage(Employee employee) {
|
||||
return super.findPage(employee);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -25,7 +25,7 @@ public class LogService extends CrudService<LogDao, Log> {
|
||||
* 查询日志记录
|
||||
*/
|
||||
@Override
|
||||
public Page<Log> findPage(Page<Log> page, Log log) {
|
||||
public Page<Log> findPage(Log log) {
|
||||
// // 设置默认时间范围,默认当前月
|
||||
// if (log.getCreateDate_gte() == null){
|
||||
// log.setCreateDate_gte(DateUtils.setDays(new Date(), 1));
|
||||
@@ -37,7 +37,7 @@ public class LogService extends CrudService<LogDao, Log> {
|
||||
if (!log.getCurrentUser().isAdmin()){
|
||||
log.setCreateBy(log.getCurrentUser().getUserCode());
|
||||
}
|
||||
return super.findPage(page, log);
|
||||
return super.findPage(log);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -38,11 +38,11 @@ public class PostService extends CrudService<PostDao, Post> {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询可分页的岗位列表
|
||||
* 查询岗位
|
||||
*/
|
||||
@Override
|
||||
public Page<Post> findPage(Page<Post> page, Post post) {
|
||||
return super.findPage(page, post);
|
||||
public Page<Post> findPage(Post post) {
|
||||
return super.findPage(post);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
///**
|
||||
// * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
// */
|
||||
//package com.jeesite.modules.sys.service.impl;
|
||||
//
|
||||
//import javax.servlet.http.HttpServletRequest;
|
||||
//import javax.servlet.http.HttpServletResponse;
|
||||
//
|
||||
//import org.springframework.stereotype.Service;
|
||||
//
|
||||
//import com.jeesite.modules.file.entity.FileEntity;
|
||||
//import com.jeesite.modules.file.entity.FileUpload;
|
||||
//import com.jeesite.modules.file.service.FileUploadServiceExtendSupport;
|
||||
//
|
||||
///**
|
||||
// * 文件上传扩展实现类
|
||||
// * @author ThinkGem
|
||||
// * @version 2018年10月13日
|
||||
// */
|
||||
//@Service
|
||||
//public class FileUploadServiceExtendImpl extends FileUploadServiceExtendSupport {
|
||||
//
|
||||
// @Override
|
||||
// public boolean fileExists(FileEntity fileEntity) {
|
||||
// System.out.println("============= fileupload fileExists ");
|
||||
// return super.fileExists(fileEntity);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void uploadFile(FileEntity fileEntity) {
|
||||
// System.out.println("============= fileupload uploadFile ");
|
||||
// super.uploadFile(fileEntity);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void saveUploadFile(FileUpload fileUpload) {
|
||||
// System.out.println("============= fileupload saveUploadFile ");
|
||||
// super.saveUploadFile(fileUpload);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String getFileUrl(FileUpload fileUpload) {
|
||||
// System.out.println("============= fileupload getFileUrl ");
|
||||
// return super.getFileUrl(fileUpload);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String downFile(FileUpload fileUpload, HttpServletRequest request, HttpServletResponse response) {
|
||||
// System.out.println("============= fileupload downFile ");
|
||||
// return super.downFile(fileUpload, request, response);
|
||||
// }
|
||||
//
|
||||
//}
|
||||
@@ -0,0 +1,49 @@
|
||||
///**
|
||||
// * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
// */
|
||||
//package com.jeesite.modules.sys.service.impl;
|
||||
//
|
||||
//import java.util.List;
|
||||
//
|
||||
//import org.springframework.stereotype.Service;
|
||||
//
|
||||
//import com.jeesite.modules.sys.entity.Menu;
|
||||
//import com.jeesite.modules.sys.service.MenuServiceSupport;
|
||||
//
|
||||
///**
|
||||
// * 菜单服务扩展实现类
|
||||
// * @author ThinkGem
|
||||
// * @version 2018年10月13日
|
||||
// */
|
||||
//@Service
|
||||
//public class MenuServiceExtendImpl extends MenuServiceSupport {
|
||||
//
|
||||
// public MenuServiceExtendImpl() {
|
||||
// this.entityClass = Menu.class;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public Menu get(Menu menu) {
|
||||
// System.out.println("============= menu get ");
|
||||
// return super.get(menu);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public List<Menu> findList(Menu menu) {
|
||||
// System.out.println("============= menu findList ");
|
||||
// return super.findList(menu);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public List<Menu> findByRoleCode(Menu menu) {
|
||||
// System.out.println("============= menu findByRoleCode ");
|
||||
// return super.findByRoleCode(menu);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public List<Menu> findByUserCode(Menu menu) {
|
||||
// System.out.println("============= menu findByUserCode ");
|
||||
// return super.findByUserCode(menu);
|
||||
// }
|
||||
//
|
||||
//}
|
||||
@@ -0,0 +1,43 @@
|
||||
///**
|
||||
// * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
// */
|
||||
//package com.jeesite.modules.sys.service.impl;
|
||||
//
|
||||
//import java.util.List;
|
||||
//
|
||||
//import org.springframework.stereotype.Service;
|
||||
//
|
||||
//import com.jeesite.modules.sys.entity.Role;
|
||||
//import com.jeesite.modules.sys.service.RoleServiceSupport;
|
||||
//
|
||||
///**
|
||||
// * 角色服务扩展实现类
|
||||
// * @author ThinkGem
|
||||
// * @version 2018年10月13日
|
||||
// */
|
||||
//@Service
|
||||
//public class RoleServiceExtendImpl extends RoleServiceSupport {
|
||||
//
|
||||
// public RoleServiceExtendImpl() {
|
||||
// this.entityClass = Role.class;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public Role get(Role role) {
|
||||
// System.out.println("============= role get ");
|
||||
// return super.get(role);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public List<Role> findList(Role role) {
|
||||
// System.out.println("============= role findList ");
|
||||
// return super.findList(role);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public List<Role> findListByUserCode(Role role) {
|
||||
// System.out.println("============= role findListByUserCode ");
|
||||
// return super.findListByUserCode(role);
|
||||
// }
|
||||
//
|
||||
//}
|
||||
@@ -0,0 +1,49 @@
|
||||
///**
|
||||
// * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
// */
|
||||
//package com.jeesite.modules.sys.service.impl;
|
||||
//
|
||||
//import java.util.List;
|
||||
//
|
||||
//import org.springframework.stereotype.Service;
|
||||
//
|
||||
//import com.jeesite.modules.sys.entity.User;
|
||||
//import com.jeesite.modules.sys.service.UserServiceSupport;
|
||||
//
|
||||
///**
|
||||
// * 用户服务扩展实现类
|
||||
// * @author ThinkGem
|
||||
// * @version 2018年10月13日
|
||||
// */
|
||||
//@Service
|
||||
//public class UserServiceExtendImpl extends UserServiceSupport {
|
||||
//
|
||||
// public UserServiceExtendImpl() {
|
||||
// this.entityClass = User.class;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public User get(User user) {
|
||||
// System.out.println("============= user get ");
|
||||
// return super.get(user);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public User getByLoginCode(User user) {
|
||||
// System.out.println("============= user getByLoginCode ");
|
||||
// return super.getByLoginCode(user);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public User getByUserTypeAndRefCode(User user) {
|
||||
// System.out.println("============= user getByUserTypeAndRefCode ");
|
||||
// return super.getByUserTypeAndRefCode(user);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public List<User> findList(User user) {
|
||||
// System.out.println("============= user findList ");
|
||||
// return super.findList(user);
|
||||
// }
|
||||
//
|
||||
//}
|
||||
@@ -28,7 +28,6 @@ import com.jeesite.common.lang.StringUtils;
|
||||
import com.jeesite.common.web.BaseController;
|
||||
import com.jeesite.modules.sys.entity.Company;
|
||||
import com.jeesite.modules.sys.entity.Office;
|
||||
import com.jeesite.modules.sys.entity.UserDataScope;
|
||||
import com.jeesite.modules.sys.service.CompanyService;
|
||||
import com.jeesite.modules.sys.service.OfficeService;
|
||||
import com.jeesite.modules.sys.utils.UserUtils;
|
||||
@@ -74,7 +73,7 @@ public class CompanyController extends BaseController {
|
||||
@RequiresPermissions("user")
|
||||
@RequestMapping(value = "listData")
|
||||
@ResponseBody
|
||||
public List<Company> listData(Company company) {
|
||||
public List<Company> listData(Company company, String ctrlPermi) {
|
||||
if (StringUtils.isBlank(company.getParentCode())) {
|
||||
company.setParentCode(Company.ROOT_CODE);
|
||||
}
|
||||
@@ -83,7 +82,7 @@ public class CompanyController extends BaseController {
|
||||
|| StringUtils.isNotBlank(company.getFullName())){
|
||||
company.setParentCode(null);
|
||||
}
|
||||
companyService.addDataScopeFilter(company, UserDataScope.CTRL_PERMI_MANAGE);
|
||||
companyService.addDataScopeFilter(company, ctrlPermi);
|
||||
List<Company> list = companyService.findList(company);
|
||||
return list;
|
||||
}
|
||||
@@ -211,8 +210,7 @@ public class CompanyController extends BaseController {
|
||||
Company where = new Company();
|
||||
where.setStatus(Company.STATUS_NORMAL);
|
||||
if (!(isAll != null && isAll)){
|
||||
companyService.addDataScopeFilter(where, StringUtils.defaultIfBlank(
|
||||
ctrlPermi, UserDataScope.CTRL_PERMI_HAVE));
|
||||
companyService.addDataScopeFilter(where, ctrlPermi);
|
||||
}
|
||||
List<Company> list = companyService.findList(where);
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
|
||||
@@ -65,7 +65,8 @@ public class LogController extends BaseController {
|
||||
@RequestMapping(value = "listData")
|
||||
@ResponseBody
|
||||
public Page<Log> listData(Log log, HttpServletRequest request, HttpServletResponse response) {
|
||||
Page<Log> page = logService.findPage(new Page<Log>(request, response), log);
|
||||
log.setPage(new Page<>(request, response));
|
||||
Page<Log> page = logService.findPage(log);
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ import com.jeesite.common.web.CookieUtils;
|
||||
import com.jeesite.common.web.http.ServletUtils;
|
||||
import com.jeesite.modules.sys.entity.Menu;
|
||||
import com.jeesite.modules.sys.entity.User;
|
||||
import com.jeesite.modules.sys.service.UserService;
|
||||
import com.jeesite.modules.sys.utils.PwdUtils;
|
||||
import com.jeesite.modules.sys.utils.UserUtils;
|
||||
|
||||
/**
|
||||
@@ -280,7 +280,7 @@ public class LoginController extends BaseController{
|
||||
}
|
||||
|
||||
// 初始密码策略和密码修改策略验证(0:关闭;1:提醒用户;2:强制修改初始或旧密码)
|
||||
String passwordModifyUrl = UserService.passwordModifyValid(user, model);
|
||||
String passwordModifyUrl = PwdUtils.passwordModifyValid(user, model);
|
||||
if (passwordModifyUrl != null){
|
||||
try {
|
||||
request.getRequestDispatcher(passwordModifyUrl).forward(request, response);
|
||||
@@ -334,8 +334,8 @@ public class LoginController extends BaseController{
|
||||
if (user.isSuperAdmin() && StringUtils.isNotBlank(sysCode)){
|
||||
if (!StringUtils.equals(principal.getParam("sysCode"), sysCode)){
|
||||
principal.setParam("sysCode", sysCode);
|
||||
UserUtils.removeCacheByKeyPrefix(UserUtils.CACHE_MENU_LIST);
|
||||
UserUtils.removeCache(UserUtils.CACHE_AUTH_INFO);
|
||||
UserUtils.removeCache(UserUtils.CACHE_MENU_LIST);
|
||||
}
|
||||
}
|
||||
return REDIRECT + adminPath + "/index";
|
||||
|
||||
@@ -24,7 +24,6 @@ import com.jeesite.common.idgen.IdGen;
|
||||
import com.jeesite.common.lang.StringUtils;
|
||||
import com.jeesite.common.web.BaseController;
|
||||
import com.jeesite.modules.sys.entity.Office;
|
||||
import com.jeesite.modules.sys.entity.UserDataScope;
|
||||
import com.jeesite.modules.sys.service.OfficeService;
|
||||
import com.jeesite.modules.sys.utils.UserUtils;
|
||||
import com.jeesite.modules.sys.web.user.EmpUserController;
|
||||
@@ -53,16 +52,6 @@ public class OfficeController extends BaseController {
|
||||
return officeService.get(officeCode, isNewRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 机构列表
|
||||
* @param office
|
||||
*/
|
||||
@RequiresPermissions("sys:office:view")
|
||||
@RequestMapping(value = "index")
|
||||
public String index(Office office, Model model) {
|
||||
return REDIRECT + adminPath + "/sys/office/list";
|
||||
}
|
||||
|
||||
/**
|
||||
* 机构列表
|
||||
* @param office
|
||||
@@ -81,7 +70,7 @@ public class OfficeController extends BaseController {
|
||||
@RequiresPermissions("user")
|
||||
@RequestMapping(value = "listData")
|
||||
@ResponseBody
|
||||
public List<Office> listData(Office office) {
|
||||
public List<Office> listData(Office office, String ctrlPermi) {
|
||||
if (StringUtils.isBlank(office.getParentCode())){
|
||||
office.setParentCode(Office.ROOT_CODE);
|
||||
}
|
||||
@@ -90,7 +79,7 @@ public class OfficeController extends BaseController {
|
||||
|| StringUtils.isNotBlank(office.getFullName())){
|
||||
office.setParentCode(null);
|
||||
}
|
||||
officeService.addDataScopeFilter(office, UserDataScope.CTRL_PERMI_MANAGE);
|
||||
officeService.addDataScopeFilter(office, ctrlPermi);
|
||||
List<Office> list = officeService.findList(office);
|
||||
return list;
|
||||
}
|
||||
@@ -214,7 +203,7 @@ public class OfficeController extends BaseController {
|
||||
* @param excludeCode 排除的ID
|
||||
* @param parentCode 上级Code
|
||||
* @param isAll 是否显示所有机构(true:不进行权限过滤)
|
||||
* @param officeTypes 机构类型(1:公司, 2:部门, 3:小组, 4:其它)
|
||||
* @param officeTypes 机构类型(1:省级公司;2:市级公司;3:部门)
|
||||
* @param companyCode 仅查询公司下的机构
|
||||
* @param isShowCode 是否显示编码(true or 1:显示在左侧;2:显示在右侧;false or null:不显示)
|
||||
* @param isShowFullName 是否显示全机构名称
|
||||
@@ -234,8 +223,7 @@ public class OfficeController extends BaseController {
|
||||
where.setStatus(Office.STATUS_NORMAL);
|
||||
where.setCompanyCode(companyCode);
|
||||
if (!(isAll != null && isAll)){
|
||||
officeService.addDataScopeFilter(where, StringUtils.defaultIfBlank(
|
||||
ctrlPermi, UserDataScope.CTRL_PERMI_HAVE));
|
||||
officeService.addDataScopeFilter(where, ctrlPermi);
|
||||
}
|
||||
List<Office> list = officeService.findList(where);
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
@@ -282,7 +270,7 @@ public class OfficeController extends BaseController {
|
||||
map.put("isParent", true);
|
||||
List<Map<String, Object>> userList;
|
||||
userList = empUserController.treeData("u_", e.getOfficeCode(), e.getOfficeCode(),
|
||||
companyCode, postCode, roleCode, isAll, isShowCode);
|
||||
companyCode, postCode, roleCode, isAll, isShowCode, ctrlPermi);
|
||||
mapList.addAll(userList);
|
||||
}
|
||||
mapList.add(map);
|
||||
|
||||
@@ -106,13 +106,15 @@ public class OnlineController extends BaseController{
|
||||
map.put("startTimestamp", DateUtils.formatDateTime(session.getStartTimestamp()));
|
||||
map.put("lastAccessTime", DateUtils.formatDateTime(session.getLastAccessTime()));
|
||||
map.put("timeout", TimeUtils.formatDateAgo(session.getTimeout()-(currentTime-session.getLastAccessTime().getTime())));
|
||||
PrincipalCollection pc = (PrincipalCollection)session.getAttribute(DefaultSubjectContext.PRINCIPALS_SESSION_KEY);
|
||||
LoginInfo principal = (pc != null ? (LoginInfo)pc.getPrimaryPrincipal() : null);
|
||||
if (principal != null){
|
||||
map.put("userCode", session.getAttribute("userCode"));// principal.getId());
|
||||
map.put("userName", session.getAttribute("userName"));// principal.getName());
|
||||
map.put("userType", session.getAttribute("userType"));// ObjectUtils.toString(principal.getParam("userType")));
|
||||
map.put("deviceType", ObjectUtils.toString(principal.getParam("deviceType")));
|
||||
Object pc = session.getAttribute(DefaultSubjectContext.PRINCIPALS_SESSION_KEY);
|
||||
if (pc != null && pc instanceof PrincipalCollection){
|
||||
LoginInfo loginInfo = (LoginInfo)((PrincipalCollection)pc).getPrimaryPrincipal();
|
||||
if (loginInfo != null){
|
||||
map.put("userCode", session.getAttribute("userCode"));// principal.getId());
|
||||
map.put("userName", session.getAttribute("userName"));// principal.getName());
|
||||
map.put("userType", session.getAttribute("userType"));// ObjectUtils.toString(principal.getParam("userType")));
|
||||
map.put("deviceType", ObjectUtils.toString(loginInfo.getParam("deviceType")));
|
||||
}
|
||||
}
|
||||
map.put("host", session.getHost());
|
||||
list.add(map);
|
||||
|
||||
@@ -51,7 +51,8 @@ public class PostController extends BaseController {
|
||||
@RequestMapping(value = {"listData"})
|
||||
@ResponseBody
|
||||
public Page<Post> listData(Post post, HttpServletRequest request, HttpServletResponse response) {
|
||||
Page<Post> page = postService.findPage(new Page<Post>(request, response), post);
|
||||
post.setPage(new Page<>(request, response));
|
||||
Page<Post> page = postService.findPage(post);
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ import com.jeesite.common.service.ServiceException;
|
||||
import com.jeesite.common.web.BaseController;
|
||||
import com.jeesite.modules.sys.entity.User;
|
||||
import com.jeesite.modules.sys.service.UserService;
|
||||
import com.jeesite.modules.sys.utils.PwdUtils;
|
||||
import com.jeesite.modules.sys.utils.UserUtils;
|
||||
import com.jeesite.modules.sys.utils.ValidCodeUtils;
|
||||
|
||||
@@ -201,9 +202,9 @@ public class AccountController extends BaseController{
|
||||
// 验证三个密保问题是否正确。
|
||||
User u = UserUtils.getByLoginCode(user.getLoginCode());
|
||||
if (!(u != null && loginCode.equals(user.getLoginCode())
|
||||
&& UserService.validatePassword(user.getPwdQuestionAnswer(), u.getPwdQuestionAnswer())
|
||||
&& UserService.validatePassword(user.getPwdQuestionAnswer2(), u.getPwdQuestionAnswer2())
|
||||
&& UserService.validatePassword(user.getPwdQuestionAnswer3(), u.getPwdQuestionAnswer3()))) {
|
||||
&& PwdUtils.validatePassword(user.getPwdQuestionAnswer(), u.getPwdQuestionAnswer())
|
||||
&& PwdUtils.validatePassword(user.getPwdQuestionAnswer2(), u.getPwdQuestionAnswer2())
|
||||
&& PwdUtils.validatePassword(user.getPwdQuestionAnswer3(), u.getPwdQuestionAnswer3()))) {
|
||||
return renderResult(Global.FALSE, "您填写的密保问题答案不正确!");
|
||||
}
|
||||
|
||||
|
||||
@@ -4,21 +4,26 @@
|
||||
package com.jeesite.modules.sys.web.user;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.apache.shiro.session.Session;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.jeesite.common.collect.ListUtils;
|
||||
import com.jeesite.common.collect.MapUtils;
|
||||
import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.entity.Page;
|
||||
import com.jeesite.common.lang.StringUtils;
|
||||
@@ -64,7 +69,8 @@ public class CorpAdminController extends BaseController {
|
||||
user.getSqlMap().getWhere().disableAutoAddCorpCodeWhere()
|
||||
.and("corp_code", QueryType.EQ, user.getCorpCode_())
|
||||
.and("corp_name", QueryType.LIKE, user.getCorpName_());
|
||||
Page<User> page = userService.findPage(new Page<User>(request, response), user);
|
||||
user.setPage(new Page<>(request, response));
|
||||
Page<User> page = userService.findPage(user);
|
||||
return page;
|
||||
}
|
||||
|
||||
@@ -215,5 +221,55 @@ public class CorpAdminController extends BaseController {
|
||||
return renderResult(Global.TRUE, "取消用户'" + user.getUserName() + "'管理员身份成功!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询租户数据树格式
|
||||
* @param pId 父级编码,默认 -1
|
||||
* @param isShowCode 是否显示编码(true or 1:显示在左侧;2:显示在右侧;false or null:不显示)
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("user")
|
||||
@RequestMapping(value = "treeData")
|
||||
@ResponseBody
|
||||
public List<Map<String, Object>> treeData(String pId, String isShowCode) {
|
||||
List<Map<String, Object>> mapList = ListUtils.newArrayList();
|
||||
User where = new User();
|
||||
List<User> list = userService.findCorpList(where);
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
User e = list.get(i);
|
||||
Map<String, Object> map = MapUtils.newHashMap();
|
||||
map.put("id", e.getCorpCode_());
|
||||
map.put("pId", StringUtils.defaultIfBlank(pId, "-1"));
|
||||
map.put("name", StringUtils.getTreeNodeName(isShowCode, e.getCorpCode_(), e.getCorpName_()));
|
||||
mapList.add(map);
|
||||
}
|
||||
return mapList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 切换租户
|
||||
* @param user
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("sys:corpAdmin:edit")
|
||||
@RequestMapping(value = "switch/{corpCode}")
|
||||
@ResponseBody
|
||||
public String switchCorp(@PathVariable String corpCode) {
|
||||
if (UserUtils.getUser().isSuperAdmin()){
|
||||
User where = new User();
|
||||
where.setCorpCode_(corpCode);
|
||||
List<User> list = userService.findCorpList(where);
|
||||
if (list.size() > 0){
|
||||
Session session = UserUtils.getSession();
|
||||
User user = list.get(0);
|
||||
session.setAttribute("corpCode", user.getCorpCode_());
|
||||
session.setAttribute("corpName", user.getCorpName_());
|
||||
return renderResult(Global.TRUE, "租户切换成功!");
|
||||
}else{
|
||||
return renderResult(Global.TRUE, "租户切换失败,没有这个租户!");
|
||||
}
|
||||
}
|
||||
return renderResult(Global.FALSE, "租户切换失败,只有超级管理员才可以操作!");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -92,13 +92,13 @@ public class EmpUserController extends BaseController {
|
||||
@RequiresPermissions("user")
|
||||
@RequestMapping(value = "listData")
|
||||
@ResponseBody
|
||||
public Page<EmpUser> listData(EmpUser empUser, Boolean isAll, HttpServletRequest request, HttpServletResponse response) {
|
||||
public Page<EmpUser> listData(EmpUser empUser, Boolean isAll, String ctrlPermi, HttpServletRequest request, HttpServletResponse response) {
|
||||
empUser.getEmployee().getOffice().setIsQueryChildren(true);
|
||||
empUser.getEmployee().getCompany().setIsQueryChildren(true);
|
||||
if (!(isAll != null && isAll)){
|
||||
empUserService.addDataScopeFilter(empUser, UserDataScope.CTRL_PERMI_MANAGE);
|
||||
empUserService.addDataScopeFilter(empUser, ctrlPermi);
|
||||
}
|
||||
empUser.setPage(new Page<EmpUser>(request, response));
|
||||
empUser.setPage(new Page<>(request, response));
|
||||
Page<EmpUser> page = empUserService.findPage(empUser);
|
||||
return page;
|
||||
}
|
||||
@@ -172,11 +172,11 @@ public class EmpUserController extends BaseController {
|
||||
*/
|
||||
@RequiresPermissions("sys:empUser:view")
|
||||
@RequestMapping(value = "exportData")
|
||||
public void exportData(EmpUser empUser, Boolean isAll, HttpServletResponse response) {
|
||||
public void exportData(EmpUser empUser, Boolean isAll, String ctrlPermi, HttpServletResponse response) {
|
||||
empUser.getEmployee().getOffice().setIsQueryChildren(true);
|
||||
empUser.getEmployee().getCompany().setIsQueryChildren(true);
|
||||
if (!(isAll != null && isAll)){
|
||||
empUserService.addDataScopeFilter(empUser, UserDataScope.CTRL_PERMI_MANAGE);
|
||||
empUserService.addDataScopeFilter(empUser, ctrlPermi);
|
||||
}
|
||||
List<EmpUser> list = empUserService.findList(empUser);
|
||||
String fileName = "用户数据" + DateUtils.getDate("yyyyMMddHHmmss") + ".xlsx";
|
||||
@@ -354,8 +354,8 @@ public class EmpUserController extends BaseController {
|
||||
@RequestMapping(value = "treeData")
|
||||
@ResponseBody
|
||||
public List<Map<String, Object>> treeData(String idPrefix, String pId,
|
||||
String officeCode, String companyCode, String postCode,
|
||||
String roleCode, Boolean isAll, String isShowCode) {
|
||||
String officeCode, String companyCode, String postCode, String roleCode,
|
||||
Boolean isAll, String isShowCode, String ctrlPermi) {
|
||||
List<Map<String, Object>> mapList = ListUtils.newArrayList();
|
||||
EmpUser empUser = new EmpUser();
|
||||
Employee employee = empUser.getEmployee();
|
||||
@@ -367,8 +367,9 @@ public class EmpUserController extends BaseController {
|
||||
empUser.setRoleCode(roleCode);
|
||||
empUser.setStatus(User.STATUS_NORMAL);
|
||||
empUser.setUserType(User.USER_TYPE_EMPLOYEE);
|
||||
empUser.setMgrType(User.MGR_TYPE_NOT_ADMIN);
|
||||
if (!(isAll != null && isAll)) {
|
||||
empUserService.addDataScopeFilter(empUser);
|
||||
empUserService.addDataScopeFilter(empUser, ctrlPermi);
|
||||
}
|
||||
List<EmpUser> list = empUserService.findList(empUser);
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
@@ -387,13 +388,12 @@ public class EmpUserController extends BaseController {
|
||||
*/
|
||||
@RequiresPermissions("user")
|
||||
@RequestMapping(value = "empUserSelect")
|
||||
public String empUserSelect(EmpUser empUser, String selectData, String checkbox, Model model) {
|
||||
public String empUserSelect(EmpUser empUser, String selectData, Model model) {
|
||||
String selectDataJson = EncodeUtils.decodeUrl(selectData);
|
||||
if (JsonMapper.fromJson(selectDataJson, Map.class) != null){
|
||||
model.addAttribute("selectData", selectDataJson);
|
||||
}
|
||||
model.addAttribute("checkbox", checkbox); // 是否显示复选框,支持多选
|
||||
model.addAttribute("empUser", empUser); // ModelAttribute
|
||||
model.addAttribute("empUser", empUser);
|
||||
return "modules/sys/user/empUserSelect";
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,8 @@ public class SecAdminController extends BaseController {
|
||||
@ResponseBody
|
||||
public Page<User> listData(User user, HttpServletRequest request, HttpServletResponse response) {
|
||||
user.setMgrType(User.MGR_TYPE_SEC_ADMIN); // 二级管理员
|
||||
Page<User> page = userService.findPage(new Page<User>(request, response), user);
|
||||
user.setPage(new Page<>(request, response));
|
||||
Page<User> page = userService.findPage(user);
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# 温馨提示:不建议直接修改此文件,为了平台升级方便,建议将需要修改的参数值,复制到jeesite.yml里进行覆盖该参数值。
|
||||
# 温馨提示:不建议直接修改此文件,为了平台升级方便,建议将需要修改的参数值,复制到application.yml里进行覆盖该参数值。
|
||||
|
||||
#============================#
|
||||
#===== Database sttings =====#
|
||||
#============================#
|
||||
#======================================#
|
||||
#========== Database sttings ==========#
|
||||
#======================================#
|
||||
|
||||
# 数据库连接
|
||||
jdbc:
|
||||
@@ -24,7 +24,7 @@ jdbc:
|
||||
minIdle: 3
|
||||
# 最大连接数
|
||||
maxActive: 20
|
||||
|
||||
|
||||
# 获取连接等待超时时间,单位毫秒(4.0.6+)
|
||||
maxWait: 60000
|
||||
|
||||
@@ -42,25 +42,6 @@ jdbc:
|
||||
removeAbandoned: true
|
||||
removeAbandonedTimeout: 1800
|
||||
|
||||
# # 多数据源名称列表,启用方式:@MyBatisDao(dataSourceName="ds2")
|
||||
# dataSourceNames: ds2
|
||||
#
|
||||
# # 多数据源配置:ds2
|
||||
# ds2:
|
||||
# type: oracle
|
||||
# driver: oracle.jdbc.driver.OracleDriver
|
||||
# url: jdbc:oracle:thin:@127.0.0.1:1521/orcl
|
||||
# username: jeesite
|
||||
# password: jeesite
|
||||
# testSql: SELECT 1 FROM DUAL
|
||||
# encrypt:
|
||||
# username: false
|
||||
# password: true
|
||||
# pool:
|
||||
# init: 1
|
||||
# minIdle: 3
|
||||
# maxActive: 20
|
||||
|
||||
# JTA 分布式事务(v4.0.4+)
|
||||
jta:
|
||||
enabled: false
|
||||
@@ -73,47 +54,44 @@ jdbc:
|
||||
stat:
|
||||
enabled: true
|
||||
|
||||
# Redis 配置
|
||||
redis:
|
||||
enabled: false
|
||||
|
||||
# Redis 连接参数
|
||||
host: 127.0.0.1
|
||||
port: 6379
|
||||
isSSL: false
|
||||
timeout: 2000
|
||||
password: 1234
|
||||
database: 0
|
||||
clientName: ~
|
||||
|
||||
# Redis 连接池配置
|
||||
pool:
|
||||
maxIdle: 3
|
||||
maxTotal: 20
|
||||
|
||||
# 是否启用Redis系统缓存及会话(专业版)
|
||||
cacheAndSession: false
|
||||
|
||||
# 定义Key的前缀标识
|
||||
keyPrefix: ${jdbc.tablePrefix}
|
||||
#======================================#
|
||||
#========== Spring settings ===========#
|
||||
#======================================#
|
||||
|
||||
#============================#
|
||||
#===== System settings ======#
|
||||
#============================#
|
||||
spring:
|
||||
|
||||
# 缓存配置
|
||||
cache:
|
||||
# 缓存及会话共享(专业版)
|
||||
isClusterMode: false
|
||||
# 清理全部缓存按钮所清理的缓存列表
|
||||
clearNames: sysCache,corpCache,userCache,cmsCache
|
||||
|
||||
# 关闭 Spring Boot Banner 打印
|
||||
main:
|
||||
bannerMode: "off"
|
||||
|
||||
#管理基础路径
|
||||
# 日志配置
|
||||
logging:
|
||||
config: classpath:config/logback-spring.xml
|
||||
|
||||
#======================================#
|
||||
#========== System settings ===========#
|
||||
#======================================#
|
||||
|
||||
# 管理基础路径
|
||||
adminPath: /a
|
||||
|
||||
#前端基础路径
|
||||
# 前端基础路径
|
||||
frontPath: /f
|
||||
|
||||
# 分页配置
|
||||
# 分页相关
|
||||
page:
|
||||
|
||||
# 分页默认大小
|
||||
pageSize: 20
|
||||
|
||||
# 用户相关参数
|
||||
# 用户相关
|
||||
user:
|
||||
|
||||
# 指定超级管理员编号(研发团队使用的账号)
|
||||
@@ -169,7 +147,7 @@ user:
|
||||
expandLevel: -1,
|
||||
remarks: ""
|
||||
}]
|
||||
|
||||
|
||||
# 多租户模式(SAAS模式)(专业版)
|
||||
useCorpModel: false
|
||||
|
||||
@@ -179,11 +157,51 @@ user:
|
||||
registerUser:
|
||||
enabled: false
|
||||
userTypes: 0, 1
|
||||
|
||||
|
||||
# 角色管理
|
||||
role:
|
||||
# 扩展数据权限定义:3:本部门;4:本公司;5:本部门和本公司
|
||||
# 如果 ctrlTypeClass 为 NONE,则代表是不控制该类型权限
|
||||
extendDataScopes: >
|
||||
{
|
||||
3: {
|
||||
Office: {
|
||||
ctrlTypeClass: "com.jeesite.modules.sys.entity.Office",
|
||||
ctrlDataAttrName: "currentUser.refObj.office.officeCode",
|
||||
ctrlDataParentCodesAttrName: "currentUser.refObj.office.parentCodes"
|
||||
},
|
||||
Company: {
|
||||
ctrlTypeClass: "NONE"
|
||||
}
|
||||
},
|
||||
4: {
|
||||
Office: {
|
||||
ctrlTypeClass: "NONE"
|
||||
},
|
||||
Company: {
|
||||
ctrlTypeClass: "com.jeesite.modules.sys.entity.Company",
|
||||
ctrlDataAttrName: "currentUser.refObj.company.companyCode",
|
||||
ctrlDataParentCodesAttrName: "currentUser.refObj.company.parentCodes"
|
||||
}
|
||||
},
|
||||
5: {
|
||||
Office: {
|
||||
ctrlTypeClass: "com.jeesite.modules.sys.entity.Office",
|
||||
ctrlDataAttrName: "currentUser.refObj.office.officeCode",
|
||||
ctrlDataParentCodesAttrName: "currentUser.refObj.office.parentCodes"
|
||||
},
|
||||
Company: {
|
||||
ctrlTypeClass: "com.jeesite.modules.sys.entity.Company",
|
||||
ctrlDataAttrName: "currentUser.refObj.company.companyCode",
|
||||
ctrlDataParentCodesAttrName: "currentUser.refObj.company.parentCodes"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# 菜单管理
|
||||
menu:
|
||||
# 根据模块状态去更新相连的菜单状态(仅作为微服务时设为false)
|
||||
updateStatusByModuleStatus: false
|
||||
updateStatusByModuleStatus: true
|
||||
|
||||
# 国际化管理(专业版+)
|
||||
lang:
|
||||
@@ -232,15 +250,15 @@ job:
|
||||
trigger:
|
||||
enabled: false
|
||||
|
||||
# 内容管理
|
||||
cms:
|
||||
|
||||
# 内容管理主站点编码
|
||||
mainSiteCode: main
|
||||
## 内容管理
|
||||
#cms:
|
||||
#
|
||||
# # 内容管理主站点编码
|
||||
# mainSiteCode: main
|
||||
|
||||
#============================#
|
||||
#==== Framework settings ====#
|
||||
#============================#
|
||||
#======================================#
|
||||
#========= Framework settings =========#
|
||||
#======================================#
|
||||
|
||||
# Shiro 相关配置
|
||||
shiro:
|
||||
@@ -296,17 +314,13 @@ shiro:
|
||||
isAllowExternalSiteIframe: true
|
||||
|
||||
# 是否允许跨域访问,如果允许,设置允许的域名,全部域名设置*号,如果不允许,此设置应该为空
|
||||
# accessControlAllowOrigin: http://demo.jeesite.net
|
||||
# accessControlAllowOrigin: http://demo.jeesite.com
|
||||
# accessControlAllowOrigin: '*'
|
||||
|
||||
# 是否在登录后生成新的Session(默认false)
|
||||
isGenerateNewSessionAfterLogin: false
|
||||
|
||||
# URI 权限过滤器定义
|
||||
filterChainDefinitions: |
|
||||
/ReportServer/** = user
|
||||
${adminPath}/** = user
|
||||
|
||||
# filterChainDefinitions: |
|
||||
# /ReportServer/** = user
|
||||
# ${adminPath}/file/** = anon
|
||||
@@ -318,12 +332,18 @@ shiro:
|
||||
# ${adminPath}/cms/article/* = anon
|
||||
# ${adminPath}/cms/link/* = anon
|
||||
# ${adminPath}/** = user
|
||||
filterChainDefinitions: |
|
||||
/ReportServer/** = user
|
||||
${adminPath}/** = user
|
||||
|
||||
# 默认的授权过滤定义,如果在filterChainDefinitions中已经定义,则该定义会被覆盖。
|
||||
defaultFilterChainDefinitions: |
|
||||
/static/** = anon
|
||||
/userfiles/** = anon
|
||||
/druid/** = perms[sys:state:druid]
|
||||
/v2/api-docs = perms[sys:swagger]
|
||||
/swagger-ui.html = perms[sys:swagger]
|
||||
/swagger-resources/** = perms[sys:swagger]
|
||||
${adminPath}/login-cas = cas
|
||||
${adminPath}/login = authc
|
||||
${adminPath}/logout = logout
|
||||
@@ -339,19 +359,19 @@ shiro:
|
||||
# Session 相关
|
||||
session:
|
||||
|
||||
#全局会话超时,单位:毫秒, 20m=1200000ms, 30m=1800000ms, 60m=3600000ms, 12h=43200000ms, 1day=86400000ms
|
||||
# 全局会话超时,单位:毫秒, 20m=1200000ms, 30m=1800000ms, 60m=3600000ms, 12h=43200000ms, 1day=86400000ms
|
||||
sessionTimeout: 1800000
|
||||
|
||||
#手机APP设备会话超时参数设置,登录请求参数加 param_deviceType=mobileApp 时有效
|
||||
# 手机APP设备会话超时参数设置,登录请求参数加 param_deviceType=mobileApp 时有效
|
||||
mobileAppSessionTimeout: 43200000
|
||||
|
||||
#定时清理失效会话,清理用户直接关闭浏览器造成的孤立会话
|
||||
# 定时清理失效会话,清理用户直接关闭浏览器造成的孤立会话
|
||||
sessionTimeoutClean: 1200000
|
||||
|
||||
#会话唯一标识SessionId在Cookie中的名称。
|
||||
# 会话唯一标识SessionId在Cookie中的名称。
|
||||
sessionIdCookieName: jeesite.session.id
|
||||
|
||||
#共享的SessionId的Cookie名称,保存到跟路径下,第三方应用获取。同一域名下多个项目时需设置共享Cookie的名称。
|
||||
# 共享的SessionId的Cookie名称,保存到跟路径下,第三方应用获取。同一域名下多个项目时需设置共享Cookie的名称。
|
||||
#shareSessionIdCookieName: ${session.sessionIdCookieName}
|
||||
|
||||
# MyBatis 相关
|
||||
@@ -371,21 +391,6 @@ mybatis:
|
||||
sleepSeconds: 3
|
||||
mappingPath: mappings
|
||||
|
||||
# 缓存设置
|
||||
ehcache:
|
||||
|
||||
# 缓存配置文件路径
|
||||
configFile: cache/ehcache-local.xml
|
||||
# configFile: cache/ehcache-rmi.xml
|
||||
|
||||
# 清理缓存的缓存名称
|
||||
clearNames: sysCache,userCache,corpCache,cmsCache,pageCachingFilter
|
||||
|
||||
# 页面缓存配置
|
||||
pageCaching:
|
||||
enabled: false
|
||||
urlPatterns: "*.html"
|
||||
|
||||
# Web 相关
|
||||
web:
|
||||
|
||||
@@ -437,15 +442,19 @@ web:
|
||||
# 关闭核心模块的Web功能(仅作为微服务时设为false)
|
||||
core:
|
||||
enabled: true
|
||||
|
||||
|
||||
# 在线API文档工具
|
||||
swagger:
|
||||
enabled: true
|
||||
|
||||
# 错误页面500.html是否输出错误信息(正式环境,为提供安全性可设置为false)
|
||||
error:
|
||||
page:
|
||||
printErrorInfo: true
|
||||
|
||||
#============================#
|
||||
#=== FileUpload settings ====#
|
||||
#============================#
|
||||
#======================================#
|
||||
#======== FileUpload settings =========#
|
||||
#======================================#
|
||||
|
||||
file:
|
||||
enabled: true
|
||||
@@ -470,13 +479,14 @@ file:
|
||||
# application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,
|
||||
# application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation
|
||||
|
||||
#============================#
|
||||
#===== Message settings =====#
|
||||
#============================#
|
||||
#======================================#
|
||||
#========== Message settings ==========#
|
||||
#======================================#
|
||||
|
||||
# 消息提醒中心(专业版)
|
||||
msg:
|
||||
|
||||
enabled: true
|
||||
|
||||
# 是否开启实时发送消息(保存消息后立即检查未读消息并发送),分布式部署下请单独配置消息发送服务,不建议开启此选项。
|
||||
realtime:
|
||||
# 是否开启
|
||||
@@ -499,7 +509,7 @@ msg:
|
||||
# 短信网关
|
||||
sms:
|
||||
beanName: smsSendService
|
||||
url: http://lehuo520.cn/a/sms/api
|
||||
url: http://localhost:80/msg/sms/send
|
||||
data: username=jeesite&password=jeesite.com
|
||||
prefix: 【JeeSite】
|
||||
suffix: ~
|
||||
@@ -521,11 +531,11 @@ msg:
|
||||
debug: true
|
||||
# 微信OAuth登录授权回调地址
|
||||
oauth:
|
||||
redirectUri: http://demo.jeesite.com/jeesite
|
||||
redirectUri: http://demo.jeesite.com/js
|
||||
|
||||
#============================#
|
||||
#===== Video settings =======#
|
||||
#============================#
|
||||
#======================================#
|
||||
#========== Video settings ============#
|
||||
#======================================#
|
||||
|
||||
video:
|
||||
|
||||
@@ -538,8 +548,3 @@ video:
|
||||
|
||||
# 将mp4视频的元数据信息转到视频第一帧
|
||||
qtFaststartFile: d:/tools/video/qt-faststart/qt-faststart.exe
|
||||
|
||||
#============================#
|
||||
#===== Project settings =====#
|
||||
#============================#
|
||||
|
||||
|
||||
@@ -1,23 +1,28 @@
|
||||
<included>
|
||||
|
||||
|
||||
<!-- https://github.com/spring-projects/spring-boot/blob/v2.0.5.RELEASE/spring-boot-project/spring-boot/src/main/resources/org/springframework/boot/logging/logback/defaults.xml -->
|
||||
<include resource="org/springframework/boot/logging/logback/defaults.xml" />
|
||||
|
||||
<logger name="org.springframework.boot.web.embedded" level="INFO" />
|
||||
<logger name="net.oschina.j2cache.caffeine.CaffeineProvider" level="ERROR" />
|
||||
|
||||
<!-- <logger name="org.apache.ibatis" level="DEBUG" /> -->
|
||||
<!-- <logger name="org.mybatis.spring" level="DEBUG" /> -->
|
||||
<!-- <logger name="org.springframework.jdbc" level="DEBUG" /> -->
|
||||
<logger name="org.mybatis.spring.transaction" level="DEBUG" />
|
||||
<logger name="org.apache.catalina.webresources.Cache" level="ERROR" />
|
||||
<logger name="org.springframework.boot.context.embedded" level="INFO" />
|
||||
<logger name="org.springframework.boot.autoconfigure.logging.AutoConfigurationReportLoggingInitializer" level="INFO" />
|
||||
<logger name="com.atomikos.icatch.config.UserTransactionServiceImp" level="ERROR" />
|
||||
<logger name="com.atomikos.jdbc.AbstractDataSourceBean" level="ERROR" />
|
||||
|
||||
<logger name="springfox.documentation.spring.web.readers.parameter.ParameterDataTypeReader" level="ERROR" />
|
||||
<!-- <logger name="io.swagger" level="DEBUG" /> -->
|
||||
<!-- <logger name="springfox" level="DEBUG" /> -->
|
||||
|
||||
<logger name="com.jeesite" level="DEBUG" />
|
||||
<logger name="com.jeesite.common.i18n" level="INFO" />
|
||||
<logger name="com.jeesite.common.shiro" level="INFO" />
|
||||
<logger name="com.jeesite.common.mybatis" level="INFO" />
|
||||
<logger name="com.jeesite.common.mybatis.mapper" level="DEBUG" />
|
||||
<logger name="com.jeesite.common.reflect.ReflectUtils" level="INFO" />
|
||||
<logger name="com.jeesite.common.io.FileUtils" level="INFO" />
|
||||
<logger name="com.jeesite.common.cache.JedisUtils" level="INFO" />
|
||||
<logger name="com.jeesite.common.web.view.JstlView" level="INFO" />
|
||||
<logger name="com.jeesite.modules.job.service.JobService" level="INFO" />
|
||||
|
||||
</included>
|
||||
@@ -0,0 +1,7 @@
|
||||
|
||||
-- 代码生成添加数据源字段
|
||||
ALTER TABLE ${_prefix}gen_table ADD data_source_name varchar(64) NULL;
|
||||
|
||||
-- 新增在线文档Swagger菜单
|
||||
INSERT INTO ${_prefix}sys_menu (menu_code, parent_code, parent_codes, tree_sort, tree_sorts, tree_leaf, tree_level, tree_names, menu_name, menu_type, menu_href, menu_target, menu_icon, menu_color, permission, weight, is_show, sys_code, module_codes, status, create_by, create_date, update_by, update_date, remarks)
|
||||
VALUES ('1044942498470014976', '0', '0,', '9040', '0000009040,', '1', 0, '在线文档', '在线文档', '1', '//swagger-ui.html', '', 'icon-book-open', '', 'sys:swagger', 80, '0', 'default', 'core', '0', 'system', getdate(), 'system', getdate(), '');
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
-- 代码生成添加数据源字段
|
||||
ALTER TABLE ${_prefix}gen_table
|
||||
ADD COLUMN `data_source_name` varchar(64) NULL COMMENT '数据源名称' AFTER `tpl_category`;
|
||||
|
||||
-- 新增在线文档Swagger菜单
|
||||
INSERT INTO ${_prefix}sys_menu (menu_code, parent_code, parent_codes, tree_sort, tree_sorts, tree_leaf, tree_level, tree_names, menu_name, menu_type, menu_href, menu_target, menu_icon, menu_color, permission, weight, is_show, sys_code, module_codes, status, create_by, create_date, update_by, update_date, remarks)
|
||||
VALUES ('1044942498470014976', '0', '0,', '9040', '0000009040,', '1', 0, '在线文档', '在线文档', '1', '//swagger-ui.html', '', 'icon-book-open', '', 'sys:swagger', 80, '0', 'default', 'core', '0', 'system', now(), 'system', now(), '');
|
||||
|
||||
commit;
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
-- 代码生成添加数据源字段
|
||||
ALTER TABLE ${_prefix}gen_table ADD data_source_name varchar(64) NULL;
|
||||
COMMENT ON COLUMN ${_prefix}gen_table.data_source_name IS '数据源名称';
|
||||
|
||||
-- 新增在线文档Swagger菜单
|
||||
INSERT INTO ${_prefix}sys_menu (menu_code, parent_code, parent_codes, tree_sort, tree_sorts, tree_leaf, tree_level, tree_names, menu_name, menu_type, menu_href, menu_target, menu_icon, menu_color, permission, weight, is_show, sys_code, module_codes, status, create_by, create_date, update_by, update_date, remarks)
|
||||
VALUES ('1044942498470014976', '0', '0,', '9040', '0000009040,', '1', 0, '在线文档', '在线文档', '1', '//swagger-ui.html', '', 'icon-book-open', '', 'sys:swagger', 80, '0', 'default', 'core', '0', 'system', sysdate, 'system', sysdate, '');
|
||||
|
||||
commit;
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
-- 日志表新增执行时间字段
|
||||
ALTER TABLE ${_prefix}gen_table ADD COLUMN data_source_name varchar(64);
|
||||
COMMENT ON COLUMN ${_prefix}gen_table.data_source_name IS '数据源名称';
|
||||
|
||||
-- 新增在线文档Swagger菜单
|
||||
INSERT INTO ${_prefix}sys_menu (menu_code, parent_code, parent_codes, tree_sort, tree_sorts, tree_leaf, tree_level, tree_names, menu_name, menu_type, menu_href, menu_target, menu_icon, menu_color, permission, weight, is_show, sys_code, module_codes, status, create_by, create_date, update_by, update_date, remarks)
|
||||
VALUES ('1044942498470014976', '0', '0,', '9040', '0000009040,', '1', 0, '在线文档', '在线文档', '1', '//swagger-ui.html', '', 'icon-book-open', '', 'sys:swagger', 80, '0', 'default', 'core', '0', 'system', now(), 'system', now(), '');
|
||||
|
||||
commit;
|
||||
@@ -6,4 +6,4 @@
|
||||
4.0.5
|
||||
4.0.6
|
||||
4.0.7
|
||||
4.0.8
|
||||
4.1.0
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
115
modules/core/src/main/resources/templates/modules/gen/config.xml
Normal file
115
modules/core/src/main/resources/templates/modules/gen/config.xml
Normal file
@@ -0,0 +1,115 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<config>
|
||||
<!-- 模板分类 -->
|
||||
<tplCategory>
|
||||
<category value="crud" label="单表/主子表 (增删改查)">
|
||||
<template>category-ref:dao</template>
|
||||
<template>crud/service.xml</template>
|
||||
<template>crud/controller.xml</template>
|
||||
<template>crud/viewList.xml</template>
|
||||
<template>crud/viewForm.xml</template>
|
||||
<childTable>
|
||||
<template>category-ref:dao</template>
|
||||
</childTable>
|
||||
</category>
|
||||
<category value="treeGrid" label="树表/树结构表(增删改查)">
|
||||
<template>category-ref:crud</template>
|
||||
</category>
|
||||
<category value="service" label="业务层和持久层(增删改查)">
|
||||
<template>category-ref:dao</template>
|
||||
<template>crud/service.xml</template>
|
||||
</category>
|
||||
<category value="dao" label="仅持久层(dao/mapper/entity)">
|
||||
<template>crud/dao.xml</template>
|
||||
<template>crud/mapper.xml</template>
|
||||
<template>crud/entity.xml</template>
|
||||
</category>
|
||||
<!-- <category value="tableForm" label="单表 - 表格表单(增删改查)"> -->
|
||||
<!-- <template>category-ref:dao</template> -->
|
||||
<!-- <template>crud/service.xml</template> -->
|
||||
<!-- <template>crud/controller.xml</template> -->
|
||||
<!-- <template>crud/viewList.xml</template> -->
|
||||
<!-- <template>crud/viewTableForm.xml</template> -->
|
||||
<!-- </category> -->
|
||||
<!-- <category value="treeTableAndList" name="树结构表(左树右表)"> -->
|
||||
<!-- <template>category-ref:dao</template> -->
|
||||
<!-- </category> -->
|
||||
<!-- <category value="query" label="仅查询功能"> -->
|
||||
<!-- <template>query/entity.xml</template> -->
|
||||
<!-- <template>query/mapper.xml</template> -->
|
||||
<!-- <template>query/dao.xml</template> -->
|
||||
<!-- <template>query/service.xml</template> -->
|
||||
<!-- <template>query/controller.xml</template> -->
|
||||
<!-- <template>query/viewList.xml</template> -->
|
||||
<!-- <template>query/viewView.xml</template> -->
|
||||
<!-- </category> -->
|
||||
</tplCategory>
|
||||
<!-- 属性类型 -->
|
||||
<attrType>
|
||||
<dict value="String" label="String"/>
|
||||
<dict value="Long" label="Long"/>
|
||||
<dict value="Integer" label="Integer"/>
|
||||
<dict value="Double" label="Double"/>
|
||||
<dict value="java.util.Date" label="Date"/>
|
||||
<dict value="com.jeesite.modules.sys.entity.User" label="User"/>
|
||||
<dict value="com.jeesite.modules.sys.entity.Office" label="Office"/>
|
||||
<dict value="This" label="This" description="生成当前对象"/>
|
||||
</attrType>
|
||||
<!-- 查询类型 -->
|
||||
<queryType>
|
||||
<dict value="EQ" label="="/>
|
||||
<dict value="NE" label="!="/>
|
||||
<dict value="GT" label=">"/>
|
||||
<dict value="GTE" label=">="/>
|
||||
<dict value="LT" label="<"/>
|
||||
<dict value="LTE" label="<="/>
|
||||
<dict value="BETWEEN" label="Between"/>
|
||||
<dict value="LIKE" label="Like"/>
|
||||
<dict value="LEFT_LIKE" label="左 Like"/>
|
||||
<dict value="RIGHT_LIKE" label="右 Like"/>
|
||||
</queryType>
|
||||
<!-- 字段显示类型 -->
|
||||
<showType>
|
||||
<dict value="input" label="单行文本框"/>
|
||||
<dict value="textarea" label="多行文本框"/>
|
||||
<dict value="hidden" label="隐藏域字段"/>
|
||||
<dict value="select" label="单选下拉框"/>
|
||||
<dict value="select_multiple" label="多选下拉框"/>
|
||||
<dict value="radio" label="单选按钮"/>
|
||||
<dict value="checkbox" label="复选框"/>
|
||||
<dict value="date" label="日期选择"/>
|
||||
<dict value="datetime" label="日期时间"/>
|
||||
<dict value="userselect" label="人员选择"/>
|
||||
<dict value="officeselect" label="机构选择"/>
|
||||
<dict value="areaselect" label="区域选择"/>
|
||||
</showType>
|
||||
<!-- 字段验证 -->
|
||||
<fieldValid>
|
||||
<dict value="email" label="电子邮件"/>
|
||||
<dict value="url" label="网址"/>
|
||||
<dict value="date" label="日期"/>
|
||||
<dict value="number" label="数值"/>
|
||||
<dict value="integer" label="整数"/>
|
||||
<dict value="digits" label="正整数"/>
|
||||
<dict value="userName" label="登录账号"/>
|
||||
<dict value="realName" label="真实姓名"/>
|
||||
<dict value="abc" label="字母数字下划线"/>
|
||||
<dict value="mobile" label="手机号"/>
|
||||
<dict value="simplePhone" label="固定电话"/>
|
||||
<dict value="phone" label="手机或电话"/>
|
||||
<dict value="zipCode" label="邮政编码"/>
|
||||
<dict value="ipv4" label="IPv4"/>
|
||||
<dict value="ipv6" label="IPv6"/>
|
||||
<dict value="qq" label="QQ"/>
|
||||
<dict value="idcard" label="身份证"/>
|
||||
</fieldValid>
|
||||
<!-- 栅格布局 -->
|
||||
<gridRowCol>
|
||||
<dict value="6/4/8" label="6/4/8 两列"/>
|
||||
<dict value="12/2/10" label="12/2/10 一列"/>
|
||||
<dict value="12/2/8" label="12/2/8 小一列"/>
|
||||
<dict value="12/2/5" label="12/2/5 中一列"/>
|
||||
<dict value="4/4/8" label="4/4/8 三列"/>
|
||||
<dict value="3/4/8" label="3/4/8 四列"/>
|
||||
</gridRowCol>
|
||||
</config>
|
||||
@@ -0,0 +1,269 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<template>
|
||||
<name>controller</name>
|
||||
<filePath>src/main/java/${packageName}/${moduleName}/web/${subModuleName}</filePath>
|
||||
<fileName>${ClassName}Controller.java</fileName>
|
||||
<content><![CDATA[
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
*/
|
||||
package ${packageName}.${moduleName}.web${isNotEmpty(subModuleName)?'.'+subModuleName:''};
|
||||
<% if(table.isTreeEntity){ %>
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
<% }else{ %>
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
<% } %>
|
||||
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.jeesite.common.config.Global;
|
||||
<% if(table.isTreeEntity){ %>
|
||||
import com.jeesite.common.collect.ListUtils;
|
||||
import com.jeesite.common.collect.MapUtils;
|
||||
import com.jeesite.common.lang.StringUtils;
|
||||
import com.jeesite.common.idgen.IdGen;
|
||||
import com.jeesite.modules.sys.utils.UserUtils;
|
||||
<% }else{ %>
|
||||
import com.jeesite.common.entity.Page;
|
||||
<% } %>
|
||||
import com.jeesite.common.web.BaseController;
|
||||
import ${packageName}.${moduleName}.entity${isNotEmpty(subModuleName)?'.'+subModuleName:''}.${ClassName};
|
||||
import ${packageName}.${moduleName}.service${isNotEmpty(subModuleName)?'.'+subModuleName:''}.${ClassName}Service;
|
||||
|
||||
/**
|
||||
* ${functionName}Controller
|
||||
* @author ${functionAuthor}
|
||||
* @version ${functionVersion}
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping(value = "\${adminPath}/${urlPrefix}")
|
||||
public class ${ClassName}Controller extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private ${ClassName}Service ${className}Service;
|
||||
|
||||
/**
|
||||
* 获取数据
|
||||
*/
|
||||
@ModelAttribute
|
||||
public ${ClassName} get(<% for(pk in table.pkList){ %>${pkLP.index!=1?', ':''}${pk.simpleAttrType} ${pk.simpleAttrName}<% } %>, boolean isNewRecord) {
|
||||
<% if (table.pkList.~size == 1){ %>
|
||||
return ${className}Service.get(<% for(pk in table.pkList){ %>${pkLP.index!=1?', ':''}${pk.simpleAttrName}<% } %>, isNewRecord);
|
||||
<% }else{ %>
|
||||
return ${className}Service.get(new Class<?>[]{<% for(pk in table.pkList){ %>${pkLP.index!=1?', ':''}${pk.simpleAttrType}.class<% } %>},
|
||||
new Object[]{<% for(pk in table.pkList){ %>${pkLP.index!=1?', ':''}${pk.simpleAttrName}<% } %>}, isNewRecord);
|
||||
<% } %>
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
@RequiresPermissions("${permissionPrefix}:view")
|
||||
@RequestMapping(value = {"list", ""})
|
||||
public String list(${ClassName} ${className}, Model model) {
|
||||
model.addAttribute("${className}", ${className});
|
||||
return "${lastPackageName}/${viewPrefix}List";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询列表数据
|
||||
*/
|
||||
@RequiresPermissions("${permissionPrefix}:view")
|
||||
@RequestMapping(value = "listData")
|
||||
@ResponseBody
|
||||
<% if(table.isTreeEntity){ %>
|
||||
public List<${ClassName}> listData(${ClassName} ${className}) {
|
||||
if (StringUtils.isBlank(${className}.getParentCode())) {
|
||||
${className}.setParentCode(${ClassName}.ROOT_CODE);
|
||||
}
|
||||
<% for(c in table.columnList){ %>
|
||||
<% if(c.isQuery == "1" && !c.isTreeEntityColumn){ %>
|
||||
if (StringUtils.isNotBlank(${className}.${c.attrNameForGetMethod})){
|
||||
${className}.setParentCode(null);
|
||||
}
|
||||
<% } %>
|
||||
<% } %>
|
||||
List<${ClassName}> list = ${className}Service.findList(${className});
|
||||
return list;
|
||||
}
|
||||
<% }else{ %>
|
||||
public Page<${ClassName}> listData(${ClassName} ${className}, HttpServletRequest request, HttpServletResponse response) {
|
||||
${className}.setPage(new Page<>(request, response));
|
||||
Page<${ClassName}> page = ${className}Service.findPage(${className});
|
||||
return page;
|
||||
}
|
||||
<% } %>
|
||||
|
||||
/**
|
||||
* 查看编辑表单
|
||||
*/
|
||||
@RequiresPermissions("${permissionPrefix}:view")
|
||||
@RequestMapping(value = "form")
|
||||
public String form(${ClassName} ${className}, Model model) {
|
||||
<% if(table.isTreeEntity){ %>
|
||||
// 创建并初始化下一个节点信息
|
||||
${className} = createNextNode(${className});
|
||||
<% } %>
|
||||
model.addAttribute("${className}", ${className});
|
||||
return "${lastPackageName}/${viewPrefix}Form";
|
||||
}
|
||||
<% if(table.isTreeEntity){ %>
|
||||
|
||||
/**
|
||||
* 创建并初始化下一个节点信息,如:排序号、默认值
|
||||
*/
|
||||
@RequiresPermissions("${permissionPrefix}:edit")
|
||||
@RequestMapping(value = "createNextNode")
|
||||
@ResponseBody
|
||||
public ${ClassName} createNextNode(${ClassName} ${className}) {
|
||||
if (StringUtils.isNotBlank(${className}.getParentCode())){
|
||||
${className}.setParent(${className}Service.get(${className}.getParentCode()));
|
||||
}
|
||||
if (${className}.getIsNewRecord()) {
|
||||
${ClassName} where = new ${ClassName}();
|
||||
where.setParentCode(${className}.getParentCode());
|
||||
${ClassName} last = ${className}Service.getLastByParentCode(where);
|
||||
// 获取到下级最后一个节点
|
||||
if (last != null){
|
||||
${className}.setTreeSort(last.getTreeSort() + 30);
|
||||
<% if(table.isPkCustom){ %>
|
||||
${className}.set${@StringUtils.cap(table.treeViewCodeAttrName)}(IdGen.nextCode(last.get${@StringUtils.cap(table.treeViewCodeAttrName)}()));
|
||||
}else if (${className}.getParent() != null){
|
||||
${className}.set${@StringUtils.cap(table.treeViewCodeAttrName)}(${className}.getParent().get${@StringUtils.cap(table.treeViewCodeAttrName)}() + "001");
|
||||
<% } %>
|
||||
}
|
||||
}
|
||||
// 以下设置表单默认数据
|
||||
if (${className}.getTreeSort() == null){
|
||||
${className}.setTreeSort(${ClassName}.DEFAULT_TREE_SORT);
|
||||
}
|
||||
return ${className};
|
||||
}
|
||||
<% } %>
|
||||
|
||||
/**
|
||||
* 保存${functionNameSimple}
|
||||
*/
|
||||
@RequiresPermissions("${permissionPrefix}:edit")
|
||||
@PostMapping(value = "save")
|
||||
@ResponseBody
|
||||
public String save(@Validated ${ClassName} ${className}) {
|
||||
${className}Service.save(${className});
|
||||
return renderResult(Global.TRUE, text("保存${functionNameSimple}成功!"));
|
||||
}
|
||||
<% if(@ObjectUtils.toBoolean(table.optionMap['isHaveDisableEnable'])){ %>
|
||||
|
||||
/**
|
||||
* 停用${functionNameSimple}
|
||||
*/
|
||||
@RequiresPermissions("${permissionPrefix}:edit")
|
||||
@RequestMapping(value = "disable")
|
||||
@ResponseBody
|
||||
public String disable(${ClassName} ${className}) {
|
||||
<% if(table.isTreeEntity){ %>
|
||||
${ClassName} where = new ${ClassName}();
|
||||
where.setStatus(${ClassName}.STATUS_NORMAL);
|
||||
where.setParentCodes("," + ${className}.getId() + ",");
|
||||
long count = ${className}Service.findCount(where);
|
||||
if (count > 0) {
|
||||
return renderResult(Global.FALSE, text("该${functionNameSimple}包含未停用的子${functionNameSimple}!"));
|
||||
}
|
||||
<% } %>
|
||||
${className}.setStatus(${ClassName}.STATUS_DISABLE);
|
||||
${className}Service.updateStatus(${className});
|
||||
return renderResult(Global.TRUE, text("停用${functionNameSimple}成功"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 启用${functionNameSimple}
|
||||
*/
|
||||
@RequiresPermissions("${permissionPrefix}:edit")
|
||||
@RequestMapping(value = "enable")
|
||||
@ResponseBody
|
||||
public String enable(${ClassName} ${className}) {
|
||||
${className}.setStatus(${ClassName}.STATUS_NORMAL);
|
||||
${className}Service.updateStatus(${className});
|
||||
return renderResult(Global.TRUE, text("启用${functionNameSimple}成功"));
|
||||
}
|
||||
<% } %>
|
||||
<% if(@ObjectUtils.toBoolean(table.optionMap['isHaveDelete'])){ %>
|
||||
|
||||
/**
|
||||
* 删除${functionNameSimple}
|
||||
*/
|
||||
@RequiresPermissions("${permissionPrefix}:edit")
|
||||
@RequestMapping(value = "delete")
|
||||
@ResponseBody
|
||||
public String delete(${ClassName} ${className}) {
|
||||
${className}Service.delete(${className});
|
||||
return renderResult(Global.TRUE, text("删除${functionNameSimple}成功!"));
|
||||
}
|
||||
<% } %>
|
||||
<% if(table.isTreeEntity){ %>
|
||||
|
||||
/**
|
||||
* 获取树结构数据
|
||||
* @param excludeCode 排除的Code
|
||||
* @param isShowCode 是否显示编码(true or 1:显示在左侧;2:显示在右侧;false or null:不显示)
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("${permissionPrefix}:view")
|
||||
@RequestMapping(value = "treeData")
|
||||
@ResponseBody
|
||||
public List<Map<String, Object>> treeData(String excludeCode, String isShowCode) {
|
||||
List<Map<String, Object>> mapList = ListUtils.newArrayList();
|
||||
List<${ClassName}> list = ${className}Service.findList(new ${ClassName}());
|
||||
for (int i=0; i<list.size(); i++){
|
||||
${ClassName} e = list.get(i);
|
||||
// 过滤非正常的数据
|
||||
if (!${ClassName}.STATUS_NORMAL.equals(e.getStatus())){
|
||||
continue;
|
||||
}
|
||||
// 过滤被排除的编码(包括所有子级)
|
||||
if (StringUtils.isNotBlank(excludeCode)){
|
||||
if (e.getId().equals(excludeCode)){
|
||||
continue;
|
||||
}
|
||||
if (e.getParentCodes().contains("," + excludeCode + ",")){
|
||||
continue;
|
||||
}
|
||||
}
|
||||
Map<String, Object> map = MapUtils.newHashMap();
|
||||
map.put("id", e.getId());
|
||||
map.put("pId", e.getParentCode());
|
||||
map.put("name", StringUtils.getTreeNodeName(isShowCode, e.get${@StringUtils.cap(table.treeViewCodeAttrName)}(), e.get${@StringUtils.cap(table.treeViewNameAttrName)}()));
|
||||
mapList.add(map);
|
||||
}
|
||||
return mapList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修复表结构相关数据
|
||||
*/
|
||||
@RequiresPermissions("${permissionPrefix}:edit")
|
||||
@RequestMapping(value = "fixTreeData")
|
||||
@ResponseBody
|
||||
public String fixTreeData(${ClassName} ${className}){
|
||||
if (!UserUtils.getUser().isAdmin()){
|
||||
return renderResult(Global.FALSE, "操作失败,只有管理员才能进行修复!");
|
||||
}
|
||||
${className}Service.fixTreeData();
|
||||
return renderResult(Global.TRUE, "数据修复成功");
|
||||
}
|
||||
<% } %>
|
||||
|
||||
}]]>
|
||||
</content>
|
||||
</template>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<template>
|
||||
<name>dao</name>
|
||||
<filePath>src/main/java/${packageName}/${moduleName}/dao/${subModuleName}</filePath>
|
||||
<fileName>${ClassName}Dao.java</fileName>
|
||||
<content><![CDATA[
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
*/
|
||||
package ${packageName}.${moduleName}.dao${isNotEmpty(subModuleName)?'.'+subModuleName:''};
|
||||
|
||||
import com.jeesite.common.dao.${table.isTreeEntity?'Tree':'Crud'}Dao;
|
||||
import com.jeesite.common.mybatis.annotation.MyBatisDao;
|
||||
import ${packageName}.${moduleName}.entity${isNotEmpty(subModuleName)?'.'+subModuleName:''}.${ClassName};
|
||||
|
||||
/**
|
||||
* ${functionName}DAO接口
|
||||
* @author ${functionAuthor}
|
||||
* @version ${functionVersion}
|
||||
*/
|
||||
@MyBatisDao<% if(table.dataSourceName != ''){ %>(dataSourceName="${table.dataSourceName}")<% } %>
|
||||
public interface ${ClassName}Dao extends ${table.isTreeEntity?'Tree':'Crud'}Dao<${ClassName}> {
|
||||
|
||||
}]]>
|
||||
</content>
|
||||
</template>
|
||||
@@ -0,0 +1,343 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<template>
|
||||
<name>entity</name>
|
||||
<filePath>src/main/java/${packageName}/${moduleName}/entity/${subModuleName}</filePath>
|
||||
<fileName>${ClassName}.java</fileName>
|
||||
<content><![CDATA[
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
*/
|
||||
package ${packageName}.${moduleName}.entity${isNotBlank(subModuleName)?'.'+subModuleName:''};
|
||||
|
||||
<% for(i in table.importList){ %>
|
||||
import ${i};
|
||||
<% } %>
|
||||
|
||||
import com.jeesite.common.entity.DataEntity;
|
||||
<% if(table.isTreeEntity){ %>
|
||||
import com.jeesite.common.entity.TreeEntity;
|
||||
<% } %>
|
||||
import com.jeesite.common.mybatis.annotation.Column;
|
||||
import com.jeesite.common.mybatis.annotation.Table;
|
||||
import com.jeesite.common.mybatis.mapper.query.QueryType;
|
||||
|
||||
/**
|
||||
* ${functionName}Entity
|
||||
* @author ${functionAuthor}
|
||||
* @version ${functionVersion}
|
||||
*/
|
||||
@Table(name="${table.genTableName}", alias="a", columns={
|
||||
<%
|
||||
var isBase = false, isData = false,
|
||||
isTree = false, isExtend = false;
|
||||
// 生成字段属性
|
||||
for(c in table.columnList){
|
||||
// 如果是BaseEntity类属性
|
||||
if(c.isBaseEntityColumn){
|
||||
if(!isBase){
|
||||
isBase = true;
|
||||
%>
|
||||
@Column(includeEntity=BaseEntity.class),
|
||||
<%
|
||||
}
|
||||
// 如果是DataEntity类属性
|
||||
}else if(c.isDataEntityColumn){
|
||||
if(!isData){
|
||||
isData = true;
|
||||
%>
|
||||
@Column(includeEntity=DataEntity.class),
|
||||
<%
|
||||
}
|
||||
// 如果是TreeEntity类属性
|
||||
}else if(c.isTreeEntityColumn){
|
||||
if(!isTree){
|
||||
isTree = true;
|
||||
%>
|
||||
@Column(includeEntity=TreeEntity.class),
|
||||
<%
|
||||
}
|
||||
// 如果是Extend类属性
|
||||
}else if(c.isExtendColumn){
|
||||
if(!isExtend){
|
||||
isExtend = true;
|
||||
%>
|
||||
@Column(includeEntity=Extend.class, attrName="extend"),
|
||||
<%
|
||||
}
|
||||
// 其它情况下
|
||||
}else{
|
||||
// 容错,如果没有设置父表的主键属性,则设置
|
||||
if(!@StringUtils.contains(c.attrName, ".")){
|
||||
if (table.parentExists && table.parentTableFkName == c.columnName){
|
||||
for (pk in table.parent.pkList){
|
||||
c.fullAttrName = c.fullAttrName + '.' + pk.attrName;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
%>
|
||||
@Column(name="${c.columnName}", attrName="${c.attrName}", label="${c.columnLabel}"<%
|
||||
if (c.comments != c.columnLabel){
|
||||
print(', comment="'+c.comments+'"');
|
||||
}
|
||||
if (c.isPk == @Global.YES){
|
||||
print(', isPK=true');
|
||||
}else{
|
||||
if (c.isInsert == @Global.NO){
|
||||
print(', isInsert=false');
|
||||
}
|
||||
if (c.isUpdate == @Global.NO){
|
||||
print(', isUpdate=false');
|
||||
}
|
||||
if (c.isQuery == @Global.YES && @StringUtils.inString(c.queryType,
|
||||
'NE', 'GT', 'GTE', 'LT', 'LTE', 'LIKE', 'LEFT_LIKE', 'RIGHT_LIKE')){
|
||||
print(', queryType=QueryType.'+c.queryType);
|
||||
}
|
||||
if (c.isQuery == @Global.NO){
|
||||
print(', isQuery=false');
|
||||
}
|
||||
if (c.attrName == table.treeViewNameAttrName){
|
||||
print(', isTreeName=true');
|
||||
}
|
||||
}
|
||||
%>),
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
}, <%
|
||||
// 关联系统表
|
||||
var joinTables = '';
|
||||
for(c in table.columnList){
|
||||
if (c.attrType == 'com.jeesite.modules.sys.entity.User'){
|
||||
var joinTable = {
|
||||
%>
|
||||
@JoinTable(type=Type.LEFT_JOIN, entity=User.class, attrName="${c.simpleAttrName}", alias="u${cLP.index}",
|
||||
on="u${cLP.index}.user_code = a.${c.columnName}", columns={
|
||||
@Column(name="user_code", label="用户编码", isPK=true),
|
||||
@Column(name="user_name", label="用户名称", isQuery=false),
|
||||
}),
|
||||
<%
|
||||
};
|
||||
joinTables = joinTables + joinTable;
|
||||
}
|
||||
else if (c.attrType == 'com.jeesite.modules.sys.entity.Office'){
|
||||
var joinTable = {
|
||||
%>
|
||||
@JoinTable(type=Type.LEFT_JOIN, entity=Office.class, attrName="${c.simpleAttrName}", alias="u${cLP.index}",
|
||||
on="u${cLP.index}.office_code = a.${c.columnName}", columns={
|
||||
@Column(name="office_code", label="机构编码", isPK=true),
|
||||
@Column(name="office_name", label="机构名称", isQuery=false),
|
||||
}),
|
||||
<%
|
||||
};
|
||||
joinTables = joinTables + joinTable;
|
||||
}
|
||||
}
|
||||
if (isNotBlank(joinTables)){
|
||||
print('joinTable={\n');
|
||||
print(joinTables);
|
||||
print('\t}, ');
|
||||
}
|
||||
%>orderBy="<% if (isTree){
|
||||
%>a.tree_sorts<%
|
||||
for(pk in table.pkList){
|
||||
%>, a.${pk.columnName}<%
|
||||
}
|
||||
}else if(table.parentExists && table.createDateExists){
|
||||
%>a.create_date ASC<%
|
||||
}else if(table.updateDateExists){
|
||||
%>a.update_date DESC<%
|
||||
}else{
|
||||
for(pk in table.pkList){
|
||||
%>${pkLP.index!=1?', ':''}a.${pk.columnName} ${table.parentExists?'ASC':'DESC'}<%
|
||||
}
|
||||
} %>"
|
||||
)
|
||||
public class ${ClassName} extends ${table.isTreeEntity?'Tree':'Data'}Entity<${ClassName}> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
<%
|
||||
isExtend = false;
|
||||
// 生成字段属性
|
||||
for(c in table.columnList){
|
||||
// 如果是Extend类属性
|
||||
if(c.isExtendColumn){
|
||||
if(!isExtend){
|
||||
isExtend = true;
|
||||
%>
|
||||
private Extend extend; // 扩展字段
|
||||
<%
|
||||
}
|
||||
}
|
||||
// 如果不是基类属性
|
||||
else if(c.columnName != 'id' && !c.isSuperColumn){
|
||||
// 父类对象
|
||||
if(table.parentExists && table.parentTableFkName == c.columnName){
|
||||
%>
|
||||
private ${@StringUtils.cap(table.parent.className)} ${c.simpleAttrName}; <% if (isNotBlank(c.comments)){ %>// ${c.comments} 父类<% } %>
|
||||
<%
|
||||
// 其它字段
|
||||
}else{
|
||||
%>
|
||||
private ${c.simpleAttrType} ${c.simpleAttrName}; <%if(isNotBlank(c.comments)){%>// ${c.comments}<%}%>
|
||||
<%
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 生成子表列表字段
|
||||
for(child in table.childList){
|
||||
%>
|
||||
private List<${@StringUtils.cap(child.className)}> ${@StringUtils.uncap(child.className)}List = ListUtils.newArrayList(); // 子表列表
|
||||
<%
|
||||
}
|
||||
|
||||
// 生成构造方法
|
||||
%>
|
||||
|
||||
public ${ClassName}() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
<%
|
||||
// 生成带主键参数的构造
|
||||
if (!table.parentExists){
|
||||
if (table.pkList.~size == 1){ %>
|
||||
public ${ClassName}(String id){
|
||||
super(id);
|
||||
}
|
||||
<% }else{ %>
|
||||
public ${ClassName}(<% for(pk in table.pkList){ %>${pkLP.index!=1?', ':''}${pk.simpleAttrType} ${pk.simpleAttrName}<% } %>){
|
||||
<% for(pk in table.pkList){ %>
|
||||
this.${pk.simpleAttrName} = ${pk.simpleAttrName};
|
||||
<% } %>
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
|
||||
// 生成父表参数的构造
|
||||
else{
|
||||
for(c in table.columnList){
|
||||
if(table.parentExists && table.parentTableFkName == c.columnName){
|
||||
%>
|
||||
|
||||
public ${ClassName}(${@StringUtils.cap(table.parent.className)} ${c.simpleAttrName}){
|
||||
this.${c.simpleAttrName} = ${c.simpleAttrName};
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 如果是树实体,则输出相应方法
|
||||
if (table.isTreeEntity){
|
||||
%>
|
||||
|
||||
@Override
|
||||
public ${ClassName} getParent() {
|
||||
return parent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setParent(${ClassName} parent) {
|
||||
this.parent = parent;
|
||||
}
|
||||
<%
|
||||
}
|
||||
|
||||
// 生成属性的get和set方法
|
||||
isExtend = false;
|
||||
for(c in table.columnList){
|
||||
// 如果是Extend类属性
|
||||
if(c.isExtendColumn){
|
||||
if(!isExtend){
|
||||
isExtend = true;
|
||||
%>
|
||||
|
||||
public Extend getExtend() {
|
||||
return extend;
|
||||
}
|
||||
|
||||
public void setExtend(Extend extend) {
|
||||
this.extend = extend;
|
||||
}
|
||||
<%
|
||||
}
|
||||
// 如果不是基类属性
|
||||
}else if(c.columnName != 'id' && !c.isSuperColumn){
|
||||
%>
|
||||
|
||||
<%
|
||||
for(a in c.simpleAnnotationList){
|
||||
%>
|
||||
@${a}
|
||||
<%
|
||||
}
|
||||
// 父类对象
|
||||
if(table.parentExists && table.parentTableFkName == c.columnName){
|
||||
%>
|
||||
public ${@StringUtils.cap(table.parent.className)} get${@StringUtils.cap(c.simpleAttrName)}() {
|
||||
return ${c.simpleAttrName};
|
||||
}
|
||||
|
||||
public void set${@StringUtils.cap(c.simpleAttrName)}(${@StringUtils.cap(table.parent.className)} ${c.simpleAttrName}) {
|
||||
this.${c.simpleAttrName} = ${c.simpleAttrName};
|
||||
}
|
||||
<%
|
||||
// 其它字段
|
||||
}else{
|
||||
%>
|
||||
public ${c.simpleAttrType} get${@StringUtils.cap(c.simpleAttrName)}() {
|
||||
return ${c.simpleAttrName};
|
||||
}
|
||||
|
||||
public void set${@StringUtils.cap(c.simpleAttrName)}(${c.simpleAttrType} ${c.simpleAttrName}) {
|
||||
this.${c.simpleAttrName} = ${c.simpleAttrName};
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 生成条件字段get和set方法(范围类型)
|
||||
for(c in table.columnList){
|
||||
if(c.isQuery == "1" && c.queryType == "BETWEEN"){
|
||||
%>
|
||||
|
||||
public ${c.simpleAttrType} get${@StringUtils.cap(c.simpleAttrName)}_gte() {
|
||||
return sqlMap.getWhere().getValue("${c.columnName}", QueryType.GTE);
|
||||
}
|
||||
|
||||
public void set${@StringUtils.cap(c.simpleAttrName)}_gte(${c.simpleAttrType} ${c.simpleAttrName}) {
|
||||
sqlMap.getWhere().and("${c.columnName}", QueryType.GTE, ${c.simpleAttrName});
|
||||
}
|
||||
|
||||
public ${c.simpleAttrType} get${@StringUtils.cap(c.simpleAttrName)}_lte() {
|
||||
return sqlMap.getWhere().getValue("${c.columnName}", QueryType.LTE);
|
||||
}
|
||||
|
||||
public void set${@StringUtils.cap(c.simpleAttrName)}_lte(${c.simpleAttrType} ${c.simpleAttrName}) {
|
||||
sqlMap.getWhere().and("${c.columnName}", QueryType.LTE, ${c.simpleAttrName});
|
||||
}
|
||||
<%
|
||||
}
|
||||
}
|
||||
|
||||
// 生成子表列表get和set方法
|
||||
for(child in table.childList){
|
||||
%>
|
||||
|
||||
public List<${@StringUtils.cap(child.className)}> get${@StringUtils.cap(child.className)}List() {
|
||||
return ${@StringUtils.uncap(child.className)}List;
|
||||
}
|
||||
|
||||
public void set${@StringUtils.cap(child.className)}List(List<${@StringUtils.cap(child.className)}> ${@StringUtils.uncap(child.className)}List) {
|
||||
this.${@StringUtils.uncap(child.className)}List = ${@StringUtils.uncap(child.className)}List;
|
||||
}
|
||||
<% } %>
|
||||
|
||||
}]]>
|
||||
</content>
|
||||
</template>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<template>
|
||||
<name>mapper</name>
|
||||
<filePath>src/main/resources/mappings/${lastPackageName}/${moduleName}/${subModuleName}</filePath>
|
||||
<fileName>${ClassName}Dao.xml</fileName>
|
||||
<content><![CDATA[
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="${packageName}.${moduleName}.dao${isNotBlank(subModuleName)?'.'+subModuleName:''}.${ClassName}Dao">
|
||||
|
||||
<!-- 查询数据
|
||||
<select id="findList" resultType="${ClassName}">
|
||||
SELECT \${sqlMap.column.toSql()}
|
||||
FROM \${sqlMap.table.toSql()}
|
||||
<where>
|
||||
\${sqlMap.where.toSql()}
|
||||
</where>
|
||||
ORDER BY \${sqlMap.order.toSql()}
|
||||
</select> -->
|
||||
|
||||
</mapper>]]>
|
||||
</content>
|
||||
</template>
|
||||
@@ -0,0 +1,170 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<template>
|
||||
<name>service</name>
|
||||
<filePath>src/main/java/${packageName}/${moduleName}/service/${subModuleName}</filePath>
|
||||
<fileName>${ClassName}Service.java</fileName>
|
||||
<content><![CDATA[
|
||||
/**
|
||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||
*/
|
||||
package ${packageName}.${moduleName}.service${isNotEmpty(subModuleName)?'.'+subModuleName:''};
|
||||
|
||||
import java.util.List;
|
||||
|
||||
<% if (table.childList.~size > 0){ %>
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
<% } %>
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.jeesite.common.entity.Page;
|
||||
import com.jeesite.common.service.${table.isTreeEntity?'Tree':'Crud'}Service;
|
||||
import ${packageName}.${moduleName}.entity${isNotEmpty(subModuleName)?'.'+subModuleName:''}.${ClassName};
|
||||
import ${packageName}.${moduleName}.dao${isNotEmpty(subModuleName)?'.'+subModuleName:''}.${ClassName}Dao;
|
||||
<% if(@ObjectUtils.toBoolean(table.optionMap['isImageUpload']) || @ObjectUtils.toBoolean(table.optionMap['isFileUpload'])){ %>
|
||||
import com.jeesite.modules.file.utils.FileUploadUtils;
|
||||
<% } %>
|
||||
<% for (child in table.childList){ %>
|
||||
import ${packageName}.${moduleName}.entity${isNotEmpty(subModuleName)?'.'+subModuleName:''}.${@StringUtils.cap(child.className)};
|
||||
import ${packageName}.${moduleName}.dao${isNotEmpty(subModuleName)?'.'+subModuleName:''}.${@StringUtils.cap(child.className)}Dao;
|
||||
<% } %>
|
||||
|
||||
/**
|
||||
* ${functionName}Service
|
||||
* @author ${functionAuthor}
|
||||
* @version ${functionVersion}
|
||||
*/
|
||||
@Service
|
||||
@Transactional(readOnly=true)
|
||||
public class ${ClassName}Service extends ${table.isTreeEntity?'Tree':'Crud'}Service<${ClassName}Dao, ${ClassName}> {
|
||||
<% for (child in table.childList){ %>
|
||||
|
||||
@Autowired
|
||||
private ${@StringUtils.cap(child.className)}Dao ${@StringUtils.uncap(child.className)}Dao;
|
||||
<% } %>
|
||||
|
||||
/**
|
||||
* 获取单条数据
|
||||
* @param ${className}
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public ${ClassName} get(${ClassName} ${className}) {
|
||||
<% if (table.childList.~size > 0){ %>
|
||||
${ClassName} entity = super.get(${className});
|
||||
if (entity != null){
|
||||
<% for (child in table.childList){ %>
|
||||
${@StringUtils.cap(child.className)} ${@StringUtils.uncap(child.className)} = new ${@StringUtils.cap(child.className)}(entity);
|
||||
${@StringUtils.uncap(child.className)}.setStatus(${@StringUtils.cap(child.className)}.STATUS_NORMAL);
|
||||
entity.set${@StringUtils.cap(child.className)}List(${@StringUtils.uncap(child.className)}Dao.findList(${@StringUtils.uncap(child.className)}));
|
||||
<% } %>
|
||||
}
|
||||
return entity;
|
||||
<% }else{ %>
|
||||
return super.get(${className});
|
||||
<% } %>
|
||||
}
|
||||
<% if(!table.isTreeEntity){ %>
|
||||
|
||||
/**
|
||||
* 查询分页数据
|
||||
* @param ${className} 查询条件
|
||||
* @param ${className}.page 分页对象
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Page<${ClassName}> findPage(${ClassName} ${className}) {
|
||||
return super.findPage(${className});
|
||||
}
|
||||
<% }else{ %>
|
||||
|
||||
/**
|
||||
* 查询列表数据
|
||||
* @param ${className}
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<${ClassName}> findList(${ClassName} ${className}) {
|
||||
return super.findList(${className});
|
||||
}
|
||||
<% } %>
|
||||
|
||||
/**
|
||||
* 保存数据(插入或更新)
|
||||
* @param ${className}
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
public void save(${ClassName} ${className}) {
|
||||
super.save(${className});
|
||||
<% if(@ObjectUtils.toBoolean(table.optionMap['isImageUpload'])){ %>
|
||||
// 保存上传图片
|
||||
FileUploadUtils.saveFileUpload(${className}.getId(), "${className}_image");
|
||||
<% } %>
|
||||
<% if(@ObjectUtils.toBoolean(table.optionMap['isFileUpload'])){ %>
|
||||
// 保存上传附件
|
||||
FileUploadUtils.saveFileUpload(${className}.getId(), "${className}_file");
|
||||
<% } %>
|
||||
<% for (child in table.childList) { %>
|
||||
// 保存 ${ClassName}子表
|
||||
for (${@StringUtils.cap(child.className)} ${@StringUtils.uncap(child.className)} : ${className}.get${@StringUtils.cap(child.className)}List()){
|
||||
if (!${@StringUtils.cap(child.className)}.STATUS_DELETE.equals(${@StringUtils.uncap(child.className)}.getStatus())){
|
||||
<%
|
||||
for(c in child.columnList){
|
||||
if (child.parentExists && child.parentTableFkName == c.columnName){
|
||||
%>
|
||||
${@StringUtils.uncap(child.className)}.set${@StringUtils.cap(c.simpleAttrName)}(${className});
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
if (${@StringUtils.uncap(child.className)}.getIsNewRecord()){
|
||||
${@StringUtils.uncap(child.className)}.preInsert();
|
||||
${@StringUtils.uncap(child.className)}Dao.insert(${@StringUtils.uncap(child.className)});
|
||||
}else{
|
||||
${@StringUtils.uncap(child.className)}.preUpdate();
|
||||
${@StringUtils.uncap(child.className)}Dao.update(${@StringUtils.uncap(child.className)});
|
||||
}
|
||||
}else{
|
||||
${@StringUtils.uncap(child.className)}Dao.delete(${@StringUtils.uncap(child.className)});
|
||||
}
|
||||
}
|
||||
<% } %>
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新状态
|
||||
* @param ${className}
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
public void updateStatus(${ClassName} ${className}) {
|
||||
super.updateStatus(${className});
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
* @param ${className}
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
public void delete(${ClassName} ${className}) {
|
||||
super.delete(${className});
|
||||
<% for (child in table.childList) { %>
|
||||
${@StringUtils.cap(child.className)} ${@StringUtils.uncap(child.className)} = new ${@StringUtils.cap(child.className)}();
|
||||
<%
|
||||
for(c in child.columnList){
|
||||
if (child.parentExists && child.parentTableFkName == c.columnName){
|
||||
%>
|
||||
${@StringUtils.uncap(child.className)}.set${@StringUtils.cap(c.simpleAttrName)}(${className});
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
${@StringUtils.uncap(child.className)}Dao.delete(${@StringUtils.uncap(child.className)});
|
||||
<% } %>
|
||||
}
|
||||
|
||||
}]]>
|
||||
</content>
|
||||
</template>
|
||||
@@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<template>
|
||||
<name>viewForm</name>
|
||||
<filePath>src/main/resources/views/${lastPackageName}/${moduleName}/${subModuleName}</filePath>
|
||||
<fileName>${className}Form.html</fileName>
|
||||
<content><![CDATA[
|
||||
<%
|
||||
var extLibs = '';
|
||||
if(@ObjectUtils.toBoolean(table.optionMap['isImageUpload']) || @ObjectUtils.toBoolean(table.optionMap['isFileUpload'])){
|
||||
extLibs = extLibs + ',\'fileupload\'';
|
||||
}
|
||||
if(table.childList.~size > 0){
|
||||
extLibs = extLibs + ',\'dataGrid\'';
|
||||
}
|
||||
%>
|
||||
\<% layout('/layouts/default.html', {title: '${functionNameSimple}管理', libs: ['validate'${extLibs}]}){ %>
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
<div class="box-header with-border">
|
||||
<div class="box-title">
|
||||
<i class="fa fa-list-alt"></i> \${text(${className}.isNewRecord ? '新增${functionNameSimple}' : '编辑${functionNameSimple}')}
|
||||
</div>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<${'#'}form:form id="inputForm" model="\${${className}}" action="\${ctx}/${urlPrefix}/save" method="post" class="form-horizontal">
|
||||
<div class="box-body">
|
||||
<div class="form-unit">\${text('基本信息')}</div>
|
||||
<% if(table.isTreeEntity){ %>
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4">\${text('上级${functionNameSimple}')}:</label>
|
||||
<div class="col-sm-8">
|
||||
<${'#'}form:treeselect id="parent" title="\${text('上级${functionNameSimple}')}"
|
||||
path="parent.id" labelPath="parent.${table.treeViewNameAttrName}"
|
||||
url="\${ctx}/${urlPrefix}/treeData?excludeCode=\${${className}.id}"
|
||||
class="" allowClear="true" canSelectRoot="true" canSelectParent="true"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% } %>
|
||||
<% include('/templates/modules/gen/include/formControl.html'){} %>
|
||||
<% include('/templates/modules/gen/include/formChildTable.html'){} %>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<div class="row">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
\<% if (hasPermi('${permissionPrefix}:edit')){ %>
|
||||
<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> \${text('保 存')}</button>
|
||||
\<% } %>
|
||||
<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> \${text('关 闭')}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</${'#'}form:form>
|
||||
</div>
|
||||
</div>
|
||||
\<% } %>
|
||||
<% include('/templates/modules/gen/include/formChildTableScript.html'){} %>
|
||||
<script>
|
||||
$("#inputForm").validate({
|
||||
submitHandler: function(form){
|
||||
js.ajaxSubmitForm($(form), function(data){
|
||||
js.showMessage(data.message);
|
||||
if(data.result == Global.TRUE){
|
||||
js.closeCurrentTabPage(function(contentWindow){
|
||||
<% if(table.isTreeEntity){ %>
|
||||
contentWindow.$('#dataGrid').dataGrid('refreshTreeChildren',
|
||||
$('#parentCode').val(), '\${${className}.id}');
|
||||
<% }else{ %>
|
||||
contentWindow.page();
|
||||
<% } %>
|
||||
});
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
});
|
||||
<% if(table.isTreeEntity){ %>
|
||||
|
||||
// 选择父级菜单回调方法
|
||||
function treeselectCallback(id, act, index, layero){
|
||||
if (id == 'parent' && (act == 'ok' || act == 'clear')){
|
||||
// 创建并初始化下一个节点信息,如:排序号、默认值
|
||||
$.get('\${ctx}/${urlPrefix}/createNextNode?parentCode='
|
||||
+$('#parentCode').val(), function(data){
|
||||
$('#treeSort').val(data.treeSort);
|
||||
});
|
||||
}
|
||||
}
|
||||
<% } %>
|
||||
</script>]]>
|
||||
</content>
|
||||
</template>
|
||||
@@ -0,0 +1,145 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<template>
|
||||
<name>viewList</name>
|
||||
<filePath>src/main/resources/views/${lastPackageName}/${moduleName}/${subModuleName}</filePath>
|
||||
<fileName>${className}List.html</fileName>
|
||||
<content><![CDATA[
|
||||
\<% layout('/layouts/default.html', {title: '${functionNameSimple}管理', libs: ['dataGrid']}){ %>
|
||||
<div class="main-content">
|
||||
<div class="box box-main">
|
||||
<div class="box-header">
|
||||
<div class="box-title">
|
||||
<i class="fa fa-list-alt"></i> \${text('${functionNameSimple}管理')}
|
||||
</div>
|
||||
<div class="box-tools pull-right">
|
||||
<a href="#" class="btn btn-default" id="btnSearch" title="\${text('查询')}"><i class="fa fa-filter"></i> \${text('查询')}</a>
|
||||
<% if(table.isTreeEntity){ %>
|
||||
<a href="#" class="btn btn-default" id="btnRefreshTree" title="\${text('刷新')}"><i class="fa fa-refresh"></i> \${text('刷新')}</a>
|
||||
<a href="#" class="btn btn-default" id="btnExpandTreeNode" title="\${text('展开一级')}"><i class="fa fa-angle-double-down"></i> \${text('展开')}</a>
|
||||
<a href="#" class="btn btn-default" id="btnCollapseTreeNode" title="\${text('折叠全部')}"><i class="fa fa-angle-double-up"></i> \${text('折叠')}</a>
|
||||
<% } %>
|
||||
\<% if(hasPermi('${permissionPrefix}:edit')){ %>
|
||||
<a href="\${ctx}/${urlPrefix}/form" class="btn btn-default btnTool" title="\${text('新增${functionNameSimple}')}"><i class="fa fa-plus"></i> \${text('新增')}</a>
|
||||
\<% } %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<% include('/templates/modules/gen/include/searchForm.html'){} %>
|
||||
<table id="dataGrid"></table>
|
||||
<% if(!table.isTreeEntity){ %>
|
||||
<div id="dataGridPage"></div>
|
||||
<% } %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
\<% } %>
|
||||
<script>
|
||||
// 初始化DataGrid对象
|
||||
$('#dataGrid').dataGrid({
|
||||
searchForm: $("#searchForm"),
|
||||
columnModel: [
|
||||
<%
|
||||
// 是否是第一列
|
||||
var firstColumn = true;
|
||||
// 获取到唯一ID的url参数字符串
|
||||
var idParam = '';
|
||||
for(pk in table.pkList){
|
||||
idParam = idParam + (pkLP.index!=1?'&':'') + pk.attrName + '=\'+row.' + pk.attrName + '+\'';
|
||||
}
|
||||
// 生成树表的节点列
|
||||
if(table.isTreeEntity){
|
||||
for(c in table.columnList){
|
||||
if(c.attrName == table.treeViewNameAttrName){
|
||||
%>
|
||||
{header:'\${text('${c.columnLabel}')}', name:'${c.attrName}', index:'a.${c.columnName}', width:250, align:"left", frozen:true, formatter: function(val, obj, row, act){
|
||||
return '( '+row.${table.treeViewCodeAttrName}+' ) '+'<a href="\${ctx}/${urlPrefix}/form?${idParam}" class="btnList" data-title="\${text('编辑${functionNameSimple}')}">'+(val||row.id)+'</a>';
|
||||
}},
|
||||
<%
|
||||
firstColumn = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
%>
|
||||
<%
|
||||
for(c in table.columnList){
|
||||
if(c.isList == "1"){
|
||||
// 如果是树结构的字段,则自动忽略
|
||||
if(table.isTreeEntity && @StringUtils.inString(c.columnName, 'parent_code',
|
||||
'parent_codes', 'tree_sorts', 'tree_leaf', 'tree_level', 'tree_names')
|
||||
&& c.attrName != table.treeViewCodeAttrName
|
||||
&& c.attrName != table.treeViewNameAttrName){
|
||||
}
|
||||
// 如果是首列,则输出带链接的列
|
||||
else if(firstColumn){
|
||||
firstColumn = false;
|
||||
%>
|
||||
{header:'\${text('${c.columnLabel}')}', name:'${c.attrName}', index:'a.${c.columnName}', width:150, align:"left", frozen:true, formatter: function(val, obj, row, act){
|
||||
return '<a href="\${ctx}/${urlPrefix}/form?${idParam}" class="btnList" data-title="\${text('编辑${functionNameSimple}')}">'+(val||row.id)+'</a>';
|
||||
}},
|
||||
<% }else if(c.showType == 'select' || c.showType == 'select_multiple' || c.showType == 'checkbox' || c.showType == 'radio'){ %>
|
||||
{header:'\${text('${c.columnLabel}')}', name:'${c.attrName}', index:'a.${c.columnName}', width:150, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(\${@DictUtils.getDictListJson('${c.optionMap['dictType']}')}, val, '\${text('未知')}', true);
|
||||
}},
|
||||
<% }else if(c.showType == "userselect" || c.showType == "officeselect" || c.showType == "areaselect"){ %>
|
||||
{header:'\${text('${c.columnLabel}')}', name:'${c.attrName2}', index:'a.${c.columnName}', width:150, align:"center"},
|
||||
<% }else{
|
||||
if (@StringUtils.inString(c.attrType, 'java.util.Date', 'Integer', 'Long')){
|
||||
%>
|
||||
{header:'\${text('${c.columnLabel}')}', name:'${c.attrName}', index:'a.${c.columnName}', width:150, align:"center"},
|
||||
<%
|
||||
}else if (@StringUtils.inString(c.attrType, 'Float', 'Double')){
|
||||
%>
|
||||
{header:'\${text('${c.columnLabel}')}', name:'${c.attrName}', index:'a.${c.columnName}', width:150, align:"right", formatter: function(val, obj, row, act){
|
||||
return js.formatNumber(val, 2, false, ''); // 数值类型格式化 (原始数值, 小数位数, 是否千分位, 默认值,金额情况下设置0.00);
|
||||
}},
|
||||
<%
|
||||
}else {
|
||||
%>
|
||||
{header:'\${text('${c.columnLabel}')}', name:'${c.attrName}', index:'a.${c.columnName}', width:150, align:"left"},
|
||||
<%
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
%>
|
||||
{header:'\${text('操作')}', name:'actions', width:120, sortable:false, title:false, formatter: function(val, obj, row, act){
|
||||
var actions = [];
|
||||
\<% if(hasPermi('${permissionPrefix}:edit')){ %>
|
||||
actions.push('<a href="\${ctx}/${urlPrefix}/form?${idParam}" class="btnList" title="\${text('编辑${functionNameSimple}')}"><i class="fa fa-pencil"></i></a> ');
|
||||
<% if(@ObjectUtils.toBoolean(table.optionMap['isHaveDisableEnable'])){ %>
|
||||
if (row.status == Global.STATUS_NORMAL){
|
||||
actions.push('<a href="\${ctx}/${urlPrefix}/disable?${idParam}" class="btnList" title="\${text('停用${functionNameSimple}')}" data-confirm="\${text('确认要停用该${functionNameSimple}吗?')}"><i class="glyphicon glyphicon-ban-circle"></i></a> ');
|
||||
}
|
||||
if (row.status == Global.STATUS_DISABLE){
|
||||
actions.push('<a href="\${ctx}/${urlPrefix}/enable?${idParam}" class="btnList" title="\${text('启用${functionNameSimple}')}" data-confirm="\${text('确认要启用该${functionNameSimple}吗?')}"><i class="glyphicon glyphicon-ok-circle"></i></a> ');
|
||||
}
|
||||
<% } %>
|
||||
<% if(@ObjectUtils.toBoolean(table.optionMap['isHaveDelete'])){ %>
|
||||
actions.push('<a href="\${ctx}/${urlPrefix}/delete?${idParam}" class="btnList" title="\${text('删除${functionNameSimple}')}" data-confirm="\${text('确认要删除该${functionNameSimple}<% if(table.isTreeEntity){ %>及所有子${functionNameSimple}<% } %>吗?')}"<% if(table.isTreeEntity){ %> data-deltreenode="'+row.id+'"<% } %>><i class="fa fa-trash-o"></i></a> ');
|
||||
<% } %>
|
||||
<% if(table.isTreeEntity){ %>
|
||||
actions.push('<a href="\${ctx}/${urlPrefix}/form?parentCode='+row.id+'" class="btnList" title="\${text('新增下级${functionNameSimple}')}"><i class="fa fa-plus-square"></i></a> ');
|
||||
<% } %>
|
||||
\<% } %>
|
||||
return actions.join('');
|
||||
}}
|
||||
],
|
||||
<% if(table.isTreeEntity){ %>
|
||||
treeGrid: true, // 启用树结构表格
|
||||
defaultExpandLevel: 0, // 默认展开的层次
|
||||
expandNodeClearPostData: '<%
|
||||
for(c in table.columnList){
|
||||
if(c.isQuery == "1" && !c.isTreeEntityColumn){
|
||||
print(c.attrName + ',');
|
||||
}
|
||||
} %>', // 展开节点清理请求参数数据(一般设置查询条件的字段属性,否则在查询后,不能展开子节点数据)
|
||||
<% } %>
|
||||
// 加载成功后执行事件
|
||||
ajaxSuccess: function(data){
|
||||
|
||||
}
|
||||
});
|
||||
</script>]]>
|
||||
</content>
|
||||
</template>
|
||||
@@ -0,0 +1,14 @@
|
||||
<%
|
||||
// 输出子表控件
|
||||
for (child in table.childList){
|
||||
%>
|
||||
<h4 class="form-unit">\${text('${child.comments}')}</h4>
|
||||
<div class="ml10 mr10">
|
||||
<table id="${@StringUtils.uncap(child.className)}DataGrid"></table>
|
||||
\<% if (hasPermi('${permissionPrefix}:edit')){ %>
|
||||
<a href="#" id="${@StringUtils.uncap(child.className)}DataGridAddRowBtn" class="btn btn-primary btn-sm mt10 mb10"><i class="fa fa-plus"></i> \${text('增行')}</a>
|
||||
\<% } %>
|
||||
</div>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user