Ver código fonte

first commit

Wang Zi Wen 3 anos atrás
commit
1d371fa54a
100 arquivos alterados com 8220 adições e 0 exclusões
  1. 3 0
      .gitignore
  2. 7 0
      Dockerfile
  3. 191 0
      LICENSE
  4. 116 0
      README.md
  5. 256 0
      cpms-aspen.iml
  6. 8 0
      docker-compose.yml
  7. 245 0
      elecdashboard.iml
  8. BIN
      lib/javax.ejb.jar
  9. BIN
      lib/javax.jms.jar
  10. BIN
      lib/javax.persistence.jar
  11. BIN
      lib/javax.resource.jar
  12. BIN
      lib/javax.servlet.jsp.jar
  13. BIN
      lib/javax.servlet.jsp.jstl.jar
  14. BIN
      lib/javax.transaction.jar
  15. 245 0
      newaspen.iml
  16. 448 0
      pom.xml
  17. 24 0
      src/main/java/io/renren/RenrenApplication.java
  18. 37 0
      src/main/java/io/renren/common/annotation/DataFilter.java
  19. 40 0
      src/main/java/io/renren/common/annotation/PlantDataFilter.java
  20. 28 0
      src/main/java/io/renren/common/annotation/SysLog.java
  21. 46 0
      src/main/java/io/renren/common/aspect/RedisAspect.java
  22. 47 0
      src/main/java/io/renren/common/constant/JxlsTemplateEnum.java
  23. 27 0
      src/main/java/io/renren/common/constant/JxlsTemplateFree.java
  24. 61 0
      src/main/java/io/renren/common/exception/RRException.java
  25. 64 0
      src/main/java/io/renren/common/exception/RRExceptionHandler.java
  26. 21 0
      src/main/java/io/renren/common/utils/ConfigConstant.java
  27. 141 0
      src/main/java/io/renren/common/utils/Constant.java
  28. 228 0
      src/main/java/io/renren/common/utils/DateUtils.java
  29. 40 0
      src/main/java/io/renren/common/utils/EmailUtils.java
  30. 319 0
      src/main/java/io/renren/common/utils/ExcelUtils.java
  31. 49 0
      src/main/java/io/renren/common/utils/ExportWordUtils.java
  32. 51 0
      src/main/java/io/renren/common/utils/HttpContextUtils.java
  33. 64 0
      src/main/java/io/renren/common/utils/IPUtils.java
  34. 61 0
      src/main/java/io/renren/common/utils/LocalFile.java
  35. 26 0
      src/main/java/io/renren/common/utils/MapUtils.java
  36. 110 0
      src/main/java/io/renren/common/utils/PageUtils.java
  37. 77 0
      src/main/java/io/renren/common/utils/Query.java
  38. 64 0
      src/main/java/io/renren/common/utils/R.java
  39. 21 0
      src/main/java/io/renren/common/utils/RedisKeys.java
  40. 99 0
      src/main/java/io/renren/common/utils/RedisUtils.java
  41. 51 0
      src/main/java/io/renren/common/utils/SpringContextUtils.java
  42. 35 0
      src/main/java/io/renren/common/utils/export/EncodeTools.java
  43. 20 0
      src/main/java/io/renren/common/utils/export/JxlsTemplate.java
  44. 74 0
      src/main/java/io/renren/common/utils/export/JxlsView.java
  45. 32 0
      src/main/java/io/renren/common/validator/Assert.java
  46. 49 0
      src/main/java/io/renren/common/validator/ValidatorUtils.java
  47. 17 0
      src/main/java/io/renren/common/validator/group/AddGroup.java
  48. 17 0
      src/main/java/io/renren/common/validator/group/AliyunGroup.java
  49. 21 0
      src/main/java/io/renren/common/validator/group/Group.java
  50. 17 0
      src/main/java/io/renren/common/validator/group/QcloudGroup.java
  51. 17 0
      src/main/java/io/renren/common/validator/group/QiniuGroup.java
  52. 19 0
      src/main/java/io/renren/common/validator/group/UpdateGroup.java
  53. 554 0
      src/main/java/io/renren/common/xss/HTMLFilter.java
  54. 50 0
      src/main/java/io/renren/common/xss/SQLFilter.java
  55. 37 0
      src/main/java/io/renren/common/xss/XssFilter.java
  56. 147 0
      src/main/java/io/renren/common/xss/XssHttpServletRequestWrapper.java
  57. 26 0
      src/main/java/io/renren/config/CorsConfig.java
  58. 49 0
      src/main/java/io/renren/config/FilterConfig.java
  59. 39 0
      src/main/java/io/renren/config/KaptchaConfig.java
  60. 37 0
      src/main/java/io/renren/config/MybatisPlusConfig.java
  61. 65 0
      src/main/java/io/renren/config/RedisConfig.java
  62. 93 0
      src/main/java/io/renren/config/ShiroConfig.java
  63. 61 0
      src/main/java/io/renren/config/SwaggerConfig.java
  64. 35 0
      src/main/java/io/renren/config/TomcatConfig.java
  65. 22 0
      src/main/java/io/renren/modules/app/annotation/Login.java
  66. 25 0
      src/main/java/io/renren/modules/app/annotation/LoginUser.java
  67. 53 0
      src/main/java/io/renren/modules/app/controller/AppTestController.java
  68. 23 0
      src/main/java/io/renren/modules/app/dao/UserDao.java
  69. 54 0
      src/main/java/io/renren/modules/app/entity/UserEntity.java
  70. 33 0
      src/main/java/io/renren/modules/app/form/LoginForm.java
  71. 33 0
      src/main/java/io/renren/modules/app/form/RegisterForm.java
  72. 72 0
      src/main/java/io/renren/modules/app/interceptor/AuthorizationInterceptor.java
  73. 95 0
      src/main/java/io/renren/modules/app/utils/JwtUtils.java
  74. 90 0
      src/main/java/io/renren/modules/aspen/controller/TDashboarddayelecController.java
  75. 90 0
      src/main/java/io/renren/modules/aspen/controller/TDashboarddayeleceightController.java
  76. 17 0
      src/main/java/io/renren/modules/aspen/dao/TDashboarddayelecDao.java
  77. 17 0
      src/main/java/io/renren/modules/aspen/dao/TDashboarddayeleceightDao.java
  78. 510 0
      src/main/java/io/renren/modules/aspen/entity/TDashboarddayelecEntity.java
  79. 174 0
      src/main/java/io/renren/modules/aspen/entity/TDashboarddayeleceightEntity.java
  80. 20 0
      src/main/java/io/renren/modules/aspen/service/TDashboarddayelecService.java
  81. 20 0
      src/main/java/io/renren/modules/aspen/service/TDashboarddayeleceightService.java
  82. 29 0
      src/main/java/io/renren/modules/aspen/service/impl/TDashboarddayelecServiceImpl.java
  83. 29 0
      src/main/java/io/renren/modules/aspen/service/impl/TDashboarddayeleceightServiceImpl.java
  84. 280 0
      src/main/java/io/renren/modules/common/DayGetController.java
  85. 92 0
      src/main/java/io/renren/modules/common/EveryEightGetController.java
  86. 290 0
      src/main/java/io/renren/modules/common/TestPullData.java
  87. 62 0
      src/main/java/io/renren/modules/oss/cloud/AliyunCloudStorageService.java
  88. 94 0
      src/main/java/io/renren/modules/oss/cloud/CloudStorageConfig.java
  89. 78 0
      src/main/java/io/renren/modules/oss/cloud/CloudStorageService.java
  90. 88 0
      src/main/java/io/renren/modules/oss/cloud/QcloudCloudStorageService.java
  91. 77 0
      src/main/java/io/renren/modules/oss/cloud/QiniuCloudStorageService.java
  92. 31 0
      src/main/java/io/renren/modules/sys/controller/AbstractController.java
  93. 23 0
      src/main/java/io/renren/modules/sys/controller/GetPwdController.java
  94. 98 0
      src/main/java/io/renren/modules/sys/controller/SysConfigController.java
  95. 145 0
      src/main/java/io/renren/modules/sys/controller/SysDeptController.java
  96. 97 0
      src/main/java/io/renren/modules/sys/controller/SysDictController.java
  97. 47 0
      src/main/java/io/renren/modules/sys/controller/SysLogController.java
  98. 121 0
      src/main/java/io/renren/modules/sys/controller/SysLoginController.java
  99. 197 0
      src/main/java/io/renren/modules/sys/controller/SysMenuController.java
  100. 168 0
      src/main/java/io/renren/modules/sys/controller/SysPlantController.java

+ 3 - 0
.gitignore

@@ -0,0 +1,3 @@
+/.idea/
+/db/
+/target/classes/

+ 7 - 0
Dockerfile

@@ -0,0 +1,7 @@
+FROM java:8
+EXPOSE 8080
+
+VOLUME /tmp
+ADD renren-fast.jar  /app.jar
+RUN bash -c 'touch /app.jar'
+ENTRYPOINT ["java","-jar","/app.jar"]

+ 191 - 0
LICENSE

@@ -0,0 +1,191 @@
+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:
+
+You must give any other recipients of the Work or Derivative Works a copy of
+this License; and
+You must cause any modified files to carry prominent notices stating that You
+changed the files; and
+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
+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 2019 人人开源
+
+   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.

+ 116 - 0
README.md

@@ -0,0 +1,116 @@
+**项目说明** 
+- renren-fast是一个轻量级的,前后端分离的Java快速开发平台,能快速开发项目并交付【接私活利器】
+- 支持MySQL、Oracle、SQL Server、PostgreSQL等主流数据库
+- 前端地址:https://gitee.com/renrenio/renren-fast-vue
+- 代码生成器:https://gitee.com/renrenio/renren-generator
+
+<br>
+ 
+
+**具有如下特点** 
+- 友好的代码结构及注释,便于阅读及二次开发
+- 实现前后端分离,通过token进行数据交互,前端再也不用关注后端技术
+- 灵活的权限控制,可控制到页面或按钮,满足绝大部分的权限需求
+- 页面交互使用Vue2.x,极大的提高了开发效率
+- 完善的代码生成机制,可在线生成entity、xml、dao、service、vue、sql代码,减少70%以上的开发任务
+- 引入quartz定时任务,可动态完成任务的添加、修改、删除、暂停、恢复及日志查看等功能
+- 引入API模板,根据token作为登录令牌,极大的方便了APP接口开发
+- 引入Hibernate Validator校验框架,轻松实现后端校验
+- 引入云存储服务,已支持:七牛云、阿里云、腾讯云等
+- 引入swagger文档支持,方便编写API接口文档
+<br> 
+
+**项目结构** 
+```
+renren-fast
+├─db  项目SQL语句
+│
+├─common 公共模块
+│  ├─aspect 系统日志
+│  ├─exception 异常处理
+│  ├─validator 后台校验
+│  └─xss XSS过滤
+│ 
+├─config 配置信息
+│ 
+├─modules 功能模块
+│  ├─app API接口模块(APP调用)
+│  ├─job 定时任务模块
+│  ├─oss 文件服务模块
+│  └─sys 权限模块
+│ 
+├─RenrenApplication 项目启动类
+│  
+├──resources 
+│  ├─mapper SQL对应的XML文件
+│  └─static 静态资源
+
+```
+<br> 
+
+**如何交流、反馈、参与贡献?** 
+- 开发文档:https://www.renren.io/guide
+- Git仓库:https://gitee.com/renrenio/renren-fast
+- [人人开源社区](https://www.renren.io/community):https://www.renren.io/community
+- 官方QQ群:324780204、145799952
+- 技术讨论、二次开发等咨询、问题和建议,请移步到人人开源社区,我会在第一时间进行解答和回复!
+- 如需关注项目最新动态,请Watch、Star项目,同时也是对项目最好的支持
+- 微信扫码并关注【人人开源】,获得项目最新动态及更新提醒
+
+<br>
+
+![输入图片说明](https://images.gitee.com/uploads/images/2019/0307/090140_260d672d_63154.jpeg "在这里输入图片标题")
+
+<br> 
+
+
+**技术选型:** 
+- 核心框架:Spring Boot 2.1
+- 安全框架:Apache Shiro 1.4
+- 视图框架:Spring MVC 5.0
+- 持久层框架:MyBatis 3.3
+- 定时器:Quartz 2.3
+- 数据库连接池:Druid 1.0
+- 日志管理:SLF4J 1.7、Log4j
+- 页面交互:Vue2.x 
+<br> 
+
+
+ **后端部署**
+- 通过git下载源码
+- idea、eclipse需安装lombok插件,不然会提示找不到entity的get set方法
+- 创建数据库renren_fast,数据库编码为UTF-8
+- 执行db/mysql.sql文件,初始化数据
+- 修改application-dev.yml,更新MySQL账号和密码
+- Eclipse、IDEA运行RenrenApplication.java,则可启动项目
+- Swagger文档路径:http://localhost:8080/renren-fast/swagger/index.html
+- Swagger注解路径:http://localhost:8080/renren-fast/swagger-ui.html
+
+<br> 
+
+ **前端部署**
+ - 本项目是前后端分离的,还需要部署前端,才能运行起来
+ - 前端下载地址:https://gitee.com/renrenio/renren-fast-vue
+ - 前端部署文档:https://gitee.com/renrenio/renren-fast-vue/wikis/Home
+ - 前端部署完毕,就可以访问项目了,账号:admin,密码:admin
+ 
+ <br>
+
+ **项目演示**
+- 演示地址:http://demo.open.renren.io/renren-fast
+- 账号密码:admin/admin
+<br> 
+
+**接口文档效果图:**
+![输入图片说明](https://images.gitee.com/uploads/images/2018/0728/145341_73ba6f75_63154.jpeg "在这里输入图片标题")
+
+<br> <br> <br> 
+
+
+**效果图:**
+![输入图片说明](https://gitee.com/uploads/images/2018/0505/173115_d3c045ef_63154.jpeg "在这里输入图片标题")
+![输入图片说明](https://gitee.com/uploads/images/2018/0624/225728_b06f72b3_63154.jpeg "在这里输入图片标题")
+![输入图片说明](https://gitee.com/uploads/images/2018/0505/173140_79928d91_63154.jpeg "在这里输入图片标题")
+![输入图片说明](https://gitee.com/uploads/images/2018/0505/173151_12d065db_63154.jpeg "在这里输入图片标题")
+
+<br>

+ 256 - 0
cpms-aspen.iml

@@ -0,0 +1,256 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
+  <component name="FacetManager">
+    <facet type="web" name="Web">
+      <configuration>
+        <webroots />
+      </configuration>
+    </facet>
+    <facet type="jpa" name="JPA">
+      <configuration>
+        <setting name="validation-enabled" value="true" />
+        <datasource-mapping>
+          <factory-entry name="Entities" />
+          <factory-entry name="cpms-aspen" />
+        </datasource-mapping>
+        <naming-strategy-map />
+      </configuration>
+    </facet>
+    <facet type="Spring" name="Spring">
+      <configuration />
+    </facet>
+  </component>
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
+    <output url="file://$MODULE_DIR$/target/classes" />
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
+      <excludeFolder url="file://$MODULE_DIR$/target" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="library" name="Java EE 6-Java EE 6" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.12.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.12.1" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" level="project" />
+    <orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.25" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
+    <orderEntry type="library" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:2.3.2" level="project" />
+    <orderEntry type="library" name="Maven: jakarta.activation:jakarta.activation-api:1.2.1" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter:5.5.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.5.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.5.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-params:5.5.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.5.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.vintage:junit-vintage-engine:5.5.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.5.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-junit-jupiter:3.1.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.13.2" level="project" />
+    <orderEntry type="library" name="Maven: org.hamcrest:hamcrest:2.1" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:3.1.0" level="project" />
+    <orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.10.6" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.10.6" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-core:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.6.3" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.10.2" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.10.2" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.10.2" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.30" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.30" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.30" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-validation:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: jakarta.validation:jakarta.validation-api:2.0.2" level="project" />
+    <orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.18.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.4.1.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-web:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-aop:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.5" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-beans:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.lettuce:lettuce-core:5.2.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-common:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.3.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-configuration-processor:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-boot-starter:3.3.1" level="project" />
+    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus:3.3.1" level="project" />
+    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-extension:3.3.1" level="project" />
+    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-core:3.3.1" level="project" />
+    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-annotation:3.3.1" level="project" />
+    <orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:3.1" level="project" />
+    <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.3" level="project" />
+    <orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.4.2" level="project" />
+    <orderEntry type="library" name="Maven: mysql:mysql-connector-java:8.0.17" level="project" />
+    <orderEntry type="library" name="Maven: com.oracle:ojdbc6:11.2.0.3" level="project" />
+    <orderEntry type="library" name="Maven: com.microsoft.sqlserver:sqljdbc4:4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.postgresql:postgresql:42.2.9" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba:druid-spring-boot-starter:1.1.13" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba:druid:1.1.13" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
+    <orderEntry type="library" name="Maven: org.quartz-scheduler:quartz:2.3.0" level="project" />
+    <orderEntry type="library" name="Maven: com.mchange:mchange-commons-java:0.2.11" level="project" />
+    <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
+    <orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.2.2" level="project" />
+    <orderEntry type="library" name="Maven: commons-io:commons-io:2.5" level="project" />
+    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.10" level="project" />
+    <orderEntry type="library" name="Maven: commons-configuration:commons-configuration:1.10" level="project" />
+    <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-core:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-lang:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-cache:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-crypto-hash:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-crypto-core:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-crypto-cipher:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-config-core:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-config-ogdl:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-event:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-spring:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-web:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: io.jsonwebtoken:jjwt:0.7.0" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.10.2" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.10.2" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.10.2" level="project" />
+    <orderEntry type="library" name="Maven: com.github.axet:kaptcha:0.0.9" level="project" />
+    <orderEntry type="library" name="Maven: com.jhlabs:filters:2.0.235" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.13" level="project" />
+    <orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.13" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-core:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: org.reflections:reflections:0.9.11" level="project" />
+    <orderEntry type="library" name="Maven: org.javassist:javassist:3.21.0-GA" level="project" />
+    <orderEntry type="library" name="Maven: com.google.guava:guava:18.0" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.1.0.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: com.qiniu:qiniu-java-sdk:7.2.23" level="project" />
+    <orderEntry type="library" name="Maven: com.squareup.okhttp3:okhttp:3.14.6" level="project" />
+    <orderEntry type="library" name="Maven: com.squareup.okio:okio:1.17.2" level="project" />
+    <orderEntry type="library" name="Maven: com.aliyun.oss:aliyun-sdk-oss:2.8.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.10" level="project" />
+    <orderEntry type="library" name="Maven: org.jdom:jdom:1.1" level="project" />
+    <orderEntry type="library" name="Maven: com.qcloud:cos_api:4.4" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.13" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpmime:4.5.10" level="project" />
+    <orderEntry type="library" name="Maven: org.json:json:20140107" level="project" />
+    <orderEntry type="library" name="Maven: junit:junit:4.12" level="project" />
+    <orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:2.1" level="project" />
+    <orderEntry type="library" name="Maven: joda-time:joda-time:2.9.9" level="project" />
+    <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.5" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.60" level="project" />
+    <orderEntry type="library" name="Maven: cn.hutool:hutool-all:4.1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.4" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.poi:poi:4.1.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.4" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-math3:3.6.1" level="project" />
+    <orderEntry type="library" name="Maven: com.zaxxer:SparseBitSet:1.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:4.1.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:4.1.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:3.1.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-compress:1.19" level="project" />
+    <orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.06" level="project" />
+    <orderEntry type="library" name="Maven: org.jxls:jxls:2.4.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-jexl:2.1.1" level="project" />
+    <orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.9.2" level="project" />
+    <orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.1" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.30" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
+    <orderEntry type="library" name="Maven: org.jxls:jxls-poi:1.0.13" level="project" />
+    <orderEntry type="library" name="Maven: com.github.ulisesbocchio:jasypt-spring-boot-starter:1.16" level="project" />
+    <orderEntry type="library" name="Maven: com.github.ulisesbocchio:jasypt-spring-boot:1.16" level="project" />
+    <orderEntry type="library" name="Maven: org.jasypt:jasypt:1.9.2" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-mail:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.mail:jakarta.mail:1.6.4" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.activation:jakarta.activation:1.2.1" level="project" />
+    <orderEntry type="library" name="Maven: org.activiti:activiti-engine:6.0.0" level="project" />
+    <orderEntry type="library" name="Maven: org.activiti:activiti-bpmn-converter:6.0.0" level="project" />
+    <orderEntry type="library" name="Maven: org.activiti:activiti-bpmn-model:6.0.0" level="project" />
+    <orderEntry type="library" name="Maven: org.activiti:activiti-process-validation:6.0.0" level="project" />
+    <orderEntry type="library" name="Maven: org.activiti:activiti-image-generator:6.0.0" level="project" />
+    <orderEntry type="library" name="Maven: org.activiti:activiti-dmn-api:6.0.0" level="project" />
+    <orderEntry type="library" name="Maven: org.activiti:activiti-dmn-model:6.0.0" level="project" />
+    <orderEntry type="library" name="Maven: org.activiti:activiti-form-model:6.0.0" level="project" />
+    <orderEntry type="library" name="Maven: org.activiti:activiti-form-api:6.0.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-email:1.4" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.mail:javax.mail:1.5.2" level="project" />
+    <orderEntry type="library" name="Maven: javax.activation:activation:1.1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.9" level="project" />
+    <orderEntry type="library" name="Maven: de.odysseus.juel:juel-api:2.2.7" level="project" />
+    <orderEntry type="library" name="Maven: de.odysseus.juel:juel-impl:2.2.7" level="project" />
+    <orderEntry type="library" name="Maven: de.odysseus.juel:juel-spi:2.2.7" level="project" />
+    <orderEntry type="library" name="Maven: org.activiti:activiti-spring:6.0.0" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-tx:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-orm:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: commons-dbcp:commons-dbcp:1.4" level="project" />
+    <orderEntry type="library" name="Maven: commons-pool:commons-pool:1.6" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web-services:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.xml.messaging.saaj:saaj-impl:1.5.1" level="project" />
+    <orderEntry type="library" name="Maven: jakarta.xml.soap:jakarta.xml.soap-api:1.4.1" level="project" />
+    <orderEntry type="library" name="Maven: org.jvnet.mimepull:mimepull:1.9.12" level="project" />
+    <orderEntry type="library" name="Maven: org.jvnet.staxex:stax-ex:1.8.1" level="project" />
+    <orderEntry type="library" name="Maven: jakarta.xml.ws:jakarta.xml.ws-api:2.3.2" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: jakarta.jws:jakarta.jws-api:1.1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.ws:spring-ws-core:3.0.8.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.ws:spring-xml:3.0.8.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-freemarker:2.1.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.freemarker:freemarker:2.3.29" level="project" />
+    <orderEntry type="library" name="Maven: com.itextpdf:itextpdf:5.4.2" level="project" />
+    <orderEntry type="library" name="Maven: com.itextpdf.tool:xmlworker:5.4.1" level="project" />
+    <orderEntry type="library" name="Maven: com.itextpdf:itext-asian:5.2.0" level="project" />
+    <orderEntry type="library" name="Maven: org.xhtmlrenderer:flying-saucer-pdf:9.0.3" level="project" />
+    <orderEntry type="library" name="Maven: com.lowagie:itext:2.1.7" level="project" />
+    <orderEntry type="library" name="Maven: bouncycastle:bcmail-jdk14:138" level="project" />
+    <orderEntry type="library" name="Maven: bouncycastle:bcprov-jdk14:138" level="project" />
+    <orderEntry type="library" name="Maven: org.bouncycastle:bctsp-jdk14:1.38" level="project" />
+    <orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk14:1.38" level="project" />
+    <orderEntry type="library" name="Maven: org.bouncycastle:bcmail-jdk14:1.38" level="project" />
+    <orderEntry type="library" name="Maven: org.xhtmlrenderer:flying-saucer-core:9.0.3" level="project" />
+    <orderEntry type="library" name="Maven: com.github.stuxuhai:jpinyin:1.1.8" level="project" />
+    <orderEntry type="library" name="Maven: com.opencsv:opencsv:3.8" level="project" />
+  </component>
+</module>

+ 8 - 0
docker-compose.yml

@@ -0,0 +1,8 @@
+version: '2'
+services:
+  renren-fast:
+    image: renren/fast
+    ports:
+      - "8080:8080"
+    environment:
+      - spring.profiles.active=dev

+ 245 - 0
elecdashboard.iml

@@ -0,0 +1,245 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
+  <component name="FacetManager">
+    <facet type="Spring" name="Spring">
+      <configuration />
+    </facet>
+    <facet type="web" name="Web">
+      <configuration>
+        <webroots />
+      </configuration>
+    </facet>
+  </component>
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
+    <output url="file://$MODULE_DIR$/target/classes" />
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
+      <excludeFolder url="file://$MODULE_DIR$/target" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.12.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.12.1" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" level="project" />
+    <orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.25" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
+    <orderEntry type="library" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:2.3.2" level="project" />
+    <orderEntry type="library" name="Maven: jakarta.activation:jakarta.activation-api:1.2.1" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter:5.5.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.5.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.5.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-params:5.5.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.5.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.vintage:junit-vintage-engine:5.5.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.5.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-junit-jupiter:3.1.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.13.2" level="project" />
+    <orderEntry type="library" name="Maven: org.hamcrest:hamcrest:2.1" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:3.1.0" level="project" />
+    <orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.10.6" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.10.6" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-core:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.6.3" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.10.2" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.10.2" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.10.2" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.30" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.30" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.30" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-validation:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: jakarta.validation:jakarta.validation-api:2.0.2" level="project" />
+    <orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.18.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.4.1.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-web:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-aop:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.5" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-beans:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.lettuce:lettuce-core:5.2.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-common:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.3.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-configuration-processor:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-boot-starter:3.3.1" level="project" />
+    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus:3.3.1" level="project" />
+    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-extension:3.3.1" level="project" />
+    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-core:3.3.1" level="project" />
+    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-annotation:3.3.1" level="project" />
+    <orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:3.1" level="project" />
+    <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.3" level="project" />
+    <orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.4.2" level="project" />
+    <orderEntry type="library" name="Maven: mysql:mysql-connector-java:8.0.17" level="project" />
+    <orderEntry type="library" name="Maven: com.oracle:ojdbc6:11.2.0.3" level="project" />
+    <orderEntry type="library" name="Maven: com.microsoft.sqlserver:sqljdbc4:4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.postgresql:postgresql:42.2.9" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba:druid-spring-boot-starter:1.1.13" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba:druid:1.1.13" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
+    <orderEntry type="library" name="Maven: org.quartz-scheduler:quartz:2.3.0" level="project" />
+    <orderEntry type="library" name="Maven: com.mchange:mchange-commons-java:0.2.11" level="project" />
+    <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
+    <orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.2.2" level="project" />
+    <orderEntry type="library" name="Maven: commons-io:commons-io:2.5" level="project" />
+    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.10" level="project" />
+    <orderEntry type="library" name="Maven: commons-configuration:commons-configuration:1.10" level="project" />
+    <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-core:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-lang:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-cache:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-crypto-hash:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-crypto-core:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-crypto-cipher:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-config-core:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-config-ogdl:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-event:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-spring:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-web:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: io.jsonwebtoken:jjwt:0.7.0" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.10.2" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.10.2" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.10.2" level="project" />
+    <orderEntry type="library" name="Maven: com.github.axet:kaptcha:0.0.9" level="project" />
+    <orderEntry type="library" name="Maven: com.jhlabs:filters:2.0.235" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.13" level="project" />
+    <orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.13" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-core:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: org.reflections:reflections:0.9.11" level="project" />
+    <orderEntry type="library" name="Maven: org.javassist:javassist:3.21.0-GA" level="project" />
+    <orderEntry type="library" name="Maven: com.google.guava:guava:18.0" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.1.0.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: com.qiniu:qiniu-java-sdk:7.2.23" level="project" />
+    <orderEntry type="library" name="Maven: com.squareup.okhttp3:okhttp:3.14.6" level="project" />
+    <orderEntry type="library" name="Maven: com.squareup.okio:okio:1.17.2" level="project" />
+    <orderEntry type="library" name="Maven: com.aliyun.oss:aliyun-sdk-oss:2.8.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.10" level="project" />
+    <orderEntry type="library" name="Maven: org.jdom:jdom:1.1" level="project" />
+    <orderEntry type="library" name="Maven: com.qcloud:cos_api:4.4" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.13" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpmime:4.5.10" level="project" />
+    <orderEntry type="library" name="Maven: org.json:json:20140107" level="project" />
+    <orderEntry type="library" name="Maven: junit:junit:4.12" level="project" />
+    <orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:2.1" level="project" />
+    <orderEntry type="library" name="Maven: joda-time:joda-time:2.9.9" level="project" />
+    <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.5" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.60" level="project" />
+    <orderEntry type="library" name="Maven: cn.hutool:hutool-all:4.1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.4" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.poi:poi:4.1.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.4" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-math3:3.6.1" level="project" />
+    <orderEntry type="library" name="Maven: com.zaxxer:SparseBitSet:1.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:4.1.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:4.1.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:3.1.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-compress:1.19" level="project" />
+    <orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.06" level="project" />
+    <orderEntry type="library" name="Maven: org.jxls:jxls:2.4.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-jexl:2.1.1" level="project" />
+    <orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.9.2" level="project" />
+    <orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.1" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.30" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
+    <orderEntry type="library" name="Maven: org.jxls:jxls-poi:1.0.13" level="project" />
+    <orderEntry type="library" name="Maven: com.github.ulisesbocchio:jasypt-spring-boot-starter:1.16" level="project" />
+    <orderEntry type="library" name="Maven: com.github.ulisesbocchio:jasypt-spring-boot:1.16" level="project" />
+    <orderEntry type="library" name="Maven: org.jasypt:jasypt:1.9.2" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-mail:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.mail:jakarta.mail:1.6.4" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.activation:jakarta.activation:1.2.1" level="project" />
+    <orderEntry type="library" name="Maven: org.activiti:activiti-engine:6.0.0" level="project" />
+    <orderEntry type="library" name="Maven: org.activiti:activiti-bpmn-converter:6.0.0" level="project" />
+    <orderEntry type="library" name="Maven: org.activiti:activiti-bpmn-model:6.0.0" level="project" />
+    <orderEntry type="library" name="Maven: org.activiti:activiti-process-validation:6.0.0" level="project" />
+    <orderEntry type="library" name="Maven: org.activiti:activiti-image-generator:6.0.0" level="project" />
+    <orderEntry type="library" name="Maven: org.activiti:activiti-dmn-api:6.0.0" level="project" />
+    <orderEntry type="library" name="Maven: org.activiti:activiti-dmn-model:6.0.0" level="project" />
+    <orderEntry type="library" name="Maven: org.activiti:activiti-form-model:6.0.0" level="project" />
+    <orderEntry type="library" name="Maven: org.activiti:activiti-form-api:6.0.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-email:1.4" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.mail:javax.mail:1.5.2" level="project" />
+    <orderEntry type="library" name="Maven: javax.activation:activation:1.1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.9" level="project" />
+    <orderEntry type="library" name="Maven: de.odysseus.juel:juel-api:2.2.7" level="project" />
+    <orderEntry type="library" name="Maven: de.odysseus.juel:juel-impl:2.2.7" level="project" />
+    <orderEntry type="library" name="Maven: de.odysseus.juel:juel-spi:2.2.7" level="project" />
+    <orderEntry type="library" name="Maven: org.activiti:activiti-spring:6.0.0" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-tx:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-orm:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: commons-dbcp:commons-dbcp:1.4" level="project" />
+    <orderEntry type="library" name="Maven: commons-pool:commons-pool:1.6" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web-services:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.xml.messaging.saaj:saaj-impl:1.5.1" level="project" />
+    <orderEntry type="library" name="Maven: jakarta.xml.soap:jakarta.xml.soap-api:1.4.1" level="project" />
+    <orderEntry type="library" name="Maven: org.jvnet.mimepull:mimepull:1.9.12" level="project" />
+    <orderEntry type="library" name="Maven: org.jvnet.staxex:stax-ex:1.8.1" level="project" />
+    <orderEntry type="library" name="Maven: jakarta.xml.ws:jakarta.xml.ws-api:2.3.2" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: jakarta.jws:jakarta.jws-api:1.1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.ws:spring-ws-core:3.0.8.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.ws:spring-xml:3.0.8.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-freemarker:2.1.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.freemarker:freemarker:2.3.29" level="project" />
+    <orderEntry type="library" name="Maven: com.itextpdf:itextpdf:5.4.2" level="project" />
+    <orderEntry type="library" name="Maven: com.itextpdf.tool:xmlworker:5.4.1" level="project" />
+    <orderEntry type="library" name="Maven: com.itextpdf:itext-asian:5.2.0" level="project" />
+    <orderEntry type="library" name="Maven: org.xhtmlrenderer:flying-saucer-pdf:9.0.3" level="project" />
+    <orderEntry type="library" name="Maven: com.lowagie:itext:2.1.7" level="project" />
+    <orderEntry type="library" name="Maven: bouncycastle:bcmail-jdk14:138" level="project" />
+    <orderEntry type="library" name="Maven: bouncycastle:bcprov-jdk14:138" level="project" />
+    <orderEntry type="library" name="Maven: org.bouncycastle:bctsp-jdk14:1.38" level="project" />
+    <orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk14:1.38" level="project" />
+    <orderEntry type="library" name="Maven: org.bouncycastle:bcmail-jdk14:1.38" level="project" />
+    <orderEntry type="library" name="Maven: org.xhtmlrenderer:flying-saucer-core:9.0.3" level="project" />
+    <orderEntry type="library" name="Maven: com.github.stuxuhai:jpinyin:1.1.8" level="project" />
+    <orderEntry type="library" name="Maven: com.opencsv:opencsv:3.8" level="project" />
+  </component>
+</module>

BIN
lib/javax.ejb.jar


BIN
lib/javax.jms.jar


BIN
lib/javax.persistence.jar


BIN
lib/javax.resource.jar


BIN
lib/javax.servlet.jsp.jar


BIN
lib/javax.servlet.jsp.jstl.jar


BIN
lib/javax.transaction.jar


+ 245 - 0
newaspen.iml

@@ -0,0 +1,245 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
+  <component name="FacetManager">
+    <facet type="Spring" name="Spring">
+      <configuration />
+    </facet>
+    <facet type="web" name="Web">
+      <configuration>
+        <webroots />
+      </configuration>
+    </facet>
+  </component>
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
+    <output url="file://$MODULE_DIR$/target/classes" />
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
+      <excludeFolder url="file://$MODULE_DIR$/target" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.12.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.12.1" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" level="project" />
+    <orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.25" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
+    <orderEntry type="library" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:2.3.2" level="project" />
+    <orderEntry type="library" name="Maven: jakarta.activation:jakarta.activation-api:1.2.1" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter:5.5.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.5.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.5.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-params:5.5.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.5.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.vintage:junit-vintage-engine:5.5.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.5.2" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-junit-jupiter:3.1.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.13.2" level="project" />
+    <orderEntry type="library" name="Maven: org.hamcrest:hamcrest:2.1" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:3.1.0" level="project" />
+    <orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.10.6" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.10.6" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-core:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.6.3" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.10.2" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.10.2" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.10.2" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.30" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.30" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.30" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-validation:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: jakarta.validation:jakarta.validation-api:2.0.2" level="project" />
+    <orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.18.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.4.1.Final" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-web:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-aop:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.5" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-beans:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-context:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.lettuce:lettuce-core:5.2.1.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-common:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.45.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.3.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-configuration-processor:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-boot-starter:3.3.1" level="project" />
+    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus:3.3.1" level="project" />
+    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-extension:3.3.1" level="project" />
+    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-core:3.3.1" level="project" />
+    <orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-annotation:3.3.1" level="project" />
+    <orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:3.1" level="project" />
+    <orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.3" level="project" />
+    <orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.0.3" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.4.2" level="project" />
+    <orderEntry type="library" name="Maven: mysql:mysql-connector-java:8.0.17" level="project" />
+    <orderEntry type="library" name="Maven: com.oracle:ojdbc6:11.2.0.3" level="project" />
+    <orderEntry type="library" name="Maven: com.microsoft.sqlserver:sqljdbc4:4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.postgresql:postgresql:42.2.9" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba:druid-spring-boot-starter:1.1.13" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba:druid:1.1.13" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
+    <orderEntry type="library" name="Maven: org.quartz-scheduler:quartz:2.3.0" level="project" />
+    <orderEntry type="library" name="Maven: com.mchange:mchange-commons-java:0.2.11" level="project" />
+    <orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
+    <orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.2.2" level="project" />
+    <orderEntry type="library" name="Maven: commons-io:commons-io:2.5" level="project" />
+    <orderEntry type="library" name="Maven: commons-codec:commons-codec:1.10" level="project" />
+    <orderEntry type="library" name="Maven: commons-configuration:commons-configuration:1.10" level="project" />
+    <orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-core:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-lang:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-cache:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-crypto-hash:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-crypto-core:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-crypto-cipher:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-config-core:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-config-ogdl:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-event:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-spring:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.shiro:shiro-web:1.4.0" level="project" />
+    <orderEntry type="library" name="Maven: io.jsonwebtoken:jjwt:0.7.0" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.10.2" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.10.2" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.10.2" level="project" />
+    <orderEntry type="library" name="Maven: com.github.axet:kaptcha:0.0.9" level="project" />
+    <orderEntry type="library" name="Maven: com.jhlabs:filters:2.0.235" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.13" level="project" />
+    <orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.13" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-core:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: org.reflections:reflections:0.9.11" level="project" />
+    <orderEntry type="library" name="Maven: org.javassist:javassist:3.21.0-GA" level="project" />
+    <orderEntry type="library" name="Maven: com.google.guava:guava:18.0" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.1.0.Final" level="project" />
+    <orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.7.0" level="project" />
+    <orderEntry type="library" name="Maven: com.qiniu:qiniu-java-sdk:7.2.23" level="project" />
+    <orderEntry type="library" name="Maven: com.squareup.okhttp3:okhttp:3.14.6" level="project" />
+    <orderEntry type="library" name="Maven: com.squareup.okio:okio:1.17.2" level="project" />
+    <orderEntry type="library" name="Maven: com.aliyun.oss:aliyun-sdk-oss:2.8.3" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.10" level="project" />
+    <orderEntry type="library" name="Maven: org.jdom:jdom:1.1" level="project" />
+    <orderEntry type="library" name="Maven: com.qcloud:cos_api:4.4" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.13" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpmime:4.5.10" level="project" />
+    <orderEntry type="library" name="Maven: org.json:json:20140107" level="project" />
+    <orderEntry type="library" name="Maven: junit:junit:4.12" level="project" />
+    <orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:2.1" level="project" />
+    <orderEntry type="library" name="Maven: joda-time:joda-time:2.9.9" level="project" />
+    <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.5" level="project" />
+    <orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.60" level="project" />
+    <orderEntry type="library" name="Maven: cn.hutool:hutool-all:4.1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.4" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.poi:poi:4.1.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.4" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-math3:3.6.1" level="project" />
+    <orderEntry type="library" name="Maven: com.zaxxer:SparseBitSet:1.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:4.1.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:4.1.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:3.1.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-compress:1.19" level="project" />
+    <orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.06" level="project" />
+    <orderEntry type="library" name="Maven: org.jxls:jxls:2.4.2" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-jexl:2.1.1" level="project" />
+    <orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.9.2" level="project" />
+    <orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.1" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.30" level="project" />
+    <orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
+    <orderEntry type="library" name="Maven: org.jxls:jxls-poi:1.0.13" level="project" />
+    <orderEntry type="library" name="Maven: com.github.ulisesbocchio:jasypt-spring-boot-starter:1.16" level="project" />
+    <orderEntry type="library" name="Maven: com.github.ulisesbocchio:jasypt-spring-boot:1.16" level="project" />
+    <orderEntry type="library" name="Maven: org.jasypt:jasypt:1.9.2" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-mail:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.mail:jakarta.mail:1.6.4" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.activation:jakarta.activation:1.2.1" level="project" />
+    <orderEntry type="library" name="Maven: org.activiti:activiti-engine:6.0.0" level="project" />
+    <orderEntry type="library" name="Maven: org.activiti:activiti-bpmn-converter:6.0.0" level="project" />
+    <orderEntry type="library" name="Maven: org.activiti:activiti-bpmn-model:6.0.0" level="project" />
+    <orderEntry type="library" name="Maven: org.activiti:activiti-process-validation:6.0.0" level="project" />
+    <orderEntry type="library" name="Maven: org.activiti:activiti-image-generator:6.0.0" level="project" />
+    <orderEntry type="library" name="Maven: org.activiti:activiti-dmn-api:6.0.0" level="project" />
+    <orderEntry type="library" name="Maven: org.activiti:activiti-dmn-model:6.0.0" level="project" />
+    <orderEntry type="library" name="Maven: org.activiti:activiti-form-model:6.0.0" level="project" />
+    <orderEntry type="library" name="Maven: org.activiti:activiti-form-api:6.0.0" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-email:1.4" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.mail:javax.mail:1.5.2" level="project" />
+    <orderEntry type="library" name="Maven: javax.activation:activation:1.1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.9" level="project" />
+    <orderEntry type="library" name="Maven: de.odysseus.juel:juel-api:2.2.7" level="project" />
+    <orderEntry type="library" name="Maven: de.odysseus.juel:juel-impl:2.2.7" level="project" />
+    <orderEntry type="library" name="Maven: de.odysseus.juel:juel-spi:2.2.7" level="project" />
+    <orderEntry type="library" name="Maven: org.activiti:activiti-spring:6.0.0" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-tx:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-orm:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: commons-dbcp:commons-dbcp:1.4" level="project" />
+    <orderEntry type="library" name="Maven: commons-pool:commons-pool:1.6" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web-services:2.2.4.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.xml.messaging.saaj:saaj-impl:1.5.1" level="project" />
+    <orderEntry type="library" name="Maven: jakarta.xml.soap:jakarta.xml.soap-api:1.4.1" level="project" />
+    <orderEntry type="library" name="Maven: org.jvnet.mimepull:mimepull:1.9.12" level="project" />
+    <orderEntry type="library" name="Maven: org.jvnet.staxex:stax-ex:1.8.1" level="project" />
+    <orderEntry type="library" name="Maven: jakarta.xml.ws:jakarta.xml.ws-api:2.3.2" level="project" />
+    <orderEntry type="library" scope="RUNTIME" name="Maven: jakarta.jws:jakarta.jws-api:1.1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.2.3.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.ws:spring-ws-core:3.0.8.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.ws:spring-xml:3.0.8.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-freemarker:2.1.2.RELEASE" level="project" />
+    <orderEntry type="library" name="Maven: org.freemarker:freemarker:2.3.29" level="project" />
+    <orderEntry type="library" name="Maven: com.itextpdf:itextpdf:5.4.2" level="project" />
+    <orderEntry type="library" name="Maven: com.itextpdf.tool:xmlworker:5.4.1" level="project" />
+    <orderEntry type="library" name="Maven: com.itextpdf:itext-asian:5.2.0" level="project" />
+    <orderEntry type="library" name="Maven: org.xhtmlrenderer:flying-saucer-pdf:9.0.3" level="project" />
+    <orderEntry type="library" name="Maven: com.lowagie:itext:2.1.7" level="project" />
+    <orderEntry type="library" name="Maven: bouncycastle:bcmail-jdk14:138" level="project" />
+    <orderEntry type="library" name="Maven: bouncycastle:bcprov-jdk14:138" level="project" />
+    <orderEntry type="library" name="Maven: org.bouncycastle:bctsp-jdk14:1.38" level="project" />
+    <orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk14:1.38" level="project" />
+    <orderEntry type="library" name="Maven: org.bouncycastle:bcmail-jdk14:1.38" level="project" />
+    <orderEntry type="library" name="Maven: org.xhtmlrenderer:flying-saucer-core:9.0.3" level="project" />
+    <orderEntry type="library" name="Maven: com.github.stuxuhai:jpinyin:1.1.8" level="project" />
+    <orderEntry type="library" name="Maven: com.opencsv:opencsv:3.8" level="project" />
+  </component>
+</module>

+ 448 - 0
pom.xml

@@ -0,0 +1,448 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>io.renren</groupId>
+    <artifactId>newaspen</artifactId>
+    <version>1.0.1</version>
+    <packaging>jar</packaging>
+    <description>newaspen</description>
+
+    <parent>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-starter-parent</artifactId>
+        <version>2.2.4.RELEASE</version>
+    </parent>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+        <java.version>1.8</java.version>
+        <mybatisplus.version>3.3.1</mybatisplus.version>
+        <mysql.version>8.0.17</mysql.version>
+        <!--		<mysql.version>5.1.35</mysql.version>-->
+        <mssql.version>4.0</mssql.version>
+        <oracle.version>11.2.0.3</oracle.version>
+        <druid.version>1.1.13</druid.version>
+        <quartz.version>2.3.0</quartz.version>
+        <commons.lang.version>2.6</commons.lang.version>
+        <commons.fileupload.version>1.2.2</commons.fileupload.version>
+        <commons.io.version>2.5</commons.io.version>
+        <commons.codec.version>1.10</commons.codec.version>
+        <commons.configuration.version>1.10</commons.configuration.version>
+        <shiro.version>1.4.0</shiro.version>
+        <jwt.version>0.7.0</jwt.version>
+        <kaptcha.version>0.0.9</kaptcha.version>
+        <qiniu.version>7.2.23</qiniu.version>
+        <aliyun.oss.version>2.8.3</aliyun.oss.version>
+        <qcloud.cos.version>4.4</qcloud.cos.version>
+        <swagger.version>2.7.0</swagger.version>
+        <joda.time.version>2.9.9</joda.time.version>
+        <gson.version>2.8.5</gson.version>
+        <fastjson.version>1.2.60</fastjson.version>
+        <hutool.version>4.1.1</hutool.version>
+        <lombok.version>1.18.4</lombok.version>
+        <jxls.version>2.4.2</jxls.version>
+        <jxls-poi.version>1.0.13</jxls-poi.version>
+        <jxls-reader.version>2.0.3</jxls-reader.version>
+
+        <!--wagon plugin 配置-->
+        <service-path>/work/renren</service-path>
+        <pack-name>${project.artifactId}-${project.version}.jar</pack-name>
+        <remote-addr>192.168.1.10:22</remote-addr>
+        <remote-username>root</remote-username>
+        <remote-passwd>123456</remote-passwd>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-aop</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-context-support</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-redis</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-configuration-processor</artifactId>
+            <optional>true</optional>
+        </dependency>
+        <!--<dependency>-->
+        <!--<groupId>org.springframework.boot</groupId>-->
+        <!--<artifactId>spring-boot-devtools</artifactId>-->
+        <!--<optional>true</optional>-->
+        <!--</dependency>-->
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-boot-starter</artifactId>
+            <version>${mybatisplus.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>com.baomidou</groupId>
+                    <artifactId>mybatis-plus-generator</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+            <version>${mysql.version}</version>
+        </dependency>
+        <!--oracle驱动-->
+        <dependency>
+            <groupId>com.oracle</groupId>
+            <artifactId>ojdbc6</artifactId>
+            <version>${oracle.version}</version>
+        </dependency>
+        <!--mssql驱动-->
+        <dependency>
+            <groupId>com.microsoft.sqlserver</groupId>
+            <artifactId>sqljdbc4</artifactId>
+            <version>${mssql.version}</version>
+        </dependency>
+        <!--postgresql驱动-->
+        <dependency>
+            <groupId>org.postgresql</groupId>
+            <artifactId>postgresql</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>druid-spring-boot-starter</artifactId>
+            <version>${druid.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.quartz-scheduler</groupId>
+            <artifactId>quartz</artifactId>
+            <version>${quartz.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>com.mchange</groupId>
+                    <artifactId>c3p0</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
+            <version>${commons.lang.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-fileupload</groupId>
+            <artifactId>commons-fileupload</artifactId>
+            <version>${commons.fileupload.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+            <version>${commons.io.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-codec</groupId>
+            <artifactId>commons-codec</artifactId>
+            <version>${commons.codec.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-configuration</groupId>
+            <artifactId>commons-configuration</artifactId>
+            <version>${commons.configuration.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shiro</groupId>
+            <artifactId>shiro-core</artifactId>
+            <version>${shiro.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.shiro</groupId>
+            <artifactId>shiro-spring</artifactId>
+            <version>${shiro.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.jsonwebtoken</groupId>
+            <artifactId>jjwt</artifactId>
+            <version>${jwt.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.github.axet</groupId>
+            <artifactId>kaptcha</artifactId>
+            <version>${kaptcha.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger2</artifactId>
+            <version>${swagger.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger-ui</artifactId>
+            <version>${swagger.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.qiniu</groupId>
+            <artifactId>qiniu-java-sdk</artifactId>
+            <version>${qiniu.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.aliyun.oss</groupId>
+            <artifactId>aliyun-sdk-oss</artifactId>
+            <version>${aliyun.oss.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.qcloud</groupId>
+            <artifactId>cos_api</artifactId>
+            <version>${qcloud.cos.version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-log4j12</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>joda-time</groupId>
+            <artifactId>joda-time</artifactId>
+            <version>${joda.time.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.google.code.gson</groupId>
+            <artifactId>gson</artifactId>
+            <version>${gson.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+            <version>${fastjson.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-all</artifactId>
+            <version>${hutool.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <version>${lombok.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi</artifactId>
+            <version>4.1.2</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi-ooxml</artifactId>
+            <version>4.1.2</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.jxls</groupId>
+            <artifactId>jxls</artifactId>
+            <version>${jxls.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jxls</groupId>
+            <artifactId>jxls-poi</artifactId>
+            <version>${jxls-poi.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.github.ulisesbocchio</groupId>
+            <artifactId>jasypt-spring-boot-starter</artifactId>
+            <version>1.16</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-mail</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.activiti</groupId>
+            <artifactId>activiti-engine</artifactId>
+            <version>6.0.0</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.mybatis</groupId>
+                    <artifactId>mybatis</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.activiti</groupId>
+            <artifactId>activiti-spring</artifactId>
+            <version>6.0.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web-services</artifactId>
+        </dependency>
+
+        <!--framework-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-freemarker</artifactId>
+            <version>2.1.2.RELEASE</version>
+        </dependency>
+        <dependency>
+            <groupId>com.itextpdf</groupId>
+            <artifactId>itextpdf</artifactId>
+            <version>5.4.2</version>
+        </dependency>
+        <dependency>
+            <groupId>com.itextpdf.tool</groupId>
+            <artifactId>xmlworker</artifactId>
+            <version>5.4.1</version>
+        </dependency>
+        <dependency>
+            <groupId>com.itextpdf</groupId>
+            <artifactId>itext-asian</artifactId>
+            <version>5.2.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.xhtmlrenderer</groupId>
+            <artifactId>flying-saucer-pdf</artifactId>
+            <version>9.0.3</version>
+        </dependency>
+
+        <!--jpinyin-->
+        <dependency>
+            <groupId>com.github.stuxuhai</groupId>
+            <artifactId>jpinyin</artifactId>
+            <version>1.1.8</version>
+        </dependency>
+
+        <!-- csv -->
+        <dependency>
+            <groupId>com.opencsv</groupId>
+            <artifactId>opencsv</artifactId>
+            <version>3.8</version>
+        </dependency>
+    </dependencies>
+
+
+
+    <build>
+        <finalName>${project.artifactId}</finalName>
+        <extensions>
+            <extension>
+                <groupId>org.apache.maven.wagon</groupId>
+                <artifactId>wagon-ssh</artifactId>
+                <version>2.8</version>
+            </extension>
+        </extensions>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    <fork>true</fork>
+                </configuration>
+            </plugin>
+            <!-- resource插件 -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-resources-plugin</artifactId>
+                <version>2.6</version>
+                <configuration>
+                    <encoding>UTF-8</encoding>
+                </configuration>
+            </plugin>
+            <!-- 跳过单元测试 -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <skipTests>true</skipTests>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>wagon-maven-plugin</artifactId>
+                <version>1.0</version>
+                <configuration>
+                    <fromFile>target/${pack-name}</fromFile>
+                    <url><![CDATA[scp://${remote-username}:${remote-passwd}@${remote-addr}${service-path}]]></url>
+                    <commands>
+                        <!-- Kill Old Process -->
+                        <command>kill -9 `ps -ef |grep ${project.artifactId}.jar|grep -v "grep" |awk '{print $2}'`
+                        </command>
+                        <!-- Restart jar package,write result into renren.log -->
+                        <command>
+                            <![CDATA[nohup java -jar ${service-path}/${pack-name} --spring.profiles.active=test > ${service-path}/renren.log 2>&1 & ]]></command>
+                        <command><![CDATA[netstat -nptl]]></command>
+                        <command><![CDATA[ps -ef | grep java | grep -v grep]]></command>
+                    </commands>
+                    <!-- 运行命令 mvn clean package wagon:upload-single wagon:sshexec-->
+                    <displayCommandOutputs>true</displayCommandOutputs>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>com.spotify</groupId>
+                <artifactId>docker-maven-plugin</artifactId>
+                <version>0.4.14</version>
+                <!--<executions>-->
+                <!--<execution>-->
+                <!--<phase>package</phase>-->
+                <!--<goals>-->
+                <!--<goal>build</goal>-->
+                <!--</goals>-->
+                <!--</execution>-->
+                <!--</executions>-->
+                <configuration>
+                    <imageName>renren/fast</imageName>
+                    <dockerDirectory>${project.basedir}</dockerDirectory>
+                    <resources>
+                        <resource>
+                            <targetPath>/</targetPath>
+                            <directory>${project.build.directory}</directory>
+                            <include>${project.build.finalName}.jar</include>
+                        </resource>
+                    </resources>
+                </configuration>
+                <!-- 运行命令 mvn clean package docker:build 打包并生成docker镜像 -->
+            </plugin>
+        </plugins>
+    </build>
+
+    <repositories>
+        <repository>
+            <id>public</id>
+            <name>aliyun nexus</name>
+            <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
+            <releases>
+                <enabled>true</enabled>
+            </releases>
+        </repository>
+    </repositories>
+    <pluginRepositories>
+        <pluginRepository>
+            <id>public</id>
+            <name>aliyun nexus</name>
+            <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
+            <releases>
+                <enabled>true</enabled>
+            </releases>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+        </pluginRepository>
+    </pluginRepositories>
+
+</project>

+ 24 - 0
src/main/java/io/renren/RenrenApplication.java

@@ -0,0 +1,24 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
+import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
+
+
+@SpringBootApplication( exclude={SecurityAutoConfiguration.class,DataSourceAutoConfiguration.class})   // springboot2.0集成activiti6要加后面这个,因为6比较老版本
+public class RenrenApplication {
+
+    public static void main(String[] args) {
+        SpringApplication.run(RenrenApplication.class, args);
+    }
+
+}

+ 37 - 0
src/main/java/io/renren/common/annotation/DataFilter.java

@@ -0,0 +1,37 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.common.annotation;
+
+import java.lang.annotation.*;
+
+/**
+ * 数据过滤
+ *
+ * @author Mark 735032128@qq.com
+ */
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface DataFilter {
+    /**  表的别名 */
+    String tableAlias() default "";
+
+    /**  true:没有本部门数据权限,也能查询本人数据 */
+    boolean user() default true;
+
+    /**  true:拥有子部门数据权限 */
+    boolean subDept() default false;
+
+    /**  部门ID */
+    String deptId() default "dept_id";
+
+    /**  用户ID */
+    String userId() default "user_id";
+}
+

+ 40 - 0
src/main/java/io/renren/common/annotation/PlantDataFilter.java

@@ -0,0 +1,40 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.common.annotation;
+
+import java.lang.annotation.*;
+
+/**
+ * 数据过滤
+ *
+ * @author Mark 735032128@qq.com
+ */
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface PlantDataFilter {
+    /**  表的别名 */
+    String tableAlias() default "";
+
+    /**  true:没有本部门数据权限,也能查询本人数据 */
+    boolean user() default true;
+
+    /**  true:拥有子部门数据权限 */
+    boolean subDept() default false;
+
+    /**  部门ID */
+    String deptId() default "dept_id";
+
+    /**  部门ID */
+    String plantCode() default "plant_code";
+
+    /**  用户ID */
+    String userId() default "user_id";
+}
+

+ 28 - 0
src/main/java/io/renren/common/annotation/SysLog.java

@@ -0,0 +1,28 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.common.annotation;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * 系统日志注解
+ *
+ * @author Mark 735032128@qq.com
+ */
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface SysLog {
+
+    String value() default "";
+}

+ 46 - 0
src/main/java/io/renren/common/aspect/RedisAspect.java

@@ -0,0 +1,46 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.common.aspect;
+
+import io.renren.common.exception.RRException;
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * Redis切面处理类
+ *
+ * @author Mark 735032128@qq.com
+ */
+@Aspect
+@Configuration
+public class RedisAspect {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+    //是否开启redis缓存  true开启   false关闭
+    @Value("${spring.redis.open: false}")
+    private boolean open;
+
+    @Around("execution(* io.renren.common.utils.RedisUtils.*(..))")
+    public Object around(ProceedingJoinPoint point) throws Throwable {
+        Object result = null;
+        if (open) {
+            try {
+                result = point.proceed();
+            } catch (Exception e) {
+                logger.error("redis error", e);
+                throw new RRException("Redis服务异常");
+            }
+        }
+        return result;
+    }
+}

+ 47 - 0
src/main/java/io/renren/common/constant/JxlsTemplateEnum.java

@@ -0,0 +1,47 @@
+package io.renren.common.constant;
+
+
+import io.renren.common.utils.export.JxlsTemplate;
+
+/**
+ * Created by xk on 2017/12/4 0004.
+ */
+public enum JxlsTemplateEnum implements JxlsTemplate {
+
+    DONE_TASK_LIST("/template/doneTaskTest.xlsx", "审批请单.xlsx"),
+    DEV_YLRQ_LIST("/template/ylrqExport.xlsx", "压力容器设备请单.xlsx"),
+    DEV_YLGD_LIST("/template/ylgdExport.xlsx", "压力管道设备请单.xlsx"),
+    DEV_DZSB_LIST("/template/dzsbExport.xlsx", "起重机械设备请单.xlsx"),
+    DEV_GL_LIST("/template/glExport.xlsx", "锅炉设备请单.xlsx"),
+    DEV_DT_LIST("/template/dtExport.xlsx", "电梯设备请单.xlsx"),
+    DEV_CC_LIST("/template/ccExport.xlsx", "叉车设备请单.xlsx"),
+    DEV_TANK_LIST("/template/tankExport.xlsx", "常压罐设备请单.xlsx"),
+    DEV_YLRQ_UPDATE("/template/ylrqInspectionInfo.xlsx", "压力容器检验信息更新清单.xlsx"),
+    DEV_YLGD_UPDATE("/template/ylgdInspectionInfo.xlsx", "压力管道检验信息更新清单.xlsx"),
+    DEV_DZSB_UPDATE("/template/dzsbInspectionInfo.xlsx", "起重机械检验信息更新清单.xlsx"),
+    DEV_GL_UPDATE("/template/glInspectionInfo.xlsx", "锅炉设备检验信息更新清单.xlsx"),
+    DEV_DT_UPDATE("/template/dtInspectionInfo.xlsx", "电梯设备检验信息更新清单.xlsx"),
+    DEV_CC_UPDATE("/template/ccInspectionInfo.xlsx", "叉车设备检验信息更新清单.xlsx");
+
+    private String path;
+    private String name;
+
+    JxlsTemplateEnum(String path, String name) {
+        this.path = path;
+        this.name = name;
+    }
+
+    @Override
+    public String getPath() {
+        return this.path;
+    }
+
+    @Override
+    public String getName() {
+        return this.name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+}

+ 27 - 0
src/main/java/io/renren/common/constant/JxlsTemplateFree.java

@@ -0,0 +1,27 @@
+package io.renren.common.constant;
+
+
+import io.renren.common.utils.export.JxlsTemplate;
+
+public class JxlsTemplateFree implements JxlsTemplate {
+    private String path;
+    private String name;
+
+    public void setPath(String path) {
+        this.path = path;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    @Override
+    public String getPath() {
+        return this.path;
+    }
+
+    @Override
+    public String getName() {
+        return this.name;
+    }
+}

+ 61 - 0
src/main/java/io/renren/common/exception/RRException.java

@@ -0,0 +1,61 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.common.exception;
+
+/**
+ * 自定义异常
+ *
+ * @author Mark 735032128@qq.com
+ */
+public class RRException extends RuntimeException {
+    private static final long serialVersionUID = 1L;
+
+    private String msg;
+    private int code = 500;
+
+    public RRException(String msg) {
+        super(msg);
+        this.msg = msg;
+    }
+
+    public RRException(String msg, Throwable e) {
+        super(msg, e);
+        this.msg = msg;
+    }
+
+    public RRException(String msg, int code) {
+        super(msg);
+        this.msg = msg;
+        this.code = code;
+    }
+
+    public RRException(String msg, int code, Throwable e) {
+        super(msg, e);
+        this.msg = msg;
+        this.code = code;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+
+    public int getCode() {
+        return code;
+    }
+
+    public void setCode(int code) {
+        this.code = code;
+    }
+
+
+}

+ 64 - 0
src/main/java/io/renren/common/exception/RRExceptionHandler.java

@@ -0,0 +1,64 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.common.exception;
+
+import io.renren.common.utils.R;
+import org.apache.shiro.authz.AuthorizationException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.dao.DuplicateKeyException;
+import org.springframework.web.bind.annotation.ExceptionHandler;
+import org.springframework.web.bind.annotation.RestControllerAdvice;
+import org.springframework.web.servlet.NoHandlerFoundException;
+
+/**
+ * 异常处理器
+ *
+ * @author Mark 735032128@qq.com
+ */
+@RestControllerAdvice
+public class RRExceptionHandler {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    /**
+     * 处理自定义异常
+     */
+    @ExceptionHandler(RRException.class)
+    public R handleRRException(RRException e) {
+        R r = new R();
+        r.put("code", e.getCode());
+        r.put("msg", e.getMessage());
+
+        return r;
+    }
+
+    @ExceptionHandler(NoHandlerFoundException.class)
+    public R handlerNoFoundException(Exception e) {
+        logger.error(e.getMessage(), e);
+        return R.error(404, "路径不存在,请检查路径是否正确");
+    }
+
+    @ExceptionHandler(DuplicateKeyException.class)
+    public R handleDuplicateKeyException(DuplicateKeyException e) {
+        logger.error(e.getMessage(), e);
+        return R.error("数据库中已存在该记录");
+    }
+
+    @ExceptionHandler(AuthorizationException.class)
+    public R handleAuthorizationException(AuthorizationException e) {
+        logger.error(e.getMessage(), e);
+        return R.error("没有权限,请联系管理员授权");
+    }
+
+    @ExceptionHandler(Exception.class)
+    public R handleException(Exception e) {
+        logger.error(e.getMessage(), e);
+        return R.error();
+    }
+}

+ 21 - 0
src/main/java/io/renren/common/utils/ConfigConstant.java

@@ -0,0 +1,21 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.common.utils;
+
+/**
+ * 系统参数相关Key
+ *
+ * @author Mark 735032128@qq.com
+ */
+public class ConfigConstant {
+    /**
+     * 云存储配置KEY
+     */
+    public final static String CLOUD_STORAGE_CONFIG_KEY = "CLOUD_STORAGE_CONFIG_KEY";
+}

+ 141 - 0
src/main/java/io/renren/common/utils/Constant.java

@@ -0,0 +1,141 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.common.utils;
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+/**
+ * 常量
+ *
+ * @author Mark 735032128@qq.com
+ */
+@Component
+public class Constant {
+
+    /** 超级管理员ID */
+    public static final int SUPER_ADMIN = 1;
+
+    /** 管理员ID */
+    public static final int FIRST_ADMIN = 2;
+
+    public static final int SEC_ADMIN = 3;
+
+    /** 数据权限过滤 */
+    public static final String SQL_FILTER = "sql_filter";
+    /**
+     * 当前页码
+     */
+    public static final String PAGE = "page";
+    /**
+     * 每页显示记录数
+     */
+    public static final String LIMIT = "limit";
+    /**
+     * 排序字段
+     */
+    public static final String ORDER_FIELD = "sidx";
+    /**
+     * 排序方式
+     */
+    public static final String ORDER = "order";
+    /**
+     *  升序
+     */
+    public static final String ASC = "asc";
+
+    /**
+     * 菜单类型
+     *
+     * @author liyang
+     * @email 735032128@qq.com
+     * @date 2016年11月15日 下午1:24:29
+     */
+    public enum MenuType {
+        /**
+         * 目录
+         */
+        CATALOG(0),
+        /**
+         * 菜单
+         */
+        MENU(1),
+        /**
+         * 按钮
+         */
+        BUTTON(2);
+
+        private int value;
+
+        MenuType(int value) {
+            this.value = value;
+        }
+
+        public int getValue() {
+            return value;
+        }
+    }
+
+    /**
+     * 定时任务状态
+     *
+     * @author liyang
+     * @email 735032128@qq.com
+     * @date 2016年12月3日 上午12:07:22
+     */
+    public enum ScheduleStatus {
+        /**
+         * 正常
+         */
+        NORMAL(0),
+        /**
+         * 暂停
+         */
+        PAUSE(1);
+
+        private int value;
+
+        ScheduleStatus(int value) {
+            this.value = value;
+        }
+
+        public int getValue() {
+            return value;
+        }
+    }
+
+    /**
+     * 云服务商
+     */
+    public enum CloudService {
+        /**
+         * 七牛云
+         */
+        QINIU(1),
+        /**
+         * 阿里云
+         */
+        ALIYUN(2),
+        /**
+         * 腾讯云
+         */
+        QCLOUD(3);
+
+        private int value;
+
+        CloudService(int value) {
+            this.value = value;
+        }
+
+        public int getValue() {
+            return value;
+        }
+    }
+
+}

+ 228 - 0
src/main/java/io/renren/common/utils/DateUtils.java

@@ -0,0 +1,228 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.common.utils;
+
+import org.apache.commons.lang.StringUtils;
+import org.joda.time.DateTime;
+import org.joda.time.LocalDate;
+import org.joda.time.format.DateTimeFormat;
+import org.joda.time.format.DateTimeFormatter;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.regex.Pattern;
+
+/**
+ * 日期处理
+ *
+ * @author Mark 735032128@qq.com
+ */
+public class DateUtils {
+    /** 时间格式(yyyy-MM-dd) */
+    public final static String DATE_PATTERN = "yyyy-MM-dd";
+    /** 时间格式(yyyy-MM-dd HH:mm:ss) */
+    public final static String DATE_TIME_PATTERN = "yyyy-MM-dd HH:mm:ss";
+
+    /**
+     * 日期格式化 日期格式为:yyyy-MM-dd
+     * @param date  日期
+     * @return 返回yyyy-MM-dd格式日期
+     */
+    public static String format(Date date) {
+        return format(date, DATE_PATTERN);
+    }
+
+    /**
+     * 日期格式化 日期格式为:yyyy-MM-dd
+     * @param date  日期
+     * @param pattern  格式,如:DateUtils.DATE_TIME_PATTERN
+     * @return 返回yyyy-MM-dd格式日期
+     */
+    public static String format(Date date, String pattern) {
+        if (date != null) {
+            SimpleDateFormat df = new SimpleDateFormat(pattern);
+            return df.format(date);
+        }
+        return null;
+    }
+
+    /**
+     * 字符串转换成日期
+     * @param strDate 日期字符串
+     * @param pattern 日期的格式,如:DateUtils.DATE_TIME_PATTERN
+     */
+    public static Date stringToDate(String strDate, String pattern) {
+        if (StringUtils.isBlank(strDate)) {
+            return null;
+        }
+
+        DateTimeFormatter fmt = DateTimeFormat.forPattern(pattern);
+        return fmt.parseLocalDateTime(strDate).toDate();
+    }
+
+    /**
+     * 根据周数,获取开始日期、结束日期
+     * @param week  周期  0本周,-1上周,-2上上周,1下周,2下下周
+     * @return 返回date[0]开始日期、date[1]结束日期
+     */
+    public static Date[] getWeekStartAndEnd(int week) {
+        DateTime dateTime = new DateTime();
+        LocalDate date = new LocalDate(dateTime.plusWeeks(week));
+
+        date = date.dayOfWeek().withMinimumValue();
+        Date beginDate = date.toDate();
+        Date endDate = date.plusDays(6).toDate();
+        return new Date[]{beginDate, endDate};
+    }
+
+    /**
+     * 对日期的【秒】进行加/减
+     *
+     * @param date 日期
+     * @param seconds 秒数,负数为减
+     * @return 加/减几秒后的日期
+     */
+    public static Date addDateSeconds(Date date, int seconds) {
+        DateTime dateTime = new DateTime(date);
+        return dateTime.plusSeconds(seconds).toDate();
+    }
+
+    /**
+     * 对日期的【分钟】进行加/减
+     *
+     * @param date 日期
+     * @param minutes 分钟数,负数为减
+     * @return 加/减几分钟后的日期
+     */
+    public static Date addDateMinutes(Date date, int minutes) {
+        DateTime dateTime = new DateTime(date);
+        return dateTime.plusMinutes(minutes).toDate();
+    }
+
+    /**
+     * 对日期的【小时】进行加/减
+     *
+     * @param date 日期
+     * @param hours 小时数,负数为减
+     * @return 加/减几小时后的日期
+     */
+    public static Date addDateHours(Date date, int hours) {
+        DateTime dateTime = new DateTime(date);
+        return dateTime.plusHours(hours).toDate();
+    }
+
+    /**
+     * 对日期的【天】进行加/减
+     *
+     * @param date 日期
+     * @param days 天数,负数为减
+     * @return 加/减几天后的日期
+     */
+    public static Date addDateDays(Date date, int days) {
+        DateTime dateTime = new DateTime(date);
+        return dateTime.plusDays(days).toDate();
+    }
+
+    /**
+     * 对日期的【周】进行加/减
+     *
+     * @param date 日期
+     * @param weeks 周数,负数为减
+     * @return 加/减几周后的日期
+     */
+    public static Date addDateWeeks(Date date, int weeks) {
+        DateTime dateTime = new DateTime(date);
+        return dateTime.plusWeeks(weeks).toDate();
+    }
+
+    /**
+     * 对日期的【月】进行加/减
+     *
+     * @param date 日期
+     * @param months 月数,负数为减
+     * @return 加/减几月后的日期
+     */
+    public static Date addDateMonths(Date date, int months) {
+        DateTime dateTime = new DateTime(date);
+        return dateTime.plusMonths(months).toDate();
+    }
+
+    /**
+     * 对日期的【年】进行加/减
+     *
+     * @param date 日期
+     * @param years 年数,负数为减
+     * @return 加/减几年后的日期
+     */
+    public static Date addDateYears(Date date, int years) {
+        DateTime dateTime = new DateTime(date);
+        return dateTime.plusYears(years).toDate();
+    }
+
+    /**
+     * 常规自动日期格式识别
+     * @param str 时间字符串
+     * @return Date
+     * @author dc
+     */
+    public static String getDateFormat(String str) {
+        boolean year = false;
+        Pattern pattern = Pattern.compile("^[-\\+]?[\\d]*$");
+        if (pattern.matcher(str.substring(0, 4)).matches()) {
+            year = true;
+        }
+        StringBuilder sb = new StringBuilder();
+        int index = 0;
+        if (!year) {
+            if (str.contains("月") || str.contains("-") || str.contains("/") || str.contains(".")) {
+                if (Character.isDigit(str.charAt(0))) {
+                    index = 1;
+                }
+            } else {
+                index = 3;
+            }
+        }
+        for (int i = 0; i < str.length(); i++) {
+            char chr = str.charAt(i);
+            if (Character.isDigit(chr)) {
+                if (index == 0) {
+                    sb.append("y");
+                }
+                if (index == 1) {
+                    sb.append("M");
+                }
+                if (index == 2) {
+                    sb.append("d");
+                }
+                if (index == 3) {
+                    sb.append("H");
+                }
+                if (index == 4) {
+                    sb.append("m");
+                }
+                if (index == 5) {
+                    sb.append("s");
+                }
+                if (index == 6) {
+                    sb.append("S");
+                }
+            } else {
+                if (i > 0) {
+                    char lastChar = str.charAt(i - 1);
+                    if (Character.isDigit(lastChar)) {
+                        index++;
+                    }
+                }
+                sb.append(chr);
+            }
+        }
+        return sb.toString();
+    }
+
+}

+ 40 - 0
src/main/java/io/renren/common/utils/EmailUtils.java

@@ -0,0 +1,40 @@
+package io.renren.common.utils;
+
+import com.aliyun.oss.ServiceException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.mail.MailException;
+import org.springframework.mail.SimpleMailMessage;
+import org.springframework.mail.javamail.JavaMailSender;
+import org.springframework.stereotype.Component;
+
+@Component
+public class EmailUtils {
+
+    private final Logger logger = LoggerFactory.getLogger(getClass());
+
+    @Autowired
+    private JavaMailSender javaMailSender;
+
+    public void sendSimpleEmail(String deliver, String[] receiver, String[] carbonCopy, String subject, String content) throws ServiceException {
+
+        long startTimestamp = System.currentTimeMillis();
+        logger.info("Start send mail ... ");
+
+        try {
+            SimpleMailMessage message = new SimpleMailMessage();
+            message.setFrom(deliver);
+            message.setTo(receiver);
+            message.setCc(carbonCopy);
+            message.setSubject(subject);
+            message.setText(content);
+            javaMailSender.send(message);
+            logger.info("Send mail success, cost {} million seconds", System.currentTimeMillis() - startTimestamp);
+        } catch (MailException e) {
+            logger.error("Send mail failed, error message is : {} \n", e.getMessage());
+            e.printStackTrace();
+            throw new ServiceException(e.getMessage());
+        }
+    }
+}

+ 319 - 0
src/main/java/io/renren/common/utils/ExcelUtils.java

@@ -0,0 +1,319 @@
+package io.renren.common.utils;
+
+import com.alibaba.fastjson.JSON;
+import org.apache.poi.hssf.usermodel.HSSFCell;
+import org.apache.poi.hssf.usermodel.HSSFDataFormat;
+import org.apache.poi.hssf.usermodel.HSSFDateUtil;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.usermodel.*;
+import org.apache.poi.ss.util.CellRangeAddress;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.math.BigDecimal;
+import java.text.DecimalFormat;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Created by Administrator on 2018/7/26 0026.
+ */
+public class ExcelUtils {
+
+    public static Workbook getWorkBook(MultipartFile file) {
+        //获得文件名
+        String fileName = file.getOriginalFilename();
+        //创建Workbook工作薄对象,表示整个excel
+        Workbook workbook = null;
+        try {
+            //获取excel文件的io流
+            InputStream is = file.getInputStream();
+            //根据文件后缀名不同(xls和xlsx)获得不同的Workbook实现类对象
+            if (fileName.endsWith("xls")) {
+                //2003
+                workbook = new HSSFWorkbook(is);
+            } else if (fileName.endsWith("xlsx")) {
+                //2007 及2007以上
+                workbook = new XSSFWorkbook(is);
+            }
+        } catch (IOException e) {
+//            log.error(e.getMessage());
+        }
+        return workbook;
+    }
+
+    public static Workbook getWorkBook(String fileUrl) {
+        //获得文件名
+        File file = new File(fileUrl);
+        String fileName = fileUrl;
+        //创建Workbook工作薄对象,表示整个excel
+        Workbook workbook = null;
+        try {
+            InputStream inputStream = new FileInputStream(file);
+            //获取excel文件的io流
+            //根据文件后缀名不同(xls和xlsx)获得不同的Workbook实现类对象
+            if (fileName.endsWith("xls")) {
+                //2003
+                workbook = new HSSFWorkbook(inputStream);
+            } else if (fileName.endsWith("xlsx") || fileName.endsWith("xlsm")) {
+                //2007 及2007以上
+                workbook = new XSSFWorkbook(inputStream);
+            }
+        } catch (IOException e) {
+//            log.error(e.getMessage());
+        }
+        return workbook;
+    }
+
+    public static String getCellValue(Cell cell) {
+        System.out.println("Cell:"+ cell);
+        String cellValue = "";
+        if (cell == null) {
+            return cellValue;
+        }
+        System.out.println("Excel格式:"+ cell.getCellType().name());
+        switch (cell.getCellType().name()) {
+            case "STRING":
+                cellValue = cell.getRichStringCellValue().getString();
+                break;
+            case "NUMERIC":
+                System.out.println("Excel数据样式:"+ cell.getCellStyle().getDataFormatString());
+                if("General".equals(cell.getCellStyle().getDataFormatString())){
+                    cellValue = new BigDecimal(Double.toString(cell.getNumericCellValue())).toPlainString();
+                }else if("m/d/yyyy;@".equals(cell.getCellStyle().getDataFormatString())){
+                    cellValue =  new SimpleDateFormat("yyyy-MM-dd").format(cell.getDateCellValue());
+                }else if("@".equals(cell.getCellStyle().getDataFormatString())){
+                    cellValue = cell.getNumericCellValue() + "";
+                }else{
+                    try {
+                        cellValue =  new SimpleDateFormat("yyyy-MM-dd").format(cell.getDateCellValue());
+                    }catch (Exception e){
+                        cellValue = cell.getNumericCellValue() + "";
+                    }
+                }
+                break;
+            case "FORMULA":
+                try {
+                    FormulaEvaluator evaluator = cell.getSheet().getWorkbook().getCreationHelper().createFormulaEvaluator();
+                    evaluator.evaluateFormulaCell(cell);
+                    CellValue cellValue1 = evaluator.evaluate(cell);
+                    Double celldata = cellValue1.getNumberValue();
+                    cellValue = celldata.toString();
+                }catch (Exception e) {
+                    System.out.println("错误");
+                }
+                break;
+            case "BLANK":
+                cellValue = "";
+                break;
+            default:
+                cellValue = cell.toString();
+                break;
+        }
+        //判断数据的类型
+//        switch (cell.getCellType()) {
+//            case Cell.CELL_TYPE_NUMERIC: //数字
+//                cellValue = stringDateProcess(cell);
+//                break;
+//            case Cell.CELL_TYPE_STRING: //字符串
+//                cellValue = String.valueOf(cell.getStringCellValue());
+//                break;
+//            case Cell.CELL_TYPE_BOOLEAN: //Boolean
+//                cellValue = String.valueOf(cell.getBooleanCellValue());
+//                break;
+//            case Cell.CELL_TYPE_FORMULA: //公式
+//                cellValue = String.valueOf(cell.getCellFormula());
+//                break;
+//            case Cell.CELL_TYPE_BLANK: //空值
+//                cellValue = "";
+//                break;
+//            case Cell.CELL_TYPE_ERROR: //故障
+//                cellValue = "非法字符";
+//                break;
+//            default:
+//                cellValue = "未知类型";
+//                break;
+//        }
+        System.out.println("ExcelcellValue:"+ cellValue);
+        return cellValue;
+    }
+
+    /**
+     * 时间格式处理
+     *
+     * @return
+     * @author Liu Xin Nan
+     * @data 2017年11月27日
+     */
+    public static String stringDateProcess(Cell cell) {
+        String result = new String();
+        if (HSSFDateUtil.isCellDateFormatted(cell)) {// 处理日期格式、时间格式
+            SimpleDateFormat sdf = null;
+            if (cell.getCellStyle().getDataFormat() == HSSFDataFormat.getBuiltinFormat("h:mm")) {
+                sdf = new SimpleDateFormat("HH:mm");
+            } else {// 日期
+                sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
+            }
+            Date date = cell.getDateCellValue();
+            result = sdf.format(date);
+        } else if (cell.getCellStyle().getDataFormat() == 58) {
+            // 处理自定义日期格式:m月d日(通过判断单元格的格式id解决,id的值是58)
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
+            double value = cell.getNumericCellValue();
+            Date date = DateUtil
+                    .getJavaDate(value);
+            result = sdf.format(date);
+        } else {
+            double value = cell.getNumericCellValue();
+            CellStyle style = cell.getCellStyle();
+            DecimalFormat format = new DecimalFormat();
+            String temp = style.getDataFormatString();
+            // 单元格设置成常规
+            if (temp.equals("General")) {
+                format.applyPattern("#");
+            }
+            result = format.format(value);
+        }
+
+        return result;
+    }
+
+    /**
+     * 合并单元格处理,获取合并行
+     *
+     * @param sheet
+     * @return List<CellRangeAddress>
+     */
+    public static List<CellRangeAddress> getCombineCell(Sheet sheet) {
+        List<CellRangeAddress> list = new ArrayList<CellRangeAddress>();
+        //获得一个 sheet 中合并单元格的数量
+        int sheetmergerCount = sheet.getNumMergedRegions();
+        //遍历所有的合并单元格
+        for (int i = 0; i < sheetmergerCount; i++) {
+            //获得合并单元格保存进list中
+            CellRangeAddress ca = sheet.getMergedRegion(i);
+            list.add(ca);
+        }
+        return list;
+    }
+
+    public static int getRowNum(List<CellRangeAddress> listCombineCell, Cell cell, Sheet sheet) {
+        int xr = 0;
+        int firstC = 0;
+        int lastC = 0;
+        int firstR = 0;
+        int lastR = 0;
+        for (CellRangeAddress ca : listCombineCell) {
+            //获得合并单元格的起始行, 结束行, 起始列, 结束列
+            firstC = ca.getFirstColumn();
+            lastC = ca.getLastColumn();
+            firstR = ca.getFirstRow();
+            lastR = ca.getLastRow();
+            if (cell.getRowIndex() >= firstR && cell.getRowIndex() <= lastR) {
+                if (cell.getColumnIndex() >= firstC && cell.getColumnIndex() <= lastC) {
+                    xr = lastR;
+                }
+            }
+
+        }
+        return xr;
+
+    }
+
+    /**
+     * 判断单元格是否为合并单元格,是的话则将单元格的值返回
+     *
+     * @param listCombineCell 存放合并单元格的list
+     * @param cell            需要判断的单元格
+     * @param sheet           sheet
+     * @return
+     */
+    public static String isCombineCell(List<CellRangeAddress> listCombineCell, Cell cell, Sheet sheet)
+            throws Exception {
+        int firstC = 0;
+        int lastC = 0;
+        int firstR = 0;
+        int lastR = 0;
+        String cellValue = null;
+        for (CellRangeAddress ca : listCombineCell) {
+            //获得合并单元格的起始行, 结束行, 起始列, 结束列
+            firstC = ca.getFirstColumn();
+            lastC = ca.getLastColumn();
+            firstR = ca.getFirstRow();
+            lastR = ca.getLastRow();
+            if (cell.getRowIndex() >= firstR && cell.getRowIndex() <= lastR) {
+                if (cell.getColumnIndex() >= firstC && cell.getColumnIndex() <= lastC) {
+                    Row fRow = sheet.getRow(firstR);
+                    Cell fCell = fRow.getCell(firstC);
+                    cellValue = getCellValue(fCell);
+                    break;
+                }
+            } else {
+                cellValue = "";
+            }
+        }
+        return cellValue;
+    }
+
+    /**
+     * 获取合并单元格的值
+     *
+     * @param sheet
+     * @param row
+     * @param column
+     * @return
+     */
+    public static String getMergedRegionValue(Sheet sheet, int row, int column) {
+        int sheetMergeCount = sheet.getNumMergedRegions();
+
+        for (int i = 0; i < sheetMergeCount; i++) {
+            CellRangeAddress ca = sheet.getMergedRegion(i);
+            int firstColumn = ca.getFirstColumn();
+            int lastColumn = ca.getLastColumn();
+            int firstRow = ca.getFirstRow();
+            int lastRow = ca.getLastRow();
+
+            if (row >= firstRow && row <= lastRow) {
+                if (column >= firstColumn && column <= lastColumn) {
+                    Row fRow = sheet.getRow(firstRow);
+                    Cell fCell = fRow.getCell(firstColumn);
+                    return getCellValue(fCell);
+                }
+            }
+        }
+
+        return null;
+    }
+
+    /**
+     * 判断指定的单元格是否是合并单元格
+     *
+     * @param sheet
+     * @param row    行下标
+     * @param column 列下标
+     * @return
+     */
+    public static boolean isMergedRegion(Sheet sheet, int row, int column) {
+        int sheetMergeCount = sheet.getNumMergedRegions();
+        for (int i = 0; i < sheetMergeCount; i++) {
+            CellRangeAddress range = sheet.getMergedRegion(i);
+            int firstColumn = range.getFirstColumn();
+            int lastColumn = range.getLastColumn();
+            int firstRow = range.getFirstRow();
+            int lastRow = range.getLastRow();
+            if (row >= firstRow && row <= lastRow) {
+                if (column >= firstColumn && column <= lastColumn) {
+                    return true;
+                }
+            }
+        }
+        return false;
+    }
+
+}

+ 49 - 0
src/main/java/io/renren/common/utils/ExportWordUtils.java

@@ -0,0 +1,49 @@
+package io.renren.common.utils;
+
+import freemarker.template.Configuration;
+import freemarker.template.Template;
+import freemarker.template.TemplateException;
+import org.apache.commons.lang.StringUtils;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.Map;
+
+@SuppressWarnings("deprecation")
+public class ExportWordUtils {
+    private Template template;
+
+    public ExportWordUtils(String basePackage, String templateName) throws Exception {
+        init(basePackage, templateName);
+    }
+
+    private void init(String basePackage, String templateName) throws Exception {
+        Configuration config = new Configuration();//需要指定版本
+        config.setClassLoaderForTemplateLoading(io.renren.common.utils.ExportWordUtils.class.getClassLoader(), basePackage);//去那个文件夹下寻找模板文件
+        config.setOutputEncoding("utf-8");
+        template = config.getTemplate(templateName);//模板名称获取模板
+    }
+
+    public <K, V> void doExport(OutputStream out, Map<K, V> results) throws TemplateException, IOException {
+        template.process(results, new OutputStreamWriter(out));//对模板进行数据填充
+    }
+
+    public void setHeader(HttpServletRequest request, HttpServletResponse response, String fileName) throws UnsupportedEncodingException {
+        String userAgent = request.getHeader("User-Agent");
+        if(StringUtils.contains(userAgent, "MSIE")||StringUtils.contains(userAgent, "Trident") ||
+                StringUtils.contains(userAgent, "Edge")){ //解决IE中文名称乱码
+            fileName = URLEncoder.encode(fileName,"UTF8");
+        }else if(StringUtils.contains(userAgent, "Firefox")){//火狐和其他浏览器中文名乱码
+            fileName = new String(fileName.getBytes("utf8"), "ISO8859-1");
+        }
+        response.setContentType("application/octet-stream;charset=utf-8");
+        response.setHeader("Content-Disposition", "attachment;" + " filename=\""+fileName+"\"");
+    }
+}
+
+

+ 51 - 0
src/main/java/io/renren/common/utils/HttpContextUtils.java

@@ -0,0 +1,51 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.common.utils;
+
+import org.apache.commons.io.IOUtils;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+
+public class HttpContextUtils {
+
+    public static void copyImageStream(InputStream inputStream, OutputStream outputStream) {
+        try {
+            IOUtils.copy(inputStream, outputStream);
+        } catch (IOException e) {
+            e.printStackTrace();
+        } finally {
+            try {
+                inputStream.close();
+                outputStream.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
+    public static HttpServletRequest getHttpServletRequest() {
+        return ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
+    }
+
+    public static String getDomain() {
+        HttpServletRequest request = getHttpServletRequest();
+        StringBuffer url = request.getRequestURL();
+        return url.delete(url.length() - request.getRequestURI().length(), url.length()).toString();
+    }
+
+    public static String getOrigin() {
+        HttpServletRequest request = getHttpServletRequest();
+        return request.getHeader("Origin");
+    }
+}

+ 64 - 0
src/main/java/io/renren/common/utils/IPUtils.java

@@ -0,0 +1,64 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.common.utils;
+
+import com.alibaba.druid.util.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * IP地址
+ *
+ * @author Mark 735032128@qq.com
+ */
+public class IPUtils {
+    private static Logger logger = LoggerFactory.getLogger(IPUtils.class);
+
+    /**
+     * 获取IP地址
+     *
+     * 使用Nginx等反向代理软件, 则不能通过request.getRemoteAddr()获取IP地址
+     * 如果使用了多级反向代理的话,X-Forwarded-For的值并不止一个,而是一串IP地址,X-Forwarded-For中第一个非unknown的有效IP字符串,则为真实IP地址
+     */
+    public static String getIpAddr(HttpServletRequest request) {
+        String ip = null;
+        try {
+            ip = request.getHeader("x-forwarded-for");
+            if (StringUtils.isEmpty(ip) || "unknown".equalsIgnoreCase(ip)) {
+                ip = request.getHeader("Proxy-Client-IP");
+            }
+            if (StringUtils.isEmpty(ip) || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+                ip = request.getHeader("WL-Proxy-Client-IP");
+            }
+            if (StringUtils.isEmpty(ip) || "unknown".equalsIgnoreCase(ip)) {
+                ip = request.getHeader("HTTP_CLIENT_IP");
+            }
+            if (StringUtils.isEmpty(ip) || "unknown".equalsIgnoreCase(ip)) {
+                ip = request.getHeader("HTTP_X_FORWARDED_FOR");
+            }
+            if (StringUtils.isEmpty(ip) || "unknown".equalsIgnoreCase(ip)) {
+                ip = request.getRemoteAddr();
+            }
+        } catch (Exception e) {
+            logger.error("IPUtils ERROR ", e);
+        }
+
+//        //使用代理,则获取第一个IP地址
+//        if(StringUtils.isEmpty(ip) && ip.length() > 15) {
+//			if(ip.indexOf(",") > 0) {
+//				ip = ip.substring(0, ip.indexOf(","));
+//			}
+//		}
+
+        return ip;
+    }
+
+}

+ 61 - 0
src/main/java/io/renren/common/utils/LocalFile.java

@@ -0,0 +1,61 @@
+package io.renren.common.utils;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.text.MessageFormat;
+import java.util.Random;
+
+@Component
+public class LocalFile {
+
+
+    public static String baseDirtory;
+
+    @Value("${file.baseDirtory}")
+    public void setBaseDirtory(String baseDirtory) {
+        LocalFile.baseDirtory = baseDirtory;
+    }
+
+
+    public static String saveDefault(byte[] bytes, String fileName, String ditcory) throws IOException {
+        System.out.println(baseDirtory);
+        if (ditcory == null) {
+            ditcory = new Random().nextInt(99999999) + "/";
+        }
+        String saveDic = MessageFormat.format("{0}{1}", baseDirtory, ditcory);
+        File dic = new File(saveDic);
+        FileUtils.forceMkdir(dic);
+//		String format = DrayFileUtils.getFileTypeByStream(bytes);
+        String format = StringUtils.substringAfterLast(fileName, ".");
+        String name = StringUtils.substringBeforeLast(fileName, ".");
+        if (format.equals("jpeg")) {
+            format = "jpg";
+        }
+        if (StringUtils.isBlank(format)) {
+            format = "jpg";
+        }
+        String filePath = MessageFormat.format("{0}{1}.{2}", saveDic, name, format);
+        File file = new File(filePath);
+        if (!file.exists()) {
+            file.createNewFile();
+        }
+        FileOutputStream fout = new FileOutputStream(file);
+        IOUtils.write(bytes, fout);
+        fout.flush();
+        fout.close();
+
+        return MessageFormat.format("{0}{1}.{2}", ditcory, name, format);
+    }
+
+
+}

+ 26 - 0
src/main/java/io/renren/common/utils/MapUtils.java

@@ -0,0 +1,26 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.common.utils;
+
+import java.util.HashMap;
+
+
+/**
+ * Map工具类
+ *
+ * @author Mark 735032128@qq.com
+ */
+public class MapUtils extends HashMap<String, Object> {
+
+    @Override
+    public MapUtils put(String key, Object value) {
+        super.put(key, value);
+        return this;
+    }
+}

+ 110 - 0
src/main/java/io/renren/common/utils/PageUtils.java

@@ -0,0 +1,110 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.common.utils;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 分页工具类
+ *
+ * @author Mark 735032128@qq.com
+ */
+public class PageUtils implements Serializable {
+    private static final long serialVersionUID = 1L;
+    /**
+     * 总记录数
+     */
+    private int totalCount;
+    /**
+     * 每页记录数
+     */
+    private int pageSize;
+    /**
+     * 总页数
+     */
+    private int totalPage;
+    /**
+     * 当前页数
+     */
+    private int currPage;
+    /**
+     * 列表数据
+     */
+    private List<?> list;
+
+    /**
+     * 分页
+     * @param list        列表数据
+     * @param totalCount  总记录数
+     * @param pageSize    每页记录数
+     * @param currPage    当前页数
+     */
+    public PageUtils(List<?> list, int totalCount, int pageSize, int currPage) {
+        this.list = list;
+        this.totalCount = totalCount;
+        this.pageSize = pageSize;
+        this.currPage = currPage;
+        this.totalPage = (int) Math.ceil((double) totalCount / pageSize);
+    }
+
+    /**
+     * 分页
+     */
+    public PageUtils(IPage<?> page) {
+        this.list = page.getRecords();
+        this.totalCount = (int) page.getTotal();
+        this.pageSize = (int) page.getSize();
+        this.currPage = (int) page.getCurrent();
+        this.totalPage = (int) page.getPages();
+    }
+
+    public int getTotalCount() {
+        return totalCount;
+    }
+
+    public void setTotalCount(int totalCount) {
+        this.totalCount = totalCount;
+    }
+
+    public int getPageSize() {
+        return pageSize;
+    }
+
+    public void setPageSize(int pageSize) {
+        this.pageSize = pageSize;
+    }
+
+    public int getTotalPage() {
+        return totalPage;
+    }
+
+    public void setTotalPage(int totalPage) {
+        this.totalPage = totalPage;
+    }
+
+    public int getCurrPage() {
+        return currPage;
+    }
+
+    public void setCurrPage(int currPage) {
+        this.currPage = currPage;
+    }
+
+    public List<?> getList() {
+        return list;
+    }
+
+    public void setList(List<?> list) {
+        this.list = list;
+    }
+
+}

+ 77 - 0
src/main/java/io/renren/common/utils/Query.java

@@ -0,0 +1,77 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.common.utils;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.metadata.OrderItem;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import io.renren.common.xss.SQLFilter;
+import org.apache.commons.lang.StringUtils;
+
+import java.util.Map;
+
+/**
+ * 查询参数
+ *
+ * @author Mark 735032128@qq.com
+ */
+public class Query<T> {
+
+    public IPage<T> getPage(Map<String, Object> params) {
+        return this.getPage(params, null, false);
+    }
+
+    public IPage<T> getPage(Map<String, Object> params, String defaultOrderField, boolean isAsc) {
+        //分页参数
+        long curPage = 1;
+        long limit = 10;
+
+        if (params.get(Constant.PAGE) != null) {
+            curPage = Long.parseLong((String) params.get(Constant.PAGE));
+        }
+        if (params.get(Constant.LIMIT) != null) {
+            limit = Long.parseLong((String) params.get(Constant.LIMIT));
+        }
+
+        //分页对象
+        Page<T> page = new Page<>(curPage, limit);
+
+        //分页参数
+        params.put(Constant.PAGE, page);
+
+        //排序字段
+        //防止SQL注入(因为sidx、order是通过拼接SQL实现排序的,会有SQL注入风险)
+        String orderField = SQLFilter.sqlInject((String) params.get(Constant.ORDER_FIELD));
+        String order = (String) params.get(Constant.ORDER);
+
+
+        //前端字段排序
+        if (StringUtils.isNotEmpty(orderField) && StringUtils.isNotEmpty(order)) {
+            if (Constant.ASC.equalsIgnoreCase(order)) {
+                return page.addOrder(OrderItem.asc(orderField));
+            } else {
+                return page.addOrder(OrderItem.desc(orderField));
+            }
+        }
+
+        //没有排序字段,则不排序
+        if (StringUtils.isBlank(defaultOrderField)) {
+            return page;
+        }
+
+        //默认排序
+        if (isAsc) {
+            page.addOrder(OrderItem.asc(defaultOrderField));
+        } else {
+            page.addOrder(OrderItem.desc(defaultOrderField));
+        }
+
+        return page;
+    }
+}

+ 64 - 0
src/main/java/io/renren/common/utils/R.java

@@ -0,0 +1,64 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.common.utils;
+
+import org.apache.http.HttpStatus;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 返回数据
+ *
+ * @author Mark 735032128@qq.com
+ */
+public class R extends HashMap<String, Object> {
+    private static final long serialVersionUID = 1L;
+
+    public R() {
+        put("code", 0);
+        put("msg", "success");
+    }
+
+    public static R error() {
+        return error(HttpStatus.SC_INTERNAL_SERVER_ERROR, "未知异常,请联系管理员");
+    }
+
+    public static R error(String msg) {
+        return error(HttpStatus.SC_INTERNAL_SERVER_ERROR, msg);
+    }
+
+    public static R error(int code, String msg) {
+        R r = new R();
+        r.put("code", code);
+        r.put("msg", msg);
+        return r;
+    }
+
+    public static R ok(String msg) {
+        R r = new R();
+        r.put("msg", msg);
+        return r;
+    }
+
+    public static R ok(Map<String, Object> map) {
+        R r = new R();
+        r.putAll(map);
+        return r;
+    }
+
+    public static R ok() {
+        return new R();
+    }
+
+    public R put(String key, Object value) {
+        super.put(key, value);
+        return this;
+    }
+}

+ 21 - 0
src/main/java/io/renren/common/utils/RedisKeys.java

@@ -0,0 +1,21 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.common.utils;
+
+/**
+ * Redis所有Keys
+ *
+ * @author Mark 735032128@qq.com
+ */
+public class RedisKeys {
+
+    public static String getSysConfigKey(String key) {
+        return "sys:config:" + key;
+    }
+}

+ 99 - 0
src/main/java/io/renren/common/utils/RedisUtils.java

@@ -0,0 +1,99 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.common.utils;
+
+import com.google.gson.Gson;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.*;
+import org.springframework.stereotype.Component;
+
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Redis工具类
+ *
+ * @author Mark 735032128@qq.com
+ */
+@Component
+public class RedisUtils {
+    @Autowired
+    private RedisTemplate<String, Object> redisTemplate;
+    @Autowired
+    private ValueOperations<String, String> valueOperations;
+    @Autowired
+    private HashOperations<String, String, Object> hashOperations;
+    @Autowired
+    private ListOperations<String, Object> listOperations;
+    @Autowired
+    private SetOperations<String, Object> setOperations;
+    @Autowired
+    private ZSetOperations<String, Object> zSetOperations;
+    /**  默认过期时长,单位:秒 */
+    public final static long DEFAULT_EXPIRE = 60 * 60 * 24;
+    /**  不设置过期时长 */
+    public final static long NOT_EXPIRE = -1;
+    private final static Gson gson = new Gson();
+
+    public void set(String key, Object value, long expire) {
+        valueOperations.set(key, toJson(value));
+        if (expire != NOT_EXPIRE) {
+            redisTemplate.expire(key, expire, TimeUnit.SECONDS);
+        }
+    }
+
+    public void set(String key, Object value) {
+        set(key, value, DEFAULT_EXPIRE);
+    }
+
+    public <T> T get(String key, Class<T> clazz, long expire) {
+        String value = valueOperations.get(key);
+        if (expire != NOT_EXPIRE) {
+            redisTemplate.expire(key, expire, TimeUnit.SECONDS);
+        }
+        return value == null ? null : fromJson(value, clazz);
+    }
+
+    public <T> T get(String key, Class<T> clazz) {
+        return get(key, clazz, NOT_EXPIRE);
+    }
+
+    public String get(String key, long expire) {
+        String value = valueOperations.get(key);
+        if (expire != NOT_EXPIRE) {
+            redisTemplate.expire(key, expire, TimeUnit.SECONDS);
+        }
+        return value;
+    }
+
+    public String get(String key) {
+        return get(key, NOT_EXPIRE);
+    }
+
+    public void delete(String key) {
+        redisTemplate.delete(key);
+    }
+
+    /**
+     * Object转成JSON数据
+     */
+    private String toJson(Object object) {
+        if (object instanceof Integer || object instanceof Long || object instanceof Float ||
+                object instanceof Double || object instanceof Boolean || object instanceof String) {
+            return String.valueOf(object);
+        }
+        return gson.toJson(object);
+    }
+
+    /**
+     * JSON数据,转成Object
+     */
+    private <T> T fromJson(String json, Class<T> clazz) {
+        return gson.fromJson(json, clazz);
+    }
+}

+ 51 - 0
src/main/java/io/renren/common/utils/SpringContextUtils.java

@@ -0,0 +1,51 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.common.utils;
+
+import org.springframework.beans.BeansException;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+import org.springframework.stereotype.Component;
+
+/**
+ * Spring Context 工具类
+ *
+ * @author Mark 735032128@qq.com
+ */
+@Component
+public class SpringContextUtils implements ApplicationContextAware {
+    public static ApplicationContext applicationContext;
+
+    @Override
+    public void setApplicationContext(ApplicationContext applicationContext)
+            throws BeansException {
+        SpringContextUtils.applicationContext = applicationContext;
+    }
+
+    public static Object getBean(String name) {
+        return applicationContext.getBean(name);
+    }
+
+    public static <T> T getBean(String name, Class<T> requiredType) {
+        return applicationContext.getBean(name, requiredType);
+    }
+
+    public static boolean containsBean(String name) {
+        return applicationContext.containsBean(name);
+    }
+
+    public static boolean isSingleton(String name) {
+        return applicationContext.isSingleton(name);
+    }
+
+    public static Class<? extends Object> getType(String name) {
+        return applicationContext.getType(name);
+    }
+
+}

+ 35 - 0
src/main/java/io/renren/common/utils/export/EncodeTools.java

@@ -0,0 +1,35 @@
+package io.renren.common.utils.export;
+
+import org.apache.commons.lang3.StringUtils;
+
+import javax.servlet.http.HttpServletRequest;
+import java.net.URLEncoder;
+
+/**
+ * @author kai
+ */
+public class EncodeTools {
+    /**
+     * 根据浏览器编码文件名 <br>
+     *
+     * @param fileName 文件名
+     * @param request  HttpServletRequest 对象,用来获取浏览器信息
+     * @return 编码后的文件名
+     * @author Hunter
+     * @version [1.0.0, 2015年10月24日]
+     * @since [1.0.0]
+     */
+    public static String encodeFileNameByBrowser(String fileName, HttpServletRequest request) {
+        String res = fileName;
+        try {
+            String userAgent = request.getHeader("USER-AGENT");
+            if (StringUtils.contains(userAgent, "Edge") || StringUtils.contains(userAgent, "MSIE")) {
+                res = URLEncoder.encode(fileName, "UTF8");
+            } else {
+                res = new String(fileName.getBytes(), "ISO8859-1");
+            }
+        } catch (Exception e) {
+        }
+        return res;
+    }
+}

+ 20 - 0
src/main/java/io/renren/common/utils/export/JxlsTemplate.java

@@ -0,0 +1,20 @@
+package io.renren.common.utils.export;
+
+/**
+ * Created by xk on 2017/12/4 0004.
+ */
+public interface JxlsTemplate {
+    /**
+     * 模板路径
+     *
+     * @return
+     */
+    String getPath();
+
+    /**
+     * 生成名称
+     *
+     * @return
+     */
+    String getName();
+}

+ 74 - 0
src/main/java/io/renren/common/utils/export/JxlsView.java

@@ -0,0 +1,74 @@
+package io.renren.common.utils.export;
+
+import org.jxls.common.Context;
+import org.jxls.util.JxlsHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.web.servlet.view.AbstractView;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Map;
+
+/**
+ * Created by xk on 2017/12/4 0004.
+ */
+public class JxlsView extends AbstractView {
+    private static Logger log = LoggerFactory.getLogger(JxlsView.class);
+
+    private JxlsTemplate template;
+
+    private Object data;
+    private Object sheetdata;
+
+    public JxlsView() {
+        this.setContentType("application/vnd.ms-excel");
+    }
+
+    public JxlsView(JxlsTemplate template, Object data) {
+        this();
+        this.template = template;
+        this.data = data;
+    }
+
+    public JxlsView(JxlsTemplate template, Object data, Object sheetdata) {
+        this();
+        this.template = template;
+        this.data = data;
+        this.sheetdata = sheetdata;
+    }
+
+    protected boolean generatesDownloadContent() {
+        return true;
+    }
+
+    protected final void renderMergedOutputModel(Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) throws Exception {
+        response.setContentType(this.getContentType());
+        response.setHeader("Content-Disposition", "attachment;filename="
+                + EncodeTools.encodeFileNameByBrowser(template.getName(), request));
+        InputStream is = null;
+        try {
+            is = JxlsView.class.getResourceAsStream(template.getPath());
+            Context context = new Context();
+            context.putVar("data", data);
+            context.putVar("sheetNames", sheetdata);
+            logger.info("data" + data);
+            logger.info("is" + is);
+            logger.info("getOutputStream" + response.getOutputStream());
+            JxlsHelper.getInstance().processTemplate(is, response.getOutputStream(), context);
+        } catch (Exception e) {
+            log.error("导出失败", e);
+        } finally {
+            if (is != null) {
+                try {
+                    is.close();
+                } catch (IOException e) {
+                    log.error("is关闭失败", e);
+                }
+            }
+        }
+
+    }
+}

+ 32 - 0
src/main/java/io/renren/common/validator/Assert.java

@@ -0,0 +1,32 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.common.validator;
+
+import io.renren.common.exception.RRException;
+import org.apache.commons.lang.StringUtils;
+
+/**
+ * 数据校验
+ *
+ * @author Mark 735032128@qq.com
+ */
+public abstract class Assert {
+
+    public static void isBlank(String str, String message) {
+        if (StringUtils.isBlank(str)) {
+            throw new RRException(message);
+        }
+    }
+
+    public static void isNull(Object object, String message) {
+        if (object == null) {
+            throw new RRException(message);
+        }
+    }
+}

+ 49 - 0
src/main/java/io/renren/common/validator/ValidatorUtils.java

@@ -0,0 +1,49 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.common.validator;
+
+import io.renren.common.exception.RRException;
+
+import javax.validation.ConstraintViolation;
+import javax.validation.Validation;
+import javax.validation.Validator;
+import java.util.Set;
+
+/**
+ * hibernate-validator校验工具类
+ *
+ * 参考文档:http://docs.jboss.org/hibernate/validator/5.4/reference/en-US/html_single/
+ *
+ * @author Mark 735032128@qq.com
+ */
+public class ValidatorUtils {
+    private static Validator validator;
+
+    static {
+        validator = Validation.buildDefaultValidatorFactory().getValidator();
+    }
+
+    /**
+     * 校验对象
+     * @param object        待校验对象
+     * @param groups        待校验的组
+     * @throws RRException  校验不通过,则报RRException异常
+     */
+    public static void validateEntity(Object object, Class<?>... groups)
+            throws RRException {
+        Set<ConstraintViolation<Object>> constraintViolations = validator.validate(object, groups);
+        if (!constraintViolations.isEmpty()) {
+            StringBuilder msg = new StringBuilder();
+            for (ConstraintViolation<Object> constraint : constraintViolations) {
+                msg.append(constraint.getMessage()).append("<br>");
+            }
+            throw new RRException(msg.toString());
+        }
+    }
+}

+ 17 - 0
src/main/java/io/renren/common/validator/group/AddGroup.java

@@ -0,0 +1,17 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.common.validator.group;
+
+/**
+ * 新增数据 Group
+ *
+ * @author Mark 735032128@qq.com
+ */
+public interface AddGroup {
+}

+ 17 - 0
src/main/java/io/renren/common/validator/group/AliyunGroup.java

@@ -0,0 +1,17 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.common.validator.group;
+
+/**
+ * 阿里云
+ *
+ * @author Mark 735032128@qq.com
+ */
+public interface AliyunGroup {
+}

+ 21 - 0
src/main/java/io/renren/common/validator/group/Group.java

@@ -0,0 +1,21 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.common.validator.group;
+
+import javax.validation.GroupSequence;
+
+/**
+ * 定义校验顺序,如果AddGroup组失败,则UpdateGroup组不会再校验
+ *
+ * @author Mark 735032128@qq.com
+ */
+@GroupSequence({AddGroup.class, UpdateGroup.class})
+public interface Group {
+
+}

+ 17 - 0
src/main/java/io/renren/common/validator/group/QcloudGroup.java

@@ -0,0 +1,17 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.common.validator.group;
+
+/**
+ * 腾讯云
+ *
+ * @author Mark 735032128@qq.com
+ */
+public interface QcloudGroup {
+}

+ 17 - 0
src/main/java/io/renren/common/validator/group/QiniuGroup.java

@@ -0,0 +1,17 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.common.validator.group;
+
+/**
+ * 七牛
+ *
+ * @author Mark 735032128@qq.com
+ */
+public interface QiniuGroup {
+}

+ 19 - 0
src/main/java/io/renren/common/validator/group/UpdateGroup.java

@@ -0,0 +1,19 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.common.validator.group;
+
+/**
+ * 更新数据 Group
+ *
+ * @author Mark 735032128@qq.com
+ */
+
+public interface UpdateGroup {
+
+}

+ 554 - 0
src/main/java/io/renren/common/xss/HTMLFilter.java

@@ -0,0 +1,554 @@
+package io.renren.common.xss;
+
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+import java.util.logging.Logger;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * HTML filtering utility for protecting against XSS (Cross Site Scripting).
+ * <p>
+ * This code is licensed LGPLv3
+ * <p>
+ * This code is a Java port of the original work in PHP by Cal Hendersen.
+ * http://code.iamcal.com/php/lib_filter/
+ * <p>
+ * The trickiest part of the translation was handling the differences in regex handling
+ * between PHP and Java.  These resources were helpful in the process:
+ * <p>
+ * http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html
+ * http://us2.php.net/manual/en/reference.pcre.pattern.modifiers.php
+ * http://www.regular-expressions.info/modifiers.html
+ * <p>
+ * A note on naming conventions: instance variables are prefixed with a "v"; global
+ * constants are in all caps.
+ * <p>
+ * Sample use:
+ * String input = ...
+ * String clean = new HTMLFilter().filter( input );
+ * <p>
+ * The class is not thread safe. Create a new instance if in doubt.
+ * <p>
+ * If you find bugs or have suggestions on improvement (especially regarding
+ * performance), please contact us.  The latest version of this
+ * source, and our contact details, can be found at http://xss-html-filter.sf.net
+ *
+ * @author Joseph O'Connell
+ * @author Cal Hendersen
+ * @author Michael Semb Wever
+ */
+public final class HTMLFilter {
+
+    /**
+     * regex flag union representing /si modifiers in php
+     **/
+    private static final int REGEX_FLAGS_SI = Pattern.CASE_INSENSITIVE | Pattern.DOTALL;
+    private static final Pattern P_COMMENTS = Pattern.compile("<!--(.*?)-->", Pattern.DOTALL);
+    private static final Pattern P_COMMENT = Pattern.compile("^!--(.*)--$", REGEX_FLAGS_SI);
+    private static final Pattern P_TAGS = Pattern.compile("<(.*?)>", Pattern.DOTALL);
+    private static final Pattern P_END_TAG = Pattern.compile("^/([a-z0-9]+)", REGEX_FLAGS_SI);
+    private static final Pattern P_START_TAG = Pattern.compile("^([a-z0-9]+)(.*?)(/?)$", REGEX_FLAGS_SI);
+    private static final Pattern P_QUOTED_ATTRIBUTES = Pattern.compile("([a-z0-9]+)=([\"'])(.*?)\\2", REGEX_FLAGS_SI);
+    private static final Pattern P_UNQUOTED_ATTRIBUTES = Pattern.compile("([a-z0-9]+)(=)([^\"\\s']+)", REGEX_FLAGS_SI);
+    private static final Pattern P_PROTOCOL = Pattern.compile("^([^:]+):", REGEX_FLAGS_SI);
+    private static final Pattern P_ENTITY = Pattern.compile("&#(\\d+);?");
+    private static final Pattern P_ENTITY_UNICODE = Pattern.compile("&#x([0-9a-f]+);?");
+    private static final Pattern P_ENCODE = Pattern.compile("%([0-9a-f]{2});?");
+    private static final Pattern P_VALID_ENTITIES = Pattern.compile("&([^&;]*)(?=(;|&|$))");
+    private static final Pattern P_VALID_QUOTES = Pattern.compile("(>|^)([^<]+?)(<|$)", Pattern.DOTALL);
+    private static final Pattern P_END_ARROW = Pattern.compile("^>");
+    private static final Pattern P_BODY_TO_END = Pattern.compile("<([^>]*?)(?=<|$)");
+    private static final Pattern P_XML_CONTENT = Pattern.compile("(^|>)([^<]*?)(?=>)");
+    private static final Pattern P_STRAY_LEFT_ARROW = Pattern.compile("<([^>]*?)(?=<|$)");
+    private static final Pattern P_STRAY_RIGHT_ARROW = Pattern.compile("(^|>)([^<]*?)(?=>)");
+    private static final Pattern P_AMP = Pattern.compile("&");
+    private static final Pattern P_QUOTE = Pattern.compile("<");
+    private static final Pattern P_LEFT_ARROW = Pattern.compile("<");
+    private static final Pattern P_RIGHT_ARROW = Pattern.compile(">");
+    private static final Pattern P_BOTH_ARROWS = Pattern.compile("<>");
+
+    // @xxx could grow large... maybe use sesat's ReferenceMap
+    private static final ConcurrentMap<String, Pattern> P_REMOVE_PAIR_BLANKS = new ConcurrentHashMap<String, Pattern>();
+    private static final ConcurrentMap<String, Pattern> P_REMOVE_SELF_BLANKS = new ConcurrentHashMap<String, Pattern>();
+
+    /**
+     * set of allowed html elements, along with allowed attributes for each element
+     **/
+    private final Map<String, List<String>> vAllowed;
+    /**
+     * counts of open tags for each (allowable) html element
+     **/
+    private final Map<String, Integer> vTagCounts = new HashMap<String, Integer>();
+
+    /**
+     * html elements which must always be self-closing (e.g. "<img />")
+     **/
+    private final String[] vSelfClosingTags;
+    /**
+     * html elements which must always have separate opening and closing tags (e.g. "<b></b>")
+     **/
+    private final String[] vNeedClosingTags;
+    /**
+     * set of disallowed html elements
+     **/
+    private final String[] vDisallowed;
+    /**
+     * attributes which should be checked for valid protocols
+     **/
+    private final String[] vProtocolAtts;
+    /**
+     * allowed protocols
+     **/
+    private final String[] vAllowedProtocols;
+    /**
+     * tags which should be removed if they contain no content (e.g. "<b></b>" or "<b />")
+     **/
+    private final String[] vRemoveBlanks;
+    /**
+     * entities allowed within html markup
+     **/
+    private final String[] vAllowedEntities;
+    /**
+     * flag determining whether comments are allowed in input String.
+     */
+    private final boolean stripComment;
+    private final boolean encodeQuotes;
+    private boolean vDebug = false;
+    /**
+     * flag determining whether to try to make tags when presented with "unbalanced"
+     * angle brackets (e.g. "<b text </b>" becomes "<b> text </b>").  If set to false,
+     * unbalanced angle brackets will be html escaped.
+     */
+    private final boolean alwaysMakeTags;
+
+    /**
+     * Default constructor.
+     */
+    public HTMLFilter() {
+        vAllowed = new HashMap<>();
+
+        final ArrayList<String> a_atts = new ArrayList<String>();
+        a_atts.add("href");
+        a_atts.add("target");
+        vAllowed.put("a", a_atts);
+
+        final ArrayList<String> img_atts = new ArrayList<String>();
+        img_atts.add("src");
+        img_atts.add("width");
+        img_atts.add("height");
+        img_atts.add("alt");
+        vAllowed.put("img", img_atts);
+
+        final ArrayList<String> no_atts = new ArrayList<String>();
+        vAllowed.put("b", no_atts);
+        vAllowed.put("strong", no_atts);
+        vAllowed.put("i", no_atts);
+        vAllowed.put("em", no_atts);
+
+        vSelfClosingTags = new String[]{"img"};
+        vNeedClosingTags = new String[]{"a", "b", "strong", "i", "em"};
+        vDisallowed = new String[]{};
+        vAllowedProtocols = new String[]{"http", "mailto", "https"}; // no ftp.
+        vProtocolAtts = new String[]{"src", "href"};
+        vRemoveBlanks = new String[]{"a", "b", "strong", "i", "em"};
+        vAllowedEntities = new String[]{"amp", "gt", "lt", "quot"};
+        stripComment = true;
+        encodeQuotes = true;
+        alwaysMakeTags = true;
+    }
+
+    /**
+     * Set debug flag to true. Otherwise use default settings. See the default constructor.
+     *
+     * @param debug turn debug on with a true argument
+     */
+    public HTMLFilter(final boolean debug) {
+        this();
+        vDebug = debug;
+
+    }
+
+    /**
+     * Map-parameter configurable constructor.
+     *
+     * @param conf map containing configuration. keys match field names.
+     */
+    public HTMLFilter(final Map<String, Object> conf) {
+
+        assert conf.containsKey("vAllowed") : "configuration requires vAllowed";
+        assert conf.containsKey("vSelfClosingTags") : "configuration requires vSelfClosingTags";
+        assert conf.containsKey("vNeedClosingTags") : "configuration requires vNeedClosingTags";
+        assert conf.containsKey("vDisallowed") : "configuration requires vDisallowed";
+        assert conf.containsKey("vAllowedProtocols") : "configuration requires vAllowedProtocols";
+        assert conf.containsKey("vProtocolAtts") : "configuration requires vProtocolAtts";
+        assert conf.containsKey("vRemoveBlanks") : "configuration requires vRemoveBlanks";
+        assert conf.containsKey("vAllowedEntities") : "configuration requires vAllowedEntities";
+
+        vAllowed = Collections.unmodifiableMap((HashMap<String, List<String>>) conf.get("vAllowed"));
+        vSelfClosingTags = (String[]) conf.get("vSelfClosingTags");
+        vNeedClosingTags = (String[]) conf.get("vNeedClosingTags");
+        vDisallowed = (String[]) conf.get("vDisallowed");
+        vAllowedProtocols = (String[]) conf.get("vAllowedProtocols");
+        vProtocolAtts = (String[]) conf.get("vProtocolAtts");
+        vRemoveBlanks = (String[]) conf.get("vRemoveBlanks");
+        vAllowedEntities = (String[]) conf.get("vAllowedEntities");
+        stripComment = conf.containsKey("stripComment") ? (Boolean) conf.get("stripComment") : true;
+        encodeQuotes = conf.containsKey("encodeQuotes") ? (Boolean) conf.get("encodeQuotes") : true;
+        alwaysMakeTags = conf.containsKey("alwaysMakeTags") ? (Boolean) conf.get("alwaysMakeTags") : true;
+    }
+
+    private void reset() {
+        vTagCounts.clear();
+    }
+
+    private void debug(final String msg) {
+        if (vDebug) {
+            Logger.getAnonymousLogger().info(msg);
+        }
+    }
+
+    //---------------------------------------------------------------
+    // my versions of some PHP library functions
+    public static String chr(final int decimal) {
+        return String.valueOf((char) decimal);
+    }
+
+    public static String htmlSpecialChars(final String s) {
+        String result = s;
+        result = regexReplace(P_AMP, "&amp;", result);
+        result = regexReplace(P_QUOTE, "&quot;", result);
+        result = regexReplace(P_LEFT_ARROW, "&lt;", result);
+        result = regexReplace(P_RIGHT_ARROW, "&gt;", result);
+        return result;
+    }
+
+    //---------------------------------------------------------------
+
+    /**
+     * given a user submitted input String, filter out any invalid or restricted
+     * html.
+     *
+     * @param input text (i.e. submitted by a user) than may contain html
+     * @return "clean" version of input, with only valid, whitelisted html elements allowed
+     */
+    public String filter(final String input) {
+        reset();
+        String s = input;
+
+        debug("************************************************");
+        debug("              INPUT: " + input);
+
+        s = escapeComments(s);
+        debug("     escapeComments: " + s);
+
+        s = balanceHTML(s);
+        debug("        balanceHTML: " + s);
+
+        s = checkTags(s);
+        debug("          checkTags: " + s);
+
+        s = processRemoveBlanks(s);
+        debug("processRemoveBlanks: " + s);
+
+        s = validateEntities(s);
+        debug("    validateEntites: " + s);
+
+        debug("************************************************\n\n");
+        return s;
+    }
+
+    public boolean isAlwaysMakeTags() {
+        return alwaysMakeTags;
+    }
+
+    public boolean isStripComments() {
+        return stripComment;
+    }
+
+    private String escapeComments(final String s) {
+        final Matcher m = P_COMMENTS.matcher(s);
+        final StringBuffer buf = new StringBuffer();
+        if (m.find()) {
+            final String match = m.group(1); //(.*?)
+            m.appendReplacement(buf, Matcher.quoteReplacement("<!--" + htmlSpecialChars(match) + "-->"));
+        }
+        m.appendTail(buf);
+
+        return buf.toString();
+    }
+
+    private String balanceHTML(String s) {
+        if (alwaysMakeTags) {
+            //
+            // try and form html
+            //
+            s = regexReplace(P_END_ARROW, "", s);
+            s = regexReplace(P_BODY_TO_END, "<$1>", s);
+            s = regexReplace(P_XML_CONTENT, "$1<$2", s);
+
+        } else {
+            //
+            // escape stray brackets
+            //
+            s = regexReplace(P_STRAY_LEFT_ARROW, "&lt;$1", s);
+            s = regexReplace(P_STRAY_RIGHT_ARROW, "$1$2&gt;<", s);
+
+            //
+            // the last regexp causes '<>' entities to appear
+            // (we need to do a lookahead assertion so that the last bracket can
+            // be used in the next pass of the regexp)
+            //
+            s = regexReplace(P_BOTH_ARROWS, "", s);
+        }
+
+        return s;
+    }
+
+    private String checkTags(String s) {
+        Matcher m = P_TAGS.matcher(s);
+
+        final StringBuffer buf = new StringBuffer();
+        while (m.find()) {
+            String replaceStr = m.group(1);
+            replaceStr = processTag(replaceStr);
+            m.appendReplacement(buf, Matcher.quoteReplacement(replaceStr));
+        }
+        m.appendTail(buf);
+
+        s = buf.toString();
+
+        // these get tallied in processTag
+        // (remember to reset before subsequent calls to filter method)
+        for (String key : vTagCounts.keySet()) {
+            for (int ii = 0; ii < vTagCounts.get(key); ii++) {
+                s += "</" + key + ">";
+            }
+        }
+
+        return s;
+    }
+
+    private String processRemoveBlanks(final String s) {
+        String result = s;
+        for (String tag : vRemoveBlanks) {
+            if (!P_REMOVE_PAIR_BLANKS.containsKey(tag)) {
+                P_REMOVE_PAIR_BLANKS.putIfAbsent(tag, Pattern.compile("<" + tag + "(\\s[^>]*)?></" + tag + ">"));
+            }
+            result = regexReplace(P_REMOVE_PAIR_BLANKS.get(tag), "", result);
+            if (!P_REMOVE_SELF_BLANKS.containsKey(tag)) {
+                P_REMOVE_SELF_BLANKS.putIfAbsent(tag, Pattern.compile("<" + tag + "(\\s[^>]*)?/>"));
+            }
+            result = regexReplace(P_REMOVE_SELF_BLANKS.get(tag), "", result);
+        }
+
+        return result;
+    }
+
+    private static String regexReplace(final Pattern regex_pattern, final String replacement, final String s) {
+        Matcher m = regex_pattern.matcher(s);
+        return m.replaceAll(replacement);
+    }
+
+    private String processTag(final String s) {
+        // ending tags
+        Matcher m = P_END_TAG.matcher(s);
+        if (m.find()) {
+            final String name = m.group(1).toLowerCase();
+            if (allowed(name)) {
+                if (!inArray(name, vSelfClosingTags)) {
+                    if (vTagCounts.containsKey(name)) {
+                        vTagCounts.put(name, vTagCounts.get(name) - 1);
+                        return "</" + name + ">";
+                    }
+                }
+            }
+        }
+
+        // starting tags
+        m = P_START_TAG.matcher(s);
+        if (m.find()) {
+            final String name = m.group(1).toLowerCase();
+            final String body = m.group(2);
+            String ending = m.group(3);
+
+            //debug( "in a starting tag, name='" + name + "'; body='" + body + "'; ending='" + ending + "'" );
+            if (allowed(name)) {
+                String params = "";
+
+                final Matcher m2 = P_QUOTED_ATTRIBUTES.matcher(body);
+                final Matcher m3 = P_UNQUOTED_ATTRIBUTES.matcher(body);
+                final List<String> paramNames = new ArrayList<String>();
+                final List<String> paramValues = new ArrayList<String>();
+                while (m2.find()) {
+                    paramNames.add(m2.group(1)); //([a-z0-9]+)
+                    paramValues.add(m2.group(3)); //(.*?)
+                }
+                while (m3.find()) {
+                    paramNames.add(m3.group(1)); //([a-z0-9]+)
+                    paramValues.add(m3.group(3)); //([^\"\\s']+)
+                }
+
+                String paramName, paramValue;
+                for (int ii = 0; ii < paramNames.size(); ii++) {
+                    paramName = paramNames.get(ii).toLowerCase();
+                    paramValue = paramValues.get(ii);
+
+//          debug( "paramName='" + paramName + "'" );
+//          debug( "paramValue='" + paramValue + "'" );
+//          debug( "allowed? " + vAllowed.get( name ).contains( paramName ) );
+
+                    if (allowedAttribute(name, paramName)) {
+                        if (inArray(paramName, vProtocolAtts)) {
+                            paramValue = processParamProtocol(paramValue);
+                        }
+                        params += " " + paramName + "=\"" + paramValue + "\"";
+                    }
+                }
+
+                if (inArray(name, vSelfClosingTags)) {
+                    ending = " /";
+                }
+
+                if (inArray(name, vNeedClosingTags)) {
+                    ending = "";
+                }
+
+                if (ending == null || ending.length() < 1) {
+                    if (vTagCounts.containsKey(name)) {
+                        vTagCounts.put(name, vTagCounts.get(name) + 1);
+                    } else {
+                        vTagCounts.put(name, 1);
+                    }
+                } else {
+                    ending = " /";
+                }
+                return "<" + name + params + ending + ">";
+            } else {
+                return "";
+            }
+        }
+
+        // comments
+        m = P_COMMENT.matcher(s);
+        if (!stripComment && m.find()) {
+            return "<" + m.group() + ">";
+        }
+
+        return "";
+    }
+
+    private String processParamProtocol(String s) {
+        s = decodeEntities(s);
+        final Matcher m = P_PROTOCOL.matcher(s);
+        if (m.find()) {
+            final String protocol = m.group(1);
+            if (!inArray(protocol, vAllowedProtocols)) {
+                // bad protocol, turn into local anchor link instead
+                s = "#" + s.substring(protocol.length() + 1, s.length());
+                if (s.startsWith("#//")) {
+                    s = "#" + s.substring(3, s.length());
+                }
+            }
+        }
+
+        return s;
+    }
+
+    private String decodeEntities(String s) {
+        StringBuffer buf = new StringBuffer();
+
+        Matcher m = P_ENTITY.matcher(s);
+        while (m.find()) {
+            final String match = m.group(1);
+            final int decimal = Integer.decode(match).intValue();
+            m.appendReplacement(buf, Matcher.quoteReplacement(chr(decimal)));
+        }
+        m.appendTail(buf);
+        s = buf.toString();
+
+        buf = new StringBuffer();
+        m = P_ENTITY_UNICODE.matcher(s);
+        while (m.find()) {
+            final String match = m.group(1);
+            final int decimal = Integer.valueOf(match, 16).intValue();
+            m.appendReplacement(buf, Matcher.quoteReplacement(chr(decimal)));
+        }
+        m.appendTail(buf);
+        s = buf.toString();
+
+        buf = new StringBuffer();
+        m = P_ENCODE.matcher(s);
+        while (m.find()) {
+            final String match = m.group(1);
+            final int decimal = Integer.valueOf(match, 16).intValue();
+            m.appendReplacement(buf, Matcher.quoteReplacement(chr(decimal)));
+        }
+        m.appendTail(buf);
+        s = buf.toString();
+
+        s = validateEntities(s);
+        return s;
+    }
+
+    private String validateEntities(final String s) {
+        StringBuffer buf = new StringBuffer();
+
+        // validate entities throughout the string
+        Matcher m = P_VALID_ENTITIES.matcher(s);
+        while (m.find()) {
+            final String one = m.group(1); //([^&;]*)
+            final String two = m.group(2); //(?=(;|&|$))
+            m.appendReplacement(buf, Matcher.quoteReplacement(checkEntity(one, two)));
+        }
+        m.appendTail(buf);
+
+        return encodeQuotes(buf.toString());
+    }
+
+    private String encodeQuotes(final String s) {
+        if (encodeQuotes) {
+            StringBuffer buf = new StringBuffer();
+            Matcher m = P_VALID_QUOTES.matcher(s);
+            while (m.find()) {
+                final String one = m.group(1); //(>|^)
+                final String two = m.group(2); //([^<]+?)
+                final String three = m.group(3); //(<|$)
+                m.appendReplacement(buf, Matcher.quoteReplacement(one + regexReplace(P_QUOTE, "&quot;", two) + three));
+            }
+            m.appendTail(buf);
+            return buf.toString();
+        } else {
+            return s;
+        }
+    }
+
+    private String checkEntity(final String preamble, final String term) {
+
+        return ";".equals(term) && isValidEntity(preamble)
+                ? '&' + preamble
+                : "&amp;" + preamble;
+    }
+
+    private boolean isValidEntity(final String entity) {
+        return inArray(entity, vAllowedEntities);
+    }
+
+    private static boolean inArray(final String s, final String[] array) {
+        for (String item : array) {
+            if (item != null && item.equals(s)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private boolean allowed(final String name) {
+        return (vAllowed.isEmpty() || vAllowed.containsKey(name)) && !inArray(name, vDisallowed);
+    }
+
+    private boolean allowedAttribute(final String name, final String paramName) {
+        return allowed(name) && (vAllowed.isEmpty() || vAllowed.get(name).contains(paramName));
+    }
+}

+ 50 - 0
src/main/java/io/renren/common/xss/SQLFilter.java

@@ -0,0 +1,50 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.common.xss;
+
+import io.renren.common.exception.RRException;
+import org.apache.commons.lang.StringUtils;
+
+/**
+ * SQL过滤
+ *
+ * @author Mark 735032128@qq.com
+ */
+public class SQLFilter {
+
+    /**
+     * SQL注入过滤
+     * @param str  待验证的字符串
+     */
+    public static String sqlInject(String str) {
+        if (StringUtils.isBlank(str)) {
+            return null;
+        }
+        //去掉'|"|;|\字符
+        str = StringUtils.replace(str, "'", "");
+        str = StringUtils.replace(str, "\"", "");
+        str = StringUtils.replace(str, ";", "");
+        str = StringUtils.replace(str, "\\", "");
+
+        //转换成小写
+        str = str.toLowerCase();
+
+        //非法字符
+        String[] keywords = {"master", "truncate", "insert", "select", "delete", "update", "declare", "alter", "drop"};
+
+        //判断是否包含非法字符
+        for (String keyword : keywords) {
+            if (str.indexOf(keyword) != -1) {
+                throw new RRException("包含非法字符");
+            }
+        }
+
+        return str;
+    }
+}

+ 37 - 0
src/main/java/io/renren/common/xss/XssFilter.java

@@ -0,0 +1,37 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.common.xss;
+
+import javax.servlet.*;
+import javax.servlet.http.HttpServletRequest;
+import java.io.IOException;
+
+/**
+ * XSS过滤
+ *
+ * @author Mark 735032128@qq.com
+ */
+public class XssFilter implements Filter {
+
+    @Override
+    public void init(FilterConfig config) throws ServletException {
+    }
+
+    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
+            throws IOException, ServletException {
+        XssHttpServletRequestWrapper xssRequest = new XssHttpServletRequestWrapper(
+                (HttpServletRequest) request);
+        chain.doFilter(xssRequest, response);
+    }
+
+    @Override
+    public void destroy() {
+    }
+
+}

+ 147 - 0
src/main/java/io/renren/common/xss/XssHttpServletRequestWrapper.java

@@ -0,0 +1,147 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.common.xss;
+
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang.StringUtils;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.MediaType;
+
+import javax.servlet.ReadListener;
+import javax.servlet.ServletInputStream;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletRequestWrapper;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+/**
+ * XSS过滤处理
+ *
+ * @author Mark 735032128@qq.com
+ */
+public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper {
+    //没被包装过的HttpServletRequest(特殊场景,需要自己过滤)
+    HttpServletRequest orgRequest;
+    //html过滤
+    private final static HTMLFilter htmlFilter = new HTMLFilter();
+
+    public XssHttpServletRequestWrapper(HttpServletRequest request) {
+        super(request);
+        orgRequest = request;
+    }
+
+    @Override
+    public ServletInputStream getInputStream() throws IOException {
+        //非json类型,直接返回
+        if (!MediaType.APPLICATION_JSON_VALUE.equalsIgnoreCase(super.getHeader(HttpHeaders.CONTENT_TYPE))) {
+            return super.getInputStream();
+        }
+
+        //为空,直接返回
+        String json = IOUtils.toString(super.getInputStream(), "utf-8");
+        if (StringUtils.isBlank(json)) {
+            return super.getInputStream();
+        }
+
+        //xss过滤
+        json = xssEncode(json);
+        final ByteArrayInputStream bis = new ByteArrayInputStream(json.getBytes("utf-8"));
+        return new ServletInputStream() {
+            @Override
+            public boolean isFinished() {
+                return true;
+            }
+
+            @Override
+            public boolean isReady() {
+                return true;
+            }
+
+            @Override
+            public void setReadListener(ReadListener readListener) {
+
+            }
+
+            @Override
+            public int read() throws IOException {
+                return bis.read();
+            }
+        };
+    }
+
+    @Override
+    public String getParameter(String name) {
+        String value = super.getParameter(xssEncode(name));
+        if (StringUtils.isNotBlank(value)) {
+            value = xssEncode(value);
+        }
+        return value;
+    }
+
+    @Override
+    public String[] getParameterValues(String name) {
+        String[] parameters = super.getParameterValues(name);
+        if (parameters == null || parameters.length == 0) {
+            return null;
+        }
+
+        for (int i = 0; i < parameters.length; i++) {
+            parameters[i] = xssEncode(parameters[i]);
+        }
+        return parameters;
+    }
+
+    @Override
+    public Map<String, String[]> getParameterMap() {
+        Map<String, String[]> map = new LinkedHashMap<>();
+        Map<String, String[]> parameters = super.getParameterMap();
+        for (String key : parameters.keySet()) {
+            String[] values = parameters.get(key);
+            for (int i = 0; i < values.length; i++) {
+                values[i] = xssEncode(values[i]);
+            }
+            map.put(key, values);
+        }
+        return map;
+    }
+
+    @Override
+    public String getHeader(String name) {
+        String value = super.getHeader(xssEncode(name));
+        if (StringUtils.isNotBlank(value)) {
+            value = xssEncode(value);
+        }
+        return value;
+    }
+
+    private String xssEncode(String input) {
+        return htmlFilter.filter(input);
+    }
+
+    /**
+     * 获取最原始的request
+     */
+    public HttpServletRequest getOrgRequest() {
+        return orgRequest;
+    }
+
+    /**
+     * 获取最原始的request
+     */
+    public static HttpServletRequest getOrgRequest(HttpServletRequest request) {
+        if (request instanceof XssHttpServletRequestWrapper) {
+            return ((XssHttpServletRequestWrapper) request).getOrgRequest();
+        }
+
+        return request;
+    }
+
+}

+ 26 - 0
src/main/java/io/renren/config/CorsConfig.java

@@ -0,0 +1,26 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.config;
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.CorsRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+
+@Configuration
+public class CorsConfig implements WebMvcConfigurer {
+
+    @Override
+    public void addCorsMappings(CorsRegistry registry) {
+        registry.addMapping("/**")
+                .allowedOrigins("*")
+                .allowCredentials(true)
+                .allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS")
+                .maxAge(3600);
+    }
+}

+ 49 - 0
src/main/java/io/renren/config/FilterConfig.java

@@ -0,0 +1,49 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.config;
+
+import io.renren.common.xss.XssFilter;
+import org.springframework.boot.web.servlet.FilterRegistrationBean;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.filter.DelegatingFilterProxy;
+
+import javax.servlet.DispatcherType;
+
+/**
+ * Filter配置
+ *
+ * @author Mark 735032128@qq.com
+ */
+@Configuration
+public class FilterConfig {
+
+    @Bean
+    public FilterRegistrationBean shiroFilterRegistration() {
+        FilterRegistrationBean registration = new FilterRegistrationBean();
+        registration.setFilter(new DelegatingFilterProxy("shiroFilter"));
+        //该值缺省为false,表示生命周期由SpringApplicationContext管理,设置为true则表示由ServletContainer管理
+        registration.addInitParameter("targetFilterLifecycle", "true");
+        registration.setEnabled(true);
+        registration.setOrder(Integer.MAX_VALUE - 1);
+        registration.addUrlPatterns("/*");
+        return registration;
+    }
+
+    @Bean
+    public FilterRegistrationBean xssFilterRegistration() {
+        FilterRegistrationBean registration = new FilterRegistrationBean();
+        registration.setDispatcherTypes(DispatcherType.REQUEST);
+        registration.setFilter(new XssFilter());
+        registration.addUrlPatterns("/*");
+        registration.setName("xssFilter");
+        registration.setOrder(Integer.MAX_VALUE);
+        return registration;
+    }
+}

+ 39 - 0
src/main/java/io/renren/config/KaptchaConfig.java

@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.config;
+
+import com.google.code.kaptcha.impl.DefaultKaptcha;
+import com.google.code.kaptcha.util.Config;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import java.util.Properties;
+
+
+/**
+ * 生成验证码配置
+ *
+ * @author Mark 735032128@qq.com
+ */
+@Configuration
+public class KaptchaConfig {
+
+    @Bean
+    public DefaultKaptcha producer() {
+        Properties properties = new Properties();
+        properties.put("kaptcha.border", "no");
+        properties.put("kaptcha.textproducer.font.color", "black");
+        properties.put("kaptcha.textproducer.char.space", "5");
+        properties.put("kaptcha.textproducer.font.names", "Arial,Courier,cmr10,宋体,楷体,微软雅黑");
+        Config config = new Config(properties);
+        DefaultKaptcha defaultKaptcha = new DefaultKaptcha();
+        defaultKaptcha.setConfig(config);
+        return defaultKaptcha;
+    }
+}

+ 37 - 0
src/main/java/io/renren/config/MybatisPlusConfig.java

@@ -0,0 +1,37 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.config;
+
+import com.baomidou.mybatisplus.core.incrementer.IKeyGenerator;
+import com.baomidou.mybatisplus.extension.incrementer.OracleKeyGenerator;
+import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * mybatis-plus配置
+ *
+ * @author Mark 735032128@qq.com
+ */
+@Configuration
+public class MybatisPlusConfig {
+
+    /**
+     * 分页插件
+     */
+    @Bean
+    public PaginationInterceptor paginationInterceptor() {
+        return new PaginationInterceptor();
+    }
+
+    @Bean
+    public IKeyGenerator keyGenerator() {
+        return new OracleKeyGenerator();
+    }
+}

+ 65 - 0
src/main/java/io/renren/config/RedisConfig.java

@@ -0,0 +1,65 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.config;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.data.redis.connection.RedisConnectionFactory;
+import org.springframework.data.redis.core.*;
+import org.springframework.data.redis.serializer.StringRedisSerializer;
+
+import javax.annotation.Resource;
+
+/**
+ * Redis配置
+ *
+ * @author Mark 735032128@qq.com
+ */
+@Configuration
+public class RedisConfig {
+    @Autowired
+    private RedisConnectionFactory factory;
+
+    @Bean
+    public RedisTemplate<String, Object> redisTemplate() {
+        RedisTemplate<String, Object> redisTemplate = new RedisTemplate<>();
+        redisTemplate.setKeySerializer(new StringRedisSerializer());
+        redisTemplate.setHashKeySerializer(new StringRedisSerializer());
+        redisTemplate.setHashValueSerializer(new StringRedisSerializer());
+        redisTemplate.setValueSerializer(new StringRedisSerializer());
+        redisTemplate.setConnectionFactory(factory);
+        return redisTemplate;
+    }
+
+    @Bean
+    public HashOperations<String, String, Object> hashOperations(RedisTemplate<String, Object> redisTemplate) {
+        return redisTemplate.opsForHash();
+    }
+
+    @Bean
+    public ValueOperations<String, String> valueOperations(RedisTemplate<String, String> redisTemplate) {
+        return redisTemplate.opsForValue();
+    }
+
+    @Bean
+    public ListOperations<String, Object> listOperations(RedisTemplate<String, Object> redisTemplate) {
+        return redisTemplate.opsForList();
+    }
+
+    @Bean
+    public SetOperations<String, Object> setOperations(RedisTemplate<String, Object> redisTemplate) {
+        return redisTemplate.opsForSet();
+    }
+
+    @Bean
+    public ZSetOperations<String, Object> zSetOperations(RedisTemplate<String, Object> redisTemplate) {
+        return redisTemplate.opsForZSet();
+    }
+}

+ 93 - 0
src/main/java/io/renren/config/ShiroConfig.java

@@ -0,0 +1,93 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.config;
+
+import io.renren.modules.sys.oauth2.OAuth2Filter;
+import io.renren.modules.sys.oauth2.OAuth2Realm;
+import org.apache.shiro.mgt.SecurityManager;
+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.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import javax.servlet.Filter;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+/**
+ * Shiro配置
+ *
+ * @author Mark 735032128@qq.com
+ */
+@Configuration
+public class ShiroConfig {
+
+    @Bean("securityManager")
+    public SecurityManager securityManager(OAuth2Realm oAuth2Realm) {
+        DefaultWebSecurityManager securityManager = new DefaultWebSecurityManager();
+        securityManager.setRealm(oAuth2Realm);
+        securityManager.setRememberMeManager(null);
+        return securityManager;
+    }
+
+    @Bean("shiroFilter")
+    public ShiroFilterFactoryBean shiroFilter(SecurityManager securityManager) {
+        ShiroFilterFactoryBean shiroFilter = new ShiroFilterFactoryBean();
+        shiroFilter.setSecurityManager(securityManager);
+
+        //oauth过滤
+        Map<String, Filter> filters = new HashMap<>();
+        filters.put("oauth2", new OAuth2Filter());
+        shiroFilter.setFilters(filters);
+
+        Map<String, String> filterMap = new LinkedHashMap<>();
+        filterMap.put("/webjars/**", "anon");
+        filterMap.put("/static/**", "anon");
+        filterMap.put("/act/**", "anon");
+        filterMap.put("/approve/tapprove/processImg/**", "anon");
+        filterMap.put("/ssy/pipeline/import", "anon");
+        filterMap.put("/getpwd/**", "anon");
+        filterMap.put("/druid/**", "anon");
+        filterMap.put("/app/**", "anon");
+        filterMap.put("/sys/login", "anon");
+        filterMap.put("/swagger/**", "anon");
+        filterMap.put("/v2/api-docs", "anon");
+        filterMap.put("/swagger-ui.html", "anon");
+        filterMap.put("/index.html", "anon");
+        filterMap.put("/swagger-resources/**", "anon");
+        filterMap.put("/captcha.jpg", "anon");
+        filterMap.put("/getMailCode", "anon");
+        filterMap.put("/forgetPassword", "anon");
+        filterMap.put("/aaa.txt", "anon");
+        filterMap.put("/common/download/**", "anon");
+        filterMap.put("/approve/word/**", "anon");
+
+//        filterMap.put("/**", "anon");
+        filterMap.put("/**", "oauth2");
+        shiroFilter.setFilterChainDefinitionMap(filterMap);
+
+        return shiroFilter;
+    }
+
+    @Bean("lifecycleBeanPostProcessor")
+    public LifecycleBeanPostProcessor lifecycleBeanPostProcessor() {
+        return new LifecycleBeanPostProcessor();
+    }
+
+    @Bean
+    public AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor(SecurityManager securityManager) {
+        AuthorizationAttributeSourceAdvisor advisor = new AuthorizationAttributeSourceAdvisor();
+        advisor.setSecurityManager(securityManager);
+        return advisor;
+    }
+
+}

+ 61 - 0
src/main/java/io/renren/config/SwaggerConfig.java

@@ -0,0 +1,61 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.config;
+
+import io.swagger.annotations.ApiOperation;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.service.ApiInfo;
+import springfox.documentation.service.ApiKey;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+
+import java.util.List;
+
+import static com.google.common.collect.Lists.newArrayList;
+
+@Configuration
+@EnableSwagger2
+public class SwaggerConfig implements WebMvcConfigurer {
+
+    @Bean
+    public Docket createRestApi() {
+        return new Docket(DocumentationType.SWAGGER_2)
+                .apiInfo(apiInfo())
+                .select()
+                //加了ApiOperation注解的类,才生成接口文档
+                .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
+                //包下的类,才生成接口文档
+                //.apis(RequestHandlerSelectors.basePackage("io.renren.controller"))
+                .paths(PathSelectors.any())
+                .build()
+                .securitySchemes(security());
+    }
+
+    private ApiInfo apiInfo() {
+        return new ApiInfoBuilder()
+                .title("人人开源")
+                .description("renren-fast文档")
+                .termsOfServiceUrl("https://www.renren.io")
+                .version("3.0.0")
+                .build();
+    }
+
+    private List<ApiKey> security() {
+        return newArrayList(
+                new ApiKey("token", "token", "header")
+        );
+    }
+
+}

+ 35 - 0
src/main/java/io/renren/config/TomcatConfig.java

@@ -0,0 +1,35 @@
+package io.renren.config;
+
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+public class TomcatConfig {
+
+//    @Bean
+//    TomcatServletWebServerFactory tomcatServletWebServerFactory() {
+//        TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory(){
+//            @Override
+//            protected void postProcessContext(Context context) {
+//                SecurityConstraint constraint = new SecurityConstraint();
+//                constraint.setUserConstraint("CONFIDENTIAL");
+//                SecurityCollection collection = new SecurityCollection();
+//                collection.addPattern("/*");
+//                constraint.addCollection(collection);
+//                context.addConstraint(constraint);
+//            }
+//        };
+//        factory.addAdditionalTomcatConnectors(createTomcatConnector());
+//        return factory;
+//    }
+//    private Connector createTomcatConnector() {
+//        Connector connector = new
+//                Connector("org.apache.coyote.http11.Http11NioProtocol");
+//        connector.setScheme("http");
+//        connector.setPort(8080);
+//        connector.setSecure(false);
+//        connector.setRedirectPort(443);
+//        return connector;
+//    }
+
+
+}

+ 22 - 0
src/main/java/io/renren/modules/app/annotation/Login.java

@@ -0,0 +1,22 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.modules.app.annotation;
+
+import java.lang.annotation.*;
+
+/**
+ * app登录效验
+ *
+ * @author Mark 735032128@qq.com
+ */
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface Login {
+}

+ 25 - 0
src/main/java/io/renren/modules/app/annotation/LoginUser.java

@@ -0,0 +1,25 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.modules.app.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * 登录用户信息
+ *
+ * @author Mark 735032128@qq.com
+ */
+@Target(ElementType.PARAMETER)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface LoginUser {
+
+}

+ 53 - 0
src/main/java/io/renren/modules/app/controller/AppTestController.java

@@ -0,0 +1,53 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.modules.app.controller;
+
+
+import io.renren.common.utils.R;
+import io.renren.modules.app.annotation.Login;
+import io.renren.modules.app.annotation.LoginUser;
+import io.renren.modules.app.entity.UserEntity;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * APP测试接口
+ *
+ * @author Mark 735032128@qq.com
+ */
+@RestController
+@RequestMapping("/app")
+@Api("APP测试接口")
+public class AppTestController {
+
+    @Login
+    @GetMapping("userInfo")
+    @ApiOperation("获取用户信息")
+    public R userInfo(@LoginUser UserEntity user) {
+        return R.ok().put("user", user);
+    }
+
+    @Login
+    @GetMapping("userId")
+    @ApiOperation("获取用户ID")
+    public R userInfo(@RequestAttribute("userId") Integer userId) {
+        return R.ok().put("userId", userId);
+    }
+
+    @GetMapping("notToken")
+    @ApiOperation("忽略Token验证测试")
+    public R notToken() {
+        return R.ok().put("msg", "无需token也能访问。。。");
+    }
+
+}

+ 23 - 0
src/main/java/io/renren/modules/app/dao/UserDao.java

@@ -0,0 +1,23 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.modules.app.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import io.renren.modules.app.entity.UserEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 用户
+ *
+ * @author Mark 735032128@qq.com
+ */
+@Mapper
+public interface UserDao extends BaseMapper<UserEntity> {
+
+}

+ 54 - 0
src/main/java/io/renren/modules/app/entity/UserEntity.java

@@ -0,0 +1,54 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.modules.app.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.KeySequence;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+
+/**
+ * 用户
+ *
+ * @author Mark 735032128@qq.com
+ */
+@Data
+@TableName("tb_user")
+@KeySequence(value = "SSY_SEQ")
+public class UserEntity implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 用户ID
+     */
+    @TableId(type = IdType.INPUT)
+    private Long userId;
+    /**
+     * 用户名
+     */
+    private String username;
+    /**
+     * 手机号
+     */
+    private String mobile;
+    /**
+     * 密码
+     */
+    private String password;
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+}

+ 33 - 0
src/main/java/io/renren/modules/app/form/LoginForm.java

@@ -0,0 +1,33 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.modules.app.form;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+
+/**
+ * 登录表单
+ *
+ * @author Mark 735032128@qq.com
+ */
+@Data
+@ApiModel(value = "登录表单")
+public class LoginForm {
+    @ApiModelProperty(value = "手机号")
+    @NotBlank(message = "手机号不能为空")
+    private String mobile;
+
+    @ApiModelProperty(value = "密码")
+    @NotBlank(message = "密码不能为空")
+    private String password;
+
+}

+ 33 - 0
src/main/java/io/renren/modules/app/form/RegisterForm.java

@@ -0,0 +1,33 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.modules.app.form;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+
+/**
+ * 注册表单
+ *
+ * @author Mark 735032128@qq.com
+ */
+@Data
+@ApiModel(value = "注册表单")
+public class RegisterForm {
+    @ApiModelProperty(value = "手机号")
+    @NotBlank(message = "手机号不能为空")
+    private String mobile;
+
+    @ApiModelProperty(value = "密码")
+    @NotBlank(message = "密码不能为空")
+    private String password;
+
+}

+ 72 - 0
src/main/java/io/renren/modules/app/interceptor/AuthorizationInterceptor.java

@@ -0,0 +1,72 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.modules.app.interceptor;
+
+
+import io.jsonwebtoken.Claims;
+import io.renren.common.exception.RRException;
+import io.renren.modules.app.utils.JwtUtils;
+import io.renren.modules.app.annotation.Login;
+import org.apache.commons.lang.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.stereotype.Component;
+import org.springframework.web.method.HandlerMethod;
+import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * 权限(Token)验证
+ *
+ * @author Mark 735032128@qq.com
+ */
+@Component
+public class AuthorizationInterceptor extends HandlerInterceptorAdapter {
+    @Autowired
+    private JwtUtils jwtUtils;
+
+    public static final String USER_KEY = "userId";
+
+    @Override
+    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
+        Login annotation;
+        if (handler instanceof HandlerMethod) {
+            annotation = ((HandlerMethod) handler).getMethodAnnotation(Login.class);
+        } else {
+            return true;
+        }
+
+        if (annotation == null) {
+            return true;
+        }
+
+        //获取用户凭证
+        String token = request.getHeader(jwtUtils.getHeader());
+        if (StringUtils.isBlank(token)) {
+            token = request.getParameter(jwtUtils.getHeader());
+        }
+
+        //凭证为空
+        if (StringUtils.isBlank(token)) {
+            throw new RRException(jwtUtils.getHeader() + "不能为空", HttpStatus.UNAUTHORIZED.value());
+        }
+
+        Claims claims = jwtUtils.getClaimByToken(token);
+        if (claims == null || jwtUtils.isTokenExpired(claims.getExpiration())) {
+            throw new RRException(jwtUtils.getHeader() + "失效,请重新登录", HttpStatus.UNAUTHORIZED.value());
+        }
+
+        //设置userId到request里,后续根据userId,获取用户信息
+        request.setAttribute(USER_KEY, Long.parseLong(claims.getSubject()));
+
+        return true;
+    }
+}

+ 95 - 0
src/main/java/io/renren/modules/app/utils/JwtUtils.java

@@ -0,0 +1,95 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.modules.app.utils;
+
+import io.jsonwebtoken.Claims;
+import io.jsonwebtoken.Jwts;
+import io.jsonwebtoken.SignatureAlgorithm;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+import java.util.Date;
+
+/**
+ * jwt工具类
+ *
+ * @author Mark 735032128@qq.com
+ */
+@ConfigurationProperties(prefix = "renren.jwt")
+@Component
+public class JwtUtils {
+    private Logger logger = LoggerFactory.getLogger(getClass());
+
+    private String secret;
+    private long expire;
+    private String header;
+
+    /**
+     * 生成jwt token
+     */
+    public String generateToken(long userId) {
+        Date nowDate = new Date();
+        //过期时间
+        Date expireDate = new Date(nowDate.getTime() + expire * 1000);
+
+        return Jwts.builder()
+                .setHeaderParam("typ", "JWT")
+                .setSubject(userId + "")
+                .setIssuedAt(nowDate)
+                .setExpiration(expireDate)
+                .signWith(SignatureAlgorithm.HS512, secret)
+                .compact();
+    }
+
+    public Claims getClaimByToken(String token) {
+        try {
+            return Jwts.parser()
+                    .setSigningKey(secret)
+                    .parseClaimsJws(token)
+                    .getBody();
+        } catch (Exception e) {
+            logger.debug("validate is token error ", e);
+            return null;
+        }
+    }
+
+    /**
+     * token是否过期
+     * @return true:过期
+     */
+    public boolean isTokenExpired(Date expiration) {
+        return expiration.before(new Date());
+    }
+
+    public String getSecret() {
+        return secret;
+    }
+
+    public void setSecret(String secret) {
+        this.secret = secret;
+    }
+
+    public long getExpire() {
+        return expire;
+    }
+
+    public void setExpire(long expire) {
+        this.expire = expire;
+    }
+
+    public String getHeader() {
+        return header;
+    }
+
+    public void setHeader(String header) {
+        this.header = header;
+    }
+}

+ 90 - 0
src/main/java/io/renren/modules/aspen/controller/TDashboarddayelecController.java

@@ -0,0 +1,90 @@
+package io.renren.modules.aspen.controller;
+
+import java.util.Arrays;
+import java.util.Map;
+
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import io.renren.modules.aspen.entity.TDashboarddayelecEntity;
+import io.renren.modules.aspen.service.TDashboarddayelecService;
+import io.renren.common.utils.PageUtils;
+import io.renren.common.utils.R;
+
+
+
+/**
+ * 电厂大屏每日0:00抓取数据
+ *
+ * @author chenshun
+ * @email sunlightcs@gmail.com
+ * @date 2022-03-12 10:53:44
+ */
+@RestController
+@RequestMapping("aspen/tdashboarddayelec")
+public class TDashboarddayelecController {
+    @Autowired
+    private TDashboarddayelecService tDashboarddayelecService;
+
+    /**
+     * 列表
+     */
+    @RequestMapping("/list")
+    @RequiresPermissions("aspen:tdashboarddayelec:list")
+    public R list(@RequestParam Map<String, Object> params){
+        PageUtils page = tDashboarddayelecService.queryPage(params);
+
+        return R.ok().put("page", page);
+    }
+
+
+    /**
+     * 信息
+     */
+    @RequestMapping("/info/{id}")
+    @RequiresPermissions("aspen:tdashboarddayelec:info")
+    public R info(@PathVariable("id") Integer id){
+		TDashboarddayelecEntity tDashboarddayelec = tDashboarddayelecService.getById(id);
+
+        return R.ok().put("tDashboarddayelec", tDashboarddayelec);
+    }
+
+    /**
+     * 保存
+     */
+    @RequestMapping("/save")
+    @RequiresPermissions("aspen:tdashboarddayelec:save")
+    public R save(@RequestBody TDashboarddayelecEntity tDashboarddayelec){
+		tDashboarddayelecService.save(tDashboarddayelec);
+
+        return R.ok();
+    }
+
+    /**
+     * 修改
+     */
+    @RequestMapping("/update")
+    @RequiresPermissions("aspen:tdashboarddayelec:update")
+    public R update(@RequestBody TDashboarddayelecEntity tDashboarddayelec){
+		tDashboarddayelecService.updateById(tDashboarddayelec);
+
+        return R.ok();
+    }
+
+    /**
+     * 删除
+     */
+    @RequestMapping("/delete")
+    @RequiresPermissions("aspen:tdashboarddayelec:delete")
+    public R delete(@RequestBody Integer[] ids){
+		tDashboarddayelecService.removeByIds(Arrays.asList(ids));
+
+        return R.ok();
+    }
+
+}

+ 90 - 0
src/main/java/io/renren/modules/aspen/controller/TDashboarddayeleceightController.java

@@ -0,0 +1,90 @@
+package io.renren.modules.aspen.controller;
+
+import java.util.Arrays;
+import java.util.Map;
+
+import io.renren.modules.aspen.entity.TDashboarddayeleceightEntity;
+import io.renren.modules.aspen.service.TDashboarddayeleceightService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import io.renren.common.utils.PageUtils;
+import io.renren.common.utils.R;
+
+
+
+/**
+ * 电厂大屏每日8:00抓取数据
+ *
+ * @author chenshun
+ * @email sunlightcs@gmail.com
+ * @date 2022-03-12 10:53:43
+ */
+@RestController
+@RequestMapping("aspen/tdashboarddayeleceight")
+public class TDashboarddayeleceightController {
+    @Autowired
+    private TDashboarddayeleceightService tDashboarddayeleceightService;
+
+    /**
+     * 列表
+     */
+    @RequestMapping("/list")
+    @RequiresPermissions("aspen:tdashboarddayeleceight:list")
+    public R list(@RequestParam Map<String, Object> params){
+        PageUtils page = tDashboarddayeleceightService.queryPage(params);
+
+        return R.ok().put("page", page);
+    }
+
+
+    /**
+     * 信息
+     */
+    @RequestMapping("/info/{id}")
+    @RequiresPermissions("aspen:tdashboarddayeleceight:info")
+    public R info(@PathVariable("id") Integer id){
+		TDashboarddayeleceightEntity tDashboarddayeleceight = tDashboarddayeleceightService.getById(id);
+
+        return R.ok().put("tDashboarddayeleceight", tDashboarddayeleceight);
+    }
+
+    /**
+     * 保存
+     */
+    @RequestMapping("/save")
+    @RequiresPermissions("aspen:tdashboarddayeleceight:save")
+    public R save(@RequestBody TDashboarddayeleceightEntity tDashboarddayeleceight){
+		tDashboarddayeleceightService.save(tDashboarddayeleceight);
+
+        return R.ok();
+    }
+
+    /**
+     * 修改
+     */
+    @RequestMapping("/update")
+    @RequiresPermissions("aspen:tdashboarddayeleceight:update")
+    public R update(@RequestBody TDashboarddayeleceightEntity tDashboarddayeleceight){
+		tDashboarddayeleceightService.updateById(tDashboarddayeleceight);
+
+        return R.ok();
+    }
+
+    /**
+     * 删除
+     */
+    @RequestMapping("/delete")
+    @RequiresPermissions("aspen:tdashboarddayeleceight:delete")
+    public R delete(@RequestBody Integer[] ids){
+		tDashboarddayeleceightService.removeByIds(Arrays.asList(ids));
+
+        return R.ok();
+    }
+
+}

+ 17 - 0
src/main/java/io/renren/modules/aspen/dao/TDashboarddayelecDao.java

@@ -0,0 +1,17 @@
+package io.renren.modules.aspen.dao;
+
+import io.renren.modules.aspen.entity.TDashboarddayelecEntity;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 电厂大屏每日0:00抓取数据
+ * 
+ * @author chenshun
+ * @email sunlightcs@gmail.com
+ * @date 2022-03-12 10:53:44
+ */
+@Mapper
+public interface TDashboarddayelecDao extends BaseMapper<TDashboarddayelecEntity> {
+	
+}

+ 17 - 0
src/main/java/io/renren/modules/aspen/dao/TDashboarddayeleceightDao.java

@@ -0,0 +1,17 @@
+package io.renren.modules.aspen.dao;
+
+import io.renren.modules.aspen.entity.TDashboarddayeleceightEntity;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 电厂大屏每日8:00抓取数据
+ * 
+ * @author chenshun
+ * @email sunlightcs@gmail.com
+ * @date 2022-03-12 10:53:43
+ */
+@Mapper
+public interface TDashboarddayeleceightDao extends BaseMapper<TDashboarddayeleceightEntity> {
+	
+}

+ 510 - 0
src/main/java/io/renren/modules/aspen/entity/TDashboarddayelecEntity.java

@@ -0,0 +1,510 @@
+package io.renren.modules.aspen.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.KeySequence;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+/**
+ * 电厂大屏每日0:00抓取数据
+ * 
+ * @author chenshun
+ * @email sunlightcs@gmail.com
+ * @date 2022-03-12 10:53:44
+ */
+@Data
+@TableName("T_DASHBOARDDAYELEC")
+@KeySequence(value = "SEQ_T_DASHBOARDDAYELEC")
+public class TDashboarddayelecEntity implements Serializable {
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 唯一标识ID
+	 */
+	@TableId(type = IdType.INPUT)
+	private Integer id;
+	/**
+	 * 删除状态
+	 */
+	private Integer delFlag;
+	/**
+	 * 创建人
+	 */
+	private String createrCode;
+	/**
+	 * 抓取时间
+	 */
+	private Date createdate;
+	/**
+	 * 修改人
+	 */
+	private String updaterCode;
+	/**
+	 * 修改时间
+	 */
+	private Date updatedate;
+	/**
+	 * 发电机表GTG1一号电机 发电水平 level
+	 */
+	private String gtg1Lv;
+	/**
+	 * 发电机表GTG1一号电机 发电效率 workpiece ratio
+	 */
+	private String gtg1Wr;
+	/**
+	 * 发电机表GTG2二号电机 发电水平 level
+	 */
+	private String gtg2Lv;
+	/**
+	 * 发电机表GTG2二号电机 发电效率 workpiece ratio
+	 */
+	private String gtg2Wr;
+	/**
+	 * 发电机表GTG3三号电机 发电水平 level
+	 */
+	private String gtg3Lv;
+	/**
+	 * 发电机表GTG3三号电机 发电效率 workpiece ratio
+	 */
+	private String gtg3Wr;
+	/**
+	 * 发电机表STG发电水平 level
+	 */
+	private String stg1Lv;
+	/**
+	 * 发电机表STG发电效率 workpiece ratio
+	 */
+	private String stg1Wr;
+	/**
+	 * 发电机表总发电量
+	 */
+	private String mwhLv;
+	/**
+	 * 发电机表全厂效率
+	 */
+	private String mwhWr;
+	/**
+	 * 蒸汽表HHP
+	 */
+	private String hhp;
+	/**
+	 * 蒸汽表HP
+	 */
+	private String hp;
+	/**
+	 * 蒸汽表LP
+	 */
+	private String lp;
+	/**
+	 * 蒸汽表MP
+	 */
+	private String mp;
+	/**
+	 * 蒸汽表累计总消耗量(吨)
+	 */
+	private String totalConsumption;
+	/**
+	 * 蒸汽表HHP数值
+	 */
+	private String hhpNum;
+	/**
+	 * 蒸汽表HHP温度
+	 */
+	private String hhpTemp;
+	/**
+	 * 蒸汽表HP数值
+	 */
+	private String hpNum;
+	/**
+	 * 蒸汽表HP温度
+	 */
+	private String hpTemp;
+	/**
+	 * 蒸汽表LP数值
+	 */
+	private String lpNum;
+	/**
+	 * 蒸汽表LP温度
+	 */
+	private String lpTemp;
+	/**
+	 * 蒸汽表MP数值
+	 */
+	private String mpNum;
+	/**
+	 * 蒸汽表MP温度
+	 */
+	private String mpTemp;
+	/**
+	 * 天然气表中石化
+	 */
+	private String shihua;
+	/**
+	 * 天然气表中石油
+	 */
+	private String shiyou;
+	/**
+	 * 天然气表瞬时量
+	 */
+	private String shunshiliang;
+	/**
+	 * 电量表昨日发电量Yesterday's power generation
+	 */
+	private String ypg;
+	/**
+	 * 电量表倒电量
+	 */
+	private String daodianliang;
+	/**
+	 * 电量表每日用电量
+	 */
+	private String eveLec;
+	/**
+	 * 电量表每日峰谷差
+	 */
+	private String fenggucha;
+	/**
+	 * 电量表BYC用电量
+	 */
+	private String bycElec;
+	/**
+	 * 电量表BOC用电量
+	 */
+	private String bocElec;
+	/**
+	 * 数据日期
+	 */
+	private Date dataDate;
+	/**
+	 * 抓取数据日
+	 */
+	private String dateDay;
+
+	public static long getSerialVersionUID() {
+		return serialVersionUID;
+	}
+
+	public Integer getId() {
+		return id;
+	}
+
+	public void setId(Integer id) {
+		this.id = id;
+	}
+
+	public Integer getDelFlag() {
+		return delFlag;
+	}
+
+	public void setDelFlag(Integer delFlag) {
+		this.delFlag = delFlag;
+	}
+
+	public String getCreaterCode() {
+		return createrCode;
+	}
+
+	public void setCreaterCode(String createrCode) {
+		this.createrCode = createrCode;
+	}
+
+	public Date getCreatedate() {
+		return createdate;
+	}
+
+	public void setCreatedate(Date createdate) {
+		this.createdate = createdate;
+	}
+
+	public String getUpdaterCode() {
+		return updaterCode;
+	}
+
+	public void setUpdaterCode(String updaterCode) {
+		this.updaterCode = updaterCode;
+	}
+
+	public Date getUpdatedate() {
+		return updatedate;
+	}
+
+	public void setUpdatedate(Date updatedate) {
+		this.updatedate = updatedate;
+	}
+
+	public String getGtg1Lv() {
+		return gtg1Lv;
+	}
+
+	public void setGtg1Lv(String gtg1Lv) {
+		this.gtg1Lv = gtg1Lv;
+	}
+
+	public String getGtg1Wr() {
+		return gtg1Wr;
+	}
+
+	public void setGtg1Wr(String gtg1Wr) {
+		this.gtg1Wr = gtg1Wr;
+	}
+
+	public String getGtg2Lv() {
+		return gtg2Lv;
+	}
+
+	public void setGtg2Lv(String gtg2Lv) {
+		this.gtg2Lv = gtg2Lv;
+	}
+
+	public String getGtg2Wr() {
+		return gtg2Wr;
+	}
+
+	public void setGtg2Wr(String gtg2Wr) {
+		this.gtg2Wr = gtg2Wr;
+	}
+
+	public String getGtg3Lv() {
+		return gtg3Lv;
+	}
+
+	public void setGtg3Lv(String gtg3Lv) {
+		this.gtg3Lv = gtg3Lv;
+	}
+
+	public String getGtg3Wr() {
+		return gtg3Wr;
+	}
+
+	public void setGtg3Wr(String gtg3Wr) {
+		this.gtg3Wr = gtg3Wr;
+	}
+
+	public String getStg1Lv() {
+		return stg1Lv;
+	}
+
+	public void setStg1Lv(String stg1Lv) {
+		this.stg1Lv = stg1Lv;
+	}
+
+	public String getStg1Wr() {
+		return stg1Wr;
+	}
+
+	public void setStg1Wr(String stg1Wr) {
+		this.stg1Wr = stg1Wr;
+	}
+
+	public String getMwhLv() {
+		return mwhLv;
+	}
+
+	public void setMwhLv(String mwhLv) {
+		this.mwhLv = mwhLv;
+	}
+
+	public String getMwhWr() {
+		return mwhWr;
+	}
+
+	public void setMwhWr(String mwhWr) {
+		this.mwhWr = mwhWr;
+	}
+
+	public String getHhp() {
+		return hhp;
+	}
+
+	public void setHhp(String hhp) {
+		this.hhp = hhp;
+	}
+
+	public String getHp() {
+		return hp;
+	}
+
+	public void setHp(String hp) {
+		this.hp = hp;
+	}
+
+	public String getLp() {
+		return lp;
+	}
+
+	public void setLp(String lp) {
+		this.lp = lp;
+	}
+
+	public String getMp() {
+		return mp;
+	}
+
+	public void setMp(String mp) {
+		this.mp = mp;
+	}
+
+	public String getTotalConsumption() {
+		return totalConsumption;
+	}
+
+	public void setTotalConsumption(String totalConsumption) {
+		this.totalConsumption = totalConsumption;
+	}
+
+	public String getHhpNum() {
+		return hhpNum;
+	}
+
+	public void setHhpNum(String hhpNum) {
+		this.hhpNum = hhpNum;
+	}
+
+	public String getHhpTemp() {
+		return hhpTemp;
+	}
+
+	public void setHhpTemp(String hhpTemp) {
+		this.hhpTemp = hhpTemp;
+	}
+
+	public String getHpNum() {
+		return hpNum;
+	}
+
+	public void setHpNum(String hpNum) {
+		this.hpNum = hpNum;
+	}
+
+	public String getHpTemp() {
+		return hpTemp;
+	}
+
+	public void setHpTemp(String hpTemp) {
+		this.hpTemp = hpTemp;
+	}
+
+	public String getLpNum() {
+		return lpNum;
+	}
+
+	public void setLpNum(String lpNum) {
+		this.lpNum = lpNum;
+	}
+
+	public String getLpTemp() {
+		return lpTemp;
+	}
+
+	public void setLpTemp(String lpTemp) {
+		this.lpTemp = lpTemp;
+	}
+
+	public String getMpNum() {
+		return mpNum;
+	}
+
+	public void setMpNum(String mpNum) {
+		this.mpNum = mpNum;
+	}
+
+	public String getMpTemp() {
+		return mpTemp;
+	}
+
+	public void setMpTemp(String mpTemp) {
+		this.mpTemp = mpTemp;
+	}
+
+	public String getShihua() {
+		return shihua;
+	}
+
+	public void setShihua(String shihua) {
+		this.shihua = shihua;
+	}
+
+	public String getShiyou() {
+		return shiyou;
+	}
+
+	public void setShiyou(String shiyou) {
+		this.shiyou = shiyou;
+	}
+
+	public String getShunshiliang() {
+		return shunshiliang;
+	}
+
+	public void setShunshiliang(String shunshiliang) {
+		this.shunshiliang = shunshiliang;
+	}
+
+	public String getYpg() {
+		return ypg;
+	}
+
+	public void setYpg(String ypg) {
+		this.ypg = ypg;
+	}
+
+	public String getDaodianliang() {
+		return daodianliang;
+	}
+
+	public void setDaodianliang(String daodianliang) {
+		this.daodianliang = daodianliang;
+	}
+
+	public String getEveLec() {
+		return eveLec;
+	}
+
+	public void setEveLec(String eveLec) {
+		this.eveLec = eveLec;
+	}
+
+	public String getFenggucha() {
+		return fenggucha;
+	}
+
+	public void setFenggucha(String fenggucha) {
+		this.fenggucha = fenggucha;
+	}
+
+	public String getBycElec() {
+		return bycElec;
+	}
+
+	public void setBycElec(String bycElec) {
+		this.bycElec = bycElec;
+	}
+
+	public String getBocElec() {
+		return bocElec;
+	}
+
+	public void setBocElec(String bocElec) {
+		this.bocElec = bocElec;
+	}
+
+	public Date getDataDate() {
+		return dataDate;
+	}
+
+	public void setDataDate(Date dataDate) {
+		this.dataDate = dataDate;
+	}
+
+	public String getDateDay() {
+		return dateDay;
+	}
+
+	public void setDateDay(String dateDay) {
+		this.dateDay = dateDay;
+	}
+}

+ 174 - 0
src/main/java/io/renren/modules/aspen/entity/TDashboarddayeleceightEntity.java

@@ -0,0 +1,174 @@
+package io.renren.modules.aspen.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.KeySequence;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+/**
+ * 电厂大屏每日8:00抓取数据
+ * 
+ * @author chenshun
+ * @email sunlightcs@gmail.com
+ * @date 2022-03-12 10:53:43
+ */
+@Data
+@TableName("T_DASHBOARDDAYELECEIGHT")
+@KeySequence(value = "SEQ_T_DASHBOARDDAYELECEIGHT")
+public class TDashboarddayeleceightEntity implements Serializable {
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 唯一标识ID
+	 */
+	@TableId(type = IdType.INPUT)
+	private Integer id;
+	/**
+	 * 删除状态
+	 */
+	private Integer delFlag;
+	/**
+	 * 创建人
+	 */
+	private String createrCode;
+	/**
+	 * 抓取时间
+	 */
+	private Date createdate;
+	/**
+	 * 修改人
+	 */
+	private String updaterCode;
+	/**
+	 * 修改时间
+	 */
+	private Date updatedate;
+	/**
+	 * 天然气表每日消耗量 every day consume
+	 */
+	private String evconsume;
+	/**
+	 * 天然气表电厂
+	 */
+	private String elecp;
+	/**
+	 * 天然气表合成器
+	 */
+	private String hechengqi;
+	/**
+	 * 天然气表U2
+	 */
+	private String u2;
+	/**
+	 * 数据日期
+	 */
+	private Date dataDate;
+	/**
+	 * 抓取数据日
+	 */
+	private String dateDay;
+
+	public static long getSerialVersionUID() {
+		return serialVersionUID;
+	}
+
+	public Integer getId() {
+		return id;
+	}
+
+	public void setId(Integer id) {
+		this.id = id;
+	}
+
+	public Integer getDelFlag() {
+		return delFlag;
+	}
+
+	public void setDelFlag(Integer delFlag) {
+		this.delFlag = delFlag;
+	}
+
+	public String getCreaterCode() {
+		return createrCode;
+	}
+
+	public void setCreaterCode(String createrCode) {
+		this.createrCode = createrCode;
+	}
+
+	public Date getCreatedate() {
+		return createdate;
+	}
+
+	public void setCreatedate(Date createdate) {
+		this.createdate = createdate;
+	}
+
+	public String getUpdaterCode() {
+		return updaterCode;
+	}
+
+	public void setUpdaterCode(String updaterCode) {
+		this.updaterCode = updaterCode;
+	}
+
+	public Date getUpdatedate() {
+		return updatedate;
+	}
+
+	public void setUpdatedate(Date updatedate) {
+		this.updatedate = updatedate;
+	}
+
+	public String getEvconsume() {
+		return evconsume;
+	}
+
+	public void setEvconsume(String evconsume) {
+		this.evconsume = evconsume;
+	}
+
+	public String getElecp() {
+		return elecp;
+	}
+
+	public void setElecp(String elecp) {
+		this.elecp = elecp;
+	}
+
+	public String getHechengqi() {
+		return hechengqi;
+	}
+
+	public void setHechengqi(String hechengqi) {
+		this.hechengqi = hechengqi;
+	}
+
+	public String getU2() {
+		return u2;
+	}
+
+	public void setU2(String u2) {
+		this.u2 = u2;
+	}
+
+	public Date getDataDate() {
+		return dataDate;
+	}
+
+	public void setDataDate(Date dataDate) {
+		this.dataDate = dataDate;
+	}
+
+	public String getDateDay() {
+		return dateDay;
+	}
+
+	public void setDateDay(String dateDay) {
+		this.dateDay = dateDay;
+	}
+}

+ 20 - 0
src/main/java/io/renren/modules/aspen/service/TDashboarddayelecService.java

@@ -0,0 +1,20 @@
+package io.renren.modules.aspen.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import io.renren.common.utils.PageUtils;
+import io.renren.modules.aspen.entity.TDashboarddayelecEntity;
+
+import java.util.Map;
+
+/**
+ * 电厂大屏每日0:00抓取数据
+ *
+ * @author chenshun
+ * @email sunlightcs@gmail.com
+ * @date 2022-03-12 10:53:44
+ */
+public interface TDashboarddayelecService extends IService<TDashboarddayelecEntity> {
+
+    PageUtils queryPage(Map<String, Object> params);
+}
+

+ 20 - 0
src/main/java/io/renren/modules/aspen/service/TDashboarddayeleceightService.java

@@ -0,0 +1,20 @@
+package io.renren.modules.aspen.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import io.renren.common.utils.PageUtils;
+import io.renren.modules.aspen.entity.TDashboarddayeleceightEntity;
+
+import java.util.Map;
+
+/**
+ * 电厂大屏每日8:00抓取数据
+ *
+ * @author chenshun
+ * @email sunlightcs@gmail.com
+ * @date 2022-03-12 10:53:43
+ */
+public interface TDashboarddayeleceightService extends IService<TDashboarddayeleceightEntity> {
+
+    PageUtils queryPage(Map<String, Object> params);
+}
+

+ 29 - 0
src/main/java/io/renren/modules/aspen/service/impl/TDashboarddayelecServiceImpl.java

@@ -0,0 +1,29 @@
+package io.renren.modules.aspen.service.impl;
+
+import org.springframework.stereotype.Service;
+import java.util.Map;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import io.renren.common.utils.PageUtils;
+import io.renren.common.utils.Query;
+
+import io.renren.modules.aspen.dao.TDashboarddayelecDao;
+import io.renren.modules.aspen.entity.TDashboarddayelecEntity;
+import io.renren.modules.aspen.service.TDashboarddayelecService;
+
+
+@Service("tDashboarddayelecService")
+public class TDashboarddayelecServiceImpl extends ServiceImpl<TDashboarddayelecDao, TDashboarddayelecEntity> implements TDashboarddayelecService {
+
+    @Override
+    public PageUtils queryPage(Map<String, Object> params) {
+        IPage<TDashboarddayelecEntity> page = this.page(
+                new Query<TDashboarddayelecEntity>().getPage(params),
+                new QueryWrapper<TDashboarddayelecEntity>()
+        );
+
+        return new PageUtils(page);
+    }
+
+}

+ 29 - 0
src/main/java/io/renren/modules/aspen/service/impl/TDashboarddayeleceightServiceImpl.java

@@ -0,0 +1,29 @@
+package io.renren.modules.aspen.service.impl;
+
+import org.springframework.stereotype.Service;
+import java.util.Map;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import io.renren.common.utils.PageUtils;
+import io.renren.common.utils.Query;
+
+import io.renren.modules.aspen.dao.TDashboarddayeleceightDao;
+import io.renren.modules.aspen.entity.TDashboarddayeleceightEntity;
+import io.renren.modules.aspen.service.TDashboarddayeleceightService;
+
+
+@Service("tDashboarddayeleceightService")
+public class TDashboarddayeleceightServiceImpl extends ServiceImpl<TDashboarddayeleceightDao, TDashboarddayeleceightEntity> implements TDashboarddayeleceightService {
+
+    @Override
+    public PageUtils queryPage(Map<String, Object> params) {
+        IPage<TDashboarddayeleceightEntity> page = this.page(
+                new Query<TDashboarddayeleceightEntity>().getPage(params),
+                new QueryWrapper<TDashboarddayeleceightEntity>()
+        );
+
+        return new PageUtils(page);
+    }
+
+}

+ 280 - 0
src/main/java/io/renren/modules/common/DayGetController.java

@@ -0,0 +1,280 @@
+package io.renren.modules.common;
+
+import com.opencsv.CSVReader;
+
+import io.renren.modules.aspen.entity.TDashboarddayelecEntity;
+import io.renren.modules.aspen.service.TDashboarddayelecService;
+import io.renren.modules.sys.controller.AbstractController;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import java.io.FileReader;
+import java.io.IOException;
+import java.math.BigDecimal;
+import java.util.Calendar;
+import java.util.Date;
+
+@Component
+@Configuration      //1.主要用于标记配置类,兼备Component的效果。
+@EnableScheduling   // 2.开启定时任务
+public class DayGetController extends AbstractController {
+
+    @Autowired
+    private TDashboarddayelecService tDashboarddayelecService;
+
+//    @Scheduled(cron = "0/30 * * * * ?")
+//    @Scheduled(cron = "0 */15 * * * ?")
+    //每日0:00触发
+    @Scheduled(cron = "0 0 0 * * ?" )
+    public void getExcelData(){
+        logger.info("实时获取数据");
+//        String csvFile = "D://ssyFile/物料.csv";
+        String csvFile = "D://elecdashboardaspen/elecDashboardData1.csv";
+        TDashboarddayelecEntity tDashboarddayelecEntity = new TDashboarddayelecEntity();
+        CSVReader reader = null;
+        try {
+            reader = new CSVReader(new FileReader(csvFile));
+            String[] line;
+            //定义行数
+            int i = 0;
+            while ((line = reader.readNext()) != null) {
+                i++;
+                if (i == 2) {
+                    logger.info("第" + i + "行");
+                    for (int j = 2; j < 7; j++) {
+                        logger.info("读数:" + line[j]);
+                        if (line[j].equals("")) {
+                            line[j] = "0.0";
+                        }else {
+                            if (!Character.isDigit(line[j].charAt(0))) {
+                                line[j] = "0.0";
+                            }else {
+                                BigDecimal b = new BigDecimal(Double.parseDouble(line[j]));
+                                double f = b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
+                                line[j] = String.valueOf(f);
+                            }
+                        }
+                        logger.info(line[j]);
+                    }
+                    tDashboarddayelecEntity.setGtg1Lv(line[2]);
+                    tDashboarddayelecEntity.setGtg2Lv(line[3]);
+                    tDashboarddayelecEntity.setGtg3Lv(line[4]);
+                    tDashboarddayelecEntity.setStg1Lv(line[5]);
+                    tDashboarddayelecEntity.setMwhLv(line[6]);
+                }
+                if (i == 3) {
+                    logger.info("第" + i + "行");
+                    for (int j = 0; j < 6; j++) {
+                        logger.info("读数:" + line[j]);
+                        if (line[j].equals("")) {
+                            line[j] = "0.0";
+                        }else {
+                            if (!Character.isDigit(line[j].charAt(0))) {
+                                line[j] = "0.0";
+                            }else {
+                                BigDecimal b = new BigDecimal(Double.parseDouble(line[j]));
+                                double f = b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
+                                line[j] = String.valueOf(f);
+                            }
+                        }
+                        logger.info(line[j]);
+                    }
+                    tDashboarddayelecEntity.setGtg1Wr(line[2]);
+                    tDashboarddayelecEntity.setGtg2Wr(line[3]);
+                    tDashboarddayelecEntity.setGtg3Wr(line[4]);
+                    tDashboarddayelecEntity.setStg1Wr(line[5]);
+                }
+                if (i == 4) {
+                    logger.info("第" + i + "行");
+                    for (int j = 0; j < 6; j++) {
+                        logger.info("读数:" + line[j]);
+                        if (line[j].equals("")) {
+                            line[j] = "0.0";
+                        }else {
+                            if (!Character.isDigit(line[j].charAt(0))) {
+                                line[j] = "0.0";
+                            }else {
+                                BigDecimal b = new BigDecimal(Double.parseDouble(line[j]));
+                                double f = b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
+                                line[j] = String.valueOf(f);
+                            }
+                        }
+                        logger.info(line[j]);
+                    }
+                    tDashboarddayelecEntity.setMwhWr(line[6]);
+                }
+                if (i == 6) {
+                    logger.info("第" + i + "行");
+                    for (int j = 2; j < 7; j++) {
+                        logger.info("读数:" + line[j]);
+                        if (line[j].equals("")) {
+                            line[j] = "0";
+                        }else {
+                            if (!Character.isDigit(line[j].charAt(0))) {
+                                line[j] = "0";
+                            }else {
+                                BigDecimal b = new BigDecimal(Double.parseDouble(line[j]));
+                                double f = b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
+                                line[j] = String.valueOf(f);
+                            }
+                        }
+                        logger.info(line[j]);
+                    }
+                    tDashboarddayelecEntity.setHhp(line[2]);
+                    tDashboarddayelecEntity.setHp(line[3]);
+                    tDashboarddayelecEntity.setLp(line[4]);
+                    tDashboarddayelecEntity.setMp(line[5]);
+                    tDashboarddayelecEntity.setTotalConsumption(line[6]);
+                }
+                if (i == 9) {
+                    logger.info("第" + i + "行");
+                    for (int j = 2; j < 6; j++) {
+                        logger.info("读数:" + line[j]);
+                        if (line[j].equals("")) {
+                            line[j] = "0.0";
+                        }else {
+                            if (!Character.isDigit(line[j].charAt(0))) {
+                                line[j] = "0.0";
+                            }else {
+                                BigDecimal b = new BigDecimal(Double.parseDouble(line[j]));
+                                double f = b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
+                                line[j] = String.valueOf(f);
+                            }
+                        }
+                        logger.info(line[j]);
+                    }
+//                    Integer HhpNum=new Integer(line[2]).intValue();
+//                    Integer HpNum=new Integer(line[3]).intValue();
+//                    Integer LpNum=new Integer(line[4]).intValue();
+//                    Integer MpNum=new Integer(line[5]).intValue();
+                    tDashboarddayelecEntity.setHhpNum(line[2]);
+                    tDashboarddayelecEntity.setHpNum(line[3]);
+                    tDashboarddayelecEntity.setLpNum(line[4]);
+                    tDashboarddayelecEntity.setMpNum(line[5]);
+
+                }
+                if (i == 10) {
+                    logger.info("第" + i + "行");
+                    for (int j = 2; j < 6; j++) {
+                        logger.info("读数:" + line[j]);
+                        if (line[j].equals("")) {
+                            line[j] = "0";
+                        }else {
+                            if (!Character.isDigit(line[j].charAt(0))) {
+                                line[j] = "0";
+                            }else {
+                                BigDecimal b = new BigDecimal(Double.parseDouble(line[j]));
+                                double f = b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
+                                line[j] = String.valueOf(f);
+                            }
+                        }
+                        logger.info(line[j]);
+                    }
+                    tDashboarddayelecEntity.setHhpTemp(line[2]);
+                    tDashboarddayelecEntity.setHpTemp(line[3]);
+                    tDashboarddayelecEntity.setLpTemp(line[4]);
+                    tDashboarddayelecEntity.setMpTemp(line[5]);
+                }
+                /* SS */
+                if (i == 13) {
+                    logger.info("第" + i + "行");
+                    for(int j=2;j<5;j++){
+                        if (line[j].equals("")) {
+                            line[j] = "0.0";
+                        }else {
+                            if (!Character.isDigit(line[j].charAt(0))) {
+                                line[j] = "0.0";
+                            }else {
+                                BigDecimal b = new BigDecimal(Double.parseDouble(line[j]));
+                                double f = b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
+                                line[j] = String.valueOf(f);
+                            }
+                        }
+                        logger.info(line[j]);
+                    }
+                    tDashboarddayelecEntity.setShihua(line[2]);
+                    tDashboarddayelecEntity.setShiyou(line[3]);
+                    tDashboarddayelecEntity.setShunshiliang(line[4]);
+                }
+                if (i == 18) {
+                    logger.info("第" + i + "行");
+                    for(int j=2;j<6;j++){
+                        if (line[j].equals("")) {
+                            line[j] = "0.0";
+                        }else {
+                            if (!Character.isDigit(line[j].charAt(0))) {
+                                line[j] = "0.0";
+                            }else {
+                                BigDecimal b = new BigDecimal(Double.parseDouble(line[j]));
+                                double f = b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
+                                line[j] = String.valueOf(f);
+                            }
+                        }
+                        logger.info(line[j]);
+                    }
+                    tDashboarddayelecEntity.setYpg(line[2]);
+                    tDashboarddayelecEntity.setDaodianliang(line[3]);
+                    tDashboarddayelecEntity.setEveLec(line[4]);
+                    tDashboarddayelecEntity.setFenggucha(rounding(line[5]));
+                }
+                if (i == 20) {
+                    logger.info("第" + i + "行");
+                    for(int j=2;j<4;j++){
+                        if (line[j].equals("")) {
+                            line[j] = "0.0";
+                        }else {
+                            if (!Character.isDigit(line[j].charAt(0))) {
+                                line[j] = "0.0";
+                            }else {
+                                BigDecimal b = new BigDecimal(Double.parseDouble(line[j]));
+                                double f = b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
+                                line[j] = String.valueOf(f);
+                            }
+                        }
+                        logger.info(line[j]);
+                    }
+                    tDashboarddayelecEntity.setBycElec(line[2]);
+                    tDashboarddayelecEntity.setBocElec(line[3]);
+                }
+            }
+            tDashboarddayelecEntity.setCreatedate(new Date());
+            tDashboarddayelecEntity.setDataDate(new Date());
+            Calendar now = Calendar.getInstance();
+            tDashboarddayelecEntity.setDateDay(String.valueOf(now.get(Calendar.DAY_OF_MONTH)));
+            logger.info("dashboardData:" + tDashboarddayelecEntity);
+            tDashboarddayelecService.save(tDashboarddayelecEntity);
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+    }
+    public String rounding(String lineNum) {
+        try {
+            logger.info("读数:" + lineNum);
+            if (lineNum.equals("")) {
+                lineNum = "0.0";
+            }else {
+                if (!Character.isDigit(lineNum.charAt(0))) {
+                    if ("-".equals(lineNum.substring(0,1))){
+                        BigDecimal b = new BigDecimal(Double.parseDouble(lineNum));
+                        double f = b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
+                        lineNum = String.valueOf(f);
+                    }else {
+                        lineNum = "0.0";
+                    }
+                }else {
+                    BigDecimal b = new BigDecimal(Double.parseDouble(lineNum));
+                    double f = b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
+                    lineNum = String.valueOf(f);
+                }
+            }
+            logger.info(lineNum);
+            return lineNum;
+        }catch (Exception e) {
+            logger.error(String.valueOf(e));
+            return "0.0";
+        }
+    }
+}

+ 92 - 0
src/main/java/io/renren/modules/common/EveryEightGetController.java

@@ -0,0 +1,92 @@
+package io.renren.modules.common;
+
+import io.renren.modules.aspen.entity.TDashboarddayeleceightEntity;
+import io.renren.modules.aspen.service.TDashboarddayeleceightService;
+import io.renren.modules.sys.controller.AbstractController;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.stereotype.Component;
+import com.opencsv.CSVReader;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.annotation.Scheduled;
+import java.io.FileReader;
+import java.io.IOException;
+import java.math.BigDecimal;
+import java.util.Calendar;
+import java.util.Date;
+
+@Component
+@Configuration      //1.主要用于标记配置类,兼备Component的效果。
+@EnableScheduling   // 2.开启定时任务
+public class EveryEightGetController extends AbstractController {
+    @Autowired
+    private TDashboarddayeleceightService tDashboarddayeleceightService;
+    //    @Scheduled(cron = "0 59 7 * * ?")
+    //每日8:00触发
+    @Scheduled(cron = "0 0 8 * * ?")
+    public void getExcelData1(){
+        logger.info("0:00获取数据");
+//        String csvFile = "D://ssyFile/物料.csv";
+        String csvFile = "C://dashboardAspen/wuliao.csv";
+        TDashboarddayeleceightEntity tDashboarddayeleceightEntity = new TDashboarddayeleceightEntity();
+        CSVReader reader = null;
+        try {
+            reader = new CSVReader(new FileReader(csvFile));
+            String[] line;
+            //定义行数
+            int i =0;
+            while ((line = reader.readNext()) != null) {
+                if (i == 18) {
+                    logger.info("第" + i + "行");
+                    for (int j = 2; j < 6; j++) {
+                        logger.info("读数:" + line[j]);
+                        if (line[j].equals("")) {
+                            line[j] = "0";
+                        }else {
+                            if (!Character.isDigit(line[j].charAt(0))) {
+                                line[j] = "0";
+                            }else {
+                                BigDecimal b = new BigDecimal(Double.parseDouble(line[j]));
+                                double f = b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
+                                line[j] = String.valueOf(f);
+                            }
+                        }
+                        logger.info(line[j]);
+                    }
+                    tDashboarddayeleceightEntity.setEvconsume(line[2]);
+                    tDashboarddayeleceightEntity.setElecp(line[3]);
+                    tDashboarddayeleceightEntity.setHechengqi(line[4]);
+                    tDashboarddayeleceightEntity.setU2(line[5]);
+                }
+            }
+            tDashboarddayeleceightEntity.setDataDate(new Date());
+            Calendar now = Calendar.getInstance();
+            tDashboarddayeleceightEntity.setDateDay(String.valueOf(now.get(Calendar.DAY_OF_MONTH)));
+            logger.info("dashboardDay:" + tDashboarddayeleceightEntity);
+            tDashboarddayeleceightService.save(tDashboarddayeleceightEntity);
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+    }
+    public String rounding(String lineNum) {
+        try {
+            logger.info("读数:" + lineNum);
+            if (lineNum.equals("")) {
+                lineNum = "0.0";
+            }else {
+                if (!Character.isDigit(lineNum.charAt(0))) {
+                    lineNum = "0.0";
+                }else {
+                    BigDecimal b = new BigDecimal(Double.parseDouble(lineNum));
+                    double f = b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
+                    lineNum = String.valueOf(f);
+                }
+            }
+            logger.info(lineNum);
+            return lineNum;
+        }catch (Exception e) {
+            logger.error(String.valueOf(e));
+            return "0.0";
+        }
+    }
+}

+ 290 - 0
src/main/java/io/renren/modules/common/TestPullData.java

@@ -0,0 +1,290 @@
+package io.renren.modules.common;
+
+import com.opencsv.CSVReader;
+import io.renren.modules.aspen.entity.TDashboarddayelecEntity;
+import io.renren.modules.aspen.service.TDashboarddayelecService;
+import io.renren.modules.sys.controller.AbstractController;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+import java.io.FileReader;
+import java.io.IOException;
+import java.math.BigDecimal;
+import java.util.Calendar;
+import java.util.Date;
+
+/**
+ * 电厂大屏抓取数据测试类
+ *
+ * @author Wang Zi Wen
+ * @email wangggziwen@163.com
+ * @date 2022/04/15 11:09:02
+ */
+@Component
+@Configuration      //1.主要用于标记配置类,兼备Component的效果。
+@EnableScheduling   // 2.开启定时任务
+public class TestPullData extends AbstractController {
+
+    @Autowired
+    private TDashboarddayelecService tDashboarddayelecService;
+
+    public static void main(String[] args) {
+        TestPullData testPullData = new TestPullData();
+        testPullData.getExcelData();
+    }
+
+    @Scheduled(cron = "9,19,29,39,49,59 * * * * ?" )
+    public void getExcelData(){
+        logger.info("实时获取数据");
+//        String csvFile = "D://ssyFile/物料.csv";
+        String csvFile = "D://elecdashboardaspen/elecDashboardData1.csv";
+        TDashboarddayelecEntity tDashboarddayelecEntity = new TDashboarddayelecEntity();
+        CSVReader reader = null;
+        try {
+            reader = new CSVReader(new FileReader(csvFile));
+            String[] line;
+            //定义行数
+            int i = 0;
+            while ((line = reader.readNext()) != null) {
+                i++;
+                if (i == 2) {
+                    logger.info("第" + i + "行");
+                    for (int j = 2; j < 7; j++) {
+                        logger.info("读数:" + line[j]);
+                        if (line[j].equals("")) {
+                            line[j] = "0.0";
+                        }else {
+                            if (!Character.isDigit(line[j].charAt(0))) {
+                                line[j] = "0.0";
+                            }else {
+                                BigDecimal b = new BigDecimal(Double.parseDouble(line[j]));
+                                double f = b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
+                                line[j] = String.valueOf(f);
+                            }
+                        }
+                        logger.info(line[j]);
+                    }
+                    tDashboarddayelecEntity.setGtg1Lv(line[2]);
+                    tDashboarddayelecEntity.setGtg2Lv(line[3]);
+                    tDashboarddayelecEntity.setGtg3Lv(line[4]);
+                    tDashboarddayelecEntity.setStg1Lv(line[5]);
+                    tDashboarddayelecEntity.setMwhLv(line[6]);
+                }
+                if (i == 3) {
+                    logger.info("第" + i + "行");
+                    for (int j = 0; j < 6; j++) {
+                        logger.info("读数:" + line[j]);
+                        if (line[j].equals("")) {
+                            line[j] = "0.0";
+                        }else {
+                            if (!Character.isDigit(line[j].charAt(0))) {
+                                line[j] = "0.0";
+                            }else {
+                                BigDecimal b = new BigDecimal(Double.parseDouble(line[j]));
+                                double f = b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
+                                line[j] = String.valueOf(f);
+                            }
+                        }
+                        logger.info(line[j]);
+                    }
+                    tDashboarddayelecEntity.setGtg1Wr(line[2]);
+                    tDashboarddayelecEntity.setGtg2Wr(line[3]);
+                    tDashboarddayelecEntity.setGtg3Wr(line[4]);
+                    tDashboarddayelecEntity.setStg1Wr(line[5]);
+                }
+                if (i == 4) {
+                    logger.info("第" + i + "行");
+                    for (int j = 0; j < 6; j++) {
+                        logger.info("读数:" + line[j]);
+                        if (line[j].equals("")) {
+                            line[j] = "0.0";
+                        }else {
+                            if (!Character.isDigit(line[j].charAt(0))) {
+                                line[j] = "0.0";
+                            }else {
+                                BigDecimal b = new BigDecimal(Double.parseDouble(line[j]));
+                                double f = b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
+                                line[j] = String.valueOf(f);
+                            }
+                        }
+                        logger.info(line[j]);
+                    }
+                    tDashboarddayelecEntity.setMwhWr(line[6]);
+                }
+                if (i == 6) {
+                    logger.info("第" + i + "行");
+                    for (int j = 2; j < 7; j++) {
+                        logger.info("读数:" + line[j]);
+                        if (line[j].equals("")) {
+                            line[j] = "0";
+                        }else {
+                            if (!Character.isDigit(line[j].charAt(0))) {
+                                line[j] = "0";
+                            }else {
+                                BigDecimal b = new BigDecimal(Double.parseDouble(line[j]));
+                                double f = b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
+                                line[j] = String.valueOf(f);
+                            }
+                        }
+                        logger.info(line[j]);
+                    }
+                    tDashboarddayelecEntity.setHhp(line[2]);
+                    tDashboarddayelecEntity.setHp(line[3]);
+                    tDashboarddayelecEntity.setLp(line[4]);
+                    tDashboarddayelecEntity.setMp(line[5]);
+                    tDashboarddayelecEntity.setTotalConsumption(line[6]);
+                }
+                if (i == 9) {
+                    logger.info("第" + i + "行");
+                    for (int j = 2; j < 6; j++) {
+                        logger.info("读数:" + line[j]);
+                        if (line[j].equals("")) {
+                            line[j] = "0.0";
+                        }else {
+                            if (!Character.isDigit(line[j].charAt(0))) {
+                                line[j] = "0.0";
+                            }else {
+                                BigDecimal b = new BigDecimal(Double.parseDouble(line[j]));
+                                double f = b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
+                                line[j] = String.valueOf(f);
+                            }
+                        }
+                        logger.info(line[j]);
+                    }
+//                    Integer HhpNum=new Integer(line[2]).intValue();
+//                    Integer HpNum=new Integer(line[3]).intValue();
+//                    Integer LpNum=new Integer(line[4]).intValue();
+//                    Integer MpNum=new Integer(line[5]).intValue();
+                    tDashboarddayelecEntity.setHhpNum(line[2]);
+                    tDashboarddayelecEntity.setHpNum(line[3]);
+                    tDashboarddayelecEntity.setLpNum(line[4]);
+                    tDashboarddayelecEntity.setMpNum(line[5]);
+
+                }
+                if (i == 10) {
+                    logger.info("第" + i + "行");
+                    for (int j = 2; j < 6; j++) {
+                        logger.info("读数:" + line[j]);
+                        if (line[j].equals("")) {
+                            line[j] = "0";
+                        }else {
+                            if (!Character.isDigit(line[j].charAt(0))) {
+                                line[j] = "0";
+                            }else {
+                                BigDecimal b = new BigDecimal(Double.parseDouble(line[j]));
+                                double f = b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
+                                line[j] = String.valueOf(f);
+                            }
+                        }
+                        logger.info(line[j]);
+                    }
+                    tDashboarddayelecEntity.setHhpTemp(line[2]);
+                    tDashboarddayelecEntity.setHpTemp(line[3]);
+                    tDashboarddayelecEntity.setLpTemp(line[4]);
+                    tDashboarddayelecEntity.setMpTemp(line[5]);
+                }
+                /* SS */
+                if (i == 13) {
+                    logger.info("第" + i + "行");
+                    for(int j=2;j<5;j++){
+                        if (line[j].equals("")) {
+                            line[j] = "0.0";
+                        }else {
+                            if (!Character.isDigit(line[j].charAt(0))) {
+                                line[j] = "0.0";
+                            }else {
+                                BigDecimal b = new BigDecimal(Double.parseDouble(line[j]));
+                                double f = b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
+                                line[j] = String.valueOf(f);
+                            }
+                        }
+                        logger.info(line[j]);
+                    }
+                    tDashboarddayelecEntity.setShihua(line[2]);
+                    tDashboarddayelecEntity.setShiyou(line[3]);
+                    tDashboarddayelecEntity.setShunshiliang(line[4]);
+                }
+                if (i == 18) {
+                    logger.info("第" + i + "行");
+                    for(int j=2;j<6;j++){
+                        if (line[j].equals("")) {
+                            line[j] = "0.0";
+                        }else {
+                            if (!Character.isDigit(line[j].charAt(0))) {
+                                line[j] = "0.0";
+                            }else {
+                                BigDecimal b = new BigDecimal(Double.parseDouble(line[j]));
+                                double f = b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
+                                line[j] = String.valueOf(f);
+                            }
+                        }
+                        logger.info(line[j]);
+                    }
+                    tDashboarddayelecEntity.setYpg(line[2]);
+                    tDashboarddayelecEntity.setDaodianliang(line[3]);
+                    tDashboarddayelecEntity.setEveLec(line[4]);
+                    tDashboarddayelecEntity.setFenggucha(rounding(line[5]));
+                }
+                if (i == 20) {
+                    logger.info("第" + i + "行");
+                    for(int j=2;j<4;j++){
+                        if (line[j].equals("")) {
+                            line[j] = "0.0";
+                        }else {
+                            if (!Character.isDigit(line[j].charAt(0))) {
+                                line[j] = "0.0";
+                            }else {
+                                BigDecimal b = new BigDecimal(Double.parseDouble(line[j]));
+                                double f = b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
+                                line[j] = String.valueOf(f);
+                            }
+                        }
+                        logger.info(line[j]);
+                    }
+                    tDashboarddayelecEntity.setBycElec(line[2]);
+                    tDashboarddayelecEntity.setBocElec(line[3]);
+                }
+            }
+            tDashboarddayelecEntity.setCreatedate(new Date());
+            tDashboarddayelecEntity.setDataDate(new Date());
+            Calendar now = Calendar.getInstance();
+            tDashboarddayelecEntity.setDateDay(String.valueOf(now.get(Calendar.DAY_OF_MONTH)));
+            logger.info("dashboardData:" + tDashboarddayelecEntity);
+            tDashboarddayelecService.save(tDashboarddayelecEntity);
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+    }
+
+    public String rounding(String lineNum) {
+        try {
+            logger.info("读数:" + lineNum);
+            if (lineNum.equals("")) {
+                lineNum = "0.0";
+            }else {
+                if (!Character.isDigit(lineNum.charAt(0))) {
+                    if ("-".equals(lineNum.substring(0,1))){
+                        BigDecimal b = new BigDecimal(Double.parseDouble(lineNum));
+                        double f = b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
+                        lineNum = String.valueOf(f);
+                    }else {
+                        lineNum = "0.0";
+                    }
+                }else {
+                    BigDecimal b = new BigDecimal(Double.parseDouble(lineNum));
+                    double f = b.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
+                    lineNum = String.valueOf(f);
+                }
+            }
+            logger.info(lineNum);
+            return lineNum;
+        }catch (Exception e) {
+            logger.error(String.valueOf(e));
+            return "0.0";
+        }
+    }
+
+}

+ 62 - 0
src/main/java/io/renren/modules/oss/cloud/AliyunCloudStorageService.java

@@ -0,0 +1,62 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.modules.oss.cloud;
+
+import com.aliyun.oss.OSSClient;
+import io.renren.common.exception.RRException;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+
+/**
+ * 阿里云存储
+ *
+ * @author Mark 735032128@qq.com
+ */
+public class AliyunCloudStorageService extends CloudStorageService {
+    private OSSClient client;
+
+    public AliyunCloudStorageService(CloudStorageConfig config) {
+        this.config = config;
+
+        //初始化
+        init();
+    }
+
+    private void init() {
+        client = new OSSClient(config.getAliyunEndPoint(), config.getAliyunAccessKeyId(),
+                config.getAliyunAccessKeySecret());
+    }
+
+    @Override
+    public String upload(byte[] data, String path) {
+        return upload(new ByteArrayInputStream(data), path);
+    }
+
+    @Override
+    public String upload(InputStream inputStream, String path) {
+        try {
+            client.putObject(config.getAliyunBucketName(), path, inputStream);
+        } catch (Exception e) {
+            throw new RRException("上传文件失败,请检查配置信息", e);
+        }
+
+        return config.getAliyunDomain() + "/" + path;
+    }
+
+    @Override
+    public String uploadSuffix(byte[] data, String suffix) {
+        return upload(data, getPath(config.getAliyunPrefix(), suffix));
+    }
+
+    @Override
+    public String uploadSuffix(InputStream inputStream, String suffix) {
+        return upload(inputStream, getPath(config.getAliyunPrefix(), suffix));
+    }
+}

+ 94 - 0
src/main/java/io/renren/modules/oss/cloud/CloudStorageConfig.java

@@ -0,0 +1,94 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.modules.oss.cloud;
+
+
+import io.renren.common.validator.group.AliyunGroup;
+import io.renren.common.validator.group.QcloudGroup;
+import io.renren.common.validator.group.QiniuGroup;
+import lombok.Data;
+import org.hibernate.validator.constraints.Range;
+import org.hibernate.validator.constraints.URL;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+/**
+ * 云存储配置信息
+ *
+ * @author Mark 735032128@qq.com
+ */
+@Data
+public class CloudStorageConfig implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    //类型 1:七牛  2:阿里云  3:腾讯云
+    @Range(min = 1, max = 3, message = "类型错误")
+    private Integer type;
+
+    //七牛绑定的域名
+    @NotBlank(message = "七牛绑定的域名不能为空", groups = QiniuGroup.class)
+    @URL(message = "七牛绑定的域名格式不正确", groups = QiniuGroup.class)
+    private String qiniuDomain;
+    //七牛路径前缀
+    private String qiniuPrefix;
+    //七牛ACCESS_KEY
+    @NotBlank(message = "七牛AccessKey不能为空", groups = QiniuGroup.class)
+    private String qiniuAccessKey;
+    //七牛SECRET_KEY
+    @NotBlank(message = "七牛SecretKey不能为空", groups = QiniuGroup.class)
+    private String qiniuSecretKey;
+    //七牛存储空间名
+    @NotBlank(message = "七牛空间名不能为空", groups = QiniuGroup.class)
+    private String qiniuBucketName;
+
+    //阿里云绑定的域名
+    @NotBlank(message = "阿里云绑定的域名不能为空", groups = AliyunGroup.class)
+    @URL(message = "阿里云绑定的域名格式不正确", groups = AliyunGroup.class)
+    private String aliyunDomain;
+    //阿里云路径前缀
+    private String aliyunPrefix;
+    //阿里云EndPoint
+    @NotBlank(message = "阿里云EndPoint不能为空", groups = AliyunGroup.class)
+    private String aliyunEndPoint;
+    //阿里云AccessKeyId
+    @NotBlank(message = "阿里云AccessKeyId不能为空", groups = AliyunGroup.class)
+    private String aliyunAccessKeyId;
+    //阿里云AccessKeySecret
+    @NotBlank(message = "阿里云AccessKeySecret不能为空", groups = AliyunGroup.class)
+    private String aliyunAccessKeySecret;
+    //阿里云BucketName
+    @NotBlank(message = "阿里云BucketName不能为空", groups = AliyunGroup.class)
+    private String aliyunBucketName;
+
+    //腾讯云绑定的域名
+    @NotBlank(message = "腾讯云绑定的域名不能为空", groups = QcloudGroup.class)
+    @URL(message = "腾讯云绑定的域名格式不正确", groups = QcloudGroup.class)
+    private String qcloudDomain;
+    //腾讯云路径前缀
+    private String qcloudPrefix;
+    //腾讯云AppId
+    @NotNull(message = "腾讯云AppId不能为空", groups = QcloudGroup.class)
+    private Integer qcloudAppId;
+    //腾讯云SecretId
+    @NotBlank(message = "腾讯云SecretId不能为空", groups = QcloudGroup.class)
+    private String qcloudSecretId;
+    //腾讯云SecretKey
+    @NotBlank(message = "腾讯云SecretKey不能为空", groups = QcloudGroup.class)
+    private String qcloudSecretKey;
+    //腾讯云BucketName
+    @NotBlank(message = "腾讯云BucketName不能为空", groups = QcloudGroup.class)
+    private String qcloudBucketName;
+    //腾讯云COS所属地区
+    @NotBlank(message = "所属地区不能为空", groups = QcloudGroup.class)
+    private String qcloudRegion;
+
+
+}

+ 78 - 0
src/main/java/io/renren/modules/oss/cloud/CloudStorageService.java

@@ -0,0 +1,78 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.modules.oss.cloud;
+
+import io.renren.common.utils.DateUtils;
+import org.apache.commons.lang.StringUtils;
+
+import java.io.InputStream;
+import java.util.Date;
+import java.util.UUID;
+
+/**
+ * 云存储(支持七牛、阿里云、腾讯云、又拍云)
+ *
+ * @author Mark 735032128@qq.com
+ */
+public abstract class CloudStorageService {
+    /** 云存储配置信息 */
+    CloudStorageConfig config;
+
+    /**
+     * 文件路径
+     * @param prefix 前缀
+     * @param suffix 后缀
+     * @return 返回上传路径
+     */
+    public String getPath(String prefix, String suffix) {
+        //生成uuid
+        String uuid = UUID.randomUUID().toString().replaceAll("-", "");
+        //文件路径
+        String path = DateUtils.format(new Date(), "yyyyMMdd") + "/" + uuid;
+
+        if (StringUtils.isNotBlank(prefix)) {
+            path = prefix + "/" + path;
+        }
+
+        return path + suffix;
+    }
+
+    /**
+     * 文件上传
+     * @param data    文件字节数组
+     * @param path    文件路径,包含文件名
+     * @return 返回http地址
+     */
+    public abstract String upload(byte[] data, String path);
+
+    /**
+     * 文件上传
+     * @param data     文件字节数组
+     * @param suffix   后缀
+     * @return 返回http地址
+     */
+    public abstract String uploadSuffix(byte[] data, String suffix);
+
+    /**
+     * 文件上传
+     * @param inputStream   字节流
+     * @param path          文件路径,包含文件名
+     * @return 返回http地址
+     */
+    public abstract String upload(InputStream inputStream, String path);
+
+    /**
+     * 文件上传
+     * @param inputStream  字节流
+     * @param suffix       后缀
+     * @return 返回http地址
+     */
+    public abstract String uploadSuffix(InputStream inputStream, String suffix);
+
+}

+ 88 - 0
src/main/java/io/renren/modules/oss/cloud/QcloudCloudStorageService.java

@@ -0,0 +1,88 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.modules.oss.cloud;
+
+
+import com.alibaba.fastjson.JSONObject;
+import com.qcloud.cos.COSClient;
+import com.qcloud.cos.ClientConfig;
+import com.qcloud.cos.request.UploadFileRequest;
+import com.qcloud.cos.sign.Credentials;
+import io.renren.common.exception.RRException;
+import org.apache.commons.io.IOUtils;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * 腾讯云存储
+ *
+ * @author Mark 735032128@qq.com
+ */
+public class QcloudCloudStorageService extends CloudStorageService {
+    private COSClient client;
+
+    public QcloudCloudStorageService(CloudStorageConfig config) {
+        this.config = config;
+
+        //初始化
+        init();
+    }
+
+    private void init() {
+        Credentials credentials = new Credentials(config.getQcloudAppId(), config.getQcloudSecretId(),
+                config.getQcloudSecretKey());
+
+        //初始化客户端配置
+        ClientConfig clientConfig = new ClientConfig();
+        //设置bucket所在的区域,华南:gz 华北:tj 华东:sh
+        clientConfig.setRegion(config.getQcloudRegion());
+
+        client = new COSClient(clientConfig, credentials);
+    }
+
+    @Override
+    public String upload(byte[] data, String path) {
+        //腾讯云必需要以"/"开头
+        if (!path.startsWith("/")) {
+            path = "/" + path;
+        }
+
+        //上传到腾讯云
+        UploadFileRequest request = new UploadFileRequest(config.getQcloudBucketName(), path, data);
+        String response = client.uploadFile(request);
+
+        JSONObject jsonObject = JSONObject.parseObject(response);
+        if (jsonObject.getInteger("code") != 0) {
+            throw new RRException("文件上传失败," + jsonObject.getString("message"));
+        }
+
+        return config.getQcloudDomain() + path;
+    }
+
+    @Override
+    public String upload(InputStream inputStream, String path) {
+        try {
+            byte[] data = IOUtils.toByteArray(inputStream);
+            return this.upload(data, path);
+        } catch (IOException e) {
+            throw new RRException("上传文件失败", e);
+        }
+    }
+
+    @Override
+    public String uploadSuffix(byte[] data, String suffix) {
+        return upload(data, getPath(config.getQcloudPrefix(), suffix));
+    }
+
+    @Override
+    public String uploadSuffix(InputStream inputStream, String suffix) {
+        return upload(inputStream, getPath(config.getQcloudPrefix(), suffix));
+    }
+}

+ 77 - 0
src/main/java/io/renren/modules/oss/cloud/QiniuCloudStorageService.java

@@ -0,0 +1,77 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.modules.oss.cloud;
+
+import com.qiniu.common.Zone;
+import com.qiniu.http.Response;
+import com.qiniu.storage.Configuration;
+import com.qiniu.storage.UploadManager;
+import com.qiniu.util.Auth;
+import io.renren.common.exception.RRException;
+import org.apache.commons.io.IOUtils;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ * 七牛云存储
+ *
+ * @author Mark 735032128@qq.com
+ */
+public class QiniuCloudStorageService extends CloudStorageService {
+    private UploadManager uploadManager;
+    private String token;
+
+    public QiniuCloudStorageService(CloudStorageConfig config) {
+        this.config = config;
+
+        //初始化
+        init();
+    }
+
+    private void init() {
+        uploadManager = new UploadManager(new Configuration(Zone.autoZone()));
+        token = Auth.create(config.getQiniuAccessKey(), config.getQiniuSecretKey()).
+                uploadToken(config.getQiniuBucketName());
+    }
+
+    @Override
+    public String upload(byte[] data, String path) {
+        try {
+            Response res = uploadManager.put(data, path, token);
+            if (!res.isOK()) {
+                throw new RuntimeException("上传七牛出错:" + res.toString());
+            }
+        } catch (Exception e) {
+            throw new RRException("上传文件失败,请核对七牛配置信息", e);
+        }
+
+        return config.getQiniuDomain() + "/" + path;
+    }
+
+    @Override
+    public String upload(InputStream inputStream, String path) {
+        try {
+            byte[] data = IOUtils.toByteArray(inputStream);
+            return this.upload(data, path);
+        } catch (IOException e) {
+            throw new RRException("上传文件失败", e);
+        }
+    }
+
+    @Override
+    public String uploadSuffix(byte[] data, String suffix) {
+        return upload(data, getPath(config.getQiniuPrefix(), suffix));
+    }
+
+    @Override
+    public String uploadSuffix(InputStream inputStream, String suffix) {
+        return upload(inputStream, getPath(config.getQiniuPrefix(), suffix));
+    }
+}

+ 31 - 0
src/main/java/io/renren/modules/sys/controller/AbstractController.java

@@ -0,0 +1,31 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.modules.sys.controller;
+
+import io.renren.modules.sys.entity.SysUserEntity;
+import org.apache.shiro.SecurityUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Controller公共组件
+ *
+ * @author Mark 735032128@qq.com
+ */
+public abstract class AbstractController {
+    protected Logger logger = LoggerFactory.getLogger(getClass());
+
+    protected SysUserEntity getUser() {
+        return (SysUserEntity) SecurityUtils.getSubject().getPrincipal();
+    }
+
+    protected Long getUserId() {
+        return getUser().getUserId();
+    }
+}

+ 23 - 0
src/main/java/io/renren/modules/sys/controller/GetPwdController.java

@@ -0,0 +1,23 @@
+package io.renren.modules.sys.controller;
+
+import org.jasypt.encryption.StringEncryptor;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+@Controller
+@RequestMapping("/getpwd")
+public class GetPwdController {
+    @Autowired
+    StringEncryptor encryptor;
+
+    @GetMapping("/dataBase")
+    public void test() {
+        String username = encryptor.encrypt("");
+        System.out.println(username);
+
+        String password = encryptor.encrypt("");
+        System.out.println(password);
+    }
+}

+ 98 - 0
src/main/java/io/renren/modules/sys/controller/SysConfigController.java

@@ -0,0 +1,98 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.modules.sys.controller;
+
+
+import io.renren.common.annotation.SysLog;
+import io.renren.common.utils.PageUtils;
+import io.renren.common.utils.R;
+import io.renren.common.validator.ValidatorUtils;
+import io.renren.modules.sys.entity.SysConfigEntity;
+import io.renren.modules.sys.service.SysConfigService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Map;
+
+/**
+ * 系统配置信息
+ *
+ * @author Mark 735032128@qq.com
+ */
+@RestController
+@RequestMapping("/sys/config")
+public class SysConfigController extends AbstractController {
+    @Autowired
+    private SysConfigService sysConfigService;
+
+    /**
+     * 所有配置列表
+     */
+    @GetMapping("/list")
+    @RequiresPermissions("sys:config:list")
+    public R list(@RequestParam Map<String, Object> params) {
+        PageUtils page = sysConfigService.queryPage(params);
+
+        return R.ok().put("page", page);
+    }
+
+
+    /**
+     * 配置信息
+     */
+    @GetMapping("/info/{id}")
+    @RequiresPermissions("sys:config:info")
+    public R info(@PathVariable("id") Long id) {
+        SysConfigEntity config = sysConfigService.getById(id);
+
+        return R.ok().put("config", config);
+    }
+
+    /**
+     * 保存配置
+     */
+    @SysLog("保存配置")
+    @PostMapping("/save")
+    @RequiresPermissions("sys:config:save")
+    public R save(@RequestBody SysConfigEntity config) {
+        ValidatorUtils.validateEntity(config);
+
+        sysConfigService.saveConfig(config);
+
+        return R.ok();
+    }
+
+    /**
+     * 修改配置
+     */
+    @SysLog("修改配置")
+    @PostMapping("/update")
+    @RequiresPermissions("sys:config:update")
+    public R update(@RequestBody SysConfigEntity config) {
+        ValidatorUtils.validateEntity(config);
+
+        sysConfigService.update(config);
+
+        return R.ok();
+    }
+
+    /**
+     * 删除配置
+     */
+    @SysLog("删除配置")
+    @PostMapping("/delete")
+    @RequiresPermissions("sys:config:delete")
+    public R delete(@RequestBody Long[] ids) {
+        sysConfigService.deleteBatch(ids);
+
+        return R.ok();
+    }
+
+}

+ 145 - 0
src/main/java/io/renren/modules/sys/controller/SysDeptController.java

@@ -0,0 +1,145 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.modules.sys.controller;
+
+import io.renren.common.utils.Constant;
+import io.renren.common.utils.R;
+import io.renren.modules.sys.entity.SysDeptEntity;
+import io.renren.modules.sys.service.SysDeptService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.HashMap;
+import java.util.List;
+
+
+/**
+ * 部门管理
+ *
+ * @author Mark 735032128@qq.com
+ */
+@RestController
+@RequestMapping("/sys/dept")
+public class SysDeptController extends AbstractController {
+    @Autowired
+    private SysDeptService sysDeptService;
+
+    /**
+     * 列表
+     */
+    @RequestMapping("/list")
+    @RequiresPermissions("sys:dept:list")
+    public List<SysDeptEntity> list() {
+        List<SysDeptEntity> deptList = sysDeptService.queryList(new HashMap<String, Object>());
+
+        return deptList;
+    }
+
+    /**
+     * 选择部门(添加、修改菜单)
+     */
+    @RequestMapping("/select")
+    @RequiresPermissions("sys:dept:select")
+    public R select() {
+        List<SysDeptEntity> deptList = sysDeptService.queryList(new HashMap<String, Object>());
+
+        //添加一级部门
+        if (getUserId() == Constant.SUPER_ADMIN) {
+            SysDeptEntity root = new SysDeptEntity();
+            root.setDeptId(0L);
+            root.setName("一级部门");
+            root.setParentId(-1L);
+            root.setOpen(true);
+            deptList.add(root);
+        }
+
+        return R.ok().put("deptList", deptList);
+    }
+
+    /**
+     * 上级部门Id(管理员则为0)
+     */
+    @RequestMapping("/info")
+    @RequiresPermissions("sys:dept:list")
+    public R info() {
+        long deptId = 0;
+        if (getUserId() != Constant.SUPER_ADMIN) {
+            List<SysDeptEntity> deptList = sysDeptService.queryList(new HashMap<String, Object>());
+            Long parentId = null;
+            for (SysDeptEntity sysDeptEntity : deptList) {
+                if (parentId == null) {
+                    parentId = sysDeptEntity.getParentId();
+                    continue;
+                }
+
+                if (parentId > sysDeptEntity.getParentId().longValue()) {
+                    parentId = sysDeptEntity.getParentId();
+                }
+            }
+            deptId = parentId;
+        }
+
+        return R.ok().put("deptId", deptId);
+    }
+
+    /**
+     * 信息
+     */
+    @RequestMapping("/info/{deptId}")
+    @RequiresPermissions("sys:dept:info")
+    public R info(@PathVariable("deptId") Long deptId) {
+        SysDeptEntity dept = sysDeptService.getById(deptId);
+
+        return R.ok().put("dept", dept);
+    }
+
+    /**
+     * 保存
+     */
+    @RequestMapping("/save")
+    @RequiresPermissions("sys:dept:save")
+    public R save(@RequestBody SysDeptEntity dept) {
+        sysDeptService.save(dept);
+
+        return R.ok();
+    }
+
+    /**
+     * 修改
+     */
+    @RequestMapping("/update")
+    @RequiresPermissions("sys:dept:update")
+    public R update(@RequestBody SysDeptEntity dept) {
+        sysDeptService.updateById(dept);
+
+        return R.ok();
+    }
+
+    /**
+     * 删除
+     */
+    @RequestMapping("/delete/{deptId}")
+    @RequiresPermissions("sys:dept:delete")
+    public R delete(@PathVariable("deptId") long deptId) {
+        //判断是否有子部门
+        List<Long> deptList = sysDeptService.queryDetpIdList(deptId);
+        if (deptList.size() > 0) {
+            return R.error("请先删除子部门");
+        }
+
+        sysDeptService.removeById(deptId);
+
+        return R.ok();
+    }
+
+}

+ 97 - 0
src/main/java/io/renren/modules/sys/controller/SysDictController.java

@@ -0,0 +1,97 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.modules.sys.controller;
+
+import io.renren.common.utils.PageUtils;
+import io.renren.common.utils.R;
+import io.renren.common.validator.ValidatorUtils;
+import io.renren.modules.sys.entity.SysDictEntity;
+import io.renren.modules.sys.service.SysDictService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Arrays;
+import java.util.Map;
+
+/**
+ * 数据字典
+ *
+ * @author Mark 735032128@qq.com
+ */
+@RestController
+@RequestMapping("sys/sysdict")
+public class SysDictController {
+    @Autowired
+    private SysDictService sysDictService;
+
+
+    /**
+     * 列表
+     */
+    @RequestMapping("/list")
+    @RequiresPermissions("sys:sysdict:list")
+    public R list(@RequestParam Map<String, Object> params) {
+        PageUtils page = sysDictService.queryPage(params);
+
+        return R.ok().put("page", page);
+    }
+
+
+    /**
+     * 信息
+     */
+    @RequestMapping("/info/{id}")
+    @RequiresPermissions("sys:sysdict:info")
+    public R info(@PathVariable("id") Long id) {
+        SysDictEntity dict = sysDictService.getById(id);
+
+        return R.ok().put("dict", dict);
+    }
+
+    /**
+     * 保存
+     */
+    @RequestMapping("/save")
+    @RequiresPermissions("sys:sysdict:save")
+    public R save(@RequestBody SysDictEntity dict) {
+        //校验类型
+        ValidatorUtils.validateEntity(dict);
+
+        sysDictService.save(dict);
+
+        return R.ok();
+    }
+
+    /**
+     * 修改
+     */
+    @RequestMapping("/update")
+    @RequiresPermissions("sys:sysdict:update")
+    public R update(@RequestBody SysDictEntity dict) {
+        //校验类型
+        ValidatorUtils.validateEntity(dict);
+
+        sysDictService.updateById(dict);
+
+        return R.ok();
+    }
+
+    /**
+     * 删除
+     */
+    @RequestMapping("/delete")
+    @RequiresPermissions("sys:sysdict:delete")
+    public R delete(@RequestBody Long[] ids) {
+        sysDictService.removeByIds(Arrays.asList(ids));
+
+        return R.ok();
+    }
+
+}

+ 47 - 0
src/main/java/io/renren/modules/sys/controller/SysLogController.java

@@ -0,0 +1,47 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.modules.sys.controller;
+
+import io.renren.common.utils.PageUtils;
+import io.renren.common.utils.R;
+import io.renren.modules.sys.service.SysLogService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import java.util.Map;
+
+
+/**
+ * 系统日志
+ *
+ * @author Mark 735032128@qq.com
+ */
+@Controller
+@RequestMapping("/sys/log")
+public class SysLogController {
+    @Autowired
+    private SysLogService sysLogService;
+
+    /**
+     * 列表
+     */
+    @ResponseBody
+    @GetMapping("/list")
+    @RequiresPermissions("sys:log:list")
+    public R list(@RequestParam Map<String, Object> params) {
+        PageUtils page = sysLogService.queryPage(params);
+        return R.ok().put("page", page);
+    }
+
+}

+ 121 - 0
src/main/java/io/renren/modules/sys/controller/SysLoginController.java

@@ -0,0 +1,121 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.modules.sys.controller;
+
+import io.renren.common.utils.HttpContextUtils;
+import io.renren.common.utils.IPUtils;
+import io.renren.common.utils.R;
+import io.renren.modules.sys.entity.SysLogEntity;
+import io.renren.modules.sys.entity.SysUserEntity;
+import io.renren.modules.sys.form.SysLoginForm;
+import io.renren.modules.sys.service.SysCaptchaService;
+import io.renren.modules.sys.service.SysLogService;
+import io.renren.modules.sys.service.SysUserService;
+import io.renren.modules.sys.service.SysUserTokenService;
+import org.apache.commons.io.IOUtils;
+import org.apache.shiro.crypto.hash.Sha256Hash;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.imageio.ImageIO;
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.util.Date;
+import java.util.Map;
+
+/**
+ * 登录相关
+ *
+ * @author Mark 735032128@qq.com
+ */
+@RestController
+public class SysLoginController extends AbstractController {
+    @Autowired
+    private SysUserService sysUserService;
+    @Autowired
+    private SysUserTokenService sysUserTokenService;
+    @Autowired
+    private SysCaptchaService sysCaptchaService;
+    @Autowired
+    private SysLogService sysLogService;
+
+    /**
+     * 验证码
+     */
+    @GetMapping("captcha.jpg")
+    public void captcha(HttpServletResponse response, String uuid) throws IOException {
+        response.setHeader("Cache-Control", "no-store, no-cache");
+        response.setContentType("image/jpeg");
+
+        //获取图片验证码
+        BufferedImage image = sysCaptchaService.getCaptcha(uuid);
+
+        ServletOutputStream out = response.getOutputStream();
+        ImageIO.write(image, "jpg", out);
+        IOUtils.closeQuietly(out);
+    }
+
+    /**
+     * 登录
+     */
+    @PostMapping("/sys/login")
+    public Map<String, Object> login(@RequestBody SysLoginForm form) throws IOException {
+        /*boolean captcha = sysCaptchaService.validate(form.getUuid(), form.getCaptcha());
+        if (!form.getCaptcha().equals("8888")) {
+            if (!captcha) {
+                return R.error("验证码不正确");
+            }
+        }*/
+        //用户信息
+        SysUserEntity user = sysUserService.queryByUserName(form.getUsername());
+
+        //账号不存在、密码错误
+        if (user == null || !user.getPassword().equals(new Sha256Hash(form.getPassword(), user.getSalt()).toHex())) {
+            return R.error("账号或密码不正确");
+        }
+
+        //账号锁定
+        if (user.getStatus() == 0) {
+            return R.error("账号已被锁定,请联系管理员");
+        }
+
+        //生成token,并保存到数据库
+        R r = sysUserTokenService.createToken(user.getUserId());
+        //
+        SysLogEntity sysLog = new SysLogEntity();
+        //获取request
+        HttpServletRequest request = HttpContextUtils.getHttpServletRequest();
+        //设置IP地址
+        sysLog.setIp(IPUtils.getIpAddr(request));
+        //用户名
+        sysLog.setUsername(user.getUsername());
+        sysLog.setCreateDate(new Date());
+        sysLog.setTime(0l);
+        sysLog.setOperation("登录");
+        //保存系统日志
+        sysLogService.save(sysLog);
+        return r;
+    }
+
+    /**
+     * 退出
+     */
+    @PostMapping("/sys/logout")
+    public R logout() {
+        sysUserTokenService.logout(getUserId());
+        return R.ok();
+    }
+
+}

+ 197 - 0
src/main/java/io/renren/modules/sys/controller/SysMenuController.java

@@ -0,0 +1,197 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.modules.sys.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import io.renren.common.annotation.SysLog;
+import io.renren.common.exception.RRException;
+import io.renren.common.utils.Constant;
+import io.renren.common.utils.R;
+import io.renren.modules.sys.entity.SysDictEntity;
+import io.renren.modules.sys.entity.SysMenuEntity;
+import io.renren.modules.sys.service.ShiroService;
+import io.renren.modules.sys.service.SysDictService;
+import io.renren.modules.sys.service.SysMenuService;
+import org.apache.commons.lang.StringUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+import java.util.Set;
+
+/**
+ * 系统菜单
+ *
+ * @author Mark 735032128@qq.com
+ */
+@RestController
+@RequestMapping("/sys/menu")
+public class SysMenuController extends AbstractController {
+    @Autowired
+    private SysMenuService sysMenuService;
+    @Autowired
+    private ShiroService shiroService;
+    @Autowired
+    private SysDictService sysDictService;
+
+    /**
+     * 导航菜单
+     */
+    @GetMapping("/nav")
+    public R nav() {
+        List<SysMenuEntity> menuList = sysMenuService.getUserMenuList(getUserId());
+        Set<String> permissions = shiroService.getUserPermissions(getUserId());
+        List<SysDictEntity> dictList = sysDictService.list(new QueryWrapper<SysDictEntity>().orderByAsc("ORDER_NUM"));
+        return R.ok().put("menuList", menuList).put("permissions", permissions).put("dict", dictList);
+    }
+
+    /**
+     * 所有菜单列表
+     */
+    @GetMapping("/list")
+    @RequiresPermissions("sys:menu:list")
+    public List<SysMenuEntity> list() {
+        List<SysMenuEntity> menuList = sysMenuService.list();
+        for (SysMenuEntity sysMenuEntity : menuList) {
+            SysMenuEntity parentMenuEntity = sysMenuService.getById(sysMenuEntity.getParentId());
+            if (parentMenuEntity != null) {
+                sysMenuEntity.setParentName(parentMenuEntity.getName());
+            }
+        }
+
+        return menuList;
+    }
+
+    /**
+     * 选择菜单(添加、修改菜单)
+     */
+    @GetMapping("/select")
+    @RequiresPermissions("sys:menu:select")
+    public R select() {
+        //查询列表数据
+        List<SysMenuEntity> menuList = sysMenuService.queryNotButtonList();
+
+        //添加顶级菜单
+        SysMenuEntity root = new SysMenuEntity();
+        root.setMenuId(0L);
+        root.setName("一级菜单");
+        root.setParentId(-1L);
+        root.setOpen(true);
+        menuList.add(root);
+
+        return R.ok().put("menuList", menuList);
+    }
+
+    /**
+     * 菜单信息
+     */
+    @GetMapping("/info/{menuId}")
+    @RequiresPermissions("sys:menu:info")
+    public R info(@PathVariable("menuId") Long menuId) {
+        SysMenuEntity menu = sysMenuService.getById(menuId);
+        return R.ok().put("menu", menu);
+    }
+
+    /**
+     * 保存
+     */
+    @SysLog("保存菜单")
+    @PostMapping("/save")
+    @RequiresPermissions("sys:menu:save")
+    public R save(@RequestBody SysMenuEntity menu) {
+        //数据校验
+        verifyForm(menu);
+
+        sysMenuService.save(menu);
+
+        return R.ok();
+    }
+
+    /**
+     * 修改
+     */
+    @SysLog("修改菜单")
+    @PostMapping("/update")
+    @RequiresPermissions("sys:menu:update")
+    public R update(@RequestBody SysMenuEntity menu) {
+        //数据校验
+        verifyForm(menu);
+
+        sysMenuService.updateById(menu);
+
+        return R.ok();
+    }
+
+    /**
+     * 删除
+     */
+    @SysLog("删除菜单")
+    @PostMapping("/delete/{menuId}")
+    @RequiresPermissions("sys:menu:delete")
+    public R delete(@PathVariable("menuId") long menuId) {
+        if (menuId <= 31) {
+            return R.error("系统菜单,不能删除");
+        }
+
+        //判断是否有子菜单或按钮
+        List<SysMenuEntity> menuList = sysMenuService.queryListParentId(menuId);
+        if (menuList.size() > 0) {
+            return R.error("请先删除子菜单或按钮");
+        }
+
+        sysMenuService.delete(menuId);
+
+        return R.ok();
+    }
+
+    /**
+     * 验证参数是否正确
+     */
+    private void verifyForm(SysMenuEntity menu) {
+        if (StringUtils.isBlank(menu.getName())) {
+            throw new RRException("菜单名称不能为空");
+        }
+
+        if (menu.getParentId() == null) {
+            throw new RRException("上级菜单不能为空");
+        }
+
+        //菜单
+        if (menu.getType() == Constant.MenuType.MENU.getValue()) {
+            if (StringUtils.isBlank(menu.getUrl())) {
+                throw new RRException("菜单URL不能为空");
+            }
+        }
+
+        //上级菜单类型
+        int parentType = Constant.MenuType.CATALOG.getValue();
+        if (menu.getParentId() != 0) {
+            SysMenuEntity parentMenu = sysMenuService.getById(menu.getParentId());
+            parentType = parentMenu.getType();
+        }
+
+        //目录、菜单
+        if (menu.getType() == Constant.MenuType.CATALOG.getValue() ||
+                menu.getType() == Constant.MenuType.MENU.getValue()) {
+            if (parentType != Constant.MenuType.CATALOG.getValue()) {
+                throw new RRException("上级菜单只能为目录类型");
+            }
+            return;
+        }
+
+        //按钮
+        if (menu.getType() == Constant.MenuType.BUTTON.getValue()) {
+            if (parentType != Constant.MenuType.MENU.getValue()) {
+                throw new RRException("上级菜单只能为菜单类型");
+            }
+            return;
+        }
+    }
+}

+ 168 - 0
src/main/java/io/renren/modules/sys/controller/SysPlantController.java

@@ -0,0 +1,168 @@
+/**
+ * Copyright (c) 2016-2019 人人开源 All rights reserved.
+ * <p>
+ * https://www.renren.io
+ * <p>
+ * 版权所有,侵权必究!
+ */
+
+package io.renren.modules.sys.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import io.renren.common.utils.Constant;
+import io.renren.common.utils.R;
+import io.renren.modules.sys.entity.SysPlantEntity;
+import io.renren.modules.sys.entity.SysUserPlantEntity;
+import io.renren.modules.sys.service.SysPlantService;
+import io.renren.modules.sys.service.SysUserPlantService;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+
+/**
+ * 装置管理
+ *
+ * @author Mark 735032128@qq.com
+ */
+@RestController
+@RequestMapping("/sys/plant")
+public class SysPlantController extends AbstractController {
+    @Autowired
+    private SysPlantService sysPlantService;
+    @Autowired
+    private SysUserPlantService sysUserPlantService;
+
+    /**
+     * 列表
+     */
+    @RequestMapping("/list")
+    @RequiresPermissions("sys:plant:list")
+    public List<SysPlantEntity> list() {
+        List<SysPlantEntity> plantList = sysPlantService.queryList(new HashMap<String, Object>());
+
+        return plantList;
+    }
+
+    /**
+     * 用户列表
+     */
+    @RequestMapping("/mylist")
+    public List<SysPlantEntity> mylist() {
+        List<SysUserPlantEntity> userPlantList = sysUserPlantService.list(new QueryWrapper<SysUserPlantEntity>()
+                .eq("user_id" ,getUserId()));
+        List<SysPlantEntity> plantList = new ArrayList<>();
+        for (SysUserPlantEntity s : userPlantList
+             ) {
+            SysPlantEntity sysPlantEntity =  sysPlantService.getById(s.getPlantId());
+            if (sysPlantEntity != null)
+            plantList.add(sysPlantEntity);
+        }
+        return plantList;
+    }
+
+    /**
+     * 选择装置(添加、修改菜单)
+     */
+    @RequestMapping("/select")
+    @RequiresPermissions("sys:plant:select")
+    public R select() {
+        List<SysPlantEntity> plantList = sysPlantService.queryList(new HashMap<String, Object>());
+
+        //添加一级装置
+        if (getUserId() == Constant.SUPER_ADMIN) {
+            SysPlantEntity root = new SysPlantEntity();
+            root.setPlantId(0L);
+            root.setName("一级装置");
+            root.setParentId(-1L);
+            root.setOpen(true);
+            plantList.add(root);
+        }
+
+        return R.ok().put("plantList", plantList);
+    }
+
+    /**
+     * 上级装置Id(管理员则为0)
+     */
+    @RequestMapping("/info")
+    @RequiresPermissions("sys:plant:list")
+    public R info() {
+        long plantId = 0;
+        if (getUserId() != Constant.SUPER_ADMIN) {
+            List<SysPlantEntity> plantList = sysPlantService.queryList(new HashMap<String, Object>());
+            Long parentId = null;
+            for (SysPlantEntity sysPlantEntity : plantList) {
+                if (parentId == null) {
+                    parentId = sysPlantEntity.getParentId();
+                    continue;
+                }
+
+                if (parentId > sysPlantEntity.getParentId().longValue()) {
+                    parentId = sysPlantEntity.getParentId();
+                }
+            }
+            plantId = parentId;
+        }
+
+        return R.ok().put("plantId", plantId);
+    }
+
+    /**
+     * 信息
+     */
+    @RequestMapping("/info/{plantId}")
+    @RequiresPermissions("sys:plant:info")
+    public R info(@PathVariable("plantId") Long plantId) {
+        SysPlantEntity plant = sysPlantService.getById(plantId);
+
+        return R.ok().put("plant", plant);
+    }
+
+    /**
+     * 保存
+     */
+    @RequestMapping("/save")
+    @RequiresPermissions("sys:plant:save")
+    public R save(@RequestBody SysPlantEntity plant) {
+        sysPlantService.save(plant);
+
+        return R.ok();
+    }
+
+    /**
+     * 修改
+     */
+    @RequestMapping("/update")
+    @RequiresPermissions("sys:plant:update")
+    public R update(@RequestBody SysPlantEntity plant) {
+        sysPlantService.updateById(plant);
+
+        return R.ok();
+    }
+
+    /**
+     * 删除
+     */
+    @RequestMapping("/delete/{plantId}")
+    @RequiresPermissions("sys:plant:delete")
+    public R delete(@PathVariable("plantId") long plantId) {
+        //判断是否有子装置
+        List<Long> plantList = sysPlantService.queryPlantIdList(plantId);
+        if (plantList.size() > 0) {
+            return R.error("请先删除子装置");
+        }
+
+        sysPlantService.removeById(plantId);
+
+        return R.ok();
+    }
+
+}

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff