Compare commits

...

61 Commits

Author SHA1 Message Date
thinkgem
bd19bd2445 update 2019-02-21 22:16:18 +08:00
thinkgem
97f460448b 初始化数据库时,默认情况下job是关闭状态,导致注入jobService失败,需要注入jobDao 2019-02-18 23:07:00 +08:00
thinkgem
a28ac15194 优化XSS正则表达式 2019-02-16 14:35:51 +08:00
thinkgem
1d5c90ca06 主框架页PC消息提醒增加提示音。 2019-02-13 20:14:33 +08:00
thinkgem
fa562d955d v4.1.3 2019-02-12 20:36:30 +08:00
thinkgem
b0c67108d4 update config 2019-02-10 22:38:05 +08:00
thinkgem
7d2615be5d 新增参数配置 sys.index.menuStyle=2 的时候,一级菜单显示在主框架页顶部。 2019-02-05 21:04:49 +08:00
thinkgem
2a5857645b 点击侧边栏头像隐藏header部分,扩大操作区域。 2019-02-04 20:59:32 +08:00
thinkgem
cd6c655ff5 sys_config的config_key字段设置为唯一约束属性 2019-02-04 17:22:31 +08:00
thinkgem
914242ad88 将sysDesktop中的echarts替换为本地资源文件 2019-02-04 17:05:13 +08:00
thinkgem
e2c546cc62 js.text()的语言配置文件移动到core项目下 2019-02-04 17:04:13 +08:00
thinkgem
006d34792f 新增 lang.defaultLocale 和 lang.defaultTimeZone
指定默认语言和默认时区参数(解决某些linux下的国际化的问题)
2019-02-03 21:58:09 +08:00
thinkgem
e1d47099b6 优化脚本 2019-02-03 21:56:32 +08:00
thinkgem
0cc00091ca 默认关闭lang和job较少运维(4.1.3+) 2019-01-30 20:38:26 +08:00
thinkgem
bd63181299 修正新增子级公司的时候选择的包含机构数据无法保存问题 2019-01-26 15:25:50 +08:00
thinkgem
727c2fcf3c 修正主子表情况下,子表点击删除按钮,但不点击确认删除,保存之后仍会删除
https://gitee.com/thinkgem/jeesite4/issues/IRDVT
2019-01-24 21:07:08 +08:00
thinkgem
038e89316a 修正账号登录安全选项锁定账号失效的问题 2019-01-23 20:55:23 +08:00
thinkgem
b57ae4930b open sso controller 2019-01-14 22:06:18 +08:00
thinkgem
846864622f update 2019-01-14 22:05:08 +08:00
thinkgem
ce5aa1c5c3 优化代码生成模板和默认设置,另修正当没有status字段时误导入了DataEntity的问题。 2019-01-10 22:33:46 +08:00
thinkgem
c9d513111f 取消页签模式下不显示字典数据的新增按钮问题 2019-01-10 20:09:37 +08:00
thinkgem
da9ff38b1b add bootstrap.yml load. 2019-01-10 20:07:07 +08:00
thinkgem
2af14b2244 fileupload组件新增extendParams扩展参数,附加数据,方便后台做出相应处理;新增ImageUtils工具类生成缩略图;Ueditor新增StorageManager.uploadFileSuccess方法,方便写上传文件后回调。 2019-01-07 21:37:11 +08:00
thinkgem
8d46bf2e9d update 2019-01-06 19:59:36 +08:00
thinkgem
3e7ed978a3 日志输出格式优化 2019-01-05 19:25:20 +08:00
thinkgem
9cb50983dd 新增可编辑的Grid列表选择组件应用示例。 2019-01-01 19:59:22 +08:00
thinkgem
307a860060 update 2018-12-31 23:19:28 +08:00
thinkgem
4147a940e1 移除极少使用的metadata-extractor图片Meta获取类库,若有需要可自行添加该类库。 2018-12-31 16:37:50 +08:00
thinkgem
d22fe96763 start v4.1.3 2018-12-30 16:56:40 +08:00
thinkgem
8629d2a055 update comment 2018-12-28 22:27:49 +08:00
thinkgem
ab2cfb1130 update 2018-12-25 21:59:46 +08:00
thinkgem
a15eaf244a Merge branch 'v4.1_dev' 2018-12-22 21:23:08 +08:00
thinkgem
10c55689a9 Merge branch 'master' of https://gitee.com/thinkgem/jeesite4 2018-12-22 20:50:50 +08:00
thinkgem
67c6f9e772 v4.1.2 2018-12-22 19:19:18 +08:00
thinkgem
314cef3201 菜单归属系统代码优化及各种细节优化 2018-12-22 19:16:47 +08:00
thinkgem
e663ae3207 update 2018-12-22 19:07:19 +08:00
ThinkGem
564e470103 update 2018-12-22 15:46:53 +08:00
ThinkGem
92f665d00e !5 彩色日志
Merge pull request !5 from 清曦宛若扇/master
2018-12-22 15:42:43 +08:00
gaoxiyang
3a78e56815 彩色日志 2018-12-18 09:52:57 +08:00
thinkgem
2d7f66b1e0 修复苹果手机IOS下不能左右滚动问题,另外需按如下步骤操作手机:设置 -> Safari浏览器 -> 高级 -> Experimental
Features -> 关闭 Async Frame Scrolling 选项。
2018-12-17 22:48:52 +08:00
thinkgem
1724e3ead1 代码优化,减少一些js警告的提示。建议设置IDE忽略一些无关紧要的警告提示。 2018-12-16 16:54:09 +08:00
thinkgem
c7a9ccf615 代码生成模板分离出dataGrid生成代码;日期控件选填显示清空按钮;仅查询生成模板优化; 2018-12-16 13:53:05 +08:00
thinkgem
c21949d733 租户管理员支持绑定角色,让不同的租户可拥有不同的菜单。 2018-12-15 23:33:11 +08:00
thinkgem
2de5300ae5 update 2018-12-15 19:54:19 +08:00
thinkgem
466b323114 update 2018-12-13 22:31:02 +08:00
thinkgem
19752502f1 主题切换中新增“表单弹窗模式”、“取消页签模式”选项开关 2018-12-12 21:21:20 +08:00
thinkgem
2d02047e81 新增 shiro.isAllowMultiDeviceLogin
参数,是否允许多账号多设备登录,如果设置为false,其它地点登录的相同账号全部登录设备将被踢下线
2018-12-09 22:32:03 +08:00
thinkgem
a36244316c rename MainTest.java to Test.java 2018-12-02 15:43:14 +08:00
thinkgem
c0ae3ad32f 删除一些无用的代码 2018-11-30 22:08:10 +08:00
thinkgem
ac04d84c53 优化树表代码生成,展开节点清理请求参数数据时排除状态查询条件;查询树表优化,编辑后支持刷新列表中无父节点数据; 2018-11-30 21:50:20 +08:00
thinkgem
aef4837827 新增连接池最大空闲的时间,默认30分钟。 2018-11-30 20:49:45 +08:00
thinkgem
af17a4664c 新增WebOffice在线文件预览的支持。 2018-11-27 22:38:52 +08:00
thinkgem
19da4dc3b5 FileUtils.getContentType的准确性优化,有时候会对下载视频播放造成影响; 2018-11-27 22:14:22 +08:00
thinkgem
32ba7bb0a4 xss过滤去除&和#的转换,有时候会产生一点问题 2018-11-27 22:07:54 +08:00
thinkgem
b0f01baeb4 优化repos地址 2018-11-25 15:55:57 +08:00
thinkgem
0b63e8ad6b 新增仅查询功能(不含增删改)的代码生成模板 #IOZ3S 2018-11-24 21:41:03 +08:00
thinkgem
125018df1d start 4.1.2 2018-11-24 21:06:03 +08:00
thinkgem
e6fe7b5420 测试代码优化 2018-11-20 21:25:33 +08:00
thinkgem
da5c212536 update 2018-11-18 20:36:47 +08:00
thinkgem
43005b16b1 v4.1.1 2018-11-17 23:55:18 +08:00
thinkgem
68ffd4e8f3 v4.1.1 2018-11-17 23:32:55 +08:00
134 changed files with 2770 additions and 8579 deletions

View File

@@ -1,14 +1,14 @@
## 引言
JeeSite 是一个 Java EE 企业级快速开发平台基于经典技术组合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 自开源以来已被广大爱好者用到了企业、政府、医疗、金融、互联网等各个领域中JeeSite 依架构简单精良、易于扩展、大众思维的设计模式,深入开发者的内心,并得到一致好评,于[2016](http://www.oschina.net/project/top_cn_2016?sort=1)和[2017](http://www.oschina.net/project/top_cn_2017?sort=1)连续两年获得开源中国《最受欢迎中国开源软件》奖杯,期间也帮助了不少刚毕业的大学生作为入门教材,快速的去实践。
JeeSite 自 2013 年发布以来已被广大爱好者用到了企业、政府、医疗、金融、互联网等各个领域中JeeSite 依架构简单精良、易于扩展、大众思维的设计模式,深入开发者的内心,并得到一致好评,于[2016](http://www.oschina.net/project/top_cn_2016?sort=1)和[2017](http://www.oschina.net/project/top_cn_2017?sort=1)连续两年获得开源中国《最受欢迎中国开源软件》奖杯,期间也帮助了不少刚毕业的大学生作为入门教材,快速的去实践。
4.x的升级作者结合了多年总结和经验以及各方面的应用案例对架构完成了一次全部重构也纳入很多新的思想。不管是从开发者模式、底层架构、逻辑处理还是到用户界面用户交互体验上都有很大的进步在不忘学习成本、提高开发效率的情况下安全方面也做和很多工作包括身份认证、密码策略、安全审计、日志收集。
4.x 的升级,作者结合了多年总结和经验,以及各方面的应用案例,对架构完成了一次全部重构,也纳入很多新的思想。不管是从开发者模式、底层架构、逻辑处理还是到用户界面,用户交互体验上都有很大的进步,在不忘学习成本、提高开发效率的情况下,安全方面也做和很多工作,包括:身份认证、密码策略、安全审计、日志收集。
### 4.x 新特性:<http://jeesite4.mydoc.io/?t=281645>
### 4.x 新特性:<http://jeesite.com/?t=281645>
* **我们的优势:** 整体架构清晰、稳定技术先进、入门简单、易于维护、易于扩展、安全稳定。
@@ -19,11 +19,11 @@ JeeSite 自开源以来已被广大爱好者用到了企业、政府、医疗、
* 视图层Spring MVC 5.0、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://jeesite4.mydoc.io/?t=273599>
* 技术选型详情:<http://jeesite.com/?t=273599>
## 内置功能
* <http://jeesite4.mydoc.io/?t=270187>
* <http://jeesite.com/?t=270187>
## 生态系统
@@ -47,26 +47,26 @@ JeeSite 自开源以来已被广大爱好者用到了企业、政府、医疗、
4. 执行脚本:/web`/bin/init-data.bat` 初始化数据库
5. 执行脚本:/web`/bin/run-tomcat.bat` 启动服务即可
6. 浏览器访问:<http://127.0.0.1:8980/js/> 账号 system 密码 admin
7. 部署常见问题:<http://jeesite4.mydoc.io/?t=284210>
7. 部署常见问题:<http://jeesite.com/?t=284210>
### 开发环境
1. 部署运行:<http://jeesite4.mydoc.io/?t=267354>
2. 常见问题:<http://jeesite4.mydoc.io/?t=284210>
1. 部署运行:<http://jeesite.com/?t=267354>
2. 常见问题:<http://jeesite.com/?t=284210>
## 开发手册
* 代码生成 / 快速入门 (Guide)<http://jeesite4.mydoc.io/?t=316743>
* 持久层 / 数据库操作 (MyBatis)<http://jeesite4.mydoc.io/?t=267351>
* 业务层 / 数据权限 (Service)<http://jeesite4.mydoc.io/?t=267352>
* 视图层 / 表单组件 (Beetl)<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=323351>
* 常见问题:<http://jeesite4.mydoc.io/?t=284210>
* 代码生成 / 快速入门 (Guide)<http://jeesite.com/?t=316743>
* 持久层 / 数据库操作 (MyBatis)<http://jeesite.com/?t=267351>
* 业务层 / 数据权限 (Service)<http://jeesite.com/?t=267352>
* 视图层 / 表单组件 (Beetl)<http://jeesite.com/?t=267353>
* 功能权限基础文档 (Shiro)<http://jeesite.com/?t=298473>
* 常用JS类库API (jeesite.js)<http://jeesite.com/?t=301473>
* 数据表格API (DataGrid.js)<http://jeesite.com/?t=301488>
* 修改 (默认) 视图,新增主题:<http://jeesite.com/?t=267355>
* 手机 API 接口调用、前后分离:<http://jeesite.com/?t=270527>
* 消息提醒中心使用手册:<http://jeesite.com/?t=323351>
* 常见问题:<http://jeesite.com/?t=284210>
## 今后如何升级?
@@ -91,9 +91,9 @@ JeeSite的小版本4.1.x升级是非常便捷的你只需要将 pom.xml
7. 关系平台的发展战略考虑,底层部分代码暂未开源,但这不影响您的二次开发。
8. 请知悉社区版用户数不可超过100个最大允许10个用户同时在线不含匿名
### 获得技术服务支持:<http://jeesite4.mydoc.io/?t=267685>
### 获得技术服务支持:<http://s.jeesite.com>
* 随着JeeSite发展我们也需要有相应的资金支持才能持续的开发和维护。支持我们,您可以得到一些回报,我们有了这些会把开源事业做的更好,请给我们一些动力吧,谢谢您的支持
* 我们深知,没有资金的支撑就很难得到发展,特别是一个好的产品,如果 JeeSite 帮助了您,请为我们点赞。支持我们,您可以得到一些回报,有了这些我们会把开源事业做的更好,回报社区和社会,请给我们一些动力吧,在此非常感谢已支持我们的朋友
# 技术交流方式

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.jeesite</groupId>
<artifactId>jeesite-parent</artifactId>
<version>4.1.1-SNAPSHOT</version>
<version>4.1.3-SNAPSHOT</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
@@ -138,18 +138,24 @@
<version>${UserAgentUtils.version}</version>
</dependency>
<!-- 图片Meta获取 -->
<!-- 图片Meta获取
<dependency>
<groupId>com.drewnoakes</groupId>
<artifactId>metadata-extractor</artifactId>
<version>${metadata-extractor.version}</version>
</dependency>
</dependency> -->
<!-- 缩略图工具 -->
<dependency>
<groupId>net.coobird</groupId>
<artifactId>thumbnailator</artifactId>
<version>${thumbnailator.version}</version>
</dependency>
<!-- 支持CMYK图片 -->
<dependency>
<groupId>com.twelvemonkeys.imageio</groupId>
<artifactId>imageio-jpeg</artifactId>
<version>${twelvemonkeys.version}</version>
</dependency>
<!-- 图片验证码生成 -->
<dependency>
<groupId>com.bladejava</groupId>

View File

@@ -192,7 +192,7 @@ public class EncodeUtils {
Pattern.compile("(<\\s*(script|link|style|iframe)([\\s\\S]*?)(>|<\\/\\s*\\1\\s*>))|(</\\s*(script|link|style|iframe)\\s*>)", Pattern.CASE_INSENSITIVE),
Pattern.compile("\\s*(href|src)\\s*=\\s*(\"\\s*(javascript|vbscript):[^\"]+\"|'\\s*(javascript|vbscript):[^']+'|(javascript|vbscript):[^\\s]+)\\s*(?=>)", Pattern.CASE_INSENSITIVE),
Pattern.compile("\\s*on[a-z]+\\s*=\\s*(\"[^\"]+\"|'[^']+'|[^\\s]+)\\s*(?=>)", Pattern.CASE_INSENSITIVE),
Pattern.compile("(eval\\((.|\\n)*\\)|xpression\\((.|\\n)*\\))", Pattern.CASE_INSENSITIVE)
Pattern.compile("(eval\\((.*?)\\)|xpression\\((.*?)\\))", Pattern.CASE_INSENSITIVE)
);
/**
@@ -232,12 +232,12 @@ public class EncodeUtils {
case '\"':
sb.append("");
break;
case '&':
sb.append("");
break;
case '#':
sb.append("");
break;
// case '&':
// sb.append("");
// break;
// case '#':
// sb.append("");
// break;
default:
sb.append(c);
break;

View File

@@ -1,66 +1,66 @@
/**
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
*/
package com.jeesite.common.image;
import java.io.File;
import com.drew.imaging.jpeg.JpegMetadataReader;
import com.drew.lang.Rational;
import com.drew.metadata.Metadata;
import com.drew.metadata.exif.GpsDirectory;
/**
* 图片地理信息获取
* @author ThinkGem
*/
public class ImageGeo {
public double lat = 0.0;
public double lon = 0.0;
public double alt = 0.0;
public boolean error = false;
public ImageGeo(String filename) {
try {
error = false;
File jpegFile = new File(filename);
Metadata metadata = JpegMetadataReader.readMetadata(jpegFile);
GpsDirectory gpsdir = (GpsDirectory) metadata.getDirectoriesOfType(GpsDirectory.class);
Rational latpart[] = gpsdir.getRationalArray(GpsDirectory.TAG_LATITUDE);
Rational lonpart[] = gpsdir.getRationalArray(GpsDirectory.TAG_LONGITUDE);
String northing = gpsdir.getString(GpsDirectory.TAG_LATITUDE_REF);
String easting = gpsdir.getString(GpsDirectory.TAG_LONGITUDE_REF);
try {
alt = gpsdir.getDouble(GpsDirectory.TAG_ALTITUDE);
} catch (Exception ex) {}
double latsign = 1.0d;
if (northing.equalsIgnoreCase("S")) {
latsign = -1.0d;
}
double lonsign = 1.0d;
if (easting.equalsIgnoreCase("W")) {
lonsign = -1.0d;
}
lat = (Math.abs(latpart[0].doubleValue()) + latpart[1].doubleValue() / 60.0d + latpart[2].doubleValue() / 3600.0d) * latsign;
lon = (Math.abs(lonpart[0].doubleValue()) + lonpart[1].doubleValue() / 60.0d + lonpart[2].doubleValue() / 3600.0d) * lonsign;
if (Double.isNaN(lat) || Double.isNaN(lon)) {
error = true;
}
} catch (Exception ex) {
error = true;
}
System.out.println(filename + ": (" + lat + ", " + lon + ")");
}
// public static void main(String[] args) {
// ImageGeo imageGeo = new ImageGeo(ImageGeo.class.getResource("IMAG0068.jpg").getFile());
// System.out.println(imageGeo.lon + "," + imageGeo.lat);
///**
// * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
// */
//package com.jeesite.common.image;
//
//import java.io.File;
//
//import com.drew.imaging.jpeg.JpegMetadataReader;
//import com.drew.lang.Rational;
//import com.drew.metadata.Metadata;
//import com.drew.metadata.exif.GpsDirectory;
//
///**
// * 图片地理信息获取
// * @author ThinkGem
// */
//public class ImageGeo {
//
// public double lat = 0.0;
// public double lon = 0.0;
// public double alt = 0.0;
// public boolean error = false;
//
// public ImageGeo(String filename) {
// try {
// error = false;
// File jpegFile = new File(filename);
// Metadata metadata = JpegMetadataReader.readMetadata(jpegFile);
//
// GpsDirectory gpsdir = (GpsDirectory) metadata.getDirectoriesOfType(GpsDirectory.class);
// Rational latpart[] = gpsdir.getRationalArray(GpsDirectory.TAG_LATITUDE);
// Rational lonpart[] = gpsdir.getRationalArray(GpsDirectory.TAG_LONGITUDE);
// String northing = gpsdir.getString(GpsDirectory.TAG_LATITUDE_REF);
// String easting = gpsdir.getString(GpsDirectory.TAG_LONGITUDE_REF);
//
// try {
// alt = gpsdir.getDouble(GpsDirectory.TAG_ALTITUDE);
// } catch (Exception ex) {}
//
// double latsign = 1.0d;
// if (northing.equalsIgnoreCase("S")) {
// latsign = -1.0d;
// }
// double lonsign = 1.0d;
// if (easting.equalsIgnoreCase("W")) {
// lonsign = -1.0d;
// }
//
// lat = (Math.abs(latpart[0].doubleValue()) + latpart[1].doubleValue() / 60.0d + latpart[2].doubleValue() / 3600.0d) * latsign;
// lon = (Math.abs(lonpart[0].doubleValue()) + lonpart[1].doubleValue() / 60.0d + lonpart[2].doubleValue() / 3600.0d) * lonsign;
//
// if (Double.isNaN(lat) || Double.isNaN(lon)) {
// error = true;
// }
// } catch (Exception ex) {
// error = true;
// }
// System.out.println(filename + ": (" + lat + ", " + lon + ")");
// }
}
//
//// public static void main(String[] args) {
//// ImageGeo imageGeo = new ImageGeo(ImageGeo.class.getResource("IMAG0068.jpg").getFile());
//// System.out.println(imageGeo.lon + "," + imageGeo.lat);
//// }
//
//}

View File

@@ -0,0 +1,70 @@
/**
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
*/
package com.jeesite.common.image;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.jeesite.common.io.FileUtils;
import com.jeesite.common.lang.StringUtils;
import net.coobird.thumbnailator.Thumbnails;
import net.coobird.thumbnailator.Thumbnails.Builder;
/**
* 图片处理工具类
* @author ThinkGem
* @version 2018年12月31日
*/
public class ImageUtils {
private static Logger logger = LoggerFactory.getLogger(ImageUtils.class);
/**
* 缩略图生成,处理一些较大的图片,防止占用太多的网络资源
*/
public static void thumbnails(File imageFile, int maxWidth, int maxHeight, String outputFormat){
if (imageFile == null || !imageFile.exists() || (maxWidth <= 0 && maxHeight <= 0)){
return;
}
// 只处理可以压缩的图片如gif图片压缩后会出现黑色背景的情况
String extension = FileUtils.getFileExtension(imageFile.getName());
if (!StringUtils.inString(extension, "png", "jpg", "jpeg", "bmp", "ico")){
return;
}
try{
BufferedImage bufferedImage = ImageIO.read(imageFile);
Builder<BufferedImage> bilder = Thumbnails.of(bufferedImage);
if (bufferedImage != null){
if (maxWidth > 0){
if (bufferedImage.getWidth() <= maxWidth){
bilder.width(bufferedImage.getWidth());
}else{
bilder.width(maxWidth);
}
}
if (maxHeight > 0){
if (bufferedImage.getHeight() <= maxHeight){
bilder.height(bufferedImage.getHeight());
}else{
bilder.height(maxHeight);
}
}
if (StringUtils.isNotBlank(outputFormat)){
bilder.outputFormat(outputFormat);
}
bilder.toFile(imageFile);
}
}catch(IOException e){
logger.error("图片压缩失败:" + imageFile.getAbsoluteFile(), e);
}
}
}

View File

@@ -44,6 +44,7 @@ import net.sf.jmimemagic.MagicMatch;
public class FileUtils extends org.apache.commons.io.FileUtils {
private static Logger logger = LoggerFactory.getLogger(FileUtils.class);
private static MimetypesFileTypeMap mimetypesFileTypeMap;
/**
* 复制单个文件,如果目标文件存在,则不覆盖
@@ -654,7 +655,10 @@ public class FileUtils extends org.apache.commons.io.FileUtils {
* @return 返回文件类型
*/
public static String getContentType(String fileName) {
return new MimetypesFileTypeMap().getContentType(fileName);
if (mimetypesFileTypeMap == null){
mimetypesFileTypeMap = new MimetypesFileTypeMap();
}
return mimetypesFileTypeMap.getContentType(fileName);
}
/**

View File

@@ -34,6 +34,7 @@ public class PropertiesUtils {
// 默认加载的文件可通过继承覆盖若有相同Key优先加载后面的
public static final String[] DEFAULT_CONFIG_FILE = new String[]{
"classpath:config/bootstrap.yml", "classpath:bootstrap.yml",
"classpath:config/application.yml", "classpath:application.yml"};
private static Logger logger = PropertiesUtils.initLogger();
@@ -224,7 +225,9 @@ public class PropertiesUtils {
if (new File(classesLogPath).exists()){
logPath = classesLogPath;
}
System.setProperty("logPath", FileUtils.path(logPath));
if (StringUtils.isBlank(System.getProperty("logPath"))){
System.setProperty("logPath", FileUtils.path(logPath));
}
return LoggerFactory.getLogger(PropertiesUtils.class);
}

View File

@@ -26,6 +26,7 @@ import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.util.JSONPObject;
import com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule;
import com.jeesite.common.collect.ListUtils;
import com.jeesite.common.io.PropertiesUtils;
/**
* 简单封装Jackson实现JSON String<->Java Object的Mapper.
@@ -55,8 +56,9 @@ public class JsonMapper extends ObjectMapper {
this.configure(Feature.ALLOW_SINGLE_QUOTES, true);
// 允许不带引号的字段名称
this.configure(Feature.ALLOW_UNQUOTED_FIELD_NAMES, true);
// 设置时区
this.setTimeZone(TimeZone.getTimeZone("GMT+8:00"));
// 设置默认时区
this.setTimeZone(TimeZone.getTimeZone(PropertiesUtils.getInstance()
.getProperty("lang.defaultTimeZone", "GMT+08:00")));
// 设置输入时忽略在JSON字符串中存在但Java对象实际没有的属性
this.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
// 遇到空值处理为空串

View File

@@ -24,6 +24,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
import com.fasterxml.jackson.databind.JavaType;
import com.jeesite.common.io.PropertiesUtils;
/**
* XML <-> Map、Object
@@ -49,8 +50,9 @@ public class XmlMapper extends com.fasterxml.jackson.dataformat.xml.XmlMapper{
public XmlMapper() {
// Spring ObjectMapper 初始化配置,支持 @JsonView
new Jackson2ObjectMapperBuilder().configure(this);
// 设置时区
this.setTimeZone(TimeZone.getTimeZone("GMT+8:00"));
// 设置默认时区
this.setTimeZone(TimeZone.getTimeZone(PropertiesUtils.getInstance()
.getProperty("lang.defaultTimeZone", "GMT+08:00")));
}
/**

View File

@@ -1,28 +1,21 @@
package com.jeesite.common.media;
import java.awt.image.BufferedImage;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;
import javax.imageio.ImageIO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.jeesite.common.collect.ListUtils;
import com.jeesite.common.image.ImageUtils;
import com.jeesite.common.io.FileUtils;
import com.jeesite.common.io.PropertiesUtils;
import com.jeesite.common.lang.ObjectUtils;
import com.jeesite.common.lang.StringUtils;
import com.jeesite.common.lang.TimeUtils;
import net.coobird.thumbnailator.Thumbnails;
import net.coobird.thumbnailator.Thumbnails.Builder;
/**
* 视频工具类
* @author ThinkGem
@@ -114,34 +107,11 @@ public class VideoUtils {
try {
File imgfile = new File(imgFile);
if (imgfile.exists()){
// 过滤掉gif图片因为gif图片转换后会出现黑色背景的情况gif基本也没有比较大的图片
if (!StringUtils.inString(FileUtils.getFileExtension(imgFile), "gif")){
Integer w = 800;
Integer h = 600;
if (StringUtils.isNotBlank(width)){
w = ObjectUtils.toInteger(width);
}
if (StringUtils.isNotBlank(height)){
h = ObjectUtils.toInteger(height);
}
Builder<File> file = Thumbnails.of(imgFile);
BufferedImage bufferedImage = ImageIO.read(imgfile);
if (bufferedImage.getWidth() <= w){
file.width(bufferedImage.getWidth());
}else{
file.width(w);
}
if (bufferedImage.getHeight() <= h){
file.height(bufferedImage.getHeight());
}else{
file.height(h);
}
file.toFile(imgFile);
}
ImageUtils.thumbnails(imgfile, 800, 600, null);
}else{
statusTemp = false;
}
} catch (IOException e) {
} catch (Exception e) {
statusTemp = false;
log.error("视频剪切图片失败", e);
}

View File

@@ -39,6 +39,9 @@ public final class Base64Uploader {
storageState.putInfo("url", ctx + PathFormat.format(savePath));
storageState.putInfo("type", suffix);
storageState.putInfo("original", "");
// UEditor上传文件成功后调用事件
StorageManager.uploadFileSuccess(physicalPath, storageState);
}
return storageState;

View File

@@ -1,6 +1,5 @@
package com.jeesite.common.ueditor.upload;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
@@ -9,7 +8,6 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.imageio.ImageIO;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.fileupload.FileItemIterator;
@@ -20,8 +18,8 @@ import org.apache.commons.fileupload.servlet.ServletFileUpload;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import com.jeesite.common.image.ImageUtils;
import com.jeesite.common.io.FileUtils;
import com.jeesite.common.lang.StringUtils;
import com.jeesite.common.media.VideoUtils;
import com.jeesite.common.ueditor.PathFormat;
import com.jeesite.common.ueditor.define.ActionMap;
@@ -30,9 +28,6 @@ import com.jeesite.common.ueditor.define.BaseState;
import com.jeesite.common.ueditor.define.FileType;
import com.jeesite.common.ueditor.define.State;
import net.coobird.thumbnailator.Thumbnails;
import net.coobird.thumbnailator.Thumbnails.Builder;
public class BinaryUploader {
public static final State save(HttpServletRequest request,
@@ -114,21 +109,8 @@ public class BinaryUploader {
// 如果开启了压缩图片
if ((Boolean)conf.get("imageCompressEnable")){
Integer width = (Integer)conf.get("imageCompressBorder");
// 过滤掉gif图片因为gif图片转换后会出现黑色背景的情况gif基本也没有比较大的图片
if (StringUtils.inString(FileUtils.getFileExtension(physicalPath),
"png","jpg","jpeg","bmp","ico")){
Builder<File> file = Thumbnails.of(physicalPath);
BufferedImage bufferedImage = ImageIO.read(new File(physicalPath));
if (bufferedImage != null){
if (bufferedImage.getWidth() <= width){
file.width(bufferedImage.getWidth());
}else{
file.width(width);
}
file.toFile(physicalPath);
}
}
Integer maxWidth = (Integer)conf.get("imageCompressBorder");
ImageUtils.thumbnails(new File(physicalPath), maxWidth, -1, null);
}
}
@@ -153,12 +135,19 @@ public class BinaryUploader {
storageState.putInfo("url", ctx + PathFormat.format(savePath) + "." + v.getOutputFileExtension());
storageState.putInfo("type", "." + v.getOutputFileExtension());
storageState.putInfo("original", originFileName +"."+ v.getInputFileExtension());
// Ueditor编辑器上传文件完成后调用事件
StorageManager.uploadFileSuccess(physicalPath, storageState);
return storageState;
}
}
storageState.putInfo("url", ctx + PathFormat.format(savePath));
storageState.putInfo("type", suffix);
storageState.putInfo("original", originFileName + suffix);
// UEditor上传文件成功后调用事件
StorageManager.uploadFileSuccess(physicalPath, storageState);
}
return storageState;

View File

@@ -210,4 +210,14 @@ public class StorageManager {
return new BaseState(true);
}
/**
* UEditor上传文件成功后调用事件
* @param physicalPath 上传文件实际路径
* @param storageState.url 返回到客户端的文件访问地址
*/
public static void uploadFileSuccess(String physicalPath, State storageState){
}
}

View File

@@ -0,0 +1,87 @@
text/html html htm shtml
text/css css
text/xml xml
image/gif gif
image/jpeg jpeg jpg
application/javascript js
application/atom+xml atom
application/rss+xml rss
text/mathml mml
text/plain txt
text/vnd.sun.j2me.app-descriptor jad
text/vnd.wap.wml wml
text/x-component htc
image/png png
image/tiff tif tiff
image/vnd.wap.wbmp wbmp
image/x-icon ico
image/x-jng jng
image/x-ms-bmp bmp
image/svg+xml svg svgz
image/webp webp
application/font-woff woff
application/java-archive jar war ear
application/json json
application/mac-binhex40 hqx
application/msword doc
application/pdf pdf
application/postscript ps eps ai
application/rtf rtf
application/vnd.apple.mpegurl m3u8
application/vnd.ms-excel xls
application/vnd.ms-fontobject eot
application/vnd.ms-powerpoint ppt
application/vnd.wap.wmlc wmlc
application/vnd.google-earth.kml+xml kml
application/vnd.google-earth.kmz kmz
application/x-7z-compressed 7z
application/x-cocoa cco
application/x-java-archive-diff jardiff
application/x-java-jnlp-file jnlp
application/x-makeself run
application/x-perl pl pm
application/x-pilot prc pdb
application/x-rar-compressed rar
application/x-redhat-package-manager rpm
application/x-sea sea
application/x-shockwave-flash swf
application/x-stuffit sit
application/x-tcl tcl tk
application/x-x509-ca-cert der pem crt
application/x-xpinstall xpi
application/xhtml+xml xhtml
application/xspf+xml xspf
application/zip zip
application/octet-stream bin exe dll
application/octet-stream deb
application/octet-stream dmg
application/octet-stream iso img
application/octet-stream msi msp msm
application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
audio/midi mid midi kar
audio/mpeg mp3
audio/ogg ogg
audio/x-m4a m4a
audio/x-realaudio ra
video/3gpp 3gpp 3gp
video/mp2t ts
video/mp4 mp4
video/mpeg mpeg mpg
video/quicktime mov
video/webm webm
video/x-flv flv
video/x-m4v m4v
video/x-mng mng
video/x-ms-asf asx asf
video/x-ms-wmv wmv
video/x-msvideo avi

View File

@@ -1,249 +0,0 @@
/*
* 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;
}
}

View File

@@ -26,12 +26,6 @@ public class CodeStatistic {
System.out.println("Path: " + path);
ArrayList<File> al = getFile(new File(path));
for (File f : al) {
if (!(f.getPath().contains("4.0\\jeesite\\")
|| f.getPath().contains("\\devtools\\")
|| f.getPath().contains("\\framework\\"))
|| f.getPath().contains("\\target\\")){
continue;
}
if (f.getName().matches(".*\\.java$")
|| f.getName().matches(".*\\.html$")
|| f.getName().matches(".*\\.js$")){

View File

@@ -1,33 +0,0 @@
/**
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
*/
package com.jeesite.test;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
/**
* Excel读写测试
* @author ThinkGem
* @version 2016年8月11日
*/
public class ExcelPoiTest {
public static void main(String[] args) throws Exception {
File file = new File("e:\\2016年调查表1.xls");
HSSFWorkbook wb = new HSSFWorkbook(new FileInputStream(file));
HSSFSheet sheet = wb.getSheetAt(2);
sheet.getRow(5).getCell(3).setCellValue("山东有限公司");
sheet.getRow(5).getCell(7).setCellValue("3799991911");
sheet.getRow(8).getCell(3).setCellValue("174");
sheet.getRow(8).getCell(7).setCellValue("私营股份有限公司");
wb.write(new FileOutputStream("e:\\2016年调查表2.xls"));
wb.close();
System.out.println("success");
}
}

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false" scan="false">
<!-- Console log output -->
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} %-5p [%-39logger{39}] - %m%n</pattern>
</encoder>
</appender>
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<root level="WARN">
<appender-ref ref="console" />
</root>
</configuration>

View File

@@ -2,5 +2,4 @@ eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding//src/test/java=UTF-8
encoding//src/test/resources=UTF-8
encoding/<project>=UTF-8

File diff suppressed because it is too large Load Diff

View File

@@ -803,7 +803,7 @@ 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 UNIQUE 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);

View File

@@ -803,7 +803,7 @@ 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 UNIQUE 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]);

View File

@@ -505,7 +505,7 @@ CREATE TABLE js_sys_msg_inner_record
msg_inner_id varchar(64) NOT NULL COMMENT '所属消息',
receive_user_code varchar(64) COMMENT '接受者用户编码',
receive_user_name varchar(100) NOT NULL COMMENT '接受者用户姓名',
read_status char(1) NOT NULL COMMENT '读取状态0未送达 1读 2读)',
read_status char(1) NOT NULL COMMENT '读取状态0未送达 1读 2读)',
read_date datetime COMMENT '阅读时间',
is_star char(1) COMMENT '是否标星',
PRIMARY KEY (id)
@@ -535,7 +535,7 @@ CREATE TABLE js_sys_msg_push
push_return_content text COMMENT '推送返回的内容信息',
push_status char(1) COMMENT '推送状态0未推送 1成功 2失败',
push_date datetime COMMENT '推送时间',
read_status char(1) COMMENT '读取状态0未送达 1读 2读)',
read_status char(1) COMMENT '读取状态0未送达 1读 2读)',
read_date datetime COMMENT '读取时间',
PRIMARY KEY (id)
) COMMENT = '消息推送表';
@@ -564,7 +564,7 @@ CREATE TABLE js_sys_msg_pushed
push_return_msg_id varchar(200) COMMENT '推送返回消息编号',
push_status char(1) COMMENT '推送状态0未推送 1成功 2失败',
push_date datetime COMMENT '推送时间',
read_status char(1) COMMENT '读取状态0未送达 1读 2读)',
read_status char(1) COMMENT '读取状态0未送达 1读 2读)',
read_date datetime COMMENT '读取时间',
PRIMARY KEY (id)
) COMMENT = '消息已推送表';
@@ -805,7 +805,7 @@ CREATE INDEX idx_sys_company_status ON js_sys_company (status ASC);
CREATE INDEX idx_sys_company_vc ON js_sys_company (view_code ASC);
CREATE INDEX idx_sys_company_pcs ON js_sys_company (parent_codes ASC);
CREATE INDEX idx_sys_company_tss ON js_sys_company (tree_sorts ASC);
CREATE INDEX idx_sys_config_key ON js_sys_config (config_key ASC);
CREATE UNIQUE INDEX idx_sys_config_key ON js_sys_config (config_key ASC);
CREATE INDEX idx_sys_dict_data_cc ON js_sys_dict_data (corp_code ASC);
CREATE INDEX idx_sys_dict_data_dt ON js_sys_dict_data (dict_type ASC);
CREATE INDEX idx_sys_dict_data_pc ON js_sys_dict_data (parent_code ASC);

View File

@@ -803,7 +803,7 @@ 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 UNIQUE 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);
@@ -1268,7 +1268,7 @@ COMMENT ON COLUMN js_sys_msg_inner_record.id IS '编号';
COMMENT ON COLUMN js_sys_msg_inner_record.msg_inner_id IS '所属消息';
COMMENT ON COLUMN js_sys_msg_inner_record.receive_user_code IS '接受者用户编码';
COMMENT ON COLUMN js_sys_msg_inner_record.receive_user_name IS '接受者用户姓名';
COMMENT ON COLUMN js_sys_msg_inner_record.read_status IS '读取状态0未送达 1读 2读)';
COMMENT ON COLUMN js_sys_msg_inner_record.read_status IS '读取状态0未送达 1读 2读)';
COMMENT ON COLUMN js_sys_msg_inner_record.read_date IS '阅读时间';
COMMENT ON COLUMN js_sys_msg_inner_record.is_star IS '是否标星';
COMMENT ON TABLE js_sys_msg_push IS '消息推送表';
@@ -1292,7 +1292,7 @@ COMMENT ON COLUMN js_sys_msg_push.push_return_msg_id IS '推送返回消息编
COMMENT ON COLUMN js_sys_msg_push.push_return_content IS '推送返回的内容信息';
COMMENT ON COLUMN js_sys_msg_push.push_status IS '推送状态0未推送 1成功 2失败';
COMMENT ON COLUMN js_sys_msg_push.push_date IS '推送时间';
COMMENT ON COLUMN js_sys_msg_push.read_status IS '读取状态0未送达 1读 2读)';
COMMENT ON COLUMN js_sys_msg_push.read_status IS '读取状态0未送达 1读 2读)';
COMMENT ON COLUMN js_sys_msg_push.read_date IS '读取时间';
COMMENT ON TABLE js_sys_msg_pushed IS '消息已推送表';
COMMENT ON COLUMN js_sys_msg_pushed.id IS '编号';
@@ -1315,7 +1315,7 @@ COMMENT ON COLUMN js_sys_msg_pushed.push_return_code IS '推送返回结果码';
COMMENT ON COLUMN js_sys_msg_pushed.push_return_msg_id IS '推送返回消息编号';
COMMENT ON COLUMN js_sys_msg_pushed.push_status IS '推送状态0未推送 1成功 2失败';
COMMENT ON COLUMN js_sys_msg_pushed.push_date IS '推送时间';
COMMENT ON COLUMN js_sys_msg_pushed.read_status IS '读取状态0未送达 1读 2读)';
COMMENT ON COLUMN js_sys_msg_pushed.read_status IS '读取状态0未送达 1读 2读)';
COMMENT ON COLUMN js_sys_msg_pushed.read_date IS '读取时间';
COMMENT ON TABLE js_sys_msg_template IS '消息模板';
COMMENT ON COLUMN js_sys_msg_template.id IS '编号';

View File

@@ -803,7 +803,7 @@ 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 UNIQUE 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);
@@ -1268,7 +1268,7 @@ COMMENT ON COLUMN js_sys_msg_inner_record.id IS '编号';
COMMENT ON COLUMN js_sys_msg_inner_record.msg_inner_id IS '所属消息';
COMMENT ON COLUMN js_sys_msg_inner_record.receive_user_code IS '接受者用户编码';
COMMENT ON COLUMN js_sys_msg_inner_record.receive_user_name IS '接受者用户姓名';
COMMENT ON COLUMN js_sys_msg_inner_record.read_status IS '读取状态0未送达 1读 2读)';
COMMENT ON COLUMN js_sys_msg_inner_record.read_status IS '读取状态0未送达 1读 2读)';
COMMENT ON COLUMN js_sys_msg_inner_record.read_date IS '阅读时间';
COMMENT ON COLUMN js_sys_msg_inner_record.is_star IS '是否标星';
COMMENT ON TABLE js_sys_msg_push IS '消息推送表';
@@ -1292,7 +1292,7 @@ COMMENT ON COLUMN js_sys_msg_push.push_return_msg_id IS '推送返回消息编
COMMENT ON COLUMN js_sys_msg_push.push_return_content IS '推送返回的内容信息';
COMMENT ON COLUMN js_sys_msg_push.push_status IS '推送状态0未推送 1成功 2失败';
COMMENT ON COLUMN js_sys_msg_push.push_date IS '推送时间';
COMMENT ON COLUMN js_sys_msg_push.read_status IS '读取状态0未送达 1读 2读)';
COMMENT ON COLUMN js_sys_msg_push.read_status IS '读取状态0未送达 1读 2读)';
COMMENT ON COLUMN js_sys_msg_push.read_date IS '读取时间';
COMMENT ON TABLE js_sys_msg_pushed IS '消息已推送表';
COMMENT ON COLUMN js_sys_msg_pushed.id IS '编号';
@@ -1315,7 +1315,7 @@ COMMENT ON COLUMN js_sys_msg_pushed.push_return_code IS '推送返回结果码';
COMMENT ON COLUMN js_sys_msg_pushed.push_return_msg_id IS '推送返回消息编号';
COMMENT ON COLUMN js_sys_msg_pushed.push_status IS '推送状态0未推送 1成功 2失败';
COMMENT ON COLUMN js_sys_msg_pushed.push_date IS '推送时间';
COMMENT ON COLUMN js_sys_msg_pushed.read_status IS '读取状态0未送达 1读 2读)';
COMMENT ON COLUMN js_sys_msg_pushed.read_status IS '读取状态0未送达 1读 2读)';
COMMENT ON COLUMN js_sys_msg_pushed.read_date IS '读取时间';
COMMENT ON TABLE js_sys_msg_template IS '消息模板';
COMMENT ON COLUMN js_sys_msg_template.id IS '编号';

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.jeesite</groupId>
<artifactId>jeesite-parent</artifactId>
<version>4.1.1-SNAPSHOT</version>
<version>4.1.3-SNAPSHOT</version>
<relativePath>../../parent/pom.xml</relativePath>
</parent>
@@ -85,41 +85,25 @@
</organization>
<repositories>
<repository>
<id>aliyun-repos</id>
<name>Aliyun Repository</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
<url>https://maven.aliyun.com/repository/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>
<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>
<url>https://maven.aliyun.com/repository/public</url>
</pluginRepository>
</pluginRepositories>
</project>

View File

@@ -14,8 +14,8 @@ import com.jeesite.common.tests.BaseInitDataTests;
import com.jeesite.modules.gen.entity.GenTable;
import com.jeesite.modules.gen.entity.GenTableColumn;
import com.jeesite.modules.gen.service.GenTableService;
import com.jeesite.modules.job.dao.JobDao;
import com.jeesite.modules.job.entity.JobEntity;
import com.jeesite.modules.job.service.JobService;
import com.jeesite.modules.msg.task.impl.MsgLocalMergePushTask;
import com.jeesite.modules.msg.task.impl.MsgLocalPushTask;
import com.jeesite.modules.sys.dao.RoleMenuDao;
@@ -374,7 +374,7 @@ public class InitCoreData extends BaseInitDataTests {
}
@Autowired
private JobService jobService;
private JobDao jobDao; // 默认情况下job是关闭状态需要注入jobDao
/**
* 初始化消息推送服务
*/
@@ -386,7 +386,7 @@ public class InitCoreData extends BaseInitDataTests {
job.setConcurrent(Global.NO);
job.setMisfireInstruction(CronTrigger.MISFIRE_INSTRUCTION_DO_NOTHING);
job.setStatus(JobEntity.STATUS_PAUSED);
jobService.insert(job);
jobDao.insert(job);
job = new JobEntity(MsgLocalMergePushTask.class.getSimpleName(), "SYSTEM");
job.setDescription("消息推送服务 (延迟推送)");
job.setInvokeTarget("msgLocalMergePushTask.execute()");
@@ -394,7 +394,7 @@ public class InitCoreData extends BaseInitDataTests {
job.setConcurrent(Global.NO);
job.setMisfireInstruction(CronTrigger.MISFIRE_INSTRUCTION_DO_NOTHING);
job.setStatus(JobEntity.STATUS_PAUSED);
jobService.insert(job);
jobDao.insert(job);
}
@Autowired

View File

@@ -1,61 +0,0 @@
///**
// * 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.file.entity.FileEntity;
//import com.jeesite.modules.file.service.FileEntityServiceSupport;
//
///**
// * 文件实体实现类
// * @author ThinkGem
// * @version 2018年10月13日
// */
//@Service
//public class FileEntityServiceImpl extends FileEntityServiceSupport {
//
// public FileEntityServiceImpl() {
// this.entityClass = FileEntity.class;
// }
//
// @Override
// public FileEntity get(FileEntity fileEntity) {
// System.out.println("============= fileEntity get ");
// return super.get(fileEntity);
// }
//
// @Override
// public FileEntity getByMd5(FileEntity fileEntity) {
// System.out.println("============= fileEntity getByMd5 ");
// return super.get(fileEntity);
// }
//
// @Override
// public List<FileEntity> findList(FileEntity fileEntity) {
// System.out.println("============= fileEntity findList ");
// return super.findList(fileEntity);
// }
//
// @Override
// public void save(FileEntity fileEntity) {
// System.out.println("============= fileEntity save ");
// super.save(fileEntity);
// }
//
// @Override
// public void updateStatus(FileEntity fileEntity) {
// System.out.println("============= fileEntity updateStatus ");
// super.updateStatus(fileEntity);
// }
//
// @Override
// public void delete(FileEntity fileEntity) {
// System.out.println("============= fileEntity delete ");
// super.delete(fileEntity);
// }
//
//}

View File

@@ -1,53 +0,0 @@
///**
// * 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);
// }
//
//}

View File

@@ -1,55 +0,0 @@
///**
// * 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.file.entity.FileUpload;
//import com.jeesite.modules.file.service.FileUploadServiceSupport;
//
///**
// * 文件上传实现类
// * @author ThinkGem
// * @version 2018年10月13日
// */
//@Service
//public class FileUploadServiceImpl extends FileUploadServiceSupport {
//
// public FileUploadServiceImpl() {
// this.entityClass = FileUpload.class;
// }
//
// @Override
// public FileUpload get(FileUpload fileUpload) {
// System.out.println("============= fileUpload get ");
// return super.get(fileUpload);
// }
//
// @Override
// public List<FileUpload> findList(FileUpload fileUpload) {
// System.out.println("============= fileUpload findList ");
// return super.findList(fileUpload);
// }
//
// @Override
// public void save(FileUpload fileUpload) {
// System.out.println("============= fileUpload save ");
// super.save(fileUpload);
// }
//
// @Override
// public void updateStatus(FileUpload fileUpload) {
// System.out.println("============= fileUpload updateStatus ");
// super.updateStatus(fileUpload);
// }
//
// @Override
// public void delete(FileUpload fileUpload) {
// System.out.println("============= fileUpload delete ");
// super.delete(fileUpload);
// }
//
//}

View File

@@ -1,49 +0,0 @@
///**
// * 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 MenuServiceImpl extends MenuServiceSupport {
//
// public MenuServiceImpl() {
// 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);
// }
//
//}

View File

@@ -1,43 +0,0 @@
///**
// * 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 RoleServiceImpl extends RoleServiceSupport {
//
// public RoleServiceImpl() {
// 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);
// }
//
//}

View File

@@ -1,49 +0,0 @@
///**
// * 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 UserServiceImpl extends UserServiceSupport {
//
// public UserServiceImpl() {
// 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);
// }
//
//}

View File

@@ -7,7 +7,6 @@ import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.jeesite.common.collect.ListUtils;
@@ -25,7 +24,6 @@ import com.jeesite.modules.sys.utils.EmpUtils;
* @author ThinkGem
* @version 2016-4-23
*/
@Service
@Transactional(readOnly=true)
public class CompanyServiceSupport extends TreeService<CompanyDao, Company>
implements CompanyService{
@@ -79,8 +77,12 @@ public class CompanyServiceSupport extends TreeService<CompanyDao, Company>
CompanyOffice where = new CompanyOffice();
where.setCompanyCode(company.getCompanyCode());
companyOfficeDao.deleteByEntity(where);
if (ListUtils.isNotEmpty(company.getCompanyOfficeList())){
companyOfficeDao.insertBatch(company.getCompanyOfficeList());
List<CompanyOffice> list = company.getCompanyOfficeList();
if (ListUtils.isNotEmpty(list)){
list.forEach(e -> {
e.setCompanyCode(company.getCompanyCode());
});
companyOfficeDao.insertBatch(list);
}
// 清理公司相关缓存
clearCompanyCache();

View File

@@ -8,7 +8,6 @@ import java.util.List;
import javax.validation.ConstraintViolationException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
@@ -34,7 +33,6 @@ import com.jeesite.modules.sys.utils.UserUtils;
* @author ThinkGem
* @version 2017-03-25
*/
@Service
@Transactional(readOnly=true)
public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
implements EmpUserService{

View File

@@ -6,7 +6,6 @@ package com.jeesite.modules.sys.service.support;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.jeesite.common.collect.ListUtils;
@@ -23,7 +22,6 @@ import com.jeesite.modules.sys.service.EmployeeService;
* @author ThinkGem
* @version 2017-03-25
*/
@Service
@Transactional(readOnly=true)
public class EmployeeServiceSupport extends CrudService<EmployeeDao, Employee>
implements EmployeeService{

View File

@@ -3,7 +3,6 @@
*/
package com.jeesite.modules.sys.service.support;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
@@ -18,7 +17,6 @@ import com.jeesite.modules.sys.service.LogService;
* @author ThinkGem
* @version 2014-05-16
*/
@Service
@Transactional(readOnly=true)
public class LogServiceSupport extends CrudService<LogDao, Log>
implements LogService{

View File

@@ -6,7 +6,6 @@ package com.jeesite.modules.sys.service.support;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.jeesite.common.service.TreeService;
@@ -21,7 +20,6 @@ import com.jeesite.modules.sys.utils.EmpUtils;
* @author ThinkGem
* @version 2016-4-23
*/
@Service
@Transactional(readOnly=true)
public class OfficeServiceSupport extends TreeService<OfficeDao, Office>
implements OfficeService{

View File

@@ -3,7 +3,6 @@
*/
package com.jeesite.modules.sys.service.support;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.jeesite.common.entity.Page;
@@ -17,7 +16,6 @@ import com.jeesite.modules.sys.service.PostService;
* @author ThinkGem
* @version 2017-03-25
*/
@Service
@Transactional(readOnly=true)
public class PostServiceSupport extends CrudService<PostDao, Post>
implements PostService{

View File

@@ -24,6 +24,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import com.jeesite.common.codec.DesUtils;
import com.jeesite.common.config.Global;
import com.jeesite.common.lang.StringUtils;
import com.jeesite.common.shiro.filter.FormAuthenticationFilter;
@@ -135,6 +136,11 @@ public class LoginController extends BaseController{
String exception = (String)request.getAttribute(FormAuthenticationFilter.DEFAULT_ERROR_KEY_ATTRIBUTE_NAME);
String message = (String)request.getAttribute(FormAuthenticationFilter.DEFAULT_MESSAGE_PARAM);
String secretKey = Global.getProperty("shiro.loginSubmit.secretKey");
if (StringUtils.isNotBlank(secretKey)){
username = DesUtils.decode(username, secretKey);
}
model.addAttribute(FormAuthenticationFilter.DEFAULT_USERNAME_PARAM, username);
model.addAttribute(FormAuthenticationFilter.DEFAULT_REMEMBER_ME_PARAM, rememberMe);
model.addAttribute(FormAuthenticationFilter.DEFAULT_REMEMBER_USERCODE_PARAM, rememberUserCode);
@@ -305,6 +311,15 @@ public class LoginController extends BaseController{
return "modules/sys/sysIndex";
}
/**
* 获取侧边栏菜单数据
*/
@RequiresPermissions("user")
@RequestMapping(value = "index/menuTree")
public String indexMenuTree(String parentCode) {
return "modules/sys/sysIndex/menuTree";
}
/**
* 获取当前用户权限字符串数据(移动端用)
*/
@@ -334,14 +349,11 @@ public class LoginController extends BaseController{
@RequiresPermissions("user")
@RequestMapping(value = "switch/{sysCode}")
public String switchSys(@PathVariable String sysCode) {
LoginInfo principal = UserUtils.getLoginInfo();
User user = UserUtils.get(principal.getId());
User user = UserUtils.getUser();
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);
}
Session session = UserUtils.getSession();
session.setAttribute("sysCode", sysCode);
UserUtils.removeCache(UserUtils.CACHE_AUTH_INFO+"_"+session.getId());
}
return REDIRECT + adminPath + "/index";
}

View File

@@ -148,15 +148,17 @@ public class OnlineController extends BaseController{
public String tickOut(String sessionId) {
Session session = sessionDAO.readSession(sessionId);
if (session != null){
@SuppressWarnings("unchecked")
Map<String, String> onlineTickOutMap = (Map<String, String>)CacheUtils.get("onlineTickOutMap");
Map<String, String> onlineTickOutMap = CacheUtils.get("onlineTickOutMap");
if (onlineTickOutMap == null){
onlineTickOutMap = MapUtils.newConcurrentMap();
}
PrincipalCollection pc = (PrincipalCollection)session.getAttribute(DefaultSubjectContext.PRINCIPALS_SESSION_KEY);
LoginInfo principal = (pc != null ? (LoginInfo)pc.getPrimaryPrincipal() : null);
if (principal != null){
onlineTickOutMap.put(principal.getId()+"_"+principal.getParam("deviceType", "PC"), StringUtils.EMPTY);
Object pc = session.getAttribute(DefaultSubjectContext.PRINCIPALS_SESSION_KEY);
if (pc != null && pc instanceof PrincipalCollection){
LoginInfo loginInfo = (LoginInfo)((PrincipalCollection)pc).getPrimaryPrincipal();
if (loginInfo != null){
String key = loginInfo.getId()+"_"+loginInfo.getParam("deviceType", "PC");
onlineTickOutMap.put(key, StringUtils.EMPTY);
}
}
CacheUtils.put("onlineTickOutMap", onlineTickOutMap);
sessionDAO.delete(session);

View File

@@ -0,0 +1,76 @@
/**
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
*/
package com.jeesite.modules.sys.web;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.authc.AuthenticationException;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import com.jeesite.common.codec.EncodeUtils;
import com.jeesite.common.lang.ObjectUtils;
import com.jeesite.common.shiro.authc.FormToken;
import com.jeesite.common.web.BaseController;
import com.jeesite.common.web.http.ServletUtils;
import com.jeesite.modules.sys.entity.User;
import com.jeesite.modules.sys.utils.UserUtils;
/**
* 单点登录Controller
* @author ThinkGem
* @version 2017-03-25
*/
@Controller
public class SsoController extends BaseController{
/**
* 单点登录(如已经登录,则直接跳转)
* @param username 登录用户名loginCode
* @param token 单点登录令牌令牌组成sso密钥+用户名+日期进行md5加密举例
* // 注意如果 shiro.sso.encryptKey 为 true则 secretKey 会自动加密。
* String secretKey = Global.getConfig("shiro.sso.secretKey");
* String token = Md5Utils.md5(secretKey + username + DateUtils.getDate("yyyyMMdd"));
* @param params 登录附加参数JSON格式或 param_ 前缀的请求参数。
* @param url 登录成功后跳转的url地址。
* @param relogin 是否强制重新登录需要强制重新登录传递true
* @see 调用示例:
* http://localhost/project/sso/{username}/{token}?url=/sys/user/list?p1=v1%26p2=v2&relogin=true
* 如果url中携带参数请使用转义字符如“&”号,使用“%26”转义。
*/
@RequestMapping(value = "sso/{username}/{token}")
public String sso(@PathVariable String username, @PathVariable String token,
@RequestParam(defaultValue="${adminPath}") String url, String relogin,
HttpServletRequest request, Model model){
User user = UserUtils.getUser();
// 如果已经登录,并且是同一个人,并且不强制重新登录,则直接跳转到目标页
if(StringUtils.isNotBlank(user.getUserCode())
&& StringUtils.equals(user.getLoginCode(), username)
&& !ObjectUtils.toBoolean(relogin)){
return REDIRECT + EncodeUtils.decodeUrl2(url);
}
// 通过令牌登录系统
if (token != null){
try {
FormToken upToken = new FormToken();
upToken.setUsername(username); // 登录用户名
upToken.setSsoToken(token); // 单点登录令牌
upToken.setParams(ServletUtils.getExtParams(request)); // 登录附加参数
UserUtils.getSubject().login(upToken);
return REDIRECT + EncodeUtils.decodeUrl2(url);
} catch (AuthenticationException e) {
if (!e.getMessage().startsWith("msg:")){
throw new AuthenticationException("msg:登录失败,请联系管理员。", e);
}
throw e;
}
}
return "error/403";
}
}

View File

@@ -30,7 +30,9 @@ import com.jeesite.common.lang.StringUtils;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import com.jeesite.common.web.BaseController;
import com.jeesite.modules.sys.entity.EmpUser;
import com.jeesite.modules.sys.entity.Role;
import com.jeesite.modules.sys.entity.User;
import com.jeesite.modules.sys.service.RoleService;
import com.jeesite.modules.sys.service.UserService;
import com.jeesite.modules.sys.utils.UserUtils;
@@ -46,6 +48,8 @@ public class CorpAdminController extends BaseController {
@Autowired
private UserService userService;
@Autowired
private RoleService roleService;
@ModelAttribute
public User get(String userCode, boolean isNewRecord) {
@@ -84,6 +88,10 @@ public class CorpAdminController extends BaseController {
user.setCorpName_(StringUtils.EMPTY); // 租户名称
}
}
// 获取当前用户所拥有的角色
Role role = new Role();
role.setUserCode(user.getUserCode());
model.addAttribute("roleList", roleService.findListByUserCode(role));
// 操作类型addCorp: 添加租户; addAdmin: 添加管理员; edit: 编辑
model.addAttribute("op", op);
model.addAttribute("user", user);
@@ -135,6 +143,7 @@ public class CorpAdminController extends BaseController {
}
}
userService.save(user);
userService.saveAuth(user);
// 如果修改的是当前用户,则清除当前用户缓存
if (user.getUserCode().equals(UserUtils.getUser().getUserCode())) {
UserUtils.clearCache();
@@ -260,8 +269,8 @@ public class CorpAdminController extends BaseController {
where.setCorpCode_(corpCode);
List<User> list = userService.findCorpList(where);
if (list.size() > 0){
Session session = UserUtils.getSession();
User user = list.get(0);
Session session = UserUtils.getSession();
session.setAttribute("corpCode", user.getCorpCode_());
session.setAttribute("corpName", user.getCorpName_());
return renderResult(Global.TRUE, "租户切换成功!");

View File

@@ -25,22 +25,24 @@ jdbc:
# 最大连接数
maxActive: 20
# 获取连接等待超时时间单位毫秒4.0.6+
# 获取连接等待超时时间,单位毫秒(1分钟4.0.6+
maxWait: 60000
# 从池中取出连接前进行检验,如果检验失败,则从池中去除连接并尝试取出另一个4.0.6+
# 从池中取出连接前进行检验如果检验失败则从池中去除连接并尝试取出另一个4.0.6+
testOnBorrow: false
testOnReturn: false
# 间隔多久才进行一次检测检测需要关闭的空闲连接单位毫秒4.0.6+
# 间隔多久才进行一次检测,检测需要关闭的空闲连接,单位毫秒(1分钟4.0.6+
timeBetweenEvictionRunsMillis: 60000
# 一个连接在池中最小生存的时间单位毫秒4.0.6+
minEvictableIdleTimeMillis: 300000
# 一个连接在池中最小空闲的时间,单位毫秒(20分钟4.0.6+
minEvictableIdleTimeMillis: 1200000
# 一个连接在池中最大空闲的时间单位毫秒30分钟4.1.2+
maxEvictableIdleTimeMillis: 1800000
# 配置是否自动回收超时连接超时时间,单位秒 4.0.6+
# 是否自动回收泄露的连接超时时间,单位秒35分钟4.0.6+
removeAbandoned: true
removeAbandonedTimeout: 1800
removeAbandonedTimeout: 2100
# JTA 分布式事务v4.0.4+
jta:
@@ -98,11 +100,11 @@ user:
# 系统管理员角色编号(客户方管理员使用的角色)
corpAdminRoleCode: corpAdmin
# 用户类型配置信息employee员工member会员btype往来单位persion个人expert专家...
# JSON格式说明{"用户类型":{"dao":"Dao的Bean名称","loginView":"登录视图","indexView":"主框架面视图"}}
# 用户类型配置信息employee员工member会员btype往来单位persion个人expert专家...JSON 格式说明如下:
# {"用户类型":{"dao":"Dao的Bean名称","loginView":"登录页面视图","indexView":"主框架面视图,支持 redirect: 前缀"}}
userTypeMap: >
{
"employee":{"dao":"employeeDao","loginView":"","indexView":""},
"employee":{"dao":"employeeDao","loginView":"","indexView":"modules/sys/sysIndex"},
"member":{"dao":"memberDao","loginView":"","indexView":"modules/sys/sysIndexMember"},
"btype":{"dao":"btypeInfoDao","loginView":"","indexView":"modules/sys/sysIndexBtype"},
"persion":{"dao":"persionDao","loginView":"","indexView":"modules/sys/sysIndexPersion"},
@@ -200,11 +202,16 @@ menu:
# 国际化管理(专业版)
lang:
enabled: true
enabled: false
# 默认语言4.1.3+
defaultLocale: zh_CN
# 默认时区4.1.3+
defaultTimeZone: GMT+08:00
# 任务调度(个人版)
job:
enabled: true
enabled: false
# 是否自动启动任务调度(可关闭)
autoStartup: true
@@ -274,7 +281,7 @@ shiro:
logoutUrl: ${shiro.loginUrl}
successUrl: ${adminPath}/index
# # Jasig CAS 相关配置(个人版)
# # Apereo CAS 相关配置(个人版)
# casServerUrl: http://127.0.0.1:8981/cas
# casClientUrl: http://127.0.0.1:8980/js
# loginUrl: ${shiro.casServerUrl}?service=${shiro.casClientUrl}${adminPath}/login-cas
@@ -310,6 +317,9 @@ shiro:
# 是否允许账号多地登录如果设置为false同一个设备类型的其它地点登录的相同账号被踢下线
isAllowMultiAddrLogin: true
# 是否允许多账号多设备登录如果设置为false其它地点登录的相同账号全部登录设备将被踢下线
isAllowMultiDeviceLogin: true
# 是否允许刷新主框架页如果设置为false刷新主页将导致重新登录。如安全性比较高的如银行个人首页不允许刷新。
isAllowRefreshIndex: true
@@ -420,6 +430,7 @@ web:
${adminPath}/index,
${adminPath}/login,
${adminPath}/desktop,
${adminPath}/index/menuTree,
${adminPath}/sys/online/count,
${adminPath}/state/server/rtInfo,
${adminPath}/**/treeData,
@@ -474,17 +485,33 @@ file:
# 上传单个文件最大字节500M在这之上还有 > Tomcat限制 > Nginx限制此设置会覆盖 spring.http.multipart.maxFileSize 设置
maxFileSize: 500*1024*1024
#设置允许上传的文件后缀
# 设置允许上传的文件后缀
imageAllowSuffixes: .gif,.bmp,.jpeg,.jpg,.ico,.png,.tif,.tiff,
mediaAllowSuffixes: .flv,.swf,.mkv,webm,.mid,.mov,.mp3,.mp4,.m4v,.mpc,.mpeg,.mpg,.swf,.wav,.wma,.wmv,.avi,.rm,.rmi,.rmvb,.aiff,.asf,.ogg,.ogv,
fileAllowSuffixes: .doc,.docx,.rtf,.xls,.xlsx,.csv,.ppt,.pptx,.pdf,.vsd,.txt,.md,.xml,.rar,.zip,7z,.tar,.tgz,.jar,.gz,.gzip,.bz2,.cab,.iso,.ipa,.apk,
#允许上传的文件内容类型图片、word、excel、ppt防止修改后缀恶意上传文件默认不启用验证
# 允许上传的文件内容类型图片、word、excel、ppt防止修改后缀恶意上传文件默认不启用验证
# allowContentTypes: image/jpeg,image/gif,image/bmp,image/png,image/x-png,
# application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,
# application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,
# application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation
# 是否用文件流方式下载(支持断点续传)
isFileStreamDown: true
# 视频转码
video:
# 视频格式转换 ffmpeg.exe 所放的路径
ffmpegFile: d:/tools/video/ffmpeg-4.9/bin/ffmpeg.exe
# ffmpegFile: d:/tools/video/libav-10.6-win64/bin/avconv.exe
# 视频格式转换 mencoder.exe 所放的路径
mencoderFile: d:/tools/video/mencoder-4.9/mencoder.exe
# 将mp4视频的元数据信息转到视频第一帧
qtFaststartFile: d:/tools/video/qt-faststart/qt-faststart.exe
#======================================#
#========== Message settings ==========#
#======================================#
@@ -539,18 +566,3 @@ msg:
oauth:
redirectUri: http://demo.jeesite.com/js
#======================================#
#========== Video settings ============#
#======================================#
video:
# 视频格式转换 ffmpeg.exe 所放的路径
ffmpegFile: d:/tools/video/ffmpeg-4.9/bin/ffmpeg.exe
# ffmpegFile: d:/tools/video/libav-10.6-win64/bin/avconv.exe
# 视频格式转换 mencoder.exe 所放的路径
mencoderFile: d:/tools/video/mencoder-4.9/mencoder.exe
# 将mp4视频的元数据信息转到视频第一帧
qtFaststartFile: d:/tools/video/qt-faststart/qt-faststart.exe

View File

@@ -11,7 +11,10 @@
<!-- <logger name="org.springframework.jdbc" level="DEBUG" /> -->
<logger name="org.mybatis.spring.transaction" level="DEBUG" />
<logger name="com.atomikos.icatch.config.UserTransactionServiceImp" level="ERROR" />
<logger name="com.atomikos.icatch.provider.imp.AssemblerImp" level="ERROR" />
<logger name="com.atomikos.jdbc.AbstractDataSourceBean" level="ERROR" />
<logger name="com.atomikos.jdbc.AtomikosConnectionProxy" level="ERROR" />
<!-- <logger name="org.springframework.transaction.support.TransactionSynchronizationManager" level="TRACE" /> -->
<logger name="springfox.documentation.spring.web.readers.parameter.ParameterDataTypeReader" level="ERROR" />
<!-- <logger name="io.swagger" level="DEBUG" /> -->
@@ -20,6 +23,7 @@
<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.cache" level="INFO" />
<logger name="com.jeesite.common.j2cache" level="INFO" />
<logger name="com.jeesite.common.mybatis" level="INFO" />
<logger name="com.jeesite.common.mybatis.mapper" level="DEBUG" />

View File

@@ -2,5 +2,3 @@
UPDATE ${_prefix}sys_menu SET permission='sys:stste:cache' WHERE permission='sys:stste:ehcache';
UPDATE ${_prefix}sys_menu SET menu_href='/state/cache/index' WHERE menu_href='/state/ehcache';
UPDATE ${_prefix}sys_menu SET menu_href='/state/server/index' WHERE menu_href='/state/server';
commit;

View File

@@ -0,0 +1,8 @@
-- 将config表的key设置为唯一索引
DROP INDEX [idx_sys_config_key] ON [${_prefix}sys_config];
CREATE UNIQUE INDEX [idx_sys_config_key] ON [${_prefix}sys_config] ([config_key]);
-- 新增主导航菜单显示风格配置
INSERT INTO ${_prefix}sys_config(id, config_name, config_key, config_value, is_sys, create_by, create_date, update_by, update_date, remarks)
VALUES ('1092344803460943872', '主框架页-主导航菜单显示风格', 'sys.index.menuStyle', '1', '0', 'system', getdate(), 'system', getdate(), '1菜单全部在左侧2根菜单显示在顶部');

View File

@@ -0,0 +1,10 @@
-- 将config表的key设置为唯一索引
ALTER TABLE ${_prefix}sys_config DROP INDEX idx_sys_config_key;
ALTER TABLE ${_prefix}sys_config ADD UNIQUE INDEX idx_sys_config_key(config_key);
-- 新增主导航菜单显示风格配置
INSERT INTO ${_prefix}sys_config(id, config_name, config_key, config_value, is_sys, create_by, create_date, update_by, update_date, remarks)
VALUES ('1092344803460943872', '主框架页-主导航菜单显示风格', 'sys.index.menuStyle', '1', '0', 'system', now(), 'system', now(), '1菜单全部在左侧2根菜单显示在顶部');
commit;

View File

@@ -0,0 +1,10 @@
-- 将config表的key设置为唯一索引
DROP INDEX idx_sys_config_key;
CREATE UNIQUE INDEX idx_sys_config_key ON ${_prefix}sys_config (config_key);
-- 新增主导航菜单显示风格配置
INSERT INTO ${_prefix}sys_config(id, config_name, config_key, config_value, is_sys, create_by, create_date, update_by, update_date, remarks)
VALUES ('1092344803460943872', '主框架页-主导航菜单显示风格', 'sys.index.menuStyle', '1', '0', 'system', sysdate, 'system', sysdate, '1菜单全部在左侧2根菜单显示在顶部');
commit;

View File

@@ -0,0 +1,10 @@
-- 将config表的key设置为唯一索引
DROP INDEX idx_sys_config_key;
CREATE UNIQUE INDEX idx_sys_config_key ON ${_prefix}sys_config (config_key);
-- 新增主导航菜单显示风格配置
INSERT INTO ${_prefix}sys_config(id, config_name, config_key, config_value, is_sys, create_by, create_date, update_by, update_date, remarks)
VALUES ('1092344803460943872', '主框架页-主导航菜单显示风格', 'sys.index.menuStyle', '1', '0', 'system', now(), 'system', now(), '1菜单全部在左侧2根菜单显示在顶部');
commit;

View File

@@ -7,4 +7,6 @@
4.0.6
4.0.7
4.1.0
4.1.1
4.1.1
4.1.2
4.1.3

View File

@@ -60,7 +60,7 @@ sys.error.returnButton=返回上一页
# =========== 文件上传相关 ===========
sys.file.uploadFileIsEmpty=没有需要上传的文件!
sys.file.uploadFileIsEmpty=没有找到上传的文件!
sys.file.uploadValidNotBlank=文件校验码和文件名不能为空!
sys.file.uploadValidImage=只能上传图片({0}
sys.file.uploadValidVideo=只能上传视频({0}

View File

@@ -1,4 +1,11 @@
# transactions.properties not found - looking for jta.properties in classpath...
com.atomikos.icatch.service=com.atomikos.icatch.standalone.UserTransactionServiceFactory
com.atomikos.icatch.max_actives=-1
com.atomikos.icatch.enable_logging=false
com.atomikos.icatch.enable_logging=false
com.atomikos.icatch.registered=true
# 提示 oracle.jdbc.xa.OracleXAResource.recover 错误需要授权:
#grant select on sys.dba_pending_transactions to jeesite;
#grant select on sys.pending_trans$ to jeesite;
#grant select on sys.dba_2pc_pending to jeesite;
#grant execute on sys.dbms_system to jeesite;

View File

@@ -0,0 +1,18 @@
/*!
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
*
* 国际化文件
* @author ThinkGem
* @version 2017-12-24
*/
(function($) {
window.js = window.js || {};
js.i18n = $.extend({}, js.i18n, {
'tabpanel.newTabPage':'New Page',
'loading.message':'Loading ...',
'loading.submitMessage':'Submission ...',
'showMessage.error':'failure,error',
'showMessage.success':'success,completion',
'showMessage.warning':'no'
});
})(jQuery);

View File

@@ -0,0 +1,18 @@
/*!
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
*
* 国际化文件
* @author ThinkGem
* @version 2017-12-24
*/
(function($) {
window.js = window.js || {};
js.i18n = $.extend({}, js.i18n, {
'tabpanel.newTabPage':'新页签',
'loading.message':'正在加载,请稍后...',
'loading.submitMessage':'正在提交,请稍后...',
'showMessage.error':'失败,错误,未完成',
'showMessage.success':'成功,完成',
'showMessage.warning':'不能,不允许,必须,已存在,不需要,不正确'
});
})(jQuery);

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved. -->
<config>
<!-- 模板分类 -->
<tplCategory>
@@ -15,34 +16,29 @@
<category value="treeGrid" label="树表/树结构表(增删改查)">
<template>category-ref:crud</template>
</category>
<category value="service" label="业务层和持久层(增删改查">
<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>
<template>crud/dao.xml</template>
</category>
<category value="query" label="仅查询功能(不含增删改)">
<template>crud/mapper.xml</template>
<template>crud/entity.xml</template>
<template>query/dao.xml</template>
<template>query/service.xml</template>
<template>query/controller.xml</template>
<template>query/viewList.xml</template>
<template>query/viewForm.xml</template>
<childTable>
<template>crud/mapper.xml</template>
<template>crud/entity.xml</template>
<template>query/dao.xml</template>
</childTable>
</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>

View File

@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved. -->
<template>
<name>controller</name>
<filePath>src/main/java/${packageName}/${moduleName}/web/${subModuleName}</filePath>
@@ -89,7 +90,7 @@ public class ${ClassName}Controller extends BaseController {
${className}.setParentCode(${ClassName}.ROOT_CODE);
}
<% for(c in table.columnList){ %>
<% if(c.isQuery == "1" && !c.isTreeEntityColumn){ %>
<% if(c.isQuery == "1" && !c.isTreeEntityColumn && c.attrName != 'status'){ %>
if (StringUtils.isNotBlank(${className}.${c.attrNameForGetMethod})){
${className}.setParentCode(null);
}
@@ -101,7 +102,7 @@ public class ${ClassName}Controller extends BaseController {
<% }else{ %>
public Page<${ClassName}> listData(${ClassName} ${className}, HttpServletRequest request, HttpServletResponse response) {
${className}.setPage(new Page<>(request, response));
Page<${ClassName}> page = ${className}Service.findPage(${className});
Page<${ClassName}> page = ${className}Service.findPage(${className});
return page;
}
<% } %>

View File

@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved. -->
<template>
<name>dao</name>
<filePath>src/main/java/${packageName}/${moduleName}/dao/${subModuleName}</filePath>
@@ -18,7 +19,7 @@ import ${packageName}.${moduleName}.entity${isNotEmpty(subModuleName)?'.'+subMod
* @author ${functionAuthor}
* @version ${functionVersion}
*/
@MyBatisDao<% if(table.dataSourceName != ''){ %>(dataSourceName="${table.dataSourceName}")<% } %>
@MyBatisDao<% if(isNotBlank(table.dataSourceName)){ %>(dataSourceName="${table.dataSourceName}")<% } %>
public interface ${ClassName}Dao extends ${table.isTreeEntity?'Tree':'Crud'}Dao<${ClassName}> {
}]]>

View File

@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved. -->
<template>
<name>entity</name>
<filePath>src/main/java/${packageName}/${moduleName}/entity/${subModuleName}</filePath>
@@ -30,41 +31,41 @@ import com.jeesite.common.mybatis.mapper.query.QueryType;
<%
var isBase = false, isData = false,
isTree = false, isExtend = false;
// 生成字段属性
// 生成字段属性
for(c in table.columnList){
// 如果是BaseEntity类属性
if(c.isBaseEntityColumn){
// 如果是BaseEntity类属性
if(table.isBaseEntity && c.isBaseEntityColumn){
if(!isBase){
isBase = true;
%>
@Column(includeEntity=BaseEntity.class),
<%
}
// 如果是DataEntity类属性
}else if(c.isDataEntityColumn){
// 如果是DataEntity类属性
}else if(table.isDataEntity && c.isDataEntityColumn){
if(!isData){
isData = true;
%>
@Column(includeEntity=DataEntity.class),
<%
}
// 如果是TreeEntity类属性
}else if(c.isTreeEntityColumn){
// 如果是TreeEntity类属性
}else if(table.isTreeEntity && c.isTreeEntityColumn){
if(!isTree){
isTree = true;
%>
@Column(includeEntity=TreeEntity.class),
<%
}
// 如果是Extend类属性
}else if(c.isExtendColumn){
// 如果是Extend类属性
}else if(table.isExtendEntity && c.isExtendColumn){
if(!isExtend){
isExtend = true;
%>
@Column(includeEntity=Extend.class, attrName="extend"),
<%
}
// 其它情况下
// 其它情况下
}else{
// 容错,如果没有设置父表的主键属性,则设置
if(!@StringUtils.contains(c.attrName, ".")){
@@ -83,17 +84,17 @@ import com.jeesite.common.mybatis.mapper.query.QueryType;
if (c.isPk == @Global.YES){
print(', isPK=true');
}else{
if (c.isInsert == @Global.NO){
if (c.isInsert != @Global.YES){
print(', isInsert=false');
}
if (c.isUpdate == @Global.NO){
if (c.isUpdate != @Global.YES){
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){
if (c.isQuery != @Global.YES){
print(', isQuery=false');
}
if (c.attrName == table.treeViewNameAttrName){
@@ -106,7 +107,7 @@ import com.jeesite.common.mybatis.mapper.query.QueryType;
}
%>
}, <%
// 关联系统
// ◆ 生成关联表
var joinTables = '';
for(c in table.columnList){
if (c.attrType == 'com.jeesite.modules.sys.entity.User'){
@@ -139,6 +140,7 @@ import com.jeesite.common.mybatis.mapper.query.QueryType;
print(joinTables);
print('\t}, ');
}
// ◆ 生成排序字段
%>orderBy="<% if (isTree){
%>a.tree_sorts<%
for(pk in table.pkList){
@@ -162,7 +164,7 @@ public class ${ClassName} extends ${table.isTreeEntity?'Tree':'Data'}Entity<${Cl
// 生成字段属性
for(c in table.columnList){
// 如果是Extend类属性
if(c.isExtendColumn){
if(table.isExtendEntity && c.isExtendColumn){
if(!isExtend){
isExtend = true;
%>

View File

@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved. -->
<template>
<name>mapper</name>
<filePath>src/main/resources/mappings/${lastPackageName}/${moduleName}/${subModuleName}</filePath>

View File

@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved. -->
<template>
<name>service</name>
<filePath>src/main/java/${packageName}/${moduleName}/service/${subModuleName}</filePath>

View File

@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved. -->
<template>
<name>viewForm</name>
<filePath>src/main/resources/views/${lastPackageName}/${moduleName}/${subModuleName}</filePath>

View File

@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved. -->
<template>
<name>viewList</name>
<filePath>src/main/resources/views/${lastPackageName}/${moduleName}/${subModuleName}</filePath>
@@ -33,113 +34,6 @@
</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>&nbsp;');
<% 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>&nbsp;');
}
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>&nbsp;');
}
<% } %>
<% 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>&nbsp;');
<% } %>
<% 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>&nbsp;');
<% } %>
\<% } %>
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>]]>
<% include('/templates/modules/gen/include/dataGridScript.html'){} %>]]>
</content>
</template>

View File

@@ -0,0 +1,114 @@
<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 + '+\'';
}
// 是否仅查询模板
var isQueryTpl = table.tplCategory == 'query';
// 生成树表的节点列
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("${isQueryTpl?'查看':'编辑'}${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("${isQueryTpl?'查看':'编辑'}${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(isQueryTpl){ %>
actions.push('<a href="\${ctx}/${urlPrefix}/form?${idParam}" class="btnList" title="\${text("查看${functionNameSimple}")}"><i class="fa fa-file-text-o"></i></a>&nbsp;');
<% }else{ %>
\<% if(hasPermi('${permissionPrefix}:edit')){ %>
actions.push('<a href="\${ctx}/${urlPrefix}/form?${idParam}" class="btnList" title="\${text("编辑${functionNameSimple}")}"><i class="fa fa-pencil"></i></a>&nbsp;');
<% 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>&nbsp;');
}
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>&nbsp;');
}
<% } %>
<% 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>&nbsp;');
<% } %>
<% 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>&nbsp;');
<% } %>
\<% } %>
<% } %>
return actions.join('');
}}
],
<% if(table.isTreeEntity){ %>
treeGrid: true, // 启用树结构表格
defaultExpandLevel: 0, // 默认展开的层次
expandNodeClearPostData: '<%
for(c in table.columnList){
if(c.isQuery == "1" && !c.isTreeEntityColumn && c.attrName != 'status'){
print(c.attrName + ',');
}
} %>', // 展开节点清理请求参数数据(一般设置查询条件的字段属性,否则在查询后,不能展开子节点数据)
<% } %>
// 加载成功后执行事件
ajaxSuccess: function(data){
}
});
</script>

View File

@@ -5,9 +5,11 @@
<h4 class="form-unit">\${text('${child.comments}')}</h4>
<div class="ml10 mr10">
<table id="${@StringUtils.uncap(child.className)}DataGrid"></table>
<% if(table.tplCategory != 'query'){ %>
\<% 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>
<%
}

View File

@@ -26,7 +26,7 @@ for (c in child.columnList){
// 如果是外键,父级的主键
if(child.parentExists && child.parentTableFkName == c.columnName){
%>
{header:'\${text('${c.columnLabel}')}', name:'${c.attrName}', editable:true, hidden:true},
{header:'\${text("${c.columnLabel}")}', name:'${c.attrName}', editable:true, hidden:true},
<%
continue;
}
@@ -49,15 +49,15 @@ for (c in child.columnList){
}
// 输出列字段
if(c.showType == 'input'){
%> {header:'\${text('${c.columnLabel}')}', name:'${c.attrName}', width:150, editable:true, edittype:'text', editoptions:{${attrs}'class':'form-control${cssClass}'}},
%> {header:'\${text("${c.columnLabel}")}', name:'${c.attrName}', width:150, editable:true, edittype:'text', editoptions:{${attrs}'class':'form-control${cssClass}'}},
<%
}else if(c.showType == 'textarea'){
%>
{header:'\${text('${c.columnLabel}')}', name:'${c.attrName}', width:150, editable:true, edittype:'textarea', editoptions:{${attrs}'class':'form-control${cssClass}', 'rows':'1'}},
{header:'\${text("${c.columnLabel}")}', name:'${c.attrName}', width:150, editable:true, edittype:'textarea', editoptions:{${attrs}'class':'form-control${cssClass}', 'rows':'1'}},
<%
}else if(c.showType == 'select' || c.showType == 'select_multiple' || c.showType == 'radio' || c.showType == 'checkbox'){
%>
{header:'\${text('${c.columnLabel}')}', name:'${c.attrName}', width:100,
{header:'\${text("${c.columnLabel}")}', name:'${c.attrName}', width:100,
editable:true, edittype:'select', editoptions:{<%if (c.showType == 'select_multiple' || c.showType == 'checkbox'){ %>multiple:true, <% } %>'class':'form-control${cssClass}',
items: $.merge([<%if (!(c.showType == 'select_multiple' || c.showType == 'checkbox')){ %>{dictLabel:'&nbsp;',dictValue:''}<% } %>], \${@DictUtils.getDictListJson('${c.optionMap['dictType']}')}),
itemLabel: 'dictLabel', itemValue: 'dictValue', dataInit: function(element){
@@ -69,18 +69,18 @@ for (c in child.columnList){
}else if(c.showType == 'date' || c.showType == 'datetime'){
var isTime = (c.showType == 'datetime');
%>
{header:'\${text('${c.columnLabel}')}', name:'${c.attrName}', width:150,
{header:'\${text("${c.columnLabel}")}', name:'${c.attrName}', width:150,
formatter:'date', formatoptions:{srcformat:'Y-m-d H:i:s',newformat:'Y-m-d${isTime?' H:i:s':''}'},
editable:true, edittype:'text', editoptions:{'class':'form-control Wdate${cssClass}', 'readonly':'true',
dataInit: function(element){ $(element).on('focus', function(){
WdatePicker({dateFmt:'yyyy-MM-dd${isTime?' HH:mm':''}',isShowClear:false});
WdatePicker({dateFmt:'yyyy-MM-dd${isTime?' HH:mm':''}',isShowClear:${c.isRequired != '1'}});
});
}}
},
<%
}else if(c.showType == 'userselect'){
treeselectExists = true; %>
{header:'\${text('${c.columnLabel}')}', name:'${c.simpleAttrName}', width:150,
{header:'\${text("${c.columnLabel}")}', name:'${c.simpleAttrName}', width:150,
formatter: function(val, obj, row, act){
return js.val(row, '${c.attrName}')+'|'+js.val(row, '${c.attrName2}');
}, editable: true, edittype: "custom", editoptions: {
@@ -98,7 +98,7 @@ for (c in child.columnList){
}else if(c.showType == 'officeselect'){
treeselectExists = true;
%>
{header:'\${text('${c.columnLabel}')}', name:'${c.simpleAttrName}', width:150,
{header:'\${text("${c.columnLabel}")}', name:'${c.simpleAttrName}', width:150,
formatter: function(val, obj, row, act){
return js.val(row, '${c.attrName}')+'|'+js.val(row, '${c.attrName2}');
}, editable: true, edittype: "custom", editoptions: {
@@ -116,7 +116,7 @@ for (c in child.columnList){
}else if(c.showType == 'areaselect'){
treeselectExists = true;
%>
{header:'\${text('${c.columnLabel}')}', name:'${c.simpleAttrName}', width:150,
{header:'\${text("${c.columnLabel}")}', name:'${c.simpleAttrName}', width:150,
formatter: function(val, obj, row, act){
return js.val(row, '${c.attrName}')+'|'+js.val(row, '${c.attrName2}');
}, editable: true, edittype: "custom", editoptions: {
@@ -133,16 +133,20 @@ for (c in child.columnList){
<%
}
}
if (table.tplCategory != 'query'){
%>
{header:'\${text('操作')}', name:'actions', width:80, sortable:false, fixed:true, formatter: function(val, obj, row, act){
{header:'\${text("操作")}', name:'actions', width:80, sortable:false, fixed:true, formatter: function(val, obj, row, act){
var actions = [];
if (val == 'new'){
actions.push('<a href="#" onclick="js.confirm(\'\${text('你确认要删除这条数据吗')}\', function(){$(\'#${@StringUtils.uncap(child.className)}DataGrid\').dataGrid(\'delRowData\',\''+obj.rowId+'\')});return false;"><i class="fa fa-trash-o"></i></a>&nbsp;');
actions.push('<a href="#" onclick="js.confirm(\'\${text("你确认要删除这条数据吗")}\', function(){$(\'#${@StringUtils.uncap(child.className)}DataGrid\').dataGrid(\'delRowData\',\''+obj.rowId+'\')});return false;"><i class="fa fa-trash-o"></i></a>&nbsp;');
}else{
actions.push('<a href="#" onclick="js.confirm(\'\${text('你确认要删除这条数据吗')}\', function(){$(\'#${@StringUtils.uncap(child.className)}DataGrid\').dataGrid(\'setRowData\',\''+obj.rowId+'\',null,{display:\'none\'})});$(\'#'+obj.rowId+'_status\').val(\''+Global.STATUS_DELETE+'\');return false;"><i class="fa fa-trash-o"></i></a>&nbsp;');
actions.push('<a href="#" onclick="js.confirm(\'\${text("你确认要删除这条数据吗")}\', function(){$(\'#${@StringUtils.uncap(child.className)}DataGrid\').dataGrid(\'setRowData\',\''+obj.rowId+'\',null,{display:\'none\'});$(\'#'+obj.rowId+'_status\').val(\''+Global.STATUS_DELETE+'\');});return false;"><i class="fa fa-trash-o"></i></a>&nbsp;');
}
return actions.join('');
}, editoptions: {defaultValue: 'new'}}
<% }else{ %>
{header:'\${text("操作")}', name:'actions', hidden: true}
<% } %>
],
// 编辑表格参数

View File

@@ -131,7 +131,7 @@
var isTime = (c.showType == 'datetime');
%>
<${'#'}form:input path="${c.attrName}" readonly="true" maxlength="20" class="form-control Wdate${cssClass}"
dataFormat="date${isTime?'time':''}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd${isTime?' HH:mm':''}',isShowClear:false});"/>
dataFormat="date${isTime?'time':''}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd${isTime?' HH:mm':''}',isShowClear:${c.isRequired != '1'}});"/>
<%
} else if (c.showType == 'userselect') {
%>

View File

@@ -0,0 +1,158 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved. -->
<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.web.bind.annotation.ModelAttribute;
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 && c.attrName != 'status'){ %>
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) {
model.addAttribute("${className}", ${className});
return "${lastPackageName}/${viewPrefix}Form";
}
<% 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;
}
<% } %>
}]]>
</content>
</template>

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved. -->
<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':'Query'}Dao;
import com.jeesite.common.mybatis.annotation.MyBatisDao;
import ${packageName}.${moduleName}.entity${isNotEmpty(subModuleName)?'.'+subModuleName:''}.${ClassName};
/**
* ${functionName}DAO接口
* @author ${functionAuthor}
* @version ${functionVersion}
*/
@MyBatisDao<% if(isNotBlank(table.dataSourceName)){ %>(dataSourceName="${table.dataSourceName}")<% } %>
public interface ${ClassName}Dao extends ${table.isTreeEntity?'Tree':'Query'}Dao<${ClassName}> {
}]]>
</content>
</template>

View File

@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved. -->
<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 com.jeesite.common.entity.Page;
import com.jeesite.common.service.${table.isTreeEntity?'Tree':'Query'}Service;
import ${packageName}.${moduleName}.entity${isNotEmpty(subModuleName)?'.'+subModuleName:''}.${ClassName};
import ${packageName}.${moduleName}.dao${isNotEmpty(subModuleName)?'.'+subModuleName:''}.${ClassName}Dao;
<% 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
public class ${ClassName}Service extends ${table.isTreeEntity?'Tree':'Query'}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});
}
<% } %>
}]]>
</content>
</template>

View File

@@ -0,0 +1,62 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved. -->
<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">
<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'){} %>]]>
</content>
</template>

View File

@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013-Now http://jeesite.com All rights reserved. -->
<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>
<% } %>
</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>
\<% } %>
<% include('/templates/modules/gen/include/dataGridScript.html'){} %>]]>
</content>
</template>

View File

@@ -1,4 +1,4 @@
<%
<%/* Copyright (c) 2013-Now http://jeesite.com All rights reserved. */
@servlet.getResponse().setStatus(400);
var message = @ObjectUtils.toString(@request.getAttribute('message'));

View File

@@ -1,4 +1,4 @@
<%
<%/* Copyright (c) 2013-Now http://jeesite.com All rights reserved. */
@servlet.getResponse().setStatus(403);
var message = @ObjectUtils.toString(@request.getAttribute("message"));

View File

@@ -1,4 +1,4 @@
<%
<%/* Copyright (c) 2013-Now http://jeesite.com All rights reserved. */
@servlet.getResponse().setStatus(responseStatus!404);
var message = @ObjectUtils.toString(@request.getAttribute("message"));

View File

@@ -1,4 +1,4 @@
<%
<%/* Copyright (c) 2013-Now http://jeesite.com All rights reserved. */
@servlet.getResponse().setStatus(500);
var message = @ObjectUtils.toString(@request.getAttribute("message"));

View File

@@ -9,3 +9,6 @@ content="width=device-width, initial-scale=1, user-scalable=1" name="viewport"/>
<script src="${ctxStatic}/jquery/jquery-1.12.4.min.js"></script>
<script src="${ctxStatic}/jquery/jquery-migrate-1.4.1.min.js"></script>
<!--[if lt IE 9]><script src="${ctxStatic}/common/h5fix.min.js"></script><![endif]-->
<% if(parameter.__layer! == 'true'){ %>
<style>.main-content>.box-main>.box-header{display:none;}</style>
<% } %>

View File

@@ -58,29 +58,29 @@
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
columnModel: [
{header:'${text('公司名称')}', name:'companyName', index:'a.company_name', width:250, align:"left", frozen:true, formatter: function(val, obj, row, act){
return '( '+row.viewCode+' ) '+'<a href="${ctx}/sys/company/form?companyCode='+row.companyCode+'" class="btnList" data-title="${text('编辑公司')}">'+(val||row.id)+'</a>';
{header:'${text("公司名称")}', name:'companyName', index:'a.company_name', width:250, align:"left", frozen:true, formatter: function(val, obj, row, act){
return '( '+row.viewCode+' ) '+'<a href="${ctx}/sys/company/form?companyCode='+row.companyCode+'" class="btnList" data-title="${text("编辑公司")}">'+(val||row.id)+'</a>';
}},
{header:'${text('公司全称')}', name:'fullName', index:'a.full_name', width:200, align:"left"},
{header:'${text('排序号')}', name:'treeSort', index:'a.tree_sort', width:80, align:"center"},
{header:'${text('归属区域')}', name:'area.treeNames', index:'a.areaCode', width:200, align:"center"},
{header:'${text('更新时间')}', name:'updateDate', index:'a.update_date', width:200, align:"center"},
{header:'${text('备注信息')}', name:'remarks', index:'a.remarks', width:200, align:"left"},
{header:'${text('状态')}', name:'status', index:'a.status', width:80, align:"center", formatter: function(val, obj, row, act){
{header:'${text("公司全称")}', name:'fullName', index:'a.full_name', width:200, align:"left"},
{header:'${text("排序号")}', name:'treeSort', index:'a.tree_sort', width:80, align:"center"},
{header:'${text("归属区域")}', name:'area.treeNames', index:'a.areaCode', width:200, align:"center"},
{header:'${text("更新时间")}', name:'updateDate', index:'a.update_date', width:200, align:"center"},
{header:'${text("备注信息")}', name:'remarks', index:'a.remarks', width:200, align:"left"},
{header:'${text("状态")}', name:'status', index:'a.status', width:80, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_status')}, val, '未知', true);
}},
{header:'${text('操作')}', name:'actions', width:130, sortable:false, title:false, formatter: function(val, obj, row, act){
{header:'${text("操作")}', name:'actions', width:130, sortable:false, title:false, formatter: function(val, obj, row, act){
var actions = [];
<% if(hasPermi('sys:company:edit')){ %>
actions.push('<a href="${ctx}/sys/company/form?companyCode='+row.companyCode+'" class="btnList" title="${text('编辑公司')}"><i class="fa fa-pencil"></i></a>&nbsp;');
actions.push('<a href="${ctx}/sys/company/form?companyCode='+row.companyCode+'" class="btnList" title="${text("编辑公司")}"><i class="fa fa-pencil"></i></a>&nbsp;');
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="${ctx}/sys/company/disable?companyCode='+row.companyCode+'" class="btnList" title="${text('停用公司')}" data-confirm="${text('确认要停用该公司吗')}"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
actions.push('<a href="${ctx}/sys/company/disable?companyCode='+row.companyCode+'" class="btnList" title="${text("停用公司")}" data-confirm="${text("确认要停用该公司吗")}"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
}
if (row.status == Global.STATUS_DISABLE){
actions.push('<a href="${ctx}/sys/company/enable?companyCode='+row.companyCode+'" class="btnList" title="${text('启用公司')}" data-confirm="${text('确认要启用该公司吗')}"><i class="glyphicon glyphicon-ok-circle"></i></a>&nbsp;');
actions.push('<a href="${ctx}/sys/company/enable?companyCode='+row.companyCode+'" class="btnList" title="${text("启用公司")}" data-confirm="${text("确认要启用该公司吗")}"><i class="glyphicon glyphicon-ok-circle"></i></a>&nbsp;');
}
actions.push('<a href="${ctx}/sys/company/delete?companyCode='+row.companyCode+'" class="btnList" title="${text('删除公司')}" data-confirm="${text('确认要删除该公司及所有子公司吗')}" data-deltreenode="'+row.id+'"><i class="fa fa-trash-o"></i></a>&nbsp;');
actions.push('<a href="${ctx}/sys/company/form?parentCode='+row.id+'" class="btnList" title="${text('新增下级公司')}"><i class="fa fa-plus-square"></i></a>&nbsp;');
actions.push('<a href="${ctx}/sys/company/delete?companyCode='+row.companyCode+'" class="btnList" title="${text("删除公司")}" data-confirm="${text("确认要删除该公司及所有子公司吗")}" data-deltreenode="'+row.id+'"><i class="fa fa-trash-o"></i></a>&nbsp;');
actions.push('<a href="${ctx}/sys/company/form?parentCode='+row.id+'" class="btnList" title="${text("新增下级公司")}"><i class="fa fa-plus-square"></i></a>&nbsp;');
<% } %>
return actions.join('');
}}

View File

@@ -1,7 +1,7 @@
<% layout('/layouts/default.html', {title: '字典数据管理', libs: ['dataGrid']}){ %>
<div class="main-content">
<div class="box box-main">
<div class="box-header">
<div class="box-header" style="display:block">
<div class="box-title">
<i class="fa icon-social-dropbox"></i> 字典数据(${dictData.dictType}
</div>

View File

@@ -64,31 +64,31 @@
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
columnModel: [
{header:'${text('机构名称')}', name:'officeName', index:'a.office_name', width:250, align:"left", frozen:true, formatter: function(val, obj, row, act){
return '( '+row.viewCode+' ) '+'<a href="${ctx}/sys/office/form?officeCode='+row.officeCode+'" class="btnList" data-title="${text('编辑机构')}">'+(val||row.id)+'</a>';
{header:'${text("机构名称")}', name:'officeName', index:'a.office_name', width:250, align:"left", frozen:true, formatter: function(val, obj, row, act){
return '( '+row.viewCode+' ) '+'<a href="${ctx}/sys/office/form?officeCode='+row.officeCode+'" class="btnList" data-title="${text("编辑机构")}">'+(val||row.id)+'</a>';
}},
{header:'${text('机构全称')}', name:'fullName', index:'a.full_name', width:200, align:"left"},
{header:'${text('排序号')}', name:'treeSort', index:'a.tree_sort', width:80, align:"center"},
{header:'${text('机构类型')}', name:'officeType', index:'a.office_type', width:100, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_office_type')}, val, '${text('未知')}', true);
{header:'${text("机构全称")}', name:'fullName', index:'a.full_name', width:200, align:"left"},
{header:'${text("排序号")}', name:'treeSort', index:'a.tree_sort', width:80, align:"center"},
{header:'${text("机构类型")}', name:'officeType', index:'a.office_type', width:100, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_office_type')}, val, '${text("未知")}', true);
}},
{header:'${text('更新时间')}', name:'updateDate', index:'a.update_date', width:150, align:"center"},
{header:'${text('备注信息')}', name:'remarks', index:'a.remarks', width:200, align:"left"},
{header:'${text('状态')}', name:'status', index:'a.status', width:80, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_status')}, val, '${text('未知')}', true);
{header:'${text("更新时间")}', name:'updateDate', index:'a.update_date', width:150, align:"center"},
{header:'${text("备注信息")}', name:'remarks', index:'a.remarks', width:200, align:"left"},
{header:'${text("状态")}', name:'status', index:'a.status', width:80, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_status')}, val, '${text("未知")}', true);
}},
{header:'${text('操作')}', name:'actions', width:150, sortable:false, title:false, formatter: function(val, obj, row, act){
{header:'${text("操作")}', name:'actions', width:150, sortable:false, title:false, formatter: function(val, obj, row, act){
var actions = [];
<% if(hasPermi('sys:office:edit')){ %>
actions.push('<a href="${ctx}/sys/office/form?officeCode='+row.officeCode+'" class="btnList" title="${text('编辑机构')}"><i class="fa fa-pencil"></i></a>&nbsp;');
actions.push('<a href="${ctx}/sys/office/form?officeCode='+row.officeCode+'" class="btnList" title="${text("编辑机构")}"><i class="fa fa-pencil"></i></a>&nbsp;');
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="${ctx}/sys/office/disable?officeCode='+row.officeCode+'" class="btnList" title="${text('停用机构')}" data-confirm="${text('确认要停用该机构吗')}"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
actions.push('<a href="${ctx}/sys/office/disable?officeCode='+row.officeCode+'" class="btnList" title="${text("停用机构")}" data-confirm="${text("确认要停用该机构吗")}"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
}
if (row.status == Global.STATUS_DISABLE){
actions.push('<a href="${ctx}/sys/office/enable?officeCode='+row.officeCode+'" class="btnList" title="${text('启用机构')}" data-confirm="${text('确认要启用该机构吗')}"><i class="glyphicon glyphicon-ok-circle"></i></a>&nbsp;');
actions.push('<a href="${ctx}/sys/office/enable?officeCode='+row.officeCode+'" class="btnList" title="${text("启用机构")}" data-confirm="${text("确认要启用该机构吗")}"><i class="glyphicon glyphicon-ok-circle"></i></a>&nbsp;');
}
actions.push('<a href="${ctx}/sys/office/delete?officeCode='+row.officeCode+'" class="btnList" title="${text('删除机构')}" data-confirm="${text('确认要删除该机构及所有子机构吗')}" data-deltreenode="'+row.id+'"><i class="fa fa-trash-o"></i></a>&nbsp;');
actions.push('<a href="${ctx}/sys/office/form?parentCode='+row.id+'" class="btnList" title="${text('新增下级机构')}"><i class="fa fa-plus-square"></i></a>&nbsp;');
actions.push('<a href="${ctx}/sys/office/delete?officeCode='+row.officeCode+'" class="btnList" title="${text("删除机构")}" data-confirm="${text("确认要删除该机构及所有子机构吗")}" data-deltreenode="'+row.id+'"><i class="fa fa-trash-o"></i></a>&nbsp;');
actions.push('<a href="${ctx}/sys/office/form?parentCode='+row.id+'" class="btnList" title="${text("新增下级机构")}"><i class="fa fa-plus-square"></i></a>&nbsp;');
<% } %>
return actions.join('');
}}

View File

@@ -55,30 +55,30 @@
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
columnModel: [
{header:'${text('岗位名称')}', name:'postName', index:'a.post_name', width:200, align:"center", frozen:true, formatter: function(val, obj, row, act){
return '<a href="${ctx}/sys/post/form?postCode='+row.postCode+'" class="btnList" data-title="${text('编辑岗位')}">'+(val||row.id)+'</a>';
{header:'${text("岗位名称")}', name:'postName', index:'a.post_name', width:200, align:"center", frozen:true, formatter: function(val, obj, row, act){
return '<a href="${ctx}/sys/post/form?postCode='+row.postCode+'" class="btnList" data-title="${text("编辑岗位")}">'+(val||row.id)+'</a>';
}},
{header:'${text('岗位编码')}', name:'postCode', index:'a.post_code', width:200, align:"center"},
{header:'${text('排序号')}', name:'postSort', index:'a.post_sort', width:80, align:"center"},
{header:'${text('岗位分类')}', name:'postType', index:'a.post_type', width:100, align:"center", formatter: function(val, obj, row, act){
{header:'${text("岗位编码")}', name:'postCode', index:'a.post_code', width:200, align:"center"},
{header:'${text("排序号")}', name:'postSort', index:'a.post_sort', width:80, align:"center"},
{header:'${text("岗位分类")}', name:'postType', index:'a.post_type', width:100, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_post_type')}, val, '未知', true);
}},
{header:'${text('更新时间')}', name:'updateDate', index:'a.update_date', width:150, align:"center"},
{header:'${text('备注信息')}', name:'remarks', index:'a.remarks', width:200, align:"left"},
{header:'${text('状态')}', name:'status', index:'a.status', width:80, align:"center", formatter: function(val, obj, row, act){
{header:'${text("更新时间")}', name:'updateDate', index:'a.update_date', width:150, align:"center"},
{header:'${text("备注信息")}', name:'remarks', index:'a.remarks', width:200, align:"left"},
{header:'${text("状态")}', name:'status', index:'a.status', width:80, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_status')}, val, '未知', true);
}},
{header:'${text('操作')}', name:'actions', width:130, sortable:false, title:false, formatter: function(val, obj, row, act){
{header:'${text("操作")}', name:'actions', width:130, sortable:false, title:false, formatter: function(val, obj, row, act){
var actions = [];
<% if(hasPermi('sys:post:edit')){ %>
actions.push('<a href="${ctx}/sys/post/form?postCode='+row.postCode+'" class="btnList" title="${text('编辑岗位')}"><i class="fa fa-pencil"></i></a>&nbsp;');
actions.push('<a href="${ctx}/sys/post/form?postCode='+row.postCode+'" class="btnList" title="${text("编辑岗位")}"><i class="fa fa-pencil"></i></a>&nbsp;');
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="${ctx}/sys/post/disable?postCode='+row.postCode+'" class="btnList" title="${text('停用岗位')}" data-confirm="${text('确认要停用该岗位吗')}"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
actions.push('<a href="${ctx}/sys/post/disable?postCode='+row.postCode+'" class="btnList" title="${text("停用岗位")}" data-confirm="${text("确认要停用该岗位吗")}"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
}
if (row.status == Global.STATUS_DISABLE){
actions.push('<a href="${ctx}/sys/post/enable?postCode='+row.postCode+'" class="btnList" title="${text('启用岗位')}" data-confirm="${text('确认要启用该岗位吗')}"><i class="glyphicon glyphicon-ok-circle"></i></a>&nbsp;');
actions.push('<a href="${ctx}/sys/post/enable?postCode='+row.postCode+'" class="btnList" title="${text("启用岗位")}" data-confirm="${text("确认要启用该岗位吗")}"><i class="glyphicon glyphicon-ok-circle"></i></a>&nbsp;');
}
actions.push('<a href="${ctx}/sys/post/delete?postCode='+row.postCode+'" class="btnList" title="${text('删除岗位')}" data-confirm="${text('确认要删除该岗位吗')}"><i class="fa fa-trash-o"></i></a>&nbsp;');
actions.push('<a href="${ctx}/sys/post/delete?postCode='+row.postCode+'" class="btnList" title="${text("删除岗位")}" data-confirm="${text("确认要删除该岗位吗")}"><i class="fa fa-trash-o"></i></a>&nbsp;');
<% } %>
return actions.join('');
}}

View File

@@ -75,7 +75,7 @@
<div class="col-md-8">
<div class="chart">
<div id="myChart" style="height:230px;width:99%"></div>
<script src="http://echarts.baidu.com/dist/echarts.common.min.js"></script>
<script src="${ctxStatic}/echarts/4.2/echarts.simple.min.js"></script>
<script>
var option = {
title : {

View File

@@ -1,4 +1,5 @@
<% layout('/layouts/default.html', {title: '切换主题风格'}){ %>
<link rel="stylesheet" href="${ctxStatic}/icheck/1.0/square/blue.css?${_version}">
<style>
.list-unstyled{margin:10px;}
.full-opacity-hover{opacity:1;filter:alpha(opacity=1);border:1px solid #fff}
@@ -7,10 +8,10 @@
<ul class="list-unstyled clearfix">
<li style="float:left; width: 33.33333%; padding: 5px;"><a href="javascript:void(0)" data-skin="skin-blue" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">
<div>
<span style="display:block; width: 20%; float: left; height: 15px; background: #367fa9"></span><span class="bg-light-blue" style="display:block; width: 80%; float: left; height: 15px;"></span>
<span style="display:block; width: 20%; float: left; height: 13px; background: #367fa9"></span><span class="bg-light-blue" style="display:block; width: 80%; float: left; height: 13px;"></span>
</div>
<div>
<span style="display:block; width: 20%; float: left; height: 35px; background: #222d32"></span><span style="display:block; width: 80%; float: left; height: 35px; background: #f4f5f7"></span>
<span style="display:block; width: 20%; float: left; height: 30px; background: #222d32"></span><span style="display:block; width: 80%; float: left; height: 30px; background: #f4f5f7"></span>
</div>
</a>
<p class="text-center no-margin">
@@ -19,10 +20,10 @@
</li>
<li style="float:left; width: 33.33333%; padding: 5px;"><a href="javascript:void(0)" data-skin="skin-black" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">
<div style="box-shadow: 0 0 2px rgba(0,0,0,0.1)" class="clearfix">
<span style="display:block; width: 20%; float: left; height: 15px; background: #fefefe"></span><span style="display:block; width: 80%; float: left; height: 15px; background: #fefefe"></span>
<span style="display:block; width: 20%; float: left; height: 13px; background: #fefefe"></span><span style="display:block; width: 80%; float: left; height: 13px; background: #fefefe"></span>
</div>
<div>
<span style="display:block; width: 20%; float: left; height: 35px; background: #222"></span><span style="display:block; width: 80%; float: left; height: 35px; background: #f4f5f7"></span>
<span style="display:block; width: 20%; float: left; height: 30px; background: #222"></span><span style="display:block; width: 80%; float: left; height: 30px; background: #f4f5f7"></span>
</div>
</a>
<p class="text-center no-margin">
@@ -31,10 +32,10 @@
</li>
<li style="float:left; width: 33.33333%; padding: 5px;"><a href="javascript:void(0)" data-skin="skin-purple" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">
<div>
<span style="display:block; width: 20%; float: left; height: 15px;" class="bg-purple-active"></span><span class="bg-purple" style="display:block; width: 80%; float: left; height: 15px;"></span>
<span style="display:block; width: 20%; float: left; height: 13px;" class="bg-purple-active"></span><span class="bg-purple" style="display:block; width: 80%; float: left; height: 13px;"></span>
</div>
<div>
<span style="display:block; width: 20%; float: left; height: 35px; background: #222d32"></span><span style="display:block; width: 80%; float: left; height: 35px; background: #f4f5f7"></span>
<span style="display:block; width: 20%; float: left; height: 30px; background: #222d32"></span><span style="display:block; width: 80%; float: left; height: 30px; background: #f4f5f7"></span>
</div>
</a>
<p class="text-center no-margin">
@@ -43,10 +44,10 @@
</li>
<li style="float:left; width: 33.33333%; padding: 5px;"><a href="javascript:void(0)" data-skin="skin-green" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">
<div>
<span style="display:block; width: 20%; float: left; height: 15px;" class="bg-green-active"></span><span class="bg-green" style="display:block; width: 80%; float: left; height: 15px;"></span>
<span style="display:block; width: 20%; float: left; height: 13px;" class="bg-green-active"></span><span class="bg-green" style="display:block; width: 80%; float: left; height: 13px;"></span>
</div>
<div>
<span style="display:block; width: 20%; float: left; height: 35px; background: #222d32"></span><span style="display:block; width: 80%; float: left; height: 35px; background: #f4f5f7"></span>
<span style="display:block; width: 20%; float: left; height: 30px; background: #222d32"></span><span style="display:block; width: 80%; float: left; height: 30px; background: #f4f5f7"></span>
</div>
</a>
<p class="text-center no-margin">
@@ -55,10 +56,10 @@
</li>
<li style="float:left; width: 33.33333%; padding: 5px;"><a href="javascript:void(0)" data-skin="skin-red" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">
<div>
<span style="display:block; width: 20%; float: left; height: 15px;" class="bg-red-active"></span><span class="bg-red" style="display:block; width: 80%; float: left; height: 15px;"></span>
<span style="display:block; width: 20%; float: left; height: 13px;" class="bg-red-active"></span><span class="bg-red" style="display:block; width: 80%; float: left; height: 13px;"></span>
</div>
<div>
<span style="display:block; width: 20%; float: left; height: 35px; background: #222d32"></span><span style="display:block; width: 80%; float: left; height: 35px; background: #f4f5f7"></span>
<span style="display:block; width: 20%; float: left; height: 30px; background: #222d32"></span><span style="display:block; width: 80%; float: left; height: 30px; background: #f4f5f7"></span>
</div>
</a>
<p class="text-center no-margin">
@@ -67,10 +68,10 @@
</li>
<li style="float:left; width: 33.33333%; padding: 5px;"><a href="javascript:void(0)" data-skin="skin-yellow" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">
<div>
<span style="display:block; width: 20%; float: left; height: 15px;" class="bg-yellow-active"></span><span class="bg-yellow" style="display:block; width: 80%; float: left; height: 15px;"></span>
<span style="display:block; width: 20%; float: left; height: 13px;" class="bg-yellow-active"></span><span class="bg-yellow" style="display:block; width: 80%; float: left; height: 13px;"></span>
</div>
<div>
<span style="display:block; width: 20%; float: left; height: 35px; background: #222d32"></span><span style="display:block; width: 80%; float: left; height: 35px; background: #f4f5f7"></span>
<span style="display:block; width: 20%; float: left; height: 30px; background: #222d32"></span><span style="display:block; width: 80%; float: left; height: 30px; background: #f4f5f7"></span>
</div>
</a>
<p class="text-center no-margin">
@@ -79,10 +80,10 @@
</li>
<li style="float:left; width: 33.33333%; padding: 5px;"><a href="javascript:void(0)" data-skin="skin-blue-light" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">
<div>
<span style="display:block; width: 20%; float: left; height: 15px; background: #367fa9"></span><span class="bg-light-blue" style="display:block; width: 80%; float: left; height: 15px;"></span>
<span style="display:block; width: 20%; float: left; height: 13px; background: #367fa9"></span><span class="bg-light-blue" style="display:block; width: 80%; float: left; height: 13px;"></span>
</div>
<div>
<span style="display:block; width: 20%; float: left; height: 35px; background: #f9fafc"></span><span style="display:block; width: 80%; float: left; height: 35px; background: #f4f5f7"></span>
<span style="display:block; width: 20%; float: left; height: 30px; background: #f9fafc"></span><span style="display:block; width: 80%; float: left; height: 30px; background: #f4f5f7"></span>
</div>
</a>
<p class="text-center no-margin" style="font-size: 12px">
@@ -91,10 +92,10 @@
</li>
<li style="float:left; width: 33.33333%; padding: 5px;"><a href="javascript:void(0)" data-skin="skin-black-light" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">
<div style="box-shadow: 0 0 2px rgba(0,0,0,0.1)" class="clearfix">
<span style="display:block; width: 20%; float: left; height: 15px; background: #fefefe"></span><span style="display:block; width: 80%; float: left; height: 15px; background: #fefefe"></span>
<span style="display:block; width: 20%; float: left; height: 13px; background: #fefefe"></span><span style="display:block; width: 80%; float: left; height: 13px; background: #fefefe"></span>
</div>
<div>
<span style="display:block; width: 20%; float: left; height: 35px; background: #f9fafc"></span><span style="display:block; width: 80%; float: left; height: 35px; background: #f4f5f7"></span>
<span style="display:block; width: 20%; float: left; height: 30px; background: #f9fafc"></span><span style="display:block; width: 80%; float: left; height: 30px; background: #f4f5f7"></span>
</div>
</a>
<p class="text-center no-margin" style="font-size: 12px">
@@ -103,10 +104,10 @@
</li>
<li style="float:left; width: 33.33333%; padding: 5px;"><a href="javascript:void(0)" data-skin="skin-purple-light" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">
<div>
<span style="display:block; width: 20%; float: left; height: 15px;" class="bg-purple-active"></span><span class="bg-purple" style="display:block; width: 80%; float: left; height: 15px;"></span>
<span style="display:block; width: 20%; float: left; height: 13px;" class="bg-purple-active"></span><span class="bg-purple" style="display:block; width: 80%; float: left; height: 13px;"></span>
</div>
<div>
<span style="display:block; width: 20%; float: left; height: 35px; background: #f9fafc"></span><span style="display:block; width: 80%; float: left; height: 35px; background: #f4f5f7"></span>
<span style="display:block; width: 20%; float: left; height: 30px; background: #f9fafc"></span><span style="display:block; width: 80%; float: left; height: 30px; background: #f4f5f7"></span>
</div>
</a>
<p class="text-center no-margin" style="font-size: 12px">
@@ -115,10 +116,10 @@
</li>
<li style="float:left; width: 33.33333%; padding: 5px;"><a href="javascript:void(0)" data-skin="skin-green-light" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">
<div>
<span style="display:block; width: 20%; float: left; height: 15px;" class="bg-green-active"></span><span class="bg-green" style="display:block; width: 80%; float: left; height: 15px;"></span>
<span style="display:block; width: 20%; float: left; height: 13px;" class="bg-green-active"></span><span class="bg-green" style="display:block; width: 80%; float: left; height: 13px;"></span>
</div>
<div>
<span style="display:block; width: 20%; float: left; height: 35px; background: #f9fafc"></span><span style="display:block; width: 80%; float: left; height: 35px; background: #f4f5f7"></span>
<span style="display:block; width: 20%; float: left; height: 30px; background: #f9fafc"></span><span style="display:block; width: 80%; float: left; height: 30px; background: #f4f5f7"></span>
</div>
</a>
<p class="text-center no-margin" style="font-size: 12px">
@@ -127,10 +128,10 @@
</li>
<li style="float:left; width: 33.33333%; padding: 5px;"><a href="javascript:void(0)" data-skin="skin-red-light" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">
<div>
<span style="display:block; width: 20%; float: left; height: 15px;" class="bg-red-active"></span><span class="bg-red" style="display:block; width: 80%; float: left; height: 15px;"></span>
<span style="display:block; width: 20%; float: left; height: 13px;" class="bg-red-active"></span><span class="bg-red" style="display:block; width: 80%; float: left; height: 13px;"></span>
</div>
<div>
<span style="display:block; width: 20%; float: left; height: 35px; background: #f9fafc"></span><span style="display:block; width: 80%; float: left; height: 35px; background: #f4f5f7"></span>
<span style="display:block; width: 20%; float: left; height: 30px; background: #f9fafc"></span><span style="display:block; width: 80%; float: left; height: 30px; background: #f4f5f7"></span>
</div>
</a>
<p class="text-center no-margin" style="font-size: 12px">
@@ -139,20 +140,51 @@
</li>
<li style="float:left; width: 33.33333%; padding: 5px;"><a href="javascript:void(0)" data-skin="skin-yellow-light" style="display: block; box-shadow: 0 0 3px rgba(0,0,0,0.4)" class="clearfix full-opacity-hover">
<div>
<span style="display:block; width: 20%; float: left; height: 15px;" class="bg-yellow-active"></span><span class="bg-yellow" style="display:block; width: 80%; float: left; height: 15px;"></span>
<span style="display:block; width: 20%; float: left; height: 13px;" class="bg-yellow-active"></span><span class="bg-yellow" style="display:block; width: 80%; float: left; height: 13px;"></span>
</div>
<div>
<span style="display:block; width: 20%; float: left; height: 35px; background: #f9fafc"></span><span style="display:block; width: 80%; float: left; height: 35px; background: #f4f5f7"></span>
<span style="display:block; width: 20%; float: left; height: 30px; background: #f9fafc"></span><span style="display:block; width: 80%; float: left; height: 30px; background: #f4f5f7"></span>
</div>
</a>
<p class="text-center no-margin" style="font-size: 12px">
黄灰
</p>
</li>
<li style="text-align:center; padding-left:20px;">
<#form:checkbox name="formLayerModel" label="表单弹窗模式" class="form-control" data-style="square-blue"/>
&nbsp; &nbsp; &nbsp;
<#form:checkbox name="tabPageModel" label="取消页签模式" class="form-control" data-style="square-blue"/>
</li>
</ul>
<% } %>
<script>
$('.full-opacity-hover').click(function(){
top.location = '${ctx}/switchSkin/' + $(this).data('skin');
});
$('#formLayerModel')
.iCheck(js.cookie('formLayerModel') == 'true' ? 'check' : 'uncheck')
.on('ifChecked', function(){
js.cookie('formLayerModel', 'true');
}).on('ifUnchecked', function(){
js.cookie('formLayerModel', 'false');
$('#tabPageModel').iCheck('uncheck');
}).on('ifClicked', function(){
setTimeout(function(){
top.location.reload();
},500);
});
$('#tabPageModel')
.iCheck(js.cookie('tabPageModel') == 'true' ? 'check' : 'uncheck')
.on('ifChecked', function(){
js.cookie('tabPageModel', 'true');
$('#formLayerModel').iCheck('check');
}).on('ifUnchecked', function(){
js.cookie('tabPageModel', 'false');
}).on('ifClicked', function(){
setTimeout(function(){
top.location.reload();
},500);
});
</script>

View File

@@ -120,6 +120,11 @@
</div>
</div>
</div>
<div class="form-unit">${text('分配角色')}</div>
<div class="pl10 pb20">
<table id="roleGrid"></table>
<#form:hidden name="userRoleString"/>
</div>
<#form:extend collapsed="true" />
</div>
<div class="box-footer">
@@ -146,6 +151,9 @@ $("#inputForm").validate({
}
},
submitHandler: function(form){
// 获取选中角色
$("#userRoleString").val(roleGrid.dataGrid('getSelectRows').join(','));
// 提交表单
js.ajaxSubmitForm($(form), function(data){
js.showMessage(data.message);
if(data.result == Global.TRUE){
@@ -163,4 +171,29 @@ $('#corpCode_').change(function(){
$('#loginCode').val('admin'+$(this).val()).valid();
}
});
//加载角色列表
var roleGrid = $("#roleGrid").dataGrid({
url: '${ctx}/sys/role/treeData',
postData: [
<%// {name:'userType',value:'employee'}, // 指定用户类型的角色 %>
<%// {name:'ctrlPermi',value:'2'} // 过滤可管理的角色 %>
{name:'isAll',value:'true'} <% // 显示所有角色(与上方两个条件互斥) %>
],
columnModel: [
{header:'${text("角色名称")}', name:'name', sortable:false, width:100, align:"center"},
{header:'${text("角色编码")}', name:'id', sortable:false, width:100, align:"center"}
],
showCheckbox: true,
autoGridHeight: function(){
return 'auto';
},
autoGridWidth: function(){
return $('#inputForm .box-body').width()-20;
},
ajaxSuccess: function(){
<% for (role in roleList!){ %>
roleGrid.dataGrid('setSelectRow', '${role.roleCode}');
<% } %>
}
});
</script>

View File

@@ -3,7 +3,7 @@
<div class="box box-main">
<div class="box-header">
<div class="box-title">
<i class="fa icon-user"></i> 系统管理员
<i class="fa icon-user"></i> ${@Global.getConfigToBoolean('user.useCorpModel', 'false') ? '租户' : '系统'}管理员
</div>
<div class="box-tools pull-right">
<a href="#" class="btn btn-default" id="btnSearch" title="查询"><i class="fa fa-filter"></i> 查询</a>

View File

@@ -198,8 +198,7 @@
<script>
$("#inputForm").validate({
submitHandler: function(form){
<% if(op == 'add' || op == 'auth') {%>
// 获取选中角色
<% if(op == 'add' || op == 'auth') { // 获取选中角色 %>
$("#userRoleString").val(roleGrid.dataGrid('getSelectRows').join(','));
<% } %>
js.ajaxSubmitForm($(form), function(data){
@@ -221,8 +220,8 @@ var roleGrid = $("#roleGrid").dataGrid({
{name:'ctrlPermi',value:'2'}
],
columnModel: [
{header:'${text('角色名称')}', name:'name', sortable:false, width:100, align:"center"},
{header:'${text('角色编码')}', name:'id', sortable:false, width:100, align:"center"}
{header:'${text("角色名称")}', name:'name', sortable:false, width:100, align:"center"},
{header:'${text("角色编码")}', name:'id', sortable:false, width:100, align:"center"}
],
showCheckbox: true,
autoGridHeight: function(){

View File

@@ -107,47 +107,47 @@
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
columnModel: [
{header:'${text('登录账号')}', name:'loginCode', index:'a.login_code', width:200, align:"center", frozen:true, formatter: function(val, obj, row, act){
return '<a href="${ctx}/sys/empUser/form?userCode='+row.userCode+'&op=edit" class="btnList" data-title="${text('编辑用户')}">'+(val||row.id)+'</a>';
{header:'${text("登录账号")}', name:'loginCode', index:'a.login_code', width:200, align:"center", frozen:true, formatter: function(val, obj, row, act){
return '<a href="${ctx}/sys/empUser/form?userCode='+row.userCode+'&op=edit" class="btnList" data-title="${text("编辑用户")}">'+(val||row.id)+'</a>';
}},
{header:'${text('用户昵称')}', name:'userName', index:'a.user_name', width:200, align:"center"},
{header:'${text('员工姓名')}', name:'refName', index:'a.ref_name', width:200, align:"center"},
{header:'${text('归属机构')}', name:'employee.office.officeName', index:'o.office_name', width:200, align:"center"},
{header:'${text('归属公司')}', name:'employee.company.companyName', index:'c.company_name', width:200, align:"center"},
{header:'${text('电子邮箱')}', name:'email', index:'a.email', width:200, align:"center"},
{header:'${text('手机号码')}', name:'mobile', index:'a.mobile', width:200, align:"center"},
{header:'${text('办公电话')}', name:'phone', index:'a.phone', width:200, align:"center"},
{header:'${text('更新时间')}', name:'updateDate', index:'a.update_date', width:200, align:"center"},
{header:'${text('状态')}', name:'status', index:'a.status', width:140, align:"center", formatter: function(val, obj, row, act){
{header:'${text("用户昵称")}', name:'userName', index:'a.user_name', width:200, align:"center"},
{header:'${text("员工姓名")}', name:'refName', index:'a.ref_name', width:200, align:"center"},
{header:'${text("归属机构")}', name:'employee.office.officeName', index:'o.office_name', width:200, align:"center"},
{header:'${text("归属公司")}', name:'employee.company.companyName', index:'c.company_name', width:200, align:"center"},
{header:'${text("电子邮箱")}', name:'email', index:'a.email', width:200, align:"center"},
{header:'${text("手机号码")}', name:'mobile', index:'a.mobile', width:200, align:"center"},
{header:'${text("办公电话")}', name:'phone', index:'a.phone', width:200, align:"center"},
{header:'${text("更新时间")}', name:'updateDate', index:'a.update_date', width:200, align:"center"},
{header:'${text("状态")}', name:'status', index:'a.status', width:140, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_status')}, val, '未知', true);
}},
{header:'${text('操作')}', name:'actions', width:260, sortable:false, title:false, formatter: function(val, obj, row, act){
{header:'${text("操作")}', name:'actions', width:260, sortable:false, title:false, formatter: function(val, obj, row, act){
var actions = [];
<% if(hasPermi('sys:empUser:edit')){ %>
actions.push('<a href="${ctx}/sys/empUser/form?userCode='+row.userCode+'&op=edit" class="btnList" title="${text('编辑用户')}"><i class="fa fa-pencil"></i></a>&nbsp;');
actions.push('<a href="${ctx}/sys/empUser/form?userCode='+row.userCode+'&op=edit" class="btnList" title="${text("编辑用户")}"><i class="fa fa-pencil"></i></a>&nbsp;');
<% } %>
<% if(hasPermi('sys:empUser:updateStatus')){ %>
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="${ctx}/sys/empUser/disable?userCode='+row.userCode+'" class="btnList" title="${text('停用用户')}" data-confirm="${text('确认要停用该用户吗')}"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
actions.push('<a href="${ctx}/sys/empUser/disable?userCode='+row.userCode+'" class="btnList" title="${text("停用用户")}" data-confirm="${text("确认要停用该用户吗")}"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
}
if (row.status == Global.STATUS_DISABLE){
actions.push('<a href="${ctx}/sys/empUser/enable?userCode='+row.userCode+'" class="btnList" title="${text('启用用户')}" data-confirm="${text('确认要启用该用户吗')}"><i class="glyphicon glyphicon-ok-circle"></i></a>&nbsp;');
actions.push('<a href="${ctx}/sys/empUser/enable?userCode='+row.userCode+'" class="btnList" title="${text("启用用户")}" data-confirm="${text("确认要启用该用户吗")}"><i class="glyphicon glyphicon-ok-circle"></i></a>&nbsp;');
}
<% } %>
<% if(hasPermi('sys:empUser:edit')){ %>
actions.push('<a href="${ctx}/sys/empUser/delete?userCode='+row.userCode+'" class="btnList" title="${text('删除用户')}" data-confirm="${text('确认要删除该用户吗')}"><i class="fa fa-trash-o"></i></a>&nbsp;');
actions.push('<a href="${ctx}/sys/empUser/delete?userCode='+row.userCode+'" class="btnList" title="${text("删除用户")}" data-confirm="${text("确认要删除该用户吗")}"><i class="fa fa-trash-o"></i></a>&nbsp;');
<% } %>
<% if(hasPermi('sys:empUser:authRole,sys:empUser:authDataScope,sys:empUser:resetpwd', 'or')){ %>
actions.push('<a href="javascript:" class="btnMore" title="${text('更多操作')}"><i class="fa fa-chevron-circle-right"></i></a>&nbsp;');
actions.push('<a href="javascript:" class="btnMore" title="${text("更多操作")}"><i class="fa fa-chevron-circle-right"></i></a>&nbsp;');
actions.push('<div class="moreItems">');
<% if(hasPermi('sys:empUser:authRole')){ %>
actions.push('<a href="${ctx}/sys/empUser/form?userCode='+row.userCode+'&op=auth" class="btn btn-default btn-xs btnList" title="${text('用户分配角色')}"><i class="fa fa-check-square-o"></i> ${text('分配角色')}</a>&nbsp;');
actions.push('<a href="${ctx}/sys/empUser/form?userCode='+row.userCode+'&op=auth" class="btn btn-default btn-xs btnList" title="${text("用户分配角色")}"><i class="fa fa-check-square-o"></i> ${text("分配角色")}</a>&nbsp;');
<% } %>
<% if(hasPermi('sys:empUser:authDataScope')){ %>
actions.push('<a href="${ctx}/sys/empUser/formAuthDataScope?userCode='+row.userCode+'" class="btn btn-default btn-xs btnList" title="${text('用户分配数据权限')}"><i class="fa fa-check-circle-o"></i> ${text('数据权限')}</a>&nbsp;');
actions.push('<a href="${ctx}/sys/empUser/formAuthDataScope?userCode='+row.userCode+'" class="btn btn-default btn-xs btnList" title="${text("用户分配数据权限")}"><i class="fa fa-check-circle-o"></i> ${text("数据权限")}</a>&nbsp;');
<% } %>
<% if(hasPermi('sys:empUser:resetpwd')){ %>
actions.push('<a href="${ctx}/sys/empUser/resetpwd?userCode='+row.userCode+'" class="btn btn-default btn-xs btnList" title="${text('用户密码重置')}" data-confirm="${text('确认要将该用户密码重置到初始状态吗')}"><i class="fa fa-reply-all"></i> ${text('重置密码')}</a>&nbsp;');
actions.push('<a href="${ctx}/sys/empUser/resetpwd?userCode='+row.userCode+'" class="btn btn-default btn-xs btnList" title="${text("用户密码重置")}" data-confirm="${text("确认要将该用户密码重置到初始状态吗")}"><i class="fa fa-reply-all"></i> ${text("重置密码")}</a>&nbsp;');
<% } %>
actions.push('</div>');
<% } %>

View File

@@ -82,16 +82,16 @@ var selectData = ${isNotBlank(selectData!) ? selectData! : "{\}"},
selectNum = 0, dataGrid = $('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
columnModel: [
{header:'${text('登录账号')}', name:'loginCode', index:'a.login_code', width:200, align:"center"},
{header:'${text('用户昵称')}', name:'userName', index:'a.user_name', width:200, align:"center"},
{header:'${text('员工姓名')}', name:'refName', index:'a.ref_name', width:200, align:"center"},
{header:'${text('归属机构')}', name:'employee.office.officeName', index:'o.office_name', width:200, align:"center"},
{header:'${text('归属公司')}', name:'employee.company.companyName', index:'c.company_name', width:200, align:"center"},
{header:'${text('电子邮箱')}', name:'email', index:'a.email', width:200, align:"center"},
{header:'${text('手机号码')}', name:'mobile', index:'a.mobile', width:200, align:"center"},
{header:'${text('办公电话')}', name:'phone', index:'a.phone', width:200, align:"center"},
{header:'${text('更新时间')}', name:'updateDate', index:'a.update_date', width:200, align:"center"},
{header:'${text('状态')}', name:'status', index:'a.status', width:140, align:"center", formatter: function(val, obj, row, act){
{header:'${text("登录账号")}', name:'loginCode', index:'a.login_code', width:200, align:"center"},
{header:'${text("用户昵称")}', name:'userName', index:'a.user_name', width:200, align:"center"},
{header:'${text("员工姓名")}', name:'refName', index:'a.ref_name', width:200, align:"center"},
{header:'${text("归属机构")}', name:'employee.office.officeName', index:'o.office_name', width:200, align:"center"},
{header:'${text("归属公司")}', name:'employee.company.companyName', index:'c.company_name', width:200, align:"center"},
{header:'${text("电子邮箱")}', name:'email', index:'a.email', width:200, align:"center"},
{header:'${text("手机号码")}', name:'mobile', index:'a.mobile', width:200, align:"center"},
{header:'${text("办公电话")}', name:'phone', index:'a.phone', width:200, align:"center"},
{header:'${text("更新时间")}', name:'updateDate', index:'a.update_date', width:200, align:"center"},
{header:'${text("状态")}', name:'status', index:'a.status', width:140, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_status')}, val, '未知', true);
}},
{header:'行数据', name:'rowData', hidden:true, formatter: function(val, obj, row, act){

View File

@@ -13,7 +13,7 @@ var bodyClass = 'fixed noscroll2 sidebar-mini ' + sidebarCollapse;
<link rel="stylesheet" href="${ctxStatic}/jquery-toastr/2.0/toastr.min.css?${_version}">
<link rel="stylesheet" href="${ctxStatic}/adminlte/css/skins/${skinName}.css?${_version}">
<link rel="stylesheet" href="${ctxStatic}/modules/sys/sysIndex.css?${_version}">
<header class="main-header">
<header class="main-header">
<% include('sysIndex/topMenu.html'){} %>
</header>
<aside class="main-sidebar">

View File

@@ -1,8 +1,18 @@
<section class="sidebar">
<div class="user-panel">
<div class="pull-left image">
<img data-href="${ctx}/sys/user/info" data-title="${text('个人中心')}" class="addTabPage img-circle"
<img data-href="${ctx}/sys/user/info" data-title="${text('个人中心')}" class="img-circle pointer"
src="${@user.getAvatarUrl().replaceFirst('/ctxPath', ctxPath)}">
<script>
$('.user-panel .img-circle').click(function(){
if (!$('.main-header').is(':hidden')){
$('.main-header').slideUp(300);
$('[data-toggle="push-menu"]').click();
}else{
$('.main-header').slideDown(300);
}
});
</script>
</div>
<div class="pull-left info">
<p>${user.userName}</p>
@@ -15,27 +25,34 @@
<div class="input-group">
<input type="text" name="q" class="form-control" placeholder="查询...">
<span class="input-group-btn">
<button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>
</button>
<button type="submit" name="search" id="search-btn" class="btn btn-flat"><i
class="fa fa-search"></i></button>
</span>
</div>
</form>
<%-->*/%>
<ul class="sidebar-menu" data-widget="tree">
<%/*<!--%>
<% var menuSysCode = @UserUtils.getLoginInfo().getParam('sysCode', 'default'); %>
<%/*<!--%>
<ul class="sidebar-menu">
<% var menuSysCode = @ObjectUtils.toStringIgnoreNull(session.sysCode, 'default'); %>
<li class="header">${@DictUtils.getDictLabel('sys_menu_sys_code', menuSysCode, '')}</li>
<%-->*/%>
<%
var p = {parentCode: '0', firstMenu: true};
menu.tree(p);
print(p.html);
%>
<%/*<!--%>
</ul>
<%-->*/%>
<div id="leftMenu" data-widget="tree">
<% if(@Global.getConfig('sys.index.menuStyle', '1') == '1'){ %>
<ul class="sidebar-menu">
<%
var p = {parentCode: '0'};
menu.tree(p); print(p.html);
%>
</ul>
<% } %>
</div>
<%/*<!--%>
<ul class="sidebar-menu">
<li class="header">快捷菜单</li>
<li><a href="#"><i class="fa fa-circle-o text-red"></i> <span>快捷菜单1</span></a></li>
<li><a href="#"><i class="fa fa-circle-o text-yellow"></i> <span>快捷菜单2</span></a></li>
<li><a href="#"><i class="fa fa-circle-o text-aqua"></i> <span>快捷菜单3</span></a></li>
<%-->*/%>
</ul>
<%-->*/%>
</section>

View File

@@ -0,0 +1,6 @@
<ul class="sidebar-menu" id="leftMenu-${parameter.parentCode}">
<%
var p = {parentCode: parameter.parentCode};
menu.tree(p); print(p.html);
%>
</ul>

View File

@@ -20,4 +20,48 @@
<% include('topMenuUser.html'){} %>
</ul>
</div>
<% if(@Global.getConfig('sys.index.menuStyle', '1') == '2'){ %>
<div class="navbar-custom-menu pull-left">
<ul class="nav navbar-nav" id="topMenu">
<%
var p = {parentCode: '0', children: false};
menu.tree(p); print(p.html);
%>
</ul>
<script>
$(function(){
$('#topMenu').on('click', '.addTabPage', function (e) {
$('#topMenu li').removeClass('active');
$(this).closest('li').addClass('active');
var code = $(this).data("code");
js.cookie('currentMenuCode', code); // 保存当前菜单ID
if ($("#leftMenu-" + code).length > 0){
$("#leftMenu > ul").hide();
$("#leftMenu-" + code).show();
}else{
js.ajaxSubmit('${ctx}/index/menuTree?parentCode=' + code
+ '&t=' + new Date().getTime(), function(data){
$("#leftMenu > ul").hide();
$("#leftMenu").append(data);
// 如果是初次加载,则选中上次打开的菜单
if($('.sidebar-menu').length == 1){
$(window).trigger("hashchange");
}
}, 'html');
}
});
// 激活存储的顶部当前菜单项
var currentMenuCode = js.cookie('currentMenuCode'), currentMenu;
if (currentMenuCode && currentMenuCode != ''){
currentMenu = $("#topMenu .addTabPage[data-code="+currentMenuCode+"]");
}
if (currentMenu && currentMenu.length > 0 && window.location.hash != ''){
currentMenu.click();
}else{
$("#topMenu .addTabPage:first").click();
}
});
</script>
</div>
<% } %>
</nav>

View File

@@ -15,6 +15,9 @@
<li class="footer"><a href="javascript:" data-href="${ctx}/msg/list"
data-title="${text('查看全部消息')}" class="addTabPage">${text('查看全部消息')}</a></li>
</ul>
<audio id="audioMessage" controls="controls" preload="auto" hidden="hidden">
<source src="${ctxStatic}/modules/msg/message.mp3" type="audio/mpeg" />
</audio>
<script src="${ctxStatic}/jquery-timeago/jquery.timeago.js"></script>
<script src="${ctxStatic}/jquery-timeago/i18n/jquery.timeago.${lang()}.js"></script>
<script src="${ctxStatic}/modules/msg/topMenuMsg.js"></script>

View File

@@ -20,7 +20,7 @@
<% if(user.superAdmin){ %>
<li class="divider"></li>
<li class="dropdown-header mb5">${text('系统切换')}</li>
<% var menuSysCode = @UserUtils.getLoginInfo().getParam('sysCode', 'default'); %>
<% var menuSysCode = @ObjectUtils.toStringIgnoreNull(session.sysCode, 'default'); %>
<% for(var dict in @DictUtils.getDictList('sys_menu_sys_code')){ %>
<li>
<a href="${ctx}/switch/${dict.dictValue}">

View File

@@ -34,7 +34,7 @@
</div>
<% } -->*/%>
<div class="form-group has-feedback" id="isValidCodeLogin" style="display:${isValidCodeLogin?'blank':'none'}">
<#form:validcode name="validCode" isRequired="true" isRemote="true" isLazy="false"/>
<#form:validcode name="validCode" isRequired="true" isRemote="true" isLazy="true"/>
</div>
<div class="form-group">
<div class="mt5 icheck">

View File

@@ -45,7 +45,7 @@ public class MobileAppTest {
private static String loginUrl = "/login"
+ "?username=" + DesUtils.encode("system", "thinkgem,jeesite,com")
+ "&password=" + DesUtils.encode("admin", "thinkgem,jeesite,com")
+ "&param_deviceType=mobileApp&__sid=";
+ "&param_deviceType=mobileApp&param_lang=zh_CN&__sid=";
/**
* 存储的会话编号则通过getSid()获取。

View File

@@ -18,3 +18,6 @@ jdbc:
password: 123456
testSql: SELECT 1
# 日志配置
logging:
config: classpath:logback.xml

Some files were not shown because too many files have changed in this diff Show More