RYang 5 lat temu
commit
0ef224ca60
100 zmienionych plików z 8992 dodań i 0 usunięć
  1. 14 0
      .gitignore
  2. 1 0
      .idea/.name
  3. 14 0
      .idea/compiler.xml
  4. 6 0
      .idea/encodings.xml
  5. 17 0
      .idea/misc.xml
  6. 6 0
      .idea/sbt.xml
  7. 6 0
      .idea/vcs.xml
  8. 885 0
      .idea/workspace.xml
  9. BIN
      doc/1.介绍与安装.docx
  10. BIN
      doc/2.文件结构与配置.docx
  11. BIN
      doc/3.内置组件的应用.docx
  12. BIN
      doc/4.代码生成器的应用.docx
  13. BIN
      doc/5.硕正WEB组件的应用.docx
  14. BIN
      doc/6.工作流的应用实例.docx
  15. BIN
      doc/7.手机端基础接口文档.docx
  16. BIN
      doc/8.内容管理模块功能说明.docx
  17. BIN
      doc/jeesite-cas-client.rar
  18. BIN
      doc/jeesite_help.chm
  19. BIN
      doc/jeesite代码生成,流程,菜单设置,shiro.doc
  20. BIN
      doc/jeesite的cas集成配置.rar
  21. BIN
      doc/jeesite目录结构图.png
  22. BIN
      doc/maven.rar
  23. BIN
      doc/平台删除Activiti模块.docx
  24. 898 0
      pom.xml
  25. 17 0
      src/main/java/com/lightinit/hsdatagateway/common/annotation/FieldName.java
  26. 10 0
      src/main/java/com/lightinit/hsdatagateway/common/beanvalidator/AddGroup.java
  27. 116 0
      src/main/java/com/lightinit/hsdatagateway/common/beanvalidator/BeanValidators.java
  28. 9 0
      src/main/java/com/lightinit/hsdatagateway/common/beanvalidator/DefaultGroup.java
  29. 9 0
      src/main/java/com/lightinit/hsdatagateway/common/beanvalidator/EditGroup.java
  30. 199 0
      src/main/java/com/lightinit/hsdatagateway/common/config/Global.java
  31. 26 0
      src/main/java/com/lightinit/hsdatagateway/common/exceptions/BaseException.java
  32. 26 0
      src/main/java/com/lightinit/hsdatagateway/common/exceptions/ChargeInformationException.java
  33. 26 0
      src/main/java/com/lightinit/hsdatagateway/common/exceptions/HttpTransferErrorException.java
  34. 26 0
      src/main/java/com/lightinit/hsdatagateway/common/exceptions/InterfaceRequestException.java
  35. 23 0
      src/main/java/com/lightinit/hsdatagateway/common/exceptions/NoRestValueException.java
  36. 22 0
      src/main/java/com/lightinit/hsdatagateway/common/exceptions/OverTimeException.java
  37. 26 0
      src/main/java/com/lightinit/hsdatagateway/common/exceptions/PermissionException.java
  38. 26 0
      src/main/java/com/lightinit/hsdatagateway/common/exceptions/RequestParamException.java
  39. 25 0
      src/main/java/com/lightinit/hsdatagateway/common/filter/PageCachingFilter.java
  40. 45 0
      src/main/java/com/lightinit/hsdatagateway/common/handler/GlobalDefaultExceptionHandler.java
  41. 57 0
      src/main/java/com/lightinit/hsdatagateway/common/mapper/BeanMapper.java
  42. 169 0
      src/main/java/com/lightinit/hsdatagateway/common/mapper/JaxbMapper.java
  43. 261 0
      src/main/java/com/lightinit/hsdatagateway/common/mapper/JsonMapper.java
  44. 30 0
      src/main/java/com/lightinit/hsdatagateway/common/mapper/adapters/MapAdapter.java
  45. 63 0
      src/main/java/com/lightinit/hsdatagateway/common/mapper/adapters/MapConvertor.java
  46. 37 0
      src/main/java/com/lightinit/hsdatagateway/common/network/IpUtils.java
  47. 58 0
      src/main/java/com/lightinit/hsdatagateway/common/persistence/ActEntity.java
  48. 13 0
      src/main/java/com/lightinit/hsdatagateway/common/persistence/BaseDao.java
  49. 189 0
      src/main/java/com/lightinit/hsdatagateway/common/persistence/BaseEntity.java
  50. 100 0
      src/main/java/com/lightinit/hsdatagateway/common/persistence/BaseVo.java
  51. 93 0
      src/main/java/com/lightinit/hsdatagateway/common/persistence/BeyoDao.java
  52. 89 0
      src/main/java/com/lightinit/hsdatagateway/common/persistence/CrudDao.java
  53. 135 0
      src/main/java/com/lightinit/hsdatagateway/common/persistence/DataEntity.java
  54. 80 0
      src/main/java/com/lightinit/hsdatagateway/common/persistence/DataVo.java
  55. 93 0
      src/main/java/com/lightinit/hsdatagateway/common/persistence/GatewayDao.java
  56. 212 0
      src/main/java/com/lightinit/hsdatagateway/common/persistence/MapperLoader.java
  57. 574 0
      src/main/java/com/lightinit/hsdatagateway/common/persistence/Page.java
  58. 43 0
      src/main/java/com/lightinit/hsdatagateway/common/persistence/Parameter.java
  59. 30 0
      src/main/java/com/lightinit/hsdatagateway/common/persistence/TreeDao.java
  60. 85 0
      src/main/java/com/lightinit/hsdatagateway/common/persistence/TreeEntity.java
  61. 32 0
      src/main/java/com/lightinit/hsdatagateway/common/persistence/annotation/MyBatisDao.java
  62. 33 0
      src/main/java/com/lightinit/hsdatagateway/common/persistence/dialect/Dialect.java
  63. 89 0
      src/main/java/com/lightinit/hsdatagateway/common/persistence/dialect/db/DB2Dialect.java
  64. 44 0
      src/main/java/com/lightinit/hsdatagateway/common/persistence/dialect/db/DerbyDialect.java
  65. 45 0
      src/main/java/com/lightinit/hsdatagateway/common/persistence/dialect/db/H2Dialect.java
  66. 50 0
      src/main/java/com/lightinit/hsdatagateway/common/persistence/dialect/db/HSQLDialect.java
  67. 53 0
      src/main/java/com/lightinit/hsdatagateway/common/persistence/dialect/db/MySQLDialect.java
  68. 68 0
      src/main/java/com/lightinit/hsdatagateway/common/persistence/dialect/db/OracleDialect.java
  69. 48 0
      src/main/java/com/lightinit/hsdatagateway/common/persistence/dialect/db/PostgreSQLDialect.java
  70. 95 0
      src/main/java/com/lightinit/hsdatagateway/common/persistence/dialect/db/SQLServer2005Dialect.java
  71. 55 0
      src/main/java/com/lightinit/hsdatagateway/common/persistence/dialect/db/SQLServerDialect.java
  72. 47 0
      src/main/java/com/lightinit/hsdatagateway/common/persistence/dialect/db/SybaseDialect.java
  73. 111 0
      src/main/java/com/lightinit/hsdatagateway/common/persistence/interceptor/BaseInterceptor.java
  74. 128 0
      src/main/java/com/lightinit/hsdatagateway/common/persistence/interceptor/PaginationInterceptor.java
  75. 89 0
      src/main/java/com/lightinit/hsdatagateway/common/persistence/interceptor/PreparePaginationInterceptor.java
  76. 195 0
      src/main/java/com/lightinit/hsdatagateway/common/persistence/interceptor/SQLHelper.java
  77. 37 0
      src/main/java/com/lightinit/hsdatagateway/common/persistence/proxy/PageConfiguration.java
  78. 191 0
      src/main/java/com/lightinit/hsdatagateway/common/persistence/proxy/PaginationMapperMethod.java
  79. 104 0
      src/main/java/com/lightinit/hsdatagateway/common/persistence/proxy/PaginationMapperProxy.java
  80. 36 0
      src/main/java/com/lightinit/hsdatagateway/common/persistence/proxy/PaginationMapperRegistry.java
  81. 260 0
      src/main/java/com/lightinit/hsdatagateway/common/security/Cryptos.java
  82. 123 0
      src/main/java/com/lightinit/hsdatagateway/common/security/Digests.java
  83. 40 0
      src/main/java/com/lightinit/hsdatagateway/common/security/shiro/HasAnyPermissionsTag.java
  84. 217 0
      src/main/java/com/lightinit/hsdatagateway/common/security/shiro/cache/JedisCacheManager.java
  85. 144 0
      src/main/java/com/lightinit/hsdatagateway/common/security/shiro/cache/SessionCacheManager.java
  86. 176 0
      src/main/java/com/lightinit/hsdatagateway/common/security/shiro/session/CacheSessionDAO.java
  87. 274 0
      src/main/java/com/lightinit/hsdatagateway/common/security/shiro/session/JedisSessionDAO.java
  88. 25 0
      src/main/java/com/lightinit/hsdatagateway/common/security/shiro/session/SessionDAO.java
  89. 207 0
      src/main/java/com/lightinit/hsdatagateway/common/security/shiro/session/SessionManager.java
  90. 197 0
      src/main/java/com/lightinit/hsdatagateway/common/service/BaseService.java
  91. 105 0
      src/main/java/com/lightinit/hsdatagateway/common/service/CrudService.java
  92. 115 0
      src/main/java/com/lightinit/hsdatagateway/common/service/GatewayService.java
  93. 56 0
      src/main/java/com/lightinit/hsdatagateway/common/service/InitService.java
  94. 29 0
      src/main/java/com/lightinit/hsdatagateway/common/service/ServiceException.java
  95. 85 0
      src/main/java/com/lightinit/hsdatagateway/common/service/TreeService.java
  96. 65 0
      src/main/java/com/lightinit/hsdatagateway/common/servlet/UserfilesDownloadServlet.java
  97. 150 0
      src/main/java/com/lightinit/hsdatagateway/common/servlet/ValidateCodeServlet.java
  98. 226 0
      src/main/java/com/lightinit/hsdatagateway/common/supcan/SupcanController.java
  99. 59 0
      src/main/java/com/lightinit/hsdatagateway/common/supcan/annotation/common/fonts/SupFont.java
  100. 0 0
      src/main/java/com/lightinit/hsdatagateway/common/supcan/annotation/common/properties/SupBackground.java

+ 14 - 0
.gitignore

@@ -0,0 +1,14 @@
+# Created by .ignore support plugin (hsz.mobi)
+### Maven template
+target/
+out/
+pom.xml.tag
+pom.xml.releaseBackup
+pom.xml.versionsBackup
+pom.xml.next
+release.properties
+dependency-reduced-pom.xml
+buildNumber.properties
+.mvn/timing.properties
+.mvn/wrapper/maven-wrapper.jar
+

+ 1 - 0
.idea/.name

@@ -0,0 +1 @@
+jeesite

+ 14 - 0
.idea/compiler.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="CompilerConfiguration">
+    <annotationProcessing>
+      <profile default="true" name="Default" enabled="true" />
+      <profile name="Maven default annotation processors profile" enabled="true">
+        <sourceOutputDir name="target/generated-sources/annotations" />
+        <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
+        <outputRelativeToContentRoot value="true" />
+        <module name="jeesite" />
+      </profile>
+    </annotationProcessing>
+  </component>
+</project>

+ 6 - 0
.idea/encodings.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Encoding">
+    <file url="file://$PROJECT_DIR$" charset="UTF-8" />
+  </component>
+</project>

+ 17 - 0
.idea/misc.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ExternalStorageConfigurationManager" enabled="true" />
+  <component name="FrameworkDetectionExcludesConfiguration">
+    <file type="web" url="file://$PROJECT_DIR$" />
+  </component>
+  <component name="MavenProjectsManager">
+    <option name="originalFiles">
+      <list>
+        <option value="$PROJECT_DIR$/pom.xml" />
+      </list>
+    </option>
+  </component>
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
+    <output url="file://$PROJECT_DIR$/out" />
+  </component>
+</project>

+ 6 - 0
.idea/sbt.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ScalaSbtSettings">
+    <option name="customVMPath" />
+  </component>
+</project>

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="$PROJECT_DIR$" vcs="Git" />
+  </component>
+</project>

+ 885 - 0
.idea/workspace.xml

@@ -0,0 +1,885 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ArtifactsWorkspaceSettings">
+    <artifacts-to-build>
+      <artifact name="jeesite:war" />
+    </artifacts-to-build>
+  </component>
+  <component name="ChangeListManager">
+    <list default="true" id="331339a0-f195-45cc-a86e-dc20492dd74c" name="Default" comment="">
+      <change afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/.idea/encodings.xml" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/annotation/FieldName.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/annotation/FieldName.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/beanvalidator/AddGroup.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/beanvalidator/AddGroup.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/beanvalidator/BeanValidators.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/beanvalidator/BeanValidators.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/beanvalidator/DefaultGroup.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/beanvalidator/DefaultGroup.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/beanvalidator/EditGroup.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/beanvalidator/EditGroup.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/config/Global.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/config/Global.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/exceptions/BaseException.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/exceptions/BaseException.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/exceptions/ChargeInformationException.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/exceptions/ChargeInformationException.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/exceptions/HttpTransferErrorException.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/exceptions/HttpTransferErrorException.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/exceptions/InterfaceRequestException.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/exceptions/InterfaceRequestException.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/exceptions/NoRestValueException.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/exceptions/NoRestValueException.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/exceptions/OverTimeException.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/exceptions/OverTimeException.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/exceptions/PermissionException.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/exceptions/PermissionException.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/exceptions/RequestParamException.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/exceptions/RequestParamException.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/filter/PageCachingFilter.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/filter/PageCachingFilter.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/handler/GlobalDefaultExceptionHandler.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/handler/GlobalDefaultExceptionHandler.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/mapper/BeanMapper.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/mapper/BeanMapper.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/mapper/JaxbMapper.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/mapper/JaxbMapper.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/mapper/JsonMapper.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/mapper/JsonMapper.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/mapper/adapters/MapAdapter.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/mapper/adapters/MapAdapter.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/mapper/adapters/MapConvertor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/mapper/adapters/MapConvertor.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/network/IpUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/network/IpUtils.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/persistence/ActEntity.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/persistence/ActEntity.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/persistence/BaseDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/persistence/BaseDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/persistence/BaseEntity.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/persistence/BaseEntity.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/persistence/BaseVo.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/persistence/BaseVo.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/persistence/BeyoDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/persistence/BeyoDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/persistence/CrudDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/persistence/CrudDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/persistence/DataEntity.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/persistence/DataEntity.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/persistence/DataVo.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/persistence/DataVo.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/persistence/GatewayDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/persistence/GatewayDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/persistence/MapperLoader.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/persistence/MapperLoader.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/persistence/Page.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/persistence/Page.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/persistence/Parameter.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/persistence/Parameter.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/persistence/TreeDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/persistence/TreeDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/persistence/TreeEntity.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/persistence/TreeEntity.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/persistence/annotation/MyBatisDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/persistence/annotation/MyBatisDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/persistence/dialect/Dialect.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/persistence/dialect/Dialect.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/persistence/dialect/db/DB2Dialect.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/persistence/dialect/db/DB2Dialect.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/persistence/dialect/db/DerbyDialect.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/persistence/dialect/db/DerbyDialect.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/persistence/dialect/db/H2Dialect.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/persistence/dialect/db/H2Dialect.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/persistence/dialect/db/HSQLDialect.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/persistence/dialect/db/HSQLDialect.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/persistence/dialect/db/MySQLDialect.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/persistence/dialect/db/MySQLDialect.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/persistence/dialect/db/OracleDialect.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/persistence/dialect/db/OracleDialect.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/persistence/dialect/db/PostgreSQLDialect.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/persistence/dialect/db/PostgreSQLDialect.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/persistence/dialect/db/SQLServer2005Dialect.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/persistence/dialect/db/SQLServer2005Dialect.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/persistence/dialect/db/SQLServerDialect.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/persistence/dialect/db/SQLServerDialect.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/persistence/dialect/db/SybaseDialect.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/persistence/dialect/db/SybaseDialect.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/persistence/interceptor/BaseInterceptor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/persistence/interceptor/BaseInterceptor.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/persistence/interceptor/PaginationInterceptor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/persistence/interceptor/PaginationInterceptor.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/persistence/interceptor/PreparePaginationInterceptor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/persistence/interceptor/PreparePaginationInterceptor.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/persistence/interceptor/SQLHelper.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/persistence/interceptor/SQLHelper.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/persistence/proxy/PageConfiguration.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/persistence/proxy/PageConfiguration.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/persistence/proxy/PaginationMapperMethod.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/persistence/proxy/PaginationMapperMethod.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/persistence/proxy/PaginationMapperProxy.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/persistence/proxy/PaginationMapperProxy.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/persistence/proxy/PaginationMapperRegistry.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/persistence/proxy/PaginationMapperRegistry.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/security/Cryptos.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/security/Cryptos.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/security/Digests.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/security/Digests.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/security/shiro/HasAnyPermissionsTag.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/security/shiro/HasAnyPermissionsTag.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/security/shiro/cache/JedisCacheManager.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/security/shiro/cache/JedisCacheManager.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/security/shiro/cache/SessionCacheManager.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/security/shiro/cache/SessionCacheManager.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/security/shiro/session/CacheSessionDAO.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/security/shiro/session/CacheSessionDAO.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/security/shiro/session/JedisSessionDAO.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/security/shiro/session/JedisSessionDAO.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/security/shiro/session/SessionDAO.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/security/shiro/session/SessionDAO.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/security/shiro/session/SessionManager.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/security/shiro/session/SessionManager.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/service/BaseService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/service/BaseService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/service/CrudService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/service/CrudService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/service/GatewayService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/service/GatewayService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/service/InitService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/service/InitService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/service/ServiceException.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/service/ServiceException.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/service/TreeService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/service/TreeService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/servlet/UserfilesDownloadServlet.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/servlet/UserfilesDownloadServlet.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/servlet/ValidateCodeServlet.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/servlet/ValidateCodeServlet.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/supcan/SupcanController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/supcan/SupcanController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/supcan/annotation/common/fonts/SupFont.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/supcan/annotation/common/fonts/SupFont.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/supcan/annotation/common/properties/SupBackground.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/supcan/annotation/common/properties/SupBackground.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/supcan/annotation/common/properties/SupExpress.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/supcan/annotation/common/properties/SupExpress.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/supcan/annotation/common/properties/SupProperties.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/supcan/annotation/common/properties/SupProperties.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/supcan/annotation/treelist/SupTreeList.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/supcan/annotation/treelist/SupTreeList.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/supcan/annotation/treelist/cols/SupCol.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/supcan/annotation/treelist/cols/SupCol.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/supcan/annotation/treelist/cols/SupGroup.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/supcan/annotation/treelist/cols/SupGroup.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/supcan/common/Common.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/supcan/common/Common.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/supcan/common/fonts/Font.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/supcan/common/fonts/Font.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/supcan/common/properties/Background.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/supcan/common/properties/Background.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/supcan/common/properties/Express.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/supcan/common/properties/Express.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/supcan/common/properties/Properties.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/supcan/common/properties/Properties.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/supcan/freeform/FreeForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/supcan/freeform/FreeForm.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/supcan/treelist/TreeList.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/supcan/treelist/TreeList.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/supcan/treelist/cols/Col.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/supcan/treelist/cols/Col.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/supcan/treelist/cols/Group.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/supcan/treelist/cols/Group.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/test/SpringTransactionalContextTests.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/test/SpringTransactionalContextTests.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/CacheUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/CacheUtils.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/Collections3.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/Collections3.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/CookieUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/CookieUtils.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/DateUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/DateUtils.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/EhCacheUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/EhCacheUtils.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/Encodes.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/Encodes.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/Exceptions.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/Exceptions.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/FileSizeHelper.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/FileSizeHelper.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/FileUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/FileUtils.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/FreeMarkers.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/FreeMarkers.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/IdGen.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/IdGen.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/IdWorker.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/IdWorker.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/IdcardUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/IdcardUtils.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/ImageGeo.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/ImageGeo.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/JedisUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/JedisUtils.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/MacUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/MacUtils.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/ObjectUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/ObjectUtils.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/OrderProperties.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/OrderProperties.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/PropertiesLoader.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/PropertiesLoader.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/Reflections.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/Reflections.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/SendMailUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/SendMailUtil.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/SpringContextHolder.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/SpringContextHolder.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/StreamUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/StreamUtils.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/StringUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/StringUtils.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/SystemPath.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/SystemPath.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/Threads.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/Threads.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/TimeUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/TimeUtils.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/UploadUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/UploadUtils.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/UserAgentUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/UserAgentUtils.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/WorkDayUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/WorkDayUtils.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/ZxingHandler.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/ZxingHandler.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/excel/ExportExcel.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/excel/ExportExcel.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/excel/ImportExcel.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/excel/ImportExcel.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/excel/annotation/ExcelField.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/excel/annotation/ExcelField.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/excel/fieldtype/AreaType.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/excel/fieldtype/AreaType.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/excel/fieldtype/OfficeType.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/excel/fieldtype/OfficeType.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/excel/fieldtype/RoleListType.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/excel/fieldtype/RoleListType.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/utils/model/CacheModel.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/utils/model/CacheModel.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/web/BaseController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/web/BaseController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/web/CKFinderConfig.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/web/CKFinderConfig.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/web/CKFinderConnectorServlet.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/web/CKFinderConnectorServlet.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/web/Servlets.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/web/Servlets.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/common/xstream/DateTimeConverter.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/xstream/DateTimeConverter.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/constant/ExceptionEnum.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/constant/ExceptionEnum.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/dao/ActDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/dao/ActDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/entity/Act.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/entity/Act.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/rest/diagram/services/BaseProcessDefinitionDiagramLayoutResource.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/rest/diagram/services/BaseProcessDefinitionDiagramLayoutResource.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/rest/diagram/services/ProcessDefinitionDiagramLayoutResource.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/rest/diagram/services/ProcessDefinitionDiagramLayoutResource.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/rest/diagram/services/ProcessInstanceDiagramLayoutResource.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/rest/diagram/services/ProcessInstanceDiagramLayoutResource.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/rest/diagram/services/ProcessInstanceHighlightsResource.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/rest/diagram/services/ProcessInstanceHighlightsResource.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/rest/editor/main/StencilsetRestResource.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/rest/editor/main/StencilsetRestResource.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/rest/editor/model/ModelEditorJsonRestResource.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/rest/editor/model/ModelEditorJsonRestResource.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/rest/editor/model/ModelSaveRestResource.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/rest/editor/model/ModelSaveRestResource.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/rest/servlet/FilterServletOutputStream.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/rest/servlet/FilterServletOutputStream.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/rest/servlet/GenericResponseWrapper.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/rest/servlet/GenericResponseWrapper.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/rest/servlet/JsonpCallbackFilter.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/rest/servlet/JsonpCallbackFilter.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/service/ActModelService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/service/ActModelService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/service/ActProcessService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/service/ActProcessService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/service/ActTaskService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/service/ActTaskService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/service/cmd/CreateAndTakeTransitionCmd.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/service/cmd/CreateAndTakeTransitionCmd.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/service/cmd/JumpTaskCmd.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/service/cmd/JumpTaskCmd.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/service/cmd/ModelDeployProcessDefinitionCmd.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/service/cmd/ModelDeployProcessDefinitionCmd.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/service/creator/ChainedActivitiesCreator.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/service/creator/ChainedActivitiesCreator.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/service/creator/MultiInstanceActivityCreator.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/service/creator/MultiInstanceActivityCreator.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/service/creator/RuntimeActivityCreator.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/service/creator/RuntimeActivityCreator.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/service/creator/RuntimeActivityCreatorSupport.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/service/creator/RuntimeActivityCreatorSupport.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/service/creator/RuntimeActivityDefinitionEntity.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/service/creator/RuntimeActivityDefinitionEntity.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/service/creator/RuntimeActivityDefinitionEntityIntepreter.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/service/creator/RuntimeActivityDefinitionEntityIntepreter.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/service/creator/RuntimeActivityDefinitionManager.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/service/creator/RuntimeActivityDefinitionManager.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/service/creator/SimpleRuntimeActivityDefinitionEntity.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/service/creator/SimpleRuntimeActivityDefinitionEntity.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/service/ext/ActGroupEntityService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/service/ext/ActGroupEntityService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/service/ext/ActGroupEntityServiceFactory.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/service/ext/ActGroupEntityServiceFactory.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/service/ext/ActUserEntityService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/service/ext/ActUserEntityService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/service/ext/ActUserEntityServiceFactory.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/service/ext/ActUserEntityServiceFactory.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/utils/ActUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/utils/ActUtils.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/utils/DateConverter.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/utils/DateConverter.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/utils/ProcessDefCache.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/utils/ProcessDefCache.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/utils/ProcessDefUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/utils/ProcessDefUtils.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/utils/PropertyType.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/utils/PropertyType.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/utils/Variable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/utils/Variable.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/web/ActModelController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/web/ActModelController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/web/ActProcessController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/web/ActProcessController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/act/web/ActTaskController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/act/web/ActTaskController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/api/gateway/AuthApiController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/api/gateway/AuthApiController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/api/gateway/ChargeApiController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/api/gateway/ChargeApiController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/api/gateway/RouteApiController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/api/gateway/RouteApiController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/api/gateway/SignApiController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/api/gateway/SignApiController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/dao/ArticleDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/dao/ArticleDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/dao/ArticleDataDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/dao/ArticleDataDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/dao/CategoryDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/dao/CategoryDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/dao/CommentDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/dao/CommentDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/dao/GuestbookDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/dao/GuestbookDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/dao/LinkDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/dao/LinkDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/dao/SiteDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/dao/SiteDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/entity/Article.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/entity/Article.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/entity/ArticleData.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/entity/ArticleData.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/entity/Category.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/entity/Category.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/entity/Comment.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/entity/Comment.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/entity/FileTpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/entity/FileTpl.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/entity/Guestbook.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/entity/Guestbook.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/entity/Link.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/entity/Link.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/entity/Site.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/entity/Site.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/service/ArticleDataService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/service/ArticleDataService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/service/ArticleService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/service/ArticleService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/service/CategoryService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/service/CategoryService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/service/CommentService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/service/CommentService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/service/FileTplService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/service/FileTplService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/service/GuestbookService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/service/GuestbookService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/service/LinkService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/service/LinkService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/service/SiteService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/service/SiteService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/service/StatsService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/service/StatsService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/utils/CmsUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/utils/CmsUtils.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/utils/TplUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/utils/TplUtils.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/utils/WiexinSignUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/utils/WiexinSignUtil.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/web/ArticleController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/web/ArticleController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/web/CategoryController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/web/CategoryController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/web/CmsController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/web/CmsController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/web/CommentController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/web/CommentController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/web/GuestbookController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/web/GuestbookController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/web/LinkController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/web/LinkController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/web/SiteController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/web/SiteController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/web/StatsController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/web/StatsController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/web/TemplateController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/web/TemplateController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/web/front/FrontController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/web/front/FrontController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/web/front/FrontGuestbookController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/web/front/FrontGuestbookController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/web/front/FrontSearchController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/web/front/FrontSearchController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/cms/web/front/WeixinController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/cms/web/front/WeixinController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/foreign/enums/HttpMethodEnum.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/foreign/enums/HttpMethodEnum.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/foreign/exe/ServiceExe.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/foreign/exe/ServiceExe.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/foreign/model/RequestDto.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/foreign/model/RequestDto.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/foreign/model/ResponseModel.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/foreign/model/ResponseModel.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/foreign/model/ReturnResult.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/foreign/model/ReturnResult.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/foreign/service/BusinessExecuteService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/foreign/service/BusinessExecuteService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/foreign/service/PayConfirmService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/foreign/service/PayConfirmService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/foreign/service/PayVerifyService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/foreign/service/PayVerifyService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/foreign/service/PermissionVerifyService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/foreign/service/PermissionVerifyService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/foreign/util/AbstractTreadBean.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/foreign/util/AbstractTreadBean.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/foreign/util/ApiEncryptUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/foreign/util/ApiEncryptUtil.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/foreign/util/ConfigurationFactoryBean.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/foreign/util/ConfigurationFactoryBean.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/foreign/util/HttpUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/foreign/util/HttpUtil.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/foreign/web/ForeignWebController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/foreign/web/ForeignWebController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gateway/dao/AuthDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gateway/dao/AuthDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gateway/dao/BizAppDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gateway/dao/BizAppDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gateway/dao/BizRouteDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gateway/dao/BizRouteDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gateway/dao/BizSignDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gateway/dao/BizSignDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gateway/dao/BlackWhiteListDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gateway/dao/BlackWhiteListDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gateway/dao/CallLogDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gateway/dao/CallLogDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gateway/dao/ChargeDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gateway/dao/ChargeDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gateway/entity/Auth.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gateway/entity/Auth.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gateway/entity/BizApp.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gateway/entity/BizApp.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gateway/entity/BizRoute.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gateway/entity/BizRoute.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gateway/entity/BizSign.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gateway/entity/BizSign.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gateway/entity/BlackWhiteList.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gateway/entity/BlackWhiteList.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gateway/entity/CallLog.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gateway/entity/CallLog.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gateway/entity/Charge.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gateway/entity/Charge.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gateway/service/AuthService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gateway/service/AuthService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gateway/service/BizAppService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gateway/service/BizAppService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gateway/service/BizRouteService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gateway/service/BizRouteService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gateway/service/BizSignService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gateway/service/BizSignService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gateway/service/BlackWhiteListService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gateway/service/BlackWhiteListService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gateway/service/CallLogService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gateway/service/CallLogService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gateway/service/ChargeService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gateway/service/ChargeService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gateway/web/AuthController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gateway/web/AuthController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gateway/web/BizAppController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gateway/web/BizAppController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gateway/web/BizRouteController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gateway/web/BizRouteController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gateway/web/BizSignController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gateway/web/BizSignController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gateway/web/BlackWhiteListController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gateway/web/BlackWhiteListController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gateway/web/CallLogController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gateway/web/CallLogController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gateway/web/ChargeController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gateway/web/ChargeController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gen/dao/GenDataBaseDictDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gen/dao/GenDataBaseDictDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gen/dao/GenSchemeDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gen/dao/GenSchemeDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gen/dao/GenTableColumnDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gen/dao/GenTableColumnDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gen/dao/GenTableDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gen/dao/GenTableDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gen/dao/GenTemplateDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gen/dao/GenTemplateDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gen/entity/GenCategory.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gen/entity/GenCategory.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gen/entity/GenConfig.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gen/entity/GenConfig.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gen/entity/GenScheme.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gen/entity/GenScheme.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gen/entity/GenTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gen/entity/GenTable.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gen/entity/GenTableColumn.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gen/entity/GenTableColumn.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gen/entity/GenTemplate.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gen/entity/GenTemplate.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gen/service/GenSchemeService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gen/service/GenSchemeService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gen/service/GenTableService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gen/service/GenTableService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gen/service/GenTemplateService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gen/service/GenTemplateService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gen/util/GenUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gen/util/GenUtils.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gen/web/GenSchemeController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gen/web/GenSchemeController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gen/web/GenTableController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gen/web/GenTableController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/gen/web/GenTemplateController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/gen/web/GenTemplateController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/oa/dao/LeaveDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/oa/dao/LeaveDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/oa/dao/OaNotifyDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/oa/dao/OaNotifyDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/oa/dao/OaNotifyRecordDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/oa/dao/OaNotifyRecordDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/oa/dao/TestAuditDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/oa/dao/TestAuditDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/oa/entity/Leave.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/oa/entity/Leave.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/oa/entity/OaNotify.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/oa/entity/OaNotify.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/oa/entity/OaNotifyRecord.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/oa/entity/OaNotifyRecord.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/oa/entity/TestAudit.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/oa/entity/TestAudit.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/oa/service/LeaveModifyProcessor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/oa/service/LeaveModifyProcessor.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/oa/service/LeaveReportProcessor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/oa/service/LeaveReportProcessor.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/oa/service/LeaveService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/oa/service/LeaveService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/oa/service/OaNotifyService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/oa/service/OaNotifyService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/oa/service/TestAuditService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/oa/service/TestAuditService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/oa/web/LeaveController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/oa/web/LeaveController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/oa/web/OaNotifyController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/oa/web/OaNotifyController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/oa/web/TestAuditController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/oa/web/TestAuditController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/dao/AreaDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/dao/AreaDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/dao/DictDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/dao/DictDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/dao/LogDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/dao/LogDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/dao/MenuDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/dao/MenuDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/dao/OfficeDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/dao/OfficeDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/dao/RoleDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/dao/RoleDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/dao/UserDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/dao/UserDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/entity/Area.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/entity/Area.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/entity/Dict.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/entity/Dict.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/entity/Log.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/entity/Log.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/entity/Menu.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/entity/Menu.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/entity/Office.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/entity/Office.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/entity/Role.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/entity/Role.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/entity/User.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/entity/User.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/interceptor/BlackWhiteInterceptor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/interceptor/BlackWhiteInterceptor.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/interceptor/LogInterceptor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/interceptor/LogInterceptor.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/interceptor/MobileInterceptor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/interceptor/MobileInterceptor.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/listener/WebContextListener.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/listener/WebContextListener.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/security/FormAuthenticationFilter.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/security/FormAuthenticationFilter.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/security/SystemAuthorizingRealm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/security/SystemAuthorizingRealm.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/security/UsernamePasswordToken.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/security/UsernamePasswordToken.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/service/AreaService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/service/AreaService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/service/DictService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/service/DictService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/service/LogService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/service/LogService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/service/OfficeService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/service/OfficeService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/service/SystemService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/service/SystemService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/utils/DictUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/utils/DictUtils.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/utils/LogUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/utils/LogUtils.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/utils/UserUtils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/utils/UserUtils.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/web/AreaController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/web/AreaController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/web/DictController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/web/DictController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/web/LogController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/web/LogController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/web/LoginController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/web/LoginController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/web/MenuController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/web/MenuController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/web/OfficeController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/web/OfficeController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/web/RoleController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/web/RoleController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/web/TagController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/web/TagController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/sys/web/UserController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/sys/web/UserController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/test/dao/TestDao.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/test/dao/TestDao.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/test/entity/Test.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/test/entity/Test.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/test/service/TestService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/test/service/TestService.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/dgtis/hsdatagateway/modules/test/web/TestController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/modules/test/web/TestController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/org/activiti/editor/language/json/converter/BpmnJsonConverter.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/org/activiti/editor/language/json/converter/BpmnJsonConverter.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/org/apache/ibatis/builder/xml/XMLMapperBuilder.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/org/apache/ibatis/builder/xml/XMLMapperBuilder.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/org/apache/ibatis/session/Configuration.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/org/apache/ibatis/session/Configuration.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/org/apache/ibatis/thread/Runnable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/org/apache/ibatis/thread/Runnable.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/org/mybatis/spring/SqlSessionFactoryBean.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/org/mybatis/spring/SqlSessionFactoryBean.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/gateway.properties" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/gateway.properties" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/log4j.properties" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/log4j.properties" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/mappings/modules/act/ActDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mappings/modules/act/ActDao.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/mappings/modules/cms/ArticleDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mappings/modules/cms/ArticleDao.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/mappings/modules/cms/ArticleDataDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mappings/modules/cms/ArticleDataDao.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/mappings/modules/cms/CategoryDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mappings/modules/cms/CategoryDao.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/mappings/modules/cms/CommentDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mappings/modules/cms/CommentDao.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/mappings/modules/cms/GuestbookDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mappings/modules/cms/GuestbookDao.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/mappings/modules/cms/LinkDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mappings/modules/cms/LinkDao.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/mappings/modules/cms/SiteDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mappings/modules/cms/SiteDao.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/mappings/modules/gateway/AuthDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mappings/modules/gateway/AuthDao.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/mappings/modules/gateway/BizAppDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mappings/modules/gateway/BizAppDao.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/mappings/modules/gateway/BizRouteDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mappings/modules/gateway/BizRouteDao.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/mappings/modules/gateway/BizSignDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mappings/modules/gateway/BizSignDao.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/mappings/modules/gateway/BlackWhiteListDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mappings/modules/gateway/BlackWhiteListDao.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/mappings/modules/gateway/CallLogDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mappings/modules/gateway/CallLogDao.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/mappings/modules/gateway/ChargeDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mappings/modules/gateway/ChargeDao.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/mappings/modules/gen/GenDataBaseDictDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mappings/modules/gen/GenDataBaseDictDao.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/mappings/modules/gen/GenSchemeDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mappings/modules/gen/GenSchemeDao.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/mappings/modules/gen/GenTableColumnDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mappings/modules/gen/GenTableColumnDao.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/mappings/modules/gen/GenTableDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mappings/modules/gen/GenTableDao.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/mappings/modules/gen/GenTemplateDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mappings/modules/gen/GenTemplateDao.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/mappings/modules/oa/LeaveDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mappings/modules/oa/LeaveDao.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/mappings/modules/oa/OaNotifyDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mappings/modules/oa/OaNotifyDao.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/mappings/modules/oa/OaNotifyRecordDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mappings/modules/oa/OaNotifyRecordDao.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/mappings/modules/oa/TestAuditDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mappings/modules/oa/TestAuditDao.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/mappings/modules/sys/AreaDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mappings/modules/sys/AreaDao.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/mappings/modules/sys/DictDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mappings/modules/sys/DictDao.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/mappings/modules/sys/LogDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mappings/modules/sys/LogDao.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/mappings/modules/sys/MenuDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mappings/modules/sys/MenuDao.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/mappings/modules/sys/OfficeDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mappings/modules/sys/OfficeDao.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/mappings/modules/sys/RoleDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mappings/modules/sys/RoleDao.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/mappings/modules/sys/UserDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mappings/modules/sys/UserDao.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/mappings/modules/test/TestDao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mappings/modules/test/TestDao.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/mybatis-config.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/mybatis-config.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/spring-context-activiti.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/spring-context-activiti.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/spring-context-shiro.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/spring-context-shiro.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/spring-context.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/spring-context.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/spring-mvc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/spring-mvc.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/templates/modules/gen/config.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/templates/modules/gen/config.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/templates/modules/gen/curd/controller.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/templates/modules/gen/curd/controller.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/templates/modules/gen/curd/service.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/templates/modules/gen/curd/service.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/templates/modules/gen/curd/serviceMany.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/templates/modules/gen/curd/serviceMany.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/templates/modules/gen/dao/dao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/templates/modules/gen/dao/dao.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/templates/modules/gen/dao/entity.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/templates/modules/gen/dao/entity.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/templates/modules/gen/treetable/controller.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/templates/modules/gen/treetable/controller.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/templates/modules/gen/treetable/dao.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/templates/modules/gen/treetable/dao.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/templates/modules/gen/treetable/entity.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/templates/modules/gen/treetable/entity.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/templates/modules/gen/treetable/service.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/templates/modules/gen/treetable/service.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/WEB-INF/tags/cms/frontArticleHitsTop.tag" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/WEB-INF/tags/cms/frontArticleHitsTop.tag" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/WEB-INF/tags/cms/frontCurrentPosition.tag" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/WEB-INF/tags/cms/frontCurrentPosition.tag" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/WEB-INF/tlds/fnc.tld" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/WEB-INF/tlds/fnc.tld" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/WEB-INF/tlds/fns.tld" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/WEB-INF/tlds/fns.tld" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/WEB-INF/tlds/shiros.tld" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/WEB-INF/tlds/shiros.tld" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/WEB-INF/views/error/400.jsp" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/WEB-INF/views/error/400.jsp" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/WEB-INF/views/error/403.jsp" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/WEB-INF/views/error/403.jsp" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/WEB-INF/views/error/404.jsp" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/WEB-INF/views/error/404.jsp" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/WEB-INF/views/error/500.jsp" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/WEB-INF/views/error/500.jsp" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/WEB-INF/views/modules/gen/genSchemeForm.jsp" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/WEB-INF/views/modules/gen/genSchemeForm.jsp" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/WEB-INF/web.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/WEB-INF/web.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/act/diagram-viewer/js/ActivityImpl.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/act/diagram-viewer/js/ActivityImpl.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/act/diagram-viewer/js/Color.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/act/diagram-viewer/js/Color.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/act/diagram-viewer/js/LineBreakMeasurer.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/act/diagram-viewer/js/LineBreakMeasurer.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/act/diagram-viewer/js/Polyline.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/act/diagram-viewer/js/Polyline.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/act/diagram-viewer/js/ProcessDiagramCanvas.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/act/diagram-viewer/js/ProcessDiagramCanvas.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/act/diagram-viewer/js/ProcessDiagramGenerator.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/act/diagram-viewer/js/ProcessDiagramGenerator.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/act/diagram-viewer/js/jquery/jquery.asyncqueue.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/act/diagram-viewer/js/jquery/jquery.asyncqueue.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/act/process-editor/editor-app/editor/i18n/translation_de.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/act/process-editor/editor-app/editor/i18n/translation_de.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/act/process-editor/editor-app/editor/i18n/translation_en_us.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/act/process-editor/editor-app/editor/i18n/translation_en_us.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/act/process-editor/editor-app/editor/oryx.debug.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/act/process-editor/editor-app/editor/oryx.debug.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/act/process-editor/editor-app/libs/angular-strap_2.0.5/angular-strap.min.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/act/process-editor/editor-app/libs/angular-strap_2.0.5/angular-strap.min.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/act/process-editor/editor-app/libs/angular-strap_2.0.5/angular-strap.tpl.min.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/act/process-editor/editor-app/libs/angular-strap_2.0.5/angular-strap.tpl.min.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/act/process-editor/editor-app/libs/bootstrap-daterangepicker_1.3.7/daterangepicker.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/act/process-editor/editor-app/libs/bootstrap-daterangepicker_1.3.7/daterangepicker.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/static/ckeditor/plugins/link/dialogs/link.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/static/ckeditor/plugins/link/dialogs/link.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/static/ckeditor/plugins/pastefromword/filter/default.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/static/ckeditor/plugins/pastefromword/filter/default.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/static/common/jeesite.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/static/common/jeesite.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/static/common/jeesite.min.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/static/common/jeesite.min.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/static/common/wsize.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/static/common/wsize.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/static/common/wsize.min.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/static/common/wsize.min.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/static/jqGrid/4.6/js/jquery.jqGrid.extend.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/static/jqGrid/4.6/js/jquery.jqGrid.extend.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/static/jqGrid/4.7/js/jquery.jqGrid.extend.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/static/jqGrid/4.7/js/jquery.jqGrid.extend.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/static/jquery-validation/1.11.1/test/qunit/qunit.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/static/jquery-validation/1.11.1/test/qunit/qunit.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/static/map/map-image-gps.jsp" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/static/map/map-image-gps.jsp" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/static/modules/cms/front/themes/weixin/wz/css/zf.css-02.css" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/static/modules/cms/front/themes/weixin/wz/css/zf.css-02.css" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/static/supcan/supcan.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/static/supcan/supcan.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/static/supcan/supcan.min.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/static/supcan/supcan.min.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/webapp/static/treeTable/jquery.treeTable.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/static/treeTable/jquery.treeTable.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/test/java/com/dgtis/hsdatagateway/test/Test.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/com/lightinit/hsdatagateway/test/Test.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/test/java/com/dgtis/hsdatagateway/tools/CodeCounter.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/com/lightinit/hsdatagateway/tools/CodeCounter.java" afterDir="false" />
+    </list>
+    <ignored path="$PROJECT_DIR$/out/" />
+    <ignored path="$PROJECT_DIR$/src/main/webapp/WEB-INF/classes/" />
+    <ignored path="$PROJECT_DIR$/target/" />
+    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
+    <option name="TRACKING_ENABLED" value="true" />
+    <option name="SHOW_DIALOG" value="false" />
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
+    <option name="LAST_RESOLUTION" value="IGNORE" />
+  </component>
+  <component name="FileEditorManager">
+    <leaf>
+      <file leaf-file-name="gateway.properties" pinned="false" current-in-tab="true">
+        <entry file="file://$PROJECT_DIR$/src/main/resources/gateway.properties">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="111">
+              <caret line="11" column="23" lean-forward="true" selection-start-line="11" selection-start-column="23" selection-end-line="11" selection-end-column="23" />
+            </state>
+          </provider>
+        </entry>
+      </file>
+    </leaf>
+  </component>
+  <component name="FindInProjectRecents">
+    <findStrings>
+      <find>39.105.217.215</find>
+    </findStrings>
+  </component>
+  <component name="Git.Settings">
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
+  </component>
+  <component name="GradleLocalSettings">
+    <option name="projectSyncType">
+      <map>
+        <entry key="$USER_HOME$/Desktop/PAAS中标部署/app-cloud-master" value="PREVIEW" />
+        <entry key="$USER_HOME$/Desktop/PAAS中标部署/dcw-mgmt-server-master" value="PREVIEW" />
+        <entry key="$USER_HOME$/Desktop/apiplatform_2.1.0.201809200314" value="PREVIEW" />
+        <entry key="$USER_HOME$/Desktop/dcw-mgmt-server" value="PREVIEW" />
+        <entry key="$USER_HOME$/Desktop/i慧湖/cmsApi" value="PREVIEW" />
+        <entry key="$USER_HOME$/Desktop/proto-firechat/mars" value="PREVIEW" />
+        <entry key="$USER_HOME$/Desktop/sh-server" value="PREVIEW" />
+        <entry key="$USER_HOME$/Desktop/张家港E管家项目/GIT/bike-h5-zjg" value="PREVIEW" />
+        <entry key="$USER_HOME$/Desktop/张家港E管家项目/GIT/egj-dataserver" value="PREVIEW" />
+        <entry key="$USER_HOME$/Desktop/张家港E管家项目/GIT/egj-epay-server" value="PREVIEW" />
+        <entry key="$USER_HOME$/Desktop/张家港E管家项目/GIT/egj-manager-server" value="PREVIEW" />
+        <entry key="$USER_HOME$/Desktop/张家港E管家项目/GIT/steward-epay" value="PREVIEW" />
+        <entry key="$USER_HOME$/Desktop/智慧党建/GIT/gd-event-service" value="PREVIEW" />
+        <entry key="$USER_HOME$/Desktop/智慧党建/GIT/gd-infomation" value="PREVIEW" />
+        <entry key="$USER_HOME$/Desktop/智慧党建/GIT/partyaffairs" value="PREVIEW" />
+        <entry key="$USER_HOME$/Desktop/软著资料/dcw-mgmt-server" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/BigData/GIT/analysismgr" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/BigData/GIT/dataportal" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/GIT/analysismgr" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/GIT/cas" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/GIT/coupon-service" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/GIT/cspservice" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/GIT/dc-lcn" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/GIT/dc-tm-manager" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/GIT/dcw-boot" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/GIT/demoService" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/GIT/demoWebService" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/GIT/egj-manager-server" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/GIT/event-service" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/GIT/information-server" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/GIT/operationmgr" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/GIT/payment-server" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/GIT/points" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/GIT/securitycall" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/GIT/shopping-service" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/GIT/third-service" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/GIT/userservice" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/GIT/verifyserver" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/LCN事务管理器/GIT/test-tm-appa" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/LCN事务管理器/GIT/test-tm-appb" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/LCN事务管理器/GIT/test-tm-appc" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/developer/GIT/app-cloud" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/developer/GIT/dc-cas-server" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/developer/GIT/dc-cas-server/dc-cas-server-webapp" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/paycloud/GIT/dc-cas-server" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/sample/dc-lcn" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/sample/fescar-develop" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/sample/fescar-samples-master" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/sample/springboot-dubbo-fescar-master" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/sample/tx-lcn-5.0.2.RELEASE" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/sample/txlcn-demo-master" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/北京网/GIT/sh-server" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/大数据平台/GIT/analyflume" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/大数据平台/GIT/analysismgr" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/大数据平台/GIT/dataportal" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/开发者门户/GIT/app-cloud" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/开发者门户/GIT/dcw-mgmt-server" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../05-公租房/GIT/housing-common" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../05-公租房/GIT/housing-datasync" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../MRF/LCN事务管理器/GIT/mrf-lcn" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../MRF/LCN事务管理器/GIT/mrf-tm-manager" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../MRF/daas/GIT/apiOutService" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../MRF/daas/GIT/apiService" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../MRF/developer/GIT/dcw-mgmt-server" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../MRF/framework/GIT/csp-commons" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../MRF/framework/GIT/dc-cas-server" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../MRF/framework/GIT/demoService" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../MRF/framework/GIT/mrf-boot" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../MRF/framework/GIT/mrf-cas-server" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../MRF/platformBusiness/GIT/cas" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../MRF/platformBusiness/GIT/cspservice" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../MRF/platformBusiness/GIT/image" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../MRF/platformBusiness/GIT/operationmgr" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../MRF/platformBusiness/GIT/securitycall" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../MRF/platformBusiness/GIT/third-service" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../MRF/platformBusiness/GIT/userservice" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../MRF/platformBusiness/GIT/ytserver" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../MRF/product/鲜果多多/GIT/fruits-service" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../MRF/sample/GradleSide-master/20-plugin-proguard" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../MRF/sample/Installer-master" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../MRF/sample/confusion-master" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../MRF/sample/moco-master" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../MRF/sample/proguard-spring-boot-example-master" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../MRF/sample/sso-master/sso-client1" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../MRF/sample/sso-master/sso-client2" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../MRF/sample/sso-master/sso-server" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../MRF/sample/txlcn-demo-master" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../SR/framework/GIT/dcw-boot" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../TOOLS/lombok-intellij-plugin" value="PREVIEW" />
+      </map>
+    </option>
+  </component>
+  <component name="IdeDocumentHistory">
+    <option name="CHANGED_PATHS">
+      <list>
+        <option value="$PROJECT_DIR$/.gitignore" />
+        <option value="$PROJECT_DIR$/src/main/resources/gateway.properties" />
+      </list>
+    </option>
+  </component>
+  <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
+  <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
+  <component name="JsGulpfileManager">
+    <detection-done>true</detection-done>
+    <sorting>DEFINITION_ORDER</sorting>
+  </component>
+  <component name="LogFilters">
+    <option name="FILTER_ERRORS" value="false" />
+    <option name="FILTER_WARNINGS" value="false" />
+    <option name="FILTER_INFO" value="true" />
+    <option name="FILTER_DEBUG" value="true" />
+    <option name="CUSTOM_FILTER" />
+  </component>
+  <component name="MavenImportPreferences">
+    <option name="importingSettings">
+      <MavenImportingSettings>
+        <option name="importAutomatically" value="true" />
+      </MavenImportingSettings>
+    </option>
+  </component>
+  <component name="MavenProjectNavigator">
+    <treeState>
+      <expand>
+        <path>
+          <item name="" type="16c1761:MavenProjectsStructure$RootNode" />
+          <item name="hsdatagateway" type="9519ce18:MavenProjectsStructure$ProjectNode" />
+        </path>
+      </expand>
+      <select />
+    </treeState>
+  </component>
+  <component name="NodePackageJsonFileManager">
+    <packageJsonPaths />
+  </component>
+  <component name="ProjectFrameBounds" fullScreen="true">
+    <option name="width" value="1440" />
+    <option name="height" value="900" />
+  </component>
+  <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
+  <component name="ProjectView">
+    <navigator proportions="" version="1">
+      <foldersAlwaysOnTop value="true" />
+    </navigator>
+    <panes>
+      <pane id="AndroidView" />
+      <pane id="PackagesPane" />
+      <pane id="ProjectPane">
+        <subPane>
+          <expand>
+            <path>
+              <item name="jeesite" type="b2602c69:ProjectViewProjectNode" />
+              <item name="hsdatagateway" type="462c0819:PsiDirectoryNode" />
+            </path>
+          </expand>
+          <select />
+        </subPane>
+      </pane>
+      <pane id="Scope" />
+    </panes>
+  </component>
+  <component name="PropertiesComponent">
+    <property name="WebServerToolWindowFactoryState" value="false" />
+    <property name="aspect.path.notification.shown" value="true" />
+    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
+    <property name="nodejs_npm_path_reset_for_default_project" value="true" />
+    <property name="settings.editor.selected.configurable" value="preferences.pluginManager" />
+  </component>
+  <component name="RunDashboard">
+    <option name="ruleStates">
+      <list>
+        <RuleState>
+          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
+        </RuleState>
+        <RuleState>
+          <option name="name" value="StatusDashboardGroupingRule" />
+        </RuleState>
+      </list>
+    </option>
+  </component>
+  <component name="RunManager">
+    <configuration default="true" type="Application" factoryName="Application">
+      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
+    </configuration>
+    <configuration default="true" type="JUnit" factoryName="JUnit">
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+      <option name="ALTERNATIVE_JRE_PATH" />
+      <option name="PACKAGE_NAME" />
+      <option name="MAIN_CLASS_NAME" />
+      <option name="METHOD_NAME" />
+      <option name="TEST_OBJECT" value="class" />
+      <option name="VM_PARAMETERS" value="-ea" />
+      <option name="PARAMETERS" />
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
+      <option name="PASS_PARENT_ENVS" value="true" />
+      <option name="TEST_SEARCH_SCOPE">
+        <value defaultName="singleModule" />
+      </option>
+      <patterns />
+    </configuration>
+    <configuration default="true" type="TestNG" factoryName="TestNG">
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+      <option name="ALTERNATIVE_JRE_PATH" />
+      <option name="SUITE_NAME" />
+      <option name="PACKAGE_NAME" />
+      <option name="MAIN_CLASS_NAME" />
+      <option name="METHOD_NAME" />
+      <option name="GROUP_NAME" />
+      <option name="TEST_OBJECT" value="CLASS" />
+      <option name="VM_PARAMETERS" value="-ea" />
+      <option name="PARAMETERS" />
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
+      <option name="OUTPUT_DIRECTORY" />
+      <option name="PASS_PARENT_ENVS" value="true" />
+      <option name="TEST_SEARCH_SCOPE">
+        <value defaultName="singleModule" />
+      </option>
+      <option name="USE_DEFAULT_REPORTERS" value="false" />
+      <option name="PROPERTIES_FILE" />
+      <properties />
+      <listeners />
+    </configuration>
+    <configuration name="Unnamed" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="Local" APPLICATION_SERVER_NAME="Tomcat 8.0.30" ALTERNATIVE_JRE_ENABLED="false">
+      <option name="UPDATING_POLICY" value="restart-server" />
+      <deployment>
+        <artifact name="jeesite:war">
+          <settings>
+            <option name="CONTEXT_PATH" value="/" />
+          </settings>
+        </artifact>
+      </deployment>
+      <server-settings>
+        <option name="BASE_DIRECTORY_NAME" value="Unnamed_jeesite" />
+      </server-settings>
+      <predefined_log_file id="Tomcat" enabled="true" />
+      <predefined_log_file id="Tomcat Catalina" enabled="true" />
+      <predefined_log_file id="Tomcat Manager" enabled="false" />
+      <predefined_log_file id="Tomcat Host Manager" enabled="false" />
+      <predefined_log_file id="Tomcat Localhost Access" enabled="false" />
+      <RunnerSettings RunnerId="Debug">
+        <option name="DEBUG_PORT" value="61721" />
+      </RunnerSettings>
+      <ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Cover">
+        <option name="USE_ENV_VARIABLES" value="true" />
+        <STARTUP>
+          <option name="USE_DEFAULT" value="true" />
+          <option name="SCRIPT" value="" />
+          <option name="VM_PARAMETERS" value="" />
+          <option name="PROGRAM_PARAMETERS" value="" />
+        </STARTUP>
+        <SHUTDOWN>
+          <option name="USE_DEFAULT" value="true" />
+          <option name="SCRIPT" value="" />
+          <option name="VM_PARAMETERS" value="" />
+          <option name="PROGRAM_PARAMETERS" value="" />
+        </SHUTDOWN>
+      </ConfigurationWrapper>
+      <ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Debug">
+        <option name="USE_ENV_VARIABLES" value="true" />
+        <STARTUP>
+          <option name="USE_DEFAULT" value="true" />
+          <option name="SCRIPT" value="" />
+          <option name="VM_PARAMETERS" value="" />
+          <option name="PROGRAM_PARAMETERS" value="" />
+        </STARTUP>
+        <SHUTDOWN>
+          <option name="USE_DEFAULT" value="true" />
+          <option name="SCRIPT" value="" />
+          <option name="VM_PARAMETERS" value="" />
+          <option name="PROGRAM_PARAMETERS" value="" />
+        </SHUTDOWN>
+      </ConfigurationWrapper>
+      <ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Run">
+        <option name="USE_ENV_VARIABLES" value="true" />
+        <STARTUP>
+          <option name="USE_DEFAULT" value="true" />
+          <option name="SCRIPT" value="" />
+          <option name="VM_PARAMETERS" value="" />
+          <option name="PROGRAM_PARAMETERS" value="" />
+        </STARTUP>
+        <SHUTDOWN>
+          <option name="USE_DEFAULT" value="true" />
+          <option name="SCRIPT" value="" />
+          <option name="VM_PARAMETERS" value="" />
+          <option name="PROGRAM_PARAMETERS" value="" />
+        </SHUTDOWN>
+      </ConfigurationWrapper>
+      <method>
+        <option name="BuildArtifacts" enabled="true">
+          <artifact name="jeesite:war" />
+        </option>
+      </method>
+    </configuration>
+  </component>
+  <component name="SbtLocalSettings">
+    <option name="projectSyncType">
+      <map>
+        <entry key="$PROJECT_DIR$/../../../../../DCW/BigData/GIT/NewSparkApp-MySQL" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../../DCW/大数据平台/GIT/NewSparkApp-MySQL" value="PREVIEW" />
+      </map>
+    </option>
+  </component>
+  <component name="SvnConfiguration">
+    <configuration />
+  </component>
+  <component name="TaskManager">
+    <task active="true" id="Default" summary="Default task">
+      <changelist id="331339a0-f195-45cc-a86e-dc20492dd74c" name="Default" comment="" />
+      <created>1575533951891</created>
+      <option name="number" value="Default" />
+      <option name="presentableId" value="Default" />
+      <updated>1575533951891</updated>
+      <workItem from="1575533954422" duration="453000" />
+    </task>
+    <servers />
+  </component>
+  <component name="TimeTrackingManager">
+    <option name="totallyTimeSpent" value="453000" />
+  </component>
+  <component name="ToolWindowManager">
+    <frame x="0" y="0" width="1440" height="900" extended-state="0" />
+    <layout>
+      <window_info anchor="right" id="Palette" />
+      <window_info anchor="bottom" id="FindBugs-IDEA" />
+      <window_info anchor="bottom" id="Event Log" side_tool="true" />
+      <window_info anchor="bottom" id="Application Servers" weight="0.58060604" />
+      <window_info anchor="right" id="Maven Projects" weight="0.3297568" />
+      <window_info anchor="bottom" id="Database Changes" show_stripe_button="false" />
+      <window_info id="Capture Tool" />
+      <window_info id="Designer" />
+      <window_info anchor="right" id="Database" />
+      <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
+      <window_info id="UI Designer" />
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
+      <window_info anchor="bottom" id="TODO" order="6" />
+      <window_info anchor="bottom" id="Messages" weight="0.32969698" />
+      <window_info anchor="right" id="Palette&#9;" />
+      <window_info id="Image Layers" />
+      <window_info anchor="bottom" id="Java Enterprise" />
+      <window_info anchor="right" id="Capture Analysis" />
+      <window_info anchor="bottom" id="Run" order="2" />
+      <window_info anchor="bottom" id="Version Control" weight="0.32969698" />
+      <window_info anchor="bottom" id="Spring" />
+      <window_info anchor="bottom" id="Terminal" />
+      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.24964234" />
+      <window_info anchor="right" id="Bean Validation" />
+      <window_info id="Web" side_tool="true" />
+      <window_info anchor="bottom" id="Find" order="1" />
+      <window_info anchor="right" id="Theme Preview" />
+      <window_info id="Favorites" side_tool="true" />
+      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
+      <window_info anchor="bottom" id="Message" order="0" />
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
+    </layout>
+  </component>
+  <component name="TypeScriptGeneratedFilesManager">
+    <option name="version" value="1" />
+  </component>
+  <component name="VcsContentAnnotationSettings">
+    <option name="myLimit" value="2678400000" />
+  </component>
+  <component name="editorHistoryManager">
+    <entry file="file://$PROJECT_DIR$/.gitignore">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="195">
+          <caret line="13" lean-forward="true" selection-start-line="13" selection-end-line="13" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/lightinit/hsdatagateway/common/config/Global.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="150">
+          <caret line="22" column="13" selection-start-line="22" selection-start-column="13" selection-end-line="22" selection-end-column="13" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/resources/mybatis-config.xml">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="-24" />
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/resources/gateway.properties">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="111">
+          <caret line="11" column="23" lean-forward="true" selection-start-line="11" selection-start-column="23" selection-end-line="11" selection-end-column="23" />
+        </state>
+      </provider>
+    </entry>
+  </component>
+  <component name="masterDetails">
+    <states>
+      <state key="ProjectJDKs.UI">
+        <settings>
+          <last-edited>1.8</last-edited>
+          <splitter-proportions>
+            <option name="proportions">
+              <list>
+                <option value="0.2" />
+              </list>
+            </option>
+          </splitter-proportions>
+        </settings>
+      </state>
+    </states>
+  </component>
+</project>

BIN
doc/1.介绍与安装.docx


BIN
doc/2.文件结构与配置.docx


BIN
doc/3.内置组件的应用.docx


BIN
doc/4.代码生成器的应用.docx


BIN
doc/5.硕正WEB组件的应用.docx


BIN
doc/6.工作流的应用实例.docx


BIN
doc/7.手机端基础接口文档.docx


BIN
doc/8.内容管理模块功能说明.docx


BIN
doc/jeesite-cas-client.rar


BIN
doc/jeesite_help.chm


BIN
doc/jeesite代码生成,流程,菜单设置,shiro.doc


BIN
doc/jeesite的cas集成配置.rar


BIN
doc/jeesite目录结构图.png


BIN
doc/maven.rar


BIN
doc/平台删除Activiti模块.docx


+ 898 - 0
pom.xml

@@ -0,0 +1,898 @@
+<?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>com.thinkgem.jeesite</groupId>
+	<artifactId>jeesite</artifactId>
+	<version>1.2.7</version>
+	<packaging>war</packaging>
+	
+	<name>hsdatagateway</name>
+	<url>http://thinkgem.github.com/jeesite</url>
+	<inceptionYear>2012-2016</inceptionYear>
+	
+	<!-- 项目属性 -->
+	<properties>
+		
+		<!-- main version setting -->
+		<spring.version>5.0.7.RELEASE</spring.version>
+		<validator.version>5.2.4.Final</validator.version>
+		<mybatis.version>3.2.8</mybatis.version>
+		<mybatis-spring.version>1.2.3</mybatis-spring.version>
+		<druid.version>1.0.18</druid.version>
+		<ehcache.version>2.6.11</ehcache.version>
+		<ehcache-web.version>2.0.4</ehcache-web.version>
+		<shiro.version>1.2.3</shiro.version>
+		<sitemesh.version>2.4.2</sitemesh.version>
+		<activiti.version>5.21.0</activiti.version>
+		
+		<!-- tools version setting -->
+		<slf4j.version>1.7.7</slf4j.version>
+		<commons-lang3.version>3.3.2</commons-lang3.version>
+		<commons-io.version>2.4</commons-io.version>
+		<commons-codec.version>1.9</commons-codec.version>
+		<commons-fileupload.version>1.3.1</commons-fileupload.version>
+		<commons-beanutils.version>1.9.1</commons-beanutils.version>
+		<jackson.version>2.9.6</jackson.version>
+		<fastjson.version>1.1.40</fastjson.version>
+		<xstream.version>1.4.7</xstream.version>
+		<guava.version>17.0</guava.version>
+		<dozer.version>5.5.1</dozer.version>
+		<poi.version>3.9</poi.version>
+		<freemarker.version>2.3.20</freemarker.version>
+		
+		<!-- jdbc driver setting -->
+		<mysql.driver.version>5.1.30</mysql.driver.version>
+		<oracle.driver.version>10.2.0.4.0</oracle.driver.version>
+		<mssql.driver.version>1.3.1</mssql.driver.version>
+	    
+		<!-- environment setting -->
+		<jdk.version>1.8</jdk.version>
+		<tomcat.version>2.2</tomcat.version>
+		<jetty.version>7.6.14.v20131031</jetty.version>
+		<webserver.port>8181</webserver.port>
+		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+		<downloadSources>true</downloadSources>
+		
+	</properties>
+	
+	<!-- 设定主仓库,按设定顺序进行查找。 -->
+	<repositories>
+	
+		<repository>
+			<id>jeesite-repos</id>
+			<name>Jeesite Repository</name>
+			<url>http://maven.aliyun.com/nexus/content/groups/public</url>
+		</repository>
+		
+	</repositories>
+	
+	<!-- 设定插件仓库 -->
+	<pluginRepositories> 
+	
+		<pluginRepository>
+			<id>jeesite-repos</id>
+			<name>Jeesite Repository</name>
+			<url>http://maven.aliyun.com/nexus/content/groups/public</url>
+		</pluginRepository>
+		
+	</pluginRepositories> 
+	
+	<!-- 依赖项定义 -->
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.httpcomponents</groupId>
+			<artifactId>httpclient</artifactId>
+			<version>4.5.6</version>
+		</dependency>
+		<dependency>
+			<groupId>com.alibaba</groupId>
+			<artifactId>fastjson</artifactId>
+			<version>1.2.47</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.projectlombok</groupId>
+			<artifactId>lombok</artifactId>
+			<version>1.18.4</version>
+		</dependency>
+	
+		<!-- SPRING begin -->
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-core</artifactId>
+			<version>${spring.version}</version>
+			<exclusions>
+				<exclusion>
+					<groupId>commons-logging</groupId>
+					<artifactId>commons-logging</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-beans</artifactId>
+			<version>${spring.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-context</artifactId>
+			<version>${spring.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-context-support</artifactId>
+			<version>${spring.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-aop</artifactId>
+			<version>${spring.version}</version>
+			<exclusions>
+				<exclusion>
+					<groupId>commons-logging</groupId>
+					<artifactId>commons-logging</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-tx</artifactId>
+			<version>${spring.version}</version>
+		</dependency>
+			
+		<!-- spring orm -->
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-orm</artifactId>
+			<version>${spring.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-jdbc</artifactId>
+			<version>${spring.version}</version>
+		</dependency>
+		
+		<!-- bean validate -->
+		<dependency>
+			<groupId>org.hibernate</groupId>
+			<artifactId>hibernate-validator</artifactId>
+			<version>${validator.version}</version>
+		</dependency>
+		<!-- SPRING end -->
+		
+		<!-- AOP begin -->
+		<dependency>
+			<groupId>org.aspectj</groupId>
+			<artifactId>aspectjrt</artifactId>
+			<version>1.7.4</version>
+		</dependency>
+		<dependency>
+			<groupId>org.aspectj</groupId>
+			<artifactId>aspectjweaver</artifactId>
+			<version>1.7.4</version>
+		</dependency>
+		<dependency>
+			<groupId>cglib</groupId>
+			<artifactId>cglib</artifactId>
+			<version>3.1</version>
+		</dependency>
+		<!-- AOP end -->
+		
+		<!-- PERSISTENCE begin -->
+		
+		<!-- MyBatis -->
+		<dependency>
+			<groupId>org.mybatis</groupId>
+			<artifactId>mybatis</artifactId>
+			<version>${mybatis.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.mybatis</groupId>
+			<artifactId>mybatis-spring</artifactId>
+			<version>${mybatis-spring.version}</version>
+		</dependency>
+		
+		<!-- connection pool -->
+		<dependency>
+		     <groupId>com.alibaba</groupId>
+		     <artifactId>druid</artifactId>
+		     <version>${druid.version}</version>
+		</dependency>
+		
+		<!-- jdbc driver -->
+		<dependency>
+			<groupId>mysql</groupId>
+			<artifactId>mysql-connector-java</artifactId>
+			<version>${mysql.driver.version}</version>
+			<scope>runtime</scope>
+		</dependency>
+		<dependency>
+			<groupId>com.oracle</groupId>
+			<artifactId>ojdbc14</artifactId>
+			<version>${oracle.driver.version}</version>
+			<scope>system</scope>
+			<systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/ojdbc14-10.2.0.4.0.jar</systemPath>
+		</dependency>
+		<dependency>
+			<groupId>net.sourceforge.jtds</groupId>
+			<artifactId>jtds</artifactId>
+			<version>${mssql.driver.version}</version>
+			<scope>runtime</scope>
+		</dependency>
+		<!-- PERSISTENCE end -->
+		
+		<!-- WEB begin -->
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-web</artifactId>
+			<version>${spring.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-webmvc</artifactId>
+			<version>${spring.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-oxm</artifactId>
+			<version>${spring.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>opensymphony</groupId>
+			<artifactId>sitemesh</artifactId>
+			<version>${sitemesh.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>taglibs</groupId>
+			<artifactId>standard</artifactId>
+			<version>1.1.2</version>
+			<type>jar</type>
+		</dependency>
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>jstl</artifactId>
+			<version>1.2</version>
+			<type>jar</type>
+		</dependency>
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>servlet-api</artifactId>
+			<version>2.5</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>javax.servlet.jsp</groupId>
+			<artifactId>jsp-api</artifactId>
+			<version>2.1</version>
+			<scope>provided</scope>
+		</dependency>
+		<!-- <dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>javax.servlet-api</artifactId>
+			<version>3.0.1</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>javax.servlet.jsp</groupId>
+			<artifactId>jsp-api</artifactId>
+			<version>2.2</version>
+			<scope>provided</scope>
+		</dependency> -->
+		<!-- WEB end -->
+
+		<!-- CACHE begin -->
+		<dependency>
+			<groupId>net.sf.ehcache</groupId>
+			<artifactId>ehcache-core</artifactId>
+			<version>${ehcache.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>net.sf.ehcache</groupId>  
+			<artifactId>ehcache-web</artifactId>  
+			<version>${ehcache-web.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>redis.clients</groupId>
+			<artifactId>jedis</artifactId>
+			 <version>2.5.1</version>
+		</dependency>
+		<!-- CACHE end -->
+		
+		<!-- SECURITY begin -->
+		<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>org.apache.shiro</groupId>
+			<artifactId>shiro-cas</artifactId>
+			<version>${shiro.version}</version>
+			<exclusions>
+				<exclusion>
+					<groupId>commons-logging</groupId>
+					<artifactId>commons-logging</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.shiro</groupId>
+			<artifactId>shiro-web</artifactId>
+			<version>${shiro.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.shiro</groupId>
+			<artifactId>shiro-ehcache</artifactId>
+			<version>${shiro.version}</version>
+		</dependency>
+		<!-- SECURITY end -->
+		
+		<!-- Activiti -->
+		<dependency>
+			<groupId>org.activiti</groupId>
+			<artifactId>activiti-engine</artifactId>
+			<version>${activiti.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.activiti</groupId>
+			<artifactId>activiti-spring</artifactId>
+			<version>${activiti.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.activiti</groupId>
+			<artifactId>activiti-explorer</artifactId>
+			<version>${activiti.version}</version>
+			<exclusions>
+				<exclusion>
+					<artifactId>vaadin</artifactId>
+					<groupId>com.vaadin</groupId>
+				</exclusion>
+				<exclusion>
+					<artifactId>dcharts-widget</artifactId>
+					<groupId>org.vaadin.addons</groupId>
+				</exclusion>
+				<exclusion>
+					<artifactId>activiti-simple-workflow</artifactId>
+					<groupId>org.activiti</groupId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+		<dependency>
+			<groupId>org.activiti</groupId>
+			<artifactId>activiti-modeler</artifactId>
+            <version>${activiti.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.activiti</groupId>
+			<artifactId>activiti-diagram-rest</artifactId>
+			<version>${activiti.version}</version>
+		</dependency>
+		
+		<!-- 支持activiti缓存 -->
+		<!-- <dependency>
+			<groupId>org.infinispan</groupId>
+			<artifactId>infinispan-core</artifactId>
+			<version>5.1.7.Final</version>
+		</dependency> -->
+		
+		<!-- LOGGING begin -->
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-api</artifactId>
+			<version>${slf4j.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-log4j12</artifactId>
+			<version>${slf4j.version}</version>
+		</dependency>
+		<!-- common-logging 实际调用slf4j -->
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>jcl-over-slf4j</artifactId>
+			<version>${slf4j.version}</version>
+		</dependency>
+		<!-- java.util.logging 实际调用slf4j -->
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>jul-to-slf4j</artifactId>
+			<version>${slf4j.version}</version>
+		</dependency>
+		<!-- LOGGING end -->
+		
+		<!-- GENERAL UTILS begin -->
+		<dependency>
+			<groupId>org.apache.commons</groupId>
+			<artifactId>commons-lang3</artifactId>
+			<version>${commons-lang3.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-fileupload</groupId>
+		    <artifactId>commons-fileupload</artifactId>
+		    <version>${commons-fileupload.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-beanutils</groupId>
+			<artifactId>commons-beanutils</artifactId>
+			<version>${commons-beanutils.version}</version>
+			<exclusions>
+				<exclusion>
+					<groupId>commons-logging</groupId>
+					<artifactId>commons-logging</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency>
+		
+		<!-- google java lib -->
+		<dependency>
+			<groupId>com.google.guava</groupId>
+			<artifactId>guava</artifactId>
+			<version>${guava.version}</version>
+		</dependency>
+		
+		<!-- jackson json -->
+		<dependency>
+			<groupId>com.fasterxml.jackson.core</groupId>
+			<artifactId>jackson-core</artifactId>
+			<version>${jackson.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>com.fasterxml.jackson.core</groupId>
+			<artifactId>jackson-databind</artifactId>
+			<version>${jackson.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>com.fasterxml.jackson.core</groupId>
+			<artifactId>jackson-annotations</artifactId>
+			<version>${jackson.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>com.fasterxml.jackson.module</groupId>
+			<artifactId>jackson-module-jaxb-annotations</artifactId>
+			<version>${jackson.version}</version>
+		</dependency>
+		
+		<!-- fastjson json
+		<dependency>
+			<groupId>com.alibaba</groupId>
+			<artifactId>fastjson</artifactId>
+			<version>${fastjson.version}</version>
+		</dependency> -->
+		
+		<!-- xstream xml -->
+		<dependency>
+			<groupId>com.thoughtworks.xstream</groupId>
+			<artifactId>xstream</artifactId>
+			<version>${xstream.version}</version>
+		</dependency>
+		
+		<!-- pojo copy -->
+		<dependency>
+			<groupId>net.sf.dozer</groupId>
+			<artifactId>dozer</artifactId>
+			<version>${dozer.version}</version>
+		</dependency>
+		
+		<!-- freemarker engine -->
+		<dependency>
+			<groupId>org.freemarker</groupId>
+			<artifactId>freemarker</artifactId>
+			<version>${freemarker.version}</version>
+		</dependency>
+		
+		<!-- email -->
+		<dependency>
+			<groupId>javax.mail</groupId>
+			<artifactId>mail</artifactId>
+			<version>1.4.7</version>
+		</dependency>
+		<dependency>
+			<groupId>javax.activation</groupId>
+			<artifactId>activation</artifactId>
+			<version>1.1.1</version>
+		</dependency>
+		
+		<!-- poi office -->
+		<dependency>
+			<groupId>org.apache.poi</groupId>
+			<artifactId>poi</artifactId>
+			<version>${poi.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.poi</groupId>
+			<artifactId>poi-ooxml</artifactId>
+			<version>${poi.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.poi</groupId>
+			<artifactId>poi-ooxml-schemas</artifactId>
+			<version>${poi.version}</version>
+		</dependency>
+		
+		<!-- image util -->
+		<dependency>
+			<groupId>com.drewnoakes</groupId>
+			<artifactId>metadata-extractor</artifactId>
+			<version>2.6.2</version>
+		</dependency>
+		
+		<!-- 条形码、二维码生成  -->
+		<dependency>
+			<groupId>com.google.zxing</groupId>
+			<artifactId>core</artifactId>
+			<version>2.2</version>
+		</dependency>
+		<dependency>
+			<groupId>com.google.zxing</groupId>
+			<artifactId>javase</artifactId>
+			<version>2.2</version>
+		</dependency>
+		
+		<!-- 中文分词 -->
+		<dependency>
+			<groupId>org.wltea</groupId>
+			<artifactId>analyzer</artifactId>
+			<version>2012_u6</version>
+			<scope>system</scope>
+			<systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/analyzer-2012_u6.jar</systemPath>
+		</dependency>
+		<!-- GENERAL UTILS end -->
+		
+		<!-- CKFinder begin -->
+		<dependency>
+			<groupId>net.coobird</groupId>
+			<artifactId>thumbnailator</artifactId>
+			<version>0.4.2</version>
+			<scope>system</scope>
+			<systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/thumbnailator-0.4.2.jar</systemPath>
+		</dependency>
+		<dependency>
+			<groupId>com.ckfinder</groupId>
+			<artifactId>apache-ant-zip</artifactId>
+			<version>2.3</version>
+			<scope>system</scope>
+			<systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/apache-ant-zip-2.3.jar</systemPath>
+		</dependency>
+		<dependency>
+			<groupId>com.ckfinder</groupId>
+			<artifactId>ckfinder</artifactId>
+			<version>2.3</version>
+			<scope>system</scope>
+			<systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/ckfinder-2.3.jar</systemPath>
+		</dependency>
+		<dependency>
+			<groupId>com.ckfinder</groupId>
+			<artifactId>ckfinderplugin-fileeditor</artifactId>
+			<version>2.3</version>
+			<scope>system</scope>
+			<systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/ckfinderplugin-fileeditor-2.3.jar</systemPath>
+		</dependency>
+		<dependency>
+			<groupId>com.ckfinder</groupId>
+			<artifactId>ckfinderplugin-imageresize</artifactId>
+			<version>2.3</version>
+			<scope>system</scope>
+			<systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/ckfinderplugin-imageresize-2.3.jar</systemPath>
+		</dependency>
+		<!-- CKFinder end -->
+		
+		<!-- TEST begin -->
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>4.11</version>
+		</dependency>
+		<dependency>
+			<groupId>org.springframework</groupId>
+			<artifactId>spring-test</artifactId>
+			<version>${spring.version}</version>
+		</dependency>
+		<!-- TEST end -->
+		
+		<!-- User Agent -->
+		<dependency>
+			<groupId>bitwalker</groupId>
+			<artifactId>UserAgentUtils</artifactId>
+			<version>1.13</version>
+			<scope>system</scope>
+			<systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/UserAgentUtils-1.13.jar</systemPath>
+		</dependency>
+		
+		<!-- 自定义jar依赖包
+		<dependency>
+			<groupId>com.thinkgem.jeesite</groupId>
+			<artifactId>test-core</artifactId>
+			<version>1.0</version>
+			<scope>system</scope>
+			<systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/test-core-1.0.jar</systemPath>
+		</dependency> -->
+		
+		<!-- 使用 Jetty JSP引擎 
+		<dependency>
+			<groupId>org.eclipse.jetty</groupId>
+			<artifactId>jetty-jsp</artifactId>
+			<version>${jetty.version}</version>
+			<exclusions>
+				<exclusion>
+					<groupId>org.eclipse.jetty.orbit</groupId>
+					<artifactId>javax.servlet</artifactId>
+				</exclusion>
+				<exclusion>
+					<groupId>org.eclipse.jetty.orbit</groupId>
+					<artifactId>org.apache.taglibs.standard.glassfish</artifactId>
+				</exclusion>
+			</exclusions>
+		</dependency> -->
+		
+	</dependencies>
+
+	<build>
+		<finalName>hsdatagateway</finalName>
+		<outputDirectory>${project.basedir}/src/main/webapp/WEB-INF/classes/</outputDirectory>
+		<plugins>
+			<!-- Compiler 插件, 设定JDK版本 -->
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<version>3.5.1</version>
+				<configuration>
+					<source>${jdk.version}</source>
+					<target>${jdk.version}</target>
+					<showWarnings>true</showWarnings>
+				</configuration>
+			</plugin>
+			
+			<!-- JSP 预编译插件  jspweb.xml
+			<plugin>
+				<groupId>org.jasig.mojo.jspc</groupId>
+				<artifactId>jspc-maven-plugin</artifactId>
+				<version>2.0.0</version>
+				<configuration>
+					<injectString>&lt;!- - [INSERT FRAGMENT HERE] - -&gt;</injectString>
+				</configuration>
+				<executions>
+					<execution>
+						<goals>
+							<goal>compile</goal>
+						</goals>
+					</execution>
+				</executions>
+				<dependencies>
+					<dependency>
+						<groupId>org.jasig.mojo.jspc</groupId>
+						<artifactId>jspc-compiler-tomcat6</artifactId>
+						<version>2.0.0</version>
+					</dependency>
+				</dependencies>
+			</plugin>-->
+			
+			<!-- Jetty JSP 预编译插件  web.xml
+			<plugin>
+				<groupId>org.mortbay.jetty</groupId>
+				<artifactId>jetty-jspc-maven-plugin</artifactId>
+				<version>${jetty.version}</version>
+				<configuration>
+					<insertionMarker>&lt;!- - [INSERT FRAGMENT HERE] - -&gt;</insertionMarker>
+				</configuration>
+				<executions>
+					<execution>
+						<goals>
+							<goal>jspc</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>-->
+			
+			<!-- 打包jar文件时,配置manifest文件,加入lib包的jar依赖 -->
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-jar-plugin</artifactId>
+				<version>2.4</version>
+				<!-- <executions>
+					<execution>
+						<phase>prepare-package</phase>
+						<goals>
+							<goal>jar</goal>
+						</goals>
+						<configuration>
+							<classesDirectory>${project.outputDirectory}</classesDirectory>
+							<finalName>jeesite</finalName>
+							<outputDirectory>${project.build.directory}/${project.artifactId}/WEB-INF/lib</outputDirectory>
+							<includes>
+					        	<include>com/thinkgem/jeesite/**</include>
+					       	</includes>
+						</configuration>
+					</execution>
+				</executions> -->
+			</plugin>
+			
+			<!-- 混淆代码
+			<plugin>
+				<groupId>com.github.wvengen</groupId>
+				<artifactId>proguard-maven-plugin</artifactId>
+				<version>2.0.11</version>
+				<executions>
+					<execution>
+						<phase>prepare-package</phase>
+						<goals>
+							<goal>proguard</goal>
+						</goals>
+					</execution>
+				</executions>
+				<configuration>
+			        <obfuscate>true</obfuscate>
+			    	<options>
+                        <option>-injars ${project.build.directory}/${project.artifactId}/WEB-INF/lib/jeesite.jar</option>
+                    </options>
+                    <outjar>${project.artifactId}/WEB-INF/lib/jeesite_out.jar</outjar>
+                    <outputDirectory>${project.build.directory}</outputDirectory>
+			        <proguardInclude>${basedir}/proguard.cfg</proguardInclude>
+					<source>${jdk.version}</source>
+					<target>${jdk.version}</target>
+					<encoding>${project.build.sourceEncoding}</encoding>
+					<libs>
+						<lib>${java.home}/lib/rt.jar</lib>
+						<lib>${java.home}/lib/jsse.jar</lib>
+			            <lib>${java.home}/lib/jce.jar</lib>
+					</libs>
+			        <addMavenDescriptor>false</addMavenDescriptor>
+				</configuration>
+				<dependencies>
+					<dependency>
+						<groupId>net.sf.proguard</groupId>
+						<artifactId>proguard-base</artifactId>
+						<version>4.9</version>
+						<scope>runtime</scope>
+					</dependency>
+				</dependencies>
+			</plugin> -->
+
+			<!-- war 打包插件, 设定war包名称不带版本号 -->
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-war-plugin</artifactId>
+				<version>2.4</version>
+				<configuration>
+					<packagingExcludes>
+						<!-- WEB-INF/classes/com/thinkgem/jeesite/** -->
+						WEB-INF/classes/org/apache/ibatis/**,
+						WEB-INF/classes/org/mybatis/spring/**
+					</packagingExcludes>
+					<warSourceExcludes>
+						static/bootstrap/2.3.1/docs/**,
+						static/ckeditor/_samples/**,
+						static/ckeditor/_source/**,
+						static/ckfinder/_samples/**,
+						static/ckfinder/help/**,
+						static/compressor*/**,
+						static/jquery-jbox/2.3/docs/**,
+						static/jquery-jbox/2.3/Skins2/**,
+						static/jquery-validation/1.11.0/demo/**,
+						static/jquery-ztree/3.5.12/demo/**,
+						static/My97DatePicker/docs/**,
+						static/supcan/doc/**,
+						static/SuperSlide/demo/**,
+						static/treeTable/demo/**<!-- , -->
+						<!-- userfiles/** --><!-- ,/**/*.jsp -->,
+						test/**
+					</warSourceExcludes>
+					<webappDirectory>${project.build.directory}/hsdatagateway</webappDirectory><!--
+					<webXml>${project.basedir}/target/jspweb.xml</webXml> -->
+				</configuration>
+			</plugin>
+			
+			<!-- Eclipse 插件 -->
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-eclipse-plugin</artifactId>
+				<version>2.9</version>
+				<configuration>
+					<downloadSources>${downloadSources}</downloadSources>
+					<downloadJavadocs>false</downloadJavadocs>
+					<wtpversion>2.0</wtpversion>
+					<jeeversion>5.0</jeeversion>
+					<!-- <jeeversion>6.0</jeeversion> -->
+					<additionalConfig>
+						<file>
+							<name>.settings/org.eclipse.core.resources.prefs</name>
+							<content>
+								<![CDATA[eclipse.preferences.version=1${line.separator}encoding/<project>=${project.build.sourceEncoding}${line.separator}]]>
+							</content>
+						</file>
+					</additionalConfig>
+					<additionalProjectnatures>
+						<projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
+					</additionalProjectnatures>
+				</configuration>
+			</plugin>
+			
+			<!-- tomcat6插件 -->
+			<plugin>
+				<groupId>org.apache.tomcat.maven</groupId>
+				<artifactId>tomcat6-maven-plugin</artifactId>
+				<version>${tomcat.version}</version> 
+				<configuration>
+					<port>${webserver.port}</port>
+					<path>/${project.artifactId}</path>
+					<uriEncoding>${project.build.sourceEncoding}</uriEncoding>
+				</configuration>
+			</plugin>
+			
+			<!-- tomcat7插件 -->
+			<plugin>
+				<groupId>org.apache.tomcat.maven</groupId>
+				<artifactId>tomcat7-maven-plugin</artifactId>
+				<version>${tomcat.version}</version> 
+				<configuration>
+					<port>${webserver.port}</port>
+					<path>/${project.artifactId}</path>
+					<uriEncoding>${project.build.sourceEncoding}</uriEncoding>
+				</configuration>
+			</plugin>
+
+			<!-- resource插件 -->
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-resources-plugin</artifactId>
+				<version>2.7</version>
+			</plugin>
+			
+			<!-- install插件 -->
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-install-plugin</artifactId>
+				<version>2.5.2</version>
+			</plugin>
+			
+			<!-- clean插件 -->
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-clean-plugin</artifactId>
+				<version>2.6.1</version>
+			</plugin>
+			
+			<!-- ant插件 -->
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-antrun-plugin</artifactId>
+				<version>1.8</version>
+			</plugin>
+			
+			<!-- dependency插件 -->
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-dependency-plugin</artifactId>
+				<version>2.10</version>
+			</plugin>
+		</plugins>
+	</build>
+	
+	<!-- 开发者信息 -->
+	<developers>  
+		<developer>
+			<id>thinkgem</id>
+			<name>WangZhen</name>
+			<email>thinkgem at 163.com</email>
+			<roles><role>Project lead</role></roles>
+			<timezone>+8</timezone>
+		</developer>
+	</developers>
+	
+</project>

+ 17 - 0
src/main/java/com/lightinit/hsdatagateway/common/annotation/FieldName.java

@@ -0,0 +1,17 @@
+package com.lightinit.hsdatagateway.common.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * bean中文名注解
+ */
+@Target(ElementType.METHOD)  
+@Retention(RetentionPolicy.RUNTIME)  
+public @interface FieldName {
+
+	String value();
+	
+}

+ 10 - 0
src/main/java/com/lightinit/hsdatagateway/common/beanvalidator/AddGroup.java

@@ -0,0 +1,10 @@
+package com.lightinit.hsdatagateway.common.beanvalidator;
+
+/**
+ * 添加Bean验证组
+ * @Author yangrui
+ *
+ */
+public interface AddGroup {
+
+}

+ 116 - 0
src/main/java/com/lightinit/hsdatagateway/common/beanvalidator/BeanValidators.java

@@ -0,0 +1,116 @@
+/**
+ * Copyright (c) 2005-2012 springside.org.cn
+ */
+package com.lightinit.hsdatagateway.common.beanvalidator;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.validation.ConstraintViolation;
+import javax.validation.ConstraintViolationException;
+import javax.validation.Validator;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+
+/**
+ * JSR303 Validator(Hibernate Validator)工具类.
+ * 
+ * ConstraintViolation中包含propertyPath, message 和invalidValue等信息.
+ * 提供了各种convert方法,适合不同的i18n需求:
+ * 1. List<String>, String内容为message
+ * 2. List<String>, String内容为propertyPath + separator + message
+ * 3. Map<propertyPath, message>
+ * 
+ * 详情见wiki: https://github.com/springside/springside4/wiki/HibernateValidator
+ * @Author yangrui
+ * @version 2013-01-15
+ */
+public class BeanValidators {
+
+	/**
+	 * 调用JSR303的validate方法, 验证失败时抛出ConstraintViolationException.
+	 */
+	@SuppressWarnings({ "unchecked", "rawtypes" })
+	public static void validateWithException(Validator validator, Object object, Class<?>... groups)
+			throws ConstraintViolationException {
+		Set constraintViolations = validator.validate(object, groups);
+		if (!constraintViolations.isEmpty()) {
+			throw new ConstraintViolationException(constraintViolations);
+		}
+	}
+
+	/**
+	 * 辅助方法, 转换ConstraintViolationException中的Set<ConstraintViolations>中为List<message>.
+	 */
+	public static List<String> extractMessage(ConstraintViolationException e) {
+		return extractMessage(e.getConstraintViolations());
+	}
+
+	/**
+	 * 辅助方法, 转换Set<ConstraintViolation>为List<message>
+	 */
+	@SuppressWarnings("rawtypes")
+	public static List<String> extractMessage(Set<? extends ConstraintViolation> constraintViolations) {
+		List<String> errorMessages = Lists.newArrayList();
+		for (ConstraintViolation violation : constraintViolations) {
+			errorMessages.add(violation.getMessage());
+		}
+		return errorMessages;
+	}
+
+	/**
+	 * 辅助方法, 转换ConstraintViolationException中的Set<ConstraintViolations>为Map<property, message>.
+	 */
+	public static Map<String, String> extractPropertyAndMessage(ConstraintViolationException e) {
+		return extractPropertyAndMessage(e.getConstraintViolations());
+	}
+
+	/**
+	 * 辅助方法, 转换Set<ConstraintViolation>为Map<property, message>.
+	 */
+	@SuppressWarnings("rawtypes")
+	public static Map<String, String> extractPropertyAndMessage(Set<? extends ConstraintViolation> constraintViolations) {
+		Map<String, String> errorMessages = Maps.newHashMap();
+		for (ConstraintViolation violation : constraintViolations) {
+			errorMessages.put(violation.getPropertyPath().toString(), violation.getMessage());
+		}
+		return errorMessages;
+	}
+
+	/**
+	 * 辅助方法, 转换ConstraintViolationException中的Set<ConstraintViolations>为List<propertyPath message>.
+	 */
+	public static List<String> extractPropertyAndMessageAsList(ConstraintViolationException e) {
+		return extractPropertyAndMessageAsList(e.getConstraintViolations(), " ");
+	}
+
+	/**
+	 * 辅助方法, 转换Set<ConstraintViolations>为List<propertyPath message>.
+	 */
+	@SuppressWarnings("rawtypes")
+	public static List<String> extractPropertyAndMessageAsList(Set<? extends ConstraintViolation> constraintViolations) {
+		return extractPropertyAndMessageAsList(constraintViolations, " ");
+	}
+
+	/**
+	 * 辅助方法, 转换ConstraintViolationException中的Set<ConstraintViolations>为List<propertyPath +separator+ message>.
+	 */
+	public static List<String> extractPropertyAndMessageAsList(ConstraintViolationException e, String separator) {
+		return extractPropertyAndMessageAsList(e.getConstraintViolations(), separator);
+	}
+
+	/**
+	 * 辅助方法, 转换Set<ConstraintViolation>为List<propertyPath +separator+ message>.
+	 */
+	@SuppressWarnings("rawtypes")
+	public static List<String> extractPropertyAndMessageAsList(Set<? extends ConstraintViolation> constraintViolations,
+			String separator) {
+		List<String> errorMessages = Lists.newArrayList();
+		for (ConstraintViolation violation : constraintViolations) {
+			errorMessages.add(violation.getPropertyPath() + separator + violation.getMessage());
+		}
+		return errorMessages;
+	}
+}

+ 9 - 0
src/main/java/com/lightinit/hsdatagateway/common/beanvalidator/DefaultGroup.java

@@ -0,0 +1,9 @@
+package com.lightinit.hsdatagateway.common.beanvalidator;
+
+/**
+ * 默认Bean验证组
+ * @Author yangrui
+ */
+public interface DefaultGroup {
+
+}

+ 9 - 0
src/main/java/com/lightinit/hsdatagateway/common/beanvalidator/EditGroup.java

@@ -0,0 +1,9 @@
+package com.lightinit.hsdatagateway.common.beanvalidator;
+
+/**
+ * 编辑Bena验证组
+ * @Author yangrui
+ */
+public interface EditGroup {
+
+}

+ 199 - 0
src/main/java/com/lightinit/hsdatagateway/common/config/Global.java

@@ -0,0 +1,199 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.config;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Map;
+
+import org.springframework.core.io.DefaultResourceLoader;
+
+import com.ckfinder.connector.ServletContextFactory;
+import com.google.common.collect.Maps;
+
+import com.lightinit.hsdatagateway.common.utils.PropertiesLoader;
+import com.lightinit.hsdatagateway.common.utils.StringUtils;
+
+/**
+ * 全局配置类 懒汉式单例类.在第一次调用的时候实例化自己
+ * @Author yangrui
+ * @version 2018年1月5日
+ */
+public class Global {
+
+	private Global() {}
+
+	/**
+	 * 当前对象实例
+	 */
+	private volatile static Global global = null;
+
+	/**
+	 * 静态工厂方法 获取当前对象实例 多线程安全单例模式(使用双重同步锁)
+	 */
+
+	public static synchronized Global getInstance() {
+
+		if (global == null) {
+			synchronized (Global.class) {
+				if (global == null)
+					global = new Global();
+			}
+		}
+		return global;
+	}
+
+	/**
+	 * 保存全局属性值
+	 */
+	private static Map<String, String> map = Maps.newHashMap();
+
+	/**
+	 * 属性文件加载对象
+	 */
+	private static PropertiesLoader loader = new PropertiesLoader("gateway.properties");
+
+	/**
+	 * 显示/隐藏
+	 */
+	public static final String SHOW = "1";
+	public static final String HIDE = "0";
+
+	/**
+	 * 是/否
+	 */
+	public static final String YES = "1";
+	public static final String NO = "0";
+
+	/**
+	 * 对/错
+	 */
+	public static final String TRUE = "true";
+	public static final String FALSE = "false";
+
+	/**
+	 * 上传文件基础虚拟路径
+	 */
+	public static final String USERFILES_BASE_URL = "/userfiles/";
+
+	/**
+	 * 获取配置
+	 * 
+	 * @see ${fns:getConfig('adminPath')}
+	 */
+	public static String getConfig(String key) {
+		String value = map.get(key);
+		if (value == null) {
+			value = loader.getProperty(key);
+			map.put(key, value != null ? value : StringUtils.EMPTY);
+		}
+		return value;
+	}
+
+	/**
+	 * 获取管理端根路径
+	 */
+	public static String getAdminPath() {
+		return getConfig("adminPath");
+	}
+
+	/**
+	 * 获取前端根路径
+	 */
+	public static String getFrontPath() {
+		return getConfig("frontPath");
+	}
+
+	/**
+	 * 获取URL后缀
+	 */
+	public static String getUrlSuffix() {
+		return getConfig("urlSuffix");
+	}
+
+	/**
+	 * 是否是演示模式,演示模式下不能修改用户、角色、密码、菜单、授权
+	 */
+	public static Boolean isDemoMode() {
+		String dm = getConfig("demoMode");
+		return "true".equals(dm) || "1".equals(dm);
+	}
+
+	/**
+	 * 在修改系统用户和角色时是否同步到Activiti
+	 */
+	public static Boolean isSynActivitiIndetity() {
+		String dm = getConfig("activiti.isSynActivitiIndetity");
+		return "true".equals(dm) || "1".equals(dm);
+	}
+
+	/**
+	 * 页面获取常量
+	 * 
+	 * @see ${fns:getConst('YES')}
+	 */
+	public static Object getConst(String field) {
+		try {
+			return Global.class.getField(field).get(null);
+		} catch (Exception e) {
+			// 异常代表无配置,这里什么也不做
+		}
+		return null;
+	}
+
+	/**
+	 * 获取上传文件的根目录
+	 * 
+	 * @return
+	 */
+	public static String getUserfilesBaseDir() {
+		String dir = getConfig("userfiles.basedir");
+		if (StringUtils.isBlank(dir)) {
+			try {
+				dir = ServletContextFactory.getServletContext().getRealPath("/");
+			} catch (Exception e) {
+				return "";
+			}
+		}
+		if (!dir.endsWith("/")) {
+			dir += "/";
+		}
+		// System.out.println("userfiles.basedir: " + dir);
+		return dir;
+	}
+
+	/**
+	 * 获取工程路径
+	 * 
+	 * @return
+	 */
+	public static String getProjectPath() {
+		// 如果配置了工程路径,则直接返回,否则自动获取。
+		String projectPath = Global.getConfig("projectPath");
+		if (StringUtils.isNotBlank(projectPath)) {
+			return projectPath;
+		}
+		try {
+			File file = new DefaultResourceLoader().getResource("").getFile();
+			if (file != null) {
+				while (true) {
+					File f = new File(file.getPath() + File.separator + "src" + File.separator + "main");
+					if (f == null || f.exists()) {
+						break;
+					}
+					if (file.getParentFile() != null) {
+						file = file.getParentFile();
+					} else {
+						break;
+					}
+				}
+				projectPath = file.toString();
+			}
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+		return projectPath;
+	}
+
+}

+ 26 - 0
src/main/java/com/lightinit/hsdatagateway/common/exceptions/BaseException.java

@@ -0,0 +1,26 @@
+package com.lightinit.hsdatagateway.common.exceptions;
+
+/**
+ * @Author: yangrui
+ * @Date: 2018/12/19 16:31
+ */
+public class BaseException extends RuntimeException {
+
+    /**
+     * 基本异常的代号
+     */
+    public String code = "200";
+
+    public BaseException() {
+        super("base exception");
+    }
+
+    public BaseException(String message) {
+        super(message);
+    }
+
+    public BaseException(String message, String code){
+        super(message);
+        this.code = code;
+    }
+}

+ 26 - 0
src/main/java/com/lightinit/hsdatagateway/common/exceptions/ChargeInformationException.java

@@ -0,0 +1,26 @@
+package com.lightinit.hsdatagateway.common.exceptions;
+
+
+import com.lightinit.hsdatagateway.constant.ExceptionEnum;
+
+/**
+ * 计费信息异常
+ * @Author: yangrui
+ * @Date: 2018/12/19 16:22
+ */
+public class ChargeInformationException extends BaseException {
+
+
+    public ChargeInformationException() {
+        super("计费信息异常", ExceptionEnum.CHARGE_INFORMATION.getCode());
+    }
+
+
+    public ChargeInformationException(String message) {
+        super(message, ExceptionEnum.CHARGE_INFORMATION.getCode());
+    }
+
+    public ChargeInformationException(String message, String code) {
+        super(message, code);
+    }
+}

+ 26 - 0
src/main/java/com/lightinit/hsdatagateway/common/exceptions/HttpTransferErrorException.java

@@ -0,0 +1,26 @@
+package com.lightinit.hsdatagateway.common.exceptions;
+
+
+import com.lightinit.hsdatagateway.constant.ExceptionEnum;
+
+/**
+ * http转发异常
+ * @Author: yangrui
+ * @Date: 2018/12/19 16:22
+ */
+public class HttpTransferErrorException extends BaseException {
+
+
+    public HttpTransferErrorException() {
+        super("http 转发错误", ExceptionEnum.HTTP_TRANSFER_ERROR.getCode());
+    }
+
+
+    public HttpTransferErrorException(String message) {
+        super(message, ExceptionEnum.HTTP_TRANSFER_ERROR.getCode());
+    }
+
+    public HttpTransferErrorException(String message, String code) {
+        super(message, code);
+    }
+}

+ 26 - 0
src/main/java/com/lightinit/hsdatagateway/common/exceptions/InterfaceRequestException.java

@@ -0,0 +1,26 @@
+package com.lightinit.hsdatagateway.common.exceptions;
+
+
+import com.lightinit.hsdatagateway.constant.ExceptionEnum;
+
+/**
+ * 接口时间到期或者次数不足异常
+ * @Author: yangrui
+ * @Date: 2018/12/19 16:22
+ */
+public class InterfaceRequestException extends BaseException {
+
+
+    public InterfaceRequestException() {
+        super("接口时间到期或者次数不足", ExceptionEnum.INTERFACE_REQUEST.getCode());
+    }
+
+
+    public InterfaceRequestException(String message) {
+        super(message, ExceptionEnum.INTERFACE_REQUEST.getCode());
+    }
+
+    public InterfaceRequestException(String message, String code) {
+        super(message, code);
+    }
+}

+ 23 - 0
src/main/java/com/lightinit/hsdatagateway/common/exceptions/NoRestValueException.java

@@ -0,0 +1,23 @@
+package com.lightinit.hsdatagateway.common.exceptions;
+
+import com.lightinit.hsdatagateway.constant.ExceptionEnum;
+
+/**
+ * 没有剩余量异常
+ */
+public class NoRestValueException extends BaseException{
+
+    public NoRestValueException() {
+        super("没有剩余量", ExceptionEnum.NORESTVALUE.getCode());
+    }
+
+
+    public NoRestValueException(String message) {
+        super(message, ExceptionEnum.NORESTVALUE.getCode());
+    }
+
+    public NoRestValueException(String message, String code) {
+        super(message, code);
+    }
+
+}

+ 22 - 0
src/main/java/com/lightinit/hsdatagateway/common/exceptions/OverTimeException.java

@@ -0,0 +1,22 @@
+package com.lightinit.hsdatagateway.common.exceptions;
+
+import com.lightinit.hsdatagateway.constant.ExceptionEnum;
+
+/**
+ * 不在有效时间内异常
+ */
+public class OverTimeException extends BaseException{
+
+    public OverTimeException() {
+        super("不在有效范围内", ExceptionEnum.OVERTIME.getCode());
+    }
+
+    public OverTimeException(String message) {
+        super(message, ExceptionEnum.OVERTIME.getCode());
+    }
+
+    public OverTimeException(String message, String code) {
+        super(message, code);
+    }
+
+}

+ 26 - 0
src/main/java/com/lightinit/hsdatagateway/common/exceptions/PermissionException.java

@@ -0,0 +1,26 @@
+package com.lightinit.hsdatagateway.common.exceptions;
+
+
+import com.lightinit.hsdatagateway.constant.ExceptionEnum;
+
+/**
+ * 权限不足异常
+ * @Author: yangrui
+ * @Date: 2018/12/19 16:22
+ */
+public class PermissionException extends BaseException {
+
+
+    public PermissionException() {
+        super("权限不足", ExceptionEnum.PERMISSION.getCode());
+    }
+
+
+    public PermissionException(String message) {
+        super(message, ExceptionEnum.PERMISSION.getCode());
+    }
+
+    public PermissionException(String message, String code) {
+        super(message, code);
+    }
+}

+ 26 - 0
src/main/java/com/lightinit/hsdatagateway/common/exceptions/RequestParamException.java

@@ -0,0 +1,26 @@
+package com.lightinit.hsdatagateway.common.exceptions;
+
+
+import com.lightinit.hsdatagateway.constant.ExceptionEnum;
+
+/**
+ * 请求参数异常
+ * @Author: yangrui
+ * @Date: 2018/12/19 16:22
+ */
+public class RequestParamException extends BaseException {
+
+
+    public RequestParamException() {
+        super("请求参数异常", ExceptionEnum.REQUEST_PARAM.getCode());
+    }
+
+
+    public RequestParamException(String message) {
+        super(message, ExceptionEnum.REQUEST_PARAM.getCode());
+    }
+
+    public RequestParamException(String message, String code) {
+        super(message, code);
+    }
+}

+ 25 - 0
src/main/java/com/lightinit/hsdatagateway/common/filter/PageCachingFilter.java

@@ -0,0 +1,25 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.filter;
+
+import net.sf.ehcache.CacheManager;
+import net.sf.ehcache.constructs.web.filter.SimplePageCachingFilter;
+
+import com.lightinit.hsdatagateway.common.utils.SpringContextHolder;
+
+/**
+ * 页面高速缓存过滤器
+ * @Author yangrui
+ * @version 2013-8-5
+ */
+public class PageCachingFilter extends SimplePageCachingFilter {
+
+	private CacheManager cacheManager = SpringContextHolder.getBean(CacheManager.class);
+	
+	@Override
+	protected CacheManager getCacheManager() {
+		return cacheManager;
+	}
+	
+}

+ 45 - 0
src/main/java/com/lightinit/hsdatagateway/common/handler/GlobalDefaultExceptionHandler.java

@@ -0,0 +1,45 @@
+package com.lightinit.hsdatagateway.common.handler;
+
+import com.lightinit.hsdatagateway.common.exceptions.BaseException;
+import com.lightinit.hsdatagateway.modules.foreign.model.ReturnResult;
+import com.lightinit.hsdatagateway.common.exceptions.BaseException;
+import com.lightinit.hsdatagateway.modules.foreign.model.ReturnResult;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.ControllerAdvice;
+import org.springframework.web.bind.annotation.ExceptionHandler;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.concurrent.RejectedExecutionException;
+
+/**
+ * @Author: yangrui
+ * @Date: 2019/2/21 20:54
+ */
+@ControllerAdvice
+@Slf4j
+public class GlobalDefaultExceptionHandler {
+
+    @ExceptionHandler(value = Exception.class)
+    @ResponseBody
+    public ReturnResult defaultErrorHandler(HttpServletRequest request, Exception e)  {
+        log.warn(request.getRequestURL().append("  request error ").toString(),e);
+        return new ReturnResult(null, "fail", "500", e.getMessage());
+    }
+
+
+    @ExceptionHandler(value = BaseException.class)
+    @ResponseBody
+    public ReturnResult baseExceptionHandler(HttpServletRequest request, BaseException e){
+        log.warn(request.getRequestURL().append("  request error ").toString(),e);
+        return new ReturnResult(null, "fail", e.code, e.getMessage());
+    }
+
+    @ExceptionHandler(value = RejectedExecutionException.class)
+    @ResponseBody
+    public ReturnResult rejectedExecutionExceptionHandler(HttpServletRequest request, BaseException e){
+        log.warn(request.getRequestURL().append(" thread pool full  error ").toString(),e);
+        return new ReturnResult(null, "fail", "500", "服务器繁忙,请稍后再试");
+    }
+
+}

+ 57 - 0
src/main/java/com/lightinit/hsdatagateway/common/mapper/BeanMapper.java

@@ -0,0 +1,57 @@
+/**
+ * Copyright (c) 2005-2012 springside.org.cn
+ */
+package com.lightinit.hsdatagateway.common.mapper;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.dozer.DozerBeanMapper;
+
+import com.google.common.collect.Lists;
+
+/**
+ * 简单封装Dozer, 实现深度转换Bean<->Bean的Mapper.实现:
+ *  
+ * 1. 持有Mapper的单例. 
+ * 2. 返回值类型转换.
+ * 3. 批量转换Collection中的所有对象.
+ * 4. 区分创建新的B对象与将对象A值复制到已存在的B对象两种函数.
+ * 
+ * @Author yangrui
+ * @version 2013-01-15
+ */
+public class BeanMapper {
+
+	/**
+	 * 持有Dozer单例, 避免重复创建DozerMapper消耗资源.
+	 */
+	private static DozerBeanMapper dozer = new DozerBeanMapper();
+
+	/**
+	 * 基于Dozer转换对象的类型.
+	 */
+	public static <T> T map(Object source, Class<T> destinationClass) {
+		return dozer.map(source, destinationClass);
+	}
+
+	/**
+	 * 基于Dozer转换Collection中对象的类型.
+	 */
+	@SuppressWarnings("rawtypes")
+	public static <T> List<T> mapList(Collection sourceList, Class<T> destinationClass) {
+		List<T> destinationList = Lists.newArrayList();
+		for (Object sourceObject : sourceList) {
+			T destinationObject = dozer.map(sourceObject, destinationClass);
+			destinationList.add(destinationObject);
+		}
+		return destinationList;
+	}
+
+	/**
+	 * 基于Dozer将对象A的值拷贝到对象B中.
+	 */
+	public static void copy(Object source, Object destinationObject) {
+		dozer.map(source, destinationObject);
+	}
+}

+ 169 - 0
src/main/java/com/lightinit/hsdatagateway/common/mapper/JaxbMapper.java

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

+ 261 - 0
src/main/java/com/lightinit/hsdatagateway/common/mapper/JsonMapper.java

@@ -0,0 +1,261 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.mapper;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+import java.util.TimeZone;
+
+import org.apache.commons.lang3.StringEscapeUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.core.JsonGenerator;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.JsonParser.Feature;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.JavaType;
+import com.fasterxml.jackson.databind.JsonSerializer;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+import com.fasterxml.jackson.databind.SerializerProvider;
+import com.fasterxml.jackson.databind.module.SimpleModule;
+import com.fasterxml.jackson.databind.util.JSONPObject;
+import com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+
+/**
+ * 简单封装Jackson,实现JSON String<->Java Object的Mapper.
+ * 封装不同的输出风格, 使用不同的builder函数创建实例.
+ * @Author yangrui
+ * @version 2013-11-15
+ */
+public class JsonMapper extends ObjectMapper {
+
+	private static final long serialVersionUID = 1L;
+
+	private static Logger logger = LoggerFactory.getLogger(JsonMapper.class);
+
+	private static JsonMapper mapper;
+
+	public JsonMapper() {
+		this(Include.NON_EMPTY);
+	}
+
+	public JsonMapper(Include include) {
+		// 设置输出时包含属性的风格
+		if (include != null) {
+			this.setSerializationInclusion(include);
+		}
+		// 允许单引号、允许不带引号的字段名称
+		this.enableSimple();
+		// 设置输入时忽略在JSON字符串中存在但Java对象实际没有的属性
+		this.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
+        // 空值处理为空串
+		this.getSerializerProvider().setNullValueSerializer(new JsonSerializer<Object>(){
+			@Override
+			public void serialize(Object value, JsonGenerator jgen,
+					SerializerProvider provider) throws IOException,
+					JsonProcessingException {
+				jgen.writeString("");
+			}
+        });
+		// 进行HTML解码。
+		this.registerModule(new SimpleModule().addSerializer(String.class, new JsonSerializer<String>(){
+			@Override
+			public void serialize(String value, JsonGenerator jgen,
+					SerializerProvider provider) throws IOException,
+					JsonProcessingException {
+				jgen.writeString(StringEscapeUtils.unescapeHtml4(value));
+			}
+        }));
+		// 设置时区
+		this.setTimeZone(TimeZone.getDefault());//getTimeZone("GMT+8:00")
+	}
+
+	/**
+	 * 创建只输出非Null且非Empty(如List.isEmpty)的属性到Json字符串的Mapper,建议在外部接口中使用.
+	 */
+	public static JsonMapper getInstance() {
+		if (mapper == null){
+			mapper = new JsonMapper().enableSimple();
+		}
+		return mapper;
+	}
+
+	/**
+	 * 创建只输出初始值被改变的属性到Json字符串的Mapper, 最节约的存储方式,建议在内部接口中使用。
+	 */
+	public static JsonMapper nonDefaultMapper() {
+		if (mapper == null){
+			mapper = new JsonMapper(Include.NON_DEFAULT);
+		}
+		return mapper;
+	}
+	
+	/**
+	 * Object可以是POJO,也可以是Collection或数组。
+	 * 如果对象为Null, 返回"null".
+	 * 如果集合为空集合, 返回"[]".
+	 */
+	public String toJson(Object object) {
+		try {
+			return this.writeValueAsString(object);
+		} catch (IOException e) {
+			logger.warn("write to json string error:" + object, e);
+			return null;
+		}
+	}
+
+	/**
+	 * 反序列化POJO或简单Collection如List<String>.
+	 * 
+	 * 如果JSON字符串为Null或"null"字符串, 返回Null.
+	 * 如果JSON字符串为"[]", 返回空集合.
+	 * 
+	 * 如需反序列化复杂Collection如List<MyBean>, 请使用fromJson(String,JavaType)
+	 * @see #fromJson(String, JavaType)
+	 */
+	public <T> T fromJson(String jsonString, Class<T> clazz) {
+		if (StringUtils.isEmpty(jsonString)) {
+			return null;
+		}
+		try {
+			return this.readValue(jsonString, clazz);
+		} catch (IOException e) {
+			logger.warn("parse json string error:" + jsonString, e);
+			return null;
+		}
+	}
+
+	/**
+	 * 反序列化复杂Collection如List<Bean>, 先使用函數createCollectionType构造类型,然后调用本函数.
+	 * @see #createCollectionType(Class, Class...)
+	 */
+	@SuppressWarnings("unchecked")
+	public <T> T fromJson(String jsonString, JavaType javaType) {
+		if (StringUtils.isEmpty(jsonString)) {
+			return null;
+		}
+		try {
+			return (T) this.readValue(jsonString, javaType);
+		} catch (IOException e) {
+			logger.warn("parse json string error:" + jsonString, e);
+			return null;
+		}
+	}
+
+	/**
+	 * 構造泛型的Collection Type如:
+	 * ArrayList<MyBean>, 则调用constructCollectionType(ArrayList.class,MyBean.class)
+	 * HashMap<String,MyBean>, 则调用(HashMap.class,String.class, MyBean.class)
+	 */
+	public JavaType createCollectionType(Class<?> collectionClass, Class<?>... elementClasses) {
+		return this.getTypeFactory().constructParametricType(collectionClass, elementClasses);
+	}
+
+	/**
+	 * 當JSON裡只含有Bean的部分屬性時,更新一個已存在Bean,只覆蓋該部分的屬性.
+	 */
+	@SuppressWarnings("unchecked")
+	public <T> T update(String jsonString, T object) {
+		try {
+			return (T) this.readerForUpdating(object).readValue(jsonString);
+		} catch (JsonProcessingException e) {
+			logger.warn("update json string:" + jsonString + " to object:" + object + " error.", e);
+		} catch (IOException e) {
+			logger.warn("update json string:" + jsonString + " to object:" + object + " error.", e);
+		}
+		return null;
+	}
+
+	/**
+	 * 輸出JSONP格式數據.
+	 */
+	public String toJsonP(String functionName, Object object) {
+		return toJson(new JSONPObject(functionName, object));
+	}
+
+	/**
+	 * 設定是否使用Enum的toString函數來讀寫Enum,
+	 * 為False時時使用Enum的name()函數來讀寫Enum, 默認為False.
+	 * 注意本函數一定要在Mapper創建後, 所有的讀寫動作之前調用.
+	 */
+	public JsonMapper enableEnumUseToString() {
+		this.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING);
+		this.enable(DeserializationFeature.READ_ENUMS_USING_TO_STRING);
+		return this;
+	}
+
+	/**
+	 * 支持使用Jaxb的Annotation,使得POJO上的annotation不用与Jackson耦合。
+	 * 默认会先查找jaxb的annotation,如果找不到再找jackson的。
+	 */
+	public JsonMapper enableJaxbAnnotation() {
+		JaxbAnnotationModule module = new JaxbAnnotationModule();
+		this.registerModule(module);
+		return this;
+	}
+
+	/**
+	 * 允许单引号
+	 * 允许不带引号的字段名称
+	 */
+	public JsonMapper enableSimple() {
+		this.configure(Feature.ALLOW_SINGLE_QUOTES, true);
+		this.configure(Feature.ALLOW_UNQUOTED_FIELD_NAMES, true);
+		return this;
+	}
+	
+	/**
+	 * 取出Mapper做进一步的设置或使用其他序列化API.
+	 */
+	public ObjectMapper getMapper() {
+		return this;
+	}
+
+	/**
+	 * 对象转换为JSON字符串
+	 * @param object
+	 * @return
+	 */
+	public static String toJsonString(Object object){
+		return JsonMapper.getInstance().toJson(object);
+	}
+	
+	/**
+	 * JSON字符串转换为对象
+	 * @param jsonString
+	 * @param clazz
+	 * @return
+	 */
+	public static Object fromJsonString(String jsonString, Class<?> clazz){
+		return JsonMapper.getInstance().fromJson(jsonString, clazz);
+	}
+	
+	/**
+	 * 测试
+	 */
+	public static void main(String[] args) {
+		List<Map<String, Object>> list = Lists.newArrayList();
+		Map<String, Object> map = Maps.newHashMap();
+		map.put("id", 1);
+		map.put("pId", -1);
+		map.put("name", "根节点");
+		list.add(map);
+		map = Maps.newHashMap();
+		map.put("id", 2);
+		map.put("pId", 1);
+		map.put("name", "你好");
+		map.put("open", true);
+		list.add(map);
+		String json = JsonMapper.getInstance().toJson(list);
+		System.out.println(json);
+	}
+	
+}

+ 30 - 0
src/main/java/com/lightinit/hsdatagateway/common/mapper/adapters/MapAdapter.java

@@ -0,0 +1,30 @@
+package com.lightinit.hsdatagateway.common.mapper.adapters;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+public class MapAdapter extends XmlAdapter<MapConvertor, Map<String, Object>> {  
+	  
+    @Override  
+    public MapConvertor marshal(Map<String, Object> map) throws Exception {  
+        MapConvertor convertor = new MapConvertor();  
+        for (Map.Entry<String, Object> entry : map.entrySet()) {  
+            MapConvertor.MapEntry e = new MapConvertor.MapEntry(entry);  
+            convertor.addEntry(e);  
+        }  
+        return convertor;  
+    }  
+  
+    @Override  
+    public Map<String, Object> unmarshal(MapConvertor map) throws Exception {  
+        Map<String, Object> result = new HashMap<String, Object>();  
+        for (MapConvertor.MapEntry e : map.getEntries()) {  
+            result.put(e.getKey(), e.getValue());  
+        }  
+        return result;  
+    }
+    
+}  
+

+ 63 - 0
src/main/java/com/lightinit/hsdatagateway/common/mapper/adapters/MapConvertor.java

@@ -0,0 +1,63 @@
+package com.lightinit.hsdatagateway.common.mapper.adapters;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlType(name = "MapConvertor")  
+@XmlAccessorType(XmlAccessType.FIELD)  
+public class MapConvertor {
+	
+    private List<MapEntry> entries = new ArrayList<MapEntry>();  
+  
+    public void addEntry(MapEntry entry) {  
+        entries.add(entry);  
+    }  
+  
+    public List<MapEntry> getEntries() {  
+        return entries;  
+    }  
+      
+    public static class MapEntry {  
+  
+        private String key;  
+  
+        private Object value;  
+          
+        public MapEntry() {  
+            super();  
+        }  
+  
+        public MapEntry(Map.Entry<String, Object> entry) {  
+            super();  
+            this.key = entry.getKey();  
+            this.value = entry.getValue();  
+        }  
+  
+        public MapEntry(String key, Object value) {  
+            super();  
+            this.key = key;  
+            this.value = value;  
+        }  
+  
+        public String getKey() {  
+            return key;  
+        }  
+  
+        public void setKey(String key) {  
+            this.key = key;  
+        }  
+  
+        public Object getValue() {  
+            return value;  
+        }  
+  
+        public void setValue(Object value) {  
+            this.value = value;  
+        }  
+    }  
+}  

+ 37 - 0
src/main/java/com/lightinit/hsdatagateway/common/network/IpUtils.java

@@ -0,0 +1,37 @@
+package com.lightinit.hsdatagateway.common.network;
+
+import com.lightinit.hsdatagateway.common.utils.StringUtils;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * @ClassName: BlackWhiteInterceptor
+ * @Description: IP工具类
+ * @Author: yangrui
+ * @Date 2019/3/6 下午16:34
+ * @Version V1.0
+ **/
+public class IpUtils {
+
+	public static String getIp(HttpServletRequest request) {
+		String ip = request.getHeader("X-Forwarded-For");
+
+		if(StringUtils.isNotEmpty(ip) && !"unKnown".equalsIgnoreCase(ip)){
+			// 多次反向代理后会有多个ip值,第一个ip才是真实ip
+			int index = ip.indexOf(",");
+			if(index != -1){
+				return ip.substring(0,index);
+			} else {
+				return ip;
+			}
+		}
+
+		ip = request.getHeader("X-Real-IP");
+		if(StringUtils.isNotEmpty(ip) && !"unKnown".equalsIgnoreCase(ip)){
+			return ip;
+		}
+
+		return request.getRemoteAddr();
+	}
+
+}

+ 58 - 0
src/main/java/com/lightinit/hsdatagateway/common/persistence/ActEntity.java

@@ -0,0 +1,58 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.persistence;
+
+import java.io.Serializable;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.lightinit.hsdatagateway.modules.act.entity.Act;
+import com.lightinit.hsdatagateway.modules.act.entity.Act;
+
+/**
+ * Activiti Entity类
+ * @Author yangrui
+ * @version 2013-05-28
+ */
+public abstract class ActEntity<T> extends DataEntity<T> implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	protected Act act; 		// 流程任务对象
+
+	public ActEntity() {
+		super();
+	}
+	
+	public ActEntity(Long id) {
+		super(id);
+	}
+	
+	@JsonIgnore
+	public Act getAct() {
+		if (act == null){
+			act = new Act();
+		}
+		return act;
+	}
+
+	public void setAct(Act act) {
+		this.act = act;
+	}
+
+	/**
+	 * 获取流程实例ID
+	 * @return
+	 */
+	public String getProcInsId() {
+		return this.getAct().getProcInsId();
+	}
+
+	/**
+	 * 设置流程实例ID
+	 * @param procInsId
+	 */
+	public void setProcInsId(String procInsId) {
+		this.getAct().setProcInsId(procInsId);
+	}
+}

+ 13 - 0
src/main/java/com/lightinit/hsdatagateway/common/persistence/BaseDao.java

@@ -0,0 +1,13 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.persistence;
+
+/**
+ * DAO支持类实现
+ * @Author yangrui
+ * @version 2014-05-16
+ */
+public interface BaseDao {
+
+}

+ 189 - 0
src/main/java/com/lightinit/hsdatagateway/common/persistence/BaseEntity.java

@@ -0,0 +1,189 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.persistence;
+
+import java.io.Serializable;
+import java.util.Map;
+
+import javax.xml.bind.annotation.XmlTransient;
+
+import com.lightinit.hsdatagateway.modules.sys.entity.User;
+import com.lightinit.hsdatagateway.modules.sys.utils.UserUtils;
+import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.google.common.collect.Maps;
+import com.lightinit.hsdatagateway.common.config.Global;
+import com.lightinit.hsdatagateway.common.supcan.annotation.treelist.SupTreeList;
+import com.lightinit.hsdatagateway.common.supcan.annotation.treelist.cols.SupCol;
+import com.lightinit.hsdatagateway.common.utils.StringUtils;
+import com.lightinit.hsdatagateway.modules.sys.entity.User;
+import com.lightinit.hsdatagateway.modules.sys.utils.UserUtils;
+
+/**
+ * Entity支持类
+ * @Author yangrui
+ * @version 2014-05-16
+ */
+@SupTreeList
+public abstract class BaseEntity<T> implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 实体编号(唯一标识)
+	 */
+	protected Long id;
+	
+	/**
+	 * 当前用户
+	 */
+	protected User currentUser;
+	
+	/**
+	 * 当前实体分页对象
+	 */
+	protected Page<T> page;
+	
+	/**
+	 * 自定义SQL(SQL标识,SQL内容)
+	 */
+	protected Map<String, String> sqlMap;
+	
+	/**
+	 * 是否是新记录(默认:false),调用setIsNewRecord()设置新记录,使用自定义ID。
+	 * 设置为true后强制执行插入语句,ID不会自动生成,需从手动传入。
+	 */
+	@JsonIgnore
+	protected boolean isNewRecord = false;
+
+	public BaseEntity() {
+		
+	}
+	
+	public BaseEntity(Long id) {
+		this();
+		this.id = id;
+	}
+
+	@SupCol(isUnique="true", isHide="true")
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+	
+	@JsonIgnore
+	@XmlTransient
+	public User getCurrentUser() {
+		if(currentUser == null){
+			currentUser = UserUtils.getUser();
+		}
+		return currentUser;
+	}
+	
+	public void setCurrentUser(User currentUser) {
+		this.currentUser = currentUser;
+	}
+
+	@JsonIgnore
+	@XmlTransient
+	public Page<T> getPage() {
+		if (page == null){
+			page = new Page<T>();
+		}
+		return page;
+	}
+	
+	public Page<T> setPage(Page<T> page) {
+		this.page = page;
+		return page;
+	}
+
+	@JsonIgnore
+	@XmlTransient
+	public Map<String, String> getSqlMap() {
+		if (sqlMap == null){
+			sqlMap = Maps.newHashMap();
+		}
+		return sqlMap;
+	}
+
+	public void setSqlMap(Map<String, String> sqlMap) {
+		this.sqlMap = sqlMap;
+	}
+	
+	/**
+	 * 插入之前执行方法,子类实现
+	 */
+	public abstract void preInsert();
+	
+	/**
+	 * 更新之前执行方法,子类实现
+	 */
+	public abstract void preUpdate();
+	
+    /**
+	 * 是否是新记录(默认:false),调用setIsNewRecord()设置新记录,使用自定义ID。
+	 * 设置为true后强制执行插入语句,ID不会自动生成,需从手动传入。
+     * @return
+     */
+	public boolean getIsNewRecord() {
+        return isNewRecord || getId() == null;
+    }
+
+	/**
+	 * 是否是新记录(默认:false),调用setIsNewRecord()设置新记录,使用自定义ID。
+	 * 设置为true后强制执行插入语句,ID不会自动生成,需从手动传入。
+	 */
+	public void setIsNewRecord(boolean isNewRecord) {
+		this.isNewRecord = isNewRecord;
+	}
+
+	/**
+	 * 全局变量对象
+	 */
+	@JsonIgnore
+	public Global getGlobal() {
+		return Global.getInstance();
+	}
+	
+	/**
+	 * 获取数据库名称
+	 */
+	@JsonIgnore
+	public String getDbName(){
+		return Global.getConfig("jdbc.type");
+	}
+	
+    @Override
+    public boolean equals(Object obj) {
+        if (null == obj) {
+            return false;
+        }
+        if (this == obj) {
+            return true;
+        }
+        if (!getClass().equals(obj.getClass())) {
+            return false;
+        }
+        BaseEntity<?> that = (BaseEntity<?>) obj;
+        return null == this.getId() ? false : this.getId().equals(that.getId());
+    }
+    
+    @Override
+    public String toString() {
+        return ReflectionToStringBuilder.toString(this);
+    }
+    
+	/**
+	 * 删除标记(0:正常;1:删除;2:审核;)
+	 */
+	public static final String DEL_FLAG_NORMAL = "0";
+	public static final String DEL_FLAG_DELETE = "1";
+	public static final String DEL_FLAG_AUDIT = "2";
+	
+}

+ 100 - 0
src/main/java/com/lightinit/hsdatagateway/common/persistence/BaseVo.java

@@ -0,0 +1,100 @@
+package com.lightinit.hsdatagateway.common.persistence;
+
+import com.lightinit.hsdatagateway.common.supcan.annotation.treelist.SupTreeList;
+import com.lightinit.hsdatagateway.common.supcan.annotation.treelist.cols.SupCol;
+import com.lightinit.hsdatagateway.modules.sys.entity.User;
+import com.lightinit.hsdatagateway.modules.sys.utils.UserUtils;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import com.google.common.collect.Maps;
+import com.lightinit.hsdatagateway.modules.sys.entity.User;
+import com.lightinit.hsdatagateway.modules.sys.utils.UserUtils;
+
+import javax.xml.bind.annotation.XmlTransient;
+import java.io.Serializable;
+import java.util.Map;
+
+/**
+* Created by yangrui on2017/5/31.
+ */
+@SupTreeList
+public abstract class BaseVo<T> implements Serializable {
+    private static final long serialVersionUID = 1L;
+
+    protected Long id;
+
+    /**
+     * 当前实体分页对象
+     */
+    protected Page<T> page;
+
+    /**
+     * 当前用户
+     */
+    protected User currentUser;
+
+    /**
+     * 自定义SQL(SQL标识,SQL内容)
+     */
+    protected Map<String, String> sqlMap;
+
+        public BaseVo(){
+
+    }
+
+    public BaseVo(Long id){
+        this();
+        this.id = id;
+    }
+
+    @JsonSerialize(using= ToStringSerializer.class)
+    @SupCol(isUnique="true", isHide="true")
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    @JsonIgnore
+    @XmlTransient
+    public User getCurrentUser() {
+        if(currentUser == null){
+            currentUser = UserUtils.getUser();
+        }
+        return currentUser;
+    }
+
+    public void setCurrentUser(User currentUser) {
+        this.currentUser = currentUser;
+    }
+
+    @JsonIgnore
+    @XmlTransient
+    public Page<T> getPage() {
+        if (page == null){
+            page = new Page<T>();
+        }
+        return page;
+    }
+
+    public Page<T> setPage(Page<T> page) {
+        this.page = page;
+        return page;
+    }
+
+    @JsonIgnore
+    @XmlTransient
+    public Map<String, String> getSqlMap() {
+        if (sqlMap == null){
+            sqlMap = Maps.newHashMap();
+        }
+        return sqlMap;
+    }
+
+    public void setSqlMap(Map<String, String> sqlMap) {
+        this.sqlMap = sqlMap;
+    }
+}

+ 93 - 0
src/main/java/com/lightinit/hsdatagateway/common/persistence/BeyoDao.java

@@ -0,0 +1,93 @@
+/**
+ * Copyright &copy; 2017 beyo.com.cn All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.persistence;
+
+import java.util.List;
+
+/**
+ * DAO支持类实现
+ * @Author: yangrui
+ * @version 2014-05-16
+ * @param <T>
+ */
+public interface BeyoDao<T> {
+
+	/**
+	 * 获取单条数据
+	 * @param id
+	 * @return
+	 */
+	public T get(Long id);
+	
+	/**
+	 * 获取单条数据
+	 * @param entity
+	 * @return
+	 */
+	public T get(T entity);
+	
+	/**
+	 * 查询数据列表,如果需要分页,请设置分页对象,如:entity.setPage(new Page<T>());
+	 * @param entity
+	 * @return
+	 */
+	public List<T> findList(T entity);
+	
+	/**
+	 * 查询所有数据列表
+	 * @param entity
+	 * @return
+	 */
+	public List<T> findAllList(T entity);
+	
+	/**
+	 * 查询所有数据列表
+	 * @see public List<T> findAllList(T entity)
+	 * @return
+	 */
+	@Deprecated
+	public List<T> findAllList();
+	
+	/**
+	 * 插入数据
+	 * @param entity
+	 * @return
+	 */
+	public Long insert(T entity);
+	
+	/**
+	 * 更新数据
+	 * @param entity
+	 * @return
+	 */
+	public Long update(T entity);
+	
+	/**
+	 * 删除数据(一般为逻辑删除,更新del_flag字段为1)
+	 * @param id
+	 * @see public int delete(T entity)
+	 * @return
+	 */
+	@Deprecated
+	public int delete(Long id);
+	
+	/**
+	 * 删除数据(一般为逻辑删除,更新del_flag字段为1)
+	 * @param entity
+	 * @return
+	 */
+	public int delete(T entity);
+	/**
+	 * 开票申请的发票金额
+	 * @param ids
+	 * @return
+	 */
+    long getFaPiaoCount(Long[] ids);
+	/**
+	 * 交费信息显示
+	 * @param ids
+	 * @return
+	 */
+	List getJiaoFeiCount(Long[] ids);
+}

+ 89 - 0
src/main/java/com/lightinit/hsdatagateway/common/persistence/CrudDao.java

@@ -0,0 +1,89 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.persistence;
+
+import java.util.List;
+
+/**
+ * DAO支持类实现
+ * @Author yangrui
+ * @version 2014-05-16
+ * @param <T>
+ */
+public interface CrudDao<T> extends BaseDao {
+
+	/**
+	 * 获取单条数据
+	 * @param id
+	 * @return
+	 */
+	T get(Long id);
+	
+	/**
+	 * 获取单条数据
+	 * @param entity
+	 * @return
+	 */
+	T get(T entity);
+	
+	/**
+	 * 查询数据列表,如果需要分页,请设置分页对象,如:entity.setPage(new Page<T>());
+	 * @param entity
+	 * @return
+	 */
+	List<T> findList(T entity);
+	
+	/**
+	 * 查询所有数据列表
+	 * @param entity
+	 * @return
+	 */
+	List<T> findAllList(T entity);
+	
+	/**
+	 * 查询所有数据列表
+	 * @see public List<T> findAllList(T entity)
+	 * @return
+	 */
+	@Deprecated
+	List<T> findAllList();
+	
+	/**
+	 * 插入数据
+	 * @param entity
+	 * @return
+	 */
+	int insert(T entity);
+	
+	/**
+	 * 更新数据
+	 * @param entity
+	 * @return
+	 */
+	int update(T entity);
+	
+	/**
+	 * 删除数据(一般为逻辑删除,更新del_flag字段为1)
+	 * @param id
+	 * @see public int delete(T entity)
+	 * @return
+	 */
+	@Deprecated
+	int delete(Long id);
+	
+	/**
+	 * 删除数据(一般为逻辑删除,更新del_flag字段为1)
+	 * @param entity
+	 * @return
+	 */
+	int delete(T entity);
+
+	/**
+	 * 判断数据是否重复
+	 * @param entity
+	 * @return
+	 */
+	T selectAuthByCondition(T entity);
+	
+}

+ 135 - 0
src/main/java/com/lightinit/hsdatagateway/common/persistence/DataEntity.java

@@ -0,0 +1,135 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.persistence;
+
+import java.util.Date;
+
+import com.lightinit.hsdatagateway.common.utils.IdWorker;
+import com.lightinit.hsdatagateway.modules.sys.entity.User;
+import com.lightinit.hsdatagateway.modules.sys.utils.UserUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.hibernate.validator.constraints.Length;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.lightinit.hsdatagateway.common.utils.IdGen;
+import com.lightinit.hsdatagateway.modules.sys.entity.User;
+import com.lightinit.hsdatagateway.modules.sys.utils.UserUtils;
+
+/**
+ * 数据Entity类
+ * @Author yangrui
+ * @version 2014-05-16
+ */
+public abstract class DataEntity<T> extends BaseEntity<T> {
+
+	private static final long serialVersionUID = 1L;
+	
+	protected String remarks;	// 备注
+	protected User createBy;	// 创建者
+	protected Date createDate;	// 创建日期
+	protected User updateBy;	// 更新者
+	protected Date updateDate;	// 更新日期
+	protected String delFlag; 	// 删除标记(0:正常;1:删除;2:审核)
+	protected Long platformId;
+	
+	public DataEntity() {
+		super();
+		this.delFlag = DEL_FLAG_NORMAL;
+	}
+	
+	public DataEntity(Long id) {
+		super(id);
+	}
+	
+	/**
+	 * 插入之前执行方法,需要手动调用
+	 */
+	@Override
+	public void preInsert(){
+		// 不限制ID为UUID,调用setIsNewRecord()使用自定义ID
+		if (!this.isNewRecord){
+			try {
+				setId(IdWorker.getId());
+			} catch (Exception e) {
+				e.printStackTrace();
+			}
+		}
+		User user = UserUtils.getUser();
+		if (user.getId() != null){
+			this.updateBy = user;
+			this.createBy = user;
+		}
+		this.updateDate = new Date();
+		this.createDate = this.updateDate;
+	}
+	
+	/**
+	 * 更新之前执行方法,需要手动调用
+	 */
+	@Override
+	public void preUpdate(){
+		User user = UserUtils.getUser();
+		if (user.getId() != null){
+			this.updateBy = user;
+		}
+		this.updateDate = new Date();
+	}
+	
+	@Length(min=0, max=255)
+	public String getRemarks() {
+		return remarks;
+	}
+
+	public void setRemarks(String remarks) {
+		this.remarks = remarks;
+	}
+	
+	@JsonIgnore
+	public User getCreateBy() {
+		return createBy;
+	}
+
+	public void setCreateBy(User createBy) {
+		this.createBy = createBy;
+	}
+
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	public Date getCreateDate() {
+		return createDate;
+	}
+
+	public void setCreateDate(Date createDate) {
+		this.createDate = createDate;
+	}
+
+	@JsonIgnore
+	public User getUpdateBy() {
+		return updateBy;
+	}
+
+	public void setUpdateBy(User updateBy) {
+		this.updateBy = updateBy;
+	}
+
+	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+	public Date getUpdateDate() {
+		return updateDate;
+	}
+
+	public void setUpdateDate(Date updateDate) {
+		this.updateDate = updateDate;
+	}
+
+	@JsonIgnore
+	@Length(min=1, max=1)
+	public String getDelFlag() {
+		return delFlag;
+	}
+
+	public void setDelFlag(String delFlag) {
+		this.delFlag = delFlag;
+	}
+
+}

+ 80 - 0
src/main/java/com/lightinit/hsdatagateway/common/persistence/DataVo.java

@@ -0,0 +1,80 @@
+package com.lightinit.hsdatagateway.common.persistence;
+
+import com.lightinit.hsdatagateway.common.utils.IdWorker;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+import java.util.Date;
+
+/**
+* Created by yangrui on2017/5/31.
+ */
+public abstract class DataVo<T> extends BaseVo<T> {
+
+    /**
+     * 创建者
+     */
+    protected Long createUser;
+
+    /**
+     * 创建日期
+     */
+    protected Date createTime;
+
+    /**
+     * 更新日期
+     */
+    protected Date updateTime;
+
+    /**
+     * 状态
+     */
+    protected Integer status;
+
+    public DataVo(){
+
+    }
+    public DataVo(Long id){
+        super();
+        this.id = id;
+    }
+
+    public void nextId() throws Exception{
+        this.id = IdWorker.getFlowIdWorkerInstance().nextId();
+    }
+
+
+    @JsonIgnore
+    public Long getCreateUser() {
+        return createUser;
+    }
+
+    public void setCreateUser(Long createUser) {
+        this.createUser = createUser;
+    }
+
+    @JsonIgnore
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    @JsonIgnore
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+}

+ 93 - 0
src/main/java/com/lightinit/hsdatagateway/common/persistence/GatewayDao.java

@@ -0,0 +1,93 @@
+/**
+ * Copyright &copy; 2017 beyo.com.cn All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.persistence;
+
+import java.util.List;
+
+/**
+ * DAO支持类实现
+ * @Author: yangrui
+ * @version 2014-05-16
+ * @param <T>
+ */
+public interface GatewayDao<T> {
+
+	/**
+	 * 获取单条数据
+	 * @param id
+	 * @return
+	 */
+	public T get(Long id);
+	
+	/**
+	 * 获取单条数据
+	 * @param entity
+	 * @return
+	 */
+	public T get(T entity);
+	
+	/**
+	 * 查询数据列表,如果需要分页,请设置分页对象,如:entity.setPage(new Page<T>());
+	 * @param entity
+	 * @return
+	 */
+	public List<T> findList(T entity);
+	
+	/**
+	 * 查询所有数据列表
+	 * @param entity
+	 * @return
+	 */
+	public List<T> findAllList(T entity);
+	
+	/**
+	 * 查询所有数据列表
+	 * @see public List<T> findAllList(T entity)
+	 * @return
+	 */
+	@Deprecated
+	public List<T> findAllList();
+	
+	/**
+	 * 插入数据
+	 * @param entity
+	 * @return
+	 */
+	public Long insert(T entity);
+	
+	/**
+	 * 更新数据
+	 * @param entity
+	 * @return
+	 */
+	public Long update(T entity);
+	
+	/**
+	 * 删除数据(一般为逻辑删除,更新del_flag字段为1)
+	 * @param id
+	 * @see public int delete(T entity)
+	 * @return
+	 */
+	@Deprecated
+	public int delete(Long id);
+	
+	/**
+	 * 删除数据(一般为逻辑删除,更新del_flag字段为1)
+	 * @param entity
+	 * @return
+	 */
+	public int delete(T entity);
+	/**
+	 * 开票申请的发票金额
+	 * @param ids
+	 * @return
+	 */
+    long getFaPiaoCount(Long[] ids);
+	/**
+	 * 交费信息显示
+	 * @param ids
+	 * @return
+	 */
+	List getJiaoFeiCount(Long[] ids);
+}

+ 212 - 0
src/main/java/com/lightinit/hsdatagateway/common/persistence/MapperLoader.java

@@ -0,0 +1,212 @@
+package com.lightinit.hsdatagateway.common.persistence;
+
+import java.io.IOException;
+import java.lang.reflect.Field;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.ibatis.builder.xml.XMLMapperBuilder;
+import org.apache.ibatis.executor.ErrorContext;
+import org.apache.ibatis.session.Configuration;
+import org.apache.ibatis.session.SqlSessionFactory;
+import org.mybatis.spring.mapper.MapperScannerConfigurer;
+import org.springframework.beans.BeansException;
+import org.springframework.beans.factory.DisposableBean;
+import org.springframework.beans.factory.InitializingBean;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.core.NestedIOException;
+import org.springframework.core.io.Resource;
+import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
+import org.springframework.core.io.support.ResourcePatternResolver;
+import org.springframework.util.ClassUtils;
+import org.springframework.util.StringUtils;
+
+/**
+ * Mybatis的mapper文件中的sql语句被修改后, 只能重启服务器才能被加载, 非常耗时,所以就写了一个自动加载的类,
+ * 配置后检查xml文件更改,如果发生变化,重新加载xml里面的内容.
+ */
+//@Service
+//@Lazy(false)
+public class MapperLoader implements DisposableBean, InitializingBean, ApplicationContextAware {
+
+	private ConfigurableApplicationContext context = null;
+	private transient String basePackage = null;
+	private HashMap<String, String> fileMapping = new HashMap<String, String>();
+	private Scanner scanner = null;
+	private ScheduledExecutorService service = null;
+
+	@Override
+	public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
+		this.context = (ConfigurableApplicationContext) applicationContext;
+
+	}
+
+	@Override
+	public void afterPropertiesSet() throws Exception {
+		try {
+			service = Executors.newScheduledThreadPool(1);
+			
+			// 获取xml所在包
+			MapperScannerConfigurer config = context.getBean(MapperScannerConfigurer.class);
+			Field field = config.getClass().getDeclaredField("basePackage");
+			field.setAccessible(true);
+			basePackage = (String) field.get(config);
+			
+			// 触发文件监听事件
+			scanner = new Scanner();
+			scanner.scan();
+
+			service.scheduleAtFixedRate(new Task(), 5, 5, TimeUnit.SECONDS);
+
+		} catch (Exception e1) {
+			e1.printStackTrace();
+		}
+
+	}
+
+	class Task implements Runnable {
+		@Override
+		public void run() {
+			try {
+				if (scanner.isChanged()) {
+					System.out.println("*Mapper.xml文件改变,重新加载.");
+					scanner.reloadXML();
+					System.out.println("加载完毕.");
+				}
+			} catch (Exception e) {
+				e.printStackTrace();
+			}
+		}
+
+	}
+
+	@SuppressWarnings({ "rawtypes" })
+	class Scanner {
+		
+		private String[] basePackages;
+		private static final String XML_RESOURCE_PATTERN = "**/*.xml";
+		private ResourcePatternResolver resourcePatternResolver = new PathMatchingResourcePatternResolver();
+
+		public Scanner() {
+			basePackages = StringUtils.tokenizeToStringArray(MapperLoader.this.basePackage,
+					ConfigurableApplicationContext.CONFIG_LOCATION_DELIMITERS);
+		}
+
+		public Resource[] getResource(String basePackage, String pattern) throws IOException {
+			String packageSearchPath = ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX
+					+ ClassUtils.convertClassNameToResourcePath(context.getEnvironment().resolveRequiredPlaceholders(
+							basePackage)) + "/" + pattern;
+			Resource[] resources = resourcePatternResolver.getResources(packageSearchPath);
+			return resources;
+		}
+
+		public void reloadXML() throws Exception {
+			SqlSessionFactory factory = context.getBean(SqlSessionFactory.class);
+			Configuration configuration = factory.getConfiguration();
+			// 移除加载项
+			removeConfig(configuration);
+			// 重新扫描加载
+			for (String basePackage : basePackages) {
+				Resource[] resources = getResource(basePackage, XML_RESOURCE_PATTERN);
+				if (resources != null) {
+					for (int i = 0; i < resources.length; i++) {
+						if (resources[i] == null) {
+							continue;
+						}
+						try {
+							XMLMapperBuilder xmlMapperBuilder = new XMLMapperBuilder(resources[i].getInputStream(),
+									configuration, resources[i].toString(), configuration.getSqlFragments());
+							xmlMapperBuilder.parse();
+						} catch (Exception e) {
+							throw new NestedIOException("Failed to parse mapping resource: '" + resources[i] + "'", e);
+						} finally {
+							ErrorContext.instance().reset();
+						}
+					}
+				}
+			}
+
+		}
+
+		private void removeConfig(Configuration configuration) throws Exception {
+			Class<?> classConfig = configuration.getClass();
+			clearMap(classConfig, configuration, "mappedStatements");
+			clearMap(classConfig, configuration, "caches");
+			clearMap(classConfig, configuration, "resultMaps");
+			clearMap(classConfig, configuration, "parameterMaps");
+			clearMap(classConfig, configuration, "keyGenerators");
+			clearMap(classConfig, configuration, "sqlFragments");
+
+			clearSet(classConfig, configuration, "loadedResources");
+
+		}
+
+		private void clearMap(Class<?> classConfig, Configuration configuration, String fieldName) throws Exception {
+			Field field = classConfig.getDeclaredField(fieldName);
+			field.setAccessible(true);
+			Map mapConfig = (Map) field.get(configuration);
+			mapConfig.clear();
+		}
+
+		private void clearSet(Class<?> classConfig, Configuration configuration, String fieldName) throws Exception {
+			Field field = classConfig.getDeclaredField(fieldName);
+			field.setAccessible(true);
+			Set setConfig = (Set) field.get(configuration);
+			setConfig.clear();
+		}
+
+		public void scan() throws IOException {
+			if (!fileMapping.isEmpty()) {
+				return;
+			}
+			for (String basePackage : basePackages) {
+				Resource[] resources = getResource(basePackage, XML_RESOURCE_PATTERN);
+				if (resources != null) {
+					for (int i = 0; i < resources.length; i++) {
+						String multi_key = getValue(resources[i]);
+						fileMapping.put(resources[i].getFilename(), multi_key);
+					}
+				}
+			}
+		}
+
+		private String getValue(Resource resource) throws IOException {
+			String contentLength = String.valueOf((resource.contentLength()));
+			String lastModified = String.valueOf((resource.lastModified()));
+			return new StringBuilder(contentLength).append(lastModified).toString();
+		}
+
+		public boolean isChanged() throws IOException {
+			boolean isChanged = false;
+			for (String basePackage : basePackages) {
+				Resource[] resources = getResource(basePackage, XML_RESOURCE_PATTERN);
+				if (resources != null) {
+					for (int i = 0; i < resources.length; i++) {
+						String name = resources[i].getFilename();
+						String value = fileMapping.get(name);
+						String multi_key = getValue(resources[i]);
+						if (!multi_key.equals(value)) {
+							isChanged = true;
+							fileMapping.put(name, multi_key);
+						}
+					}
+				}
+			}
+			return isChanged;
+		}
+	}
+
+	@Override
+	public void destroy() throws Exception {
+		if (service != null) {
+			service.shutdownNow();
+		}
+	}
+
+}

+ 574 - 0
src/main/java/com/lightinit/hsdatagateway/common/persistence/Page.java

@@ -0,0 +1,574 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.persistence;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Pattern;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.lang3.StringUtils;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.lightinit.hsdatagateway.common.config.Global;
+import com.lightinit.hsdatagateway.common.utils.CookieUtils;
+
+/**
+ * 分页类
+ * @Author yangrui
+ * @version 2013-7-2
+ * @param <T>
+ */
+public class Page<T> {
+	
+	private int pageNo = 1; // 当前页码
+	private int pageSize = Integer.valueOf(Global.getConfig("page.pageSize")); // 页面大小,设置为“-1”表示不进行分页(分页无效)
+	
+	private long count;// 总记录数,设置为“-1”表示不查询总数
+	
+	private int first;// 首页索引
+	private int last;// 尾页索引
+	private int prev;// 上一页索引
+	private int next;// 下一页索引
+	
+	private boolean firstPage;//是否是第一页
+	private boolean lastPage;//是否是最后一页
+
+	private int length = 8;// 显示页面长度
+	private int slider = 1;// 前后显示页面长度
+	
+	private List<T> list = new ArrayList<T>();
+	
+	private String orderBy = ""; // 标准查询有效, 实例: updatedate desc, name asc
+
+	private String funcName = "page"; // 设置点击页码调用的js函数名称,默认为page,在一页有多个分页对象时使用。
+	
+	private String funcParam = ""; // 函数的附加参数,第三个参数值。
+	
+	private String message = ""; // 设置提示消息,显示在“共n条”之后
+
+	public Page() {
+		this.pageSize = -1;
+	}
+	
+	/**
+	 * 构造方法
+	 * @param request 传递 repage 参数,来记住页码
+	 * @param response 用于设置 Cookie,记住页码
+	 */
+	public Page(HttpServletRequest request, HttpServletResponse response){
+		this(request, response, -2);
+	}
+
+	/**
+	 * 构造方法
+	 * @param request 传递 repage 参数,来记住页码
+	 * @param response 用于设置 Cookie,记住页码
+	 * @param defaultPageSize 默认分页大小,如果传递 -1 则为不分页,返回所有数据
+	 */
+	public Page(HttpServletRequest request, HttpServletResponse response, int defaultPageSize){
+		// 设置页码参数(传递repage参数,来记住页码)
+		String no = request.getParameter("pageNo");
+		if (StringUtils.isNumeric(no)){
+			CookieUtils.setCookie(response, "pageNo", no);
+			this.setPageNo(Integer.parseInt(no));
+		}else if (request.getParameter("repage")!=null){
+			no = CookieUtils.getCookie(request, "pageNo");
+			if (StringUtils.isNumeric(no)){
+				this.setPageNo(Integer.parseInt(no));
+			}
+		}
+		// 设置页面大小参数(传递repage参数,来记住页码大小)
+		String size = request.getParameter("pageSize");
+		if (StringUtils.isNumeric(size)){
+			CookieUtils.setCookie(response, "pageSize", size);
+			this.setPageSize(Integer.parseInt(size));
+		}else if (request.getParameter("repage")!=null){
+			size = CookieUtils.getCookie(request, "pageSize");
+			if (StringUtils.isNumeric(size)){
+				this.setPageSize(Integer.parseInt(size));
+			}
+		}else if (defaultPageSize != -2){
+			this.pageSize = defaultPageSize;
+		}
+		// 设置页面分页函数
+        String funcName = request.getParameter("funcName");
+        if (StringUtils.isNotBlank(funcName)){
+            CookieUtils.setCookie(response, "funcName", funcName);
+            this.setFuncName(funcName);
+        }else if (request.getParameter("repage")!=null){
+            funcName = CookieUtils.getCookie(request, "funcName");
+            if (StringUtils.isNotBlank(funcName)){
+                this.setFuncName(funcName);
+            }
+        }
+		// 设置排序参数
+		String orderBy = request.getParameter("orderBy");
+		if (StringUtils.isNotBlank(orderBy)){
+			this.setOrderBy(orderBy);
+		}
+	}
+	
+	/**
+	 * 构造方法
+	 * @param pageNo 当前页码
+	 * @param pageSize 分页大小
+	 */
+	public Page(int pageNo, int pageSize) {
+		this(pageNo, pageSize, 0);
+	}
+	
+	/**
+	 * 构造方法
+	 * @param pageNo 当前页码
+	 * @param pageSize 分页大小
+	 * @param count 数据条数
+	 */
+	public Page(int pageNo, int pageSize, long count) {
+		this(pageNo, pageSize, count, new ArrayList<T>());
+	}
+	
+	/**
+	 * 构造方法
+	 * @param pageNo 当前页码
+	 * @param pageSize 分页大小
+	 * @param count 数据条数
+	 * @param list 本页数据对象列表
+	 */
+	public Page(int pageNo, int pageSize, long count, List<T> list) {
+		this.setCount(count);
+		this.setPageNo(pageNo);
+		this.pageSize = pageSize;
+		this.list = list;
+	}
+	
+	/**
+	 * 初始化参数
+	 */
+	public void initialize(){
+				
+		//1
+		this.first = 1;
+		
+		this.last = (int)(count / (this.pageSize < 1 ? 20 : this.pageSize) + first - 1);
+		
+		if (this.count % this.pageSize != 0 || this.last == 0) {
+			this.last++;
+		}
+
+		if (this.last < this.first) {
+			this.last = this.first;
+		}
+		
+		if (this.pageNo <= 1) {
+			this.pageNo = this.first;
+			this.firstPage=true;
+		}
+
+		if (this.pageNo >= this.last) {
+			this.pageNo = this.last;
+			this.lastPage=true;
+		}
+
+		if (this.pageNo < this.last - 1) {
+			this.next = this.pageNo + 1;
+		} else {
+			this.next = this.last;
+		}
+
+		if (this.pageNo > 1) {
+			this.prev = this.pageNo - 1;
+		} else {
+			this.prev = this.first;
+		}
+		
+		//2
+		if (this.pageNo < this.first) {// 如果当前页小于首页
+			this.pageNo = this.first;
+		}
+
+		if (this.pageNo > this.last) {// 如果当前页大于尾页
+			this.pageNo = this.last;
+		}
+		
+	}
+	
+	/**
+	 * 默认输出当前分页标签 
+	 * <div class="page">${page}</div>
+	 */
+	@Override
+	public String toString() {
+
+		StringBuilder sb = new StringBuilder();
+		
+		if (pageNo == first) {// 如果是首页
+			sb.append("<li class=\"disabled\"><a href=\"javascript:\">&#171; 上一页</a></li>\n");
+		} else {
+			sb.append("<li><a href=\"javascript:\" onclick=\""+funcName+"("+prev+","+pageSize+",'"+funcParam+"');\">&#171; 上一页</a></li>\n");
+		}
+
+		int begin = pageNo - (length / 2);
+
+		if (begin < first) {
+			begin = first;
+		}
+
+		int end = begin + length - 1;
+
+		if (end >= last) {
+			end = last;
+			begin = end - length + 1;
+			if (begin < first) {
+				begin = first;
+			}
+		}
+
+		if (begin > first) {
+			int i = 0;
+			for (i = first; i < first + slider && i < begin; i++) {
+				sb.append("<li><a href=\"javascript:\" onclick=\""+funcName+"("+i+","+pageSize+",'"+funcParam+"');\">"
+						+ (i + 1 - first) + "</a></li>\n");
+			}
+			if (i < begin) {
+				sb.append("<li class=\"disabled\"><a href=\"javascript:\">...</a></li>\n");
+			}
+		}
+
+		for (int i = begin; i <= end; i++) {
+			if (i == pageNo) {
+				sb.append("<li class=\"active\"><a href=\"javascript:\">" + (i + 1 - first)
+						+ "</a></li>\n");
+			} else {
+				sb.append("<li><a href=\"javascript:\" onclick=\""+funcName+"("+i+","+pageSize+",'"+funcParam+"');\">"
+						+ (i + 1 - first) + "</a></li>\n");
+			}
+		}
+
+		if (last - end > slider) {
+			sb.append("<li class=\"disabled\"><a href=\"javascript:\">...</a></li>\n");
+			end = last - slider;
+		}
+
+		for (int i = end + 1; i <= last; i++) {
+			sb.append("<li><a href=\"javascript:\" onclick=\""+funcName+"("+i+","+pageSize+",'"+funcParam+"');\">"
+					+ (i + 1 - first) + "</a></li>\n");
+		}
+
+		if (pageNo == last) {
+			sb.append("<li class=\"disabled\"><a href=\"javascript:\">下一页 &#187;</a></li>\n");
+		} else {
+			sb.append("<li><a href=\"javascript:\" onclick=\""+funcName+"("+next+","+pageSize+",'"+funcParam+"');\">"
+					+ "下一页 &#187;</a></li>\n");
+		}
+
+		sb.append("<li class=\"disabled controls\"><a href=\"javascript:\">当前 ");
+		sb.append("<input type=\"text\" value=\""+pageNo+"\" onkeypress=\"var e=window.event||event;var c=e.keyCode||e.which;if(c==13)");
+		sb.append(funcName+"(this.value,"+pageSize+",'"+funcParam+"');\" onclick=\"this.select();\"/> / ");
+		sb.append("<input type=\"text\" value=\""+pageSize+"\" onkeypress=\"var e=window.event||event;var c=e.keyCode||e.which;if(c==13)");
+		sb.append(funcName+"("+pageNo+",this.value,'"+funcParam+"');\" onclick=\"this.select();\"/> 条,");
+		sb.append("共 " + count + " 条"+(message!=null?message:"")+"</a></li>\n");
+
+		sb.insert(0,"<ul>\n").append("</ul>\n");
+		
+		sb.append("<div style=\"clear:both;\"></div>");
+
+//		sb.insert(0,"<div class=\"page\">\n").append("</div>\n");
+		
+		return sb.toString();
+	}
+	
+	/**
+	 * 获取分页HTML代码
+	 * @return
+	 */
+	public String getHtml(){
+		return toString();
+	}
+	
+//	public static void main(String[] args) {
+//		Page<String> p = new Page<String>(3, 3);
+//		System.out.println(p);
+//		System.out.println("首页:"+p.getFirst());
+//		System.out.println("尾页:"+p.getLast());
+//		System.out.println("上页:"+p.getPrev());
+//		System.out.println("下页:"+p.getNext());
+//	}
+
+	/**
+	 * 获取设置总数
+	 * @return
+	 */
+	public long getCount() {
+		return count;
+	}
+
+	/**
+	 * 设置数据总数
+	 * @param count
+	 */
+	public void setCount(long count) {
+		this.count = count;
+		if (pageSize >= count){
+			pageNo = 1;
+		}
+	}
+	
+	/**
+	 * 获取当前页码
+	 * @return
+	 */
+	public int getPageNo() {
+		return pageNo;
+	}
+	
+	/**
+	 * 设置当前页码
+	 * @param pageNo
+	 */
+	public void setPageNo(int pageNo) {
+		this.pageNo = pageNo;
+	}
+	
+	/**
+	 * 获取页面大小
+	 * @return
+	 */
+	public int getPageSize() {
+		return pageSize;
+	}
+
+	/**
+	 * 设置页面大小(最大500)
+	 * @param pageSize
+	 */
+	public void setPageSize(int pageSize) {
+		this.pageSize = pageSize <= 0 ? 10 : pageSize;// > 500 ? 500 : pageSize;
+	}
+
+	/**
+	 * 首页索引
+	 * @return
+	 */
+	@JsonIgnore
+	public int getFirst() {
+		return first;
+	}
+
+	/**
+	 * 尾页索引
+	 * @return
+	 */
+	@JsonIgnore
+	public int getLast() {
+		return last;
+	}
+	
+	/**
+	 * 获取页面总数
+	 * @return getLast();
+	 */
+	@JsonIgnore
+	public int getTotalPage() {
+		return getLast();
+	}
+
+	/**
+	 * 是否为第一页
+	 * @return
+	 */
+	@JsonIgnore
+	public boolean isFirstPage() {
+		return firstPage;
+	}
+
+	/**
+	 * 是否为最后一页
+	 * @return
+	 */
+	@JsonIgnore
+	public boolean isLastPage() {
+		return lastPage;
+	}
+	
+	/**
+	 * 上一页索引值
+	 * @return
+	 */
+	@JsonIgnore
+	public int getPrev() {
+		if (isFirstPage()) {
+			return pageNo;
+		} else {
+			return pageNo - 1;
+		}
+	}
+
+	/**
+	 * 下一页索引值
+	 * @return
+	 */
+	@JsonIgnore
+	public int getNext() {
+		if (isLastPage()) {
+			return pageNo;
+		} else {
+			return pageNo + 1;
+		}
+	}
+	
+	/**
+	 * 获取本页数据对象列表
+	 * @return List<T>
+	 */
+	public List<T> getList() {
+		return list;
+	}
+
+	/**
+	 * 设置本页数据对象列表
+	 * @param list
+	 */
+	public Page<T> setList(List<T> list) {
+		this.list = list;
+		initialize();
+		return this;
+	}
+
+	/**
+	 * 获取查询排序字符串
+	 * @return
+	 */
+	@JsonIgnore
+	public String getOrderBy() {
+		// SQL过滤,防止注入 
+		String reg = "(?:')|(?:--)|(/\\*(?:.|[\\n\\r])*?\\*/)|"
+					+ "(\\b(select|update|and|or|delete|insert|trancate|char|into|substr|ascii|declare|exec|count|master|into|drop|execute)\\b)";
+		Pattern sqlPattern = Pattern.compile(reg, Pattern.CASE_INSENSITIVE);
+		if (sqlPattern.matcher(orderBy).find()) {
+			return "";
+		}
+		return orderBy;
+	}
+
+	/**
+	 * 设置查询排序,标准查询有效, 实例: updatedate desc, name asc
+	 */
+	public void setOrderBy(String orderBy) {
+		this.orderBy = orderBy;
+	}
+
+	/**
+	 * 获取点击页码调用的js函数名称
+	 * function ${page.funcName}(pageNo){location="${ctx}/list-${category.id}${urlSuffix}?pageNo="+i;}
+	 * @return
+	 */
+	@JsonIgnore
+	public String getFuncName() {
+		return funcName;
+	}
+
+	/**
+	 * 设置点击页码调用的js函数名称,默认为page,在一页有多个分页对象时使用。
+	 * @param funcName 默认为page
+	 */
+	public void setFuncName(String funcName) {
+		this.funcName = funcName;
+	}
+
+	/**
+	 * 获取分页函数的附加参数
+	 * @return
+	 */
+	@JsonIgnore
+	public String getFuncParam() {
+		return funcParam;
+	}
+
+	/**
+	 * 设置分页函数的附加参数
+	 * @return
+	 */
+	public void setFuncParam(String funcParam) {
+		this.funcParam = funcParam;
+	}
+
+	/**
+	 * 设置提示消息,显示在“共n条”之后
+	 * @param message
+	 */
+	public void setMessage(String message) {
+		this.message = message;
+	}
+	
+	/**
+	 * 分页是否有效
+	 * @return this.pageSize==-1
+	 */
+	@JsonIgnore
+	public boolean isDisabled() {
+		return this.pageSize==-1;
+	}
+	
+	/**
+	 * 是否进行总数统计
+	 * @return this.count==-1
+	 */
+	@JsonIgnore
+	public boolean isNotCount() {
+		return this.count==-1;
+	}
+	
+	/**
+	 * 获取 Hibernate FirstResult
+	 */
+	public int getFirstResult(){
+		int firstResult = (getPageNo() - 1) * getPageSize();
+		if (firstResult >= getCount()) {
+			firstResult = 0;
+		}
+		return firstResult;
+	}
+	/**
+	 * 获取 Hibernate MaxResults
+	 */
+	public int getMaxResults(){
+		return getPageSize();
+	}
+
+//	/**
+//	 * 获取 Spring data JPA 分页对象
+//	 */
+//	public Pageable getSpringPage(){
+//		List<Order> orders = new ArrayList<Order>();
+//		if (orderBy!=null){
+//			for (String order : StringUtils.split(orderBy, ",")){
+//				String[] o = StringUtils.split(order, " ");
+//				if (o.length==1){
+//					orders.add(new Order(Direction.ASC, o[0]));
+//				}else if (o.length==2){
+//					if ("DESC".equals(o[1].toUpperCase())){
+//						orders.add(new Order(Direction.DESC, o[0]));
+//					}else{
+//						orders.add(new Order(Direction.ASC, o[0]));
+//					}
+//				}
+//			}
+//		}
+//		return new PageRequest(this.pageNo - 1, this.pageSize, new Sort(orders));
+//	}
+//	
+//	/**
+//	 * 设置 Spring data JPA 分页对象,转换为本系统分页对象
+//	 */
+//	public void setSpringPage(org.springframework.data.domain.Page<T> page){
+//		this.pageNo = page.getNumber();
+//		this.pageSize = page.getSize();
+//		this.count = page.getTotalElements();
+//		this.list = page.getContent();
+//	}
+	
+}

+ 43 - 0
src/main/java/com/lightinit/hsdatagateway/common/persistence/Parameter.java

@@ -0,0 +1,43 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.persistence;
+
+import java.util.HashMap;
+
+/**
+ * 查询参数类
+ * @Author yangrui
+ * @version 2013-8-23
+ */
+public class Parameter extends HashMap<String, Object> {
+	
+	private static final long serialVersionUID = 1L;
+	
+	/**
+	 * 构造类,例:new Parameter(id, parentIds)
+	 * @param values 参数值
+	 */
+	public Parameter(Object... values) {
+		if (values != null){
+			for (int i=0; i<values.length; i++){
+				put("p"+(i+1), values[i]);
+			}
+		}
+	}
+	
+	/**
+	 * 构造类,例:new Parameter(new Object[][]{{"id", id}, {"parentIds", parentIds}})
+	 * @param parameters 参数二维数组
+	 */
+	public Parameter(Object[][] parameters) {
+		if (parameters != null){
+			for (Object[] os : parameters){
+				if (os.length == 2){
+					put((String)os[0], os[1]);
+				}
+			}
+		}
+	}
+	
+}

+ 30 - 0
src/main/java/com/lightinit/hsdatagateway/common/persistence/TreeDao.java

@@ -0,0 +1,30 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.persistence;
+
+import java.util.List;
+
+/**
+ * DAO支持类实现
+ * @Author yangrui
+ * @version 2014-05-16
+ * @param <T>
+ */
+public interface TreeDao<T extends TreeEntity<T>> extends CrudDao<T> {
+
+	/**
+	 * 找到所有子节点
+	 * @param entity
+	 * @return
+	 */
+	public List<T> findByParentIdsLike(T entity);
+
+	/**
+	 * 更新所有父节点字段
+	 * @param entity
+	 * @return
+	 */
+	public int updateParentIds(T entity);
+	
+}

+ 85 - 0
src/main/java/com/lightinit/hsdatagateway/common/persistence/TreeEntity.java

@@ -0,0 +1,85 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.persistence;
+
+import javax.validation.constraints.NotNull;
+
+import org.hibernate.validator.constraints.Length;
+
+import com.fasterxml.jackson.annotation.JsonBackReference;
+import com.lightinit.hsdatagateway.common.utils.Reflections;
+import com.lightinit.hsdatagateway.common.utils.StringUtils;
+
+/**
+ * 数据Entity类
+ * @Author yangrui
+ * @version 2014-05-16
+ */
+public abstract class TreeEntity<T> extends DataEntity<T> {
+
+	private static final long serialVersionUID = 1L;
+
+	protected T parent;	// 父级编号
+	protected String parentIds; // 所有父级编号
+	protected String name; 	// 机构名称
+	protected Integer sort;		// 排序
+	
+	public TreeEntity() {
+		super();
+		this.sort = 30;
+	}
+	
+	public TreeEntity(Long id) {
+		super(id);
+	}
+	
+	/**
+	 * 父对象,只能通过子类实现,父类实现mybatis无法读取
+	 * @return
+	 */
+	@JsonBackReference
+	@NotNull
+	public abstract T getParent();
+
+	/**
+	 * 父对象,只能通过子类实现,父类实现mybatis无法读取
+	 * @return
+	 */
+	public abstract void setParent(T parent);
+
+	@Length(min=1, max=2000)
+	public String getParentIds() {
+		return parentIds;
+	}
+
+	public void setParentIds(String parentIds) {
+		this.parentIds = parentIds;
+	}
+
+	@Length(min=1, max=100)
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public Integer getSort() {
+		return sort;
+	}
+
+	public void setSort(Integer sort) {
+		this.sort = sort;
+	}
+	
+	public Long getParentId() {
+		Long id = null;
+		if (parent != null){
+			id = (Long)Reflections.getFieldValue(parent, "id");
+		}
+		return id != null ? id : null;
+	}
+	
+}

+ 32 - 0
src/main/java/com/lightinit/hsdatagateway/common/persistence/annotation/MyBatisDao.java

@@ -0,0 +1,32 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.persistence.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;
+
+import org.springframework.stereotype.Component;
+
+/**
+ * 标识MyBatis的DAO,方便{@link org.mybatis.spring.mapper.MapperScannerConfigurer}的扫描。 
+ * @Author: yangrui
+ * @version 2013-8-28
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+@Documented
+@Component
+public @interface MyBatisDao {
+	
+	/**
+	 * The value may indicate a suggestion for a logical component name,
+	 * to be turned into a Spring bean in case of an autodetected component.
+	 * @return the suggested component name, if any
+	 */
+	String value() default "";
+
+}

+ 33 - 0
src/main/java/com/lightinit/hsdatagateway/common/persistence/dialect/Dialect.java

@@ -0,0 +1,33 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.persistence.dialect;
+
+/**
+ * 类似hibernate的Dialect,但只精简出分页部分
+ *
+ * @Author: yangrui
+ * @version 1.0 2011-11-18 下午12:31
+ * @since JDK 1.5
+ */
+public interface Dialect {
+
+    /**
+     * 数据库本身是否支持分页当前的分页查询方式
+     * 如果数据库不支持的话,则不进行数据库分页
+     *
+     * @return true:支持当前的分页查询方式
+     */
+    public boolean supportsLimit();
+
+    /**
+     * 将sql转换为分页SQL,分别调用分页sql
+     *
+     * @param sql    SQL语句
+     * @param offset 开始条数
+     * @param limit  每页显示多少纪录条数
+     * @return 分页查询的sql
+     */
+    public String getLimitString(String sql, int offset, int limit);
+
+}

+ 89 - 0
src/main/java/com/lightinit/hsdatagateway/common/persistence/dialect/db/DB2Dialect.java

@@ -0,0 +1,89 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.persistence.dialect.db;
+
+import com.lightinit.hsdatagateway.common.persistence.dialect.Dialect;
+
+/**
+ * DB2的分页数据库方言实现
+ *
+ * @Author: yangrui
+ * @version 1.0 2010-10-10 下午12:31
+ * @since JDK 1.5
+ */
+public class DB2Dialect implements Dialect {
+    @Override
+    public boolean supportsLimit() {
+        return true;
+    }
+
+    private static String getRowNumber(String sql) {
+        StringBuilder rownumber = new StringBuilder(50)
+                .append("rownumber() over(");
+
+        int orderByIndex = sql.toLowerCase().indexOf("order by");
+
+        if (orderByIndex > 0 && !hasDistinct(sql)) {
+            rownumber.append(sql.substring(orderByIndex));
+        }
+
+        rownumber.append(") as rownumber_,");
+
+        return rownumber.toString();
+    }
+
+    private static boolean hasDistinct(String sql) {
+        return sql.toLowerCase().contains("select distinct");
+    }
+
+    @Override
+    public String getLimitString(String sql, int offset, int limit) {
+        return getLimitString(sql, offset, Integer.toString(offset), Integer.toString(limit));
+    }
+
+    /**
+     * 将sql变成分页sql语句,提供将offset及limit使用占位符号(placeholder)替换.
+     * <pre>
+     * 如mysql
+     * dialect.getLimitString("select * from user", 12, ":offset",0,":limit") 将返回
+     * select * from user limit :offset,:limit
+     * </pre>
+     *
+     * @param sql               实际SQL语句
+     * @param offset            分页开始纪录条数
+     * @param offsetPlaceholder 分页开始纪录条数-占位符号
+     * @param limitPlaceholder  分页纪录条数占位符号
+     * @return 包含占位符的分页sql
+     */
+    public String getLimitString(String sql, int offset, String offsetPlaceholder, String limitPlaceholder) {
+        int startOfSelect = sql.toLowerCase().indexOf("select");
+
+        StringBuilder pagingSelect = new StringBuilder(sql.length() + 100)
+                .append(sql.substring(0, startOfSelect)) //add the comment
+                .append("select * from ( select ") //nest the main query in an outer select
+                .append(getRowNumber(sql)); //add the rownnumber bit into the outer query select list
+
+        if (hasDistinct(sql)) {
+            pagingSelect.append(" row_.* from ( ") //add another (inner) nested select
+                    .append(sql.substring(startOfSelect)) //add the main query
+                    .append(" ) as row_"); //close off the inner nested select
+        } else {
+            pagingSelect.append(sql.substring(startOfSelect + 6)); //add the main query
+        }
+
+        pagingSelect.append(" ) as temp_ where rownumber_ ");
+
+        //add the restriction to the outer select
+        if (offset > 0) {
+//			int end = offset + limit;
+            String endString = offsetPlaceholder + "+" + limitPlaceholder;
+            pagingSelect.append("between ").append(offsetPlaceholder)
+                    .append("+1 and ").append(endString);
+        } else {
+            pagingSelect.append("<= ").append(limitPlaceholder);
+        }
+
+        return pagingSelect.toString();
+    }
+}

+ 44 - 0
src/main/java/com/lightinit/hsdatagateway/common/persistence/dialect/db/DerbyDialect.java

@@ -0,0 +1,44 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.persistence.dialect.db;
+
+import com.lightinit.hsdatagateway.common.persistence.dialect.Dialect;
+
+/**
+ * @Author: yangrui
+ * @version 1.0 2010-10-10 下午12:31
+ * @since JDK 1.5
+ */
+public class DerbyDialect implements Dialect {
+    @Override
+    public boolean supportsLimit() {
+        return false;
+	}
+
+    @Override
+    public String getLimitString(String sql, int offset, int limit) {
+//        return getLimitString(sql,offset,Integer.toString(offset),limit,Integer.toString(limit));
+        throw new UnsupportedOperationException("paged queries not supported");
+    }
+
+    /**
+     * 将sql变成分页sql语句,提供将offset及limit使用占位符号(placeholder)替换.
+     * <pre>
+     * 如mysql
+     * dialect.getLimitString("select * from user", 12, ":offset",0,":limit") 将返回
+     * select * from user limit :offset,:limit
+     * </pre>
+     *
+     * @param sql               实际SQL语句
+     * @param offset            分页开始纪录条数
+     * @param offsetPlaceholder 分页开始纪录条数-占位符号
+     * @param limit             分页每页显示纪录条数
+     * @param limitPlaceholder  分页纪录条数占位符号
+     * @return 包含占位符的分页sql
+     */
+	public String getLimitString(String sql, int offset,String offsetPlaceholder, int limit, String limitPlaceholder) {
+		throw new UnsupportedOperationException( "paged queries not supported" );
+	}
+
+}

+ 45 - 0
src/main/java/com/lightinit/hsdatagateway/common/persistence/dialect/db/H2Dialect.java

@@ -0,0 +1,45 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.persistence.dialect.db;
+
+import com.lightinit.hsdatagateway.common.persistence.dialect.Dialect;
+
+/**
+ * A dialect compatible with the H2 database.
+ *
+ * @Author: yangrui
+ * @version 1.0 2010-10-10 下午12:31
+ * @since JDK 1.5
+ */
+public class H2Dialect implements Dialect {
+
+    public boolean supportsLimit() {
+        return true;
+    }
+
+    /**
+     * 将sql变成分页sql语句,提供将offset及limit使用占位符号(placeholder)替换.
+     * <pre>
+     * 如mysql
+     * dialect.getLimitString("select * from user", 12, ":offset",0,":limit") 将返回
+     * select * from user limit :offset,:limit
+     * </pre>
+     *
+     * @param sql               实际SQL语句
+     * @param offset            分页开始纪录条数
+     * @param offsetPlaceholder 分页开始纪录条数-占位符号
+     * @param limit             分页每页显示纪录条数
+     * @param limitPlaceholder  分页纪录条数占位符号
+     * @return 包含占位符的分页sql
+     */
+    private String getLimitString(String sql, int offset, String offsetPlaceholder, int limit, String limitPlaceholder) {
+        return sql + ((offset > 0) ? " limit " + limitPlaceholder + " offset "
+                + offsetPlaceholder : " limit " + limitPlaceholder);
+    }
+
+    @Override
+    public String getLimitString(String sql, int offset, int limit) {
+        return getLimitString(sql, offset, Integer.toString(offset), limit, Integer.toString(limit));
+    }
+}

+ 50 - 0
src/main/java/com/lightinit/hsdatagateway/common/persistence/dialect/db/HSQLDialect.java

@@ -0,0 +1,50 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.persistence.dialect.db;
+
+import com.lightinit.hsdatagateway.common.persistence.dialect.Dialect;
+
+/**
+ * Dialect for HSQLDB
+ *
+ * @Author: yangrui
+ * @version 1.0 2010-10-10 下午12:31
+ * @since JDK 1.5
+ */
+public class HSQLDialect implements Dialect {
+    @Override
+    public boolean supportsLimit() {
+        return true;
+    }
+
+    @Override
+    public String getLimitString(String sql, int offset, int limit) {
+        return getLimitString(sql, offset, Integer.toString(offset),
+                Integer.toString(limit));
+    }
+
+    /**
+     * 将sql变成分页sql语句,提供将offset及limit使用占位符号(placeholder)替换.
+     * <pre>
+     * 如mysql
+     * dialect.getLimitString("select * from user", 12, ":offset",0,":limit") 将返回
+     * select * from user limit :offset,:limit
+     * </pre>
+     *
+     * @param sql               实际SQL语句
+     * @param offset            分页开始纪录条数
+     * @param offsetPlaceholder 分页开始纪录条数-占位符号
+     * @param limitPlaceholder  分页纪录条数占位符号
+     * @return 包含占位符的分页sql
+     */
+    public String getLimitString(String sql, int offset, String offsetPlaceholder, String limitPlaceholder) {
+        boolean hasOffset = offset > 0;
+        return
+                new StringBuffer(sql.length() + 10)
+                        .append(sql)
+                        .insert(sql.toLowerCase().indexOf("select") + 6, hasOffset ? " limit " + offsetPlaceholder + " " + limitPlaceholder : " top " + limitPlaceholder)
+                        .toString();
+    }
+
+}

+ 53 - 0
src/main/java/com/lightinit/hsdatagateway/common/persistence/dialect/db/MySQLDialect.java

@@ -0,0 +1,53 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.persistence.dialect.db;
+
+import com.lightinit.hsdatagateway.common.persistence.dialect.Dialect;
+
+/**
+ * Mysql方言的实现
+ *
+ * @Author: yangrui
+ * @version 1.0 2010-10-10 下午12:31
+ * @since JDK 1.5
+ */
+public class MySQLDialect implements Dialect {
+
+
+    @Override
+    public String getLimitString(String sql, int offset, int limit) {
+        return getLimitString(sql, offset, Integer.toString(offset),
+                Integer.toString(limit));
+    }
+
+    public boolean supportsLimit() {
+        return true;
+    }
+
+    /**
+     * 将sql变成分页sql语句,提供将offset及limit使用占位符号(placeholder)替换.
+     * <pre>
+     * 如mysql
+     * dialect.getLimitString("select * from user", 12, ":offset",0,":limit") 将返回
+     * select * from user limit :offset,:limit
+     * </pre>
+     *
+     * @param sql               实际SQL语句
+     * @param offset            分页开始纪录条数
+     * @param offsetPlaceholder 分页开始纪录条数-占位符号
+     * @param limitPlaceholder  分页纪录条数占位符号
+     * @return 包含占位符的分页sql
+     */
+    public String getLimitString(String sql, int offset, String offsetPlaceholder, String limitPlaceholder) {
+        StringBuilder stringBuilder = new StringBuilder(sql);
+        stringBuilder.append(" limit ");
+        if (offset > 0) {
+            stringBuilder.append(offsetPlaceholder).append(",").append(limitPlaceholder);
+        } else {
+            stringBuilder.append(limitPlaceholder);
+        }
+        return stringBuilder.toString();
+    }
+
+}

+ 68 - 0
src/main/java/com/lightinit/hsdatagateway/common/persistence/dialect/db/OracleDialect.java

@@ -0,0 +1,68 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.persistence.dialect.db;
+
+import com.lightinit.hsdatagateway.common.persistence.dialect.Dialect;
+
+/**
+ * Oracle的方言实现
+ * @Author: yangrui
+ * @version 1.0 2010-10-10 下午12:31
+ * @since JDK 1.5
+ */
+public class OracleDialect implements Dialect {
+    @Override
+    public boolean supportsLimit() {
+        return true;
+    }
+
+    @Override
+    public String getLimitString(String sql, int offset, int limit) {
+        return getLimitString(sql, offset, Integer.toString(offset), Integer.toString(limit));
+    }
+
+    /**
+     * 将sql变成分页sql语句,提供将offset及limit使用占位符号(placeholder)替换.
+     * <pre>
+     * 如mysql
+     * dialect.getLimitString("select * from user", 12, ":offset",0,":limit") 将返回
+     * select * from user limit :offset,:limit
+     * </pre>
+     *
+     * @param sql               实际SQL语句
+     * @param offset            分页开始纪录条数
+     * @param offsetPlaceholder 分页开始纪录条数-占位符号
+     * @param limitPlaceholder  分页纪录条数占位符号
+     * @return 包含占位符的分页sql
+     */
+    public String getLimitString(String sql, int offset, String offsetPlaceholder, String limitPlaceholder) {
+        sql = sql.trim();
+        boolean isForUpdate = false;
+        if (sql.toLowerCase().endsWith(" for update")) {
+            sql = sql.substring(0, sql.length() - 11);
+            isForUpdate = true;
+        }
+        StringBuilder pagingSelect = new StringBuilder(sql.length() + 100);
+
+        if (offset > 0) {
+			pagingSelect.append("select * from ( select row_.*, rownum rownum_ from ( ");
+		} else {
+			pagingSelect.append("select * from ( ");
+		}
+		pagingSelect.append(sql);
+		if (offset > 0) {
+			String endString = offsetPlaceholder + "+" + limitPlaceholder;
+			pagingSelect.append(" ) row_ where rownum <= "+endString+") where rownum_ > ").append(offsetPlaceholder);
+		} else {
+			pagingSelect.append(" ) where rownum <= "+limitPlaceholder);
+		}
+
+        if (isForUpdate) {
+            pagingSelect.append(" for update");
+        }
+
+        return pagingSelect.toString();
+    }
+
+}

+ 48 - 0
src/main/java/com/lightinit/hsdatagateway/common/persistence/dialect/db/PostgreSQLDialect.java

@@ -0,0 +1,48 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.persistence.dialect.db;
+
+import com.lightinit.hsdatagateway.common.persistence.dialect.Dialect;
+
+/**
+ * Postgre Sql的方言实现
+ * @Author: yangrui
+ * @version 1.0 2010-10-10 下午12:31
+ * @since JDK 1.5
+ */
+public class PostgreSQLDialect implements Dialect {
+
+    public boolean supportsLimit() {
+        return true;
+    }
+
+    @Override
+    public String getLimitString(String sql, int offset, int limit) {
+        return getLimitString(sql, offset, Integer.toString(offset),
+                Integer.toString(limit));
+    }
+
+    /**
+     * 将sql变成分页sql语句,提供将offset及limit使用占位符号(placeholder)替换.
+     * <pre>
+     * 如mysql
+     * dialect.getLimitString("select * from user", 12, ":offset",0,":limit") 将返回
+     * select * from user limit :offset,:limit
+     * </pre>
+     *
+     * @param sql               实际SQL语句
+     * @param offset            分页开始纪录条数
+     * @param offsetPlaceholder 分页开始纪录条数-占位符号
+     * @param limitPlaceholder  分页纪录条数占位符号
+     * @return 包含占位符的分页sql
+     */
+    public String getLimitString(String sql, int offset,
+                                 String offsetPlaceholder, String limitPlaceholder) {
+        StringBuilder pageSql = new StringBuilder().append(sql);
+        pageSql = offset <= 0
+                ? pageSql.append(" limit ").append(limitPlaceholder) :
+                pageSql.append(" limit ").append(limitPlaceholder).append(" offset ").append(offsetPlaceholder);
+        return pageSql.toString();
+    }
+}

+ 95 - 0
src/main/java/com/lightinit/hsdatagateway/common/persistence/dialect/db/SQLServer2005Dialect.java

@@ -0,0 +1,95 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.persistence.dialect.db;
+
+import org.apache.commons.lang3.StringUtils;
+
+import com.lightinit.hsdatagateway.common.persistence.dialect.Dialect;
+
+/**
+ * Sql 2005的方言实现
+ * @Author: yangrui
+ * @version 1.0 2010-10-10 下午12:31
+ * @since JDK 1.5
+ */
+public class SQLServer2005Dialect implements Dialect {
+
+    @Override
+    public boolean supportsLimit() {
+        return true;
+    }
+
+    @Override
+    public String getLimitString(String sql, int offset, int limit) {
+        return getLimitString(sql, offset,
+                limit, Integer.toString(limit));
+    }
+
+    /**
+     * Add a LIMIT clause to the given SQL SELECT
+     * <p/>
+     * The LIMIT SQL will look like:
+     * <p/>
+     * WITH query AS
+     * (SELECT TOP 100 percent ROW_NUMBER() OVER (ORDER BY CURRENT_TIMESTAMP) as __row_number__, * from table_name)
+     * SELECT *
+     * FROM query
+     * WHERE __row_number__ BETWEEN :offset and :lastRows
+     * ORDER BY __row_number__
+     *
+     * @param querySqlString   The SQL statement to base the limit query off of.
+     * @param offset           Offset of the first row to be returned by the query (zero-based)
+     * @param limit            Maximum number of rows to be returned by the query
+     * @param limitPlaceholder limitPlaceholder
+     * @return A new SQL statement with the LIMIT clause applied.
+     */
+    private String getLimitString(String querySqlString, int offset, int limit, String limitPlaceholder) {
+        StringBuilder pagingBuilder = new StringBuilder();
+        String orderby = getOrderByPart(querySqlString);
+        String distinctStr = "";
+
+        String loweredString = querySqlString.toLowerCase();
+        String sqlPartString = querySqlString;
+        if (loweredString.trim().startsWith("select")) {
+            int index = 6;
+            if (loweredString.startsWith("select distinct")) {
+                distinctStr = "DISTINCT ";
+                index = 15;
+            }
+            sqlPartString = sqlPartString.substring(index);
+        }
+        pagingBuilder.append(sqlPartString);
+
+        // if no ORDER BY is specified use fake ORDER BY field to avoid errors
+        if (StringUtils.isEmpty(orderby)) {
+            orderby = "ORDER BY CURRENT_TIMESTAMP";
+        }
+
+        StringBuilder result = new StringBuilder();
+        result.append("WITH query AS (SELECT ")
+                .append(distinctStr)
+                .append("TOP 100 PERCENT ")
+                .append(" ROW_NUMBER() OVER (")
+                .append(orderby)
+                .append(") as __row_number__, ")
+                .append(pagingBuilder)
+                .append(") SELECT * FROM query WHERE __row_number__ BETWEEN ")
+                .append(offset + 1).append(" AND ").append(offset + limit)
+                .append(" ORDER BY __row_number__");
+
+        return result.toString();
+    }
+
+    static String getOrderByPart(String sql) {
+        String loweredString = sql.toLowerCase();
+        int orderByIndex = loweredString.indexOf("order by");
+        if (orderByIndex != -1) {
+            // if we find a new "order by" then we need to ignore
+            // the previous one since it was probably used for a subquery
+            return sql.substring(orderByIndex);
+        } else {
+            return "";
+        }
+    }
+}

+ 55 - 0
src/main/java/com/lightinit/hsdatagateway/common/persistence/dialect/db/SQLServerDialect.java

@@ -0,0 +1,55 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.persistence.dialect.db;
+
+import com.lightinit.hsdatagateway.common.persistence.dialect.Dialect;
+
+/**
+ * MSSQLServer 数据库实现分页方言
+ *
+ * @Author: yangrui
+ * @version 1.0 2010-10-10 下午12:31
+ * @since JDK 1.5
+ */
+public class SQLServerDialect implements Dialect {
+
+    public boolean supportsLimit() {
+        return true;
+    }
+
+    static int getAfterSelectInsertPoint(String sql) {
+        int selectIndex = sql.toLowerCase().indexOf("select");
+        final int selectDistinctIndex = sql.toLowerCase().indexOf("select distinct");
+        return selectIndex + (selectDistinctIndex == selectIndex ? 15 : 6);
+    }
+
+    public String getLimitString(String sql, int offset, int limit) {
+        return getLimit(sql, offset, limit);
+    }
+
+    /**
+     * 将sql变成分页sql语句,提供将offset及limit使用占位符号(placeholder)替换.
+     * <pre>
+     * 如mysql
+     * dialect.getLimitString("select * from user", 12, ":offset",0,":limit") 将返回
+     * select * from user limit :offset,:limit
+     * </pre>
+     *
+     * @param sql    实际SQL语句
+     * @param offset 分页开始纪录条数
+     * @param limit  分页每页显示纪录条数
+     * @return 包含占位符的分页sql
+     */
+    public String getLimit(String sql, int offset, int limit) {
+        if (offset > 0) {
+            throw new UnsupportedOperationException("sql server has no offset");
+        }
+        return new StringBuffer(sql.length() + 8)
+                .append(sql)
+                .insert(getAfterSelectInsertPoint(sql), " top " + limit)
+                .toString();
+    }
+
+
+}

+ 47 - 0
src/main/java/com/lightinit/hsdatagateway/common/persistence/dialect/db/SybaseDialect.java

@@ -0,0 +1,47 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.persistence.dialect.db;
+
+import com.lightinit.hsdatagateway.common.persistence.dialect.Dialect;
+
+/**
+ * Sybase数据库分页方言实现。
+ * 还未实现
+ *
+ * @Author: yangrui
+ * @version 1.0 2010-10-10 下午12:31
+ * @since JDK 1.5
+ */
+public class SybaseDialect implements Dialect {
+
+    public boolean supportsLimit() {
+        return false;
+    }
+
+
+    @Override
+    public String getLimitString(String sql, int offset, int limit) {
+        return null;
+    }
+
+    /**
+     * 将sql变成分页sql语句,提供将offset及limit使用占位符号(placeholder)替换.
+     * <pre>
+     * 如mysql
+     * dialect.getLimitString("select * from user", 12, ":offset",0,":limit") 将返回
+     * select * from user limit :offset,:limit
+     * </pre>
+     *
+     * @param sql               实际SQL语句
+     * @param offset            分页开始纪录条数
+     * @param offsetPlaceholder 分页开始纪录条数-占位符号
+     * @param limit             分页每页显示纪录条数
+     * @param limitPlaceholder  分页纪录条数占位符号
+     * @return 包含占位符的分页sql
+     */
+    public String getLimitString(String sql, int offset, String offsetPlaceholder, int limit, String limitPlaceholder) {
+        throw new UnsupportedOperationException("paged queries not supported");
+    }
+
+}

+ 111 - 0
src/main/java/com/lightinit/hsdatagateway/common/persistence/interceptor/BaseInterceptor.java

@@ -0,0 +1,111 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.persistence.interceptor;
+
+import com.lightinit.hsdatagateway.common.persistence.dialect.db.*;
+import org.apache.ibatis.logging.Log;
+import org.apache.ibatis.logging.LogFactory;
+import org.apache.ibatis.plugin.Interceptor;
+
+import com.lightinit.hsdatagateway.common.config.Global;
+import com.lightinit.hsdatagateway.common.persistence.Page;
+import com.lightinit.hsdatagateway.common.persistence.dialect.Dialect;
+import com.lightinit.hsdatagateway.common.persistence.dialect.db.DB2Dialect;
+import com.lightinit.hsdatagateway.common.persistence.dialect.db.DerbyDialect;
+import com.lightinit.hsdatagateway.common.persistence.dialect.db.H2Dialect;
+import com.lightinit.hsdatagateway.common.persistence.dialect.db.HSQLDialect;
+import com.lightinit.hsdatagateway.common.persistence.dialect.db.MySQLDialect;
+import com.lightinit.hsdatagateway.common.persistence.dialect.db.OracleDialect;
+import com.lightinit.hsdatagateway.common.persistence.dialect.db.PostgreSQLDialect;
+import com.lightinit.hsdatagateway.common.persistence.dialect.db.SQLServer2005Dialect;
+import com.lightinit.hsdatagateway.common.persistence.dialect.db.SybaseDialect;
+import com.lightinit.hsdatagateway.common.utils.Reflections;
+
+import java.io.Serializable;
+import java.util.Properties;
+
+/**
+ * Mybatis分页拦截器基类
+ * @Author: yangrui / lightinit
+ * @version 2013-8-28
+ */
+public abstract class BaseInterceptor implements Interceptor, Serializable {
+	
+	private static final long serialVersionUID = 1L;
+
+    protected static final String PAGE = "page";
+    
+    protected static final String DELEGATE = "delegate";
+
+    protected static final String MAPPED_STATEMENT = "mappedStatement";
+
+    protected Log log = LogFactory.getLog(this.getClass());
+
+    protected Dialect DIALECT;
+
+//    /**
+//     * 拦截的ID,在mapper中的id,可以匹配正则
+//     */
+//    protected String _SQL_PATTERN = "";
+
+    /**
+     * 对参数进行转换和检查
+     * @param parameterObject 参数对象
+     * @param page            分页对象
+     * @return 分页对象
+     * @throws NoSuchFieldException 无法找到参数
+     */
+    @SuppressWarnings("unchecked")
+	protected static Page<Object> convertParameter(Object parameterObject, Page<Object> page) {
+    	try{
+            if (parameterObject instanceof Page) {
+                return (Page<Object>) parameterObject;
+            } else {
+                return (Page<Object>)Reflections.getFieldValue(parameterObject, PAGE);
+            }
+    	}catch (Exception e) {
+			return null;
+		}
+    }
+
+    /**
+     * 设置属性,支持自定义方言类和制定数据库的方式
+     * <code>dialectClass</code>,自定义方言类。可以不配置这项
+     * <ode>dbms</ode> 数据库类型,插件支持的数据库
+     * <code>sqlPattern</code> 需要拦截的SQL ID
+     * @param p 属性
+     */
+    protected void initProperties(Properties p) {
+    	Dialect dialect = null;
+        String dbType = Global.getConfig("jdbc.type");
+        if ("db2".equals(dbType)){
+        	dialect = new DB2Dialect();
+        }else if("derby".equals(dbType)){
+        	dialect = new DerbyDialect();
+        }else if("h2".equals(dbType)){
+        	dialect = new H2Dialect();
+        }else if("hsql".equals(dbType)){
+        	dialect = new HSQLDialect();
+        }else if("mysql".equals(dbType)){
+        	dialect = new MySQLDialect();
+        }else if("oracle".equals(dbType)){
+        	dialect = new OracleDialect();
+        }else if("postgre".equals(dbType)){
+        	dialect = new PostgreSQLDialect();
+        }else if("mssql".equals(dbType) || "sqlserver".equals(dbType)){
+        	dialect = new SQLServer2005Dialect();
+        }else if("sybase".equals(dbType)){
+        	dialect = new SybaseDialect();
+        }
+        if (dialect == null) {
+            throw new RuntimeException("mybatis dialect error.");
+        }
+        DIALECT = dialect;
+//        _SQL_PATTERN = p.getProperty("sqlPattern");
+//        _SQL_PATTERN = Global.getConfig("mybatis.pagePattern");
+//        if (StringUtils.isEmpty(_SQL_PATTERN)) {
+//            throw new RuntimeException("sqlPattern property is not found!");
+//        }
+    }
+}

+ 128 - 0
src/main/java/com/lightinit/hsdatagateway/common/persistence/interceptor/PaginationInterceptor.java

@@ -0,0 +1,128 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.persistence.interceptor;
+
+import org.apache.ibatis.executor.Executor;
+import org.apache.ibatis.mapping.BoundSql;
+import org.apache.ibatis.mapping.MappedStatement;
+import org.apache.ibatis.mapping.SqlSource;
+import org.apache.ibatis.plugin.Intercepts;
+import org.apache.ibatis.plugin.Invocation;
+import org.apache.ibatis.plugin.Plugin;
+import org.apache.ibatis.plugin.Signature;
+import org.apache.ibatis.reflection.MetaObject;
+import org.apache.ibatis.session.ResultHandler;
+import org.apache.ibatis.session.RowBounds;
+
+import com.lightinit.hsdatagateway.common.persistence.Page;
+import com.lightinit.hsdatagateway.common.utils.Reflections;
+import com.lightinit.hsdatagateway.common.utils.StringUtils;
+
+import java.util.Properties;
+
+/**
+ * 数据库分页插件,只拦截查询语句.
+ * @Author: yangrui / lightinit
+ * @version 2013-8-28
+ */
+@Intercepts({@Signature(type = Executor.class, method = "query",
+        args = {MappedStatement.class, Object.class, RowBounds.class, ResultHandler.class})})
+public class PaginationInterceptor extends BaseInterceptor {
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public Object intercept(Invocation invocation) throws Throwable {
+
+        final MappedStatement mappedStatement = (MappedStatement) invocation.getArgs()[0];
+
+//        //拦截需要分页的SQL
+////        if (mappedStatement.getId().matches(_SQL_PATTERN)) {
+//        if (StringUtils.indexOfIgnoreCase(mappedStatement.getId(), _SQL_PATTERN) != -1) {
+            Object parameter = invocation.getArgs()[1];
+            BoundSql boundSql = mappedStatement.getBoundSql(parameter);
+            Object parameterObject = boundSql.getParameterObject();
+
+            //获取分页参数对象
+            Page<Object> page = null;
+            if (parameterObject != null) {
+                page = convertParameter(parameterObject, page);
+            }
+
+            //如果设置了分页对象,则进行分页
+            if (page != null && page.getPageSize() != -1) {
+
+            	if (StringUtils.isBlank(boundSql.getSql())){
+                    return null;
+                }
+                String originalSql = boundSql.getSql().trim();
+
+                //得到总记录数
+                page.setCount(SQLHelper.getCount(originalSql, null, mappedStatement, parameterObject, boundSql, log));
+
+                //分页查询 本地化对象 修改数据库注意修改实现
+                String pageSql = SQLHelper.generatePageSql(originalSql, page, DIALECT);
+//                if (log.isDebugEnabled()) {
+//                    log.debug("PAGE SQL:" + StringUtils.replace(pageSql, "\n", ""));
+//                }
+                invocation.getArgs()[2] = new RowBounds(RowBounds.NO_ROW_OFFSET, RowBounds.NO_ROW_LIMIT);
+                BoundSql newBoundSql = new BoundSql(mappedStatement.getConfiguration(), pageSql, boundSql.getParameterMappings(), boundSql.getParameterObject());
+                //解决MyBatis 分页foreach 参数失效 start
+                if (Reflections.getFieldValue(boundSql, "metaParameters") != null) {
+                    MetaObject mo = (MetaObject) Reflections.getFieldValue(boundSql, "metaParameters");
+                    Reflections.setFieldValue(newBoundSql, "metaParameters", mo);
+                }
+                //解决MyBatis 分页foreach 参数失效 end
+                MappedStatement newMs = copyFromMappedStatement(mappedStatement, new BoundSqlSqlSource(newBoundSql));
+
+                invocation.getArgs()[0] = newMs;
+            }
+//        }
+        return invocation.proceed();
+    }
+
+
+    @Override
+    public Object plugin(Object target) {
+        return Plugin.wrap(target, this);
+    }
+
+    @Override
+    public void setProperties(Properties properties) {
+        super.initProperties(properties);
+    }
+
+    private MappedStatement copyFromMappedStatement(MappedStatement ms,
+                                                    SqlSource newSqlSource) {
+        MappedStatement.Builder builder = new MappedStatement.Builder(ms.getConfiguration(),
+                ms.getId(), newSqlSource, ms.getSqlCommandType());
+        builder.resource(ms.getResource());
+        builder.fetchSize(ms.getFetchSize());
+        builder.statementType(ms.getStatementType());
+        builder.keyGenerator(ms.getKeyGenerator());
+        if (ms.getKeyProperties() != null) {
+            for (String keyProperty : ms.getKeyProperties()) {
+                builder.keyProperty(keyProperty);
+            }
+        }
+        builder.timeout(ms.getTimeout());
+        builder.parameterMap(ms.getParameterMap());
+        builder.resultMaps(ms.getResultMaps());
+        builder.cache(ms.getCache());
+        builder.useCache(ms.isUseCache());
+        return builder.build();
+    }
+
+    public static class BoundSqlSqlSource implements SqlSource {
+        BoundSql boundSql;
+
+        public BoundSqlSqlSource(BoundSql boundSql) {
+            this.boundSql = boundSql;
+        }
+
+        public BoundSql getBoundSql(Object parameterObject) {
+            return boundSql;
+        }
+    }
+}

+ 89 - 0
src/main/java/com/lightinit/hsdatagateway/common/persistence/interceptor/PreparePaginationInterceptor.java

@@ -0,0 +1,89 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.persistence.interceptor;
+
+import org.apache.ibatis.executor.statement.BaseStatementHandler;
+import org.apache.ibatis.executor.statement.RoutingStatementHandler;
+import org.apache.ibatis.executor.statement.StatementHandler;
+import org.apache.ibatis.mapping.BoundSql;
+import org.apache.ibatis.mapping.MappedStatement;
+import org.apache.ibatis.plugin.Intercepts;
+import org.apache.ibatis.plugin.Invocation;
+import org.apache.ibatis.plugin.Plugin;
+import org.apache.ibatis.plugin.Signature;
+
+import com.lightinit.hsdatagateway.common.persistence.Page;
+import com.lightinit.hsdatagateway.common.utils.Reflections;
+
+import java.sql.Connection;
+import java.util.Properties;
+
+/**
+ * Mybatis数据库分页插件,拦截StatementHandler的prepare方法
+ * @Author: yangrui / lightinit
+ * @version 2013-8-28
+ */
+@Intercepts({
+	@Signature(type = StatementHandler.class, method = "prepare", args = {Connection.class})
+})
+public class PreparePaginationInterceptor extends BaseInterceptor {
+    
+    private static final long serialVersionUID = 1L;
+
+    public PreparePaginationInterceptor() {
+        super();
+    }
+
+    @Override
+    public Object intercept(Invocation ivk) throws Throwable {
+        if (ivk.getTarget().getClass().isAssignableFrom(RoutingStatementHandler.class)) {
+            final RoutingStatementHandler statementHandler = (RoutingStatementHandler) ivk.getTarget();
+            final BaseStatementHandler delegate = (BaseStatementHandler) Reflections.getFieldValue(statementHandler, DELEGATE);
+            final MappedStatement mappedStatement = (MappedStatement) Reflections.getFieldValue(delegate, MAPPED_STATEMENT);
+
+//            //拦截需要分页的SQL
+////            if (mappedStatement.getId().matches(_SQL_PATTERN)) { 
+//            if (StringUtils.indexOfIgnoreCase(mappedStatement.getId(), _SQL_PATTERN) != -1) {
+                BoundSql boundSql = delegate.getBoundSql();
+                //分页SQL<select>中parameterType属性对应的实体参数,即Mapper接口中执行分页方法的参数,该参数不得为空
+                Object parameterObject = boundSql.getParameterObject();
+                if (parameterObject == null) {
+                    log.error("参数未实例化");
+                    throw new NullPointerException("parameterObject尚未实例化!");
+                } else {
+                    final Connection connection = (Connection) ivk.getArgs()[0];
+                    final String sql = boundSql.getSql();
+                    //记录统计
+                    final int count = SQLHelper.getCount(sql, connection, mappedStatement, parameterObject, boundSql, log);
+                    Page<Object> page = null;
+                    page = convertParameter(parameterObject, page);
+                    page.setCount(count);
+                    String pagingSql = SQLHelper.generatePageSql(sql, page, DIALECT);
+                    if (log.isDebugEnabled()) {
+                        log.debug("PAGE SQL:" + pagingSql);
+                    }
+                    //将分页sql语句反射回BoundSql.
+                    Reflections.setFieldValue(boundSql, "sql", pagingSql);
+                }
+                
+                if (boundSql.getSql() == null || "".equals(boundSql.getSql())){
+                    return null;
+                }
+                
+            }
+//        }
+        return ivk.proceed();
+    }
+
+
+    @Override
+    public Object plugin(Object o) {
+        return Plugin.wrap(o, this);
+    }
+
+    @Override
+    public void setProperties(Properties properties) {
+        initProperties(properties);
+    }
+}

+ 195 - 0
src/main/java/com/lightinit/hsdatagateway/common/persistence/interceptor/SQLHelper.java

@@ -0,0 +1,195 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.persistence.interceptor;
+
+import org.apache.ibatis.executor.ErrorContext;
+import org.apache.ibatis.executor.ExecutorException;
+import org.apache.ibatis.logging.Log;
+import org.apache.ibatis.mapping.BoundSql;
+import org.apache.ibatis.mapping.MappedStatement;
+import org.apache.ibatis.mapping.ParameterMapping;
+import org.apache.ibatis.mapping.ParameterMode;
+import org.apache.ibatis.reflection.MetaObject;
+import org.apache.ibatis.reflection.property.PropertyTokenizer;
+import org.apache.ibatis.scripting.xmltags.ForEachSqlNode;
+import org.apache.ibatis.session.Configuration;
+import org.apache.ibatis.type.TypeHandler;
+import org.apache.ibatis.type.TypeHandlerRegistry;
+
+import com.lightinit.hsdatagateway.common.config.Global;
+import com.lightinit.hsdatagateway.common.persistence.Page;
+import com.lightinit.hsdatagateway.common.persistence.dialect.Dialect;
+import com.lightinit.hsdatagateway.common.utils.Reflections;
+import com.lightinit.hsdatagateway.common.utils.StringUtils;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * SQL工具类
+ * @Author: yangrui / lightinit
+ * @version 2013-8-28
+ */
+public class SQLHelper {
+	
+    /**
+     * 对SQL参数(?)设值,参考org.apache.ibatis.executor.parameter.DefaultParameterHandler
+     *
+     * @param ps              表示预编译的 SQL 语句的对象。
+     * @param mappedStatement MappedStatement
+     * @param boundSql        SQL
+     * @param parameterObject 参数对象
+     * @throws java.sql.SQLException 数据库异常
+     */
+    @SuppressWarnings("unchecked")
+    public static void setParameters(PreparedStatement ps, MappedStatement mappedStatement, BoundSql boundSql, Object parameterObject) throws SQLException {
+        ErrorContext.instance().activity("setting parameters").object(mappedStatement.getParameterMap().getId());
+        List<ParameterMapping> parameterMappings = boundSql.getParameterMappings();
+        if (parameterMappings != null) {
+            Configuration configuration = mappedStatement.getConfiguration();
+            TypeHandlerRegistry typeHandlerRegistry = configuration.getTypeHandlerRegistry();
+            MetaObject metaObject = parameterObject == null ? null :
+                    configuration.newMetaObject(parameterObject);
+            for (int i = 0; i < parameterMappings.size(); i++) {
+                ParameterMapping parameterMapping = parameterMappings.get(i);
+                if (parameterMapping.getMode() != ParameterMode.OUT) {
+                    Object value;
+                    String propertyName = parameterMapping.getProperty();
+                    PropertyTokenizer prop = new PropertyTokenizer(propertyName);
+                    if (parameterObject == null) {
+                        value = null;
+                    } else if (typeHandlerRegistry.hasTypeHandler(parameterObject.getClass())) {
+                        value = parameterObject;
+                    } else if (boundSql.hasAdditionalParameter(propertyName)) {
+                        value = boundSql.getAdditionalParameter(propertyName);
+                    } else if (propertyName.startsWith(ForEachSqlNode.ITEM_PREFIX) && boundSql.hasAdditionalParameter(prop.getName())) {
+                        value = boundSql.getAdditionalParameter(prop.getName());
+                        if (value != null) {
+                            value = configuration.newMetaObject(value).getValue(propertyName.substring(prop.getName().length()));
+                        }
+                    } else {
+                        value = metaObject == null ? null : metaObject.getValue(propertyName);
+                    }
+                    @SuppressWarnings("rawtypes")
+					TypeHandler typeHandler = parameterMapping.getTypeHandler();
+                    if (typeHandler == null) {
+                        throw new ExecutorException("There was no TypeHandler found for parameter " + propertyName + " of statement " + mappedStatement.getId());
+                    }
+                    typeHandler.setParameter(ps, i + 1, value, parameterMapping.getJdbcType());
+                }
+            }
+        }
+    }
+
+
+    /**
+     * 查询总纪录数
+     * @param sql             SQL语句
+     * @param connection      数据库连接
+     * @param mappedStatement mapped
+     * @param parameterObject 参数
+     * @param boundSql        boundSql
+     * @return 总记录数
+     * @throws SQLException sql查询错误
+     */
+    public static int getCount(final String sql, final Connection connection,
+    							final MappedStatement mappedStatement, final Object parameterObject,
+    							final BoundSql boundSql, Log log) throws SQLException {
+    	String dbName = Global.getConfig("jdbc.type");
+		final String countSql;
+		if("oracle".equals(dbName)){
+			countSql = "select count(1) from (" + sql + ") tmp_count";
+		}else{
+			countSql = "select count(1) from (" + removeOrders(sql) + ") tmp_count";
+//	        countSql = "select count(1) " + removeSelect(removeOrders(sql));
+		}
+        Connection conn = connection;
+        PreparedStatement ps = null;
+        ResultSet rs = null;
+        try {
+        	if (log.isDebugEnabled()) {
+                log.debug("COUNT SQL: " + StringUtils.replaceEach(countSql, new String[]{"\n","\t"}, new String[]{" "," "}));
+            }
+        	if (conn == null){
+        		conn = mappedStatement.getConfiguration().getEnvironment().getDataSource().getConnection();
+            }
+        	ps = conn.prepareStatement(countSql);
+            BoundSql countBS = new BoundSql(mappedStatement.getConfiguration(), countSql,
+                    boundSql.getParameterMappings(), parameterObject);
+            //解决MyBatis 分页foreach 参数失效 start
+			if (Reflections.getFieldValue(boundSql, "metaParameters") != null) {
+				MetaObject mo = (MetaObject) Reflections.getFieldValue(boundSql, "metaParameters");
+				Reflections.setFieldValue(countBS, "metaParameters", mo);
+			}
+			//解决MyBatis 分页foreach 参数失效 end 
+            SQLHelper.setParameters(ps, mappedStatement, countBS, parameterObject);
+            rs = ps.executeQuery();
+            int count = 0;
+            if (rs.next()) {
+                count = rs.getInt(1);
+            }
+            return count;
+        } finally {
+            if (rs != null) {
+                rs.close();
+            }
+            if (ps != null) {
+            	ps.close();
+            }
+            if (conn != null) {
+            	conn.close();
+            }
+        }
+    }
+
+
+    /**
+     * 根据数据库方言,生成特定的分页sql
+     * @param sql     Mapper中的Sql语句
+     * @param page    分页对象
+     * @param dialect 方言类型
+     * @return 分页SQL
+     */
+    public static String generatePageSql(String sql, Page<Object> page, Dialect dialect) {
+        if (dialect.supportsLimit()) {
+            return dialect.getLimitString(sql, page.getFirstResult(), page.getMaxResults());
+        } else {
+            return sql;
+        }
+    }
+    
+    /** 
+     * 去除qlString的select子句。 
+     * @param hql 
+     * @return 
+     */  
+    @SuppressWarnings("unused")
+	private static String removeSelect(String qlString){  
+        int beginPos = qlString.toLowerCase().indexOf("from");  
+        return qlString.substring(beginPos);  
+    }  
+      
+    /** 
+     * 去除hql的orderBy子句。 
+     * @param hql 
+     * @return 
+     */  
+    @SuppressWarnings("unused")
+	private static String removeOrders(String qlString) {  
+        Pattern p = Pattern.compile("order\\s*by[\\w|\\W|\\s|\\S]*", Pattern.CASE_INSENSITIVE);  
+        Matcher m = p.matcher(qlString);  
+        StringBuffer sb = new StringBuffer();  
+        while (m.find()) {  
+            m.appendReplacement(sb, "");  
+        }
+        m.appendTail(sb);
+        return sb.toString();  
+    }
+    
+}

+ 37 - 0
src/main/java/com/lightinit/hsdatagateway/common/persistence/proxy/PageConfiguration.java

@@ -0,0 +1,37 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.persistence.proxy;
+
+import org.apache.ibatis.binding.MapperRegistry;
+import org.apache.ibatis.session.Configuration;
+import org.apache.ibatis.session.SqlSession;
+
+/**
+ * <p>
+ * 自定义Mybatis的配置,扩展.
+ * </p>
+ *
+ * @Author: yangrui
+ * @version 1.0 2012-05-13 上午10:06
+ * @since JDK 1.5
+ */
+public class PageConfiguration extends Configuration {
+	
+    protected MapperRegistry mapperRegistry = new PaginationMapperRegistry(this);
+
+    @Override
+    public <T> void addMapper(Class<T> type) {
+        mapperRegistry.addMapper(type);
+    }
+
+    @Override
+    public <T> T getMapper(Class<T> type, SqlSession sqlSession) {
+        return mapperRegistry.getMapper(type, sqlSession);
+    }
+
+    @Override
+    public boolean hasMapper(Class<?> type) {
+        return mapperRegistry.hasMapper(type);
+    }
+}

+ 191 - 0
src/main/java/com/lightinit/hsdatagateway/common/persistence/proxy/PaginationMapperMethod.java

@@ -0,0 +1,191 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.persistence.proxy;
+
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.binding.BindingException;
+import org.apache.ibatis.mapping.MappedStatement;
+import org.apache.ibatis.mapping.SqlCommandType;
+import org.apache.ibatis.session.Configuration;
+import org.apache.ibatis.session.RowBounds;
+import org.apache.ibatis.session.SqlSession;
+
+import com.lightinit.hsdatagateway.common.persistence.Page;
+
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ * 执行代理类,扩展Mybatis的方式来让其Mapper接口来支持.
+ * </p>
+ *
+ * @Author: yangrui
+ * @version 1.0 2012-05-13 上午10:09
+ * @since JDK 1.5
+ */
+public class PaginationMapperMethod {
+
+    private final SqlSession sqlSession;
+    private final Configuration config;
+
+    private SqlCommandType type;
+    private String commandName;
+    private String commandCountName;
+
+    private final Class<?> declaringInterface;
+    private final Method method;
+
+    private Integer rowBoundsIndex;
+    private Integer paginationIndex;
+
+    private final List<String> paramNames;
+    private final List<Integer> paramPositions;
+
+    private boolean hasNamedParameters;
+
+    public PaginationMapperMethod(Class<?> declaringInterface, Method method,
+                                  SqlSession sqlSession) {
+        paramNames = new ArrayList<String>();
+        paramPositions = new ArrayList<Integer>();
+        this.sqlSession = sqlSession;
+        this.method = method;
+        this.config = sqlSession.getConfiguration();
+        this.declaringInterface = declaringInterface;
+        this.hasNamedParameters = false;
+        setupFields();
+        setupMethodSignature();
+        setupCommandType();
+        validateStatement();
+    }
+
+    /**
+     * 代理执行方法。
+     *
+     * @param args 参数信息
+     * @return 执行结果
+     */
+    @SuppressWarnings("unchecked")
+    public Object execute(Object[] args) {
+        final Object param = getParam(args);
+        Page<Object> page;
+        RowBounds rowBounds;
+        if (paginationIndex != null) {
+            page = (Page<Object>) args[paginationIndex];
+            rowBounds =  new RowBounds(page.getFirstResult(), page.getMaxResults());
+        } else if (rowBoundsIndex != null) {
+            rowBounds = (RowBounds) args[rowBoundsIndex];
+            page = new Page<Object>();
+        } else {
+            throw new BindingException("Invalid bound statement (not found rowBounds or pagination in paramenters)");
+        }
+        page.setCount(executeForCount(param));
+        page.setList(executeForList(param, rowBounds));
+        return page;
+    }
+
+    /**
+     * 执行总数的方法,调用方法执行计算总数,取得总结果
+     *
+     * @param param 参数信息
+     * @return 查询的总记录数
+     */
+    private long executeForCount(Object param) {
+        Number result = (Number) sqlSession.selectOne(commandCountName, param);
+        return result.longValue();
+    }
+
+    /**
+     * 取得分页的执行结果,返回的是纪录信息
+     *
+     * @param param     参数
+     * @param rowBounds row
+     * @return 纪录列表
+     */
+    private List<Object> executeForList(Object param, RowBounds rowBounds) {
+        return sqlSession.selectList(commandName, param, rowBounds);
+    }
+
+    /**
+     * 取得当前执行的参数信息
+     *
+     * @param args 参数
+     * @return 参数信息
+     */
+    private Object getParam(Object[] args) {
+        final int paramCount = paramPositions.size();
+        if (args == null || paramCount == 0) {
+            return null;
+        } else if (!hasNamedParameters && paramCount == 1) {
+            return args[paramPositions.get(0)];
+        } else {
+            Map<String, Object> param = new HashMap<String, Object>();
+            for (int i = 0; i < paramCount; i++) {
+                param.put(paramNames.get(i), args[paramPositions.get(i)]);
+            }
+            return param;
+        }
+    }
+
+    private void setupMethodSignature() {
+        final Class<?>[] argTypes = method.getParameterTypes();
+        for (int i = 0; i < argTypes.length; i++) {
+            if (Page.class.isAssignableFrom(argTypes[i])) {
+                paginationIndex = i;
+            } else if (RowBounds.class.isAssignableFrom(argTypes[i])) {
+                rowBoundsIndex = i;
+            } else {
+                String paramName = String.valueOf(paramPositions.size());
+                paramName = getParamNameFromAnnotation(i, paramName);
+                paramNames.add(paramName);
+                paramPositions.add(i);
+            }
+        }
+    }
+
+    private String getParamNameFromAnnotation(int i, String paramName) {
+        Object[] annotations = method.getParameterAnnotations()[i];
+        for (Object annotation : annotations) {
+            if (annotation instanceof Param) {
+                hasNamedParameters = true;
+                paramName = ((Param) annotation).value();
+            }
+        }
+        return paramName;
+    }
+
+    /**
+     * 设置当前的查询总记录数的ID
+     */
+    private void setupFields() {
+        commandName = declaringInterface.getName() + "." + method.getName();
+        commandCountName = commandName + "Count"; // 命名约定
+    }
+
+    /**
+     * 设置当前的参数的类型信息
+     */
+    private void setupCommandType() {
+        MappedStatement ms = config.getMappedStatement(commandName);
+        type = ms.getSqlCommandType();
+        if (type != SqlCommandType.SELECT) {
+            throw new BindingException("Unsupport execution method for: " + commandName);
+        }
+    }
+
+    /**
+     * 验证Statement
+     */
+    private void validateStatement() {
+        if (!config.hasStatement(commandName)) {
+            throw new BindingException("Invalid bound statement (not found): " + commandName);
+        }
+        if (!config.hasStatement(commandCountName)) {
+            throw new BindingException("Invalid bound statement (not found): " + commandCountName);
+        }
+    }
+}

+ 104 - 0
src/main/java/com/lightinit/hsdatagateway/common/persistence/proxy/PaginationMapperProxy.java

@@ -0,0 +1,104 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.persistence.proxy;
+
+import org.apache.ibatis.binding.BindingException;
+import org.apache.ibatis.binding.MapperMethod;
+import org.apache.ibatis.session.SqlSession;
+
+import com.lightinit.hsdatagateway.common.persistence.Page;
+import com.lightinit.hsdatagateway.common.utils.Reflections;
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * <p>
+ * .
+ * </p>
+ *
+ * @Author: yangrui
+ * @version 1.0 2012-05-13 上午10:07
+ * @since JDK 1.5
+ */
+public class PaginationMapperProxy implements InvocationHandler {
+
+
+    private static final Set<String> OBJECT_METHODS = new HashSet<String>() {
+        private static final long serialVersionUID = -1782950882770203583L;
+        {
+            add("toString");
+            add("getClass");
+            add("hashCode");
+            add("equals");
+            add("wait");
+            add("notify");
+            add("notifyAll");
+        }
+    };
+
+    private boolean isObjectMethod(Method method) {
+        return OBJECT_METHODS.contains(method.getName());
+    }
+
+    private final SqlSession sqlSession;
+
+    private PaginationMapperProxy(final SqlSession sqlSession) {
+        this.sqlSession = sqlSession;
+    }
+
+    @Override
+    public Object invoke(Object proxy, Method method, Object[] args)
+            throws Throwable {
+        if (isObjectMethod(method)) {
+            return null;
+        }
+        final Class<?> declaringInterface = findDeclaringInterface(proxy, method);
+        if (Page.class.isAssignableFrom(method.getReturnType())) {
+            // 分页处理
+            return new PaginationMapperMethod(declaringInterface, method, sqlSession).execute(args);
+        }
+        // 原处理方式
+        final MapperMethod mapperMethod = new MapperMethod(declaringInterface, method, sqlSession.getConfiguration());
+        final Object result = mapperMethod.execute(sqlSession, args);
+        if (result == null && method.getReturnType().isPrimitive()) {
+            throw new BindingException(
+                    "Mapper method '"
+                            + method.getName()
+                            + "' ("
+                            + method.getDeclaringClass()
+                            + ") attempted to return null from a method with a primitive return type ("
+                            + method.getReturnType() + ").");
+        }
+        return result;
+    }
+
+    private Class<?> findDeclaringInterface(Object proxy, Method method) {
+        Class<?> declaringInterface = null;
+        for (Class<?> mapperFaces : proxy.getClass().getInterfaces()) {
+            Method m = Reflections.getAccessibleMethod(mapperFaces,
+                    method.getName(),
+                    method.getParameterTypes());
+            if (m != null) {
+                declaringInterface = mapperFaces;
+            }
+        }
+        if (declaringInterface == null) {
+            throw new BindingException(
+                    "Could not find interface with the given method " + method);
+        }
+        return declaringInterface;
+    }
+
+    @SuppressWarnings("unchecked")
+    public static <T> T newMapperProxy(Class<T> mapperInterface, SqlSession sqlSession) {
+        ClassLoader classLoader = mapperInterface.getClassLoader();
+        Class<?>[] interfaces = new Class[]{mapperInterface};
+        PaginationMapperProxy proxy = new PaginationMapperProxy(sqlSession);
+        return (T) Proxy.newProxyInstance(classLoader, interfaces, proxy);
+    }
+}

+ 36 - 0
src/main/java/com/lightinit/hsdatagateway/common/persistence/proxy/PaginationMapperRegistry.java

@@ -0,0 +1,36 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.persistence.proxy;
+
+import org.apache.ibatis.binding.BindingException;
+import org.apache.ibatis.binding.MapperRegistry;
+import org.apache.ibatis.session.Configuration;
+import org.apache.ibatis.session.SqlSession;
+
+/**
+ * <p>
+ * .
+ * </p>
+ *
+ * @Author: yangrui
+ * @version 1.0 2012-05-13 上午10:06
+ * @since JDK 1.5
+ */
+public class PaginationMapperRegistry extends MapperRegistry {
+    public PaginationMapperRegistry(Configuration config) {
+        super(config);
+    }
+
+    @Override
+    public <T> T getMapper(Class<T> type, SqlSession sqlSession) {
+        if (!hasMapper(type)) {
+            throw new BindingException("Type " + type + " is not known to the MapperRegistry.");
+        }
+        try {
+            return PaginationMapperProxy.newMapperProxy(type, sqlSession);
+        } catch (Exception e) {
+            throw new BindingException("Error getting mapper instance. Cause: " + e, e);
+        }
+    }
+}

+ 260 - 0
src/main/java/com/lightinit/hsdatagateway/common/security/Cryptos.java

@@ -0,0 +1,260 @@
+/**
+ * Copyright (c) 2005-2012 springside.org.cn
+ */
+package com.lightinit.hsdatagateway.common.security;
+
+import java.io.UnsupportedEncodingException;
+import java.security.GeneralSecurityException;
+import java.security.SecureRandom;
+import java.util.Arrays;
+
+import javax.crypto.Cipher;
+import javax.crypto.KeyGenerator;
+import javax.crypto.Mac;
+import javax.crypto.SecretKey;
+import javax.crypto.spec.IvParameterSpec;
+import javax.crypto.spec.SecretKeySpec;
+
+import com.lightinit.hsdatagateway.common.utils.Encodes;
+import com.lightinit.hsdatagateway.common.utils.Exceptions;
+
+/**
+ * 支持HMAC-SHA1消息签名 及 DES/AES对称加密的工具类.
+ * 
+ * 支持Hex与Base64两种编码方式.
+ * 
+ * @Author yangrui
+ */
+public class Cryptos {
+
+	private static final String AES = "AES";
+	private static final String AES_CBC = "AES/CBC/PKCS5Padding";
+	private static final String HMACSHA1 = "HmacSHA1";
+
+	private static final String DEFAULT_URL_ENCODING = "UTF-8";
+	private static final int DEFAULT_HMACSHA1_KEYSIZE = 160; //RFC2401
+	private static final int DEFAULT_AES_KEYSIZE = 128;
+	private static final int DEFAULT_IVSIZE = 16;
+	
+	private static final byte[] DEFAULT_KEY = new byte[]{-97,88,-94,9,70,-76,126,25,0,3,-20,113,108,28,69,125}; 
+
+	private static SecureRandom random = new SecureRandom();
+
+	//-- HMAC-SHA1 funciton --//
+	/**
+	 * 使用HMAC-SHA1进行消息签名, 返回字节数组,长度为20字节.
+	 * 
+	 * @param input 原始输入字符数组
+	 * @param key HMAC-SHA1密钥
+	 */
+	public static byte[] hmacSha1(byte[] input, byte[] key) {
+		try {
+			SecretKey secretKey = new SecretKeySpec(key, HMACSHA1);
+			Mac mac = Mac.getInstance(HMACSHA1);
+			mac.init(secretKey);
+			return mac.doFinal(input);
+		} catch (GeneralSecurityException e) {
+			throw Exceptions.unchecked(e);
+		}
+	}
+
+	/**
+	 * 校验HMAC-SHA1签名是否正确.
+	 * 
+	 * @param expected 已存在的签名
+	 * @param input 原始输入字符串
+	 * @param key 密钥
+	 */
+	public static boolean isMacValid(byte[] expected, byte[] input, byte[] key) {
+		byte[] actual = hmacSha1(input, key);
+		return Arrays.equals(expected, actual);
+	}
+
+	/**
+	 * 生成HMAC-SHA1密钥,返回字节数组,长度为160位(20字节).
+	 * HMAC-SHA1算法对密钥无特殊要求, RFC2401建议最少长度为160位(20字节).
+	 */
+	public static byte[] generateHmacSha1Key() {
+		try {
+			KeyGenerator keyGenerator = KeyGenerator.getInstance(HMACSHA1);
+			keyGenerator.init(DEFAULT_HMACSHA1_KEYSIZE);
+			SecretKey secretKey = keyGenerator.generateKey();
+			return secretKey.getEncoded();
+		} catch (GeneralSecurityException e) {
+			throw Exceptions.unchecked(e);
+		}
+	}
+
+	//-- AES funciton --//
+
+	/**
+	 * 使用AES加密原始字符串.
+	 * 
+	 * @param input 原始输入字符数组
+	 */
+	public static String aesEncrypt(String input) {
+		try {
+			return Encodes.encodeHex(aesEncrypt(input.getBytes(DEFAULT_URL_ENCODING), DEFAULT_KEY));
+		} catch (UnsupportedEncodingException e) {
+			return "";
+		}
+	}
+	
+	/**
+	 * 使用AES加密原始字符串.
+	 * 
+	 * @param input 原始输入字符数组
+	 * @param key 符合AES要求的密钥
+	 */
+	public static String aesEncrypt(String input, String key) {
+		try {
+			return Encodes.encodeHex(aesEncrypt(input.getBytes(DEFAULT_URL_ENCODING), Encodes.decodeHex(key)));
+		} catch (UnsupportedEncodingException e) {
+			return "";
+		}
+	}
+	
+	/**
+	 * 使用AES加密原始字符串.
+	 * 
+	 * @param input 原始输入字符数组
+	 * @param key 符合AES要求的密钥
+	 */
+	public static byte[] aesEncrypt(byte[] input, byte[] key) {
+		return aes(input, key, Cipher.ENCRYPT_MODE);
+	}
+
+	/**
+	 * 使用AES加密原始字符串.
+	 * 
+	 * @param input 原始输入字符数组
+	 * @param key 符合AES要求的密钥
+	 * @param iv 初始向量
+	 */
+	public static byte[] aesEncrypt(byte[] input, byte[] key, byte[] iv) {
+		return aes(input, key, iv, Cipher.ENCRYPT_MODE);
+	}
+
+	/**
+	 * 使用AES解密字符串, 返回原始字符串.
+	 * 
+	 * @param input Hex编码的加密字符串
+	 */
+	public static String aesDecrypt(String input) {
+		try {
+			return new String(aesDecrypt(Encodes.decodeHex(input), DEFAULT_KEY), DEFAULT_URL_ENCODING);
+		} catch (UnsupportedEncodingException e) {
+			return "";
+		}
+	}
+	
+	/**
+	 * 使用AES解密字符串, 返回原始字符串.
+	 * 
+	 * @param input Hex编码的加密字符串
+	 * @param key 符合AES要求的密钥
+	 */
+	public static String aesDecrypt(String input, String key) {
+		try {
+			return new String(aesDecrypt(Encodes.decodeHex(input), Encodes.decodeHex(key)), DEFAULT_URL_ENCODING);
+		} catch (UnsupportedEncodingException e) {
+			return "";
+		}
+	}
+	
+	/**
+	 * 使用AES解密字符串, 返回原始字符串.
+	 * 
+	 * @param input Hex编码的加密字符串
+	 * @param key 符合AES要求的密钥
+	 */
+	public static byte[] aesDecrypt(byte[] input, byte[] key) {
+		return aes(input, key, Cipher.DECRYPT_MODE);
+	}
+
+	/**
+	 * 使用AES解密字符串, 返回原始字符串.
+	 * 
+	 * @param input Hex编码的加密字符串
+	 * @param key 符合AES要求的密钥
+	 * @param iv 初始向量
+	 */
+	public static byte[] aesDecrypt(byte[] input, byte[] key, byte[] iv) {
+		return aes(input, key, iv, Cipher.DECRYPT_MODE);
+	}
+
+	/**
+	 * 使用AES加密或解密无编码的原始字节数组, 返回无编码的字节数组结果.
+	 * 
+	 * @param input 原始字节数组
+	 * @param key 符合AES要求的密钥
+	 * @param mode Cipher.ENCRYPT_MODE 或 Cipher.DECRYPT_MODE
+	 */
+	private static byte[] aes(byte[] input, byte[] key, int mode) {
+		try {
+			SecretKey secretKey = new SecretKeySpec(key, AES);
+			Cipher cipher = Cipher.getInstance(AES);
+			cipher.init(mode, secretKey);
+			return cipher.doFinal(input);
+		} catch (GeneralSecurityException e) {
+			throw Exceptions.unchecked(e);
+		}
+	}
+
+	/**
+	 * 使用AES加密或解密无编码的原始字节数组, 返回无编码的字节数组结果.
+	 * 
+	 * @param input 原始字节数组
+	 * @param key 符合AES要求的密钥
+	 * @param iv 初始向量
+	 * @param mode Cipher.ENCRYPT_MODE 或 Cipher.DECRYPT_MODE
+	 */
+	private static byte[] aes(byte[] input, byte[] key, byte[] iv, int mode) {
+		try {
+			SecretKey secretKey = new SecretKeySpec(key, AES);
+			IvParameterSpec ivSpec = new IvParameterSpec(iv);
+			Cipher cipher = Cipher.getInstance(AES_CBC);
+			cipher.init(mode, secretKey, ivSpec);
+			return cipher.doFinal(input);
+		} catch (GeneralSecurityException e) {
+			throw Exceptions.unchecked(e);
+		}
+	}
+
+	/**
+	 * 生成AES密钥,返回字节数组, 默认长度为128位(16字节).
+	 */
+	public static String generateAesKeyString() {
+		return Encodes.encodeHex(generateAesKey(DEFAULT_AES_KEYSIZE));
+	}
+	
+	/**
+	 * 生成AES密钥,返回字节数组, 默认长度为128位(16字节).
+	 */
+	public static byte[] generateAesKey() {
+		return generateAesKey(DEFAULT_AES_KEYSIZE);
+	}
+
+	/**
+	 * 生成AES密钥,可选长度为128,192,256位.
+	 */
+	public static byte[] generateAesKey(int keysize) {
+		try {
+			KeyGenerator keyGenerator = KeyGenerator.getInstance(AES);
+			keyGenerator.init(keysize);
+			SecretKey secretKey = keyGenerator.generateKey();
+			return secretKey.getEncoded();
+		} catch (GeneralSecurityException e) {
+			throw Exceptions.unchecked(e);
+		}
+	}
+
+	/**
+	 * 生成随机向量,默认大小为cipher.getBlockSize(), 16字节.
+	 */
+	public static byte[] generateIV() {
+		byte[] bytes = new byte[DEFAULT_IVSIZE];
+		random.nextBytes(bytes);
+		return bytes;
+	}
+}

+ 123 - 0
src/main/java/com/lightinit/hsdatagateway/common/security/Digests.java

@@ -0,0 +1,123 @@
+/**
+ * Copyright (c) 2005-2012 springside.org.cn
+ */
+package com.lightinit.hsdatagateway.common.security;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.security.GeneralSecurityException;
+import java.security.MessageDigest;
+import java.security.SecureRandom;
+
+import org.apache.commons.lang3.Validate;
+
+import com.lightinit.hsdatagateway.common.utils.Exceptions;
+
+/**
+ * 支持SHA-1/MD5消息摘要的工具类.
+ * 
+ * 返回ByteSource,可进一步被编码为Hex, Base64或UrlSafeBase64
+ * 
+ * @Author yangrui
+ */
+public class Digests {
+
+	private static final String SHA1 = "SHA-1";
+	private static final String MD5 = "MD5";
+
+	private static SecureRandom random = new SecureRandom();
+
+	/**
+	 * 对输入字符串进行md5散列.
+	 */
+	public static byte[] md5(byte[] input) {
+		return digest(input, MD5, null, 1);
+	}
+	public static byte[] md5(byte[] input, int iterations) {
+		return digest(input, MD5, null, iterations);
+	}
+	
+	/**
+	 * 对输入字符串进行sha1散列.
+	 */
+	public static byte[] sha1(byte[] input) {
+		return digest(input, SHA1, null, 1);
+	}
+
+	public static byte[] sha1(byte[] input, byte[] salt) {
+		return digest(input, SHA1, salt, 1);
+	}
+
+	public static byte[] sha1(byte[] input, byte[] salt, int iterations) {
+		return digest(input, SHA1, salt, iterations);
+	}
+
+	/**
+	 * 对字符串进行散列, 支持md5与sha1算法.
+	 */
+	private static byte[] digest(byte[] input, String algorithm, byte[] salt, int iterations) {
+		try {
+			MessageDigest digest = MessageDigest.getInstance(algorithm);
+
+			if (salt != null) {
+				digest.update(salt);
+			}
+
+			byte[] result = digest.digest(input);
+
+			for (int i = 1; i < iterations; i++) {
+				digest.reset();
+				result = digest.digest(result);
+			}
+			return result;
+		} catch (GeneralSecurityException e) {
+			throw Exceptions.unchecked(e);
+		}
+	}
+
+	/**
+	 * 生成随机的Byte[]作为salt.
+	 * 
+	 * @param numBytes byte数组的大小
+	 */
+	public static byte[] generateSalt(int numBytes) {
+		Validate.isTrue(numBytes > 0, "numBytes argument must be a positive integer (1 or larger)", numBytes);
+
+		byte[] bytes = new byte[numBytes];
+		random.nextBytes(bytes);
+		return bytes;
+	}
+
+	/**
+	 * 对文件进行md5散列.
+	 */
+	public static byte[] md5(InputStream input) throws IOException {
+		return digest(input, MD5);
+	}
+
+	/**
+	 * 对文件进行sha1散列.
+	 */
+	public static byte[] sha1(InputStream input) throws IOException {
+		return digest(input, SHA1);
+	}
+
+	private static byte[] digest(InputStream input, String algorithm) throws IOException {
+		try {
+			MessageDigest messageDigest = MessageDigest.getInstance(algorithm);
+			int bufferLength = 8 * 1024;
+			byte[] buffer = new byte[bufferLength];
+			int read = input.read(buffer, 0, bufferLength);
+
+			while (read > -1) {
+				messageDigest.update(buffer, 0, read);
+				read = input.read(buffer, 0, bufferLength);
+			}
+
+			return messageDigest.digest();
+		} catch (GeneralSecurityException e) {
+			throw Exceptions.unchecked(e);
+		}
+	}
+	
+}

+ 40 - 0
src/main/java/com/lightinit/hsdatagateway/common/security/shiro/HasAnyPermissionsTag.java

@@ -0,0 +1,40 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.security.shiro;
+
+import org.apache.shiro.subject.Subject;
+import org.apache.shiro.web.tags.PermissionTag;
+
+/**
+ * Shiro HasAnyPermissions Tag.
+ * 
+ * @Author yangrui
+ */
+public class HasAnyPermissionsTag extends PermissionTag {
+
+	private static final long serialVersionUID = 1L;
+	private static final String PERMISSION_NAMES_DELIMETER = ",";
+
+	@Override
+	protected boolean showTagBody(String permissionNames) {
+		boolean hasAnyPermission = false;
+
+		Subject subject = getSubject();
+
+		if (subject != null) {
+			// Iterate through permissions and check to see if the user has one of the permissions
+			for (String permission : permissionNames.split(PERMISSION_NAMES_DELIMETER)) {
+
+				if (subject.isPermitted(permission.trim())) {
+					hasAnyPermission = true;
+					break;
+				}
+
+			}
+		}
+
+		return hasAnyPermission;
+	}
+
+}

+ 217 - 0
src/main/java/com/lightinit/hsdatagateway/common/security/shiro/cache/JedisCacheManager.java

@@ -0,0 +1,217 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.security.shiro.cache;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Set;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.shiro.cache.Cache;
+import org.apache.shiro.cache.CacheException;
+import org.apache.shiro.cache.CacheManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import redis.clients.jedis.Jedis;
+
+import com.google.common.collect.Sets;
+import com.lightinit.hsdatagateway.common.utils.JedisUtils;
+import com.lightinit.hsdatagateway.common.web.Servlets;
+
+/**
+ * 自定义授权缓存管理类
+ * @Author yangrui
+ * @version 2014-7-20
+ */
+public class JedisCacheManager implements CacheManager {
+
+	private String cacheKeyPrefix = "shiro_cache_";
+	
+	@Override
+	public <K, V> Cache<K, V> getCache(String name) throws CacheException {
+		return new JedisCache<K, V>(cacheKeyPrefix + name);
+	}
+
+	public String getCacheKeyPrefix() {
+		return cacheKeyPrefix;
+	}
+
+	public void setCacheKeyPrefix(String cacheKeyPrefix) {
+		this.cacheKeyPrefix = cacheKeyPrefix;
+	}
+	
+	/**
+	 * 自定义授权缓存管理类
+	 * @Author yangrui
+	 * @version 2014-7-20
+	 */
+	public class JedisCache<K, V> implements Cache<K, V> {
+
+		private Logger logger = LoggerFactory.getLogger(getClass());
+
+		private String cacheKeyName = null;
+
+		public JedisCache(String cacheKeyName) {
+			this.cacheKeyName = cacheKeyName;
+//			if (!JedisUtils.exists(cacheKeyName)){
+//				Map<String, Object> map = Maps.newHashMap();
+//				JedisUtils.setObjectMap(cacheKeyName, map, 60 * 60 * 24);
+//			}
+//			logger.debug("Init: cacheKeyName {} ", cacheKeyName);
+		}
+		
+		@SuppressWarnings("unchecked")
+		@Override
+		public V get(K key) throws CacheException {
+			if (key == null){
+				return null;
+			}
+			
+			V v = null;
+			HttpServletRequest request = Servlets.getRequest();
+			if (request != null){
+				v = (V)request.getAttribute(cacheKeyName);
+				if (v != null){
+					return v;
+				}
+			}
+			
+			V value = null;
+			Jedis jedis = null;
+			try {
+				jedis = JedisUtils.getResource();
+				value = (V)JedisUtils.toObject(jedis.hget(JedisUtils.getBytesKey(cacheKeyName), JedisUtils.getBytesKey(key)));
+				logger.debug("get {} {} {}", cacheKeyName, key, request != null ? request.getRequestURI() : "");
+			} catch (Exception e) {
+				logger.error("get {} {} {}", cacheKeyName, key, request != null ? request.getRequestURI() : "", e);
+			} finally {
+				JedisUtils.returnResource(jedis);
+			}
+			
+			if (request != null && value != null){
+				request.setAttribute(cacheKeyName, value);
+			}
+			
+			return value;
+		}
+
+		@Override
+		public V put(K key, V value) throws CacheException {
+			if (key == null){
+				return null;
+			}
+			
+			Jedis jedis = null;
+			try {
+				jedis = JedisUtils.getResource();
+				jedis.hset(JedisUtils.getBytesKey(cacheKeyName), JedisUtils.getBytesKey(key), JedisUtils.toBytes(value));
+				logger.debug("put {} {} = {}", cacheKeyName, key, value);
+			} catch (Exception e) {
+				logger.error("put {} {}", cacheKeyName, key, e);
+			} finally {
+				JedisUtils.returnResource(jedis);
+			}
+			return value;
+		}
+
+		@SuppressWarnings("unchecked")
+		@Override
+		public V remove(K key) throws CacheException {
+			V value = null;
+			Jedis jedis = null;
+			try {
+				jedis = JedisUtils.getResource();
+				value = (V)JedisUtils.toObject(jedis.hget(JedisUtils.getBytesKey(cacheKeyName), JedisUtils.getBytesKey(key)));
+				jedis.hdel(JedisUtils.getBytesKey(cacheKeyName), JedisUtils.getBytesKey(key));
+				logger.debug("remove {} {}", cacheKeyName, key);
+			} catch (Exception e) {
+				logger.warn("remove {} {}", cacheKeyName, key, e);
+			} finally {
+				JedisUtils.returnResource(jedis);
+			}
+			return value;
+		}
+
+		@Override
+		public void clear() throws CacheException {
+			Jedis jedis = null;
+			try {
+				jedis = JedisUtils.getResource();
+				jedis.hdel(JedisUtils.getBytesKey(cacheKeyName));
+				logger.debug("clear {}", cacheKeyName);
+			} catch (Exception e) {
+				logger.error("clear {}", cacheKeyName, e);
+			} finally {
+				JedisUtils.returnResource(jedis);
+			}
+		}
+
+		@Override
+		public int size() {
+			int size = 0;
+			Jedis jedis = null;
+			try {
+				jedis = JedisUtils.getResource();
+				size = jedis.hlen(JedisUtils.getBytesKey(cacheKeyName)).intValue();
+				logger.debug("size {} {} ", cacheKeyName, size);
+				return size;
+			} catch (Exception e) {
+				logger.error("clear {}",  cacheKeyName, e);
+			} finally {
+				JedisUtils.returnResource(jedis);
+			}
+			return size;
+		}
+
+		@SuppressWarnings("unchecked")
+		@Override
+		public Set<K> keys() {
+			Set<K> keys = Sets.newHashSet();
+			Jedis jedis = null;
+			try {
+				jedis = JedisUtils.getResource();
+				Set<byte[]> set = jedis.hkeys(JedisUtils.getBytesKey(cacheKeyName));
+				for(byte[] key : set){
+					Object obj = (K)JedisUtils.getObjectKey(key);
+					if (obj != null){
+						keys.add((K) obj);
+					}
+	        	}
+				logger.debug("keys {} {} ", cacheKeyName, keys);
+				return keys;
+			} catch (Exception e) {
+				logger.error("keys {}", cacheKeyName, e);
+			} finally {
+				JedisUtils.returnResource(jedis);
+			}
+			return keys;
+		}
+
+		@SuppressWarnings("unchecked")
+		@Override
+		public Collection<V> values() {
+			Collection<V> vals = Collections.emptyList();;
+			Jedis jedis = null;
+			try {
+				jedis = JedisUtils.getResource();
+				Collection<byte[]> col = jedis.hvals(JedisUtils.getBytesKey(cacheKeyName));
+				for(byte[] val : col){
+					Object obj = JedisUtils.toObject(val);
+					if (obj != null){
+						vals.add((V) obj);
+					}
+	        	}
+				logger.debug("values {} {} ", cacheKeyName, vals);
+				return vals;
+			} catch (Exception e) {
+				logger.error("values {}",  cacheKeyName, e);
+			} finally {
+				JedisUtils.returnResource(jedis);
+			}
+			return vals;
+		}
+	}
+}

+ 144 - 0
src/main/java/com/lightinit/hsdatagateway/common/security/shiro/cache/SessionCacheManager.java

@@ -0,0 +1,144 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.security.shiro.cache;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Set;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.UnavailableSecurityManagerException;
+import org.apache.shiro.cache.Cache;
+import org.apache.shiro.cache.CacheException;
+import org.apache.shiro.cache.CacheManager;
+import org.apache.shiro.session.InvalidSessionException;
+import org.apache.shiro.session.Session;
+import org.apache.shiro.subject.Subject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.common.collect.Sets;
+import com.lightinit.hsdatagateway.common.web.Servlets;
+
+/**
+ * 自定义授权缓存管理类
+ * @Author yangrui
+ * @version 2014-7-21
+ */
+public class SessionCacheManager implements CacheManager {
+
+	@Override
+	public <K, V> Cache<K, V> getCache(String name) throws CacheException {
+		return new SessionCache<K, V>(name);
+	}
+
+	/**
+	 * SESSION缓存管理类
+	 */
+	public class SessionCache<K, V> implements Cache<K, V> {
+
+		private Logger logger = LoggerFactory.getLogger(getClass());
+		
+		private String cacheKeyName = null;
+
+		public SessionCache(String cacheKeyName) {
+			this.cacheKeyName = cacheKeyName;
+		}
+		
+		public Session getSession(){
+			Session session = null;
+			try{
+				Subject subject = SecurityUtils.getSubject();
+				session = subject.getSession(false);
+				if (session == null){
+					session = subject.getSession();
+				}
+			}catch (InvalidSessionException e){
+				logger.error("Invalid session error", e);
+			}catch (UnavailableSecurityManagerException e2){
+				logger.error("Unavailable SecurityManager error", e2);
+			}
+			return session;
+		}
+		
+		@SuppressWarnings("unchecked")
+		@Override
+		public V get(K key) throws CacheException {
+			if (key == null){
+				return null;
+			}
+			
+			V v = null;
+			HttpServletRequest request = Servlets.getRequest();
+			if (request != null){
+				v = (V)request.getAttribute(cacheKeyName);
+				if (v != null){
+					return v;
+				}
+			}
+			
+			V value = null;
+			value = (V)getSession().getAttribute(cacheKeyName);
+			logger.debug("get {} {} {}", cacheKeyName, key, request != null ? request.getRequestURI() : "");
+			
+			if (request != null && value != null){
+				request.setAttribute(cacheKeyName, value);
+			}
+			return value;
+		}
+
+		@Override
+		public V put(K key, V value) throws CacheException {
+			if (key == null){
+				return null;
+			}
+
+			getSession().setAttribute(cacheKeyName, value);
+			
+			if (logger.isDebugEnabled()){
+				HttpServletRequest request = Servlets.getRequest();
+				logger.debug("put {} {} {}", cacheKeyName, key, request != null ? request.getRequestURI() : "");
+			}
+			
+			return value;
+		}
+
+		@SuppressWarnings("unchecked")
+		@Override
+		public V remove(K key) throws CacheException {
+			
+			V value = null;
+			value = (V)getSession().removeAttribute(cacheKeyName);
+			logger.debug("remove {} {}", cacheKeyName, key);
+			
+			return value;
+		}
+
+		@Override
+		public void clear() throws CacheException {
+			getSession().removeAttribute(cacheKeyName);
+			logger.debug("clear {}", cacheKeyName);
+		}
+
+		@Override
+		public int size() {
+			logger.debug("invoke session size abstract size method not supported.");
+			return 0;
+		}
+
+		@Override
+		public Set<K> keys() {
+			logger.debug("invoke session keys abstract size method not supported.");
+			return Sets.newHashSet();
+		}
+
+		@Override
+		public Collection<V> values() {
+			logger.debug("invoke session values abstract size method not supported.");
+			return Collections.emptyList();
+		}
+	}
+}

+ 176 - 0
src/main/java/com/lightinit/hsdatagateway/common/security/shiro/session/CacheSessionDAO.java

@@ -0,0 +1,176 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.security.shiro.session;
+
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.Set;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.shiro.session.Session;
+import org.apache.shiro.session.UnknownSessionException;
+import org.apache.shiro.session.mgt.eis.EnterpriseCacheSessionDAO;
+import org.apache.shiro.subject.PrincipalCollection;
+import org.apache.shiro.subject.support.DefaultSubjectContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.common.collect.Sets;
+
+import com.lightinit.hsdatagateway.common.config.Global;
+import com.lightinit.hsdatagateway.common.utils.DateUtils;
+import com.lightinit.hsdatagateway.common.utils.StringUtils;
+import com.lightinit.hsdatagateway.common.web.Servlets;
+
+/**
+ * 系统安全认证实现类
+ * @Author yangrui
+ * @version 2014-7-24
+ */
+public class CacheSessionDAO extends EnterpriseCacheSessionDAO implements SessionDAO {
+
+	private Logger logger = LoggerFactory.getLogger(getClass());
+	
+    public CacheSessionDAO() {
+        super();
+    }
+
+    @Override
+    protected void doUpdate(Session session) {
+    	if (session == null || session.getId() == null) {  
+            return;
+        }
+    	
+    	HttpServletRequest request = Servlets.getRequest();
+		if (request != null){
+			String uri = request.getServletPath();
+			// 如果是静态文件,则不更新SESSION
+			if (Servlets.isStaticFile(uri)){
+				return;
+			}
+			// 如果是视图文件,则不更新SESSION
+			if (StringUtils.startsWith(uri, Global.getConfig("web.view.prefix"))
+					&& StringUtils.endsWith(uri, Global.getConfig("web.view.suffix"))){
+				return;
+			}
+			// 手动控制不更新SESSION
+			String updateSession = request.getParameter("updateSession");
+			if (Global.FALSE.equals(updateSession) || Global.NO.equals(updateSession)){
+				return;
+			}
+		}
+    	super.doUpdate(session);
+    	logger.debug("update {} {}", session.getId(), request != null ? request.getRequestURI() : "");
+    }
+
+    @Override
+    protected void doDelete(Session session) {
+    	if (session == null || session.getId() == null) {  
+            return;
+        }
+    	
+    	super.doDelete(session);
+    	logger.debug("delete {} ", session.getId());
+    }
+
+    @Override
+    protected Serializable doCreate(Session session) {
+		HttpServletRequest request = Servlets.getRequest();
+		if (request != null){
+			String uri = request.getServletPath();
+			// 如果是静态文件,则不创建SESSION
+			if (Servlets.isStaticFile(uri)){
+		        return null;
+			}
+		}
+		super.doCreate(session);
+		logger.debug("doCreate {} {}", session, request != null ? request.getRequestURI() : "");
+    	return session.getId();
+    }
+
+    @Override
+    protected Session doReadSession(Serializable sessionId) {
+		return super.doReadSession(sessionId);
+    }
+    
+    @Override
+    public Session readSession(Serializable sessionId) throws UnknownSessionException {
+    	try{
+    		Session s = null;
+    		HttpServletRequest request = Servlets.getRequest();
+    		if (request != null){
+    			String uri = request.getServletPath();
+    			// 如果是静态文件,则不获取SESSION
+    			if (Servlets.isStaticFile(uri)){
+    				return null;
+    			}
+    			s = (Session)request.getAttribute("session_"+sessionId);
+    		}
+    		if (s != null){
+    			return s;
+    		}
+
+    		Session session = super.readSession(sessionId);
+    		logger.debug("readSession {} {}", sessionId, request != null ? request.getRequestURI() : "");
+    		
+    		if (request != null && session != null){
+    			request.setAttribute("session_"+sessionId, session);
+    		}
+    		
+    		return session;
+    	}catch (UnknownSessionException e) {
+			return null;
+		}
+    }
+
+    /**
+	 * 获取活动会话
+	 * @param includeLeave 是否包括离线(最后访问时间大于3分钟为离线会话)
+	 * @return
+	 */
+	@Override
+	public Collection<Session> getActiveSessions(boolean includeLeave) {
+		return getActiveSessions(includeLeave, null, null);
+	}
+    
+    /**
+	 * 获取活动会话
+	 * @param includeLeave 是否包括离线(最后访问时间大于3分钟为离线会话)
+	 * @param principal 根据登录者对象获取活动会话
+	 * @param filterSession 不为空,则过滤掉(不包含)这个会话。
+	 * @return
+	 */
+	@Override
+	public Collection<Session> getActiveSessions(boolean includeLeave, Object principal, Session filterSession) {
+		// 如果包括离线,并无登录者条件。
+		if (includeLeave && principal == null){
+			return getActiveSessions();
+		}
+		Set<Session> sessions = Sets.newHashSet();
+		for (Session session : getActiveSessions()){
+			boolean isActiveSession = false;
+			// 不包括离线并符合最后访问时间小于等于3分钟条件。
+			if (includeLeave || DateUtils.pastMinutes(session.getLastAccessTime()) <= 3){
+				isActiveSession = true;
+			}
+			// 符合登陆者条件。
+			if (principal != null){
+				PrincipalCollection pc = (PrincipalCollection)session.getAttribute(DefaultSubjectContext.PRINCIPALS_SESSION_KEY);
+				if (principal.toString().equals(pc != null ? pc.getPrimaryPrincipal().toString() : StringUtils.EMPTY)){
+					isActiveSession = true;
+				}
+			}
+			// 过滤掉的SESSION
+			if (filterSession != null && filterSession.getId().equals(session.getId())){
+				isActiveSession = false;
+			}
+			if (isActiveSession){
+				sessions.add(session);
+			}
+		}
+		return sessions;
+	}
+	
+}

+ 274 - 0
src/main/java/com/lightinit/hsdatagateway/common/security/shiro/session/JedisSessionDAO.java

@@ -0,0 +1,274 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.security.shiro.session;
+
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.Date;
+import java.util.Map;
+import java.util.Set;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.shiro.session.Session;
+import org.apache.shiro.session.UnknownSessionException;
+import org.apache.shiro.session.mgt.SimpleSession;
+import org.apache.shiro.session.mgt.eis.AbstractSessionDAO;
+import org.apache.shiro.subject.PrincipalCollection;
+import org.apache.shiro.subject.support.DefaultSubjectContext;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import redis.clients.jedis.Jedis;
+
+import com.google.common.collect.Sets;
+import com.lightinit.hsdatagateway.common.config.Global;
+import com.lightinit.hsdatagateway.common.utils.DateUtils;
+import com.lightinit.hsdatagateway.common.utils.JedisUtils;
+import com.lightinit.hsdatagateway.common.utils.StringUtils;
+import com.lightinit.hsdatagateway.common.web.Servlets;
+
+/**
+ * 自定义授权会话管理类
+ * @Author yangrui
+ * @version 2014-7-20
+ */
+public class JedisSessionDAO extends AbstractSessionDAO implements SessionDAO {
+
+	private Logger logger = LoggerFactory.getLogger(getClass());
+	
+	private String sessionKeyPrefix = "shiro_session_";
+
+	@Override
+	public void update(Session session) throws UnknownSessionException {
+		if (session == null || session.getId() == null) {  
+            return;
+        }
+		
+		HttpServletRequest request = Servlets.getRequest();
+		if (request != null){
+			String uri = request.getServletPath();
+			// 如果是静态文件,则不更新SESSION
+			if (Servlets.isStaticFile(uri)){
+				return;
+			}
+			// 如果是视图文件,则不更新SESSION
+			if (StringUtils.startsWith(uri, Global.getConfig("web.view.prefix"))
+					&& StringUtils.endsWith(uri, Global.getConfig("web.view.suffix"))){
+				return;
+			}
+			// 手动控制不更新SESSION
+			if (Global.NO.equals(request.getParameter("updateSession"))){
+				return;
+			}
+		}
+		
+		Jedis jedis = null;
+		try {
+			
+			jedis = JedisUtils.getResource();
+			
+			// 获取登录者编号
+			PrincipalCollection pc = (PrincipalCollection)session.getAttribute(DefaultSubjectContext.PRINCIPALS_SESSION_KEY);
+			String principalId = pc != null ? pc.getPrimaryPrincipal().toString() : StringUtils.EMPTY;
+			
+			jedis.hset(sessionKeyPrefix, session.getId().toString(), principalId + "|" + session.getTimeout() + "|" + session.getLastAccessTime().getTime());
+			jedis.set(JedisUtils.getBytesKey(sessionKeyPrefix + session.getId()), JedisUtils.toBytes(session));
+			
+			// 设置超期时间
+			int timeoutSeconds = (int)(session.getTimeout() / 1000);
+			jedis.expire((sessionKeyPrefix + session.getId()), timeoutSeconds);
+
+			logger.debug("update {} {}", session.getId(), request != null ? request.getRequestURI() : "");
+		} catch (Exception e) {
+			logger.error("update {} {}", session.getId(), request != null ? request.getRequestURI() : "", e);
+		} finally {
+			JedisUtils.returnResource(jedis);
+		}
+	}
+
+	@Override
+	public void delete(Session session) {
+		if (session == null || session.getId() == null) {
+			return;
+		}
+		
+		Jedis jedis = null;
+		try {
+			jedis = JedisUtils.getResource();
+			
+			jedis.hdel(JedisUtils.getBytesKey(sessionKeyPrefix), JedisUtils.getBytesKey(session.getId().toString()));
+			jedis.del(JedisUtils.getBytesKey(sessionKeyPrefix + session.getId()));
+
+			logger.debug("delete {} ", session.getId());
+		} catch (Exception e) {
+			logger.error("delete {} ", session.getId(), e);
+		} finally {
+			JedisUtils.returnResource(jedis);
+		}
+	}
+	
+	@Override
+	public Collection<Session> getActiveSessions() {
+		return getActiveSessions(true);
+	}
+	
+	/**
+	 * 获取活动会话
+	 * @param includeLeave 是否包括离线(最后访问时间大于3分钟为离线会话)
+	 * @return
+	 */
+	@Override
+	public Collection<Session> getActiveSessions(boolean includeLeave) {
+		return getActiveSessions(includeLeave, null, null);
+	}
+	
+	/**
+	 * 获取活动会话
+	 * @param includeLeave 是否包括离线(最后访问时间大于3分钟为离线会话)
+	 * @param principal 根据登录者对象获取活动会话
+	 * @param filterSession 不为空,则过滤掉(不包含)这个会话。
+	 * @return
+	 */
+	@Override
+	public Collection<Session> getActiveSessions(boolean includeLeave, Object principal, Session filterSession){
+		Set<Session> sessions = Sets.newHashSet();
+		
+		Jedis jedis = null;
+		try {
+			jedis = JedisUtils.getResource();
+			Map<String, String> map = jedis.hgetAll(sessionKeyPrefix);
+			for (Map.Entry<String, String> e : map.entrySet()){
+				if (StringUtils.isNotBlank(e.getKey()) && StringUtils.isNotBlank(e.getValue())){
+					
+					String[] ss = StringUtils.split(e.getValue(), "|");
+					if (ss != null && ss.length == 3){// jedis.exists(sessionKeyPrefix + e.getKey())){
+						// Session session = (Session)JedisUtils.toObject(jedis.get(JedisUtils.getBytesKey(sessionKeyPrefix + e.getKey())));
+						SimpleSession session = new SimpleSession();
+						session.setId(e.getKey());
+						session.setAttribute("principalId", ss[0]);
+						session.setTimeout(Long.valueOf(ss[1]));
+						session.setLastAccessTime(new Date(Long.valueOf(ss[2])));
+						try{
+							// 验证SESSION
+							session.validate();
+							
+							boolean isActiveSession = false;
+							// 不包括离线并符合最后访问时间小于等于3分钟条件。
+							if (includeLeave || DateUtils.pastMinutes(session.getLastAccessTime()) <= 3){
+								isActiveSession = true;
+							}
+							// 符合登陆者条件。
+							if (principal != null){
+								PrincipalCollection pc = (PrincipalCollection)session.getAttribute(DefaultSubjectContext.PRINCIPALS_SESSION_KEY);
+								if (principal.toString().equals(pc != null ? pc.getPrimaryPrincipal().toString() : StringUtils.EMPTY)){
+									isActiveSession = true;
+								}
+							}
+							// 过滤掉的SESSION
+							if (filterSession != null && filterSession.getId().equals(session.getId())){
+								isActiveSession = false;
+							}
+							if (isActiveSession){
+								sessions.add(session);
+							}
+							
+						}
+						// SESSION验证失败
+						catch (Exception e2) {
+							jedis.hdel(sessionKeyPrefix, e.getKey());
+						}
+					}
+					// 存储的SESSION不符合规则
+					else{
+						jedis.hdel(sessionKeyPrefix, e.getKey());
+					}
+				}
+				// 存储的SESSION无Value
+				else if (StringUtils.isNotBlank(e.getKey())){
+					jedis.hdel(sessionKeyPrefix, e.getKey());
+				}
+			}
+			logger.info("getActiveSessions size: {} ", sessions.size());
+		} catch (Exception e) {
+			logger.error("getActiveSessions", e);
+		} finally {
+			JedisUtils.returnResource(jedis);
+		}
+		return sessions;
+	}
+
+	@Override
+	protected Serializable doCreate(Session session) {
+		HttpServletRequest request = Servlets.getRequest();
+		if (request != null){
+			String uri = request.getServletPath();
+			// 如果是静态文件,则不创建SESSION
+			if (Servlets.isStaticFile(uri)){
+		        return null;
+			}
+		}
+		Serializable sessionId = this.generateSessionId(session);
+		this.assignSessionId(session, sessionId);
+		this.update(session);
+		return sessionId;
+	}
+
+	@Override
+	protected Session doReadSession(Serializable sessionId) {
+
+		Session s = null;
+		HttpServletRequest request = Servlets.getRequest();
+		if (request != null){
+			String uri = request.getServletPath();
+			// 如果是静态文件,则不获取SESSION
+			if (Servlets.isStaticFile(uri)){
+				return null;
+			}
+			s = (Session)request.getAttribute("session_"+sessionId);
+		}
+		if (s != null){
+			return s;
+		}
+
+		Session session = null;
+		Jedis jedis = null;
+		try {
+			jedis = JedisUtils.getResource();
+//			if (jedis.exists(sessionKeyPrefix + sessionId)){
+				session = (Session)JedisUtils.toObject(jedis.get(
+						JedisUtils.getBytesKey(sessionKeyPrefix + sessionId)));
+//			}
+			logger.debug("doReadSession {} {}", sessionId, request != null ? request.getRequestURI() : "");
+		} catch (Exception e) {
+			logger.error("doReadSession {} {}", sessionId, request != null ? request.getRequestURI() : "", e);
+		} finally {
+			JedisUtils.returnResource(jedis);
+		}
+		
+		if (request != null && session != null){
+			request.setAttribute("session_"+sessionId, session);
+		}
+		
+		return session;
+	}
+	
+	@Override
+    public Session readSession(Serializable sessionId) throws UnknownSessionException {
+    	try{
+        	return super.readSession(sessionId);
+    	}catch (UnknownSessionException e) {
+			return null;
+		}
+    }
+
+	public String getSessionKeyPrefix() {
+		return sessionKeyPrefix;
+	}
+
+	public void setSessionKeyPrefix(String sessionKeyPrefix) {
+		this.sessionKeyPrefix = sessionKeyPrefix;
+	}
+
+}

+ 25 - 0
src/main/java/com/lightinit/hsdatagateway/common/security/shiro/session/SessionDAO.java

@@ -0,0 +1,25 @@
+package com.lightinit.hsdatagateway.common.security.shiro.session;
+
+import java.util.Collection;
+
+import org.apache.shiro.session.Session;
+
+public interface SessionDAO extends org.apache.shiro.session.mgt.eis.SessionDAO {
+
+	/**
+	 * 获取活动会话
+	 * @param includeLeave 是否包括离线(最后访问时间大于3分钟为离线会话)
+	 * @return
+	 */
+	public Collection<Session> getActiveSessions(boolean includeLeave);
+	
+	/**
+	 * 获取活动会话
+	 * @param includeLeave 是否包括离线(最后访问时间大于3分钟为离线会话)
+	 * @param principal 根据登录者对象获取活动会话
+	 * @param filterSession 不为空,则过滤掉(不包含)这个会话。
+	 * @return
+	 */
+	public Collection<Session> getActiveSessions(boolean includeLeave, Object principal, Session filterSession);
+	
+}

+ 207 - 0
src/main/java/com/lightinit/hsdatagateway/common/security/shiro/session/SessionManager.java

@@ -0,0 +1,207 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.security.shiro.session;
+
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.Date;
+
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.shiro.session.InvalidSessionException;
+import org.apache.shiro.session.Session;
+import org.apache.shiro.session.UnknownSessionException;
+import org.apache.shiro.session.mgt.SessionContext;
+import org.apache.shiro.session.mgt.SessionKey;
+import org.apache.shiro.session.mgt.SimpleSession;
+import org.apache.shiro.web.servlet.Cookie;
+import org.apache.shiro.web.servlet.ShiroHttpServletRequest;
+import org.apache.shiro.web.servlet.SimpleCookie;
+import org.apache.shiro.web.session.mgt.DefaultWebSessionManager;
+import org.apache.shiro.web.util.WebUtils;
+
+import com.lightinit.hsdatagateway.common.utils.StringUtils;
+
+/**
+ * 自定义WEB会话管理类
+ * @Author yangrui
+ * @version 2014-7-20
+ */
+public class SessionManager extends DefaultWebSessionManager {
+
+	public SessionManager() {
+		super();
+	}
+	
+	@Override
+	protected Serializable getSessionId(ServletRequest request, ServletResponse response) {
+		// 如果参数中包含“__sid”参数,则使用此sid会话。 例如:http://localhost/project?__sid=xxx&__cookie=true
+		String sid = request.getParameter("__sid");
+		if (StringUtils.isNotBlank(sid)) {
+			// 是否将sid保存到cookie,浏览器模式下使用此参数。
+			if (WebUtils.isTrue(request, "__cookie")){
+		        HttpServletRequest rq = (HttpServletRequest)request;
+		        HttpServletResponse rs = (HttpServletResponse)response;
+				Cookie template = getSessionIdCookie();
+		        Cookie cookie = new SimpleCookie(template);
+				cookie.setValue(sid); cookie.saveTo(rq, rs);
+			}
+			// 设置当前session状态
+            request.setAttribute(ShiroHttpServletRequest.REFERENCED_SESSION_ID_SOURCE,
+                    ShiroHttpServletRequest.URL_SESSION_ID_SOURCE); // session来源与url
+            request.setAttribute(ShiroHttpServletRequest.REFERENCED_SESSION_ID, sid);
+            request.setAttribute(ShiroHttpServletRequest.REFERENCED_SESSION_ID_IS_VALID, Boolean.TRUE);
+        	return sid;
+		}else{
+			return super.getSessionId(request, response);
+		}
+	}
+	
+	@Override
+	public void validateSessions() {
+		super.validateSessions();
+	}
+	
+	protected Session retrieveSession(SessionKey sessionKey) {
+		try{
+			return super.retrieveSession(sessionKey);
+		}catch (UnknownSessionException e) {
+    		// 获取不到SESSION不抛出异常
+			return null;
+		}
+	}
+
+    public Date getStartTimestamp(SessionKey key) {
+    	try{
+    		return super.getStartTimestamp(key);
+    	}catch (InvalidSessionException e) {
+    		// 获取不到SESSION不抛出异常
+        	return null;
+		}
+    }
+
+    public Date getLastAccessTime(SessionKey key) {
+    	try{
+    		return super.getLastAccessTime(key);
+    	}catch (InvalidSessionException e) {
+    		// 获取不到SESSION不抛出异常
+        	return null;
+		}
+    }
+
+    public long getTimeout(SessionKey key){
+    	try{
+    		return super.getTimeout(key);
+    	}catch (InvalidSessionException e) {
+    		// 获取不到SESSION不抛出异常
+        	return 0;
+		}
+    }
+
+    public void setTimeout(SessionKey key, long maxIdleTimeInMillis) {
+    	try{
+    		super.setTimeout(key, maxIdleTimeInMillis);
+    	}catch (InvalidSessionException e) {
+    		// 获取不到SESSION不抛出异常
+		}
+    }
+
+    public void touch(SessionKey key) {
+    	try{
+	    	super.touch(key);
+		}catch (InvalidSessionException e) {
+			// 获取不到SESSION不抛出异常
+		}
+    }
+
+    public String getHost(SessionKey key) {
+    	try{
+    		return super.getHost(key);
+    	}catch (InvalidSessionException e) {
+    		// 获取不到SESSION不抛出异常
+        	return null;
+		}
+    }
+
+    public Collection<Object> getAttributeKeys(SessionKey key) {
+    	try{
+    		return super.getAttributeKeys(key);
+    	}catch (InvalidSessionException e) {
+    		// 获取不到SESSION不抛出异常
+        	return null;
+		}
+    }
+
+    public Object getAttribute(SessionKey sessionKey, Object attributeKey) {
+    	try{
+    		return super.getAttribute(sessionKey, attributeKey);
+    	}catch (InvalidSessionException e) {
+    		// 获取不到SESSION不抛出异常
+        	return null;
+		}
+    }
+
+    public void setAttribute(SessionKey sessionKey, Object attributeKey, Object value) {
+    	try{
+    		super.setAttribute(sessionKey, attributeKey, value);
+    	}catch (InvalidSessionException e) {
+    		// 获取不到SESSION不抛出异常
+		}
+    }
+
+    public Object removeAttribute(SessionKey sessionKey, Object attributeKey) {
+    	try{
+    		return super.removeAttribute(sessionKey, attributeKey);
+    	}catch (InvalidSessionException e) {
+    		// 获取不到SESSION不抛出异常
+        	return null;
+		}
+    }
+
+    public void stop(SessionKey key) {
+    	try{
+    		super.stop(key);
+    	}catch (InvalidSessionException e) {
+    		// 获取不到SESSION不抛出异常
+		}
+    }
+    
+    public void checkValid(SessionKey key) {
+    	try{
+    		super.checkValid(key);
+		}catch (InvalidSessionException e) {
+			// 获取不到SESSION不抛出异常
+		}
+    }
+    
+    @Override
+    protected Session doCreateSession(SessionContext context) {
+    	try{
+    		return super.doCreateSession(context);
+		}catch (IllegalStateException e) {
+			return null;
+		}
+    }
+
+	@Override
+	protected Session newSessionInstance(SessionContext context) {
+		Session session = super.newSessionInstance(context);
+		session.setTimeout(getGlobalSessionTimeout());
+		return session;
+	}
+    
+    @Override
+    public Session start(SessionContext context) {
+    	try{
+    		return super.start(context);
+		}catch (NullPointerException e) {
+			SimpleSession session = new SimpleSession();
+			session.setId(0);
+			return session;
+		}
+    }
+}

+ 197 - 0
src/main/java/com/lightinit/hsdatagateway/common/service/BaseService.java

@@ -0,0 +1,197 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.service;
+
+import java.util.List;
+
+import com.lightinit.hsdatagateway.common.persistence.BaseEntity;
+import com.lightinit.hsdatagateway.modules.sys.entity.Role;
+import com.lightinit.hsdatagateway.modules.sys.entity.User;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.transaction.annotation.Transactional;
+
+import com.google.common.collect.Lists;
+import com.lightinit.hsdatagateway.common.persistence.BaseEntity;
+import com.lightinit.hsdatagateway.common.utils.StringUtils;
+import com.lightinit.hsdatagateway.modules.sys.entity.Role;
+import com.lightinit.hsdatagateway.modules.sys.entity.User;
+
+/**
+ * Service基类
+ * @Author yangrui
+ * @version 2014-05-16
+ */
+@Transactional(readOnly = true)
+public abstract class BaseService {
+	
+	/**
+	 * 日志对象
+	 */
+	protected Logger logger = LoggerFactory.getLogger(getClass());
+
+	/**
+	 * 数据范围过滤
+	 * @param user 当前用户对象,通过“entity.getCurrentUser()”获取
+	 * @param officeAlias 机构表别名,多个用“,”逗号隔开。
+	 * @param userAlias 用户表别名,多个用“,”逗号隔开,传递空,忽略此参数
+	 * @return 标准连接条件对象
+	 */
+	public static String dataScopeFilter(User user, String officeAlias, String userAlias) {
+
+		StringBuilder sqlString = new StringBuilder();
+		
+		// 进行权限过滤,多个角色权限范围之间为或者关系。
+		List<String> dataScope = Lists.newArrayList();
+		
+		// 超级管理员,跳过权限过滤
+		if (!user.isAdmin()){
+			boolean isDataScopeAll = false;
+			for (Role r : user.getRoleList()){
+				for (String oa : StringUtils.split(officeAlias, ",")){
+					if (!dataScope.contains(r.getDataScope()) && StringUtils.isNotBlank(oa)){
+						if (Role.DATA_SCOPE_ALL.equals(r.getDataScope())){
+							isDataScopeAll = true;
+						}
+						else if (Role.DATA_SCOPE_COMPANY_AND_CHILD.equals(r.getDataScope())){
+							sqlString.append(" OR " + oa + ".id = '" + user.getCompany().getId() + "'");
+							sqlString.append(" OR " + oa + ".parent_ids LIKE '" + user.getCompany().getParentIds() + user.getCompany().getId() + ",%'");
+						}
+						else if (Role.DATA_SCOPE_COMPANY.equals(r.getDataScope())){
+							sqlString.append(" OR " + oa + ".id = '" + user.getCompany().getId() + "'");
+							// 包括本公司下的部门 (type=1:公司;type=2:部门)
+							sqlString.append(" OR (" + oa + ".parent_id = '" + user.getCompany().getId() + "' AND " + oa + ".type = '2')");
+						}
+						else if (Role.DATA_SCOPE_OFFICE_AND_CHILD.equals(r.getDataScope())){
+							sqlString.append(" OR " + oa + ".id = '" + user.getOffice().getId() + "'");
+							sqlString.append(" OR " + oa + ".parent_ids LIKE '" + user.getOffice().getParentIds() + user.getOffice().getId() + ",%'");
+						}
+						else if (Role.DATA_SCOPE_OFFICE.equals(r.getDataScope())){
+							sqlString.append(" OR " + oa + ".id = '" + user.getOffice().getId() + "'");
+						}
+						else if (Role.DATA_SCOPE_CUSTOM.equals(r.getDataScope())){
+//							String officeIds =  StringUtils.join(r.getOfficeIdList(), "','");
+//							if (StringUtils.isNotEmpty(officeIds)){
+//								sqlString.append(" OR " + oa + ".id IN ('" + officeIds + "')");
+//							}
+							sqlString.append(" OR EXISTS (SELECT 1 FROM sys_role_office WHERE role_id = '" + r.getId() + "'");
+							sqlString.append(" AND office_id = " + oa +".id)");
+						}
+						//else if (Role.DATA_SCOPE_SELF.equals(r.getDataScope())){
+						dataScope.add(r.getDataScope());
+					}
+				}
+			}
+			// 如果没有全部数据权限,并设置了用户别名,则当前权限为本人;如果未设置别名,当前无权限为已植入权限
+			if (!isDataScopeAll){
+				if (StringUtils.isNotBlank(userAlias)){
+					for (String ua : StringUtils.split(userAlias, ",")){
+						sqlString.append(" OR " + ua + ".id = '" + user.getId() + "'");
+					}
+				}else {
+					for (String oa : StringUtils.split(officeAlias, ",")){
+						//sqlString.append(" OR " + oa + ".id  = " + user.getOffice().getId());
+						sqlString.append(" OR " + oa + ".id IS NULL");
+					}
+				}
+			}else{
+				// 如果包含全部权限,则去掉之前添加的所有条件,并跳出循环。
+				sqlString = new StringBuilder();
+			}
+		}
+		if (StringUtils.isNotBlank(sqlString.toString())){
+			return " AND (" + sqlString.substring(4) + ")";
+		}
+		return "";
+	}
+
+	/**
+	 * 数据范围过滤(符合业务表字段不同的时候使用,采用exists方法)
+	 * @param entity 当前过滤的实体类
+	 * @param sqlMapKey sqlMap的键值,例如设置“dsf”时,调用方法:${sqlMap.sdf}
+	 * @param officeWheres office表条件,组成:部门表字段=业务表的部门字段
+	 * @param userWheres user表条件,组成:用户表字段=业务表的用户字段
+	 * @example
+	 * 		dataScopeFilter(user, "dsf", "id=a.office_id", "id=a.create_by");
+	 * 		dataScopeFilter(entity, "dsf", "code=a.jgdm", "no=a.cjr"); // 适应于业务表关联不同字段时使用,如果关联的不是机构id是code。
+	 */
+	public static void dataScopeFilter(BaseEntity<?> entity, String sqlMapKey, String officeWheres, String userWheres) {
+
+		User user = entity.getCurrentUser();
+		
+		// 如果是超级管理员,则不过滤数据
+		if (user.isAdmin()) {
+			return;
+		}
+
+		// 数据范围(1:所有数据;2:所在公司及以下数据;3:所在公司数据;4:所在部门及以下数据;5:所在部门数据;8:仅本人数据;9:按明细设置)
+		StringBuilder sqlString = new StringBuilder();
+		
+		// 获取到最大的数据权限范围
+		Long roleId = null;
+		int dataScopeInteger = 8;
+		for (Role r : user.getRoleList()){
+			int ds = Integer.valueOf(r.getDataScope());
+			if (ds == 9){
+				roleId = r.getId();
+				dataScopeInteger = ds;
+				break;
+			}else if (ds < dataScopeInteger){
+				roleId = r.getId();
+				dataScopeInteger = ds;
+			}
+		}
+		String dataScopeString = String.valueOf(dataScopeInteger);
+		
+		// 生成部门权限SQL语句
+		for (String where : StringUtils.split(officeWheres, ",")){
+			if (Role.DATA_SCOPE_COMPANY_AND_CHILD.equals(dataScopeString)){
+				// 包括本公司下的部门 (type=1:公司;type=2:部门)
+				sqlString.append(" AND EXISTS (SELECT 1 FROM SYS_OFFICE");
+				sqlString.append(" WHERE type='2'");
+				sqlString.append(" AND (id = '" + user.getCompany().getId() + "'");
+				sqlString.append(" OR parent_ids LIKE '" + user.getCompany().getParentIds() + user.getCompany().getId() + ",%')");
+				sqlString.append(" AND " + where +")");
+			}
+			else if (Role.DATA_SCOPE_COMPANY.equals(dataScopeString)){
+				sqlString.append(" AND EXISTS (SELECT 1 FROM SYS_OFFICE");
+				sqlString.append(" WHERE type='2'");
+				sqlString.append(" AND id = '" + user.getCompany().getId() + "'");
+				sqlString.append(" AND " + where +")");
+			}
+			else if (Role.DATA_SCOPE_OFFICE_AND_CHILD.equals(dataScopeString)){
+				sqlString.append(" AND EXISTS (SELECT 1 FROM SYS_OFFICE");
+				sqlString.append(" WHERE (id = '" + user.getOffice().getId() + "'");
+				sqlString.append(" OR parent_ids LIKE '" + user.getOffice().getParentIds() + user.getOffice().getId() + ",%')");
+				sqlString.append(" AND " + where +")");
+			}
+			else if (Role.DATA_SCOPE_OFFICE.equals(dataScopeString)){
+				sqlString.append(" AND EXISTS (SELECT 1 FROM SYS_OFFICE");
+				sqlString.append(" WHERE id = '" + user.getOffice().getId() + "'");
+				sqlString.append(" AND " + where +")");
+			}
+			else if (Role.DATA_SCOPE_CUSTOM.equals(dataScopeString)){
+				sqlString.append(" AND EXISTS (SELECT 1 FROM sys_role_office ro123456, sys_office o123456");
+				sqlString.append(" WHERE ro123456.office_id = o123456.id");
+				sqlString.append(" AND ro123456.role_id = '" + roleId + "'");
+				sqlString.append(" AND o123456." + where +")");
+			}
+		}
+		// 生成个人权限SQL语句
+		for (String where : StringUtils.split(userWheres, ",")){
+			if (Role.DATA_SCOPE_SELF.equals(dataScopeString)){
+				sqlString.append(" AND EXISTS (SELECT 1 FROM sys_user");
+				sqlString.append(" WHERE id='" + user.getId() + "'");
+				sqlString.append(" AND " + where + ")");
+			}
+		}
+
+//		System.out.println("dataScopeFilter: " + sqlString.toString());
+
+		// 设置到自定义SQL对象
+		entity.getSqlMap().put(sqlMapKey, sqlString.toString());
+		
+	}
+
+}

+ 105 - 0
src/main/java/com/lightinit/hsdatagateway/common/service/CrudService.java

@@ -0,0 +1,105 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.service;
+
+import java.util.List;
+
+import com.lightinit.hsdatagateway.common.persistence.CrudDao;
+import com.lightinit.hsdatagateway.common.persistence.DataEntity;
+import com.lightinit.hsdatagateway.common.persistence.Page;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+
+import com.lightinit.hsdatagateway.common.persistence.CrudDao;
+import com.lightinit.hsdatagateway.common.persistence.DataEntity;
+import com.lightinit.hsdatagateway.common.persistence.Page;
+
+/**
+ * Service基类
+ * @Author yangrui
+ * @version 2014-05-16
+ */
+@Transactional(readOnly = true)
+public abstract class CrudService<D extends CrudDao<T>, T extends DataEntity<T>> extends BaseService {
+	
+	/**
+	 * 持久层对象
+	 */
+	@Autowired
+	protected D dao;
+	
+	/**
+	 * 获取单条数据
+	 * @param id
+	 * @return
+	 */
+	public T get(Long id) {
+		return dao.get(id);
+	}
+	
+	/**
+	 * 获取单条数据
+	 * @param entity
+	 * @return
+	 */
+	public T get(T entity) {
+		return dao.get(entity);
+	}
+	
+	/**
+	 * 查询列表数据
+	 * @param entity
+	 * @return
+	 */
+	public List<T> findList(T entity) {
+		return dao.findList(entity);
+	}
+	
+	/**
+	 * 查询分页数据
+	 * @param page 分页对象
+	 * @param entity
+	 * @return
+	 */
+	public Page<T> findPage(Page<T> page, T entity) {
+		entity.setPage(page);
+		page.setList(dao.findList(entity));
+		return page;
+	}
+
+	/**
+	 * 保存数据(插入或更新)
+	 * @param entity
+	 */
+	@Transactional(readOnly = false)
+	public void save(T entity) {
+		if (entity.getIsNewRecord()){
+			entity.preInsert();
+			dao.insert(entity);
+		}else{
+			entity.preUpdate();
+			dao.update(entity);
+		}
+	}
+	
+	/**
+	 * 删除数据
+	 * @param entity
+	 */
+	@Transactional(readOnly = false)
+	public void delete(T entity) {
+		dao.delete(entity);
+	}
+
+	/**
+	 * 判断数据是否重复
+	 * @param entity
+	 * @return
+	 */
+	public boolean isRepetition(T entity) {
+		T obj = dao.selectAuthByCondition(entity);
+		return obj == null ? true : false;
+	}
+
+}

+ 115 - 0
src/main/java/com/lightinit/hsdatagateway/common/service/GatewayService.java

@@ -0,0 +1,115 @@
+/**
+ * Copyright &copy; 2017 beyo.com.cn All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.service;
+
+import com.lightinit.hsdatagateway.common.persistence.DataVo;
+import com.lightinit.hsdatagateway.common.persistence.GatewayDao;
+import com.lightinit.hsdatagateway.common.persistence.Page;
+import com.lightinit.hsdatagateway.modules.sys.utils.UserUtils;
+import com.lightinit.hsdatagateway.common.persistence.DataVo;
+import com.lightinit.hsdatagateway.common.persistence.GatewayDao;
+import com.lightinit.hsdatagateway.common.persistence.Page;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Isolation;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Service基类
+ * @Author: yangrui
+ * @version 2014-05-16
+ */
+
+public abstract class GatewayService<D extends GatewayDao<T>, T extends DataVo<T>> extends BaseService {
+	
+	/**
+	 * 持久层对象
+	 */
+	@Autowired
+	protected D dao;
+	
+	/**
+	 * 获取单条数据
+	 * @param id
+	 * @return
+	 */
+	@Transactional(propagation = Propagation.SUPPORTS,isolation = Isolation.DEFAULT,readOnly = true)
+	public T get(Long id) {
+		return dao.get(id);
+	}
+	
+	/**
+	 * 获取单条数据
+	 * @param entity
+	 * @return
+	 */
+	@Transactional(propagation = Propagation.SUPPORTS,isolation = Isolation.DEFAULT,readOnly = true)
+	public T get(T entity) {
+		return dao.get(entity);
+	}
+	
+	/**
+	 * 查询列表数据
+	 * @param entity
+	 * @return
+	 */
+	@Transactional(propagation = Propagation.SUPPORTS,isolation = Isolation.DEFAULT,readOnly = true)
+	public List<T> findList(T entity) {
+		return dao.findList(entity);
+	}
+	
+	/**
+	 * 查询分页数据findList
+	 * @param page 分页对象
+	 * @param entity
+	 * @return
+	 */
+	@Transactional(propagation = Propagation.SUPPORTS,isolation = Isolation.DEFAULT,readOnly = true)
+	public Page<T> findPage(Page<T> page, T entity) {
+		entity.setPage(page);
+		page.setList(dao.findList(entity));
+		return page;
+	}
+
+	/**
+	 * 保存数据(插入或更新)
+	 * @param entity
+	 */
+	@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT,rollbackFor = Exception.class)
+	public void save(T entity){
+		if (null==entity.getId()){
+			try{
+				entity.nextId();
+			}catch (Exception e){
+				e.printStackTrace();
+				//entity.setId(null);
+			}
+			entity.setCreateTime(new Date());
+			//entity.setCreateUser(UserUtils.getUser().getId());
+			dao.insert(entity);
+			return;
+		}
+		entity.setUpdateTime(new Date());
+		this.update(entity);
+
+	}
+
+	@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT,rollbackFor = Exception.class)
+	public void update(T entity) {
+		dao.update(entity);
+	}
+	
+	/**
+	 * 删除数据
+	 * @param entity
+	 */
+	@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT,rollbackFor = Exception.class)
+	public void delete(T entity) {
+		dao.delete(entity);
+	}
+
+}

+ 56 - 0
src/main/java/com/lightinit/hsdatagateway/common/service/InitService.java

@@ -0,0 +1,56 @@
+package com.lightinit.hsdatagateway.common.service;
+
+import com.lightinit.hsdatagateway.common.config.Global;
+import com.lightinit.hsdatagateway.common.utils.CacheUtils;
+import com.lightinit.hsdatagateway.common.utils.SpringContextHolder;
+import com.lightinit.hsdatagateway.modules.gateway.entity.BizApp;
+import com.lightinit.hsdatagateway.modules.gateway.service.BizAppService;
+import com.lightinit.hsdatagateway.modules.gateway.service.BlackWhiteListService;
+import com.google.common.base.Strings;
+import com.lightinit.hsdatagateway.modules.gateway.entity.BizApp;
+
+import javax.annotation.PostConstruct;
+import java.util.List;
+
+
+/**
+ * @ClassName: InitService
+ * @Description: 初始化加载黑白名单进cache
+ * @Author: yangrui
+ * @Date 2019/3/6 上午10:34
+ * @Version V1.0
+ **/
+public class InitService {
+
+    @PostConstruct
+    private void initBlackWhiteList(){
+
+        // 读取配置文件中开启哪种名单验证方式
+        String blackWhite = Global.getConfig("blackWhite.choose");
+        if (!Strings.isNullOrEmpty(blackWhite)) {
+            try {
+                CacheUtils.put("blackWhite",blackWhite);
+            }
+            catch (Exception ex) {
+                ex.printStackTrace();
+            }
+        }
+
+        // 将黑白名单进行加入缓存
+        BlackWhiteListService service = SpringContextHolder.getBean(BlackWhiteListService.class);
+
+        List<String> blacks = service.findIpByType("黑名单");
+        List<String> whites = service.findIpByType("白名单");
+
+        CacheUtils.put("black", blacks);
+        CacheUtils.put("whites", whites);
+
+        //将应用管理加入缓存
+        BizAppService bizAppService = SpringContextHolder.getBean(BizAppService.class);
+        List<BizApp> allList = bizAppService.findAllList();
+        CacheUtils.put("app",allList);
+
+    }
+
+
+}

+ 29 - 0
src/main/java/com/lightinit/hsdatagateway/common/service/ServiceException.java

@@ -0,0 +1,29 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.service;
+
+/**
+ * Service层公用的Exception, 从由Spring管理事务的函数中抛出时会触发事务回滚.
+ * @Author yangrui
+ */
+public class ServiceException extends RuntimeException {
+
+	private static final long serialVersionUID = 1L;
+
+	public ServiceException() {
+		super();
+	}
+
+	public ServiceException(String message) {
+		super(message);
+	}
+
+	public ServiceException(Throwable cause) {
+		super(cause);
+	}
+
+	public ServiceException(String message, Throwable cause) {
+		super(message, cause);
+	}
+}

+ 85 - 0
src/main/java/com/lightinit/hsdatagateway/common/service/TreeService.java

@@ -0,0 +1,85 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.service;
+
+import java.util.List;
+
+import com.lightinit.hsdatagateway.common.persistence.TreeDao;
+import com.lightinit.hsdatagateway.common.persistence.TreeEntity;
+import org.springframework.transaction.annotation.Transactional;
+
+import com.lightinit.hsdatagateway.common.persistence.TreeDao;
+import com.lightinit.hsdatagateway.common.persistence.TreeEntity;
+import com.lightinit.hsdatagateway.common.utils.Reflections;
+import com.lightinit.hsdatagateway.common.utils.StringUtils;
+
+/**
+ * Service基类
+ * @Author yangrui
+ * @version 2014-05-16
+ */
+@Transactional(readOnly = true)
+public abstract class TreeService<D extends TreeDao<T>, T extends TreeEntity<T>> extends CrudService<D, T> {
+	
+	@Transactional(readOnly = false)
+	public void save(T entity) {
+		
+		@SuppressWarnings("unchecked")
+		Class<T> entityClass = Reflections.getClassGenricType(getClass(), 1);
+		
+		// 如果没有设置父节点,则代表为跟节点,有则获取父节点实体
+		if (entity.getParent() == null || entity.getParentId() == null
+				|| "0".equals(entity.getParentId())){
+			entity.setParent(null);
+		}else{
+			entity.setParent(super.get(entity.getParentId()));
+		}
+		if (entity.getParent() == null){
+			T parentEntity = null;
+			try {
+				parentEntity = entityClass.getConstructor(String.class).newInstance("0");
+			} catch (Exception e) {
+				throw new ServiceException(e);
+			}
+			entity.setParent(parentEntity);
+			entity.getParent().setParentIds(StringUtils.EMPTY);
+		}
+		
+		// 获取修改前的parentIds,用于更新子节点的parentIds
+		String oldParentIds = entity.getParentIds(); 
+		
+		// 设置新的父节点串
+		entity.setParentIds(entity.getParent().getParentIds()+entity.getParent().getId()+",");
+		
+		// 保存或更新实体
+		super.save(entity);
+		
+		// 更新子节点 parentIds
+		T o = null;
+		try {
+			o = entityClass.newInstance();
+		} catch (Exception e) {
+			throw new ServiceException(e);
+		}
+		o.setParentIds("%,"+entity.getId()+",%");
+		List<T> list = dao.findByParentIdsLike(o);
+		for (T e : list){
+			if (e.getParentIds() != null && oldParentIds != null){
+				e.setParentIds(e.getParentIds().replace(oldParentIds, entity.getParentIds()));
+				preUpdateChild(entity, e);
+				dao.updateParentIds(e);
+			}
+		}
+		
+	}
+	
+	/**
+	 * 预留接口,用户更新子节前调用
+	 * @param childEntity
+	 */
+	protected void preUpdateChild(T entity, T childEntity) {
+		
+	}
+
+}

+ 65 - 0
src/main/java/com/lightinit/hsdatagateway/common/servlet/UserfilesDownloadServlet.java

@@ -0,0 +1,65 @@
+package com.lightinit.hsdatagateway.common.servlet;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.util.FileCopyUtils;
+import org.springframework.web.util.UriUtils;
+
+import com.lightinit.hsdatagateway.common.config.Global;
+
+/**
+ * 查看CK上传的图片
+ * @Author yangrui
+ * @version 2014-06-25
+ */
+public class UserfilesDownloadServlet extends HttpServlet {
+
+	private static final long serialVersionUID = 1L;
+	private Logger logger = LoggerFactory.getLogger(getClass());
+
+	public void fileOutputStream(HttpServletRequest req, HttpServletResponse resp) 
+			throws ServletException, IOException {
+		String filepath = req.getRequestURI();
+		int index = filepath.indexOf(Global.USERFILES_BASE_URL);
+		if(index >= 0) {
+			filepath = filepath.substring(index + Global.USERFILES_BASE_URL.length());
+		}
+		/*try {
+			filepath = UriUtils.decode(filepath, "UTF-8");
+		} catch (UnsupportedEncodingException e1) {
+			logger.error(String.format("解释文件路径失败,URL地址为%s", filepath), e1);
+		}
+		File file = new File(Global.getUserfilesBaseDir() + Global.USERFILES_BASE_URL + filepath);
+		try {
+			FileCopyUtils.copy(new FileInputStream(file), resp.getOutputStream());
+			resp.setHeader("Content-Type", "application/octet-stream");
+			return;
+		} catch (FileNotFoundException e) {
+			req.setAttribute("exception", new FileNotFoundException("请求的文件不存在"));
+			req.getRequestDispatcher("/WEB-INF/views/error/404.jsp").forward(req, resp);
+		}*/
+	}
+
+	@Override
+	protected void doGet(HttpServletRequest req, HttpServletResponse resp)
+			throws ServletException, IOException {
+		fileOutputStream(req, resp);
+	}
+
+	@Override
+	protected void doPost(HttpServletRequest req, HttpServletResponse resp)
+			throws ServletException, IOException {
+		fileOutputStream(req, resp);
+	}
+}

+ 150 - 0
src/main/java/com/lightinit/hsdatagateway/common/servlet/ValidateCodeServlet.java

@@ -0,0 +1,150 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.servlet;
+
+import java.awt.Color;
+import java.awt.Font;
+import java.awt.Graphics;
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.Random;
+
+import javax.imageio.ImageIO;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.lang3.math.NumberUtils;
+import org.apache.commons.lang3.StringUtils;
+
+/**
+ * 生成随机验证码
+ * @Author yangrui
+ * @version 2014-7-27
+ */
+@SuppressWarnings("serial")
+public class ValidateCodeServlet extends HttpServlet {
+	
+	public static final String VALIDATE_CODE = "validateCode";
+	
+	private int w = 70;
+	private int h = 26;
+	
+	public ValidateCodeServlet() {
+		super();
+	}
+	
+	public void destroy() {
+		super.destroy(); 
+	}
+	
+	public static boolean validate(HttpServletRequest request, String validateCode){
+		String code = (String)request.getSession().getAttribute(VALIDATE_CODE);
+		return validateCode.toUpperCase().equals(code); 
+	}
+
+	public void doGet(HttpServletRequest request, HttpServletResponse response)
+			throws ServletException, IOException {
+		String validateCode = request.getParameter(VALIDATE_CODE); // AJAX验证,成功返回true
+		if (StringUtils.isNotBlank(validateCode)){
+			response.getOutputStream().print(validate(request, validateCode)?"true":"false");
+		}else{
+			this.doPost(request, response);
+		}
+	}
+
+	public void doPost(HttpServletRequest request, HttpServletResponse response)
+			throws ServletException, IOException {
+		createImage(request,response);
+	}
+	
+	private void createImage(HttpServletRequest request,
+			HttpServletResponse response) throws IOException {
+		
+		response.setHeader("Pragma", "no-cache");
+		response.setHeader("Cache-Control", "no-cache");
+		response.setDateHeader("Expires", 0);
+		response.setContentType("image/jpeg");
+		
+		/*
+		 * 得到参数高,宽,都为数字时,则使用设置高宽,否则使用默认值
+		 */
+		String width = request.getParameter("width");
+		String height = request.getParameter("height");
+		if (StringUtils.isNumeric(width) && StringUtils.isNumeric(height)) {
+			w = NumberUtils.toInt(width);
+			h = NumberUtils.toInt(height);
+		}
+		
+		BufferedImage image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
+		Graphics g = image.getGraphics();
+
+		/*
+		 * 生成背景
+		 */
+		createBackground(g);
+
+		/*
+		 * 生成字符
+		 */
+		String s = createCharacter(g);
+		request.getSession().setAttribute(VALIDATE_CODE, s);
+
+		g.dispose();
+		OutputStream out = response.getOutputStream();
+		ImageIO.write(image, "JPEG", out);
+		out.close();
+
+	}
+	
+	private Color getRandColor(int fc,int bc) { 
+		int f = fc;
+		int b = bc;
+		Random random=new Random();
+        if(f>255) {
+        	f=255; 
+        }
+        if(b>255) {
+        	b=255; 
+        }
+        return new Color(f+random.nextInt(b-f),f+random.nextInt(b-f),f+random.nextInt(b-f)); 
+	}
+	
+	private void createBackground(Graphics g) {
+		// 填充背景
+		g.setColor(getRandColor(220,250)); 
+		g.fillRect(0, 0, w, h);
+		// 加入干扰线条
+		for (int i = 0; i < 8; i++) {
+			g.setColor(getRandColor(40,150));
+			Random random = new Random();
+			int x = random.nextInt(w);
+			int y = random.nextInt(h);
+			int x1 = random.nextInt(w);
+			int y1 = random.nextInt(h);
+			g.drawLine(x, y, x1, y1);
+		}
+	}
+
+	private String createCharacter(Graphics g) {
+		char[] codeSeq = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J',
+				'K', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
+				'X', 'Y', 'Z', '2', '3', '4', '5', '6', '7', '8', '9' };
+		String[] fontTypes = {"Arial","Arial Black","AvantGarde Bk BT","Calibri"}; 
+		Random random = new Random();
+		StringBuilder s = new StringBuilder();
+		for (int i = 0; i < 4; i++) {
+			String r = String.valueOf(codeSeq[random.nextInt(codeSeq.length)]);//random.nextInt(10));
+			g.setColor(new Color(50 + random.nextInt(100), 50 + random.nextInt(100), 50 + random.nextInt(100)));
+			g.setFont(new Font(fontTypes[random.nextInt(fontTypes.length)],Font.BOLD,26)); 
+			g.drawString(r, 15 * i + 5, 19 + random.nextInt(8));
+//			g.drawString(r, i*w/4, h-5);
+			s.append(r);
+		}
+		return s.toString();
+	}
+	
+}

+ 226 - 0
src/main/java/com/lightinit/hsdatagateway/common/supcan/SupcanController.java

@@ -0,0 +1,226 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.supcan;
+
+import java.lang.reflect.Method;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Map;
+
+import com.lightinit.hsdatagateway.common.config.Global;
+import com.lightinit.hsdatagateway.common.supcan.annotation.treelist.SupTreeList;
+import com.lightinit.hsdatagateway.common.supcan.annotation.treelist.cols.SupCol;
+import com.lightinit.hsdatagateway.common.supcan.annotation.treelist.cols.SupGroup;
+import com.lightinit.hsdatagateway.common.supcan.treelist.TreeList;
+import com.lightinit.hsdatagateway.common.supcan.treelist.cols.Col;
+import com.lightinit.hsdatagateway.common.supcan.treelist.cols.Group;
+import org.apache.ibatis.session.SqlSessionFactory;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.lightinit.hsdatagateway.common.config.Global;
+import com.lightinit.hsdatagateway.common.supcan.annotation.treelist.SupTreeList;
+import com.lightinit.hsdatagateway.common.supcan.annotation.treelist.cols.SupCol;
+import com.lightinit.hsdatagateway.common.supcan.annotation.treelist.cols.SupGroup;
+import com.lightinit.hsdatagateway.common.supcan.treelist.TreeList;
+import com.lightinit.hsdatagateway.common.supcan.treelist.cols.Col;
+import com.lightinit.hsdatagateway.common.supcan.treelist.cols.Group;
+import com.lightinit.hsdatagateway.common.utils.CacheUtils;
+import com.lightinit.hsdatagateway.common.utils.SpringContextHolder;
+import com.lightinit.hsdatagateway.common.utils.StringUtils;
+import com.lightinit.hsdatagateway.common.web.BaseController;
+
+/**
+ * 硕正Controller
+ * @Author yangrui
+ * @version 2013-11-13
+ */
+@Controller
+@RequestMapping(value = "${adminPath}/supcan")
+public class SupcanController extends BaseController {
+
+	private static final String SUPCAN_CACHE = "supcanCache";
+	
+	/**
+	 * 获取硕正树列表描述(根据注解获取XML)
+	 * @return
+	 */
+	@RequestMapping(value = "treeList/{typeAlias}.xml")
+	@ResponseBody
+	public TreeList treeList(@PathVariable("typeAlias") String typeAlias) {
+		
+		// 如果使用Cache,并且在Cache里存在,则直接返回。
+		boolean useCache = Global.getConfig("supcan.useCache") == "true";
+		if (useCache){
+			Object object = CacheUtils.get(SUPCAN_CACHE, typeAlias);
+			if (object != null){
+				return (TreeList)object;
+			}
+		}
+		
+		// 实体类型
+		Class<?> clazz;
+		
+		try{
+			// 根据别名获取MyBaits注册类型。
+			SqlSessionFactory sqlSessionFactory = SpringContextHolder.getBean(SqlSessionFactory.class);
+			clazz = sqlSessionFactory.getConfiguration().getTypeAliasRegistry().resolveAlias(typeAlias);
+		}catch (Exception e) {
+			// 取不到类型,返回空。
+			return null;
+		}
+		
+		// 获取硕正注解配置
+		SupTreeList supTreeList = clazz.getAnnotation(SupTreeList.class);
+
+		// 没有硕正注解配置,则返回空
+		if (supTreeList == null){
+			return null;
+		}
+		
+		// 实例化硕正树列表对象
+		TreeList treeList = new TreeList(supTreeList);
+		
+		// 获取表头分组
+		Map<String, Group> groupMap = Maps.newHashMap();
+		if (supTreeList !=null && supTreeList.groups() != null){
+			for (SupGroup supGroup : supTreeList.groups()){
+				groupMap.put(supGroup.id(), new Group(supGroup));
+			}
+		}
+		
+		// 获取表头列
+		List<Object> cols = treeList.getCols();
+		for (Method m : clazz.getMethods()){
+			SupCol supCol = m.getAnnotation(SupCol.class);
+			if (supCol != null){
+				
+				// 转为为Col对象
+				Col col = new Col(supCol);
+				if (StringUtils.isBlank(col.getName())){
+					col.setName(StringUtils.uncapitalize(StringUtils.substring(m.getName(), 3)));
+				}
+				
+				// 无分组
+				if (StringUtils.isBlank(supCol.groupId())){
+					cols.add(col);
+				}
+				// 有分组
+				else{
+					Group group = groupMap.get(supCol.groupId());
+					if (group != null){
+						group.getCols().add(col);
+					}
+				}
+			}
+		}
+		
+		// 创建字段排序类
+		Comparator<Object> comparator = new Comparator<Object>() {
+			@Override
+			public int compare(Object o1, Object o2) {
+				int sort1 = 0, sort2 = 0;
+				if (o1 instanceof Group){
+					sort1 = ((Group)o1).getSort();
+				}else if (o1 instanceof Col){
+					sort1 = ((Col)o1).getSort();
+				}
+				if (o2 instanceof Group){
+					sort2 = ((Group)o2).getSort();
+				}else if (o2 instanceof Col){
+					sort2 = ((Col)o2).getSort();
+				}
+				return new Integer(sort1).compareTo(new Integer(sort2));
+			}
+		};
+
+		// 将列表转换为树结构并排序
+		listToTree(cols, groupMap, null, comparator);
+		
+		// 整体排序
+		Collections.sort(cols, comparator);
+
+		// 如果使用Cache,则保存到Cache
+		if (useCache){
+			CacheUtils.put(SUPCAN_CACHE, typeAlias, treeList);
+		}
+		
+		return treeList;
+	}
+	
+	/**
+	 * 将分组转换为树结构
+	 * @param list
+	 * @param groupMap
+	 * @param parentId
+	 */
+	private void listToTree(List<Object> colList, Map<String, Group> groupMap, String parentId, Comparator<Object> comparator){
+		for (Map.Entry<String, Group> e : groupMap.entrySet()){
+			Group g = e.getValue();
+			if (StringUtils.equals(parentId, g.getParentId())){
+				colList.add(g);
+				// 判断是否有子节点,有的话则加进去
+				for (Map.Entry<String, Group> ec : groupMap.entrySet()){
+					Group gc = ec.getValue();
+					if (g.getId() != null && g.getId().equals(gc.getParentId())){
+						List<Object> childrenList = Lists.newArrayList();
+						listToTree(childrenList, groupMap, gc.getParentId(), comparator);
+						g.getCols().addAll(childrenList);
+						break;
+					}
+				}
+				// 排序
+				Collections.sort(g.getCols(), comparator);
+			}
+		}
+	}
+	
+	/**
+	 * 获取硕正树列表描述(注册对象方法获取XML)  测试实例
+	 * @return
+	 */
+	@RequestMapping(value = "treeList/test/test.xml")
+	@ResponseBody
+	public TreeList treeListTest() {
+
+		// 创建树列表描述对象
+		TreeList treeList = new TreeList();
+		
+		// 设置树列表,表头
+		List<Object> cols = treeList.getCols();
+		cols.add(new Col("id", "编号"));
+		cols.add(new Col("office", "归属部门"));
+		cols.add(new Col("loginName", "登录名"));
+		cols.add(new Col("name", "名称"));
+		cols.add(new Col("remarks", "备注"));
+		
+		// 设置树列表,多层表头
+		
+		// 分组1
+		Group group = new Group("时间");
+		List<Object> groupCol = group.getCols();
+		groupCol.add(new Col("createDate", "创建时间"));
+		groupCol.add(new Col("updateDate", "更新时间"));
+		
+		// 分组2
+		Group group2 = new Group("时间2");
+		List<Object> group2Col = group2.getCols();
+		group2Col.add(new Col("createDate2", "创建时间2"));
+		group2Col.add(new Col("updateDate2", "更新时间2"));
+		
+		// 将分组2添加到,分组1的表头
+		groupCol.add(group2);
+
+		// 将分组1添加到,主表头
+		cols.add(group);
+		
+		// 返回TreeList描述对象
+		return treeList;
+	}
+}

+ 59 - 0
src/main/java/com/lightinit/hsdatagateway/common/supcan/annotation/common/fonts/SupFont.java

@@ -0,0 +1,59 @@
+/**
+ * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
+ */
+package com.lightinit.hsdatagateway.common.supcan.annotation.common.fonts;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * 硕正Font注解
+ * @Author yangrui
+ * @version 2013-11-12
+ */
+@Target({ ElementType.ANNOTATION_TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+@Inherited
+public @interface SupFont {
+	
+	/**
+	 * 字体名称   微软雅黑  宋体
+	 */
+	String faceName() default "";
+
+	/**
+	 * 字符集 134
+	 */
+	String charSet() default "";
+
+	/**
+	 * Height(或size)是字体的尺寸,单位是字体的逻辑单位,通常采用小于0的数字,
+	 * 如果大于0,则高度不包含文字的内部行距(internal-leading)。
+	 * 常用的尺寸是-8, -9, -10, -11, -12, -14, -16, -18, -20, -22, -24, -26, -28, -36, -48, -72() ;
+	 */
+	String height() default "";
+	
+	/**
+	 * 字体加粗 weight=400/700 对应 非粗体/粗体;
+	 */
+	String weight() default "";
+
+	/**
+	 * 字体宽度
+	 */
+	String width() default "";
+	
+	/**
+	 * 字体斜体
+	 */
+	String italic() default "";
+	
+	/**
+	 * 字体下划线
+	 */
+	String underline() default "";
+
+}

+ 0 - 0
src/main/java/com/lightinit/hsdatagateway/common/supcan/annotation/common/properties/SupBackground.java


Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików