Compare commits
125 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1ee1722be5 | ||
|
|
ffad5e5e18 | ||
|
|
768d8a1c47 | ||
|
|
45fde1ef66 | ||
|
|
414bad08d5 | ||
|
|
09ff1c68b0 | ||
|
|
6529dd10b2 | ||
|
|
9ce3eb94fa | ||
|
|
83de9b91c0 | ||
|
|
3f2f00b6f6 | ||
|
|
6beec711b6 | ||
|
|
0352fff7e6 | ||
|
|
9dc99927b3 | ||
|
|
d7d5ef01ed | ||
|
|
53abddef44 | ||
|
|
fe17f43f3a | ||
|
|
4090a655e9 | ||
|
|
a660a8e912 | ||
|
|
22e1a6d7ea | ||
|
|
2abe3348fb | ||
|
|
8d7c499321 | ||
|
|
7ad0379066 | ||
|
|
da5dbdf23b | ||
|
|
4866a13365 | ||
|
|
9d4f849371 | ||
|
|
5dd679eb24 | ||
|
|
f788cb7e78 | ||
|
|
9ec99230ad | ||
|
|
9c390d7cb1 | ||
|
|
28aef61cea | ||
|
|
15ae96b04a | ||
|
|
a8764cf247 | ||
|
|
e5842b42f4 | ||
|
|
4d7a40d30f | ||
|
|
fe18621aa9 | ||
|
|
a029e6d56a | ||
|
|
73f64ca648 | ||
|
|
63e3bd03b4 | ||
|
|
4103bf1d6a | ||
|
|
7a33736d43 | ||
|
|
298d1adbba | ||
|
|
9be2959d7d | ||
|
|
0fad02369b | ||
|
|
548a747e19 | ||
|
|
e2101b438f | ||
|
|
bbcb4b937d | ||
|
|
bcde73efed | ||
|
|
a6ddb4ed16 | ||
|
|
59fbee7a2f | ||
|
|
4ff93c1553 | ||
|
|
e00dda642a | ||
|
|
60971ac312 | ||
|
|
6bcd2a28c4 | ||
|
|
4a6c15d56a | ||
|
|
35ad27a702 | ||
|
|
97351bc3df | ||
|
|
4015073943 | ||
|
|
bdcabc1281 | ||
|
|
e0a653a1df | ||
|
|
ea851e4c72 | ||
|
|
ee8ec1dd3d | ||
|
|
34e326aff6 | ||
|
|
e9864f0270 | ||
|
|
69a6c77cf0 | ||
|
|
da1b45b9f2 | ||
|
|
8062f0273d | ||
|
|
a656de1601 | ||
|
|
9ccde22b15 | ||
|
|
8951a3f07f | ||
|
|
a4f9c5332c | ||
|
|
91319555f6 | ||
|
|
51cbd7b945 | ||
|
|
8c6cc33a09 | ||
|
|
c11de8fc8e | ||
|
|
b4bddb3246 | ||
|
|
b925cd71a1 | ||
|
|
a38894ab63 | ||
|
|
718510a795 | ||
|
|
c248f1ec04 | ||
|
|
9c640a6433 | ||
|
|
a65abc3457 | ||
|
|
559733bb61 | ||
|
|
9b702b0297 | ||
|
|
5f3f2009a2 | ||
|
|
b4ddab035a | ||
|
|
986ff8befe | ||
|
|
071aa747c8 | ||
|
|
03592947d4 | ||
|
|
6443d6b409 | ||
|
|
13a38aea97 | ||
|
|
6861ba125e | ||
|
|
07905c1e82 | ||
|
|
f454f252dc | ||
|
|
3f429e96f6 | ||
|
|
0fb1e9dab9 | ||
|
|
24007dd6b1 | ||
|
|
5c4a6257f3 | ||
|
|
c5f1feafae | ||
|
|
2633d6b06d | ||
|
|
79a002684e | ||
|
|
8ad30622a9 | ||
|
|
21bf3bc06c | ||
|
|
554e9cea74 | ||
|
|
2e3de8a7dd | ||
|
|
17b4d2ad90 | ||
|
|
c98de5cea9 | ||
|
|
d4d0dbc408 | ||
|
|
b9c3d3d0c6 | ||
|
|
ed91d35624 | ||
|
|
76e77fcdb2 | ||
|
|
a4f2a370e3 | ||
|
|
b98af679d1 | ||
|
|
1e29444854 | ||
|
|
a892da8369 | ||
|
|
8ed7e4c4e7 | ||
|
|
f5fe75ea69 | ||
|
|
50b5334214 | ||
|
|
998943ddc3 | ||
|
|
d2f3597a3b | ||
|
|
f4019907b5 | ||
|
|
dd41a04b10 | ||
|
|
87e8352418 | ||
|
|
41da9ef5cb | ||
|
|
09fe0921a6 | ||
|
|
aaf969187d |
18
LICENSE
18
LICENSE
@@ -211,21 +211,13 @@
|
||||
更不要,全局替换源代码中的 jeesite 或 ThinkGem 等字样,否则你将违反本协议条款承担责任。
|
||||
4. 您若套用本软件的一些代码或功能参考,请保留源文件中的版权和作者,需要在您的软件介绍明显位置
|
||||
说明出处,举例:本软件基于 JeeSite 快速开发平台,并附带链接:http://jeesite.com
|
||||
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. 本项目已申请软件著作权,请尊重开源,感谢阅读。
|
||||
5. 任何基于本软件而产生的一切法律纠纷和责任,均于我司无关。
|
||||
6. 如果你对本软件有改进,希望可以贡献给我们,共同进步。
|
||||
7. 本项目已申请软件著作权,请尊重开源,感谢阅读。
|
||||
8. 本版本无用户数限制,无在线人数限制。
|
||||
|
||||
版权所有:济南卓源软件有限公司
|
||||
|
||||
官方网址:http://jeesite.com
|
||||
|
||||
技术服务:http://s.jeesite.com
|
||||
联系我们:http://s.jeesite.com
|
||||
|
||||
100
README.md
100
README.md
@@ -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.3" src="https://img.shields.io/badge/JeeSite-V4.3-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://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://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,7 +41,9 @@ JeeSite 功能全,知识点非常多,也非常少。因为她使用的都是
|
||||
|
||||
JeeSite 是一个低代码开发平台,具有较高的封装度、扩展性,封装不是限制你去做一些事情,而是在便捷的同时,也具有较好的扩展性,在不具备一些功能的情况下,JeeSite 提供了扩展接口,提供了原生调用方法。
|
||||
|
||||
大家都在用 Spring,也在学习 Spring 的优点,Spring 提供了较好的扩展性,可又有多少人去修改它的源代码呢,退一步说,大家去修改了 Spring 的源码,反而会对未来升级造成很大困扰,您说不是呢?这样的例子很多,所以不要纠结,我们非常注重着一块,JeeSite 也一样具备强大的扩展性。
|
||||
大家都在用 Spring,也在学习 Spring 的优点,Spring 提供了较好的扩展性,可又有多少人去修改它的源代码呢,退一步说,大家去修改了 Spring 的源码,反而会对未来升级造成很大困扰,您说不是呢?这样的例子很多,所以不要纠结,我们非常注重这一点,JeeSite 也一样具备强大的扩展性。
|
||||
|
||||
为什么说 JeeSite 比较易于学习?JeeSite 很好的把握了设计的 “度”,避免过度设计的情况。过度设计是在产品设计过程中忽略了产品和用户的实际需求,反而带来了不必要的复杂性,而忽略了系统的学习、开发和维护成本。
|
||||
|
||||
* 至今 JeeSite 平台架构已经非常稳定。
|
||||
* JeeSite 精益求精,用心打磨每一个细节。
|
||||
@@ -51,14 +53,16 @@ JeeSite 是一个低代码开发平台,具有较高的封装度、扩展性,
|
||||
|
||||
## 技术选型
|
||||
|
||||
* 主框架:Spring Boot 2.5、Spring Framework 5.3、Apache Shiro 1.8、J2Cache
|
||||
* 主框架:Spring Boot 2.7、Spring Framework 5.3、Apache Shiro 1.11、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
|
||||
* 支持 IE9 及以上版本及其他所有现代浏览器,如:谷歌浏览器、火狐浏览器、国产浏览器 等
|
||||
* 分离前端版:Node.js、TypeScript、Vue3、Vite、Ant Design Vue、Vue Vben Admin
|
||||
* 工作流引擎:Flowable 6.6、符合 BPMN 规范、在线流程设计器、中国式流程、退回、撤回、自由流
|
||||
* Bootstrap 版 支持 IE9 及以上版本及其他所有现代浏览器,如:谷歌、火狐、国产浏览器 等
|
||||
* Vue3 版 支持现代浏览器,如:谷歌 Chrome 86+、火狐、国产浏览器 等
|
||||
* 技术选型(详细):<http://jeesite.com/docs/technology/>
|
||||
* JeeSite Vue:<http://jeesite.com/docs/jeesite-vue/>
|
||||
* JeeSite Vue:<https://gitee.com/thinkgem/jeesite-vue>
|
||||
|
||||
## 更多介绍
|
||||
|
||||
@@ -70,31 +74,43 @@ JeeSite 是一个低代码开发平台,具有较高的封装度、扩展性,
|
||||
|
||||
## 生态系统
|
||||
|
||||
* 分布式微服务系统(Spring Cloud):<https://gitee.com/thinkgem/jeesite4-cloud>
|
||||
* 分布式微服务(Spring Cloud):<https://gitee.com/thinkgem/jeesite4-cloud>
|
||||
* Flowable业务流程引擎(BPM):<http://jeesite.com/docs/bpm/>
|
||||
* JFlow工作流引擎:<https://gitee.com/thinkgem/jeesite4-jflow> :<http://ccflow.org>
|
||||
* Flowable业务流程模块(BPM):<http://jeesite.com/docs/bpm/>
|
||||
* 内容管理模块(CMS):<https://gitee.com/thinkgem/jeesite4-cms>
|
||||
* 内容管理模块(CMS):<https://gitee.com/thinkgem/jeesite4/tree/v5.3/modules/cms>
|
||||
* 手机端移动端:<https://gitee.com/thinkgem/jeesite4-uniapp>
|
||||
* Vue3分离版本:<http://jeesite.com/docs/jeesite-vue/>
|
||||
* PC客户端程序:<https://gitee.com/thinkgem/jeesite-client>
|
||||
* Vue3分离版本:<https://gitee.com/thinkgem/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. 执行命令:`git clone https://gitee.com/thinkgem/jeesite4.git` 下载源码(master分支)
|
||||
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> 并解压
|
||||
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/>
|
||||
@@ -105,35 +121,52 @@ JeeSite 是一个低代码开发平台,具有较高的封装度、扩展性,
|
||||
* 菜单和按钮权限:<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/tree-table-use/>
|
||||
* 单点登录:<https://jeesite.com/docs/sso-cas/>
|
||||
* 国际化:<https://jeesite.com/docs/i18n-locale/>
|
||||
* 对象存储:<https://jeesite.com/docs/oss-client/>
|
||||
* 文件在线预览:<https://jeesite.com/docs/filepreview/>
|
||||
* 报表设计器:<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/sso-cas/>
|
||||
* 在线任务调度:<https://jeesite.com/docs/job/>
|
||||
* 对象存储:<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/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/>
|
||||
* 分布式事务 LCN:<https://jeesite.com/docs/springcloud-lcn/>
|
||||
* Spring Cloud 微服务:<https://jeesite.com/docs/springcloud/>
|
||||
* 分布式事务 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/>
|
||||
|
||||
## 授权协议声明
|
||||
|
||||
@@ -144,15 +177,14 @@ JeeSite 是一个低代码开发平台,具有较高的封装度、扩展性,
|
||||
更不要,全局替换源代码中的 jeesite 或 ThinkGem 等字样,否则你将违反本协议条款承担责任。
|
||||
4. 您若套用本软件的一些代码或功能参考,请保留源文件中的版权和作者,需要在您的软件介绍明显位置
|
||||
说明出处,举例:本软件基于 JeeSite 快速开发平台,并附带链接:http://jeesite.com
|
||||
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. 本项目已申请软件著作权,请尊重开源,感谢阅读。
|
||||
5. 任何基于本软件而产生的一切法律纠纷和责任,均于我司无关。
|
||||
6. 如果你对本软件有改进,希望可以贡献给我们,共同进步。
|
||||
7. 本项目已申请软件著作权,请尊重开源,感谢阅读。
|
||||
8. 本版本无用户数限制,无在线人数限制。
|
||||
|
||||
## 技术服务与支持
|
||||
|
||||
* 没有资金的支撑就很难得到发展,特别是一个好的产品,如果 JeeSite 帮助了您,请为我们点赞。支持我们,您可以得到一些回报,有了这些我们会把公益事业做的更好,回报社区和社会,请给我们一些动力吧,在此非常感谢已支持我们的朋友!
|
||||
* 没有资金的支撑就很难得到发展,特别是一个好的产品,如果 JeeSite 帮助了您,请为我们点赞。支持我们,您可以获得更多回馈,我们会把公益事业做的更好,开放更多资源,回报社区和社会。请给我们一些动力吧,在此非常感谢已支持我们的朋友!
|
||||
* **联系我们**:请访问技术支持服务页面:<https://jeesite.com/docs/support/>
|
||||
|
||||
## 今后如何升级?
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-parent</artifactId>
|
||||
<version>4.4.0-SNAPSHOT</version>
|
||||
<version>4.7.0-SNAPSHOT</version>
|
||||
<relativePath>../parent/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,17 +17,25 @@
|
||||
<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>
|
||||
@@ -37,28 +45,11 @@
|
||||
<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>
|
||||
@@ -88,23 +79,6 @@
|
||||
<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>
|
||||
@@ -123,13 +97,6 @@
|
||||
<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>
|
||||
@@ -227,11 +194,6 @@
|
||||
<artifactId>poi-ooxml</artifactId>
|
||||
<version>${poi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml-schemas</artifactId>
|
||||
<version>${poi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-scratchpad</artifactId>
|
||||
@@ -294,19 +256,9 @@
|
||||
<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>
|
||||
|
||||
@@ -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 && !firstKey.equals("")) {
|
||||
if (firstKey != null && !"".equals(firstKey)) {
|
||||
firstKeyBt = getKeyBytes(firstKey);
|
||||
firstLength = firstKeyBt.size();
|
||||
}
|
||||
if (secondKey != null && !secondKey.equals("")) {
|
||||
if (secondKey != null && !"".equals(secondKey)) {
|
||||
secondKeyBt = getKeyBytes(secondKey);
|
||||
secondLength = secondKeyBt.size();
|
||||
}
|
||||
if (thirdKey != null && !thirdKey.equals("")) {
|
||||
if (thirdKey != null && !"".equals(thirdKey)) {
|
||||
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 && !firstKey.equals("") && secondKey != null && !secondKey.equals("") && thirdKey != null && !firstKey.equals("")) {
|
||||
if (firstKey != null && !"".equals(firstKey) && secondKey != null && !"".equals(secondKey) && thirdKey != null && !"".equals(firstKey)) {
|
||||
int[] tempBt;
|
||||
int x, y, z;
|
||||
tempBt = bt;
|
||||
@@ -106,7 +106,7 @@ public class DesUtils {
|
||||
}
|
||||
encByte = tempBt;
|
||||
} else {
|
||||
if (firstKey != null && !firstKey.equals("") && secondKey != null && !secondKey.equals("")) {
|
||||
if (firstKey != null && !"".equals(firstKey) && secondKey != null && !"".equals(secondKey)) {
|
||||
int[] tempBt;
|
||||
int x, y;
|
||||
tempBt = bt;
|
||||
@@ -118,7 +118,7 @@ public class DesUtils {
|
||||
}
|
||||
encByte = tempBt;
|
||||
} else {
|
||||
if (firstKey != null && !firstKey.equals("")) {
|
||||
if (firstKey != null && !"".equals(firstKey)) {
|
||||
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 && !firstKey.equals("") && secondKey != null && !secondKey.equals("") && thirdKey != null && !thirdKey.equals("")) {
|
||||
if (firstKey != null && !"".equals(firstKey) && secondKey != null && !"".equals(secondKey) && thirdKey != null && !"".equals(thirdKey)) {
|
||||
int[] tempBt;
|
||||
int x, y, z;
|
||||
tempBt = tempByte;
|
||||
@@ -153,7 +153,7 @@ public class DesUtils {
|
||||
}
|
||||
encByte = tempBt;
|
||||
} else {
|
||||
if (firstKey != null && !firstKey.equals("") && secondKey != null && !secondKey.equals("")) {
|
||||
if (firstKey != null && !"".equals(firstKey) && secondKey != null && !"".equals(secondKey)) {
|
||||
int[] tempBt;
|
||||
int x, y;
|
||||
tempBt = tempByte;
|
||||
@@ -165,7 +165,7 @@ public class DesUtils {
|
||||
}
|
||||
encByte = tempBt;
|
||||
} else {
|
||||
if (firstKey != null && !firstKey.equals("")) {
|
||||
if (firstKey != null && !"".equals(firstKey)) {
|
||||
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 && !firstKey.equals("") && secondKey != null && !secondKey.equals("") && thirdKey != null && !thirdKey.equals("")) {
|
||||
if (firstKey != null && !"".equals(firstKey) && secondKey != null && !"".equals(secondKey) && thirdKey != null && !"".equals(thirdKey)) {
|
||||
int[] tempBt;
|
||||
int x, y, z;
|
||||
tempBt = tempByte;
|
||||
@@ -197,7 +197,7 @@ public class DesUtils {
|
||||
}
|
||||
encByte = tempBt;
|
||||
} else {
|
||||
if (firstKey != null && !firstKey.equals("") && secondKey != null && !secondKey.equals("")) {
|
||||
if (firstKey != null && !"".equals(firstKey) && secondKey != null && !"".equals(secondKey)) {
|
||||
int[] tempBt;
|
||||
int x, y;
|
||||
tempBt = tempByte;
|
||||
@@ -209,7 +209,7 @@ public class DesUtils {
|
||||
}
|
||||
encByte = tempBt;
|
||||
} else {
|
||||
if (firstKey != null && !firstKey.equals("")) {
|
||||
if (firstKey != null && !"".equals(firstKey)) {
|
||||
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 && !firstKey.equals("")) {
|
||||
if (firstKey != null && !"".equals(firstKey)) {
|
||||
firstKeyBt = getKeyBytes(firstKey);
|
||||
firstLength = firstKeyBt.size();
|
||||
}
|
||||
if (secondKey != null && !secondKey.equals("")) {
|
||||
if (secondKey != null && !"".equals(secondKey)) {
|
||||
secondKeyBt = getKeyBytes(secondKey);
|
||||
secondLength = secondKeyBt.size();
|
||||
}
|
||||
if (thirdKey != null && !thirdKey.equals("")) {
|
||||
if (thirdKey != null && !"".equals(thirdKey)) {
|
||||
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 && !firstKey.equals("") && secondKey != null && !secondKey.equals("") && thirdKey != null && !thirdKey.equals("")) {
|
||||
if (firstKey != null && !"".equals(firstKey) && secondKey != null && !"".equals(secondKey) && thirdKey != null && !"".equals(thirdKey)) {
|
||||
int[] tempBt;
|
||||
int x, y, z;
|
||||
tempBt = intByte;
|
||||
@@ -276,7 +276,7 @@ public class DesUtils {
|
||||
}
|
||||
decByte = tempBt;
|
||||
} else {
|
||||
if (firstKey != null && !firstKey.equals("") && secondKey != null && !secondKey.equals("")) {
|
||||
if (firstKey != null && !"".equals(firstKey) && secondKey != null && !"".equals(secondKey)) {
|
||||
int[] tempBt;
|
||||
int x, y, z;
|
||||
tempBt = intByte;
|
||||
@@ -288,7 +288,7 @@ public class DesUtils {
|
||||
}
|
||||
decByte = tempBt;
|
||||
} else {
|
||||
if (firstKey != null && !firstKey.equals("")) {
|
||||
if (firstKey != null && !"".equals(firstKey)) {
|
||||
int[] tempBt;
|
||||
int x, y, z;
|
||||
tempBt = intByte;
|
||||
@@ -382,37 +382,37 @@ public class DesUtils {
|
||||
*/
|
||||
public String bt4ToHex(String binary) {
|
||||
String hex = "";
|
||||
if (binary.equalsIgnoreCase("0000")) {
|
||||
if ("0000".equalsIgnoreCase(binary)) {
|
||||
hex = "0";
|
||||
} else if (binary.equalsIgnoreCase("0001")) {
|
||||
} else if ("0001".equalsIgnoreCase(binary)) {
|
||||
hex = "1";
|
||||
} else if (binary.equalsIgnoreCase("0010")) {
|
||||
} else if ("0010".equalsIgnoreCase(binary)) {
|
||||
hex = "2";
|
||||
} else if (binary.equalsIgnoreCase("0011")) {
|
||||
} else if ("0011".equalsIgnoreCase(binary)) {
|
||||
hex = "3";
|
||||
} else if (binary.equalsIgnoreCase("0100")) {
|
||||
} else if ("0100".equalsIgnoreCase(binary)) {
|
||||
hex = "4";
|
||||
} else if (binary.equalsIgnoreCase("0101")) {
|
||||
} else if ("0101".equalsIgnoreCase(binary)) {
|
||||
hex = "5";
|
||||
} else if (binary.equalsIgnoreCase("0110")) {
|
||||
} else if ("0110".equalsIgnoreCase(binary)) {
|
||||
hex = "6";
|
||||
} else if (binary.equalsIgnoreCase("0111")) {
|
||||
} else if ("0111".equalsIgnoreCase(binary)) {
|
||||
hex = "7";
|
||||
} else if (binary.equalsIgnoreCase("1000")) {
|
||||
} else if ("1000".equalsIgnoreCase(binary)) {
|
||||
hex = "8";
|
||||
} else if (binary.equalsIgnoreCase("1001")) {
|
||||
} else if ("1001".equalsIgnoreCase(binary)) {
|
||||
hex = "9";
|
||||
} else if (binary.equalsIgnoreCase("1010")) {
|
||||
} else if ("1010".equalsIgnoreCase(binary)) {
|
||||
hex = "A";
|
||||
} else if (binary.equalsIgnoreCase("1011")) {
|
||||
} else if ("1011".equalsIgnoreCase(binary)) {
|
||||
hex = "B";
|
||||
} else if (binary.equalsIgnoreCase("1100")) {
|
||||
} else if ("1100".equalsIgnoreCase(binary)) {
|
||||
hex = "C";
|
||||
} else if (binary.equalsIgnoreCase("1101")) {
|
||||
} else if ("1101".equalsIgnoreCase(binary)) {
|
||||
hex = "D";
|
||||
} else if (binary.equalsIgnoreCase("1110")) {
|
||||
} else if ("1110".equalsIgnoreCase(binary)) {
|
||||
hex = "E";
|
||||
} else if (binary.equalsIgnoreCase("1111")) {
|
||||
} else if ("1111".equalsIgnoreCase(binary)) {
|
||||
hex = "F";
|
||||
}
|
||||
|
||||
@@ -426,51 +426,51 @@ public class DesUtils {
|
||||
*/
|
||||
public String hexToBt4(String hex) {
|
||||
String binary = "";
|
||||
if (hex.equalsIgnoreCase("0")) {
|
||||
if ("0".equalsIgnoreCase(hex)) {
|
||||
binary = "0000";
|
||||
} else if (hex.equalsIgnoreCase("1")) {
|
||||
} else if ("1".equalsIgnoreCase(hex)) {
|
||||
binary = "0001";
|
||||
}
|
||||
if (hex.equalsIgnoreCase("2")) {
|
||||
if ("2".equalsIgnoreCase(hex)) {
|
||||
binary = "0010";
|
||||
}
|
||||
if (hex.equalsIgnoreCase("3")) {
|
||||
if ("3".equalsIgnoreCase(hex)) {
|
||||
binary = "0011";
|
||||
}
|
||||
if (hex.equalsIgnoreCase("4")) {
|
||||
if ("4".equalsIgnoreCase(hex)) {
|
||||
binary = "0100";
|
||||
}
|
||||
if (hex.equalsIgnoreCase("5")) {
|
||||
if ("5".equalsIgnoreCase(hex)) {
|
||||
binary = "0101";
|
||||
}
|
||||
if (hex.equalsIgnoreCase("6")) {
|
||||
if ("6".equalsIgnoreCase(hex)) {
|
||||
binary = "0110";
|
||||
}
|
||||
if (hex.equalsIgnoreCase("7")) {
|
||||
if ("7".equalsIgnoreCase(hex)) {
|
||||
binary = "0111";
|
||||
}
|
||||
if (hex.equalsIgnoreCase("8")) {
|
||||
if ("8".equalsIgnoreCase(hex)) {
|
||||
binary = "1000";
|
||||
}
|
||||
if (hex.equalsIgnoreCase("9")) {
|
||||
if ("9".equalsIgnoreCase(hex)) {
|
||||
binary = "1001";
|
||||
}
|
||||
if (hex.equalsIgnoreCase("A")) {
|
||||
if ("A".equalsIgnoreCase(hex)) {
|
||||
binary = "1010";
|
||||
}
|
||||
if (hex.equalsIgnoreCase("B")) {
|
||||
if ("B".equalsIgnoreCase(hex)) {
|
||||
binary = "1011";
|
||||
}
|
||||
if (hex.equalsIgnoreCase("C")) {
|
||||
if ("C".equalsIgnoreCase(hex)) {
|
||||
binary = "1100";
|
||||
}
|
||||
if (hex.equalsIgnoreCase("D")) {
|
||||
if ("D".equalsIgnoreCase(hex)) {
|
||||
binary = "1101";
|
||||
}
|
||||
if (hex.equalsIgnoreCase("E")) {
|
||||
if ("E".equalsIgnoreCase(hex)) {
|
||||
binary = "1110";
|
||||
}
|
||||
if (hex.equalsIgnoreCase("F")) {
|
||||
if ("F".equalsIgnoreCase(hex)) {
|
||||
binary = "1111";
|
||||
}
|
||||
return binary;
|
||||
|
||||
@@ -4,23 +4,14 @@
|
||||
*/
|
||||
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工具类
|
||||
@@ -346,27 +337,38 @@ 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 && list.size() > 0){
|
||||
if (list == null || pageSize == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
int count = list.size(), pageNo = 1;
|
||||
int totalPage = (count + pageSize - 1) / pageSize;
|
||||
|
||||
while(true){
|
||||
int count = list.size();
|
||||
|
||||
// 执行回调,分页后的数据
|
||||
List<T> pageList = getPageList(list, pageNo, pageSize, totalPage);
|
||||
if (pageList.size() > 0){
|
||||
pageCallback.execute(pageList, pageNo, pageSize, totalPage);
|
||||
}
|
||||
|
||||
// 如果为最后一页,则跳出循环
|
||||
if (pageNo >= totalPage){
|
||||
break;
|
||||
}
|
||||
|
||||
// 页数加一继续下一页
|
||||
pageNo++;
|
||||
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);
|
||||
}
|
||||
|
||||
// 如果为最后一页,则跳出循环
|
||||
if (pageNo >= totalPage){
|
||||
break;
|
||||
}
|
||||
|
||||
// 页数加一继续下一页
|
||||
pageNo++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -655,7 +655,12 @@ public class FileUtils extends org.apache.commons.io.FileUtils {
|
||||
*/
|
||||
public static String getContentType(String fileName) {
|
||||
if (mimetypesFileTypeMap == null){
|
||||
mimetypesFileTypeMap = new MimetypesFileTypeMap();
|
||||
try {
|
||||
mimetypesFileTypeMap = new MimetypesFileTypeMap(ResourceUtils
|
||||
.getResourceFileStream("/META-INF/jeesite.mime.types"));
|
||||
}catch (IOException e) {
|
||||
mimetypesFileTypeMap = new MimetypesFileTypeMap();
|
||||
}
|
||||
}
|
||||
return mimetypesFileTypeMap.getContentType(fileName);
|
||||
}
|
||||
|
||||
@@ -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(ObjectUtils.toString(entry.getKey()),
|
||||
properties.put(getStandardKey(ObjectUtils.toString(entry.getKey())),
|
||||
ObjectUtils.toString(entry.getValue()));
|
||||
}
|
||||
configSet.add(location);
|
||||
@@ -181,7 +181,7 @@ public class PropertiesUtils {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
String value = properties.getProperty(key);
|
||||
String value = properties.getProperty(getStandardKey(key));
|
||||
if (value != null){
|
||||
Matcher m = p1.matcher(value);
|
||||
while(m.find()) {
|
||||
@@ -231,6 +231,30 @@ 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
|
||||
|
||||
@@ -4,11 +4,8 @@
|
||||
*/
|
||||
package com.jeesite.common.io;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
import com.alibaba.fastjson.parser.ParserConfig;
|
||||
import com.jeesite.common.lang.StringUtils;
|
||||
import org.springframework.boot.env.OriginTrackedMapPropertySource;
|
||||
import org.springframework.boot.env.PropertiesPropertySourceLoader;
|
||||
import org.springframework.boot.env.YamlPropertySourceLoader;
|
||||
@@ -16,8 +13,10 @@ import org.springframework.core.Ordered;
|
||||
import org.springframework.core.env.PropertySource;
|
||||
import org.springframework.core.io.Resource;
|
||||
|
||||
import com.alibaba.fastjson.parser.ParserConfig;
|
||||
import com.jeesite.common.lang.StringUtils;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
/**
|
||||
* 配置文件加载(Boot)
|
||||
@@ -40,7 +39,11 @@ public class PropertyLoader implements org.springframework.boot.env.PropertySour
|
||||
List<PropertySource<?>> propertySources = new ArrayList<>();
|
||||
if (!isLoadJeeSitePropertySource) {
|
||||
isLoadJeeSitePropertySource = true;
|
||||
ParserConfig.getGlobalInstance().setSafeMode(true); // 开启 FastJSON 安全模式
|
||||
try {
|
||||
ParserConfig.getGlobalInstance().setSafeMode(true); // 开启 FastJSON 安全模式
|
||||
} catch (Exception ignored) {
|
||||
// 兼容 fastjson2 的调用,不返回异常
|
||||
}
|
||||
Properties properties = PropertiesUtils.getInstance().getProperties();
|
||||
propertySources.add(new OriginTrackedMapPropertySource("jeesite", properties));
|
||||
} else {
|
||||
|
||||
@@ -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());
|
||||
logger.error("serialize: {}", e.getMessage(), e);
|
||||
}
|
||||
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,7 +247,8 @@ public class ObjectUtils extends org.apache.commons.lang3.ObjectUtils {
|
||||
|
||||
private static ThreadLocal<FSTConfiguration> fstConfiguration =
|
||||
new NamedThreadLocal<FSTConfiguration>("FSTConfiguration") {
|
||||
public FSTConfiguration initialValue() {
|
||||
@Override
|
||||
public FSTConfiguration initialValue() {
|
||||
return FSTConfiguration.createDefaultConfiguration();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -1,172 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2005-2012 springside.org.cn
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
*/
|
||||
package com.jeesite.common.mapper;
|
||||
|
||||
import java.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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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.
|
||||
|
||||
@@ -170,7 +170,7 @@ public class VideoUtils {
|
||||
command.add(getFfmpegFile());
|
||||
command.add("-i");
|
||||
command.add(inputFile);
|
||||
if ((imgFileExtension.toLowerCase()).equals("gif")) {
|
||||
if ("gif".equals(imgFileExtension.toLowerCase())) {
|
||||
command.add("-vframes");
|
||||
command.add("30");
|
||||
command.add("-f");
|
||||
|
||||
@@ -20,9 +20,6 @@ public class EmailUtils {
|
||||
|
||||
/**
|
||||
* 发送邮件
|
||||
* @param toAddress 接收地址
|
||||
* @param subject 标题
|
||||
* @param content 内容
|
||||
* @return
|
||||
*/
|
||||
public static boolean send(String toAddress, String subject, String content) {
|
||||
@@ -30,9 +27,23 @@ 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, sslOnConnect, sslSmtpPort, toAddress, subject, content);
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -42,7 +53,7 @@ public class EmailUtils {
|
||||
* @param content 内容
|
||||
* @return
|
||||
*/
|
||||
public static boolean send(String fromAddress, String fromPassword, String fromHostName,
|
||||
public static boolean send(String fromAddress, String fromPassword, String fromHostName, Integer smtpPort,
|
||||
String sslOnConnect, String sslSmtpPort, String toAddress, String subject, String content) {
|
||||
try {
|
||||
HtmlEmail htmlEmail = new HtmlEmail();
|
||||
@@ -50,8 +61,10 @@ public class EmailUtils {
|
||||
htmlEmail.setFrom(fromAddress);
|
||||
// 密码校验
|
||||
htmlEmail.setAuthentication(fromAddress, fromPassword);
|
||||
// 发送服务器协议
|
||||
// 发送服务器主机名
|
||||
htmlEmail.setHostName(fromHostName);
|
||||
// 发送服务器端口
|
||||
htmlEmail.setSmtpPort(smtpPort);
|
||||
|
||||
// SSL
|
||||
if ("true".equals(sslOnConnect)) {
|
||||
|
||||
@@ -2227,7 +2227,7 @@ public class DiffMatchPatch {
|
||||
if (m.group(2).length() == 0) {
|
||||
patch.start1--;
|
||||
patch.length1 = 1;
|
||||
} else if (m.group(2).equals("0")) {
|
||||
} else if ("0".equals(m.group(2))) {
|
||||
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 (m.group(4).equals("0")) {
|
||||
} else if ("0".equals(m.group(4))) {
|
||||
patch.length2 = 0;
|
||||
} else {
|
||||
patch.start2--;
|
||||
|
||||
@@ -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] = ' ';
|
||||
|
||||
@@ -10,15 +10,9 @@ 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;
|
||||
@@ -32,55 +26,33 @@ import com.jeesite.common.ueditor.define.State;
|
||||
public class BinaryUploader {
|
||||
|
||||
public static final State save(HttpServletRequest request,
|
||||
Map<String, Object> conf) {
|
||||
FileItemStream fileStream = null; // 原始上传
|
||||
MultipartFile fileStream2 = null; // Spring MVC 上传
|
||||
boolean isAjaxUpload = request.getHeader("X-Requested-With") != null;
|
||||
|
||||
if (!ServletFileUpload.isMultipartContent(request)) {
|
||||
Map<String, Object> conf) {
|
||||
|
||||
String contentType = request.getContentType();
|
||||
if (!("POST".equals(request.getMethod()) && contentType != null
|
||||
&& contentType.startsWith("multipart/"))) {
|
||||
return new BaseState(false, AppInfo.NOT_MULTIPART_CONTENT);
|
||||
}
|
||||
|
||||
ServletFileUpload upload = new ServletFileUpload(new DiskFileItemFactory());
|
||||
|
||||
if ( isAjaxUpload ) {
|
||||
upload.setHeaderEncoding( EncodeUtils.UTF_8 );
|
||||
}
|
||||
|
||||
try {
|
||||
FileItemIterator iterator = upload.getItemIterator(request);
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
fileStream = iterator.next();
|
||||
|
||||
if (!fileStream.isFormField()) {
|
||||
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;
|
||||
}
|
||||
break;
|
||||
}
|
||||
fileStream = 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) {
|
||||
if (file == null) {
|
||||
return new BaseState(false, AppInfo.NOTFOUND_UPLOAD_DATA);
|
||||
}
|
||||
|
||||
String savePath = (String) conf.get("savePath");
|
||||
String originFileName = fileStream != null ? fileStream.getName() : fileStream2.getOriginalFilename();
|
||||
String originFileName = file.getOriginalFilename();
|
||||
String suffix = FileType.getSuffixByFilename(originFileName);
|
||||
|
||||
originFileName = originFileName.substring(0,
|
||||
@@ -97,29 +69,36 @@ public class BinaryUploader {
|
||||
|
||||
String physicalPath = FileUtils.path((String) conf.get("rootPath") + savePath);
|
||||
|
||||
InputStream is = fileStream != null ? fileStream.openStream() : fileStream2.getInputStream();
|
||||
State storageState = StorageManager.saveFileByInputStream(is, physicalPath, maxSize);
|
||||
is.close();
|
||||
InputStream is = null;
|
||||
State storageState = null;
|
||||
try {
|
||||
is = file.getInputStream();
|
||||
storageState = StorageManager.saveFileByInputStream(is, physicalPath, maxSize);
|
||||
} finally {
|
||||
if (is != null) {
|
||||
is.close();
|
||||
}
|
||||
}
|
||||
|
||||
if (storageState.isSuccess()) {
|
||||
if (storageState != null && 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") {
|
||||
@@ -134,28 +113,26 @@ 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);
|
||||
}
|
||||
@@ -166,5 +143,5 @@ public class BinaryUploader {
|
||||
|
||||
return list.contains(type);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -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 (cardval[2].equals("true")) {
|
||||
if ("true".equals(cardval[2])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -276,10 +276,10 @@ public class IdcardUtils extends StringUtils {
|
||||
info[0] = "台湾";
|
||||
System.out.println("11111");
|
||||
String char2 = idCard.substring(1, 2);
|
||||
if (char2.equals("1")) {
|
||||
if ("1".equals(char2)) {
|
||||
info[1] = "M";
|
||||
System.out.println("MMMMMMM");
|
||||
} else if (char2.equals("2")) {
|
||||
} else if ("2".equals(char2)) {
|
||||
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 (end.toUpperCase().equals("A")) {
|
||||
if ("A".equals(end.toUpperCase())) {
|
||||
sum = sum + 10;
|
||||
} else {
|
||||
sum = sum + Integer.valueOf(end);
|
||||
|
||||
@@ -1,235 +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.common.utils.excel;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.poi.hssf.usermodel.HSSFDateUtil;
|
||||
import org.apache.poi.openxml4j.opc.OPCPackage;
|
||||
import org.apache.poi.xssf.eventusermodel.XSSFReader;
|
||||
import org.apache.poi.xssf.model.SharedStringsTable;
|
||||
import org.apache.poi.xssf.usermodel.XSSFRichTextString;
|
||||
import org.xml.sax.Attributes;
|
||||
import org.xml.sax.InputSource;
|
||||
import org.xml.sax.SAXException;
|
||||
import org.xml.sax.XMLReader;
|
||||
import org.xml.sax.helpers.DefaultHandler;
|
||||
import org.xml.sax.helpers.XMLReaderFactory;
|
||||
|
||||
/**
|
||||
* Excel超大数据读取,抽象Excel2007读取器,excel2007的底层数据结构是xml文件,采用SAX的事件驱动的方法解析
|
||||
* xml,需要继承DefaultHandler,在遇到文件内容时,事件会触发,这种做法可以大大降低 内存的耗费,特别使用于大数据量的文件。
|
||||
* @version 2014-9-2
|
||||
*/
|
||||
public abstract class ExcelReader extends DefaultHandler {
|
||||
|
||||
// 共享字符串表
|
||||
private SharedStringsTable sst;
|
||||
|
||||
// 上一次的内容
|
||||
private String lastContents;
|
||||
private boolean nextIsString;
|
||||
|
||||
private int sheetIndex = -1;
|
||||
private List<String> rowList = new ArrayList<String>();
|
||||
|
||||
// 当前行
|
||||
private int curRow = 0;
|
||||
// 当前列
|
||||
private int curCol = 0;
|
||||
// 日期标志
|
||||
private boolean dateFlag;
|
||||
// 数字标志
|
||||
private boolean numberFlag;
|
||||
|
||||
private boolean isTElement;
|
||||
|
||||
/**
|
||||
* 遍历工作簿中所有的电子表格
|
||||
* @param filename
|
||||
* @throws Exception
|
||||
*/
|
||||
public void process(String filename) throws Exception {
|
||||
OPCPackage pkg = OPCPackage.open(filename);
|
||||
XSSFReader r = new XSSFReader(pkg);
|
||||
SharedStringsTable sst = r.getSharedStringsTable();
|
||||
XMLReader parser = fetchSheetParser(sst);
|
||||
Iterator<InputStream> sheets = r.getSheetsData();
|
||||
while (sheets.hasNext()) {
|
||||
curRow = 0;
|
||||
sheetIndex++;
|
||||
InputStream sheet = sheets.next();
|
||||
InputSource sheetSource = new InputSource(sheet);
|
||||
parser.parse(sheetSource);
|
||||
sheet.close();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 只遍历一个电子表格,其中sheetId为要遍历的sheet索引,从1开始,1-3
|
||||
* @param filename
|
||||
* @param sheetId
|
||||
* @throws Exception
|
||||
*/
|
||||
public void process(String filename, int sheetId) throws Exception {
|
||||
OPCPackage pkg = OPCPackage.open(filename);
|
||||
XSSFReader r = new XSSFReader(pkg);
|
||||
SharedStringsTable sst = r.getSharedStringsTable();
|
||||
XMLReader parser = fetchSheetParser(sst);
|
||||
// 根据 rId# 或 rSheet# 查找sheet
|
||||
InputStream sheet2 = r.getSheet("rId" + sheetId);
|
||||
sheetIndex++;
|
||||
InputSource sheetSource = new InputSource(sheet2);
|
||||
parser.parse(sheetSource);
|
||||
sheet2.close();
|
||||
}
|
||||
|
||||
public XMLReader fetchSheetParser(SharedStringsTable sst)
|
||||
throws SAXException {
|
||||
XMLReader parser = XMLReaderFactory.createXMLReader("org.apache.xerces.parsers.SAXParser");
|
||||
this.sst = sst;
|
||||
parser.setContentHandler(this);
|
||||
return parser;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startElement(String uri, String localName, String name,
|
||||
Attributes attributes) throws SAXException {
|
||||
|
||||
// System.out.println("startElement: " + localName + ", " + name + ", " + attributes);
|
||||
|
||||
// c => 单元格
|
||||
if ("c".equals(name)) {
|
||||
// 如果下一个元素是 SST 的索引,则将nextIsString标记为true
|
||||
String cellType = attributes.getValue("t");
|
||||
if ("s".equals(cellType)) {
|
||||
nextIsString = true;
|
||||
} else {
|
||||
nextIsString = false;
|
||||
}
|
||||
// 日期格式
|
||||
String cellDateType = attributes.getValue("s");
|
||||
if ("1".equals(cellDateType)) {
|
||||
dateFlag = true;
|
||||
} else {
|
||||
dateFlag = false;
|
||||
}
|
||||
String cellNumberType = attributes.getValue("s");
|
||||
if ("2".equals(cellNumberType)) {
|
||||
numberFlag = true;
|
||||
} else {
|
||||
numberFlag = false;
|
||||
}
|
||||
|
||||
}
|
||||
// 当元素为t时
|
||||
if ("t".equals(name)) {
|
||||
isTElement = true;
|
||||
} else {
|
||||
isTElement = false;
|
||||
}
|
||||
|
||||
// 置空
|
||||
lastContents = "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void endElement(String uri, String localName, String name)
|
||||
throws SAXException {
|
||||
|
||||
// System.out.println("endElement: " + localName + ", " + name);
|
||||
|
||||
// 根据SST的索引值的到单元格的真正要存储的字符串
|
||||
// 这时characters()方法可能会被调用多次
|
||||
if (nextIsString) {
|
||||
try {
|
||||
int idx = Integer.parseInt(lastContents);
|
||||
lastContents = new XSSFRichTextString(sst.getEntryAt(idx))
|
||||
.toString();
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
}
|
||||
// t元素也包含字符串
|
||||
if (isTElement) {
|
||||
String value = lastContents.trim();
|
||||
rowList.add(curCol, value);
|
||||
curCol++;
|
||||
isTElement = false;
|
||||
// v => 单元格的值,如果单元格是字符串则v标签的值为该字符串在SST中的索引
|
||||
// 将单元格内容加入rowlist中,在这之前先去掉字符串前后的空白符
|
||||
} else if ("v".equals(name)) {
|
||||
String value = lastContents.trim();
|
||||
value = value.equals("") ? " " : value;
|
||||
try {
|
||||
// 日期格式处理
|
||||
if (dateFlag) {
|
||||
Date date = HSSFDateUtil.getJavaDate(Double.valueOf(value));
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
|
||||
value = dateFormat.format(date);
|
||||
}
|
||||
// 数字类型处理
|
||||
if (numberFlag) {
|
||||
BigDecimal bd = new BigDecimal(value);
|
||||
value = bd.setScale(3, BigDecimal.ROUND_UP).toString();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// 转换失败仍用读出来的值
|
||||
}
|
||||
rowList.add(curCol, value);
|
||||
curCol++;
|
||||
} else {
|
||||
// 如果标签名称为 row ,这说明已到行尾,调用 optRows() 方法
|
||||
if (name.equals("row")) {
|
||||
getRows(sheetIndex + 1, curRow, rowList);
|
||||
rowList.clear();
|
||||
curRow++;
|
||||
curCol = 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void characters(char[] ch, int start, int length)
|
||||
throws SAXException {
|
||||
// 得到单元格内容的值
|
||||
lastContents += new String(ch, start, length);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取行数据回调
|
||||
* @param sheetIndex
|
||||
* @param curRow
|
||||
* @param rowList
|
||||
*/
|
||||
public abstract void getRows(int sheetIndex, int curRow, List<String> rowList);
|
||||
|
||||
// /**
|
||||
// * 测试方法
|
||||
// */
|
||||
// public static void main(String[] args) throws Exception {
|
||||
//
|
||||
// String file = "E:/销售数据导入.xlsx";
|
||||
//
|
||||
// ExcelReader reader = new ExcelReader() {
|
||||
// @Override
|
||||
// public void getRows(int sheetIndex, int curRow, List<String> rowList) {
|
||||
//
|
||||
// System.out.println("Sheet:" + sheetIndex + ", Row:" + curRow + ", Data:" +rowList);
|
||||
//
|
||||
// }
|
||||
// };
|
||||
// reader.process(file, 1);
|
||||
//
|
||||
// }
|
||||
|
||||
}
|
||||
@@ -1,343 +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.common.utils.excel;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.Writer;
|
||||
import java.util.Calendar;
|
||||
import java.util.Enumeration;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipFile;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
import org.apache.poi.hssf.util.CellReference;
|
||||
import org.apache.poi.ss.usermodel.DateUtil;
|
||||
import org.apache.poi.xssf.usermodel.XSSFSheet;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
|
||||
/**
|
||||
* Excel超大数据写入,抽象excel2007读入器,先构建.xlsx一张模板,改写模板中的sheet.xml,
|
||||
* 使用这种方法 写入.xlsx文件,不需要太大的内存
|
||||
* @version 2014-9-2
|
||||
*/
|
||||
public abstract class ExcelWriter {
|
||||
|
||||
private SpreadsheetWriter sw;
|
||||
|
||||
/**
|
||||
* 写入电子表格的主要流程
|
||||
*
|
||||
* @param fileName
|
||||
* @throws Exception
|
||||
*/
|
||||
@SuppressWarnings("resource")
|
||||
public void process(String fileName) throws Exception {
|
||||
|
||||
// 建立工作簿和电子表格对象
|
||||
XSSFWorkbook wb = new XSSFWorkbook();
|
||||
XSSFSheet sheet = wb.createSheet("sheet1");
|
||||
|
||||
// 持有电子表格数据的xml文件名 例如 /xl/worksheets/sheet1.xml
|
||||
String sheetRef = sheet.getPackagePart().getPartName().getName();
|
||||
|
||||
// 保存模板
|
||||
FileOutputStream os = new FileOutputStream("template.xlsx");
|
||||
wb.write(os);
|
||||
os.close();
|
||||
|
||||
// 生成xml文件
|
||||
File tmp = File.createTempFile("sheet", ".xml");
|
||||
Writer fw = new FileWriter(tmp);
|
||||
sw = new SpreadsheetWriter(fw);
|
||||
generate();
|
||||
fw.close();
|
||||
|
||||
// 使用产生的数据替换模板
|
||||
File templateFile = new File("template.xlsx");
|
||||
FileOutputStream out = new FileOutputStream(fileName);
|
||||
substitute(templateFile, tmp, sheetRef.substring(1), out);
|
||||
out.close();
|
||||
// 删除文件之前调用一下垃圾回收器,否则无法删除模板文件
|
||||
System.gc();
|
||||
// 删除临时模板文件
|
||||
if (templateFile.isFile() && templateFile.exists()) {
|
||||
templateFile.delete();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 类使用者应该使用此方法进行写操作
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public abstract void generate() throws Exception;
|
||||
|
||||
public void beginSheet() throws IOException {
|
||||
sw.beginSheet();
|
||||
}
|
||||
|
||||
public void insertRow(int rowNum) throws IOException {
|
||||
sw.insertRow(rowNum);
|
||||
}
|
||||
|
||||
public void createCell(int columnIndex, String value) throws IOException {
|
||||
sw.createCell(columnIndex, value, -1);
|
||||
}
|
||||
|
||||
public void createCell(int columnIndex, double value) throws IOException {
|
||||
sw.createCell(columnIndex, value, -1);
|
||||
}
|
||||
|
||||
public void endRow() throws IOException {
|
||||
sw.endRow();
|
||||
}
|
||||
|
||||
public void endSheet() throws IOException {
|
||||
sw.endSheet();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param zipfile the template file
|
||||
* @param tmpfile the XML file with the sheet data
|
||||
* @param entry the name of the sheet entry to substitute, e.g. xl/worksheets/sheet1.xml
|
||||
* @param out the stream to write the result to
|
||||
*/
|
||||
private static void substitute(File zipfile, File tmpfile, String entry,
|
||||
OutputStream out) throws IOException {
|
||||
ZipFile zip = null;
|
||||
ZipOutputStream zos = null;
|
||||
InputStream is = null;
|
||||
try{
|
||||
zip = new ZipFile(zipfile);
|
||||
zos = new ZipOutputStream(out);
|
||||
@SuppressWarnings("unchecked")
|
||||
Enumeration<ZipEntry> en = (Enumeration<ZipEntry>) zip.entries();
|
||||
while (en.hasMoreElements()) {
|
||||
ZipEntry ze = en.nextElement();
|
||||
if (!ze.getName().equals(entry)) {
|
||||
zos.putNextEntry(new ZipEntry(ze.getName()));
|
||||
InputStream is2 = null;
|
||||
try{
|
||||
is2 = zip.getInputStream(ze);
|
||||
copyStream(is2, zos);
|
||||
}finally {
|
||||
if (is2 != null){
|
||||
is2.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
zos.putNextEntry(new ZipEntry(entry));
|
||||
is = new FileInputStream(tmpfile);
|
||||
copyStream(is, zos);
|
||||
}finally {
|
||||
if (is != null){
|
||||
is.close();
|
||||
}
|
||||
if (zos != null){
|
||||
zos.close();
|
||||
}
|
||||
if (zip != null){
|
||||
zip.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void copyStream(InputStream in, OutputStream out)
|
||||
throws IOException {
|
||||
byte[] chunk = new byte[1024];
|
||||
int count;
|
||||
while ((count = in.read(chunk)) >= 0) {
|
||||
out.write(chunk, 0, count);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 在写入器中写入电子表格
|
||||
*
|
||||
*/
|
||||
public static class SpreadsheetWriter {
|
||||
private final Writer _out;
|
||||
private int _rownum;
|
||||
private static String LINE_SEPARATOR = System
|
||||
.getProperty("line.separator");
|
||||
|
||||
public SpreadsheetWriter(Writer out) {
|
||||
_out = out;
|
||||
}
|
||||
|
||||
public void beginSheet() throws IOException {
|
||||
_out.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
|
||||
+ "<worksheet xmlns=\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\">");
|
||||
_out.write("<sheetData>" + LINE_SEPARATOR);
|
||||
}
|
||||
|
||||
public void endSheet() throws IOException {
|
||||
_out.write("</sheetData>");
|
||||
_out.write("</worksheet>");
|
||||
}
|
||||
|
||||
/**
|
||||
* 插入新行
|
||||
*
|
||||
* @param rownum
|
||||
* 以0开始
|
||||
*/
|
||||
public void insertRow(int rownum) throws IOException {
|
||||
_out.write("<row r=\"" + (rownum + 1) + "\">" + LINE_SEPARATOR);
|
||||
this._rownum = rownum;
|
||||
}
|
||||
|
||||
/**
|
||||
* 插入行结束标志
|
||||
*/
|
||||
public void endRow() throws IOException {
|
||||
_out.write("</row>" + LINE_SEPARATOR);
|
||||
}
|
||||
|
||||
/**
|
||||
* 插入新列
|
||||
*
|
||||
* @param columnIndex
|
||||
* @param value
|
||||
* @param styleIndex
|
||||
* @throws IOException
|
||||
*/
|
||||
public void createCell(int columnIndex, String value, int styleIndex)
|
||||
throws IOException {
|
||||
String ref = new CellReference(_rownum, columnIndex)
|
||||
.formatAsString();
|
||||
_out.write("<c r=\"" + ref + "\" t=\"inlineStr\"");
|
||||
if (styleIndex != -1) {
|
||||
_out.write(" s=\"" + styleIndex + "\"");
|
||||
}
|
||||
_out.write(">");
|
||||
_out.write("<is><t>" + encoderXML(value) + "</t></is>");
|
||||
_out.write("</c>");
|
||||
}
|
||||
|
||||
public void createCell(int columnIndex, String value)
|
||||
throws IOException {
|
||||
createCell(columnIndex, value, -1);
|
||||
}
|
||||
|
||||
public void createCell(int columnIndex, double value, int styleIndex)
|
||||
throws IOException {
|
||||
String ref = new CellReference(_rownum, columnIndex)
|
||||
.formatAsString();
|
||||
_out.write("<c r=\"" + ref + "\" t=\"n\"");
|
||||
if (styleIndex != -1) {
|
||||
_out.write(" s=\"" + styleIndex + "\"");
|
||||
}
|
||||
_out.write(">");
|
||||
_out.write("<v>" + value + "</v>");
|
||||
_out.write("</c>");
|
||||
}
|
||||
|
||||
public void createCell(int columnIndex, double value)
|
||||
throws IOException {
|
||||
createCell(columnIndex, value, -1);
|
||||
}
|
||||
|
||||
public void createCell(int columnIndex, Calendar value, int styleIndex)
|
||||
throws IOException {
|
||||
createCell(columnIndex, DateUtil.getExcelDate(value, false),
|
||||
styleIndex);
|
||||
}
|
||||
}
|
||||
|
||||
// XML Encode
|
||||
private static final String[] xmlCode = new String[256];
|
||||
|
||||
static {
|
||||
// Special characters
|
||||
xmlCode['\''] = "'";
|
||||
xmlCode['\"'] = "\""; // double quote
|
||||
xmlCode['&'] = "&"; // ampersand
|
||||
xmlCode['<'] = "<"; // lower than
|
||||
xmlCode['>'] = ">"; // greater than
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Encode the given text into xml.
|
||||
* </p>
|
||||
*
|
||||
* @param string the text to encode
|
||||
* @return the encoded string
|
||||
*/
|
||||
public static String encoderXML(String string) {
|
||||
if (string == null) {
|
||||
return "";
|
||||
}
|
||||
int n = string.length();
|
||||
char character;
|
||||
String xmlchar;
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
// loop over all the characters of the String.
|
||||
for (int i = 0; i < n; i++) {
|
||||
character = string.charAt(i);
|
||||
// the xmlcode of these characters are added to a StringBuffer
|
||||
// one by one
|
||||
try {
|
||||
xmlchar = xmlCode[character];
|
||||
if (xmlchar == null) {
|
||||
buffer.append(character);
|
||||
} else {
|
||||
buffer.append(xmlCode[character]);
|
||||
}
|
||||
} catch (ArrayIndexOutOfBoundsException aioobe) {
|
||||
buffer.append(character);
|
||||
}
|
||||
}
|
||||
return buffer.toString();
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 测试方法
|
||||
// */
|
||||
// public static void main(String[] args) throws Exception {
|
||||
//
|
||||
// String file = "E:/测试导出数据.xlsx";
|
||||
//
|
||||
// ExcelWriter writer = new ExcelWriter() {
|
||||
// @Override
|
||||
// public void generate() throws Exception {
|
||||
//
|
||||
// // 电子表格开始
|
||||
// this.beginSheet();
|
||||
//
|
||||
// for (int rownum = 0; rownum < 100; rownum++) {
|
||||
// // 插入新行
|
||||
// this.insertRow(rownum);
|
||||
//
|
||||
// // 建立新单元格,索引值从0开始,表示第一列
|
||||
// this.createCell(0, "第 " + rownum + " 行");
|
||||
// this.createCell(1, 34343.123456789);
|
||||
// this.createCell(2, "23.67%");
|
||||
// this.createCell(3, "12:12:23");
|
||||
// this.createCell(4, "2014-10-11 12:12:23");
|
||||
// this.createCell(5, "true");
|
||||
// this.createCell(6, "false");
|
||||
//
|
||||
// // 结束行
|
||||
// this.endRow();
|
||||
// }
|
||||
//
|
||||
// // 电子表格结束
|
||||
// this.endSheet();
|
||||
// }
|
||||
// };
|
||||
// writer.process(file);
|
||||
// }
|
||||
|
||||
}
|
||||
@@ -23,21 +23,24 @@ public class MoneyType implements FieldType {
|
||||
/**
|
||||
* 获取对象值(导入)
|
||||
*/
|
||||
public Object getValue(String val) {
|
||||
@Override
|
||||
public Object getValue(String val) {
|
||||
return val == null ? StringUtils.EMPTY : StringUtils.replace(val, ",", StringUtils.EMPTY);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取对象值(导出)
|
||||
*/
|
||||
public String setValue(Object val) {
|
||||
@Override
|
||||
public String setValue(Object val) {
|
||||
return val == null ? StringUtils.EMPTY : nf.format(val);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取对象值格式(导出)
|
||||
*/
|
||||
public String getDataFormat() {
|
||||
@Override
|
||||
public String getDataFormat() {
|
||||
return "0.00";
|
||||
}
|
||||
|
||||
|
||||
@@ -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 && childNode.getNodeName().equals("w:rPr")) {
|
||||
if (childNode != null && "w:rPr".equals(childNode.getNodeName())) {
|
||||
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
@@ -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;}
|
||||
.wup_container .placeholder .webuploader-pick {background-color:#1890ff!important;border-color:#1890ff!important;}
|
||||
.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:#f6f6f6;}
|
||||
.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,
|
||||
.ui-jqgrid .ui-jqgrid-htable th.ui-th-column-header, .ui-jqgrid .ui-jqgrid-htable th.ui-th-column,
|
||||
.ui-jqgrid .ui-jqgrid-labels th, .ui-jqgrid .ui-widget-content, .ui-jqgrid tr.ui-row-ltr td,
|
||||
.ui-jqgrid tr.ui-row-rtl td, .ui-jqgrid tr.ui-row-ltr td:last-child {border-color:#eaeaea;}
|
||||
.ui-jqgrid.ui-widget-content, .ui-jqgrid .ui-widget-content {border-color:#f0f0f0;}
|
||||
.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;}
|
||||
|
||||
@@ -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:#f6f6f6;}
|
||||
.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,
|
||||
.ui-jqgrid .ui-jqgrid-htable th.ui-th-column-header, .ui-jqgrid .ui-jqgrid-htable th.ui-th-column,
|
||||
.ui-jqgrid .ui-jqgrid-labels th, .ui-jqgrid .ui-widget-content, .ui-jqgrid tr.ui-row-ltr td,
|
||||
.ui-jqgrid tr.ui-row-rtl td, .ui-jqgrid tr.ui-row-ltr td:last-child {border-color:#eaeaea;}
|
||||
.ui-jqgrid.ui-widget-content, .ui-jqgrid .ui-widget-content {border-color:#f0f0f0;}
|
||||
.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;}
|
||||
|
||||
@@ -0,0 +1,329 @@
|
||||
/*
|
||||
* 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
BIN
common/src/main/resources/static/icheck/1.0/minimal/dark.png
Normal file
BIN
common/src/main/resources/static/icheck/1.0/minimal/dark.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
BIN
common/src/main/resources/static/icheck/1.0/minimal/dark.psd
Normal file
BIN
common/src/main/resources/static/icheck/1.0/minimal/dark.psd
Normal file
Binary file not shown.
@@ -24,4 +24,7 @@
|
||||
.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);}
|
||||
@@ -116,3 +116,8 @@ 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;}
|
||||
|
||||
@@ -1251,7 +1251,7 @@
|
||||
,showBottom: true //是否显示底部栏
|
||||
,isPreview: true //是否显示值预览
|
||||
,btns: ['clear', 'now', 'confirm'] //右下角显示的按钮,会按照数组顺序排列
|
||||
,lang: 'cn' //语言,只支持cn/en,即中文和英文
|
||||
,lang: window.lang || 'zh_CN' //语言,只支持cn/en,即中文和英文
|
||||
,theme: 'default' //主题
|
||||
,position: null //控件定位方式定位, 默认absolute,支持:fixed/absolute/static
|
||||
,calendar: false //是否开启公历重要节日,仅支持中文版
|
||||
@@ -1266,7 +1266,7 @@
|
||||
var that = this
|
||||
,options = that.config
|
||||
,text = {
|
||||
cn: {
|
||||
zh_CN: {
|
||||
weeks: ['日', '一', '二', '三', '四', '五', '六']
|
||||
,time: ['时', '分', '秒']
|
||||
,timeTips: '选择时间'
|
||||
@@ -1303,7 +1303,7 @@
|
||||
,preview: 'The selected result'
|
||||
}
|
||||
};
|
||||
return text[options.lang] || text['cn'];
|
||||
return text[options.lang] || text['zh_CN'];
|
||||
};
|
||||
|
||||
//初始准备
|
||||
|
||||
@@ -169,3 +169,19 @@ 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;}
|
||||
@@ -0,0 +1 @@
|
||||
<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>
|
||||
|
After Width: | Height: | Size: 560 B |
@@ -0,0 +1 @@
|
||||
<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>
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1 @@
|
||||
<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>
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 14 KiB |
@@ -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,14 +53,15 @@ 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 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-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-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;}
|
||||
|
||||
@@ -98,7 +99,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; 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; 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-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;}
|
||||
@@ -161,14 +162,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;}
|
||||
|
||||
@@ -181,7 +182,11 @@ 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;}
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-parent</artifactId>
|
||||
<version>4.4.0-SNAPSHOT</version>
|
||||
<version>4.7.0-SNAPSHOT</version>
|
||||
<relativePath>../../parent/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -16,10 +16,6 @@
|
||||
<url>http://jeesite.com</url>
|
||||
<inceptionYear>2013-Now</inceptionYear>
|
||||
|
||||
<properties>
|
||||
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
@@ -30,12 +26,6 @@
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
<id>thinkgem</id>
|
||||
|
||||
@@ -16,8 +16,8 @@ import com.jeesite.modules.cms.entity.Article;
|
||||
@MyBatisDao
|
||||
public interface ArticleDao extends CrudDao<Article> {
|
||||
|
||||
public long updateExpiredWeight(Article article);
|
||||
long updateExpiredWeight(Article article);
|
||||
|
||||
public long updateHitsAddOne(String id);
|
||||
long updateHitsAddOne(String id);
|
||||
|
||||
}
|
||||
@@ -4,13 +4,6 @@
|
||||
*/
|
||||
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;
|
||||
@@ -20,6 +13,11 @@ 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
|
||||
@@ -45,7 +43,12 @@ import com.jeesite.modules.cms.utils.CmsUtils;
|
||||
@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(includeEntity = DataEntity.class),
|
||||
@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 = BaseEntity.class),
|
||||
}, joinTable = {
|
||||
@JoinTable(entity = Category.class, alias = "c",
|
||||
@@ -83,12 +86,13 @@ 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;
|
||||
@@ -223,8 +227,6 @@ public class Article extends DataEntity<Article> {
|
||||
this.hits = hits;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Integer getHitsPlus() {
|
||||
return hitsPlus;
|
||||
}
|
||||
@@ -275,6 +277,18 @@ 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;
|
||||
}
|
||||
@@ -291,20 +305,6 @@ 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);
|
||||
}
|
||||
|
||||
@@ -4,15 +4,6 @@
|
||||
*/
|
||||
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;
|
||||
@@ -27,6 +18,19 @@ 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
|
||||
@@ -34,11 +38,14 @@ import com.jeesite.modules.sys.utils.UserUtils;
|
||||
* @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"));
|
||||
|
||||
/**
|
||||
* 获取单条数据
|
||||
@@ -72,19 +79,17 @@ public class ArticleService extends CrudService<ArticleDao, Article> {
|
||||
/**
|
||||
* 查询分页数据
|
||||
* @param article 查询条件
|
||||
* @param article.page 分页对象
|
||||
* @param article page 分页对象
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Page<Article> findPage(Article article) {
|
||||
Thread thread = new Thread("cms-update-expired-weight") {
|
||||
updateExpiredWeightThreadPool.submit(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
updateExpiredWeight(article);
|
||||
}
|
||||
};
|
||||
thread.setDaemon(true);
|
||||
thread.start();
|
||||
});
|
||||
return super.findPage(article);
|
||||
}
|
||||
|
||||
@@ -112,7 +117,7 @@ public class ArticleService extends CrudService<ArticleDao, Article> {
|
||||
* @param article
|
||||
* @author ThinkGem
|
||||
*/
|
||||
@Transactional(readOnly = false)
|
||||
@Transactional
|
||||
public void updateExpiredWeight(Article article) {
|
||||
// 更新过期的权重,间隔为“6”个小时
|
||||
Date updateExpiredWeightDate = CmsUtils.getCache("updateExpiredWeightDateByArticle");
|
||||
@@ -129,7 +134,7 @@ public class ArticleService extends CrudService<ArticleDao, Article> {
|
||||
* @param article
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly = false)
|
||||
@Transactional
|
||||
public void save(Article article) {
|
||||
Global.assertDemoMode();
|
||||
// 设置内容状态
|
||||
@@ -169,7 +174,7 @@ public class ArticleService extends CrudService<ArticleDao, Article> {
|
||||
* @param article
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly = false)
|
||||
@Transactional
|
||||
public void updateStatus(Article article) {
|
||||
super.updateStatus(article);
|
||||
}
|
||||
@@ -177,7 +182,7 @@ public class ArticleService extends CrudService<ArticleDao, Article> {
|
||||
/**
|
||||
* 获取文章获取文章并点击数加一
|
||||
*/
|
||||
@Transactional(readOnly = false)
|
||||
@Transactional
|
||||
public void updateHitsAddOne(String id) {
|
||||
dao.updateHitsAddOne(id);
|
||||
}
|
||||
@@ -187,7 +192,7 @@ public class ArticleService extends CrudService<ArticleDao, Article> {
|
||||
* @param article
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly = false)
|
||||
@Transactional
|
||||
public void delete(Article article) {
|
||||
super.delete(article);
|
||||
}
|
||||
|
||||
@@ -4,18 +4,17 @@
|
||||
*/
|
||||
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
|
||||
@@ -23,7 +22,6 @@ import com.jeesite.modules.file.utils.FileUploadUtils;
|
||||
* @version 2020-7-24
|
||||
*/
|
||||
@Service
|
||||
@Transactional(readOnly = true)
|
||||
public class CategoryService extends TreeService<CategoryDao, Category> {
|
||||
|
||||
/**
|
||||
@@ -59,7 +57,7 @@ public class CategoryService extends TreeService<CategoryDao, Category> {
|
||||
* @param category
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly = false)
|
||||
@Transactional
|
||||
public void save(Category category) {
|
||||
if (StringUtils.isNotBlank(category.getViewConfig())){
|
||||
category.setViewConfig(StringEscapeUtils.unescapeHtml4(category.getViewConfig()));
|
||||
@@ -85,7 +83,7 @@ public class CategoryService extends TreeService<CategoryDao, Category> {
|
||||
* @param category
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly = false)
|
||||
@Transactional
|
||||
public void updateStatus(Category category) {
|
||||
super.updateStatus(category);
|
||||
}
|
||||
@@ -95,7 +93,7 @@ public class CategoryService extends TreeService<CategoryDao, Category> {
|
||||
* @param category
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly = false)
|
||||
@Transactional
|
||||
public void delete(Category category) {
|
||||
super.delete(category);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ import com.jeesite.modules.file.utils.FileUploadUtils;
|
||||
* @version 2020-7-24
|
||||
*/
|
||||
@Service
|
||||
@Transactional(readOnly=true)
|
||||
public class CommentService extends CrudService<CommentDao, Comment> {
|
||||
|
||||
/**
|
||||
@@ -48,7 +47,7 @@ public class CommentService extends CrudService<CommentDao, Comment> {
|
||||
* @param comment
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void save(Comment comment) {
|
||||
super.save(comment);
|
||||
// 保存上传图片
|
||||
@@ -62,7 +61,7 @@ public class CommentService extends CrudService<CommentDao, Comment> {
|
||||
* @param comment
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void updateStatus(Comment comment) {
|
||||
super.updateStatus(comment);
|
||||
}
|
||||
@@ -72,7 +71,7 @@ public class CommentService extends CrudService<CommentDao, Comment> {
|
||||
* @param comment
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void delete(Comment comment) {
|
||||
super.delete(comment);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@ 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 {
|
||||
|
||||
@@ -19,7 +19,6 @@ import com.jeesite.modules.file.utils.FileUploadUtils;
|
||||
* @version 2020-7-24
|
||||
*/
|
||||
@Service
|
||||
@Transactional(readOnly=true)
|
||||
public class ReportService extends CrudService<ReportDao, Report> {
|
||||
|
||||
/**
|
||||
@@ -48,7 +47,7 @@ public class ReportService extends CrudService<ReportDao, Report> {
|
||||
* @param report
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void save(Report report) {
|
||||
super.save(report);
|
||||
// 保存上传图片
|
||||
@@ -62,7 +61,7 @@ public class ReportService extends CrudService<ReportDao, Report> {
|
||||
* @param report
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void updateStatus(Report report) {
|
||||
super.updateStatus(report);
|
||||
}
|
||||
@@ -72,7 +71,7 @@ public class ReportService extends CrudService<ReportDao, Report> {
|
||||
* @param report
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void delete(Report report) {
|
||||
super.delete(report);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ import com.jeesite.modules.file.utils.FileUploadUtils;
|
||||
* @version 2020-7-24
|
||||
*/
|
||||
@Service
|
||||
@Transactional(readOnly = true)
|
||||
public class SiteService extends CrudService<SiteDao, Site> {
|
||||
|
||||
/**
|
||||
@@ -49,7 +48,7 @@ public class SiteService extends CrudService<SiteDao, Site> {
|
||||
* @param site
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly = false)
|
||||
@Transactional
|
||||
public void save(Site site) {
|
||||
super.save(site);
|
||||
CmsUtils.removeCache("siteList");
|
||||
@@ -62,7 +61,7 @@ public class SiteService extends CrudService<SiteDao, Site> {
|
||||
* @param site
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly = false)
|
||||
@Transactional
|
||||
public void updateStatus(Site site) {
|
||||
super.updateStatus(site);
|
||||
}
|
||||
@@ -72,7 +71,7 @@ public class SiteService extends CrudService<SiteDao, Site> {
|
||||
* @param site
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly = false)
|
||||
@Transactional
|
||||
public void delete(Site site) {
|
||||
super.delete(site);
|
||||
}
|
||||
@@ -82,7 +81,7 @@ public class SiteService extends CrudService<SiteDao, Site> {
|
||||
* @param site
|
||||
* @param isRe
|
||||
*/
|
||||
@Transactional(readOnly = false)
|
||||
@Transactional
|
||||
public void delete(Site site, Boolean isRe) {
|
||||
site.setStatus(isRe != null && isRe ? Site.STATUS_NORMAL : Site.STATUS_DELETE);
|
||||
super.delete(site);
|
||||
|
||||
@@ -18,7 +18,6 @@ import com.jeesite.modules.cms.entity.Tag;
|
||||
* @version 2020-7-24
|
||||
*/
|
||||
@Service
|
||||
@Transactional(readOnly=true)
|
||||
public class TagService extends CrudService<TagDao, Tag> {
|
||||
|
||||
/**
|
||||
@@ -47,7 +46,7 @@ public class TagService extends CrudService<TagDao, Tag> {
|
||||
* @param tag
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void save(Tag tag) {
|
||||
super.save(tag);
|
||||
}
|
||||
@@ -57,7 +56,7 @@ public class TagService extends CrudService<TagDao, Tag> {
|
||||
* @param tag
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void updateStatus(Tag tag) {
|
||||
super.updateStatus(tag);
|
||||
}
|
||||
@@ -67,7 +66,7 @@ public class TagService extends CrudService<TagDao, Tag> {
|
||||
* @param tag
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void delete(Tag tag) {
|
||||
super.delete(tag);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ import com.jeesite.modules.file.utils.FileUploadUtils;
|
||||
* @version 2020-7-24
|
||||
*/
|
||||
@Service
|
||||
@Transactional(readOnly=true)
|
||||
public class VisitLogService extends CrudService<VisitLogDao, VisitLog> {
|
||||
|
||||
/**
|
||||
@@ -48,7 +47,7 @@ public class VisitLogService extends CrudService<VisitLogDao, VisitLog> {
|
||||
* @param visitLog
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void save(VisitLog visitLog) {
|
||||
super.save(visitLog);
|
||||
// 保存上传图片
|
||||
@@ -62,7 +61,7 @@ public class VisitLogService extends CrudService<VisitLogDao, VisitLog> {
|
||||
* @param visitLog
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void updateStatus(VisitLog visitLog) {
|
||||
super.updateStatus(visitLog);
|
||||
}
|
||||
@@ -72,7 +71,7 @@ public class VisitLogService extends CrudService<VisitLogDao, VisitLog> {
|
||||
* @param visitLog
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void delete(VisitLog visitLog) {
|
||||
super.delete(visitLog);
|
||||
}
|
||||
|
||||
@@ -4,14 +4,6 @@
|
||||
*/
|
||||
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;
|
||||
@@ -26,6 +18,12 @@ 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
|
||||
@@ -191,7 +189,7 @@ public class CmsUtils {
|
||||
* @param siteCode 站点编号
|
||||
* @param categoryCode 分类编号
|
||||
* @param number 获取数目
|
||||
* @param param 预留参数,例: key1:'value1', key2:'value2' ...<br>
|
||||
* @param params 预留参数,例: key1:'value1', key2:'value2' ...<br>
|
||||
* posid : 推荐位(1:首页焦点图;2:栏目页文章推荐;)<br>
|
||||
* image : 文章图片(1:有图片的文章)<br>
|
||||
* isQueryArticleData : 是否查询文章详情信息,查询会影响效率<br>
|
||||
|
||||
@@ -4,22 +4,6 @@
|
||||
*/
|
||||
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;
|
||||
@@ -33,6 +17,20 @@ 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
|
||||
|
||||
@@ -4,20 +4,6 @@
|
||||
*/
|
||||
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;
|
||||
@@ -33,6 +19,20 @@ 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("cms:category:view")
|
||||
@RequiresPermissions(value = {"cms:category:view", "cms:article:view"}, logical = Logical.OR)
|
||||
@RequestMapping(value = "treeData")
|
||||
@ResponseBody
|
||||
public List<Map<String, Object>> treeData(String siteCode, String module, String excludeCode, Boolean isAll, String isShowCode) {
|
||||
|
||||
@@ -4,37 +4,27 @@
|
||||
*/
|
||||
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.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.entity.*;
|
||||
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
|
||||
@@ -310,8 +300,8 @@ public class FrontController extends BaseController {
|
||||
/**
|
||||
* 内容评论
|
||||
*/
|
||||
@RequestMapping(value = "comment", method = RequestMethod.GET)
|
||||
public String comment(Comment comment, String theme, HttpServletRequest request, HttpServletResponse response,
|
||||
@RequestMapping(value = "comment-{theme}", method = RequestMethod.GET)
|
||||
public String comment(Comment comment, @PathVariable String theme, HttpServletRequest request, HttpServletResponse response,
|
||||
Model model) {
|
||||
Page<Comment> page = new Page<Comment>(request, response);
|
||||
Comment c = new Comment();
|
||||
|
||||
@@ -11,4 +11,10 @@
|
||||
4.3.1
|
||||
4.3.2
|
||||
4.3.3
|
||||
4.4.0
|
||||
4.4.0
|
||||
4.4.1
|
||||
4.5.0
|
||||
4.6.0
|
||||
4.6.1
|
||||
4.6.2
|
||||
4.7.0
|
||||
@@ -2,15 +2,23 @@
|
||||
<!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="CmsArticle">
|
||||
<!-- 查询数据 -->
|
||||
<select id="findList" resultType="Article">
|
||||
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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
body{padding-top:50px;font-size:14px;}
|
||||
body{padding-top:50px;font-size:15px;background:#f7f8f9;}
|
||||
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,20 +51,34 @@ footer p{clear:left;margin-bottom:0}
|
||||
#banner{margin-bottom:2em;text-align:center}
|
||||
}
|
||||
|
||||
.jumbotron {background:#f1f1f1;margin:48px auto;}
|
||||
.panel-title small .more {padding-top:4px;}
|
||||
.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}
|
||||
|
||||
.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-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;}
|
||||
.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;}
|
||||
|
||||
.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; */}
|
||||
|
||||
@@ -77,12 +77,11 @@
|
||||
<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">
|
||||
<div class="form-inline m0">
|
||||
<#form:input path="weight" class="form-control width-90 digits" maxlength="10"/>
|
||||
<#form:checkbox id="weightTop" label="${text('置顶')}" value="${article.weight==9999 ?'1' : ''}"
|
||||
class="form-control" style="vertical-align:middle;"/>
|
||||
</div>
|
||||
<span class="help-block"> </span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -144,7 +143,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">
|
||||
@@ -163,14 +162,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 Wdate"
|
||||
dataFormat="datetime" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',isShowClear:false});"/>
|
||||
<#form:input path="createDate" readonly="true" maxlength="20" class="form-control laydate"
|
||||
dataFormat="datetime" data-type="datetime" data-format="yyyy-MM-dd HH:mm"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -209,7 +208,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<#form:extend collapsed="true" />
|
||||
<#form:extend collapsed="true" pathPrefix="articleData"/>
|
||||
<div class="box-footer">
|
||||
<div class="row">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
|
||||
@@ -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">${text('重置')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm isQuick">${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> ');
|
||||
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> ');
|
||||
@@ -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> ');
|
||||
}
|
||||
<% } %>
|
||||
//<% } %>
|
||||
return actions.join('');
|
||||
}}
|
||||
],
|
||||
|
||||
@@ -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">${text('重置')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm isQuick">${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> ');
|
||||
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> ');
|
||||
@@ -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> ');
|
||||
}
|
||||
<% } %>
|
||||
//<% } %>
|
||||
return actions.join('');
|
||||
}}
|
||||
],
|
||||
|
||||
@@ -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">${text('重置')}</button>
|
||||
<button type="reset" class="btn btn-default btn-sm isQuick">${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> ');
|
||||
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> ');
|
||||
}
|
||||
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> ');
|
||||
}
|
||||
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> ');
|
||||
<% } %>
|
||||
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> ');
|
||||
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> ');
|
||||
}
|
||||
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> ');
|
||||
}
|
||||
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> ');
|
||||
<% } %>
|
||||
return actions.join('');
|
||||
}}
|
||||
],
|
||||
// 加载成功后执行事件
|
||||
ajaxSuccess: function(data){
|
||||
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@@ -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">${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 isQuick">${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> ');
|
||||
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> ');
|
||||
@@ -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> ');
|
||||
}
|
||||
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> ');
|
||||
<% } %>
|
||||
//<% } %>
|
||||
return actions.join('');
|
||||
}}
|
||||
],
|
||||
|
||||
@@ -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">${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 isQuick">${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> ');
|
||||
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> ');
|
||||
@@ -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> ');
|
||||
}
|
||||
<% } %>
|
||||
//<% } %>
|
||||
return actions.join('');
|
||||
}}
|
||||
],
|
||||
|
||||
@@ -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">${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 isQuick">${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> ');
|
||||
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> ');
|
||||
@@ -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> ');
|
||||
}
|
||||
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> ');
|
||||
<% } %>
|
||||
//<% } %>
|
||||
return actions.join('');
|
||||
}}
|
||||
],
|
||||
|
||||
@@ -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-1.12.4.min.js"></script>
|
||||
<script src="${ctxStatic}/jquery/jquery-migrate-1.4.1.min.js"></script>
|
||||
<script src="${ctxStatic}/jquery/jquery-3.5.0.min.js"></script>
|
||||
<script src="${ctxStatic}/jquery/jquery-migrate-3.2.0.min.js"></script>
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
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>
|
||||
@@ -36,7 +35,7 @@
|
||||
</ul>
|
||||
</li> -->
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<ul class="nav navbar-nav navbar-right hidden-xs hidden-sm">
|
||||
<form class="navbar-form navbar-left nav-search" action="${ctx}/search">
|
||||
<div class="form-group">
|
||||
<input type="text" name="q" class="form-control" placeholder="全站搜索...">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<% layout('layouts/default.html', {title: '列表页面', libs: []}){ %>
|
||||
<% include('include/banner.html'){} %>
|
||||
<div class="row">
|
||||
<div class="col-xs-2">
|
||||
<div class="row main main-list">
|
||||
<div class="col-sm-2 col-xs-12 main-left">
|
||||
<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-xs-10">
|
||||
<div class="col-sm-10 col-xs-12 main-right">
|
||||
<h4>${category.categoryName}</h4>
|
||||
<#html:if test="${page! != null && category.moduleType == 'article'}">
|
||||
<ul class="article-list">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<% layout('layouts/default.html', {title: '列表页面', libs: []}){ %>
|
||||
<% include('include/banner.html'){} %>
|
||||
<div class="row">
|
||||
<div class="col-xs-2">
|
||||
<div class="row main main-list">
|
||||
<div class="col-sm-2 col-xs-12 main-left">
|
||||
<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-xs-10">
|
||||
<div class="col-sm-10 col-xs-12 main-right">
|
||||
<h4>${category.categoryName}</h4>
|
||||
<div class="row"><br/>
|
||||
<#html:foreach items="${qmark(categoryList! != null, categoryList!, [])}" var="category,status">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<% layout('layouts/default.html', {title: '站点地图', libs: []}){ %>
|
||||
<style type="text/css">
|
||||
h2 {padding-left:10px;}
|
||||
h2 {padding-left:10px;text-align:center;}
|
||||
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">
|
||||
<div class="row main">
|
||||
<h2>站点地图</h2>
|
||||
<#html:foreach items="${siteList()}" var="site">
|
||||
<h3 class="title breadcrumb">${site.siteName}</h3>
|
||||
|
||||
@@ -37,7 +37,7 @@ $(function(){
|
||||
laydate.render({elem:'#ed', type:'date', format:'yyyy-MM-dd'});
|
||||
});
|
||||
</script>
|
||||
<div class="row">
|
||||
<div class="row main">
|
||||
<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'}"/>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<% layout('layouts/default.html', {title:'文章查看',libs: []}){ %>
|
||||
<% include('include/banner.html'){} %>
|
||||
<div class="row article-view">
|
||||
<div class="row main 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>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>com.jeesite</groupId>
|
||||
<artifactId>jeesite-parent</artifactId>
|
||||
<version>4.4.0-SNAPSHOT</version>
|
||||
<version>4.7.0-SNAPSHOT</version>
|
||||
<relativePath>../../parent/pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
@@ -17,16 +17,12 @@
|
||||
<url>http://jeesite.com</url>
|
||||
<inceptionYear>2013-Now</inceptionYear>
|
||||
|
||||
<properties>
|
||||
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- MySQL -->
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<!-- Oracle 11g -->
|
||||
@@ -95,12 +91,6 @@
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
<id>thinkgem</id>
|
||||
|
||||
@@ -4,19 +4,19 @@
|
||||
*/
|
||||
package com.jeesite.common.shiro.filter;
|
||||
|
||||
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;
|
||||
import com.jeesite.modules.sys.utils.UserUtils;
|
||||
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 com.jeesite.common.lang.ExceptionUtils;
|
||||
import com.jeesite.common.lang.StringUtils;
|
||||
import com.jeesite.common.shiro.realm.BaseAuthorizingRealm;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* CAS过滤器
|
||||
@@ -25,12 +25,15 @@ import com.jeesite.common.shiro.realm.BaseAuthorizingRealm;
|
||||
*/
|
||||
@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);
|
||||
}
|
||||
|
||||
@@ -66,7 +69,7 @@ public class CasFilter extends org.apache.shiro.cas.CasFilter {
|
||||
}
|
||||
|
||||
public void setAuthorizingRealm(BaseAuthorizingRealm authorizingRealm) {
|
||||
|
||||
this.authorizingRealm = authorizingRealm;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,15 +4,14 @@
|
||||
*/
|
||||
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
|
||||
@@ -29,7 +28,7 @@ public class InnerFilter extends AccessControlFilter {
|
||||
"shiro.innerFilterAllowRemoteAddrs", "127.0.0.1"), ",");
|
||||
}
|
||||
if (prefixes != null && request instanceof HttpServletRequest){
|
||||
String ip = ((HttpServletRequest)request).getRemoteAddr();
|
||||
String ip = request.getRemoteAddr();
|
||||
for (String prefix : prefixes){
|
||||
result = StringUtils.startsWithIgnoreCase(ip, StringUtils.trim(prefix));
|
||||
if (result){
|
||||
|
||||
@@ -72,7 +72,8 @@ public class AuthorizingRealm extends BaseAuthorizingRealm {
|
||||
* @param plainPassword 明文密码
|
||||
* @return 16位salt密钥 + 40位hash密码
|
||||
*/
|
||||
public String encryptPassword(String plainPassword) {
|
||||
@Override
|
||||
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);
|
||||
@@ -85,6 +86,7 @@ public class AuthorizingRealm extends BaseAuthorizingRealm {
|
||||
* @param password 密文密码
|
||||
* @return 验证成功返回true
|
||||
*/
|
||||
@Override
|
||||
public boolean validatePassword(String plainPassword, String password) {
|
||||
try{
|
||||
String plain = EncodeUtils.decodeHtml(plainPassword);
|
||||
|
||||
@@ -4,22 +4,6 @@
|
||||
*/
|
||||
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;
|
||||
@@ -35,6 +19,20 @@ 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;
|
||||
|
||||
/**
|
||||
* 系统认证授权实现类
|
||||
@@ -181,20 +179,11 @@ 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
|
||||
|
||||
@@ -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,7 +27,8 @@ public class AreaType implements FieldType {
|
||||
/**
|
||||
* 获取对象值(导入)
|
||||
*/
|
||||
public Object getValue(String val) {
|
||||
@Override
|
||||
public Object getValue(String val) {
|
||||
for (Area e : list){
|
||||
if (StringUtils.trimToEmpty(val).equals(e.getAreaName())){
|
||||
return e;
|
||||
@@ -39,6 +40,7 @@ public class AreaType implements FieldType {
|
||||
/**
|
||||
* 获取对象值(导出)
|
||||
*/
|
||||
@Override
|
||||
public String setValue(Object val) {
|
||||
if (val != null && ((Area)val).getAreaName() != null){
|
||||
return ((Area)val).getAreaName();
|
||||
|
||||
@@ -27,6 +27,7 @@ public class CompanyType implements FieldType {
|
||||
/**
|
||||
* 获取对象值(导入)
|
||||
*/
|
||||
@Override
|
||||
public Object getValue(String val) {
|
||||
for (Company e : list){
|
||||
if (StringUtils.trimToEmpty(val).equals(e.getCompanyName())){
|
||||
@@ -39,6 +40,7 @@ public class CompanyType implements FieldType {
|
||||
/**
|
||||
* 设置对象值(导出)
|
||||
*/
|
||||
@Override
|
||||
public String setValue(Object val) {
|
||||
if (val != null && ((Company)val).getCompanyName() != null){
|
||||
return ((Company)val).getCompanyName();
|
||||
|
||||
@@ -27,7 +27,8 @@ public class OfficeType implements FieldType {
|
||||
/**
|
||||
* 获取对象值(导入)
|
||||
*/
|
||||
public Object getValue(String val) {
|
||||
@Override
|
||||
public Object getValue(String val) {
|
||||
for (Office e : list){
|
||||
if (StringUtils.trimToEmpty(val).equals(e.getOfficeName())){
|
||||
return e;
|
||||
@@ -39,7 +40,8 @@ public class OfficeType implements FieldType {
|
||||
/**
|
||||
* 设置对象值(导出)
|
||||
*/
|
||||
public String setValue(Object val) {
|
||||
@Override
|
||||
public String setValue(Object val) {
|
||||
if (val != null && ((Office)val).getOfficeName() != null){
|
||||
return ((Office)val).getOfficeName();
|
||||
}
|
||||
|
||||
@@ -31,7 +31,8 @@ public class PostListType implements FieldType {
|
||||
/**
|
||||
* 获取对象值(导入)
|
||||
*/
|
||||
public Object getValue(String val) {
|
||||
@Override
|
||||
public Object getValue(String val) {
|
||||
List<String> list = new ArrayList<String>();
|
||||
for (String s : StringUtils.split(val, ",")) {
|
||||
for (Post e : postList) {
|
||||
@@ -46,7 +47,8 @@ public class PostListType implements FieldType {
|
||||
/**
|
||||
* 设置对象值(导出)
|
||||
*/
|
||||
public String setValue(Object val) {
|
||||
@Override
|
||||
public String setValue(Object val) {
|
||||
if (val != null) {
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Post> postList = (List<Post>) val;
|
||||
|
||||
@@ -31,7 +31,8 @@ public class RoleListType implements FieldType {
|
||||
/**
|
||||
* 获取对象值(导入)
|
||||
*/
|
||||
public Object getValue(String val) {
|
||||
@Override
|
||||
public Object getValue(String val) {
|
||||
List<String> list = new ArrayList<String>();
|
||||
for (String s : StringUtils.split(val, ",")) {
|
||||
for (Role e : roleList) {
|
||||
@@ -46,7 +47,8 @@ public class RoleListType implements FieldType {
|
||||
/**
|
||||
* 设置对象值(导出)
|
||||
*/
|
||||
public String setValue(Object val) {
|
||||
@Override
|
||||
public String setValue(Object val) {
|
||||
if (val != null) {
|
||||
@SuppressWarnings("unchecked")
|
||||
List<Role> roleList = (List<Role>) val;
|
||||
|
||||
@@ -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((Filter) shiroFilter.getInstance());
|
||||
bean.setFilter(shiroFilter.getObject());
|
||||
bean.addUrlPatterns("/*");
|
||||
bean.setOrder(Ordered.HIGHEST_PRECEDENCE + 5000);
|
||||
return bean;
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* 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();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,14 +4,20 @@
|
||||
*/
|
||||
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 com.alibaba.druid.support.http.StatViewServlet;
|
||||
import com.alibaba.druid.support.http.WebStatFilter;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Druid 配置
|
||||
@@ -44,7 +50,19 @@ public class DruidStatConfig {
|
||||
@Bean
|
||||
public ServletRegistrationBean<StatViewServlet> druidServlet() {
|
||||
ServletRegistrationBean<StatViewServlet> bean = new ServletRegistrationBean<>();
|
||||
bean.setServlet(new StatViewServlet());
|
||||
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.addUrlMappings("/druid/*");
|
||||
return bean;
|
||||
}
|
||||
|
||||
@@ -4,14 +4,6 @@
|
||||
*/
|
||||
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;
|
||||
@@ -24,15 +16,22 @@ 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.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.entity.content.*;
|
||||
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
|
||||
@@ -40,13 +39,16 @@ import com.jeesite.modules.sys.service.EmpUserService;
|
||||
* @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"));
|
||||
|
||||
/**
|
||||
* 获取单条数据
|
||||
@@ -81,7 +83,7 @@ public class MsgInnerService extends CrudService<MsgInnerDao, MsgInner> {
|
||||
* @param msgInner
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void save(MsgInner msgInner) {
|
||||
if (msgInner.getIsNewRecord()){
|
||||
User user = msgInner.getCurrentUser();
|
||||
@@ -183,32 +185,26 @@ public class MsgInnerService extends CrudService<MsgInnerDao, MsgInner> {
|
||||
}
|
||||
}
|
||||
});
|
||||
ListUtils.pageList(recordList, 100, new MethodCallback() {
|
||||
@SuppressWarnings("unchecked")
|
||||
public Object execute(Object... objs) {
|
||||
return msgInnerRecordDao.insertBatch((List<MsgInnerRecord>)objs[0]);
|
||||
}
|
||||
});
|
||||
msgInnerRecordDao.insertBatch(recordList, null);
|
||||
// 手动触发消息推送任务
|
||||
if (Global.TRUE.equals(Global.getProperty("msg.realtime.enabled"))){
|
||||
Thread thread = new Thread("msg-push-task-execute"){
|
||||
public void run() {
|
||||
msgPushThreadPool.submit(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
try{
|
||||
MsgPushUtils.getMsgPushTask().execute();
|
||||
}catch(Exception ex){
|
||||
logger.error("实时消息发送失败,推送服务配置不正确。", ex);
|
||||
}
|
||||
}
|
||||
};
|
||||
thread.setDaemon(true);
|
||||
thread.start();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据消息编号和接受者用户名读取内部消息
|
||||
*/
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void readMsgInnerRecord(MsgInner msgInner){
|
||||
MsgInnerRecord msgInnerRecord = new MsgInnerRecord();
|
||||
msgInnerRecord.setMsgInnerId(msgInner.getId());
|
||||
@@ -226,7 +222,7 @@ public class MsgInnerService extends CrudService<MsgInnerDao, MsgInner> {
|
||||
* @param msgInner
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void updateStatus(MsgInner msgInner) {
|
||||
super.updateStatus(msgInner);
|
||||
}
|
||||
@@ -236,7 +232,7 @@ public class MsgInnerService extends CrudService<MsgInnerDao, MsgInner> {
|
||||
* @param msgInner
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void delete(MsgInner msgInner) {
|
||||
super.delete(msgInner);
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -4,13 +4,7 @@
|
||||
*/
|
||||
package com.jeesite.modules.sys.entity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.jeesite.common.codec.EncodeUtils;
|
||||
import com.jeesite.common.collect.MapUtils;
|
||||
import com.jeesite.common.entity.BaseEntity;
|
||||
@@ -21,6 +15,11 @@ 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
|
||||
@@ -283,10 +282,16 @@ public class Log extends DataEntity<Log> {
|
||||
String[] values = (String[])paramsMap.get(name);
|
||||
return values != null && values.length > 0 ? values[0] : null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return ReflectionToStringBuilder.toString(this);
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
public Date getCreateDate() {
|
||||
return super.getCreateDate();
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public String toString() {
|
||||
// return ReflectionToStringBuilder.toString(this);
|
||||
// }
|
||||
|
||||
}
|
||||
@@ -34,33 +34,32 @@ 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: {}", new SimpleDateFormat("hh:mm:ss.SSS")
|
||||
.format(beginTime), request.getRequestURI(), IpUtils.getRemoteAddr(request));
|
||||
logger.debug("请求开始 URI: {}, IP: {}", 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.info("ViewName: " + modelAndView.getViewName() + " <<<<<<<<< " + request.getRequestURI() + " >>>>>>>>> " + handler);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@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){
|
||||
@@ -74,16 +73,17 @@ 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.isDebugEnabled()){
|
||||
if (logger.isInfoEnabled()){
|
||||
Runtime runtime = Runtime.getRuntime();
|
||||
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()));
|
||||
long totalMemory = runtime.totalMemory();
|
||||
logger.info("请求完成 URI: {}, 用时: {}, 总内存: {}, 剩余: {}", request.getRequestURI(),
|
||||
TimeUtils.formatDateAgo(executeTime), ByteUtils.formatByteSize(totalMemory),
|
||||
ByteUtils.formatByteSize(totalMemory-(totalMemory-runtime.freeMemory())));
|
||||
}
|
||||
MDC.remove(TRACE_ID);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ 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 {
|
||||
|
||||
@@ -43,7 +42,7 @@ public class AreaServiceSupport extends TreeService<AreaDao, Area>
|
||||
* 保存区划
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void save(Area area) {
|
||||
super.save(area);
|
||||
AreaUtils.clearCache();
|
||||
@@ -53,7 +52,7 @@ public class AreaServiceSupport extends TreeService<AreaDao, Area>
|
||||
* 删除区划
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void delete(Area area) {
|
||||
super.delete(area);
|
||||
AreaUtils.clearCache();
|
||||
|
||||
@@ -25,7 +25,6 @@ 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{
|
||||
|
||||
@@ -64,7 +63,7 @@ public class CompanyServiceSupport extends TreeService<CompanyDao, Company>
|
||||
* 保存公司
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void save(Company company) {
|
||||
if (company.getIsNewRecord()){
|
||||
// 生成主键,并验证改主键是否存在,如存在则抛出验证信息
|
||||
@@ -95,7 +94,7 @@ public class CompanyServiceSupport extends TreeService<CompanyDao, Company>
|
||||
* 删除公司
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void delete(Company company) {
|
||||
super.delete(company);
|
||||
// 清理公司相关缓存
|
||||
@@ -106,7 +105,7 @@ public class CompanyServiceSupport extends TreeService<CompanyDao, Company>
|
||||
* 停用当前节点
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void updateStatus(Company company) {
|
||||
dao.updateStatus(company);
|
||||
// 清理公司相关缓存
|
||||
|
||||
@@ -4,16 +4,6 @@
|
||||
*/
|
||||
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;
|
||||
@@ -33,13 +23,20 @@ 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{
|
||||
|
||||
@@ -55,8 +52,8 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
|
||||
*/
|
||||
@PostConstruct
|
||||
private void corpModelValid() throws Exception{
|
||||
if (Global.isUseCorpModel() != Global.getPropertyToBoolean("user.useCorpModel", "false")){
|
||||
throw new Exception("\n\nuser.useCorpModel=true? 你开启了多租户模式,视乎你的当前版本不是JeeSite专业版。\n");
|
||||
if (!Global.isUseCorpModel().equals(Global.getPropertyToBoolean("user.useCorpModel", "false"))){
|
||||
throw new Exception("\n\nuser.useCorpModel=true? 你开启了多租户模式,似乎你的当前版本不是JeeSite专业版。\n");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,6 +72,13 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
|
||||
*/
|
||||
@Override
|
||||
public void addDataScopeFilter(EmpUser empUser, String ctrlPermi) {
|
||||
// String defaultRoleCodes = Global.getConfig(
|
||||
// "sys.user.defaultRoleCodes." + empUser.getCurrentUser().getUserType());
|
||||
// if (StringUtils.isNotBlank(defaultRoleCodes)) {
|
||||
// empUser.getCurrentUser().getRoleList().addAll(Arrays
|
||||
// .stream(StringUtils.split(defaultRoleCodes,','))
|
||||
// .map(roleCode -> RoleUtils.get(roleCode)).collect(Collectors.toList()));
|
||||
// }
|
||||
empUser.getSqlMap().getDataScope().addFilter("dsfOffice",
|
||||
"Office", "e.office_code", "a.create_by", ctrlPermi, "office_user");
|
||||
if (StringUtils.isNotBlank(EmpUtils.getCompany().getCompanyCode())){
|
||||
@@ -94,6 +98,7 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
|
||||
/**
|
||||
* 查询全部用户,仅返回基本信息
|
||||
*/
|
||||
@Override
|
||||
public List<EmpUser> findUserList(EmpUser empUser){
|
||||
return dao.findUserList(empUser);
|
||||
}
|
||||
@@ -101,6 +106,7 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
|
||||
/**
|
||||
* 根据部门编码查询用户,仅返回基本信息
|
||||
*/
|
||||
@Override
|
||||
public List<EmpUser> findUserListByOfficeCodes(EmpUser empUser){
|
||||
return dao.findUserListByOfficeCodes(empUser);
|
||||
}
|
||||
@@ -108,6 +114,7 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
|
||||
/**
|
||||
* 根据角色编码查询用户,仅返回基本信息
|
||||
*/
|
||||
@Override
|
||||
public List<EmpUser> findUserListByRoleCodes(EmpUser empUser){
|
||||
return dao.findUserListByRoleCodes(empUser);
|
||||
}
|
||||
@@ -115,6 +122,7 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
|
||||
/**
|
||||
* 根据岗位编码查询用户,仅返回基本信息
|
||||
*/
|
||||
@Override
|
||||
public List<EmpUser> findUserListByPostCodes(EmpUser empUser){
|
||||
return dao.findUserListByPostCodes(empUser);
|
||||
}
|
||||
@@ -123,7 +131,7 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
|
||||
* 保存用户员工
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void save(EmpUser user) {
|
||||
// 1、初始化用户信息
|
||||
if (user.getIsNewRecord()){
|
||||
@@ -170,7 +178,8 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
|
||||
* @param file 导入的用户数据文件
|
||||
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据
|
||||
*/
|
||||
@Transactional(readOnly=false)
|
||||
@Override
|
||||
@Transactional
|
||||
public String importData(MultipartFile file, Boolean isUpdateSupport) {
|
||||
if (file == null){
|
||||
throw new ServiceException(text("请选择导入的数据文件!"));
|
||||
@@ -241,7 +250,7 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
|
||||
* 更新状态
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void updateStatus(EmpUser empUser) {
|
||||
userService.updateStatus(empUser);
|
||||
employeeService.updateStatus(empUser.getEmployee());
|
||||
@@ -251,7 +260,7 @@ public class EmpUserServiceSupport extends CrudService<EmpUserDao, EmpUser>
|
||||
* 删除用户
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void delete(EmpUser empUser) {
|
||||
userService.delete(empUser);
|
||||
employeeService.delete(empUser.getEmployee());
|
||||
|
||||
@@ -25,7 +25,6 @@ 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{
|
||||
|
||||
@@ -64,7 +63,7 @@ public class EmployeeServiceSupport extends CrudService<EmployeeDao, Employee>
|
||||
* 保存数据(插入或更新)
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void save(Employee employee) {
|
||||
if (employee.getIsNewRecord()){
|
||||
if (dao.get(employee) != null){
|
||||
@@ -88,7 +87,7 @@ public class EmployeeServiceSupport extends CrudService<EmployeeDao, Employee>
|
||||
* 删除数据
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void delete(Employee employee) {
|
||||
super.delete(employee);
|
||||
}
|
||||
@@ -96,7 +95,8 @@ public class EmployeeServiceSupport extends CrudService<EmployeeDao, Employee>
|
||||
/**
|
||||
* 查询当前员工关联的岗位信息
|
||||
*/
|
||||
public List<EmployeePost> findEmployeePostList(Employee employee){
|
||||
@Override
|
||||
public List<EmployeePost> findEmployeePostList(Employee employee){
|
||||
EmployeePost employeePost = new EmployeePost();
|
||||
employeePost.setEmpCode(employee.getEmpCode());
|
||||
return employeePostDao.findList(employeePost);
|
||||
@@ -105,6 +105,7 @@ public class EmployeeServiceSupport extends CrudService<EmployeeDao, Employee>
|
||||
/**
|
||||
* 查询当前员工关联的附属机构信息
|
||||
*/
|
||||
@Override
|
||||
public List<EmployeeOffice> findEmployeeOfficeList(Employee employee){
|
||||
EmployeeOffice employeeOffice = new EmployeeOffice();
|
||||
employeeOffice.setEmpCode(employee.getEmpCode());
|
||||
|
||||
@@ -18,7 +18,6 @@ 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{
|
||||
|
||||
@@ -44,7 +43,8 @@ public class LogServiceSupport extends CrudService<LogDao, Log>
|
||||
/**
|
||||
* 不使用数据库事务,执行插入日志
|
||||
*/
|
||||
@Transactional(readOnly=false)//, propagation=Propagation.NOT_SUPPORTED)
|
||||
@Override
|
||||
@Transactional//(propagation=Propagation.NOT_SUPPORTED)
|
||||
public void insertLog(Log entity) {
|
||||
DataSourceHolder.setJdbcTransaction(false);
|
||||
dao.insert(entity);
|
||||
|
||||
@@ -29,7 +29,6 @@ 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{
|
||||
|
||||
@@ -65,7 +64,7 @@ public class OfficeServiceSupport extends TreeService<OfficeDao, Office>
|
||||
* 保存数据(插入或更新)
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void save(Office office) {
|
||||
if (office.getIsNewRecord()){
|
||||
// 生成主键,并验证改主键是否存在,如存在则抛出验证信息
|
||||
@@ -83,7 +82,8 @@ public class OfficeServiceSupport extends TreeService<OfficeDao, Office>
|
||||
* @param file 导入的机构数据文件
|
||||
* @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据
|
||||
*/
|
||||
@Transactional(readOnly=false)
|
||||
@Override
|
||||
@Transactional
|
||||
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(readOnly=false)
|
||||
@Transactional
|
||||
public void updateStatus(Office office) {
|
||||
super.updateStatus(office);
|
||||
// 清理部门相关缓存
|
||||
@@ -156,7 +156,7 @@ public class OfficeServiceSupport extends TreeService<OfficeDao, Office>
|
||||
* 删除数据
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void delete(Office office) {
|
||||
super.delete(office);
|
||||
// 清理部门相关缓存
|
||||
|
||||
@@ -17,7 +17,6 @@ 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{
|
||||
|
||||
@@ -32,7 +31,8 @@ public class PostServiceSupport extends CrudService<PostDao, Post>
|
||||
/**
|
||||
* 根据名称查询岗位
|
||||
*/
|
||||
public Post getByPostName(Post post) {
|
||||
@Override
|
||||
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(readOnly=false)
|
||||
@Transactional
|
||||
public void save(Post post) {
|
||||
super.save(post);
|
||||
}
|
||||
@@ -59,7 +59,7 @@ public class PostServiceSupport extends CrudService<PostDao, Post>
|
||||
* 更新岗位状态
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void updateStatus(Post post) {
|
||||
super.updateStatus(post);
|
||||
}
|
||||
@@ -68,7 +68,7 @@ public class PostServiceSupport extends CrudService<PostDao, Post>
|
||||
* 删除岗位
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly=false)
|
||||
@Transactional
|
||||
public void delete(Post post) {
|
||||
super.delete(post);
|
||||
}
|
||||
|
||||
@@ -55,7 +55,11 @@ public class EmpUtils {
|
||||
*/
|
||||
public static Employee get(User user){
|
||||
if (user != null && User.USER_TYPE_EMPLOYEE.equals(user.getUserType())){
|
||||
return user.getRefObj();
|
||||
Employee employee = user.getRefObj();
|
||||
if (employee == null) {
|
||||
employee = Static.employeeService.get(user.getRefCode());
|
||||
}
|
||||
return employee;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user