Repository: 18121259693/projectoa Branch: master Commit: c90e1423859d Files: 117 Total size: 1.1 MB Directory structure: gitextract_jaeyj9v4/ ├── .gitignore ├── LICENSE ├── README.md ├── build.gradle ├── database/ │ ├── DB设计.xlsx │ └── dboa.sql ├── gradle/ │ └── wrapper/ │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── src/ ├── main/ │ ├── java/ │ │ └── com/ │ │ └── zmh/ │ │ └── projectoa/ │ │ ├── ProjectoaApplication.java │ │ ├── ServletInitializer.java │ │ ├── config/ │ │ │ ├── MyShiroRealm.java │ │ │ └── ShiroConfiguration.java │ │ ├── controller/ │ │ │ ├── AdminController.java │ │ │ ├── CalendarController.java │ │ │ ├── DepartmentController.java │ │ │ ├── IndexController.java │ │ │ ├── LoginController.java │ │ │ ├── MessageController.java │ │ │ ├── NoticeController.java │ │ │ ├── PositionController.java │ │ │ ├── UserinfoController.java │ │ │ └── UsersController.java │ │ ├── dto/ │ │ │ └── ReturnDto.java │ │ ├── mapper/ │ │ │ ├── CalendarMapper.java │ │ │ ├── DepartmentsMapper.java │ │ │ ├── MessagesMapper.java │ │ │ ├── NoticesMapper.java │ │ │ ├── PositionsMapper.java │ │ │ ├── UserinfoMapper.java │ │ │ └── UsersMapper.java │ │ ├── model/ │ │ │ ├── Calendar.java │ │ │ ├── CalendarExample.java │ │ │ ├── Departments.java │ │ │ ├── DepartmentsExample.java │ │ │ ├── Messages.java │ │ │ ├── MessagesExample.java │ │ │ ├── Notices.java │ │ │ ├── NoticesExample.java │ │ │ ├── Positions.java │ │ │ ├── PositionsExample.java │ │ │ ├── Userinfo.java │ │ │ ├── UserinfoExample.java │ │ │ ├── Users.java │ │ │ └── UsersExample.java │ │ ├── service/ │ │ │ ├── DepartmentService.java │ │ │ ├── MessageService.java │ │ │ ├── NoticeService.java │ │ │ ├── PositionService.java │ │ │ ├── RedisService.java │ │ │ ├── UserinfoService.java │ │ │ └── UsersService.java │ │ └── util/ │ │ ├── JSONUtil.java │ │ ├── MD5Util.java │ │ ├── ParameterUtil.java │ │ └── ReadFileUtil.java │ └── resources/ │ ├── application.properties │ ├── banner.txt │ ├── logback.xml │ ├── public/ │ │ └── error/ │ │ └── 404.html │ ├── static/ │ │ ├── assets/ │ │ │ ├── css/ │ │ │ │ ├── admin.css │ │ │ │ ├── app.css │ │ │ │ ├── app.less │ │ │ │ ├── calculator.css │ │ │ │ ├── flipclock.css │ │ │ │ ├── fullcalendar.print.css │ │ │ │ └── todomvc.css │ │ │ ├── fonts/ │ │ │ │ └── FontAwesome.otf │ │ │ └── js/ │ │ │ ├── app.js │ │ │ ├── calculator.js │ │ │ ├── moment.js │ │ │ ├── theme.js │ │ │ ├── todomvc.js │ │ │ └── vue.js │ │ ├── js/ │ │ │ ├── common.js │ │ │ ├── index.js │ │ │ ├── logs.js │ │ │ ├── message.js │ │ │ ├── message_dtl.js │ │ │ ├── notice.js │ │ │ ├── notice_create.js │ │ │ ├── notice_dtl.js │ │ │ ├── user.js │ │ │ ├── user_create.js │ │ │ ├── user_edit.js │ │ │ ├── userinfo.js │ │ │ └── userinfo_detail.js │ │ └── prism/ │ │ ├── prism.css │ │ └── prism.js │ └── templates/ │ ├── mapper/ │ │ ├── CalendarMapper.xml │ │ ├── DepartmentsMapper.xml │ │ ├── MessagesMapper.xml │ │ ├── NoticesMapper.xml │ │ ├── PositionsMapper.xml │ │ ├── UserinfoMapper.xml │ │ └── UsersMapper.xml │ └── view/ │ ├── 403.html │ ├── calendar.html │ ├── changePassWord.html │ ├── common/ │ │ └── common.html │ ├── index.html │ ├── login.html │ ├── logs.html │ ├── message.html │ ├── message_dtl.html │ ├── notice.html │ ├── notice_create.html │ ├── notice_dtl.html │ ├── springbootadmin.html │ ├── table.html │ ├── user.html │ ├── user_create.html │ ├── user_edit.html │ ├── userinfo.html │ └── userinfo_detail.html └── test/ └── java/ └── com/ └── zmh/ └── projectoa/ └── ProjectoaApplicationTests.java ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ .gradle /build/ !gradle/wrapper/gradle-wrapper.jar ### STS ### .apt_generated .classpath .factorypath .project .settings .springBeans ### IntelliJ IDEA ### .idea *.iws *.iml *.ipr ### NetBeans ### nbproject/private/ build/ nbbuild/ dist/ nbdist/ .nb-gradle/ ================================================ FILE: LICENSE ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: README.md ================================================ --- ## 特别鸣谢 本项目 CDN 加速及安全防护由 Tencent EdgeOne 赞助 [![Tencent EdgeOne](https://edgeone.ai/media/34fe3a45-492d-4ea4-ae5d-ea1087ca7b4b.png)](https://edgeone.ai/zh?from=github) --- # 个人主页 [https://zzzmh.cn/](https://zzzmh.cn/) --- # 友情链接 [https://yunduo250.com/](https://yunduo250.com/) --- # 关于本项目简介 [https://zzzmh.cn/single.jsp?id=2](https://zzzmh.cn/single.jsp?id=2) --- # 线上预览地址 [https://zzzmh.cn/projectoa/index](https://zzzmh.cn/projectoa/index) 测试账号: `admin` 测试密码: `123456` --- # 笔记 * **DB具体设计笔记地址**: [http://leanote.com/blog/post/5a82b593ab644140d2000fdf](http://leanote.com/blog/post/5a82b593ab644140d2000fdf) * **开发日志地址**: [http://leanote.com/blog/post/5a7bb4d5ab6441766a0008f1](http://leanote.com/blog/post/5a7bb4d5ab6441766a0008f1) * **Redis相关设计和实现方法**: [http://leanote.com/blog/post/5a8e1f37ab64410bff0002ee](http://leanote.com/blog/post/5a8e1f37ab64410bff0002ee) * **Shiro相关**: [http://leanote.com/blog/post/5a8e6b48ab64410bff000863](http://leanote.com/blog/post/5a8e6b48ab64410bff000863) --- # 参考 * **ityouknow的springboot系列**: 参考了他的第三、四、十四、二十章节,他官网里有他的源码GITHUB:[http://www.ityouknow.com/spring-boot.html](http://www.ityouknow.com/spring-boot.html) * **使用spring-boot-admin对spring-boot服务进行监控**: [http://blog.csdn.net/clementad/article/details/70613209](http://blog.csdn.net/clementad/article/details/70613209) * **详解html和thymeleaf中的相对路径,解决springboot前台页面的相对路径问题**: [http://blog.csdn.net/qq_35603331/article/details/76255125](http://blog.csdn.net/qq_35603331/article/details/76255125) * **彩虹猫启动画面**: [https://raw.githubusercontent.com/snicoll-demos/spring-boot-4tw-uni/master/spring-boot-4tw-web/src/main/resources/banner.txt](https://raw.githubusercontent.com/snicoll-demos/spring-boot-4tw-uni/master/spring-boot-4tw-web/src/main/resources/banner.txt) * **SpringBoot项目中使用redis缓存的方法步骤**: [http://www.jb51.net/article/129775.htm](http://www.jb51.net/article/129775.htm) * **开涛大神的《跟我学Shiro》系列**: [http://jinnianshilongnian.iteye.com/blog/2018398](http://jinnianshilongnian.iteye.com/blog/2018398) --- # 感谢 该项目是由 **程衫耘朵** 和 **张明辉** 共同完成! 特别要感谢**云朵**同学的鼎力相助!!! * [https://github.com/chsyd1028](https://github.com/chsyd1028) * [https://github.com/zzzmhcn](https://github.com/zzzmhcn) --- # 改善空间 1. `calculator.js` 中存在监控键盘事件方法,会影响文字输入时,按退格无效的情况。目前只在首页引入 `calculator.js`,但还是影响了 `todoList` 备忘录的输入删除。 2. `Shiro` 和 `springbootadmin` 冲突问题,目前只通过反过来配置 `Shiro` 解决,使用起来差别不大,但不完美。 3. 手机端部分组件兼容性不强,例如表格在手机显示不理想。 4. `Shiro` 未使用盐值加密。 5. `Redis` 命名方式和存读方式还有优化空间。 --- # 注意 * 初次使用请修改配置文件 `projectoa\src\main\resources\application.properties`: * `spring.datasource.***`: 配置MySQL * `spring.redis.***`: 配置Redis (如果是本机就不用配) * `logback.filepath`: 配置输出日志路径 * 首次使用需要向数据库导入 `projectoa\database\dboa.sql` 文件。 * 请使用 **IDEA 2017.03 或以上版本** 导入本项目,并且建议使用本地独立版本的 **Gradle (4.4以上)**。 ================================================ FILE: build.gradle ================================================ buildscript { ext { springBootVersion = '1.5.10.RELEASE' } repositories { maven {url 'http://maven.aliyun.com/nexus/content/groups/public/'} } dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") } } apply plugin: 'java' apply plugin: 'eclipse-wtp' apply plugin: 'org.springframework.boot' apply plugin: 'war' group = 'com.zmh' version = '0.0.1' sourceCompatibility = 1.8 repositories { maven {url 'http://maven.aliyun.com/nexus/content/groups/public/'} } configurations { providedRuntime } dependencies { compile('org.springframework.boot:spring-boot-starter-web') //数据库相关 compile('mysql:mysql-connector-java') compile('org.mybatis.spring.boot:mybatis-spring-boot-starter:1.3.1') //友好的HTML规范 搭配spring.thymeleaf.mode=LEGACYHTML5 compile('org.springframework.boot:spring-boot-starter-thymeleaf') compile('net.sourceforge.nekohtml:nekohtml:1.9.22') //热部署 搭配spring.thymeleaf.cache=false compile('org.springframework.boot:spring-boot-devtools') //SpringBoot内置的Redis compile('org.springframework.boot:spring-boot-starter-data-redis') //内置tomcat 仅开发测试用 //runtime('org.springframework.boot:spring-boot-starter-tomcat') //spring-boot-admin 图形化管理页面 compile('de.codecentric:spring-boot-admin-server:1.5.7') compile('de.codecentric:spring-boot-admin-server-ui:1.5.7') compile('de.codecentric:spring-boot-admin-starter-client:1.5.7') //pagehelper compile group: 'com.github.pagehelper', name: 'pagehelper-spring-boot-starter', version: '1.2.3' //使用的是shiro-spring 而非shiro compile('org.apache.shiro:shiro-spring:1.4.0') compile('com.github.theborakompanioni:thymeleaf-extras-shiro:1.2.1') //测试 testCompile('org.springframework.boot:spring-boot-starter-test') } ================================================ FILE: database/dboa.sql ================================================ /* Navicat MySQL Data Transfer Source Server : 139.196.72.225 Source Server Version : 50721 Source Host : localhost:3306 Source Database : dboa Target Server Type : MYSQL Target Server Version : 50721 File Encoding : 65001 Date: 2018-03-19 09:46:02 */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for calendar -- ---------------------------- DROP TABLE IF EXISTS `calendar`; CREATE TABLE `calendar` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL, `title` varchar(255) DEFAULT NULL, `start_time` datetime NOT NULL, `end_time` datetime NOT NULL, `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of calendar -- ---------------------------- -- ---------------------------- -- Table structure for departments -- ---------------------------- DROP TABLE IF EXISTS `departments`; CREATE TABLE `departments` ( `id` int(11) NOT NULL AUTO_INCREMENT, `department` varchar(255) DEFAULT NULL, `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of departments -- ---------------------------- INSERT INTO `departments` VALUES ('1', '管理员', '2018-02-13 22:28:22', '2018-02-13 22:32:19'); INSERT INTO `departments` VALUES ('2', '人事部', '2018-02-13 22:28:49', null); INSERT INTO `departments` VALUES ('3', '财务部', '2018-02-13 22:28:54', null); INSERT INTO `departments` VALUES ('4', '市场部', '2018-02-13 22:29:10', null); INSERT INTO `departments` VALUES ('5', '开发部', '2018-02-13 22:29:18', null); -- ---------------------------- -- Table structure for messages -- ---------------------------- DROP TABLE IF EXISTS `messages`; CREATE TABLE `messages` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(255) NOT NULL, `message` text, `send_id` int(11) NOT NULL, `receive_id` int(11) NOT NULL, `is_del` varchar(1) DEFAULT NULL, `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of messages -- ---------------------------- INSERT INTO `messages` VALUES ('7', '渣渣', '渣渣渣渣渣渣', '8', '1', null, '2018-02-27 10:10:41', null); INSERT INTO `messages` VALUES ('8', '渣渣', '渣渣渣渣渣渣', '8', '1', null, '2018-02-27 10:10:48', null); INSERT INTO `messages` VALUES ('9', '渣渣', '渣渣渣渣渣渣', '8', '1', null, '2018-02-27 10:10:51', null); INSERT INTO `messages` VALUES ('10', '渣渣', '渣渣渣渣渣渣', '8', '1', null, '2018-02-27 10:10:53', null); INSERT INTO `messages` VALUES ('11', '喂喂喂', '喂喂喂喂喂喂喂喂喂喂喂喂', '8', '1', null, '2018-02-27 11:18:06', null); INSERT INTO `messages` VALUES ('12', '喂喂喂', '喂喂喂喂喂喂喂喂喂喂喂喂', '8', '1', null, '2018-02-27 11:18:07', null); INSERT INTO `messages` VALUES ('13', '喂喂喂', '喂喂喂喂喂喂喂喂喂喂喂喂', '8', '1', null, '2018-02-27 11:18:09', null); INSERT INTO `messages` VALUES ('14', '我我我我我我我我我我', '我我我我', '1', '8', null, '2018-02-27 12:08:40', null); INSERT INTO `messages` VALUES ('15', '我我我我我我我我我', '我我我我', '1', '8', null, '2018-02-27 12:08:45', null); INSERT INTO `messages` VALUES ('16', '你好管理员', '我是你爸爸', '8', '1', null, '2018-02-28 11:27:20', null); INSERT INTO `messages` VALUES ('17', '在吗在吗', '我是你爸爸', '8', '1', null, '2018-02-28 11:27:27', null); INSERT INTO `messages` VALUES ('18', '黑黑黑', '我是你爸爸', '8', '1', null, '2018-02-28 11:27:34', null); INSERT INTO `messages` VALUES ('19', '你好本尊', '再见本尊', '1', '8', null, '2018-02-28 11:34:01', null); INSERT INTO `messages` VALUES ('20', '你好本尊123', '再见本尊123', '1', '8', null, '2018-02-28 11:34:05', null); INSERT INTO `messages` VALUES ('21', '你好本尊456', '再见本尊456', '1', '8', null, '2018-02-28 11:34:10', null); INSERT INTO `messages` VALUES ('22', '维护', '维护123', '8', '1', null, '2018-02-28 16:35:23', null); INSERT INTO `messages` VALUES ('23', '管理员大人你好', '管理员大人你好', '10', '1', null, '2018-02-28 17:11:13', null); INSERT INTO `messages` VALUES ('24', '你好 请问', '我是谁?我在哪?发生了什么?', '8', '1', null, '2018-03-05 11:05:51', null); INSERT INTO `messages` VALUES ('25', '你好 请问', '我是谁?我在哪?发生了什么?', '8', '3', null, '2018-03-05 11:05:51', null); INSERT INTO `messages` VALUES ('26', '你好 请问', '我是谁?我在哪?发生了什么?', '8', '7', null, '2018-03-05 11:05:51', null); INSERT INTO `messages` VALUES ('27', '你好 请问', '我是谁?我在哪?发生了什么?', '8', '1', null, '2018-03-05 11:05:54', null); INSERT INTO `messages` VALUES ('28', '你好 请问', '我是谁?我在哪?发生了什么?', '8', '3', null, '2018-03-05 11:05:54', null); INSERT INTO `messages` VALUES ('29', '你好 请问', '我是谁?我在哪?发生了什么?', '8', '7', null, '2018-03-05 11:05:54', null); INSERT INTO `messages` VALUES ('30', '你好管理员', 'http://zhangminghui.iok.la/projectoa', '8', '1', null, '2018-03-05 11:06:07', null); INSERT INTO `messages` VALUES ('31', '你好管理员', '管理员大人 我的电脑坏了!!!!', '8', '1', null, '2018-03-05 11:06:40', null); -- ---------------------------- -- Table structure for notices -- ---------------------------- DROP TABLE IF EXISTS `notices`; CREATE TABLE `notices` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(255) NOT NULL, `notice` text, `send_id` int(11) NOT NULL, `is_del` varchar(1) DEFAULT NULL, `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of notices -- ---------------------------- INSERT INTO `notices` VALUES ('1', '新年快乐', '新年快乐', '1', null, '2018-02-28 16:24:22', null); INSERT INTO `notices` VALUES ('2', '万事如意', '万事如意万事如意万事如意', '1', null, '2018-02-28 16:27:32', null); INSERT INTO `notices` VALUES ('3', '大吉大利', '大吉大利', '1', null, '2018-03-01 11:20:18', null); INSERT INTO `notices` VALUES ('4', '今晚吃鸡', '今晚吃鸡', '1', null, '2018-03-01 11:20:25', null); INSERT INTO `notices` VALUES ('5', '测试一下公告的长度可以有多长', '一二三四五六七九十一二三四五六七九十一二三四五六七九十一二三四五六七九十一二三四五六七九十一二三四五六七九十一二三四五六七九十一二三四五六七九十一二三四五六七九十一二三四五六七九十一二三四五六七九十一二三四五六七九十一二三四五六七九十一二三四五六七九十', '1', null, '2018-03-01 13:12:07', null); INSERT INTO `notices` VALUES ('6', '祝大家元宵节快乐', '祝大家元宵节快乐!', '1', null, '2018-03-01 13:45:51', null); INSERT INTO `notices` VALUES ('7', '新年快乐', '万事如意', '1', null, '2018-03-01 13:50:44', null); INSERT INTO `notices` VALUES ('8', '新年快乐', '万事如意', '1', null, '2018-03-01 13:51:06', null); INSERT INTO `notices` VALUES ('9', '重要通知', '2018年3月8日 全公司女同志放假1天', '1', null, '2018-03-05 11:01:37', null); INSERT INTO `notices` VALUES ('10', '震惊!', '震惊!公司居然发生如此骇人听闻之事!', '1', null, '2018-03-05 11:02:21', null); INSERT INTO `notices` VALUES ('11', '重要通知', '即日起 公司网站正式上线!http://zhangminghui.iok.la/projectoa\n欢迎访问', '1', null, '2018-03-05 11:03:01', null); INSERT INTO `notices` VALUES ('12', '测试', '测试 2018-3-5 11:03:17', '1', null, '2018-03-05 11:03:44', null); INSERT INTO `notices` VALUES ('13', '测试测试', '2018年3月5日11:03:36', '1', null, '2018-03-05 11:03:58', null); INSERT INTO `notices` VALUES ('14', '测试测', '2018-3-5 11:03:49', '1', null, '2018-03-05 11:04:12', null); INSERT INTO `notices` VALUES ('15', '测试测是我才是', '2018年3月5日11:04:02', '1', null, '2018-03-05 11:04:25', null); INSERT INTO `notices` VALUES ('16', '喜大普奔!', '本公司女员工三八妇女节 2018年3月8日放假一整天', '1', null, '2018-03-05 11:10:54', null); -- ---------------------------- -- Table structure for positions -- ---------------------------- DROP TABLE IF EXISTS `positions`; CREATE TABLE `positions` ( `id` int(11) NOT NULL AUTO_INCREMENT, `position` varchar(255) DEFAULT NULL, `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of positions -- ---------------------------- INSERT INTO `positions` VALUES ('1', '管理员', '2018-02-13 22:31:17', '2018-02-13 22:32:11'); INSERT INTO `positions` VALUES ('2', '经理', '2018-02-13 22:31:45', null); INSERT INTO `positions` VALUES ('3', '主管', '2018-02-13 22:31:50', null); INSERT INTO `positions` VALUES ('4', '普通', '2018-02-13 22:31:56', null); -- ---------------------------- -- Table structure for userinfo -- ---------------------------- DROP TABLE IF EXISTS `userinfo`; CREATE TABLE `userinfo` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL, `sex` varchar(255) DEFAULT NULL, `birthday` date DEFAULT NULL, `age` int(11) DEFAULT NULL, `identity_card` varchar(255) DEFAULT NULL, `email` varchar(255) DEFAULT NULL, `qq` int(11) DEFAULT NULL, `wechat` varchar(255) DEFAULT NULL, `weibo` varchar(255) DEFAULT NULL, `phone` varchar(255) DEFAULT NULL, `is_del` varchar(1) DEFAULT NULL, `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of userinfo -- ---------------------------- INSERT INTO `userinfo` VALUES ('1', '1', '1', '1970-01-02', '39', '310123456789451234', 'admin@projectoa.com', '123456789', '123456789', '123456789', '12345678901', null, '2018-02-13 22:32:56', '2018-03-08 12:54:11'); INSERT INTO `userinfo` VALUES ('3', '3', '2', '1970-01-01', null, '', '', null, '', '', '', null, '2018-02-14 22:27:04', '2018-03-05 11:09:02'); INSERT INTO `userinfo` VALUES ('5', '7', '3', '2018-01-30', '25', '222222222222222222', '420120577@qq.com', '420120577', 'weichat', 'weibo', '13919191919', '1', '2018-02-14 22:47:02', '2018-02-25 19:57:25'); INSERT INTO `userinfo` VALUES ('6', '8', '1', '1992-04-02', '18', '313132121313313', '', null, '', '', '', null, '2018-02-15 13:25:56', '2018-02-26 11:27:44'); INSERT INTO `userinfo` VALUES ('7', '9', null, null, null, null, null, null, null, null, null, '1', '2018-02-15 13:30:31', '2018-02-26 11:41:07'); INSERT INTO `userinfo` VALUES ('8', '10', null, null, null, null, null, null, null, null, null, '0', '2018-02-18 11:56:03', '2018-02-22 22:37:31'); INSERT INTO `userinfo` VALUES ('9', '11', '2', null, null, '', '', null, '', '', '', null, '2018-02-20 22:17:30', '2018-03-02 11:50:22'); INSERT INTO `userinfo` VALUES ('10', '12', null, null, null, null, null, null, null, null, null, null, '2018-03-02 15:10:42', null); INSERT INTO `userinfo` VALUES ('11', '13', null, null, null, null, null, null, null, null, null, null, '2018-03-02 15:10:47', null); INSERT INTO `userinfo` VALUES ('12', '14', null, null, null, null, null, null, null, null, null, null, '2018-03-02 15:11:00', null); INSERT INTO `userinfo` VALUES ('13', '15', null, null, null, null, null, null, null, null, null, null, '2018-03-02 15:11:03', null); INSERT INTO `userinfo` VALUES ('14', '16', null, null, null, null, null, null, null, null, null, null, '2018-03-02 15:11:05', null); INSERT INTO `userinfo` VALUES ('15', '17', null, null, null, null, null, null, null, null, null, null, '2018-03-02 15:11:07', null); INSERT INTO `userinfo` VALUES ('16', '18', null, null, null, null, null, null, null, null, null, '1', '2018-03-02 15:11:09', '2018-03-02 15:58:27'); -- ---------------------------- -- Table structure for users -- ---------------------------- DROP TABLE IF EXISTS `users`; CREATE TABLE `users` ( `id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(31) NOT NULL, `password` varchar(255) NOT NULL, `realname` varchar(31) NOT NULL, `department_id` int(11) NOT NULL, `position_id` int(11) NOT NULL, `is_del` varchar(1) NOT NULL DEFAULT '0', `last_login_time` timestamp NULL DEFAULT NULL, `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of users -- ---------------------------- INSERT INTO `users` VALUES ('1', 'admin', 'e10adc3949ba59abbe56e057f20f883e', '管理员', '1', '1', '0', '2018-03-17 22:09:30', '2018-02-13 22:32:48', '2018-03-17 22:09:29'); INSERT INTO `users` VALUES ('3', 'chengshanyunduo', 'e10adc3949ba59abbe56e057f20f883e', '程杉耘朵', '2', '4', '0', '2018-03-05 11:08:38', '2018-02-14 22:27:04', '2018-03-05 11:09:32'); INSERT INTO `users` VALUES ('7', 'csyd1028', 'e10adc3949ba59abbe56e057f20f883e', '耘朵', '2', '2', '1', null, '2018-02-14 22:47:02', '2018-03-01 13:49:17'); INSERT INTO `users` VALUES ('8', 'zhangminghui', 'e10adc3949ba59abbe56e057f20f883e', '张明辉', '3', '3', '0', '2018-03-08 16:14:12', '2018-02-15 13:25:56', '2018-03-08 16:14:12'); INSERT INTO `users` VALUES ('9', 'zmh0403', 'e10adc3949ba59abbe56e057f20f883e', '张大大', '2', '1', '0', '2018-03-01 13:18:30', '2018-02-15 13:30:31', '2018-03-01 13:18:29'); INSERT INTO `users` VALUES ('10', 'zhangdabao', 'e10adc3949ba59abbe56e057f20f883e', '张大宝', '5', '4', '0', '2018-03-01 13:22:16', '2018-02-18 11:56:02', '2018-03-01 13:22:16'); INSERT INTO `users` VALUES ('11', 'csyd11', 'e10adc3949ba59abbe56e057f20f883e', '程宝宝', '4', '3', '0', '2018-03-02 11:50:12', '2018-02-20 22:17:30', '2018-03-02 11:50:11'); INSERT INTO `users` VALUES ('12', 'testman', 'e10adc3949ba59abbe56e057f20f883e', '张三', '1', '1', '0', '2018-03-02 15:12:31', '2018-03-02 15:10:41', '2018-03-05 10:16:23'); INSERT INTO `users` VALUES ('13', 'testman123', 'e10adc3949ba59abbe56e057f20f883e', '李四', '5', '4', '0', null, '2018-03-02 15:10:47', '2018-03-05 10:16:26'); INSERT INTO `users` VALUES ('14', 'testman1', 'e10adc3949ba59abbe56e057f20f883e', '王五', '5', '4', '0', null, '2018-03-02 15:11:00', '2018-03-05 10:16:29'); INSERT INTO `users` VALUES ('15', 'testman11', 'e10adc3949ba59abbe56e057f20f883e', '赵六', '5', '4', '0', null, '2018-03-02 15:11:02', '2018-03-05 10:16:35'); INSERT INTO `users` VALUES ('16', 'testman111', 'e10adc3949ba59abbe56e057f20f883e', '测试员', '5', '4', '0', null, '2018-03-02 15:11:05', '2018-03-05 10:16:40'); INSERT INTO `users` VALUES ('17', 'testman1111', 'e10adc3949ba59abbe56e057f20f883e', '测试员', '2', '4', '0', null, '2018-03-02 15:11:07', '2018-03-11 10:44:16'); INSERT INTO `users` VALUES ('18', 'testman11111', 'e10adc3949ba59abbe56e057f20f883e', '测试员', '5', '4', '1', null, '2018-03-02 15:11:09', '2018-03-05 10:16:44'); ================================================ FILE: gradle/wrapper/gradle-wrapper.properties ================================================ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-3.5.1-bin.zip ================================================ FILE: gradlew ================================================ #!/usr/bin/env sh ############################################################################## ## ## Gradle start up script for UN*X ## ############################################################################## # Attempt to set APP_HOME # Resolve links: $0 may be a link PRG="$0" # Need this for relative symlinks. while [ -h "$PRG" ] ; do ls=`ls -ld "$PRG"` link=`expr "$ls" : '.*-> \(.*\)$'` if expr "$link" : '/.*' > /dev/null; then PRG="$link" else PRG=`dirname "$PRG"`"/$link" fi done SAVED="`pwd`" cd "`dirname \"$PRG\"`/" >/dev/null APP_HOME="`pwd -P`" cd "$SAVED" >/dev/null APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS="" # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" warn ( ) { echo "$*" } die ( ) { echo echo "$*" echo exit 1 } # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false case "`uname`" in CYGWIN* ) cygwin=true ;; Darwin* ) darwin=true ;; MINGW* ) msys=true ;; NONSTOP* ) nonstop=true ;; esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables JAVACMD="$JAVA_HOME/jre/sh/java" else JAVACMD="$JAVA_HOME/bin/java" fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else JAVACMD="java" which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi # Increase the maximum file descriptors if we can. if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then MAX_FD_LIMIT=`ulimit -H -n` if [ $? -eq 0 ] ; then if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then MAX_FD="$MAX_FD_LIMIT" fi ulimit -n $MAX_FD if [ $? -ne 0 ] ; then warn "Could not set maximum file descriptor limit: $MAX_FD" fi else warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" fi fi # For Darwin, add options to specify how the application appears in the dock if $darwin; then GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" fi # For Cygwin, switch paths to Windows format before running java if $cygwin ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` SEP="" for dir in $ROOTDIRSRAW ; do ROOTDIRS="$ROOTDIRS$SEP$dir" SEP="|" done OURCYGPATTERN="(^($ROOTDIRS))" # Add a user-defined pattern to the cygpath arguments if [ "$GRADLE_CYGPATTERN" != "" ] ; then OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" fi # Now convert the arguments - kludge to limit ourselves to /bin/sh i=0 for arg in "$@" ; do CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` else eval `echo args$i`="\"$arg\"" fi i=$((i+1)) done case $i in (0) set -- ;; (1) set -- "$args0" ;; (2) set -- "$args0" "$args1" ;; (3) set -- "$args0" "$args1" "$args2" ;; (4) set -- "$args0" "$args1" "$args2" "$args3" ;; (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; esac fi # Escape application args save ( ) { for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done echo " " } APP_ARGS=$(save "$@") # Collect all arguments for the java command, following the shell quoting and substitution rules eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then cd "$(dirname "$0")" fi exec "$JAVACMD" "$@" ================================================ FILE: gradlew.bat ================================================ @if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @rem @rem ########################################################################## @rem Set local scope for the variables with windows NT shell if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. set DEFAULT_JVM_OPTS= @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if "%ERRORLEVEL%" == "0" goto init echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo. echo Please set the JAVA_HOME variable in your environment to match the echo location of your Java installation. goto fail :findJavaFromJavaHome set JAVA_HOME=%JAVA_HOME:"=% set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto init echo. echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo. echo Please set the JAVA_HOME variable in your environment to match the echo location of your Java installation. goto fail :init @rem Get command-line arguments, handling Windows variants if not "%OS%" == "Windows_NT" goto win9xME_args :win9xME_args @rem Slurp the command line arguments. set CMD_LINE_ARGS= set _SKIP=2 :win9xME_args_slurp if "x%~1" == "x" goto execute set CMD_LINE_ARGS=%* :execute @rem Setup the command line set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar @rem Execute Gradle "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% :end @rem End local scope for the variables with windows NT shell if "%ERRORLEVEL%"=="0" goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 exit /b 1 :mainEnd if "%OS%"=="Windows_NT" endlocal :omega ================================================ FILE: src/main/java/com/zmh/projectoa/ProjectoaApplication.java ================================================ package com.zmh.projectoa; import de.codecentric.boot.admin.config.EnableAdminServer; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication @EnableAdminServer public class ProjectoaApplication { public static void main(String[] args) { SpringApplication.run(ProjectoaApplication.class, args); } } ================================================ FILE: src/main/java/com/zmh/projectoa/ServletInitializer.java ================================================ package com.zmh.projectoa; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.web.support.SpringBootServletInitializer; public class ServletInitializer extends SpringBootServletInitializer { @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { return application.sources(ProjectoaApplication.class); } } ================================================ FILE: src/main/java/com/zmh/projectoa/config/MyShiroRealm.java ================================================ package com.zmh.projectoa.config; import com.zmh.projectoa.model.Users; import com.zmh.projectoa.service.UsersService; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.shiro.SecurityUtils; import org.apache.shiro.authc.*; import org.apache.shiro.authz.AuthorizationInfo; import org.apache.shiro.authz.SimpleAuthorizationInfo; import org.apache.shiro.realm.AuthorizingRealm; import org.apache.shiro.subject.PrincipalCollection; import org.springframework.beans.factory.annotation.Autowired; import java.util.HashSet; import java.util.Objects; import java.util.Set; /** * shiro的认证最终是交给了Realm进行执行 * 所以我们需要自己重新实现一个Realm,此Realm继承AuthorizingRealm * Created by sun on 2017-4-2. */ public class MyShiroRealm extends AuthorizingRealm { private static final Log logger = LogFactory.getLog(MyShiroRealm.class); @Autowired UsersService usersService; /** * 登录认证 */ @Override protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken authenticationToken) throws AuthenticationException { //1.把AuthenticationToken转换为UsernamePasswordToken UsernamePasswordToken upToken = (UsernamePasswordToken) authenticationToken; //2.从UsernamePasswordToken中来获取username String username = upToken.getUsername(); //3.调用数据库的方法, 从数据库中查询username对应的用户记录 Users temp = new Users(); temp.setUsername(username); Users user = usersService.queryUserByUsername(temp); //4.若用户不存在, 则可抛出UnknownAccountException异常 if (Objects.isNull(user)){ throw new UnknownAccountException("用户不存在"); } //5.根据用户信息的情况,决定是否需要抛出其他的AuthenticationException异常 if ("1".equals(user.getIsDel())){ throw new LockedAccountException("用户状态异常"); } //6.根据用户的情况, 来构建AuthenticationInfo对象并返回, 通常使用的实现类为:SimpleAuthenticationInfo //以下信息是从数据库中获取的 //1.principal:认证的实体信息,可以是username,也可以是数表对应的实体类对象 Object principal = user; //2.creadentials: 密码 //String pw = MD5Util.string2MD5("123456"); Object credentials = user.getPassword(); //3. realName: 当前对象的name,调用弗雷的getName()方法即可 String realmName = user.getRealname(); SecurityUtils.getSubject().getSession().setAttribute("user", user); SimpleAuthenticationInfo info = new SimpleAuthenticationInfo(principal, credentials, realmName); return info; } /** * 权限认证(为当前登录的Subject授予角色和权限) * * 该方法的调用时机为需授权资源被访问时,并且每次访问需授权资源都会执行该方法中的逻辑,这表明本例中并未启用AuthorizationCache, * 如果连续访问同一个URL(比如刷新),该方法不会被重复调用,Shiro有一个时间间隔(也就是cache时间,在ehcache-shiro.xml中配置), * 超过这个时间间隔再刷新页面,该方法会被执行 * * doGetAuthorizationInfo()是权限控制, * 当访问到页面的时候,使用了相应的注解或者shiro标签才会执行此方法否则不会执行, * 所以如果只是简单的身份认证没有权限的控制的话,那么这个方法可以不进行实现,直接返回null即可 * * 简单来说这个方法的功能就是赋权 * 根据数据库里面的分类 * 不同的用户类型给与不同的权限 * 前后端会根据这里的权限,进行智能的显示其对应的页面和功能 * 如果强行访问无权访问的url也会被弹开 * * 这里是按照一个简单粗暴的方式分权 * admin享有一切权限 * * 人事的所有人都可以管理人员信息 * 经理及以上可以允许发送公告的行为 */ @Override protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) { //0.创建SimpleAuthorizationInfo SimpleAuthorizationInfo info = new SimpleAuthorizationInfo(); //1.从PrincipalCollection中获取登陆用户的信息 Object principal = principals.getPrimaryPrincipal(); //2.利用登陆用户的信息来获取当前用户的角色或权限(可能需要查询数据库) Users user = (Users) principal; //存放角色的set Set roles = new HashSet<>(); Integer departmentId = user.getDepartmentId(); Integer positionId = user.getPositionId(); //管理员角色 if (departmentId == 1){ roles.add("admin"); roles.add("user"); } //人事角色 if (departmentId == 2){ roles.add("user"); } info.setRoles(roles); //存放具体的行为的set Set permissions = new HashSet(); //只有管理员或者经理,才允许发送公告 if(positionId == 1 || positionId == 2){ permissions.add("notice"); } info.setStringPermissions(permissions); return info; } } ================================================ FILE: src/main/java/com/zmh/projectoa/config/ShiroConfiguration.java ================================================ package com.zmh.projectoa.config; import at.pollux.thymeleaf.shiro.dialect.ShiroDialect; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.shiro.authc.credential.HashedCredentialsMatcher; import org.apache.shiro.spring.LifecycleBeanPostProcessor; import org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor; import org.apache.shiro.spring.web.ShiroFilterFactoryBean; import org.apache.shiro.web.mgt.DefaultWebSecurityManager; import org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.transaction.annotation.EnableTransactionManagement; import java.util.LinkedHashMap; import java.util.Map; /** * Created by ChengShanyunduo * 2018/1/8 */ @Configuration @EnableTransactionManagement public class ShiroConfiguration { private final Log logger = LogFactory.getLog(ShiroConfiguration.class); @Bean(name = "myShiroRealm") public MyShiroRealm myShiroRealm(){ MyShiroRealm realm = new MyShiroRealm(); //前台输入的为mD5加密的 HashedCredentialsMatcher md5 = new HashedCredentialsMatcher("MD5"); realm.setCredentialsMatcher(md5); return realm; } @Bean(name = "lifecycleBeanPostProcessor") public LifecycleBeanPostProcessor lifecycleBeanPostProcessor(){ return new LifecycleBeanPostProcessor(); } @Bean public DefaultAdvisorAutoProxyCreator defaultAdvisorAutoProxyCreator(){ DefaultAdvisorAutoProxyCreator creator = new DefaultAdvisorAutoProxyCreator(); creator.setProxyTargetClass(true); return creator; } @Bean(name = "securityManager") public DefaultWebSecurityManager defaultWebSecurityManager(MyShiroRealm realm){ DefaultWebSecurityManager securityManager = new DefaultWebSecurityManager(); //设置realm,多个realm可以用securityManager.setRealms(); securityManager.setRealm(realm); //设置认证策略 //ModularRealmAuthenticator authenticator = new ModularRealmAuthenticator(); //authenticator.setAuthenticationStrategy(new AtLeastOneSuccessfulStrategy()); //securityManager.setAuthenticator(authenticator); return securityManager; } @Bean public AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor(DefaultWebSecurityManager securityManager){ AuthorizationAttributeSourceAdvisor advisor = new AuthorizationAttributeSourceAdvisor(); advisor.setSecurityManager(securityManager); return advisor; } //shirofilter,使用springboot时name可以随设置,不需要context设置, @Bean(name = "shiroFilter") public ShiroFilterFactoryBean shiroFilterFactoryBean(DefaultWebSecurityManager securityManager){ ShiroFilterFactoryBean factoryBean = new ShiroFilterFactoryBean(); factoryBean.setSecurityManager(securityManager); // 如果不设置默认会自动寻找Web工程根目录下的"/login.jsp"页面 //登录页面(请求) factoryBean.setLoginUrl("/login"); // 登录成功后要跳转的连接 (请求) factoryBean.setSuccessUrl("/index"); //没有权限页面 factoryBean.setUnauthorizedUrl("/403"); loadShiroFilterChain(factoryBean); return factoryBean; } @Bean public ShiroDialect shiroDialect() { return new ShiroDialect(); } /** * 加载ShiroFilter权限控制规则 * 这块代码是负责拦截的 * 也就是说,如果当前登陆的人,不符合访问某个url的访问权限条件的,直接给他弹开 * 也就是分配谁能访问谁 */ private void loadShiroFilterChain(ShiroFilterFactoryBean factoryBean) { /**下面这些规则配置最好配置到配置文件中*/ Map filterChainMap = new LinkedHashMap(); Map filterChainMapTemp = new LinkedHashMap(); /** authc:该过滤器下的页面必须验证后才能访问,它是Shiro内置的一个拦截器 * org.apache.shiro.web.filter.authc.FormAuthenticationFilter */ // anon:它对应的过滤器里面是空的,什么都没做,可以理解为不拦截 //authc:所有url都必须认证通过才可以访问; anon:所有url都都可以匿名访问 //暂时没有好的办法解决shiro和sba冲突问题, 暂时使用新的shiro配置方案 filterChainMap.put("/login", "anon"); filterChainMap.put("/login/check", "anon"); filterChainMap.put("/403", "anon"); filterChainMap.put("/assets/**", "anon"); filterChainMap.put("/js/**", "anon"); filterChainMap.put("/prism/**", "anon"); //给SpringBootAdmin开启权限 filterChainMap.put("/monitor/**", "anon"); filterChainMap.put("/api/**", "anon"); filterChainMap.put("/health/**", "anon"); //权限分配 filterChainMap.put("/admin/**", "authc,roles[admin]"); filterChainMap.put("/user/**", "authc,roles[user]"); //行为分配 filterChainMap.put("/notice/notice_create", "authc,perms[notice]"); filterChainMap.put("/notice/notice_send", "authc,perms[notice]"); //登出的过滤器 filterChainMap.put("/logout", "logout"); filterChainMap.put("/**", "authc"); /** * 为了放行Spring Boot Admin * 这里启用临时方案 PlanB * 将shiro倒过来使用 * 所有使用到的页面都加密成需要登陆才能访问 * 其余所有一律采取不拦截 */ filterChainMapTemp.put("/notice/notice_create", "authc,perms[notice]"); filterChainMapTemp.put("/notice/notice_send", "authc,perms[notice]"); filterChainMapTemp.put("/js/**", "authc"); filterChainMapTemp.put("/index/**", "authc"); filterChainMapTemp.put("/user/**", "authc,roles[user]"); filterChainMapTemp.put("/userinfo/**", "authc"); filterChainMapTemp.put("/calendar/**", "authc"); filterChainMapTemp.put("/admin/**", "authc,roles[admin]"); filterChainMapTemp.put("/message/**", "authc"); filterChainMapTemp.put("/notice/**", "authc"); filterChainMapTemp.put("/logout", "logout"); filterChainMapTemp.put("/**","anon"); factoryBean.setFilterChainDefinitionMap(filterChainMapTemp); } /*1.LifecycleBeanPostProcessor,这是个DestructionAwareBeanPostProcessor的子类,负责org.apache.shiro.util.Initializable类型bean的生命周期的,初始化和销毁。主要是AuthorizingRealm类的子类,以及EhCacheManager类。 2.HashedCredentialsMatcher,这个类是为了对密码进行编码的,防止密码在数据库里明码保存,当然在登陆认证的生活,这个类也负责对form里输入的密码进行编码。 3.ShiroRealm,这是个自定义的认证类,继承自AuthorizingRealm,负责用户的认证和权限的处理,可以参考JdbcRealm的实现。 4.EhCacheManager,缓存管理,用户登陆成功后,把用户信息和权限信息缓存起来,然后每次用户请求时,放入用户的session中,如果不设置这个bean,每个请求都会查询一次数据库。 5.SecurityManager,权限管理,这个类组合了登陆,登出,权限,session的处理,是个比较重要的类。 6.ShiroFilterFactoryBean,是个factorybean,为了生成ShiroFilter。它主要保持了三项数据,securityManager,filters,filterChainDefinitionManager。 7.DefaultAdvisorAutoProxyCreator,Spring的一个bean,由Advisor决定对哪些类的方法进行AOP代理。 8.AuthorizationAttributeSourceAdvisor,shiro里实现的Advisor类,内部使用AopAllianceAnnotationsAuthorizingMethodInterceptor来拦截用以下注解的方法。*/ } ================================================ FILE: src/main/java/com/zmh/projectoa/controller/AdminController.java ================================================ package com.zmh.projectoa.controller; import com.zmh.projectoa.dto.ReturnDto; import com.zmh.projectoa.util.ReadFileUtil; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; /** * @author zmh * @date 2018/2/18 16:24 * 在页面标签栏里显示日志文件 */ @Controller @RequestMapping(value = "/admin") public class AdminController { //这两个参数从application.properties获取 @Value("${logback.filepath}") private String filePath; @Value("${logback.charset}") private String charSet; /** * 获取所有日志文件的文件名 * @return */ @RequestMapping(value = "/getFileNames") @ResponseBody public ReturnDto getFileNames(){ return ReadFileUtil.getFileName(filePath); } /** * 获取所有日志文件的文件名 * @return */ @RequestMapping(value = "/readFiles") @ResponseBody public ReturnDto readFiles(@RequestParam("fileName")String fileName){ return ReadFileUtil.readFileByLines(filePath,fileName,charSet); } /** * 日志 */ @RequestMapping(value = "/logs") public String logs(){ return "logs"; } /** * 系统监控 */ @RequestMapping(value = "/springbootadmin") public String springbootadmin(){ return "springbootadmin"; } } ================================================ FILE: src/main/java/com/zmh/projectoa/controller/CalendarController.java ================================================ package com.zmh.projectoa.controller; import com.zmh.projectoa.dto.ReturnDto; import com.zmh.projectoa.service.RedisService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import javax.servlet.http.HttpServletRequest; @Controller public class CalendarController { @Autowired private RedisService redisService; /** * 日历 */ @RequestMapping(value = "/calendar") public String calendar() { return "calendar"; } /** * 缓存日志备注 * key是 calendar加userID * value是 JSON格式备注 */ @RequestMapping(value = "/calendarSetValue") @ResponseBody public ReturnDto calendarSetValue(@RequestParam("value") String value, HttpServletRequest request) { String key = "calendar_" + request.getSession().getAttribute("userID"); redisService.setValue(key, value); return ReturnDto.buildSuccessReturnDto(); } /** * 获取日志备注 * key是 calendar加userID * return是 JSON格式备注 */ @RequestMapping(value = "/calendarGetValue") @ResponseBody public ReturnDto calendarGetValue(HttpServletRequest request) { String key = "calendar_" + request.getSession().getAttribute("userID"); String value = redisService.getValue(key); if (value != null) { return ReturnDto.buildSuccessReturnDto(value); } else { return ReturnDto.buildFailedReturnDto("value is null"); } } } ================================================ FILE: src/main/java/com/zmh/projectoa/controller/DepartmentController.java ================================================ package com.zmh.projectoa.controller; import com.zmh.projectoa.dto.ReturnDto; import com.zmh.projectoa.model.Departments; import com.zmh.projectoa.service.DepartmentService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import java.util.List; /** * Created by ChengShanyunduo * 2018/2/14 */ @Controller @RequestMapping("/department") public class DepartmentController { @Autowired DepartmentService departmentService; /** * 查询部门 * @return */ @RequestMapping(value = "/query") @ResponseBody public ReturnDto queryDepartment(){ List departments = departmentService.queryDepartment(); return ReturnDto.buildSuccessReturnDto(departments); } } ================================================ FILE: src/main/java/com/zmh/projectoa/controller/IndexController.java ================================================ package com.zmh.projectoa.controller; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; /** * @Author: ZMH * @Date: 2018/2/9 22:49 * 主页的Controller */ @Controller public class IndexController { /** * 登陆跳转 */ @RequestMapping(value = "/") public String in(){ return "login"; } /** * 主页 */ @RequestMapping(value = "/index") public String index(){ return "index"; } /** * 没有权限访问 */ @RequestMapping(value = "/403") public String error403(){ return "403"; } } ================================================ FILE: src/main/java/com/zmh/projectoa/controller/LoginController.java ================================================ package com.zmh.projectoa.controller; import com.zmh.projectoa.dto.ReturnDto; import com.zmh.projectoa.model.Users; import com.zmh.projectoa.service.UsersService; import org.apache.shiro.SecurityUtils; import org.apache.shiro.authc.AuthenticationException; import org.apache.shiro.authc.IncorrectCredentialsException; import org.apache.shiro.authc.UsernamePasswordToken; import org.apache.shiro.subject.Subject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import javax.servlet.http.HttpServletRequest; import java.util.Date; /** * @Author: ZMH * @Date: 2018/2/9 22:48 * 登陆Controller */ @Controller public class LoginController { Logger logger = LoggerFactory.getLogger(LoginController.class.getName()); @Autowired UsersService usersService; @RequestMapping(value = "/login") public String login(){ return "login"; } @RequestMapping(value = "/login/check") //@ResponseBody public String check(@RequestParam("username")String username, @RequestParam("password")String password, HttpServletRequest request){ Subject currentUser = SecurityUtils.getSubject(); if (!currentUser.isAuthenticated()){ UsernamePasswordToken token = new UsernamePasswordToken(username, password); try { currentUser.login(token); Users user = (Users)currentUser.getPrincipals().getPrimaryPrincipal(); Integer id = user.getId(); user = new Users(); user.setLastLoginTime(new Date()); request.getSession().setAttribute("userID",id); usersService.editUser(id,user); }catch (IncorrectCredentialsException ae){ logger.error("登录验证不通过 : 账号或密码不正确! username:"+username+" password:"+password); } catch (AuthenticationException ae){ logger.error("登录验证不通过 : " + ae.getMessage()); } } return "redirect:/index"; //return ReturnDto.buildSuccessReturnDto(""); } } ================================================ FILE: src/main/java/com/zmh/projectoa/controller/MessageController.java ================================================ package com.zmh.projectoa.controller; import com.zmh.projectoa.dto.ReturnDto; import com.zmh.projectoa.model.Messages; import com.zmh.projectoa.service.MessageService; import com.zmh.projectoa.service.RedisService; import com.zmh.projectoa.service.UsersService; import com.zmh.projectoa.util.JSONUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import javax.servlet.http.HttpServletRequest; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Objects; /** * @author zmh * @date 2018/2/1521:41 * 站内信 */ @Controller @RequestMapping(value = "/message") public class MessageController { @Autowired UsersService usersService; @Autowired MessageService messageService; @Autowired RedisService redisService; /** * 站内信箱 */ @RequestMapping(value = "/message") public String message() { return "message"; } /** * 站内信详情 */ @RequestMapping(value = "/message_dtl/{id}") public String message_dtl() { return "message_dtl"; } /** * 发送站内信 */ @RequestMapping(value = "/send_message") @ResponseBody public ReturnDto sendMessage(@RequestParam("userIDs") String userIDs, @RequestParam("title") String title, @RequestParam("message") String message, HttpServletRequest request) { String userID[] = userIDs.split(","); Integer sendId = (Integer) request.getSession().getAttribute("userID"); for (String receiveId : userID) { Messages messages = new Messages(); messages.setSendId(sendId); messages.setReceiveId(Integer.parseInt(receiveId)); messages.setTitle(title); messages.setMessage(message); int messageID = messageService.insertMessage(messages); String unReadMessageIDs = redisService.getValue("message_" + receiveId); if (Objects.isNull(unReadMessageIDs) || "null".equals(unReadMessageIDs)) unReadMessageIDs = String.valueOf(messageID); else unReadMessageIDs += "," + messageID; redisService.setValue("message_" + receiveId, unReadMessageIDs); } return ReturnDto.buildSuccessReturnDto("success"); } /** * 返回特别定制的所有用户信息给用户选择站内信发给谁 */ @RequestMapping(value = "/getAllUser") @ResponseBody public ReturnDto getAllUser(HttpServletRequest request) { Integer id = (Integer) request.getSession().getAttribute("userID"); return usersService.getAllUser(id); } /** * 获取本人未读信息 */ @RequestMapping(value = "/getUnReadMessages") @ResponseBody public ReturnDto getUnReadMessages(HttpServletRequest request) { Integer id = (Integer) request.getSession().getAttribute("userID"); //这里的思路是去redis取message_+'本人id'为key的value 里面包含所有未读messageID String unReadMessageIDs = redisService.getValue("message_" + id); //取出来是空直接跳过 标准格式是10,22,44 代表未读messageID if (!Objects.isNull(unReadMessageIDs) && !"null".equals(unReadMessageIDs) && unReadMessageIDs.length() > 0) { List list = JSONUtil.String2List(unReadMessageIDs); //返回一个list map包括发件人姓名 和 message的 id titile List> selectByIDs = messageService.selectByIDs(list); return ReturnDto.buildSuccessReturnDto(selectByIDs); } return ReturnDto.buildFailedReturnDto("数据异常"); } /** * 设为已读 * 从redis中剔除这条 */ @RequestMapping(value = "/setIsRead") @ResponseBody public ReturnDto setIsRead(@RequestParam("id") Integer messageID, HttpServletRequest request) { Integer userID = (Integer) request.getSession().getAttribute("userID"); List list = new ArrayList<>(); String unReadMessageIDs = redisService.getValue("message_" + userID); //取出来是空直接跳过 标准格式是10,22,44 代表未读messageID if (!Objects.isNull(unReadMessageIDs) && !"null".equals(unReadMessageIDs)) { list = JSONUtil.String2List(unReadMessageIDs); } if(!list.contains(messageID)) return ReturnDto.buildFailedReturnDto("这条信息不存在"); list.remove(messageID); unReadMessageIDs = JSONUtil.List2String(list); redisService.setValue("message_" + userID, unReadMessageIDs); return ReturnDto.buildSuccessReturnDto("success"); } /** * 本人所有接收到的信 */ @RequestMapping(value = "/getMessages") @ResponseBody public ReturnDto getMessages(HttpServletRequest request) { Integer id = (Integer) request.getSession().getAttribute("userID"); Integer pageNum; try { pageNum = Integer.parseInt(request.getParameter("pageNum")); }catch (Exception e){ pageNum = 1; } return ReturnDto.buildSuccessReturnDto(messageService.selectByreceiveID(id, pageNum)); } /** * 返回某一条详细信息 * 新增判断这条信息是否属于这个人 */ @RequestMapping(value = "/getMessageDtl") @ResponseBody public ReturnDto checkMessage(@RequestParam("id") Integer id, HttpServletRequest request) { Integer userID = (Integer) request.getSession().getAttribute("userID"); Messages message = messageService.selectByID(id); if(userID != null && message != null && !"".equals(userID) && userID.intValue() == message.getReceiveId().intValue()) return ReturnDto.buildSuccessReturnDto(message); return ReturnDto.buildFailedReturnDto("没有权限"); } /** * 传入ID 返回发件人 */ @RequestMapping(value = "/getSendUserName") @ResponseBody public ReturnDto getSendUserName(@RequestParam("id") Integer id) { return ReturnDto.buildSuccessReturnDto(usersService.detailUser(id).getRealname()); } /** * 最后一条信息 */ @RequestMapping(value = "/getLastMessage") @ResponseBody public ReturnDto getLastMessage(HttpServletRequest request) { Integer id = (Integer) request.getSession().getAttribute("userID"); return ReturnDto.buildSuccessReturnDto(messageService.getLastMessage(id)); } } ================================================ FILE: src/main/java/com/zmh/projectoa/controller/NoticeController.java ================================================ package com.zmh.projectoa.controller; import com.zmh.projectoa.dto.ReturnDto; import com.zmh.projectoa.model.Notices; import com.zmh.projectoa.model.Users; import com.zmh.projectoa.service.NoticeService; import com.zmh.projectoa.service.RedisService; import com.zmh.projectoa.service.UsersService; import com.zmh.projectoa.util.JSONUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import javax.servlet.http.HttpServletRequest; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Objects; /** * @author zmh * @date 2018/2/1521:41 * 公告板 */ @Controller @RequestMapping("/notice") public class NoticeController { @Autowired private NoticeService noticeService; @Autowired private RedisService redisService; @Autowired private UsersService usersService; /** * 通知公告 */ @RequestMapping(value = "/notice") public String notice() { return "notice"; } /** * 新建公告 */ @RequestMapping(value = "/notice_create") public String createNotice() { return "notice_create"; } /** * 公告详情 */ @RequestMapping(value = "/notice_dtl/{id}") public String message_dtl() { return "notice_dtl"; } /** * 发送站内信 * 这里接收到站内信后 * 存数据库 * 加入所有人的redis */ @RequestMapping(value = "/send_notice") @ResponseBody public ReturnDto sendNotice(@RequestParam("title") String title, @RequestParam("notice") String notice, HttpServletRequest request) { Integer userID = (Integer) request.getSession().getAttribute("userID"); Notices notices = new Notices(); notices.setSendId(userID); notices.setTitle(title); notices.setNotice(notice); //这里返回的是数据库里的noticeID Integer noticeID = noticeService.insertNotice(notices); //再存入所有人的redis List usersList = usersService.getAllUsers(); for (Users user : usersList) { List list = JSONUtil.String2List(redisService .getValue("notice_" + user.getId())); list.add(noticeID); redisService.setValue("notice_" + user.getId(), JSONUtil.List2String(list)); } return ReturnDto.buildSuccessReturnDto("success"); } /** * 获取本人未读信息 */ @RequestMapping(value = "/getUnReadNotices") @ResponseBody public ReturnDto getUnReadNotices(HttpServletRequest request) { Integer userID = (Integer) request.getSession().getAttribute("userID"); //这里的思路是去redis取message_+'本人id'为key的value 里面包含所有未读messageID String unReadNotices = redisService.getValue("notice_" + userID); //取出来是空直接跳过 标准格式是10,22,44 代表未读messageID List list = JSONUtil.String2List(unReadNotices); //返回一个list map包括发件人姓名 和 notice id titile if (list != null && list.size() > 0) { List> selectByIDs = noticeService.selectByIDs(list); return ReturnDto.buildSuccessReturnDto(selectByIDs); } return ReturnDto.buildFailedReturnDto("数据异常"); } /** * 本人所有接收到的信 */ @RequestMapping(value = "/getNotices") @ResponseBody public ReturnDto getNotices(@RequestParam(value = "pageNum") Integer pageNum) { return ReturnDto.buildSuccessReturnDto(noticeService.getAllNotices(pageNum)); } /** * 返回某一条详细信息 */ @RequestMapping(value = "/getNoticeDtl") @ResponseBody public ReturnDto checkMessage(@RequestParam("id") Integer id) { Notices notices = noticeService.selectByID(id); return ReturnDto.buildSuccessReturnDto(notices); } /** * 设为已读 * 从redis中剔除这条 */ @RequestMapping(value = "/setIsRead") @ResponseBody public ReturnDto setIsRead(@RequestParam("id") Integer noticeID, HttpServletRequest request) { Integer userID = (Integer) request.getSession().getAttribute("userID"); List list = new ArrayList<>(); String unReadNoticeIDs = redisService.getValue("notice_" + userID); //取出来是空直接跳过 标准格式是10,22,44 代表未读messageID if (!Objects.isNull(unReadNoticeIDs) && !"null".equals(unReadNoticeIDs)) { list = JSONUtil.String2List(unReadNoticeIDs); } if(!list.contains(noticeID)) return ReturnDto.buildFailedReturnDto("这条信息不存在"); list.remove(noticeID); unReadNoticeIDs = JSONUtil.List2String(list); redisService.setValue("notice_" + userID, unReadNoticeIDs); return ReturnDto.buildSuccessReturnDto("success"); } /** * 最后一条公告 */ @RequestMapping(value = "/getLastNotice") @ResponseBody public ReturnDto getLastMessage() { return ReturnDto.buildSuccessReturnDto(noticeService.getLastNotice()); } } ================================================ FILE: src/main/java/com/zmh/projectoa/controller/PositionController.java ================================================ package com.zmh.projectoa.controller; import com.zmh.projectoa.dto.ReturnDto; import com.zmh.projectoa.model.Positions; import com.zmh.projectoa.service.PositionService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import java.util.List; /** * Created by ChengShanyunduo * 2018/2/14 */ @Controller @RequestMapping("/position") public class PositionController { @Autowired PositionService positionService; /** * 查询职位 * @return */ @RequestMapping(value = "/query") @ResponseBody public ReturnDto queryPosition(){ List positions = positionService.queryPosition(); return ReturnDto.buildSuccessReturnDto(positions); } } ================================================ FILE: src/main/java/com/zmh/projectoa/controller/UserinfoController.java ================================================ package com.zmh.projectoa.controller; import com.zmh.projectoa.dto.ReturnDto; import com.zmh.projectoa.model.Userinfo; import com.zmh.projectoa.model.Users; import com.zmh.projectoa.service.RedisService; import com.zmh.projectoa.service.UserinfoService; import com.zmh.projectoa.service.UsersService; import com.zmh.projectoa.util.MD5Util; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import javax.servlet.http.HttpServletRequest; /** * Created by ChengShanyunduo * 2018/2/25 */ @Controller @RequestMapping("/userinfo") public class UserinfoController { Logger logger = LoggerFactory.getLogger(LoginController.class.getName()); @Autowired UserinfoService userinfoService; @Autowired UsersService usersService; @Autowired RedisService redisService; /** * 默认头像 */ public static final Integer defaultHeadImage = 9; /** * 个人 */ @RequestMapping(value = "/userinfo") public String userinfo() { return "userinfo"; } @RequestMapping(value = "/getUserinfo") @ResponseBody public ReturnDto getUserinfo(HttpServletRequest request) { //id应该再session中取,id为user表中id Integer id = (Integer) request.getSession().getAttribute("userID"); Userinfo userinfo = userinfoService.getUserinfoByUserId(id); return ReturnDto.buildSuccessReturnDto(userinfo); } @RequestMapping(value = "/saveUserinfo") @ResponseBody public ReturnDto saveUserinfo(Userinfo userinfo, HttpServletRequest request) { //id应该再session中取,id为user表中id Integer id = (Integer) request.getSession().getAttribute("userID"); userinfo.setUserId(id); //头像保存到redis redisService.setValue("headImage_" + id, String.valueOf(userinfo.getHeadImage())); int result = userinfoService.saveUserinfo(userinfo); if (result == 1) { return ReturnDto.buildSuccessReturnDto("保存成功"); } else { return ReturnDto.buildFailedReturnDto("保存失败,请联系管理员"); } } @RequestMapping(value = "/getSelf") @ResponseBody public ReturnDto getSelf(HttpServletRequest request) { //用户id从session中取,是user表中的id Integer id = (Integer) request.getSession().getAttribute("userID"); Users user = usersService.detailUser(id); return ReturnDto.buildSuccessReturnDto(user); } @RequestMapping(value = "/changePassWord") public String changePassWord() { return "changePassWord"; } @RequestMapping(value = "/setNewPassWord") @ResponseBody public ReturnDto setPassWord(@RequestParam("oldpassword") String oldpassword, @RequestParam("newpassword") String newpassword, @RequestParam("repeatpassword") String repeatpassword, HttpServletRequest request) { //用户id从session中取,是user表中的id Integer id = (Integer) request.getSession().getAttribute("userID"); //验证旧密码是否正确环节 Users user = usersService.detailUser(id); if (!user.getPassword().equals(MD5Util.string2MD5(oldpassword))) { logger.error("旧密码不正确"); return ReturnDto.buildFailedReturnDto("旧密码不正确"); } System.out.println(newpassword + "\t" + repeatpassword); //验证新密码是否合法环节 首先防止null或者空字符串蒙混过关 并且再次确认两次输入一致 if (newpassword != null && !"".equals(newpassword) && newpassword.equals(repeatpassword)) { //验证新密码是否合法 if (!newpassword.matches(".*[a-zA-Z0-9]+.*") || newpassword.length() > 20 || newpassword.length() < 6) { logger.error("新密码不合法"); return ReturnDto.buildFailedReturnDto("新密码不合法"); } //更新新密码 Users temp = new Users(); temp.setPassword(MD5Util.string2MD5(newpassword)); int i = usersService.editUser(id, temp); System.out.println(i + " " + MD5Util.string2MD5(newpassword)); if (i > 0) { //返回修改成功 return ReturnDto.buildSuccessReturnDto("success"); } } logger.error("未知的异常"); //默认返回错误 return ReturnDto.buildFailedReturnDto("error"); } /** * 根据 id 返回头像num */ @RequestMapping(value = "/getHeadImageNumByID") @ResponseBody public ReturnDto getHeadImageNumByID(HttpServletRequest request) { Integer id = (Integer) request.getSession().getAttribute("userID"); String num = redisService.getValue("headImage_" + id); Integer result = defaultHeadImage;//先给个默认值 try { result = Integer.parseInt(num); } catch (NumberFormatException e) { } return ReturnDto.buildSuccessReturnDto(result); } /** * 根据 id 返回头像num * 这里先获取redis中best的ID,是最佳员工的userID * 再获取这个人的头像 * 那么这个人如果没设置过头像 redis的headImage_+他的ID是没有内容的 * 这样的情况下给默认值1 就是用默认的头像01.jpg */ @RequestMapping(value = "/getBestImageNum") @ResponseBody public ReturnDto getBestImageNum() { String num = redisService.getValue("headImage_" + redisService.getValue("best")); Integer result = defaultHeadImage;//先给个默认值 try { if(num != null && !"".equals(num)) result = Integer.parseInt(num); } catch (NumberFormatException e) { } return ReturnDto.buildSuccessReturnDto(result); } /** * 获取最佳员工姓名 */ @RequestMapping(value = "/getBestUserName") @ResponseBody public ReturnDto getBestUserName() { String result = "暂无"; try { String num = redisService.getValue("best"); if(num != null && !"".equals(num)) result = usersService.detailUser(Integer.parseInt(num)).getRealname(); } catch (NumberFormatException e) { e.printStackTrace(); } return ReturnDto.buildSuccessReturnDto(result); } } ================================================ FILE: src/main/java/com/zmh/projectoa/controller/UsersController.java ================================================ package com.zmh.projectoa.controller; import com.github.pagehelper.PageInfo; import com.zmh.projectoa.dto.ReturnDto; import com.zmh.projectoa.model.Userinfo; import com.zmh.projectoa.model.Users; import com.zmh.projectoa.service.RedisService; import com.zmh.projectoa.service.UserinfoService; import com.zmh.projectoa.service.UsersService; import com.zmh.projectoa.util.ParameterUtil; import org.apache.ibatis.annotations.Param; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; import javax.websocket.server.PathParam; import java.util.List; import java.util.Map; import java.util.Objects; /** * Created by ChengShanyunduo * 2018/2/14 */ @Controller @RequestMapping("/user") public class UsersController { @Autowired UsersService usersService; @Autowired UserinfoService userinfoService; @Autowired RedisService redisService; /** * 人员 */ @RequestMapping(value = "/user") public String user(){ return "user"; } /** * 创建用户页面 * @return */ @RequestMapping(value = "/user_create") public String createView(){ return "user_create"; } /** * 创建职工 * @param users * @return */ @RequestMapping(value = "/userCreate") @ResponseBody public ReturnDto createUser(Users users){ if (Objects.isNull(users.getUsername())){ return ReturnDto.buildFailedReturnDto("请输入用户名"); } if (Objects.isNull(users.getRealname())){ return ReturnDto.buildFailedReturnDto("请输入员工姓名"); } if (Objects.isNull(users.getDepartmentId())){ return ReturnDto.buildFailedReturnDto("请选择部门"); } if (Objects.isNull(users.getPositionId())){ return ReturnDto.buildFailedReturnDto("请选择职位"); } Users user = usersService.queryUserByUsername(users); if (!Objects.isNull(user)){ return ReturnDto.buildFailedReturnDto("用户名已存在"); } int count = usersService.createUser(users); if (count == 1){ return ReturnDto.buildSuccessReturnDto("创建成功"); }else { return ReturnDto.buildFailedReturnDto("创建失败"); } } /** * 用户列表 * @param users * @return */ @RequestMapping(value = "/userList") @ResponseBody public ReturnDto userList(HttpServletRequest request){ Map map = ParameterUtil.getParameterMap(request); Integer pageNum = 0; if (map.containsKey("pageNum")){ pageNum = Integer.parseInt(map.get("pageNum").toString()); }else { pageNum = 1; } PageInfo list = usersService.userList(map, pageNum); return ReturnDto.buildSuccessReturnDto(list); } /** * 修改用户页面 * @param * @return */ @RequestMapping(value = "/edit/{id}") public String editView(){ return "user_edit"; } /** * 用户回显 * @param id * @return */ @RequestMapping(value = "/detailUser/{id}") @ResponseBody public ReturnDto detailUser(@PathVariable(name="id") Integer id){ Users user = usersService.detailUser(id); return ReturnDto.buildSuccessReturnDto(user); } /** * 修改用户 * @param id * @param user * @return */ @RequestMapping(value = "/userEdit/{id}") @ResponseBody public ReturnDto editUser(@PathVariable(name="id") Integer id, Users user){ int result = usersService.editUser(id, user); if (result == 1){ return ReturnDto.buildSuccessReturnDto("修改成功"); }else { return ReturnDto.buildFailedReturnDto("修改失败"); } } /** * 删除用户 * @param id * @return */ @RequestMapping(value = "/userDelete/{id}") @ResponseBody public ReturnDto userDelete(@PathVariable(name="id") Integer id){ int result = usersService.deleteUser(id); if (result == 1){ return ReturnDto.buildSuccessReturnDto("删除成功"); }else { return ReturnDto.buildFailedReturnDto("删除失败,请联系管理员"); } } /** * 重置密码 * @param id * @return */ @RequestMapping(value = "/userReverse/{id}") @ResponseBody public ReturnDto userReverse(@PathVariable(name="id") Integer id){ int result = usersService.reverseUser(id); if (result == 1){ return ReturnDto.buildSuccessReturnDto("重置成功"); }else { return ReturnDto.buildFailedReturnDto("重置失败,请联系管理员"); } } @RequestMapping(value = "/setBest") @ResponseBody public ReturnDto setBest(@RequestParam("id")Integer id){ redisService.setValue("best",String.valueOf(id)); return ReturnDto.buildSuccessReturnDto("重置成功"); } @RequestMapping(value = "/getUser") @ResponseBody public ReturnDto getUser(@RequestParam("userID")Integer id){ Users user = usersService.detailUser(id); return ReturnDto.buildSuccessReturnDto(user); } @RequestMapping(value = "/userinfo/{id}") public String userinfoPage(){ return "userinfo_detail"; } @RequestMapping(value = "/userinfo/detail/{id}") @ResponseBody public ReturnDto userinfoDetail(@PathVariable(name="id") Integer id){ Userinfo userinfo = userinfoService.getUserinfoByUserId(id); return ReturnDto.buildSuccessReturnDto(userinfo); } } ================================================ FILE: src/main/java/com/zmh/projectoa/dto/ReturnDto.java ================================================ package com.zmh.projectoa.dto; /** * Created by ChengShanyunduo * 2017/12/29 */ public class ReturnDto { private String code; private String message; private Object value; private String status; private String errorMessage; public ReturnDto() { } public ReturnDto(String code, String message, Object value) { this.code = code; this.message = message; this.value = value; } public ReturnDto(String status) { this.status = status; } public ReturnDto(String status, String errorMessage) { this.status = status; this.errorMessage = errorMessage; } public static ReturnDto buildSuccessReturnDto() { return new ReturnDto("OK"); } public static ReturnDto buildFailReturnDto(String errorMessage) { return new ReturnDto("ERROR", errorMessage); } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public String getErrorMessage() { return errorMessage; } public void setErrorMessage(String errorMessage) { this.errorMessage = errorMessage; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public Object getValue() { return value; } public void setValue(Object value) { this.value = value; } public static ReturnDto buildSuccessReturnDto(Object value) { return new ReturnDto("000", "Success", value); } public static ReturnDto buildFailedReturnDto(String failMessage) { return new ReturnDto("101", failMessage, null); } public static ReturnDto buildSystemErrorReturnDto() { return new ReturnDto("599", "System Error", null); } @Override public String toString() { return "ReturnDto{" + "code='" + code + '\'' + ", message='" + message + '\'' + ", value='" + value + '\'' + '}'; } } ================================================ FILE: src/main/java/com/zmh/projectoa/mapper/CalendarMapper.java ================================================ package com.zmh.projectoa.mapper; import com.zmh.projectoa.model.Calendar; import com.zmh.projectoa.model.CalendarExample; import java.util.List; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @Mapper public interface CalendarMapper { long countByExample(CalendarExample example); int deleteByExample(CalendarExample example); int deleteByPrimaryKey(Integer id); int insert(Calendar record); int insertSelective(Calendar record); List selectByExample(CalendarExample example); Calendar selectByPrimaryKey(Integer id); int updateByExampleSelective(@Param("record") Calendar record, @Param("example") CalendarExample example); int updateByExample(@Param("record") Calendar record, @Param("example") CalendarExample example); int updateByPrimaryKeySelective(Calendar record); int updateByPrimaryKey(Calendar record); } ================================================ FILE: src/main/java/com/zmh/projectoa/mapper/DepartmentsMapper.java ================================================ package com.zmh.projectoa.mapper; import com.zmh.projectoa.model.Departments; import com.zmh.projectoa.model.DepartmentsExample; import java.util.List; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @Mapper public interface DepartmentsMapper { long countByExample(DepartmentsExample example); int deleteByExample(DepartmentsExample example); int deleteByPrimaryKey(Integer id); int insert(Departments record); int insertSelective(Departments record); List selectByExample(DepartmentsExample example); Departments selectByPrimaryKey(Integer id); int updateByExampleSelective(@Param("record") Departments record, @Param("example") DepartmentsExample example); int updateByExample(@Param("record") Departments record, @Param("example") DepartmentsExample example); int updateByPrimaryKeySelective(Departments record); int updateByPrimaryKey(Departments record); } ================================================ FILE: src/main/java/com/zmh/projectoa/mapper/MessagesMapper.java ================================================ package com.zmh.projectoa.mapper; import com.zmh.projectoa.model.Messages; import com.zmh.projectoa.model.MessagesExample; import java.util.List; import java.util.Map; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @Mapper public interface MessagesMapper { long countByExample(MessagesExample example); int deleteByExample(MessagesExample example); int deleteByPrimaryKey(Integer id); int insert(Messages record); int insertSelective(Messages record); List selectByExampleWithBLOBs(MessagesExample example); List selectByExample(MessagesExample example); List> selectByreceiveID(Integer ID); List> selectByIDs(List IDs); List> selectLastOneByReceiveID(Integer receiveID); Messages selectByPrimaryKey(Integer id); int updateByExampleSelective(@Param("record") Messages record, @Param("example") MessagesExample example); int updateByExampleWithBLOBs(@Param("record") Messages record, @Param("example") MessagesExample example); int updateByExample(@Param("record") Messages record, @Param("example") MessagesExample example); int updateByPrimaryKeySelective(Messages record); int updateByPrimaryKeyWithBLOBs(Messages record); int updateByPrimaryKey(Messages record); } ================================================ FILE: src/main/java/com/zmh/projectoa/mapper/NoticesMapper.java ================================================ package com.zmh.projectoa.mapper; import com.zmh.projectoa.model.Notices; import com.zmh.projectoa.model.NoticesExample; import java.util.List; import java.util.Map; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @Mapper public interface NoticesMapper { long countByExample(NoticesExample example); int deleteByExample(NoticesExample example); int deleteByPrimaryKey(Integer id); int insert(Notices record); int insertSelective(Notices record); List selectByExampleWithBLOBs(NoticesExample example); List selectByExample(NoticesExample example); List> selectLastOneByReceiveID(); Notices selectByPrimaryKey(Integer id); int updateByExampleSelective(@Param("record") Notices record, @Param("example") NoticesExample example); int updateByExampleWithBLOBs(@Param("record") Notices record, @Param("example") NoticesExample example); int updateByExample(@Param("record") Notices record, @Param("example") NoticesExample example); int updateByPrimaryKeySelective(Notices record); int updateByPrimaryKeyWithBLOBs(Notices record); int updateByPrimaryKey(Notices record); List> selectAllNotice(); List> selectByIDs(List IDs); } ================================================ FILE: src/main/java/com/zmh/projectoa/mapper/PositionsMapper.java ================================================ package com.zmh.projectoa.mapper; import com.zmh.projectoa.model.Positions; import com.zmh.projectoa.model.PositionsExample; import java.util.List; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @Mapper public interface PositionsMapper { long countByExample(PositionsExample example); int deleteByExample(PositionsExample example); int deleteByPrimaryKey(Integer id); int insert(Positions record); int insertSelective(Positions record); List selectByExample(PositionsExample example); Positions selectByPrimaryKey(Integer id); int updateByExampleSelective(@Param("record") Positions record, @Param("example") PositionsExample example); int updateByExample(@Param("record") Positions record, @Param("example") PositionsExample example); int updateByPrimaryKeySelective(Positions record); int updateByPrimaryKey(Positions record); } ================================================ FILE: src/main/java/com/zmh/projectoa/mapper/UserinfoMapper.java ================================================ package com.zmh.projectoa.mapper; import com.zmh.projectoa.model.Userinfo; import com.zmh.projectoa.model.UserinfoExample; import java.util.List; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @Mapper public interface UserinfoMapper { long countByExample(UserinfoExample example); int deleteByExample(UserinfoExample example); int deleteByPrimaryKey(Integer id); int insert(Userinfo record); int insertSelective(Userinfo record); List selectByExample(UserinfoExample example); Userinfo selectByPrimaryKey(Integer id); int updateByExampleSelective(@Param("record") Userinfo record, @Param("example") UserinfoExample example); int updateByExample(@Param("record") Userinfo record, @Param("example") UserinfoExample example); int updateByPrimaryKeySelective(Userinfo record); int updateByPrimaryKey(Userinfo record); Userinfo queryUserinfoByUserid(Integer userId); } ================================================ FILE: src/main/java/com/zmh/projectoa/mapper/UsersMapper.java ================================================ package com.zmh.projectoa.mapper; import com.zmh.projectoa.model.Users; import com.zmh.projectoa.model.UsersExample; import java.util.List; import java.util.Map; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @Mapper public interface UsersMapper { long countByExample(UsersExample example); int deleteByExample(UsersExample example); int deleteByPrimaryKey(Integer id); int insert(Users record); int insertSelective(Users record); List selectByExample(UsersExample example); Users selectByPrimaryKey(Integer id); int updateByExampleSelective(@Param("record") Users record, @Param("example") UsersExample example); int updateByExample(@Param("record") Users record, @Param("example") UsersExample example); int updateByPrimaryKeySelective(Users record); int updateByPrimaryKey(Users record); Users queryUserByUsername (@Param("username") String username); List queryBySelective(Map map); List> queryAll(Integer id); List queryAllUsers(); } ================================================ FILE: src/main/java/com/zmh/projectoa/model/Calendar.java ================================================ package com.zmh.projectoa.model; import java.io.Serializable; import java.util.Date; /** * @author */ public class Calendar implements Serializable { private Integer id; private Integer userId; private String title; private Date startTime; private Date endTime; private Date createTime; private Date updateTime; private static final long serialVersionUID = 1L; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Integer getUserId() { return userId; } public void setUserId(Integer userId) { this.userId = userId; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public Date getStartTime() { return startTime; } public void setStartTime(Date startTime) { this.startTime = startTime; } public Date getEndTime() { return endTime; } public void setEndTime(Date endTime) { this.endTime = endTime; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public Date getUpdateTime() { return updateTime; } public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; } @Override public boolean equals(Object that) { if (this == that) { return true; } if (that == null) { return false; } if (getClass() != that.getClass()) { return false; } Calendar other = (Calendar) that; return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) && (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle())) && (this.getStartTime() == null ? other.getStartTime() == null : this.getStartTime().equals(other.getStartTime())) && (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime())) && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())); } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode()); result = prime * result + ((getStartTime() == null) ? 0 : getStartTime().hashCode()); result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode()); result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); return result; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", userId=").append(userId); sb.append(", title=").append(title); sb.append(", startTime=").append(startTime); sb.append(", endTime=").append(endTime); sb.append(", createTime=").append(createTime); sb.append(", updateTime=").append(updateTime); sb.append(", serialVersionUID=").append(serialVersionUID); sb.append("]"); return sb.toString(); } } ================================================ FILE: src/main/java/com/zmh/projectoa/model/CalendarExample.java ================================================ package com.zmh.projectoa.model; import java.util.ArrayList; import java.util.Date; import java.util.List; public class CalendarExample { protected String orderByClause; protected boolean distinct; protected List oredCriteria; private Integer limit; private Integer offset; public CalendarExample() { oredCriteria = new ArrayList(); } public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; } public String getOrderByClause() { return orderByClause; } public void setDistinct(boolean distinct) { this.distinct = distinct; } public boolean isDistinct() { return distinct; } public List getOredCriteria() { return oredCriteria; } public void or(Criteria criteria) { oredCriteria.add(criteria); } public Criteria or() { Criteria criteria = createCriteriaInternal(); oredCriteria.add(criteria); return criteria; } public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); if (oredCriteria.size() == 0) { oredCriteria.add(criteria); } return criteria; } protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); return criteria; } public void clear() { oredCriteria.clear(); orderByClause = null; distinct = false; } public void setLimit(Integer limit) { this.limit = limit; } public Integer getLimit() { return limit; } public void setOffset(Integer offset) { this.offset = offset; } public Integer getOffset() { return offset; } protected abstract static class GeneratedCriteria { protected List criteria; protected GeneratedCriteria() { super(); criteria = new ArrayList(); } public boolean isValid() { return criteria.size() > 0; } public List getAllCriteria() { return criteria; } public List getCriteria() { return criteria; } protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); } protected void addCriterion(String condition, Object value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); } protected void addCriterion(String condition, Object value1, Object value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); } public Criteria andIdIsNull() { addCriterion("id is null"); return (Criteria) this; } public Criteria andIdIsNotNull() { addCriterion("id is not null"); return (Criteria) this; } public Criteria andIdEqualTo(Integer value) { addCriterion("id =", value, "id"); return (Criteria) this; } public Criteria andIdNotEqualTo(Integer value) { addCriterion("id <>", value, "id"); return (Criteria) this; } public Criteria andIdGreaterThan(Integer value) { addCriterion("id >", value, "id"); return (Criteria) this; } public Criteria andIdGreaterThanOrEqualTo(Integer value) { addCriterion("id >=", value, "id"); return (Criteria) this; } public Criteria andIdLessThan(Integer value) { addCriterion("id <", value, "id"); return (Criteria) this; } public Criteria andIdLessThanOrEqualTo(Integer value) { addCriterion("id <=", value, "id"); return (Criteria) this; } public Criteria andIdIn(List values) { addCriterion("id in", values, "id"); return (Criteria) this; } public Criteria andIdNotIn(List values) { addCriterion("id not in", values, "id"); return (Criteria) this; } public Criteria andIdBetween(Integer value1, Integer value2) { addCriterion("id between", value1, value2, "id"); return (Criteria) this; } public Criteria andIdNotBetween(Integer value1, Integer value2) { addCriterion("id not between", value1, value2, "id"); return (Criteria) this; } public Criteria andUserIdIsNull() { addCriterion("user_id is null"); return (Criteria) this; } public Criteria andUserIdIsNotNull() { addCriterion("user_id is not null"); return (Criteria) this; } public Criteria andUserIdEqualTo(Integer value) { addCriterion("user_id =", value, "userId"); return (Criteria) this; } public Criteria andUserIdNotEqualTo(Integer value) { addCriterion("user_id <>", value, "userId"); return (Criteria) this; } public Criteria andUserIdGreaterThan(Integer value) { addCriterion("user_id >", value, "userId"); return (Criteria) this; } public Criteria andUserIdGreaterThanOrEqualTo(Integer value) { addCriterion("user_id >=", value, "userId"); return (Criteria) this; } public Criteria andUserIdLessThan(Integer value) { addCriterion("user_id <", value, "userId"); return (Criteria) this; } public Criteria andUserIdLessThanOrEqualTo(Integer value) { addCriterion("user_id <=", value, "userId"); return (Criteria) this; } public Criteria andUserIdIn(List values) { addCriterion("user_id in", values, "userId"); return (Criteria) this; } public Criteria andUserIdNotIn(List values) { addCriterion("user_id not in", values, "userId"); return (Criteria) this; } public Criteria andUserIdBetween(Integer value1, Integer value2) { addCriterion("user_id between", value1, value2, "userId"); return (Criteria) this; } public Criteria andUserIdNotBetween(Integer value1, Integer value2) { addCriterion("user_id not between", value1, value2, "userId"); return (Criteria) this; } public Criteria andTitleIsNull() { addCriterion("title is null"); return (Criteria) this; } public Criteria andTitleIsNotNull() { addCriterion("title is not null"); return (Criteria) this; } public Criteria andTitleEqualTo(String value) { addCriterion("title =", value, "title"); return (Criteria) this; } public Criteria andTitleNotEqualTo(String value) { addCriterion("title <>", value, "title"); return (Criteria) this; } public Criteria andTitleGreaterThan(String value) { addCriterion("title >", value, "title"); return (Criteria) this; } public Criteria andTitleGreaterThanOrEqualTo(String value) { addCriterion("title >=", value, "title"); return (Criteria) this; } public Criteria andTitleLessThan(String value) { addCriterion("title <", value, "title"); return (Criteria) this; } public Criteria andTitleLessThanOrEqualTo(String value) { addCriterion("title <=", value, "title"); return (Criteria) this; } public Criteria andTitleLike(String value) { addCriterion("title like", value, "title"); return (Criteria) this; } public Criteria andTitleNotLike(String value) { addCriterion("title not like", value, "title"); return (Criteria) this; } public Criteria andTitleIn(List values) { addCriterion("title in", values, "title"); return (Criteria) this; } public Criteria andTitleNotIn(List values) { addCriterion("title not in", values, "title"); return (Criteria) this; } public Criteria andTitleBetween(String value1, String value2) { addCriterion("title between", value1, value2, "title"); return (Criteria) this; } public Criteria andTitleNotBetween(String value1, String value2) { addCriterion("title not between", value1, value2, "title"); return (Criteria) this; } public Criteria andStartTimeIsNull() { addCriterion("start_time is null"); return (Criteria) this; } public Criteria andStartTimeIsNotNull() { addCriterion("start_time is not null"); return (Criteria) this; } public Criteria andStartTimeEqualTo(Date value) { addCriterion("start_time =", value, "startTime"); return (Criteria) this; } public Criteria andStartTimeNotEqualTo(Date value) { addCriterion("start_time <>", value, "startTime"); return (Criteria) this; } public Criteria andStartTimeGreaterThan(Date value) { addCriterion("start_time >", value, "startTime"); return (Criteria) this; } public Criteria andStartTimeGreaterThanOrEqualTo(Date value) { addCriterion("start_time >=", value, "startTime"); return (Criteria) this; } public Criteria andStartTimeLessThan(Date value) { addCriterion("start_time <", value, "startTime"); return (Criteria) this; } public Criteria andStartTimeLessThanOrEqualTo(Date value) { addCriterion("start_time <=", value, "startTime"); return (Criteria) this; } public Criteria andStartTimeIn(List values) { addCriterion("start_time in", values, "startTime"); return (Criteria) this; } public Criteria andStartTimeNotIn(List values) { addCriterion("start_time not in", values, "startTime"); return (Criteria) this; } public Criteria andStartTimeBetween(Date value1, Date value2) { addCriterion("start_time between", value1, value2, "startTime"); return (Criteria) this; } public Criteria andStartTimeNotBetween(Date value1, Date value2) { addCriterion("start_time not between", value1, value2, "startTime"); return (Criteria) this; } public Criteria andEndTimeIsNull() { addCriterion("end_time is null"); return (Criteria) this; } public Criteria andEndTimeIsNotNull() { addCriterion("end_time is not null"); return (Criteria) this; } public Criteria andEndTimeEqualTo(Date value) { addCriterion("end_time =", value, "endTime"); return (Criteria) this; } public Criteria andEndTimeNotEqualTo(Date value) { addCriterion("end_time <>", value, "endTime"); return (Criteria) this; } public Criteria andEndTimeGreaterThan(Date value) { addCriterion("end_time >", value, "endTime"); return (Criteria) this; } public Criteria andEndTimeGreaterThanOrEqualTo(Date value) { addCriterion("end_time >=", value, "endTime"); return (Criteria) this; } public Criteria andEndTimeLessThan(Date value) { addCriterion("end_time <", value, "endTime"); return (Criteria) this; } public Criteria andEndTimeLessThanOrEqualTo(Date value) { addCriterion("end_time <=", value, "endTime"); return (Criteria) this; } public Criteria andEndTimeIn(List values) { addCriterion("end_time in", values, "endTime"); return (Criteria) this; } public Criteria andEndTimeNotIn(List values) { addCriterion("end_time not in", values, "endTime"); return (Criteria) this; } public Criteria andEndTimeBetween(Date value1, Date value2) { addCriterion("end_time between", value1, value2, "endTime"); return (Criteria) this; } public Criteria andEndTimeNotBetween(Date value1, Date value2) { addCriterion("end_time not between", value1, value2, "endTime"); return (Criteria) this; } public Criteria andCreateTimeIsNull() { addCriterion("create_time is null"); return (Criteria) this; } public Criteria andCreateTimeIsNotNull() { addCriterion("create_time is not null"); return (Criteria) this; } public Criteria andCreateTimeEqualTo(Date value) { addCriterion("create_time =", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeNotEqualTo(Date value) { addCriterion("create_time <>", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeGreaterThan(Date value) { addCriterion("create_time >", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { addCriterion("create_time >=", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeLessThan(Date value) { addCriterion("create_time <", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeLessThanOrEqualTo(Date value) { addCriterion("create_time <=", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeIn(List values) { addCriterion("create_time in", values, "createTime"); return (Criteria) this; } public Criteria andCreateTimeNotIn(List values) { addCriterion("create_time not in", values, "createTime"); return (Criteria) this; } public Criteria andCreateTimeBetween(Date value1, Date value2) { addCriterion("create_time between", value1, value2, "createTime"); return (Criteria) this; } public Criteria andCreateTimeNotBetween(Date value1, Date value2) { addCriterion("create_time not between", value1, value2, "createTime"); return (Criteria) this; } public Criteria andUpdateTimeIsNull() { addCriterion("update_time is null"); return (Criteria) this; } public Criteria andUpdateTimeIsNotNull() { addCriterion("update_time is not null"); return (Criteria) this; } public Criteria andUpdateTimeEqualTo(Date value) { addCriterion("update_time =", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeNotEqualTo(Date value) { addCriterion("update_time <>", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeGreaterThan(Date value) { addCriterion("update_time >", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { addCriterion("update_time >=", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeLessThan(Date value) { addCriterion("update_time <", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { addCriterion("update_time <=", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeIn(List values) { addCriterion("update_time in", values, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeNotIn(List values) { addCriterion("update_time not in", values, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeBetween(Date value1, Date value2) { addCriterion("update_time between", value1, value2, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { addCriterion("update_time not between", value1, value2, "updateTime"); return (Criteria) this; } } /** */ public static class Criteria extends GeneratedCriteria { protected Criteria() { super(); } } public static class Criterion { private String condition; private Object value; private Object secondValue; private boolean noValue; private boolean singleValue; private boolean betweenValue; private boolean listValue; private String typeHandler; public String getCondition() { return condition; } public Object getValue() { return value; } public Object getSecondValue() { return secondValue; } public boolean isNoValue() { return noValue; } public boolean isSingleValue() { return singleValue; } public boolean isBetweenValue() { return betweenValue; } public boolean isListValue() { return listValue; } public String getTypeHandler() { return typeHandler; } protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; this.value = value; this.typeHandler = typeHandler; if (value instanceof List) { this.listValue = true; } else { this.singleValue = true; } } protected Criterion(String condition, Object value) { this(condition, value, null); } protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; this.value = value; this.secondValue = secondValue; this.typeHandler = typeHandler; this.betweenValue = true; } protected Criterion(String condition, Object value, Object secondValue) { this(condition, value, secondValue, null); } } } ================================================ FILE: src/main/java/com/zmh/projectoa/model/Departments.java ================================================ package com.zmh.projectoa.model; import java.io.Serializable; import java.util.Date; /** * @author */ public class Departments implements Serializable { private Integer id; private String department; private Date createTime; private Date updateTime; private static final long serialVersionUID = 1L; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getDepartment() { return department; } public void setDepartment(String department) { this.department = department; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public Date getUpdateTime() { return updateTime; } public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; } @Override public boolean equals(Object that) { if (this == that) { return true; } if (that == null) { return false; } if (getClass() != that.getClass()) { return false; } Departments other = (Departments) that; return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) && (this.getDepartment() == null ? other.getDepartment() == null : this.getDepartment().equals(other.getDepartment())) && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())); } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getDepartment() == null) ? 0 : getDepartment().hashCode()); result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); return result; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", department=").append(department); sb.append(", createTime=").append(createTime); sb.append(", updateTime=").append(updateTime); sb.append(", serialVersionUID=").append(serialVersionUID); sb.append("]"); return sb.toString(); } } ================================================ FILE: src/main/java/com/zmh/projectoa/model/DepartmentsExample.java ================================================ package com.zmh.projectoa.model; import java.util.ArrayList; import java.util.Date; import java.util.List; public class DepartmentsExample { protected String orderByClause; protected boolean distinct; protected List oredCriteria; private Integer limit; private Integer offset; public DepartmentsExample() { oredCriteria = new ArrayList(); } public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; } public String getOrderByClause() { return orderByClause; } public void setDistinct(boolean distinct) { this.distinct = distinct; } public boolean isDistinct() { return distinct; } public List getOredCriteria() { return oredCriteria; } public void or(Criteria criteria) { oredCriteria.add(criteria); } public Criteria or() { Criteria criteria = createCriteriaInternal(); oredCriteria.add(criteria); return criteria; } public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); if (oredCriteria.size() == 0) { oredCriteria.add(criteria); } return criteria; } protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); return criteria; } public void clear() { oredCriteria.clear(); orderByClause = null; distinct = false; } public void setLimit(Integer limit) { this.limit = limit; } public Integer getLimit() { return limit; } public void setOffset(Integer offset) { this.offset = offset; } public Integer getOffset() { return offset; } protected abstract static class GeneratedCriteria { protected List criteria; protected GeneratedCriteria() { super(); criteria = new ArrayList(); } public boolean isValid() { return criteria.size() > 0; } public List getAllCriteria() { return criteria; } public List getCriteria() { return criteria; } protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); } protected void addCriterion(String condition, Object value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); } protected void addCriterion(String condition, Object value1, Object value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); } public Criteria andIdIsNull() { addCriterion("id is null"); return (Criteria) this; } public Criteria andIdIsNotNull() { addCriterion("id is not null"); return (Criteria) this; } public Criteria andIdEqualTo(Integer value) { addCriterion("id =", value, "id"); return (Criteria) this; } public Criteria andIdNotEqualTo(Integer value) { addCriterion("id <>", value, "id"); return (Criteria) this; } public Criteria andIdGreaterThan(Integer value) { addCriterion("id >", value, "id"); return (Criteria) this; } public Criteria andIdGreaterThanOrEqualTo(Integer value) { addCriterion("id >=", value, "id"); return (Criteria) this; } public Criteria andIdLessThan(Integer value) { addCriterion("id <", value, "id"); return (Criteria) this; } public Criteria andIdLessThanOrEqualTo(Integer value) { addCriterion("id <=", value, "id"); return (Criteria) this; } public Criteria andIdIn(List values) { addCriterion("id in", values, "id"); return (Criteria) this; } public Criteria andIdNotIn(List values) { addCriterion("id not in", values, "id"); return (Criteria) this; } public Criteria andIdBetween(Integer value1, Integer value2) { addCriterion("id between", value1, value2, "id"); return (Criteria) this; } public Criteria andIdNotBetween(Integer value1, Integer value2) { addCriterion("id not between", value1, value2, "id"); return (Criteria) this; } public Criteria andDepartmentIsNull() { addCriterion("department is null"); return (Criteria) this; } public Criteria andDepartmentIsNotNull() { addCriterion("department is not null"); return (Criteria) this; } public Criteria andDepartmentEqualTo(String value) { addCriterion("department =", value, "department"); return (Criteria) this; } public Criteria andDepartmentNotEqualTo(String value) { addCriterion("department <>", value, "department"); return (Criteria) this; } public Criteria andDepartmentGreaterThan(String value) { addCriterion("department >", value, "department"); return (Criteria) this; } public Criteria andDepartmentGreaterThanOrEqualTo(String value) { addCriterion("department >=", value, "department"); return (Criteria) this; } public Criteria andDepartmentLessThan(String value) { addCriterion("department <", value, "department"); return (Criteria) this; } public Criteria andDepartmentLessThanOrEqualTo(String value) { addCriterion("department <=", value, "department"); return (Criteria) this; } public Criteria andDepartmentLike(String value) { addCriterion("department like", value, "department"); return (Criteria) this; } public Criteria andDepartmentNotLike(String value) { addCriterion("department not like", value, "department"); return (Criteria) this; } public Criteria andDepartmentIn(List values) { addCriterion("department in", values, "department"); return (Criteria) this; } public Criteria andDepartmentNotIn(List values) { addCriterion("department not in", values, "department"); return (Criteria) this; } public Criteria andDepartmentBetween(String value1, String value2) { addCriterion("department between", value1, value2, "department"); return (Criteria) this; } public Criteria andDepartmentNotBetween(String value1, String value2) { addCriterion("department not between", value1, value2, "department"); return (Criteria) this; } public Criteria andCreateTimeIsNull() { addCriterion("create_time is null"); return (Criteria) this; } public Criteria andCreateTimeIsNotNull() { addCriterion("create_time is not null"); return (Criteria) this; } public Criteria andCreateTimeEqualTo(Date value) { addCriterion("create_time =", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeNotEqualTo(Date value) { addCriterion("create_time <>", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeGreaterThan(Date value) { addCriterion("create_time >", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { addCriterion("create_time >=", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeLessThan(Date value) { addCriterion("create_time <", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeLessThanOrEqualTo(Date value) { addCriterion("create_time <=", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeIn(List values) { addCriterion("create_time in", values, "createTime"); return (Criteria) this; } public Criteria andCreateTimeNotIn(List values) { addCriterion("create_time not in", values, "createTime"); return (Criteria) this; } public Criteria andCreateTimeBetween(Date value1, Date value2) { addCriterion("create_time between", value1, value2, "createTime"); return (Criteria) this; } public Criteria andCreateTimeNotBetween(Date value1, Date value2) { addCriterion("create_time not between", value1, value2, "createTime"); return (Criteria) this; } public Criteria andUpdateTimeIsNull() { addCriterion("update_time is null"); return (Criteria) this; } public Criteria andUpdateTimeIsNotNull() { addCriterion("update_time is not null"); return (Criteria) this; } public Criteria andUpdateTimeEqualTo(Date value) { addCriterion("update_time =", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeNotEqualTo(Date value) { addCriterion("update_time <>", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeGreaterThan(Date value) { addCriterion("update_time >", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { addCriterion("update_time >=", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeLessThan(Date value) { addCriterion("update_time <", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { addCriterion("update_time <=", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeIn(List values) { addCriterion("update_time in", values, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeNotIn(List values) { addCriterion("update_time not in", values, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeBetween(Date value1, Date value2) { addCriterion("update_time between", value1, value2, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { addCriterion("update_time not between", value1, value2, "updateTime"); return (Criteria) this; } } /** */ public static class Criteria extends GeneratedCriteria { protected Criteria() { super(); } } public static class Criterion { private String condition; private Object value; private Object secondValue; private boolean noValue; private boolean singleValue; private boolean betweenValue; private boolean listValue; private String typeHandler; public String getCondition() { return condition; } public Object getValue() { return value; } public Object getSecondValue() { return secondValue; } public boolean isNoValue() { return noValue; } public boolean isSingleValue() { return singleValue; } public boolean isBetweenValue() { return betweenValue; } public boolean isListValue() { return listValue; } public String getTypeHandler() { return typeHandler; } protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; this.value = value; this.typeHandler = typeHandler; if (value instanceof List) { this.listValue = true; } else { this.singleValue = true; } } protected Criterion(String condition, Object value) { this(condition, value, null); } protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; this.value = value; this.secondValue = secondValue; this.typeHandler = typeHandler; this.betweenValue = true; } protected Criterion(String condition, Object value, Object secondValue) { this(condition, value, secondValue, null); } } } ================================================ FILE: src/main/java/com/zmh/projectoa/model/Messages.java ================================================ package com.zmh.projectoa.model; import java.io.Serializable; import java.util.Date; /** * @author */ public class Messages implements Serializable { private Integer id; private String title; private Integer sendId; private Integer receiveId; private String isDel; private Date createTime; private Date updateTime; private String message; private static final long serialVersionUID = 1L; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public Integer getSendId() { return sendId; } public void setSendId(Integer sendId) { this.sendId = sendId; } public Integer getReceiveId() { return receiveId; } public void setReceiveId(Integer receiveId) { this.receiveId = receiveId; } public String getIsDel() { return isDel; } public void setIsDel(String isDel) { this.isDel = isDel; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public Date getUpdateTime() { return updateTime; } public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } @Override public boolean equals(Object that) { if (this == that) { return true; } if (that == null) { return false; } if (getClass() != that.getClass()) { return false; } Messages other = (Messages) that; return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) && (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle())) && (this.getSendId() == null ? other.getSendId() == null : this.getSendId().equals(other.getSendId())) && (this.getReceiveId() == null ? other.getReceiveId() == null : this.getReceiveId().equals(other.getReceiveId())) && (this.getIsDel() == null ? other.getIsDel() == null : this.getIsDel().equals(other.getIsDel())) && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) && (this.getMessage() == null ? other.getMessage() == null : this.getMessage().equals(other.getMessage())); } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode()); result = prime * result + ((getSendId() == null) ? 0 : getSendId().hashCode()); result = prime * result + ((getReceiveId() == null) ? 0 : getReceiveId().hashCode()); result = prime * result + ((getIsDel() == null) ? 0 : getIsDel().hashCode()); result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); result = prime * result + ((getMessage() == null) ? 0 : getMessage().hashCode()); return result; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", title=").append(title); sb.append(", sendId=").append(sendId); sb.append(", receiveId=").append(receiveId); sb.append(", isDel=").append(isDel); sb.append(", createTime=").append(createTime); sb.append(", updateTime=").append(updateTime); sb.append(", message=").append(message); sb.append(", serialVersionUID=").append(serialVersionUID); sb.append("]"); return sb.toString(); } } ================================================ FILE: src/main/java/com/zmh/projectoa/model/MessagesExample.java ================================================ package com.zmh.projectoa.model; import java.util.ArrayList; import java.util.Date; import java.util.List; public class MessagesExample { protected String orderByClause; protected boolean distinct; protected List oredCriteria; private Integer limit; private Integer offset; public MessagesExample() { oredCriteria = new ArrayList(); } public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; } public String getOrderByClause() { return orderByClause; } public void setDistinct(boolean distinct) { this.distinct = distinct; } public boolean isDistinct() { return distinct; } public List getOredCriteria() { return oredCriteria; } public void or(Criteria criteria) { oredCriteria.add(criteria); } public Criteria or() { Criteria criteria = createCriteriaInternal(); oredCriteria.add(criteria); return criteria; } public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); if (oredCriteria.size() == 0) { oredCriteria.add(criteria); } return criteria; } protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); return criteria; } public void clear() { oredCriteria.clear(); orderByClause = null; distinct = false; } public void setLimit(Integer limit) { this.limit = limit; } public Integer getLimit() { return limit; } public void setOffset(Integer offset) { this.offset = offset; } public Integer getOffset() { return offset; } protected abstract static class GeneratedCriteria { protected List criteria; protected GeneratedCriteria() { super(); criteria = new ArrayList(); } public boolean isValid() { return criteria.size() > 0; } public List getAllCriteria() { return criteria; } public List getCriteria() { return criteria; } protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); } protected void addCriterion(String condition, Object value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); } protected void addCriterion(String condition, Object value1, Object value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); } public Criteria andIdIsNull() { addCriterion("id is null"); return (Criteria) this; } public Criteria andIdIsNotNull() { addCriterion("id is not null"); return (Criteria) this; } public Criteria andIdEqualTo(Integer value) { addCriterion("id =", value, "id"); return (Criteria) this; } public Criteria andIdNotEqualTo(Integer value) { addCriterion("id <>", value, "id"); return (Criteria) this; } public Criteria andIdGreaterThan(Integer value) { addCriterion("id >", value, "id"); return (Criteria) this; } public Criteria andIdGreaterThanOrEqualTo(Integer value) { addCriterion("id >=", value, "id"); return (Criteria) this; } public Criteria andIdLessThan(Integer value) { addCriterion("id <", value, "id"); return (Criteria) this; } public Criteria andIdLessThanOrEqualTo(Integer value) { addCriterion("id <=", value, "id"); return (Criteria) this; } public Criteria andIdIn(List values) { addCriterion("id in", values, "id"); return (Criteria) this; } public Criteria andIdNotIn(List values) { addCriterion("id not in", values, "id"); return (Criteria) this; } public Criteria andIdBetween(Integer value1, Integer value2) { addCriterion("id between", value1, value2, "id"); return (Criteria) this; } public Criteria andIdNotBetween(Integer value1, Integer value2) { addCriterion("id not between", value1, value2, "id"); return (Criteria) this; } public Criteria andTitleIsNull() { addCriterion("title is null"); return (Criteria) this; } public Criteria andTitleIsNotNull() { addCriterion("title is not null"); return (Criteria) this; } public Criteria andTitleEqualTo(String value) { addCriterion("title =", value, "title"); return (Criteria) this; } public Criteria andTitleNotEqualTo(String value) { addCriterion("title <>", value, "title"); return (Criteria) this; } public Criteria andTitleGreaterThan(String value) { addCriterion("title >", value, "title"); return (Criteria) this; } public Criteria andTitleGreaterThanOrEqualTo(String value) { addCriterion("title >=", value, "title"); return (Criteria) this; } public Criteria andTitleLessThan(String value) { addCriterion("title <", value, "title"); return (Criteria) this; } public Criteria andTitleLessThanOrEqualTo(String value) { addCriterion("title <=", value, "title"); return (Criteria) this; } public Criteria andTitleLike(String value) { addCriterion("title like", value, "title"); return (Criteria) this; } public Criteria andTitleNotLike(String value) { addCriterion("title not like", value, "title"); return (Criteria) this; } public Criteria andTitleIn(List values) { addCriterion("title in", values, "title"); return (Criteria) this; } public Criteria andTitleNotIn(List values) { addCriterion("title not in", values, "title"); return (Criteria) this; } public Criteria andTitleBetween(String value1, String value2) { addCriterion("title between", value1, value2, "title"); return (Criteria) this; } public Criteria andTitleNotBetween(String value1, String value2) { addCriterion("title not between", value1, value2, "title"); return (Criteria) this; } public Criteria andSendIdIsNull() { addCriterion("send_id is null"); return (Criteria) this; } public Criteria andSendIdIsNotNull() { addCriterion("send_id is not null"); return (Criteria) this; } public Criteria andSendIdEqualTo(Integer value) { addCriterion("send_id =", value, "sendId"); return (Criteria) this; } public Criteria andSendIdNotEqualTo(Integer value) { addCriterion("send_id <>", value, "sendId"); return (Criteria) this; } public Criteria andSendIdGreaterThan(Integer value) { addCriterion("send_id >", value, "sendId"); return (Criteria) this; } public Criteria andSendIdGreaterThanOrEqualTo(Integer value) { addCriterion("send_id >=", value, "sendId"); return (Criteria) this; } public Criteria andSendIdLessThan(Integer value) { addCriterion("send_id <", value, "sendId"); return (Criteria) this; } public Criteria andSendIdLessThanOrEqualTo(Integer value) { addCriterion("send_id <=", value, "sendId"); return (Criteria) this; } public Criteria andSendIdIn(List values) { addCriterion("send_id in", values, "sendId"); return (Criteria) this; } public Criteria andSendIdNotIn(List values) { addCriterion("send_id not in", values, "sendId"); return (Criteria) this; } public Criteria andSendIdBetween(Integer value1, Integer value2) { addCriterion("send_id between", value1, value2, "sendId"); return (Criteria) this; } public Criteria andSendIdNotBetween(Integer value1, Integer value2) { addCriterion("send_id not between", value1, value2, "sendId"); return (Criteria) this; } public Criteria andReceiveIdIsNull() { addCriterion("receive_id is null"); return (Criteria) this; } public Criteria andReceiveIdIsNotNull() { addCriterion("receive_id is not null"); return (Criteria) this; } public Criteria andReceiveIdEqualTo(Integer value) { addCriterion("receive_id =", value, "receiveId"); return (Criteria) this; } public Criteria andReceiveIdNotEqualTo(Integer value) { addCriterion("receive_id <>", value, "receiveId"); return (Criteria) this; } public Criteria andReceiveIdGreaterThan(Integer value) { addCriterion("receive_id >", value, "receiveId"); return (Criteria) this; } public Criteria andReceiveIdGreaterThanOrEqualTo(Integer value) { addCriterion("receive_id >=", value, "receiveId"); return (Criteria) this; } public Criteria andReceiveIdLessThan(Integer value) { addCriterion("receive_id <", value, "receiveId"); return (Criteria) this; } public Criteria andReceiveIdLessThanOrEqualTo(Integer value) { addCriterion("receive_id <=", value, "receiveId"); return (Criteria) this; } public Criteria andReceiveIdIn(List values) { addCriterion("receive_id in", values, "receiveId"); return (Criteria) this; } public Criteria andReceiveIdNotIn(List values) { addCriterion("receive_id not in", values, "receiveId"); return (Criteria) this; } public Criteria andReceiveIdBetween(Integer value1, Integer value2) { addCriterion("receive_id between", value1, value2, "receiveId"); return (Criteria) this; } public Criteria andReceiveIdNotBetween(Integer value1, Integer value2) { addCriterion("receive_id not between", value1, value2, "receiveId"); return (Criteria) this; } public Criteria andIsDelIsNull() { addCriterion("is_del is null"); return (Criteria) this; } public Criteria andIsDelIsNotNull() { addCriterion("is_del is not null"); return (Criteria) this; } public Criteria andIsDelEqualTo(String value) { addCriterion("is_del =", value, "isDel"); return (Criteria) this; } public Criteria andIsDelNotEqualTo(String value) { addCriterion("is_del <>", value, "isDel"); return (Criteria) this; } public Criteria andIsDelGreaterThan(String value) { addCriterion("is_del >", value, "isDel"); return (Criteria) this; } public Criteria andIsDelGreaterThanOrEqualTo(String value) { addCriterion("is_del >=", value, "isDel"); return (Criteria) this; } public Criteria andIsDelLessThan(String value) { addCriterion("is_del <", value, "isDel"); return (Criteria) this; } public Criteria andIsDelLessThanOrEqualTo(String value) { addCriterion("is_del <=", value, "isDel"); return (Criteria) this; } public Criteria andIsDelLike(String value) { addCriterion("is_del like", value, "isDel"); return (Criteria) this; } public Criteria andIsDelNotLike(String value) { addCriterion("is_del not like", value, "isDel"); return (Criteria) this; } public Criteria andIsDelIn(List values) { addCriterion("is_del in", values, "isDel"); return (Criteria) this; } public Criteria andIsDelNotIn(List values) { addCriterion("is_del not in", values, "isDel"); return (Criteria) this; } public Criteria andIsDelBetween(String value1, String value2) { addCriterion("is_del between", value1, value2, "isDel"); return (Criteria) this; } public Criteria andIsDelNotBetween(String value1, String value2) { addCriterion("is_del not between", value1, value2, "isDel"); return (Criteria) this; } public Criteria andCreateTimeIsNull() { addCriterion("create_time is null"); return (Criteria) this; } public Criteria andCreateTimeIsNotNull() { addCriterion("create_time is not null"); return (Criteria) this; } public Criteria andCreateTimeEqualTo(Date value) { addCriterion("create_time =", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeNotEqualTo(Date value) { addCriterion("create_time <>", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeGreaterThan(Date value) { addCriterion("create_time >", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { addCriterion("create_time >=", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeLessThan(Date value) { addCriterion("create_time <", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeLessThanOrEqualTo(Date value) { addCriterion("create_time <=", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeIn(List values) { addCriterion("create_time in", values, "createTime"); return (Criteria) this; } public Criteria andCreateTimeNotIn(List values) { addCriterion("create_time not in", values, "createTime"); return (Criteria) this; } public Criteria andCreateTimeBetween(Date value1, Date value2) { addCriterion("create_time between", value1, value2, "createTime"); return (Criteria) this; } public Criteria andCreateTimeNotBetween(Date value1, Date value2) { addCriterion("create_time not between", value1, value2, "createTime"); return (Criteria) this; } public Criteria andUpdateTimeIsNull() { addCriterion("update_time is null"); return (Criteria) this; } public Criteria andUpdateTimeIsNotNull() { addCriterion("update_time is not null"); return (Criteria) this; } public Criteria andUpdateTimeEqualTo(Date value) { addCriterion("update_time =", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeNotEqualTo(Date value) { addCriterion("update_time <>", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeGreaterThan(Date value) { addCriterion("update_time >", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { addCriterion("update_time >=", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeLessThan(Date value) { addCriterion("update_time <", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { addCriterion("update_time <=", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeIn(List values) { addCriterion("update_time in", values, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeNotIn(List values) { addCriterion("update_time not in", values, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeBetween(Date value1, Date value2) { addCriterion("update_time between", value1, value2, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { addCriterion("update_time not between", value1, value2, "updateTime"); return (Criteria) this; } } /** */ public static class Criteria extends GeneratedCriteria { protected Criteria() { super(); } } public static class Criterion { private String condition; private Object value; private Object secondValue; private boolean noValue; private boolean singleValue; private boolean betweenValue; private boolean listValue; private String typeHandler; public String getCondition() { return condition; } public Object getValue() { return value; } public Object getSecondValue() { return secondValue; } public boolean isNoValue() { return noValue; } public boolean isSingleValue() { return singleValue; } public boolean isBetweenValue() { return betweenValue; } public boolean isListValue() { return listValue; } public String getTypeHandler() { return typeHandler; } protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; this.value = value; this.typeHandler = typeHandler; if (value instanceof List) { this.listValue = true; } else { this.singleValue = true; } } protected Criterion(String condition, Object value) { this(condition, value, null); } protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; this.value = value; this.secondValue = secondValue; this.typeHandler = typeHandler; this.betweenValue = true; } protected Criterion(String condition, Object value, Object secondValue) { this(condition, value, secondValue, null); } } } ================================================ FILE: src/main/java/com/zmh/projectoa/model/Notices.java ================================================ package com.zmh.projectoa.model; import java.io.Serializable; import java.util.Date; /** * @author */ public class Notices implements Serializable { private Integer id; private String title; private Integer sendId; private String isDel; private Date createTime; private Date updateTime; private String notice; private static final long serialVersionUID = 1L; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public Integer getSendId() { return sendId; } public void setSendId(Integer sendId) { this.sendId = sendId; } public String getIsDel() { return isDel; } public void setIsDel(String isDel) { this.isDel = isDel; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public Date getUpdateTime() { return updateTime; } public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; } public String getNotice() { return notice; } public void setNotice(String notice) { this.notice = notice; } @Override public boolean equals(Object that) { if (this == that) { return true; } if (that == null) { return false; } if (getClass() != that.getClass()) { return false; } Notices other = (Notices) that; return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) && (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle())) && (this.getSendId() == null ? other.getSendId() == null : this.getSendId().equals(other.getSendId())) && (this.getIsDel() == null ? other.getIsDel() == null : this.getIsDel().equals(other.getIsDel())) && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) && (this.getNotice() == null ? other.getNotice() == null : this.getNotice().equals(other.getNotice())); } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode()); result = prime * result + ((getSendId() == null) ? 0 : getSendId().hashCode()); result = prime * result + ((getIsDel() == null) ? 0 : getIsDel().hashCode()); result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); result = prime * result + ((getNotice() == null) ? 0 : getNotice().hashCode()); return result; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", title=").append(title); sb.append(", sendId=").append(sendId); sb.append(", isDel=").append(isDel); sb.append(", createTime=").append(createTime); sb.append(", updateTime=").append(updateTime); sb.append(", notice=").append(notice); sb.append(", serialVersionUID=").append(serialVersionUID); sb.append("]"); return sb.toString(); } } ================================================ FILE: src/main/java/com/zmh/projectoa/model/NoticesExample.java ================================================ package com.zmh.projectoa.model; import java.util.ArrayList; import java.util.Date; import java.util.List; public class NoticesExample { protected String orderByClause; protected boolean distinct; protected List oredCriteria; private Integer limit; private Integer offset; public NoticesExample() { oredCriteria = new ArrayList(); } public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; } public String getOrderByClause() { return orderByClause; } public void setDistinct(boolean distinct) { this.distinct = distinct; } public boolean isDistinct() { return distinct; } public List getOredCriteria() { return oredCriteria; } public void or(Criteria criteria) { oredCriteria.add(criteria); } public Criteria or() { Criteria criteria = createCriteriaInternal(); oredCriteria.add(criteria); return criteria; } public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); if (oredCriteria.size() == 0) { oredCriteria.add(criteria); } return criteria; } protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); return criteria; } public void clear() { oredCriteria.clear(); orderByClause = null; distinct = false; } public void setLimit(Integer limit) { this.limit = limit; } public Integer getLimit() { return limit; } public void setOffset(Integer offset) { this.offset = offset; } public Integer getOffset() { return offset; } protected abstract static class GeneratedCriteria { protected List criteria; protected GeneratedCriteria() { super(); criteria = new ArrayList(); } public boolean isValid() { return criteria.size() > 0; } public List getAllCriteria() { return criteria; } public List getCriteria() { return criteria; } protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); } protected void addCriterion(String condition, Object value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); } protected void addCriterion(String condition, Object value1, Object value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); } public Criteria andIdIsNull() { addCriterion("id is null"); return (Criteria) this; } public Criteria andIdIsNotNull() { addCriterion("id is not null"); return (Criteria) this; } public Criteria andIdEqualTo(Integer value) { addCriterion("id =", value, "id"); return (Criteria) this; } public Criteria andIdNotEqualTo(Integer value) { addCriterion("id <>", value, "id"); return (Criteria) this; } public Criteria andIdGreaterThan(Integer value) { addCriterion("id >", value, "id"); return (Criteria) this; } public Criteria andIdGreaterThanOrEqualTo(Integer value) { addCriterion("id >=", value, "id"); return (Criteria) this; } public Criteria andIdLessThan(Integer value) { addCriterion("id <", value, "id"); return (Criteria) this; } public Criteria andIdLessThanOrEqualTo(Integer value) { addCriterion("id <=", value, "id"); return (Criteria) this; } public Criteria andIdIn(List values) { addCriterion("id in", values, "id"); return (Criteria) this; } public Criteria andIdNotIn(List values) { addCriterion("id not in", values, "id"); return (Criteria) this; } public Criteria andIdBetween(Integer value1, Integer value2) { addCriterion("id between", value1, value2, "id"); return (Criteria) this; } public Criteria andIdNotBetween(Integer value1, Integer value2) { addCriterion("id not between", value1, value2, "id"); return (Criteria) this; } public Criteria andTitleIsNull() { addCriterion("title is null"); return (Criteria) this; } public Criteria andTitleIsNotNull() { addCriterion("title is not null"); return (Criteria) this; } public Criteria andTitleEqualTo(String value) { addCriterion("title =", value, "title"); return (Criteria) this; } public Criteria andTitleNotEqualTo(String value) { addCriterion("title <>", value, "title"); return (Criteria) this; } public Criteria andTitleGreaterThan(String value) { addCriterion("title >", value, "title"); return (Criteria) this; } public Criteria andTitleGreaterThanOrEqualTo(String value) { addCriterion("title >=", value, "title"); return (Criteria) this; } public Criteria andTitleLessThan(String value) { addCriterion("title <", value, "title"); return (Criteria) this; } public Criteria andTitleLessThanOrEqualTo(String value) { addCriterion("title <=", value, "title"); return (Criteria) this; } public Criteria andTitleLike(String value) { addCriterion("title like", value, "title"); return (Criteria) this; } public Criteria andTitleNotLike(String value) { addCriterion("title not like", value, "title"); return (Criteria) this; } public Criteria andTitleIn(List values) { addCriterion("title in", values, "title"); return (Criteria) this; } public Criteria andTitleNotIn(List values) { addCriterion("title not in", values, "title"); return (Criteria) this; } public Criteria andTitleBetween(String value1, String value2) { addCriterion("title between", value1, value2, "title"); return (Criteria) this; } public Criteria andTitleNotBetween(String value1, String value2) { addCriterion("title not between", value1, value2, "title"); return (Criteria) this; } public Criteria andSendIdIsNull() { addCriterion("send_id is null"); return (Criteria) this; } public Criteria andSendIdIsNotNull() { addCriterion("send_id is not null"); return (Criteria) this; } public Criteria andSendIdEqualTo(Integer value) { addCriterion("send_id =", value, "sendId"); return (Criteria) this; } public Criteria andSendIdNotEqualTo(Integer value) { addCriterion("send_id <>", value, "sendId"); return (Criteria) this; } public Criteria andSendIdGreaterThan(Integer value) { addCriterion("send_id >", value, "sendId"); return (Criteria) this; } public Criteria andSendIdGreaterThanOrEqualTo(Integer value) { addCriterion("send_id >=", value, "sendId"); return (Criteria) this; } public Criteria andSendIdLessThan(Integer value) { addCriterion("send_id <", value, "sendId"); return (Criteria) this; } public Criteria andSendIdLessThanOrEqualTo(Integer value) { addCriterion("send_id <=", value, "sendId"); return (Criteria) this; } public Criteria andSendIdIn(List values) { addCriterion("send_id in", values, "sendId"); return (Criteria) this; } public Criteria andSendIdNotIn(List values) { addCriterion("send_id not in", values, "sendId"); return (Criteria) this; } public Criteria andSendIdBetween(Integer value1, Integer value2) { addCriterion("send_id between", value1, value2, "sendId"); return (Criteria) this; } public Criteria andSendIdNotBetween(Integer value1, Integer value2) { addCriterion("send_id not between", value1, value2, "sendId"); return (Criteria) this; } public Criteria andIsDelIsNull() { addCriterion("is_del is null"); return (Criteria) this; } public Criteria andIsDelIsNotNull() { addCriterion("is_del is not null"); return (Criteria) this; } public Criteria andIsDelEqualTo(String value) { addCriterion("is_del =", value, "isDel"); return (Criteria) this; } public Criteria andIsDelNotEqualTo(String value) { addCriterion("is_del <>", value, "isDel"); return (Criteria) this; } public Criteria andIsDelGreaterThan(String value) { addCriterion("is_del >", value, "isDel"); return (Criteria) this; } public Criteria andIsDelGreaterThanOrEqualTo(String value) { addCriterion("is_del >=", value, "isDel"); return (Criteria) this; } public Criteria andIsDelLessThan(String value) { addCriterion("is_del <", value, "isDel"); return (Criteria) this; } public Criteria andIsDelLessThanOrEqualTo(String value) { addCriterion("is_del <=", value, "isDel"); return (Criteria) this; } public Criteria andIsDelLike(String value) { addCriterion("is_del like", value, "isDel"); return (Criteria) this; } public Criteria andIsDelNotLike(String value) { addCriterion("is_del not like", value, "isDel"); return (Criteria) this; } public Criteria andIsDelIn(List values) { addCriterion("is_del in", values, "isDel"); return (Criteria) this; } public Criteria andIsDelNotIn(List values) { addCriterion("is_del not in", values, "isDel"); return (Criteria) this; } public Criteria andIsDelBetween(String value1, String value2) { addCriterion("is_del between", value1, value2, "isDel"); return (Criteria) this; } public Criteria andIsDelNotBetween(String value1, String value2) { addCriterion("is_del not between", value1, value2, "isDel"); return (Criteria) this; } public Criteria andCreateTimeIsNull() { addCriterion("create_time is null"); return (Criteria) this; } public Criteria andCreateTimeIsNotNull() { addCriterion("create_time is not null"); return (Criteria) this; } public Criteria andCreateTimeEqualTo(Date value) { addCriterion("create_time =", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeNotEqualTo(Date value) { addCriterion("create_time <>", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeGreaterThan(Date value) { addCriterion("create_time >", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { addCriterion("create_time >=", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeLessThan(Date value) { addCriterion("create_time <", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeLessThanOrEqualTo(Date value) { addCriterion("create_time <=", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeIn(List values) { addCriterion("create_time in", values, "createTime"); return (Criteria) this; } public Criteria andCreateTimeNotIn(List values) { addCriterion("create_time not in", values, "createTime"); return (Criteria) this; } public Criteria andCreateTimeBetween(Date value1, Date value2) { addCriterion("create_time between", value1, value2, "createTime"); return (Criteria) this; } public Criteria andCreateTimeNotBetween(Date value1, Date value2) { addCriterion("create_time not between", value1, value2, "createTime"); return (Criteria) this; } public Criteria andUpdateTimeIsNull() { addCriterion("update_time is null"); return (Criteria) this; } public Criteria andUpdateTimeIsNotNull() { addCriterion("update_time is not null"); return (Criteria) this; } public Criteria andUpdateTimeEqualTo(Date value) { addCriterion("update_time =", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeNotEqualTo(Date value) { addCriterion("update_time <>", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeGreaterThan(Date value) { addCriterion("update_time >", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { addCriterion("update_time >=", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeLessThan(Date value) { addCriterion("update_time <", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { addCriterion("update_time <=", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeIn(List values) { addCriterion("update_time in", values, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeNotIn(List values) { addCriterion("update_time not in", values, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeBetween(Date value1, Date value2) { addCriterion("update_time between", value1, value2, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { addCriterion("update_time not between", value1, value2, "updateTime"); return (Criteria) this; } } /** */ public static class Criteria extends GeneratedCriteria { protected Criteria() { super(); } } public static class Criterion { private String condition; private Object value; private Object secondValue; private boolean noValue; private boolean singleValue; private boolean betweenValue; private boolean listValue; private String typeHandler; public String getCondition() { return condition; } public Object getValue() { return value; } public Object getSecondValue() { return secondValue; } public boolean isNoValue() { return noValue; } public boolean isSingleValue() { return singleValue; } public boolean isBetweenValue() { return betweenValue; } public boolean isListValue() { return listValue; } public String getTypeHandler() { return typeHandler; } protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; this.value = value; this.typeHandler = typeHandler; if (value instanceof List) { this.listValue = true; } else { this.singleValue = true; } } protected Criterion(String condition, Object value) { this(condition, value, null); } protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; this.value = value; this.secondValue = secondValue; this.typeHandler = typeHandler; this.betweenValue = true; } protected Criterion(String condition, Object value, Object secondValue) { this(condition, value, secondValue, null); } } } ================================================ FILE: src/main/java/com/zmh/projectoa/model/Positions.java ================================================ package com.zmh.projectoa.model; import java.io.Serializable; import java.util.Date; /** * @author */ public class Positions implements Serializable { private Integer id; private String position; private Date createTime; private Date updateTime; private static final long serialVersionUID = 1L; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getPosition() { return position; } public void setPosition(String position) { this.position = position; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public Date getUpdateTime() { return updateTime; } public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; } @Override public boolean equals(Object that) { if (this == that) { return true; } if (that == null) { return false; } if (getClass() != that.getClass()) { return false; } Positions other = (Positions) that; return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) && (this.getPosition() == null ? other.getPosition() == null : this.getPosition().equals(other.getPosition())) && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())); } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getPosition() == null) ? 0 : getPosition().hashCode()); result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); return result; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", position=").append(position); sb.append(", createTime=").append(createTime); sb.append(", updateTime=").append(updateTime); sb.append(", serialVersionUID=").append(serialVersionUID); sb.append("]"); return sb.toString(); } } ================================================ FILE: src/main/java/com/zmh/projectoa/model/PositionsExample.java ================================================ package com.zmh.projectoa.model; import java.util.ArrayList; import java.util.Date; import java.util.List; public class PositionsExample { protected String orderByClause; protected boolean distinct; protected List oredCriteria; private Integer limit; private Integer offset; public PositionsExample() { oredCriteria = new ArrayList(); } public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; } public String getOrderByClause() { return orderByClause; } public void setDistinct(boolean distinct) { this.distinct = distinct; } public boolean isDistinct() { return distinct; } public List getOredCriteria() { return oredCriteria; } public void or(Criteria criteria) { oredCriteria.add(criteria); } public Criteria or() { Criteria criteria = createCriteriaInternal(); oredCriteria.add(criteria); return criteria; } public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); if (oredCriteria.size() == 0) { oredCriteria.add(criteria); } return criteria; } protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); return criteria; } public void clear() { oredCriteria.clear(); orderByClause = null; distinct = false; } public void setLimit(Integer limit) { this.limit = limit; } public Integer getLimit() { return limit; } public void setOffset(Integer offset) { this.offset = offset; } public Integer getOffset() { return offset; } protected abstract static class GeneratedCriteria { protected List criteria; protected GeneratedCriteria() { super(); criteria = new ArrayList(); } public boolean isValid() { return criteria.size() > 0; } public List getAllCriteria() { return criteria; } public List getCriteria() { return criteria; } protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); } protected void addCriterion(String condition, Object value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); } protected void addCriterion(String condition, Object value1, Object value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); } public Criteria andIdIsNull() { addCriterion("id is null"); return (Criteria) this; } public Criteria andIdIsNotNull() { addCriterion("id is not null"); return (Criteria) this; } public Criteria andIdEqualTo(Integer value) { addCriterion("id =", value, "id"); return (Criteria) this; } public Criteria andIdNotEqualTo(Integer value) { addCriterion("id <>", value, "id"); return (Criteria) this; } public Criteria andIdGreaterThan(Integer value) { addCriterion("id >", value, "id"); return (Criteria) this; } public Criteria andIdGreaterThanOrEqualTo(Integer value) { addCriterion("id >=", value, "id"); return (Criteria) this; } public Criteria andIdLessThan(Integer value) { addCriterion("id <", value, "id"); return (Criteria) this; } public Criteria andIdLessThanOrEqualTo(Integer value) { addCriterion("id <=", value, "id"); return (Criteria) this; } public Criteria andIdIn(List values) { addCriterion("id in", values, "id"); return (Criteria) this; } public Criteria andIdNotIn(List values) { addCriterion("id not in", values, "id"); return (Criteria) this; } public Criteria andIdBetween(Integer value1, Integer value2) { addCriterion("id between", value1, value2, "id"); return (Criteria) this; } public Criteria andIdNotBetween(Integer value1, Integer value2) { addCriterion("id not between", value1, value2, "id"); return (Criteria) this; } public Criteria andPositionIsNull() { addCriterion("position is null"); return (Criteria) this; } public Criteria andPositionIsNotNull() { addCriterion("position is not null"); return (Criteria) this; } public Criteria andPositionEqualTo(String value) { addCriterion("position =", value, "position"); return (Criteria) this; } public Criteria andPositionNotEqualTo(String value) { addCriterion("position <>", value, "position"); return (Criteria) this; } public Criteria andPositionGreaterThan(String value) { addCriterion("position >", value, "position"); return (Criteria) this; } public Criteria andPositionGreaterThanOrEqualTo(String value) { addCriterion("position >=", value, "position"); return (Criteria) this; } public Criteria andPositionLessThan(String value) { addCriterion("position <", value, "position"); return (Criteria) this; } public Criteria andPositionLessThanOrEqualTo(String value) { addCriterion("position <=", value, "position"); return (Criteria) this; } public Criteria andPositionLike(String value) { addCriterion("position like", value, "position"); return (Criteria) this; } public Criteria andPositionNotLike(String value) { addCriterion("position not like", value, "position"); return (Criteria) this; } public Criteria andPositionIn(List values) { addCriterion("position in", values, "position"); return (Criteria) this; } public Criteria andPositionNotIn(List values) { addCriterion("position not in", values, "position"); return (Criteria) this; } public Criteria andPositionBetween(String value1, String value2) { addCriterion("position between", value1, value2, "position"); return (Criteria) this; } public Criteria andPositionNotBetween(String value1, String value2) { addCriterion("position not between", value1, value2, "position"); return (Criteria) this; } public Criteria andCreateTimeIsNull() { addCriterion("create_time is null"); return (Criteria) this; } public Criteria andCreateTimeIsNotNull() { addCriterion("create_time is not null"); return (Criteria) this; } public Criteria andCreateTimeEqualTo(Date value) { addCriterion("create_time =", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeNotEqualTo(Date value) { addCriterion("create_time <>", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeGreaterThan(Date value) { addCriterion("create_time >", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { addCriterion("create_time >=", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeLessThan(Date value) { addCriterion("create_time <", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeLessThanOrEqualTo(Date value) { addCriterion("create_time <=", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeIn(List values) { addCriterion("create_time in", values, "createTime"); return (Criteria) this; } public Criteria andCreateTimeNotIn(List values) { addCriterion("create_time not in", values, "createTime"); return (Criteria) this; } public Criteria andCreateTimeBetween(Date value1, Date value2) { addCriterion("create_time between", value1, value2, "createTime"); return (Criteria) this; } public Criteria andCreateTimeNotBetween(Date value1, Date value2) { addCriterion("create_time not between", value1, value2, "createTime"); return (Criteria) this; } public Criteria andUpdateTimeIsNull() { addCriterion("update_time is null"); return (Criteria) this; } public Criteria andUpdateTimeIsNotNull() { addCriterion("update_time is not null"); return (Criteria) this; } public Criteria andUpdateTimeEqualTo(Date value) { addCriterion("update_time =", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeNotEqualTo(Date value) { addCriterion("update_time <>", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeGreaterThan(Date value) { addCriterion("update_time >", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { addCriterion("update_time >=", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeLessThan(Date value) { addCriterion("update_time <", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { addCriterion("update_time <=", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeIn(List values) { addCriterion("update_time in", values, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeNotIn(List values) { addCriterion("update_time not in", values, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeBetween(Date value1, Date value2) { addCriterion("update_time between", value1, value2, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { addCriterion("update_time not between", value1, value2, "updateTime"); return (Criteria) this; } } /** */ public static class Criteria extends GeneratedCriteria { protected Criteria() { super(); } } public static class Criterion { private String condition; private Object value; private Object secondValue; private boolean noValue; private boolean singleValue; private boolean betweenValue; private boolean listValue; private String typeHandler; public String getCondition() { return condition; } public Object getValue() { return value; } public Object getSecondValue() { return secondValue; } public boolean isNoValue() { return noValue; } public boolean isSingleValue() { return singleValue; } public boolean isBetweenValue() { return betweenValue; } public boolean isListValue() { return listValue; } public String getTypeHandler() { return typeHandler; } protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; this.value = value; this.typeHandler = typeHandler; if (value instanceof List) { this.listValue = true; } else { this.singleValue = true; } } protected Criterion(String condition, Object value) { this(condition, value, null); } protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; this.value = value; this.secondValue = secondValue; this.typeHandler = typeHandler; this.betweenValue = true; } protected Criterion(String condition, Object value, Object secondValue) { this(condition, value, secondValue, null); } } } ================================================ FILE: src/main/java/com/zmh/projectoa/model/Userinfo.java ================================================ package com.zmh.projectoa.model; import java.io.Serializable; import java.util.Date; /** * @author */ public class Userinfo implements Serializable { private Integer id; private Integer userId; private String sex; private Date birthday; private Integer age; private String identityCard; private String email; private Integer qq; private String wechat; private String weibo; private String phone; private String isDel; private Date createTime; private Date updateTime; private Integer headImage; public Integer getHeadImage() { return headImage; } public void setHeadImage(Integer headImage) { this.headImage = headImage; } private static final long serialVersionUID = 1L; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Integer getUserId() { return userId; } public void setUserId(Integer userId) { this.userId = userId; } public String getSex() { return sex; } public void setSex(String sex) { this.sex = sex; } public Date getBirthday() { return birthday; } public void setBirthday(Date birthday) { this.birthday = birthday; } public Integer getAge() { return age; } public void setAge(Integer age) { this.age = age; } public String getIdentityCard() { return identityCard; } public void setIdentityCard(String identityCard) { this.identityCard = identityCard; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public Integer getQq() { return qq; } public void setQq(Integer qq) { this.qq = qq; } public String getWechat() { return wechat; } public void setWechat(String wechat) { this.wechat = wechat; } public String getWeibo() { return weibo; } public void setWeibo(String weibo) { this.weibo = weibo; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public String getIsDel() { return isDel; } public void setIsDel(String isDel) { this.isDel = isDel; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public Date getUpdateTime() { return updateTime; } public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; } @Override public boolean equals(Object that) { if (this == that) { return true; } if (that == null) { return false; } if (getClass() != that.getClass()) { return false; } Userinfo other = (Userinfo) that; return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) && (this.getSex() == null ? other.getSex() == null : this.getSex().equals(other.getSex())) && (this.getBirthday() == null ? other.getBirthday() == null : this.getBirthday().equals(other.getBirthday())) && (this.getAge() == null ? other.getAge() == null : this.getAge().equals(other.getAge())) && (this.getIdentityCard() == null ? other.getIdentityCard() == null : this.getIdentityCard().equals(other.getIdentityCard())) && (this.getEmail() == null ? other.getEmail() == null : this.getEmail().equals(other.getEmail())) && (this.getQq() == null ? other.getQq() == null : this.getQq().equals(other.getQq())) && (this.getWechat() == null ? other.getWechat() == null : this.getWechat().equals(other.getWechat())) && (this.getWeibo() == null ? other.getWeibo() == null : this.getWeibo().equals(other.getWeibo())) && (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone())) && (this.getIsDel() == null ? other.getIsDel() == null : this.getIsDel().equals(other.getIsDel())) && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())); } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); result = prime * result + ((getSex() == null) ? 0 : getSex().hashCode()); result = prime * result + ((getBirthday() == null) ? 0 : getBirthday().hashCode()); result = prime * result + ((getAge() == null) ? 0 : getAge().hashCode()); result = prime * result + ((getIdentityCard() == null) ? 0 : getIdentityCard().hashCode()); result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode()); result = prime * result + ((getQq() == null) ? 0 : getQq().hashCode()); result = prime * result + ((getWechat() == null) ? 0 : getWechat().hashCode()); result = prime * result + ((getWeibo() == null) ? 0 : getWeibo().hashCode()); result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode()); result = prime * result + ((getIsDel() == null) ? 0 : getIsDel().hashCode()); result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); return result; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", userId=").append(userId); sb.append(", sex=").append(sex); sb.append(", birthday=").append(birthday); sb.append(", age=").append(age); sb.append(", identityCard=").append(identityCard); sb.append(", email=").append(email); sb.append(", qq=").append(qq); sb.append(", wechat=").append(wechat); sb.append(", weibo=").append(weibo); sb.append(", phone=").append(phone); sb.append(", isDel=").append(isDel); sb.append(", createTime=").append(createTime); sb.append(", updateTime=").append(updateTime); sb.append(", serialVersionUID=").append(serialVersionUID); sb.append("]"); return sb.toString(); } } ================================================ FILE: src/main/java/com/zmh/projectoa/model/UserinfoExample.java ================================================ package com.zmh.projectoa.model; import java.util.ArrayList; import java.util.Date; import java.util.Iterator; import java.util.List; public class UserinfoExample { protected String orderByClause; protected boolean distinct; protected List oredCriteria; private Integer limit; private Integer offset; public UserinfoExample() { oredCriteria = new ArrayList(); } public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; } public String getOrderByClause() { return orderByClause; } public void setDistinct(boolean distinct) { this.distinct = distinct; } public boolean isDistinct() { return distinct; } public List getOredCriteria() { return oredCriteria; } public void or(Criteria criteria) { oredCriteria.add(criteria); } public Criteria or() { Criteria criteria = createCriteriaInternal(); oredCriteria.add(criteria); return criteria; } public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); if (oredCriteria.size() == 0) { oredCriteria.add(criteria); } return criteria; } protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); return criteria; } public void clear() { oredCriteria.clear(); orderByClause = null; distinct = false; } public void setLimit(Integer limit) { this.limit = limit; } public Integer getLimit() { return limit; } public void setOffset(Integer offset) { this.offset = offset; } public Integer getOffset() { return offset; } protected abstract static class GeneratedCriteria { protected List criteria; protected GeneratedCriteria() { super(); criteria = new ArrayList(); } public boolean isValid() { return criteria.size() > 0; } public List getAllCriteria() { return criteria; } public List getCriteria() { return criteria; } protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); } protected void addCriterion(String condition, Object value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); } protected void addCriterion(String condition, Object value1, Object value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); } protected void addCriterionForJDBCDate(String condition, Date value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } addCriterion(condition, new java.sql.Date(value.getTime()), property); } protected void addCriterionForJDBCDate(String condition, List values, String property) { if (values == null || values.size() == 0) { throw new RuntimeException("Value list for " + property + " cannot be null or empty"); } List dateList = new ArrayList(); Iterator iter = values.iterator(); while (iter.hasNext()) { dateList.add(new java.sql.Date(iter.next().getTime())); } addCriterion(condition, dateList, property); } protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property); } public Criteria andIdIsNull() { addCriterion("id is null"); return (Criteria) this; } public Criteria andIdIsNotNull() { addCriterion("id is not null"); return (Criteria) this; } public Criteria andIdEqualTo(Integer value) { addCriterion("id =", value, "id"); return (Criteria) this; } public Criteria andIdNotEqualTo(Integer value) { addCriterion("id <>", value, "id"); return (Criteria) this; } public Criteria andIdGreaterThan(Integer value) { addCriterion("id >", value, "id"); return (Criteria) this; } public Criteria andIdGreaterThanOrEqualTo(Integer value) { addCriterion("id >=", value, "id"); return (Criteria) this; } public Criteria andIdLessThan(Integer value) { addCriterion("id <", value, "id"); return (Criteria) this; } public Criteria andIdLessThanOrEqualTo(Integer value) { addCriterion("id <=", value, "id"); return (Criteria) this; } public Criteria andIdIn(List values) { addCriterion("id in", values, "id"); return (Criteria) this; } public Criteria andIdNotIn(List values) { addCriterion("id not in", values, "id"); return (Criteria) this; } public Criteria andIdBetween(Integer value1, Integer value2) { addCriterion("id between", value1, value2, "id"); return (Criteria) this; } public Criteria andIdNotBetween(Integer value1, Integer value2) { addCriterion("id not between", value1, value2, "id"); return (Criteria) this; } public Criteria andUserIdIsNull() { addCriterion("user_id is null"); return (Criteria) this; } public Criteria andUserIdIsNotNull() { addCriterion("user_id is not null"); return (Criteria) this; } public Criteria andUserIdEqualTo(Integer value) { addCriterion("user_id =", value, "userId"); return (Criteria) this; } public Criteria andUserIdNotEqualTo(Integer value) { addCriterion("user_id <>", value, "userId"); return (Criteria) this; } public Criteria andUserIdGreaterThan(Integer value) { addCriterion("user_id >", value, "userId"); return (Criteria) this; } public Criteria andUserIdGreaterThanOrEqualTo(Integer value) { addCriterion("user_id >=", value, "userId"); return (Criteria) this; } public Criteria andUserIdLessThan(Integer value) { addCriterion("user_id <", value, "userId"); return (Criteria) this; } public Criteria andUserIdLessThanOrEqualTo(Integer value) { addCriterion("user_id <=", value, "userId"); return (Criteria) this; } public Criteria andUserIdIn(List values) { addCriterion("user_id in", values, "userId"); return (Criteria) this; } public Criteria andUserIdNotIn(List values) { addCriterion("user_id not in", values, "userId"); return (Criteria) this; } public Criteria andUserIdBetween(Integer value1, Integer value2) { addCriterion("user_id between", value1, value2, "userId"); return (Criteria) this; } public Criteria andUserIdNotBetween(Integer value1, Integer value2) { addCriterion("user_id not between", value1, value2, "userId"); return (Criteria) this; } public Criteria andSexIsNull() { addCriterion("sex is null"); return (Criteria) this; } public Criteria andSexIsNotNull() { addCriterion("sex is not null"); return (Criteria) this; } public Criteria andSexEqualTo(String value) { addCriterion("sex =", value, "sex"); return (Criteria) this; } public Criteria andSexNotEqualTo(String value) { addCriterion("sex <>", value, "sex"); return (Criteria) this; } public Criteria andSexGreaterThan(String value) { addCriterion("sex >", value, "sex"); return (Criteria) this; } public Criteria andSexGreaterThanOrEqualTo(String value) { addCriterion("sex >=", value, "sex"); return (Criteria) this; } public Criteria andSexLessThan(String value) { addCriterion("sex <", value, "sex"); return (Criteria) this; } public Criteria andSexLessThanOrEqualTo(String value) { addCriterion("sex <=", value, "sex"); return (Criteria) this; } public Criteria andSexLike(String value) { addCriterion("sex like", value, "sex"); return (Criteria) this; } public Criteria andSexNotLike(String value) { addCriterion("sex not like", value, "sex"); return (Criteria) this; } public Criteria andSexIn(List values) { addCriterion("sex in", values, "sex"); return (Criteria) this; } public Criteria andSexNotIn(List values) { addCriterion("sex not in", values, "sex"); return (Criteria) this; } public Criteria andSexBetween(String value1, String value2) { addCriterion("sex between", value1, value2, "sex"); return (Criteria) this; } public Criteria andSexNotBetween(String value1, String value2) { addCriterion("sex not between", value1, value2, "sex"); return (Criteria) this; } public Criteria andBirthdayIsNull() { addCriterion("birthday is null"); return (Criteria) this; } public Criteria andBirthdayIsNotNull() { addCriterion("birthday is not null"); return (Criteria) this; } public Criteria andBirthdayEqualTo(Date value) { addCriterionForJDBCDate("birthday =", value, "birthday"); return (Criteria) this; } public Criteria andBirthdayNotEqualTo(Date value) { addCriterionForJDBCDate("birthday <>", value, "birthday"); return (Criteria) this; } public Criteria andBirthdayGreaterThan(Date value) { addCriterionForJDBCDate("birthday >", value, "birthday"); return (Criteria) this; } public Criteria andBirthdayGreaterThanOrEqualTo(Date value) { addCriterionForJDBCDate("birthday >=", value, "birthday"); return (Criteria) this; } public Criteria andBirthdayLessThan(Date value) { addCriterionForJDBCDate("birthday <", value, "birthday"); return (Criteria) this; } public Criteria andBirthdayLessThanOrEqualTo(Date value) { addCriterionForJDBCDate("birthday <=", value, "birthday"); return (Criteria) this; } public Criteria andBirthdayIn(List values) { addCriterionForJDBCDate("birthday in", values, "birthday"); return (Criteria) this; } public Criteria andBirthdayNotIn(List values) { addCriterionForJDBCDate("birthday not in", values, "birthday"); return (Criteria) this; } public Criteria andBirthdayBetween(Date value1, Date value2) { addCriterionForJDBCDate("birthday between", value1, value2, "birthday"); return (Criteria) this; } public Criteria andBirthdayNotBetween(Date value1, Date value2) { addCriterionForJDBCDate("birthday not between", value1, value2, "birthday"); return (Criteria) this; } public Criteria andAgeIsNull() { addCriterion("age is null"); return (Criteria) this; } public Criteria andAgeIsNotNull() { addCriterion("age is not null"); return (Criteria) this; } public Criteria andAgeEqualTo(Integer value) { addCriterion("age =", value, "age"); return (Criteria) this; } public Criteria andAgeNotEqualTo(Integer value) { addCriterion("age <>", value, "age"); return (Criteria) this; } public Criteria andAgeGreaterThan(Integer value) { addCriterion("age >", value, "age"); return (Criteria) this; } public Criteria andAgeGreaterThanOrEqualTo(Integer value) { addCriterion("age >=", value, "age"); return (Criteria) this; } public Criteria andAgeLessThan(Integer value) { addCriterion("age <", value, "age"); return (Criteria) this; } public Criteria andAgeLessThanOrEqualTo(Integer value) { addCriterion("age <=", value, "age"); return (Criteria) this; } public Criteria andAgeIn(List values) { addCriterion("age in", values, "age"); return (Criteria) this; } public Criteria andAgeNotIn(List values) { addCriterion("age not in", values, "age"); return (Criteria) this; } public Criteria andAgeBetween(Integer value1, Integer value2) { addCriterion("age between", value1, value2, "age"); return (Criteria) this; } public Criteria andAgeNotBetween(Integer value1, Integer value2) { addCriterion("age not between", value1, value2, "age"); return (Criteria) this; } public Criteria andIdentityCardIsNull() { addCriterion("identity_card is null"); return (Criteria) this; } public Criteria andIdentityCardIsNotNull() { addCriterion("identity_card is not null"); return (Criteria) this; } public Criteria andIdentityCardEqualTo(String value) { addCriterion("identity_card =", value, "identityCard"); return (Criteria) this; } public Criteria andIdentityCardNotEqualTo(String value) { addCriterion("identity_card <>", value, "identityCard"); return (Criteria) this; } public Criteria andIdentityCardGreaterThan(String value) { addCriterion("identity_card >", value, "identityCard"); return (Criteria) this; } public Criteria andIdentityCardGreaterThanOrEqualTo(String value) { addCriterion("identity_card >=", value, "identityCard"); return (Criteria) this; } public Criteria andIdentityCardLessThan(String value) { addCriterion("identity_card <", value, "identityCard"); return (Criteria) this; } public Criteria andIdentityCardLessThanOrEqualTo(String value) { addCriterion("identity_card <=", value, "identityCard"); return (Criteria) this; } public Criteria andIdentityCardLike(String value) { addCriterion("identity_card like", value, "identityCard"); return (Criteria) this; } public Criteria andIdentityCardNotLike(String value) { addCriterion("identity_card not like", value, "identityCard"); return (Criteria) this; } public Criteria andIdentityCardIn(List values) { addCriterion("identity_card in", values, "identityCard"); return (Criteria) this; } public Criteria andIdentityCardNotIn(List values) { addCriterion("identity_card not in", values, "identityCard"); return (Criteria) this; } public Criteria andIdentityCardBetween(String value1, String value2) { addCriterion("identity_card between", value1, value2, "identityCard"); return (Criteria) this; } public Criteria andIdentityCardNotBetween(String value1, String value2) { addCriterion("identity_card not between", value1, value2, "identityCard"); return (Criteria) this; } public Criteria andEmailIsNull() { addCriterion("email is null"); return (Criteria) this; } public Criteria andEmailIsNotNull() { addCriterion("email is not null"); return (Criteria) this; } public Criteria andEmailEqualTo(String value) { addCriterion("email =", value, "email"); return (Criteria) this; } public Criteria andEmailNotEqualTo(String value) { addCriterion("email <>", value, "email"); return (Criteria) this; } public Criteria andEmailGreaterThan(String value) { addCriterion("email >", value, "email"); return (Criteria) this; } public Criteria andEmailGreaterThanOrEqualTo(String value) { addCriterion("email >=", value, "email"); return (Criteria) this; } public Criteria andEmailLessThan(String value) { addCriterion("email <", value, "email"); return (Criteria) this; } public Criteria andEmailLessThanOrEqualTo(String value) { addCriterion("email <=", value, "email"); return (Criteria) this; } public Criteria andEmailLike(String value) { addCriterion("email like", value, "email"); return (Criteria) this; } public Criteria andEmailNotLike(String value) { addCriterion("email not like", value, "email"); return (Criteria) this; } public Criteria andEmailIn(List values) { addCriterion("email in", values, "email"); return (Criteria) this; } public Criteria andEmailNotIn(List values) { addCriterion("email not in", values, "email"); return (Criteria) this; } public Criteria andEmailBetween(String value1, String value2) { addCriterion("email between", value1, value2, "email"); return (Criteria) this; } public Criteria andEmailNotBetween(String value1, String value2) { addCriterion("email not between", value1, value2, "email"); return (Criteria) this; } public Criteria andQqIsNull() { addCriterion("qq is null"); return (Criteria) this; } public Criteria andQqIsNotNull() { addCriterion("qq is not null"); return (Criteria) this; } public Criteria andQqEqualTo(Integer value) { addCriterion("qq =", value, "qq"); return (Criteria) this; } public Criteria andQqNotEqualTo(Integer value) { addCriterion("qq <>", value, "qq"); return (Criteria) this; } public Criteria andQqGreaterThan(Integer value) { addCriterion("qq >", value, "qq"); return (Criteria) this; } public Criteria andQqGreaterThanOrEqualTo(Integer value) { addCriterion("qq >=", value, "qq"); return (Criteria) this; } public Criteria andQqLessThan(Integer value) { addCriterion("qq <", value, "qq"); return (Criteria) this; } public Criteria andQqLessThanOrEqualTo(Integer value) { addCriterion("qq <=", value, "qq"); return (Criteria) this; } public Criteria andQqIn(List values) { addCriterion("qq in", values, "qq"); return (Criteria) this; } public Criteria andQqNotIn(List values) { addCriterion("qq not in", values, "qq"); return (Criteria) this; } public Criteria andQqBetween(Integer value1, Integer value2) { addCriterion("qq between", value1, value2, "qq"); return (Criteria) this; } public Criteria andQqNotBetween(Integer value1, Integer value2) { addCriterion("qq not between", value1, value2, "qq"); return (Criteria) this; } public Criteria andWechatIsNull() { addCriterion("wechat is null"); return (Criteria) this; } public Criteria andWechatIsNotNull() { addCriterion("wechat is not null"); return (Criteria) this; } public Criteria andWechatEqualTo(String value) { addCriterion("wechat =", value, "wechat"); return (Criteria) this; } public Criteria andWechatNotEqualTo(String value) { addCriterion("wechat <>", value, "wechat"); return (Criteria) this; } public Criteria andWechatGreaterThan(String value) { addCriterion("wechat >", value, "wechat"); return (Criteria) this; } public Criteria andWechatGreaterThanOrEqualTo(String value) { addCriterion("wechat >=", value, "wechat"); return (Criteria) this; } public Criteria andWechatLessThan(String value) { addCriterion("wechat <", value, "wechat"); return (Criteria) this; } public Criteria andWechatLessThanOrEqualTo(String value) { addCriterion("wechat <=", value, "wechat"); return (Criteria) this; } public Criteria andWechatLike(String value) { addCriterion("wechat like", value, "wechat"); return (Criteria) this; } public Criteria andWechatNotLike(String value) { addCriterion("wechat not like", value, "wechat"); return (Criteria) this; } public Criteria andWechatIn(List values) { addCriterion("wechat in", values, "wechat"); return (Criteria) this; } public Criteria andWechatNotIn(List values) { addCriterion("wechat not in", values, "wechat"); return (Criteria) this; } public Criteria andWechatBetween(String value1, String value2) { addCriterion("wechat between", value1, value2, "wechat"); return (Criteria) this; } public Criteria andWechatNotBetween(String value1, String value2) { addCriterion("wechat not between", value1, value2, "wechat"); return (Criteria) this; } public Criteria andWeiboIsNull() { addCriterion("weibo is null"); return (Criteria) this; } public Criteria andWeiboIsNotNull() { addCriterion("weibo is not null"); return (Criteria) this; } public Criteria andWeiboEqualTo(String value) { addCriterion("weibo =", value, "weibo"); return (Criteria) this; } public Criteria andWeiboNotEqualTo(String value) { addCriterion("weibo <>", value, "weibo"); return (Criteria) this; } public Criteria andWeiboGreaterThan(String value) { addCriterion("weibo >", value, "weibo"); return (Criteria) this; } public Criteria andWeiboGreaterThanOrEqualTo(String value) { addCriterion("weibo >=", value, "weibo"); return (Criteria) this; } public Criteria andWeiboLessThan(String value) { addCriterion("weibo <", value, "weibo"); return (Criteria) this; } public Criteria andWeiboLessThanOrEqualTo(String value) { addCriterion("weibo <=", value, "weibo"); return (Criteria) this; } public Criteria andWeiboLike(String value) { addCriterion("weibo like", value, "weibo"); return (Criteria) this; } public Criteria andWeiboNotLike(String value) { addCriterion("weibo not like", value, "weibo"); return (Criteria) this; } public Criteria andWeiboIn(List values) { addCriterion("weibo in", values, "weibo"); return (Criteria) this; } public Criteria andWeiboNotIn(List values) { addCriterion("weibo not in", values, "weibo"); return (Criteria) this; } public Criteria andWeiboBetween(String value1, String value2) { addCriterion("weibo between", value1, value2, "weibo"); return (Criteria) this; } public Criteria andWeiboNotBetween(String value1, String value2) { addCriterion("weibo not between", value1, value2, "weibo"); return (Criteria) this; } public Criteria andPhoneIsNull() { addCriterion("phone is null"); return (Criteria) this; } public Criteria andPhoneIsNotNull() { addCriterion("phone is not null"); return (Criteria) this; } public Criteria andPhoneEqualTo(String value) { addCriterion("phone =", value, "phone"); return (Criteria) this; } public Criteria andPhoneNotEqualTo(String value) { addCriterion("phone <>", value, "phone"); return (Criteria) this; } public Criteria andPhoneGreaterThan(String value) { addCriterion("phone >", value, "phone"); return (Criteria) this; } public Criteria andPhoneGreaterThanOrEqualTo(String value) { addCriterion("phone >=", value, "phone"); return (Criteria) this; } public Criteria andPhoneLessThan(String value) { addCriterion("phone <", value, "phone"); return (Criteria) this; } public Criteria andPhoneLessThanOrEqualTo(String value) { addCriterion("phone <=", value, "phone"); return (Criteria) this; } public Criteria andPhoneLike(String value) { addCriterion("phone like", value, "phone"); return (Criteria) this; } public Criteria andPhoneNotLike(String value) { addCriterion("phone not like", value, "phone"); return (Criteria) this; } public Criteria andPhoneIn(List values) { addCriterion("phone in", values, "phone"); return (Criteria) this; } public Criteria andPhoneNotIn(List values) { addCriterion("phone not in", values, "phone"); return (Criteria) this; } public Criteria andPhoneBetween(String value1, String value2) { addCriterion("phone between", value1, value2, "phone"); return (Criteria) this; } public Criteria andPhoneNotBetween(String value1, String value2) { addCriterion("phone not between", value1, value2, "phone"); return (Criteria) this; } public Criteria andIsDelIsNull() { addCriterion("is_del is null"); return (Criteria) this; } public Criteria andIsDelIsNotNull() { addCriterion("is_del is not null"); return (Criteria) this; } public Criteria andIsDelEqualTo(String value) { addCriterion("is_del =", value, "isDel"); return (Criteria) this; } public Criteria andIsDelNotEqualTo(String value) { addCriterion("is_del <>", value, "isDel"); return (Criteria) this; } public Criteria andIsDelGreaterThan(String value) { addCriterion("is_del >", value, "isDel"); return (Criteria) this; } public Criteria andIsDelGreaterThanOrEqualTo(String value) { addCriterion("is_del >=", value, "isDel"); return (Criteria) this; } public Criteria andIsDelLessThan(String value) { addCriterion("is_del <", value, "isDel"); return (Criteria) this; } public Criteria andIsDelLessThanOrEqualTo(String value) { addCriterion("is_del <=", value, "isDel"); return (Criteria) this; } public Criteria andIsDelLike(String value) { addCriterion("is_del like", value, "isDel"); return (Criteria) this; } public Criteria andIsDelNotLike(String value) { addCriterion("is_del not like", value, "isDel"); return (Criteria) this; } public Criteria andIsDelIn(List values) { addCriterion("is_del in", values, "isDel"); return (Criteria) this; } public Criteria andIsDelNotIn(List values) { addCriterion("is_del not in", values, "isDel"); return (Criteria) this; } public Criteria andIsDelBetween(String value1, String value2) { addCriterion("is_del between", value1, value2, "isDel"); return (Criteria) this; } public Criteria andIsDelNotBetween(String value1, String value2) { addCriterion("is_del not between", value1, value2, "isDel"); return (Criteria) this; } public Criteria andCreateTimeIsNull() { addCriterion("create_time is null"); return (Criteria) this; } public Criteria andCreateTimeIsNotNull() { addCriterion("create_time is not null"); return (Criteria) this; } public Criteria andCreateTimeEqualTo(Date value) { addCriterion("create_time =", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeNotEqualTo(Date value) { addCriterion("create_time <>", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeGreaterThan(Date value) { addCriterion("create_time >", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { addCriterion("create_time >=", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeLessThan(Date value) { addCriterion("create_time <", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeLessThanOrEqualTo(Date value) { addCriterion("create_time <=", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeIn(List values) { addCriterion("create_time in", values, "createTime"); return (Criteria) this; } public Criteria andCreateTimeNotIn(List values) { addCriterion("create_time not in", values, "createTime"); return (Criteria) this; } public Criteria andCreateTimeBetween(Date value1, Date value2) { addCriterion("create_time between", value1, value2, "createTime"); return (Criteria) this; } public Criteria andCreateTimeNotBetween(Date value1, Date value2) { addCriterion("create_time not between", value1, value2, "createTime"); return (Criteria) this; } public Criteria andUpdateTimeIsNull() { addCriterion("update_time is null"); return (Criteria) this; } public Criteria andUpdateTimeIsNotNull() { addCriterion("update_time is not null"); return (Criteria) this; } public Criteria andUpdateTimeEqualTo(Date value) { addCriterion("update_time =", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeNotEqualTo(Date value) { addCriterion("update_time <>", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeGreaterThan(Date value) { addCriterion("update_time >", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { addCriterion("update_time >=", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeLessThan(Date value) { addCriterion("update_time <", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { addCriterion("update_time <=", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeIn(List values) { addCriterion("update_time in", values, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeNotIn(List values) { addCriterion("update_time not in", values, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeBetween(Date value1, Date value2) { addCriterion("update_time between", value1, value2, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { addCriterion("update_time not between", value1, value2, "updateTime"); return (Criteria) this; } } /** */ public static class Criteria extends GeneratedCriteria { protected Criteria() { super(); } } public static class Criterion { private String condition; private Object value; private Object secondValue; private boolean noValue; private boolean singleValue; private boolean betweenValue; private boolean listValue; private String typeHandler; public String getCondition() { return condition; } public Object getValue() { return value; } public Object getSecondValue() { return secondValue; } public boolean isNoValue() { return noValue; } public boolean isSingleValue() { return singleValue; } public boolean isBetweenValue() { return betweenValue; } public boolean isListValue() { return listValue; } public String getTypeHandler() { return typeHandler; } protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; this.value = value; this.typeHandler = typeHandler; if (value instanceof List) { this.listValue = true; } else { this.singleValue = true; } } protected Criterion(String condition, Object value) { this(condition, value, null); } protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; this.value = value; this.secondValue = secondValue; this.typeHandler = typeHandler; this.betweenValue = true; } protected Criterion(String condition, Object value, Object secondValue) { this(condition, value, secondValue, null); } } } ================================================ FILE: src/main/java/com/zmh/projectoa/model/Users.java ================================================ package com.zmh.projectoa.model; import java.io.Serializable; import java.util.Date; /** * @author */ public class Users implements Serializable { private Integer id; private String username; private String password; private String realname; private Integer departmentId; private Integer positionId; private String isDel; private Date lastLoginTime; private Date createTime; private Date updateTime; private static final long serialVersionUID = 1L; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getRealname() { return realname; } public void setRealname(String realname) { this.realname = realname; } public Integer getDepartmentId() { return departmentId; } public void setDepartmentId(Integer departmentId) { this.departmentId = departmentId; } public Integer getPositionId() { return positionId; } public void setPositionId(Integer positionId) { this.positionId = positionId; } public String getIsDel() { return isDel; } public void setIsDel(String isDel) { this.isDel = isDel; } public Date getLastLoginTime() { return lastLoginTime; } public void setLastLoginTime(Date lastLoginTime) { this.lastLoginTime = lastLoginTime; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public Date getUpdateTime() { return updateTime; } public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; } @Override public boolean equals(Object that) { if (this == that) { return true; } if (that == null) { return false; } if (getClass() != that.getClass()) { return false; } Users other = (Users) that; return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) && (this.getUsername() == null ? other.getUsername() == null : this.getUsername().equals(other.getUsername())) && (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword())) && (this.getRealname() == null ? other.getRealname() == null : this.getRealname().equals(other.getRealname())) && (this.getDepartmentId() == null ? other.getDepartmentId() == null : this.getDepartmentId().equals(other.getDepartmentId())) && (this.getPositionId() == null ? other.getPositionId() == null : this.getPositionId().equals(other.getPositionId())) && (this.getIsDel() == null ? other.getIsDel() == null : this.getIsDel().equals(other.getIsDel())) && (this.getLastLoginTime() == null ? other.getLastLoginTime() == null : this.getLastLoginTime().equals(other.getLastLoginTime())) && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())); } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getUsername() == null) ? 0 : getUsername().hashCode()); result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode()); result = prime * result + ((getRealname() == null) ? 0 : getRealname().hashCode()); result = prime * result + ((getDepartmentId() == null) ? 0 : getDepartmentId().hashCode()); result = prime * result + ((getPositionId() == null) ? 0 : getPositionId().hashCode()); result = prime * result + ((getIsDel() == null) ? 0 : getIsDel().hashCode()); result = prime * result + ((getLastLoginTime() == null) ? 0 : getLastLoginTime().hashCode()); result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); return result; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", username=").append(username); sb.append(", password=").append(password); sb.append(", realname=").append(realname); sb.append(", departmentId=").append(departmentId); sb.append(", positionId=").append(positionId); sb.append(", isDel=").append(isDel); sb.append(", lastLoginTime=").append(lastLoginTime); sb.append(", createTime=").append(createTime); sb.append(", updateTime=").append(updateTime); sb.append(", serialVersionUID=").append(serialVersionUID); sb.append("]"); return sb.toString(); } } ================================================ FILE: src/main/java/com/zmh/projectoa/model/UsersExample.java ================================================ package com.zmh.projectoa.model; import java.util.ArrayList; import java.util.Date; import java.util.List; public class UsersExample { protected String orderByClause; protected boolean distinct; protected List oredCriteria; private Integer limit; private Integer offset; public UsersExample() { oredCriteria = new ArrayList(); } public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; } public String getOrderByClause() { return orderByClause; } public void setDistinct(boolean distinct) { this.distinct = distinct; } public boolean isDistinct() { return distinct; } public List getOredCriteria() { return oredCriteria; } public void or(Criteria criteria) { oredCriteria.add(criteria); } public Criteria or() { Criteria criteria = createCriteriaInternal(); oredCriteria.add(criteria); return criteria; } public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); if (oredCriteria.size() == 0) { oredCriteria.add(criteria); } return criteria; } protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); return criteria; } public void clear() { oredCriteria.clear(); orderByClause = null; distinct = false; } public void setLimit(Integer limit) { this.limit = limit; } public Integer getLimit() { return limit; } public void setOffset(Integer offset) { this.offset = offset; } public Integer getOffset() { return offset; } protected abstract static class GeneratedCriteria { protected List criteria; protected GeneratedCriteria() { super(); criteria = new ArrayList(); } public boolean isValid() { return criteria.size() > 0; } public List getAllCriteria() { return criteria; } public List getCriteria() { return criteria; } protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); } protected void addCriterion(String condition, Object value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); } protected void addCriterion(String condition, Object value1, Object value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); } public Criteria andIdIsNull() { addCriterion("id is null"); return (Criteria) this; } public Criteria andIdIsNotNull() { addCriterion("id is not null"); return (Criteria) this; } public Criteria andIdEqualTo(Integer value) { addCriterion("id =", value, "id"); return (Criteria) this; } public Criteria andIdNotEqualTo(Integer value) { addCriterion("id <>", value, "id"); return (Criteria) this; } public Criteria andIdGreaterThan(Integer value) { addCriterion("id >", value, "id"); return (Criteria) this; } public Criteria andIdGreaterThanOrEqualTo(Integer value) { addCriterion("id >=", value, "id"); return (Criteria) this; } public Criteria andIdLessThan(Integer value) { addCriterion("id <", value, "id"); return (Criteria) this; } public Criteria andIdLessThanOrEqualTo(Integer value) { addCriterion("id <=", value, "id"); return (Criteria) this; } public Criteria andIdIn(List values) { addCriterion("id in", values, "id"); return (Criteria) this; } public Criteria andIdNotIn(List values) { addCriterion("id not in", values, "id"); return (Criteria) this; } public Criteria andIdBetween(Integer value1, Integer value2) { addCriterion("id between", value1, value2, "id"); return (Criteria) this; } public Criteria andIdNotBetween(Integer value1, Integer value2) { addCriterion("id not between", value1, value2, "id"); return (Criteria) this; } public Criteria andUsernameIsNull() { addCriterion("username is null"); return (Criteria) this; } public Criteria andUsernameIsNotNull() { addCriterion("username is not null"); return (Criteria) this; } public Criteria andUsernameEqualTo(String value) { addCriterion("username =", value, "username"); return (Criteria) this; } public Criteria andUsernameNotEqualTo(String value) { addCriterion("username <>", value, "username"); return (Criteria) this; } public Criteria andUsernameGreaterThan(String value) { addCriterion("username >", value, "username"); return (Criteria) this; } public Criteria andUsernameGreaterThanOrEqualTo(String value) { addCriterion("username >=", value, "username"); return (Criteria) this; } public Criteria andUsernameLessThan(String value) { addCriterion("username <", value, "username"); return (Criteria) this; } public Criteria andUsernameLessThanOrEqualTo(String value) { addCriterion("username <=", value, "username"); return (Criteria) this; } public Criteria andUsernameLike(String value) { addCriterion("username like", value, "username"); return (Criteria) this; } public Criteria andUsernameNotLike(String value) { addCriterion("username not like", value, "username"); return (Criteria) this; } public Criteria andUsernameIn(List values) { addCriterion("username in", values, "username"); return (Criteria) this; } public Criteria andUsernameNotIn(List values) { addCriterion("username not in", values, "username"); return (Criteria) this; } public Criteria andUsernameBetween(String value1, String value2) { addCriterion("username between", value1, value2, "username"); return (Criteria) this; } public Criteria andUsernameNotBetween(String value1, String value2) { addCriterion("username not between", value1, value2, "username"); return (Criteria) this; } public Criteria andPasswordIsNull() { addCriterion("password is null"); return (Criteria) this; } public Criteria andPasswordIsNotNull() { addCriterion("password is not null"); return (Criteria) this; } public Criteria andPasswordEqualTo(String value) { addCriterion("password =", value, "password"); return (Criteria) this; } public Criteria andPasswordNotEqualTo(String value) { addCriterion("password <>", value, "password"); return (Criteria) this; } public Criteria andPasswordGreaterThan(String value) { addCriterion("password >", value, "password"); return (Criteria) this; } public Criteria andPasswordGreaterThanOrEqualTo(String value) { addCriterion("password >=", value, "password"); return (Criteria) this; } public Criteria andPasswordLessThan(String value) { addCriterion("password <", value, "password"); return (Criteria) this; } public Criteria andPasswordLessThanOrEqualTo(String value) { addCriterion("password <=", value, "password"); return (Criteria) this; } public Criteria andPasswordLike(String value) { addCriterion("password like", value, "password"); return (Criteria) this; } public Criteria andPasswordNotLike(String value) { addCriterion("password not like", value, "password"); return (Criteria) this; } public Criteria andPasswordIn(List values) { addCriterion("password in", values, "password"); return (Criteria) this; } public Criteria andPasswordNotIn(List values) { addCriterion("password not in", values, "password"); return (Criteria) this; } public Criteria andPasswordBetween(String value1, String value2) { addCriterion("password between", value1, value2, "password"); return (Criteria) this; } public Criteria andPasswordNotBetween(String value1, String value2) { addCriterion("password not between", value1, value2, "password"); return (Criteria) this; } public Criteria andRealnameIsNull() { addCriterion("realname is null"); return (Criteria) this; } public Criteria andRealnameIsNotNull() { addCriterion("realname is not null"); return (Criteria) this; } public Criteria andRealnameEqualTo(String value) { addCriterion("realname =", value, "realname"); return (Criteria) this; } public Criteria andRealnameNotEqualTo(String value) { addCriterion("realname <>", value, "realname"); return (Criteria) this; } public Criteria andRealnameGreaterThan(String value) { addCriterion("realname >", value, "realname"); return (Criteria) this; } public Criteria andRealnameGreaterThanOrEqualTo(String value) { addCriterion("realname >=", value, "realname"); return (Criteria) this; } public Criteria andRealnameLessThan(String value) { addCriterion("realname <", value, "realname"); return (Criteria) this; } public Criteria andRealnameLessThanOrEqualTo(String value) { addCriterion("realname <=", value, "realname"); return (Criteria) this; } public Criteria andRealnameLike(String value) { addCriterion("realname like", value, "realname"); return (Criteria) this; } public Criteria andRealnameNotLike(String value) { addCriterion("realname not like", value, "realname"); return (Criteria) this; } public Criteria andRealnameIn(List values) { addCriterion("realname in", values, "realname"); return (Criteria) this; } public Criteria andRealnameNotIn(List values) { addCriterion("realname not in", values, "realname"); return (Criteria) this; } public Criteria andRealnameBetween(String value1, String value2) { addCriterion("realname between", value1, value2, "realname"); return (Criteria) this; } public Criteria andRealnameNotBetween(String value1, String value2) { addCriterion("realname not between", value1, value2, "realname"); return (Criteria) this; } public Criteria andDepartmentIdIsNull() { addCriterion("department_id is null"); return (Criteria) this; } public Criteria andDepartmentIdIsNotNull() { addCriterion("department_id is not null"); return (Criteria) this; } public Criteria andDepartmentIdEqualTo(Integer value) { addCriterion("department_id =", value, "departmentId"); return (Criteria) this; } public Criteria andDepartmentIdNotEqualTo(Integer value) { addCriterion("department_id <>", value, "departmentId"); return (Criteria) this; } public Criteria andDepartmentIdGreaterThan(Integer value) { addCriterion("department_id >", value, "departmentId"); return (Criteria) this; } public Criteria andDepartmentIdGreaterThanOrEqualTo(Integer value) { addCriterion("department_id >=", value, "departmentId"); return (Criteria) this; } public Criteria andDepartmentIdLessThan(Integer value) { addCriterion("department_id <", value, "departmentId"); return (Criteria) this; } public Criteria andDepartmentIdLessThanOrEqualTo(Integer value) { addCriterion("department_id <=", value, "departmentId"); return (Criteria) this; } public Criteria andDepartmentIdIn(List values) { addCriterion("department_id in", values, "departmentId"); return (Criteria) this; } public Criteria andDepartmentIdNotIn(List values) { addCriterion("department_id not in", values, "departmentId"); return (Criteria) this; } public Criteria andDepartmentIdBetween(Integer value1, Integer value2) { addCriterion("department_id between", value1, value2, "departmentId"); return (Criteria) this; } public Criteria andDepartmentIdNotBetween(Integer value1, Integer value2) { addCriterion("department_id not between", value1, value2, "departmentId"); return (Criteria) this; } public Criteria andPositionIdIsNull() { addCriterion("position_id is null"); return (Criteria) this; } public Criteria andPositionIdIsNotNull() { addCriterion("position_id is not null"); return (Criteria) this; } public Criteria andPositionIdEqualTo(Integer value) { addCriterion("position_id =", value, "positionId"); return (Criteria) this; } public Criteria andPositionIdNotEqualTo(Integer value) { addCriterion("position_id <>", value, "positionId"); return (Criteria) this; } public Criteria andPositionIdGreaterThan(Integer value) { addCriterion("position_id >", value, "positionId"); return (Criteria) this; } public Criteria andPositionIdGreaterThanOrEqualTo(Integer value) { addCriterion("position_id >=", value, "positionId"); return (Criteria) this; } public Criteria andPositionIdLessThan(Integer value) { addCriterion("position_id <", value, "positionId"); return (Criteria) this; } public Criteria andPositionIdLessThanOrEqualTo(Integer value) { addCriterion("position_id <=", value, "positionId"); return (Criteria) this; } public Criteria andPositionIdIn(List values) { addCriterion("position_id in", values, "positionId"); return (Criteria) this; } public Criteria andPositionIdNotIn(List values) { addCriterion("position_id not in", values, "positionId"); return (Criteria) this; } public Criteria andPositionIdBetween(Integer value1, Integer value2) { addCriterion("position_id between", value1, value2, "positionId"); return (Criteria) this; } public Criteria andPositionIdNotBetween(Integer value1, Integer value2) { addCriterion("position_id not between", value1, value2, "positionId"); return (Criteria) this; } public Criteria andIsDelIsNull() { addCriterion("is_del is null"); return (Criteria) this; } public Criteria andIsDelIsNotNull() { addCriterion("is_del is not null"); return (Criteria) this; } public Criteria andIsDelEqualTo(String value) { addCriterion("is_del =", value, "isDel"); return (Criteria) this; } public Criteria andIsDelNotEqualTo(String value) { addCriterion("is_del <>", value, "isDel"); return (Criteria) this; } public Criteria andIsDelGreaterThan(String value) { addCriterion("is_del >", value, "isDel"); return (Criteria) this; } public Criteria andIsDelGreaterThanOrEqualTo(String value) { addCriterion("is_del >=", value, "isDel"); return (Criteria) this; } public Criteria andIsDelLessThan(String value) { addCriterion("is_del <", value, "isDel"); return (Criteria) this; } public Criteria andIsDelLessThanOrEqualTo(String value) { addCriterion("is_del <=", value, "isDel"); return (Criteria) this; } public Criteria andIsDelLike(String value) { addCriterion("is_del like", value, "isDel"); return (Criteria) this; } public Criteria andIsDelNotLike(String value) { addCriterion("is_del not like", value, "isDel"); return (Criteria) this; } public Criteria andIsDelIn(List values) { addCriterion("is_del in", values, "isDel"); return (Criteria) this; } public Criteria andIsDelNotIn(List values) { addCriterion("is_del not in", values, "isDel"); return (Criteria) this; } public Criteria andIsDelBetween(String value1, String value2) { addCriterion("is_del between", value1, value2, "isDel"); return (Criteria) this; } public Criteria andIsDelNotBetween(String value1, String value2) { addCriterion("is_del not between", value1, value2, "isDel"); return (Criteria) this; } public Criteria andLastLoginTimeIsNull() { addCriterion("last_login_time is null"); return (Criteria) this; } public Criteria andLastLoginTimeIsNotNull() { addCriterion("last_login_time is not null"); return (Criteria) this; } public Criteria andLastLoginTimeEqualTo(Date value) { addCriterion("last_login_time =", value, "lastLoginTime"); return (Criteria) this; } public Criteria andLastLoginTimeNotEqualTo(Date value) { addCriterion("last_login_time <>", value, "lastLoginTime"); return (Criteria) this; } public Criteria andLastLoginTimeGreaterThan(Date value) { addCriterion("last_login_time >", value, "lastLoginTime"); return (Criteria) this; } public Criteria andLastLoginTimeGreaterThanOrEqualTo(Date value) { addCriterion("last_login_time >=", value, "lastLoginTime"); return (Criteria) this; } public Criteria andLastLoginTimeLessThan(Date value) { addCriterion("last_login_time <", value, "lastLoginTime"); return (Criteria) this; } public Criteria andLastLoginTimeLessThanOrEqualTo(Date value) { addCriterion("last_login_time <=", value, "lastLoginTime"); return (Criteria) this; } public Criteria andLastLoginTimeIn(List values) { addCriterion("last_login_time in", values, "lastLoginTime"); return (Criteria) this; } public Criteria andLastLoginTimeNotIn(List values) { addCriterion("last_login_time not in", values, "lastLoginTime"); return (Criteria) this; } public Criteria andLastLoginTimeBetween(Date value1, Date value2) { addCriterion("last_login_time between", value1, value2, "lastLoginTime"); return (Criteria) this; } public Criteria andLastLoginTimeNotBetween(Date value1, Date value2) { addCriterion("last_login_time not between", value1, value2, "lastLoginTime"); return (Criteria) this; } public Criteria andCreateTimeIsNull() { addCriterion("create_time is null"); return (Criteria) this; } public Criteria andCreateTimeIsNotNull() { addCriterion("create_time is not null"); return (Criteria) this; } public Criteria andCreateTimeEqualTo(Date value) { addCriterion("create_time =", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeNotEqualTo(Date value) { addCriterion("create_time <>", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeGreaterThan(Date value) { addCriterion("create_time >", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { addCriterion("create_time >=", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeLessThan(Date value) { addCriterion("create_time <", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeLessThanOrEqualTo(Date value) { addCriterion("create_time <=", value, "createTime"); return (Criteria) this; } public Criteria andCreateTimeIn(List values) { addCriterion("create_time in", values, "createTime"); return (Criteria) this; } public Criteria andCreateTimeNotIn(List values) { addCriterion("create_time not in", values, "createTime"); return (Criteria) this; } public Criteria andCreateTimeBetween(Date value1, Date value2) { addCriterion("create_time between", value1, value2, "createTime"); return (Criteria) this; } public Criteria andCreateTimeNotBetween(Date value1, Date value2) { addCriterion("create_time not between", value1, value2, "createTime"); return (Criteria) this; } public Criteria andUpdateTimeIsNull() { addCriterion("update_time is null"); return (Criteria) this; } public Criteria andUpdateTimeIsNotNull() { addCriterion("update_time is not null"); return (Criteria) this; } public Criteria andUpdateTimeEqualTo(Date value) { addCriterion("update_time =", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeNotEqualTo(Date value) { addCriterion("update_time <>", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeGreaterThan(Date value) { addCriterion("update_time >", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { addCriterion("update_time >=", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeLessThan(Date value) { addCriterion("update_time <", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { addCriterion("update_time <=", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeIn(List values) { addCriterion("update_time in", values, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeNotIn(List values) { addCriterion("update_time not in", values, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeBetween(Date value1, Date value2) { addCriterion("update_time between", value1, value2, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { addCriterion("update_time not between", value1, value2, "updateTime"); return (Criteria) this; } } /** */ public static class Criteria extends GeneratedCriteria { protected Criteria() { super(); } } public static class Criterion { private String condition; private Object value; private Object secondValue; private boolean noValue; private boolean singleValue; private boolean betweenValue; private boolean listValue; private String typeHandler; public String getCondition() { return condition; } public Object getValue() { return value; } public Object getSecondValue() { return secondValue; } public boolean isNoValue() { return noValue; } public boolean isSingleValue() { return singleValue; } public boolean isBetweenValue() { return betweenValue; } public boolean isListValue() { return listValue; } public String getTypeHandler() { return typeHandler; } protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; this.value = value; this.typeHandler = typeHandler; if (value instanceof List) { this.listValue = true; } else { this.singleValue = true; } } protected Criterion(String condition, Object value) { this(condition, value, null); } protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; this.value = value; this.secondValue = secondValue; this.typeHandler = typeHandler; this.betweenValue = true; } protected Criterion(String condition, Object value, Object secondValue) { this(condition, value, secondValue, null); } } } ================================================ FILE: src/main/java/com/zmh/projectoa/service/DepartmentService.java ================================================ package com.zmh.projectoa.service; import com.zmh.projectoa.mapper.DepartmentsMapper; import com.zmh.projectoa.model.Departments; import com.zmh.projectoa.model.DepartmentsExample; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; /** * Created by ChengShanyunduo * 2018/2/14 */ @Service public class DepartmentService { @Autowired DepartmentsMapper departmentsMapper; /** * 查询部门 * @return */ public List queryDepartment(){ DepartmentsExample departmentsExample = new DepartmentsExample(); return departmentsMapper.selectByExample(departmentsExample); } } ================================================ FILE: src/main/java/com/zmh/projectoa/service/MessageService.java ================================================ package com.zmh.projectoa.service; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.zmh.projectoa.mapper.MessagesMapper; import com.zmh.projectoa.model.Messages; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; import java.util.Map; /** * @author zmh * @date 2018/2/2621:58 */ @Service public class MessageService { @Autowired private MessagesMapper messagesMapper; public int insertMessage(Messages messages) { messagesMapper.insertSelective(messages); return messages.getId(); } /** * 传入未读ID数组 返回未读信息 (Redis里含有的ID再Mysql中) */ public List> selectByIDs(List IDs){ return messagesMapper.selectByIDs(IDs); } /** * 传入接受者ID 返回所有此人的信息 (Mysql中) */ public PageInfo selectByreceiveID(Integer ID, Integer pageNum){ PageHelper.startPage(pageNum, 10); List> list = messagesMapper.selectByreceiveID(ID); PageInfo pageInfo = new PageInfo(list); return pageInfo; } public Messages selectByID(Integer id){ return messagesMapper.selectByPrimaryKey(id); } public List> getLastMessage(Integer receiveID){ return messagesMapper.selectLastOneByReceiveID(receiveID); } } ================================================ FILE: src/main/java/com/zmh/projectoa/service/NoticeService.java ================================================ package com.zmh.projectoa.service; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.zmh.projectoa.mapper.NoticesMapper; import com.zmh.projectoa.model.Notices; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; import java.util.Map; /** * @author zmh * @date 2018/2/2621:58 */ @Service public class NoticeService { @Autowired private NoticesMapper noticesMapper; public int insertNotice(Notices notices){ noticesMapper.insertSelective(notices); return notices.getId(); } /** * 获取具体某条公告 */ public Notices getNotice(Integer noticeID){ return noticesMapper.selectByPrimaryKey(noticeID); } /** * 获取本人所有公告 * 这个功能不分人 大家都收到一样 */ public PageInfo getAllNotices(Integer pageNum){ PageHelper.startPage(pageNum, 10); List> result = noticesMapper.selectAllNotice(); PageInfo pageInfo = new PageInfo(result); return pageInfo; } /** * 传入未读ID数组 返回未读信息 (Redis里含有的ID再Mysql中) */ public List> selectByIDs(List IDs){ return noticesMapper.selectByIDs(IDs); } public Notices selectByID(Integer id){ return noticesMapper.selectByPrimaryKey(id); } public List> getLastNotice(){ return noticesMapper.selectLastOneByReceiveID(); } } ================================================ FILE: src/main/java/com/zmh/projectoa/service/PositionService.java ================================================ package com.zmh.projectoa.service; import com.zmh.projectoa.mapper.PositionsMapper; import com.zmh.projectoa.model.Positions; import com.zmh.projectoa.model.PositionsExample; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; /** * Created by ChengShanyunduo * 2018/2/14 */ @Service public class PositionService { @Autowired PositionsMapper positionsMapper; /** * 查询职位 * @return */ public List queryPosition(){ PositionsExample positionsExample = new PositionsExample(); List positions = positionsMapper.selectByExample(positionsExample); return positions; } } ================================================ FILE: src/main/java/com/zmh/projectoa/service/RedisService.java ================================================ package com.zmh.projectoa.service; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.stereotype.Service; /** * @author zmh * @date 2018/2/1813:42 * Spring Data Redis 的基本款 * 只要Gradle或Maven引入依赖 就可以如此使用Redis 作为缓存 */ @Service public class RedisService { @Autowired private StringRedisTemplate redisTemplate; public void setValue(String key, String value) { redisTemplate.opsForValue().set(key, value); } public String getValue(String key) { return redisTemplate.opsForValue().get(key); } } ================================================ FILE: src/main/java/com/zmh/projectoa/service/UserinfoService.java ================================================ package com.zmh.projectoa.service; import com.zmh.projectoa.mapper.UserinfoMapper; import com.zmh.projectoa.model.Userinfo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; /** * Created by ChengShanyunduo * 2018/2/25 */ @Service public class UserinfoService { @Autowired UserinfoMapper userinfoMapper; public Userinfo getUserinfoByUserId(Integer id){ Userinfo userinfo = userinfoMapper.queryUserinfoByUserid(id); return userinfo; } public int saveUserinfo(Userinfo userinfo){ Integer id = userinfoMapper.queryUserinfoByUserid(userinfo.getUserId()).getId(); userinfo.setId(id); int result = userinfoMapper.updateByPrimaryKeySelective(userinfo); return result; } } ================================================ FILE: src/main/java/com/zmh/projectoa/service/UsersService.java ================================================ package com.zmh.projectoa.service; import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.zmh.projectoa.dto.ReturnDto; import com.zmh.projectoa.mapper.UserinfoMapper; import com.zmh.projectoa.mapper.UsersMapper; import com.zmh.projectoa.model.Userinfo; import com.zmh.projectoa.model.Users; import com.zmh.projectoa.model.UsersExample; import com.zmh.projectoa.util.MD5Util; import org.omg.CORBA.UserException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.security.oauth2.resource.UserInfoRestTemplateCustomizer; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.List; import java.util.Map; /** * Created by ChengShanyunduo * 2018/2/14 */ @Service public class UsersService { @Autowired UsersMapper usersMapper; @Autowired UserinfoMapper userinfoMapper; /** * 创建职工 * @param users * @return */ public int createUser(Users users){ String password = MD5Util.string2MD5("123456"); users.setPassword(password); int count = usersMapper.insertSelective(users); if (count != 1){ return 0; } UsersExample usersExample = new UsersExample(); usersExample.createCriteria().andUsernameEqualTo(users.getUsername()); Users user = queryUserByUsername(users); Userinfo userinfo = new Userinfo(); userinfo.setUserId(user.getId()); count = userinfoMapper.insertSelective(userinfo); return count; } /** * 根据用户名查找用户 * @param users * @return */ public Users queryUserByUsername(Users users){ return usersMapper.queryUserByUsername(users.getUsername()); } /** * 分页查询 * @param userDto * @return */ public PageInfo userList(Map map, Integer pageNum){ map.put("isDel", "0"); PageHelper.startPage(pageNum, 10); List list = usersMapper.queryBySelective(map); PageInfo page = new PageInfo(list); return page; } /** * 用户回显 * @param id * @return */ public Users detailUser(Integer id){ Users user = usersMapper.selectByPrimaryKey(id); return user; } /** * 修改用户 * @param id * @param user * @return */ public int editUser(Integer id, Users user){ user.setUsername(null); user.setId(id); int result = usersMapper.updateByPrimaryKeySelective(user); return result; } /** * 删除用户 * @param id * @return */ public int deleteUser(Integer id){ Users user = new Users(); user.setId(id); user.setIsDel("1"); Userinfo userinfo = userinfoMapper.queryUserinfoByUserid(id); userinfo.setIsDel("1"); int result = usersMapper.updateByPrimaryKeySelective(user); int result2 = userinfoMapper.updateByPrimaryKeySelective(userinfo); if (result == 1 && result2 == 1){ return 1; } return 0; } /** * 重置密码 * @param id * @return */ public int reverseUser(Integer id){ Users user = new Users(); user.setId(id); String password = MD5Util.string2MD5("123456"); user.setPassword(password); int result = usersMapper.updateByPrimaryKeySelective(user); return result; } /** * 取所有用户 下拉框使用 * @return */ public ReturnDto getAllUser(Integer id){ List> list = usersMapper.queryAll(id); return ReturnDto.buildSuccessReturnDto(list); } public List getAllUsers(){ return usersMapper.queryAllUsers(); } } ================================================ FILE: src/main/java/com/zmh/projectoa/util/JSONUtil.java ================================================ package com.zmh.projectoa.util; import java.util.ArrayList; import java.util.List; public class JSONUtil { /** * 传入Redis里未读ID的String 返回List * 默认格式 1,2,3,4 */ public static List String2List(String string) { List list = new ArrayList<>(); if (string != null && !"".equals(string)) for (String temp : string.split(",")) { if (temp != null && !"".equals(temp)) list.add(Integer.parseInt(temp)); } return list; } /** * 传入Redis里未读ID的String 返回List */ public static String List2String(List list) { StringBuffer sb = new StringBuffer(); for (int i = 0; i < list.size(); i++) { Integer integer = list.get(i); sb.append(integer); if (i != list.size() - 1) sb.append(","); } return sb.toString(); } } ================================================ FILE: src/main/java/com/zmh/projectoa/util/MD5Util.java ================================================ package com.zmh.projectoa.util; import java.security.MessageDigest; /** * Created by ChengShanyunduo * 2018/1/3 */ public class MD5Util { /*** * MD5加码 生成32位md5码 */ public static String string2MD5(String inStr){ MessageDigest md5 = null; try{ md5 = MessageDigest.getInstance("MD5"); }catch (Exception e){ System.out.println(e.toString()); e.printStackTrace(); return ""; } char[] charArray = inStr.toCharArray(); byte[] byteArray = new byte[charArray.length]; for (int i = 0; i < charArray.length; i++) byteArray[i] = (byte) charArray[i]; byte[] md5Bytes = md5.digest(byteArray); StringBuffer hexValue = new StringBuffer(); for (int i = 0; i < md5Bytes.length; i++){ int val = ((int) md5Bytes[i]) & 0xff; if (val < 16) hexValue.append("0"); hexValue.append(Integer.toHexString(val)); } return hexValue.toString(); } /** * 加密解密算法 执行一次加密,两次解密 */ // public static String convertMD5(String inStr){ // // char[] a = inStr.toCharArray(); // for (int i = 0; i < a.length; i++){ // a[i] = (char) (a[i] ^ 't'); // } // String s = new String(a); // return s; // // } // // 测试主函数 // public static void main(String args[]) { // String s = new String("duo521"); // System.out.println("原始:" + s); // System.out.println("MD5后:" + string2MD5(s)); // System.out.println("加密的:" + convertMD5(s)); // System.out.println("解密的:" + convertMD5(convertMD5(s))); // // } } ================================================ FILE: src/main/java/com/zmh/projectoa/util/ParameterUtil.java ================================================ package com.zmh.projectoa.util; import javax.servlet.http.HttpServletRequest; import java.util.HashMap; import java.util.Iterator; import java.util.Map; /** * Created by ChengShanyunduo * 2018/3/2 */ public class ParameterUtil { @SuppressWarnings("unchecked") public static Map getParameterMap(HttpServletRequest request) { // 参数Map Map properties = request.getParameterMap(); // 返回值Map Map returnMap = new HashMap(); Iterator entries = properties.entrySet().iterator(); Map.Entry entry; String name = ""; String value = ""; while (entries.hasNext()) { entry = (Map.Entry) entries.next(); name = (String) entry.getKey(); Object valueObj = entry.getValue(); if(null == valueObj){ value = ""; }else if(valueObj instanceof String[]){ String[] values = (String[])valueObj; for(int i=0;i list = new ArrayList<>(); try { File file = new File(filePath); File[] files = file.listFiles(); for (File f : files) { if (f.isFile()) { list.add(f.getName()); } } } catch (Exception e) { ReturnDto.buildFailedReturnDto(e.getMessage()); } return ReturnDto.buildSuccessReturnDto(list); } /** * 传入文件全路径 读取文件内容 * * @param filePath 文件全路径 * @return 文件内容 */ public static ReturnDto readFileByLines(String filePath, String fileName, String charSet) { StringBuffer sb = new StringBuffer(); try { File file = new File(filePath + "/" + fileName); BufferedReader reader=new BufferedReader(new InputStreamReader (new FileInputStream(file),charSet)); String tempString = null; while ((tempString = reader.readLine()) != null) { sb.append(tempString + "\r\n"); } reader.close(); } catch (IOException e) { ReturnDto.buildFailedReturnDto(e.getMessage()); } return ReturnDto.buildSuccessReturnDto(sb.toString()); } } ================================================ FILE: src/main/resources/application.properties ================================================ # server server.port=8080 server.context-path=/projectoa/ spring.application.name=projectoa # thymeleaf spring.thymeleaf.prefix=classpath:/templates/view/ spring.thymeleaf.suffix=.html # \u914D\u5408\u70ED\u90E8\u7F72 spring.thymeleaf.cache=false # \u53CB\u597D\u7684HTML5\u6807\u51C6 spring.thymeleaf.mode=LEGACYHTML5 # mysql spring.datasource.driver-class-name=com.mysql.jdbc.Driver spring.datasource.url=jdbc:mysql://localhost:3306/dboa?useSSL=false&useUnicode=true&characterEncoding=utf8&autoReconnect=true spring.datasource.username=root spring.datasource.password=root # mybatis mybatis.mapper-locations=classpath:/templates/mapper/*Mapper.xml mybatis.type-aliases-package=com.zmh.projectoa.model # \u81EA\u52A8\u8F6C\u6362\u6210\u9A7C\u5CF0 mybatis.configuration.map-underscore-to-camel-case=true # \u70ED\u90E8\u7F72 spring.devtools.livereload.enabled=true # redis\u5168\u5BB6\u6876 spring.redis.host=127.0.0.1 spring.redis.port=6379 # \u540C\u65F6\u6700\u5927\u8FDE\u63A5\u6570 spring.redis.pool.max-active=64 # \u6700\u5927\u7A7A\u95F2\u8FDE\u63A5\u6570 spring.redis.pool.max-idle=8 # \u6700\u5927\u83B7\u53D6\u7B49\u5F85\u65F6\u95F4 spring.redis.pool.max-wait=5000 ## spring boot admin \u76D1\u63A7\u7AEF spring.boot.admin.context-path=/monitor # \u4E0A\u7EBF\u9700\u8981\u6253\u5F00\u8FD9\u4E2A spring.boot.admin.client.service-base-url=http://localhost:${server.port}/ ## spring boot admin \u88AB\u76D1\u63A7\u7AEF spring.boot.admin.client.prefer-ip=true spring.boot.admin.url=http://localhost:${server.port}/${spring.application.name} management.security.enabled=false # \u76D1\u63A7\u9875\u9762\u7684\u4FE1\u606F \u7531\u4E8E\u6CA1\u6709maven\u5DE5\u5177\uFF0C\u8FD9\u91CC\u9009\u62E9\u624B\u52A8\u8F93\u5165 info.app.name:projectoa info.app.description:graduation project info.app.version:0.0.1 info.app.spring-boot-version:1.5.10 # LOG\u751F\u6210\u7684\u4F4D\u7F6E(\u4E0D\u662F\u81EA\u5E26\u7684\uFF0C\u662F\u6211\u81EA\u5DF1\u52A0\u7684\uFF0C\u5728xml\u91CC\u8C03\u7528\uFF0C\u53E6\u5916\u5FC5\u987B\u53CD\u659C\u6760\u6216\u8005\u53CC\u659C\u6760) #logback.filepath=C:/logs # aliyun\u670D\u52A1\u5668\u7528\u8FD9\u4E2A logback.filepath=/root/logs #logback.filepath=/Users/chengshanyunduo/Documents/log # \u8BFB\u53D6\u65E5\u5FD7\u6587\u4EF6\u65F6\u5019\u7528\u7684\u7F16\u7801\uFF0C\u5EFA\u8BAEUTF-8 logback.charset=UTF-8 #json\u8FD4\u56DE\u65E5\u671F\u683C\u5F0F spring.jackson.date-format=yyyy-MM-dd HH:mm:ss spring.jackson.time-zone=GMT+8 ================================================ FILE: src/main/resources/banner.txt ================================================ 2018-03-05 该项目是由 程衫耘朵 和 张明辉 共同完成! https://github.com/chsyd1028 https://github.com/18121259693 ================================================ FILE: src/main/resources/logback.xml ================================================ %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n ${logback.filepath}/projectoa.%d{yyyyMMdd}.log 30 %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n 10MB ================================================ FILE: src/main/resources/public/error/404.html ================================================ OA系统
404
Page Not Found

您所访问的页面可能出现了一些异常情况,请与系统管理员联系。

================================================ FILE: src/main/resources/static/assets/css/admin.css ================================================ /** * admin.css */ /* fixed-layout 固定头部和边栏布局 */ html, body { height: 100%; overflow: hidden; } ul { margin-top: 0; } .admin-icon-yellow { color: #ffbe40; } .admin-header { position: fixed; top: 0; left: 0; right: 0; z-index: 1500; font-size: 1.4rem; margin-bottom: 0; } .admin-header-list a:hover :after { content: none; } .admin-main { position: relative; height: 100%; padding-top: 51px; background: #f3f3f3; } .admin-menu { position: fixed; z-index: 10; bottom: 30px; right: 20px; } .admin-sidebar { width: 260px; min-height: 100%; float: left; border-right: 1px solid #cecece; } .admin-sidebar.am-active { z-index: 1600; } .admin-sidebar-list { margin-bottom: 0; } .admin-sidebar-list li a { color: #5c5c5c; padding-left: 24px; } .admin-sidebar-list li:first-child { border-top: none; } .admin-sidebar-sub { margin-top: 0; margin-bottom: 0; box-shadow: 0 16px 8px -15px #e2e2e2 inset; background: #ececec; padding-left: 24px; } .admin-sidebar-sub li:first-child { border-top: 1px solid #dedede; } .admin-sidebar-panel { margin: 10px; } .admin-content { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column; background: #fff; } .admin-content, .admin-sidebar { height: 100%; overflow-x: hidden; overflow-y: scroll; -webkit-overflow-scrolling: touch; } .admin-content-body { -webkit-box-flex: 1; -webkit-flex: 1 0 auto; -ms-flex: 1 0 auto; flex: 1 0 auto; } .admin-content-footer { font-size: 85%; color: #777; } .admin-content-list { border: 1px solid #e9ecf1; margin-top: 0; } .admin-content-list li { border: 1px solid #e9ecf1; border-width: 0 1px; margin-left: -1px; } .admin-content-list li:first-child { border-left: none; } .admin-content-list li:last-child { border-right: none; } .admin-content-table a { color: #535353; } .admin-content-file { margin-bottom: 0; color: #666; } .admin-content-file p { margin: 0 0 5px 0; font-size: 1.4rem; } .admin-content-file li { padding: 10px 0; } .admin-content-file li:first-child { border-top: none; } .admin-content-file li:last-child { border-bottom: none; } .admin-content-file li .am-progress { margin-bottom: 4px; } .admin-content-file li .am-progress-bar { line-height: 14px; } .admin-content-task { margin-bottom: 0; } .admin-content-task li { padding: 5px 0; border-color: #eee; } .admin-content-task li:first-child { border-top: none; } .admin-content-task li:last-child { border-bottom: none; } .admin-task-meta { font-size: 1.2rem; color: #999; } .admin-task-bd { font-size: 1.4rem; margin-bottom: 5px; } .admin-content-comment { margin-bottom: 0; } .admin-content-comment .am-comment-bd { font-size: 1.4rem; } .admin-content-pagination { margin-bottom: 0; } .admin-content-pagination li a { padding: 4px 8px; } @media only screen and (min-width: 641px) { .admin-sidebar { display: block; position: static; background: none; } .admin-offcanvas-bar { position: static; width: auto; background: none; -webkit-transform: translate3d(0, 0, 0); -ms-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); overflow-y: visible; min-height: 100%; } .admin-offcanvas-bar:after { content: none; } } @media only screen and (max-width: 640px) { .admin-sidebar { width: inherit; } .admin-offcanvas-bar { background: #f3f3f3; } .admin-offcanvas-bar:after { background: #BABABA; } .admin-sidebar-list a:hover, .admin-sidebar-list a:active{ -webkit-transition: background-color .3s ease; -moz-transition: background-color .3s ease; -ms-transition: background-color .3s ease; -o-transition: background-color .3s ease; transition: background-color .3s ease; background: #E4E4E4; } .admin-content-list li { padding: 10px; border-width: 1px 0; margin-top: -1px; } .admin-content-list li:first-child { border-top: none; } .admin-content-list li:last-child { border-bottom: none; } .admin-form-text { text-align: left !important; } } /* * user.html css */ .user-info { margin-bottom: 15px; } .user-info .am-progress { margin-bottom: 4px; } .user-info p { margin: 5px; } .user-info-order { font-size: 1.4rem; } /* * errorLog.html css */ .error-log .am-pre-scrollable { max-height: 40rem; } /* * table.html css */ .table-main { font-size: 1.4rem; padding: .5rem; } .table-main button { background: #fff; } .table-check { width: 30px; } .table-id { width: 50px; } @media only screen and (max-width: 640px) { .table-select { margin-top: 10px; margin-left: 5px; } } /* gallery.html css */ .gallery-list li { padding: 10px; } .gallery-list a { color: #666; } .gallery-list a:hover { color: #3bb4f2; } .gallery-title { margin-top: 6px; font-size: 1.4rem; } .gallery-desc { font-size: 1.2rem; margin-top: 4px; } /* 404.html css */ .page-404 { background: #fff; border: none; width: 200px; margin: 0 auto; } ================================================ FILE: src/main/resources/static/assets/css/app.css ================================================ ul, li { list-style: none; padding: 0; margin: 0; } header { z-index: 1200; position: relative; } .tpl-header-logo { width: 240px; height: 57px; display: table; text-align: center; position: relative; z-index: 1300; } .tpl-header-logo a { display: table-cell; vertical-align: middle; } .tpl-header-logo img { width: 170px; } .tpl-header-fluid { margin-left: 240px; height: 56px; padding-left: 20px; padding-right: 20px; } .tpl-header-switch-button { margin-top: 0px; margin-bottom: 0px; float: left; color: #cfcfcf; margin-left: -20px; margin-right: 0; border: 0; border-radius: 0; padding: 0px 22px; font-size: 22px; line-height: 55px; } .tpl-header-switch-button:hover { outline: none; } .tpl-header-search-form { height: 54px; line-height: 52px; margin-left: 10px; } .tpl-header-search-box, .tpl-header-search-btn { transition: all 0.4s ease-in-out; color: #848c90; background: none; border: none; outline: none; } .tpl-header-search-box { font-size: 14px; } .tpl-header-search-box:hover, .tpl-header-search-box:active { color: #fff; } .tpl-header-search-btn { font-size: 15px; } .tpl-header-search-btn:hover, .tpl-header-search-btn:active { color: #fff; } .tpl-header-navbar { color: #fff; } .tpl-header-navbar li { float: left; } .tpl-header-navbar a { line-height: 56px; display: block; padding: 0 16px; position: relative; } .tpl-header-navbar a .item-feed-badge { position: absolute; top: 9px; left: 25px; } ul.tpl-dropdown-content { padding: 10px; margin-top: 0; width: 300px; background-color: #2f3638; border: 1px solid #525e62; border-radius: 0; } ul.tpl-dropdown-content li { float: none; } ul.tpl-dropdown-content:before, ul.tpl-dropdown-content:after { display: none; } ul.tpl-dropdown-content .tpl-dropdown-menu-notifications-title { font-size: 12px; float: left; color: rgba(255, 255, 255, 0.7); } ul.tpl-dropdown-content .tpl-dropdown-menu-notifications-time { float: right; text-align: right; color: rgba(255, 255, 255, 0.7); font-size: 11px; width: 50px; margin-left: 10px; } ul.tpl-dropdown-content .tpl-dropdown-menu-notifications:last-child .tpl-dropdown-menu-notifications-item { text-align: center; border: none; font-size: 12px; } ul.tpl-dropdown-content .tpl-dropdown-menu-notifications:last-child .tpl-dropdown-menu-notifications-item i { margin-left: -6px; } ul.tpl-dropdown-content .tpl-dropdown-menu-messages:last-child .tpl-dropdown-menu-messages-item { text-align: center; border: none; font-size: 12px; } ul.tpl-dropdown-content .tpl-dropdown-menu-messages:last-child .tpl-dropdown-menu-messages-item i { margin-left: -6px; } ul.tpl-dropdown-content .tpl-dropdown-menu-notifications-item, ul.tpl-dropdown-content .tpl-dropdown-menu-messages-item { padding: 12px; color: #fff; line-height: 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.15); } ul.tpl-dropdown-content .tpl-dropdown-menu-notifications-item:hover, ul.tpl-dropdown-content .tpl-dropdown-menu-messages-item:hover, ul.tpl-dropdown-content .tpl-dropdown-menu-notifications-item:focus, ul.tpl-dropdown-content .tpl-dropdown-menu-messages-item:focus { background-color: #465154; color: #fff; } ul.tpl-dropdown-content .tpl-dropdown-menu-notifications-item .menu-messages-ico, ul.tpl-dropdown-content .tpl-dropdown-menu-messages-item .menu-messages-ico { line-height: initial; float: left; width: 35px; height: 35px; border-radius: 50%; margin-right: 10px; margin-top: 6px; overflow: hidden; } ul.tpl-dropdown-content .tpl-dropdown-menu-notifications-item .menu-messages-ico img, ul.tpl-dropdown-content .tpl-dropdown-menu-messages-item .menu-messages-ico img { width: 100%; height: auto; vertical-align: middle; } ul.tpl-dropdown-content .tpl-dropdown-menu-notifications-item .menu-messages-time, ul.tpl-dropdown-content .tpl-dropdown-menu-messages-item .menu-messages-time { float: right; text-align: right; color: rgba(255, 255, 255, 0.7); font-size: 11px; width: 40px; margin-left: 10px; } ul.tpl-dropdown-content .tpl-dropdown-menu-notifications-item .menu-messages-content, ul.tpl-dropdown-content .tpl-dropdown-menu-messages-item .menu-messages-content { display: block; font-size: 12px; margin-left: 5px; margin-right: 5px; } ul.tpl-dropdown-content .tpl-dropdown-menu-notifications-item .menu-messages-content .menu-messages-content-time, ul.tpl-dropdown-content .tpl-dropdown-menu-messages-item .menu-messages-content .menu-messages-content-time { margin-top: 3px; color: rgba(255, 255, 255, 0.7); font-size: 11px; } .am-dimmer { z-index: 1200; } .am-modal { z-index: 1300; } .am-datepicker-dropdown { z-index: 1400; } .tpl-skiner { transition: all 0.4s ease-in-out; position: fixed; z-index: 10000; right: -130px; top: 65px; } .tpl-skiner.active { right: 0px; } .tpl-skiner-content { background: rgba(0, 0, 0, 0.7); width: 130px; padding: 15px; border-radius: 4px 0 0 4px; overflow: hidden; } .fc-content .am-icon-close { position: absolute; right: 0; top: 0px; } .tpl-skiner-toggle { position: absolute; top: 5px; left: -40px; width: 40px; color: #969a9b; font-size: 20px; height: 40px; line-height: 40px; text-align: center; background: rgba(0, 0, 0, 0.7); cursor: pointer; border-top-left-radius: 4px; border-bottom-left-radius: 4px; } .tpl-skiner-content-title { margin: 0; margin-bottom: 4px; padding-bottom: 4px; font-size: 16px; text-transform: uppercase; color: #fff; border-bottom: 1px solid rgba(255, 255, 255, 0.3); } .tpl-skiner-content-bar { padding-top: 10px; } .tpl-skiner-content-bar .skiner-color { transition: all 0.4s ease-in-out; float: left; width: 25px; height: 25px; margin-right: 10px; cursor: pointer; } .tpl-skiner-content-bar .skiner-white { background: #fff; border: 2px solid #eee; } .tpl-skiner-content-bar .skiner-black { background: #000; border: 2px solid #222; } .sub-active { color: #fff!important; } .left-sidebar { transition: all 0.4s ease-in-out; width: 240px; min-height: 100%; padding-top: 57px; position: absolute; z-index: 1104; top: 0; left: 0px; } .left-sidebar.xs-active { left: 0px; } .left-sidebar.active { left: -240px; } .tpl-sidebar-user-panel { padding: 22px; padding-top: 28px; } .tpl-user-panel-profile-picture { border-radius: 50%; width: 82px; height: 82px; margin-bottom: 10px; overflow: hidden; } .tpl-user-panel-profile-picture img { width: auto; height: 82px; vertical-align: middle; } .tpl-user-panel-status-icon { margin-right: 2px; } .user-panel-logged-in-text { display: block; color: #cfcfcf; font-size: 14px; } .tpl-user-panel-action-link { color: #6d787c; font-size: 12px; } .tpl-user-panel-action-link:hover { color: #a2aaad; } .sidebar-nav { list-style-type: none; padding: 0; margin: 0; } .sidebar-nav-sub { display: none; } .sidebar-nav-sub .sidebar-nav-link { font-size: 12px; padding-left: 30px; } .sidebar-nav-sub .sidebar-nav-link a { font-size: 12px; padding-left: 0; } .sidebar-nav-sub .sidebar-nav-link-logo { margin-right: 8px; width: 20px; font-size: 16px; } .sidebar-nav-sub-ico-rotate { -webkit-transform: rotate(180deg); transform: rotate(180deg); -webkit-transition: all 300ms; transition: all 300ms; } .sidebar-nav-link-logo-ico { margin-top: 5px; } .sidebar-nav-heading { padding: 24px 17px; font-size: 15px; font-weight: 500; } .sidebar-nav-heading-info { font-size: 12px; color: #868E8E; padding-left: 10px; } .sidebar-nav-link-logo { margin-right: 8px; width: 20px; font-size: 16px; } .sidebar-nav-link { color: #fff; } .sidebar-nav-link a { display: block; color: #868E8E; padding: 10px 17px; border-left: #282d2f 3px solid; font-size: 14px; cursor: pointer; } .sidebar-nav-link a.active { cursor: pointer; border-left: #1CA2CE 3px solid; color: #fff; } .sidebar-nav-link a:hover { color: #fff; } .tpl-content-wrapper { transition: all 0.4s ease-in-out; position: relative; margin-left: 120px; z-index: 1101; min-height: 922px; border-bottom-left-radius: 3px; } .tpl-content-wrapper.xs-active { margin-left: 240px; } .tpl-content-wrapper.active { margin-left: 0; } .page-header { background: #424b4f; margin-top: 0; margin-bottom: 0; padding: 40px 0; border-bottom: 0; } .container-fluid { margin-top: 0; margin-bottom: 0; padding: 40px 0; border-bottom: 0; padding-left: 20px; padding-right: 20px; } .row { margin-right: -10px; margin-left: -10px; } .page-header-description { margin-top: 4px; margin-bottom: 0; font-size: 14px; color: #e6e6e6; } .page-header-heading { font-size: 20px; font-weight: 400; } .page-header-heading .page-header-heading-ico { font-size: 28px; position: relative; top: 3px; } .page-header-heading small { font-weight: normal; line-height: 1; color: #B3B3B3; } .page-header-button { transition: all 0.4s ease-in-out; opacity: 0.3; float: right; outline: none; border: 1px solid #fff; padding: 16px 36px; font-size: 23px; line-height: 23px; border-radius: 0; padding-top: 14px; color: #fff; background-color: rgba(0, 0, 0, 0); font-weight: 500; } .page-header-button:hover { background-color: #ffffff; color: #333; opacity: 1; } .widget { width: 100%; min-height: 148px; margin-bottom: 20px; border-radius: 0; position: relative; } .widget-head { width: 100%; padding: 15px; } .widget-title { font-size: 14px; } .widget-fluctuation-period-text { display: inline-block; font-size: 16px; line-height: 20px; margin-bottom: 9px; } .widget-body { padding: 13px 15px; width: 100%; } .row-content { padding: 20px; } .widget-fluctuation-description-text { margin-top: 4px; display: block; font-size: 12px; line-height: 13px; } .widget-fluctuation-description-amount { display: block; font-size: 20px; line-height: 22px; } .widget-statistic-header { position: relative; z-index: 35; display: block; font-size: 14px; text-transform: uppercase; margin-bottom: 8px; } .widget-body-md { height: 200px; } .widget-body-lg { min-height: 330px; } .widget-margin-bottom-lg { margin-bottom: 20px; } .tpl-table-black-operation a { display: inline-block; padding: 5px 6px; font-size: 12px; line-height: 12px; } .tpl-switch input[type="checkbox"] { position: absolute; opacity: 0; width: 50px; height: 20px; } .tpl-switch input[type="checkbox"].ios-switch + div { vertical-align: middle; width: 40px; height: 20px; border-radius: 999px; background-color: rgba(0, 0, 0, 0.1); -webkit-transition-duration: .4s; -webkit-transition-property: background-color, box-shadow; margin-top: 6px; } .tpl-switch input[type="checkbox"].ios-switch:checked + div { width: 40px; background-position: 0 0; background-color: #36c6d3; } .tpl-switch input[type="checkbox"].tinyswitch.ios-switch + div { width: 34px; height: 18px; } .tpl-switch input[type="checkbox"].bigswitch.ios-switch + div { width: 50px; height: 25px; } .tpl-switch input[type="checkbox"].green.ios-switch:checked + div { background-color: #00e359; border: 1px solid #00a23f; box-shadow: inset 0 0 0 10px #00e359; } .tpl-switch input[type="checkbox"].ios-switch + div > div { float: left; width: 18px; height: 18px; border-radius: inherit; background: #ffffff; -webkit-transition-timing-function: cubic-bezier(0.54, 1.85, 0.5, 1); -webkit-transition-duration: 0.4s; -webkit-transition-property: transform, background-color, box-shadow; -moz-transition-timing-function: cubic-bezier(0.54, 1.85, 0.5, 1); -moz-transition-duration: 0.4s; -moz-transition-property: transform, background-color; pointer-events: none; margin-top: 1px; margin-left: 1px; } .tpl-switch input[type="checkbox"].ios-switch:checked + div > div { -webkit-transform: translate3d(20px, 0, 0); -moz-transform: translate3d(20px, 0, 0); background-color: #ffffff; } .tpl-switch input[type="checkbox"].tinyswitch.ios-switch + div > div { width: 16px; height: 16px; margin-top: 1px; } .tpl-switch input[type="checkbox"].tinyswitch.ios-switch:checked + div > div { -webkit-transform: translate3d(16px, 0, 0); -moz-transform: translate3d(16px, 0, 0); box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.3), 0px 0px 0 1px #0850ac; } .tpl-switch input[type="checkbox"].bigswitch.ios-switch + div > div { width: 23px; height: 23px; margin-top: 1px; } .tpl-switch input[type="checkbox"].bigswitch.ios-switch:checked + div > div { -webkit-transform: translate3d(25px, 0, 0); -moz-transform: translate3d(16px, 0, 0); } .tpl-switch input[type="checkbox"].green.ios-switch:checked + div > div { box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.3), 0 0 0 1px #00a23f; } .tpl-page-state { width: 100%; } .tpl-page-state-title { font-size: 40px; font-weight: bold; } .tpl-page-state-content { padding: 10px 0; } .tpl-login { width: 100%; } .tpl-login-logo { max-width: 159px; height: 205px; margin: 0 auto; margin-bottom: 20px; } .tpl-login-title { width: 100%; font-size: 24px; } .tpl-login-content { width: 300px; margin: 12% auto 0; } .tpl-login-remember-me { color: #B3B3B3; font-size: 14px; } .tpl-login-remember-me label { position: relative; top: -2px; } .tpl-login-content-info { color: #B3B3B3; font-size: 14px; } .cl-p { padding: 0!important; } .tpl-table-line-img { max-width: 100px; padding: 2px; } .tpl-table-list-select { text-align: right; } .fc-button-group, .fc button { display: block; } .theme-white { background: #e9ecf3; } .theme-white .sidebar-nav-sub .sidebar-nav-link-logo { margin-left: 10px; } .theme-white .tpl-header-search-box:hover, .theme-white .tpl-header-search-box:active .tpl-error-title { color: #848c90; } .theme-white .tpl-error-title-info { line-height: 30px; font-size: 21px; margin-top: 20px; text-align: center; color: #dce2ec; } .theme-white .tpl-error-btn { background: #03a9f3; border: 1px solid #03a9f3; border-radius: 30px; padding: 6px 20px 8px; } .theme-white .tpl-error-content { margin-top: 20px; margin-bottom: 20px; font-size: 16px; text-align: center; color: #96a2b4; } .theme-white .tpl-calendar-box { background: #fff; border-radius: 4px; padding: 20px; } .theme-white .tpl-calendar-box .fc-event { border-radius: 0; background: #03a9f3; border: 1px solid #14b0f6; } .theme-white .tpl-calendar-box .fc-axis { color: #868E8E; } .theme-white .tpl-calendar-box .fc-unthemed .fc-today { background: #eee; } .theme-white .tpl-calendar-box .fc-more { color: #868E8E; } .theme-white .tpl-calendar-box .fc th.fc-widget-header { background: #32c5d2!important; color: #ffffff; font-size: 14px; line-height: 20px; padding: 7px 0px; text-transform: uppercase; border: none!important; } .theme-white .tpl-calendar-box .fc th.fc-widget-header a { color: #fff; } .theme-white .tpl-calendar-box .fc-center h2 { color: #868E8E; } .theme-white .tpl-calendar-box .fc-state-default { background-image: none; background: #fff; font-size: 14px; color: #868E8E; } .theme-white .tpl-calendar-box .fc th, .theme-white .tpl-calendar-box .fc td, .theme-white .tpl-calendar-box .fc hr, .theme-white .tpl-calendar-box .fc thead, .theme-white .tpl-calendar-box .fc tbody, .theme-white .tpl-calendar-box .fc-row { border-color: #eee!important; } .theme-white .tpl-calendar-box .fc-day-number { color: #868E8E; padding-right: 6px; } .theme-white .tpl-calendar-box .fc th { color: #868E8E; font-weight: normal; font-size: 14px; padding: 6px 0; } .theme-white .tpl-login-logo { background: url(../img/logoa.png) center no-repeat; } .theme-white .sub-active { color: #23abf0!important; } .theme-white .tpl-table-line-img { border: 1px solid #ddd; } .theme-white .tpl-pagination .am-disabled a, .theme-white .tpl-pagination li a { color: #23abf0; border-radius: 3px; padding: 6px 12px; } .theme-white .tpl-pagination .am-active a { background: #23abf0; color: #fff; border: 1px solid #23abf0; padding: 6px 12px; } .theme-white .tpl-login-btn { background-color: #32c5d2; border: none; padding: 10px 16px; font-size: 14px; line-height: 14px; outline: none; } .theme-white .tpl-login-btn:hover, .theme-white .tpl-login-btn:active { background: #22b2e1; color: #fff; } .theme-white .tpl-login-title { color: #697882; } .theme-white .tpl-login-title strong { color: #39bae4; } .theme-white .tpl-login-content { width: 500px; padding: 40px 40px 25px; background-color: #fff; border-radius: 4px; } .theme-white .tpl-form-line-form, .theme-white .tpl-form-border-form { padding-top: 20px; } .theme-white .tpl-form-border-form input[type=number]:focus, .theme-white .tpl-form-border-form input[type=search]:focus, .theme-white .tpl-form-border-form input[type=text]:focus, .theme-white .tpl-form-border-form input[type=password]:focus, .theme-white .tpl-form-border-form input[type=datetime]:focus, .theme-white .tpl-form-border-form input[type=datetime-local]:focus, .theme-white .tpl-form-border-form input[type=date]:focus, .theme-white .tpl-form-border-form input[type=month]:focus, .theme-white .tpl-form-border-form input[type=time]:focus, .theme-white .tpl-form-border-form input[type=week]:focus, .theme-white .tpl-form-border-form input[type=email]:focus, .theme-white .tpl-form-border-form input[type=url]:focus, .theme-white .tpl-form-border-form input[type=tel]:focus, .theme-white .tpl-form-border-form input[type=color]:focus, .theme-white .tpl-form-border-form select:focus, .theme-white .tpl-form-border-form textarea:focus, .theme-white .am-form-field:focus { -webkit-box-shadow: none; box-shadow: none; } .theme-white .tpl-form-border-form input[type=number], .theme-white .tpl-form-border-form input[type=search], .theme-white .tpl-form-border-form input[type=text], .theme-white .tpl-form-border-form input[type=password], .theme-white .tpl-form-border-form input[type=datetime], .theme-white .tpl-form-border-form input[type=datetime-local], .theme-white .tpl-form-border-form input[type=date], .theme-white .tpl-form-border-form input[type=month], .theme-white .tpl-form-border-form input[type=time], .theme-white .tpl-form-border-form input[type=week], .theme-white .tpl-form-border-form input[type=email], .theme-white .tpl-form-border-form input[type=url], .theme-white .tpl-form-border-form input[type=tel], .theme-white .tpl-form-border-form input[type=color], .theme-white .tpl-form-border-form select, .theme-white .tpl-form-border-form textarea, .theme-white .am-form-field { display: block; width: 100%; padding: 6px 12px; line-height: 1.42857; color: #4d6b8a; background-color: #fff; background-image: none; border-radius: 4px; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; -o-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; background: 0 0; border: 0; border: 1px solid #c2cad8; -webkit-border-radius: 0; -moz-border-radius: 0; -ms-border-radius: 0; text-indent: .5em; -o-border-radius: 0; border-radius: 0; color: #555; box-shadow: none; padding-left: 0; padding-right: 0; font-size: 14px; } .theme-white .tpl-form-border-form .am-checkbox, .theme-white .tpl-form-border-form .am-checkbox-inline, .theme-white .tpl-form-border-form .am-form-label, .theme-white .tpl-form-border-form .am-radio, .theme-white .tpl-form-border-form .am-radio-inline { margin-top: 0; margin-bottom: 0; } .theme-white .tpl-form-border-form .am-form-group:after { clear: both; } .theme-white .tpl-form-border-form .am-form-group:after, .theme-white .tpl-form-border-form .am-form-group:before { content: " "; display: table; } .theme-white .tpl-form-border-form .am-form-label { padding-top: 5px; font-size: 16px; color: #888; font-weight: inherit; text-align: right; } .theme-white .tpl-form-border-form .am-form-group { /*padding: 20px 0;*/ } .theme-white .tpl-form-border-form .am-form-label .tpl-form-line-small-title { color: #999; font-size: 12px; } .theme-white .tpl-form-line-form input[type=number]:focus, .theme-white .tpl-form-line-form input[type=search]:focus, .theme-white .tpl-form-line-form input[type=text]:focus, .theme-white .tpl-form-line-form input[type=password]:focus, .theme-white .tpl-form-line-form input[type=datetime]:focus, .theme-white .tpl-form-line-form input[type=datetime-local]:focus, .theme-white .tpl-form-line-form input[type=date]:focus, .theme-white .tpl-form-line-form input[type=month]:focus, .theme-white .tpl-form-line-form input[type=time]:focus, .theme-white .tpl-form-line-form input[type=week]:focus, .theme-white .tpl-form-line-form input[type=email]:focus, .theme-white .tpl-form-line-form input[type=url]:focus, .theme-white .tpl-form-line-form input[type=tel]:focus, .theme-white .tpl-form-line-form input[type=color]:focus, .theme-white .tpl-form-line-form select:focus, .theme-white .tpl-form-line-form textarea:focus, .theme-white .am-form-field:focus { -webkit-box-shadow: none; box-shadow: none; } .theme-white .tpl-form-line-form input[type=number], .theme-white .tpl-form-line-form input[type=search], .theme-white .tpl-form-line-form input[type=text], .theme-white .tpl-form-line-form input[type=password], .theme-white .tpl-form-line-form input[type=datetime], .theme-white .tpl-form-line-form input[type=datetime-local], .theme-white .tpl-form-line-form input[type=date], .theme-white .tpl-form-line-form input[type=month], .theme-white .tpl-form-line-form input[type=time], .theme-white .tpl-form-line-form input[type=week], .theme-white .tpl-form-line-form input[type=email], .theme-white .tpl-form-line-form input[type=url], .theme-white .tpl-form-line-form input[type=tel], .theme-white .tpl-form-line-form input[type=color], .theme-white .tpl-form-line-form select, .theme-white .tpl-form-line-form textarea, .theme-white .am-form-field { display: block; width: 100%; padding: 6px 12px; line-height: 1.42857; color: #4d6b8a; background-color: #fff; background-image: none; border: 1px solid #c2cad8; border-radius: 4px; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; -o-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; background: 0 0; border: 0; border-bottom: 1px solid #c2cad8; -webkit-border-radius: 0; -moz-border-radius: 0; -ms-border-radius: 0; -o-border-radius: 0; border-radius: 0; color: #555; box-shadow: none; padding-left: 0; padding-right: 0; font-size: 14px; } .theme-white .tpl-form-line-form .am-checkbox, .theme-white .tpl-form-line-form .am-checkbox-inline, .theme-white .tpl-form-line-form .am-form-label, .theme-white .tpl-form-line-form .am-radio, .theme-white .tpl-form-line-form .am-radio-inline { margin-top: 0; margin-bottom: 0; } .theme-white .tpl-form-line-form .am-form-group:after { clear: both; } .theme-white .tpl-form-line-form .am-form-group:after, .theme-white .tpl-form-line-form .am-form-group:before { content: " "; display: table; } .theme-white .tpl-form-line-form .am-form-label { padding-top: 5px; font-size: 16px; color: #888; font-weight: inherit; text-align: right; } .theme-white .tpl-form-line-form .am-form-group { /*padding: 20px 0;*/ } .theme-white .tpl-form-line-form .am-form-label .tpl-form-line-small-title { color: #999; font-size: 12px; } .theme-white .tpl-table-black-operation a { border: 1px solid #36c6d3; color: #36c6d3; } .theme-white .tpl-table-black-operation a:hover { background: #36c6d3; color: #fff; } .theme-white .tpl-table-black-operation a.tpl-table-black-operation-del { border: 1px solid #e7505a; color: #e7505a; } .theme-white .tpl-table-black-operation a.tpl-table-black-operation-del:hover { background: #e7505a; color: #fff; } .theme-white .tpl-amendment-echarts { left: -17px; } .theme-white .tpl-user-card { border: 1px solid #3598dc; border-top: 2px solid #3598dc; background: #3598dc; color: #ffffff; border-radius: 4px; } .theme-white .tpl-user-card-title { font-size: 26px; margin-top: 0; font-weight: 300; margin-top: 25px; margin-bottom: 10px; } .theme-white .achievement-subheading { font-size: 12px; margin-top: 0; margin-bottom: 15px; } .theme-white .achievement-image { border-radius: 50%; margin-bottom: 22px; } .theme-white .achievement-description { margin: 0; font-size: 12px; } .theme-white .tpl-table-black { color: #838FA1; } .theme-white .tpl-table-black thead > tr > th { font-size: 14px; padding: 6px; } .theme-white .tpl-table-black tbody > tr > td { font-size: 14px; padding: 7px 6px; } .theme-white .tpl-table-black tfoot > tr > th { font-size: 14px; padding: 6px 0; } .theme-white .am-progress { height: 12px; } .theme-white .am-progress-title { font-size: 14px; margin-bottom: 8px; } .theme-white .widget-fluctuation-tpl-btn { margin-top: 6px; display: block; color: #fff; font-size: 12px; padding: 8px 14px; outline: none; background-color: #e7505a; border: 1px solid #e7505a; } .theme-white .widget-fluctuation-tpl-btn:hover { background: transparent; color: #e7505a; } .theme-white .widget-fluctuation-description-text { color: #c5cacd; } .theme-white .widget-fluctuation-period-text { color: #838FA1; } .theme-white .text-success { color: #5eb95e; } .theme-white .widget-head { border-bottom: 1px solid #eef1f5; } .theme-white .widget-function a { color: #838FA1; } .theme-white .widget-function a:hover { color: #a7bdcd; } .theme-white .widget { padding: 10px 20px 13px; background-color: #fff; border-radius: 4px; color: #838FA1; } .theme-white .widget-title { font-size: 16px; } .theme-white .widget-primary { min-height: 174px; border: 1px solid #32c5d2; border-top: 2px solid #32c5d2; background: #32c5d2; color: #ffffff; padding: 12px 17px; padding-left: 22px; } .theme-white .widget-statistic-icon { position: absolute; z-index: 30; right: 30px; top: 24px; font-size: 70px; color: #46cad6; } .theme-white .widget-statistic-description { position: relative; z-index: 35; display: block; font-size: 14px; line-height: 14px; padding-top: 8px; color: #fff; } .theme-white .widget-statistic-value { position: relative; z-index: 35; font-weight: 300; display: block; color: #fff; font-size: 46px; line-height: 46px; margin-bottom: 8px; } .theme-white .widget-statistic-header { padding-top: 18px; color: #fff; } .theme-white .widget-purple { padding: 12px 17px; border: 1px solid #8E44AD; border-top: 2px solid #8E44AD; background: #8E44AD; color: #ffffff; min-height: 174px; } .theme-white .widget-purple .widget-statistic-icon { color: #9956b5; } .theme-white .widget-purple .widget-statistic-header { color: #ded5e7; } .theme-white .widget-purple .widget-statistic-description { color: #ded5e7; } .theme-white .page-header-button { opacity: .8; border: 1px solid #32c5d2; background: #32c5d2; color: #fff; } .theme-white .page-header-button:hover { opacity: 1; } .theme-white .page-header-description { color: #666; } .theme-white .page-header-heading { color: #666; } .theme-white ul.tpl-dropdown-content .tpl-dropdown-menu-messages-item .menu-messages-content .menu-messages-content-time { color: #96a5aa; } .theme-white ul.tpl-dropdown-content { background: #fff; border: 1px solid #ddd; } .theme-white ul.tpl-dropdown-content .tpl-dropdown-menu-notifications-item, .theme-white ul.tpl-dropdown-content .tpl-dropdown-menu-messages-item { border-bottom: 1px solid #eee; color: #999; } .theme-white ul.tpl-dropdown-content .tpl-dropdown-menu-notifications-item:hover, .theme-white ul.tpl-dropdown-content .tpl-dropdown-menu-messages-item:hover { background-color: #f5f5f5; } .theme-white ul.tpl-dropdown-content .tpl-dropdown-menu-notifications-item .tpl-dropdown-menu-notifications-time, .theme-white ul.tpl-dropdown-content .tpl-dropdown-menu-messages-item .tpl-dropdown-menu-notifications-time { color: #999; } .theme-white ul.tpl-dropdown-content .tpl-dropdown-menu-messages-item:hover { background-color: #f5f5f5; } .theme-white ul.tpl-dropdown-content .tpl-dropdown-menu-notifications-title { color: #999; } .theme-white .sidebar-nav-link a { border-left: #fff 3px solid; } .theme-white .sidebar-nav-link a:hover { background: #f2f6f9; color: #868E8E; border-left: #3bb4f2 3px solid; } .theme-white .sidebar-nav-link a.active { background: #f2f6f9; color: #868E8E; border-left: #3bb4f2 3px solid; } .theme-white .sidebar-nav-heading { color: #999; border-bottom: 1px solid #eee; } .theme-white .tpl-sidebar-user-panel { background: #fff; border-bottom: 1px solid #eee; } .theme-white .tpl-content-wrapper { background: #e9ecf3; } .theme-white .tpl-header-fluid { background: #fff; border-top: 1px solid #eee; } .theme-white .tpl-header-logo { background: #fff; border-bottom: 1px solid #eee; } .theme-white .tpl-header-switch-button { background: #fff; border-right: 1px solid #eee; border-left: 1px solid #eee; } .theme-white .tpl-header-switch-button:hover { background: #fff; color: #999; } .theme-white .tpl-header-navbar a { color: #999; } .theme-white .tpl-header-navbar a:hover { color: #999; } .theme-white .left-sidebar { background: #fff; } .theme-white .widget-color-green { border: 1px solid #32c5d2; border-top: 2px solid #32c5d2; background: #32c5d2; color: #ffffff; } .theme-white .widget-color-green .widget-fluctuation-period-text { color: #fff; } .theme-white .widget-color-green .widget-head { border-bottom: 1px solid #2bb8c4; } .theme-white .widget-color-green .widget-fluctuation-description-text { color: #bbe7f6; } .theme-white .widget-color-green .widget-function a { color: #42bde5; } .theme-white .widget-color-green .widget-function a:hover { color: #fff; } .theme-black { background-color: #282d2f; } .theme-black .tpl-am-model-bd { background: #424b4f; } .theme-black .tpl-model-dialog { background: #424b4f; } .theme-black .tpl-error-title { font-size: 210px; line-height: 220px; color: #868E8E; } .theme-black .tpl-error-title-info { line-height: 30px; font-size: 21px; margin-top: 20px; text-align: center; color: #868E8E; } .theme-black .tpl-error-btn { background: #03a9f3; border: 1px solid #03a9f3; border-radius: 30px; padding: 6px 20px 8px; } .theme-black .tpl-error-content { margin-top: 20px; margin-bottom: 20px; font-size: 16px; text-align: center; color: #cfcfcf; } .theme-black .tpl-calendar-box { background: #424b4f; padding: 20px; } .theme-black .tpl-calendar-box .fc-button { border-radius: 0; box-shadow: 0; } .theme-black .tpl-calendar-box .fc-event { border-radius: 0; background: #03a9f3; } .theme-black .tpl-calendar-box .fc-axis { color: #fff; } .theme-black .tpl-calendar-box .fc-unthemed .fc-today { background: #3a4144; } .theme-black .tpl-calendar-box .fc-more { color: #fff; } .theme-black .tpl-calendar-box .fc th.fc-widget-header { background: #9675ce!important; color: #ffffff; font-size: 14px; line-height: 20px; padding: 7px 0px; text-transform: uppercase; border: none!important; } .theme-black .tpl-calendar-box .fc th.fc-widget-header a { color: #fff; } .theme-black .tpl-calendar-box .fc-center h2 { color: #fff; } .theme-black .tpl-calendar-box .fc-state-default { background-image: none; background: #fff; font-size: 14px; } .theme-black .tpl-calendar-box .fc th, .theme-black .tpl-calendar-box .fc td, .theme-black .tpl-calendar-box .fc hr, .theme-black .tpl-calendar-box .fc thead, .theme-black .tpl-calendar-box .fc tbody, .theme-black .tpl-calendar-box .fc-row { border-color: rgba(120, 130, 140, 0.4) !important; } .theme-black .tpl-calendar-box .fc-day-number { color: #868E8E; padding-right: 6px; } .theme-black .tpl-calendar-box .fc th { color: #868E8E; font-weight: normal; font-size: 14px; padding: 6px 0; } .theme-black .tpl-login-logo { background: url(../img/logob.png) center no-repeat; } .theme-black .tpl-table-line-img { max-width: 100px; padding: 2px; border: none; } .theme-black .tpl-table-list-field { border: none; } .theme-black .tpl-table-list-select .am-dropdown-content { color: #888; } .theme-black .tpl-table-list-select .am-selected-btn { border: 1px solid rgba(255, 255, 255, 0.2); color: #fff; } .theme-black .tpl-table-list-select .am-btn-default.am-active, .theme-black .tpl-table-list-select .am-btn-default:active, .theme-black .tpl-table-list-select .am-dropdown.am-active .am-btn-default.am-dropdown-toggle { border: 1px solid rgba(255, 255, 255, 0.2); color: #fff; background: #5d6468; } .theme-black .tpl-pagination .am-disabled a, .theme-black .tpl-pagination li a { color: #fff; padding: 6px 12px; background: #3f4649; border: none; } .theme-black .tpl-pagination .am-active a { background: #167fa1; color: #fff; border: 1px solid #167fa1; padding: 6px 12px; } .theme-black .tpl-login-btn { border: 1px solid #b5b5b5; background-color: rgba(0, 0, 0, 0); padding: 10px 16px; font-size: 14px; line-height: 14px; color: #b5b5b5; } .theme-black .tpl-login-btn:hover, .theme-black .tpl-login-btn:active { background: #b5b5b5; color: #fff; } .theme-black .tpl-login-title { color: #fff; } .theme-black .tpl-login-title strong { color: #39bae4; } .theme-black .tpl-form-line-form, .theme-black .tpl-form-border-form { padding-top: 20px; } .theme-black .tpl-form-line-form .am-btn-default, .theme-black .tpl-form-border-form .am-btn-default { color: #fff; border: 1px solid rgba(255, 255, 255, 0.2); } .theme-black .tpl-form-line-form .am-selected-text, .theme-black .tpl-form-border-form .am-selected-text { color: #888; } .theme-black .tpl-form-border-form input[type=number]:focus, .theme-black .tpl-form-border-form input[type=search]:focus, .theme-black .tpl-form-border-form input[type=text]:focus, .theme-black .tpl-form-border-form input[type=password]:focus, .theme-black .tpl-form-border-form input[type=datetime]:focus, .theme-black .tpl-form-border-form input[type=datetime-local]:focus, .theme-black .tpl-form-border-form input[type=date]:focus, .theme-black .tpl-form-border-form input[type=month]:focus, .theme-black .tpl-form-border-form input[type=time]:focus, .theme-black .tpl-form-border-form input[type=week]:focus, .theme-black .tpl-form-border-form input[type=email]:focus, .theme-black .tpl-form-border-form input[type=url]:focus, .theme-black .tpl-form-border-form input[type=tel]:focus, .theme-black .tpl-form-border-form input[type=color]:focus, .theme-black .tpl-form-border-form select:focus, .theme-black .tpl-form-border-form textarea:focus, .theme-black .am-form-field:focus { -webkit-box-shadow: none; box-shadow: none; } .theme-black .tpl-form-border-form input[type=number], .theme-black .tpl-form-border-form input[type=search], .theme-black .tpl-form-border-form input[type=text], .theme-black .tpl-form-border-form input[type=password], .theme-black .tpl-form-border-form input[type=datetime], .theme-black .tpl-form-border-form input[type=datetime-local], .theme-black .tpl-form-border-form input[type=date], .theme-black .tpl-form-border-form input[type=month], .theme-black .tpl-form-border-form input[type=time], .theme-black .tpl-form-border-form input[type=week], .theme-black .tpl-form-border-form input[type=email], .theme-black .tpl-form-border-form input[type=url], .theme-black .tpl-form-border-form input[type=tel], .theme-black .tpl-form-border-form input[type=color], .theme-black .tpl-form-border-form select, .theme-black .tpl-form-border-form textarea, .theme-black .am-form-field { display: block; width: 100%; padding: 6px 12px; line-height: 1.42857; color: #4d6b8a; background-color: #fff; background-image: none; border: 1px solid #c2cad8; border-radius: 4px; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; -o-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; background: 0 0; border: 0; text-indent: .5em; border: 1px solid rgba(255, 255, 255, 0.2); -webkit-border-radius: 0; -moz-border-radius: 0; -ms-border-radius: 0; -o-border-radius: 0; border-radius: 0; color: #fff; box-shadow: none; padding-left: 0; padding-right: 0; font-size: 14px; } .theme-black .tpl-form-border-form .am-checkbox, .theme-black .tpl-form-border-form .am-checkbox-inline, .theme-black .tpl-form-border-form .am-form-label, .theme-black .tpl-form-border-form .am-radio, .theme-black .tpl-form-border-form .am-radio-inline { margin-top: 0; margin-bottom: 0; } .theme-black .tpl-form-border-form .am-form-group:after { clear: both; } .theme-black .tpl-form-border-form .am-form-group:after, .theme-black .tpl-form-border-form .am-form-group:before { content: " "; display: table; } .theme-black .tpl-form-border-form .am-form-label { padding-top: 5px; font-size: 16px; color: #fff; font-weight: inherit; text-align: right; } .theme-black .tpl-form-border-form .am-form-group { /*padding: 20px 0;*/ } .theme-black .tpl-form-border-form .am-form-label .tpl-form-line-small-title { color: #999; font-size: 12px; } .theme-black .tpl-form-line-form input[type=number]:focus, .theme-black .tpl-form-line-form input[type=search]:focus, .theme-black .tpl-form-line-form input[type=text]:focus, .theme-black .tpl-form-line-form input[type=password]:focus, .theme-black .tpl-form-line-form input[type=datetime]:focus, .theme-black .tpl-form-line-form input[type=datetime-local]:focus, .theme-black .tpl-form-line-form input[type=date]:focus, .theme-black .tpl-form-line-form input[type=month]:focus, .theme-black .tpl-form-line-form input[type=time]:focus, .theme-black .tpl-form-line-form input[type=week]:focus, .theme-black .tpl-form-line-form input[type=email]:focus, .theme-black .tpl-form-line-form input[type=url]:focus, .theme-black .tpl-form-line-form input[type=tel]:focus, .theme-black .tpl-form-line-form input[type=color]:focus, .theme-black .tpl-form-line-form select:focus, .theme-black .tpl-form-line-form textarea:focus, .theme-black .am-form-field:focus { -webkit-box-shadow: none; box-shadow: none; } .theme-black .tpl-form-line-form input[type=number], .theme-black .tpl-form-line-form input[type=search], .theme-black .tpl-form-line-form input[type=text], .theme-black .tpl-form-line-form input[type=password], .theme-black .tpl-form-line-form input[type=datetime], .theme-black .tpl-form-line-form input[type=datetime-local], .theme-black .tpl-form-line-form input[type=date], .theme-black .tpl-form-line-form input[type=month], .theme-black .tpl-form-line-form input[type=time], .theme-black .tpl-form-line-form input[type=week], .theme-black .tpl-form-line-form input[type=email], .theme-black .tpl-form-line-form input[type=url], .theme-black .tpl-form-line-form input[type=tel], .theme-black .tpl-form-line-form input[type=color], .theme-black .tpl-form-line-form select, .theme-black .tpl-form-line-form textarea, .theme-black .am-form-field { display: block; width: 100%; padding: 6px 12px; line-height: 1.42857; color: #4d6b8a; background-color: #fff; background-image: none; border: 1px solid #c2cad8; border-radius: 4px; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; -o-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; background: 0 0; border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.2); -webkit-border-radius: 0; -moz-border-radius: 0; -ms-border-radius: 0; -o-border-radius: 0; border-radius: 0; color: #fff; box-shadow: none; padding-left: 0; padding-right: 0; font-size: 14px; } .theme-black .tpl-form-line-form .am-checkbox, .theme-black .tpl-form-line-form .am-checkbox-inline, .theme-black .tpl-form-line-form .am-form-label, .theme-black .tpl-form-line-form .am-radio, .theme-black .tpl-form-line-form .am-radio-inline { margin-top: 0; margin-bottom: 0; } .theme-black .tpl-form-line-form .am-form-group:after { clear: both; } .theme-black .tpl-form-line-form .am-form-group:after, .theme-black .tpl-form-line-form .am-form-group:before { content: " "; display: table; } .theme-black .tpl-form-line-form .am-form-label { padding-top: 5px; font-size: 16px; color: #fff; font-weight: inherit; text-align: right; } .theme-black .tpl-form-line-form .am-form-group { /*padding: 20px 0;*/ } .theme-black .tpl-form-line-form .am-form-label .tpl-form-line-small-title { color: #999; font-size: 12px; } .theme-black .tpl-table-black-operation a { border: 1px solid #7b878d; color: #7b878d; } .theme-black .tpl-table-black-operation a:hover { background: #7b878d; color: #fff; } .theme-black .tpl-table-black-operation a.tpl-table-black-operation-del { border: 1px solid #f35842; color: #f35842; } .theme-black .tpl-table-black-operation a.tpl-table-black-operation-del:hover { background: #f35842; color: #fff; } .theme-black .am-table-bordered { border: 1px solid #666d70; } .theme-black .am-table-bordered > tbody > tr > td, .theme-black .am-table-bordered > tbody > tr > th, .theme-black .am-table-bordered > tfoot > tr > td, .theme-black .am-table-bordered > tfoot > tr > th, .theme-black .am-table-bordered > thead > tr > td, .theme-black .am-table-bordered > thead > tr > th { border: 1px solid #666d70; } .theme-black .am-table-bordered > thead + tbody > tr:first-child > td, .theme-black .am-table-bordered > thead + tbody > tr:first-child > th { border: 1px solid #666d70; } .theme-black .am-table-striped > tbody > tr:nth-child(odd) > td, .theme-black .am-table-striped > tbody > tr:nth-child(odd) > th { background-color: #5d6468; } .theme-black .tpl-table-black { color: #fff; } .theme-black .tpl-table-black thead > tr > th { font-size: 14px; padding: 6px; border-bottom: 1px solid #666d70; } .theme-black .tpl-table-black tbody > tr > td { font-size: 14px; padding: 7px 6px; border-top: 1px solid #666d70; } .theme-black .tpl-table-black tfoot > tr > th { font-size: 14px; padding: 6px 0; } .theme-black .tpl-user-card { border: 1px solid #11627d; border-top: 2px solid #105f79; background: #1786aa; color: #ffffff; } .theme-black .tpl-user-card-title { font-size: 26px; margin-top: 0; font-weight: 300; margin-top: 25px; margin-bottom: 10px; } .theme-black .achievement-subheading { font-size: 12px; margin-top: 0; margin-bottom: 15px; } .theme-black .achievement-image { border-radius: 50%; margin-bottom: 22px; } .theme-black .achievement-description { margin: 0; font-size: 12px; } .theme-black .am-progress { height: 12px; margin-bottom: 14px; background: rgba(0, 0, 0, 0.15); } .theme-black .am-progress-title { font-size: 14px; margin-bottom: 8px; } .theme-black .am-progress-title-more { color: #a1a8ab; } .theme-black .widget-fluctuation-tpl-btn { margin-top: 6px; display: block; color: #fff; font-size: 12px; padding: 5px 10px; outline: none; background-color: rgba(255, 255, 255, 0); border: 1px solid #fff; } .theme-black .widget-fluctuation-tpl-btn:hover { background: #fff; color: #4b5357; } .theme-black .widget-fluctuation-description-text { color: #c5cacd; } .theme-black .text-success { color: #08ed72; } .theme-black .widget-fluctuation-period-text { color: #fff; } .theme-black .widget-head { border-bottom: 1px solid #3f4649; } .theme-black .widget-function a { color: #7b878d; } .theme-black .widget-function a:hover { color: #fff; } .theme-black .widget { border: 1px solid #33393c; border-top: 2px solid #313639; background: #4b5357; color: #ffffff; } .theme-black .widget-primary { border: 1px solid #11627d; border-top: 2px solid #105f79; background: #1786aa; color: #ffffff; padding: 12px 17px; } .theme-black .widget-statistic-icon { position: absolute; z-index: 30; right: 30px; top: 0px; font-size: 70px; color: #1b9eca; } .theme-black .widget-statistic-description { position: relative; z-index: 35; display: block; font-size: 14px; line-height: 14px; padding-top: 8px; color: #9cdcf2; } .theme-black .widget-statistic-value { position: relative; z-index: 35; font-weight: 300; display: block; color: #fff; font-size: 46px; line-height: 46px; margin-bottom: 8px; } .theme-black .widget-statistic-header { color: #9cdcf2; } .theme-black .widget-purple { padding: 12px 17px; border: 1px solid #5e4578; border-top: 2px solid #5c4375; background: #785799; color: #ffffff; } .theme-black .widget-purple .widget-statistic-icon { color: #8a6aaa; } .theme-black .widget-purple .widget-statistic-header { color: #ded5e7; } .theme-black .widget-purple .widget-statistic-description { color: #ded5e7; } .theme-black .page-header-description { color: #e6e6e6; } .theme-black .page-header-heading { color: #666; } .theme-black .container-fluid { background: #424b4f; } .theme-black .page-header-heading { color: #fff; } .theme-black .sidebar-nav-heading { color: #fff; } .theme-black .tpl-sidebar-user-panel { background: #1f2224; border-bottom: 1px solid #1f2224; } .theme-black .tpl-content-wrapper { background: #3a4144; } .theme-black .tpl-header-fluid { background: #2f3638; } .theme-black .sidebar-nav-link a.active { background: #232829; } .theme-black .sidebar-nav-link a:hover { background: #232829; } .theme-black .tpl-header-switch-button { background: #2f3638; border-right: 1px solid #282d2f; } .theme-black .tpl-header-switch-button:hover { background: #282d2f; color: #fff; } .theme-black .tpl-header-navbar a { color: #cfcfcf; } .theme-black .tpl-header-navbar a:hover { color: #fff; } .theme-black .left-sidebar { padding-top: 56px; background: #282d2f; } .theme-black .widget-color-green { border: 1px solid #11627d; border-top: 2px solid #105f79; background: #1786aa; color: #ffffff; } .theme-black .widget-color-green .widget-head { border-bottom: 1px solid #147494; } .theme-black .widget-color-green .widget-fluctuation-description-text { color: #bbe7f6; } .theme-black .widget-color-green .widget-function a { color: #42bde5; } .theme-black .widget-color-green .widget-function a:hover { color: #fff; } @media screen and (max-width: 1024px) { .tpl-index-settings-button { display: none; } .theme-black .left-sidebar { padding-top: 111px; } .left-sidebar { padding-top: 111px; } .tpl-content-wrapper { margin-left: 0; } .tpl-header-logo { float: none; width: 100%; } .tpl-header-navbar-welcome { display: none; } .tpl-sidebar-user-panel { border-top: 1px solid #eee; } .tpl-header-fluid { border-top: none; margin-left: 0; } .theme-white .tpl-header-fluid { border-top: none; } .theme-black .tpl-sidebar-user-panel { border-top: 1px solid #1f2224; } } @media screen and (min-width: 641px) { [class*=am-u-] { padding-left: 10px; padding-right: 10px; } } @media screen and (max-width: 641px) { .theme-white .tpl-error-title, .theme-black .tpl-error-title { font-size: 130px; line-height: 140px; } .theme-white .tpl-login-title { font-size: 20px; } .theme-white .tpl-login-content { width: 86%; padding: 22px 30px 25px; } .tpl-header-search { display: none; } ul.tpl-dropdown-content { position: fixed; width: 100%; left: 0; top: 112px; right: 0; } } [v-cloak] { display: none } th{ text-align: center; } ================================================ FILE: src/main/resources/static/assets/css/app.less ================================================ ul,li { list-style: none; padding: 0; margin: 0; } a { } header { z-index: 1200; position: relative; } .tpl-header-logo { width: 240px; height: 57px; display: table; text-align:center; position: relative; z-index: 1300; a { display:table-cell; vertical-align:middle; } img { width:170px; } } .tpl-header-fluid { margin-left: 240px; height: 56px; padding-left: 20px; padding-right: 20px; } .tpl-header-switch-button { margin-top: 0px; margin-bottom: 0px; float: left; color: #cfcfcf; margin-left: -20px; margin-right: 0; border: 0; border-radius: 0; padding: 0px 22px; font-size: 22px; line-height: 55px; &:hover { outline: none; } } .tpl-header-search-form { height: 54px; line-height: 52px; margin-left: 10px; } .tpl-header-search-box , .tpl-header-search-btn { transition: all 0.4s ease-in-out; color: #848c90; background: none; border: none; outline: none; } .tpl-header-search-box { font-size: 14px; &:hover,&:active { color: #fff; } } .tpl-header-search-btn { font-size: 15px; &:hover,&:active { color: #fff; } } .tpl-header-navbar { color: #fff; li { float: left; } a { line-height: 56px; display: block; padding: 0 16px; position: relative; &:hover { } .item-feed-badge { position: absolute; top: 9px; left: 25px; } } } ul.tpl-dropdown-content { padding: 10px; margin-top: 0; width: 300px; background-color: #2f3638; border: 1px solid #525e62; border-radius: 0; li { float:none; } &:before , &:after { display: none; } } ul.tpl-dropdown-content { .tpl-dropdown-menu-notifications { } .tpl-dropdown-menu-notifications-title { font-size: 12px; float: left; color: rgba(255, 255, 255, 0.7); } .tpl-dropdown-menu-notifications-time { float: right; text-align: right; color: rgba(255, 255, 255, 0.7); font-size: 11px; width: 50px; margin-left: 10px; } .tpl-dropdown-menu-notifications:last-child .tpl-dropdown-menu-notifications-item { text-align: center; border: none; font-size: 12px; i { margin-left: -6px; } } .tpl-dropdown-menu-messages:last-child .tpl-dropdown-menu-messages-item { text-align: center; border: none; font-size: 12px; i { margin-left: -6px; } } .tpl-dropdown-menu-notifications-item , .tpl-dropdown-menu-messages-item { padding: 12px; color: #fff; line-height: 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.15); &:hover , &:focus { background-color: #465154; color: #fff; } .menu-messages-ico { line-height: initial; float: left; width: 35px; height: 35px; border-radius: 50%; margin-right: 10px; margin-top: 6px; overflow: hidden; img { width: 100%; height: auto; vertical-align: middle; } } .menu-messages-time { float: right; text-align: right; color: rgba(255, 255, 255, 0.7); font-size: 11px; width: 40px; margin-left: 10px; } .menu-messages-content { display: block; font-size: 13px; margin-left: 45px; margin-right: 50px; .menu-messages-content-title { } .menu-messages-content-time { margin-top: 3px; color: rgba(255, 255, 255, 0.7); font-size: 11px; } } } } .am-dimmer { z-index: 1200; } .am-modal { z-index: 1300; } .am-datepicker-dropdown { z-index: 1400; } .tpl-skiner { transition: all 0.4s ease-in-out; position: fixed; z-index: 10000; right: -130px; top: 65px; } .tpl-skiner.active { right: 0px; } .tpl-skiner-content { background: rgba(0, 0, 0, 0.7); width: 130px; padding: 15px; border-radius: 4px 0 0 4px; overflow: hidden; } .fc-content .am-icon-close { position: absolute; right: 0; top: 0px; } .tpl-skiner-toggle { position: absolute; top: 5px; left: -40px; width: 40px; color:#969a9b; font-size: 20px; height: 40px; line-height: 40px; text-align: center; background: rgba(0, 0, 0, 0.7); cursor: pointer; border-top-left-radius: 4px; border-bottom-left-radius: 4px; } .tpl-skiner-content-title { margin: 0; margin-bottom: 4px; padding-bottom: 4px; font-size: 16px; text-transform: uppercase; color:#fff; border-bottom: 1px solid rgba(255, 255, 255, 0.3); } .tpl-skiner-content-bar { padding-top: 10px; .skiner-color { transition: all 0.4s ease-in-out; float: left; width: 25px; height: 25px; margin-right: 10px; cursor: pointer; } .skiner-white { background: #fff; border: 2px solid #eee; } .skiner-black { background: #000; border: 2px solid #222; } } .sub-active { color:#fff!important; } .left-sidebar { transition: all 0.4s ease-in-out; width: 240px; min-height: 100%; padding-top: 57px; position: absolute; z-index: 1104; top: 0; left: 0px; &.xs-active { left:0px; } &.active { left:-240px; } } .tpl-sidebar-user-panel { padding: 22px; padding-top: 28px; } .tpl-user-panel-slide-toggleable { } .tpl-user-panel-profile-picture { border-radius: 50%; width: 82px; height: 82px; margin-bottom: 10px; overflow: hidden; img { width: auto; height: 82px; vertical-align: middle; } } .tpl-user-panel-status-icon { margin-right: 2px; } .user-panel-logged-in-text { display: block; color:#cfcfcf; font-size: 14px; } .tpl-user-panel-action-link { color: #6d787c; font-size: 12px; &:hover { color: #a2aaad; } } .sidebar-nav { list-style-type: none; padding: 0; margin: 0; } .sidebar-nav-sub { display: none; .sidebar-nav-link { font-size: 12px; padding-left: 30px; a { font-size: 12px; padding-left: 0; } } .sidebar-nav-link-logo { margin-right: 8px; width: 20px; font-size: 16px; } } .sidebar-nav-sub-ico-rotate{ -webkit-transform: rotate(180deg); transform: rotate(180deg); -webkit-transition: all 300ms; transition: all 300ms; } .sidebar-nav-link-logo-ico { margin-top: 5px; } .sidebar-nav-heading { padding: 24px 17px; font-size: 15px; font-weight: 500; } .sidebar-nav-heading-info { font-size: 12px; color:#868E8E; padding-left: 10px; } .sidebar-nav-link-logo { margin-right: 8px; width: 20px; font-size: 16px; } .sidebar-nav-link { color: #fff; a { display: block; color: #868E8E; padding: 10px 17px; border-left: #282d2f 3px solid; font-size: 14px; cursor: pointer; &.active { cursor: pointer; border-left: #1CA2CE 3px solid; color: #fff; } &:hover { color: #fff; } } } .tpl-content-wrapper { transition: all 0.4s ease-in-out; position: relative; margin-left: 240px; z-index: 1101; min-height: 922px; border-bottom-left-radius: 3px; &.xs-active { margin-left: 240px; } &.active { margin-left: 0; } } .page-header { background: #424b4f; margin-top: 0; margin-bottom: 0; padding: 40px 0; border-bottom: 0; } .container-fluid { margin-top: 0; margin-bottom: 0; padding: 40px 0; border-bottom: 0; padding-left: 20px; padding-right: 20px; } .row { margin-right: -10px; margin-left: -10px; } .page-header-description { margin-top: 4px; margin-bottom: 0; font-size: 14px; color: #e6e6e6; } .page-header-heading { font-size: 20px; font-weight: 400; .page-header-heading-ico { font-size: 28px; position: relative; top: 3px; } small { font-weight: normal; line-height: 1; color: #B3B3B3; } } .page-header-button { transition: all 0.4s ease-in-out; opacity: 0.3; font-weight: 500; border-radius: 0; float: right; outline: none; border: 1px solid #fff; padding: 16px 36px; font-size: 23px; line-height: 23px; border-radius: 0; padding-top: 14px; color: #fff; background-color: rgba(0, 0, 0, 0); font-weight: 500; &:hover { background-color: #ffffff; color: #333; opacity: 1; } } .widget { width: 100%; min-height: 148px; margin-bottom: 20px; border-radius: 0; position: relative; } .widget-head { width: 100%; padding: 15px; } .widget-title { font-size: 14px; } .widget-function { } .widget-fluctuation-period-text { display: inline-block; font-size: 16px; line-height: 20px; margin-bottom: 9px; } .widget-body { padding: 13px 15px; width: 100%; } .row-content { padding: 20px; } .widget-fluctuation-description-text{ margin-top: 4px; display: block; font-size: 12px; line-height: 13px; } .text-success { } .widget-fluctuation-tpl-btn { } .widget-fluctuation-description-amount { display: block; font-size: 20px; line-height: 22px; } .widget-primary { } .widget-statistic-header { position: relative; z-index: 35; display: block; font-size: 14px; text-transform: uppercase; margin-bottom: 8px; } .widget-body-md { height: 200px; } .widget-body-lg { min-height: 330px; // height: 330px; } .widget-margin-bottom-lg { margin-bottom: 20px; } .tpl-table-black-operation { } .tpl-table-black-operation { a { display: inline-block; padding: 5px 6px; font-size: 12px; line-height: 12px; } } .tpl-switch input[type="checkbox"] { position: absolute; opacity: 0; width: 50px; height: 20px; } .tpl-switch input[type="checkbox"].ios-switch + div { vertical-align: middle; width: 40px; height: 20px; border-radius: 999px; background-color: rgba(0, 0, 0, 0.1); -webkit-transition-duration: .4s; -webkit-transition-property: background-color, box-shadow; margin-top: 6px; } .tpl-switch input[type="checkbox"].ios-switch:checked + div { width: 40px; background-position: 0 0; background-color: #36c6d3; } .tpl-switch input[type="checkbox"].tinyswitch.ios-switch + div { width: 34px; height: 18px; } .tpl-switch input[type="checkbox"].bigswitch.ios-switch + div { width: 50px; height: 25px; } .tpl-switch input[type="checkbox"].green.ios-switch:checked + div { background-color: #00e359; border: 1px solid rgba(0, 162, 63, 1); box-shadow: inset 0 0 0 10px rgba(0, 227, 89, 1); } .tpl-switch input[type="checkbox"].ios-switch + div > div { float: left; width: 18px; height: 18px; border-radius: inherit; background: #ffffff; -webkit-transition-timing-function: cubic-bezier(.54, 1.85, .5, 1); -webkit-transition-duration: 0.4s; -webkit-transition-property: transform, background-color, box-shadow; -moz-transition-timing-function: cubic-bezier(.54, 1.85, .5, 1); -moz-transition-duration: 0.4s; -moz-transition-property: transform, background-color; pointer-events: none; margin-top: 1px; margin-left: 1px; } .tpl-switch input[type="checkbox"].ios-switch:checked + div > div { -webkit-transform: translate3d(20px, 0, 0); -moz-transform: translate3d(20px, 0, 0); background-color: #ffffff; } .tpl-switch input[type="checkbox"].tinyswitch.ios-switch + div > div { width: 16px; height: 16px; margin-top: 1px; } .tpl-switch input[type="checkbox"].tinyswitch.ios-switch:checked + div > div { -webkit-transform: translate3d(16px, 0, 0); -moz-transform: translate3d(16px, 0, 0); box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.3), 0px 0px 0 1px rgba(8, 80, 172, 1); } .tpl-switch input[type="checkbox"].bigswitch.ios-switch + div > div { width: 23px; height: 23px; margin-top: 1px; } .tpl-switch input[type="checkbox"].bigswitch.ios-switch:checked + div > div { -webkit-transform: translate3d(25px, 0, 0); -moz-transform: translate3d(16px, 0, 0); } .tpl-switch input[type="checkbox"].green.ios-switch:checked + div > div { box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 162, 63, 1); } .tpl-page-state { width: 100%; } .tpl-page-state-title { font-size: 40px; font-weight: bold; } .tpl-page-state-content { padding: 10px 0; } .tpl-login { width: 100%; } .tpl-login-logo { max-width: 159px; height: 205px; margin: 0 auto; margin-bottom: 20px; } .tpl-login-title { width: 100%; font-size: 24px; } .tpl-login-content { width: 300px; margin: 12% auto 0; } .tpl-login-remember-me { color: #B3B3B3; font-size: 14px; label { position: relative; top: -2px; } } .tpl-login-content-info { color: #B3B3B3; font-size: 14px; } .tpl-pagination { } .cl-p { padding: 0!important; } .tpl-table-line-img { max-width: 100px; padding: 2px; } .tpl-table-list-select { text-align:right; } .fc-button-group, .fc button { display: block; } .theme-white { .sidebar-nav-sub { .sidebar-nav-link-logo { margin-left: 10px; } } .tpl-header-search-box:hover, .tpl-header-search-box:active .tpl-error-title { color: #848c90; } .tpl-error-title-info { line-height: 30px; font-size: 21px; margin-top: 20px; text-align: center; color: #dce2ec; } .tpl-error-btn { background: #03a9f3; border: 1px solid #03a9f3; border-radius: 30px; padding: 6px 20px 8px; } .tpl-error-content { margin-top: 20px; margin-bottom: 20px; font-size: 16px; text-align: center; color: #96a2b4; } .tpl-calendar-box { background: #fff; border-radius: 4px; padding: 20px; .fc-event { border-radius: 0; background: #03a9f3; border: 1px solid #14b0f6; } .fc-axis { color: #868E8E; } .fc-unthemed .fc-today { background: #eee; } .fc-more { color: #868E8E; } .fc th.fc-widget-header { background: #32c5d2!important; color: #ffffff; font-size: 14px; line-height: 20px; padding: 7px 0px; text-transform: uppercase; border:none!important; a { color: #fff; } } .fc-center { h2 { color:#868E8E; } } .fc-state-default { background-image: none; background: #fff; font-size: 14px; color: #868E8E; } .fc th, .fc td, .fc hr, .fc thead, .fc tbody, .fc-row { // background: rgba(0, 0, 0, 0)!important; border-color: #eee!important; } .fc-day-number { color: #868E8E; padding-right: 6px; } .fc th { color: #868E8E; font-weight: normal; font-size: 14px; padding: 6px 0; } } .tpl-login-logo { background: url(../img/logoa.png) center no-repeat; } .sub-active { color:#23abf0!important; } .tpl-table-line-img { border: 1px solid #ddd; } .tpl-pagination .am-disabled a , .tpl-pagination li a { color: #23abf0; border-radius: 3px; padding: 6px 12px; } .tpl-pagination .am-active a{ background: #23abf0;color: #fff; border: 1px solid #23abf0; padding: 6px 12px; } .tpl-login-btn { background-color:#32c5d2; border: none; padding: 10px 16px; font-size: 14px; line-height: 14px; outline: none; &:hover,&:active { background: #22b2e1; color:#fff; } } .tpl-login-title { color: #697882; strong { color: #39bae4; } } .tpl-login-content{ width: 500px; padding: 40px 40px 25px; background-color: #fff; border-radius: 4px; } .tpl-form-line-form , .tpl-form-border-form { padding-top: 20px; } .tpl-form-border-form input[type=number]:focus, .tpl-form-border-form input[type=search]:focus, .tpl-form-border-form input[type=text]:focus, .tpl-form-border-form input[type=password]:focus, .tpl-form-border-form input[type=datetime]:focus, .tpl-form-border-form input[type=datetime-local]:focus, .tpl-form-border-form input[type=date]:focus, .tpl-form-border-form input[type=month]:focus, .tpl-form-border-form input[type=time]:focus, .tpl-form-border-form input[type=week]:focus, .tpl-form-border-form input[type=email]:focus, .tpl-form-border-form input[type=url]:focus, .tpl-form-border-form input[type=tel]:focus, .tpl-form-border-form input[type=color]:focus, .tpl-form-border-form select:focus, .tpl-form-border-form textarea:focus, .am-form-field:focus{ -webkit-box-shadow: none; box-shadow: none; } .tpl-form-border-form input[type=number], .tpl-form-border-form input[type=search], .tpl-form-border-form input[type=text], .tpl-form-border-form input[type=password], .tpl-form-border-form input[type=datetime], .tpl-form-border-form input[type=datetime-local], .tpl-form-border-form input[type=date], .tpl-form-border-form input[type=month], .tpl-form-border-form input[type=time], .tpl-form-border-form input[type=week], .tpl-form-border-form input[type=email], .tpl-form-border-form input[type=url], .tpl-form-border-form input[type=tel], .tpl-form-border-form input[type=color], .tpl-form-border-form select, .tpl-form-border-form textarea, .am-form-field { display: block; width: 100%; padding: 6px 12px; font-size: 14px; line-height: 1.42857; color: #4d6b8a; background-color: #fff; background-image: none; border: 1px solid #c2cad8; border-radius: 4px; -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075); box-shadow: inset 0 1px 1px rgba(0,0,0,0.075); -webkit-transition: border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s; -o-transition: border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s; transition: border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s; background: 0 0; border: 0; border: 1px solid #c2cad8; -webkit-border-radius: 0; -moz-border-radius: 0; -ms-border-radius: 0; text-indent: .5em; -o-border-radius: 0; border-radius: 0; color: #555; box-shadow: none; padding-left: 0; padding-right: 0; font-size: 14px; } .tpl-form-border-form .am-checkbox, .tpl-form-border-form .am-checkbox-inline, .tpl-form-border-form .am-form-label, .tpl-form-border-form .am-radio, .tpl-form-border-form .am-radio-inline{ margin-top: 0; margin-bottom: 0; } .tpl-form-border-form .am-form-group:after { clear: both; } .tpl-form-border-form .am-form-group:after, .tpl-form-border-form .am-form-group:before { content: " "; display: table; } .tpl-form-border-form .am-form-label{ padding-top: 5px; font-size: 16px; color: #888; font-weight: inherit; text-align: right; } .tpl-form-border-form .am-form-group { /*padding: 20px 0;*/ } .tpl-form-border-form .am-form-label .tpl-form-line-small-title { color: #999; font-size: 12px; } .tpl-form-line-form input[type=number]:focus, .tpl-form-line-form input[type=search]:focus, .tpl-form-line-form input[type=text]:focus, .tpl-form-line-form input[type=password]:focus, .tpl-form-line-form input[type=datetime]:focus, .tpl-form-line-form input[type=datetime-local]:focus, .tpl-form-line-form input[type=date]:focus, .tpl-form-line-form input[type=month]:focus, .tpl-form-line-form input[type=time]:focus, .tpl-form-line-form input[type=week]:focus, .tpl-form-line-form input[type=email]:focus, .tpl-form-line-form input[type=url]:focus, .tpl-form-line-form input[type=tel]:focus, .tpl-form-line-form input[type=color]:focus, .tpl-form-line-form select:focus, .tpl-form-line-form textarea:focus, .am-form-field:focus{ -webkit-box-shadow: none; box-shadow: none; } .tpl-form-line-form input[type=number], .tpl-form-line-form input[type=search], .tpl-form-line-form input[type=text], .tpl-form-line-form input[type=password], .tpl-form-line-form input[type=datetime], .tpl-form-line-form input[type=datetime-local], .tpl-form-line-form input[type=date], .tpl-form-line-form input[type=month], .tpl-form-line-form input[type=time], .tpl-form-line-form input[type=week], .tpl-form-line-form input[type=email], .tpl-form-line-form input[type=url], .tpl-form-line-form input[type=tel], .tpl-form-line-form input[type=color], .tpl-form-line-form select, .tpl-form-line-form textarea, .am-form-field { display: block; width: 100%; padding: 6px 12px; font-size: 14px; line-height: 1.42857; color: #4d6b8a; background-color: #fff; background-image: none; border: 1px solid #c2cad8; border-radius: 4px; -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075); box-shadow: inset 0 1px 1px rgba(0,0,0,0.075); -webkit-transition: border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s; -o-transition: border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s; transition: border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s; background: 0 0; border: 0; border-bottom: 1px solid #c2cad8; -webkit-border-radius: 0; -moz-border-radius: 0; -ms-border-radius: 0; -o-border-radius: 0; border-radius: 0; color: #555; box-shadow: none; padding-left: 0; padding-right: 0; font-size: 14px; } .tpl-form-line-form .am-checkbox, .tpl-form-line-form .am-checkbox-inline, .tpl-form-line-form .am-form-label, .tpl-form-line-form .am-radio, .tpl-form-line-form .am-radio-inline{ margin-top: 0; margin-bottom: 0; } .tpl-form-line-form .am-form-group:after { clear: both; } .tpl-form-line-form .am-form-group:after, .tpl-form-line-form .am-form-group:before { content: " "; display: table; } .tpl-form-line-form .am-form-label{ padding-top: 5px; font-size: 16px; color: #888; font-weight: inherit; text-align: right; } .tpl-form-line-form .am-form-group { /*padding: 20px 0;*/ } .tpl-form-line-form .am-form-label .tpl-form-line-small-title { color: #999; font-size: 12px; } .tpl-table-black-operation { a { border: 1px solid #36c6d3; color:#36c6d3; &:hover { background: #36c6d3; color:#fff; } } a.tpl-table-black-operation-del { border: 1px solid #e7505a; color:#e7505a; &:hover { background: #e7505a; color:#fff; } } } .tpl-amendment-echarts { left: -17px; } .tpl-user-card { border: 1px solid #3598dc; border-top: 2px solid #3598dc; background: #3598dc; color: #ffffff; border-radius: 4px; } .tpl-user-card-title { font-size: 26px; margin-top: 0; font-weight: 300; margin-top: 25px; margin-bottom: 10px; } .achievement-subheading { font-size: 12px; margin-top: 0; margin-bottom: 15px; } .achievement-image { border-radius: 50%; margin-bottom: 22px; } .achievement-description { margin: 0; font-size: 12px; } .tpl-table-black { color: #838FA1; thead>tr>th { font-size: 14px; padding: 6px; } tbody>tr>td { font-size: 14px; padding: 7px 6px; } tfoot>tr>th { font-size: 14px; padding: 6px 0; } } .am-progress { height: 12px; } .am-progress-title { font-size: 14px; margin-bottom: 8px; } .am-progress-title-more { } .widget-fluctuation-tpl-btn { margin-top: 6px; display: block; color: #fff; font-size: 12px; padding: 8px 14px; outline: none; background-color: #e7505a; border: 1px solid #e7505a; &:hover { background:transparent; color:#e7505a; } } .widget-fluctuation-description-text{ color: #c5cacd; } background: #e9ecf3; .widget-fluctuation-period-text { color:#838FA1; } .text-success { color: #5eb95e; } .widget-head { border-bottom: 1px solid #eef1f5; } .widget-function { a { color: #838FA1; &:hover { color:#a7bdcd; } } } .widget { padding: 10px 20px 13px; background-color: #fff; border-radius: 4px; color: #838FA1; } .widget-title { font-size: 16px; } .widget-primary { min-height: 174px; border: 1px solid #32c5d2; border-top: 2px solid #32c5d2; background: #32c5d2; color: #ffffff; padding: 12px 17px; padding-left: 22px; } .widget-statistic-body { } .widget-statistic-icon { position: absolute; z-index: 30; right: 30px; top: 24px; font-size: 70px; color: #46cad6; } .widget-statistic-description { position: relative; z-index: 35; display: block; font-size: 14px; line-height: 14px; padding-top: 8px; color: #fff; } .widget-statistic-value { position: relative; z-index: 35; font-weight: 300; display: block; color: #fff; font-size: 46px; line-height: 46px; margin-bottom: 8px; } .widget-statistic-header { padding-top: 18px; color: #fff; } .widget-purple { padding: 12px 17px; border: 1px solid #8E44AD; border-top: 2px solid #8E44AD; background: #8E44AD; color: #ffffff; min-height: 174px; .widget-statistic-icon { color: #9956b5; } .widget-statistic-header { color: #ded5e7; } .widget-statistic-description { color: #ded5e7; } } .page-header-button { opacity: .8; border: 1px solid #32c5d2; background: #32c5d2; color:#fff; &:hover { opacity: 1; } } .page-header-description { color: #666; } .page-header-heading { color: #666; } .container-fluid { } ul.tpl-dropdown-content .tpl-dropdown-menu-messages-item .menu-messages-content .menu-messages-content-time { color: #96a5aa; } ul.tpl-dropdown-content { background: #fff; border: 1px solid #ddd; .tpl-dropdown-menu-notifications-item , .tpl-dropdown-menu-messages-item { border-bottom: 1px solid #eee; color:#999; &:hover{ background-color: #f5f5f5; } .tpl-dropdown-menu-notifications-time { color: #999; } } .tpl-dropdown-menu-messages-item:hover { background-color: #f5f5f5; } .tpl-dropdown-menu-notifications-title { color:#999; } } .sidebar-nav-link { a { border-left: #fff 3px solid; } a:hover { background: #f2f6f9; color: #868E8E; border-left: #3bb4f2 3px solid; } } .sidebar-nav-link a.active { background: #f2f6f9; color: #868E8E; border-left: #3bb4f2 3px solid; } .sidebar-nav-heading { color: #999; border-bottom: 1px solid #eee; } .tpl-sidebar-user-panel { background: #fff; border-bottom: 1px solid #eee; } .tpl-content-wrapper { background: #e9ecf3; } .tpl-header-fluid { background: #fff; border-top: 1px solid #eee; } .tpl-header-logo { background: #fff; border-bottom: 1px solid #eee; } .tpl-header-switch-button { background: #fff; border-right: 1px solid #eee; border-left: 1px solid #eee; &:hover { background: #fff; color: #999; } } .tpl-header-navbar { a { color:#999; &:hover { color: #999; } } } .left-sidebar { background: #fff; } .widget-color-green { border: 1px solid #32c5d2; border-top: 2px solid #32c5d2; background: #32c5d2; color: #ffffff; .widget-fluctuation-period-text { color:#fff; } .widget-head { border-bottom: 1px solid #2bb8c4; } .widget-fluctuation-description-text { color:#bbe7f6; } .widget-function { a { color:#42bde5; &:hover { color: #fff; } } } } } .theme-black { .tpl-am-model-bd { background: #424b4f; } .tpl-model-dialog { background: #424b4f; } .tpl-error-title { font-size: 210px; line-height: 220px; color: #868E8E; } .tpl-error-title-info { line-height: 30px; font-size: 21px; margin-top: 20px; text-align: center; color: #868E8E; } .tpl-error-btn { background: #03a9f3; border: 1px solid #03a9f3; border-radius: 30px; padding: 6px 20px 8px; } .tpl-error-content { margin-top: 20px; margin-bottom: 20px; font-size: 16px; text-align: center; color: #cfcfcf; } .tpl-calendar-box { background: #424b4f; padding: 20px; .fc-button { border-radius: 0; box-shadow:0; } .fc-event { border-radius: 0; background: #03a9f3; } .fc-axis { color: #fff; } .fc-unthemed .fc-today { background: #3a4144; } .fc-more { color: #fff; } .fc th.fc-widget-header { background: #9675ce!important; color: #ffffff; font-size: 14px; line-height: 20px; padding: 7px 0px; text-transform: uppercase; border:none!important; a { color: #fff; } } .fc-center { h2 { color:#fff; } } .fc-state-default { background-image: none; background: #fff; font-size: 14px; } .fc th, .fc td, .fc hr, .fc thead, .fc tbody, .fc-row { // background: rgba(0, 0, 0, 0)!important; border-color: rgba(120, 130, 140, 0.4) !important; } .fc-day-number { color: #868E8E; padding-right: 6px; } .fc th { color: #868E8E; font-weight: normal; font-size: 14px; padding: 6px 0; } } .tpl-login-logo { background: url(../img/logob.png) center no-repeat; } .tpl-table-line-img { max-width: 100px; padding: 2px; border: none; } .tpl-table-list-field { border: none; } .tpl-table-list-select { .am-dropdown-content { color:#888; } .am-selected-btn { border:1px solid rgba(255, 255, 255, 0.2); color:#fff; } .am-btn-default.am-active, .am-btn-default:active, .am-dropdown.am-active .am-btn-default.am-dropdown-toggle { border:1px solid rgba(255, 255, 255, 0.2); color:#fff; background: #5d6468; } } .tpl-pagination .am-disabled a , .tpl-pagination li a { color: #fff; padding: 6px 12px; background: #3f4649; border: none; } .tpl-pagination .am-active a{ background: #167fa1;color: #fff; border: 1px solid #167fa1; padding: 6px 12px; } .tpl-login-btn { border: 1px solid #b5b5b5; background-color: rgba(0, 0, 0, 0); padding: 10px 16px; font-size: 14px; line-height: 14px; color:#b5b5b5; &:hover,&:active { background: #b5b5b5; color:#fff; } } .tpl-login-title { color:#fff; strong { color: #39bae4; } } .tpl-form-line-form , .tpl-form-border-form { padding-top: 20px; .am-btn-default { color:#fff; border: 1px solid rgba(255, 255, 255, 0.2); } .am-selected-text { color:#888; } } .tpl-form-border-form input[type=number]:focus, .tpl-form-border-form input[type=search]:focus, .tpl-form-border-form input[type=text]:focus, .tpl-form-border-form input[type=password]:focus, .tpl-form-border-form input[type=datetime]:focus, .tpl-form-border-form input[type=datetime-local]:focus, .tpl-form-border-form input[type=date]:focus, .tpl-form-border-form input[type=month]:focus, .tpl-form-border-form input[type=time]:focus, .tpl-form-border-form input[type=week]:focus, .tpl-form-border-form input[type=email]:focus, .tpl-form-border-form input[type=url]:focus, .tpl-form-border-form input[type=tel]:focus, .tpl-form-border-form input[type=color]:focus, .tpl-form-border-form select:focus, .tpl-form-border-form textarea:focus, .am-form-field:focus{ -webkit-box-shadow: none; box-shadow: none; } .tpl-form-border-form input[type=number], .tpl-form-border-form input[type=search], .tpl-form-border-form input[type=text], .tpl-form-border-form input[type=password], .tpl-form-border-form input[type=datetime], .tpl-form-border-form input[type=datetime-local], .tpl-form-border-form input[type=date], .tpl-form-border-form input[type=month], .tpl-form-border-form input[type=time], .tpl-form-border-form input[type=week], .tpl-form-border-form input[type=email], .tpl-form-border-form input[type=url], .tpl-form-border-form input[type=tel], .tpl-form-border-form input[type=color], .tpl-form-border-form select, .tpl-form-border-form textarea, .am-form-field { display: block; width: 100%; padding: 6px 12px; font-size: 14px; line-height: 1.42857; color: #4d6b8a; background-color: #fff; background-image: none; border: 1px solid #c2cad8; border-radius: 4px; -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075); box-shadow: inset 0 1px 1px rgba(0,0,0,0.075); -webkit-transition: border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s; -o-transition: border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s; transition: border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s; background: 0 0; border: 0; text-indent: .5em; border: 1px solid rgba(255, 255, 255, 0.2); -webkit-border-radius: 0; -moz-border-radius: 0; -ms-border-radius: 0; -o-border-radius: 0; border-radius: 0; color: #fff; box-shadow: none; padding-left: 0; padding-right: 0; font-size: 14px; } .tpl-form-border-form .am-checkbox, .tpl-form-border-form .am-checkbox-inline, .tpl-form-border-form .am-form-label, .tpl-form-border-form .am-radio, .tpl-form-border-form .am-radio-inline{ margin-top: 0; margin-bottom: 0; } .tpl-form-border-form .am-form-group:after { clear: both; } .tpl-form-border-form .am-form-group:after, .tpl-form-border-form .am-form-group:before { content: " "; display: table; } .tpl-form-border-form .am-form-label{ padding-top: 5px; font-size: 16px; color: #fff; font-weight: inherit; text-align: right; } .tpl-form-border-form .am-form-group { /*padding: 20px 0;*/ } .tpl-form-border-form .am-form-label .tpl-form-line-small-title { color: #999; font-size: 12px; } .tpl-form-line-form input[type=number]:focus, .tpl-form-line-form input[type=search]:focus, .tpl-form-line-form input[type=text]:focus, .tpl-form-line-form input[type=password]:focus, .tpl-form-line-form input[type=datetime]:focus, .tpl-form-line-form input[type=datetime-local]:focus, .tpl-form-line-form input[type=date]:focus, .tpl-form-line-form input[type=month]:focus, .tpl-form-line-form input[type=time]:focus, .tpl-form-line-form input[type=week]:focus, .tpl-form-line-form input[type=email]:focus, .tpl-form-line-form input[type=url]:focus, .tpl-form-line-form input[type=tel]:focus, .tpl-form-line-form input[type=color]:focus, .tpl-form-line-form select:focus, .tpl-form-line-form textarea:focus, .am-form-field:focus{ -webkit-box-shadow: none; box-shadow: none; } .tpl-form-line-form input[type=number], .tpl-form-line-form input[type=search], .tpl-form-line-form input[type=text], .tpl-form-line-form input[type=password], .tpl-form-line-form input[type=datetime], .tpl-form-line-form input[type=datetime-local], .tpl-form-line-form input[type=date], .tpl-form-line-form input[type=month], .tpl-form-line-form input[type=time], .tpl-form-line-form input[type=week], .tpl-form-line-form input[type=email], .tpl-form-line-form input[type=url], .tpl-form-line-form input[type=tel], .tpl-form-line-form input[type=color], .tpl-form-line-form select, .tpl-form-line-form textarea, .am-form-field { display: block; width: 100%; padding: 6px 12px; font-size: 14px; line-height: 1.42857; color: #4d6b8a; background-color: #fff; background-image: none; border: 1px solid #c2cad8; border-radius: 4px; -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,0.075); box-shadow: inset 0 1px 1px rgba(0,0,0,0.075); -webkit-transition: border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s; -o-transition: border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s; transition: border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s; background: 0 0; border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.2); -webkit-border-radius: 0; -moz-border-radius: 0; -ms-border-radius: 0; -o-border-radius: 0; border-radius: 0; color: #fff; box-shadow: none; padding-left: 0; padding-right: 0; font-size: 14px; } .tpl-form-line-form .am-checkbox, .tpl-form-line-form .am-checkbox-inline, .tpl-form-line-form .am-form-label, .tpl-form-line-form .am-radio, .tpl-form-line-form .am-radio-inline{ margin-top: 0; margin-bottom: 0; } .tpl-form-line-form .am-form-group:after { clear: both; } .tpl-form-line-form .am-form-group:after, .tpl-form-line-form .am-form-group:before { content: " "; display: table; } .tpl-form-line-form .am-form-label{ padding-top: 5px; font-size: 16px; color: #fff; font-weight: inherit; text-align: right; } .tpl-form-line-form .am-form-group { /*padding: 20px 0;*/ } .tpl-form-line-form .am-form-label .tpl-form-line-small-title { color: #999; font-size: 12px; } background-color: #282d2f; .tpl-table-black-operation { a { border: 1px solid #7b878d; color:#7b878d; &:hover { background: #7b878d; color:#fff; } } a.tpl-table-black-operation-del { border: 1px solid #f35842; color:#f35842; &:hover { background: #f35842; color:#fff; } } } .am-table-bordered { border: 1px solid #666d70; } .am-table-bordered>tbody>tr>td, .am-table-bordered>tbody>tr>th, .am-table-bordered>tfoot>tr>td, .am-table-bordered>tfoot>tr>th, .am-table-bordered>thead>tr>td, .am-table-bordered>thead>tr>th { border: 1px solid #666d70; } .am-table-bordered>thead+tbody>tr:first-child>td, .am-table-bordered>thead+tbody>tr:first-child>th { border: 1px solid #666d70; } .am-table-striped>tbody>tr:nth-child(odd)>td, .am-table-striped>tbody>tr:nth-child(odd)>th { background-color: #5d6468; } .tpl-table-black { color:#fff; thead>tr>th { font-size: 14px; padding: 6px; border-bottom: 1px solid #666d70; } tbody>tr>td { font-size: 14px; padding: 7px 6px; border-top: 1px solid #666d70; } tfoot>tr>th { font-size: 14px; padding: 6px 0; } } .tpl-user-card { border: 1px solid #11627d; border-top: 2px solid #105f79; background: #1786aa; color: #ffffff; } .tpl-user-card-title { font-size: 26px; margin-top: 0; font-weight: 300; margin-top: 25px; margin-bottom: 10px; } .achievement-subheading { font-size: 12px; margin-top: 0; margin-bottom: 15px; } .achievement-image { border-radius: 50%; margin-bottom: 22px; } .achievement-description { margin: 0; font-size: 12px; } .am-progress { height: 12px; margin-bottom: 14px; background: rgba(0, 0, 0, 0.15); } .am-progress-title { font-size: 14px; margin-bottom: 8px; } .am-progress-title-more { color: #a1a8ab; } .widget-fluctuation-tpl-btn { margin-top: 6px; display: block; color: #fff; font-size: 12px; padding: 5px 10px; outline: none; background-color: rgba(255, 255, 255, 0); border: 1px solid #fff; &:hover { background: #fff; color:#4b5357; } } .widget-fluctuation-description-text{ color: #c5cacd; } .text-success { color: #08ed72; } .widget-fluctuation-period-text { color:#fff; } .widget-head { border-bottom: 1px solid #3f4649; } .widget-function { a { color:#7b878d; &:hover { color:#fff; } } } .widget { border: 1px solid #33393c; border-top: 2px solid #313639; background: #4b5357; color: #ffffff; } .widget-primary { border: 1px solid #11627d; border-top: 2px solid #105f79; background: #1786aa; color: #ffffff; padding: 12px 17px; } .widget-statistic-body { } .widget-statistic-icon { position: absolute; z-index: 30; right: 30px; top: 0px; font-size: 70px; color: #1b9eca; } .widget-statistic-description { position: relative; z-index: 35; display: block; font-size: 14px; line-height: 14px; padding-top: 8px; color: #9cdcf2; } .widget-statistic-value { position: relative; z-index: 35; font-weight: 300; display: block; color: #fff; font-size: 46px; line-height: 46px; margin-bottom: 8px; } .widget-statistic-header { color: #9cdcf2; } .widget-purple { padding: 12px 17px; border: 1px solid #5e4578; border-top: 2px solid #5c4375; background: #785799; color: #ffffff; .widget-statistic-icon { color: #8a6aaa; } .widget-statistic-header { color: #ded5e7; } .widget-statistic-description { color: #ded5e7; } } .page-header-description { color: #e6e6e6; } .page-header-heading { color: #666; } .container-fluid { background: #424b4f; } .page-header-heading { color: #fff; } .sidebar-nav-heading { color:#fff; } .tpl-sidebar-user-panel { background: #1f2224; border-bottom: 1px solid #1f2224; } .tpl-content-wrapper { background: #3a4144; } .tpl-header-fluid { background: #2f3638; } .sidebar-nav-link { a.active { background: #232829; } a:hover { background: #232829; } } .tpl-header-switch-button { background: #2f3638; border-right: 1px solid #282d2f; &:hover { background: #282d2f; color: #fff; } } .tpl-header-navbar { a { color:#cfcfcf; &:hover { color: #fff; } } } .left-sidebar { padding-top: 56px; background: #282d2f; } .widget-color-green { border: 1px solid #11627d; border-top: 2px solid #105f79; background: #1786aa; color: #ffffff; .widget-head { border-bottom: 1px solid #147494; } .widget-fluctuation-description-text { color:#bbe7f6; } .widget-function { a { color:#42bde5; &:hover { color: #fff; } } } } } @media screen and (max-width: 1024px) { .tpl-index-settings-button { display: none; } .theme-black .left-sidebar { padding-top: 111px; } .left-sidebar { padding-top: 111px; } .tpl-content-wrapper { margin-left: 0 } .tpl-header-logo { float:none; width: 100%; } .tpl-header-navbar-welcome { display: none; } .tpl-sidebar-user-panel { border-top: 1px solid #eee; } .tpl-header-fluid { border-top: none; margin-left: 0; } .theme-white .tpl-header-fluid { border-top: none; } .theme-black .tpl-sidebar-user-panel { border-top: 1px solid #1f2224; } } @media screen and (min-width: 641px) { [class*=am-u-] { padding-left: 10px; padding-right: 10px; } } @media screen and (max-width: 641px) { .theme-white , .theme-black { .tpl-error-title { font-size: 130px; line-height: 140px; } } .theme-white { .tpl-login-title { font-size: 20px; } .tpl-login-content{ width: 86%; padding: 22px 30px 25px; } } .tpl-header-search { display: none; } ul.tpl-dropdown-content { position: fixed; width: 100%; left: 0; top: 112px; right: 0; } } ================================================ FILE: src/main/resources/static/assets/css/calculator.css ================================================ /*@charset "utf-8";*/ /*body, ul, dl, dd, dt, ol, li, p, h1, h2, h3, h4, h5, h6, textarea, form, select, fieldset, table, td, div, input {margin:0;padding:0;-webkit-text-size-adjust: none}*/ /*h1, h2, h3, h4, h5, h6{font-size:12px;font-weight:normal}*/ /*body>div{margin:0 auto}*/ /*div {text-align:left}*/ /*a img {border:0}*/ /*body { color: #333; text-align: center; font: 12px "微软雅黑"; }*/ /*ul, ol, li {list-style-type:none;vertical-align:0}*/ /*a {outline-style:none;color:#535353;text-decoration:none}*/ /*a:hover { color: #D40000; text-decoration: none}*/ /*.clear{height:0; overflow:hidden; clear:both}*/ #calcuator{ width:200px; height:245px; padding:10px; border:1px solid #e5e5e5; background:#f8f8f8; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius:3px; box-shadow:0px 0px 10px #f2f2f2; -moz-box-shadow:0px 0px 10px #f2f2f2; -webkit-box-shadow:0px 0px 10px #f2f2f2; margin: 0px auto; } #calcuator #input-box{ margin:0; width:187px; padding:9px 5px; height:14px;border:1px solid #e5e5e5; border-radius:3px; -webkit-border-radius:3px; -moz-border-radius:3px; background:#FFF; text-align:right; line-height:14px; font-size:12px; font-family:Verdana, Geneva, sans-serif; color:#666; outline:none; text-transform:uppercase;} #calcuator #btn-list{ width:200px; overflow:hidden;} #calcuator #btn-list .btn-radius{ border-radius:2px; -webkit-border-radius:2px; -moz-border-radius:2px; border:1px solid #e5e5e5; background:-webkit-gradient(linear, 0 0, 0 100%, from(#f7f7f7), to(#ebebeb)); background:-moz-linear-gradient(top, #f7f7f7,#ebebeb);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#f7f7f7,endColorstr=#ebebeb,grandientType=1); line-height:29px; text-align:center; text-shadow:0px 1px 1px #FFF; font-weight:bold; font-family:Verdana, Geneva, sans-serif; color:#666; float:left; margin-left:11px; margin-top:11px; font-size:12px; cursor:pointer;} #calcuator #btn-list .btn-radius:active{ background:#ffffff;} #calcuator #btn-list .clear-marginleft{ margin-left:0;} #calcuator #btn-list .font-14{ font-size:14px;} #calcuator #btn-list .color-red{ color:#ff5050} #calcuator #btn-list .color-blue{ color:#00b4ff} #calcuator #btn-list .btn-30{ width:29px; height:29px;} #calcuator #btn-list .btn-70{ width:70px; height:29px;} ================================================ FILE: src/main/resources/static/assets/css/flipclock.css ================================================ /* Get the bourbon mixin from http://bourbon.io */ /* Reset */ .flip-clock-wrapper * { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; -o-box-sizing: border-box; box-sizing: border-box; -webkit-backface-visibility: hidden; -moz-backface-visibility: hidden; -ms-backface-visibility: hidden; -o-backface-visibility: hidden; backface-visibility: hidden; } .flip-clock-wrapper a { cursor: pointer; text-decoration: none; color: #ccc; } .flip-clock-wrapper a:hover { color: #fff; } .flip-clock-wrapper ul { list-style: none; } .flip-clock-wrapper.clearfix:before, .flip-clock-wrapper.clearfix:after { content: " "; display: table; } .flip-clock-wrapper.clearfix:after { clear: both; } .flip-clock-wrapper.clearfix { *zoom: 1; } /* Main */ .flip-clock-wrapper { font: normal 11px "Helvetica Neue", Helvetica, sans-serif; -webkit-user-select: none; } .flip-clock-meridium { background: none !important; box-shadow: 0 0 0 !important; font-size: 36px !important; } .flip-clock-meridium a { color: #313333; } .flip-clock-wrapper { text-align: center; position: relative; width: 100%; margin: 1em; } .flip-clock-wrapper:before, .flip-clock-wrapper:after { content: " "; /* 1 */ display: table; /* 2 */ } .flip-clock-wrapper:after { clear: both; } /* Skeleton */ .flip-clock-wrapper ul { position: relative; float: left; margin: 5px; width: 60px; height: 90px; font-size: 80px; font-weight: bold; line-height: 87px; border-radius: 6px; background: #000; } .flip-clock-wrapper ul li { z-index: 1; position: absolute; left: 0; top: 0; width: 100%; height: 100%; line-height: 87px; text-decoration: none !important; } .flip-clock-wrapper ul li:first-child { z-index: 2; } .flip-clock-wrapper ul li a { display: block; height: 100%; -webkit-perspective: 200px; -moz-perspective: 200px; perspective: 200px; margin: 0 !important; overflow: visible !important; cursor: default !important; } .flip-clock-wrapper ul li a div { z-index: 1; position: absolute; left: 0; width: 100%; height: 50%; font-size: 80px; overflow: hidden; outline: 1px solid transparent; } .flip-clock-wrapper ul li a div .shadow { position: absolute; width: 100%; height: 100%; z-index: 2; } .flip-clock-wrapper ul li a div.up { -webkit-transform-origin: 50% 100%; -moz-transform-origin: 50% 100%; -ms-transform-origin: 50% 100%; -o-transform-origin: 50% 100%; transform-origin: 50% 100%; top: 0; } .flip-clock-wrapper ul li a div.up:after { content: ""; position: absolute; top: 44px; left: 0; z-index: 5; width: 100%; height: 3px; background-color: #000; background-color: rgba(0, 0, 0, 0.4); } .flip-clock-wrapper ul li a div.down { -webkit-transform-origin: 50% 0; -moz-transform-origin: 50% 0; -ms-transform-origin: 50% 0; -o-transform-origin: 50% 0; transform-origin: 50% 0; bottom: 0; border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; } .flip-clock-wrapper ul li a div div.inn { position: absolute; left: 0; z-index: 1; width: 100%; height: 200%; color: #ccc; text-shadow: 0 1px 2px #000; text-align: center; background-color: #333; border-radius: 6px; font-size: 70px; } .flip-clock-wrapper ul li a div.up div.inn { top: 0; } .flip-clock-wrapper ul li a div.down div.inn { bottom: 0; } /* PLAY */ .flip-clock-wrapper ul.play li.flip-clock-before { z-index: 3; } .flip-clock-wrapper .flip { box-shadow: 0 2px 5px rgba(0, 0, 0, 0.7); } .flip-clock-wrapper ul.play li.flip-clock-active { -webkit-animation: asd 0.5s 0.5s linear both; -moz-animation: asd 0.5s 0.5s linear both; animation: asd 0.5s 0.5s linear both; z-index: 5; } .flip-clock-divider { float: left; display: inline-block; position: relative; width: 20px; height: 100px; } .flip-clock-divider:first-child { width: 0; } .flip-clock-dot { display: block; background: #323434; width: 10px; height: 10px; position: absolute; border-radius: 50%; box-shadow: 0 0 5px rgba(0, 0, 0, 0.5); left: 5px; } .flip-clock-divider .flip-clock-label { position: absolute; top: -1.5em; right: -86px; color: black; text-shadow: none; } .flip-clock-divider.minutes .flip-clock-label { right: -88px; } .flip-clock-divider.seconds .flip-clock-label { right: -91px; } .flip-clock-dot.top { top: 30px; } .flip-clock-dot.bottom { bottom: 30px; } @-webkit-keyframes asd { 0% { z-index: 2; } 20% { z-index: 4; } 100% { z-index: 4; } } @-moz-keyframes asd { 0% { z-index: 2; } 20% { z-index: 4; } 100% { z-index: 4; } } @-o-keyframes asd { 0% { z-index: 2; } 20% { z-index: 4; } 100% { z-index: 4; } } @keyframes asd { 0% { z-index: 2; } 20% { z-index: 4; } 100% { z-index: 4; } } .flip-clock-wrapper ul.play li.flip-clock-active .down { z-index: 2; -webkit-animation: turn 0.5s 0.5s linear both; -moz-animation: turn 0.5s 0.5s linear both; animation: turn 0.5s 0.5s linear both; } @-webkit-keyframes turn { 0% { -webkit-transform: rotateX(90deg); } 100% { -webkit-transform: rotateX(0deg); } } @-moz-keyframes turn { 0% { -moz-transform: rotateX(90deg); } 100% { -moz-transform: rotateX(0deg); } } @-o-keyframes turn { 0% { -o-transform: rotateX(90deg); } 100% { -o-transform: rotateX(0deg); } } @keyframes turn { 0% { transform: rotateX(90deg); } 100% { transform: rotateX(0deg); } } .flip-clock-wrapper ul.play li.flip-clock-before .up { z-index: 2; -webkit-animation: turn2 0.5s linear both; -moz-animation: turn2 0.5s linear both; animation: turn2 0.5s linear both; } @-webkit-keyframes turn2 { 0% { -webkit-transform: rotateX(0deg); } 100% { -webkit-transform: rotateX(-90deg); } } @-moz-keyframes turn2 { 0% { -moz-transform: rotateX(0deg); } 100% { -moz-transform: rotateX(-90deg); } } @-o-keyframes turn2 { 0% { -o-transform: rotateX(0deg); } 100% { -o-transform: rotateX(-90deg); } } @keyframes turn2 { 0% { transform: rotateX(0deg); } 100% { transform: rotateX(-90deg); } } .flip-clock-wrapper ul li.flip-clock-active { z-index: 3; } /* SHADOW */ .flip-clock-wrapper ul.play li.flip-clock-before .up .shadow { background: -moz-linear-gradient(top, rgba(0, 0, 0, 0.1) 0%, black 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(0, 0, 0, 0.1)), color-stop(100%, black)); background: linear, top, rgba(0, 0, 0, 0.1) 0%, black 100%; background: -o-linear-gradient(top, rgba(0, 0, 0, 0.1) 0%, black 100%); background: -ms-linear-gradient(top, rgba(0, 0, 0, 0.1) 0%, black 100%); background: linear, to bottom, rgba(0, 0, 0, 0.1) 0%, black 100%; -webkit-animation: show 0.5s linear both; -moz-animation: show 0.5s linear both; animation: show 0.5s linear both; } .flip-clock-wrapper ul.play li.flip-clock-active .up .shadow { background: -moz-linear-gradient(top, rgba(0, 0, 0, 0.1) 0%, black 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(0, 0, 0, 0.1)), color-stop(100%, black)); background: linear, top, rgba(0, 0, 0, 0.1) 0%, black 100%; background: -o-linear-gradient(top, rgba(0, 0, 0, 0.1) 0%, black 100%); background: -ms-linear-gradient(top, rgba(0, 0, 0, 0.1) 0%, black 100%); background: linear, to bottom, rgba(0, 0, 0, 0.1) 0%, black 100%; -webkit-animation: hide 0.5s 0.3s linear both; -moz-animation: hide 0.5s 0.3s linear both; animation: hide 0.5s 0.3s linear both; } /*DOWN*/ .flip-clock-wrapper ul.play li.flip-clock-before .down .shadow { background: -moz-linear-gradient(top, black 0%, rgba(0, 0, 0, 0.1) 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, black), color-stop(100%, rgba(0, 0, 0, 0.1))); background: linear, top, black 0%, rgba(0, 0, 0, 0.1) 100%; background: -o-linear-gradient(top, black 0%, rgba(0, 0, 0, 0.1) 100%); background: -ms-linear-gradient(top, black 0%, rgba(0, 0, 0, 0.1) 100%); background: linear, to bottom, black 0%, rgba(0, 0, 0, 0.1) 100%; -webkit-animation: show 0.5s linear both; -moz-animation: show 0.5s linear both; animation: show 0.5s linear both; } .flip-clock-wrapper ul.play li.flip-clock-active .down .shadow { background: -moz-linear-gradient(top, black 0%, rgba(0, 0, 0, 0.1) 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, black), color-stop(100%, rgba(0, 0, 0, 0.1))); background: linear, top, black 0%, rgba(0, 0, 0, 0.1) 100%; background: -o-linear-gradient(top, black 0%, rgba(0, 0, 0, 0.1) 100%); background: -ms-linear-gradient(top, black 0%, rgba(0, 0, 0, 0.1) 100%); background: linear, to bottom, black 0%, rgba(0, 0, 0, 0.1) 100%; -webkit-animation: hide 0.5s 0.3s linear both; -moz-animation: hide 0.5s 0.3s linear both; animation: hide 0.5s 0.2s linear both; } @-webkit-keyframes show { 0% { opacity: 0; } 100% { opacity: 1; } } @-moz-keyframes show { 0% { opacity: 0; } 100% { opacity: 1; } } @-o-keyframes show { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes show { 0% { opacity: 0; } 100% { opacity: 1; } } @-webkit-keyframes hide { 0% { opacity: 1; } 100% { opacity: 0; } } @-moz-keyframes hide { 0% { opacity: 1; } 100% { opacity: 0; } } @-o-keyframes hide { 0% { opacity: 1; } 100% { opacity: 0; } } @keyframes hide { 0% { opacity: 1; } 100% { opacity: 0; } } ================================================ FILE: src/main/resources/static/assets/css/fullcalendar.print.css ================================================ /*! * FullCalendar v0.0.0 Print Stylesheet * Docs & License: http://fullcalendar.io/ * (c) 2016 Adam Shaw */ /* * Include this stylesheet on your page to get a more printer-friendly calendar. * When including this stylesheet, use the media='print' attribute of the tag. * Make sure to include this stylesheet IN ADDITION to the regular fullcalendar.css. */ .fc { max-width: 100% !important; } /* Global Event Restyling --------------------------------------------------------------------------------------------------*/ .fc-event { background: #fff !important; color: #000 !important; page-break-inside: avoid; } .fc-event .fc-resizer { display: none; } /* Table & Day-Row Restyling --------------------------------------------------------------------------------------------------*/ .fc th, .fc td, .fc hr, .fc thead, .fc tbody, .fc-row { border-color: #ccc !important; background: #fff !important; } /* kill the overlaid, absolutely-positioned components */ /* common... */ .fc-bg, .fc-bgevent-skeleton, .fc-highlight-skeleton, .fc-helper-skeleton, /* for timegrid. within cells within table skeletons... */ .fc-bgevent-container, .fc-business-container, .fc-highlight-container, .fc-helper-container { display: none; } /* don't force a min-height on rows (for DayGrid) */ .fc tbody .fc-row { height: auto !important; /* undo height that JS set in distributeHeight */ min-height: 0 !important; /* undo the min-height from each view's specific stylesheet */ } .fc tbody .fc-row .fc-content-skeleton { position: static; /* undo .fc-rigid */ padding-bottom: 0 !important; /* use a more border-friendly method for this... */ } .fc tbody .fc-row .fc-content-skeleton tbody tr:last-child td { /* only works in newer browsers */ padding-bottom: 1em; /* ...gives space within the skeleton. also ensures min height in a way */ } .fc tbody .fc-row .fc-content-skeleton table { /* provides a min-height for the row, but only effective for IE, which exaggerates this value, making it look more like 3em. for other browers, it will already be this tall */ height: 1em; } /* Undo month-view event limiting. Display all events and hide the "more" links --------------------------------------------------------------------------------------------------*/ .fc-more-cell, .fc-more { display: none !important; } .fc tr.fc-limited { display: table-row !important; } .fc td.fc-limited { display: table-cell !important; } .fc-popover { display: none; /* never display the "more.." popover in print mode */ } /* TimeGrid Restyling --------------------------------------------------------------------------------------------------*/ /* undo the min-height 100% trick used to fill the container's height */ .fc-time-grid { min-height: 0 !important; } /* don't display the side axis at all ("all-day" and time cells) */ .fc-agenda-view .fc-axis { display: none; } /* don't display the horizontal lines */ .fc-slats, .fc-time-grid hr { /* this hr is used when height is underused and needs to be filled */ display: none !important; /* important overrides inline declaration */ } /* let the container that holds the events be naturally positioned and create real height */ .fc-time-grid .fc-content-skeleton { position: static; } /* in case there are no events, we still want some height */ .fc-time-grid .fc-content-skeleton table { height: 4em; } /* kill the horizontal spacing made by the event container. event margins will be done below */ .fc-time-grid .fc-event-container { margin: 0 !important; } /* TimeGrid *Event* Restyling --------------------------------------------------------------------------------------------------*/ /* naturally position events, vertically stacking them */ .fc-time-grid .fc-event { position: static !important; margin: 3px 2px !important; } /* for events that continue to a future day, give the bottom border back */ .fc-time-grid .fc-event.fc-not-end { border-bottom-width: 1px !important; } /* indicate the event continues via "..." text */ .fc-time-grid .fc-event.fc-not-end:after { content: "..."; } /* for events that are continuations from previous days, give the top border back */ .fc-time-grid .fc-event.fc-not-start { border-top-width: 1px !important; } /* indicate the event is a continuation via "..." text */ .fc-time-grid .fc-event.fc-not-start:before { content: "..."; } /* time */ /* undo a previous declaration and let the time text span to a second line */ .fc-time-grid .fc-event .fc-time { white-space: normal !important; } /* hide the the time that is normally displayed... */ .fc-time-grid .fc-event .fc-time span { display: none; } /* ...replace it with a more verbose version (includes AM/PM) stored in an html attribute */ .fc-time-grid .fc-event .fc-time:after { content: attr(data-full); } /* Vertical Scroller & Containers --------------------------------------------------------------------------------------------------*/ /* kill the scrollbars and allow natural height */ .fc-scroller, .fc-day-grid-container, /* these divs might be assigned height, which we need to cleared */ .fc-time-grid-container { /* */ overflow: visible !important; height: auto !important; } /* kill the horizontal border/padding used to compensate for scrollbars */ .fc-row { border: 0 !important; margin: 0 !important; } /* Button Controls --------------------------------------------------------------------------------------------------*/ .fc-button-group, .fc button { display: none; /* don't display any button-related controls */ } ================================================ FILE: src/main/resources/static/assets/css/todomvc.css ================================================ [v-cloak] { display: none; } #todomvc button { margin: 0; padding: 0; border: 0; background: none; font-size: 100%; vertical-align: baseline; font-family: inherit; font-weight: inherit; color: inherit; -webkit-appearance: none; appearance: none; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } #todomvc{ font: 14px 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 1.4em; background: #f5f5f5; color: #4d4d4d; min-width: 230px; max-width: 550px; margin: 0 auto; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-weight: 300; } #todomvc button, #todomvc input[type="checkbox"] { outline: none; } .hidden { display: none; } .todoapp { background: #fff; margin: 130px 0 40px 0; position: relative; box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 25px 50px 0 rgba(0, 0, 0, 0.1); } .todoapp input::-webkit-input-placeholder { font-style: italic; font-weight: 300; color: #e6e6e6; } .todoapp input::-moz-placeholder { font-style: italic; font-weight: 300; color: #e6e6e6; } .todoapp input::input-placeholder { font-style: italic; font-weight: 300; color: #e6e6e6; } .todoapp h1 { position: absolute; top: -155px; width: 100%; font-size: 100px; font-weight: 100; text-align: center; color: rgba(175, 47, 47, 0.15); -webkit-text-rendering: optimizeLegibility; -moz-text-rendering: optimizeLegibility; text-rendering: optimizeLegibility; } .new-todo, .edit { position: relative; margin: 0; width: 100%; font-size: 24px; font-family: inherit; font-weight: inherit; line-height: 1.4em; border: 0; outline: none; color: inherit; padding: 6px; border: 1px solid #999; box-shadow: inset 0 -1px 5px 0 rgba(0, 0, 0, 0.2); box-sizing: border-box; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .new-todo { padding: 16px 16px 16px 60px; border: none; background: rgba(0, 0, 0, 0.003); box-shadow: inset 0 -2px 1px rgba(0,0,0,0.03); } .main { position: relative; z-index: 2; border-top: 1px solid #e6e6e6; } #todomvc label[for='toggle-all'] { display: none; } .toggle-all { position: absolute; top: -55px; left: -12px; width: 60px; height: 34px; text-align: center; border: none; /* Mobile Safari */ } .toggle-all:before { content: '❯'; font-size: 22px; color: #e6e6e6; padding: 10px 27px 10px 27px; } .toggle-all:checked:before { color: #737373; } .todo-list { margin: 0; padding: 0; list-style: none; } .todo-list li { position: relative; font-size: 24px; border-bottom: 1px solid #ededed; } .todo-list li:last-child { border-bottom: none; } .todo-list li.editing { border-bottom: none; padding: 0; } .todo-list li.editing .edit { display: block; width: 506px; padding: 13px 17px 12px 17px; margin: 0 0 0 43px; } .todo-list li.editing .view { display: none; } .todo-list li .toggle { text-align: center; width: 40px; /* auto, since non-WebKit browsers doesn't support input styling */ height: auto; position: absolute; top: 0; bottom: 0; margin: auto 0; border: none; /* Mobile Safari */ -webkit-appearance: none; appearance: none; } .todo-list li .toggle:after { content: url('data:image/svg+xml;utf8,'); } .todo-list li .toggle:checked:after { content: url('data:image/svg+xml;utf8,'); } .todo-list li label { white-space: pre-line; word-break: break-all; padding: 15px 60px 15px 15px; margin-left: 45px; display: block; line-height: 1.2; transition: color 0.4s; } .todo-list li.completed label { color: #d9d9d9; text-decoration: line-through; } .todo-list li .destroy { display: none; position: absolute; top: 0; right: 10px; bottom: 0; width: 40px; height: 40px; margin: auto 0; font-size: 30px; color: #cc9a9a; margin-bottom: 11px; transition: color 0.2s ease-out; } .todo-list li .destroy:hover { color: #af5b5e; } .todo-list li .destroy:after { content: '×'; } .todo-list li:hover .destroy { display: block; } .todo-list li .edit { display: none; } .todo-list li.editing:last-child { margin-bottom: -1px; } .footer { color: #777; padding: 10px 15px; height: 20px; text-align: center; border-top: 1px solid #e6e6e6; } .footer:before { content: ''; position: absolute; right: 0; bottom: 0; left: 0; height: 50px; overflow: hidden; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2), 0 8px 0 -3px #f6f6f6, 0 9px 1px -3px rgba(0, 0, 0, 0.2), 0 16px 0 -6px #f6f6f6, 0 17px 2px -6px rgba(0, 0, 0, 0.2); } .todo-count { float: left; text-align: left; } .todo-count strong { font-weight: 300; } .filters { margin: 0; padding: 0; list-style: none; position: absolute; right: 0; left: 0; } .filters li { display: inline; } .filters li a { color: inherit; margin: 3px; padding: 3px 7px; text-decoration: none; border: 1px solid transparent; border-radius: 3px; } .filters li a.selected, .filters li a:hover { border-color: rgba(175, 47, 47, 0.1); } .filters li a.selected { border-color: rgba(175, 47, 47, 0.2); } .clear-completed, html .clear-completed:active { float: right; position: relative; line-height: 20px; text-decoration: none; cursor: pointer; } .clear-completed:hover { text-decoration: underline; } .info { margin: 65px auto 0; color: #bfbfbf; font-size: 10px; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); text-align: center; } .info p { line-height: 1; } .info a { color: inherit; text-decoration: none; font-weight: 400; } .info a:hover { text-decoration: underline; } /* Hack to remove background from Mobile Safari. Can't use it globally since it destroys checkboxes in Firefox */ @media screen and (-webkit-min-device-pixel-ratio:0) { .toggle-all, .todo-list li .toggle { background: none; } .todo-list li .toggle { height: 40px; } .toggle-all { -webkit-transform: rotate(90deg); transform: rotate(90deg); -webkit-appearance: none; appearance: none; } } @media (max-width: 430px) { .footer { height: 50px; } .filters { bottom: 10px; } } ================================================ FILE: src/main/resources/static/assets/js/app.js ================================================ $(function() { // 读取body data-type 判断是哪个页面然后执行相应页面方法,方法在下面。 var dataType = $('.centerView').attr('data-type'); console.log(dataType); for (key in pageData) { if (key == dataType) { pageData[key](); } } // // 判断用户是否已有自己选择的模板风格 // if(storageLoad('SelcetColor')){ // $('body').attr('class',storageLoad('SelcetColor').Color) // }else{ // storageSave(saveSelectColor); // $('body').attr('class','theme-black') // } autoLeftNav(); $(window).resize(function() { autoLeftNav(); console.log($(window).width()) }); }) // 页面数据 var pageData = { // =============================================== // 首页 // =============================================== 'index': function indexData() { $('#example-r').DataTable({ bInfo: false, //页脚信息 dom: 'ti' }); // ========================== // 百度图表A http://echarts.baidu.com/ // ========================== var echartsA = echarts.init(document.getElementById('tpl-echarts')); option = { tooltip: { trigger: 'axis' }, grid: { top: '3%', left: '3%', right: '4%', bottom: '3%', containLabel: true }, xAxis: [{ type: 'category', boundaryGap: false, data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'] }], yAxis: [{ type: 'value' }], textStyle: { color: '#838FA1' }, series: [{ name: '邮件营销', type: 'line', stack: '总量', areaStyle: { normal: {} }, data: [120, 132, 101, 134, 90], itemStyle: { normal: { color: '#1cabdb', borderColor: '#1cabdb', borderWidth: '2', borderType: 'solid', opacity: '1' }, emphasis: { } } }] }; echartsA.setOption(option); }, // =============================================== // 图表页 // =============================================== 'chart': function chartData() { // ========================== // 百度图表A http://echarts.baidu.com/ // ========================== var echartsC = echarts.init(document.getElementById('tpl-echarts-C')); optionC = { tooltip: { trigger: 'axis' }, legend: { data: ['蒸发量', '降水量', '平均温度'] }, xAxis: [{ type: 'category', data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'] }], yAxis: [{ type: 'value', name: '水量', min: 0, max: 250, interval: 50, axisLabel: { formatter: '{value} ml' } }, { type: 'value', name: '温度', min: 0, max: 25, interval: 5, axisLabel: { formatter: '{value} °C' } } ], series: [{ name: '蒸发量', type: 'bar', data: [2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3] }, { name: '降水量', type: 'bar', data: [2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3] }, { name: '平均温度', type: 'line', yAxisIndex: 1, data: [2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2] } ] }; echartsC.setOption(optionC); var echartsB = echarts.init(document.getElementById('tpl-echarts-B')); optionB = { tooltip: { trigger: 'axis' }, legend: { x: 'center', data: ['某软件', '某主食手机', '某水果手机', '降水量', '蒸发量'] }, radar: [{ indicator: [ { text: '品牌', max: 100 }, { text: '内容', max: 100 }, { text: '可用性', max: 100 }, { text: '功能', max: 100 } ], center: ['25%', '40%'], radius: 80 }, { indicator: [ { text: '外观', max: 100 }, { text: '拍照', max: 100 }, { text: '系统', max: 100 }, { text: '性能', max: 100 }, { text: '屏幕', max: 100 } ], radius: 80, center: ['50%', '60%'], }, { indicator: (function() { var res = []; for (var i = 1; i <= 12; i++) { res.push({ text: i + '月', max: 100 }); } return res; })(), center: ['75%', '40%'], radius: 80 } ], series: [{ type: 'radar', tooltip: { trigger: 'item' }, itemStyle: { normal: { areaStyle: { type: 'default' } } }, data: [{ value: [60, 73, 85, 40], name: '某软件' }] }, { type: 'radar', radarIndex: 1, data: [{ value: [85, 90, 90, 95, 95], name: '某主食手机' }, { value: [95, 80, 95, 90, 93], name: '某水果手机' } ] }, { type: 'radar', radarIndex: 2, itemStyle: { normal: { areaStyle: { type: 'default' } } }, data: [{ name: '降水量', value: [2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 75.6, 82.2, 48.7, 18.8, 6.0, 2.3], }, { name: '蒸发量', value: [2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 35.6, 62.2, 32.6, 20.0, 6.4, 3.3] } ] } ] }; echartsB.setOption(optionB); var echartsA = echarts.init(document.getElementById('tpl-echarts-A')); option = { tooltip: { trigger: 'axis', }, legend: { data: ['邮件', '媒体', '资源'] }, grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true }, xAxis: [{ type: 'category', boundaryGap: true, data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'] }], yAxis: [{ type: 'value' }], series: [{ name: '邮件', type: 'line', stack: '总量', areaStyle: { normal: {} }, data: [120, 132, 101, 134, 90, 230, 210], itemStyle: { normal: { color: '#59aea2' }, emphasis: { } } }, { name: '媒体', type: 'line', stack: '总量', areaStyle: { normal: {} }, data: [220, 182, 191, 234, 290, 330, 310], itemStyle: { normal: { color: '#e7505a' } } }, { name: '资源', type: 'line', stack: '总量', areaStyle: { normal: {} }, data: [150, 232, 201, 154, 190, 330, 410], itemStyle: { normal: { color: '#32c5d2' } } } ] }; echartsA.setOption(option); } } // 风格切换 $('.tpl-skiner-toggle').on('click', function() { $('.tpl-skiner').toggleClass('active'); }) $('.tpl-skiner-content-bar').find('span').on('click', function() { $('body').attr('class', $(this).attr('data-color')) saveSelectColor.Color = $(this).attr('data-color'); // 保存选择项 storageSave(saveSelectColor); }) // 侧边菜单开关 function autoLeftNav() { $('.tpl-header-switch-button').on('click', function() { if ($('.left-sidebar').is('.active')) { if ($(window).width() > 1024) { $('.tpl-content-wrapper').removeClass('active'); } $('.left-sidebar').removeClass('active'); } else { $('.left-sidebar').addClass('active'); if ($(window).width() > 1024) { $('.tpl-content-wrapper').addClass('active'); } } }) if ($(window).width() < 1024) { $('.left-sidebar').addClass('active'); } else { $('.left-sidebar').removeClass('active'); } } // 侧边菜单 $('.sidebar-nav-sub-title').on('click', function() { $(this).siblings('.sidebar-nav-sub').slideToggle(80) .end() .find('.sidebar-nav-sub-ico').toggleClass('sidebar-nav-sub-ico-rotate'); }) ================================================ FILE: src/main/resources/static/assets/js/calculator.js ================================================ // JavaScript Document document.oncontextmenu=new Function("event.returnValue=false;"); document.onselectstart=new Function("event.returnValue=false;"); var _string=new Array(); var _type; function typetoinput(num) { input=document.getElementById("input-box"); if(input.name=="type") { input.value=" "; input.name=" "; } if(num!="."&&input.value[0]==0&&input.value[1]!=".") { input.value=num; //Reset input num } else if(num=="."&&input.value.indexOf(".")>-1) { input.value=input.value; //Only one point allow input } else if(input.value=="Infinity"||input.value=="NaN") { input.value=""; input.value+=num; //Splicing string } else { input.value+=num; } } function operator(type) { switch (type) { case "clear": input.value="0"; _string.length=0; /*document.getElementById("ccc").innerHTML=""; for(i=0;i<_string.length;i++) { document.getElementById("ccc").innerHTML+=_string[i]+" " }*/ break; case "backspace": if(checknum(input.value)!=0) { input.value=input.value.replace(/.$/,''); if(input.value=="") { input.value="0"; } } break; case "opposite": if(checknum(input.value)!=0) { input.value=-input.value; } break; case "percent": if(checknum(input.value)!=0) { input.value=input.value/100; } break; case "pow": if(checknum(input.value)!=0) { input.value=Math.pow(input.value,2); } break; case "sqrt": if(checknum(input.value)!=0) { input.value=Math.sqrt(input.value); } break; case "plus": if(checknum(input.value)!=0) { _string.push(input.value); _type="plus" input.value="+"; input.name="type"; } break; case "minus": if(checknum(input.value)!=0) { _string.push(input.value); _type="minus" input.value="-"; input.name="type"; } break; case "multiply": if(checknum(input.value)!=0) { _string.push(input.value); _type="multiply" input.value="×"; input.name="type"; } break; case "divide": if(checknum(input.value)!=0) { _string.push(input.value); _type="divide" input.value="÷"; input.name="type"; } break; case "result": if(checknum(input.value)!=0) { _string.push(input.value); if(parseInt(_string.length)%2!=0) { _string.push(_string[_string.length-2]) } if(_type=="plus") { input.value=parseFloat(result(_string)[0])+parseFloat(result(_string)[1]); input.name="type" } else if(_type=="minus") { input.value=parseFloat(result(_string)[0])-parseFloat(result(_string)[1]); input.name="type" } else if(_type=="multiply") { input.value=parseFloat(result(_string)[0])*parseFloat(result(_string)[1]); input.name="type" } else if(_type=="divide") { input.value=parseFloat(result(_string)[0])/parseFloat(result(_string)[1]); input.name="type" } break; } } } function result(value) { var result=new Array; if(value.length%2==0) { result.push((value[value.length-2])); result.push((value[value.length-1])); return (result); } else { result.push((value[value.length-1])) result.push((value[value.length-2])) return (result); } } function checknum(inputvalue) { if(inputvalue=="+"||inputvalue=="-"||inputvalue=="×"||inputvalue=="÷"||input.value=="0") { return 0; } } window.document.onkeydown = disableRefresh; function disableRefresh(evt){ evt = (evt) ? evt : window.event if (evt.keyCode && calculatorIsOpen) { if(evt.keyCode == 13){operator('result')} else if(evt.keyCode == 8){input.focus();window.event.returnValue = false;operator('backspace')} else if(evt.keyCode == 27){operator('clear')} else if(evt.keyCode == 48){typetoinput('0')} else if(evt.keyCode == 49){typetoinput('1')} else if(evt.keyCode == 50){typetoinput('2')} else if(evt.keyCode == 51){typetoinput('3')} else if(evt.keyCode == 52){typetoinput('4')} else if(evt.keyCode == 53){typetoinput('5')} else if(evt.keyCode == 54){typetoinput('6')} else if(evt.keyCode == 55){typetoinput('7')} else if(evt.keyCode == 56){typetoinput('8')} else if(evt.keyCode == 57){typetoinput('9')} else if(evt.keyCode == 96){typetoinput('0')} else if(evt.keyCode == 97){typetoinput('1')} else if(evt.keyCode == 98){typetoinput('2')} else if(evt.keyCode == 99){typetoinput('3')} else if(evt.keyCode == 100){typetoinput('4')} else if(evt.keyCode == 101){typetoinput('5')} else if(evt.keyCode == 102){typetoinput('6')} else if(evt.keyCode == 103){typetoinput('7')} else if(evt.keyCode == 104){typetoinput('8')} else if(evt.keyCode == 105){typetoinput('9')} else if(evt.keyCode == 110){typetoinput('.')} else if(evt.keyCode == 106){operator('multiply')} else if(evt.keyCode == 107){operator('plus')} else if(evt.keyCode == 111){operator('divide')} else if(evt.keyCode == 109){operator('minus')} } } ================================================ FILE: src/main/resources/static/assets/js/moment.js ================================================ //! moment.js //! version : 2.15.1 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! license : MIT //! momentjs.com ;(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : global.moment = factory() }(this, function () { 'use strict'; var hookCallback; function utils_hooks__hooks () { return hookCallback.apply(null, arguments); } // This is done to register the method called with moment() // without creating circular dependencies. function setHookCallback (callback) { hookCallback = callback; } function isArray(input) { return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]'; } function isObject(input) { // IE8 will treat undefined and null as object if it wasn't for // input != null return input != null && Object.prototype.toString.call(input) === '[object Object]'; } function isObjectEmpty(obj) { var k; for (k in obj) { // even if its not own property I'd still call it non-empty return false; } return true; } function isDate(input) { return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]'; } function map(arr, fn) { var res = [], i; for (i = 0; i < arr.length; ++i) { res.push(fn(arr[i], i)); } return res; } function hasOwnProp(a, b) { return Object.prototype.hasOwnProperty.call(a, b); } function extend(a, b) { for (var i in b) { if (hasOwnProp(b, i)) { a[i] = b[i]; } } if (hasOwnProp(b, 'toString')) { a.toString = b.toString; } if (hasOwnProp(b, 'valueOf')) { a.valueOf = b.valueOf; } return a; } function create_utc__createUTC (input, format, locale, strict) { return createLocalOrUTC(input, format, locale, strict, true).utc(); } function defaultParsingFlags() { // We need to deep clone this object. return { empty : false, unusedTokens : [], unusedInput : [], overflow : -2, charsLeftOver : 0, nullInput : false, invalidMonth : null, invalidFormat : false, userInvalidated : false, iso : false, parsedDateParts : [], meridiem : null }; } function getParsingFlags(m) { if (m._pf == null) { m._pf = defaultParsingFlags(); } return m._pf; } var some; if (Array.prototype.some) { some = Array.prototype.some; } else { some = function (fun) { var t = Object(this); var len = t.length >>> 0; for (var i = 0; i < len; i++) { if (i in t && fun.call(this, t[i], i, t)) { return true; } } return false; }; } function valid__isValid(m) { if (m._isValid == null) { var flags = getParsingFlags(m); var parsedParts = some.call(flags.parsedDateParts, function (i) { return i != null; }); var isNowValid = !isNaN(m._d.getTime()) && flags.overflow < 0 && !flags.empty && !flags.invalidMonth && !flags.invalidWeekday && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || (flags.meridiem && parsedParts)); if (m._strict) { isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === undefined; } if (Object.isFrozen == null || !Object.isFrozen(m)) { m._isValid = isNowValid; } else { return isNowValid; } } return m._isValid; } function valid__createInvalid (flags) { var m = create_utc__createUTC(NaN); if (flags != null) { extend(getParsingFlags(m), flags); } else { getParsingFlags(m).userInvalidated = true; } return m; } function isUndefined(input) { return input === void 0; } // Plugins that add properties should also add the key here (null value), // so we can properly clone ourselves. var momentProperties = utils_hooks__hooks.momentProperties = []; function copyConfig(to, from) { var i, prop, val; if (!isUndefined(from._isAMomentObject)) { to._isAMomentObject = from._isAMomentObject; } if (!isUndefined(from._i)) { to._i = from._i; } if (!isUndefined(from._f)) { to._f = from._f; } if (!isUndefined(from._l)) { to._l = from._l; } if (!isUndefined(from._strict)) { to._strict = from._strict; } if (!isUndefined(from._tzm)) { to._tzm = from._tzm; } if (!isUndefined(from._isUTC)) { to._isUTC = from._isUTC; } if (!isUndefined(from._offset)) { to._offset = from._offset; } if (!isUndefined(from._pf)) { to._pf = getParsingFlags(from); } if (!isUndefined(from._locale)) { to._locale = from._locale; } if (momentProperties.length > 0) { for (i in momentProperties) { prop = momentProperties[i]; val = from[prop]; if (!isUndefined(val)) { to[prop] = val; } } } return to; } var updateInProgress = false; // Moment prototype object function Moment(config) { copyConfig(this, config); this._d = new Date(config._d != null ? config._d.getTime() : NaN); // Prevent infinite loop in case updateOffset creates new moment // objects. if (updateInProgress === false) { updateInProgress = true; utils_hooks__hooks.updateOffset(this); updateInProgress = false; } } function isMoment (obj) { return obj instanceof Moment || (obj != null && obj._isAMomentObject != null); } function absFloor (number) { if (number < 0) { // -0 -> 0 return Math.ceil(number) || 0; } else { return Math.floor(number); } } function toInt(argumentForCoercion) { var coercedNumber = +argumentForCoercion, value = 0; if (coercedNumber !== 0 && isFinite(coercedNumber)) { value = absFloor(coercedNumber); } return value; } // compare two arrays, return the number of differences function compareArrays(array1, array2, dontConvert) { var len = Math.min(array1.length, array2.length), lengthDiff = Math.abs(array1.length - array2.length), diffs = 0, i; for (i = 0; i < len; i++) { if ((dontConvert && array1[i] !== array2[i]) || (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) { diffs++; } } return diffs + lengthDiff; } function warn(msg) { if (utils_hooks__hooks.suppressDeprecationWarnings === false && (typeof console !== 'undefined') && console.warn) { console.warn('Deprecation warning: ' + msg); } } function deprecate(msg, fn) { var firstTime = true; return extend(function () { if (utils_hooks__hooks.deprecationHandler != null) { utils_hooks__hooks.deprecationHandler(null, msg); } if (firstTime) { var args = []; var arg; for (var i = 0; i < arguments.length; i++) { arg = ''; if (typeof arguments[i] === 'object') { arg += '\n[' + i + '] '; for (var key in arguments[0]) { arg += key + ': ' + arguments[0][key] + ', '; } arg = arg.slice(0, -2); // Remove trailing comma and space } else { arg = arguments[i]; } args.push(arg); } warn(msg + '\nArguments: ' + Array.prototype.slice.call(args).join('') + '\n' + (new Error()).stack); firstTime = false; } return fn.apply(this, arguments); }, fn); } var deprecations = {}; function deprecateSimple(name, msg) { if (utils_hooks__hooks.deprecationHandler != null) { utils_hooks__hooks.deprecationHandler(name, msg); } if (!deprecations[name]) { warn(msg); deprecations[name] = true; } } utils_hooks__hooks.suppressDeprecationWarnings = false; utils_hooks__hooks.deprecationHandler = null; function isFunction(input) { return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]'; } function locale_set__set (config) { var prop, i; for (i in config) { prop = config[i]; if (isFunction(prop)) { this[i] = prop; } else { this['_' + i] = prop; } } this._config = config; // Lenient ordinal parsing accepts just a number in addition to // number + (possibly) stuff coming from _ordinalParseLenient. this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + (/\d{1,2}/).source); } function mergeConfigs(parentConfig, childConfig) { var res = extend({}, parentConfig), prop; for (prop in childConfig) { if (hasOwnProp(childConfig, prop)) { if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) { res[prop] = {}; extend(res[prop], parentConfig[prop]); extend(res[prop], childConfig[prop]); } else if (childConfig[prop] != null) { res[prop] = childConfig[prop]; } else { delete res[prop]; } } } for (prop in parentConfig) { if (hasOwnProp(parentConfig, prop) && !hasOwnProp(childConfig, prop) && isObject(parentConfig[prop])) { // make sure changes to properties don't modify parent config res[prop] = extend({}, res[prop]); } } return res; } function Locale(config) { if (config != null) { this.set(config); } } var keys; if (Object.keys) { keys = Object.keys; } else { keys = function (obj) { var i, res = []; for (i in obj) { if (hasOwnProp(obj, i)) { res.push(i); } } return res; }; } var defaultCalendar = { sameDay : '[Today at] LT', nextDay : '[Tomorrow at] LT', nextWeek : 'dddd [at] LT', lastDay : '[Yesterday at] LT', lastWeek : '[Last] dddd [at] LT', sameElse : 'L' }; function locale_calendar__calendar (key, mom, now) { var output = this._calendar[key] || this._calendar['sameElse']; return isFunction(output) ? output.call(mom, now) : output; } var defaultLongDateFormat = { LTS : 'h:mm:ss A', LT : 'h:mm A', L : 'MM/DD/YYYY', LL : 'MMMM D, YYYY', LLL : 'MMMM D, YYYY h:mm A', LLLL : 'dddd, MMMM D, YYYY h:mm A' }; function longDateFormat (key) { var format = this._longDateFormat[key], formatUpper = this._longDateFormat[key.toUpperCase()]; if (format || !formatUpper) { return format; } this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) { return val.slice(1); }); return this._longDateFormat[key]; } var defaultInvalidDate = 'Invalid date'; function invalidDate () { return this._invalidDate; } var defaultOrdinal = '%d'; var defaultOrdinalParse = /\d{1,2}/; function ordinal (number) { return this._ordinal.replace('%d', number); } var defaultRelativeTime = { future : 'in %s', past : '%s ago', s : 'a few seconds', m : 'a minute', mm : '%d minutes', h : 'an hour', hh : '%d hours', d : 'a day', dd : '%d days', M : 'a month', MM : '%d months', y : 'a year', yy : '%d years' }; function relative__relativeTime (number, withoutSuffix, string, isFuture) { var output = this._relativeTime[string]; return (isFunction(output)) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number); } function pastFuture (diff, output) { var format = this._relativeTime[diff > 0 ? 'future' : 'past']; return isFunction(format) ? format(output) : format.replace(/%s/i, output); } var aliases = {}; function addUnitAlias (unit, shorthand) { var lowerCase = unit.toLowerCase(); aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit; } function normalizeUnits(units) { return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined; } function normalizeObjectUnits(inputObject) { var normalizedInput = {}, normalizedProp, prop; for (prop in inputObject) { if (hasOwnProp(inputObject, prop)) { normalizedProp = normalizeUnits(prop); if (normalizedProp) { normalizedInput[normalizedProp] = inputObject[prop]; } } } return normalizedInput; } var priorities = {}; function addUnitPriority(unit, priority) { priorities[unit] = priority; } function getPrioritizedUnits(unitsObj) { var units = []; for (var u in unitsObj) { units.push({unit: u, priority: priorities[u]}); } units.sort(function (a, b) { return a.priority - b.priority; }); return units; } function makeGetSet (unit, keepTime) { return function (value) { if (value != null) { get_set__set(this, unit, value); utils_hooks__hooks.updateOffset(this, keepTime); return this; } else { return get_set__get(this, unit); } }; } function get_set__get (mom, unit) { return mom.isValid() ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN; } function get_set__set (mom, unit, value) { if (mom.isValid()) { mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); } } // MOMENTS function stringGet (units) { units = normalizeUnits(units); if (isFunction(this[units])) { return this[units](); } return this; } function stringSet (units, value) { if (typeof units === 'object') { units = normalizeObjectUnits(units); var prioritized = getPrioritizedUnits(units); for (var i = 0; i < prioritized.length; i++) { this[prioritized[i].unit](units[prioritized[i].unit]); } } else { units = normalizeUnits(units); if (isFunction(this[units])) { return this[units](value); } } return this; } function zeroFill(number, targetLength, forceSign) { var absNumber = '' + Math.abs(number), zerosToFill = targetLength - absNumber.length, sign = number >= 0; return (sign ? (forceSign ? '+' : '') : '-') + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber; } var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g; var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g; var formatFunctions = {}; var formatTokenFunctions = {}; // token: 'M' // padded: ['MM', 2] // ordinal: 'Mo' // callback: function () { this.month() + 1 } function addFormatToken (token, padded, ordinal, callback) { var func = callback; if (typeof callback === 'string') { func = function () { return this[callback](); }; } if (token) { formatTokenFunctions[token] = func; } if (padded) { formatTokenFunctions[padded[0]] = function () { return zeroFill(func.apply(this, arguments), padded[1], padded[2]); }; } if (ordinal) { formatTokenFunctions[ordinal] = function () { return this.localeData().ordinal(func.apply(this, arguments), token); }; } } function removeFormattingTokens(input) { if (input.match(/\[[\s\S]/)) { return input.replace(/^\[|\]$/g, ''); } return input.replace(/\\/g, ''); } function makeFormatFunction(format) { var array = format.match(formattingTokens), i, length; for (i = 0, length = array.length; i < length; i++) { if (formatTokenFunctions[array[i]]) { array[i] = formatTokenFunctions[array[i]]; } else { array[i] = removeFormattingTokens(array[i]); } } return function (mom) { var output = '', i; for (i = 0; i < length; i++) { output += array[i] instanceof Function ? array[i].call(mom, format) : array[i]; } return output; }; } // format date using native date object function formatMoment(m, format) { if (!m.isValid()) { return m.localeData().invalidDate(); } format = expandFormat(format, m.localeData()); formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format); return formatFunctions[format](m); } function expandFormat(format, locale) { var i = 5; function replaceLongDateFormatTokens(input) { return locale.longDateFormat(input) || input; } localFormattingTokens.lastIndex = 0; while (i >= 0 && localFormattingTokens.test(format)) { format = format.replace(localFormattingTokens, replaceLongDateFormatTokens); localFormattingTokens.lastIndex = 0; i -= 1; } return format; } var match1 = /\d/; // 0 - 9 var match2 = /\d\d/; // 00 - 99 var match3 = /\d{3}/; // 000 - 999 var match4 = /\d{4}/; // 0000 - 9999 var match6 = /[+-]?\d{6}/; // -999999 - 999999 var match1to2 = /\d\d?/; // 0 - 99 var match3to4 = /\d\d\d\d?/; // 999 - 9999 var match5to6 = /\d\d\d\d\d\d?/; // 99999 - 999999 var match1to3 = /\d{1,3}/; // 0 - 999 var match1to4 = /\d{1,4}/; // 0 - 9999 var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999 var matchUnsigned = /\d+/; // 0 - inf var matchSigned = /[+-]?\d+/; // -inf - inf var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123 // any word (or two) characters or numbers including two/three word month in arabic. // includes scottish gaelic two word and hyphenated months var matchWord = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i; var regexes = {}; function addRegexToken (token, regex, strictRegex) { regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) { return (isStrict && strictRegex) ? strictRegex : regex; }; } function getParseRegexForToken (token, config) { if (!hasOwnProp(regexes, token)) { return new RegExp(unescapeFormat(token)); } return regexes[token](config._strict, config._locale); } // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript function unescapeFormat(s) { return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) { return p1 || p2 || p3 || p4; })); } function regexEscape(s) { return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); } var tokens = {}; function addParseToken (token, callback) { var i, func = callback; if (typeof token === 'string') { token = [token]; } if (typeof callback === 'number') { func = function (input, array) { array[callback] = toInt(input); }; } for (i = 0; i < token.length; i++) { tokens[token[i]] = func; } } function addWeekParseToken (token, callback) { addParseToken(token, function (input, array, config, token) { config._w = config._w || {}; callback(input, config._w, config, token); }); } function addTimeToArrayFromToken(token, input, config) { if (input != null && hasOwnProp(tokens, token)) { tokens[token](input, config._a, config, token); } } var YEAR = 0; var MONTH = 1; var DATE = 2; var HOUR = 3; var MINUTE = 4; var SECOND = 5; var MILLISECOND = 6; var WEEK = 7; var WEEKDAY = 8; var indexOf; if (Array.prototype.indexOf) { indexOf = Array.prototype.indexOf; } else { indexOf = function (o) { // I know var i; for (i = 0; i < this.length; ++i) { if (this[i] === o) { return i; } } return -1; }; } function daysInMonth(year, month) { return new Date(Date.UTC(year, month + 1, 0)).getUTCDate(); } // FORMATTING addFormatToken('M', ['MM', 2], 'Mo', function () { return this.month() + 1; }); addFormatToken('MMM', 0, 0, function (format) { return this.localeData().monthsShort(this, format); }); addFormatToken('MMMM', 0, 0, function (format) { return this.localeData().months(this, format); }); // ALIASES addUnitAlias('month', 'M'); // PRIORITY addUnitPriority('month', 8); // PARSING addRegexToken('M', match1to2); addRegexToken('MM', match1to2, match2); addRegexToken('MMM', function (isStrict, locale) { return locale.monthsShortRegex(isStrict); }); addRegexToken('MMMM', function (isStrict, locale) { return locale.monthsRegex(isStrict); }); addParseToken(['M', 'MM'], function (input, array) { array[MONTH] = toInt(input) - 1; }); addParseToken(['MMM', 'MMMM'], function (input, array, config, token) { var month = config._locale.monthsParse(input, token, config._strict); // if we didn't find a month name, mark the date as invalid. if (month != null) { array[MONTH] = month; } else { getParsingFlags(config).invalidMonth = input; } }); // LOCALES var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/; var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'); function localeMonths (m, format) { if (!m) { return this._months; } return isArray(this._months) ? this._months[m.month()] : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][m.month()]; } var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'); function localeMonthsShort (m, format) { if (!m) { return this._monthsShort; } return isArray(this._monthsShort) ? this._monthsShort[m.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()]; } function units_month__handleStrictParse(monthName, format, strict) { var i, ii, mom, llc = monthName.toLocaleLowerCase(); if (!this._monthsParse) { // this is not used this._monthsParse = []; this._longMonthsParse = []; this._shortMonthsParse = []; for (i = 0; i < 12; ++i) { mom = create_utc__createUTC([2000, i]); this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase(); this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase(); } } if (strict) { if (format === 'MMM') { ii = indexOf.call(this._shortMonthsParse, llc); return ii !== -1 ? ii : null; } else { ii = indexOf.call(this._longMonthsParse, llc); return ii !== -1 ? ii : null; } } else { if (format === 'MMM') { ii = indexOf.call(this._shortMonthsParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._longMonthsParse, llc); return ii !== -1 ? ii : null; } else { ii = indexOf.call(this._longMonthsParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._shortMonthsParse, llc); return ii !== -1 ? ii : null; } } } function localeMonthsParse (monthName, format, strict) { var i, mom, regex; if (this._monthsParseExact) { return units_month__handleStrictParse.call(this, monthName, format, strict); } if (!this._monthsParse) { this._monthsParse = []; this._longMonthsParse = []; this._shortMonthsParse = []; } // TODO: add sorting // Sorting makes sure if one month (or abbr) is a prefix of another // see sorting in computeMonthsParse for (i = 0; i < 12; i++) { // make the regex if we don't have it already mom = create_utc__createUTC([2000, i]); if (strict && !this._longMonthsParse[i]) { this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i'); this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i'); } if (!strict && !this._monthsParse[i]) { regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); } // test the regex if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) { return i; } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) { return i; } else if (!strict && this._monthsParse[i].test(monthName)) { return i; } } } // MOMENTS function setMonth (mom, value) { var dayOfMonth; if (!mom.isValid()) { // No op return mom; } if (typeof value === 'string') { if (/^\d+$/.test(value)) { value = toInt(value); } else { value = mom.localeData().monthsParse(value); // TODO: Another silent failure? if (typeof value !== 'number') { return mom; } } } dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); return mom; } function getSetMonth (value) { if (value != null) { setMonth(this, value); utils_hooks__hooks.updateOffset(this, true); return this; } else { return get_set__get(this, 'Month'); } } function getDaysInMonth () { return daysInMonth(this.year(), this.month()); } var defaultMonthsShortRegex = matchWord; function monthsShortRegex (isStrict) { if (this._monthsParseExact) { if (!hasOwnProp(this, '_monthsRegex')) { computeMonthsParse.call(this); } if (isStrict) { return this._monthsShortStrictRegex; } else { return this._monthsShortRegex; } } else { if (!hasOwnProp(this, '_monthsShortRegex')) { this._monthsShortRegex = defaultMonthsShortRegex; } return this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex; } } var defaultMonthsRegex = matchWord; function monthsRegex (isStrict) { if (this._monthsParseExact) { if (!hasOwnProp(this, '_monthsRegex')) { computeMonthsParse.call(this); } if (isStrict) { return this._monthsStrictRegex; } else { return this._monthsRegex; } } else { if (!hasOwnProp(this, '_monthsRegex')) { this._monthsRegex = defaultMonthsRegex; } return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex; } } function computeMonthsParse () { function cmpLenRev(a, b) { return b.length - a.length; } var shortPieces = [], longPieces = [], mixedPieces = [], i, mom; for (i = 0; i < 12; i++) { // make the regex if we don't have it already mom = create_utc__createUTC([2000, i]); shortPieces.push(this.monthsShort(mom, '')); longPieces.push(this.months(mom, '')); mixedPieces.push(this.months(mom, '')); mixedPieces.push(this.monthsShort(mom, '')); } // Sorting makes sure if one month (or abbr) is a prefix of another it // will match the longer piece. shortPieces.sort(cmpLenRev); longPieces.sort(cmpLenRev); mixedPieces.sort(cmpLenRev); for (i = 0; i < 12; i++) { shortPieces[i] = regexEscape(shortPieces[i]); longPieces[i] = regexEscape(longPieces[i]); } for (i = 0; i < 24; i++) { mixedPieces[i] = regexEscape(mixedPieces[i]); } this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); this._monthsShortRegex = this._monthsRegex; this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); } // FORMATTING addFormatToken('Y', 0, 0, function () { var y = this.year(); return y <= 9999 ? '' + y : '+' + y; }); addFormatToken(0, ['YY', 2], 0, function () { return this.year() % 100; }); addFormatToken(0, ['YYYY', 4], 0, 'year'); addFormatToken(0, ['YYYYY', 5], 0, 'year'); addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); // ALIASES addUnitAlias('year', 'y'); // PRIORITIES addUnitPriority('year', 1); // PARSING addRegexToken('Y', matchSigned); addRegexToken('YY', match1to2, match2); addRegexToken('YYYY', match1to4, match4); addRegexToken('YYYYY', match1to6, match6); addRegexToken('YYYYYY', match1to6, match6); addParseToken(['YYYYY', 'YYYYYY'], YEAR); addParseToken('YYYY', function (input, array) { array[YEAR] = input.length === 2 ? utils_hooks__hooks.parseTwoDigitYear(input) : toInt(input); }); addParseToken('YY', function (input, array) { array[YEAR] = utils_hooks__hooks.parseTwoDigitYear(input); }); addParseToken('Y', function (input, array) { array[YEAR] = parseInt(input, 10); }); // HELPERS function daysInYear(year) { return isLeapYear(year) ? 366 : 365; } function isLeapYear(year) { return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; } // HOOKS utils_hooks__hooks.parseTwoDigitYear = function (input) { return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); }; // MOMENTS var getSetYear = makeGetSet('FullYear', true); function getIsLeapYear () { return isLeapYear(this.year()); } function createDate (y, m, d, h, M, s, ms) { //can't just apply() to create a date: //http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply var date = new Date(y, m, d, h, M, s, ms); //the date constructor remaps years 0-99 to 1900-1999 if (y < 100 && y >= 0 && isFinite(date.getFullYear())) { date.setFullYear(y); } return date; } function createUTCDate (y) { var date = new Date(Date.UTC.apply(null, arguments)); //the Date.UTC function remaps years 0-99 to 1900-1999 if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) { date.setUTCFullYear(y); } return date; } // start-of-first-week - start-of-year function firstWeekOffset(year, dow, doy) { var // first-week day -- which january is always in the first week (4 for iso, 1 for other) fwd = 7 + dow - doy, // first-week day local weekday -- which local weekday is fwd fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; return -fwdlw + fwd - 1; } //http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday function dayOfYearFromWeeks(year, week, weekday, dow, doy) { var localWeekday = (7 + weekday - dow) % 7, weekOffset = firstWeekOffset(year, dow, doy), dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, resYear, resDayOfYear; if (dayOfYear <= 0) { resYear = year - 1; resDayOfYear = daysInYear(resYear) + dayOfYear; } else if (dayOfYear > daysInYear(year)) { resYear = year + 1; resDayOfYear = dayOfYear - daysInYear(year); } else { resYear = year; resDayOfYear = dayOfYear; } return { year: resYear, dayOfYear: resDayOfYear }; } function weekOfYear(mom, dow, doy) { var weekOffset = firstWeekOffset(mom.year(), dow, doy), week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, resWeek, resYear; if (week < 1) { resYear = mom.year() - 1; resWeek = week + weeksInYear(resYear, dow, doy); } else if (week > weeksInYear(mom.year(), dow, doy)) { resWeek = week - weeksInYear(mom.year(), dow, doy); resYear = mom.year() + 1; } else { resYear = mom.year(); resWeek = week; } return { week: resWeek, year: resYear }; } function weeksInYear(year, dow, doy) { var weekOffset = firstWeekOffset(year, dow, doy), weekOffsetNext = firstWeekOffset(year + 1, dow, doy); return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; } // FORMATTING addFormatToken('w', ['ww', 2], 'wo', 'week'); addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); // ALIASES addUnitAlias('week', 'w'); addUnitAlias('isoWeek', 'W'); // PRIORITIES addUnitPriority('week', 5); addUnitPriority('isoWeek', 5); // PARSING addRegexToken('w', match1to2); addRegexToken('ww', match1to2, match2); addRegexToken('W', match1to2); addRegexToken('WW', match1to2, match2); addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) { week[token.substr(0, 1)] = toInt(input); }); // HELPERS // LOCALES function localeWeek (mom) { return weekOfYear(mom, this._week.dow, this._week.doy).week; } var defaultLocaleWeek = { dow : 0, // Sunday is the first day of the week. doy : 6 // The week that contains Jan 1st is the first week of the year. }; function localeFirstDayOfWeek () { return this._week.dow; } function localeFirstDayOfYear () { return this._week.doy; } // MOMENTS function getSetWeek (input) { var week = this.localeData().week(this); return input == null ? week : this.add((input - week) * 7, 'd'); } function getSetISOWeek (input) { var week = weekOfYear(this, 1, 4).week; return input == null ? week : this.add((input - week) * 7, 'd'); } // FORMATTING addFormatToken('d', 0, 'do', 'day'); addFormatToken('dd', 0, 0, function (format) { return this.localeData().weekdaysMin(this, format); }); addFormatToken('ddd', 0, 0, function (format) { return this.localeData().weekdaysShort(this, format); }); addFormatToken('dddd', 0, 0, function (format) { return this.localeData().weekdays(this, format); }); addFormatToken('e', 0, 0, 'weekday'); addFormatToken('E', 0, 0, 'isoWeekday'); // ALIASES addUnitAlias('day', 'd'); addUnitAlias('weekday', 'e'); addUnitAlias('isoWeekday', 'E'); // PRIORITY addUnitPriority('day', 11); addUnitPriority('weekday', 11); addUnitPriority('isoWeekday', 11); // PARSING addRegexToken('d', match1to2); addRegexToken('e', match1to2); addRegexToken('E', match1to2); addRegexToken('dd', function (isStrict, locale) { return locale.weekdaysMinRegex(isStrict); }); addRegexToken('ddd', function (isStrict, locale) { return locale.weekdaysShortRegex(isStrict); }); addRegexToken('dddd', function (isStrict, locale) { return locale.weekdaysRegex(isStrict); }); addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) { var weekday = config._locale.weekdaysParse(input, token, config._strict); // if we didn't get a weekday name, mark the date as invalid if (weekday != null) { week.d = weekday; } else { getParsingFlags(config).invalidWeekday = input; } }); addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { week[token] = toInt(input); }); // HELPERS function parseWeekday(input, locale) { if (typeof input !== 'string') { return input; } if (!isNaN(input)) { return parseInt(input, 10); } input = locale.weekdaysParse(input); if (typeof input === 'number') { return input; } return null; } function parseIsoWeekday(input, locale) { if (typeof input === 'string') { return locale.weekdaysParse(input) % 7 || 7; } return isNaN(input) ? null : input; } // LOCALES var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'); function localeWeekdays (m, format) { if (!m) { return this._weekdays; } return isArray(this._weekdays) ? this._weekdays[m.day()] : this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()]; } var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'); function localeWeekdaysShort (m) { return (m) ? this._weekdaysShort[m.day()] : this._weekdaysShort; } var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'); function localeWeekdaysMin (m) { return (m) ? this._weekdaysMin[m.day()] : this._weekdaysMin; } function day_of_week__handleStrictParse(weekdayName, format, strict) { var i, ii, mom, llc = weekdayName.toLocaleLowerCase(); if (!this._weekdaysParse) { this._weekdaysParse = []; this._shortWeekdaysParse = []; this._minWeekdaysParse = []; for (i = 0; i < 7; ++i) { mom = create_utc__createUTC([2000, 1]).day(i); this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase(); this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase(); this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase(); } } if (strict) { if (format === 'dddd') { ii = indexOf.call(this._weekdaysParse, llc); return ii !== -1 ? ii : null; } else if (format === 'ddd') { ii = indexOf.call(this._shortWeekdaysParse, llc); return ii !== -1 ? ii : null; } else { ii = indexOf.call(this._minWeekdaysParse, llc); return ii !== -1 ? ii : null; } } else { if (format === 'dddd') { ii = indexOf.call(this._weekdaysParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._shortWeekdaysParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._minWeekdaysParse, llc); return ii !== -1 ? ii : null; } else if (format === 'ddd') { ii = indexOf.call(this._shortWeekdaysParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._weekdaysParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._minWeekdaysParse, llc); return ii !== -1 ? ii : null; } else { ii = indexOf.call(this._minWeekdaysParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._weekdaysParse, llc); if (ii !== -1) { return ii; } ii = indexOf.call(this._shortWeekdaysParse, llc); return ii !== -1 ? ii : null; } } } function localeWeekdaysParse (weekdayName, format, strict) { var i, mom, regex; if (this._weekdaysParseExact) { return day_of_week__handleStrictParse.call(this, weekdayName, format, strict); } if (!this._weekdaysParse) { this._weekdaysParse = []; this._minWeekdaysParse = []; this._shortWeekdaysParse = []; this._fullWeekdaysParse = []; } for (i = 0; i < 7; i++) { // make the regex if we don't have it already mom = create_utc__createUTC([2000, 1]).day(i); if (strict && !this._fullWeekdaysParse[i]) { this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\.?') + '$', 'i'); this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\.?') + '$', 'i'); this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\.?') + '$', 'i'); } if (!this._weekdaysParse[i]) { regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); } // test the regex if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) { return i; } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) { return i; } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) { return i; } else if (!strict && this._weekdaysParse[i].test(weekdayName)) { return i; } } } // MOMENTS function getSetDayOfWeek (input) { if (!this.isValid()) { return input != null ? this : NaN; } var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); if (input != null) { input = parseWeekday(input, this.localeData()); return this.add(input - day, 'd'); } else { return day; } } function getSetLocaleDayOfWeek (input) { if (!this.isValid()) { return input != null ? this : NaN; } var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; return input == null ? weekday : this.add(input - weekday, 'd'); } function getSetISODayOfWeek (input) { if (!this.isValid()) { return input != null ? this : NaN; } // behaves the same as moment#day except // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) // as a setter, sunday should belong to the previous week. if (input != null) { var weekday = parseIsoWeekday(input, this.localeData()); return this.day(this.day() % 7 ? weekday : weekday - 7); } else { return this.day() || 7; } } var defaultWeekdaysRegex = matchWord; function weekdaysRegex (isStrict) { if (this._weekdaysParseExact) { if (!hasOwnProp(this, '_weekdaysRegex')) { computeWeekdaysParse.call(this); } if (isStrict) { return this._weekdaysStrictRegex; } else { return this._weekdaysRegex; } } else { if (!hasOwnProp(this, '_weekdaysRegex')) { this._weekdaysRegex = defaultWeekdaysRegex; } return this._weekdaysStrictRegex && isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex; } } var defaultWeekdaysShortRegex = matchWord; function weekdaysShortRegex (isStrict) { if (this._weekdaysParseExact) { if (!hasOwnProp(this, '_weekdaysRegex')) { computeWeekdaysParse.call(this); } if (isStrict) { return this._weekdaysShortStrictRegex; } else { return this._weekdaysShortRegex; } } else { if (!hasOwnProp(this, '_weekdaysShortRegex')) { this._weekdaysShortRegex = defaultWeekdaysShortRegex; } return this._weekdaysShortStrictRegex && isStrict ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex; } } var defaultWeekdaysMinRegex = matchWord; function weekdaysMinRegex (isStrict) { if (this._weekdaysParseExact) { if (!hasOwnProp(this, '_weekdaysRegex')) { computeWeekdaysParse.call(this); } if (isStrict) { return this._weekdaysMinStrictRegex; } else { return this._weekdaysMinRegex; } } else { if (!hasOwnProp(this, '_weekdaysMinRegex')) { this._weekdaysMinRegex = defaultWeekdaysMinRegex; } return this._weekdaysMinStrictRegex && isStrict ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex; } } function computeWeekdaysParse () { function cmpLenRev(a, b) { return b.length - a.length; } var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [], i, mom, minp, shortp, longp; for (i = 0; i < 7; i++) { // make the regex if we don't have it already mom = create_utc__createUTC([2000, 1]).day(i); minp = this.weekdaysMin(mom, ''); shortp = this.weekdaysShort(mom, ''); longp = this.weekdays(mom, ''); minPieces.push(minp); shortPieces.push(shortp); longPieces.push(longp); mixedPieces.push(minp); mixedPieces.push(shortp); mixedPieces.push(longp); } // Sorting makes sure if one weekday (or abbr) is a prefix of another it // will match the longer piece. minPieces.sort(cmpLenRev); shortPieces.sort(cmpLenRev); longPieces.sort(cmpLenRev); mixedPieces.sort(cmpLenRev); for (i = 0; i < 7; i++) { shortPieces[i] = regexEscape(shortPieces[i]); longPieces[i] = regexEscape(longPieces[i]); mixedPieces[i] = regexEscape(mixedPieces[i]); } this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); this._weekdaysShortRegex = this._weekdaysRegex; this._weekdaysMinRegex = this._weekdaysRegex; this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i'); this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'); this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i'); } // FORMATTING function hFormat() { return this.hours() % 12 || 12; } function kFormat() { return this.hours() || 24; } addFormatToken('H', ['HH', 2], 0, 'hour'); addFormatToken('h', ['hh', 2], 0, hFormat); addFormatToken('k', ['kk', 2], 0, kFormat); addFormatToken('hmm', 0, 0, function () { return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); }); addFormatToken('hmmss', 0, 0, function () { return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2); }); addFormatToken('Hmm', 0, 0, function () { return '' + this.hours() + zeroFill(this.minutes(), 2); }); addFormatToken('Hmmss', 0, 0, function () { return '' + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2); }); function meridiem (token, lowercase) { addFormatToken(token, 0, 0, function () { return this.localeData().meridiem(this.hours(), this.minutes(), lowercase); }); } meridiem('a', true); meridiem('A', false); // ALIASES addUnitAlias('hour', 'h'); // PRIORITY addUnitPriority('hour', 13); // PARSING function matchMeridiem (isStrict, locale) { return locale._meridiemParse; } addRegexToken('a', matchMeridiem); addRegexToken('A', matchMeridiem); addRegexToken('H', match1to2); addRegexToken('h', match1to2); addRegexToken('HH', match1to2, match2); addRegexToken('hh', match1to2, match2); addRegexToken('hmm', match3to4); addRegexToken('hmmss', match5to6); addRegexToken('Hmm', match3to4); addRegexToken('Hmmss', match5to6); addParseToken(['H', 'HH'], HOUR); addParseToken(['a', 'A'], function (input, array, config) { config._isPm = config._locale.isPM(input); config._meridiem = input; }); addParseToken(['h', 'hh'], function (input, array, config) { array[HOUR] = toInt(input); getParsingFlags(config).bigHour = true; }); addParseToken('hmm', function (input, array, config) { var pos = input.length - 2; array[HOUR] = toInt(input.substr(0, pos)); array[MINUTE] = toInt(input.substr(pos)); getParsingFlags(config).bigHour = true; }); addParseToken('hmmss', function (input, array, config) { var pos1 = input.length - 4; var pos2 = input.length - 2; array[HOUR] = toInt(input.substr(0, pos1)); array[MINUTE] = toInt(input.substr(pos1, 2)); array[SECOND] = toInt(input.substr(pos2)); getParsingFlags(config).bigHour = true; }); addParseToken('Hmm', function (input, array, config) { var pos = input.length - 2; array[HOUR] = toInt(input.substr(0, pos)); array[MINUTE] = toInt(input.substr(pos)); }); addParseToken('Hmmss', function (input, array, config) { var pos1 = input.length - 4; var pos2 = input.length - 2; array[HOUR] = toInt(input.substr(0, pos1)); array[MINUTE] = toInt(input.substr(pos1, 2)); array[SECOND] = toInt(input.substr(pos2)); }); // LOCALES function localeIsPM (input) { // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays // Using charAt should be more compatible. return ((input + '').toLowerCase().charAt(0) === 'p'); } var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i; function localeMeridiem (hours, minutes, isLower) { if (hours > 11) { return isLower ? 'pm' : 'PM'; } else { return isLower ? 'am' : 'AM'; } } // MOMENTS // Setting the hour should keep the time, because the user explicitly // specified which hour he wants. So trying to maintain the same hour (in // a new timezone) makes sense. Adding/subtracting hours does not follow // this rule. var getSetHour = makeGetSet('Hours', true); var baseConfig = { calendar: defaultCalendar, longDateFormat: defaultLongDateFormat, invalidDate: defaultInvalidDate, ordinal: defaultOrdinal, ordinalParse: defaultOrdinalParse, relativeTime: defaultRelativeTime, months: defaultLocaleMonths, monthsShort: defaultLocaleMonthsShort, week: defaultLocaleWeek, weekdays: defaultLocaleWeekdays, weekdaysMin: defaultLocaleWeekdaysMin, weekdaysShort: defaultLocaleWeekdaysShort, meridiemParse: defaultLocaleMeridiemParse }; // internal storage for locale config files var locales = {}; var globalLocale; function normalizeLocale(key) { return key ? key.toLowerCase().replace('_', '-') : key; } // pick the locale from the array // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root function chooseLocale(names) { var i = 0, j, next, locale, split; while (i < names.length) { split = normalizeLocale(names[i]).split('-'); j = split.length; next = normalizeLocale(names[i + 1]); next = next ? next.split('-') : null; while (j > 0) { locale = loadLocale(split.slice(0, j).join('-')); if (locale) { return locale; } if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) { //the next array item is better than a shallower substring of this one break; } j--; } i++; } return null; } function loadLocale(name) { var oldLocale = null; // TODO: Find a better way to register and load all the locales in Node if (!locales[name] && (typeof module !== 'undefined') && module && module.exports) { try { oldLocale = globalLocale._abbr; require('./locale/' + name); // because defineLocale currently also sets the global locale, we // want to undo that for lazy loaded locales locale_locales__getSetGlobalLocale(oldLocale); } catch (e) { } } return locales[name]; } // This function will load locale and then set the global locale. If // no arguments are passed in, it will simply return the current global // locale key. function locale_locales__getSetGlobalLocale (key, values) { var data; if (key) { if (isUndefined(values)) { data = locale_locales__getLocale(key); } else { data = defineLocale(key, values); } if (data) { // moment.duration._locale = moment._locale = data; globalLocale = data; } } return globalLocale._abbr; } function defineLocale (name, config) { if (config !== null) { var parentConfig = baseConfig; config.abbr = name; if (locales[name] != null) { deprecateSimple('defineLocaleOverride', 'use moment.updateLocale(localeName, config) to change ' + 'an existing locale. moment.defineLocale(localeName, ' + 'config) should only be used for creating a new locale ' + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'); parentConfig = locales[name]._config; } else if (config.parentLocale != null) { if (locales[config.parentLocale] != null) { parentConfig = locales[config.parentLocale]._config; } else { // treat as if there is no base config deprecateSimple('parentLocaleUndefined', 'specified parentLocale is not defined yet. See http://momentjs.com/guides/#/warnings/parent-locale/'); } } locales[name] = new Locale(mergeConfigs(parentConfig, config)); // backwards compat for now: also set the locale locale_locales__getSetGlobalLocale(name); return locales[name]; } else { // useful for testing delete locales[name]; return null; } } function updateLocale(name, config) { if (config != null) { var locale, parentConfig = baseConfig; // MERGE if (locales[name] != null) { parentConfig = locales[name]._config; } config = mergeConfigs(parentConfig, config); locale = new Locale(config); locale.parentLocale = locales[name]; locales[name] = locale; // backwards compat for now: also set the locale locale_locales__getSetGlobalLocale(name); } else { // pass null for config to unupdate, useful for tests if (locales[name] != null) { if (locales[name].parentLocale != null) { locales[name] = locales[name].parentLocale; } else if (locales[name] != null) { delete locales[name]; } } } return locales[name]; } // returns locale data function locale_locales__getLocale (key) { var locale; if (key && key._locale && key._locale._abbr) { key = key._locale._abbr; } if (!key) { return globalLocale; } if (!isArray(key)) { //short-circuit everything else locale = loadLocale(key); if (locale) { return locale; } key = [key]; } return chooseLocale(key); } function locale_locales__listLocales() { return keys(locales); } function checkOverflow (m) { var overflow; var a = m._a; if (a && getParsingFlags(m).overflow === -2) { overflow = a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR : a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : -1; if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { overflow = DATE; } if (getParsingFlags(m)._overflowWeeks && overflow === -1) { overflow = WEEK; } if (getParsingFlags(m)._overflowWeekday && overflow === -1) { overflow = WEEKDAY; } getParsingFlags(m).overflow = overflow; } return m; } // iso 8601 regex // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/; var basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/; var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/; var isoDates = [ ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], ['GGGG-[W]WW', /\d{4}-W\d\d/, false], ['YYYY-DDD', /\d{4}-\d{3}/], ['YYYY-MM', /\d{4}-\d\d/, false], ['YYYYYYMMDD', /[+-]\d{10}/], ['YYYYMMDD', /\d{8}/], // YYYYMM is NOT allowed by the standard ['GGGG[W]WWE', /\d{4}W\d{3}/], ['GGGG[W]WW', /\d{4}W\d{2}/, false], ['YYYYDDD', /\d{7}/] ]; // iso time formats and regexes var isoTimes = [ ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], ['HH:mm:ss', /\d\d:\d\d:\d\d/], ['HH:mm', /\d\d:\d\d/], ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], ['HHmmss', /\d\d\d\d\d\d/], ['HHmm', /\d\d\d\d/], ['HH', /\d\d/] ]; var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i; // date from iso format function configFromISO(config) { var i, l, string = config._i, match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), allowTime, dateFormat, timeFormat, tzFormat; if (match) { getParsingFlags(config).iso = true; for (i = 0, l = isoDates.length; i < l; i++) { if (isoDates[i][1].exec(match[1])) { dateFormat = isoDates[i][0]; allowTime = isoDates[i][2] !== false; break; } } if (dateFormat == null) { config._isValid = false; return; } if (match[3]) { for (i = 0, l = isoTimes.length; i < l; i++) { if (isoTimes[i][1].exec(match[3])) { // match[2] should be 'T' or space timeFormat = (match[2] || ' ') + isoTimes[i][0]; break; } } if (timeFormat == null) { config._isValid = false; return; } } if (!allowTime && timeFormat != null) { config._isValid = false; return; } if (match[4]) { if (tzRegex.exec(match[4])) { tzFormat = 'Z'; } else { config._isValid = false; return; } } config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); configFromStringAndFormat(config); } else { config._isValid = false; } } // date from iso format or fallback function configFromString(config) { var matched = aspNetJsonRegex.exec(config._i); if (matched !== null) { config._d = new Date(+matched[1]); return; } configFromISO(config); if (config._isValid === false) { delete config._isValid; utils_hooks__hooks.createFromInputFallback(config); } } utils_hooks__hooks.createFromInputFallback = deprecate( 'value provided is not in a recognized ISO format. moment construction falls back to js Date(), ' + 'which is not reliable across all browsers and versions. Non ISO date formats are ' + 'discouraged and will be removed in an upcoming major release. Please refer to ' + 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', function (config) { config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); } ); // Pick the first defined of two or three arguments. function defaults(a, b, c) { if (a != null) { return a; } if (b != null) { return b; } return c; } function currentDateArray(config) { // hooks is actually the exported moment object var nowValue = new Date(utils_hooks__hooks.now()); if (config._useUTC) { return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()]; } return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()]; } // convert an array to a date. // the array should mirror the parameters below // note: all values past the year are optional and will default to the lowest possible value. // [year, month, day , hour, minute, second, millisecond] function configFromArray (config) { var i, date, input = [], currentDate, yearToUse; if (config._d) { return; } currentDate = currentDateArray(config); //compute day of the year from weeks and weekdays if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { dayOfYearFromWeekInfo(config); } //if the day of the year is set, figure out what it is if (config._dayOfYear) { yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); if (config._dayOfYear > daysInYear(yearToUse)) { getParsingFlags(config)._overflowDayOfYear = true; } date = createUTCDate(yearToUse, 0, config._dayOfYear); config._a[MONTH] = date.getUTCMonth(); config._a[DATE] = date.getUTCDate(); } // Default to current date. // * if no year, month, day of month are given, default to today // * if day of month is given, default month and year // * if month is given, default only year // * if year is given, don't default anything for (i = 0; i < 3 && config._a[i] == null; ++i) { config._a[i] = input[i] = currentDate[i]; } // Zero out whatever was not defaulted, including time for (; i < 7; i++) { config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i]; } // Check for 24:00:00.000 if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) { config._nextDay = true; config._a[HOUR] = 0; } config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input); // Apply timezone offset from input. The actual utcOffset can be changed // with parseZone. if (config._tzm != null) { config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); } if (config._nextDay) { config._a[HOUR] = 24; } } function dayOfYearFromWeekInfo(config) { var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow; w = config._w; if (w.GG != null || w.W != null || w.E != null) { dow = 1; doy = 4; // TODO: We need to take the current isoWeekYear, but that depends on // how we interpret now (local, utc, fixed offset). So create // a now version of current config (take local/utc/offset flags, and // create now). weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(local__createLocal(), 1, 4).year); week = defaults(w.W, 1); weekday = defaults(w.E, 1); if (weekday < 1 || weekday > 7) { weekdayOverflow = true; } } else { dow = config._locale._week.dow; doy = config._locale._week.doy; weekYear = defaults(w.gg, config._a[YEAR], weekOfYear(local__createLocal(), dow, doy).year); week = defaults(w.w, 1); if (w.d != null) { // weekday -- low day numbers are considered next week weekday = w.d; if (weekday < 0 || weekday > 6) { weekdayOverflow = true; } } else if (w.e != null) { // local weekday -- counting starts from begining of week weekday = w.e + dow; if (w.e < 0 || w.e > 6) { weekdayOverflow = true; } } else { // default to begining of week weekday = dow; } } if (week < 1 || week > weeksInYear(weekYear, dow, doy)) { getParsingFlags(config)._overflowWeeks = true; } else if (weekdayOverflow != null) { getParsingFlags(config)._overflowWeekday = true; } else { temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); config._a[YEAR] = temp.year; config._dayOfYear = temp.dayOfYear; } } // constant that refers to the ISO standard utils_hooks__hooks.ISO_8601 = function () {}; // date from string and format string function configFromStringAndFormat(config) { // TODO: Move this to another part of the creation flow to prevent circular deps if (config._f === utils_hooks__hooks.ISO_8601) { configFromISO(config); return; } config._a = []; getParsingFlags(config).empty = true; // This array is used to make a Date, either with `new Date` or `Date.UTC` var string = '' + config._i, i, parsedInput, tokens, token, skipped, stringLength = string.length, totalParsedInputLength = 0; tokens = expandFormat(config._f, config._locale).match(formattingTokens) || []; for (i = 0; i < tokens.length; i++) { token = tokens[i]; parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]; // console.log('token', token, 'parsedInput', parsedInput, // 'regex', getParseRegexForToken(token, config)); if (parsedInput) { skipped = string.substr(0, string.indexOf(parsedInput)); if (skipped.length > 0) { getParsingFlags(config).unusedInput.push(skipped); } string = string.slice(string.indexOf(parsedInput) + parsedInput.length); totalParsedInputLength += parsedInput.length; } // don't parse if it's not a known token if (formatTokenFunctions[token]) { if (parsedInput) { getParsingFlags(config).empty = false; } else { getParsingFlags(config).unusedTokens.push(token); } addTimeToArrayFromToken(token, parsedInput, config); } else if (config._strict && !parsedInput) { getParsingFlags(config).unusedTokens.push(token); } } // add remaining unparsed input length to the string getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength; if (string.length > 0) { getParsingFlags(config).unusedInput.push(string); } // clear _12h flag if hour is <= 12 if (config._a[HOUR] <= 12 && getParsingFlags(config).bigHour === true && config._a[HOUR] > 0) { getParsingFlags(config).bigHour = undefined; } getParsingFlags(config).parsedDateParts = config._a.slice(0); getParsingFlags(config).meridiem = config._meridiem; // handle meridiem config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem); configFromArray(config); checkOverflow(config); } function meridiemFixWrap (locale, hour, meridiem) { var isPm; if (meridiem == null) { // nothing to do return hour; } if (locale.meridiemHour != null) { return locale.meridiemHour(hour, meridiem); } else if (locale.isPM != null) { // Fallback isPm = locale.isPM(meridiem); if (isPm && hour < 12) { hour += 12; } if (!isPm && hour === 12) { hour = 0; } return hour; } else { // this is not supposed to happen return hour; } } // date from string and array of format strings function configFromStringAndArray(config) { var tempConfig, bestMoment, scoreToBeat, i, currentScore; if (config._f.length === 0) { getParsingFlags(config).invalidFormat = true; config._d = new Date(NaN); return; } for (i = 0; i < config._f.length; i++) { currentScore = 0; tempConfig = copyConfig({}, config); if (config._useUTC != null) { tempConfig._useUTC = config._useUTC; } tempConfig._f = config._f[i]; configFromStringAndFormat(tempConfig); if (!valid__isValid(tempConfig)) { continue; } // if there is any input that was not parsed add a penalty for that format currentScore += getParsingFlags(tempConfig).charsLeftOver; //or tokens currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; getParsingFlags(tempConfig).score = currentScore; if (scoreToBeat == null || currentScore < scoreToBeat) { scoreToBeat = currentScore; bestMoment = tempConfig; } } extend(config, bestMoment || tempConfig); } function configFromObject(config) { if (config._d) { return; } var i = normalizeObjectUnits(config._i); config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) { return obj && parseInt(obj, 10); }); configFromArray(config); } function createFromConfig (config) { var res = new Moment(checkOverflow(prepareConfig(config))); if (res._nextDay) { // Adding is smart enough around DST res.add(1, 'd'); res._nextDay = undefined; } return res; } function prepareConfig (config) { var input = config._i, format = config._f; config._locale = config._locale || locale_locales__getLocale(config._l); if (input === null || (format === undefined && input === '')) { return valid__createInvalid({nullInput: true}); } if (typeof input === 'string') { config._i = input = config._locale.preparse(input); } if (isMoment(input)) { return new Moment(checkOverflow(input)); } else if (isArray(format)) { configFromStringAndArray(config); } else if (isDate(input)) { config._d = input; } else if (format) { configFromStringAndFormat(config); } else { configFromInput(config); } if (!valid__isValid(config)) { config._d = null; } return config; } function configFromInput(config) { var input = config._i; if (input === undefined) { config._d = new Date(utils_hooks__hooks.now()); } else if (isDate(input)) { config._d = new Date(input.valueOf()); } else if (typeof input === 'string') { configFromString(config); } else if (isArray(input)) { config._a = map(input.slice(0), function (obj) { return parseInt(obj, 10); }); configFromArray(config); } else if (typeof(input) === 'object') { configFromObject(config); } else if (typeof(input) === 'number') { // from milliseconds config._d = new Date(input); } else { utils_hooks__hooks.createFromInputFallback(config); } } function createLocalOrUTC (input, format, locale, strict, isUTC) { var c = {}; if (typeof(locale) === 'boolean') { strict = locale; locale = undefined; } if ((isObject(input) && isObjectEmpty(input)) || (isArray(input) && input.length === 0)) { input = undefined; } // object construction must be done this way. // https://github.com/moment/moment/issues/1423 c._isAMomentObject = true; c._useUTC = c._isUTC = isUTC; c._l = locale; c._i = input; c._f = format; c._strict = strict; return createFromConfig(c); } function local__createLocal (input, format, locale, strict) { return createLocalOrUTC(input, format, locale, strict, false); } var prototypeMin = deprecate( 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', function () { var other = local__createLocal.apply(null, arguments); if (this.isValid() && other.isValid()) { return other < this ? this : other; } else { return valid__createInvalid(); } } ); var prototypeMax = deprecate( 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', function () { var other = local__createLocal.apply(null, arguments); if (this.isValid() && other.isValid()) { return other > this ? this : other; } else { return valid__createInvalid(); } } ); // Pick a moment m from moments so that m[fn](other) is true for all // other. This relies on the function fn to be transitive. // // moments should either be an array of moment objects or an array, whose // first element is an array of moment objects. function pickBy(fn, moments) { var res, i; if (moments.length === 1 && isArray(moments[0])) { moments = moments[0]; } if (!moments.length) { return local__createLocal(); } res = moments[0]; for (i = 1; i < moments.length; ++i) { if (!moments[i].isValid() || moments[i][fn](res)) { res = moments[i]; } } return res; } // TODO: Use [].sort instead? function min () { var args = [].slice.call(arguments, 0); return pickBy('isBefore', args); } function max () { var args = [].slice.call(arguments, 0); return pickBy('isAfter', args); } var now = function () { return Date.now ? Date.now() : +(new Date()); }; function Duration (duration) { var normalizedInput = normalizeObjectUnits(duration), years = normalizedInput.year || 0, quarters = normalizedInput.quarter || 0, months = normalizedInput.month || 0, weeks = normalizedInput.week || 0, days = normalizedInput.day || 0, hours = normalizedInput.hour || 0, minutes = normalizedInput.minute || 0, seconds = normalizedInput.second || 0, milliseconds = normalizedInput.millisecond || 0; // representation for dateAddRemove this._milliseconds = +milliseconds + seconds * 1e3 + // 1000 minutes * 6e4 + // 1000 * 60 hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978 // Because of dateAddRemove treats 24 hours as different from a // day when working around DST, we need to store them separately this._days = +days + weeks * 7; // It is impossible translate months into days without knowing // which months you are are talking about, so we have to store // it separately. this._months = +months + quarters * 3 + years * 12; this._data = {}; this._locale = locale_locales__getLocale(); this._bubble(); } function isDuration (obj) { return obj instanceof Duration; } function absRound (number) { if (number < 0) { return Math.round(-1 * number) * -1; } else { return Math.round(number); } } // FORMATTING function offset (token, separator) { addFormatToken(token, 0, 0, function () { var offset = this.utcOffset(); var sign = '+'; if (offset < 0) { offset = -offset; sign = '-'; } return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2); }); } offset('Z', ':'); offset('ZZ', ''); // PARSING addRegexToken('Z', matchShortOffset); addRegexToken('ZZ', matchShortOffset); addParseToken(['Z', 'ZZ'], function (input, array, config) { config._useUTC = true; config._tzm = offsetFromString(matchShortOffset, input); }); // HELPERS // timezone chunker // '+10:00' > ['10', '00'] // '-1530' > ['-15', '30'] var chunkOffset = /([\+\-]|\d\d)/gi; function offsetFromString(matcher, string) { var matches = ((string || '').match(matcher) || []); var chunk = matches[matches.length - 1] || []; var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; var minutes = +(parts[1] * 60) + toInt(parts[2]); return parts[0] === '+' ? minutes : -minutes; } // Return a moment from input, that is local/utc/zone equivalent to model. function cloneWithOffset(input, model) { var res, diff; if (model._isUTC) { res = model.clone(); diff = (isMoment(input) || isDate(input) ? input.valueOf() : local__createLocal(input).valueOf()) - res.valueOf(); // Use low-level api, because this fn is low-level api. res._d.setTime(res._d.valueOf() + diff); utils_hooks__hooks.updateOffset(res, false); return res; } else { return local__createLocal(input).local(); } } function getDateOffset (m) { // On Firefox.24 Date#getTimezoneOffset returns a floating point. // https://github.com/moment/moment/pull/1871 return -Math.round(m._d.getTimezoneOffset() / 15) * 15; } // HOOKS // This function will be called whenever a moment is mutated. // It is intended to keep the offset in sync with the timezone. utils_hooks__hooks.updateOffset = function () {}; // MOMENTS // keepLocalTime = true means only change the timezone, without // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset // +0200, so we adjust the time as needed, to be valid. // // Keeping the time actually adds/subtracts (one hour) // from the actual represented time. That is why we call updateOffset // a second time. In case it wants us to change the offset again // _changeInProgress == true case, then we have to adjust, because // there is no such time in the given timezone. function getSetOffset (input, keepLocalTime) { var offset = this._offset || 0, localAdjust; if (!this.isValid()) { return input != null ? this : NaN; } if (input != null) { if (typeof input === 'string') { input = offsetFromString(matchShortOffset, input); } else if (Math.abs(input) < 16) { input = input * 60; } if (!this._isUTC && keepLocalTime) { localAdjust = getDateOffset(this); } this._offset = input; this._isUTC = true; if (localAdjust != null) { this.add(localAdjust, 'm'); } if (offset !== input) { if (!keepLocalTime || this._changeInProgress) { add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false); } else if (!this._changeInProgress) { this._changeInProgress = true; utils_hooks__hooks.updateOffset(this, true); this._changeInProgress = null; } } return this; } else { return this._isUTC ? offset : getDateOffset(this); } } function getSetZone (input, keepLocalTime) { if (input != null) { if (typeof input !== 'string') { input = -input; } this.utcOffset(input, keepLocalTime); return this; } else { return -this.utcOffset(); } } function setOffsetToUTC (keepLocalTime) { return this.utcOffset(0, keepLocalTime); } function setOffsetToLocal (keepLocalTime) { if (this._isUTC) { this.utcOffset(0, keepLocalTime); this._isUTC = false; if (keepLocalTime) { this.subtract(getDateOffset(this), 'm'); } } return this; } function setOffsetToParsedOffset () { if (this._tzm) { this.utcOffset(this._tzm); } else if (typeof this._i === 'string') { var tZone = offsetFromString(matchOffset, this._i); if (tZone === 0) { this.utcOffset(0, true); } else { this.utcOffset(offsetFromString(matchOffset, this._i)); } } return this; } function hasAlignedHourOffset (input) { if (!this.isValid()) { return false; } input = input ? local__createLocal(input).utcOffset() : 0; return (this.utcOffset() - input) % 60 === 0; } function isDaylightSavingTime () { return ( this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset() ); } function isDaylightSavingTimeShifted () { if (!isUndefined(this._isDSTShifted)) { return this._isDSTShifted; } var c = {}; copyConfig(c, this); c = prepareConfig(c); if (c._a) { var other = c._isUTC ? create_utc__createUTC(c._a) : local__createLocal(c._a); this._isDSTShifted = this.isValid() && compareArrays(c._a, other.toArray()) > 0; } else { this._isDSTShifted = false; } return this._isDSTShifted; } function isLocal () { return this.isValid() ? !this._isUTC : false; } function isUtcOffset () { return this.isValid() ? this._isUTC : false; } function isUtc () { return this.isValid() ? this._isUTC && this._offset === 0 : false; } // ASP.NET json date format regex var aspNetRegex = /^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/; // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere // and further modified to allow for strings containing both week and day var isoRegex = /^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/; function create__createDuration (input, key) { var duration = input, // matching against regexp is expensive, do it on demand match = null, sign, ret, diffRes; if (isDuration(input)) { duration = { ms : input._milliseconds, d : input._days, M : input._months }; } else if (typeof input === 'number') { duration = {}; if (key) { duration[key] = input; } else { duration.milliseconds = input; } } else if (!!(match = aspNetRegex.exec(input))) { sign = (match[1] === '-') ? -1 : 1; duration = { y : 0, d : toInt(match[DATE]) * sign, h : toInt(match[HOUR]) * sign, m : toInt(match[MINUTE]) * sign, s : toInt(match[SECOND]) * sign, ms : toInt(absRound(match[MILLISECOND] * 1000)) * sign // the millisecond decimal point is included in the match }; } else if (!!(match = isoRegex.exec(input))) { sign = (match[1] === '-') ? -1 : 1; duration = { y : parseIso(match[2], sign), M : parseIso(match[3], sign), w : parseIso(match[4], sign), d : parseIso(match[5], sign), h : parseIso(match[6], sign), m : parseIso(match[7], sign), s : parseIso(match[8], sign) }; } else if (duration == null) {// checks for null or undefined duration = {}; } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) { diffRes = momentsDifference(local__createLocal(duration.from), local__createLocal(duration.to)); duration = {}; duration.ms = diffRes.milliseconds; duration.M = diffRes.months; } ret = new Duration(duration); if (isDuration(input) && hasOwnProp(input, '_locale')) { ret._locale = input._locale; } return ret; } create__createDuration.fn = Duration.prototype; function parseIso (inp, sign) { // We'd normally use ~~inp for this, but unfortunately it also // converts floats to ints. // inp may be undefined, so careful calling replace on it. var res = inp && parseFloat(inp.replace(',', '.')); // apply sign while we're at it return (isNaN(res) ? 0 : res) * sign; } function positiveMomentsDifference(base, other) { var res = {milliseconds: 0, months: 0}; res.months = other.month() - base.month() + (other.year() - base.year()) * 12; if (base.clone().add(res.months, 'M').isAfter(other)) { --res.months; } res.milliseconds = +other - +(base.clone().add(res.months, 'M')); return res; } function momentsDifference(base, other) { var res; if (!(base.isValid() && other.isValid())) { return {milliseconds: 0, months: 0}; } other = cloneWithOffset(other, base); if (base.isBefore(other)) { res = positiveMomentsDifference(base, other); } else { res = positiveMomentsDifference(other, base); res.milliseconds = -res.milliseconds; res.months = -res.months; } return res; } // TODO: remove 'name' arg after deprecation is removed function createAdder(direction, name) { return function (val, period) { var dur, tmp; //invert the arguments, but complain about it if (period !== null && !isNaN(+period)) { deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period). ' + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'); tmp = val; val = period; period = tmp; } val = typeof val === 'string' ? +val : val; dur = create__createDuration(val, period); add_subtract__addSubtract(this, dur, direction); return this; }; } function add_subtract__addSubtract (mom, duration, isAdding, updateOffset) { var milliseconds = duration._milliseconds, days = absRound(duration._days), months = absRound(duration._months); if (!mom.isValid()) { // No op return; } updateOffset = updateOffset == null ? true : updateOffset; if (milliseconds) { mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding); } if (days) { get_set__set(mom, 'Date', get_set__get(mom, 'Date') + days * isAdding); } if (months) { setMonth(mom, get_set__get(mom, 'Month') + months * isAdding); } if (updateOffset) { utils_hooks__hooks.updateOffset(mom, days || months); } } var add_subtract__add = createAdder(1, 'add'); var add_subtract__subtract = createAdder(-1, 'subtract'); function getCalendarFormat(myMoment, now) { var diff = myMoment.diff(now, 'days', true); return diff < -6 ? 'sameElse' : diff < -1 ? 'lastWeek' : diff < 0 ? 'lastDay' : diff < 1 ? 'sameDay' : diff < 2 ? 'nextDay' : diff < 7 ? 'nextWeek' : 'sameElse'; } function moment_calendar__calendar (time, formats) { // We want to compare the start of today, vs this. // Getting start-of-today depends on whether we're local/utc/offset or not. var now = time || local__createLocal(), sod = cloneWithOffset(now, this).startOf('day'), format = utils_hooks__hooks.calendarFormat(this, sod) || 'sameElse'; var output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format]); return this.format(output || this.localeData().calendar(format, this, local__createLocal(now))); } function clone () { return new Moment(this); } function isAfter (input, units) { var localInput = isMoment(input) ? input : local__createLocal(input); if (!(this.isValid() && localInput.isValid())) { return false; } units = normalizeUnits(!isUndefined(units) ? units : 'millisecond'); if (units === 'millisecond') { return this.valueOf() > localInput.valueOf(); } else { return localInput.valueOf() < this.clone().startOf(units).valueOf(); } } function isBefore (input, units) { var localInput = isMoment(input) ? input : local__createLocal(input); if (!(this.isValid() && localInput.isValid())) { return false; } units = normalizeUnits(!isUndefined(units) ? units : 'millisecond'); if (units === 'millisecond') { return this.valueOf() < localInput.valueOf(); } else { return this.clone().endOf(units).valueOf() < localInput.valueOf(); } } function isBetween (from, to, units, inclusivity) { inclusivity = inclusivity || '()'; return (inclusivity[0] === '(' ? this.isAfter(from, units) : !this.isBefore(from, units)) && (inclusivity[1] === ')' ? this.isBefore(to, units) : !this.isAfter(to, units)); } function isSame (input, units) { var localInput = isMoment(input) ? input : local__createLocal(input), inputMs; if (!(this.isValid() && localInput.isValid())) { return false; } units = normalizeUnits(units || 'millisecond'); if (units === 'millisecond') { return this.valueOf() === localInput.valueOf(); } else { inputMs = localInput.valueOf(); return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf(); } } function isSameOrAfter (input, units) { return this.isSame(input, units) || this.isAfter(input,units); } function isSameOrBefore (input, units) { return this.isSame(input, units) || this.isBefore(input,units); } function diff (input, units, asFloat) { var that, zoneDelta, delta, output; if (!this.isValid()) { return NaN; } that = cloneWithOffset(input, this); if (!that.isValid()) { return NaN; } zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4; units = normalizeUnits(units); if (units === 'year' || units === 'month' || units === 'quarter') { output = monthDiff(this, that); if (units === 'quarter') { output = output / 3; } else if (units === 'year') { output = output / 12; } } else { delta = this - that; output = units === 'second' ? delta / 1e3 : // 1000 units === 'minute' ? delta / 6e4 : // 1000 * 60 units === 'hour' ? delta / 36e5 : // 1000 * 60 * 60 units === 'day' ? (delta - zoneDelta) / 864e5 : // 1000 * 60 * 60 * 24, negate dst units === 'week' ? (delta - zoneDelta) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst delta; } return asFloat ? output : absFloor(output); } function monthDiff (a, b) { // difference in months var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()), // b is in (anchor - 1 month, anchor + 1 month) anchor = a.clone().add(wholeMonthDiff, 'months'), anchor2, adjust; if (b - anchor < 0) { anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); // linear across the month adjust = (b - anchor) / (anchor - anchor2); } else { anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); // linear across the month adjust = (b - anchor) / (anchor2 - anchor); } //check for negative zero, return zero if negative zero return -(wholeMonthDiff + adjust) || 0; } utils_hooks__hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; utils_hooks__hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]'; function toString () { return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); } function moment_format__toISOString () { var m = this.clone().utc(); if (0 < m.year() && m.year() <= 9999) { if (isFunction(Date.prototype.toISOString)) { // native implementation is ~50x faster, use it when we can return this.toDate().toISOString(); } else { return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); } } else { return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); } } function format (inputString) { if (!inputString) { inputString = this.isUtc() ? utils_hooks__hooks.defaultFormatUtc : utils_hooks__hooks.defaultFormat; } var output = formatMoment(this, inputString); return this.localeData().postformat(output); } function from (time, withoutSuffix) { if (this.isValid() && ((isMoment(time) && time.isValid()) || local__createLocal(time).isValid())) { return create__createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix); } else { return this.localeData().invalidDate(); } } function fromNow (withoutSuffix) { return this.from(local__createLocal(), withoutSuffix); } function to (time, withoutSuffix) { if (this.isValid() && ((isMoment(time) && time.isValid()) || local__createLocal(time).isValid())) { return create__createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix); } else { return this.localeData().invalidDate(); } } function toNow (withoutSuffix) { return this.to(local__createLocal(), withoutSuffix); } // If passed a locale key, it will set the locale for this // instance. Otherwise, it will return the locale configuration // variables for this instance. function locale (key) { var newLocaleData; if (key === undefined) { return this._locale._abbr; } else { newLocaleData = locale_locales__getLocale(key); if (newLocaleData != null) { this._locale = newLocaleData; } return this; } } var lang = deprecate( 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', function (key) { if (key === undefined) { return this.localeData(); } else { return this.locale(key); } } ); function localeData () { return this._locale; } function startOf (units) { units = normalizeUnits(units); // the following switch intentionally omits break keywords // to utilize falling through the cases. switch (units) { case 'year': this.month(0); /* falls through */ case 'quarter': case 'month': this.date(1); /* falls through */ case 'week': case 'isoWeek': case 'day': case 'date': this.hours(0); /* falls through */ case 'hour': this.minutes(0); /* falls through */ case 'minute': this.seconds(0); /* falls through */ case 'second': this.milliseconds(0); } // weeks are a special case if (units === 'week') { this.weekday(0); } if (units === 'isoWeek') { this.isoWeekday(1); } // quarters are also special if (units === 'quarter') { this.month(Math.floor(this.month() / 3) * 3); } return this; } function endOf (units) { units = normalizeUnits(units); if (units === undefined || units === 'millisecond') { return this; } // 'date' is an alias for 'day', so it should be considered as such. if (units === 'date') { units = 'day'; } return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms'); } function to_type__valueOf () { return this._d.valueOf() - ((this._offset || 0) * 60000); } function unix () { return Math.floor(this.valueOf() / 1000); } function toDate () { return new Date(this.valueOf()); } function toArray () { var m = this; return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()]; } function toObject () { var m = this; return { years: m.year(), months: m.month(), date: m.date(), hours: m.hours(), minutes: m.minutes(), seconds: m.seconds(), milliseconds: m.milliseconds() }; } function toJSON () { // new Date(NaN).toJSON() === null return this.isValid() ? this.toISOString() : null; } function moment_valid__isValid () { return valid__isValid(this); } function parsingFlags () { return extend({}, getParsingFlags(this)); } function invalidAt () { return getParsingFlags(this).overflow; } function creationData() { return { input: this._i, format: this._f, locale: this._locale, isUTC: this._isUTC, strict: this._strict }; } // FORMATTING addFormatToken(0, ['gg', 2], 0, function () { return this.weekYear() % 100; }); addFormatToken(0, ['GG', 2], 0, function () { return this.isoWeekYear() % 100; }); function addWeekYearFormatToken (token, getter) { addFormatToken(0, [token, token.length], 0, getter); } addWeekYearFormatToken('gggg', 'weekYear'); addWeekYearFormatToken('ggggg', 'weekYear'); addWeekYearFormatToken('GGGG', 'isoWeekYear'); addWeekYearFormatToken('GGGGG', 'isoWeekYear'); // ALIASES addUnitAlias('weekYear', 'gg'); addUnitAlias('isoWeekYear', 'GG'); // PRIORITY addUnitPriority('weekYear', 1); addUnitPriority('isoWeekYear', 1); // PARSING addRegexToken('G', matchSigned); addRegexToken('g', matchSigned); addRegexToken('GG', match1to2, match2); addRegexToken('gg', match1to2, match2); addRegexToken('GGGG', match1to4, match4); addRegexToken('gggg', match1to4, match4); addRegexToken('GGGGG', match1to6, match6); addRegexToken('ggggg', match1to6, match6); addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) { week[token.substr(0, 2)] = toInt(input); }); addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { week[token] = utils_hooks__hooks.parseTwoDigitYear(input); }); // MOMENTS function getSetWeekYear (input) { return getSetWeekYearHelper.call(this, input, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy); } function getSetISOWeekYear (input) { return getSetWeekYearHelper.call(this, input, this.isoWeek(), this.isoWeekday(), 1, 4); } function getISOWeeksInYear () { return weeksInYear(this.year(), 1, 4); } function getWeeksInYear () { var weekInfo = this.localeData()._week; return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); } function getSetWeekYearHelper(input, week, weekday, dow, doy) { var weeksTarget; if (input == null) { return weekOfYear(this, dow, doy).year; } else { weeksTarget = weeksInYear(input, dow, doy); if (week > weeksTarget) { week = weeksTarget; } return setWeekAll.call(this, input, week, weekday, dow, doy); } } function setWeekAll(weekYear, week, weekday, dow, doy) { var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); this.year(date.getUTCFullYear()); this.month(date.getUTCMonth()); this.date(date.getUTCDate()); return this; } // FORMATTING addFormatToken('Q', 0, 'Qo', 'quarter'); // ALIASES addUnitAlias('quarter', 'Q'); // PRIORITY addUnitPriority('quarter', 7); // PARSING addRegexToken('Q', match1); addParseToken('Q', function (input, array) { array[MONTH] = (toInt(input) - 1) * 3; }); // MOMENTS function getSetQuarter (input) { return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3); } // FORMATTING addFormatToken('D', ['DD', 2], 'Do', 'date'); // ALIASES addUnitAlias('date', 'D'); // PRIOROITY addUnitPriority('date', 9); // PARSING addRegexToken('D', match1to2); addRegexToken('DD', match1to2, match2); addRegexToken('Do', function (isStrict, locale) { return isStrict ? locale._ordinalParse : locale._ordinalParseLenient; }); addParseToken(['D', 'DD'], DATE); addParseToken('Do', function (input, array) { array[DATE] = toInt(input.match(match1to2)[0], 10); }); // MOMENTS var getSetDayOfMonth = makeGetSet('Date', true); // FORMATTING addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); // ALIASES addUnitAlias('dayOfYear', 'DDD'); // PRIORITY addUnitPriority('dayOfYear', 4); // PARSING addRegexToken('DDD', match1to3); addRegexToken('DDDD', match3); addParseToken(['DDD', 'DDDD'], function (input, array, config) { config._dayOfYear = toInt(input); }); // HELPERS // MOMENTS function getSetDayOfYear (input) { var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1; return input == null ? dayOfYear : this.add((input - dayOfYear), 'd'); } // FORMATTING addFormatToken('m', ['mm', 2], 0, 'minute'); // ALIASES addUnitAlias('minute', 'm'); // PRIORITY addUnitPriority('minute', 14); // PARSING addRegexToken('m', match1to2); addRegexToken('mm', match1to2, match2); addParseToken(['m', 'mm'], MINUTE); // MOMENTS var getSetMinute = makeGetSet('Minutes', false); // FORMATTING addFormatToken('s', ['ss', 2], 0, 'second'); // ALIASES addUnitAlias('second', 's'); // PRIORITY addUnitPriority('second', 15); // PARSING addRegexToken('s', match1to2); addRegexToken('ss', match1to2, match2); addParseToken(['s', 'ss'], SECOND); // MOMENTS var getSetSecond = makeGetSet('Seconds', false); // FORMATTING addFormatToken('S', 0, 0, function () { return ~~(this.millisecond() / 100); }); addFormatToken(0, ['SS', 2], 0, function () { return ~~(this.millisecond() / 10); }); addFormatToken(0, ['SSS', 3], 0, 'millisecond'); addFormatToken(0, ['SSSS', 4], 0, function () { return this.millisecond() * 10; }); addFormatToken(0, ['SSSSS', 5], 0, function () { return this.millisecond() * 100; }); addFormatToken(0, ['SSSSSS', 6], 0, function () { return this.millisecond() * 1000; }); addFormatToken(0, ['SSSSSSS', 7], 0, function () { return this.millisecond() * 10000; }); addFormatToken(0, ['SSSSSSSS', 8], 0, function () { return this.millisecond() * 100000; }); addFormatToken(0, ['SSSSSSSSS', 9], 0, function () { return this.millisecond() * 1000000; }); // ALIASES addUnitAlias('millisecond', 'ms'); // PRIORITY addUnitPriority('millisecond', 16); // PARSING addRegexToken('S', match1to3, match1); addRegexToken('SS', match1to3, match2); addRegexToken('SSS', match1to3, match3); var token; for (token = 'SSSS'; token.length <= 9; token += 'S') { addRegexToken(token, matchUnsigned); } function parseMs(input, array) { array[MILLISECOND] = toInt(('0.' + input) * 1000); } for (token = 'S'; token.length <= 9; token += 'S') { addParseToken(token, parseMs); } // MOMENTS var getSetMillisecond = makeGetSet('Milliseconds', false); // FORMATTING addFormatToken('z', 0, 0, 'zoneAbbr'); addFormatToken('zz', 0, 0, 'zoneName'); // MOMENTS function getZoneAbbr () { return this._isUTC ? 'UTC' : ''; } function getZoneName () { return this._isUTC ? 'Coordinated Universal Time' : ''; } var momentPrototype__proto = Moment.prototype; momentPrototype__proto.add = add_subtract__add; momentPrototype__proto.calendar = moment_calendar__calendar; momentPrototype__proto.clone = clone; momentPrototype__proto.diff = diff; momentPrototype__proto.endOf = endOf; momentPrototype__proto.format = format; momentPrototype__proto.from = from; momentPrototype__proto.fromNow = fromNow; momentPrototype__proto.to = to; momentPrototype__proto.toNow = toNow; momentPrototype__proto.get = stringGet; momentPrototype__proto.invalidAt = invalidAt; momentPrototype__proto.isAfter = isAfter; momentPrototype__proto.isBefore = isBefore; momentPrototype__proto.isBetween = isBetween; momentPrototype__proto.isSame = isSame; momentPrototype__proto.isSameOrAfter = isSameOrAfter; momentPrototype__proto.isSameOrBefore = isSameOrBefore; momentPrototype__proto.isValid = moment_valid__isValid; momentPrototype__proto.lang = lang; momentPrototype__proto.locale = locale; momentPrototype__proto.localeData = localeData; momentPrototype__proto.max = prototypeMax; momentPrototype__proto.min = prototypeMin; momentPrototype__proto.parsingFlags = parsingFlags; momentPrototype__proto.set = stringSet; momentPrototype__proto.startOf = startOf; momentPrototype__proto.subtract = add_subtract__subtract; momentPrototype__proto.toArray = toArray; momentPrototype__proto.toObject = toObject; momentPrototype__proto.toDate = toDate; momentPrototype__proto.toISOString = moment_format__toISOString; momentPrototype__proto.toJSON = toJSON; momentPrototype__proto.toString = toString; momentPrototype__proto.unix = unix; momentPrototype__proto.valueOf = to_type__valueOf; momentPrototype__proto.creationData = creationData; // Year momentPrototype__proto.year = getSetYear; momentPrototype__proto.isLeapYear = getIsLeapYear; // Week Year momentPrototype__proto.weekYear = getSetWeekYear; momentPrototype__proto.isoWeekYear = getSetISOWeekYear; // Quarter momentPrototype__proto.quarter = momentPrototype__proto.quarters = getSetQuarter; // Month momentPrototype__proto.month = getSetMonth; momentPrototype__proto.daysInMonth = getDaysInMonth; // Week momentPrototype__proto.week = momentPrototype__proto.weeks = getSetWeek; momentPrototype__proto.isoWeek = momentPrototype__proto.isoWeeks = getSetISOWeek; momentPrototype__proto.weeksInYear = getWeeksInYear; momentPrototype__proto.isoWeeksInYear = getISOWeeksInYear; // Day momentPrototype__proto.date = getSetDayOfMonth; momentPrototype__proto.day = momentPrototype__proto.days = getSetDayOfWeek; momentPrototype__proto.weekday = getSetLocaleDayOfWeek; momentPrototype__proto.isoWeekday = getSetISODayOfWeek; momentPrototype__proto.dayOfYear = getSetDayOfYear; // Hour momentPrototype__proto.hour = momentPrototype__proto.hours = getSetHour; // Minute momentPrototype__proto.minute = momentPrototype__proto.minutes = getSetMinute; // Second momentPrototype__proto.second = momentPrototype__proto.seconds = getSetSecond; // Millisecond momentPrototype__proto.millisecond = momentPrototype__proto.milliseconds = getSetMillisecond; // Offset momentPrototype__proto.utcOffset = getSetOffset; momentPrototype__proto.utc = setOffsetToUTC; momentPrototype__proto.local = setOffsetToLocal; momentPrototype__proto.parseZone = setOffsetToParsedOffset; momentPrototype__proto.hasAlignedHourOffset = hasAlignedHourOffset; momentPrototype__proto.isDST = isDaylightSavingTime; momentPrototype__proto.isLocal = isLocal; momentPrototype__proto.isUtcOffset = isUtcOffset; momentPrototype__proto.isUtc = isUtc; momentPrototype__proto.isUTC = isUtc; // Timezone momentPrototype__proto.zoneAbbr = getZoneAbbr; momentPrototype__proto.zoneName = getZoneName; // Deprecations momentPrototype__proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth); momentPrototype__proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth); momentPrototype__proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear); momentPrototype__proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', getSetZone); momentPrototype__proto.isDSTShifted = deprecate('isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', isDaylightSavingTimeShifted); var momentPrototype = momentPrototype__proto; function moment__createUnix (input) { return local__createLocal(input * 1000); } function moment__createInZone () { return local__createLocal.apply(null, arguments).parseZone(); } function preParsePostFormat (string) { return string; } var prototype__proto = Locale.prototype; prototype__proto.calendar = locale_calendar__calendar; prototype__proto.longDateFormat = longDateFormat; prototype__proto.invalidDate = invalidDate; prototype__proto.ordinal = ordinal; prototype__proto.preparse = preParsePostFormat; prototype__proto.postformat = preParsePostFormat; prototype__proto.relativeTime = relative__relativeTime; prototype__proto.pastFuture = pastFuture; prototype__proto.set = locale_set__set; // Month prototype__proto.months = localeMonths; prototype__proto.monthsShort = localeMonthsShort; prototype__proto.monthsParse = localeMonthsParse; prototype__proto.monthsRegex = monthsRegex; prototype__proto.monthsShortRegex = monthsShortRegex; // Week prototype__proto.week = localeWeek; prototype__proto.firstDayOfYear = localeFirstDayOfYear; prototype__proto.firstDayOfWeek = localeFirstDayOfWeek; // Day of Week prototype__proto.weekdays = localeWeekdays; prototype__proto.weekdaysMin = localeWeekdaysMin; prototype__proto.weekdaysShort = localeWeekdaysShort; prototype__proto.weekdaysParse = localeWeekdaysParse; prototype__proto.weekdaysRegex = weekdaysRegex; prototype__proto.weekdaysShortRegex = weekdaysShortRegex; prototype__proto.weekdaysMinRegex = weekdaysMinRegex; // Hours prototype__proto.isPM = localeIsPM; prototype__proto.meridiem = localeMeridiem; function lists__get (format, index, field, setter) { var locale = locale_locales__getLocale(); var utc = create_utc__createUTC().set(setter, index); return locale[field](utc, format); } function listMonthsImpl (format, index, field) { if (typeof format === 'number') { index = format; format = undefined; } format = format || ''; if (index != null) { return lists__get(format, index, field, 'month'); } var i; var out = []; for (i = 0; i < 12; i++) { out[i] = lists__get(format, i, field, 'month'); } return out; } // () // (5) // (fmt, 5) // (fmt) // (true) // (true, 5) // (true, fmt, 5) // (true, fmt) function listWeekdaysImpl (localeSorted, format, index, field) { if (typeof localeSorted === 'boolean') { if (typeof format === 'number') { index = format; format = undefined; } format = format || ''; } else { format = localeSorted; index = format; localeSorted = false; if (typeof format === 'number') { index = format; format = undefined; } format = format || ''; } var locale = locale_locales__getLocale(), shift = localeSorted ? locale._week.dow : 0; if (index != null) { return lists__get(format, (index + shift) % 7, field, 'day'); } var i; var out = []; for (i = 0; i < 7; i++) { out[i] = lists__get(format, (i + shift) % 7, field, 'day'); } return out; } function lists__listMonths (format, index) { return listMonthsImpl(format, index, 'months'); } function lists__listMonthsShort (format, index) { return listMonthsImpl(format, index, 'monthsShort'); } function lists__listWeekdays (localeSorted, format, index) { return listWeekdaysImpl(localeSorted, format, index, 'weekdays'); } function lists__listWeekdaysShort (localeSorted, format, index) { return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort'); } function lists__listWeekdaysMin (localeSorted, format, index) { return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin'); } locale_locales__getSetGlobalLocale('en', { ordinalParse: /\d{1,2}(th|st|nd|rd)/, ordinal : function (number) { var b = number % 10, output = (toInt(number % 100 / 10) === 1) ? 'th' : (b === 1) ? 'st' : (b === 2) ? 'nd' : (b === 3) ? 'rd' : 'th'; return number + output; } }); // Side effect imports utils_hooks__hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', locale_locales__getSetGlobalLocale); utils_hooks__hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', locale_locales__getLocale); var mathAbs = Math.abs; function duration_abs__abs () { var data = this._data; this._milliseconds = mathAbs(this._milliseconds); this._days = mathAbs(this._days); this._months = mathAbs(this._months); data.milliseconds = mathAbs(data.milliseconds); data.seconds = mathAbs(data.seconds); data.minutes = mathAbs(data.minutes); data.hours = mathAbs(data.hours); data.months = mathAbs(data.months); data.years = mathAbs(data.years); return this; } function duration_add_subtract__addSubtract (duration, input, value, direction) { var other = create__createDuration(input, value); duration._milliseconds += direction * other._milliseconds; duration._days += direction * other._days; duration._months += direction * other._months; return duration._bubble(); } // supports only 2.0-style add(1, 's') or add(duration) function duration_add_subtract__add (input, value) { return duration_add_subtract__addSubtract(this, input, value, 1); } // supports only 2.0-style subtract(1, 's') or subtract(duration) function duration_add_subtract__subtract (input, value) { return duration_add_subtract__addSubtract(this, input, value, -1); } function absCeil (number) { if (number < 0) { return Math.floor(number); } else { return Math.ceil(number); } } function bubble () { var milliseconds = this._milliseconds; var days = this._days; var months = this._months; var data = this._data; var seconds, minutes, hours, years, monthsFromDays; // if we have a mix of positive and negative values, bubble down first // check: https://github.com/moment/moment/issues/2166 if (!((milliseconds >= 0 && days >= 0 && months >= 0) || (milliseconds <= 0 && days <= 0 && months <= 0))) { milliseconds += absCeil(monthsToDays(months) + days) * 864e5; days = 0; months = 0; } // The following code bubbles up values, see the tests for // examples of what that means. data.milliseconds = milliseconds % 1000; seconds = absFloor(milliseconds / 1000); data.seconds = seconds % 60; minutes = absFloor(seconds / 60); data.minutes = minutes % 60; hours = absFloor(minutes / 60); data.hours = hours % 24; days += absFloor(hours / 24); // convert days to months monthsFromDays = absFloor(daysToMonths(days)); months += monthsFromDays; days -= absCeil(monthsToDays(monthsFromDays)); // 12 months -> 1 year years = absFloor(months / 12); months %= 12; data.days = days; data.months = months; data.years = years; return this; } function daysToMonths (days) { // 400 years have 146097 days (taking into account leap year rules) // 400 years have 12 months === 4800 return days * 4800 / 146097; } function monthsToDays (months) { // the reverse of daysToMonths return months * 146097 / 4800; } function as (units) { var days; var months; var milliseconds = this._milliseconds; units = normalizeUnits(units); if (units === 'month' || units === 'year') { days = this._days + milliseconds / 864e5; months = this._months + daysToMonths(days); return units === 'month' ? months : months / 12; } else { // handle milliseconds separately because of floating point math errors (issue #1867) days = this._days + Math.round(monthsToDays(this._months)); switch (units) { case 'week' : return days / 7 + milliseconds / 6048e5; case 'day' : return days + milliseconds / 864e5; case 'hour' : return days * 24 + milliseconds / 36e5; case 'minute' : return days * 1440 + milliseconds / 6e4; case 'second' : return days * 86400 + milliseconds / 1000; // Math.floor prevents floating point math errors here case 'millisecond': return Math.floor(days * 864e5) + milliseconds; default: throw new Error('Unknown unit ' + units); } } } // TODO: Use this.as('ms')? function duration_as__valueOf () { return ( this._milliseconds + this._days * 864e5 + (this._months % 12) * 2592e6 + toInt(this._months / 12) * 31536e6 ); } function makeAs (alias) { return function () { return this.as(alias); }; } var asMilliseconds = makeAs('ms'); var asSeconds = makeAs('s'); var asMinutes = makeAs('m'); var asHours = makeAs('h'); var asDays = makeAs('d'); var asWeeks = makeAs('w'); var asMonths = makeAs('M'); var asYears = makeAs('y'); function duration_get__get (units) { units = normalizeUnits(units); return this[units + 's'](); } function makeGetter(name) { return function () { return this._data[name]; }; } var milliseconds = makeGetter('milliseconds'); var seconds = makeGetter('seconds'); var minutes = makeGetter('minutes'); var hours = makeGetter('hours'); var days = makeGetter('days'); var months = makeGetter('months'); var years = makeGetter('years'); function weeks () { return absFloor(this.days() / 7); } var round = Math.round; var thresholds = { s: 45, // seconds to minute m: 45, // minutes to hour h: 22, // hours to day d: 26, // days to month M: 11 // months to year }; // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); } function duration_humanize__relativeTime (posNegDuration, withoutSuffix, locale) { var duration = create__createDuration(posNegDuration).abs(); var seconds = round(duration.as('s')); var minutes = round(duration.as('m')); var hours = round(duration.as('h')); var days = round(duration.as('d')); var months = round(duration.as('M')); var years = round(duration.as('y')); var a = seconds < thresholds.s && ['s', seconds] || minutes <= 1 && ['m'] || minutes < thresholds.m && ['mm', minutes] || hours <= 1 && ['h'] || hours < thresholds.h && ['hh', hours] || days <= 1 && ['d'] || days < thresholds.d && ['dd', days] || months <= 1 && ['M'] || months < thresholds.M && ['MM', months] || years <= 1 && ['y'] || ['yy', years]; a[2] = withoutSuffix; a[3] = +posNegDuration > 0; a[4] = locale; return substituteTimeAgo.apply(null, a); } // This function allows you to set the rounding function for relative time strings function duration_humanize__getSetRelativeTimeRounding (roundingFunction) { if (roundingFunction === undefined) { return round; } if (typeof(roundingFunction) === 'function') { round = roundingFunction; return true; } return false; } // This function allows you to set a threshold for relative time strings function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) { if (thresholds[threshold] === undefined) { return false; } if (limit === undefined) { return thresholds[threshold]; } thresholds[threshold] = limit; return true; } function humanize (withSuffix) { var locale = this.localeData(); var output = duration_humanize__relativeTime(this, !withSuffix, locale); if (withSuffix) { output = locale.pastFuture(+this, output); } return locale.postformat(output); } var iso_string__abs = Math.abs; function iso_string__toISOString() { // for ISO strings we do not use the normal bubbling rules: // * milliseconds bubble up until they become hours // * days do not bubble at all // * months bubble up until they become years // This is because there is no context-free conversion between hours and days // (think of clock changes) // and also not between days and months (28-31 days per month) var seconds = iso_string__abs(this._milliseconds) / 1000; var days = iso_string__abs(this._days); var months = iso_string__abs(this._months); var minutes, hours, years; // 3600 seconds -> 60 minutes -> 1 hour minutes = absFloor(seconds / 60); hours = absFloor(minutes / 60); seconds %= 60; minutes %= 60; // 12 months -> 1 year years = absFloor(months / 12); months %= 12; // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js var Y = years; var M = months; var D = days; var h = hours; var m = minutes; var s = seconds; var total = this.asSeconds(); if (!total) { // this is the same as C#'s (Noda) and python (isodate)... // but not other JS (goog.date) return 'P0D'; } return (total < 0 ? '-' : '') + 'P' + (Y ? Y + 'Y' : '') + (M ? M + 'M' : '') + (D ? D + 'D' : '') + ((h || m || s) ? 'T' : '') + (h ? h + 'H' : '') + (m ? m + 'M' : '') + (s ? s + 'S' : ''); } var duration_prototype__proto = Duration.prototype; duration_prototype__proto.abs = duration_abs__abs; duration_prototype__proto.add = duration_add_subtract__add; duration_prototype__proto.subtract = duration_add_subtract__subtract; duration_prototype__proto.as = as; duration_prototype__proto.asMilliseconds = asMilliseconds; duration_prototype__proto.asSeconds = asSeconds; duration_prototype__proto.asMinutes = asMinutes; duration_prototype__proto.asHours = asHours; duration_prototype__proto.asDays = asDays; duration_prototype__proto.asWeeks = asWeeks; duration_prototype__proto.asMonths = asMonths; duration_prototype__proto.asYears = asYears; duration_prototype__proto.valueOf = duration_as__valueOf; duration_prototype__proto._bubble = bubble; duration_prototype__proto.get = duration_get__get; duration_prototype__proto.milliseconds = milliseconds; duration_prototype__proto.seconds = seconds; duration_prototype__proto.minutes = minutes; duration_prototype__proto.hours = hours; duration_prototype__proto.days = days; duration_prototype__proto.weeks = weeks; duration_prototype__proto.months = months; duration_prototype__proto.years = years; duration_prototype__proto.humanize = humanize; duration_prototype__proto.toISOString = iso_string__toISOString; duration_prototype__proto.toString = iso_string__toISOString; duration_prototype__proto.toJSON = iso_string__toISOString; duration_prototype__proto.locale = locale; duration_prototype__proto.localeData = localeData; // Deprecations duration_prototype__proto.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', iso_string__toISOString); duration_prototype__proto.lang = lang; // Side effect imports // FORMATTING addFormatToken('X', 0, 0, 'unix'); addFormatToken('x', 0, 0, 'valueOf'); // PARSING addRegexToken('x', matchSigned); addRegexToken('X', matchTimestamp); addParseToken('X', function (input, array, config) { config._d = new Date(parseFloat(input, 10) * 1000); }); addParseToken('x', function (input, array, config) { config._d = new Date(toInt(input)); }); // Side effect imports utils_hooks__hooks.version = '2.15.1'; setHookCallback(local__createLocal); utils_hooks__hooks.fn = momentPrototype; utils_hooks__hooks.min = min; utils_hooks__hooks.max = max; utils_hooks__hooks.now = now; utils_hooks__hooks.utc = create_utc__createUTC; utils_hooks__hooks.unix = moment__createUnix; utils_hooks__hooks.months = lists__listMonths; utils_hooks__hooks.isDate = isDate; utils_hooks__hooks.locale = locale_locales__getSetGlobalLocale; utils_hooks__hooks.invalid = valid__createInvalid; utils_hooks__hooks.duration = create__createDuration; utils_hooks__hooks.isMoment = isMoment; utils_hooks__hooks.weekdays = lists__listWeekdays; utils_hooks__hooks.parseZone = moment__createInZone; utils_hooks__hooks.localeData = locale_locales__getLocale; utils_hooks__hooks.isDuration = isDuration; utils_hooks__hooks.monthsShort = lists__listMonthsShort; utils_hooks__hooks.weekdaysMin = lists__listWeekdaysMin; utils_hooks__hooks.defineLocale = defineLocale; utils_hooks__hooks.updateLocale = updateLocale; utils_hooks__hooks.locales = locale_locales__listLocales; utils_hooks__hooks.weekdaysShort = lists__listWeekdaysShort; utils_hooks__hooks.normalizeUnits = normalizeUnits; utils_hooks__hooks.relativeTimeRounding = duration_humanize__getSetRelativeTimeRounding; utils_hooks__hooks.relativeTimeThreshold = duration_humanize__getSetRelativeTimeThreshold; utils_hooks__hooks.calendarFormat = getCalendarFormat; utils_hooks__hooks.prototype = momentPrototype; var _moment = utils_hooks__hooks; return _moment; })); ================================================ FILE: src/main/resources/static/assets/js/theme.js ================================================ var saveSelectColor = { 'Name': 'SelcetColor', 'Color': 'theme-white' } function getThemeToggle() { // 判断用户是否已有自己选择的模板风格 if (storageLoad('SelcetColor')) { saveSelectColor = storageLoad('SelcetColor'); $('body').attr('class', saveSelectColor.Color) if (saveSelectColor.Color == 'theme-white') { $('#eyesI').attr('class', 'am-icon-toggle-off'); } else { $('#eyesI').attr('class', 'am-icon-toggle-on'); } } else { storageSave(saveSelectColor); $('body').attr('class', 'theme-white') } } // session缓存 function storageSave(objectData) { sessionStorage.setItem(objectData.Name, JSON.stringify(objectData)); } function storageLoad(objectName) { if (sessionStorage.getItem(objectName)) { return JSON.parse(sessionStorage.getItem(objectName)) } else { return false } } ================================================ FILE: src/main/resources/static/assets/js/todomvc.js ================================================ // Full spec-compliant TodoMVC with localStorage persistence // and hash-based routing in ~150 lines. // localStorage persistence var STORAGE_KEY = 'todos-vuejs-2.0' var todoStorage = { fetch: function () { var todos = JSON.parse(localStorage.getItem(STORAGE_KEY) || '[]') todos.forEach(function (todo, index) { todo.id = index }) todoStorage.uid = todos.length return todos }, save: function (todos) { localStorage.setItem(STORAGE_KEY, JSON.stringify(todos)) } } // visibility filters var filters = { all: function (todos) { return todos }, active: function (todos) { return todos.filter(function (todo) { return !todo.completed }) }, completed: function (todos) { return todos.filter(function (todo) { return todo.completed }) } } // app Vue instance var app = new Vue({ // app initial state data: { todos: todoStorage.fetch(), newTodo: '', editedTodo: null, visibility: 'all' }, // watch todos change for localStorage persistence watch: { todos: { handler: function (todos) { todoStorage.save(todos) }, deep: true } }, // computed properties // https://vuejs.org/guide/computed.html computed: { filteredTodos: function () { return filters[this.visibility](this.todos) }, remaining: function () { return filters.active(this.todos).length }, allDone: { get: function () { return this.remaining === 0 }, set: function (value) { this.todos.forEach(function (todo) { todo.completed = value }) } } }, filters: { pluralize: function (n) { return n === 1 ? 'item' : 'items' } }, // methods that implement data logic. // note there's no DOM manipulation here at all. methods: { addTodo: function () { var value = this.newTodo && this.newTodo.trim() if (!value) { return } this.todos.push({ id: todoStorage.uid++, title: value, completed: false }) this.newTodo = '' }, removeTodo: function (todo) { this.todos.splice(this.todos.indexOf(todo), 1) }, editTodo: function (todo) { this.beforeEditCache = todo.title this.editedTodo = todo }, doneEdit: function (todo) { if (!this.editedTodo) { return } this.editedTodo = null todo.title = todo.title.trim() if (!todo.title) { this.removeTodo(todo) } }, cancelEdit: function (todo) { this.editedTodo = null todo.title = this.beforeEditCache }, removeCompleted: function () { this.todos = filters.active(this.todos) } }, // a custom directive to wait for the DOM to be updated // before focusing on the input field. // https://vuejs.org/guide/custom-directive.html directives: { 'todo-focus': function (el, binding) { if (binding.value) { el.focus() } } } }) // handle routing function onHashChange () { var visibility = window.location.hash.replace(/#\/?/, '') if (filters[visibility]) { app.visibility = visibility } else { window.location.hash = '' app.visibility = 'all' } } window.addEventListener('hashchange', onHashChange) onHashChange() // mount app.$mount('.todoapp') ================================================ FILE: src/main/resources/static/assets/js/vue.js ================================================ /*! * Vue.js v2.2.3 * (c) 2014-2017 Evan You * Released under the MIT License. */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global.Vue = factory()); }(this, (function () { 'use strict'; /* */ /** * Convert a value to a string that is actually rendered. */ function _toString (val) { return val == null ? '' : typeof val === 'object' ? JSON.stringify(val, null, 2) : String(val) } /** * Convert a input value to a number for persistence. * If the conversion fails, return original string. */ function toNumber (val) { var n = parseFloat(val); return isNaN(n) ? val : n } /** * Make a map and return a function for checking if a key * is in that map. */ function makeMap ( str, expectsLowerCase ) { var map = Object.create(null); var list = str.split(','); for (var i = 0; i < list.length; i++) { map[list[i]] = true; } return expectsLowerCase ? function (val) { return map[val.toLowerCase()]; } : function (val) { return map[val]; } } /** * Check if a tag is a built-in tag. */ var isBuiltInTag = makeMap('slot,component', true); /** * Remove an item from an array */ function remove (arr, item) { if (arr.length) { var index = arr.indexOf(item); if (index > -1) { return arr.splice(index, 1) } } } /** * Check whether the object has the property. */ var hasOwnProperty = Object.prototype.hasOwnProperty; function hasOwn (obj, key) { return hasOwnProperty.call(obj, key) } /** * Check if value is primitive */ function isPrimitive (value) { return typeof value === 'string' || typeof value === 'number' } /** * Create a cached version of a pure function. */ function cached (fn) { var cache = Object.create(null); return (function cachedFn (str) { var hit = cache[str]; return hit || (cache[str] = fn(str)) }) } /** * Camelize a hyphen-delimited string. */ var camelizeRE = /-(\w)/g; var camelize = cached(function (str) { return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; }) }); /** * Capitalize a string. */ var capitalize = cached(function (str) { return str.charAt(0).toUpperCase() + str.slice(1) }); /** * Hyphenate a camelCase string. */ var hyphenateRE = /([^-])([A-Z])/g; var hyphenate = cached(function (str) { return str .replace(hyphenateRE, '$1-$2') .replace(hyphenateRE, '$1-$2') .toLowerCase() }); /** * Simple bind, faster than native */ function bind (fn, ctx) { function boundFn (a) { var l = arguments.length; return l ? l > 1 ? fn.apply(ctx, arguments) : fn.call(ctx, a) : fn.call(ctx) } // record original fn length boundFn._length = fn.length; return boundFn } /** * Convert an Array-like object to a real Array. */ function toArray (list, start) { start = start || 0; var i = list.length - start; var ret = new Array(i); while (i--) { ret[i] = list[i + start]; } return ret } /** * Mix properties into target object. */ function extend (to, _from) { for (var key in _from) { to[key] = _from[key]; } return to } /** * Quick object check - this is primarily used to tell * Objects from primitive values when we know the value * is a JSON-compliant type. */ function isObject (obj) { return obj !== null && typeof obj === 'object' } /** * Strict object type check. Only returns true * for plain JavaScript objects. */ var toString = Object.prototype.toString; var OBJECT_STRING = '[object Object]'; function isPlainObject (obj) { return toString.call(obj) === OBJECT_STRING } /** * Merge an Array of Objects into a single Object. */ function toObject (arr) { var res = {}; for (var i = 0; i < arr.length; i++) { if (arr[i]) { extend(res, arr[i]); } } return res } /** * Perform no operation. */ function noop () {} /** * Always return false. */ var no = function () { return false; }; /** * Return same value */ var identity = function (_) { return _; }; /** * Generate a static keys string from compiler modules. */ function genStaticKeys (modules) { return modules.reduce(function (keys, m) { return keys.concat(m.staticKeys || []) }, []).join(',') } /** * Check if two values are loosely equal - that is, * if they are plain objects, do they have the same shape? */ function looseEqual (a, b) { var isObjectA = isObject(a); var isObjectB = isObject(b); if (isObjectA && isObjectB) { try { return JSON.stringify(a) === JSON.stringify(b) } catch (e) { // possible circular reference return a === b } } else if (!isObjectA && !isObjectB) { return String(a) === String(b) } else { return false } } function looseIndexOf (arr, val) { for (var i = 0; i < arr.length; i++) { if (looseEqual(arr[i], val)) { return i } } return -1 } /** * Ensure a function is called only once. */ function once (fn) { var called = false; return function () { if (!called) { called = true; fn(); } } } /* */ var config = { /** * Option merge strategies (used in core/util/options) */ optionMergeStrategies: Object.create(null), /** * Whether to suppress warnings. */ silent: false, /** * Show production mode tip message on boot? */ productionTip: "development" !== 'production', /** * Whether to enable devtools */ devtools: "development" !== 'production', /** * Whether to record perf */ performance: false, /** * Error handler for watcher errors */ errorHandler: null, /** * Ignore certain custom elements */ ignoredElements: [], /** * Custom user key aliases for v-on */ keyCodes: Object.create(null), /** * Check if a tag is reserved so that it cannot be registered as a * component. This is platform-dependent and may be overwritten. */ isReservedTag: no, /** * Check if a tag is an unknown element. * Platform-dependent. */ isUnknownElement: no, /** * Get the namespace of an element */ getTagNamespace: noop, /** * Parse the real tag name for the specific platform. */ parsePlatformTagName: identity, /** * Check if an attribute must be bound using property, e.g. value * Platform-dependent. */ mustUseProp: no, /** * List of asset types that a component can own. */ _assetTypes: [ 'component', 'directive', 'filter' ], /** * List of lifecycle hooks. */ _lifecycleHooks: [ 'beforeCreate', 'created', 'beforeMount', 'mounted', 'beforeUpdate', 'updated', 'beforeDestroy', 'destroyed', 'activated', 'deactivated' ], /** * Max circular updates allowed in a scheduler flush cycle. */ _maxUpdateCount: 100 }; /* */ var emptyObject = Object.freeze({}); /** * Check if a string starts with $ or _ */ function isReserved (str) { var c = (str + '').charCodeAt(0); return c === 0x24 || c === 0x5F } /** * Define a property. */ function def (obj, key, val, enumerable) { Object.defineProperty(obj, key, { value: val, enumerable: !!enumerable, writable: true, configurable: true }); } /** * Parse simple path. */ var bailRE = /[^\w.$]/; function parsePath (path) { if (bailRE.test(path)) { return } var segments = path.split('.'); return function (obj) { for (var i = 0; i < segments.length; i++) { if (!obj) { return } obj = obj[segments[i]]; } return obj } } /* */ /* globals MutationObserver */ // can we use __proto__? var hasProto = '__proto__' in {}; // Browser environment sniffing var inBrowser = typeof window !== 'undefined'; var UA = inBrowser && window.navigator.userAgent.toLowerCase(); var isIE = UA && /msie|trident/.test(UA); var isIE9 = UA && UA.indexOf('msie 9.0') > 0; var isEdge = UA && UA.indexOf('edge/') > 0; var isAndroid = UA && UA.indexOf('android') > 0; var isIOS = UA && /iphone|ipad|ipod|ios/.test(UA); var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge; // this needs to be lazy-evaled because vue may be required before // vue-server-renderer can set VUE_ENV var _isServer; var isServerRendering = function () { if (_isServer === undefined) { /* istanbul ignore if */ if (!inBrowser && typeof global !== 'undefined') { // detect presence of vue-server-renderer and avoid // Webpack shimming the process _isServer = global['process'].env.VUE_ENV === 'server'; } else { _isServer = false; } } return _isServer }; // detect devtools var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__; /* istanbul ignore next */ function isNative (Ctor) { return /native code/.test(Ctor.toString()) } var hasSymbol = typeof Symbol !== 'undefined' && isNative(Symbol) && typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys); /** * Defer a task to execute it asynchronously. */ var nextTick = (function () { var callbacks = []; var pending = false; var timerFunc; function nextTickHandler () { pending = false; var copies = callbacks.slice(0); callbacks.length = 0; for (var i = 0; i < copies.length; i++) { copies[i](); } } // the nextTick behavior leverages the microtask queue, which can be accessed // via either native Promise.then or MutationObserver. // MutationObserver has wider support, however it is seriously bugged in // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It // completely stops working after triggering a few times... so, if native // Promise is available, we will use it: /* istanbul ignore if */ if (typeof Promise !== 'undefined' && isNative(Promise)) { var p = Promise.resolve(); var logError = function (err) { console.error(err); }; timerFunc = function () { p.then(nextTickHandler).catch(logError); // in problematic UIWebViews, Promise.then doesn't completely break, but // it can get stuck in a weird state where callbacks are pushed into the // microtask queue but the queue isn't being flushed, until the browser // needs to do some other work, e.g. handle a timer. Therefore we can // "force" the microtask queue to be flushed by adding an empty timer. if (isIOS) { setTimeout(noop); } }; } else if (typeof MutationObserver !== 'undefined' && ( isNative(MutationObserver) || // PhantomJS and iOS 7.x MutationObserver.toString() === '[object MutationObserverConstructor]' )) { // use MutationObserver where native Promise is not available, // e.g. PhantomJS IE11, iOS7, Android 4.4 var counter = 1; var observer = new MutationObserver(nextTickHandler); var textNode = document.createTextNode(String(counter)); observer.observe(textNode, { characterData: true }); timerFunc = function () { counter = (counter + 1) % 2; textNode.data = String(counter); }; } else { // fallback to setTimeout /* istanbul ignore next */ timerFunc = function () { setTimeout(nextTickHandler, 0); }; } return function queueNextTick (cb, ctx) { var _resolve; callbacks.push(function () { if (cb) { cb.call(ctx); } if (_resolve) { _resolve(ctx); } }); if (!pending) { pending = true; timerFunc(); } if (!cb && typeof Promise !== 'undefined') { return new Promise(function (resolve) { _resolve = resolve; }) } } })(); var _Set; /* istanbul ignore if */ if (typeof Set !== 'undefined' && isNative(Set)) { // use native Set when available. _Set = Set; } else { // a non-standard Set polyfill that only works with primitive keys. _Set = (function () { function Set () { this.set = Object.create(null); } Set.prototype.has = function has (key) { return this.set[key] === true }; Set.prototype.add = function add (key) { this.set[key] = true; }; Set.prototype.clear = function clear () { this.set = Object.create(null); }; return Set; }()); } var warn = noop; var tip = noop; var formatComponentName; { var hasConsole = typeof console !== 'undefined'; var classifyRE = /(?:^|[-_])(\w)/g; var classify = function (str) { return str .replace(classifyRE, function (c) { return c.toUpperCase(); }) .replace(/[-_]/g, ''); }; warn = function (msg, vm) { if (hasConsole && (!config.silent)) { console.error("[Vue warn]: " + msg + " " + ( vm ? formatLocation(formatComponentName(vm)) : '' )); } }; tip = function (msg, vm) { if (hasConsole && (!config.silent)) { console.warn("[Vue tip]: " + msg + " " + ( vm ? formatLocation(formatComponentName(vm)) : '' )); } }; formatComponentName = function (vm, includeFile) { if (vm.$root === vm) { return '' } var name = typeof vm === 'function' && vm.options ? vm.options.name : vm._isVue ? vm.$options.name || vm.$options._componentTag : vm.name; var file = vm._isVue && vm.$options.__file; if (!name && file) { var match = file.match(/([^/\\]+)\.vue$/); name = match && match[1]; } return ( (name ? ("<" + (classify(name)) + ">") : "") + (file && includeFile !== false ? (" at " + file) : '') ) }; var formatLocation = function (str) { if (str === "") { str += " - use the \"name\" option for better debugging messages."; } return ("\n(found in " + str + ")") }; } /* */ var uid$1 = 0; /** * A dep is an observable that can have multiple * directives subscribing to it. */ var Dep = function Dep () { this.id = uid$1++; this.subs = []; }; Dep.prototype.addSub = function addSub (sub) { this.subs.push(sub); }; Dep.prototype.removeSub = function removeSub (sub) { remove(this.subs, sub); }; Dep.prototype.depend = function depend () { if (Dep.target) { Dep.target.addDep(this); } }; Dep.prototype.notify = function notify () { // stabilize the subscriber list first var subs = this.subs.slice(); for (var i = 0, l = subs.length; i < l; i++) { subs[i].update(); } }; // the current target watcher being evaluated. // this is globally unique because there could be only one // watcher being evaluated at any time. Dep.target = null; var targetStack = []; function pushTarget (_target) { if (Dep.target) { targetStack.push(Dep.target); } Dep.target = _target; } function popTarget () { Dep.target = targetStack.pop(); } /* * not type checking this file because flow doesn't play well with * dynamically accessing methods on Array prototype */ var arrayProto = Array.prototype; var arrayMethods = Object.create(arrayProto);[ 'push', 'pop', 'shift', 'unshift', 'splice', 'sort', 'reverse' ] .forEach(function (method) { // cache original method var original = arrayProto[method]; def(arrayMethods, method, function mutator () { var arguments$1 = arguments; // avoid leaking arguments: // http://jsperf.com/closure-with-arguments var i = arguments.length; var args = new Array(i); while (i--) { args[i] = arguments$1[i]; } var result = original.apply(this, args); var ob = this.__ob__; var inserted; switch (method) { case 'push': inserted = args; break case 'unshift': inserted = args; break case 'splice': inserted = args.slice(2); break } if (inserted) { ob.observeArray(inserted); } // notify change ob.dep.notify(); return result }); }); /* */ var arrayKeys = Object.getOwnPropertyNames(arrayMethods); /** * By default, when a reactive property is set, the new value is * also converted to become reactive. However when passing down props, * we don't want to force conversion because the value may be a nested value * under a frozen data structure. Converting it would defeat the optimization. */ var observerState = { shouldConvert: true, isSettingProps: false }; /** * Observer class that are attached to each observed * object. Once attached, the observer converts target * object's property keys into getter/setters that * collect dependencies and dispatches updates. */ var Observer = function Observer (value) { this.value = value; this.dep = new Dep(); this.vmCount = 0; def(value, '__ob__', this); if (Array.isArray(value)) { var augment = hasProto ? protoAugment : copyAugment; augment(value, arrayMethods, arrayKeys); this.observeArray(value); } else { this.walk(value); } }; /** * Walk through each property and convert them into * getter/setters. This method should only be called when * value type is Object. */ Observer.prototype.walk = function walk (obj) { var keys = Object.keys(obj); for (var i = 0; i < keys.length; i++) { defineReactive$$1(obj, keys[i], obj[keys[i]]); } }; /** * Observe a list of Array items. */ Observer.prototype.observeArray = function observeArray (items) { for (var i = 0, l = items.length; i < l; i++) { observe(items[i]); } }; // helpers /** * Augment an target Object or Array by intercepting * the prototype chain using __proto__ */ function protoAugment (target, src) { /* eslint-disable no-proto */ target.__proto__ = src; /* eslint-enable no-proto */ } /** * Augment an target Object or Array by defining * hidden properties. */ /* istanbul ignore next */ function copyAugment (target, src, keys) { for (var i = 0, l = keys.length; i < l; i++) { var key = keys[i]; def(target, key, src[key]); } } /** * Attempt to create an observer instance for a value, * returns the new observer if successfully observed, * or the existing observer if the value already has one. */ function observe (value, asRootData) { if (!isObject(value)) { return } var ob; if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) { ob = value.__ob__; } else if ( observerState.shouldConvert && !isServerRendering() && (Array.isArray(value) || isPlainObject(value)) && Object.isExtensible(value) && !value._isVue ) { ob = new Observer(value); } if (asRootData && ob) { ob.vmCount++; } return ob } /** * Define a reactive property on an Object. */ function defineReactive$$1 ( obj, key, val, customSetter ) { var dep = new Dep(); var property = Object.getOwnPropertyDescriptor(obj, key); if (property && property.configurable === false) { return } // cater for pre-defined getter/setters var getter = property && property.get; var setter = property && property.set; var childOb = observe(val); Object.defineProperty(obj, key, { enumerable: true, configurable: true, get: function reactiveGetter () { var value = getter ? getter.call(obj) : val; if (Dep.target) { dep.depend(); if (childOb) { childOb.dep.depend(); } if (Array.isArray(value)) { dependArray(value); } } return value }, set: function reactiveSetter (newVal) { var value = getter ? getter.call(obj) : val; /* eslint-disable no-self-compare */ if (newVal === value || (newVal !== newVal && value !== value)) { return } /* eslint-enable no-self-compare */ if ("development" !== 'production' && customSetter) { customSetter(); } if (setter) { setter.call(obj, newVal); } else { val = newVal; } childOb = observe(newVal); dep.notify(); } }); } /** * Set a property on an object. Adds the new property and * triggers change notification if the property doesn't * already exist. */ function set (target, key, val) { if (Array.isArray(target)) { target.length = Math.max(target.length, key); target.splice(key, 1, val); return val } if (hasOwn(target, key)) { target[key] = val; return val } var ob = target.__ob__; if (target._isVue || (ob && ob.vmCount)) { "development" !== 'production' && warn( 'Avoid adding reactive properties to a Vue instance or its root $data ' + 'at runtime - declare it upfront in the data option.' ); return val } if (!ob) { target[key] = val; return val } defineReactive$$1(ob.value, key, val); ob.dep.notify(); return val } /** * Delete a property and trigger change if necessary. */ function del (target, key) { if (Array.isArray(target)) { target.splice(key, 1); return } var ob = target.__ob__; if (target._isVue || (ob && ob.vmCount)) { "development" !== 'production' && warn( 'Avoid deleting properties on a Vue instance or its root $data ' + '- just set it to null.' ); return } if (!hasOwn(target, key)) { return } delete target[key]; if (!ob) { return } ob.dep.notify(); } /** * Collect dependencies on array elements when the array is touched, since * we cannot intercept array element access like property getters. */ function dependArray (value) { for (var e = (void 0), i = 0, l = value.length; i < l; i++) { e = value[i]; e && e.__ob__ && e.__ob__.dep.depend(); if (Array.isArray(e)) { dependArray(e); } } } /* */ /** * Option overwriting strategies are functions that handle * how to merge a parent option value and a child option * value into the final value. */ var strats = config.optionMergeStrategies; /** * Options with restrictions */ { strats.el = strats.propsData = function (parent, child, vm, key) { if (!vm) { warn( "option \"" + key + "\" can only be used during instance " + 'creation with the `new` keyword.' ); } return defaultStrat(parent, child) }; } /** * Helper that recursively merges two data objects together. */ function mergeData (to, from) { if (!from) { return to } var key, toVal, fromVal; var keys = Object.keys(from); for (var i = 0; i < keys.length; i++) { key = keys[i]; toVal = to[key]; fromVal = from[key]; if (!hasOwn(to, key)) { set(to, key, fromVal); } else if (isPlainObject(toVal) && isPlainObject(fromVal)) { mergeData(toVal, fromVal); } } return to } /** * Data */ strats.data = function ( parentVal, childVal, vm ) { if (!vm) { // in a Vue.extend merge, both should be functions if (!childVal) { return parentVal } if (typeof childVal !== 'function') { "development" !== 'production' && warn( 'The "data" option should be a function ' + 'that returns a per-instance value in component ' + 'definitions.', vm ); return parentVal } if (!parentVal) { return childVal } // when parentVal & childVal are both present, // we need to return a function that returns the // merged result of both functions... no need to // check if parentVal is a function here because // it has to be a function to pass previous merges. return function mergedDataFn () { return mergeData( childVal.call(this), parentVal.call(this) ) } } else if (parentVal || childVal) { return function mergedInstanceDataFn () { // instance merge var instanceData = typeof childVal === 'function' ? childVal.call(vm) : childVal; var defaultData = typeof parentVal === 'function' ? parentVal.call(vm) : undefined; if (instanceData) { return mergeData(instanceData, defaultData) } else { return defaultData } } } }; /** * Hooks and props are merged as arrays. */ function mergeHook ( parentVal, childVal ) { return childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal } config._lifecycleHooks.forEach(function (hook) { strats[hook] = mergeHook; }); /** * Assets * * When a vm is present (instance creation), we need to do * a three-way merge between constructor options, instance * options and parent options. */ function mergeAssets (parentVal, childVal) { var res = Object.create(parentVal || null); return childVal ? extend(res, childVal) : res } config._assetTypes.forEach(function (type) { strats[type + 's'] = mergeAssets; }); /** * Watchers. * * Watchers hashes should not overwrite one * another, so we merge them as arrays. */ strats.watch = function (parentVal, childVal) { /* istanbul ignore if */ if (!childVal) { return Object.create(parentVal || null) } if (!parentVal) { return childVal } var ret = {}; extend(ret, parentVal); for (var key in childVal) { var parent = ret[key]; var child = childVal[key]; if (parent && !Array.isArray(parent)) { parent = [parent]; } ret[key] = parent ? parent.concat(child) : [child]; } return ret }; /** * Other object hashes. */ strats.props = strats.methods = strats.computed = function (parentVal, childVal) { if (!childVal) { return Object.create(parentVal || null) } if (!parentVal) { return childVal } var ret = Object.create(null); extend(ret, parentVal); extend(ret, childVal); return ret }; /** * Default strategy. */ var defaultStrat = function (parentVal, childVal) { return childVal === undefined ? parentVal : childVal }; /** * Validate component names */ function checkComponents (options) { for (var key in options.components) { var lower = key.toLowerCase(); if (isBuiltInTag(lower) || config.isReservedTag(lower)) { warn( 'Do not use built-in or reserved HTML elements as component ' + 'id: ' + key ); } } } /** * Ensure all props option syntax are normalized into the * Object-based format. */ function normalizeProps (options) { var props = options.props; if (!props) { return } var res = {}; var i, val, name; if (Array.isArray(props)) { i = props.length; while (i--) { val = props[i]; if (typeof val === 'string') { name = camelize(val); res[name] = { type: null }; } else { warn('props must be strings when using array syntax.'); } } } else if (isPlainObject(props)) { for (var key in props) { val = props[key]; name = camelize(key); res[name] = isPlainObject(val) ? val : { type: val }; } } options.props = res; } /** * Normalize raw function directives into object format. */ function normalizeDirectives (options) { var dirs = options.directives; if (dirs) { for (var key in dirs) { var def = dirs[key]; if (typeof def === 'function') { dirs[key] = { bind: def, update: def }; } } } } /** * Merge two option objects into a new one. * Core utility used in both instantiation and inheritance. */ function mergeOptions ( parent, child, vm ) { { checkComponents(child); } normalizeProps(child); normalizeDirectives(child); var extendsFrom = child.extends; if (extendsFrom) { parent = typeof extendsFrom === 'function' ? mergeOptions(parent, extendsFrom.options, vm) : mergeOptions(parent, extendsFrom, vm); } if (child.mixins) { for (var i = 0, l = child.mixins.length; i < l; i++) { var mixin = child.mixins[i]; if (mixin.prototype instanceof Vue$3) { mixin = mixin.options; } parent = mergeOptions(parent, mixin, vm); } } var options = {}; var key; for (key in parent) { mergeField(key); } for (key in child) { if (!hasOwn(parent, key)) { mergeField(key); } } function mergeField (key) { var strat = strats[key] || defaultStrat; options[key] = strat(parent[key], child[key], vm, key); } return options } /** * Resolve an asset. * This function is used because child instances need access * to assets defined in its ancestor chain. */ function resolveAsset ( options, type, id, warnMissing ) { /* istanbul ignore if */ if (typeof id !== 'string') { return } var assets = options[type]; // check local registration variations first if (hasOwn(assets, id)) { return assets[id] } var camelizedId = camelize(id); if (hasOwn(assets, camelizedId)) { return assets[camelizedId] } var PascalCaseId = capitalize(camelizedId); if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] } // fallback to prototype chain var res = assets[id] || assets[camelizedId] || assets[PascalCaseId]; if ("development" !== 'production' && warnMissing && !res) { warn( 'Failed to resolve ' + type.slice(0, -1) + ': ' + id, options ); } return res } /* */ function validateProp ( key, propOptions, propsData, vm ) { var prop = propOptions[key]; var absent = !hasOwn(propsData, key); var value = propsData[key]; // handle boolean props if (isType(Boolean, prop.type)) { if (absent && !hasOwn(prop, 'default')) { value = false; } else if (!isType(String, prop.type) && (value === '' || value === hyphenate(key))) { value = true; } } // check default value if (value === undefined) { value = getPropDefaultValue(vm, prop, key); // since the default value is a fresh copy, // make sure to observe it. var prevShouldConvert = observerState.shouldConvert; observerState.shouldConvert = true; observe(value); observerState.shouldConvert = prevShouldConvert; } { assertProp(prop, key, value, vm, absent); } return value } /** * Get the default value of a prop. */ function getPropDefaultValue (vm, prop, key) { // no default, return undefined if (!hasOwn(prop, 'default')) { return undefined } var def = prop.default; // warn against non-factory defaults for Object & Array if ("development" !== 'production' && isObject(def)) { warn( 'Invalid default value for prop "' + key + '": ' + 'Props with type Object/Array must use a factory function ' + 'to return the default value.', vm ); } // the raw prop value was also undefined from previous render, // return previous default value to avoid unnecessary watcher trigger if (vm && vm.$options.propsData && vm.$options.propsData[key] === undefined && vm._props[key] !== undefined) { return vm._props[key] } // call factory function for non-Function types // a value is Function if its prototype is function even across different execution context return typeof def === 'function' && getType(prop.type) !== 'Function' ? def.call(vm) : def } /** * Assert whether a prop is valid. */ function assertProp ( prop, name, value, vm, absent ) { if (prop.required && absent) { warn( 'Missing required prop: "' + name + '"', vm ); return } if (value == null && !prop.required) { return } var type = prop.type; var valid = !type || type === true; var expectedTypes = []; if (type) { if (!Array.isArray(type)) { type = [type]; } for (var i = 0; i < type.length && !valid; i++) { var assertedType = assertType(value, type[i]); expectedTypes.push(assertedType.expectedType || ''); valid = assertedType.valid; } } if (!valid) { warn( 'Invalid prop: type check failed for prop "' + name + '".' + ' Expected ' + expectedTypes.map(capitalize).join(', ') + ', got ' + Object.prototype.toString.call(value).slice(8, -1) + '.', vm ); return } var validator = prop.validator; if (validator) { if (!validator(value)) { warn( 'Invalid prop: custom validator check failed for prop "' + name + '".', vm ); } } } /** * Assert the type of a value */ function assertType (value, type) { var valid; var expectedType = getType(type); if (expectedType === 'String') { valid = typeof value === (expectedType = 'string'); } else if (expectedType === 'Number') { valid = typeof value === (expectedType = 'number'); } else if (expectedType === 'Boolean') { valid = typeof value === (expectedType = 'boolean'); } else if (expectedType === 'Function') { valid = typeof value === (expectedType = 'function'); } else if (expectedType === 'Object') { valid = isPlainObject(value); } else if (expectedType === 'Array') { valid = Array.isArray(value); } else { valid = value instanceof type; } return { valid: valid, expectedType: expectedType } } /** * Use function string name to check built-in types, * because a simple equality check will fail when running * across different vms / iframes. */ function getType (fn) { var match = fn && fn.toString().match(/^\s*function (\w+)/); return match && match[1] } function isType (type, fn) { if (!Array.isArray(fn)) { return getType(fn) === getType(type) } for (var i = 0, len = fn.length; i < len; i++) { if (getType(fn[i]) === getType(type)) { return true } } /* istanbul ignore next */ return false } function handleError (err, vm, info) { if (config.errorHandler) { config.errorHandler.call(null, err, vm, info); } else { { warn(("Error in " + info + ":"), vm); } /* istanbul ignore else */ if (inBrowser && typeof console !== 'undefined') { console.error(err); } else { throw err } } } /* not type checking this file because flow doesn't play well with Proxy */ var initProxy; { var allowedGlobals = makeMap( 'Infinity,undefined,NaN,isFinite,isNaN,' + 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' + 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' + 'require' // for Webpack/Browserify ); var warnNonPresent = function (target, key) { warn( "Property or method \"" + key + "\" is not defined on the instance but " + "referenced during render. Make sure to declare reactive data " + "properties in the data option.", target ); }; var hasProxy = typeof Proxy !== 'undefined' && Proxy.toString().match(/native code/); if (hasProxy) { var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta'); config.keyCodes = new Proxy(config.keyCodes, { set: function set (target, key, value) { if (isBuiltInModifier(key)) { warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key)); return false } else { target[key] = value; return true } } }); } var hasHandler = { has: function has (target, key) { var has = key in target; var isAllowed = allowedGlobals(key) || key.charAt(0) === '_'; if (!has && !isAllowed) { warnNonPresent(target, key); } return has || !isAllowed } }; var getHandler = { get: function get (target, key) { if (typeof key === 'string' && !(key in target)) { warnNonPresent(target, key); } return target[key] } }; initProxy = function initProxy (vm) { if (hasProxy) { // determine which proxy handler to use var options = vm.$options; var handlers = options.render && options.render._withStripped ? getHandler : hasHandler; vm._renderProxy = new Proxy(vm, handlers); } else { vm._renderProxy = vm; } }; } var mark; var measure; { var perf = inBrowser && window.performance; /* istanbul ignore if */ if ( perf && perf.mark && perf.measure && perf.clearMarks && perf.clearMeasures ) { mark = function (tag) { return perf.mark(tag); }; measure = function (name, startTag, endTag) { perf.measure(name, startTag, endTag); perf.clearMarks(startTag); perf.clearMarks(endTag); perf.clearMeasures(name); }; } } /* */ var VNode = function VNode ( tag, data, children, text, elm, context, componentOptions ) { this.tag = tag; this.data = data; this.children = children; this.text = text; this.elm = elm; this.ns = undefined; this.context = context; this.functionalContext = undefined; this.key = data && data.key; this.componentOptions = componentOptions; this.componentInstance = undefined; this.parent = undefined; this.raw = false; this.isStatic = false; this.isRootInsert = true; this.isComment = false; this.isCloned = false; this.isOnce = false; }; var prototypeAccessors = { child: {} }; // DEPRECATED: alias for componentInstance for backwards compat. /* istanbul ignore next */ prototypeAccessors.child.get = function () { return this.componentInstance }; Object.defineProperties( VNode.prototype, prototypeAccessors ); var createEmptyVNode = function () { var node = new VNode(); node.text = ''; node.isComment = true; return node }; function createTextVNode (val) { return new VNode(undefined, undefined, undefined, String(val)) } // optimized shallow clone // used for static nodes and slot nodes because they may be reused across // multiple renders, cloning them avoids errors when DOM manipulations rely // on their elm reference. function cloneVNode (vnode) { var cloned = new VNode( vnode.tag, vnode.data, vnode.children, vnode.text, vnode.elm, vnode.context, vnode.componentOptions ); cloned.ns = vnode.ns; cloned.isStatic = vnode.isStatic; cloned.key = vnode.key; cloned.isCloned = true; return cloned } function cloneVNodes (vnodes) { var len = vnodes.length; var res = new Array(len); for (var i = 0; i < len; i++) { res[i] = cloneVNode(vnodes[i]); } return res } /* */ var normalizeEvent = cached(function (name) { var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first name = once$$1 ? name.slice(1) : name; var capture = name.charAt(0) === '!'; name = capture ? name.slice(1) : name; return { name: name, once: once$$1, capture: capture } }); function createFnInvoker (fns) { function invoker () { var arguments$1 = arguments; var fns = invoker.fns; if (Array.isArray(fns)) { for (var i = 0; i < fns.length; i++) { fns[i].apply(null, arguments$1); } } else { // return handler return value for single handlers return fns.apply(null, arguments) } } invoker.fns = fns; return invoker } function updateListeners ( on, oldOn, add, remove$$1, vm ) { var name, cur, old, event; for (name in on) { cur = on[name]; old = oldOn[name]; event = normalizeEvent(name); if (!cur) { "development" !== 'production' && warn( "Invalid handler for event \"" + (event.name) + "\": got " + String(cur), vm ); } else if (!old) { if (!cur.fns) { cur = on[name] = createFnInvoker(cur); } add(event.name, cur, event.once, event.capture); } else if (cur !== old) { old.fns = cur; on[name] = old; } } for (name in oldOn) { if (!on[name]) { event = normalizeEvent(name); remove$$1(event.name, oldOn[name], event.capture); } } } /* */ function mergeVNodeHook (def, hookKey, hook) { var invoker; var oldHook = def[hookKey]; function wrappedHook () { hook.apply(this, arguments); // important: remove merged hook to ensure it's called only once // and prevent memory leak remove(invoker.fns, wrappedHook); } if (!oldHook) { // no existing hook invoker = createFnInvoker([wrappedHook]); } else { /* istanbul ignore if */ if (oldHook.fns && oldHook.merged) { // already a merged invoker invoker = oldHook; invoker.fns.push(wrappedHook); } else { // existing plain hook invoker = createFnInvoker([oldHook, wrappedHook]); } } invoker.merged = true; def[hookKey] = invoker; } /* */ // The template compiler attempts to minimize the need for normalization by // statically analyzing the template at compile time. // // For plain HTML markup, normalization can be completely skipped because the // generated render function is guaranteed to return Array. There are // two cases where extra normalization is needed: // 1. When the children contains components - because a functional component // may return an Array instead of a single root. In this case, just a simple // normalization is needed - if any child is an Array, we flatten the whole // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep // because functional components already normalize their own children. function simpleNormalizeChildren (children) { for (var i = 0; i < children.length; i++) { if (Array.isArray(children[i])) { return Array.prototype.concat.apply([], children) } } return children } // 2. When the children contains constructs that always generated nested Arrays, // e.g.