Compare commits

..

1 Commits

Author SHA1 Message Date
thinkgem
052e919964 update readme 2022-03-16 17:52:07 +08:00
205 changed files with 7273 additions and 4723 deletions

18
LICENSE
View File

@@ -211,13 +211,21 @@
更不要,全局替换源代码中的 jeesite 或 ThinkGem 等字样,否则你将违反本协议条款承担责任。
4. 您若套用本软件的一些代码或功能参考,请保留源文件中的版权和作者,需要在您的软件介绍明显位置
说明出处,举例:本软件基于 JeeSite 快速开发平台并附带链接http://jeesite.com
5. 任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
6. 如果你对本软件有改进,希望可以贡献给我们,共同进步。
7. 本项目已申请软件著作权,请尊重开源,感谢阅读。
8. 本版本无用户数限制,无在线人数限制。
5. 请知悉该版本用户数不可超过100个最大允许20个用户同时在线不含匿名
6. 无限制版请访问分支:
[V4.0](https://gitee.com/thinkgem/jeesite4/tree/v4.0_dev/)、
[V4.1](https://gitee.com/thinkgem/jeesite4/tree/v4.1_dev/)、
[V5.0](https://gitee.com/thinkgem/jeesite4/tree/v5.0_dev/)
源码下载:
[V4.0](https://gitee.com/thinkgem/jeesite4/repository/archive/v4.0_dev.zip)、
[V4.1](https://gitee.com/thinkgem/jeesite4/repository/archive/v4.1_dev.zip)、
[V5.0](https://gitee.com/thinkgem/jeesite4/repository/archive/v5.0_dev.zip)
7. 任何基于本软件而产生的一切法律纠纷和责任,均于我司无关。
8. 如果你对本软件有改进,希望可以贡献给我们,共同进步。
9. 本项目已申请软件著作权,请尊重开源,感谢阅读。
版权所有:济南卓源软件有限公司
官方网址http://jeesite.com
联系我们http://s.jeesite.com
技术服务http://s.jeesite.com

View File

@@ -4,8 +4,8 @@
</p>
<h3 align="center" style="margin:30px 0 30px;font-weight:bold;font-size:30px;">快速开发平台 - Spring Boot</h3>
<p align="center">
<a href="https://jeesite.com/docs/upgrade/" target="__blank"><img alt="JeeSite-V4.6" src="https://img.shields.io/badge/JeeSite-V4.6-success.svg"></a>
<a href="https://spring.io/projects/spring-boot#learn" target="__blank"><img alt="SpringBoot-2.7" src="https://img.shields.io/badge/SpringBoot-2.7-blue.svg"></a>
<a href="https://jeesite.com/docs/upgrade/" target="__blank"><img alt="JeeSite-V4.4" src="https://img.shields.io/badge/JeeSite-V4.4-success.svg"></a>
<a href="https://spring.io/projects/spring-boot#learn" target="__blank"><img alt="SpringBoot-2.5" src="https://img.shields.io/badge/SpringBoot-2.5-blue.svg"></a>
<a href="https://gitee.com/thinkgem/jeesite4/stargazers" target="__blank"><img alt="star" src="https://gitee.com/thinkgem/jeesite4/badge/star.svg?theme=dark"></a>
<a href="https://gitee.com/thinkgem/jeesite4/members" target="__blank"><img alt="fork" src="https://gitee.com/thinkgem/jeesite4/badge/fork.svg?theme=dark"></a>
</p>
@@ -25,7 +25,7 @@
## 平台介绍
JeeSite 快速开发平台,不仅仅是一个后台开发框架,它是一个企业级快速开发解决方案,后端基于经典组合 Spring Boot、Shiro、MyBatis前端采用 Beetl、Bootstrap、AdminLTE 经典开发模式,或者分离版 Vue3、Vite、Ant Design Vue、TypeScript、Vben Admin 最先进技术栈。提供在线代码生成功能,可自动创建业务模块工程和微服务模块工程,自动生成前端代码和后端代码;包括功能模块如组织机构、角色用户、菜单及按钮授权、数据权限、系统参数、内容管理、工作流等。采用松耦合设计微内核和插件架构模块增减便捷界面无刷新一键换肤众多账号安全设置密码策略文件在线预览消息推送多元化第三方登录在线定时任务配置支持集群支持SAAS支持多数据源支持读写分离、分库分表支持微服务应用。
JeeSite 快速开发平台,不仅仅是一个后台开发框架,它是一个企业级快速开发解决方案,后端基于经典组合 Spring Boot、Shiro、MyBatis前端采用 Beetl、Bootstrap、AdminLTE 经典开发模式,或者分离版 Vue3、Vite、Ant Design Vue、TypeScript、Vben Admin 最先进技术栈。提供在线代码生成功能,包括模块如组织机构、角色用户、菜单及按钮授权、数据权限、系统参数、内容管理、工作流等。采用松耦合设计微内核和插件架构模块增减便捷界面无刷新一键换肤众多账号安全设置密码策略文件在线预览消息推送多元化第三方登录在线定时任务配置支持集群支持SAAS支持多数据源支持读写分离、分库分表支持微服务应用。
JeeSite 快速开发平台的主要目的是能够让初级的研发人员快速的开发出复杂的业务功能,中高级人员有时间做一些更有用的事情。让开发者注重专注业务,其余有平台来封装技术细节,降低技术难度,从而节省人力成本,缩短项目周期,提高软件安全质量。
@@ -41,9 +41,7 @@ JeeSite 功能全,知识点非常多,也非常少。因为她使用的都是
JeeSite 是一个低代码开发平台具有较高的封装度、扩展性封装不是限制你去做一些事情而是在便捷的同时也具有较好的扩展性在不具备一些功能的情况下JeeSite 提供了扩展接口,提供了原生调用方法。
大家都在用 Spring也在学习 Spring 的优点Spring 提供了较好的扩展性,可又有多少人去修改它的源代码呢,退一步说,大家去修改了 Spring 的源码,反而会对未来升级造成很大困扰,您说不是呢?这样的例子很多,所以不要纠结,我们非常注重这一点JeeSite 也一样具备强大的扩展性。
为什么说 JeeSite 比较易于学习JeeSite 很好的把握了设计的 “度”,避免过度设计的情况。过度设计是在产品设计过程中忽略了产品和用户的实际需求,反而带来了不必要的复杂性,而忽略了系统的学习、开发和维护成本。
大家都在用 Spring也在学习 Spring 的优点Spring 提供了较好的扩展性,可又有多少人去修改它的源代码呢,退一步说,大家去修改了 Spring 的源码,反而会对未来升级造成很大困扰,您说不是呢?这样的例子很多,所以不要纠结,我们非常注重着一块JeeSite 也一样具备强大的扩展性。
* 至今 JeeSite 平台架构已经非常稳定。
* JeeSite 精益求精,用心打磨每一个细节。
@@ -53,16 +51,14 @@ JeeSite 是一个低代码开发平台,具有较高的封装度、扩展性,
## 技术选型
* 主框架Spring Boot 2.7、Spring Framework 5.3、Apache Shiro 1.11、J2Cache
* 主框架Spring Boot 2.5、Spring Framework 5.3、Apache Shiro 1.8、J2Cache
* 持久层Apache MyBatis 3.5、Hibernate Validator 6.2、Alibaba Druid 1.2
* 视图层Spring MVC 5.3、Beetl 3.3替换JSP、Bootstrap 3.3、AdminLTE 2.4
* 前端组件jQuery 3.5、jqGrid 4.7、layer 3.5、zTree 3.5、jQuery Validation
* 分离前端版Node.js、TypeScript、Vue3、Vite、Ant Design Vue、Vue Vben Admin
* 支持 IE9 及以上版本及其他所有现代浏览器,如:谷歌浏览器、火狐浏览器、国产浏览器 等
* 工作流引擎Flowable 6.6、符合 BPMN 规范、在线流程设计器、中国式流程、退回、撤回、自由流
* Bootstrap 版 支持 IE9 及以上版本及其他所有现代浏览器,如:谷歌、火狐、国产浏览器 等
* Vue3 版 支持现代浏览器,如:谷歌 Chrome 86+、火狐、国产浏览器 等
* 技术选型(详细):<http://jeesite.com/docs/technology/>
* JeeSite Vue<https://gitee.com/thinkgem/jeesite-vue>
* JeeSite Vue<http://jeesite.com/docs/jeesite-vue/>
## 更多介绍
@@ -74,43 +70,31 @@ JeeSite 是一个低代码开发平台,具有较高的封装度、扩展性,
## 生态系统
* 分布式微服务Spring Cloud<https://gitee.com/thinkgem/jeesite4-cloud>
* Flowable业务流程引擎BPM<http://jeesite.com/docs/bpm/>
* 分布式微服务系统Spring Cloud<https://gitee.com/thinkgem/jeesite4-cloud>
* JFlow工作流引擎<https://gitee.com/thinkgem/jeesite4-jflow> <http://ccflow.org>
* 内容管理模块CMS<https://gitee.com/thinkgem/jeesite4/tree/v5.3/modules/cms>
* Flowable业务流程模块BPM<http://jeesite.com/docs/bpm/>
* 内容管理模块CMS<https://gitee.com/thinkgem/jeesite4-cms>
* 手机端移动端:<https://gitee.com/thinkgem/jeesite4-uniapp>
* PC客户端程序<https://gitee.com/thinkgem/jeesite-client>
* Vue3分离版本<https://gitee.com/thinkgem/jeesite-vue>
* Vue3分离版本<http://jeesite.com/docs/jeesite-vue/>
## 快速体验
### 在线演示
1. 地址:<http://demo.jeesite.com/>
2. 账号system
3. 密码admin
### 本地运行
1. 环境准备:`JDK 1.8 or 11、17``Maven 3.6+`使用 `MySQL 5.7 or 8.0` 数据库、[其它数据库](https://jeesite.com/docs/technology/#_8、已支持数据库)
2. 下载源码:<https://gitee.com/thinkgem/jeesite4/repository/archive/v4.6.zip> 并解压
1. 环境准备:`JDK 1.8 or 11、17``Maven 3.6+``MySQL 5.7 or 8.0`[支持更多数据库](https://jeesite.com/docs/technology/#_8、已支持数据库)
2. 执行命令:`git clone https://gitee.com/thinkgem/jeesite4.git` 下载源码master分支
3. 打开文件:`/web/src/main/resources/config/application.yml` 配置JDBC连接
4. 执行脚本:`/web/bin/init-data.bat` 初始化数据库
5. 执行脚本:`/web/bin/run-tomcat.bat` 启动服务即可
6. 浏览器访问:<http://127.0.0.1:8980/js/> 账号 system 密码 admin
7. 部署常见问题:<https://jeesite.com/docs/faq/>
### 容器运行
- 拉取 Docker 镜像:
```
docker pull thinkgem/jeesite-web
```
- 启动脚本:
```
docker run -d -p 8980:8980 --name jeesite-web -v /data:/data \
thinkgem/jeesite-web && docker logs -f jeesite-web
```
- 浏览器访问:<http://127.0.0.1:8980/js/> 账号 system 密码 admin
### 开发环境
1. 部署运行文档:<https://jeesite.com/docs/install-deploy/>
@@ -121,52 +105,35 @@ thinkgem/jeesite-web && docker logs -f jeesite-web
* 菜单和按钮权限:<https://jeesite.com/docs/permi-shiro/>
* 强大的数据权限:<https://jeesite.com/docs/service-datascope/#数据权限>
* 表结构数据字典:<https://jeesite.com/docs/code-gen/#表结构数据字典>
* 表单组件封装:<https://jeesite.com/docs/views-beetl/>
* 持久层设计:<https://jeesite.com/docs/dao-mybatis/>
* JS脚本工具<https://jeesite.com/docs/jeesite-js/>
* 后端工具:<https://jeesite.com/docs/sys-utils/>
* 表单组件:<https://jeesite.com/docs/views-beetl/>
* 表格组件:<https://jeesite.com/docs/datagrid/>
* js工具<https://jeesite.com/docs/jeesite-js/>
## 专题文章
* 自定义主题:<https://jeesite.com/docs/custom-views/>
* 国际化多语言:<https://jeesite.com/docs/i18n-locale/>
* 接口文档:<https://jeesite.com/docs/mobile-rest-api/>
* BPM工作流引擎<https://jeesite.com/docs/bpm/>
* 用户类型:<https://jeesite.com/docs/user-type/>
* 消息推送<https://jeesite.com/docs/msg-push-use/>
* 树表结构设计<https://jeesite.com/docs/tree-table-use/>
* 单点登录:<https://jeesite.com/docs/sso-cas/>
* 在线任务调度<https://jeesite.com/docs/job/>
* 国际化<https://jeesite.com/docs/i18n-locale/>
* 对象存储:<https://jeesite.com/docs/oss-client/>
* 大屏设计器:<https://jeesite.com/docs/visual/>
* 报表设计器:<https://jeesite.com/docs/ureport/>
* 文件在线预览:<https://jeesite.com/docs/filepreview/>
* 三员管理员<https://jeesite.com/docs/manager3/>
* 报表设计器<https://jeesite.com/docs/ureport/>
* 大屏设计器:<https://jeesite.com/docs/visual/>
* 三员管理员:<https://jeesite.com/docs/3manager/>
* 在线作业调度:<https://jeesite.com/docs/job/>
* 消息推送:<https://jeesite.com/docs/msg-push-use/>
* 手机端框架:<https://jeesite.com/docs/uniapp/>
* 统一认证服务:<https://jeesite.com/docs/oauth2-server/>
* 树表结构设计:<https://jeesite.com/docs/tree-table-use/>
## 云服务架构
* 多租户、SaaS服务<https://jeesite.com/docs/saas-corp-use/>
* 集群、负载均衡、高可用:<https://jeesite.com/docs/cluster/>
* Spring Cloud 微服务<https://jeesite.com/docs/springcloud/>
* Spring Cloud<https://jeesite.com/docs/springcloud/>
* 分布式事务 LCN<https://jeesite.com/docs/springcloud-lcn/>
* 分布式事务 Seata<https://jeesite.com/docs/springcloud-seata/>
* 读写分离、分库分表:<https://jeesite.com/docs/sharding/>
## 前后分离版
* Vue 版介绍:<https://jeesite.com/docs/jeesite-vue/>
* Vue 安装部署:<https://jeesite.com/docs/vue-install-deploy/>
* Vue 参数配置:<https://jeesite.com/docs/vue-settings/>
* Vue 前端权限:<https://jeesite.com/docs/vue-auth/>
* Vue 源码解析:<https://jeesite.com/docs/vue-crud-view/>
* Vue 表单组件:<https://jeesite.com/docs/vue-basic-form/>
* Vue 表格组件:<https://jeesite.com/docs/vue-basic-table/>
* Vue 常用组件:<https://jeesite.com/docs/vue-comp/>
* Vue 图标组件:<https://jeesite.com/docs/vue-icon/>
* Vue 国际化多语言:<https://jeesite.com/docs/vue-i18n/>
* Vue 样式库:<https://jeesite.com/docs/vue-style/>
## 授权协议声明
@@ -177,14 +144,15 @@ thinkgem/jeesite-web && docker logs -f jeesite-web
更不要,全局替换源代码中的 jeesite 或 ThinkGem 等字样,否则你将违反本协议条款承担责任。
4. 您若套用本软件的一些代码或功能参考,请保留源文件中的版权和作者,需要在您的软件介绍明显位置
说明出处,举例:本软件基于 JeeSite 快速开发平台并附带链接http://jeesite.com
5. 任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
6. 如果你对本软件有改进,希望可以贡献给我们,共同进步。
7. 本项目已申请软件著作权,请尊重开源,感谢阅读
8. 本版本无用户数限制,无在线人数限制
5. 请知悉该版本用户数不可超过100个最大允许20个用户同时在线不含匿名
6. 无限制版请访问分支:[V4.0](https://gitee.com/thinkgem/jeesite4/tree/v4.0_dev/)、[V4.1](https://gitee.com/thinkgem/jeesite4/tree/v4.1_dev/)、[V5.0](https://gitee.com/thinkgem/jeesite4/tree/v5.0_dev/),源码下载:[V4.0](https://gitee.com/thinkgem/jeesite4/repository/archive/v4.0_dev.zip)、[V4.1](https://gitee.com/thinkgem/jeesite4/repository/archive/v4.1_dev.zip)、[V5.0](https://gitee.com/thinkgem/jeesite4/repository/archive/v5.0_dev.zip)
7. 任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
8. 如果你对本软件有改进,希望可以贡献给我们,共同进步
9. 本项目已申请软件著作权,请尊重开源,感谢阅读。
## 技术服务与支持
* 没有资金的支撑就很难得到发展,特别是一个好的产品,如果 JeeSite 帮助了您,请为我们点赞。支持我们,您可以获得更多回馈,我们会把公益事业做的更好,开放更多资源,回报社区和社会请给我们一些动力吧,在此非常感谢已支持我们的朋友!
* 没有资金的支撑就很难得到发展,特别是一个好的产品,如果 JeeSite 帮助了您,请为我们点赞。支持我们,您可以得到一些回报,有了这些我们会把公益事业做的更好,回报社区和社会请给我们一些动力吧,在此非常感谢已支持我们的朋友!
* **联系我们**:请访问技术支持服务页面:<https://jeesite.com/docs/support/>
## 今后如何升级?

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.jeesite</groupId>
<artifactId>jeesite-parent</artifactId>
<version>4.6.2-SNAPSHOT</version>
<version>4.4.0-SNAPSHOT</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
@@ -17,25 +17,17 @@
<url>http://jeesite.com</url>
<inceptionYear>2013-Now</inceptionYear>
<properties>
</properties>
<dependencies>
<!-- Servlet Api -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<!-- Apache Commons -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>${commons-text.version}</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
@@ -45,11 +37,28 @@
<artifactId>commons-io</artifactId>
<version>${commons-io.version}</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>${commons-fileupload.version}</version>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>${commons-beanutils.version}</version>
<version>${commons-beanutils.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>${commons-text.version}</version>
</dependency>
<!-- Apache Zip Tools
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>${ant.version}</version>
</dependency> -->
<!-- Java serialization -->
<dependency>
@@ -79,6 +88,23 @@
<version>${fastjson.version}</version>
</dependency>
<!-- Java xml
<dependency>
<groupId>org.dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>${dom4j.version}</version>
</dependency> -->
<!-- jdk11 JAXB module
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
</dependency> -->
<!-- XPath xml -->
<dependency>
<groupId>jaxen</groupId>
@@ -97,6 +123,13 @@
<artifactId>httpclient</artifactId>
</dependency>
<!-- Jsoup HTTP
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>${jsoup.version}</version>
</dependency> -->
<!-- Email -->
<dependency>
<groupId>org.apache.commons</groupId>
@@ -261,9 +294,19 @@
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
</plugins>
</build>
<developers>
<developer>
<id>thinkgem</id>

View File

@@ -74,15 +74,15 @@ public class DesUtils {
String encData = "";
List firstKeyBt = null, secondKeyBt = null, thirdKeyBt = null;
int firstLength = 0, secondLength = 0, thirdLength = 0;
if (firstKey != null && !"".equals(firstKey)) {
if (firstKey != null && !firstKey.equals("")) {
firstKeyBt = getKeyBytes(firstKey);
firstLength = firstKeyBt.size();
}
if (secondKey != null && !"".equals(secondKey)) {
if (secondKey != null && !secondKey.equals("")) {
secondKeyBt = getKeyBytes(secondKey);
secondLength = secondKeyBt.size();
}
if (thirdKey != null && !"".equals(thirdKey)) {
if (thirdKey != null && !thirdKey.equals("")) {
thirdKeyBt = getKeyBytes(thirdKey);
thirdLength = thirdKeyBt.size();
}
@@ -91,7 +91,7 @@ public class DesUtils {
if (leng < 4) {
int[] bt = strToBt(data);
int[] encByte = null;
if (firstKey != null && !"".equals(firstKey) && secondKey != null && !"".equals(secondKey) && thirdKey != null && !"".equals(firstKey)) {
if (firstKey != null && !firstKey.equals("") && secondKey != null && !secondKey.equals("") && thirdKey != null && !firstKey.equals("")) {
int[] tempBt;
int x, y, z;
tempBt = bt;
@@ -106,7 +106,7 @@ public class DesUtils {
}
encByte = tempBt;
} else {
if (firstKey != null && !"".equals(firstKey) && secondKey != null && !"".equals(secondKey)) {
if (firstKey != null && !firstKey.equals("") && secondKey != null && !secondKey.equals("")) {
int[] tempBt;
int x, y;
tempBt = bt;
@@ -118,7 +118,7 @@ public class DesUtils {
}
encByte = tempBt;
} else {
if (firstKey != null && !"".equals(firstKey)) {
if (firstKey != null && !firstKey.equals("")) {
int[] tempBt;
int x = 0;
tempBt = bt;
@@ -138,7 +138,7 @@ public class DesUtils {
String tempData = data.substring(i * 4 + 0, i * 4 + 4);
int[] tempByte = strToBt(tempData);
int[] encByte = null;
if (firstKey != null && !"".equals(firstKey) && secondKey != null && !"".equals(secondKey) && thirdKey != null && !"".equals(thirdKey)) {
if (firstKey != null && !firstKey.equals("") && secondKey != null && !secondKey.equals("") && thirdKey != null && !thirdKey.equals("")) {
int[] tempBt;
int x, y, z;
tempBt = tempByte;
@@ -153,7 +153,7 @@ public class DesUtils {
}
encByte = tempBt;
} else {
if (firstKey != null && !"".equals(firstKey) && secondKey != null && !"".equals(secondKey)) {
if (firstKey != null && !firstKey.equals("") && secondKey != null && !secondKey.equals("")) {
int[] tempBt;
int x, y;
tempBt = tempByte;
@@ -165,7 +165,7 @@ public class DesUtils {
}
encByte = tempBt;
} else {
if (firstKey != null && !"".equals(firstKey)) {
if (firstKey != null && !firstKey.equals("")) {
int[] tempBt;
int x;
tempBt = tempByte;
@@ -182,7 +182,7 @@ public class DesUtils {
String remainderData = data.substring(iterator * 4 + 0, leng);
int[] tempByte = strToBt(remainderData);
int[] encByte = null;
if (firstKey != null && !"".equals(firstKey) && secondKey != null && !"".equals(secondKey) && thirdKey != null && !"".equals(thirdKey)) {
if (firstKey != null && !firstKey.equals("") && secondKey != null && !secondKey.equals("") && thirdKey != null && !thirdKey.equals("")) {
int[] tempBt;
int x, y, z;
tempBt = tempByte;
@@ -197,7 +197,7 @@ public class DesUtils {
}
encByte = tempBt;
} else {
if (firstKey != null && !"".equals(firstKey) && secondKey != null && !"".equals(secondKey)) {
if (firstKey != null && !firstKey.equals("") && secondKey != null && !secondKey.equals("")) {
int[] tempBt;
int x, y;
tempBt = tempByte;
@@ -209,7 +209,7 @@ public class DesUtils {
}
encByte = tempBt;
} else {
if (firstKey != null && !"".equals(firstKey)) {
if (firstKey != null && !firstKey.equals("")) {
int[] tempBt;
int x;
tempBt = tempByte;
@@ -237,15 +237,15 @@ public class DesUtils {
String decStr = "";
List firstKeyBt = null, secondKeyBt = null, thirdKeyBt = null;
int firstLength = 0, secondLength = 0, thirdLength = 0;
if (firstKey != null && !"".equals(firstKey)) {
if (firstKey != null && !firstKey.equals("")) {
firstKeyBt = getKeyBytes(firstKey);
firstLength = firstKeyBt.size();
}
if (secondKey != null && !"".equals(secondKey)) {
if (secondKey != null && !secondKey.equals("")) {
secondKeyBt = getKeyBytes(secondKey);
secondLength = secondKeyBt.size();
}
if (thirdKey != null && !"".equals(thirdKey)) {
if (thirdKey != null && !thirdKey.equals("")) {
thirdKeyBt = getKeyBytes(thirdKey);
thirdLength = thirdKeyBt.size();
}
@@ -261,7 +261,7 @@ public class DesUtils {
intByte[j] = Integer.parseInt(strByte.substring(j, j + 1));
}
int[] decByte = null;
if (firstKey != null && !"".equals(firstKey) && secondKey != null && !"".equals(secondKey) && thirdKey != null && !"".equals(thirdKey)) {
if (firstKey != null && !firstKey.equals("") && secondKey != null && !secondKey.equals("") && thirdKey != null && !thirdKey.equals("")) {
int[] tempBt;
int x, y, z;
tempBt = intByte;
@@ -276,7 +276,7 @@ public class DesUtils {
}
decByte = tempBt;
} else {
if (firstKey != null && !"".equals(firstKey) && secondKey != null && !"".equals(secondKey)) {
if (firstKey != null && !firstKey.equals("") && secondKey != null && !secondKey.equals("")) {
int[] tempBt;
int x, y, z;
tempBt = intByte;
@@ -288,7 +288,7 @@ public class DesUtils {
}
decByte = tempBt;
} else {
if (firstKey != null && !"".equals(firstKey)) {
if (firstKey != null && !firstKey.equals("")) {
int[] tempBt;
int x, y, z;
tempBt = intByte;
@@ -382,37 +382,37 @@ public class DesUtils {
*/
public String bt4ToHex(String binary) {
String hex = "";
if ("0000".equalsIgnoreCase(binary)) {
if (binary.equalsIgnoreCase("0000")) {
hex = "0";
} else if ("0001".equalsIgnoreCase(binary)) {
} else if (binary.equalsIgnoreCase("0001")) {
hex = "1";
} else if ("0010".equalsIgnoreCase(binary)) {
} else if (binary.equalsIgnoreCase("0010")) {
hex = "2";
} else if ("0011".equalsIgnoreCase(binary)) {
} else if (binary.equalsIgnoreCase("0011")) {
hex = "3";
} else if ("0100".equalsIgnoreCase(binary)) {
} else if (binary.equalsIgnoreCase("0100")) {
hex = "4";
} else if ("0101".equalsIgnoreCase(binary)) {
} else if (binary.equalsIgnoreCase("0101")) {
hex = "5";
} else if ("0110".equalsIgnoreCase(binary)) {
} else if (binary.equalsIgnoreCase("0110")) {
hex = "6";
} else if ("0111".equalsIgnoreCase(binary)) {
} else if (binary.equalsIgnoreCase("0111")) {
hex = "7";
} else if ("1000".equalsIgnoreCase(binary)) {
} else if (binary.equalsIgnoreCase("1000")) {
hex = "8";
} else if ("1001".equalsIgnoreCase(binary)) {
} else if (binary.equalsIgnoreCase("1001")) {
hex = "9";
} else if ("1010".equalsIgnoreCase(binary)) {
} else if (binary.equalsIgnoreCase("1010")) {
hex = "A";
} else if ("1011".equalsIgnoreCase(binary)) {
} else if (binary.equalsIgnoreCase("1011")) {
hex = "B";
} else if ("1100".equalsIgnoreCase(binary)) {
} else if (binary.equalsIgnoreCase("1100")) {
hex = "C";
} else if ("1101".equalsIgnoreCase(binary)) {
} else if (binary.equalsIgnoreCase("1101")) {
hex = "D";
} else if ("1110".equalsIgnoreCase(binary)) {
} else if (binary.equalsIgnoreCase("1110")) {
hex = "E";
} else if ("1111".equalsIgnoreCase(binary)) {
} else if (binary.equalsIgnoreCase("1111")) {
hex = "F";
}
@@ -426,51 +426,51 @@ public class DesUtils {
*/
public String hexToBt4(String hex) {
String binary = "";
if ("0".equalsIgnoreCase(hex)) {
if (hex.equalsIgnoreCase("0")) {
binary = "0000";
} else if ("1".equalsIgnoreCase(hex)) {
} else if (hex.equalsIgnoreCase("1")) {
binary = "0001";
}
if ("2".equalsIgnoreCase(hex)) {
if (hex.equalsIgnoreCase("2")) {
binary = "0010";
}
if ("3".equalsIgnoreCase(hex)) {
if (hex.equalsIgnoreCase("3")) {
binary = "0011";
}
if ("4".equalsIgnoreCase(hex)) {
if (hex.equalsIgnoreCase("4")) {
binary = "0100";
}
if ("5".equalsIgnoreCase(hex)) {
if (hex.equalsIgnoreCase("5")) {
binary = "0101";
}
if ("6".equalsIgnoreCase(hex)) {
if (hex.equalsIgnoreCase("6")) {
binary = "0110";
}
if ("7".equalsIgnoreCase(hex)) {
if (hex.equalsIgnoreCase("7")) {
binary = "0111";
}
if ("8".equalsIgnoreCase(hex)) {
if (hex.equalsIgnoreCase("8")) {
binary = "1000";
}
if ("9".equalsIgnoreCase(hex)) {
if (hex.equalsIgnoreCase("9")) {
binary = "1001";
}
if ("A".equalsIgnoreCase(hex)) {
if (hex.equalsIgnoreCase("A")) {
binary = "1010";
}
if ("B".equalsIgnoreCase(hex)) {
if (hex.equalsIgnoreCase("B")) {
binary = "1011";
}
if ("C".equalsIgnoreCase(hex)) {
if (hex.equalsIgnoreCase("C")) {
binary = "1100";
}
if ("D".equalsIgnoreCase(hex)) {
if (hex.equalsIgnoreCase("D")) {
binary = "1101";
}
if ("E".equalsIgnoreCase(hex)) {
if (hex.equalsIgnoreCase("E")) {
binary = "1110";
}
if ("F".equalsIgnoreCase(hex)) {
if (hex.equalsIgnoreCase("F")) {
binary = "1111";
}
return binary;

View File

@@ -4,14 +4,23 @@
*/
package com.jeesite.common.collect;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CopyOnWriteArrayList;
import org.apache.commons.beanutils.PropertyUtils;
import com.jeesite.common.callback.MethodCallback;
import com.jeesite.common.lang.ObjectUtils;
import com.jeesite.common.lang.StringUtils;
import com.jeesite.common.reflect.ReflectUtils;
import org.apache.commons.beanutils.PropertyUtils;
import java.util.*;
import java.util.concurrent.CopyOnWriteArrayList;
/**
* List工具类
@@ -337,38 +346,27 @@ public class ListUtils extends org.apache.commons.collections.ListUtils {
* @author ThinkGem
*/
public static <T> void pageList(List<T> list, int pageSize, MethodCallback pageCallback){
if (list == null || pageSize == 0) {
return;
}
if (list != null && list.size() > 0){
int count = list.size();
int count = list.size(), pageNo = 1;
int totalPage = (count + pageSize - 1) / pageSize;
while(true){
if (count == 0) {
return;
}
if (count <= pageSize) {
pageCallback.execute(list, 1, pageSize, 1);
return;
}
int pageNo = 1, totalPage = (count + pageSize - 1) / pageSize;
while(true){
// 执行回调,分页后的数据
List<T> pageList = getPageList(list, pageNo, pageSize, totalPage);
if (pageList.size() > 0){
pageCallback.execute(pageList, pageNo, pageSize, totalPage);
// 执行回调,分页后的数据
List<T> pageList = getPageList(list, pageNo, pageSize, totalPage);
if (pageList.size() > 0){
pageCallback.execute(pageList, pageNo, pageSize, totalPage);
}
// 如果为最后一页,则跳出循环
if (pageNo >= totalPage){
break;
}
// 页数加一继续下一页
pageNo++;
}
// 如果为最后一页,则跳出循环
if (pageNo >= totalPage){
break;
}
// 页数加一继续下一页
pageNo++;
}
}

View File

@@ -655,12 +655,7 @@ public class FileUtils extends org.apache.commons.io.FileUtils {
*/
public static String getContentType(String fileName) {
if (mimetypesFileTypeMap == null){
try {
mimetypesFileTypeMap = new MimetypesFileTypeMap(ResourceUtils
.getResourceFileStream("/META-INF/jeesite.mime.types"));
}catch (IOException e) {
mimetypesFileTypeMap = new MimetypesFileTypeMap();
}
mimetypesFileTypeMap = new MimetypesFileTypeMap();
}
return mimetypesFileTypeMap.getContentType(fileName);
}

View File

@@ -126,7 +126,7 @@ public class PropertiesUtils {
YamlPropertiesFactoryBean bean = new YamlPropertiesFactoryBean();
bean.setResources(resource);
for (Map.Entry<Object,Object> entry : bean.getObject().entrySet()){
properties.put(getStandardKey(ObjectUtils.toString(entry.getKey())),
properties.put(ObjectUtils.toString(entry.getKey()),
ObjectUtils.toString(entry.getValue()));
}
configSet.add(location);
@@ -181,7 +181,7 @@ public class PropertiesUtils {
return value;
}
}
String value = properties.getProperty(getStandardKey(key));
String value = properties.getProperty(key);
if (value != null){
Matcher m = p1.matcher(value);
while(m.find()) {
@@ -231,30 +231,6 @@ public class PropertiesUtils {
return ObjectUtils.toLong(getProperty(key, defValue));
}
/**
* 获取标准key去减号并将后一个字母转换为大写
* @author Think Gem
*/
private String getStandardKey(String key) {
if (key.startsWith("spring.shardingsphere.")) {
return key;
}
StringBuilder sb = new StringBuilder();
boolean upperCase = false;
for (int i = 0; i < key.length(); i++) {
char c = key.charAt(i);
if (c == '-') {
upperCase = true;
} else if (upperCase) {
sb.append(Character.toUpperCase(c));
upperCase = false;
} else {
sb.append(c);
}
}
return sb.toString();
}
/**
* 设置环境属性
* @param environment

View File

@@ -171,7 +171,7 @@ public class ObjectUtils extends org.apache.commons.lang3.ObjectUtils {
return ObjectUtils.serializeFst(object);
}
} catch (Exception e) {
logger.error("serialize: {}", e.getMessage(), e);
logger.error("serialize", e.getMessage());
}
return null;
}
@@ -189,7 +189,7 @@ public class ObjectUtils extends org.apache.commons.lang3.ObjectUtils {
return ObjectUtils.unserializeFst(bytes);
}
} catch (Exception e) {
logger.error("unserialize: {}", e.getMessage());
logger.error("unserialize", e.getMessage());
}
return null;
}
@@ -247,8 +247,7 @@ public class ObjectUtils extends org.apache.commons.lang3.ObjectUtils {
private static ThreadLocal<FSTConfiguration> fstConfiguration =
new NamedThreadLocal<FSTConfiguration>("FSTConfiguration") {
@Override
public FSTConfiguration initialValue() {
public FSTConfiguration initialValue() {
return FSTConfiguration.createDefaultConfiguration();
}
};

View File

@@ -76,7 +76,7 @@ public class WorkDayUtils {
* @return
*/
public String getChineseWeek(Calendar date) {
final String[] dayNames = { "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" };
final String dayNames[] = { "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" };
int dayOfWeek = date.get(Calendar.DAY_OF_WEEK);
// System.out.println(dayNames[dayOfWeek - 1]);
return dayNames[dayOfWeek - 1];

View File

@@ -0,0 +1,172 @@
/**
* Copyright (c) 2005-2012 springside.org.cn
*
* Licensed under the Apache License, Version 2.0 (the "License");
*/
package com.jeesite.common.mapper;
import java.io.StringReader;
import java.io.StringWriter;
import java.util.Collection;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import javax.xml.bind.Unmarshaller;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.namespace.QName;
import com.jeesite.common.lang.ExceptionUtils;
import com.jeesite.common.lang.StringUtils;
import com.jeesite.common.reflect.ReflectUtils;
/**
* 使用Jaxb2.0实现XML<->Java Object的Mapper.
*
* 在创建时需要设定所有需要序列化的Root对象的Class.
* 特别支持Root对象是Collection的情形.
*
* @author calvin
* @version 2013-01-15
*/
@SuppressWarnings("rawtypes")
public class JaxbMapper {
private static ConcurrentMap<Class, JAXBContext> jaxbContexts = new ConcurrentHashMap<Class, JAXBContext>();
/**
* Java Object->Xml without encoding.
*/
public static String toXml(Object root) {
Class clazz = ReflectUtils.getUserClass(root);
return toXml(root, clazz, null);
}
/**
* Java Object->Xml with encoding.
*/
public static String toXml(Object root, String encoding) {
Class clazz = ReflectUtils.getUserClass(root);
return toXml(root, clazz, encoding);
}
/**
* Java Object->Xml with encoding.
*/
public static String toXml(Object root, Class clazz, String encoding) {
try {
StringWriter writer = new StringWriter();
createMarshaller(clazz, encoding).marshal(root, writer);
return writer.toString();
} catch (JAXBException e) {
throw ExceptionUtils.unchecked(e);
}
}
/**
* Java Collection->Xml without encoding, 特别支持Root Element是Collection的情形.
*/
public static String toXml(Collection<?> root, String rootName, Class clazz) {
return toXml(root, rootName, clazz, null);
}
/**
* Java Collection->Xml with encoding, 特别支持Root Element是Collection的情形.
*/
public static String toXml(Collection<?> root, String rootName, Class clazz, String encoding) {
try {
CollectionWrapper wrapper = new CollectionWrapper();
wrapper.collection = root;
JAXBElement<CollectionWrapper> wrapperElement = new JAXBElement<CollectionWrapper>(new QName(rootName),
CollectionWrapper.class, wrapper);
StringWriter writer = new StringWriter();
createMarshaller(clazz, encoding).marshal(wrapperElement, writer);
return writer.toString();
} catch (JAXBException e) {
throw ExceptionUtils.unchecked(e);
}
}
/**
* Xml->Java Object.
*/
@SuppressWarnings("unchecked")
public static <T> T fromXml(String xml, Class<T> clazz) {
try {
StringReader reader = new StringReader(xml);
return (T) createUnmarshaller(clazz).unmarshal(reader);
} catch (JAXBException e) {
throw ExceptionUtils.unchecked(e);
}
}
/**
* 创建Marshaller并设定encoding(可为null).
* 线程不安全需要每次创建或pooling。
*/
public static Marshaller createMarshaller(Class clazz, String encoding) {
try {
JAXBContext jaxbContext = getJaxbContext(clazz);
Marshaller marshaller = jaxbContext.createMarshaller();
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
if (StringUtils.isNotBlank(encoding)) {
marshaller.setProperty(Marshaller.JAXB_ENCODING, encoding);
}
return marshaller;
} catch (JAXBException e) {
throw ExceptionUtils.unchecked(e);
}
}
/**
* 创建UnMarshaller.
* 线程不安全需要每次创建或pooling。
*/
public static Unmarshaller createUnmarshaller(Class clazz) {
try {
JAXBContext jaxbContext = getJaxbContext(clazz);
return jaxbContext.createUnmarshaller();
} catch (JAXBException e) {
throw ExceptionUtils.unchecked(e);
}
}
protected static JAXBContext getJaxbContext(Class clazz) {
if (clazz == null){
throw new RuntimeException("'clazz' must not be null");
}
JAXBContext jaxbContext = jaxbContexts.get(clazz);
if (jaxbContext == null) {
try {
jaxbContext = JAXBContext.newInstance(clazz, CollectionWrapper.class);
jaxbContexts.putIfAbsent(clazz, jaxbContext);
} catch (JAXBException ex) {
// throw new HttpMessageConversionException("Could not instantiate JAXBContext for class [" + clazz
// + "]: " + ex.getMessage(), ex);
throw new RuntimeException("Could not instantiate JAXBContext for class [" + clazz
+ "]: " + ex.getMessage(), ex);
}
}
return jaxbContext;
}
/**
* 封装Root Element 是 Collection的情况.
*/
public static class CollectionWrapper {
@XmlAnyElement
protected Collection<?> collection;
}
}

View File

@@ -32,7 +32,7 @@ import com.fasterxml.jackson.databind.introspect.Annotated;
import com.fasterxml.jackson.databind.introspect.AnnotatedMethod;
import com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector;
import com.fasterxml.jackson.databind.util.JSONPObject;
//import com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule;
import com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule;
import com.jeesite.common.collect.ListUtils;
import com.jeesite.common.io.PropertiesUtils;
import com.jeesite.common.lang.DateUtils;
@@ -222,15 +222,15 @@ public class JsonMapper extends ObjectMapper {
return this;
}
// /**
// * 支持使用Jaxb的Annotation使得POJO上的annotation不用与Jackson耦合。
// * 默认会先查找jaxb的annotation如果找不到再找jackson的。
// */
// public JsonMapper enableJaxbAnnotation() {
// JaxbAnnotationModule module = new JaxbAnnotationModule();
// this.registerModule(module);
// return this;
// }
/**
* 支持使用Jaxb的Annotation使得POJO上的annotation不用与Jackson耦合。
* 默认会先查找jaxb的annotation如果找不到再找jackson的。
*/
public JsonMapper enableJaxbAnnotation() {
JaxbAnnotationModule module = new JaxbAnnotationModule();
this.registerModule(module);
return this;
}
/**
* 取出Mapper做进一步的设置或使用其他序列化API.

View File

@@ -170,7 +170,7 @@ public class VideoUtils {
command.add(getFfmpegFile());
command.add("-i");
command.add(inputFile);
if ("gif".equals(imgFileExtension.toLowerCase())) {
if ((imgFileExtension.toLowerCase()).equals("gif")) {
command.add("-vframes");
command.add("30");
command.add("-f");

View File

@@ -20,6 +20,9 @@ public class EmailUtils {
/**
* 发送邮件
* @param toAddress 接收地址
* @param subject 标题
* @param content 内容
* @return
*/
public static boolean send(String toAddress, String subject, String content) {
@@ -27,23 +30,9 @@ public class EmailUtils {
String fromAddress = props.getProperty("msg.email.fromAddress");
String fromPassword = props.getProperty("msg.email.fromPassword");
String fromHostName = props.getProperty("msg.email.fromHostName");
Integer smtpPort = props.getPropertyToInteger("msg.email.smtpPort", "25");
String sslOnConnect = props.getProperty("msg.email.sslOnConnect", "false");
String sslSmtpPort = props.getProperty("msg.email.sslSmtpPort");
return send(fromAddress, fromPassword, fromHostName, smtpPort, sslOnConnect, sslSmtpPort, toAddress, subject, content);
}
/**
* 发送邮件
* @param toAddress 接收地址
* @param subject 标题
* @param content 内容
* @return
*/
@Deprecated
public static boolean send(String fromAddress, String fromPassword, String fromHostName,
String sslOnConnect, String sslSmtpPort, String toAddress, String subject, String content) {
return send(fromAddress, fromPassword, fromHostName, 25, sslOnConnect, sslSmtpPort, toAddress, subject, content);
return send(fromAddress, fromPassword, fromHostName, sslOnConnect, sslSmtpPort, toAddress, subject, content);
}
/**
@@ -53,7 +42,7 @@ public class EmailUtils {
* @param content 内容
* @return
*/
public static boolean send(String fromAddress, String fromPassword, String fromHostName, Integer smtpPort,
public static boolean send(String fromAddress, String fromPassword, String fromHostName,
String sslOnConnect, String sslSmtpPort, String toAddress, String subject, String content) {
try {
HtmlEmail htmlEmail = new HtmlEmail();
@@ -61,10 +50,8 @@ public class EmailUtils {
htmlEmail.setFrom(fromAddress);
// 密码校验
htmlEmail.setAuthentication(fromAddress, fromPassword);
// 发送服务器主机名
// 发送服务器协议
htmlEmail.setHostName(fromHostName);
// 发送服务器端口
htmlEmail.setSmtpPort(smtpPort);
// SSL
if ("true".equals(sslOnConnect)) {

View File

@@ -2227,7 +2227,7 @@ public class DiffMatchPatch {
if (m.group(2).length() == 0) {
patch.start1--;
patch.length1 = 1;
} else if ("0".equals(m.group(2))) {
} else if (m.group(2).equals("0")) {
patch.length1 = 0;
} else {
patch.start1--;
@@ -2238,7 +2238,7 @@ public class DiffMatchPatch {
if (m.group(4).length() == 0) {
patch.start2--;
patch.length2 = 1;
} else if ("0".equals(m.group(4))) {
} else if (m.group(4).equals("0")) {
patch.length2 = 0;
} else {
patch.start2--;

View File

@@ -123,7 +123,7 @@ public class PinyinUtils {
if (input == null){
return null;
}
char[] c = input.toCharArray();
char c[] = input.toCharArray();
for (int i = 0; i < c.length; i++) {
if (c[i] == ' ') {
c[i] = '\u3000';
@@ -143,7 +143,7 @@ public class PinyinUtils {
if (input == null){
return null;
}
char[] c = input.toCharArray();
char c[] = input.toCharArray();
for (int i = 0; i < c.length; i++) {
if (c[i] == '\u3000') {
c[i] = ' ';

View File

@@ -10,9 +10,15 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.fileupload.FileItemIterator;
import org.apache.commons.fileupload.FileItemStream;
import org.apache.commons.fileupload.FileUploadException;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import com.jeesite.common.codec.EncodeUtils;
import com.jeesite.common.image.ImageUtils;
import com.jeesite.common.io.FileUtils;
import com.jeesite.common.media.VideoUtils;
@@ -26,33 +32,55 @@ import com.jeesite.common.ueditor.define.State;
public class BinaryUploader {
public static final State save(HttpServletRequest request,
Map<String, Object> conf) {
String contentType = request.getContentType();
if (!("POST".equals(request.getMethod()) && contentType != null
&& contentType.startsWith("multipart/"))) {
Map<String, Object> conf) {
FileItemStream fileStream = null; // 原始上传
MultipartFile fileStream2 = null; // Spring MVC 上传
boolean isAjaxUpload = request.getHeader("X-Requested-With") != null;
if (!ServletFileUpload.isMultipartContent(request)) {
return new BaseState(false, AppInfo.NOT_MULTIPART_CONTENT);
}
ServletFileUpload upload = new ServletFileUpload(new DiskFileItemFactory());
if ( isAjaxUpload ) {
upload.setHeaderEncoding( EncodeUtils.UTF_8 );
}
try {
MultipartFile file = null;
if (request instanceof MultipartHttpServletRequest){
MultipartHttpServletRequest multiRequest = (MultipartHttpServletRequest) request;
Iterator<String> it = multiRequest.getFileNames();
while (it.hasNext()) {
MultipartFile f = multiRequest.getFile(it.next());
if (f != null && !f.isEmpty() && f.getOriginalFilename() != null) {
file = f;
}
FileItemIterator iterator = upload.getItemIterator(request);
while (iterator.hasNext()) {
fileStream = iterator.next();
if (!fileStream.isFormField()) {
break;
}
fileStream = null;
}
if (file == null) {
if (fileStream == null) {
// 原始上传无文件则检查是否是Spring MVC上传 ThinkGem
MultipartFile file = null;
if (request instanceof MultipartHttpServletRequest){
MultipartHttpServletRequest multiRequest = (MultipartHttpServletRequest) request;
Iterator<String> it = multiRequest.getFileNames();
while (it.hasNext()) {
file = multiRequest.getFile(it.next());
break;
}
}
if (file != null && !file.isEmpty() && file.getOriginalFilename() != null) {
fileStream2 = file;
}
}
if (fileStream == null && fileStream2 == null) {
return new BaseState(false, AppInfo.NOTFOUND_UPLOAD_DATA);
}
String savePath = (String) conf.get("savePath");
String originFileName = file.getOriginalFilename();
String originFileName = fileStream != null ? fileStream.getName() : fileStream2.getOriginalFilename();
String suffix = FileType.getSuffixByFilename(originFileName);
originFileName = originFileName.substring(0,
@@ -69,36 +97,29 @@ public class BinaryUploader {
String physicalPath = FileUtils.path((String) conf.get("rootPath") + savePath);
InputStream is = null;
State storageState = null;
try {
is = file.getInputStream();
storageState = StorageManager.saveFileByInputStream(is, physicalPath, maxSize);
} finally {
if (is != null) {
is.close();
}
}
InputStream is = fileStream != null ? fileStream.openStream() : fileStream2.getInputStream();
State storageState = StorageManager.saveFileByInputStream(is, physicalPath, maxSize);
is.close();
if (storageState != null && storageState.isSuccess()) {
if (storageState.isSuccess()) {
int actionCode = ((Integer) conf.get("actionCode")).intValue();
String ctx = request.getContextPath(); // ThinkGem 修正上传图片后返回无contextpath问题
// 上传图片后,进行图片压缩
if (actionCode == ActionMap.UPLOAD_IMAGE){
// 如果开启了压缩图片
if ((Boolean)conf.get("imageCompressEnable")){
Integer maxWidth = (Integer)conf.get("imageCompressBorder");
ImageUtils.thumbnails(new File(physicalPath), maxWidth, -1, null);
}
}
// 上传成功后 转换格式 按照新的视频格式 返回前台 ThinkGem
else if(actionCode == ActionMap.UPLOAD_VIDEO){
final VideoUtils v = new VideoUtils(physicalPath);
// 先截图
// 先截图
if (v.cutPic()){
// 开启进程,在转换视频文件
Thread thread = new Thread("video-convert") {
@@ -113,26 +134,28 @@ public class BinaryUploader {
}
};
thread.setDaemon(true);
thread.start();
thread.start();
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;
} catch (FileUploadException e) {
return new BaseState(false, AppInfo.PARSE_REQUEST_ERROR);
} catch (IOException e) {
return new BaseState(false, AppInfo.IO_ERROR);
}
@@ -143,5 +166,5 @@ public class BinaryUploader {
return list.contains(type);
}
}

View File

@@ -24,17 +24,17 @@ public class IdcardUtils extends StringUtils {
public static final int CHINA_ID_MAX_LENGTH = 18;
/** 省、直辖市代码表 */
public static final String[] cityCode = { "11", "12", "13", "14", "15",
public static final String cityCode[] = { "11", "12", "13", "14", "15",
"21", "22", "23", "31", "32", "33", "34", "35", "36", "37", "41",
"42", "43", "44", "45", "46", "50", "51", "52", "53", "54", "61",
"62", "63", "64", "65", "71", "81", "82", "91" };
/** 每位加权因子 */
public static final int[] power = { 7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9,
public static final int power[] = { 7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9,
10, 5, 8, 4, 2 };
/** 第18位校检码 */
public static final String[] verifyCode = { "1", "0", "X", "9", "8", "7",
public static final String verifyCode[] = { "1", "0", "X", "9", "8", "7",
"6", "5", "4", "3", "2" };
/** 最低年限 */
public static final int MIN = 1930;
@@ -177,7 +177,7 @@ public class IdcardUtils extends StringUtils {
}
String[] cardval = validateIdCard10(card);
if (cardval != null) {
if ("true".equals(cardval[2])) {
if (cardval[2].equals("true")) {
return true;
}
}
@@ -276,10 +276,10 @@ public class IdcardUtils extends StringUtils {
info[0] = "台湾";
System.out.println("11111");
String char2 = idCard.substring(1, 2);
if ("1".equals(char2)) {
if (char2.equals("1")) {
info[1] = "M";
System.out.println("MMMMMMM");
} else if ("2".equals(char2)) {
} else if (char2.equals("2")) {
info[1] = "F";
System.out.println("FFFFFFF");
} else {
@@ -361,7 +361,7 @@ public class IdcardUtils extends StringUtils {
sum = sum + Integer.valueOf(c + "") * iflag;
iflag--;
}
if ("A".equals(end.toUpperCase())) {
if (end.toUpperCase().equals("A")) {
sum = sum + 10;
} else {
sum = sum + Integer.valueOf(end);

View File

@@ -168,7 +168,7 @@ public abstract class ExcelReader extends DefaultHandler {
// 将单元格内容加入rowlist中在这之前先去掉字符串前后的空白符
} else if ("v".equals(name)) {
String value = lastContents.trim();
value = "".equals(value) ? " " : value;
value = value.equals("") ? " " : value;
try {
// 日期格式处理
if (dateFlag) {
@@ -188,7 +188,7 @@ public abstract class ExcelReader extends DefaultHandler {
curCol++;
} else {
// 如果标签名称为 row ,这说明已到行尾,调用 optRows() 方法
if ("row".equals(name)) {
if (name.equals("row")) {
getRows(sheetIndex + 1, curRow, rowList);
rowList.clear();
curRow++;

View File

@@ -23,24 +23,21 @@ public class MoneyType implements FieldType {
/**
* 获取对象值(导入)
*/
@Override
public Object getValue(String val) {
public Object getValue(String val) {
return val == null ? StringUtils.EMPTY : StringUtils.replace(val, ",", StringUtils.EMPTY);
}
/**
* 获取对象值(导出)
*/
@Override
public String setValue(Object val) {
public String setValue(Object val) {
return val == null ? StringUtils.EMPTY : nf.format(val);
}
/**
* 获取对象值格式(导出)
*/
@Override
public String getDataFormat() {
public String getDataFormat() {
return "0.00";
}

View File

@@ -464,7 +464,7 @@ public class BookMark {
// Get the first node and catch it's reference for return if
// the first child node is a style node (w:rPr).
childNode = parentNode.getFirstChild();
if (childNode != null && "w:rPr".equals(childNode.getNodeName())) {
if (childNode != null && childNode.getNodeName().equals("w:rPr")) {
styleNode = childNode;
} else {
// If the first node was not a style node and there are other

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -164,7 +164,7 @@ a, a:hover, a:active, a:focus, .form-unit, th[aria-selected=true] .ui-jqgrid-sor
.sidebar-menu {padding:0 8px 0 7px;}
.sidebar-menu li>a>.pull-right-container {left:0;}
.sidebar-menu .treeview-item.active>a {color:#1890ff;background-color:#e7f4ff;border-right:0;border-radius:6px;}
.sidebar-menu .treeview-item.active > a {color:#1890ff;background-color:#e7f4ff;border-right:0;border-radius:6px;}
/* 页签添加内边距 */
.content-wrapper, .tabpanel_content, .tabpanel_content .html_content, body {background-color:#f0f2f5;}
@@ -209,9 +209,9 @@ a, a:hover, a:active, a:focus, .form-unit, th[aria-selected=true] .ui-jqgrid-sor
.open>.dropdown-toggle.btn-primary:hover, .layui-layer-btn .layui-layer-btn0,
.select2-container--default .select2-selection--multiple .select2-selection__choice,
.select2-container--default .select2-results__option--highlighted[aria-selected],
.wup_container .placeholder .webuploader-pick {background-color:#1890ff!important;border-color:#1890ff!important;}
.wup_container .placeholder .webuploader-pick {background-color:#1890ff!important;border-color:#1890ff;}
.form-unit, th[aria-selected=true] .ui-jqgrid-sortable {color:#1890ff;}
.form-unit {border-bottom:1px solid #eee;}
.form-unit {border-bottom: 1px solid #eee;}
.box-main>.box-header {border-bottom-color:#eeeeee;}
.box-main>.box-header .box-title .fa {color:#1890ff;}
@@ -220,10 +220,10 @@ a, a:hover, a:active, a:focus, .form-unit, th[aria-selected=true] .ui-jqgrid-sor
.select2-container--default .select2-search--dropdown .select2-search__field,
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple {border-color:#40a9ff!important;box-shadow:0 0 0 2px rgba(24,144,255,.2);}
.table thead tr, .ui-jqgrid-htable thead tr, .ui-jqgrid-hdiv, .ui-jqgrid-hbox {background-color:#fafafa;}
.ui-jqgrid .ui-jqgrid-labels th, .ui-jqgrid tr.ui-row-ltr td, .ui-jqgrid tr.ui-row-rtl td, .ui-jqgrid tr.ui-row-ltr td:last-child,
.table thead tr, .ui-jqgrid-htable thead tr, .ui-jqgrid-hdiv, .ui-jqgrid-hbox {background-color:#f6f6f6;}
.ui-jqgrid .ui-jqgrid-htable th.ui-th-column-header, .ui-jqgrid .ui-jqgrid-htable th.ui-th-column,
.ui-jqgrid.ui-widget-content, .ui-jqgrid .ui-widget-content {border-color:#f0f0f0;}
.ui-jqgrid .ui-jqgrid-labels th, .ui-jqgrid .ui-widget-content, .ui-jqgrid tr.ui-row-ltr td,
.ui-jqgrid tr.ui-row-rtl td, .ui-jqgrid tr.ui-row-ltr td:last-child {border-color:#eaeaea;}
.ui-state-hover td, .ui-widget-content .ui-state-hover td, .ui-widget-header .ui-state-hover td,
.ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus {background:#f5f5f5;}
.ui-jqgrid tr.ui-state-highlight.ui-row-ltr td {background-color:#ecf9ff;}

View File

@@ -164,7 +164,7 @@ a, a:hover, a:active, a:focus, .form-unit, th[aria-selected=true] .ui-jqgrid-sor
.sidebar-menu {padding:0 8px 0 7px;}
.sidebar-menu li>a>.pull-right-container {left:0;}
.sidebar-menu .treeview-item.active>a {color:#2a50ec;background-color:#edf2fc;border-right:0;border-radius:6px;}
.sidebar-menu .treeview-item.active > a {color:#2a50ec;background-color:#edf2fc;border-right:0;border-radius:6px;}
/* 页签添加内边距 */
.content-wrapper, .tabpanel_content, .tabpanel_content .html_content, body {background-color:#f0f2f5;}
@@ -211,7 +211,7 @@ a, a:hover, a:active, a:focus, .form-unit, th[aria-selected=true] .ui-jqgrid-sor
.select2-container--default .select2-results__option--highlighted[aria-selected],
.wup_container .placeholder .webuploader-pick {background-color:#1e5edb!important;border-color:#1e5edb!important;}
.form-unit, th[aria-selected=true] .ui-jqgrid-sortable {color:#1e5edb;}
.form-unit {border-bottom:1px solid #eee;}
.form-unit {border-bottom: 1px solid #eee;}
.box-main>.box-header {border-bottom-color:#eeeeee;}
.box-main>.box-header .box-title .fa {color:#1e5edb;}
@@ -220,10 +220,10 @@ a, a:hover, a:active, a:focus, .form-unit, th[aria-selected=true] .ui-jqgrid-sor
.select2-container--default .select2-search--dropdown .select2-search__field,
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple {border-color:#557bfa!important;box-shadow:0 0 0 2px rgba(24,80,236,.2);}
.table thead tr, .ui-jqgrid-htable thead tr, .ui-jqgrid-hdiv, .ui-jqgrid-hbox {background-color:#fafafa;}
.ui-jqgrid .ui-jqgrid-labels th, .ui-jqgrid tr.ui-row-ltr td, .ui-jqgrid tr.ui-row-rtl td, .ui-jqgrid tr.ui-row-ltr td:last-child,
.table thead tr, .ui-jqgrid-htable thead tr, .ui-jqgrid-hdiv, .ui-jqgrid-hbox {background-color:#f6f6f6;}
.ui-jqgrid .ui-jqgrid-htable th.ui-th-column-header, .ui-jqgrid .ui-jqgrid-htable th.ui-th-column,
.ui-jqgrid.ui-widget-content, .ui-jqgrid .ui-widget-content {border-color:#f0f0f0;}
.ui-jqgrid .ui-jqgrid-labels th, .ui-jqgrid .ui-widget-content, .ui-jqgrid tr.ui-row-ltr td,
.ui-jqgrid tr.ui-row-rtl td, .ui-jqgrid tr.ui-row-ltr td:last-child {border-color:#eaeaea;}
.ui-state-hover td, .ui-widget-content .ui-state-hover td, .ui-widget-header .ui-state-hover td,
.ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus {background:#f5f5f5;}
.ui-jqgrid tr.ui-state-highlight.ui-row-ltr td {background-color:#f0f5ff;}

View File

@@ -1,329 +0,0 @@
/*
* http://jeesite.com
*/
a, a:hover, a:active, a:focus, .form-unit, th[aria-selected=true] .ui-jqgrid-sortable {
color: #42a4e0;
}
.main-header .navbar {
background: #1a1a1a;
}
.main-header .navbar .nav > li > a {
color: #b9b9b9;
}
.main-header .navbar .nav > li > a:hover,
.main-header .navbar .nav > li > a:active,
.main-header .navbar .nav > li > a:focus,
.main-header .navbar .nav .open > a,
.main-header .navbar .nav .open > a:hover,
.main-header .navbar .nav .open > a:focus,
.main-header .navbar .nav > .active > a {
background: rgba(0, 0, 0, 0.3);
color: #f6f6f6;
}
.main-header .navbar .sidebar-toggle {
color: #ffffff;
}
.main-header .navbar .sidebar-toggle:hover {
color: #f6f6f6;
background: rgba(0, 0, 0, 0.3);
}
.main-header .navbar .sidebar-toggle {
color: #fff;
}
.main-header .navbar .sidebar-toggle:hover {
background-color: #367fa9;
}
@media (max-width: 767px) {
.main-header .navbar .dropdown-menu li.divider {
background-color: rgba(255, 255, 255, 0.1);
}
.main-header .navbar .dropdown-menu li a {
color: #fff;
}
.main-header .navbar .dropdown-menu li a:hover {
background: #367fa9;
}
}
.main-header .logo {
background-color: transparent;
color: #fff;
border-bottom: 0 solid transparent;
}
.main-header .logo:hover {
background-color: #000;
}
.main-header li.user-header {
background-color: #000;
}
.content-header {
background: transparent;
}
.sidebar,
.left-side {
background-color: #1a1a1a;
}
.content-wrapper,
.main-footer {
border-left: 1px solid #303030;
}
.user-panel > .info,
.user-panel > .info > a {
color: #eee;
}
.sidebar-menu > li {
-webkit-transition: border-left-color 0.3s ease;
-o-transition: border-left-color 0.3s ease;
transition: border-left-color 0.3s ease;
}
.sidebar-menu > li.header {
color: #848484;
background: #1a1a1a;
}
.sidebar-menu > li > a {
border-left: 3px solid transparent;
font-weight: 600;
}
.sidebar-menu > li:hover > a,
.sidebar-menu > li.active > a {
color: #cccccc;
background: #1a1a1a;
}
.sidebar-menu > li.active {
border-left-color: #1e5edb;
}
.sidebar-menu > li.active > a {
font-weight: 600;
}
.sidebar-menu > li.menu-open > a,
.sidebar-menu > li > .treeview-menu {
background: #1a1a1a;
}
.sidebar a {
color: #d3d3d3;
}
.sidebar a:hover {
text-decoration: none;
}
.treeview-menu > li > a {
color: #d3d3d3;
}
.treeview-menu > li.active > a,
.treeview-menu > li > a:hover {
color: #fff;
}
.sidebar-form {
border-radius: 3px;
border: 1px solid #d2d6de;
margin: 10px 10px;
}
.sidebar-form input[type="text"],
.sidebar-form .btn {
box-shadow: none;
background-color: #303030;
border: 1px solid transparent;
height: 35px;
}
.sidebar-form input[type="text"] {
color: #666;
border-top-left-radius: 2px;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
border-bottom-left-radius: 2px;
}
.sidebar-form input[type="text"]:focus,
.sidebar-form input[type="text"]:focus + .input-group-btn .btn {
background-color: #303030;
color: #666;
}
.sidebar-form input[type="text"]:focus + .input-group-btn .btn {
border-left-color: #fff;
}
.sidebar-form .btn {
color: #999;
border-top-left-radius: 0;
border-top-right-radius: 2px;
border-bottom-right-radius: 2px;
border-bottom-left-radius: 0;
}
.main-footer {
border-top-color: #303030;
border-radius: 4px;
background-color: #1a1a1a;
color: #ddd;
}
.skin-blue.layout-top-nav .main-header > .logo {
background-color: #1e5edb;
color: #fff;
border-bottom: 0 solid transparent;
}
.skin-blue.layout-top-nav .main-header > .logo:hover {
background-color: #3b8ab8;
}
.sidebar-menu {padding:0 8px 0 7px;}
.sidebar-menu li>a>.pull-right-container {left:0;}
.sidebar-menu .treeview-item.active>a {color: #fff;background-color:#2975bc;border-right:0;border-radius:6px;}
/* 页签添加内边距 */
.content-wrapper, .tabpanel_content, .tabpanel_content .html_content, body {background-color:#000;}
.box-main, .nav-main, .ui-layout-pane, iframe {border-radius:5px;}
.tabpanel_content .html_content {padding:14px 14px 13px 15px;}
.tabpanel_tab_content {border-bottom:0;}
.ui-layout-resizer {background:none;}
.content {padding:0!important}
/* 页签-无界风格 */
.tabpanel_mover li {height:26px;padding:2px 16px 2px 3px;margin:11px 0 0px 9px;border:0;border-radius:4px;background:#1a1a1a;}
.tabpanel_mover li .title {padding-left:0;text-align:center;color:#ddd;}
.tabpanel_mover li.active {background-color:#2975bc;}
.tabpanel_mover li.active div {color:#fff;}
.tabpanel_mover li .closer {font:11px/1 FontAwesome;top:6px;right:4px;background:none;opacity:0.7;}
.tabpanel_mover li .closer:before {content:"\f00d";}
.tabpanel_mover li .closer:hover {background:none;-moz-transform:scale(1.2);-webkit-transform:scale(1.2);
-o-transform:scale(1.2);-ms-transform:scale(1.2);transform:scale(1.2);color:#d30606;}
.tabpanel_mover li.active .closer:hover {color:#fff;opacity:0.9;}
.tabpanel_tab_content {background-color:transparent;border-bottom-color:#eeeeee;overflow:visible;}
.tabpanel_tab_content .tabpanel_left_scroll, .tabpanel_tab_content .tabpanel_right_scroll {top:12px;}
.tabpanel_tab_content .tabpanel_mover {margin:0 5px;}
/* 页签-下划线风格
.tabpanel_mover li {background:#fff;border:0;padding:5px 16px 5px 3px;}
.tabpanel_mover li .title {padding-left:0;text-align:center;}
.tabpanel_mover li.active {background-color:#fff;border-bottom:2px solid #3aa0ff;}
.tabpanel_mover li.active div {color:#0975d9;}
.tabpanel_mover li .closer {background:none;font:11px/1 FontAwesome;opacity:0.6;right:3px;top:10px;}
.tabpanel_mover li .closer:before {content:"\f00d";}
.tabpanel_mover li .closer:hover {background:none;-moz-transform: scale(1.2);-webkit-transform: scale(1.2);
-o-transform: scale(1.2);-ms-transform: scale(1.2);transform: scale(1.2);color:#d30606;}
.tabpanel_tab_content {height:32px;line-height:32px;border:0;background-color:#fff;overflow:visible;}
.tabpanel_tab_content .tabpanel_move_content {min-height:32px;}
.tabpanel_tab_content .tabpanel_left_scroll, .tabpanel_tab_content .tabpanel_right_scroll {top:4px;} */
#page-loading {color:#ddd;border-color:#505050;background:#343434;padding:7px}
::-webkit-scrollbar {background:#2a2a2a;}
::-webkit-scrollbar-thumb {background:#6a6a6a;}
.btn-default {background-color:#323232;border-color:#323232;color:#b5b5b5;}
.btn-default.active, .btn-default:active {background-color:#3e3e3e;border-color:#3e3e3e;color:#dfdfdf;}
.btn-default:hover, .btn-default:active, .btn-default.hover, .btn-default:focus,
.btn-default.active.focus, .btn-default.active:focus, .btn-default.active:hover, .btn-default:active.focus,
.btn-default:active:focus, .btn-default:active:hover, .open>.dropdown-toggle.btn-default.focus,
.open>.dropdown-toggle.btn-default:focus, .open>.dropdown-toggle.btn-default:hover {
background-color:#3e3e3e;border-color:#3e3e3e;color:#eee;}
.input-group-btn .btn, .treeSearchInput button, .treeSearchInput button:hover, .treeSearchInput button:focus {
background-color:#1a1a1a;border-color:#3c3c3c;color:#ddd;}
.treeExpandCollapse, .treeExpandCollapse a {background-color:#1a1a1a;color:#8d8d8d;}
.btn-primary, .btn-primary:hover, .btn-primary:active,
.btn-primary.hover, .btn-primary.focus, .btn-primary:focus,
.btn-primary.active.focus, .btn-primary.active:focus, .btn-primary.active:hover,
.btn-primary:active.focus, .btn-primary:active:focus, .btn-primary:active:hover,
.open>.dropdown-toggle.btn-primary.focus, .open>.dropdown-toggle.btn-primary:focus,
.open>.dropdown-toggle.btn-primary:hover, .layui-layer-btn .layui-layer-btn0,
.select2-container--default .select2-selection--multiple .select2-selection__choice,
.select2-container--default .select2-results__option--highlighted[aria-selected],
.wup_container .placeholder .webuploader-pick {background-color:#1e5edb!important;border-color:#1e5edb!important;}
.form-unit, th[aria-selected=true] .ui-jqgrid-sortable {color:#2975bc;}
.form-unit {border-bottom:1px solid #4e4e4e;}
.form-inline .form-more {background-color:#1a1a1a;border-bottom-color:#393939;}
.form-control, .input-group .input-group-addon, input, select, textarea, pre {background-color:#1a1a1a;border-color:#414141!important;color:#ddd}
.form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control {background-color:#2a2a2a;}
.select2-container .select2-selection--single, .select2-container .select2-selection--multiple,
.select2-container--default .select2-selection--single, .select2-selection .select2-selection--single,
.select2-container--default .select2-selection--multiple {background-color:#1a1a1a!important;border-color:#383838;color:#ddd}
.select2-container--default .select2-selection--single .select2-selection__rendered {color:#ddd}
.treeselect .form-control, .form-control.laydate {background-color:#1a1a1a!important;color:#ddd}
.select2-dropdown {background-color:#1a1a1a;border-color:#414141!important;color:#ddd;}
.select2-container--default .select2-results__option[aria-selected=true] {background-color:#3c3c3c;color:#ddd;}
.navbar-custom-menu>.navbar-nav>li>.dropdown-menu,
.main-header .navbar .dropdown-menu li.divider {background-color:#1a1a1a;border-color:#414141!important;}
.main-header .navbar .dropdown-menu li a {color:#ddd!important;}
.main-header .navbar .dropdown-menu li a:hover {background: #4c4c4c!important;}
.navbar-nav>.messages-menu>.dropdown-menu>li .menu>li>a {border-color:#414141!important;}
.navbar-nav>.messages-menu>.dropdown-menu>li .menu>li>a>h4 {color:#ddd!important;}
.navbar-nav>.messages-menu>.dropdown-menu>li.header,.main-header .navbar .dropdown-menu li a,
.navbar-nav>.notifications-menu>.dropdown-menu>li.footer>a, .navbar-nav>.messages-menu>.dropdown-menu>li.footer>a,
.navbar-nav>.tasks-menu>.dropdown-menu>li.footer>a {background-color:#1a1a1a!important;border-color:#414141!important;color:#c6c6c6!important;}
.error-page > .error-content, .error-page > .copyright {color:#9d9d9d;}
.sort-highlight, .tags-input {background:#262626;border-color:#4e4e4e;}
.todo-list>li {background:#262626;color:#ddd;border-left-color:#4e4e4e;}
.alert-default {background:#1a1a1a;border-color:#3c3c3c;color:#7c7c7c;}
.strength .strength_meter {border-color:#3c3c3c!important;}
.bg-teal-gradient {background:#34b3b3!important;}
.info-box {background:#1a1a1a;color:#ddd;}
.box, .nav-tabs-custom {background:#1a1a1a!important;color:#ddd!important;box-shadow:none;}
.box-trees {background:#2a2a2a!important;}
.box-header, .nav-tabs-custom>.nav-tabs>li.header {color:#c8c8c8;}
.box-header.with-border {border-bottom-color:#3a3a3a;}
.box-footer {background-color:#282828;border-top:#3c3c3c;}
.box-footer .knob-label {background:#282828;color:#ddd;}
.box-main>.box-header, .nav-main>.nav-tabs {border-bottom-color:#3a3a3a;color:#ddd}
.nav-tabs>li.active>a, .nav-tabs>li.active>a:focus, .nav-tabs>li.active>a:hover {border-bottom-color:#1a1a1a;}
.nav-tabs-custom>.tab-content {background-color:#1a1a1a;color:#ddd;}
.nav-tabs-custom>.nav-tabs {border-bottom-color:#3a3a3a;}
.nav-tabs-custom>.nav-tabs>li>a {color:#8d8d8d;}
.nav-tabs-custom>.nav-tabs>li.active>a {border-right-color:#3a3a3a;border-left-color:#3a3a3a;}
.nav-tabs-custom>.nav-tabs>li.active>a, .nav-tabs-custom>.nav-tabs>li.active:hover>a {background-color:#1a1a1a;color:#ddd;}
.nav-tabs-custom>.nav-tabs>li:first-of-type.active>a,
.nav-tabs-custom>.nav-tabs.pull-right>li:first-of-type.active>a {border-left-color:#3a3a3a;}
.nav-main>.nav-tabs>li>a:hover {color:#ddd;}
.box-main>.box-header .box-title .fa {color:#2975bc;}
.nav-tabs-custom>.nav-tabs>li.active {border-top-color:#3aa0ff;}
.nav-main>.nav-tabs.pull-right>li:first-of-type.active>a {border-color:#3c3c3c;}
.form-control:focus,.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default .select2-search--dropdown .select2-search__field,
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple {border-color:#40a9ff!important;box-shadow:0 0 0 2px rgba(24,144,255,.2);}
.table thead tr, .ui-jqgrid-htable thead tr, .ui-jqgrid-hdiv, .ui-jqgrid-hbox {background-color: #1f1f1f;color:#b3b3b3;}
.table>thead>tr>th, .table>tbody>tr>th, .table>tfoot>tr>th, .table>thead>tr>td, .table>tbody>tr>td, .table>tfoot>tr>td {border-color:#3e3e3e;}
.table-striped>tbody>tr:nth-of-type(odd) {background-color:#262626;}
.table-hover>tbody>tr:hover>td, .table-hover>tbody>tr:hover>th {background-color:#323232;}
.ui-jqgrid .ui-jqgrid-labels th, .ui-jqgrid tr.ui-row-ltr td, .ui-jqgrid tr.ui-row-rtl td, .ui-jqgrid tr.ui-row-ltr td:last-child,
.ui-jqgrid .ui-jqgrid-htable th.ui-th-column-header, .ui-jqgrid .ui-jqgrid-htable th.ui-th-column,
.ui-jqgrid.ui-widget-content, .ui-jqgrid .ui-widget-content {border-color:#333;}
.ui-state-hover td, .ui-widget-content .ui-state-hover td, .ui-widget-header .ui-state-hover td,
.ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus {background:#222;}
.ui-jqgrid tr.ui-state-highlight.ui-row-ltr td {background-color:#1f1f1f;}
/* .ui-jqgrid tr.ui-row-ltr td {border-right:0!important;} 解开注释,可去除表格单元格的竖边框线 */
.ui-jqgrid .frozen-left th.ui-th-ltr, .ui-jqgrid .frozen-left tr.ui-row-ltr td {border-right-color:#333}
.ui-jqgrid .frozen-right th.ui-th-ltr, .ui-jqgrid .frozen-right tr.ui-row-ltr td {border-left-color:#333}
.ui-jqgrid tr.jqgroup td, .ui-jqgrid tr.footrow td, .ui-jqgrid tr.jqfoot td {background:#323232;}
.ui-jqgrid .actions .moreItems {background:#1a1a1a;border-color:#3c3c3c;box-shadow:none;}
.ui-jqgrid .actions .moreItems a {color:#ddd;}
.ui-jqgrid .editgrid tr.ui-state-hover.ui-row-ltr td,
.ui-jqgrid .editgrid tr.ui-state-highlight.ui-row-ltr td {background-color:#1a1a1a!important;}
.ui-jqgrid .ui-priority-secondary {background-color:#111;}
.ui-widget-content {background-color:#1a1a1a;}
.pagination>li>a, .pagination>li>span {background:#262626;color:#ddd;border-color:#525252;}
.pagination>li>a:focus, .pagination>li>a:hover, .pagination>li>span:focus, .pagination>li>span:hover,
.pagination>.active>a, .pagination>.active>a:focus, .pagination>.active>a:hover, .pagination>.active>span,
.pagination>.active>span:focus, .pagination>.active>span:hover {background:#3aa0ff;color:#fff;border-color:#3aa0ff;}
.pagination>.disabled>a, .pagination>.disabled>a:focus, .pagination>.disabled>a:hover, .pagination>.disabled>span,
.pagination>.disabled>span:focus, .pagination>.disabled>span:hover {background:#262626;color:#747474;border-color:#525252;}
.table-form input, .table-form select, .table-form textarea,
.table-form .form-control, .table-form .select2-selection,
.table-form .form-control:focus, .table-form .select2-container--default.select2-container--focus .select2-selection--single,
.table-form .select2-container--default.select2-container--focus .select2-selection--multiple {border-bottom-color:#494949}
.table-form .ui-jqgrid tr.ui-row-ltr td input,
.table-form .ui-jqgrid tr.ui-row-ltr td select,
.table-form .ui-jqgrid tr.ui-row-ltr td textarea,
.table-form .ui-jqgrid tr.ui-state-highlight.ui-row-ltr td,
.table-form .ui-jqgrid tr.ui-state-highlight.ui-row-ltr td input,
.table-form .ui-jqgrid tr.ui-state-highlight.ui-row-ltr td select,
.table-form .ui-jqgrid tr.ui-state-highlight.ui-row-ltr td textarea,
.table-form .ui-jqgrid tr.ui-row-ltr.ui-priority-secondary td input,
.table-form .ui-jqgrid tr.ui-row-ltr.ui-priority-secondary td select,
.table-form .ui-jqgrid tr.ui-row-ltr.ui-priority-secondary td textarea,
.table-form .ui-jqgrid tr.ui-state-highlight.ui-row-ltr.ui-priority-secondary td,
.table-form .ui-jqgrid tr.ui-state-highlight.ui-row-ltr.ui-priority-secondary td input,
.table-form .ui-jqgrid tr.ui-state-highlight.ui-row-ltr.ui-priority-secondary td select,
.table-form .ui-jqgrid tr.ui-state-highlight.ui-row-ltr.ui-priority-secondary td textarea {color:#ddd!important;}
.table-form .ui-jqgrid tr.ui-state-highlight {background-color:#1a1a1a!important;}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -24,7 +24,4 @@
.icheckbox_minimal-grey,
.iradio_minimal-grey {background-image:url(grey@2x.png);
-webkit-background-size:200px 20px;background-size:200px 20px;}
}
.skin-dark .icheckbox_minimal-grey,
.skin-dark .iradio_minimal-grey {background-image:url(dark.png);}
}

View File

@@ -116,8 +116,3 @@ ul.ztree.zTreeDragUL {margin:0;padding:0;position:absolute;width:auto;height:aut
.ztree li span.button.chk[class$="focus"]:before {font-weight:bold;}
.ztree li span.button.chk[class$="disable"]:before {color:#aaa;}
.ztree li a.curSelectedNode, .ztree li a.tmpTargetNode_inner {height:26px;}
.skin-dark .ztree li a {color:#ddd}
.skin-dark .ztree li span.button:before {color:#aaa}
.skin-dark .ztree li a.curSelectedNode {background-color:#2975bc;color:#eee;}
.skin-dark .ztree li a.curSelectedNode span.button:before {color:#eee;}

View File

@@ -1251,7 +1251,7 @@
,showBottom: true //是否显示底部栏
,isPreview: true //是否显示值预览
,btns: ['clear', 'now', 'confirm'] //右下角显示的按钮,会按照数组顺序排列
,lang: window.lang || 'zh_CN' //语言只支持cn/en即中文和英文
,lang: 'cn' //语言只支持cn/en即中文和英文
,theme: 'default' //主题
,position: null //控件定位方式定位, 默认absolute支持fixed/absolute/static
,calendar: false //是否开启公历重要节日,仅支持中文版
@@ -1266,7 +1266,7 @@
var that = this
,options = that.config
,text = {
zh_CN: {
cn: {
weeks: ['日', '一', '二', '三', '四', '五', '六']
,time: ['时', '分', '秒']
,timeTips: '选择时间'
@@ -1303,7 +1303,7 @@
,preview: 'The selected result'
}
};
return text[options.lang] || text['zh_CN'];
return text[options.lang] || text['cn'];
};
//初始准备

View File

@@ -169,19 +169,3 @@ html #layuicss-laydate{display: none; position: absolute; width: 1989px;}
.laydate-theme-grid .laydate-year-list>li{height: 43px; line-height: 43px;}
.laydate-theme-grid .laydate-month-list>li{height: 71px; line-height: 71px;}
.skin-dark .layui-laydate,
.skin-dark .layui-laydate-hint,
.skin-dark .layui-laydate-list,
.skin-dark .layui-laydate-footer span,
.skin-dark .laydate-time-list li ol {background:#1a1a1a;border-color:#484848;color:#ddd;}
.skin-dark .layui-laydate-header {border-bottom-color:#484848;}
.skin-dark .layui-laydate-footer {border-top-color:#484848;}
.skin-dark .layui-laydate-content th {color:#9c9c9c;}
.skin-dark .layui-laydate-content td {color:#aaa;}
.skin-dark .layui-laydate-content .laydate-day-prev,
.skin-dark .layui-laydate-content .laydate-day-next {color:#5a5a5a}
.skin-dark .layui-laydate-footer span {background:transparent;}
.skin-dark .layui-laydate-content td:hover,
.skin-dark .layui-laydate-list li:hover,
.skin-dark .laydate-footer-btns span {background-color:#444;border-color:#444;color:#b5b5b5;}
.skin-dark .layui-laydate .laydate-btns-confirm {background-color:#139ce0;border-color:#139ce0;color:#fff;}

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="close" width="18" height="18" preserveAspectRatio="xMidYMid meet" viewBox="0 0 1024 1024"><path fill="#666" d="m563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8L295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512L196.9 824.9A7.95 7.95 0 0 0 203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1l216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"></path></svg>

Before

Width:  |  Height:  |  Size: 560 B

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="full-1" width="18" height="18" preserveAspectRatio="xMidYMid meet" viewBox="0 0 1024 1024"><path d="M290 236.4l43.9-43.9a8.01 8.01 0 0 0-4.7-13.6L169 160c-5.1-.6-9.5 3.7-8.9 8.9L179 329.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L370 423.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L290 236.4zm352.7 187.3c3.1 3.1 8.2 3.1 11.3 0l133.7-133.6l43.7 43.7a8.01 8.01 0 0 0 13.6-4.7L863.9 169c.6-5.1-3.7-9.5-8.9-8.9L694.8 179c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L600.3 370a8.03 8.03 0 0 0 0 11.3l42.4 42.4zM845 694.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L654 600.3a8.03 8.03 0 0 0-11.3 0l-42.4 42.3a8.03 8.03 0 0 0 0 11.3L734 787.6l-43.9 43.9a8.01 8.01 0 0 0 4.7 13.6L855 864c5.1.6 9.5-3.7 8.9-8.9L845 694.9zm-463.7-94.6a8.03 8.03 0 0 0-11.3 0L236.3 733.9l-43.7-43.7a8.01 8.01 0 0 0-13.6 4.7L160.1 855c-.6 5.1 3.7 9.5 8.9 8.9L329.2 845c6.6-.8 9.4-8.9 4.7-13.6L290 787.6L423.7 654c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.4z" fill="#666"></path></svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="full-2" width="18" height="18" preserveAspectRatio="xMidYMid meet" viewBox="0 0 1024 1024"><path d="M391 240.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L200 146.3a8.03 8.03 0 0 0-11.3 0l-42.4 42.3a8.03 8.03 0 0 0 0 11.3L280 333.6l-43.9 43.9a8.01 8.01 0 0 0 4.7 13.6L401 410c5.1.6 9.5-3.7 8.9-8.9L391 240.9zm10.1 373.2L240.8 633c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L146.3 824a8.03 8.03 0 0 0 0 11.3l42.4 42.3c3.1 3.1 8.2 3.1 11.3 0L333.7 744l43.7 43.7A8.01 8.01 0 0 0 391 783l18.9-160.1c.6-5.1-3.7-9.4-8.8-8.8zm221.8-204.2L783.2 391c6.6-.8 9.4-8.9 4.7-13.6L744 333.6L877.7 200c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.3a8.03 8.03 0 0 0-11.3 0L690.3 279.9l-43.7-43.7a8.01 8.01 0 0 0-13.6 4.7L614.1 401c-.6 5.2 3.7 9.5 8.8 8.9zM744 690.4l43.9-43.9a8.01 8.01 0 0 0-4.7-13.6L623 614c-5.1-.6-9.5 3.7-8.9 8.9L633 783.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L824 877.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L744 690.4z" fill="#666"></path></svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -28,12 +28,12 @@ html #layuicss-layer{display: none; position: absolute; width: 1989px;}
.layer-anim{-webkit-animation-fill-mode: both; animation-fill-mode: both; -webkit-animation-duration:.3s; animation-duration:.3s;}
@-webkit-keyframes layer-bounceIn { /* 默认 */
0% {opacity: 0; -webkit-transform: scale(.5); transform: scale(.5)}
100% {opacity: 1; -webkit-transform: scale(1); transform: scale(1)}
0% {opacity: 0; -webkit-transform: scale(.5); transform: scale(.5)}
100% {opacity: 1; -webkit-transform: scale(1); transform: scale(1)}
}
@keyframes layer-bounceIn {
0% {opacity: 0; -webkit-transform: scale(.5); -ms-transform: scale(.5); transform: scale(.5)}
100% {opacity: 1; -webkit-transform: scale(1); -ms-transform: scale(1); transform: scale(1)}
0% {opacity: 0; -webkit-transform: scale(.5); -ms-transform: scale(.5); transform: scale(.5)}
100% {opacity: 1; -webkit-transform: scale(1); -ms-transform: scale(1); transform: scale(1)}
}
.layer-anim-00{-webkit-animation-name: layer-bounceIn;animation-name: layer-bounceIn}
@@ -53,15 +53,14 @@ html #layuicss-layer{display: none; position: absolute; width: 1989px;}
.layui-layer-title{padding:0 80px 0 20px; height: 50px; line-height: 50px; border-bottom:1px solid #F0F0F0; font-size: 14px; color:#333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 2px 2px 0 0;}
.layui-layer-setwin{position:absolute; right: 15px; *right:0; top: 15px; font-size:0; line-height: initial;}
.layui-layer-setwin a{position:relative; width: 16px; height:16px; margin-left:10px; font-size:12px; _overflow:hidden;}
.layui-layer-setwin .layui-layer-min{display:none!important}
.layui-layer-setwin .layui-layer-min cite{position:absolute;width:14px;height:2px;left:0;top:50%;margin-top:-1px;background-color:#888;cursor:pointer;_overflow:hidden;}
.layui-layer-setwin .layui-layer-min:hover cite{background-color:#2D93CA;}
.layui-layer-setwin .layui-layer-max{background:url(full-1.svg) center;}
.layui-layer-setwin .layui-layer-max:hover{background-size:19px;}
.layui-layer-setwin .layui-layer-maxmin{background:url(full-2.svg) center;}
.layui-layer-setwin .layui-layer-maxmin:hover{background-size:19px;}
.layui-layer-setwin .layui-layer-close1{background:url(close.svg) center;cursor:pointer;}
.layui-layer-setwin .layui-layer-close1:hover{background-size:19px;}
.layui-layer-setwin .layui-layer-min cite{position:absolute; width:14px; height:2px; left:0; top:50%; margin-top:-1px; background-color:#2E2D3C; cursor:pointer; _overflow:hidden;}
.layui-layer-setwin .layui-layer-min:hover cite{background-color:#2D93CA; }
.layui-layer-setwin .layui-layer-max{background-position:-32px -40px;}
.layui-layer-setwin .layui-layer-max:hover{background-position:-16px -40px;}
.layui-layer-setwin .layui-layer-maxmin{background-position:-65px -40px;}
.layui-layer-setwin .layui-layer-maxmin:hover{background-position:-49px -40px;}
.layui-layer-setwin .layui-layer-close1{background-position: 1px -40px; cursor: pointer;}
.layui-layer-setwin .layui-layer-close1:hover{opacity:0.7;}
.layui-layer-setwin .layui-layer-close2{position:absolute; right:-28px; top:-28px; width:30px; height:30px; margin-left:0; background-position:-149px -31px; *right:-18px; _display:none;}
.layui-layer-setwin .layui-layer-close2:hover{ background-position:-180px -31px;}
@@ -99,7 +98,7 @@ html #layuicss-layer{display: none; position: absolute; width: 1989px;}
.layui-layer-loading .layui-layer-loading1{width:37px; height:37px; background:url(loading-1.gif) no-repeat;}
.layui-layer-loading .layui-layer-loading2, .layui-layer-ico16{width:32px; height:32px; background:url(loading-2.gif) no-repeat;}
.layui-layer-tips{background: none; box-shadow:none; border:none;}
.layui-layer-tips .layui-layer-content{position: relative; overflow:visible; line-height: 22px; min-width: 12px; padding: 8px 15px; font-size: 12px; _float:left; border-radius: 3px; box-shadow: 1px 1px 3px rgba(0,0,0,.2); background-color: #000; color: #fff;}
.layui-layer-tips .layui-layer-content{position: relative; line-height: 22px; min-width: 12px; padding: 8px 15px; font-size: 12px; _float:left; border-radius: 3px; box-shadow: 1px 1px 3px rgba(0,0,0,.2); background-color: #000; color: #fff;}
.layui-layer-tips .layui-layer-close{right:-2px; top:-1px;}
.layui-layer-tips i.layui-layer-TipsG{ position:absolute; width:0; height:0; border-width:8px; border-color:transparent; border-style:dashed; *overflow:hidden;}
.layui-layer-tips i.layui-layer-TipsT, .layui-layer-tips i.layui-layer-TipsB{left:5px; border-right-style:solid; border-right-color: #000;}
@@ -162,14 +161,14 @@ html #layuicss-layer{display: none; position: absolute; width: 1989px;}
/* 关闭动画 */
@-webkit-keyframes layer-bounceOut {
100% {opacity: 0; -webkit-transform: scale(.7); transform: scale(.7)}
30% {-webkit-transform: scale(1.05); transform: scale(1.05)}
0% {-webkit-transform: scale(1); transform: scale(1);}
100% {opacity: 0; -webkit-transform: scale(.7); transform: scale(.7)}
30% {-webkit-transform: scale(1.05); transform: scale(1.05)}
0% {-webkit-transform: scale(1); transform: scale(1);}
}
@keyframes layer-bounceOut {
100% {opacity: 0; -webkit-transform: scale(.7); -ms-transform: scale(.7); transform: scale(.7);}
30% {-webkit-transform: scale(1.05); -ms-transform: scale(1.05); transform: scale(1.05);}
0% {-webkit-transform: scale(1); -ms-transform: scale(1);transform: scale(1);}
100% {opacity: 0; -webkit-transform: scale(.7); -ms-transform: scale(.7); transform: scale(.7);}
30% {-webkit-transform: scale(1.05); -ms-transform: scale(1.05); transform: scale(1.05);}
0% {-webkit-transform: scale(1); -ms-transform: scale(1);transform: scale(1);}
}
.layer-anim-close{-webkit-animation-name: layer-bounceOut; animation-name: layer-bounceOut; -webkit-animation-fill-mode: both; animation-fill-mode: both; -webkit-animation-duration:.2s; animation-duration:.2s;}
@@ -182,11 +181,7 @@ html #layuicss-layer{display: none; position: absolute; width: 1989px;}
.layui-layer-page .layui-layer-content {overflow-x:hidden;}
.layui-layer-page .layui-layer-content .form-file{padding-top:4px;}
.layui-layer-page .layui-layer-btn, .layui-layer-iframe .layui-layer-btn {
padding-top:3px;padding-bottom:10px;}
padding-top:3px;padding-bottom:10px;}
.layui-layer-btn .layui-layer-btn0{border-color:#367fa9;background-color:#367fa9;}
.layui-layer-btn a {height:auto;padding:0 12px;font-size:13px;background-color:#f4f4f4;}
.layui-layer.toast-top-full-width {min-width: 60%;}
.skin-dark .layui-layer {background:#1a1a1a;color:#ddd;}
.skin-dark .layui-layer-title {background:#262626;border-bottom-color:#484848;color:#bcbcbc;}
.skin-dark .layui-layer-btn a {background-color:#444;border-color:#444;color:#b5b5b5;}

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.jeesite</groupId>
<artifactId>jeesite-parent</artifactId>
<version>4.6.2-SNAPSHOT</version>
<version>4.4.0-SNAPSHOT</version>
<relativePath>../../parent/pom.xml</relativePath>
</parent>
@@ -16,6 +16,10 @@
<url>http://jeesite.com</url>
<inceptionYear>2013-Now</inceptionYear>
<properties>
</properties>
<dependencies>
<dependency>
@@ -26,6 +30,12 @@
</dependencies>
<build>
<plugins>
</plugins>
</build>
<developers>
<developer>
<id>thinkgem</id>

View File

@@ -16,8 +16,8 @@ import com.jeesite.modules.cms.entity.Article;
@MyBatisDao
public interface ArticleDao extends CrudDao<Article> {
long updateExpiredWeight(Article article);
public long updateExpiredWeight(Article article);
long updateHitsAddOne(String id);
public long updateHitsAddOne(String id);
}

View File

@@ -4,6 +4,13 @@
*/
package com.jeesite.modules.cms.entity;
import java.util.Date;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jeesite.common.entity.BaseEntity;
import com.jeesite.common.entity.DataEntity;
@@ -13,11 +20,6 @@ import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import com.jeesite.modules.cms.utils.CmsUtils;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;
/**
* 文章表Entity
* @author 长春叭哥、ThinkGem
@@ -43,12 +45,7 @@ import java.util.Date;
@Column(name = "word_count", attrName = "wordCount", label = "字数", comment = "字数不包含html"),
@Column(name = "custom_content_view", attrName = "customContentView", label = "自定义内容视图"),
@Column(name = "view_config", attrName = "viewConfig", label = "视图配置"),
@Column(name="status", attrName="status", label="状态", isUpdate=false),
@Column(name="create_by", attrName="createBy", label="创建者", isUpdate=true),
@Column(name="create_date", attrName="createDate", label="创建时间", isUpdate=false, isQuery=false),
@Column(name="update_by", attrName="updateBy", label="更新者", isUpdate=true),
@Column(name="update_date", attrName="updateDate", label="更新时间", isUpdate=true, isQuery=false),
@Column(name="remarks", attrName="remarks", label="备注信息", queryType=QueryType.LIKE),
@Column(includeEntity = DataEntity.class),
@Column(includeEntity = BaseEntity.class),
}, joinTable = {
@JoinTable(entity = Category.class, alias = "c",
@@ -86,13 +83,12 @@ public class Article extends DataEntity<Article> {
private Integer wordCount; // 字数不包含html
private String customContentView; // 自定义内容视图
private String viewConfig; // 视图配置
private ArticleData articleData; //文章副表
private Boolean isQueryArticleData; // 是否查询文章内容
private Date beginDate; // 开始时间
private Date endDate; // 结束时间
private Boolean isQueryArticleData; // 是否查询文章内容
public Article() {
super();
//this.weight = 0;
@@ -227,6 +223,8 @@ public class Article extends DataEntity<Article> {
this.hits = hits;
}
public Integer getHitsPlus() {
return hitsPlus;
}
@@ -277,18 +275,6 @@ public class Article extends DataEntity<Article> {
this.articleData = articleData;
}
/**
* 是否查询文章内容
* @return
*/
public Boolean getIsQueryArticleData() {
return isQueryArticleData;
}
public void setIsQueryArticleData(Boolean isQueryArticleData) {
this.isQueryArticleData = isQueryArticleData;
}
public Date getBeginDate() {
return beginDate;
}
@@ -305,6 +291,20 @@ public class Article extends DataEntity<Article> {
this.endDate = endDate;
}
/**
* 是否查询文章内容
* @return
*/
public Boolean getIsQueryArticleData() {
return isQueryArticleData;
}
public void setIsQueryArticleData(Boolean isQueryArticleData) {
this.isQueryArticleData = isQueryArticleData;
}
public String getUrl() {
return CmsUtils.getUrlDynamic(this);
}

View File

@@ -4,6 +4,15 @@
*/
package com.jeesite.modules.cms.service;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.jeesite.common.collect.ListUtils;
import com.jeesite.common.config.Global;
import com.jeesite.common.entity.Page;
@@ -18,19 +27,6 @@ import com.jeesite.modules.cms.entity.Category;
import com.jeesite.modules.cms.utils.CmsUtils;
import com.jeesite.modules.file.utils.FileUploadUtils;
import com.jeesite.modules.sys.utils.UserUtils;
import io.netty.util.concurrent.DefaultThreadFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
/**
* 文章表Service
@@ -38,14 +34,11 @@ import java.util.concurrent.TimeUnit;
* @version 2020-7-24
*/
@Service
@Transactional(readOnly = true)
public class ArticleService extends CrudService<ArticleDao, Article> {
@Autowired
private ArticleDataDao articleDataDao;
private static ExecutorService updateExpiredWeightThreadPool = new ThreadPoolExecutor(5, 20,
60L, TimeUnit.SECONDS, new LinkedBlockingQueue<>(),
new DefaultThreadFactory("cms-update-expired-weight"));
/**
* 获取单条数据
@@ -79,17 +72,19 @@ public class ArticleService extends CrudService<ArticleDao, Article> {
/**
* 查询分页数据
* @param article 查询条件
* @param article page 分页对象
* @param article.page 分页对象
* @return
*/
@Override
public Page<Article> findPage(Article article) {
updateExpiredWeightThreadPool.submit(new Runnable() {
Thread thread = new Thread("cms-update-expired-weight") {
@Override
public void run() {
updateExpiredWeight(article);
}
});
};
thread.setDaemon(true);
thread.start();
return super.findPage(article);
}
@@ -117,7 +112,7 @@ public class ArticleService extends CrudService<ArticleDao, Article> {
* @param article
* @author ThinkGem
*/
@Transactional
@Transactional(readOnly = false)
public void updateExpiredWeight(Article article) {
// 更新过期的权重间隔为“6”个小时
Date updateExpiredWeightDate = CmsUtils.getCache("updateExpiredWeightDateByArticle");
@@ -134,7 +129,7 @@ public class ArticleService extends CrudService<ArticleDao, Article> {
* @param article
*/
@Override
@Transactional
@Transactional(readOnly = false)
public void save(Article article) {
Global.assertDemoMode();
// 设置内容状态
@@ -174,7 +169,7 @@ public class ArticleService extends CrudService<ArticleDao, Article> {
* @param article
*/
@Override
@Transactional
@Transactional(readOnly = false)
public void updateStatus(Article article) {
super.updateStatus(article);
}
@@ -182,7 +177,7 @@ public class ArticleService extends CrudService<ArticleDao, Article> {
/**
* 获取文章获取文章并点击数加一
*/
@Transactional
@Transactional(readOnly = false)
public void updateHitsAddOne(String id) {
dao.updateHitsAddOne(id);
}
@@ -192,7 +187,7 @@ public class ArticleService extends CrudService<ArticleDao, Article> {
* @param article
*/
@Override
@Transactional
@Transactional(readOnly = false)
public void delete(Article article) {
super.delete(article);
}

View File

@@ -4,17 +4,18 @@
*/
package com.jeesite.modules.cms.service;
import java.util.List;
import org.apache.commons.text.StringEscapeUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.jeesite.common.lang.StringUtils;
import com.jeesite.common.service.TreeService;
import com.jeesite.modules.cms.dao.CategoryDao;
import com.jeesite.modules.cms.entity.Category;
import com.jeesite.modules.cms.utils.CmsUtils;
import com.jeesite.modules.file.utils.FileUploadUtils;
import org.apache.commons.text.StringEscapeUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* 栏目表Service
@@ -22,6 +23,7 @@ import java.util.List;
* @version 2020-7-24
*/
@Service
@Transactional(readOnly = true)
public class CategoryService extends TreeService<CategoryDao, Category> {
/**
@@ -57,7 +59,7 @@ public class CategoryService extends TreeService<CategoryDao, Category> {
* @param category
*/
@Override
@Transactional
@Transactional(readOnly = false)
public void save(Category category) {
if (StringUtils.isNotBlank(category.getViewConfig())){
category.setViewConfig(StringEscapeUtils.unescapeHtml4(category.getViewConfig()));
@@ -83,7 +85,7 @@ public class CategoryService extends TreeService<CategoryDao, Category> {
* @param category
*/
@Override
@Transactional
@Transactional(readOnly = false)
public void updateStatus(Category category) {
super.updateStatus(category);
}
@@ -93,7 +95,7 @@ public class CategoryService extends TreeService<CategoryDao, Category> {
* @param category
*/
@Override
@Transactional
@Transactional(readOnly = false)
public void delete(Category category) {
super.delete(category);
}

View File

@@ -19,6 +19,7 @@ import com.jeesite.modules.file.utils.FileUploadUtils;
* @version 2020-7-24
*/
@Service
@Transactional(readOnly=true)
public class CommentService extends CrudService<CommentDao, Comment> {
/**
@@ -47,7 +48,7 @@ public class CommentService extends CrudService<CommentDao, Comment> {
* @param comment
*/
@Override
@Transactional
@Transactional(readOnly=false)
public void save(Comment comment) {
super.save(comment);
// 保存上传图片
@@ -61,7 +62,7 @@ public class CommentService extends CrudService<CommentDao, Comment> {
* @param comment
*/
@Override
@Transactional
@Transactional(readOnly=false)
public void updateStatus(Comment comment) {
super.updateStatus(comment);
}
@@ -71,7 +72,7 @@ public class CommentService extends CrudService<CommentDao, Comment> {
* @param comment
*/
@Override
@Transactional
@Transactional(readOnly=false)
public void delete(Comment comment) {
super.delete(comment);
}

View File

@@ -23,6 +23,7 @@ import com.jeesite.modules.sys.entity.DictData;
* @version 2020-7-7
*/
@Service
@Transactional(readOnly = true)
public class FileTempleteService {
// public List<String> getTempleteContent(String prefix) throws IOException {

View File

@@ -19,6 +19,7 @@ import com.jeesite.modules.file.utils.FileUploadUtils;
* @version 2020-7-24
*/
@Service
@Transactional(readOnly=true)
public class ReportService extends CrudService<ReportDao, Report> {
/**
@@ -47,7 +48,7 @@ public class ReportService extends CrudService<ReportDao, Report> {
* @param report
*/
@Override
@Transactional
@Transactional(readOnly=false)
public void save(Report report) {
super.save(report);
// 保存上传图片
@@ -61,7 +62,7 @@ public class ReportService extends CrudService<ReportDao, Report> {
* @param report
*/
@Override
@Transactional
@Transactional(readOnly=false)
public void updateStatus(Report report) {
super.updateStatus(report);
}
@@ -71,7 +72,7 @@ public class ReportService extends CrudService<ReportDao, Report> {
* @param report
*/
@Override
@Transactional
@Transactional(readOnly=false)
public void delete(Report report) {
super.delete(report);
}

View File

@@ -20,6 +20,7 @@ import com.jeesite.modules.file.utils.FileUploadUtils;
* @version 2020-7-24
*/
@Service
@Transactional(readOnly = true)
public class SiteService extends CrudService<SiteDao, Site> {
/**
@@ -48,7 +49,7 @@ public class SiteService extends CrudService<SiteDao, Site> {
* @param site
*/
@Override
@Transactional
@Transactional(readOnly = false)
public void save(Site site) {
super.save(site);
CmsUtils.removeCache("siteList");
@@ -61,7 +62,7 @@ public class SiteService extends CrudService<SiteDao, Site> {
* @param site
*/
@Override
@Transactional
@Transactional(readOnly = false)
public void updateStatus(Site site) {
super.updateStatus(site);
}
@@ -71,7 +72,7 @@ public class SiteService extends CrudService<SiteDao, Site> {
* @param site
*/
@Override
@Transactional
@Transactional(readOnly = false)
public void delete(Site site) {
super.delete(site);
}
@@ -81,7 +82,7 @@ public class SiteService extends CrudService<SiteDao, Site> {
* @param site
* @param isRe
*/
@Transactional
@Transactional(readOnly = false)
public void delete(Site site, Boolean isRe) {
site.setStatus(isRe != null && isRe ? Site.STATUS_NORMAL : Site.STATUS_DELETE);
super.delete(site);

View File

@@ -18,6 +18,7 @@ import com.jeesite.modules.cms.entity.Tag;
* @version 2020-7-24
*/
@Service
@Transactional(readOnly=true)
public class TagService extends CrudService<TagDao, Tag> {
/**
@@ -46,7 +47,7 @@ public class TagService extends CrudService<TagDao, Tag> {
* @param tag
*/
@Override
@Transactional
@Transactional(readOnly=false)
public void save(Tag tag) {
super.save(tag);
}
@@ -56,7 +57,7 @@ public class TagService extends CrudService<TagDao, Tag> {
* @param tag
*/
@Override
@Transactional
@Transactional(readOnly=false)
public void updateStatus(Tag tag) {
super.updateStatus(tag);
}
@@ -66,7 +67,7 @@ public class TagService extends CrudService<TagDao, Tag> {
* @param tag
*/
@Override
@Transactional
@Transactional(readOnly=false)
public void delete(Tag tag) {
super.delete(tag);
}

View File

@@ -19,6 +19,7 @@ import com.jeesite.modules.file.utils.FileUploadUtils;
* @version 2020-7-24
*/
@Service
@Transactional(readOnly=true)
public class VisitLogService extends CrudService<VisitLogDao, VisitLog> {
/**
@@ -47,7 +48,7 @@ public class VisitLogService extends CrudService<VisitLogDao, VisitLog> {
* @param visitLog
*/
@Override
@Transactional
@Transactional(readOnly=false)
public void save(VisitLog visitLog) {
super.save(visitLog);
// 保存上传图片
@@ -61,7 +62,7 @@ public class VisitLogService extends CrudService<VisitLogDao, VisitLog> {
* @param visitLog
*/
@Override
@Transactional
@Transactional(readOnly=false)
public void updateStatus(VisitLog visitLog) {
super.updateStatus(visitLog);
}
@@ -71,7 +72,7 @@ public class VisitLogService extends CrudService<VisitLogDao, VisitLog> {
* @param visitLog
*/
@Override
@Transactional
@Transactional(readOnly=false)
public void delete(VisitLog visitLog) {
super.delete(visitLog);
}

View File

@@ -4,6 +4,14 @@
*/
package com.jeesite.modules.cms.utils;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import javax.servlet.ServletContext;
import org.springframework.ui.Model;
import com.jeesite.common.cache.CacheUtils;
import com.jeesite.common.collect.ListUtils;
import com.jeesite.common.config.Global;
@@ -18,12 +26,6 @@ import com.jeesite.modules.cms.entity.Site;
import com.jeesite.modules.cms.service.ArticleService;
import com.jeesite.modules.cms.service.CategoryService;
import com.jeesite.modules.cms.service.SiteService;
import org.springframework.ui.Model;
import javax.servlet.ServletContext;
import java.util.Collections;
import java.util.List;
import java.util.Map;
/**
* CmsUtils
@@ -189,7 +191,7 @@ public class CmsUtils {
* @param siteCode 站点编号
* @param categoryCode 分类编号
* @param number 获取数目
* @param params 预留参数,例: key1:'value1', key2:'value2' ...<br>
* @param param 预留参数,例: key1:'value1', key2:'value2' ...<br>
* posid : 推荐位1首页焦点图2栏目页文章推荐<br>
* image : 文章图片1有图片的文章<br>
* isQueryArticleData : 是否查询文章详情信息,查询会影响效率<br>

View File

@@ -4,6 +4,22 @@
*/
package com.jeesite.modules.cms.web;
import java.io.IOException;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.jeesite.common.config.Global;
import com.jeesite.common.entity.Page;
import com.jeesite.common.lang.StringUtils;
@@ -17,20 +33,6 @@ import com.jeesite.modules.cms.service.CategoryService;
import com.jeesite.modules.cms.service.FileTempleteService;
import com.jeesite.modules.cms.utils.CmsUtils;
import com.jeesite.modules.sys.utils.UserUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
/**
* 文章表Controller

View File

@@ -4,6 +4,20 @@
*/
package com.jeesite.modules.cms.web;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.jeesite.common.collect.ListUtils;
import com.jeesite.common.collect.MapUtils;
import com.jeesite.common.config.Global;
@@ -19,20 +33,6 @@ import com.jeesite.modules.cms.utils.CmsUtils;
import com.jeesite.modules.sys.entity.Office;
import com.jeesite.modules.sys.utils.DictUtils;
import com.jeesite.modules.sys.utils.UserUtils;
import org.apache.shiro.authz.annotation.Logical;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.io.IOException;
import java.util.List;
import java.util.Map;
/**
* 栏目表Controller
@@ -252,7 +252,7 @@ public class CategoryController extends BaseController {
* @param isShowCode 是否显示编码true or 1显示在左侧2显示在右侧false or null不显示
* @return
*/
@RequiresPermissions(value = {"cms:category:view", "cms:article:view"}, logical = Logical.OR)
@RequiresPermissions("cms:category:view")
@RequestMapping(value = "treeData")
@ResponseBody
public List<Map<String, Object>> treeData(String siteCode, String module, String excludeCode, Boolean isAll, String isShowCode) {

View File

@@ -4,27 +4,37 @@
*/
package com.jeesite.modules.cmsfront.web;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
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.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import com.jeesite.common.collect.ListUtils;
import com.jeesite.common.config.Global;
import com.jeesite.common.entity.Page;
import com.jeesite.common.lang.ObjectUtils;
import com.jeesite.common.lang.StringUtils;
import com.jeesite.common.web.BaseController;
import com.jeesite.modules.cms.entity.*;
import com.jeesite.modules.cms.entity.Article;
import com.jeesite.modules.cms.entity.ArticleData;
import com.jeesite.modules.cms.entity.Category;
import com.jeesite.modules.cms.entity.Comment;
import com.jeesite.modules.cms.entity.Site;
import com.jeesite.modules.cms.service.ArticleService;
import com.jeesite.modules.cms.service.CategoryService;
import com.jeesite.modules.cms.service.CommentService;
import com.jeesite.modules.cms.utils.CmsUtils;
import com.jeesite.modules.sys.utils.ValidCodeUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Date;
import java.util.List;
/**
* 网站Controller
@@ -300,8 +310,8 @@ public class FrontController extends BaseController {
/**
* 内容评论
*/
@RequestMapping(value = "comment-{theme}", method = RequestMethod.GET)
public String comment(Comment comment, @PathVariable String theme, HttpServletRequest request, HttpServletResponse response,
@RequestMapping(value = "comment", method = RequestMethod.GET)
public String comment(Comment comment, String theme, HttpServletRequest request, HttpServletResponse response,
Model model) {
Page<Comment> page = new Page<Comment>(request, response);
Comment c = new Comment();

View File

@@ -11,9 +11,4 @@
4.3.1
4.3.2
4.3.3
4.4.0
4.4.1
4.5.0
4.6.0
4.6.1
4.6.2
4.4.0

View File

@@ -2,23 +2,15 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.jeesite.modules.cms.dao.ArticleDao">
<!-- 查询数据 -->
<select id="findList" resultType="Article">
<!-- 查询数据
<select id="findList" resultType="CmsArticle">
SELECT ${sqlMap.column.toSql()}
<if test="isQueryArticleData">,
ad.content AS "articleData.content",
ad.relation AS "articleData.relation",
ad.is_can_comment AS "articleData.isCanComment"
</if>
FROM ${sqlMap.table.toSql()}
<if test="isQueryArticleData">
JOIN ${_prefix}cms_article_data ad ON ad.id = a.id
</if>
<where>
${sqlMap.where.toSql()}
</where>
ORDER BY ${sqlMap.order.toSql()}
</select>
</select> -->
<update id="updateExpiredWeight">
update ${_prefix}cms_article SET weight = 0

View File

@@ -1,4 +1,4 @@
body{padding-top:50px;font-size:15px;background:#f7f8f9;}
body{padding-top:50px;font-size:14px;}
body>.navbar{-webkit-transition:background-color .3s ease-in;transition:background-color .3s ease-in}
@media (min-width:768px){
body>.navbar-transparent{background-color:transparent}
@@ -51,34 +51,20 @@ footer p{clear:left;margin-bottom:0}
#banner{margin-bottom:2em;text-align:center}
}
.breadcrumb {border-radius:8px;background:transparent;padding:0;margin:2px 15px 21px 15px;}
.jumbotron {background:#fff;margin:48px auto;border:1px solid #ededed;box-shadow:0 1px 4px 0 rgb(0 0 0 / 5%);border-radius:8px!important;}
.jumbotron h1, .jumbotron .h1 {font-size:43px;margin: 0 0 30px;}
.jumbotron .btn-sm {font-size:17px;}
.panel {border-radius:8px}
.panel-heading {border-radius:8px 8px 0 0}
.panel-footer {border-radius:0 0 8px 8px}
.panel-title {font-size:18px;}
.panel-title small .more {padding-top:4px;font-size:14px}
.jumbotron {background:#f1f1f1;margin:48px auto;}
.panel-title small .more {padding-top:4px;}
.nav-search {margin-top:9px;}
.nav-search .form-control {height:30px;padding:5px;}
.nav-search .btn {height:31px;padding:5px 10px;}
.main {background:#fff;box-shadow:0 1px 4px 0 rgb(0 0 0 / 8%);border-radius:0 0 8px 8px;padding:20px 10px;margin:0 -1px}
.main-list {border-radius:8px;}
.main-right::before {content:'';border-left:1px solid #e6e6e6;position:absolute;height:100%;left:-20px;}
.article-list {padding:5px;margin:0;}
.article-list li {list-style:none;padding:8px 0;}
.article-view {border-radius:8px;padding:30px 50px;}
.article-title {color:#333;font-size:30px;text-align:center;border-bottom:1px solid #ddd;padding:15px 20px 20px 20px;margin-bottom:30px;}
.article-info {border-top:1px solid #ddd;padding:10px;margin:30px 0 0;}
.article-desc {padding:8px 10px 8px;margin:10px 20px 20px 35px;font-size:14px;}
.article-content {padding-top:20px;}
.article-title {color:#555555;font-size:20px;text-align:center;border-bottom:1px solid #ddd;padding:15px 20px 20px 20px;margin-bottom:30px;}
.article-info {border-top:1px solid #ddd;padding:10px;margin:25px 0 0;}
.article-desc {padding:8px 10px 8px;margin:10px 20px 20px 35px;font-size:13px;}
.article-content {padding-top:10px;}
.pagination {margin:8px 0;display:block;/* text-align:center; */font-size:13px;} /* .pagination .controls a{border:0;} */
.pagination>li>a, .pagination>li>span {min-width:37px;text-align:center;padding:6px;border:1px solid #ddd;background:transparent;/* border-radius:3px; */}

View File

@@ -77,11 +77,12 @@
<label class="control-label col-sm-4" title="${text('数值越大排序越靠前,可设置权重过期时间')}。">
${text('权重/排序')} <i class="fa icon-question"></i></label>
<div class="col-sm-8">
<div class="form-inline m0">
<div class="form-inline">
<#form:input path="weight" class="form-control width-90 digits" maxlength="10"/> &nbsp;
<#form:checkbox id="weightTop" label="${text('置顶')}" value="${article.weight==9999 ?'1' : ''}"
class="form-control" style="vertical-align:middle;"/>
</div>
<span class="help-block">&nbsp;</span>
</div>
</div>
</div>
@@ -143,7 +144,7 @@
</div>
</div>
</div>
<!--<div class="col-xs-6">
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4">${text('推荐位')}</label>
<div class="col-sm-8">
@@ -162,14 +163,14 @@
<#form:select path="state" dictType="sys_status" blankOption="true" class="form-control" />
</div>
</div>
</div>-->
</div>
<div class="col-xs-6">
<div class="form-group">
<label class="control-label col-sm-4" title="${text('可修改发布时间,不填则使用当前时间')}">
${text('发布时间')} <i class="fa icon-question"></i></label>
<div class="col-sm-8">
<#form:input path="createDate" readonly="true" maxlength="20" class="form-control laydate"
dataFormat="datetime" data-type="datetime" data-format="yyyy-MM-dd HH:mm"/>
<#form:input path="createDate" readonly="true" maxlength="20" class="form-control Wdate"
dataFormat="datetime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});"/>
</div>
</div>
</div>
@@ -208,7 +209,7 @@
</div>
</div>
</div>
<#form:extend collapsed="true" pathPrefix="articleData"/>
<#form:extend collapsed="true" />
<div class="box-footer">
<div class="row">
<div class="col-sm-offset-2 col-sm-10">

View File

@@ -42,7 +42,7 @@
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
<button type="reset" class="btn btn-default btn-sm isQuick">${text('重置')}</button>
<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
</div>
</#form:form>
<table id="dataGrid"></table>
@@ -70,7 +70,7 @@ $('#dataGrid').dataGrid({
// {header:'${text("备注信息")}', name:'remarks', index:'a.remarks', width:150, align:"left"},
{header:'${text("操作")}', name:'actions', width:150, formatter: function(val, obj, row, act){
var actions = [];
//<% if(hasPermi('cms:article:edit')){ %>
<% if(hasPermi('cms:article:edit')){ %>
actions.push('<a href="${ctx}/cms/article/form?id='+row.id+'" class="btnList" title="${text("编辑文章")}"><i class="fa fa-pencil"></i></a>&nbsp;');
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="${ctx}/cms/article/disable?id='+row.id+'" class="btnList" title="${text("停用文章")}" data-confirm="${text("确认要停用该文章吗?")}"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
@@ -82,7 +82,7 @@ $('#dataGrid').dataGrid({
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="${ctxFront}/view-'+row.category.categoryCode+'-'+row.id+'" target="_blank" title="${text("预览文章")}"><i class="fa fa-globe"></i></a>&nbsp;');
}
//<% } %>
<% } %>
return actions.join('');
}}
],

View File

@@ -58,7 +58,7 @@
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
<button type="reset" class="btn btn-default btn-sm isQuick">${text('重置')}</button>
<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
</div>
</#form:form>
<table id="dataGrid"></table>
@@ -87,7 +87,7 @@ $('#dataGrid').dataGrid({
}},
{header:'${text("操作")}', name:'actions', width:150, formatter: function(val, obj, row, act){
var actions = [];
//<% if(hasPermi('cms:category:edit')){ %>
<% if(hasPermi('cms:category:edit')){ %>
actions.push('<a href="${ctx}/cms/category/form?categoryCode='+row.categoryCode+'" class="btnList" title="${text("编辑栏目表")}"><i class="fa fa-pencil"></i></a>&nbsp;');
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="${ctx}/cms/category/disable?categoryCode='+row.categoryCode+'" class="btnList" title="${text("停用栏目表")}" data-confirm="${text("确认要停用该栏目表吗?")}"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
@@ -100,7 +100,7 @@ $('#dataGrid').dataGrid({
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="${ctxFront}/list-'+row.categoryCode+'" target="_blank" title="${text("访问栏目")}"><i class="fa fa-globe"></i></a>&nbsp;');
}
//<% } %>
<% } %>
return actions.join('');
}}
],

View File

@@ -1,18 +1,18 @@
<% layout('/layouts/default.html', {title: '文章评论表管理', 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('文章评论表管理')}
</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(hasPermi('cms:comment:edit')){ %>
<a href="${ctx}/cms/comment/form" class="btn btn-default btnTool" title="${text('新增文章评论表')}"><i class="fa fa-plus"></i> ${text('新增')}</a>
<% } %>
</div>
</div>
<div class="box-body">
<% layout('/layouts/default.html', {title: '文章评论表管理', 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('文章评论表管理')}
</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(hasPermi('cms:comment:edit')){ %>
<a href="${ctx}/cms/comment/form" class="btn btn-default btnTool" title="${text('新增文章评论表')}"><i class="fa fa-plus"></i> ${text('新增')}</a>
<% } %>
</div>
</div>
<div class="box-body">
<#form:form id="searchForm" model="${comment}" action="${ctx}/cms/comment/listData" method="post" class="form-inline hide"
data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
<div class="form-group">
@@ -95,56 +95,56 @@
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
<button type="reset" class="btn btn-default btn-sm isQuick">${text('重置')}</button>
<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
</div>
</#form:form>
<table id="dataGrid"></table>
<div id="dataGridPage"></div>
</div>
</div>
</div>
<% } %>
<script>
// 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
columnModel: [
{header:'${text('栏目编码')}', name:'categoryCode', index:'a.category_code', width:150, align:"left", frozen:true, formatter: function(val, obj, row, act){
return '<a href="${ctx}/cms/comment/form?id='+row.id+'" class="btnList" data-title="${text('编辑文章评论表')}">'+(val||row.id)+'</a>';
}},
{header:'${text('内容编号')}', name:'articleId', index:'a.article_id', width:150, align:"left"},
{header:'${text('父级评论')}', name:'parentId', index:'a.parent_id', width:150, align:"left"},
{header:'${text('内容标题')}', name:'articleTitle', index:'a.article_title', width:150, align:"left"},
{header:'${text('评论内容')}', name:'content', index:'a.content', width:150, align:"left"},
{header:'${text('评论姓名')}', name:'name', index:'a.name', width:150, align:"left"},
{header:'${text('评论IP')}', name:'ip', index:'a.ip', width:150, align:"left"},
{header:'${text('创建时间')}', name:'createDate', index:'a.create_date', width:150, align:"center"},
{header:'${text('审核人')}', name:'auditUserCode', index:'a.audit_user_code', width:150, align:"left"},
{header:'${text('审核时间')}', name:'auditDate', index:'a.audit_date', width:150, align:"center"},
{header:'${text('审核意见')}', name:'auditComment', index:'a.audit_comment', width:150, align:"left"},
{header:'${text('支持数')}', name:'hitsPlus', index:'a.hits_plus', width:150, align:"center"},
{header:'${text('反对数')}', name:'hitsMinus', index:'a.hits_minus', width:150, align:"center"},
{header:'${text('状态')}', name:'status', index:'a.status', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_search_status')}, val, '${text('未知')}', true);
}},
{header:'${text('操作')}', name:'actions', width:120, formatter: function(val, obj, row, act){
var actions = [];
<% if(hasPermi('cms:comment:edit')){ %>
actions.push('<a href="${ctx}/cms/comment/form?id='+row.id+'" class="btnList" title="${text('编辑文章评论表')}"><i class="fa fa-pencil"></i></a>&nbsp;');
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="${ctx}/cms/comment/disable?id='+row.id+'" 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}/cms/comment/enable?id='+row.id+'" class="btnList" title="${text('启用文章评论表')}" data-confirm="${text('确认要启用该文章评论表吗')}"><i class="glyphicon glyphicon-ok-circle"></i></a>&nbsp;');
}
actions.push('<a href="${ctx}/cms/comment/delete?id='+row.id+'" class="btnList" title="${text('删除文章评论表')}" data-confirm="${text('确认要删除该文章评论表吗')}"><i class="fa fa-trash-o"></i></a>&nbsp;');
<% } %>
return actions.join('');
}}
],
// 加载成功后执行事件
ajaxSuccess: function(data){
}
});
<table id="dataGrid"></table>
<div id="dataGridPage"></div>
</div>
</div>
</div>
<% } %>
<script>
// 初始化DataGrid对象
$('#dataGrid').dataGrid({
searchForm: $("#searchForm"),
columnModel: [
{header:'${text('栏目编码')}', name:'categoryCode', index:'a.category_code', width:150, align:"left", frozen:true, formatter: function(val, obj, row, act){
return '<a href="${ctx}/cms/comment/form?id='+row.id+'" class="btnList" data-title="${text('编辑文章评论表')}">'+(val||row.id)+'</a>';
}},
{header:'${text('内容编号')}', name:'articleId', index:'a.article_id', width:150, align:"left"},
{header:'${text('父级评论')}', name:'parentId', index:'a.parent_id', width:150, align:"left"},
{header:'${text('内容标题')}', name:'articleTitle', index:'a.article_title', width:150, align:"left"},
{header:'${text('评论内容')}', name:'content', index:'a.content', width:150, align:"left"},
{header:'${text('评论姓名')}', name:'name', index:'a.name', width:150, align:"left"},
{header:'${text('评论IP')}', name:'ip', index:'a.ip', width:150, align:"left"},
{header:'${text('创建时间')}', name:'createDate', index:'a.create_date', width:150, align:"center"},
{header:'${text('审核人')}', name:'auditUserCode', index:'a.audit_user_code', width:150, align:"left"},
{header:'${text('审核时间')}', name:'auditDate', index:'a.audit_date', width:150, align:"center"},
{header:'${text('审核意见')}', name:'auditComment', index:'a.audit_comment', width:150, align:"left"},
{header:'${text('支持数')}', name:'hitsPlus', index:'a.hits_plus', width:150, align:"center"},
{header:'${text('反对数')}', name:'hitsMinus', index:'a.hits_minus', width:150, align:"center"},
{header:'${text('状态')}', name:'status', index:'a.status', width:150, align:"center", formatter: function(val, obj, row, act){
return js.getDictLabel(${@DictUtils.getDictListJson('sys_search_status')}, val, '${text('未知')}', true);
}},
{header:'${text('操作')}', name:'actions', width:120, formatter: function(val, obj, row, act){
var actions = [];
<% if(hasPermi('cms:comment:edit')){ %>
actions.push('<a href="${ctx}/cms/comment/form?id='+row.id+'" class="btnList" title="${text('编辑文章评论表')}"><i class="fa fa-pencil"></i></a>&nbsp;');
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="${ctx}/cms/comment/disable?id='+row.id+'" 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}/cms/comment/enable?id='+row.id+'" class="btnList" title="${text('启用文章评论表')}" data-confirm="${text('确认要启用该文章评论表吗')}"><i class="glyphicon glyphicon-ok-circle"></i></a>&nbsp;');
}
actions.push('<a href="${ctx}/cms/comment/delete?id='+row.id+'" class="btnList" title="${text('删除文章评论表')}" data-confirm="${text('确认要删除该文章评论表吗')}"><i class="fa fa-trash-o"></i></a>&nbsp;');
<% } %>
return actions.join('');
}}
],
// 加载成功后执行事件
ajaxSuccess: function(data){
}
});
</script>

View File

@@ -13,43 +13,43 @@
</div>
</div>
<div class="box-body">
<#form:form id="searchForm" model="${report}" action="${ctx}/cms/report/listData" method="post" class="form-inline hide"
data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
<div class="form-group">
<label class="control-label">${text('举报来源')}</label>
<div class="control-inline">
<#form:input path="reportSource" maxlength="1" class="form-control width-120"/>
</div>
</div>
<div class="form-group">
<label class="control-label">${text('举报内容')}</label>
<div class="control-inline">
<#form:input path="reportContent" maxlength="500" class="form-control width-120"/>
</div>
</div>
<div class="form-group">
<label class="control-label">${text('举报的URL')}</label>
<div class="control-inline">
<#form:input path="reportUrl" maxlength="1000" class="form-control width-120"/>
</div>
</div>
<div class="form-group">
<label class="control-label">${text('举报类型')}</label>
<div class="control-inline">
<#form:input path="reportType" maxlength="1" class="form-control width-120"/>
</div>
</div>
<div class="form-group">
<label class="control-label">${text('举报原因')}</label>
<div class="control-inline">
<#form:input path="reportCause" maxlength="500" class="form-control width-120"/>
</div>
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
<button type="reset" class="btn btn-default btn-sm isQuick">${text('重置')}</button>
</div>
</#form:form>
<#form:form id="searchForm" model="${report}" action="${ctx}/cms/report/listData" method="post" class="form-inline hide"
data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
<div class="form-group">
<label class="control-label">${text('举报来源')}</label>
<div class="control-inline">
<#form:input path="reportSource" maxlength="1" class="form-control width-120"/>
</div>
</div>
<div class="form-group">
<label class="control-label">${text('举报内容')}</label>
<div class="control-inline">
<#form:input path="reportContent" maxlength="500" class="form-control width-120"/>
</div>
</div>
<div class="form-group">
<label class="control-label">${text('举报的URL')}</label>
<div class="control-inline">
<#form:input path="reportUrl" maxlength="1000" class="form-control width-120"/>
</div>
</div>
<div class="form-group">
<label class="control-label">${text('举报类型')}</label>
<div class="control-inline">
<#form:input path="reportType" maxlength="1" class="form-control width-120"/>
</div>
</div>
<div class="form-group">
<label class="control-label">${text('举报原因')}</label>
<div class="control-inline">
<#form:input path="reportCause" maxlength="500" class="form-control width-120"/>
</div>
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
</div>
</#form:form>
<table id="dataGrid"></table>
<div id="dataGridPage"></div>
</div>
@@ -70,7 +70,7 @@ $('#dataGrid').dataGrid({
{header:'${text('举报原因')}', name:'reportCause', index:'a.report_cause', width:150, align:"left"},
{header:'${text('操作')}', name:'actions', width:120, formatter: function(val, obj, row, act){
var actions = [];
//<% if(hasPermi('cms:report:edit')){ %>
<% if(hasPermi('cms:report:edit')){ %>
actions.push('<a href="${ctx}/cms/report/form?id='+row.id+'" class="btnList" title="${text('编辑内容举报表')}"><i class="fa fa-pencil"></i></a>&nbsp;');
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="${ctx}/cms/report/disable?id='+row.id+'" class="btnList" title="${text('停用内容举报表')}" data-confirm="${text('确认要停用该内容举报表吗')}"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
@@ -79,7 +79,7 @@ $('#dataGrid').dataGrid({
actions.push('<a href="${ctx}/cms/report/enable?id='+row.id+'" class="btnList" title="${text('启用内容举报表')}" data-confirm="${text('确认要启用该内容举报表吗')}"><i class="glyphicon glyphicon-ok-circle"></i></a>&nbsp;');
}
actions.push('<a href="${ctx}/cms/report/delete?id='+row.id+'" class="btnList" title="${text('删除内容举报表')}" data-confirm="${text('确认要删除该内容举报表吗')}"><i class="fa fa-trash-o"></i></a>&nbsp;');
//<% } %>
<% } %>
return actions.join('');
}}
],

View File

@@ -13,37 +13,37 @@
</div>
</div>
<div class="box-body">
<#form:form id="searchForm" model="${site}" action="${ctx}/cms/site/listData" method="post" class="form-inline hide"
data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
<div class="form-group">
<label class="control-label">${text('站点名称')}</label>
<div class="control-inline">
<#form:input path="siteName" maxlength="100" class="form-control width-120"/>
</div>
</div>
<div class="form-group">
<label class="control-label">${text('站点标题')}</label>
<div class="control-inline">
<#form:input path="title" maxlength="100" class="form-control width-120"/>
</div>
</div>
<div class="form-group">
<label class="control-label">${text('站点域名')}</label>
<div class="control-inline">
<#form:input path="domain" maxlength="500" class="form-control width-120"/>
</div>
</div>
<div class="form-group">
<label class="control-label">${text('状态')}</label>
<div class="control-inline width-90">
<#form:select path="status" dictType="sys_search_status" blankOption="true" class="form-control"/>
</div>
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
<button type="reset" class="btn btn-default btn-sm isQuick">${text('重置')}</button>
</div>
</#form:form>
<#form:form id="searchForm" model="${site}" action="${ctx}/cms/site/listData" method="post" class="form-inline hide"
data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
<div class="form-group">
<label class="control-label">${text('站点名称')}</label>
<div class="control-inline">
<#form:input path="siteName" maxlength="100" class="form-control width-120"/>
</div>
</div>
<div class="form-group">
<label class="control-label">${text('站点标题')}</label>
<div class="control-inline">
<#form:input path="title" maxlength="100" class="form-control width-120"/>
</div>
</div>
<div class="form-group">
<label class="control-label">${text('站点域名')}</label>
<div class="control-inline">
<#form:input path="domain" maxlength="500" class="form-control width-120"/>
</div>
</div>
<div class="form-group">
<label class="control-label">${text('状态')}</label>
<div class="control-inline width-90">
<#form:select path="status" dictType="sys_search_status" blankOption="true" class="form-control"/>
</div>
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
</div>
</#form:form>
<table id="dataGrid"></table>
<div id="dataGridPage"></div>
</div>
@@ -69,7 +69,7 @@ $('#dataGrid').dataGrid({
{header:'${text("创建时间")}', name:'createDate', index:'a.create_date', width:150, align:"center"},
{header:'${text("操作")}', name:'actions', width:150, formatter: function(val, obj, row, act){
var actions = [];
//<% if(hasPermi('cms:site:edit')){ %>
<% if(hasPermi('cms:site:edit')){ %>
actions.push('<a href="${ctx}/cms/site/form?siteCode='+row.siteCode+'" class="btnList" title="${text("编辑站点")}"><i class="fa fa-pencil"></i></a>&nbsp;');
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="${ctx}/cms/site/disable?siteCode='+row.siteCode+'" class="btnList" title="${text("停用站点")}" data-confirm="${text("确认要停用该站点吗?")}"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
@@ -81,7 +81,7 @@ $('#dataGrid').dataGrid({
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="${ctxFront}/index-'+row.siteCode+'" target="_blank" title="${text("访问站点")}"><i class="fa fa-globe"></i></a>&nbsp;');
}
//<% } %>
<% } %>
return actions.join('');
}}
],

View File

@@ -13,50 +13,50 @@
</div>
</div>
<div class="box-body">
<#form:form id="searchForm" model="${visitLog}" action="${ctx}/cms/visitLog/listData" method="post" class="form-inline hide"
data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
<div class="form-group">
<label class="control-label">${text('请求的URL地址')}</label>
<div class="control-inline">
<#form:input path="requestUrl" maxlength="1000" class="form-control width-120"/>
</div>
</div>
<div class="form-group">
<label class="control-label">${text('受访域名')}</label>
<div class="control-inline">
<#form:input path="requestUrlHost" maxlength="128" class="form-control width-120"/>
</div>
</div>
<div class="form-group">
<label class="control-label">${text('来源页面/上一个页面')}</label>
<div class="control-inline">
<#form:input path="sourceReferer" maxlength="1000" class="form-control width-120"/>
</div>
</div>
<div class="form-group">
<label class="control-label">${text('来源域名')}</label>
<div class="control-inline">
<#form:input path="sourceRefererHost" maxlength="128" class="form-control width-120"/>
</div>
</div>
<div class="form-group">
<label class="control-label">${text('搜索的关键词')}</label>
<div class="control-inline">
<#form:input path="searchWord" maxlength="200" class="form-control width-120"/>
</div>
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
<button type="reset" class="btn btn-default btn-sm isQuick">${text('重置')}</button>
</div>
</#form:form>
<#form:form id="searchForm" model="${visitLog}" action="${ctx}/cms/visitLog/listData" method="post" class="form-inline hide"
data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
<div class="form-group">
<label class="control-label">${text('请求的URL地址')}</label>
<div class="control-inline">
<#form:input path="requestUrl" maxlength="1000" class="form-control width-120"/>
</div>
</div>
<div class="form-group">
<label class="control-label">${text('受访域名')}</label>
<div class="control-inline">
<#form:input path="requestUrlHost" maxlength="128" class="form-control width-120"/>
</div>
</div>
<div class="form-group">
<label class="control-label">${text('来源页面/上一个页面')}</label>
<div class="control-inline">
<#form:input path="sourceReferer" maxlength="1000" class="form-control width-120"/>
</div>
</div>
<div class="form-group">
<label class="control-label">${text('来源域名')}</label>
<div class="control-inline">
<#form:input path="sourceRefererHost" maxlength="128" class="form-control width-120"/>
</div>
</div>
<div class="form-group">
<label class="control-label">${text('搜索的关键词')}</label>
<div class="control-inline">
<#form:input path="searchWord" maxlength="200" class="form-control width-120"/>
</div>
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary btn-sm">${text('查询')}</button>
<button type="reset" class="btn btn-default btn-sm">${text('重置')}</button>
</div>
</#form:form>
<table id="dataGrid"></table>
<div id="dataGridPage"></div>
</div>
@@ -91,7 +91,7 @@ $('#dataGrid').dataGrid({
{header:'${text('操作')}', name:'actions', width:120, formatter: function(val, obj, row, act){
var actions = [];
//<% if(hasPermi('cms:visitLog:edit')){ %>
<% if(hasPermi('cms:visitLog:edit')){ %>
actions.push('<a href="${ctx}/cms/visitLog/form?id='+row.id+'" class="btnList" title="${text('编辑访问日志表')}"><i class="fa fa-pencil"></i></a>&nbsp;');
if (row.status == Global.STATUS_NORMAL){
actions.push('<a href="${ctx}/cms/visitLog/disable?id='+row.id+'" class="btnList" title="${text('停用访问日志表')}" data-confirm="${text('确认要停用该访问日志表吗')}"><i class="glyphicon glyphicon-ban-circle"></i></a>&nbsp;');
@@ -100,7 +100,7 @@ $('#dataGrid').dataGrid({
actions.push('<a href="${ctx}/cms/visitLog/enable?id='+row.id+'" class="btnList" title="${text('启用访问日志表')}" data-confirm="${text('确认要启用该访问日志表吗')}"><i class="glyphicon glyphicon-ok-circle"></i></a>&nbsp;');
}
actions.push('<a href="${ctx}/cms/visitLog/delete?id='+row.id+'" class="btnList" title="${text('删除访问日志表')}" data-confirm="${text('确认要删除该访问日志表吗')}"><i class="fa fa-trash-o"></i></a>&nbsp;');
//<% } %>
<% } %>
return actions.join('');
}}
],

View File

@@ -11,5 +11,5 @@
<meta content="width=device-width, initial-scale=1, user-scalable=1" name="viewport"/>
<title>${(isNotBlank(title!) ? title! + ' - ' : '') + @Global.getConfig('productName')}</title>
<script src="${ctxPath}/global.min.js?ctx=${ctx}"></script>
<script src="${ctxStatic}/jquery/jquery-3.5.0.min.js"></script>
<script src="${ctxStatic}/jquery/jquery-migrate-3.2.0.min.js"></script>
<script src="${ctxStatic}/jquery/jquery-1.12.4.min.js"></script>
<script src="${ctxStatic}/jquery/jquery-migrate-1.4.1.min.js"></script>

View File

@@ -19,6 +19,7 @@
href="${ctx}/list-${c.categoryCode}">${c.categoryName}</a></li>
</#html:if>
</#html:foreach>
<li><a href="http://jeesite.com" target="_blank">官方网站</a></li>
<li><a href="http://s.jeesite.com" target="_blank">技术服务</a></li>
<li id="siteSwitch" class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#" title="站点">子站切换 <span class="caret"></span></a>
@@ -35,7 +36,7 @@
</ul>
</li> -->
</ul>
<ul class="nav navbar-nav navbar-right hidden-xs hidden-sm">
<ul class="nav navbar-nav navbar-right">
<form class="navbar-form navbar-left nav-search" action="${ctx}/search">
<div class="form-group">
<input type="text" name="q" class="form-control" placeholder="全站搜索...">

View File

@@ -1,7 +1,7 @@
<% layout('layouts/default.html', {title: '列表页面', libs: []}){ %>
<% include('include/banner.html'){} %>
<div class="row main main-list">
<div class="col-sm-2 col-xs-12 main-left">
<div class="row">
<div class="col-xs-2">
<h4>栏目列表</h4>
<ul class="article-list">
<#html:foreach items="${qmark(categoryList! != null, categoryList!, categoryList(site.siteCode, category.parentCode, 50, ''))}" var="category,status">
@@ -9,7 +9,7 @@
</#html:foreach>
</ul>
</div>
<div class="col-sm-10 col-xs-12 main-right">
<div class="col-xs-10">
<h4>${category.categoryName}</h4>
<#html:if test="${page! != null && category.moduleType == 'article'}">
<ul class="article-list">

View File

@@ -1,7 +1,7 @@
<% layout('layouts/default.html', {title: '列表页面', libs: []}){ %>
<% include('include/banner.html'){} %>
<div class="row main main-list">
<div class="col-sm-2 col-xs-12 main-left">
<div class="row">
<div class="col-xs-2">
<h4>栏目列表</h4>
<ul class="article-list">
<#html:foreach items="${qmark(categoryList! != null, categoryList!, categoryList(site.siteCode, category.parentCode, 50, ''))}" var="category,status">
@@ -9,7 +9,7 @@
</#html:foreach>
</ul>
</div>
<div class="col-sm-10 col-xs-12 main-right">
<div class="col-xs-10">
<h4>${category.categoryName}</h4>
<div class="row"><br/>
<#html:foreach items="${qmark(categoryList! != null, categoryList!, [])}" var="category,status">

View File

@@ -1,6 +1,6 @@
<% layout('layouts/default.html', {title: '站点地图', libs: []}){ %>
<style type="text/css">
h2 {padding-left:10px;text-align:center;}
h2 {padding-left:10px;}
h3.title {padding:5px 5px;margin:15px 8px 10px;}
dl.map{border:1px solid #ddd;border-top:0;margin:10px 8px 8px;}
dl.map dt{border-top:1px solid #ddd;padding:10px 15px;} dl.map dd{margin:20px 30px 30px;}
@@ -8,7 +8,7 @@
dl.map span:hover{border:1px solid #bbb;background:#f1f1f1;}
dl.map span a:hover{text-decoration:none;color:#333;}
</style>
<div class="row main">
<div class="row">
<h2>站点地图</h2>
<#html:foreach items="${siteList()}" var="site">
<h3 class="title breadcrumb">${site.siteName}</h3>

View File

@@ -37,7 +37,7 @@ $(function(){
laydate.render({elem:'#ed', type:'date', format:'yyyy-MM-dd'});
});
</script>
<div class="row main">
<div class="row">
<form id="searchForm" method="get" class="search">
<input type="hidden" id="pageNo" name="pageNo" value="${page.pageNo!}"/>
<input type="hidden" id="t" name="t" value="${isNotBlank(t)?t:'article'}"/>

View File

@@ -1,6 +1,6 @@
<% layout('layouts/default.html', {title:'文章查看',libs: []}){ %>
<% include('include/banner.html'){} %>
<div class="row main article-view">
<div class="row article-view">
<h3 class="article-title">${article.title}</h3>
<blockquote class="article-desc">摘要:${article.description}</blockquote>
<div class="article-content uparse">${article.articleData.content}</div>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.jeesite</groupId>
<artifactId>jeesite-parent</artifactId>
<version>4.6.2-SNAPSHOT</version>
<version>4.4.0-SNAPSHOT</version>
<relativePath>../../parent/pom.xml</relativePath>
</parent>
@@ -17,12 +17,16 @@
<url>http://jeesite.com</url>
<inceptionYear>2013-Now</inceptionYear>
<properties>
</properties>
<dependencies>
<!-- MySQL -->
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<!-- Oracle 11g -->
@@ -91,6 +95,12 @@
</dependencies>
<build>
<plugins>
</plugins>
</build>
<developers>
<developer>
<id>thinkgem</id>

View File

@@ -4,19 +4,19 @@
*/
package com.jeesite.common.shiro.filter;
import com.jeesite.common.lang.ExceptionUtils;
import com.jeesite.common.lang.StringUtils;
import com.jeesite.common.shiro.realm.BaseAuthorizingRealm;
import com.jeesite.modules.sys.utils.UserUtils;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.shiro.authc.AuthenticationException;
import org.apache.shiro.authc.AuthenticationToken;
import org.apache.shiro.subject.Subject;
import org.apache.shiro.web.util.WebUtils;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.jeesite.common.lang.ExceptionUtils;
import com.jeesite.common.lang.StringUtils;
import com.jeesite.common.shiro.realm.BaseAuthorizingRealm;
/**
* CAS过滤器
@@ -25,15 +25,12 @@ import javax.servlet.http.HttpServletResponse;
*/
@SuppressWarnings("deprecation")
public class CasFilter extends org.apache.shiro.cas.CasFilter {
private BaseAuthorizingRealm authorizingRealm;
/**
* 登录成功调用事件
*/
@Override
protected boolean onLoginSuccess(AuthenticationToken token, Subject subject, ServletRequest request, ServletResponse response) throws Exception {
authorizingRealm.onLoginSuccess(UserUtils.getLoginInfo(), (HttpServletRequest)request);
return FormFilter.onLoginSuccess((HttpServletRequest)request, (HttpServletResponse)response);
}
@@ -69,7 +66,7 @@ public class CasFilter extends org.apache.shiro.cas.CasFilter {
}
public void setAuthorizingRealm(BaseAuthorizingRealm authorizingRealm) {
this.authorizingRealm = authorizingRealm;
}
}

View File

@@ -4,14 +4,15 @@
*/
package com.jeesite.common.shiro.filter;
import com.jeesite.common.config.Global;
import com.jeesite.common.lang.StringUtils;
import org.apache.shiro.web.filter.AccessControlFilter;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import org.apache.shiro.web.filter.AccessControlFilter;
import com.jeesite.common.config.Global;
import com.jeesite.common.lang.StringUtils;
/**
* 内部系统访问过滤器
* @author ThinkGem
@@ -28,7 +29,7 @@ public class InnerFilter extends AccessControlFilter {
"shiro.innerFilterAllowRemoteAddrs", "127.0.0.1"), ",");
}
if (prefixes != null && request instanceof HttpServletRequest){
String ip = request.getRemoteAddr();
String ip = ((HttpServletRequest)request).getRemoteAddr();
for (String prefix : prefixes){
result = StringUtils.startsWithIgnoreCase(ip, StringUtils.trim(prefix));
if (result){

View File

@@ -72,8 +72,7 @@ public class AuthorizingRealm extends BaseAuthorizingRealm {
* @param plainPassword 明文密码
* @return 16位salt密钥 + 40位hash密码
*/
@Override
public String encryptPassword(String plainPassword) {
public String encryptPassword(String plainPassword) {
String plain = EncodeUtils.decodeHtml(plainPassword);
byte[] salt = Sha1Utils.genSalt(SALT_SIZE);
byte[] hashPassword = Sha1Utils.sha1(plain.getBytes(), salt, HASH_INTERATIONS);
@@ -86,7 +85,6 @@ public class AuthorizingRealm extends BaseAuthorizingRealm {
* @param password 密文密码
* @return 验证成功返回true
*/
@Override
public boolean validatePassword(String plainPassword, String password) {
try{
String plain = EncodeUtils.decodeHtml(plainPassword);

View File

@@ -4,6 +4,22 @@
*/
package com.jeesite.common.shiro.realm;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.validation.ValidationException;
import org.apache.shiro.authc.AuthenticationException;
import org.apache.shiro.authc.AuthenticationInfo;
import org.apache.shiro.authc.AuthenticationToken;
import org.apache.shiro.cas.CasToken;
import org.jasig.cas.client.authentication.AttributePrincipal;
import org.jasig.cas.client.validation.Assertion;
import org.jasig.cas.client.validation.Cas20ServiceTicketValidator;
import org.jasig.cas.client.validation.TicketValidationException;
import org.jasig.cas.client.validation.TicketValidator;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import com.jeesite.common.codec.EncodeUtils;
import com.jeesite.common.collect.MapUtils;
import com.jeesite.common.lang.ObjectUtils;
@@ -19,20 +35,6 @@ import com.jeesite.modules.sys.service.EmpUserService;
import com.jeesite.modules.sys.service.UserService;
import com.jeesite.modules.sys.utils.LogUtils;
import com.jeesite.modules.sys.utils.UserUtils;
import org.apache.shiro.authc.AuthenticationException;
import org.apache.shiro.authc.AuthenticationInfo;
import org.apache.shiro.authc.AuthenticationToken;
import org.apache.shiro.cas.CasToken;
import org.jasig.cas.client.authentication.AttributePrincipal;
import org.jasig.cas.client.validation.Assertion;
import org.jasig.cas.client.validation.Cas20ServiceTicketValidator;
import org.jasig.cas.client.validation.TicketValidationException;
import org.jasig.cas.client.validation.TicketValidator;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import javax.servlet.http.HttpServletRequest;
import javax.validation.ValidationException;
import java.util.Map;
/**
* 系统认证授权实现类
@@ -179,11 +181,20 @@ public class CasAuthorizingRealm extends BaseAuthorizingRealm {
@Override
public void onLoginSuccess(LoginInfo loginInfo, HttpServletRequest request) {
super.onLoginSuccess(loginInfo, request);
// 单点登录登出句柄登录时注入session在这之前必须获取下授权信息
String ticket = loginInfo.getParam("ticket");
casOutHandler.recordSession(request, ticket);
//System.out.print("__sid: "+request.getSession().getId());
//System.out.println(" == "+UserUtils.getSession().getId());
// 更新登录IP、时间、会话ID等
User user = UserUtils.get(loginInfo.getId());
getUserService().updateUserLoginInfo(user);
// 记录用户登录日志
LogUtils.saveLog(user, ServletUtils.getRequest(), "系统登录", Log.TYPE_LOGIN_LOGOUT);
}
@Override

View File

@@ -4,12 +4,12 @@
*/
package com.jeesite.common.utils.excel.fieldtype;
import java.util.List;
import com.jeesite.common.lang.StringUtils;
import com.jeesite.modules.sys.entity.Area;
import com.jeesite.modules.sys.utils.AreaUtils;
import java.util.List;
/**
* 字段类型转换
* @author ThinkGem
@@ -27,8 +27,7 @@ public class AreaType implements FieldType {
/**
* 获取对象值(导入)
*/
@Override
public Object getValue(String val) {
public Object getValue(String val) {
for (Area e : list){
if (StringUtils.trimToEmpty(val).equals(e.getAreaName())){
return e;
@@ -40,7 +39,6 @@ public class AreaType implements FieldType {
/**
* 获取对象值(导出)
*/
@Override
public String setValue(Object val) {
if (val != null && ((Area)val).getAreaName() != null){
return ((Area)val).getAreaName();

View File

@@ -27,7 +27,6 @@ public class CompanyType implements FieldType {
/**
* 获取对象值(导入)
*/
@Override
public Object getValue(String val) {
for (Company e : list){
if (StringUtils.trimToEmpty(val).equals(e.getCompanyName())){
@@ -40,7 +39,6 @@ public class CompanyType implements FieldType {
/**
* 设置对象值(导出)
*/
@Override
public String setValue(Object val) {
if (val != null && ((Company)val).getCompanyName() != null){
return ((Company)val).getCompanyName();

View File

@@ -27,8 +27,7 @@ public class OfficeType implements FieldType {
/**
* 获取对象值(导入)
*/
@Override
public Object getValue(String val) {
public Object getValue(String val) {
for (Office e : list){
if (StringUtils.trimToEmpty(val).equals(e.getOfficeName())){
return e;
@@ -40,8 +39,7 @@ public class OfficeType implements FieldType {
/**
* 设置对象值(导出)
*/
@Override
public String setValue(Object val) {
public String setValue(Object val) {
if (val != null && ((Office)val).getOfficeName() != null){
return ((Office)val).getOfficeName();
}

View File

@@ -31,8 +31,7 @@ public class PostListType implements FieldType {
/**
* 获取对象值(导入)
*/
@Override
public Object getValue(String val) {
public Object getValue(String val) {
List<String> list = new ArrayList<String>();
for (String s : StringUtils.split(val, ",")) {
for (Post e : postList) {
@@ -47,8 +46,7 @@ public class PostListType implements FieldType {
/**
* 设置对象值(导出)
*/
@Override
public String setValue(Object val) {
public String setValue(Object val) {
if (val != null) {
@SuppressWarnings("unchecked")
List<Post> postList = (List<Post>) val;

View File

@@ -31,8 +31,7 @@ public class RoleListType implements FieldType {
/**
* 获取对象值(导入)
*/
@Override
public Object getValue(String val) {
public Object getValue(String val) {
List<String> list = new ArrayList<String>();
for (String s : StringUtils.split(val, ",")) {
for (Role e : roleList) {
@@ -47,8 +46,7 @@ public class RoleListType implements FieldType {
/**
* 设置对象值(导出)
*/
@Override
public String setValue(Object val) {
public String setValue(Object val) {
if (val != null) {
@SuppressWarnings("unchecked")
List<Role> roleList = (List<Role>) val;

View File

@@ -62,7 +62,7 @@ public class ShiroConfig {
@ConditionalOnMissingBean(name="shiroFilterProxy")
public FilterRegistrationBean<Filter> shiroFilterProxy(ShiroFilterFactoryBean shiroFilter) throws Exception {
FilterRegistrationBean<Filter> bean = new FilterRegistrationBean<>();
bean.setFilter(shiroFilter.getObject());
bean.setFilter((Filter) shiroFilter.getInstance());
bean.addUrlPatterns("/*");
bean.setOrder(Ordered.HIGHEST_PRECEDENCE + 5000);
return bean;

View File

@@ -1,26 +0,0 @@
/**
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
* No deletion without permission, or be held responsible to law.
*/
package com.jeesite.modules.config.web;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
/**
* 是否启用默认 Servlet 映射(启用后可访问 webapp 下的静态资源访问)
* @author ThinkGem
* @version 2022年4月18日
*/
@Configuration(proxyBeanMethods = false)
@ConditionalOnProperty(name="server.servlet.register-default-servlet", havingValue="true", matchIfMissing=false)
public class DefaultServletConfig implements WebMvcConfigurer {
@Override
public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) {
configurer.enable();
}
}

View File

@@ -4,20 +4,14 @@
*/
package com.jeesite.modules.config.web;
import com.alibaba.druid.support.http.StatViewServlet;
import com.alibaba.druid.support.http.WebStatFilter;
import com.alibaba.druid.util.Utils;
import com.jeesite.common.web.http.ServletUtils;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import com.alibaba.druid.support.http.StatViewServlet;
import com.alibaba.druid.support.http.WebStatFilter;
/**
* Druid 配置
@@ -50,19 +44,7 @@ public class DruidStatConfig {
@Bean
public ServletRegistrationBean<StatViewServlet> druidServlet() {
ServletRegistrationBean<StatViewServlet> bean = new ServletRegistrationBean<>();
bean.setServlet(new StatViewServlet(){
@Override
public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String requestURI = request.getRequestURI();
if (requestURI.endsWith("/druid/js/common.js")) {
String text = Utils.readFromResource("support/http/resources/js/common.js");
text = text.replaceAll("<a.*?banner\"></a><br/>", "JeeSite 数据监控, ");
ServletUtils.renderString(response, text, "text/javascript;charset=UTF-8");
return;
}
super.service(request, response);
}
});
bean.setServlet(new StatViewServlet());
bean.addUrlMappings("/druid/*");
return bean;
}

View File

@@ -4,6 +4,14 @@
*/
package com.jeesite.modules.msg.service;
import java.util.Date;
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.callback.MethodCallback;
import com.jeesite.common.collect.ListUtils;
import com.jeesite.common.config.Global;
import com.jeesite.common.entity.Page;
@@ -16,22 +24,15 @@ import com.jeesite.modules.msg.dao.MsgInnerRecordDao;
import com.jeesite.modules.msg.entity.MsgInner;
import com.jeesite.modules.msg.entity.MsgInnerRecord;
import com.jeesite.modules.msg.entity.MsgPush;
import com.jeesite.modules.msg.entity.content.*;
import com.jeesite.modules.msg.entity.content.AppMsgContent;
import com.jeesite.modules.msg.entity.content.BaseMsgContent;
import com.jeesite.modules.msg.entity.content.EmailMsgContent;
import com.jeesite.modules.msg.entity.content.PcMsgContent;
import com.jeesite.modules.msg.entity.content.SmsMsgContent;
import com.jeesite.modules.msg.utils.MsgPushUtils;
import com.jeesite.modules.sys.entity.EmpUser;
import com.jeesite.modules.sys.entity.User;
import com.jeesite.modules.sys.service.EmpUserService;
import io.netty.util.concurrent.DefaultThreadFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
/**
* 内部消息Service
@@ -39,16 +40,13 @@ import java.util.concurrent.TimeUnit;
* @version 2019-03-12
*/
@Service
@Transactional(readOnly=true)
public class MsgInnerService extends CrudService<MsgInnerDao, MsgInner> {
@Autowired
private EmpUserService empUserService;
@Autowired
private MsgInnerRecordDao msgInnerRecordDao;
private static ExecutorService msgPushThreadPool = new ThreadPoolExecutor(5, 20,
60L, TimeUnit.SECONDS, new LinkedBlockingQueue<>(),
new DefaultThreadFactory("cms-update-expired-weight"));
/**
* 获取单条数据
@@ -83,7 +81,7 @@ public class MsgInnerService extends CrudService<MsgInnerDao, MsgInner> {
* @param msgInner
*/
@Override
@Transactional
@Transactional(readOnly=false)
public void save(MsgInner msgInner) {
if (msgInner.getIsNewRecord()){
User user = msgInner.getCurrentUser();
@@ -185,26 +183,32 @@ public class MsgInnerService extends CrudService<MsgInnerDao, MsgInner> {
}
}
});
msgInnerRecordDao.insertBatch(recordList, null);
ListUtils.pageList(recordList, 100, new MethodCallback() {
@SuppressWarnings("unchecked")
public Object execute(Object... objs) {
return msgInnerRecordDao.insertBatch((List<MsgInnerRecord>)objs[0]);
}
});
// 手动触发消息推送任务
if (Global.TRUE.equals(Global.getProperty("msg.realtime.enabled"))){
msgPushThreadPool.submit(new Runnable() {
@Override
public void run() {
Thread thread = new Thread("msg-push-task-execute"){
public void run() {
try{
MsgPushUtils.getMsgPushTask().execute();
}catch(Exception ex){
logger.error("实时消息发送失败,推送服务配置不正确。", ex);
}
}
});
};
thread.setDaemon(true);
thread.start();
}
}
/**
* 根据消息编号和接受者用户名读取内部消息
*/
@Transactional
@Transactional(readOnly=false)
public void readMsgInnerRecord(MsgInner msgInner){
MsgInnerRecord msgInnerRecord = new MsgInnerRecord();
msgInnerRecord.setMsgInnerId(msgInner.getId());
@@ -222,7 +226,7 @@ public class MsgInnerService extends CrudService<MsgInnerDao, MsgInner> {
* @param msgInner
*/
@Override
@Transactional
@Transactional(readOnly=false)
public void updateStatus(MsgInner msgInner) {
super.updateStatus(msgInner);
}
@@ -232,7 +236,7 @@ public class MsgInnerService extends CrudService<MsgInnerDao, MsgInner> {
* @param msgInner
*/
@Override
@Transactional
@Transactional(readOnly=false)
public void delete(MsgInner msgInner) {
super.delete(msgInner);
}

View File

@@ -4,7 +4,13 @@
*/
package com.jeesite.modules.sys.entity;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Map;
import javax.validation.constraints.NotBlank;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import javax.validation.constraints.Size;
import com.jeesite.common.codec.EncodeUtils;
import com.jeesite.common.collect.MapUtils;
import com.jeesite.common.entity.BaseEntity;
@@ -15,11 +21,6 @@ import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.util.Date;
import java.util.Map;
/**
* 操作日志Entity
* @author ThinkGem
@@ -282,16 +283,10 @@ public class Log extends DataEntity<Log> {
String[] values = (String[])paramsMap.get(name);
return values != null && values.length > 0 ? values[0] : null;
}
@Override
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
public Date getCreateDate() {
return super.getCreateDate();
public String toString() {
return ReflectionToStringBuilder.toString(this);
}
// @Override
// public String toString() {
// return ReflectionToStringBuilder.toString(this);
// }
}

View File

@@ -34,32 +34,33 @@ public class LogInterceptor extends BaseService implements HandlerInterceptor {
private static final String TRACE_ID = "TRACE_ID";
private static final ThreadLocal<Long> startTimeThreadLocal =
new NamedThreadLocal<Long>("LogInterceptor StartTime");
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response,
Object handler) throws Exception {
public boolean preHandle(HttpServletRequest request, HttpServletResponse response,
Object handler) throws Exception {
if (StringUtils.isBlank(MDC.get(TRACE_ID))) {
MDC.put(TRACE_ID, IdGen.nextId());
}
long beginTime = System.currentTimeMillis();// 1、开始时间
startTimeThreadLocal.set(beginTime); // 线程绑定变量(该数据只有当前请求的线程可见)
MDC.put(TRACE_ID, IdGen.nextId());
}
long beginTime = System.currentTimeMillis();// 1、开始时间
startTimeThreadLocal.set(beginTime); // 线程绑定变量(该数据只有当前请求的线程可见)
if (logger.isDebugEnabled()){
logger.debug("请求开始 URI: {}, IP: {}", request.getRequestURI(), IpUtils.getRemoteAddr(request));
logger.debug("开始计时: {} URI: {} IP: {}", new SimpleDateFormat("hh:mm:ss.SSS")
.format(beginTime), request.getRequestURI(), IpUtils.getRemoteAddr(request));
}
return true;
}
@Override
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,
ModelAndView modelAndView) throws Exception {
if (modelAndView != null && logger.isDebugEnabled()){
logger.debug("ViewName: " + modelAndView.getViewName() + " <<< " + request.getRequestURI() + " >>> " + handler);
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,
ModelAndView modelAndView) throws Exception {
if (modelAndView != null){
logger.info("ViewName: " + modelAndView.getViewName() + " <<<<<<<<< " + request.getRequestURI() + " >>>>>>>>> " + handler);
}
}
@Override
public void afterCompletion(HttpServletRequest request, HttpServletResponse response,
Object handler, Exception ex) throws Exception {
public void afterCompletion(HttpServletRequest request, HttpServletResponse response,
Object handler, Exception ex) throws Exception {
long endTime = System.currentTimeMillis(); // 2、结束时间
long startTime = 0; // 得到线程绑定的局部变量(开始时间)
if (startTimeThreadLocal != null){
@@ -73,17 +74,16 @@ public class LogInterceptor extends BaseService implements HandlerInterceptor {
startTime = endTime + 1000; // 得到 -1000 方便统计
}
long executeTime = endTime - startTime; // 3、获取执行时间
// 保存日志
LogUtils.saveLog(UserUtils.getUser(), request, handler, ex, null, null, executeTime);
// 打印JVM信息。
if (logger.isInfoEnabled()){
if (logger.isDebugEnabled()){
Runtime runtime = Runtime.getRuntime();
long totalMemory = runtime.totalMemory();
logger.info("请求完成 URI: {}, 用时: {}, 总内存: {}, 剩余: {}", request.getRequestURI(),
TimeUtils.formatDateAgo(executeTime), ByteUtils.formatByteSize(totalMemory),
ByteUtils.formatByteSize(totalMemory-(totalMemory-runtime.freeMemory())));
logger.debug("计时结束: {} 用时: {} URI: {} 总内存: {} 已用内存: {}",
DateUtils.formatDate(endTime, "hh:mm:ss.SSS"), TimeUtils.formatDateAgo(executeTime), request.getRequestURI(),
ByteUtils.formatByteSize(runtime.totalMemory()), ByteUtils.formatByteSize(runtime.totalMemory()-runtime.freeMemory()));
}
MDC.remove(TRACE_ID);
}

View File

@@ -19,6 +19,7 @@ import com.jeesite.modules.sys.utils.AreaUtils;
* @author ThinkGem
* @version 2014-8-19
*/
@Transactional(readOnly=true)
public class AreaServiceSupport extends TreeService<AreaDao, Area>
implements AreaService {
@@ -42,7 +43,7 @@ public class AreaServiceSupport extends TreeService<AreaDao, Area>
* 保存区划
*/
@Override
@Transactional
@Transactional(readOnly=false)
public void save(Area area) {
super.save(area);
AreaUtils.clearCache();
@@ -52,7 +53,7 @@ public class AreaServiceSupport extends TreeService<AreaDao, Area>
* 删除区划
*/
@Override
@Transactional
@Transactional(readOnly=false)
public void delete(Area area) {
super.delete(area);
AreaUtils.clearCache();

View File

@@ -25,6 +25,7 @@ import com.jeesite.modules.sys.utils.EmpUtils;
* @author ThinkGem
* @version 2016-4-23
*/
@Transactional(readOnly=true)
public class CompanyServiceSupport extends TreeService<CompanyDao, Company>
implements CompanyService{
@@ -63,7 +64,7 @@ public class CompanyServiceSupport extends TreeService<CompanyDao, Company>
* 保存公司
*/
@Override
@Transactional
@Transactional(readOnly=false)
public void save(Company company) {
if (company.getIsNewRecord()){
// 生成主键,并验证改主键是否存在,如存在则抛出验证信息
@@ -94,7 +95,7 @@ public class CompanyServiceSupport extends TreeService<CompanyDao, Company>
* 删除公司
*/
@Override
@Transactional
@Transactional(readOnly=false)
public void delete(Company company) {
super.delete(company);
// 清理公司相关缓存
@@ -105,7 +106,7 @@ public class CompanyServiceSupport extends TreeService<CompanyDao, Company>
* 停用当前节点
*/
@Override
@Transactional
@Transactional(readOnly=false)
public void updateStatus(Company company) {
dao.updateStatus(company);
// 清理公司相关缓存

View File

@@ -4,6 +4,16 @@
*/
package com.jeesite.modules.sys.service.support;
import java.util.List;
import javax.annotation.PostConstruct;
import javax.validation.ConstraintViolation;
import javax.validation.ConstraintViolationException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import com.jeesite.common.config.Global;
import com.jeesite.common.entity.Page;
import com.jeesite.common.idgen.IdGen;
@@ -23,20 +33,13 @@ import com.jeesite.modules.sys.service.EmployeeService;
import com.jeesite.modules.sys.service.UserService;
import com.jeesite.modules.sys.utils.EmpUtils;
import com.jeesite.modules.sys.utils.UserUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.PostConstruct;
import javax.validation.ConstraintViolation;
import javax.validation.ConstraintViolationException;
import java.util.List;
/**
* 员工管理Service
* @author ThinkGem
* @version 2017-03-25
*/
@Transactional(readOnly=true)
public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
implements EmpUserService{
@@ -52,8 +55,8 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
*/
@PostConstruct
private void corpModelValid() throws Exception{
if (!Global.isUseCorpModel().equals(Global.getPropertyToBoolean("user.useCorpModel", "false"))){
throw new Exception("\n\nuser.useCorpModel=true? 你开启了多租户模式,乎你的当前版本不是JeeSite专业版。\n");
if (Global.isUseCorpModel() != Global.getPropertyToBoolean("user.useCorpModel", "false")){
throw new Exception("\n\nuser.useCorpModel=true? 你开启了多租户模式,乎你的当前版本不是JeeSite专业版。\n");
}
}
@@ -91,7 +94,6 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
/**
* 查询全部用户,仅返回基本信息
*/
@Override
public List<EmpUser> findUserList(EmpUser empUser){
return dao.findUserList(empUser);
}
@@ -99,7 +101,6 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
/**
* 根据部门编码查询用户,仅返回基本信息
*/
@Override
public List<EmpUser> findUserListByOfficeCodes(EmpUser empUser){
return dao.findUserListByOfficeCodes(empUser);
}
@@ -107,7 +108,6 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
/**
* 根据角色编码查询用户,仅返回基本信息
*/
@Override
public List<EmpUser> findUserListByRoleCodes(EmpUser empUser){
return dao.findUserListByRoleCodes(empUser);
}
@@ -115,7 +115,6 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
/**
* 根据岗位编码查询用户,仅返回基本信息
*/
@Override
public List<EmpUser> findUserListByPostCodes(EmpUser empUser){
return dao.findUserListByPostCodes(empUser);
}
@@ -124,7 +123,7 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
* 保存用户员工
*/
@Override
@Transactional
@Transactional(readOnly=false)
public void save(EmpUser user) {
// 1、初始化用户信息
if (user.getIsNewRecord()){
@@ -171,8 +170,7 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
* @param file 导入的用户数据文件
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据
*/
@Override
@Transactional
@Transactional(readOnly=false)
public String importData(MultipartFile file, Boolean isUpdateSupport) {
if (file == null){
throw new ServiceException(text("请选择导入的数据文件!"));
@@ -243,7 +241,7 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
* 更新状态
*/
@Override
@Transactional
@Transactional(readOnly=false)
public void updateStatus(EmpUser empUser) {
userService.updateStatus(empUser);
employeeService.updateStatus(empUser.getEmployee());
@@ -253,7 +251,7 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
* 删除用户
*/
@Override
@Transactional
@Transactional(readOnly=false)
public void delete(EmpUser empUser) {
userService.delete(empUser);
employeeService.delete(empUser.getEmployee());

View File

@@ -25,6 +25,7 @@ import com.jeesite.modules.sys.service.EmployeeService;
* @author ThinkGem
* @version 2017-03-25
*/
@Transactional(readOnly=true)
public class EmployeeServiceSupport extends CrudService<EmployeeDao, Employee>
implements EmployeeService{
@@ -63,7 +64,7 @@ public class EmployeeServiceSupport extends CrudService<EmployeeDao, Employee>
* 保存数据(插入或更新)
*/
@Override
@Transactional
@Transactional(readOnly=false)
public void save(Employee employee) {
if (employee.getIsNewRecord()){
if (dao.get(employee) != null){
@@ -87,7 +88,7 @@ public class EmployeeServiceSupport extends CrudService<EmployeeDao, Employee>
* 删除数据
*/
@Override
@Transactional
@Transactional(readOnly=false)
public void delete(Employee employee) {
super.delete(employee);
}
@@ -95,8 +96,7 @@ public class EmployeeServiceSupport extends CrudService<EmployeeDao, Employee>
/**
* 查询当前员工关联的岗位信息
*/
@Override
public List<EmployeePost> findEmployeePostList(Employee employee){
public List<EmployeePost> findEmployeePostList(Employee employee){
EmployeePost employeePost = new EmployeePost();
employeePost.setEmpCode(employee.getEmpCode());
return employeePostDao.findList(employeePost);
@@ -105,7 +105,6 @@ public class EmployeeServiceSupport extends CrudService<EmployeeDao, Employee>
/**
* 查询当前员工关联的附属机构信息
*/
@Override
public List<EmployeeOffice> findEmployeeOfficeList(Employee employee){
EmployeeOffice employeeOffice = new EmployeeOffice();
employeeOffice.setEmpCode(employee.getEmpCode());

View File

@@ -18,6 +18,7 @@ import com.jeesite.modules.sys.service.LogService;
* @author ThinkGem
* @version 2014-05-16
*/
@Transactional(readOnly=true)
public class LogServiceSupport extends CrudService<LogDao, Log>
implements LogService{
@@ -43,8 +44,7 @@ public class LogServiceSupport extends CrudService<LogDao, Log>
/**
* 不使用数据库事务,执行插入日志
*/
@Override
@Transactional//(propagation=Propagation.NOT_SUPPORTED)
@Transactional(readOnly=false)//, propagation=Propagation.NOT_SUPPORTED)
public void insertLog(Log entity) {
DataSourceHolder.setJdbcTransaction(false);
dao.insert(entity);

View File

@@ -29,6 +29,7 @@ import com.jeesite.modules.sys.utils.EmpUtils;
* @author ThinkGem
* @version 2016-4-23
*/
@Transactional(readOnly=true)
public class OfficeServiceSupport extends TreeService<OfficeDao, Office>
implements OfficeService{
@@ -64,7 +65,7 @@ public class OfficeServiceSupport extends TreeService<OfficeDao, Office>
* 保存数据(插入或更新)
*/
@Override
@Transactional
@Transactional(readOnly=false)
public void save(Office office) {
if (office.getIsNewRecord()){
// 生成主键,并验证改主键是否存在,如存在则抛出验证信息
@@ -82,8 +83,7 @@ public class OfficeServiceSupport extends TreeService<OfficeDao, Office>
* @param file 导入的机构数据文件
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据
*/
@Override
@Transactional
@Transactional(readOnly=false)
public String importData(MultipartFile file, Boolean isUpdateSupport) {
if (file == null){
throw new ServiceException(text("请选择导入的数据文件!"));
@@ -145,7 +145,7 @@ public class OfficeServiceSupport extends TreeService<OfficeDao, Office>
* 更新部门状态
*/
@Override
@Transactional
@Transactional(readOnly=false)
public void updateStatus(Office office) {
super.updateStatus(office);
// 清理部门相关缓存
@@ -156,7 +156,7 @@ public class OfficeServiceSupport extends TreeService<OfficeDao, Office>
* 删除数据
*/
@Override
@Transactional
@Transactional(readOnly=false)
public void delete(Office office) {
super.delete(office);
// 清理部门相关缓存

View File

@@ -17,6 +17,7 @@ import com.jeesite.modules.sys.service.PostService;
* @author ThinkGem
* @version 2017-03-25
*/
@Transactional(readOnly=true)
public class PostServiceSupport extends CrudService<PostDao, Post>
implements PostService{
@@ -31,8 +32,7 @@ public class PostServiceSupport extends CrudService<PostDao, Post>
/**
* 根据名称查询岗位
*/
@Override
public Post getByPostName(Post post) {
public Post getByPostName(Post post) {
Post where = new Post();
where.setPostName(post.getPostName());
return dao.getByEntity(where);
@@ -50,7 +50,7 @@ public class PostServiceSupport extends CrudService<PostDao, Post>
* 保存岗位
*/
@Override
@Transactional
@Transactional(readOnly=false)
public void save(Post post) {
super.save(post);
}
@@ -59,7 +59,7 @@ public class PostServiceSupport extends CrudService<PostDao, Post>
* 更新岗位状态
*/
@Override
@Transactional
@Transactional(readOnly=false)
public void updateStatus(Post post) {
super.updateStatus(post);
}
@@ -68,7 +68,7 @@ public class PostServiceSupport extends CrudService<PostDao, Post>
* 删除岗位
*/
@Override
@Transactional
@Transactional(readOnly=false)
public void delete(Post post) {
super.delete(post);
}

View File

@@ -55,11 +55,7 @@ public class EmpUtils {
*/
public static Employee get(User user){
if (user != null && User.USER_TYPE_EMPLOYEE.equals(user.getUserType())){
Employee employee = user.getRefObj();
if (employee == null) {
employee = Static.employeeService.get(user.getRefCode());
}
return employee;
return user.getRefObj();
}
return null;
}

View File

@@ -48,6 +48,7 @@ import io.netty.util.concurrent.DefaultThreadFactory;
*/
public class LogUtils {
// 采用线程池优化性能
private static ExecutorService logThreadPool = new ThreadPoolExecutor(5, 20,
60L, TimeUnit.SECONDS, new LinkedBlockingQueue<>(),
new DefaultThreadFactory("log-save"));

View File

@@ -344,11 +344,12 @@ public class LoginController extends BaseController{
/**
* 切换主题风格
*/
//@RequiresPermissions("user")
@RequiresPermissions("user")
@RequestMapping(value = "switchSkin/{skinName}")
public String switchSkin(@PathVariable String skinName, HttpServletRequest request, HttpServletResponse response) {
LoginInfo loginInfo = UserUtils.getLoginInfo();
if (StringUtils.isNotBlank(skinName) && !"select".equals(skinName)){
CookieUtils.setCookie(response, "skinName", skinName);
CookieUtils.setCookie(response, "skinName_" + loginInfo.getId(), skinName);
return REDIRECT + adminPath + "/index";
}
return "modules/sys/switchSkin";

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