RYang пре 5 година
комит
47ba2fb426
100 измењених фајлова са 8490 додато и 0 уклоњено
  1. 44 0
      .classpath
  2. 14 0
      .gitignore
  3. 14 0
      .idea/compiler.xml
  4. 17 0
      .idea/misc.xml
  5. 6 0
      .idea/sbt.xml
  6. 6 0
      .idea/vcs.xml
  7. 444 0
      .idea/workspace.xml
  8. 48 0
      .project
  9. 13 0
      .settings/.jsdtscope
  10. 2 0
      .settings/org.eclipse.core.resources.prefs
  11. 13 0
      .settings/org.eclipse.jdt.core.prefs
  12. 4 0
      .settings/org.eclipse.m2e.core.prefs
  13. 10 0
      .settings/org.eclipse.wst.common.component
  14. 7 0
      .settings/org.eclipse.wst.common.project.facet.core.prefs.xml
  15. 8 0
      .settings/org.eclipse.wst.common.project.facet.core.xml
  16. 1 0
      .settings/org.eclipse.wst.jsdt.ui.superType.container
  17. 1 0
      .settings/org.eclipse.wst.jsdt.ui.superType.name
  18. 2 0
      .settings/org.eclipse.wst.validation.prefs
  19. 64 0
      ClearData.sql
  20. 5 0
      ReadMe.txt
  21. 338 0
      UpgradeSentry.sql
  22. BIN
      lib/axis.jar
  23. BIN
      lib/commons-discovery-0.2.jar
  24. BIN
      lib/commons-logging-1.0.4.jar
  25. BIN
      lib/jaxrpc.jar
  26. BIN
      lib/log4j-1.2.8.jar
  27. BIN
      lib/saaj.jar
  28. BIN
      lib/wsdl4j-1.5.1.jar
  29. 593 0
      pom.xml
  30. 64 0
      src/main/java/com/Main.java
  31. 62 0
      src/main/java/com/lightinit/hsdataplatform/annotation/AnnotationHelper.java
  32. 21 0
      src/main/java/com/lightinit/hsdataplatform/annotation/FieldDescriber.java
  33. 27 0
      src/main/java/com/lightinit/hsdataplatform/annotation/FieldDescriberHelper.java
  34. 215 0
      src/main/java/com/lightinit/hsdataplatform/common/Base64Utils.java
  35. 78 0
      src/main/java/com/lightinit/hsdataplatform/common/BaseRemoteClient.java
  36. 35 0
      src/main/java/com/lightinit/hsdataplatform/common/BytesUtil.java
  37. 14 0
      src/main/java/com/lightinit/hsdataplatform/common/CharEncoding.java
  38. 19 0
      src/main/java/com/lightinit/hsdataplatform/common/CharacterUtils.java
  39. 17 0
      src/main/java/com/lightinit/hsdataplatform/common/ClassUtils.java
  40. 37 0
      src/main/java/com/lightinit/hsdataplatform/common/ConfigUtils.java
  41. 19 0
      src/main/java/com/lightinit/hsdataplatform/common/ContractNumberUtils.java
  42. 84 0
      src/main/java/com/lightinit/hsdataplatform/common/DateUtils.java
  43. 41 0
      src/main/java/com/lightinit/hsdataplatform/common/ExcelTookitUtils.java
  44. 93 0
      src/main/java/com/lightinit/hsdataplatform/common/FTPConfigurationUtilsPro.java
  45. 364 0
      src/main/java/com/lightinit/hsdataplatform/common/FTPTookitUtils.java
  46. 59 0
      src/main/java/com/lightinit/hsdataplatform/common/GateWayUtils.java
  47. 13 0
      src/main/java/com/lightinit/hsdataplatform/common/GuidGenerator.java
  48. 242 0
      src/main/java/com/lightinit/hsdataplatform/common/HttpTookitUtils.java
  49. 369 0
      src/main/java/com/lightinit/hsdataplatform/common/HttpUtil.java
  50. 148 0
      src/main/java/com/lightinit/hsdataplatform/common/IPUtils.java
  51. 53 0
      src/main/java/com/lightinit/hsdataplatform/common/MD5Utils.java
  52. 162 0
      src/main/java/com/lightinit/hsdataplatform/common/MenuUtils.java
  53. 43 0
      src/main/java/com/lightinit/hsdataplatform/common/ObjectConvertorUtils.java
  54. 17 0
      src/main/java/com/lightinit/hsdataplatform/common/ObjectMappingUtils.java
  55. 181 0
      src/main/java/com/lightinit/hsdataplatform/common/OneTimePasswordAlgorithm.java
  56. 19 0
      src/main/java/com/lightinit/hsdataplatform/common/OrderNumberUtils.java
  57. 36 0
      src/main/java/com/lightinit/hsdataplatform/common/PermissionUtilsPro.java
  58. 43 0
      src/main/java/com/lightinit/hsdataplatform/common/RoleComboUtils.java
  59. 127 0
      src/main/java/com/lightinit/hsdataplatform/common/RoleModulesUtilsPro.java
  60. 71 0
      src/main/java/com/lightinit/hsdataplatform/common/SecureCardUtilsPro.java
  61. 32 0
      src/main/java/com/lightinit/hsdataplatform/common/ShiroFilterUtils.java
  62. 51 0
      src/main/java/com/lightinit/hsdataplatform/common/ShortPhoneUtils.java
  63. 43 0
      src/main/java/com/lightinit/hsdataplatform/common/SolrUtils.java
  64. 88 0
      src/main/java/com/lightinit/hsdataplatform/common/SysContants.java
  65. 28 0
      src/main/java/com/lightinit/hsdataplatform/common/ThriftServerConfig.java
  66. 73 0
      src/main/java/com/lightinit/hsdataplatform/common/TokenUntils.java
  67. 123 0
      src/main/java/com/lightinit/hsdataplatform/common/TripleDESUtilsPro.java
  68. 70 0
      src/main/java/com/lightinit/hsdataplatform/common/UploadFileUtils.java
  69. 50 0
      src/main/java/com/lightinit/hsdataplatform/common/WebUtilsPro.java
  70. 97 0
      src/main/java/com/lightinit/hsdataplatform/common/ssl/MySecureProtocolSocketFactory.java
  71. 28 0
      src/main/java/com/lightinit/hsdataplatform/common/ssl/MyX509TrustManager.java
  72. 210 0
      src/main/java/com/lightinit/hsdataplatform/controller/ActiveMQController.java
  73. 74 0
      src/main/java/com/lightinit/hsdataplatform/controller/BaseController.java
  74. 57 0
      src/main/java/com/lightinit/hsdataplatform/controller/CacheController.java
  75. 94 0
      src/main/java/com/lightinit/hsdataplatform/controller/CaptchaController.java
  76. 16 0
      src/main/java/com/lightinit/hsdataplatform/controller/GrantController.java
  77. 43 0
      src/main/java/com/lightinit/hsdataplatform/controller/HomeController.java
  78. 46 0
      src/main/java/com/lightinit/hsdataplatform/controller/LogController.java
  79. 100 0
      src/main/java/com/lightinit/hsdataplatform/controller/LoginController.java
  80. 81 0
      src/main/java/com/lightinit/hsdataplatform/controller/MenuController.java
  81. 218 0
      src/main/java/com/lightinit/hsdataplatform/controller/RoleController.java
  82. 164 0
      src/main/java/com/lightinit/hsdataplatform/controller/SolrController.java
  83. 215 0
      src/main/java/com/lightinit/hsdataplatform/controller/TokenController.java
  84. 114 0
      src/main/java/com/lightinit/hsdataplatform/controller/UploadController.java
  85. 344 0
      src/main/java/com/lightinit/hsdataplatform/controller/UserController.java
  86. 233 0
      src/main/java/com/lightinit/hsdataplatform/controller/admin/APIPublishController.java
  87. 158 0
      src/main/java/com/lightinit/hsdataplatform/controller/admin/APIRecommendationController.java
  88. 144 0
      src/main/java/com/lightinit/hsdataplatform/controller/admin/APIToExamineController.java
  89. 103 0
      src/main/java/com/lightinit/hsdataplatform/controller/admin/AccountController.java
  90. 81 0
      src/main/java/com/lightinit/hsdataplatform/controller/admin/AccountManageController.java
  91. 85 0
      src/main/java/com/lightinit/hsdataplatform/controller/admin/ActivityMgrController.java
  92. 94 0
      src/main/java/com/lightinit/hsdataplatform/controller/admin/AuthorizationController.java
  93. 62 0
      src/main/java/com/lightinit/hsdataplatform/controller/admin/BaseController.java
  94. 33 0
      src/main/java/com/lightinit/hsdataplatform/controller/admin/CatelogCountCountroller.java
  95. 78 0
      src/main/java/com/lightinit/hsdataplatform/controller/admin/ClassificationAndAggregationController.java
  96. 58 0
      src/main/java/com/lightinit/hsdataplatform/controller/admin/CommonController.java
  97. 200 0
      src/main/java/com/lightinit/hsdataplatform/controller/admin/ConsultController.java
  98. 175 0
      src/main/java/com/lightinit/hsdataplatform/controller/admin/ContractController.java
  99. 100 0
      src/main/java/com/lightinit/hsdataplatform/controller/admin/DataAuditController.java
  100. 0 0
      src/main/java/com/lightinit/hsdataplatform/controller/admin/DataCatelogMgrController.java

+ 44 - 0
.classpath

@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" output="target/classes" path="src/main/java">
+		<attributes>
+			<attribute name="optional" value="true"/>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+			<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="lib" path="lib">
+		<attributes>
+			<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/classes"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry exported="true" kind="lib" path="src/main/webapp/WEB-INF/lib">
+		<attributes>
+			<attribute name="org.eclipse.jst.component.nondependency" value=""/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/PushJavaSDK.jar"/>
+	<classpathentry kind="lib" path="src/main/webapp/WEB-INF/lib/SRightMngr.jar"/>
+	<classpathentry kind="src" output="target/test-classes" path="src/test/java">
+		<attributes>
+			<attribute name="optional" value="true"/>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

+ 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
+

+ 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="hsdataplatform" />
+      </profile>
+    </annotationProcessing>
+  </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>

+ 444 - 0
.idea/workspace.xml

@@ -0,0 +1,444 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ArtifactsWorkspaceSettings">
+    <artifacts-to-build>
+      <artifact name="hsdataplatform:war" />
+    </artifacts-to-build>
+  </component>
+  <component name="ChangeListManager">
+    <list default="true" id="90014a4c-91ae-41c0-9ec1-27438560bef6" name="Default" comment="">
+      <change afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/resources/config.properties" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/config.properties" afterDir="false" />
+    </list>
+    <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="config.properties" pinned="false" current-in-tab="true">
+        <entry file="file://$PROJECT_DIR$/src/main/resources/config.properties">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="486">
+              <caret line="50" column="28" lean-forward="true" selection-start-line="50" selection-start-column="28" selection-end-line="50" selection-end-column="28" />
+            </state>
+          </provider>
+        </entry>
+      </file>
+    </leaf>
+  </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$/../../../../LIGHTINIT/00-项目资料/05-公租房/GIT/housing-common" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../../LIGHTINIT/00-项目资料/05-公租房/GIT/housing-datasync" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../LCN事务管理器/GIT/mrf-lcn" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../LCN事务管理器/GIT/mrf-tm-manager" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../daas/GIT/apiOutService" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../daas/GIT/apiService" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../developer/GIT/dcw-mgmt-server" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../framework/GIT/csp-commons" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../framework/GIT/dc-cas-server" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../framework/GIT/demoService" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../framework/GIT/mrf-boot" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../framework/GIT/mrf-cas-server" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../platformBusiness/GIT/cas" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../platformBusiness/GIT/cspservice" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../platformBusiness/GIT/image" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../platformBusiness/GIT/operationmgr" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../platformBusiness/GIT/securitycall" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../platformBusiness/GIT/third-service" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../platformBusiness/GIT/userservice" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../platformBusiness/GIT/ytserver" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../product/鲜果多多/GIT/fruits-service" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../sample/GradleSide-master/20-plugin-proguard" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../sample/Installer-master" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../sample/confusion-master" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../sample/moco-master" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../sample/proguard-spring-boot-example-master" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../sample/sso-master/sso-client1" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../sample/sso-master/sso-client2" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../sample/sso-master/sso-server" value="PREVIEW" />
+        <entry key="$PROJECT_DIR$/../../../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/config.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="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="Scope" />
+      <pane id="ProjectPane">
+        <subPane>
+          <expand>
+            <path>
+              <item name="hsdataplatform" type="b2602c69:ProjectViewProjectNode" />
+              <item name="hsdataplatform" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="hsdataplatform" type="b2602c69:ProjectViewProjectNode" />
+              <item name="hsdataplatform" type="462c0819:PsiDirectoryNode" />
+              <item name="src" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="hsdataplatform" type="b2602c69:ProjectViewProjectNode" />
+              <item name="hsdataplatform" type="462c0819:PsiDirectoryNode" />
+              <item name="src" type="462c0819:PsiDirectoryNode" />
+              <item name="main" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="hsdataplatform" type="b2602c69:ProjectViewProjectNode" />
+              <item name="hsdataplatform" type="462c0819:PsiDirectoryNode" />
+              <item name="src" type="462c0819:PsiDirectoryNode" />
+              <item name="main" type="462c0819:PsiDirectoryNode" />
+              <item name="resources" type="462c0819:PsiDirectoryNode" />
+            </path>
+          </expand>
+          <select />
+        </subPane>
+      </pane>
+      <pane id="PackagesPane" />
+      <pane id="AndroidView" />
+    </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="hsdataplatform:war">
+          <settings>
+            <option name="CONTEXT_PATH" value="/" />
+          </settings>
+        </artifact>
+      </deployment>
+      <server-settings>
+        <option name="BASE_DIRECTORY_NAME" value="Unnamed_hsdataplatform" />
+      </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="55419" />
+      </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="hsdataplatform: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="90014a4c-91ae-41c0-9ec1-27438560bef6" name="Default" comment="" />
+      <created>1575595775012</created>
+      <option name="number" value="Default" />
+      <option name="presentableId" value="Default" />
+      <updated>1575595775012</updated>
+      <workItem from="1575595776311" duration="161000" />
+    </task>
+    <servers />
+  </component>
+  <component name="TimeTrackingManager">
+    <option name="totallyTimeSpent" value="161000" />
+  </component>
+  <component name="ToolWindowManager">
+    <frame x="0" y="0" width="1440" height="900" extended-state="0" />
+    <editor active="true" />
+    <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.32969698" />
+      <window_info anchor="right" id="Maven Projects" />
+      <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.36969697" />
+      <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" />
+      <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="right" id="Theme Preview" />
+      <window_info id="Favorites" side_tool="true" />
+      <window_info anchor="bottom" id="Find" order="1" />
+      <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="90">
+          <caret line="6" column="22" lean-forward="true" selection-start-line="6" selection-start-column="22" selection-end-line="6" selection-end-column="22" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/resources/config.properties">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="486">
+          <caret line="50" column="28" lean-forward="true" selection-start-line="50" selection-start-column="28" selection-end-line="50" selection-end-column="28" />
+        </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>

+ 48 - 0
.project

@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>HSDataPlatform</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.wst.common.project.facet.core.builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.wst.validation.validationbuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.springframework.ide.eclipse.core.springbuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.springframework.ide.eclipse.boot.validation.springbootbuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.m2e.core.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.springframework.ide.eclipse.core.springnature</nature>
+		<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+		<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.m2e.core.maven2Nature</nature>
+		<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+		<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
+	</natures>
+</projectDescription>

+ 13 - 0
.settings/.jsdtscope

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry excluding="**/bower_components/*|**/node_modules/*|**/*.min.js" kind="src" path="src/main/webapp"/>
+	<classpathentry kind="src" path="target/m2e-wtp/web-resources"/>
+	<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
+		<attributes>
+			<attribute name="hide" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
+	<classpathentry kind="output" path=""/>
+</classpath>

+ 2 - 0
.settings/org.eclipse.core.resources.prefs

@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding//src/main/java/com/lantinit/sentry/tasks/ReadLogsJobTask.java=UTF-8

+ 13 - 0
.settings/org.eclipse.jdt.core.prefs

@@ -0,0 +1,13 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.6

+ 4 - 0
.settings/org.eclipse.m2e.core.prefs

@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1

+ 10 - 0
.settings/org.eclipse.wst.common.component

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
+    <wb-module deploy-name="sentry">
+        <wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
+        <wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
+        <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
+        <wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
+        <property name="context-root" value="sentry"/>
+        <property name="java-output-path" value="/sentry/target/classes"/>
+    </wb-module>
+</project-modules>

+ 7 - 0
.settings/org.eclipse.wst.common.project.facet.core.prefs.xml

@@ -0,0 +1,7 @@
+<root>
+  <facet id="jst.jaxrs">
+    <node name="libprov">
+      <attribute name="provider-id" value="jaxrs-no-op-library-provider"/>
+    </node>
+  </facet>
+</root>

+ 8 - 0
.settings/org.eclipse.wst.common.project.facet.core.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+  <fixed facet="wst.jsdt.web"/>
+  <installed facet="jst.web" version="2.3"/>
+  <installed facet="jst.jaxrs" version="1.1"/>
+  <installed facet="wst.jsdt.web" version="1.0"/>
+  <installed facet="java" version="1.6"/>
+</faceted-project>

+ 1 - 0
.settings/org.eclipse.wst.jsdt.ui.superType.container

@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary

+ 1 - 0
.settings/org.eclipse.wst.jsdt.ui.superType.name

@@ -0,0 +1 @@
+Window

+ 2 - 0
.settings/org.eclipse.wst.validation.prefs

@@ -0,0 +1,2 @@
+disabled=06target
+eclipse.preferences.version=1

+ 64 - 0
ClearData.sql

@@ -0,0 +1,64 @@
+SET FOREIGN_KEY_CHECKS=0;
+
+TRUNCATE TABLE activity_enroll;
+TRUNCATE TABLE activity;
+TRUNCATE TABLE atlas_relationship;
+TRUNCATE TABLE atlas_scene;
+TRUNCATE TABLE atlas_relationship;
+TRUNCATE TABLE business_monitoring;
+TRUNCATE TABLE contract_resource;
+TRUNCATE TABLE contract;
+TRUNCATE TABLE data_requirement_data;
+# TRUNCATE TABLE dictionary;
+# TRUNCATE TABLE dictionary_group;
+TRUNCATE TABLE invoice;
+TRUNCATE TABLE key_word;
+TRUNCATE TABLE leave_message;
+# TRUNCATE TABLE menu;
+# TRUNCATE TABLE module_action;
+TRUNCATE TABLE news_content;
+TRUNCATE TABLE news;
+TRUNCATE TABLE notification;
+TRUNCATE TABLE offline_conference;
+TRUNCATE TABLE order_payment;
+TRUNCATE TABLE order_goods;
+TRUNCATE TABLE orders;
+TRUNCATE TABLE resource_follow;
+TRUNCATE TABLE resource_auth;
+TRUNCATE TABLE publish_setting;
+TRUNCATE TABLE publish_info;
+TRUNCATE TABLE requirement_follow;
+TRUNCATE TABLE requirement_data;
+TRUNCATE TABLE requirement_api;
+TRUNCATE TABLE requirement_microapp;
+TRUNCATE TABLE requirement_receive;
+TRUNCATE TABLE requirement;
+TRUNCATE TABLE resource_data;
+TRUNCATE TABLE resource_api_interface_input;
+TRUNCATE TABLE resource_api_interface_output;
+TRUNCATE TABLE resource_api_interface;
+TRUNCATE TABLE resource_api;
+TRUNCATE TABLE resource_microapp;
+TRUNCATE TABLE resource_view_times;
+TRUNCATE TABLE resource_sort;
+TRUNCATE TABLE resource;
+# TRUNCATE TABLE resource_catelog;
+# TRUNCATE TABLE data_catelog_item;
+# TRUNCATE TABLE data_catelog;
+TRUNCATE TABLE roadshow_requirement;
+TRUNCATE TABLE roadshow;
+# TRUNCATE TABLE running_monitoring;
+# TRUNCATE TABLE tag;
+# TRUNCATE TABLE organization;
+# TRUNCATE TABLE sector;
+
+TRUNCATE TABLE service_provider;
+# TRUNCATE TABLE user_account_transaction;
+# TRUNCATE TABLE user_account;
+# TRUNCATE TABLE user_auth_setting;
+# TRUNCATE TABLE user_company;
+# TRUNCATE TABLE user_personal
+# TRUNCATE TABLE user_security_code;
+# TRUNCATE TABLE user;
+
+SET FOREIGN_KEY_CHECKS=1;

+ 5 - 0
ReadMe.txt

@@ -0,0 +1,5 @@
+1、IDE可选择IntelliJ IDEAD、eclipse或者myeclipse等
+2、JDK版本选择JDK7及以上
+3、可选择安装Maven3
+4、Druid帐号及密码均为druid
+5、Mysql数据库版本5.1及以上

Разлика између датотеке није приказан због своје велике величине
+ 338 - 0
UpgradeSentry.sql



BIN
lib/commons-discovery-0.2.jar


BIN
lib/commons-logging-1.0.4.jar



BIN
lib/log4j-1.2.8.jar



BIN
lib/wsdl4j-1.5.1.jar


+ 593 - 0
pom.xml

@@ -0,0 +1,593 @@
+<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/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>com.lightinit</groupId>
+  <artifactId>hsdataplatform</artifactId>
+  <packaging>war</packaging>
+  <version>1.0-SNAPSHOT</version>
+  <name>HSDataPlatform Maven Webapp</name>
+  <url>http://maven.apache.org</url>
+  <properties>
+    <spring.version>4.2.6.RELEASE</spring.version>
+    <mysql.version>5.1.21</mysql.version>
+    <mybatis.version>3.4.2</mybatis.version>
+    <shiro.version>1.3.2</shiro.version>
+    <druid.version>1.0.29</druid.version>
+    <axis2.version>1.7.5</axis2.version>
+  </properties>
+  <dependencies>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-core</artifactId>
+      <version>${spring.version}</version>
+    </dependency>
+    <!--modelmapper映射-->
+    <dependency>
+      <groupId>org.modelmapper</groupId>
+      <artifactId>modelmapper</artifactId>
+      <version>0.7.5</version>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-web</artifactId>
+      <version>${spring.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-jdbc</artifactId>
+      <version>${spring.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-orm</artifactId>
+      <version>${spring.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-tx</artifactId>
+      <version>${spring.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>javax.servlet</groupId>
+      <artifactId>javax.servlet-api</artifactId>
+      <version>3.1.0</version>
+    </dependency>
+
+    <dependency>
+      <groupId>javax.servlet.jsp</groupId>
+      <artifactId>jsp-api</artifactId>
+      <version>2.1</version>
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>jstl</groupId>
+      <artifactId>jstl</artifactId>
+      <version>1.2</version>
+    </dependency>
+
+    <dependency>
+      <groupId>taglibs</groupId>
+      <artifactId>standard</artifactId>
+      <version>1.1.2</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-webmvc</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-websocket</artifactId>
+      <version>${spring.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>mysql</groupId>
+      <artifactId>mysql-connector-java</artifactId>
+      <version>${mysql.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.mybatis</groupId>
+      <artifactId>mybatis</artifactId>
+      <version>${mybatis.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.mybatis</groupId>
+      <artifactId>mybatis-spring</artifactId>
+      <version>1.3.1</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.codehaus.jackson</groupId>
+      <artifactId>jackson-mapper-asl</artifactId>
+      <version>1.9.12</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.codehaus.jackson</groupId>
+      <artifactId>jackson-core-asl</artifactId>
+      <version>1.9.12</version>
+    </dependency>
+
+    <dependency>
+      <groupId>commons-dbcp</groupId>
+      <artifactId>commons-dbcp</artifactId>
+      <version>1.4</version>
+    </dependency>
+
+    <dependency>
+      <groupId>commons-pool</groupId>
+      <artifactId>commons-pool</artifactId>
+      <version>1.5.4</version>
+    </dependency>
+
+    <dependency>
+      <groupId>commons-logging</groupId>
+      <artifactId>commons-logging</artifactId>
+      <version>1.1.1</version>
+    </dependency>
+
+    <dependency>
+      <groupId>commons-collections</groupId>
+      <artifactId>commons-collections</artifactId>
+      <version>3.2.2</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.httpcomponents</groupId>
+      <artifactId>httpclient</artifactId>
+      <version>4.5.1</version>
+    </dependency>
+
+    <dependency>
+      <groupId>commons-httpclient</groupId>
+      <artifactId>commons-httpclient</artifactId>
+      <version>3.1</version>
+    </dependency>
+
+    <dependency>
+      <groupId>commons-io</groupId>
+      <artifactId>commons-io</artifactId>
+      <version>2.4</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.shiro</groupId>
+      <artifactId>shiro-core</artifactId>
+      <version>${shiro.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.shiro</groupId>
+      <artifactId>shiro-web</artifactId>
+      <version>${shiro.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.shiro</groupId>
+      <artifactId>shiro-quartz</artifactId>
+      <version>${shiro.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.opensymphony.quartz</groupId>
+          <artifactId>quartz</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.shiro</groupId>
+      <artifactId>shiro-ehcache</artifactId>
+      <version>${shiro.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.shiro</groupId>
+      <artifactId>shiro-spring</artifactId>
+      <version>${shiro.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>net.sf.ehcache</groupId>
+      <artifactId>ehcache-core</artifactId>
+      <version>2.6.11</version>
+    </dependency>
+
+    <dependency>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-core</artifactId>
+      <version>2.7.4</version>
+    </dependency>
+
+    <dependency>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-databind</artifactId>
+      <version>2.7.4</version>
+    </dependency>
+
+    <dependency>
+      <groupId>com.fasterxml.jackson.core</groupId>
+      <artifactId>jackson-annotations</artifactId>
+      <version>2.7.4</version>
+    </dependency>
+    <!--Jaxen is a universal Java XPath engine. -->
+    <dependency>
+      <groupId>jaxen</groupId>
+      <artifactId>jaxen</artifactId>
+      <version>1.1.6</version>
+    </dependency>
+    <!--log4j-->
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+      <version>1.7.10</version>
+    </dependency>
+
+    <!--<dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-jdk14</artifactId>
+      <version>1.7.10</version>
+    </dependency>-->
+
+    <dependency>
+      <groupId>log4j</groupId>
+      <artifactId>log4j</artifactId>
+      <version>1.2.17</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-log4j12</artifactId>
+      <version>1.7.10</version>
+    </dependency>
+
+    <dependency>
+      <groupId>commons-fileupload</groupId>
+      <artifactId>commons-fileupload</artifactId>
+      <version>1.2.1</version>
+    </dependency>
+
+    <dependency>
+      <groupId>commons-lang</groupId>
+      <artifactId>commons-lang</artifactId>
+      <version>2.6</version>
+    </dependency>
+
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>com.github.penggle</groupId>
+      <artifactId>kaptcha</artifactId>
+      <version>2.3.2</version>
+    </dependency>
+
+    <dependency>
+      <groupId>redis.clients</groupId>
+      <artifactId>jedis</artifactId>
+      <version>2.9.0</version>
+      <type>jar</type>
+      <scope>compile</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.springframework.data</groupId>
+      <artifactId>spring-data-mongodb</artifactId>
+      <version>1.10.1.RELEASE</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.mongodb</groupId>
+      <artifactId>mongo-java-driver</artifactId>
+      <version>3.3.0</version>
+    </dependency>
+
+    <dependency>
+      <groupId>commons-beanutils</groupId>
+      <artifactId>commons-beanutils</artifactId>
+      <version>1.9.3</version>
+    </dependency>
+
+    <dependency>
+      <groupId>com.alibaba</groupId>
+      <artifactId>druid</artifactId>
+      <version>${druid.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-configuration2</artifactId>
+      <version>2.1.1</version>
+    </dependency>
+
+    <dependency>
+      <groupId>com.google.zxing</groupId>
+      <artifactId>core</artifactId>
+      <version>3.3.0</version>
+    </dependency>
+
+    <dependency>
+      <groupId>com.google.zxing</groupId>
+      <artifactId>javase</artifactId>
+      <version>3.3.0</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-core</artifactId>
+      <version>2.18.3</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-ftp</artifactId>
+      <version>2.18.3</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.thrift</groupId>
+      <artifactId>libthrift</artifactId>
+      <version>0.9.3</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.hadoop</groupId>
+      <artifactId>zookeeper</artifactId>
+      <version>3.3.1</version>
+    </dependency>
+    <dependency>
+      <groupId>org.bouncycastle</groupId>
+      <artifactId>bcprov-jdk16</artifactId>
+      <version>1.45</version>
+    </dependency>
+	<!-- https://mvnrepository.com/artifact/org.postgresql/postgresql -->
+	<dependency>
+    	<groupId>org.postgresql</groupId>
+    	<artifactId>postgresql</artifactId>
+    	<version>42.1.4</version>
+	</dependency>
+
+    <!--axis2-->
+<!-- 
+    <dependency>
+      <groupId>org.apache.axis2</groupId>
+      <artifactId>axis2-adb</artifactId>
+      <version>${axis2.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.axis2</groupId>
+      <artifactId>axis2-kernel</artifactId>
+      <version>${axis2.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.axis2</groupId>
+      <artifactId>axis2-transport-http</artifactId>
+      <version>${axis2.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.axis2</groupId>
+      <artifactId>axis2-transport-local</artifactId>
+      <version>${axis2.version}</version>
+    </dependency> -->
+    <!--&lt;!&ndash; https://mvnrepository.com/artifact/org.apache.axis2/addressing &ndash;&gt;-->
+    <!--<dependency>-->
+      <!--<groupId>org.apache.axis2</groupId>-->
+      <!--<artifactId>addressing</artifactId>-->
+      <!--<version>1.7.5</version>-->
+    <!--</dependency>-->
+
+
+    <!--excel上传依赖-->
+    <dependency>
+      <groupId>org.apache.poi</groupId>
+      <artifactId>poi-ooxml</artifactId>
+      <version>3.17</version>
+    </dependency>
+
+    <!--Quartz定时器-->
+    <dependency>
+      <groupId>org.quartz-scheduler</groupId>
+      <artifactId>quartz</artifactId>
+      <version>2.2.1</version>
+    </dependency>
+    <dependency>
+      <groupId>org.quartz-scheduler</groupId>
+      <artifactId>quartz-jobs</artifactId>
+      <version>2.2.1</version>
+    </dependency>
+
+     <dependency>
+      <groupId>org.apache.ws.commons.axiom</groupId>
+      <artifactId>axiom-api</artifactId>
+      <version>1.2.20</version>
+    </dependency>
+
+    <dependency>
+      <groupId>com.aliyun</groupId>
+      <artifactId>aliyun-java-sdk-core</artifactId>
+      <version>3.2.2</version>
+    </dependency>
+    <dependency>
+      <groupId>com.aliyun</groupId>
+      <artifactId>aliyun-java-sdk-vod</artifactId>
+      <version>2.2.0</version>
+    </dependency>
+
+    <dependency>
+      <groupId>com.microsoft.sqlserver</groupId>
+      <artifactId>mssql-jdbc</artifactId>
+      <version>6.2.1.jre8</version>
+    </dependency>
+	<!-- https://mvnrepository.com/artifact/org.apache.solr/solr-solrj -->
+	<!--<dependency>
+    	<groupId>org.apache.solr</groupId>
+    	<artifactId>solr-solrj</artifactId>
+    	<version>7.1.0</version>
+	</dependency>-->
+<!-- https://mvnrepository.com/artifact/org.apache.solr/solr-core -->
+<!--<dependency>
+    <groupId>org.apache.solr</groupId>
+    <artifactId>solr-core</artifactId>
+    <version>7.1.0</version>
+</dependency>-->
+
+    <!-- https://mvnrepository.com/artifact/org.aspectj/aspectjweaver -->
+    <dependency>
+      <groupId>org.aspectj</groupId>
+      <artifactId>aspectjweaver</artifactId>
+      <version>1.8.12</version>
+    </dependency>
+    <!-- https://mvnrepository.com/artifact/org.aspectj/aspectjrt -->
+    <dependency>
+      <groupId>org.aspectj</groupId>
+      <artifactId>aspectjrt</artifactId>
+      <version>1.8.12</version>
+    </dependency>
+
+    <!-- https://mvnrepository.com/artifact/org.apache.activemq/activemq-core -->
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-jms</artifactId>
+      <version>${spring.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.activemq</groupId>
+      <artifactId>activemq-core</artifactId>
+      <version>5.7.0</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.activemq</groupId>
+      <artifactId>activemq-pool</artifactId>
+      <version>5.15.2</version>
+    </dependency>
+    <!-- https://mvnrepository.com/artifact/org.apache.poi/poi -->
+    <dependency>
+      <groupId>org.apache.poi</groupId>
+      <artifactId>poi</artifactId>
+      <version>3.17</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.poi</groupId>
+      <artifactId>poi-ooxml</artifactId>
+      <version>3.17</version>
+    </dependency>
+
+    <dependency>
+      <groupId>javax.validation</groupId>
+      <artifactId>validation-api</artifactId>
+      <version>1.1.0.Final</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.hibernate</groupId>
+      <artifactId>hibernate-validator</artifactId>
+      <version>5.4.2.Final</version>
+    </dependency>
+    <!-- json -->
+    <dependency>
+      <groupId>com.google.code.gson</groupId>
+      <artifactId>gson</artifactId>
+      <version>2.6.2</version>
+    </dependency>
+
+    <!--JSONObject-->
+    <dependency>
+      <groupId>net.sf.json-lib</groupId>
+      <artifactId>json-lib</artifactId>
+      <version>2.4</version>
+      <classifier>jdk15</classifier>
+    </dependency>
+
+    <!--阿里云sdk-->
+    <dependency>
+      <groupId>com.aliyun</groupId>
+      <artifactId>aliyun-java-sdk-core</artifactId>
+      <version>4.0.3</version>
+    </dependency>
+
+    <!--cas 单点登陆-->
+    <dependency>
+      <groupId>org.apache.shiro</groupId>
+      <artifactId>shiro-cas</artifactId>
+      <version>${shiro.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.jasig.cas.client</groupId>
+      <artifactId>cas-client-core</artifactId>
+      <version>3.2.1</version>
+    </dependency>
+
+
+
+
+  </dependencies>
+  <build>
+    <finalName>HSDataPlatform</finalName>
+    <plugins>
+      <plugin>
+        <groupId>org.mybatis.generator</groupId>
+        <artifactId>mybatis-generator-maven-plugin</artifactId>
+        <version>1.3.5</version>
+        <configuration>
+          <configurationFile>src/main/resources/mybatis-generator/generatorConfig.xml</configurationFile>
+          <verbose>true</verbose>
+          <overwrite>true</overwrite>
+        </configuration>
+        <executions>
+          <execution>
+            <id>Generate MyBatis Artifacts</id>
+            <goals>
+              <goal>generate</goal>
+            </goals>
+          </execution>
+        </executions>
+        <dependencies>
+          <dependency>
+            <groupId>org.mybatis.generator</groupId>
+            <artifactId>mybatis-generator-core</artifactId>
+            <version>1.3.5</version>
+          </dependency>
+          <dependency>
+            <groupId>mysql</groupId>
+            <artifactId>mysql-connector-java</artifactId>
+            <version>${mysql.version}</version>
+          </dependency>
+          <dependency>
+            <groupId>com.microsoft.sqlserver</groupId>
+            <artifactId>mssql-jdbc</artifactId>
+            <version>6.2.1.jre8</version>
+          </dependency>
+        </dependencies>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.8</source>
+          <target>1.8</target>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

+ 64 - 0
src/main/java/com/Main.java

@@ -0,0 +1,64 @@
+package com;
+
+import com.aliyuncs.CommonRequest;
+import com.aliyuncs.CommonResponse;
+import com.aliyuncs.DefaultAcsClient;
+import com.aliyuncs.IAcsClient;
+import com.aliyuncs.exceptions.ClientException;
+import com.aliyuncs.exceptions.ServerException;
+import com.aliyuncs.http.MethodType;
+import com.aliyuncs.profile.DefaultProfile;
+
+public class Main {
+    //验证码提醒
+    public static void main(String[] args) {
+        DefaultProfile profile = DefaultProfile.getProfile("cn-hangzhou", "LTAIu3VL1kYEvDhb", "ghLvcCUmWovWG3Jysxn86WVi5NYAJz");
+        IAcsClient client = new DefaultAcsClient(profile);
+
+        CommonRequest request = new CommonRequest();
+        //request.setProtocol(ProtocolType.HTTPS);
+        request.setMethod(MethodType.POST);
+        request.setDomain("dysmsapi.aliyuncs.com");
+        request.setVersion("2017-05-25");
+        request.setAction("SendSms");
+        request.putQueryParameter("RegionId", "cn-hangzhou");
+        request.putQueryParameter("PhoneNumbers", "18515660312");
+        request.putQueryParameter("SignName", "衡水智慧城市建设有限公司");
+        request.putQueryParameter("TemplateCode", "SMS_158948957");
+        request.putQueryParameter("TemplateParam", "{\"code\":\"654321\"}");
+        try {
+            CommonResponse response = client.getCommonResponse(request);
+            System.out.println(response.getData());
+        } catch (ServerException e) {
+            e.printStackTrace();
+        } catch (ClientException e) {
+            e.printStackTrace();
+        }
+    }
+    //短信通知
+//    public static void main(String[] args) {
+//        DefaultProfile profile = DefaultProfile.getProfile("cn-hangzhou", "LTAIu3VL1kYEvDhb", "ghLvcCUmWovWG3Jysxn86WVi5NYAJz");
+//
+//        IAcsClient client = new DefaultAcsClient(profile);
+//
+//        CommonRequest request = new CommonRequest();
+//        //request.setProtocol(ProtocolType.HTTPS);
+//        request.setMethod(MethodType.POST);
+//        request.setDomain("dysmsapi.aliyuncs.com");
+//        request.setVersion("2017-05-25");
+//        request.setAction("SendSms");
+//        request.putQueryParameter("RegionId", "cn-hangzhou");
+//        request.putQueryParameter("PhoneNumbers", "18515660312");
+//        request.putQueryParameter("SignName", "衡水智慧城市建设有限公司");
+//        request.putQueryParameter("TemplateCode", "SMS_158944282");
+//        request.putQueryParameter("TemplateParam", "{\"time\":\"2019-03-04\",\"name\":\"教育机构API\"}");
+//        try {
+//            CommonResponse response = client.getCommonResponse(request);
+//            System.out.println(response.getData());
+//        } catch (ServerException e) {
+//            e.printStackTrace();
+//        } catch (ClientException e) {
+//            e.printStackTrace();
+//        }
+//    }
+}

+ 62 - 0
src/main/java/com/lightinit/hsdataplatform/annotation/AnnotationHelper.java

@@ -0,0 +1,62 @@
+package com.lightinit.hsdataplatform.annotation;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * @author WangYao
+ * @date 2018/6/2 11:02
+ * @description 注解帮助类
+ */
+public class AnnotationHelper {
+
+    /**
+     * @param clazz 目标类.class
+     * @param fieldName 成员变量(字段)名
+     * @param clazzAnnotation 注解.class
+     * @param <T> 泛型,继承自Annotaion
+     * @return 注解类实例或null。
+     */
+    public static <T extends Annotation> T getFieldAnnotation(Class clazz, String fieldName, Class<T> clazzAnnotation){
+        List<Field> fieldList = new ArrayList<>();
+        Class tempClass = clazz;
+        while (tempClass != null) { //当父类为null的时候说明到达了最上层的父类(Object类).
+            Field[] fields = tempClass.getDeclaredFields();
+            fieldList.addAll(Arrays.asList(fields));
+            tempClass = tempClass.getSuperclass(); //得到父类,然后赋给自己
+        }
+        if (fieldList == null || fieldList.size() == 0){
+            return null;
+        }
+        Field targetField = null;
+        for (Field field : fieldList){
+            if (field.getName().equals(fieldName)){
+                targetField = field;
+                break;
+            }
+        }
+        if (targetField == null){
+            return null;
+        }
+        if (!targetField.isAnnotationPresent(clazzAnnotation)){
+            return null;
+        }
+        return targetField.getAnnotation(clazzAnnotation);
+    }
+
+
+    /**
+     * @param object 目标类对象
+     * @param fieldName 成员变量(字段)名
+     * @param clazzAnnotation 注解.class
+     * @param <TObject> 泛型目标类对象
+     * @param <TAnnotation> 泛型注解,继承自Annotaion
+     * @return 注解类实例或null。
+     */
+    public static <TObject, TAnnotation extends Annotation> TAnnotation getFieldAnnotation(TObject object, String fieldName, Class<TAnnotation> clazzAnnotation){
+        return object == null ? null : getFieldAnnotation(object.getClass(), fieldName, clazzAnnotation);
+    }
+}

+ 21 - 0
src/main/java/com/lightinit/hsdataplatform/annotation/FieldDescriber.java

@@ -0,0 +1,21 @@
+package com.lightinit.hsdataplatform.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * @author WangYao
+ * @date 2018/6/1 15:30
+ * @description 字段描述器
+ */
+@Target(ElementType.FIELD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface FieldDescriber {
+
+    /**
+     * 字段的描述
+     */
+    String descripton() default "";
+}

+ 27 - 0
src/main/java/com/lightinit/hsdataplatform/annotation/FieldDescriberHelper.java

@@ -0,0 +1,27 @@
+package com.lightinit.hsdataplatform.annotation;
+
+/**
+ * @author WangYao
+ * @date 2018/6/1 15:39
+ * @description 字段描述器帮助类
+ */
+public class FieldDescriberHelper {
+
+    public static <T> FieldDescriber getFieldDescriber(Class clazz, String fieldName){
+        return AnnotationHelper.getFieldAnnotation(clazz, fieldName, FieldDescriber.class);
+    }
+
+    public static <T> FieldDescriber getFieldDescriber(T object, String fieldName){
+        return AnnotationHelper.getFieldAnnotation(object, fieldName, FieldDescriber.class);
+    }
+
+    public static <T> String getFieldDescription(Class clazz, String fieldName){
+        FieldDescriber fieldDescriber = getFieldDescriber(clazz, fieldName);
+        return fieldDescriber == null ? null : fieldDescriber.descripton();
+    }
+
+    public static <T> String getFieldDescription(T object, String fieldName){
+        FieldDescriber fieldDescriber = getFieldDescriber(object, fieldName);
+        return fieldDescriber == null ? null : fieldDescriber.descripton();
+    }
+}

+ 215 - 0
src/main/java/com/lightinit/hsdataplatform/common/Base64Utils.java

@@ -0,0 +1,215 @@
+package com.lightinit.hsdataplatform.common;
+import java.io.UnsupportedEncodingException;
+/**
+ * Created by Mr.Yao on 2017/5/4.
+ */
+public class Base64Utils {
+    public static final String DEFAULT_ENCODING = "UTF-8";
+
+    /*
+     * The methods of this class are static. Do not instantiate this class. Use
+     * its static methods to get the encoded/decoded results
+     */
+    public static String encode(byte[] byteData) throws UnsupportedEncodingException {
+        return encode(byteData, DEFAULT_ENCODING);
+    }
+    public static String encode(byte[] byteData, String encoding) throws UnsupportedEncodingException {
+        if(byteData == null) { throw new IllegalArgumentException("byteData cannot be null"); }
+        return new String(_encode(byteData),encoding);
+    }
+
+    public static byte[] encode(String string) throws UnsupportedEncodingException {
+        return encode(string, DEFAULT_ENCODING);
+    }
+
+    public static byte[] encode(String string, String encoding) throws UnsupportedEncodingException {
+        if(string == null) { throw new IllegalArgumentException("string cannot be null"); }
+        return _encode(string.getBytes(encoding));
+    }
+
+    public final static byte[] _encode(byte[] byteData) {
+        /* If we received a null argument, exit this method. */
+        if (byteData == null) { throw new IllegalArgumentException("byteData cannot be null"); }
+
+        /*
+         * Declare working variables including an array of bytes that will
+         * contain the encoded data to be returned to the caller. Note that the
+         * encoded array is about 1/3 larger than the input. This is because
+         * every group of 3 bytes is being encoded into 4 bytes.
+         */
+        int iSrcIdx; // index into source (byteData)
+        int iDestIdx; // index into destination (byteDest)
+        // byte[] byteData = (byte[])byteData_in.clone();
+        // byte[] byteData = byteData_in;
+        byte[] byteDest = new byte[((byteData.length + 2) / 3) * 4];
+
+        /*
+         * Walk through the input array, 24 bits at a time, converting them from
+         * 3 groups of 8 to 4 groups of 6 with two unset bits between. as per
+         * Base64 spec see
+         * http://www.javaworld.com/javaworld/javatips/jw-javatip36-p2.html for
+         * example explanation
+         */
+        for (iSrcIdx = 0, iDestIdx = 0; iSrcIdx < byteData.length - 2; iSrcIdx += 3) {
+            byteDest[iDestIdx++] = (byte) ((byteData[iSrcIdx] >>> 2) & 077);
+            byteDest[iDestIdx++] = (byte) ((byteData[iSrcIdx + 1] >>> 4) & 017 | (byteData[iSrcIdx] << 4) & 077);
+            byteDest[iDestIdx++] = (byte) ((byteData[iSrcIdx + 2] >>> 6) & 003 | (byteData[iSrcIdx + 1] << 2) & 077);
+            byteDest[iDestIdx++] = (byte) (byteData[iSrcIdx + 2] & 077);
+        }
+
+        /*
+         * If the number of bytes we received in the input array was not an even
+         * multiple of 3, convert the remaining 1 or 2 bytes.
+         */
+        if (iSrcIdx < byteData.length) {
+            byteDest[iDestIdx++] = (byte) ((byteData[iSrcIdx] >>> 2) & 077);
+            if (iSrcIdx < byteData.length - 1) {
+                byteDest[iDestIdx++] = (byte) ((byteData[iSrcIdx + 1] >>> 4) & 017 | (byteData[iSrcIdx] << 4) & 077);
+                byteDest[iDestIdx++] = (byte) ((byteData[iSrcIdx + 1] << 2) & 077);
+            } else
+                byteDest[iDestIdx++] = (byte) ((byteData[iSrcIdx] << 4) & 077);
+        }
+
+        /*
+         * Use the encoded data as indexes into the Base64 alphabet. (The Base64
+         * alphabet is completely documented in RFC 1521.)
+         */
+        for (iSrcIdx = 0; iSrcIdx < iDestIdx; iSrcIdx++) {
+            if (byteDest[iSrcIdx] < 26)
+                byteDest[iSrcIdx] = (byte) (byteDest[iSrcIdx] + 'A');
+            else if (byteDest[iSrcIdx] < 52)
+                byteDest[iSrcIdx] = (byte) (byteDest[iSrcIdx] + 'a' - 26);
+            else if (byteDest[iSrcIdx] < 62)
+                byteDest[iSrcIdx] = (byte) (byteDest[iSrcIdx] + '0' - 52);
+            else if (byteDest[iSrcIdx] < 63)
+                byteDest[iSrcIdx] = '+';
+            else
+                byteDest[iSrcIdx] = '/';
+        }
+
+        /* Pad any unused bytes in the destination string with '=' characters. */
+        for (; iSrcIdx < byteDest.length; iSrcIdx++)
+            byteDest[iSrcIdx] = '=';
+
+        return byteDest;
+    }
+
+    public static String decode(byte[] encoded) throws UnsupportedEncodingException {
+        return decode(encoded, DEFAULT_ENCODING);
+    }
+
+    public static String decode(byte[] encoded, String encoding) throws UnsupportedEncodingException {
+        if(encoded == null) { throw new IllegalArgumentException("encoded cannot be null"); }
+        return new String(_decode(encoded), encoding);
+    }
+
+    public final static byte[] decode(String encoded) throws UnsupportedEncodingException {
+        return decode(encoded,DEFAULT_ENCODING);
+    }
+
+    public final static byte[] decode(String encoded, String encoding) throws IllegalArgumentException, UnsupportedEncodingException {
+        if(null == encoded) { throw new IllegalArgumentException("encoded cannot be null"); }
+        return _decode(encoded.getBytes(encoding));
+    }
+
+    public final static byte[] _decode(byte[] byteData) throws IllegalArgumentException {
+        /* If we received a null argument, exit this method. */
+        if (byteData == null) { throw new IllegalArgumentException("byteData cannot be null"); }
+
+        /*
+         * Declare working variables including an array of bytes that will
+         * contain the decoded data to be returned to the caller. Note that the
+         * decoded array is about 3/4 smaller than the input. This is because
+         * every group of 4 bytes is being encoded into 3 bytes.
+         */
+        int iSrcIdx; // index into source (byteData)
+        int reviSrcIdx; // index from end of the src array (byteData)
+        int iDestIdx; // index into destination (byteDest)
+        byte[] byteTemp = new byte[byteData.length];
+
+        /*
+         * remove any '=' chars from the end of the byteData they would have
+         * been padding to make it up to groups of 4 bytes note that I don't
+         * need to remove it just make sure that when progressing throug array
+         * we don't go past reviSrcIdx ;-)
+         */
+        for (reviSrcIdx = byteData.length; reviSrcIdx -1 > 0 && byteData[reviSrcIdx -1] == '='; reviSrcIdx--) {
+            ; // do nothing. I'm just interested in value of reviSrcIdx
+        }
+
+        /* sanity check */
+        if (reviSrcIdx -1 == 0) { return null; /* ie all padding */ }
+
+        /*
+         * Set byteDest, this is smaller than byteData due to 4 -> 3 byte munge.
+         * Note that this is an integer division! This fact is used in the logic
+         * l8r. to make sure we don't fall out of the array and create an
+         * OutOfBoundsException and also in handling the remainder
+         */
+        byte byteDest[] = new byte[((reviSrcIdx * 3) / 4)];
+
+        /*
+         * Convert from Base64 alphabet to encoded data (The Base64 alphabet is
+         * completely documented in RFC 1521.) The order of the testing is
+         * important as I use the '<' operator which looks at the hex value of
+         * these ASCII chars. So convert from the smallest up
+         *
+         * do all of this in a new array so as not to edit the original input
+         */
+        for (iSrcIdx = 0; iSrcIdx < reviSrcIdx; iSrcIdx++) {
+            if (byteData[iSrcIdx] == '+')
+                byteTemp[iSrcIdx] = 62;
+            else if (byteData[iSrcIdx] == '/')
+                byteTemp[iSrcIdx] = 63;
+            else if (byteData[iSrcIdx] < '0' + 10)
+                byteTemp[iSrcIdx] = (byte) (byteData[iSrcIdx] + 52 - '0');
+            else if (byteData[iSrcIdx] < ('A' + 26))
+                byteTemp[iSrcIdx] = (byte) (byteData[iSrcIdx] - 'A');
+            else if (byteData[iSrcIdx] < 'a' + 26)
+                byteTemp[iSrcIdx] = (byte) (byteData[iSrcIdx] + 26 - 'a');
+        }
+
+        /*
+         * 4bytes -> 3bytes munge Walk through the input array, 32 bits at a
+         * time, converting them from 4 groups of 6 to 3 groups of 8 removing
+         * the two unset most significant bits of each sorce byte as this was
+         * filler, as per Base64 spec. stop before potential buffer overun on
+         * byteDest, remember that byteDest is 3/4 (integer division) the size
+         * of input and won't necessary divide exactly (ie iDestIdx must be <
+         * (integer div byteDest.length / 3)*3 see
+         * http://www.javaworld.com/javaworld/javatips/jw-javatip36-p2.html for
+         * example
+         */
+        for (iSrcIdx = 0, iDestIdx = 0; iSrcIdx < reviSrcIdx
+                && iDestIdx < ((byteDest.length / 3) * 3); iSrcIdx += 4) {
+            byteDest[iDestIdx++] = (byte) ((byteTemp[iSrcIdx] << 2) & 0xFC | (byteTemp[iSrcIdx + 1] >>> 4) & 0x03);
+            byteDest[iDestIdx++] = (byte) ((byteTemp[iSrcIdx + 1] << 4) & 0xF0 | (byteTemp[iSrcIdx + 2] >>> 2) & 0x0F);
+            byteDest[iDestIdx++] = (byte) ((byteTemp[iSrcIdx + 2] << 6) & 0xC0 | byteTemp[iSrcIdx + 3] & 0x3F);
+        }
+
+        /*
+         * tidy up any remainders if iDestIdx >= ((byteDest.length / 3)*3) but
+         * iSrcIdx < reviSrcIdx then we have at most 2 extra destination bytes
+         * to fill and posiblr 3 input bytes yet to process
+         */
+        if (iSrcIdx < reviSrcIdx) {
+            if (iSrcIdx < reviSrcIdx - 2) {
+                // "3 input bytes left"
+                byteDest[iDestIdx++] = (byte) ((byteTemp[iSrcIdx] << 2) & 0xFC | (byteTemp[iSrcIdx + 1] >>> 4) & 0x03);
+                byteDest[iDestIdx++] = (byte) ((byteTemp[iSrcIdx + 1] << 4) & 0xF0 | (byteTemp[iSrcIdx + 2] >>> 2) & 0x0F);
+            } else if (iSrcIdx < reviSrcIdx - 1) {
+                // "2 input bytes left"
+                byteDest[iDestIdx++] = (byte) ((byteTemp[iSrcIdx] << 2) & 0xFC | (byteTemp[iSrcIdx + 1] >>> 4) & 0x03);
+            }
+            /*
+             * wont have just one input byte left (unless input wasn't base64
+             * encoded ) due to the for loop steps and array sizes, after "="
+             * pad removed, but for compleatness
+             */
+            else {
+                throw new IllegalArgumentException("Warning: 1 input bytes left to process. This was not Base64 input");
+            }
+        }
+        return byteDest;
+    }
+}

+ 78 - 0
src/main/java/com/lightinit/hsdataplatform/common/BaseRemoteClient.java

@@ -0,0 +1,78 @@
+package com.lightinit.hsdataplatform.common;
+
+import com.lightinit.hsdataplatform.json.pojo.ServerEntity;
+import org.apache.zookeeper.KeeperException;
+import org.apache.zookeeper.WatchedEvent;
+import org.apache.zookeeper.Watcher;
+import org.apache.zookeeper.ZooKeeper;
+import org.springframework.util.StringUtils;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Random;
+
+/**
+ * Created by Mr.Yao on 2017/10/10.
+ */
+public class BaseRemoteClient implements Watcher{
+
+    private final Random random=new Random();
+    List<String> list = new ArrayList<String>();
+    private ZooKeeper zooKeeper=null;
+
+    protected BaseRemoteClient(String node, String service){
+        //RegisterServerList(node,service);
+    }
+
+    protected void RegisterServerList(String node, String service) {
+        try {
+            if (zooKeeper == null) {
+                ThriftServerConfig config = new ThriftServerConfig();
+                zooKeeper = new ZooKeeper(config.getHost() + ":" + config.getPort(), 30000, this);
+                if (zooKeeper.exists("/thrift", false) != null) {
+                    if (zooKeeper.exists(String.format("/thrift/%s", node), false) != null) {
+                        if (zooKeeper.exists(String.format("/thrift/%s/%s", node, service), true) != null) {
+                            list = zooKeeper.getChildren(String.format("/thrift/%s/%s", node, service), true);
+                        }
+                    }
+                }
+            }
+        } catch (IOException e) {
+            e.printStackTrace();
+        } catch (InterruptedException e) {
+            e.printStackTrace();
+        } catch (KeeperException e) {
+            e.printStackTrace();
+        }
+    }
+
+    public ServerEntity SelectServer(){
+        ServerEntity item=new ServerEntity();
+        if(list.size()<=0){
+            item.setServerIp("localhost");
+            item.setServerPort(9876);
+        }else{
+            String serverIp=list.get(random.nextInt(list.size()));
+            if (StringUtils.isEmpty(serverIp)){
+                item.setServerIp("localhost");
+                item.setServerPort(9876);
+            }else{
+                String []infos= serverIp.split(":");
+                if(infos.length==2) {
+                    item.setServerIp(infos[0]);
+                    item.setServerPort(Integer.valueOf(infos[1]));
+                }else{
+                    item.setServerIp("localhost");
+                    item.setServerPort(9876);
+                }
+            }
+        }
+        return item;
+    }
+
+    @Override
+    public void process(WatchedEvent watchedEvent) {
+
+    }
+}

+ 35 - 0
src/main/java/com/lightinit/hsdataplatform/common/BytesUtil.java

@@ -0,0 +1,35 @@
+package com.lightinit.hsdataplatform.common;
+
+/**
+ * Created by Mr.Yao on 2017/5/4.
+ */
+public class BytesUtil {
+
+    private static final char[] HEX_CHAR= {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
+    private static int parse(char c) {
+        if (c >= 'a')
+            return (c - 'a' + 10) & 0x0f;
+        if (c >= 'A')
+            return (c - 'A' + 10) & 0x0f;
+        return (c - '0') & 0x0f;
+    }
+
+    public static byte[] HexStringToBytes(String hexstr) {
+        byte[] b = new byte[hexstr.length() / 2];
+        int j = 0;
+        for (int i = 0; i < b.length; i++) {
+            char c0 = hexstr.charAt(j++);
+            char c1 = hexstr.charAt(j++);
+            b[i] = (byte) ((parse(c0) << 4) | parse(c1));
+        }
+        return b;
+    }
+    public static String byteArrayToString(byte[] data){
+        StringBuilder stringBuilder= new StringBuilder();
+        for (int i=0; i<data.length; i++){
+            stringBuilder.append(HEX_CHAR[(data[i] & 0xf0)>>> 4]);
+            stringBuilder.append(HEX_CHAR[(data[i] & 0x0f)]);
+        }
+        return stringBuilder.toString();
+    }
+}

+ 14 - 0
src/main/java/com/lightinit/hsdataplatform/common/CharEncoding.java

@@ -0,0 +1,14 @@
+package com.lightinit.hsdataplatform.common;
+
+public enum CharEncoding {
+	UTF8("UTF-8"), GBK("GBK"), GB2312("GB2312");
+	String _charset = "UTF-8";
+
+	private CharEncoding(String charset) {
+		_charset = charset;
+	}
+
+	public String value() {
+		return _charset;
+	}
+}

+ 19 - 0
src/main/java/com/lightinit/hsdataplatform/common/CharacterUtils.java

@@ -0,0 +1,19 @@
+package com.lightinit.hsdataplatform.common;
+
+import java.util.Random;
+
+public class CharacterUtils {
+    /*
+    *随机字符串生成
+    */
+    public static String getRandomString(int length){
+        String str="zxcvbnmlkjhgfdsaqwertyuiopQWERTYUIOPASDFGHJKLZXCVBNM1234567890";
+        Random random=new Random();
+        StringBuffer sb=new StringBuffer();
+        for(int i=0;i<length;i++){
+            int number=random.nextInt(62);
+            sb.append(str.charAt(number));
+        }
+        return sb.toString();
+    }
+}

+ 17 - 0
src/main/java/com/lightinit/hsdataplatform/common/ClassUtils.java

@@ -0,0 +1,17 @@
+package com.lightinit.hsdataplatform.common;
+
+/**
+ * @author WangYao
+ * @date 2018/6/15 13:46
+ * @description 类工具
+ */
+public class ClassUtils {
+
+    /** 判断类型是Java本身的类型,还是用户自定义的类型
+     * @param clazz 类型
+     * @return true/false
+     */
+    public static boolean isJavaClass(Class<?> clazz) {
+        return clazz != null && clazz.getClassLoader() == null;
+    }
+}

+ 37 - 0
src/main/java/com/lightinit/hsdataplatform/common/ConfigUtils.java

@@ -0,0 +1,37 @@
+package com.lightinit.hsdataplatform.common;
+
+import org.apache.commons.configuration2.Configuration;
+import org.apache.commons.configuration2.builder.fluent.Configurations;
+import org.apache.commons.configuration2.ex.ConfigurationException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Created by WangYao on 2018/6/13.
+ */
+public class ConfigUtils {
+
+    private static final Logger logger = LoggerFactory.getLogger(ConfigUtils.class);
+
+    private Configuration configuration=null;
+    private static final Map<String, Configuration> configurationMap = new HashMap<>();
+
+    public static Configuration getConfiguration(String propertiesFile){
+        Configuration configuration = null;
+        if (!configurationMap.containsKey(propertiesFile)){
+            try {
+                Configurations configurations = new Configurations();
+                configuration = configurations.properties(new File(propertiesFile));
+                configurationMap.put(propertiesFile, configuration);
+            } catch (ConfigurationException e) {
+                logger.error(e.getMessage());
+                return null;
+            }
+        }
+        return configurationMap.get(propertiesFile);
+    }
+}

+ 19 - 0
src/main/java/com/lightinit/hsdataplatform/common/ContractNumberUtils.java

@@ -0,0 +1,19 @@
+package com.lightinit.hsdataplatform.common;
+
+import java.util.Random;
+
+public class ContractNumberUtils {
+
+    /**
+     * 生成唯一订单编号
+     * 格式:时间+随机数
+     * @return
+     */
+    public static synchronized String generate(){
+        Random random = new Random() ;
+        System.currentTimeMillis() ;
+        Integer number = random.nextInt(900000)+100000 ;
+        return System.currentTimeMillis() + String.valueOf(number) ;
+    }
+
+}

+ 84 - 0
src/main/java/com/lightinit/hsdataplatform/common/DateUtils.java

@@ -0,0 +1,84 @@
+package com.lightinit.hsdataplatform.common;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+
+/**
+ * Created by Mr.Yao on 2017/9/26.
+ */
+public class DateUtils {
+    public static int daysBetween(String begindate, String enddate) {
+        try {
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+            Calendar cal = Calendar.getInstance();
+            cal.setTime(sdf.parse(begindate));
+            long time1 = cal.getTimeInMillis();
+            cal.setTime(sdf.parse(enddate));
+            long time2 = cal.getTimeInMillis();
+            long between_days = (time2 - time1) / (1000 * 3600 * 24);
+
+            return Integer.parseInt(String.valueOf(between_days));
+        } catch (ParseException e) {
+            return 0;
+        }
+    }
+
+    public static String weekBeginDate(Date date) {
+        try {
+            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
+            Calendar cal = Calendar.getInstance();
+            cal.setTime(date);
+            int d = 0;
+            if (cal.get(Calendar.DAY_OF_WEEK) == 1) {
+                d = -6;
+            } else {
+                d = 2 - cal.get(Calendar.DAY_OF_WEEK);
+            }
+            cal.add(Calendar.DAY_OF_WEEK, d);
+            return simpleDateFormat.format(cal.getTime());
+        } catch (Exception e) {
+            return "";
+        }
+    }
+
+    public static String weekEndDate(Date date) {
+        try {
+            SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
+            Calendar cal = Calendar.getInstance();
+            cal.setTime(date);
+            int d = 0;
+            if (cal.get(Calendar.DAY_OF_WEEK) == 1) {
+                d = -6;
+            } else {
+                d = 2 - cal.get(Calendar.DAY_OF_WEEK);
+            }
+            cal.add(Calendar.DAY_OF_WEEK, d);
+            cal.add(Calendar.DAY_OF_WEEK, 6);
+            return simpleDateFormat.format(cal.getTime());
+        } catch (Exception e) {
+            return "";
+        }
+    }
+
+    public static Date StringToDate(String str) {
+        try {
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+            Date result = sdf.parse(str);
+            return result;
+        } catch (ParseException ex) {
+            return null;
+        }
+    }
+
+    public static int YearOfDate() {
+        Calendar now = Calendar.getInstance();
+        return now.get(Calendar.YEAR);
+    }
+
+    public static int MonthOfDate() {
+        Calendar now = Calendar.getInstance();
+        return now.get(Calendar.MONTH) + 1;
+    }
+}

+ 41 - 0
src/main/java/com/lightinit/hsdataplatform/common/ExcelTookitUtils.java

@@ -0,0 +1,41 @@
+package com.lightinit.hsdataplatform.common;
+
+import org.apache.poi.hssf.usermodel.HSSFCell;
+import org.apache.poi.xssf.usermodel.XSSFCell;
+
+/**
+ * Created by Mr.Yao on 2017/6/14.
+ */
+public class ExcelTookitUtils {
+    /**
+     * 获取97-2003EXCEL单元格内容
+     * @param xssfRow 单元格
+     * @return 单元格内容
+     */
+    @SuppressWarnings("static-access")
+    public static String getValue(XSSFCell xssfRow) {
+        if (xssfRow.getCellType() == xssfRow.CELL_TYPE_BOOLEAN) {
+            return String.valueOf(xssfRow.getBooleanCellValue());
+        } else if (xssfRow.getCellType() == xssfRow.CELL_TYPE_NUMERIC) {
+            return String.valueOf(xssfRow.getNumericCellValue());
+        } else {
+            return String.valueOf(xssfRow.getStringCellValue());
+        }
+    }
+
+    /**
+     * 获取xlsx格式的单元格内容
+     * @param hssfCell 单元格
+     * @return 单元格内容
+     */
+    @SuppressWarnings("static-access")
+    public static String getValue(HSSFCell hssfCell) {
+        if (hssfCell.getCellType() == hssfCell.CELL_TYPE_BOOLEAN) {
+            return String.valueOf(hssfCell.getBooleanCellValue());
+        } else if (hssfCell.getCellType() == hssfCell.CELL_TYPE_NUMERIC) {
+            return String.valueOf(hssfCell.getNumericCellValue());
+        } else {
+            return String.valueOf(hssfCell.getStringCellValue());
+        }
+    }
+}

+ 93 - 0
src/main/java/com/lightinit/hsdataplatform/common/FTPConfigurationUtilsPro.java

@@ -0,0 +1,93 @@
+package com.lightinit.hsdataplatform.common;
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+/**
+ * Created by Mr.Yao on 2017/12/13.
+ */
+@Component
+public class FTPConfigurationUtilsPro {
+
+    @Value("${ftp.deploy.host}")
+    private String deploy_host;
+    @Value("${ftp.deploy.port}")
+    private int deploy_port;
+    @Value("${ftp.deploy.username}")
+    private String deploy_username;
+    @Value("${ftp.deploy.password}")
+    private String deploy_password;
+
+    public String getDeploy_host() {
+        return deploy_host;
+    }
+
+    public void setDeploy_host(String deploy_host) {
+        this.deploy_host = deploy_host;
+    }
+
+    public int getDeploy_port() {
+        return deploy_port;
+    }
+
+    public void setDeploy_port(int deploy_port) {
+        this.deploy_port = deploy_port;
+    }
+
+    public String getDeploy_username() {
+        return deploy_username;
+    }
+
+    public void setDeploy_username(String deploy_username) {
+        this.deploy_username = deploy_username;
+    }
+
+    public String getDeploy_password() {
+        return deploy_password;
+    }
+
+    public void setDeploy_password(String deploy_password) {
+        this.deploy_password = deploy_password;
+    }
+
+    @Value("${ftp.apk.host}")
+    private String apk_host;
+    @Value("${ftp.apk.port}")
+    private int apk_port;
+    @Value("${ftp.apk.username}")
+    private String apk_username;
+    @Value("${ftp.apk.password}")
+    private String apk_password;
+
+    public String getApk_host() {
+        return apk_host;
+    }
+
+    public void setApk_host(String apk_host) {
+        this.apk_host = apk_host;
+    }
+
+    public int getApk_port() {
+        return apk_port;
+    }
+
+    public void setApk_port(int apk_port) {
+        this.apk_port = apk_port;
+    }
+
+    public String getApk_username() {
+        return apk_username;
+    }
+
+    public void setApk_username(String apk_username) {
+        this.apk_username = apk_username;
+    }
+
+    public String getApk_password() {
+        return apk_password;
+    }
+
+    public void setApk_password(String apk_password) {
+        this.apk_password = apk_password;
+    }
+}

+ 364 - 0
src/main/java/com/lightinit/hsdataplatform/common/FTPTookitUtils.java

@@ -0,0 +1,364 @@
+package com.lightinit.hsdataplatform.common;
+import com.lightinit.hsdataplatform.json.pojo.FTPConfigurationParameter;
+import org.apache.commons.net.PrintCommandListener;
+import org.apache.commons.net.ftp.*;
+import org.springframework.stereotype.Component;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.*;
+import java.net.SocketException;
+import java.net.URLEncoder;
+
+/**
+ * Created by Mr.Yao on 2017/5/8.
+ */
+@Component
+public class FTPTookitUtils {
+
+    private FTPClient ftpClient;
+
+    public FTPTookitUtils(){
+        ftpClient=new FTPClient();
+        this.ftpClient.addProtocolCommandListener(new PrintCommandListener(new PrintWriter(System.out)));
+    }
+
+    private boolean login(String url, int port, String username, String password) throws SocketException, IOException
+    {
+        int reply;
+        ftpClient.connect(url, port);
+        ftpClient.setControlEncoding("UTF-8");
+        FTPClientConfig conf = new FTPClientConfig(FTPClientConfig.SYST_NT);
+        conf.setServerLanguageCode("zh");
+        ftpClient.login(username, password);
+        reply = ftpClient.getReplyCode();
+        if (!FTPReply.isPositiveCompletion(reply))
+        {
+            ftpClient.disconnect();
+            return false;
+        }
+        return true;
+    }
+
+    private void free()
+    {
+        if (ftpClient.isAvailable())
+        {
+            try
+            {
+                ftpClient.logout();
+            } catch (IOException e)
+            {
+            }
+        }
+        if (ftpClient.isConnected())
+        {
+            try
+            {
+                ftpClient.disconnect();
+            } catch (IOException e)
+            {
+            }
+        }
+    }
+    public boolean uploadFile(InputStream input, String remoteAdr,FTPConfigurationParameter ftpconfig) throws IOException
+    {
+        boolean success = false;
+        try
+        {
+            success = login(ftpconfig.getHost(), ftpconfig.getPort(), ftpconfig.getUsername(),ftpconfig.getPassword());
+            if (!success)
+            {
+                return success;
+            }
+        } catch (IOException e)
+        {
+            return success;
+        }
+        ftpClient.enterLocalPassiveMode();
+        ftpClient.setFileType(FTP.BINARY_FILE_TYPE);
+        String remoteFileName = remoteAdr;
+        if (remoteAdr.contains("/"))
+        {
+            remoteFileName = remoteAdr.substring(remoteAdr.lastIndexOf("/") + 1);
+            String directory = remoteAdr.substring(0, remoteAdr.lastIndexOf("/") + 1);
+            if (!directory.equalsIgnoreCase("/") && !ftpClient.changeWorkingDirectory(directory))
+            {
+                int start = 0, end = 0;
+                if (directory.startsWith("/"))
+                {
+                    start = 1;
+                } else
+                {
+                    start = 0;
+                }
+                end = directory.indexOf("/", start);
+                while (true)
+                {
+                    String subDirectory = remoteAdr.substring(start, end);
+                    if (!ftpClient.changeWorkingDirectory(subDirectory))
+                    {
+                        if (ftpClient.makeDirectory(subDirectory))
+                        {
+                            ftpClient.changeWorkingDirectory(subDirectory);
+                        } else
+                        {
+                            return false;
+                        }
+                    }
+                    start = end + 1;
+                    end = directory.indexOf("/", start);
+                    if (end <= start)
+                    {
+                        break;
+                    }
+                }
+            }
+        }
+        try
+        {
+            success = ftpClient.storeFile(remoteFileName, input);
+            input.close();
+        } catch (IOException e)
+        {
+            if (input != null)
+            {
+                input.close();
+            }
+        } finally
+        {
+            free();
+        }
+        return success;
+    }
+
+    public boolean uploadFile(String localAdr, String remoteAdr,FTPConfigurationParameter ftpconfig) throws IOException
+    {
+        boolean success = false;
+        try
+        {
+            success = login(ftpconfig.getHost(), ftpconfig.getPort(), ftpconfig.getUsername(),ftpconfig.getPassword());
+            if (!success)
+            {
+                return success;
+            }
+        } catch (IOException e)
+        {
+            return success;
+        }
+        ftpClient.enterLocalPassiveMode();
+        ftpClient.setFileType(FTP.BINARY_FILE_TYPE);
+        String remoteFileName = remoteAdr;
+        if (remoteAdr.contains("/"))
+        {
+            remoteFileName = remoteAdr.substring(remoteAdr.lastIndexOf("/") + 1);
+            String directory = remoteAdr.substring(0, remoteAdr.lastIndexOf("/") + 1);
+            if (!directory.equalsIgnoreCase("/") && !ftpClient.changeWorkingDirectory(directory))
+            {
+                int start = 0, end = 0;
+                if (directory.startsWith("/"))
+                {
+                    start = 1;
+                } else
+                {
+                    start = 0;
+                }
+                end = directory.indexOf("/", start);
+                while (true)
+                {
+                    String subDirectory = remoteAdr.substring(start, end);
+                    if (!ftpClient.changeWorkingDirectory(subDirectory))
+                    {
+                        if (ftpClient.makeDirectory(subDirectory))
+                        {
+                            ftpClient.changeWorkingDirectory(subDirectory);
+                        } else
+                        {
+                            return false;
+                        }
+                    }
+                    start = end + 1;
+                    end = directory.indexOf("/", start);
+                    if (end <= start)
+                    {
+                        break;
+                    }
+                }
+            }
+        }
+        InputStream input = null;
+        try
+        {
+            File f = new File(localAdr);
+            //FTPFile[] fs = ftpClient.listFiles(remoteFileName);
+            input = new FileInputStream(f);
+            success = ftpClient.storeFile(remoteFileName, input);
+            input.close();
+        } catch (IOException e)
+        {
+            if (input != null)
+            {
+                input.close();
+            }
+        } finally
+        {
+            free();
+        }
+        return success;
+    }
+
+    public boolean deleteFile(String remoteAdr, String localAdr,FTPConfigurationParameter ftpconfig)
+    {
+        boolean success = false;
+        try
+        {
+            success = login(ftpconfig.getHost(), ftpconfig.getPort(), ftpconfig.getUsername(),ftpconfig.getPassword());
+            if (!success)
+            {
+                return success;
+            }
+            ftpClient.changeWorkingDirectory(remoteAdr);
+            FTPFile[] fs = ftpClient.listFiles();
+            if(fs.length>0)
+            {
+                success = ftpClient.removeDirectory(remoteAdr);
+                ftpClient.logout();
+            }
+        } catch (IOException e)
+        {
+        } finally
+        {
+            free();
+        }
+        return success;
+    }
+
+    public boolean deleteDir(String remoteAdr,FTPConfigurationParameter ftpconfig)
+    {
+        boolean success = false;
+        try
+        {
+            success = login(ftpconfig.getHost(), ftpconfig.getPort(), ftpconfig.getUsername(),ftpconfig.getPassword());
+            if (!success)
+            {
+                return success;
+            }
+            ftpClient.changeWorkingDirectory(remoteAdr);
+            FTPFile[] fs = ftpClient.listFiles();
+            if(fs.length>0)
+            {
+                success = ftpClient.removeDirectory(remoteAdr);
+                ftpClient.logout();
+            }
+        } catch (IOException e)
+        {
+        } finally
+        {
+            free();
+        }
+        return success;
+    }
+
+    public boolean downFile(String remoteremoteAdr, String localAdr, HttpServletResponse response,FTPConfigurationParameter ftpconfig)
+    {
+        boolean success = false;
+        try
+        {
+            success = login(ftpconfig.getHost(), ftpconfig.getPort(), ftpconfig.getUsername(),ftpconfig.getPassword());
+            if (!success)
+            {
+                return success;
+            }
+            ftpClient.changeWorkingDirectory(remoteremoteAdr);
+            FTPFile[] fs = ftpClient.listFiles();
+
+            for (FTPFile ftpFile : fs)
+            {
+                if (ftpFile.getName().equals(localAdr))
+                {
+                    response.setHeader("Content-disposition", "attachment;localAdr=" + URLEncoder.encode(localAdr, "UTF-8"));
+                    File f=new File(localAdr);
+                    OutputStream os=new FileOutputStream(f);
+                    ftpClient.retrieveFile(new String(ftpFile.getName().getBytes("UTF-8"), "ISO-8859-1"), os);
+                    os.flush();
+                    os.close();
+                }
+            }
+            ftpClient.logout();
+            success = true;
+        } catch (IOException e)
+        {
+            e.printStackTrace();
+        } finally
+        {
+            free();
+        }
+        return success;
+    }
+
+    public String readFileContent(String remoteremoteAdr, String localAdr,FTPConfigurationParameter ftpconfig)
+    {
+        String content = null;
+        try
+        {
+            boolean success = login(ftpconfig.getHost(), ftpconfig.getPort(), ftpconfig.getUsername(),ftpconfig.getPassword());
+            if (success)
+            {
+                ftpClient.changeWorkingDirectory(remoteremoteAdr);
+                FTPFile[] fs = ftpClient.listFiles();
+                for (FTPFile ftpFile : fs)
+                {
+                    if (ftpFile.getName().equals(localAdr))
+                    {
+                        File f=new File(localAdr);
+                        ftpClient.retrieveFile(new String(ftpFile.getName().getBytes("UTF-8"), "ISO-8859-1"), new FileOutputStream(f));
+                        ByteArrayOutputStream bos = new ByteArrayOutputStream();
+                        ftpClient.retrieveFile(ftpFile.getName(), bos);
+                        bos.flush();
+                        bos.close();
+                        content = new String(bos.toByteArray(), "UTF-8");
+                    }
+                }
+            }
+        } catch (IOException e)
+        {
+        } finally
+        {
+            free();
+        }
+        return content;
+    }
+
+    public static boolean isDirExist(String localAdr, FTPFile[] fs)
+    {
+        for (FTPFile ftpFile : fs)
+        {
+            if (ftpFile.getName().equals(localAdr))
+            {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    public static String changeName(String localAdr, FTPFile[] fs)
+    {
+        int n = 0;
+        StringBuffer localAdr_ = new StringBuffer("");
+        localAdr_ = localAdr_.append(localAdr);
+        while (isDirExist(localAdr_.toString(), fs))
+        {
+            n++;
+            String a = "[" + n + "]";
+            int b = localAdr_.lastIndexOf(".");
+            int c = localAdr_.lastIndexOf("[");
+            if (c < 0)
+            {
+                c = b;
+            }
+            StringBuffer name = new StringBuffer(localAdr_.substring(0, c));
+            StringBuffer suffix = new StringBuffer(localAdr_.substring(b + 1));
+            localAdr_ = name.append(a).append(".").append(suffix);
+        }
+        return localAdr_.toString();
+    }
+}

+ 59 - 0
src/main/java/com/lightinit/hsdataplatform/common/GateWayUtils.java

@@ -0,0 +1,59 @@
+package com.lightinit.hsdataplatform.common;
+
+import com.lightinit.hsdataplatform.dictionary.DicNewGateway;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+public class GateWayUtils {
+
+    public static String gatewayAuthAdd(String ouyId1, String applicationid, String userId, String remark) {
+        String code = null ;
+        Map<String, String> params = new HashMap<>();
+        params.put("routeId", ouyId1);
+        params.put("appId", applicationid);
+        params.put("userId", userId);
+        params.put("remark", remark);
+        try {
+            String str = HttpUtil.httpPost(DicNewGateway.AUTHADD, null, params);
+            Map<String, Object> map1 = HttpUtil.strToMap(str);
+            if (map1.get("code").equals("200")) {
+                code = map1.get("code").toString() ;
+            }else {
+                throw new RuntimeException("新增api鉴权异常:"+map1.get("message"));
+            }
+            System.out.println("=================" + map1 + "==========================");
+        } catch (Exception e) {
+            throw new RuntimeException("新增api鉴权异常!");
+        }
+        return code ;
+    }
+
+    public static String gatewayChargeAdd(String ouyId1, String applicationid, String userId,String chargeType
+            ,String chargeValue, String remark) {
+        String code = null ;
+        Map<String, String> params = new HashMap<>();
+        params.put("routeId", ouyId1);
+        params.put("applicationId", applicationid);
+        params.put("userId", userId);
+        params.put("chargeType", chargeType);
+        params.put("chargeValue", chargeValue);
+        params.put("effectiveTime", new Date().toString());
+        params.put("remark", remark);
+        try {
+            String str = HttpUtil.httpPost(DicNewGateway.CHANGEADD, null, params);
+            Map<String, Object> map1 = HttpUtil.strToMap(str);
+            if (map1.get("code").equals("200")) {
+                code = map1.get("code").toString() ;
+            } else {
+                throw new RuntimeException("新增api鉴权异常:"+map1.get("message"));
+            }
+            System.out.println("=================" + map1 + "==========================");
+        } catch (Exception e) {
+            throw new RuntimeException("新增api计费异常!");
+        }
+        return code ;
+    }
+
+}

+ 13 - 0
src/main/java/com/lightinit/hsdataplatform/common/GuidGenerator.java

@@ -0,0 +1,13 @@
+package com.lightinit.hsdataplatform.common;
+
+import java.util.UUID;
+
+/**
+ * @author WangYao
+ */
+public abstract class GuidGenerator {
+
+    public static String generate() {
+        return UUID.randomUUID().toString()/*.replaceAll("-", "")*/;
+    }
+}

+ 242 - 0
src/main/java/com/lightinit/hsdataplatform/common/HttpTookitUtils.java

@@ -0,0 +1,242 @@
+package com.lightinit.hsdataplatform.common;
+
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.security.cert.CertificateException;
+import java.security.cert.X509Certificate;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.http.HttpEntity;
+import org.apache.http.NameValuePair;
+import org.apache.http.ParseException;
+import org.apache.http.StatusLine;
+import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.entity.UrlEncodedFormEntity;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.conn.ssl.NoopHostnameVerifier;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.ssl.SSLContexts;
+import org.apache.http.ssl.TrustStrategy;
+import org.apache.http.util.EntityUtils;
+//import org.apache.xmlbeans.impl.common.NameUtil;
+import org.springframework.util.StringUtils;
+
+import javax.net.ssl.SSLContext;
+
+/**
+ * Created by Mr.Yao on 2017/5/4.
+ */
+public class HttpTookitUtils {
+    public static int getApplicationStatus(String url) {
+        int statusCode=-1;
+        CloseableHttpClient httpclient = HttpClients.createDefault();
+        try {
+            HttpGet httpget = new HttpGet(url);
+            CloseableHttpResponse response = httpclient.execute(httpget);
+            try {
+                StatusLine statusLine = response.getStatusLine();
+                statusCode= statusLine.getStatusCode();
+            } finally {
+                response.close();
+            }
+        } catch (ClientProtocolException e) {
+            e.printStackTrace();
+        } catch (ParseException e) {
+            e.printStackTrace();
+        } catch (IOException e) {
+            e.printStackTrace();
+        } finally {
+            try {
+                httpclient.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+        return statusCode;
+    }
+    public static String doGet(String url, List<NameValuePair> params, CharEncoding charset,String accept) {
+        String responseContent="";
+        CloseableHttpClient httpclient = HttpClients.createDefault();
+        try {
+            String queryParams="";
+            if(params!= null) {
+                for (NameValuePair pair : params) {
+                    if (queryParams.length() > 0) {
+                        queryParams += "&";
+                    }
+                    queryParams += pair.getName() + "=" + pair.getValue();
+                }
+            }
+            if(StringUtils.isEmpty(queryParams)==false){
+                if(url.contains("?")){
+                    url+="&";
+                }else{
+                    url+="?";
+                }
+                url+=queryParams;
+            }
+            HttpGet httpget = new HttpGet(url);
+            if(StringUtils.isEmpty(accept)==false)
+                httpget.addHeader("Accept",accept);
+            CloseableHttpResponse response = httpclient.execute(httpget);
+            try {
+                HttpEntity entity = response.getEntity();
+                if (entity != null) {
+                    responseContent= EntityUtils.toString(entity, charset.value());
+                }
+            } finally {
+                response.close();
+            }
+        } catch (ClientProtocolException e) {
+            e.printStackTrace();
+        } catch (ParseException e) {
+            e.printStackTrace();
+        } catch (IOException e) {
+            e.printStackTrace();
+        } finally {
+            try {
+                httpclient.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+        return responseContent;
+    }
+    public static String doGet(String url, List<NameValuePair> params, CharEncoding charset) {
+        return doGet(url,params,charset,"");
+    }
+    public static String doPost(String url, List<NameValuePair> params, CharEncoding charset){
+        return doPost(url,params,charset,"");
+    }
+    public static String doPost(String url, List<NameValuePair> params, CharEncoding charset,String accept) {
+        String responseContent="";
+        CloseableHttpClient httpclient = HttpClients.createDefault();
+        HttpPost httppost = new HttpPost(url);
+        if(StringUtils.isEmpty(accept)==false)
+            httppost.addHeader("Accept",accept);
+        UrlEncodedFormEntity uefEntity;
+        try {
+            uefEntity = new UrlEncodedFormEntity(params, charset.value());
+            httppost.setEntity(uefEntity);
+            CloseableHttpResponse response = httpclient.execute(httppost);
+            try {
+                HttpEntity entity = response.getEntity();
+                if (entity != null) {
+                    responseContent=EntityUtils.toString(entity, charset.value());
+                }
+            } finally {
+                response.close();
+            }
+        } catch (ClientProtocolException e) {
+            e.printStackTrace();
+        } catch (UnsupportedEncodingException e1) {
+            e1.printStackTrace();
+        } catch (IOException e) {
+            e.printStackTrace();
+        } finally {
+            try {
+                httpclient.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+        return responseContent;
+    }
+
+    public static String doPost(String url, List<NameValuePair> params, CharEncoding charset, Map<String,String> headers) throws Exception {
+        String responseContent="";
+        CloseableHttpClient httpclient = getIgnoeSSLClient();
+        HttpPost httppost = new HttpPost(url);
+        if(headers!=null) {
+            for (Map.Entry<String, String> entry : headers.entrySet()) {
+                httppost.addHeader(entry.getKey(), entry.getValue());
+            }
+        }
+        UrlEncodedFormEntity uefEntity;
+        try {
+            uefEntity = new UrlEncodedFormEntity(params, charset.value());
+            httppost.setEntity(uefEntity);
+            CloseableHttpResponse response = httpclient.execute(httppost);
+            try {
+                HttpEntity entity = response.getEntity();
+                if (entity != null) {
+                    responseContent=EntityUtils.toString(entity, charset.value());
+                }
+            } finally {
+                response.close();
+            }
+        } catch (ClientProtocolException e) {
+            e.printStackTrace();
+        } catch (UnsupportedEncodingException e1) {
+            e1.printStackTrace();
+        } catch (IOException e) {
+            e.printStackTrace();
+        } finally {
+            try {
+                httpclient.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+        return responseContent;
+    }
+
+    public static String doPost(String url, String body, CharEncoding charset) {
+        String responseContent="";
+        CloseableHttpClient httpclient = HttpClients.createDefault();
+        HttpPost httppost = new HttpPost(url);
+        try {
+            StringEntity uefEntity=new StringEntity(body, charset.value());
+            httppost.setEntity(uefEntity);
+            httppost.addHeader("Content-type","application/json");
+            CloseableHttpResponse response = httpclient.execute(httppost);
+            try {
+                HttpEntity entity = response.getEntity();
+                if (entity != null) {
+                    responseContent=EntityUtils.toString(entity, charset.value());
+                }
+            } finally {
+                response.close();
+            }
+        } catch (ClientProtocolException e) {
+            e.printStackTrace();
+        } catch (UnsupportedEncodingException e1) {
+            e1.printStackTrace();
+        } catch (IOException e) {
+            e.printStackTrace();
+        } finally {
+            try {
+                httpclient.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+        return responseContent;
+    }
+
+    /**
+     * 获取忽略证书验证的client
+     *
+     * @return
+     * @throws Exception
+     */
+
+    public static CloseableHttpClient getIgnoeSSLClient() throws Exception {
+        SSLContext sslContext = SSLContexts.custom().loadTrustMaterial(null, new TrustStrategy() {
+            @Override
+            public boolean isTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException {
+                return true;
+            }
+        }).build();
+
+        //创建httpClient
+        CloseableHttpClient client = HttpClients.custom().setSSLContext(sslContext).
+                setSSLHostnameVerifier(new NoopHostnameVerifier()).build();
+        return client;
+    }
+}

+ 369 - 0
src/main/java/com/lightinit/hsdataplatform/common/HttpUtil.java

@@ -0,0 +1,369 @@
+package com.lightinit.hsdataplatform.common;
+
+import com.google.gson.Gson;
+import com.lightinit.hsdataplatform.common.ssl.MySecureProtocolSocketFactory;
+import com.lightinit.hsdataplatform.dictionary.DicGitToken;
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.methods.PostMethod;
+import org.apache.commons.httpclient.methods.PutMethod;
+import org.apache.commons.httpclient.methods.RequestEntity;
+import org.apache.commons.httpclient.methods.StringRequestEntity;
+import org.apache.commons.httpclient.protocol.Protocol;
+import org.apache.commons.httpclient.protocol.ProtocolSocketFactory;
+import org.apache.http.HttpEntity;
+import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.entity.UrlEncodedFormEntity;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.client.utils.URIBuilder;
+import org.apache.http.config.Registry;
+import org.apache.http.config.RegistryBuilder;
+import org.apache.http.conn.socket.ConnectionSocketFactory;
+import org.apache.http.conn.socket.PlainConnectionSocketFactory;
+import org.apache.http.conn.ssl.NoopHostnameVerifier;
+import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
+import org.apache.http.message.BasicNameValuePair;
+import org.apache.http.ssl.SSLContexts;
+import org.apache.http.ssl.TrustStrategy;
+import org.apache.http.util.EntityUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.TrustManager;
+import javax.net.ssl.X509TrustManager;
+import java.io.IOException;
+import java.net.URI;
+import java.security.KeyManagementException;
+import java.security.NoSuchAlgorithmException;
+import java.security.cert.CertificateException;
+import java.security.cert.X509Certificate;
+import java.util.*;
+
+
+public class HttpUtil {
+
+    private static Logger logger = LoggerFactory.getLogger(HttpUtil.class);
+
+
+    /**
+     * @describe: TODO  服务于6.0接口
+     * @param url  访问地址
+     * @param head 请求头
+     * @param req  请求体内容
+     **/
+    public static String httpPost(String url, Map<String,String> head,Map<String,?> req) throws Exception{
+        //声明
+        ProtocolSocketFactory fcty = new MySecureProtocolSocketFactory();
+        //加入相关的https请求方式
+        Protocol.registerProtocol("https", new Protocol("https", fcty, 443));
+        //发送请求即可
+        org.apache.commons.httpclient.HttpClient client = new org.apache.commons.httpclient.HttpClient();
+        Gson gson = new Gson();
+        PostMethod post = new PostMethod(url);
+        String str = gson.toJson(req);
+        gson.fromJson(str,Map.class) ;
+        RequestEntity re = new StringRequestEntity(str,"application/json","utf-8");
+        if(head!=null){
+            Set<Map.Entry<String,String>> headSet = head.entrySet();
+            for (Map.Entry<String, String> entry : headSet) {
+                post.setRequestHeader(entry.getKey(),entry.getValue());
+            }
+        }
+        post.setRequestEntity(re);
+        int status = client.executeMethod(post);
+
+        System.out.println("=================status:"+status);
+        if(status!=200){
+            //抛出异常
+            byte[] bytes = post.getResponseBody();
+            String content = new String(bytes,"UTF-8");
+            System.out.println(content);
+        }
+        String content = post.getResponseBodyAsString();
+        System.out.println("Access System authenticate, Response: " + content);
+
+        return content;
+    }
+
+    public static String httpPut(String url, Map<String,String> head,Map<String,?> req) throws Exception{
+        //声明
+        ProtocolSocketFactory fcty = new MySecureProtocolSocketFactory();
+        //加入相关的https请求方式
+        Protocol.registerProtocol("https", new Protocol("https", fcty, 443));
+        //发送请求即可
+        org.apache.commons.httpclient.HttpClient client = new org.apache.commons.httpclient.HttpClient();
+        Gson gson = new Gson();
+        PutMethod post = new PutMethod(url);
+        String str = gson.toJson(req);
+        gson.fromJson(str,Map.class) ;
+        RequestEntity re = new StringRequestEntity(str,"application/json","utf-8");
+        if(head!=null){
+            Set<Map.Entry<String,String>> headSet = head.entrySet();
+            for (Map.Entry<String, String> entry : headSet) {
+                post.setRequestHeader(entry.getKey(),entry.getValue());
+            }
+        }
+        post.setRequestEntity(re);
+        int status = client.executeMethod(post);
+
+        System.out.println("=================status:"+status);
+        if(status!=200){
+            //抛出异常
+            byte[] bytes = post.getResponseBody();
+            String content = new String(bytes,"UTF-8");
+            System.out.println(content);
+        }
+        String content = post.getResponseBodyAsString();
+        System.out.println("Access System authenticate, Response: " + content);
+
+        return content;
+    }
+
+    /**
+     * @describe: TODO 服务于5.0接口
+     * @param url  请求路径
+     * @param head  请求头
+     * @param req  请求体内容
+     **/
+    public static String  httpPost2(String url, Map<String,String> head,Map<String,?> req) throws Exception{
+        //声明
+        ProtocolSocketFactory fcty = new MySecureProtocolSocketFactory();
+        //加入相关的https请求方式
+        Protocol.registerProtocol("https", new Protocol("https", fcty, 443));
+        //发送请求即可
+        org.apache.commons.httpclient.HttpClient client = new org.apache.commons.httpclient.HttpClient();
+        Map<String,Object> strMap = new HashMap();
+        Gson gson = new Gson();
+        PostMethod post = new PostMethod(url);
+        strMap.put("head",head);
+        strMap.put("body",req);
+        String str = gson.toJson(strMap);
+        RequestEntity re = new StringRequestEntity(str,"application/json","utf-8");
+        post.setRequestEntity(re);
+        int status = client.executeMethod(post);
+        System.out.println("Access System authenticate, Status: " + post.getStatusCode());
+        System.out.println("Access System authenticate, Response: " + post.getResponseBodyAsString());
+        String content = post.getResponseBodyAsString();
+        return content;
+    }
+
+
+    public static String httpGet(String url,String accessticket,Map<String,?> param) throws Exception {
+
+        //CloseableHttpClient httpclient = HttpClients.createDefault();
+        CloseableHttpClient httpclient = getIgnoeSSLClient();
+        String resultString = "";
+        CloseableHttpResponse response = null;
+        try {
+            // 创建uri
+            URIBuilder builder = new URIBuilder(url);
+
+            if (param != null) {
+                for (String key : param.keySet()) {
+                    builder.addParameter(key, (String)param.get(key));
+                }
+            }
+            URI uri = builder.build();
+
+            // 创建http GET请求
+            HttpGet httpGet = new HttpGet(uri);
+            if (accessticket!=null)  httpGet.addHeader("accessticket",accessticket);
+            // 执行请求
+            response = httpclient.execute(httpGet);
+            // 判断返回状态是否为200
+            logger.info("访问的路径为:"+url+"状态为:"+response.getStatusLine().getStatusCode());
+            if (response.getStatusLine().getStatusCode() == 200) {
+                byte[] bytes= EntityUtils.toByteArray(response.getEntity());
+                resultString = new String(bytes);
+                //resultString = EntityUtils.toString(response.getEntity(), "ISO-8859-1");
+                //resultString= Base64.encodeBase64String(bytes);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            try {
+                if (response != null) {
+                    response.close();
+                }
+                httpclient.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+
+        logger.info("查询的结果:"+resultString);
+        return resultString;
+    }
+
+    public static String httpGet2(String url,String accessticket,Map<String,?> param) throws Exception {
+
+        //CloseableHttpClient httpclient = HttpClients.createDefault();
+        CloseableHttpClient httpclient = getIgnoeSSLClient();
+        String resultString = "";
+        CloseableHttpResponse response = null;
+        try {
+            // 创建uri
+            URIBuilder builder = new URIBuilder(url);
+
+            if (param != null) {
+                for (String key : param.keySet()) {
+                    builder.addParameter(key, (String)param.get(key));
+                }
+            }
+            URI uri = builder.build();
+
+            // 创建http GET请求
+            HttpGet httpGet = new HttpGet(uri);
+            if (accessticket!=null)  httpGet.addHeader("Authorization",accessticket);
+            // 执行请求
+            response = httpclient.execute(httpGet);
+            // 判断返回状态是否为200
+            logger.info("访问的路径为:"+url+"状态为:"+response.getStatusLine().getStatusCode());
+            if (response.getStatusLine().getStatusCode() == 200) {
+                byte[] bytes= EntityUtils.toByteArray(response.getEntity());
+                resultString = new String(bytes);
+                //resultString = EntityUtils.toString(response.getEntity(), "ISO-8859-1");
+                //resultString= Base64.encodeBase64String(bytes);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            try {
+                if (response != null) {
+                    response.close();
+                }
+                httpclient.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+
+        logger.info("查询的结果:"+resultString);
+        return resultString;
+    }
+
+    public static String httpGet(String url,Map<String,Object> params) throws Exception {
+        return httpGet(url,null,params);
+    }
+
+    public static String httpGet(String url,String accessticket) throws Exception {
+        return httpGet(url,accessticket,null);
+    }
+
+
+    public static Map<String,Object> strToMap(String message){
+        Gson gson = new Gson();
+        Map<String,Object> map = new HashMap<String, Object>();
+        map = gson.fromJson(message,map.getClass());
+        return map;
+    }
+
+    public static List<Object> strToList(String message){
+        Gson gson = new Gson();
+        List<Object> list = new ArrayList<>();
+        list = gson.fromJson(message,list.getClass());
+        return list;
+    }
+
+    public static Map<String,String>  getHead(String appid,String appkey){
+        Map<String,String> head = new HashMap<String,String>();
+        head.put("appid",appid);
+        head.put("appkey",appkey);
+        return head;
+    }
+
+    public static String getToken(String url, Map<String,String> head,String contentType) throws Exception{
+        //声明
+        ProtocolSocketFactory fcty = new MySecureProtocolSocketFactory();
+        //加入相关的https请求方式
+        Protocol.registerProtocol("https", new Protocol("https", fcty, 443));
+        //发送请求即可
+        org.apache.commons.httpclient.HttpClient client = new org.apache.commons.httpclient.HttpClient();
+//        HttpClient client = new HttpClient();
+        PostMethod post = new PostMethod(url);
+        String str = DicGitToken.PARAMS ;
+        RequestEntity re = new StringRequestEntity(str,contentType,"utf-8");
+        if(head!=null){
+            Set<Map.Entry<String,String>> headSet = head.entrySet();
+            for (Map.Entry<String, String> entry : headSet) {
+                post.setRequestHeader(entry.getKey(),entry.getValue());
+            }
+        }
+        post.setRequestEntity(re);
+        int status = client.executeMethod(post);
+
+        System.out.println("=================status:"+status);
+        if(status!=200){
+            //抛出异常
+            byte[] bytes = post.getResponseBody();
+            String content = new String(bytes,"UTF-8");
+            System.out.println(content);
+        }
+        String content = post.getResponseBodyAsString();
+        System.out.println("Access System authenticate, Response: " + content);
+
+        return content;
+    }
+
+    /**
+     * 绕过验证
+     *
+     * @return
+     * @throws NoSuchAlgorithmException
+     * @throws KeyManagementException
+     */
+    public static SSLContext createIgnoreVerifySSL() throws NoSuchAlgorithmException, KeyManagementException {
+        SSLContext sc = SSLContext.getInstance("SSLv3");
+
+        // 实现一个X509TrustManager接口,用于绕过验证,不用修改里面的方法
+        X509TrustManager trustManager = new X509TrustManager() {
+            @Override
+            public void checkClientTrusted(
+                    java.security.cert.X509Certificate[] paramArrayOfX509Certificate,
+                    String paramString) throws CertificateException {
+            }
+
+            @Override
+            public void checkServerTrusted(
+                    java.security.cert.X509Certificate[] paramArrayOfX509Certificate,
+                    String paramString) throws CertificateException {
+            }
+
+            @Override
+            public java.security.cert.X509Certificate[] getAcceptedIssuers() {
+                return null;
+            }
+        };
+
+        sc.init(null, new TrustManager[] { trustManager }, null);
+        return sc;
+    }
+
+    /**
+     * 获取忽略证书验证的client
+     *
+     * @return
+     * @throws Exception
+     */
+
+    public static CloseableHttpClient getIgnoeSSLClient() throws Exception {
+        SSLContext sslContext = SSLContexts.custom().loadTrustMaterial(null, new TrustStrategy() {
+            @Override
+            public boolean isTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException {
+                return true;
+            }
+        }).build();
+
+        //创建httpClient
+        CloseableHttpClient client = HttpClients.custom().setSSLContext(sslContext).
+                setSSLHostnameVerifier(new NoopHostnameVerifier()).build();
+        return client;
+    }
+
+
+}

+ 148 - 0
src/main/java/com/lightinit/hsdataplatform/common/IPUtils.java

@@ -0,0 +1,148 @@
+package com.lightinit.hsdataplatform.common;
+
+import com.lightinit.hsdataplatform.json.pojo.PingResultEntity;
+import org.springframework.util.StringUtils;
+
+import javax.servlet.http.HttpServletRequest;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * Created by Mr.Yao on 2017/5/22.
+ */
+public class IPUtils {
+    static List<String> regList=new ArrayList<String>();
+    static {
+        regList.add(":1");
+        regList.add("^10\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}$");
+        regList.add("^172\\.((1[6-9]{1})|(2[0-9]{1})|(3[0-1]{1}))\\.[0-9]{1,3}\\.[0-9]{1,3}$");
+        regList.add("^192\\.168\\.[0-9]{1,3}\\.[0-9]{1,3}$");
+    }
+    public static String getIpAddress(HttpServletRequest request){
+        String ip=request.getHeader("HTTP_X_FORWARDED_FOR");
+        if (StringUtils.isEmpty(ip)==false) {
+            String []ipArray=ip.split(",");
+            for (String _ip:ipArray) {
+                if(IsPrivateIpAddress(_ip))
+                    continue;
+                ip=_ip;
+                break;
+            }
+        }
+        if (StringUtils.isEmpty(ip)){
+            ip = request.getRemoteAddr();
+        }
+        return ip;
+    }
+
+    public static boolean IsPrivateIpAddress(String ip){
+        boolean isPrivateIp=false;
+        for (String regIp:regList) {
+            Pattern pattern=Pattern.compile(regIp);
+            Matcher matcher=pattern.matcher(ip);
+           if(matcher.matches())
+           {
+               isPrivateIp=true;
+               break;
+           }
+        }
+        return isPrivateIp;
+    }
+
+    public static PingResultEntity Ping(String domain,int pingTimes,String ping){
+        PingResultEntity entity=new PingResultEntity();
+        BufferedReader in = null;
+        Runtime r = Runtime.getRuntime();
+        // 将要执行的ping命令,此命令是windows格式的命令
+        //String pingCommand = "ping " + domain + " -n " + pingTimes;
+        String pingCommand=String.format(ping,domain,pingTimes);
+        try {
+            // 执行命令并获取输出
+            System.out.println(pingCommand);
+            Process p = r.exec(pingCommand);
+            if (p == null) {
+                entity.setReachable(false);
+            }
+            in = new BufferedReader(new InputStreamReader(p.getInputStream()));
+            // 逐行检查输出,计算类似出现=23ms TTL=62字样的次数
+            int connectedCount = 0;
+            String line = null;
+            while ((line = in.readLine()) != null) {
+                if(StringUtils.isEmpty(entity.getIpAddress())) {
+                    String ipLine = getIpAddress(line);
+                    if (StringUtils.isEmpty(ipLine) == false)
+                        entity.setIpAddress(ipLine);
+                }
+                connectedCount += getCheckWindowsResult(line)+getCheckLinuxResult(line);
+            }
+            // 如果出现类似=23ms TTL=62这样的字样,出现的次数=测试次数则返回真
+            entity.setReachable(connectedCount>0);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            // 出现异常则返回假
+            entity.setReachable(false);
+        } finally {
+            try {
+                in.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+        return entity;
+    }
+
+    //若line含有=18ms TTL=16字样,说明已经ping通,返回1,否則返回0.
+    private static int getCheckWindowsResult(String line) {
+        // System.out.println("控制台输出的结果为:"+line);
+        Pattern pattern = Pattern.compile("(\\d+ms)(\\s+)(TTL=\\d+)",Pattern.CASE_INSENSITIVE);
+        Matcher matcher = pattern.matcher(line);
+        while (matcher.find()) {
+            return 1;
+        }
+        return 0;
+    }
+    //若line含有=18ms TTL=16字样,说明已经ping通,返回1,否則返回0.
+    private static int getCheckLinuxResult(String line) {
+        // 64 bytes from 150.138.158.3: icmp_seq=1 ttl=43 time=61.8 ms
+        Pattern pattern = Pattern.compile("(icmp_seq=\\d+\\s+ttl=\\d+\\s+time=[0-9]{1,}([.][0-9]*)*\\s*ms)",Pattern.CASE_INSENSITIVE);
+        Matcher matcher = pattern.matcher(line);
+        while (matcher.find()) {
+            return 1;
+        }
+        return 0;
+    }
+    public static String getIpAddress(String line) {
+        // System.out.println("控制台输出的结果为:"+line);
+        Pattern pattern = Pattern.compile("(([1-9]{1})([0-9]{0,2})\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3})",Pattern.CASE_INSENSITIVE);
+        Matcher matcher = pattern.matcher(line);
+        while (matcher.find()) {
+            return matcher.group();
+        }
+        return "";
+    }
+    public static String getDomain(String line) {
+        // System.out.println("控制台输出的结果为:"+line);
+        Pattern pattern = Pattern.compile("(([a-zA-Z0-9][a-zA-Z0-9-_]+\\.)+[a-zA-Z0-9-_][^ ]*)",Pattern.CASE_INSENSITIVE);
+        Matcher matcher = pattern.matcher(line);
+        while (matcher.find()) {
+            return matcher.group();
+        }
+        return "";
+    }
+
+    public static boolean checkIpAddress(String targetIp,String rightIp) {
+        if(StringUtils.isEmpty(targetIp) || StringUtils.isEmpty(rightIp))
+            return false;
+        String []rightIps=rightIp.split(";");
+        for (String ip:rightIps) {
+            if(targetIp.trim().equalsIgnoreCase(ip.trim()))
+                return true;
+        }
+        return false;
+    }
+}

+ 53 - 0
src/main/java/com/lightinit/hsdataplatform/common/MD5Utils.java

@@ -0,0 +1,53 @@
+package com.lightinit.hsdataplatform.common;
+
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.util.UUID;
+
+/**
+ * Created by Mr.Yao on 2017/4/7.
+ */
+public class MD5Utils {public static String MD5(String sourceStr) {
+    String result = "";
+    try {
+        MessageDigest md = MessageDigest.getInstance("MD5");
+        md.update(sourceStr.getBytes());
+        byte b[] = md.digest();
+        int i;
+        StringBuffer buf = new StringBuffer("");
+        for (int offset = 0; offset < b.length; offset++) {
+            i = b[offset];
+            if (i < 0)
+                i += 256;
+            if (i < 16)
+                buf.append("0");
+            buf.append(Integer.toHexString(i));
+        }
+        result = buf.toString();
+    } catch (NoSuchAlgorithmException e) {
+    }
+    return result;
+}
+
+    private static String[] chars = new String[] { "a", "b", "c", "d", "e", "f",
+            "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s",
+            "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5",
+            "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I",
+            "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V",
+            "W", "X", "Y", "Z" };
+
+    public static String generateShortUuid() {
+        StringBuffer shortBuffer = new StringBuffer();
+        String uuid = UUID.randomUUID().toString().replace("-", "");
+        for (int i = 0; i < 8; i++) {
+            String str = uuid.substring(i * 4, i * 4 + 4);
+            int x = Integer.parseInt(str, 16);
+            shortBuffer.append(chars[x % 0x3E]);
+        }
+        return shortBuffer.toString();
+    }
+
+    public static String generateGuid(){
+        return UUID.randomUUID().toString();
+    }
+}

Разлика између датотеке није приказан због своје велике величине
+ 162 - 0
src/main/java/com/lightinit/hsdataplatform/common/MenuUtils.java


+ 43 - 0
src/main/java/com/lightinit/hsdataplatform/common/ObjectConvertorUtils.java

@@ -0,0 +1,43 @@
+package com.lightinit.hsdataplatform.common;
+
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Created by Mr.Yao on 2017/5/9.
+ */
+public class ObjectConvertorUtils<T> {
+
+    public T DictToObject(Map<String, String> map,Class<T> classType)
+    {
+        T entity= null;
+        try {
+            entity = classType.newInstance();
+            Field[] fields = classType.getDeclaredFields();
+            if(fields!=null) {
+                for (Field field : fields) {
+                    if (map.containsKey(field.getName()))
+                        field.setAccessible(true);
+                        field.set(entity, map.get(field.getName()));
+                }
+            }
+        } catch (InstantiationException e) {
+            e.printStackTrace();
+        } catch (IllegalAccessException e) {
+            e.printStackTrace();
+        }
+        return entity;
+    }
+
+    public List<T> ListToObject(List<Map<String, String>> list, Class<T> classType) {
+        List<T> resultList = new ArrayList<T>();
+        for (Map<String, String> map : list) {
+            T item = DictToObject(map, classType);
+            if (item != null)
+                resultList.add(item);
+        }
+        return resultList;
+    }
+}

+ 17 - 0
src/main/java/com/lightinit/hsdataplatform/common/ObjectMappingUtils.java

@@ -0,0 +1,17 @@
+package com.lightinit.hsdataplatform.common;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import java.io.IOException;
+
+/**
+ * Created by WangYao on 2018/5/23.
+ */
+public class ObjectMappingUtils {
+
+    public static <S, T> T map(S source, Class<T> classType) throws IOException {
+        ObjectMapper objectMapper = new ObjectMapper();
+        String jsonString = objectMapper.writeValueAsString(source);
+        return objectMapper.readValue(jsonString, classType);
+    }
+}

+ 181 - 0
src/main/java/com/lightinit/hsdataplatform/common/OneTimePasswordAlgorithm.java

@@ -0,0 +1,181 @@
+/*
+ * OneTimePasswordAlgorithm.java
+ * OATH Initiative,
+ * HOTP one-time password algorithm
+ *
+ */
+/* Copyright (C) 2004, OATH. All rights reserved.
+ *
+ * License to copy and use this software is granted provided that it
+ * is identified as the "OATH HOTP Algorithm" in all material
+ * mentioning or referencing this software or this function.
+ *
+ * License is also granted to make and use derivative works provided
+ * that such works are identified as
+ * "derived from OATH HOTP algorithm"
+ * in all material mentioning or referencing the derived work.
+ *
+ * OATH (Open AuTHentication) and its members make no
+ * representations concerning either the merchantability of this
+ * software or the suitability of this software for any particular
+ * purpose.
+ *
+ * It is provided "as is" without express or implied warranty
+ * of any kind and OATH AND ITS MEMBERS EXPRESSaLY DISCLAIMS
+ * ANY WARRANTY OR LIABILITY OF ANY KIND relating to this software.
+ *
+ * These notices must be retained in any copies of any part of this
+ * documentation and/or software.
+ */
+package com.lightinit.hsdataplatform.common;
+
+import javax.crypto.Mac;
+import javax.crypto.spec.SecretKeySpec;
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+
+/**
+ * This class contains static methods that are used to calculate the One-Time
+ * Password (OTP) using JCE to provide the HMAC-SHA-1.
+ * 
+ * @author Loren Hart
+ * @version 1.0
+ */
+public class OneTimePasswordAlgorithm {
+	private OneTimePasswordAlgorithm() {
+	}
+
+	// These are used to calculate the check-sum digits.
+	// 0 1 2 3 4 5 6 7 8 9
+	private static final int[] doubleDigits = { 0, 2, 4, 6, 8, 1, 3, 5, 7, 9 };
+
+	/**
+	 * Calculates the checksum using the credit card algorithm. This algorithm
+	 * has the advantage that it detects any single mistyped digit and any
+	 * single transposition of adjacent digits.
+	 * 
+	 * @param num
+	 *            the number to calculate the checksum for
+	 * @param digits
+	 *            number of significant places in the number
+	 * 
+	 * @return the checksum of num
+	 */
+	public static int calcChecksum(long num, int digits) {
+		boolean doubleDigit = true;
+		int total = 0;
+		while (0 < digits--) {
+			int digit = (int) (num % 10);
+			num /= 10;
+			if (doubleDigit) {
+				digit = doubleDigits[digit];
+			}
+			total += digit;
+			doubleDigit = !doubleDigit;
+		}
+		int result = total % 10;
+		if (result > 0) {
+			result = 10 - result;
+		}
+		return result;
+	}
+
+	/**
+	 * This method uses the JCE to provide the HMAC-SHA-1 algorithm. HMAC
+	 * computes a Hashed Message Authentication Code and in this case SHA1 is
+	 * the hash algorithm used.
+	 * 
+	 * @param keyBytes
+	 *            the bytes to use for the HMAC-SHA-1 key
+	 * @param text
+	 *            the message or text to be authenticated.
+	 * 
+	 * @throws NoSuchAlgorithmException
+	 *             if no provider makes either HmacSHA1 or HMAC-SHA-1 digest
+	 *             algorithms available.
+	 * @throws InvalidKeyException
+	 *             The secret provided was not a valid HMAC-SHA-1 key.
+	 * 
+	 */
+	public static byte[] hmac_sha1(byte[] keyBytes, byte[] text)
+			throws NoSuchAlgorithmException, InvalidKeyException {
+		// try {
+		Mac hmacSha1;
+		try {
+			hmacSha1 = Mac.getInstance("HmacSHA1");
+		} catch (NoSuchAlgorithmException nsae) {
+			hmacSha1 = Mac.getInstance("HMAC-SHA-1");
+		}
+		SecretKeySpec macKey = new SecretKeySpec(keyBytes, "RAW");
+		hmacSha1.init(macKey);
+		return hmacSha1.doFinal(text);
+		// } catch (GeneralSecurityException gse) {
+		// throw new UndeclaredThrowableException(gse);
+		// }
+	}
+
+	private static final int[] DIGITS_POWER
+	// 0 1 2 3 4 5 6 7 8
+	= { 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000 };
+
+	/**
+	 * This method generates an OTP value for the given set of parameters.
+	 * 
+	 * @param secret
+	 *            the shared secret
+	 * @param movingFactor
+	 *            the counter, time, or other value that changes on a per use
+	 *            basis.
+	 * @param codeDigits
+	 *            the number of digits in the OTP, not including the checksum,
+	 *            if any.
+	 * @param addChecksum
+	 *            a flag that indicates if a checksum digit should be appended
+	 *            to the OTP.
+	 * @param truncationOffset
+	 *            the offset into the MAC result to begin truncation. If this
+	 *            value is out of the range of 0 ... 15, then dynamic truncation
+	 *            will be used. Dynamic truncation is when the last 4 bits of
+	 *            the last byte of the MAC are used to determine the start
+	 *            offset.
+	 * @throws NoSuchAlgorithmException
+	 *             if no provider makes either HmacSHA1 or HMAC-SHA-1 digest
+	 *             algorithms available.
+	 * @throws InvalidKeyException
+	 *             The secret provided was not a valid HMAC-SHA-1 key.
+	 * 
+	 * @return A numeric String in base 10 that includes {@link codeDigits}
+	 *         digits plus the optional checksum digit if requested.
+	 */
+	static public String generateOTP(byte[] secret, long movingFactor,
+			int codeDigits, boolean addChecksum, int truncationOffset)
+			throws NoSuchAlgorithmException, InvalidKeyException {
+		// put movingFactor value into text byte array
+		String result = null;
+		int digits = addChecksum ? (codeDigits + 1) : codeDigits;
+		byte[] text = new byte[8];
+		for (int i = text.length - 1; i >= 0; i--) {
+			text[i] = (byte) (movingFactor & 0xff);
+			movingFactor >>= 8;
+		}
+		// compute hmac hash
+		byte[] hash = hmac_sha1(secret, text);
+		// put selected bytes into result int
+		int offset = hash[hash.length - 1] & 0xf;
+		if ((0 <= truncationOffset) && (truncationOffset < (hash.length - 4))) {
+			offset = truncationOffset;
+		}
+		int binary = ((hash[offset] & 0x7f) << 24)
+				| ((hash[offset + 1] & 0xff) << 16)
+				| ((hash[offset + 2] & 0xff) << 8) | (hash[offset + 3] & 0xff);
+		int otp = binary % DIGITS_POWER[codeDigits];
+		if (addChecksum) {
+			otp = (otp * 10) + calcChecksum(otp, codeDigits);
+		}
+		result = Integer.toString(otp);
+		while (result.length() < digits) {
+			result = "0" + result;
+		}
+		return result;
+	}
+}

+ 19 - 0
src/main/java/com/lightinit/hsdataplatform/common/OrderNumberUtils.java

@@ -0,0 +1,19 @@
+package com.lightinit.hsdataplatform.common;
+
+import java.util.Random;
+
+public class OrderNumberUtils {
+
+    /**
+     * 生成唯一订单编号
+     * 格式:时间+随机数
+     * @return
+     */
+    public static synchronized String generate(){
+        Random random = new Random() ;
+        System.currentTimeMillis() ;
+        Integer number = random.nextInt(900000)+100000 ;
+        return System.currentTimeMillis() + String.valueOf(number) ;
+    }
+
+}

+ 36 - 0
src/main/java/com/lightinit/hsdataplatform/common/PermissionUtilsPro.java

@@ -0,0 +1,36 @@
+package com.lightinit.hsdataplatform.common;
+
+import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.subject.Subject;
+import org.springframework.stereotype.Component;
+
+/**
+ * Created by Mr.Yao on 2017/7/6.
+ */
+@Component
+public class PermissionUtilsPro {
+    /***
+     * 是否有超级权限
+     * @return
+     */
+    public boolean IsSuperPermission(){
+        Subject user = SecurityUtils.getSubject();
+        if (null == user)
+            return false;
+        Object objectUserName = user.getPrincipal();
+        if(objectUserName==null)
+            return false;
+        String currentUsername = (String) user.getPrincipal();
+        return "admin".contains(currentUsername.toLowerCase());
+    }
+
+    public String CurrentName(){
+        Subject user = SecurityUtils.getSubject();
+        if (null == user)
+            return "";
+        Object objectUserName = user.getPrincipal();
+        if(objectUserName==null)
+            return "";
+        return (String) user.getPrincipal();
+    }
+}

+ 43 - 0
src/main/java/com/lightinit/hsdataplatform/common/RoleComboUtils.java

@@ -0,0 +1,43 @@
+package com.lightinit.hsdataplatform.common;
+
+import com.lightinit.hsdataplatform.json.pojo.RoleAttributesEntity;
+import com.lightinit.hsdataplatform.json.pojo.RoleComboEntity;
+import com.lightinit.hsdataplatform.entity.SentryRole;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Created by Mr.Yao on 2017/4/24.
+ */
+public class RoleComboUtils {
+
+    public static RoleComboEntity  RoleComboxConverter(SentryRole role) {
+        RoleComboEntity entity=new RoleComboEntity();
+        if (role!=null)
+        {
+            List<RoleComboEntity> tmpList=new ArrayList<RoleComboEntity>();
+            List<SentryRole> list=role.getChildren();
+            if(list!=null && list.size()>0){
+                for (SentryRole _item:list) {
+                    RoleComboEntity _entity=RoleComboxConverter(_item);
+                    if (_entity!=null)
+                        tmpList.add(_entity);
+                }
+                entity.setIconCls("fi-page-copy");
+                entity.setChildren(tmpList);
+            }else {
+                entity.setIconCls("fi-page");
+                entity.setChildren(null);
+            }
+            entity.setId(role.getId());
+            entity.setText(role.getRolename());
+            RoleAttributesEntity roleAttributesEntity=new RoleAttributesEntity();
+            if (role.getParentid()!=null) {
+                roleAttributesEntity.setParentid(role.getParentid());
+            }
+        }
+        return entity;
+    }
+
+}

+ 127 - 0
src/main/java/com/lightinit/hsdataplatform/common/RoleModulesUtilsPro.java

@@ -0,0 +1,127 @@
+package com.lightinit.hsdataplatform.common;
+
+import com.lightinit.hsdataplatform.entity.AdminRole;
+import com.lightinit.hsdataplatform.entity.RoleModule;
+import com.lightinit.hsdataplatform.entity.SentryRole;
+import com.lightinit.hsdataplatform.entity.UserModule;
+import com.lightinit.hsdataplatform.service.IRoleService;
+import com.lightinit.hsdataplatform.service.IUserModuleService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Created by Mr.Yao on 2017/4/25.
+ */
+@Component
+public class RoleModulesUtilsPro {
+    @Autowired
+    private IRoleService roleService;
+    @Autowired
+    private IUserModuleService userModuleService;
+
+    public List<RoleModule> UserHasModules(long uid){
+        List<RoleModule> result=new ArrayList<RoleModule>();
+        if(uid>0) {
+            List<UserModule> userModuleList=userModuleService.QueryUserModuleList(uid);
+            if (userModuleList!=null && userModuleList.size()>0){
+                for (UserModule mUserModule:userModuleList) {
+                    RoleModule roleModule = new RoleModule();
+                    roleModule.setModuleid(mUserModule.getModuleid());
+                    result.add(roleModule);
+                }
+            }
+            if (result.size()>0)
+                return result;
+            List<AdminRole> list= roleService.QueryRoleList(uid);
+            List<Long> roleIds=new ArrayList<Long>();
+            for (AdminRole role:list) {
+                roleIds.add(role.getId());
+            }
+            List<SentryRole> sentryRoles= roleService.QueryManyRole(roleIds);
+            for (SentryRole sentryRole:sentryRoles) {
+                List<RoleModule> _result = roleService.QueryModuleList(sentryRole.getId());
+                if((_result==null || _result.size()==0)&& sentryRole!=null && sentryRole.getParentid()!=null && sentryRole.getParentid()>0){
+                    _result=new ArrayList<RoleModule>();
+                    List<RoleModule> tmpList =RoleModules(sentryRole.getParentid());
+                    if(tmpList!=null){
+                        for (RoleModule item:tmpList) {
+                            if(_result.contains(item)==false){
+                                _result.add(item);
+                            }
+                        }
+                    }
+                }
+                for (RoleModule item:_result) {
+                    if(result.contains(item)==false){
+                        result.add(item);
+                    }
+                }
+            }
+            return result;
+        }else
+            return null;
+    }
+    public List<RoleModule> RoleModules(long role){
+        List<RoleModule> result=new ArrayList<RoleModule>();
+        if(role>0) {
+            SentryRole sentryRole= roleService.QueryOne(role);
+            result = roleService.QueryModuleList(role);
+            if((result==null || result.size()==0)&& sentryRole!=null && sentryRole.getParentid()!=null && sentryRole.getParentid()>0){
+                List<RoleModule> tmpList =RoleModules(sentryRole.getParentid());
+                if(tmpList!=null){
+                    for (RoleModule item:tmpList) {
+                        if(result.contains(item)==false){
+                            result.add(item);
+                        }
+                    }
+                }
+            }
+            return result;
+        }else
+        return null;
+    }
+    public List<Long> RoleHasModules(long role){
+        List<Long> roleHasModules=new ArrayList<Long>();
+        List<RoleModule> result=new ArrayList<RoleModule>();
+        if(role>0) {
+            SentryRole sentryRole= roleService.QueryOne(role);
+            result = roleService.QueryModuleList(role);
+            if((result==null || result.size()==0)&& sentryRole!=null && sentryRole.getParentid()!=null && sentryRole.getParentid()>0){
+                List<RoleModule> tmpList =RoleModules(sentryRole.getParentid());
+                if(tmpList!=null){
+                    for (RoleModule item:tmpList) {
+                        if(result.contains(item)==false){
+                            result.add(item);
+                        }
+                    }
+                }
+            }
+        }
+        for (RoleModule _item:result) {
+            if(roleHasModules.contains(_item.getModuleid())==false){
+                roleHasModules.add(_item.getModuleid());
+            }
+        }
+        return roleHasModules;
+    }
+    public List<Long> RoleIds(SentryRole role){
+        List<Long> result=new ArrayList<Long>();
+        result.add(role.getId());
+        if(role.getChildren()!=null && role.getChildren().size()>0){
+            for (SentryRole item:role.getChildren()) {
+                List<Long> tmpResult=RoleIds(item);
+                if(tmpResult.size()>0){
+                    for (Long _item:tmpResult) {
+                        if(result.contains(_item)==false){
+                            result.add(_item);
+                        }
+                    }
+                }
+            }
+        }
+        return result;
+    }
+}

+ 71 - 0
src/main/java/com/lightinit/hsdataplatform/common/SecureCardUtilsPro.java

@@ -0,0 +1,71 @@
+package com.lightinit.hsdataplatform.common;
+
+import com.lightinit.hsdataplatform.entity.Securekey;
+import com.lightinit.hsdataplatform.service.ISecureKeyService;
+import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.subject.Subject;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.util.StringUtils;
+
+import javax.servlet.http.HttpSession;
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+/**
+ * Created by Lantinit on 2018/2/1.
+ */
+@Component
+public class SecureCardUtilsPro {
+    @Autowired
+    private ISecureKeyService secureKeyService;
+
+    public boolean verification(HttpSession session,String token,String cardno,long synctime){
+        String capText=session.getAttribute("SECUREKEY_SESSION_KEY")!=null?session.getAttribute("SECUREKEY_SESSION_KEY").toString():"";
+        if(StringUtils.isEmpty(capText)){
+            return false;
+        }
+        String realToken="";
+        String[]TokenArray=capText.split(":::");
+        for (String item:TokenArray) {
+            String secretStr=item.substring(1)+":::"+cardno+":::"+synctime+":::"+item.substring(0,1);
+            try {
+                realToken+=OneTimePasswordAlgorithm.generateOTP(secretStr.getBytes(), 0, 2, false, -1);
+            } catch (NoSuchAlgorithmException e) {
+                e.printStackTrace();
+            } catch (InvalidKeyException e) {
+                e.printStackTrace();
+            }
+        }
+        if(realToken.equalsIgnoreCase(token)==false){
+            return false;
+        }
+        session.removeAttribute("SECUREKEY_SESSION_KEY");
+        return true;
+    }
+
+    public boolean verification(HttpSession session,String token,String username){
+        Securekey securekey= secureKeyService.QueryOne(username);
+        if(securekey==null){
+            return false;
+        }
+        SimpleDateFormat syncDateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        try {
+            Date syncDate= syncDateFormat.parse(syncDateFormat.format(securekey.getSyncdatetime()));
+            return verification(session,token,securekey.getSecurekey(),syncDate.getTime());
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+        return false;
+    }
+    public boolean verification(HttpSession session,String token){
+        Subject currentUser = SecurityUtils.getSubject();
+        if(currentUser==null){
+            return false;
+        }
+        return verification(session,token,currentUser.getPrincipal().toString());
+    }
+}

+ 32 - 0
src/main/java/com/lightinit/hsdataplatform/common/ShiroFilterUtils.java

@@ -0,0 +1,32 @@
+package com.lightinit.hsdataplatform.common;
+
+import java.io.PrintWriter;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+import java.util.Map;
+import org.codehaus.jackson.map.ObjectMapper;
+/**
+ * Created by Mr.Yao on 2017/11/8.
+ */
+public class ShiroFilterUtils {
+    private static ObjectMapper objectMapper = new  ObjectMapper();
+    public static boolean isAjax(ServletRequest request){
+        return "XMLHttpRequest".equalsIgnoreCase(((HttpServletRequest) request).getHeader("X-Requested-With"));
+    }
+    public static void out(ServletResponse response, Map<String, String> resultMap){
+        PrintWriter out = null;
+        try {
+//            response.setCharacterEncoding("UTF-8");
+            out = response.getWriter();
+            out.println(objectMapper.writeValueAsString(resultMap));
+        } catch (Exception e) {
+            e.printStackTrace();
+        }finally{
+            if(null != out){
+                out.flush();
+                out.close();
+            }
+        }
+    }
+}

+ 51 - 0
src/main/java/com/lightinit/hsdataplatform/common/ShortPhoneUtils.java

@@ -0,0 +1,51 @@
+package com.lightinit.hsdataplatform.common;
+
+import com.aliyuncs.CommonRequest;
+import com.aliyuncs.CommonResponse;
+import com.aliyuncs.DefaultAcsClient;
+import com.aliyuncs.IAcsClient;
+import com.aliyuncs.exceptions.ClientException;
+import com.aliyuncs.exceptions.ServerException;
+import com.aliyuncs.http.MethodType;
+import com.aliyuncs.profile.DefaultProfile;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+public class ShortPhoneUtils {
+
+    public static void send(String phone, String templateCode, Date time, String name) {
+        String regionId = ConfigUtils.getConfiguration(SysContants.PropertyFilePath.CONFIG).getString(SysContants.PropertyKey.REGIONID);
+        String accesskeyId = ConfigUtils.getConfiguration(SysContants.PropertyFilePath.CONFIG).getString(SysContants.PropertyKey.ACCESSKEYID);
+        String secret = ConfigUtils.getConfiguration(SysContants.PropertyFilePath.CONFIG).getString(SysContants.PropertyKey.SECRET);
+        DefaultProfile profile = DefaultProfile.getProfile(regionId, accesskeyId, secret);
+        String returnString = null ;
+        IAcsClient client = new DefaultAcsClient(profile);
+
+        //格式化时间
+        SimpleDateFormat format = new SimpleDateFormat("HH:mm:ss");
+
+
+        CommonRequest request = new CommonRequest();
+        //request.setProtocol(ProtocolType.HTTPS);
+        request.setMethod(MethodType.POST);
+        request.setDomain("dysmsapi.aliyuncs.com");
+        request.setVersion("2017-05-25");
+        request.setAction("SendSms");
+        request.putQueryParameter("RegionId", "cn-hangzhou");
+        request.putQueryParameter("PhoneNumbers", phone);
+        request.putQueryParameter("SignName", "衡水智慧城市建设有限公司");
+        request.putQueryParameter("TemplateCode", templateCode);
+        request.putQueryParameter("TemplateParam", "{\"time\":\"" + format.format(time) + "\",\"name\":\"" + name + "\"}");
+        try {
+            CommonResponse response = client.getCommonResponse(request);
+            System.out.println(response.getData());
+            returnString = response.getData() ;
+        } catch (ServerException e) {
+            e.printStackTrace();
+        } catch (ClientException e) {
+            e.printStackTrace();
+        }
+//        return returnString ;
+    }
+}

+ 43 - 0
src/main/java/com/lightinit/hsdataplatform/common/SolrUtils.java

@@ -0,0 +1,43 @@
+package com.lightinit.hsdataplatform.common;
+
+import com.lightinit.hsdataplatform.json.pojo.solr.CoreOverViewResponseEntity;
+import org.apache.http.NameValuePair;
+import org.apache.http.message.BasicNameValuePair;
+import org.codehaus.jackson.JsonParseException;
+import org.codehaus.jackson.map.JsonMappingException;
+import org.codehaus.jackson.map.ObjectMapper;
+import org.springframework.util.StringUtils;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Created by Mr.Yao on 2017/12/7.
+ */
+public class SolrUtils {
+    public static CoreOverViewResponseEntity parse(String service, String core){
+        CoreOverViewResponseEntity result=null;
+        if(StringUtils.isEmpty(service) || StringUtils.isEmpty(core))
+            return result;
+        List<NameValuePair> nameValuePairs=new ArrayList<NameValuePair>();
+        nameValuePairs.add(new BasicNameValuePair("wt","json"));
+        nameValuePairs.add(new BasicNameValuePair("show","index"));
+        nameValuePairs.add(new BasicNameValuePair("numTerms","0"));
+        nameValuePairs.add(new BasicNameValuePair("_",String.valueOf(System.currentTimeMillis())));
+        String responseBody= HttpTookitUtils.doGet(service+"/"+core+"/admin/luke",nameValuePairs, CharEncoding.UTF8,"application/json");
+        if(StringUtils.isEmpty(responseBody)==false) {
+            ObjectMapper objectMapper = new ObjectMapper();
+            try {
+                result = objectMapper.readValue(responseBody, CoreOverViewResponseEntity.class);
+            } catch (JsonParseException e) {
+                e.printStackTrace();
+            } catch (JsonMappingException e) {
+                e.printStackTrace();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+        return result;
+    }
+}

+ 88 - 0
src/main/java/com/lightinit/hsdataplatform/common/SysContants.java

@@ -0,0 +1,88 @@
+package com.lightinit.hsdataplatform.common;
+
+import java.io.File;
+
+/**
+ * @author WangYao
+ * @date 2018/6/12 14:20
+ * @description 常量类
+ */
+public class SysContants {
+
+    //Property文件路径
+    public static class PropertyFilePath{
+        public final static String CONFIG = "config.properties";
+        public final static String CAS = "cas.properties";
+
+    }
+
+    //属性键
+    public static class PropertyKey{
+        public final static String UPLOAD_FILE_ROOT_DIR = "uploadFileRootDir"; //上传文件存放目录key
+        public final static String UPLOAD_IMAGE_ROOT_DIR = "uploadImageRootDir"; //上传图片存放目录key
+        public final static String IMAGE_CONTEXT_PATH = "imageContextPath"; // 该key用于获取tomcat中配置的用于显示外部目录中图片的Context的Path值
+        public final static String PAAS_PATH = "paasPath"; // 获取paas平台前缀地址
+
+        //新路由规则
+        public final static String NEWGATEWAYPATH = "newGatewayPath"; // 获取新网关前缀地址
+        public final static String APPLICATIONID = "applicationId";
+        public final static String SIGNAPPID = "signAppId" ;
+
+        //短信属性
+        public final static String REGIONID = "regionId" ;
+        public final static String ACCESSKEYID = "accessKeyId" ;
+        public final static String SECRET = "secret" ;
+
+        //接收短信
+        public final static String PHONEPEOPLE = "phonePeople" ;
+
+        //监控网络流量
+        public final static String FLUXURL = "fluxUrl" ;
+        public final static String FLUXTOKEN = "fluxToken" ;
+        public final static String DB = "db" ;
+        public final static String Q = "q" ;
+    }
+
+    //cas属性键
+    public static class CasKey{
+        //登陆
+        public final static String CASSERVICE = "casService";
+        //注销
+        public final static String REDIRECTURL = "redirectUrl";
+    }
+
+    public static class UploadFilePath{
+        public static final String DATA_REGISTER_ROOT_DIR = "DataRegister" + File.separator;
+        public static final String DATA_REGISTER_DATA_DIR = "DataFile" + File.separator;
+        public static final String DATA_REGISTER_DEMO_DIR = "DemoFile" + File.separator;
+        public static final String MICROAPP_REGISTER_ROOT_DIR = "MicroappRegister" + File.separator;
+        public static final String MICROAPP_REGISTER_SCREENSHOT_DIR = "Screenshot" + File.separator;
+        public static final String MICROAPP_PUBLISH_ROOT_DIR = "MicroappPublish" + File.separator;
+        public static final String MICROAPP_PUBLISH_RESOURCE_IMG_DIR = "ResourceImg" + File.separator;
+        public static final String DATA_PUBLISH_ROOT_DIR = "DataPublish" + File.separator;
+        public static final String DATA_PUBLISH_RESOURCE_IMG_DIR = "ResourceImg" + File.separator;
+        public static final String API_PUBLISH_ROOT_DIR = "ApiPublish" + File.separator;
+        public static final String API_PUBLISH_RESOURCE_IMG_DIR = "ResourceImg" + File.separator;
+        public static final String CONSULT_ROOT_DIR = "consult" + File.separator;//咨询
+        public static final String CONSULT_RESOURCE_IMG_DIR = "consultImg" + File.separator;
+        public static final String CONSULT_RESOURCE_VIDEO_DIR = "consultVideo" + File.separator;
+        public static final String RESOURCE_CATELOG_ROOT_DIR = "ResourceCatelog" + File.separator;
+        public static final String RESOURCE_Tag_ROOT_DIR = "ResourceTag" + File.separator;
+        public static final String RESOURCE_CATELOG_IMG_DIR = "CatelogImg" + File.separator;
+        public static final String CONTRACT_ATTACHMENT = "contractAttachment" + File.separator;
+        public static final String CONTRACT_ATTACHMENT_DIR = "contractAtt" + File.separator;
+    }
+
+    /**
+     * 缓存名称
+     */
+    public static class CacheName {
+        public static final String MODULE_ACTION_CACHE = "moduleActionCache";
+        public static final String ROLE_PERMISSION_CACHE = "rolePermissionCache";
+    }
+
+    public static class CacheKey {
+        public static final String LIST = "list";
+    }
+
+}

+ 28 - 0
src/main/java/com/lightinit/hsdataplatform/common/ThriftServerConfig.java

@@ -0,0 +1,28 @@
+package com.lightinit.hsdataplatform.common;
+
+import org.apache.commons.configuration2.Configuration;
+import org.springframework.stereotype.Component;
+
+
+/**
+ * Created by Mr.Yao on 2017/5/9.
+ */
+@Component
+public class ThriftServerConfig {
+    private static String zookeeperhost;
+    private static int zookeeperport;
+
+    static {
+        Configuration configuration = ConfigUtils.getConfiguration("thrift.properties");
+        zookeeperhost=configuration.getString("thrift.zookeeper.host");
+        zookeeperport=configuration.getInt("thrift.zookeeper.port");
+    }
+
+    public String getHost() {
+        return zookeeperhost;
+    }
+
+    public int getPort() {
+        return zookeeperport;
+    }
+}

+ 73 - 0
src/main/java/com/lightinit/hsdataplatform/common/TokenUntils.java

@@ -0,0 +1,73 @@
+package com.lightinit.hsdataplatform.common;
+
+import com.google.gson.Gson;
+import com.lightinit.hsdataplatform.dictionary.DicGitToken;
+import com.lightinit.hsdataplatform.dictionary.DicPaasApi;
+import com.mongodb.util.JSON;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author lidy
+ */
+
+public  class TokenUntils {
+
+    public static  String EXPIRYTIME = "" ;
+
+    public static String STORAGE = "" ;
+
+
+    public static  String getToken(){
+        Date date = new Date(System.currentTimeMillis());
+        long nowTime = date.getTime() ;
+        if (!getSTORAGE().equals("")){
+            long time = Long.valueOf(getEXPIRYTIME()) ;
+            //没过期
+            if (nowTime<time){
+                return getSTORAGE() ;
+            }
+        }
+            Map<String,String> heads = new HashMap<>() ;
+            heads.put("Authorization", DicGitToken.AUTHORIZATION) ;
+            heads.put("Content-Type","application/x-www-form-urlencoded") ;
+            String token = "" ;
+            try {
+                token =  HttpUtil.getToken(DicPaasApi.TOKEN,heads,"application/x-www-form-urlencoded") ;
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+            Gson gson = new Gson();
+            Map<String,Object> str = gson.fromJson(token,Map.class) ;
+            String accessToken = (String) str.get("access_token") ;
+            setSTORAGE(accessToken);
+            Double getTime = (Double) str.get("expires_in");
+            long str1 = getTime.longValue()+nowTime ;
+            setEXPIRYTIME(String.valueOf(str1));
+            return accessToken ;
+    }
+
+    public static  Map<String,String> getHead(){
+        Map<String,String> head = new HashMap<>() ;
+        head.put("Authorization","Bearer "+getToken()) ;
+        return head ;
+    }
+
+    public static String getEXPIRYTIME() {
+        return EXPIRYTIME;
+    }
+
+    public static void setEXPIRYTIME(String EXPIRYTIME) {
+        TokenUntils.EXPIRYTIME = EXPIRYTIME;
+    }
+
+    public static String getSTORAGE() {
+        return STORAGE;
+    }
+
+    public static void setSTORAGE(String STORAGE) {
+        TokenUntils.STORAGE = STORAGE;
+    }
+}

+ 123 - 0
src/main/java/com/lightinit/hsdataplatform/common/TripleDESUtilsPro.java

@@ -0,0 +1,123 @@
+package com.lightinit.hsdataplatform.common;
+
+
+import javax.crypto.Cipher;
+import javax.crypto.SecretKey;
+import javax.crypto.spec.SecretKeySpec;
+import java.io.UnsupportedEncodingException;
+
+/**
+ * Created by Mr.Yao on 2016/1/18.
+ */
+public class TripleDESUtilsPro {
+    private static String encypt_des_key="lantinit.com";
+    private static final String Algorithm = "DESede";  //定义 加密算法,可用 DES,DESede,Blowfish
+    private static final char[] HEX_CHAR= {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
+
+    // 加密字符串
+    public static byte[] encryptMode(byte[] src) {
+        try { // 生成密钥
+            SecretKey deskey = new SecretKeySpec(build3DesKey(encypt_des_key), Algorithm); // 加密
+            Cipher c1 = Cipher.getInstance(Algorithm);
+            c1.init(Cipher.ENCRYPT_MODE, deskey);
+            return c1.doFinal(src);
+        } catch (java.security.NoSuchAlgorithmException e1) {
+            e1.printStackTrace();
+        } catch (javax.crypto.NoSuchPaddingException e2) {
+            e2.printStackTrace();
+        } catch (java.lang.Exception e3) {
+            e3.printStackTrace();
+        }
+        return null;
+    }
+    public static String encryptMode(String src) {
+        try {
+            byte[]decryptByte=encryptMode(src.getBytes("utf-8"));
+            if (decryptByte==null)
+                return "";
+            return byteArrayToString(decryptByte);
+        } catch (UnsupportedEncodingException e) {
+            e.printStackTrace();
+        }
+        return "";
+    }
+    // 解密字符串
+    public static byte[] decryptMode(byte[] src) {
+        try { // 生成密钥
+            SecretKey deskey = new SecretKeySpec(build3DesKey(encypt_des_key), Algorithm); // 解密
+            Cipher c1 = Cipher.getInstance(Algorithm);
+            c1.init(Cipher.DECRYPT_MODE, deskey);
+            return c1.doFinal(src);
+        } catch (java.security.NoSuchAlgorithmException e1) {
+            e1.printStackTrace();
+        } catch (javax.crypto.NoSuchPaddingException e2) {
+            e2.printStackTrace();
+        } catch (java.lang.Exception e3) {
+            e3.printStackTrace();
+        }
+        return null;
+    }
+    public static String decryptMode(String src) {
+        try {
+            byte[]decryptByte=decryptMode(HexString2Bytes(src));
+            if (decryptByte==null)
+                return "";
+            return new String(decryptByte);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return "";
+    }
+    public static String decryptHex(String src){
+        byte[]srcByte=HexString2Bytes(src);
+        byte[]decryptByte=decryptMode(srcByte);
+        if (decryptByte==null)
+            return "";
+        try {
+            return new String(decryptByte,"utf-8");
+        } catch (UnsupportedEncodingException e) {
+            e.printStackTrace();
+        }
+        return "";
+    }
+    public static byte[] HexString2Bytes(String hexstr) {
+        byte[] b = new byte[hexstr.length() / 2];
+        int j = 0;
+        for (int i = 0; i < b.length; i++) {
+            char c0 = hexstr.charAt(j++);
+            char c1 = hexstr.charAt(j++);
+            b[i] = (byte) ((parse(c0) << 4) | parse(c1));
+        }
+        return b;
+    }
+    public static String byteArrayToString(byte[] data){
+        StringBuilder stringBuilder= new StringBuilder();
+        for (int i=0; i<data.length; i++){
+            stringBuilder.append(HEX_CHAR[(data[i] & 0xf0)>>> 4]);
+            stringBuilder.append(HEX_CHAR[(data[i] & 0x0f)]);
+        }
+        return stringBuilder.toString();
+    }
+    private static int parse(char c) {
+        if (c >= 'a')
+            return (c - 'a' + 10) & 0x0f;
+        if (c >= 'A')
+            return (c - 'A' + 10) & 0x0f;
+        return (c - '0') & 0x0f;
+    }
+
+    public static byte[] build3DesKey(String keyStr){
+        byte[] key = new byte[24];    //声明一个24位的字节数组,默认里面都是0
+        try {
+            byte[] temp = keyStr.getBytes("UTF-8");    //将字符串转成字节数组
+            if (key.length > temp.length) {
+                System.arraycopy(temp, 0, key, 0, temp.length);
+            } else {
+                System.arraycopy(temp, 0, key, 0, key.length);
+            }
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+        return key;
+    }
+}

+ 70 - 0
src/main/java/com/lightinit/hsdataplatform/common/UploadFileUtils.java

@@ -0,0 +1,70 @@
+package com.lightinit.hsdataplatform.common;
+
+import org.apache.commons.lang.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.File;
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+/**
+ * @author WangYao
+ * @date 2018/6/13 11:48
+ * @description
+ */
+public class UploadFileUtils {
+
+    private static final Logger logger = LoggerFactory.getLogger(UploadFileUtils.class);
+
+    public static void write(MultipartFile uploadFile, String targetDir) throws IOException {
+        String dataFileName = uploadFile.getOriginalFilename();
+        File dataFilePath = new File(targetDir, dataFileName);
+        //判断路径是否存在,如果不存在就创建一个
+        if (!dataFilePath.getParentFile().exists()) {
+            dataFilePath.getParentFile().mkdirs();
+        }
+        uploadFile.transferTo(new File(targetDir + dataFileName));
+    }
+
+    public static boolean writeUploadFile(MultipartFile dataFile, String relativeDir, String propertieds) {
+        try {
+            String uploadRootDir = ConfigUtils.getConfiguration(SysContants.PropertyFilePath.CONFIG).getString(propertieds);
+            String absoluteDir = uploadRootDir + relativeDir;
+            write(dataFile, absoluteDir);
+        } catch (Exception e) {
+            logger.error(e.getMessage());
+            return false;
+        }
+        return true;
+    }
+
+    public static String buildRelativeDir(String parentDir, String uniqueDir, String childDir){
+        if (!StringUtils.isNotEmpty(uniqueDir)){
+            uniqueDir = GuidGenerator.generate() + File.separator;
+        }
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
+        String dir = (parentDir == null ? "" : parentDir) + uniqueDir + (childDir == null ? "" : childDir) + simpleDateFormat.format(new Date()) + File.separator;
+        return dir;
+    }
+
+    public static String getExistingFileRelativeDir(int removeParentDirs, String existingFilePath, int removeChildDirs){
+        String dir = new File(existingFilePath).getParent();
+        for (int i = 0; i < removeParentDirs; i++) {
+            dir = dir.substring(dir.indexOf(File.separator) + 1, dir.length());
+        }
+        for (int i = 0; i < removeChildDirs; i++) {
+            dir = dir.substring(0, dir.lastIndexOf(File.separator));
+        }
+        dir += File.separator;
+        return dir;
+    }
+
+    public static String getFileNameByPath(String filePath){
+        String fileName = new File(filePath).getName();
+        return fileName;
+    }
+
+}

+ 50 - 0
src/main/java/com/lightinit/hsdataplatform/common/WebUtilsPro.java

@@ -0,0 +1,50 @@
+package com.lightinit.hsdataplatform.common;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.PrintWriter;
+
+/**
+ * Created by Mr.Yao on 2017/4/18.
+ */
+public class WebUtilsPro {
+    public static boolean isAjaxRequest(HttpServletRequest request) {
+        String requestedWith = request.getHeader("x-requested-with");
+        if (requestedWith != null && requestedWith.equalsIgnoreCase("XMLHttpRequest")) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    /**
+     * 发送消息 text/html;charset=utf-8
+     * @param response
+     * @param text
+     * @throws Exception
+     */
+    public static void writeText(HttpServletResponse response, String text) throws Exception {
+        response.setContentType("text/html; charset=utf-8");
+        PrintWriter writer = response.getWriter();
+        writer.print(text);
+        writer.close();
+        response.flushBuffer();
+    }
+
+    /**
+     * 将某个对象转换成json格式并发送到客户端
+     * @param response
+     * @param obj
+     * @throws Exception
+     */
+    public static <T> void  writeJson(HttpServletResponse response, T obj) throws Exception {
+        response.setContentType("application/json; charset=utf-8");
+        PrintWriter writer = response.getWriter();
+        ObjectMapper objectMapper = new ObjectMapper();
+        writer.print(objectMapper.writeValueAsString(obj));
+        writer.close();
+        response.flushBuffer();
+    }
+}

+ 97 - 0
src/main/java/com/lightinit/hsdataplatform/common/ssl/MySecureProtocolSocketFactory.java

@@ -0,0 +1,97 @@
+package com.lightinit.hsdataplatform.common.ssl;
+
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.Socket;
+import java.net.UnknownHostException;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.TrustManager;
+import org.apache.commons.httpclient.ConnectTimeoutException;
+import org.apache.commons.httpclient.HttpClientError;
+import org.apache.commons.httpclient.params.HttpConnectionParams;
+import org.apache.commons.httpclient.protocol.ControllerThreadSocketFactory;
+import org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory;
+
+public class MySecureProtocolSocketFactory implements SecureProtocolSocketFactory {
+
+    //这里添加一个属性,主要目的就是来获取ssl跳过验证
+    private SSLContext sslContext = null;
+    /**
+     * Constructor for MySecureProtocolSocketFactory.
+     */
+    public MySecureProtocolSocketFactory() {
+    }
+    /**
+     * 这个创建一个获取SSLContext的方法,导入MyX509TrustManager进行初始化
+     * @return
+     */
+    private static SSLContext createEasySSLContext() {
+        try {
+            SSLContext context = SSLContext.getInstance("SSL");
+            context.init(null, new TrustManager[] { new MyX509TrustManager() },
+                    null);
+            return context;
+        } catch (Exception e) {
+            throw new HttpClientError(e.toString());
+        }
+    }
+
+    /**
+     * 判断获取SSLContext
+     * @return
+     */
+    private SSLContext getSSLContext() {
+        if (this.sslContext == null) {
+            this.sslContext = createEasySSLContext();
+        }
+        return this.sslContext;
+    }
+    //后面的方法基本上就是带入相关参数就可以了
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.commons.httpclient.protocol.ProtocolSocketFactory#createSocket(java.lang.String,
+     *      int, java.net.InetAddress, int)
+     */
+    public Socket createSocket(String host, int port, InetAddress clientHost,int clientPort) throws IOException, UnknownHostException {
+        return getSSLContext().getSocketFactory().createSocket(host, port,clientHost, clientPort);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.apache.commons.httpclient.protocol.ProtocolSocketFactory#createSocket(java.lang.String,
+     *      int, java.net.InetAddress, int,
+     *      org.apache.commons.httpclient.params.HttpConnectionParams)
+     */
+    public Socket createSocket(final String host, final int port,final InetAddress localAddress, final int localPort,
+                               final HttpConnectionParams params) throws IOException,UnknownHostException, ConnectTimeoutException {
+        if (params == null) {
+            throw new IllegalArgumentException("Parameters may not be null");
+        }
+        int timeout = params.getConnectionTimeout();
+        if (timeout == 0) {
+            return createSocket(host, port, localAddress, localPort);
+        } else {
+            return ControllerThreadSocketFactory.createSocket(this, host, port,localAddress, localPort, timeout);
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see SecureProtocolSocketFactory#createSocket(java.lang.String,int)
+     */
+    public Socket createSocket(String host, int port) throws IOException,UnknownHostException {
+        return getSSLContext().getSocketFactory().createSocket(host, port);
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see SecureProtocolSocketFactory#createSocket(java.net.Socket,java.lang.String,int,boolean)
+     */
+    public Socket createSocket(Socket socket, String host, int port,boolean autoClose) throws IOException, UnknownHostException {
+        return getSSLContext().getSocketFactory().createSocket(socket, host,port, autoClose);
+    }
+}

+ 28 - 0
src/main/java/com/lightinit/hsdataplatform/common/ssl/MyX509TrustManager.java

@@ -0,0 +1,28 @@
+package com.lightinit.hsdataplatform.common.ssl;
+
+import java.security.cert.CertificateException;
+import java.security.cert.X509Certificate;
+import javax.net.ssl.X509TrustManager;
+
+public class MyX509TrustManager implements X509TrustManager {
+    /* (non-Javadoc)
+     * @see javax.net.ssl.X509TrustManager#checkClientTrusted(java.security.cert.X509Certificate[], java.lang.String)
+     */
+    public void checkClientTrusted(X509Certificate[] arg0, String arg1)
+            throws CertificateException {
+
+    }
+    /* (non-Javadoc)
+     * @see javax.net.ssl.X509TrustManager#checkServerTrusted(java.security.cert.X509Certificate[], java.lang.String)
+     */
+    public void checkServerTrusted(X509Certificate[] arg0, String arg1)
+            throws CertificateException {
+
+    }
+    /* (non-Javadoc)
+     * @see javax.net.ssl.X509TrustManager#getAcceptedIssuers()
+     */
+    public X509Certificate[] getAcceptedIssuers() {
+        return null;
+    }
+}

+ 210 - 0
src/main/java/com/lightinit/hsdataplatform/controller/ActiveMQController.java

@@ -0,0 +1,210 @@
+package com.lightinit.hsdataplatform.controller;
+
+import com.lightinit.hsdataplatform.common.CharEncoding;
+import com.lightinit.hsdataplatform.common.HttpTookitUtils;
+import com.lightinit.hsdataplatform.common.TripleDESUtilsPro;
+import com.lightinit.hsdataplatform.json.pojo.BrokerEntity;
+import com.lightinit.hsdataplatform.json.pojo.BrokerMessageEntity;
+import com.lightinit.hsdataplatform.json.pojo.JsonResult;
+import com.lightinit.hsdataplatform.json.pojo.ListResult;
+import com.lightinit.hsdataplatform.json.pojo.actviemq.BrokerBrowseRequest;
+import com.lightinit.hsdataplatform.json.pojo.actviemq.ObjectViewBeanRequest;
+import com.lightinit.hsdataplatform.json.pojo.actviemq.QueuesBrowsRequest;
+import com.lightinit.hsdataplatform.json.pojo.actviemq.RequestValueEntity;
+import com.lightinit.hsdataplatform.entity.Queueserver;
+import com.lightinit.hsdataplatform.service.IActiveMQService;
+import org.codehaus.jackson.JsonParseException;
+import org.codehaus.jackson.map.JsonMappingException;
+import org.codehaus.jackson.map.ObjectMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.util.StringUtils;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Created by Mr.Yao on 2017/12/5.
+ */
+@Controller
+@RequestMapping("/activemq")
+public class ActiveMQController {
+    @Autowired
+    private IActiveMQService activeMQService;
+    @RequestMapping(value = "view/broker.action",method = RequestMethod.GET)
+    public String print_activemq_view_broker(){
+        return "activemq/server";
+    }
+
+    @ResponseBody
+    @RequestMapping(value = "json/server.action",method = RequestMethod.GET)
+    public ListResult<Queueserver> print_JSON_ActiveMQ_Server(@RequestParam(defaultValue = "") String host) {
+        ListResult<Queueserver> result = new ListResult<Queueserver>();
+        result.setRows(activeMQService.queryServer(host));
+        if (result.getRows()!=null){
+            result.setTotal(result.getRows().size());
+        }else{
+            result.setTotal(0);
+        }
+        return result;
+    }
+    @ResponseBody
+    @RequestMapping(value = "json/broker.action",method = RequestMethod.GET)
+    public ListResult<BrokerEntity> print_JSON_ActiveMQBroker(@RequestParam(defaultValue = "localhost") String host, @RequestParam(defaultValue = "8161") int port, @RequestParam(defaultValue = "localhost") String broker, @RequestParam(defaultValue = "") String token){
+        ListResult<BrokerEntity> result=new ListResult<BrokerEntity>();
+        if(StringUtils.isEmpty(host) || host.equalsIgnoreCase("localhost"))
+            return result;
+        // TODO: 2017/12/29 利用RESTful接口获取数据
+        try {
+            if(StringUtils.isEmpty(token)==false){
+                token= TripleDESUtilsPro.decryptMode(token)+"@";
+            }
+            List<BrokerEntity> brokeList=new ArrayList<BrokerEntity>();
+            String brokerUrl=String.format("http://%s%s:%d/api/jolokia/read/org.apache.activemq:type=Broker,brokerName=%s/Queues",token, host, port,broker);
+            String responseBody= HttpTookitUtils.doGet(brokerUrl,null, CharEncoding.UTF8,"application/json");
+            ObjectMapper objectMapper = new ObjectMapper();
+            QueuesBrowsRequest itemList = objectMapper.readValue(responseBody, QueuesBrowsRequest.class);
+            if(itemList!=null && itemList.getValue()!=null) {
+                for (Map<String,String> mapObj : itemList.getValue()) {
+                    if(mapObj.containsKey("objectName") && mapObj.get("objectName")!=null) {
+                        String objectName = mapObj.get("objectName");
+                        if (StringUtils.isEmpty(objectName)==false) {
+                            BrokerEntity item = new BrokerEntity();
+                            String beanName = objectName.replace("org.apache.activemq:", "");
+                            String[] objectItemList = beanName.split(",");
+                            if (objectItemList != null && objectItemList.length > 0) {
+                                for (String _obj : objectItemList) {
+                                    if (_obj.startsWith("brokerName=")) {
+
+                                    } else if (_obj.startsWith("destinationName=")) {
+                                        item.setName(_obj.replace("destinationName=", ""));
+                                    } else if (_obj.startsWith("destinationType=")) {
+
+                                    } else if (_obj.startsWith("type=")) {
+
+                                    }
+                                }
+                            }
+                            String objectViewRequestUrl = String.format("http://%s%s:%d/api/jolokia/read/%s",token, host, port, objectName);
+                            String objectViewResponseBody = HttpTookitUtils.doGet(objectViewRequestUrl, null, CharEncoding.UTF8, "application/json");
+                            ObjectViewBeanRequest objectViewBeanList = objectMapper.readValue(objectViewResponseBody, ObjectViewBeanRequest.class);
+                            if (objectViewBeanList != null && objectViewBeanList.getValue() != null) {
+                                Object mQueueSize = objectViewBeanList.getValue().get("QueueSize");
+                                if (mQueueSize != null) {
+                                    item.setSize(Long.valueOf(mQueueSize.toString()));
+                                }
+                                Object mConsumers = objectViewBeanList.getValue().get("ConsumerCount");
+                                if (mConsumers != null) {
+                                    item.setConsumers(Long.valueOf(mConsumers.toString()));
+                                }
+                                Object mEnqueue = objectViewBeanList.getValue().get("EnqueueCount");
+                                if (mEnqueue != null) {
+                                    item.setEnqueue(Long.valueOf(mEnqueue.toString()));
+                                }
+                                Object mDequeue = objectViewBeanList.getValue().get("DequeueCount");
+                                if (mDequeue != null) {
+                                    item.setDequeue(Long.valueOf(mDequeue.toString()));
+                                }
+                                brokeList.add(item);
+                            }
+                        }
+                    }
+                }
+            }
+            result.setTotal(brokeList.size());
+            result.setRows(brokeList);
+        } catch (MalformedURLException e) {
+            e.printStackTrace();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        return result;
+    }
+    @ResponseBody
+    @RequestMapping(value = "json/broker/destination.action",method = RequestMethod.GET)
+    public ListResult<BrokerMessageEntity> print_JSON_ActiveMQBroker_Destination(@RequestParam(defaultValue = "localhost") String host, @RequestParam(defaultValue = "8161") int port, @RequestParam(defaultValue = "localhost") String broker, @RequestParam(defaultValue = "") String queue, @RequestParam(defaultValue = "") String token) {
+        ListResult<BrokerMessageEntity> result = new ListResult<BrokerMessageEntity>();
+        if (StringUtils.isEmpty(host) || host.equalsIgnoreCase("localhost") || StringUtils.isEmpty(queue))
+            return result;
+        try {
+            if(StringUtils.isEmpty(token)==false){
+                token= TripleDESUtilsPro.decryptMode(token)+"@";
+            }
+            List<BrokerMessageEntity> brokeList = new ArrayList<BrokerMessageEntity>();
+            // TODO: 2017/12/29 RESTful获取队列消息
+            String brokerUrl=String.format("http://%s%s:%d/api/jolokia/exec/org.apache.activemq:type=Broker,brokerName=%s,destinationType=Queue,destinationName=%s/browse()/",token, host, port,broker,queue);
+            String responseBody= HttpTookitUtils.doGet(brokerUrl,null, CharEncoding.UTF8,"application/json");
+            ObjectMapper objectMapper = new ObjectMapper();
+            BrokerBrowseRequest itemList = objectMapper.readValue(responseBody, BrokerBrowseRequest.class);
+            if(itemList!=null && itemList.getValue()!=null){
+                for (RequestValueEntity item:itemList.getValue()) {
+                    BrokerMessageEntity _item = new BrokerMessageEntity();
+                    if (item.getJMSMessageID() != null) {
+                        _item.setMessageid(item.getJMSMessageID());
+                    }
+                    if (item.getJMSCorrelationID() != null) {
+                        _item.setCorrelationid(item.getJMSCorrelationID());
+                    }
+                    _item.setPriority(String.valueOf(item.getJMSPriority()));
+                    _item.setRedelivered(String.valueOf(item.isJMSRedelivered()));
+                    if (item.getJMSReplyTo() != null) {
+                        _item.setReplyto(item.getJMSReplyTo());
+                    }
+                    if (item.getJMSTimestamp() != null) {
+                        _item.setTimestamp(item.getJMSTimestamp());
+                    }
+                    if (item.getJMSType()!= null) {
+                        _item.setType(item.getJMSType());
+                    }
+                    if (item.getText() != null) {
+                        _item.setMessage(item.getText());
+                    }
+                    brokeList.add(_item);
+                }
+            }
+            result.setTotal(brokeList.size());
+            result.setRows(brokeList);
+        } catch (MalformedURLException e) {
+            e.printStackTrace();
+        } catch (JsonParseException e) {
+            e.printStackTrace();
+        } catch (JsonMappingException e) {
+            e.printStackTrace();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        return result;
+    }
+
+
+    @ResponseBody
+    @RequestMapping(value = "json/message/delete.action",method = RequestMethod.GET)
+    public JsonResult print_JSON_ActiveMQBroker_Message_Delete(@RequestParam(defaultValue = "localhost") String host, @RequestParam(defaultValue = "8161") int port, @RequestParam(defaultValue = "localhost") String broker, @RequestParam(defaultValue = "") String queue, @RequestParam(defaultValue = "") String token, @RequestParam(defaultValue = "") String message) {
+        JsonResult result = new JsonResult();
+        if (StringUtils.isEmpty(host) || host.equalsIgnoreCase("localhost") || StringUtils.isEmpty(queue) || StringUtils.isEmpty(message)) {
+            result.setMessage("非法请求!");
+            result.setStatus(0);
+            return result;
+        }
+        try {
+            if(StringUtils.isEmpty(token)==false){
+                token= TripleDESUtilsPro.decryptMode(token)+"@";
+            }
+            String brokerUrl=String.format("http://%s%s:%d/api/jolokia/exec/org.apache.activemq:type=Broker,brokerName=%s,destinationType=Queue,destinationName=%s/removeMatchingMessages(java.lang.String)/JMSMessageID='%s'",token, host, port,broker,queue,message);
+            String responseBody= HttpTookitUtils.doGet(brokerUrl,null, CharEncoding.UTF8,"application/json");
+            System.out.println(responseBody);
+            result.setMessage("删除成功!");
+            result.setStatus(1);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return result;
+    }
+}

+ 74 - 0
src/main/java/com/lightinit/hsdataplatform/controller/BaseController.java

@@ -0,0 +1,74 @@
+package com.lightinit.hsdataplatform.controller;
+
+import com.lightinit.hsdataplatform.common.WebUtilsPro;
+import com.lightinit.hsdataplatform.json.pojo.ErrorEntity;
+import com.lightinit.hsdataplatform.json.pojo.LoginResult;
+import org.apache.shiro.authc.AuthenticationException;
+import org.apache.shiro.authz.AuthorizationException;
+import org.apache.shiro.authz.UnauthenticatedException;
+import org.apache.shiro.authz.UnauthorizedException;
+import org.codehaus.jackson.map.ObjectMapper;
+import org.springframework.web.bind.annotation.ExceptionHandler;
+import org.springframework.web.servlet.view.InternalResourceViewResolver;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.PrintWriter;
+
+/**
+ * Created by Mr.Yao on 2017/4/18.
+ */
+public abstract class BaseController
+{
+    /***
+     * 登录异常返回信息
+     * @param request 输入
+     * @param response 输出
+     * @return AJAX返回JSON数据格式 浏览器访问返回HTML格式
+     */
+    @ExceptionHandler({UnauthenticatedException.class,AuthenticationException.class})
+    public String authenticationException(HttpServletRequest request, HttpServletResponse response){
+        if(WebUtilsPro.isAjaxRequest(request)){
+            LoginResult loginResult=new LoginResult();
+            loginResult.setStatus(2008);
+            loginResult.setMessage(ErrorEntity.getMsg(loginResult.getStatus()));
+            writeJson(loginResult,response);
+            return null;
+        }else{
+            return InternalResourceViewResolver.REDIRECT_URL_PREFIX+"/passport/login.htm";
+        }
+    }
+
+    /***
+     * 授权异常返回信息
+     * @param request 输入
+     * @param response 输出
+     * @return AJAX返回JSON数据格式 浏览器访问返回HTML格式
+     */
+    @ExceptionHandler({ UnauthorizedException.class, AuthorizationException.class })
+    public String authorizationException(HttpServletRequest request, HttpServletResponse response) {
+        if (WebUtilsPro.isAjaxRequest(request)) {
+            LoginResult loginResult=new LoginResult();
+            loginResult.setStatus(2009);
+            loginResult.setMessage(ErrorEntity.getMsg(loginResult.getStatus()));
+            writeJson(loginResult,response);
+            return null;
+        } else {
+            return InternalResourceViewResolver.REDIRECT_URL_PREFIX+"/403.html";
+        }
+    }
+    private void writeJson(LoginResult result,HttpServletResponse response){
+        PrintWriter out=null;
+        try{
+            response.setContentType("application/json; charset=utf-8");
+            out = response.getWriter();
+            ObjectMapper objectMapper = new ObjectMapper();
+            out.write(objectMapper.writeValueAsString(result));
+        }catch (Exception e){
+            e.printStackTrace();
+        }finally {
+            if(out!=null)
+                out.close();
+        }
+    }
+}

+ 57 - 0
src/main/java/com/lightinit/hsdataplatform/controller/CacheController.java

@@ -0,0 +1,57 @@
+package com.lightinit.hsdataplatform.controller;
+
+import com.lightinit.hsdataplatform.json.pojo.JsonResult;
+import com.lightinit.hsdataplatform.json.pojo.ListResult;
+import com.lightinit.hsdataplatform.entity.Cacheserver;
+import com.lightinit.hsdataplatform.service.ICacheServerService;
+import com.lightinit.hsdataplatform.service.IRedisService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.*;
+import redis.clients.jedis.Jedis;
+
+/**
+ * Created by Mr.Yao on 2017/4/13.
+ */
+@Controller
+@RequestMapping("/cache")
+public class CacheController {
+    @Autowired
+    private IRedisService redisService;
+
+    @Autowired
+    private ICacheServerService cacheServerService;
+
+    @RequestMapping(value ="view/profile.action",method = RequestMethod.GET)
+    public String print_view_cache_list(){
+        return "cache/cacheserver";
+    }
+    @ResponseBody
+    @RequestMapping(value = "json/list.action",method = RequestMethod.GET)
+    public ListResult<Cacheserver> print_json_cache_server_list(@RequestParam(defaultValue = "1") int page, @RequestParam(defaultValue = "10") int rows){
+        ListResult<Cacheserver> result=new ListResult<Cacheserver>();
+        result.setTotal(cacheServerService.QueryCount(null,""));
+        result.setRows(cacheServerService.QueryList(null,"",page,rows));
+        return result;
+    }
+    @ResponseBody
+    @RequestMapping(value = "json/cache.action",method = RequestMethod.GET)
+    public JsonResult print_json_cache_value(@RequestParam String ip, @RequestParam(defaultValue = "0") int type, @RequestParam String key){
+        JsonResult result=new JsonResult();
+        switch (type){
+            case 0:
+                Jedis jedis = new Jedis(ip);
+                if(jedis.exists(key))
+                    result.setMessage(jedis.get(key));
+                else
+                    result.setMessage("当前键值缓存不存在!");
+                break;
+            case 1:
+                break;
+            case 2:
+                break;
+        }
+        result.setStatus(1);
+        return result;
+    }
+}

+ 94 - 0
src/main/java/com/lightinit/hsdataplatform/controller/CaptchaController.java

@@ -0,0 +1,94 @@
+package com.lightinit.hsdataplatform.controller;
+
+import com.google.code.kaptcha.Constants;
+import com.google.code.kaptcha.Producer;
+import com.google.zxing.BarcodeFormat;
+import com.google.zxing.WriterException;
+import com.google.zxing.client.j2se.MatrixToImageWriter;
+import com.google.zxing.common.BitMatrix;
+import com.google.zxing.qrcode.QRCodeWriter;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.util.StringUtils;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.imageio.ImageIO;
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.awt.image.BufferedImage;
+import java.io.IOException;
+
+/**
+ * Created by Mr.Yao on 2017/4/11.
+ */
+@Controller
+@RequestMapping(value = "/captcha")
+public class CaptchaController {
+
+    @Autowired
+    private Producer captchaProducer;
+
+    @RequestMapping(value = "/image.action", method = RequestMethod.GET)
+    public ModelAndView getCaptchaImage(Model model, HttpServletRequest request, HttpServletResponse response, @RequestParam(value = "timestamp", required = false) String timestamp) throws IOException {
+        if (StringUtils.isEmpty(timestamp)) {
+            model.addAttribute("timestamp", System.currentTimeMillis());
+        } else {
+            model.addAttribute("timestamp", timestamp);
+        }
+
+        response.setDateHeader("Expires", 0);
+        response.setHeader("Cache-Control", "no-store, no-cache, must-revalidate");
+        response.addHeader("Cache-Control", "post-check=0, pre-check=0");
+        response.setHeader("Pragma", "no-cache");
+        response.setContentType("image/jpeg");
+        String capText = captchaProducer.createText();
+
+        request.getSession().setAttribute(Constants.KAPTCHA_SESSION_KEY, capText);
+        BufferedImage bi = captchaProducer.createImage(capText);
+        ServletOutputStream out = response.getOutputStream();
+        ImageIO.write(bi, "jpg", out);
+        try {
+            out.flush();
+        } finally {
+            out.close();
+        }
+        return null;
+    }
+    @RequestMapping(value = "/qrcode.action", method = RequestMethod.GET)
+    public ModelAndView getQRCodeImage(Model model, HttpServletRequest request, HttpServletResponse response, @RequestParam(value = "timestamp", required = false) String timestamp) throws IOException {
+        if (StringUtils.isEmpty(timestamp)) {
+            model.addAttribute("timestamp", System.currentTimeMillis());
+        } else {
+            model.addAttribute("timestamp", timestamp);
+        }
+
+        response.setDateHeader("Expires", 0);
+        response.setHeader("Cache-Control", "no-store, no-cache, must-revalidate");
+        response.addHeader("Cache-Control", "post-check=0, pre-check=0");
+        response.setHeader("Pragma", "no-cache");
+        response.setContentType("image/png");
+        String qrCodeText = captchaProducer.createText();
+        ServletOutputStream out = null;
+        QRCodeWriter writer=new QRCodeWriter();
+        int width=200;
+        int height=200;
+        BitMatrix m= null;
+        try {
+            out = response.getOutputStream();
+            m = writer.encode(qrCodeText, BarcodeFormat.QR_CODE, height,width);
+            MatrixToImageWriter.writeToStream(m, "png", out);
+            out.flush();
+        } catch (WriterException e) {
+            e.printStackTrace();
+        }finally {
+            if (out != null)
+                out.close();
+        }
+        return null;
+    }
+}

+ 16 - 0
src/main/java/com/lightinit/hsdataplatform/controller/GrantController.java

@@ -0,0 +1,16 @@
+package com.lightinit.hsdataplatform.controller;
+
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+/**
+ * Created by Mr.Yao on 2017/4/26.
+ */
+@Controller
+@RequestMapping("/grant")
+public class GrantController {
+    @RequestMapping(value = "view/list.action")
+    public String print_user_grant_list(){
+        return "grant/grant";
+    }
+}

+ 43 - 0
src/main/java/com/lightinit/hsdataplatform/controller/HomeController.java

@@ -0,0 +1,43 @@
+package com.lightinit.hsdataplatform.controller;
+import com.lightinit.hsdataplatform.common.ConfigUtils;
+import com.lightinit.hsdataplatform.common.DateUtils;
+import com.lightinit.hsdataplatform.common.SysContants;
+import org.apache.shiro.SecurityUtils;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Date;
+
+/**
+ * Created by Mr.Yao on 2017/3/22.
+ */
+@Controller
+public class HomeController {
+    @RequestMapping(method = RequestMethod.GET)
+    public String printWelcome(ModelMap model, HttpServletRequest request) {
+       if (SecurityUtils.getSubject().isAuthenticated()){
+           return "admin/home/index" ;
+       }else {
+           String casservice = ConfigUtils.getConfiguration(SysContants.PropertyFilePath.CAS).getString(SysContants.CasKey.CASSERVICE) ;
+           return "redirect:"+casservice;
+       }
+//        return "index";
+//        return  "admin/account/login";
+
+    }
+    @RequestMapping(value = "main.action",method = RequestMethod.GET)
+    public String printMain(ModelMap model) {
+        String begin= DateUtils.weekBeginDate(new Date());
+        String end=DateUtils.weekEndDate(new Date());
+        int year=DateUtils.YearOfDate();
+        int month=DateUtils.MonthOfDate();
+        model.addAttribute("mbegin",begin);
+        model.addAttribute("mend",end);
+        model.addAttribute("myear",year);
+        model.addAttribute("mmonth",month);
+        return "main";
+    }
+}

+ 46 - 0
src/main/java/com/lightinit/hsdataplatform/controller/LogController.java

@@ -0,0 +1,46 @@
+package com.lightinit.hsdataplatform.controller;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import com.lightinit.hsdataplatform.json.pojo.ListResult;
+import com.lightinit.hsdataplatform.entity.MTLogInfo;
+import com.lightinit.hsdataplatform.service.IMTLogService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+/**
+ * Created by Mr.Yao on 2017/4/27.
+ */
+@Controller
+@RequestMapping("/log")
+public class LogController {
+    @Autowired
+    private IMTLogService logService;
+
+    @RequestMapping(value = "view/mtlog.action", method = RequestMethod.GET)
+    public String print_log_mtlog() {
+        return "log/mtlog";
+    }
+
+    @ResponseBody
+    @RequestMapping(value = "json/mtlogs.action", method = RequestMethod.GET)
+    public ListResult<MTLogInfo> GetLogs(@RequestParam(required = false, defaultValue = "") String dateStr, @RequestParam(required = false, defaultValue = "") String keywords, @RequestParam(required = false, defaultValue = "1") int page, @RequestParam(required = false, defaultValue = "10") int rows) {
+        ListResult<MTLogInfo> result = new ListResult<MTLogInfo>();
+        if (dateStr.isEmpty()||dateStr=="") {
+            SimpleDateFormat df = new SimpleDateFormat("yyyyMMdd");
+            try {
+                dateStr=df.format(new Date());
+            } catch (Exception e) {
+            }
+            System.out.print(dateStr + "\r\n");
+        }
+        /*result.setRows(logService.QueryLogList(dateStr, keywords, page, rows));
+        result.setTotal(logService.QueryLogCount(dateStr, keywords));*/
+        return result;
+    }
+}

+ 100 - 0
src/main/java/com/lightinit/hsdataplatform/controller/LoginController.java

@@ -0,0 +1,100 @@
+package com.lightinit.hsdataplatform.controller;
+
+import com.lightinit.hsdataplatform.json.pojo.ErrorEntity;
+import com.google.code.kaptcha.Constants;
+import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.authc.*;
+import org.apache.shiro.subject.Subject;
+import org.springframework.stereotype.Controller;
+import com.lightinit.hsdataplatform.json.pojo.LoginResult;
+import org.springframework.ui.ModelMap;
+import org.springframework.util.StringUtils;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+/**
+ * Created by Mr.Yao on 2017/4/7.
+ */
+@Controller
+@RequestMapping("/passport")
+public class LoginController {
+
+    @RequestMapping(value = {"login.htm", "login"},method = RequestMethod.GET)
+    public String printMain(ModelMap model) {
+        return "index";
+    }
+    @ResponseBody
+    @RequestMapping(method = RequestMethod.POST,value = "login.action")
+    public  LoginResult printLoginAction(ModelMap model,HttpSession session, @RequestParam String username,@RequestParam String password,@RequestParam String captcha){
+        LoginResult result = new LoginResult();
+       String capText=session.getAttribute(Constants.KAPTCHA_SESSION_KEY)!=null?session.getAttribute(Constants.KAPTCHA_SESSION_KEY).toString():"";
+        if(StringUtils.isEmpty(capText) || StringUtils.isEmpty(captcha)){
+            result.setStatus(0003);
+        }else if (capText.equalsIgnoreCase(captcha)==false){
+            result.setStatus(2010);
+        }else {
+            UsernamePasswordToken token = new UsernamePasswordToken(username, password);
+            Subject currentUser = SecurityUtils.getSubject();
+            //token.setRememberMe(true);
+            try {
+                //在调用了login方法后,SecurityManager会收到AuthenticationToken,并将其发送给已配置的Realm执行必须的认证检查
+                currentUser.login(token);
+                if (currentUser.isAuthenticated()) {
+                    session.setAttribute("userinfo", username);
+                    result.setStatus(2001);
+                } else {
+                    token.clear();
+                }
+            } catch (UnknownAccountException uae) {
+                result.setStatus(2003);
+                token.clear();
+            } catch (IncorrectCredentialsException ice) {
+                result.setStatus(2004);
+                token.clear();
+            } catch (LockedAccountException lae) {
+                result.setStatus(2005);
+                token.clear();
+            } catch (ExcessiveAttemptsException eae) {
+                result.setStatus(2006);
+                token.clear();
+            } catch (AuthenticationException ae) {
+                //通过处理Shiro的运行时AuthenticationException就可以控制用户登录失败或密码错误时的情景
+                result.setStatus(2007);
+            }
+        }
+        result.setMessage(ErrorEntity.getMsg(result.getStatus()));
+        return result;
+    }
+    @ResponseBody
+    @RequestMapping(method = RequestMethod.POST,value = "logout.action")
+    public  LoginResult printLogoutAction(ModelMap model,HttpSession session){
+        LoginResult result = new LoginResult();
+        Subject currentUser = SecurityUtils.getSubject();
+        try {
+            currentUser.logout();
+            result.setStatus(2008);
+        } catch (Exception e) {
+            result.setStatus(0003);
+        }
+        result.setMessage(ErrorEntity.getMsg(result.getStatus()));
+        return result;
+    }
+    @ResponseBody
+    @RequestMapping(method = RequestMethod.GET,value = "auth.action")
+    public ModelAndView printAuthAction(ModelMap model, HttpServletRequest request, HttpServletResponse response,@CookieValue(defaultValue = "") String username){
+        try {
+           if(StringUtils.isEmpty(username)){
+               response.setStatus(401);
+           }else{
+               response.setStatus(200);
+           }
+        } catch (Exception e) {
+            response.setStatus(401);
+        }
+        return null;
+    }
+}

+ 81 - 0
src/main/java/com/lightinit/hsdataplatform/controller/MenuController.java

@@ -0,0 +1,81 @@
+package com.lightinit.hsdataplatform.controller;
+
+import com.lightinit.hsdataplatform.common.MenuUtils;
+import com.lightinit.hsdataplatform.common.PermissionUtilsPro;
+import com.lightinit.hsdataplatform.entity.Menu;
+import com.lightinit.hsdataplatform.entity.MenuDataEntity;
+import com.lightinit.hsdataplatform.entity.RoleModule;
+import com.lightinit.hsdataplatform.service.IMenuService;
+import com.lightinit.hsdataplatform.service.IRoleService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Created by Mr.Yao on 2017/4/10.
+ */
+@Controller
+@RequestMapping("/menu")
+public class MenuController {
+    @Autowired
+    private IMenuService menuService;
+    @Autowired
+    private PermissionUtilsPro permissionUtilsPro;
+    @Autowired
+    private IRoleService roleService;
+
+    @RequestMapping(value = "view/list.action")
+    public String print_menu_view_list(){
+        return "menu/module";
+    }
+
+    @ResponseBody
+    @RequestMapping(value = "list.action",method = RequestMethod.GET)
+    public List<MenuDataEntity> print_Json_Menu(){
+        List<MenuDataEntity> list=new ArrayList<MenuDataEntity>();
+        if(permissionUtilsPro.IsSuperPermission()) {
+            list.addAll(MenuUtils.InitSystemTopMenu());
+        }
+        List<Menu> menuList=new ArrayList<Menu>();
+        List<RoleModule> roleModuleList=new ArrayList<RoleModule>();
+        if(permissionUtilsPro.IsSuperPermission()) {
+            menuList=menuService.QueryList(1,0,null);
+        }else{
+            menuList=menuService.QueryList(permissionUtilsPro.CurrentName());
+            roleModuleList=roleService.QueryUserModuleList(permissionUtilsPro.CurrentName());
+        }
+        for (Menu item:menuList) {
+            MenuDataEntity _item= MenuUtils.MenuConverter(item,roleModuleList,permissionUtilsPro.IsSuperPermission());
+            if(_item!=null)
+                list.add(_item);
+        }
+        list.addAll(MenuUtils.InitSystemBottomMenu());
+        return list;
+    }
+    @ResponseBody
+    @RequestMapping(value = "json/module/list.action",method = RequestMethod.GET)
+    public List<Menu> print_Json_Module_Menu() {
+        List<Menu> list = new ArrayList<Menu>();
+        List<MenuDataEntity> topList = MenuUtils.InitSystemTopMenu();
+        for (MenuDataEntity topItem:topList) {
+            Menu _topMenuItem = MenuUtils.MenuDataConverter(topItem);
+            if (_topMenuItem != null)
+                list.add(_topMenuItem);
+        }
+        List<Menu> centerList = menuService.QueryList(1, 1000, null);
+        if (centerList != null && centerList.size() > 0)
+            list.addAll(centerList);
+        List<MenuDataEntity> bottomList = MenuUtils.InitSystemBottomMenu();
+        for (MenuDataEntity bottomItem:bottomList) {
+            Menu _bottomMenuItem = MenuUtils.MenuDataConverter(bottomItem);
+            if (_bottomMenuItem != null)
+                list.add(_bottomMenuItem);
+        }
+        return list;
+    }
+}

+ 218 - 0
src/main/java/com/lightinit/hsdataplatform/controller/RoleController.java

@@ -0,0 +1,218 @@
+package com.lightinit.hsdataplatform.controller;
+
+import com.lightinit.hsdataplatform.common.MenuUtils;
+import com.lightinit.hsdataplatform.common.RoleComboUtils;
+import com.lightinit.hsdataplatform.common.RoleModulesUtilsPro;
+import com.lightinit.hsdataplatform.json.pojo.JsonResult;
+import com.lightinit.hsdataplatform.json.pojo.ListResult;
+import com.lightinit.hsdataplatform.json.pojo.RoleComboEntity;
+import com.lightinit.hsdataplatform.entity.Menu;
+import com.lightinit.hsdataplatform.entity.MenuDataEntity;
+import com.lightinit.hsdataplatform.entity.RoleModule;
+import com.lightinit.hsdataplatform.entity.SentryRole;
+import com.lightinit.hsdataplatform.service.IMenuService;
+import com.lightinit.hsdataplatform.service.IRoleService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.util.StringUtils;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Created by Mr.Yao on 2017/4/24.
+ */
+@Controller
+@RequestMapping("/role")
+public class RoleController {
+    @Autowired
+    private IRoleService roleService;
+    @Autowired
+    private RoleModulesUtilsPro roleModulesUtilsPro;
+    @Autowired
+    private IMenuService menuService;
+
+    @RequestMapping(value = "view/list.action")
+    public String print_role_view_list(){
+        return "role/role";
+    }
+
+    @ResponseBody
+    @RequestMapping(value = "json/list.action",method = RequestMethod.GET)
+    public ListResult<SentryRole> print_Json_Role(@RequestParam(defaultValue = "1") int page, @RequestParam(defaultValue = "10") int rows){
+        ListResult<SentryRole> result=new ListResult<SentryRole>();
+        result.setTotal(roleService.QueryCount(null));
+        result.setRows(roleService.QueryList(page,rows,null));
+        return result;
+    }
+
+    @ResponseBody
+    @RequestMapping(value = "json/combox/list.action",method = RequestMethod.GET)
+    public List<RoleComboEntity> print_Json_Combox_Role(@RequestParam(defaultValue = "1") int page, @RequestParam(defaultValue = "10") int rows, @RequestParam(defaultValue = "true") boolean combox){
+        List<RoleComboEntity> result=new ArrayList<RoleComboEntity>();
+        List<SentryRole> list=roleService.QueryList(page,rows,null);
+        if(combox) {
+            RoleComboEntity tipEntity = new RoleComboEntity();
+            tipEntity.setId(-1L);
+            tipEntity.setText("-请选择-");
+            tipEntity.setChildren(null);
+            tipEntity.setIconCls("fi-page");
+            result.add(tipEntity);
+        }
+        if (list!=null){
+            for (SentryRole item:list){
+                result.add(RoleComboUtils.RoleComboxConverter(item));
+            }
+        }
+        return result;
+    }
+
+    @ResponseBody
+    @RequestMapping(value = "menu/list.action",method = RequestMethod.GET)
+    public List<MenuDataEntity> print_Json_Menu_Role(@RequestParam(defaultValue = "0") long role){
+        List<MenuDataEntity> resultList=new ArrayList<MenuDataEntity>();
+        List<MenuDataEntity> list=new ArrayList<MenuDataEntity>();
+        list.addAll(MenuUtils.InitSystemTopMenu());
+        List<Menu> menuList= menuService.QueryList(1,1000,null);
+        for (Menu item:menuList) {
+            MenuDataEntity _item= MenuUtils.MenuConverter(item,new ArrayList<RoleModule>(),true);
+            if(_item!=null)
+                list.add(_item);
+        }
+        list.addAll(MenuUtils.InitSystemBottomMenu());
+        if(role>0){
+            SentryRole sentryRole= roleService.QueryOne(role);
+            if(sentryRole.getParentid()!=null && sentryRole.getParentid()>0) {
+                List<Long> roleModules = roleModulesUtilsPro.RoleHasModules(sentryRole.getParentid());
+                resultList = MenuUtils.UserRolePermission(list, roleModules);
+            }else{
+                resultList.clear();
+                resultList.addAll(list);
+            }
+        }else{
+            resultList.clear();
+            resultList.addAll(list);
+        }
+        return resultList;
+    }
+
+    @ResponseBody
+    @RequestMapping(value = "json/module/list.action",method = RequestMethod.POST)
+    public List<RoleModule> print_Json_Module_Role(@RequestParam(defaultValue = "0") long role){
+        if(role>0) {
+            List<RoleModule> result = roleModulesUtilsPro.RoleModules(role);
+            return result;
+        }else
+            return new ArrayList<RoleModule>();
+    }
+    @ResponseBody
+    @RequestMapping(value = "json/module/save.action",method = RequestMethod.POST)
+    public JsonResult print_Save_Module_Role(@RequestParam(defaultValue = "0") long role, @RequestParam(defaultValue = "") String ids){
+        JsonResult jsonResult=new JsonResult();
+        if(role>0) {
+            String[]list=ids.split(";");
+            List<Long> idList=new ArrayList<Long>();
+            for (String id:list) {
+                if (StringUtils.isEmpty(id)==false){
+                    idList.add(Long.valueOf(id));
+                }
+            }
+            roleService.SaveRoleModule(role,idList, null);
+            jsonResult.setStatus(1);
+            jsonResult.setMessage("授权成功");
+        }else{
+            jsonResult.setStatus(-1);
+            jsonResult.setMessage("参数错误");
+        }
+        return jsonResult;
+    }
+    @ResponseBody
+    @RequestMapping(value = "json/role/save.action",method = RequestMethod.POST)
+    public JsonResult print_Save_Role(@RequestParam(defaultValue = "0") long role,@RequestParam(defaultValue = "-1") long parentid,@RequestParam String code,@RequestParam String name){
+        JsonResult jsonResult=new JsonResult();
+        boolean success=false;
+        if(StringUtils.isEmpty(code)){
+            jsonResult.setStatus(0);
+            jsonResult.setMessage("角色编码不能为空");
+        }else if(StringUtils.isEmpty(name)){
+            jsonResult.setStatus(0);
+            jsonResult.setMessage("角色名称不能为空");
+        }else {
+            if (role > 0) {
+                SentryRole item = roleService.QueryOne(role);
+                if(item==null){
+                    jsonResult.setStatus(0);
+                    jsonResult.setMessage("当前角色不存在");
+                }else {
+                    item.setParentid(parentid <= 0 ? null : parentid);
+                    item.setRolecode(code.toLowerCase());
+                    item.setRolename(name);
+                    success = roleService.UpdateRole(item);
+                }
+            } else {
+                if(roleService.IsExitsRole(code)){
+                    jsonResult.setStatus(0);
+                    jsonResult.setMessage("当前角色已存在");
+                }else {
+                    SentryRole sentryRole = new SentryRole();
+                    sentryRole.setAddtiime(new Date());
+                    sentryRole.setChildren(null);
+                    sentryRole.setParentid(parentid <= 0 ? null : parentid);
+                    sentryRole.setRolename(name);
+                    sentryRole.setRolecode(code.toLowerCase());
+                    success = roleService.InsertRole(sentryRole);
+                }
+            }
+            jsonResult.setStatus(success ? 1 : 0);
+            jsonResult.setMessage(success ? "添加角色成功" : "添加角色失败");
+        }
+        return jsonResult;
+    }
+    @ResponseBody
+    @RequestMapping(value = "json/role/delete.action",method = RequestMethod.POST)
+    public JsonResult print_delete_Role(@RequestParam(defaultValue = "0") long role){
+        JsonResult jsonResult=new JsonResult();
+        boolean success=false;
+        if (role > 0) {
+            SentryRole item = roleService.QueryOne(role);
+            if(item==null){
+                jsonResult.setStatus(0);
+                jsonResult.setMessage("当前角色已不存在");
+            }else if(item.getChildren()!=null && item.getChildren().size()>0){
+                jsonResult.setStatus(-1);
+                jsonResult.setMessage("角色【"+item.getRolename()+"】还有子角色,当前角色不能删除");
+            }else {
+                List<Long> roleIds=roleModulesUtilsPro.RoleIds(item);
+                if(roleIds.size()==0){
+                    jsonResult.setStatus(-1);
+                    jsonResult.setMessage("参数错误");
+                }else {
+                    if (roleService.CheckRoleHasModules(roleIds)) {
+                        jsonResult.setStatus(-1);
+                        jsonResult.setMessage("角色【"+item.getRolename()+"】已经分配权限,当前角色不能删除");
+                    }else if (roleService.CheckRoleHasUser(roleIds)) {
+                        jsonResult.setStatus(-1);
+                        jsonResult.setMessage("角色【"+item.getRolename()+"】已经分配用户,当前角色不能删除");
+                    }else{
+                       if(roleService.DeleteRole(role)){
+                           jsonResult.setStatus(1);
+                           jsonResult.setMessage("角色【"+item.getRolename()+"】删除成功");
+                       }else{
+                           jsonResult.setStatus(-1);
+                           jsonResult.setMessage("角色【"+item.getRolename()+"】删除失败");
+                       }
+                    }
+                }
+            }
+        } else {
+            jsonResult.setStatus(-1);
+            jsonResult.setMessage("参数错误");
+        }
+        return jsonResult;
+    }
+}

+ 164 - 0
src/main/java/com/lightinit/hsdataplatform/controller/SolrController.java

@@ -0,0 +1,164 @@
+package com.lightinit.hsdataplatform.controller;
+
+import com.lightinit.hsdataplatform.common.CharEncoding;
+import com.lightinit.hsdataplatform.common.HttpTookitUtils;
+import com.lightinit.hsdataplatform.common.SolrUtils;
+import com.lightinit.hsdataplatform.json.pojo.JsonResult;
+import com.lightinit.hsdataplatform.json.pojo.ListResult;
+import com.lightinit.hsdataplatform.json.pojo.solr.*;
+import com.lightinit.hsdataplatform.entity.Solrserver;
+import com.lightinit.hsdataplatform.service.ISolrService;
+import org.apache.http.NameValuePair;
+import org.apache.http.message.BasicNameValuePair;
+import org.codehaus.jackson.JsonParseException;
+import org.codehaus.jackson.map.JsonMappingException;
+import org.codehaus.jackson.map.ObjectMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.util.StringUtils;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import java.io.IOException;
+import java.util.*;
+
+/**
+ * Created by Mr.Yao on 2017/11/2.
+ */
+@Controller
+@RequestMapping("/solr")
+public class SolrController {
+//    @Autowired
+//    private HttpSolrClient httpSolrClient;
+    @Autowired
+    private ISolrService solrService;
+
+    @RequestMapping(value = "view/broker.action",method = RequestMethod.GET)
+    public String print_solr_view_broker(){
+        return "solr/server";
+    }
+
+    @ResponseBody
+    @RequestMapping(value = "json/server.action",method = RequestMethod.GET)
+    public ListResult<Solrserver> print_JSON_Solr_Server(@RequestParam(defaultValue = "") String keyword) {
+        ListResult<Solrserver> result = new ListResult<Solrserver>();
+        List<String> list=new ArrayList<String>();
+        result.setRows(solrService.querySolrServer(keyword));
+        if (result.getRows()!=null){
+            result.setTotal(result.getRows().size());
+        }else{
+            result.setTotal(0);
+        }
+        return result;
+    }
+    @ResponseBody
+    @RequestMapping(value = "json/admin/core/detail.action",method = RequestMethod.GET)
+    public CoreOverViewItemEntity print_json_solr_admin_core_detail(@RequestParam(defaultValue = "http://192.168.107.112:8080/solr") String service, @RequestParam(defaultValue = "") String core) {
+        CoreOverViewItemEntity result = new CoreOverViewItemEntity();
+        if (StringUtils.isEmpty(service) || StringUtils.isEmpty(core))
+            return result;
+        CoreOverViewResponseEntity item = SolrUtils.parse(service, core);
+        if (item != null && item.getIndex() != null) {
+            result = item.getIndex();
+        }
+        return result;
+    }
+
+    @ResponseBody
+    @RequestMapping(value = "json/admin/cores.action",method = RequestMethod.GET)
+    public ListResult<CoreItemDetailEntity> print_json_solr_admin_cores(@RequestParam(defaultValue = "") String service) {
+        ListResult<CoreItemDetailEntity> result = new ListResult<CoreItemDetailEntity>();
+        if(StringUtils.isEmpty(service))
+            return result;
+        List<CoreItemDetailEntity> mList=new ArrayList<CoreItemDetailEntity>();
+        List<NameValuePair> nameValuePairs=new ArrayList<NameValuePair>();
+        nameValuePairs.add(new BasicNameValuePair("wt","json"));
+        nameValuePairs.add(new BasicNameValuePair("indexInfo","false"));
+        nameValuePairs.add(new BasicNameValuePair("_",String.valueOf(System.currentTimeMillis())));
+        String responseBody= HttpTookitUtils.doGet(service+"/admin/cores",nameValuePairs, CharEncoding.UTF8,"application/json");
+        if(StringUtils.isEmpty(responseBody)==false) {
+            ObjectMapper objectMapper = new ObjectMapper();
+            try {
+                CoreResponseEntity item = objectMapper.readValue(responseBody, CoreResponseEntity.class);
+                if(item!=null && item.getStatus()!=null) {
+                    Iterator<Map.Entry<String, CoreItemEntity>> mIterator = item.getStatus().entrySet().iterator();
+                    while (mIterator.hasNext()) {
+                        Map.Entry<String, CoreItemEntity> entry = mIterator.next();
+                        CoreItemDetailEntity itemDetailEntity=new CoreItemDetailEntity(entry.getValue());
+                        CoreOverViewResponseEntity overviewItem = SolrUtils.parse(service, itemDetailEntity.getName());
+                        if (overviewItem != null && overviewItem.getIndex() != null) {
+                            CoreOverViewItemEntity coreOverViewItemEntity = overviewItem.getIndex();
+                            itemDetailEntity.setDeletedDocs(coreOverViewItemEntity.getDeletedDocs());
+                            itemDetailEntity.setLastModified(coreOverViewItemEntity.getLastModified());
+                            itemDetailEntity.setMaxDoc(coreOverViewItemEntity.getMaxDoc());
+                            itemDetailEntity.setNumDocs(coreOverViewItemEntity.getNumDocs());
+                            itemDetailEntity.setSegmentCount(coreOverViewItemEntity.getSegmentCount());
+                        }
+                        mList.add(itemDetailEntity);
+                    }
+                }
+            } catch (JsonParseException e) {
+                e.printStackTrace();
+            } catch (JsonMappingException e) {
+                e.printStackTrace();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+        result.setRows(mList);
+        if (result.getRows()!=null){
+            result.setTotal(result.getRows().size());
+        }else{
+            result.setTotal(0);
+        }
+        return result;
+    }
+    @ResponseBody
+    @RequestMapping(value = "json/admin/core/dataimport/refresh.action",method = RequestMethod.GET)
+    public JsonResult print_json_solr_admin_core_dataimport_refresh(@RequestParam String service, @RequestParam String core, @RequestParam String entity) {
+        JsonResult result = new JsonResult();
+        if(StringUtils.isEmpty(service)) {
+            result.setStatus(-1);
+            result.setMessage("参数错误");
+            return result;
+        }
+        List<CoreItemDetailEntity> mList=new ArrayList<CoreItemDetailEntity>();
+        List<NameValuePair> nameValuePairs=new ArrayList<NameValuePair>();
+        nameValuePairs.add(new BasicNameValuePair("wt","json"));
+        nameValuePairs.add(new BasicNameValuePair("command","status"));
+        nameValuePairs.add(new BasicNameValuePair("indent","true"));
+        nameValuePairs.add(new BasicNameValuePair("_",String.valueOf(System.currentTimeMillis())));
+        String responseBody= HttpTookitUtils.doGet(service+"/"+core+"/dataimport",nameValuePairs, CharEncoding.UTF8,"application/json");
+        result.setStatus(1);
+        result.setMessage(responseBody);
+        return result;
+    }
+    @ResponseBody
+    @RequestMapping(value = "json/admin/core/dataimport.action",method = RequestMethod.GET)
+    public JsonResult print_json_solr_admin_core_dataimport(@RequestParam String service,@RequestParam String core,@RequestParam String entity) {
+        JsonResult result = new JsonResult();
+        if(StringUtils.isEmpty(service)){
+            result.setStatus(-1);
+            result.setMessage("参数错误");
+            return result;
+        }
+        List<CoreItemDetailEntity> mList=new ArrayList<CoreItemDetailEntity>();
+        List<NameValuePair> nameValuePairs=new ArrayList<NameValuePair>();
+        nameValuePairs.add(new BasicNameValuePair("wt","json"));
+        nameValuePairs.add(new BasicNameValuePair("command","full-import"));
+        nameValuePairs.add(new BasicNameValuePair("clean","true"));
+        nameValuePairs.add(new BasicNameValuePair("commit","true"));
+        nameValuePairs.add(new BasicNameValuePair("entity",entity));
+        nameValuePairs.add(new BasicNameValuePair("verbose","false"));
+        nameValuePairs.add(new BasicNameValuePair("optimize","false"));
+        nameValuePairs.add(new BasicNameValuePair("debug","false"));
+        nameValuePairs.add(new BasicNameValuePair("indent","true"));
+        nameValuePairs.add(new BasicNameValuePair("_",String.valueOf(System.currentTimeMillis())));
+        String responseBody= HttpTookitUtils.doPost(service+"/"+core+"/dataimport",nameValuePairs, CharEncoding.UTF8,"application/json");
+        result.setStatus(1);
+        result.setMessage(responseBody);
+        return result;
+    }
+}

+ 215 - 0
src/main/java/com/lightinit/hsdataplatform/controller/TokenController.java

@@ -0,0 +1,215 @@
+package com.lightinit.hsdataplatform.controller;
+
+import com.lightinit.hsdataplatform.common.OneTimePasswordAlgorithm;
+import com.lightinit.hsdataplatform.common.SecureCardUtilsPro;
+import com.lightinit.hsdataplatform.json.pojo.BindCardEntity;
+import com.lightinit.hsdataplatform.json.pojo.CardJsonResult;
+import com.lightinit.hsdataplatform.json.pojo.JsonResult;
+import com.lightinit.hsdataplatform.entity.Securekey;
+import com.lightinit.hsdataplatform.service.ISecureKeyService;
+import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.subject.Subject;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.util.StringUtils;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpSession;
+import java.security.InvalidKeyException;
+import java.security.NoSuchAlgorithmException;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+/**
+ * Created by Lantinit on 2018/1/31.
+ */
+@Controller
+@RequestMapping("/token")
+public class TokenController {
+    @Autowired
+    private ISecureKeyService secureKeyService;
+    @Autowired
+    private SecureCardUtilsPro secureCardUtilsPro;
+    @ResponseBody
+    @RequestMapping(value = "json/user/secret.action",method = RequestMethod.GET)
+    public JsonResult print_json_user_secret(HttpSession session) {
+        JsonResult result = new JsonResult();
+        String []xAxis=new String[]{"A","B","C","D","E","F","G","H","J","K"};
+        String []yAxis=new String[]{"1","2","3","4","5","6","7","8"};
+        Random xRand = new Random();
+        Random yRand = new Random();
+        List<String> keyList=new ArrayList<String>();
+        for (int i=0;i<4;i++) {
+            keyList.add(xAxis[xRand.nextInt(10)]+yAxis[yRand.nextInt(8)]);
+        }
+        session.setAttribute("SECUREKEY_SESSION_KEY", String.join(":::",keyList));
+        result.setStatus(1);
+        result.setMessage("请输入对应的密钥:"+String.join("、",keyList));
+        return result;
+    }
+    @ResponseBody
+    @RequestMapping(value = "json/user/secret/key.action",method = RequestMethod.GET)
+    public JsonResult print_json_user_secret_key(HttpSession session) {
+        JsonResult result = new JsonResult();
+        String []xAxis=new String[]{"A","B","C","D","E","F","G","H","J","K"};
+        String []yAxis=new String[]{"1","2","3","4","5","6","7","8"};
+        Random xRand = new Random();
+        Random yRand = new Random();
+        List<String> keyList=new ArrayList<String>();
+        for (int i=0;i<4;i++) {
+            keyList.add(xAxis[xRand.nextInt(10)]+yAxis[yRand.nextInt(8)]);
+        }
+        session.setAttribute("SECUREKEY_SESSION_KEY", String.join(":::",keyList));
+        result.setStatus(1);
+        result.setMessage(String.join(":",keyList));
+        return result;
+    }
+    @ResponseBody
+    @RequestMapping(value = "json/user/secret/verification.action",method = RequestMethod.GET)
+    public JsonResult print_json_user_secret_verification(HttpSession session, @RequestParam(defaultValue = "")String token) {
+        JsonResult result = new JsonResult();
+        if (StringUtils.isEmpty(token)) {
+            result.setStatus(-1);
+            result.setMessage("非法Token!");
+            return result;
+        }
+        Subject currentUser = SecurityUtils.getSubject();
+        if (currentUser == null) {
+            result.setStatus(-1);
+            result.setMessage("当前用户不存在!");
+            return result;
+        }
+        String capText = session.getAttribute("SECUREKEY_SESSION_KEY") != null ? session.getAttribute("SECUREKEY_SESSION_KEY").toString() : "";
+        if (StringUtils.isEmpty(capText)) {
+            result.setStatus(-1);
+            result.setMessage("系统异常!");
+            return result;
+        }
+        Securekey securekey = secureKeyService.QueryOne(currentUser.getPrincipal().toString());
+        if (securekey == null) {
+            result.setStatus(-1);
+            result.setMessage("授权失败!");
+            return result;
+        }
+        String realToken = "";
+        String[] TokenArray = capText.split(":::");
+        for (String item : TokenArray) {
+            String secretStr = item.substring(1) + ":::" + securekey.getSecurekey() + ":::" + item.substring(0, 1);
+            try {
+                realToken += OneTimePasswordAlgorithm.generateOTP(secretStr.getBytes(), 0, 2, false, -1);
+            } catch (NoSuchAlgorithmException e) {
+                e.printStackTrace();
+            } catch (InvalidKeyException e) {
+                e.printStackTrace();
+            }
+        }
+        if (realToken.equalsIgnoreCase(token) == false) {
+            result.setStatus(-1);
+            result.setMessage("授权失败!");
+            return result;
+        } else {
+            session.removeAttribute("SECUREKEY_SESSION_KEY");
+            result.setStatus(1);
+            result.setMessage("授权成功!");
+            return result;
+        }
+    }
+
+
+    @ResponseBody
+    @RequestMapping(value = "json/secret/make/card.action",method = RequestMethod.GET)
+    public CardJsonResult print_json_user_secret_make() {
+        CardJsonResult result = new CardJsonResult();
+        try {
+            SimpleDateFormat syncDateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+            try {
+                Date syncDate= syncDateFormat.parse(syncDateFormat.format(new Date()));
+                result.setSynctime(syncDate.getTime());
+            } catch (ParseException e) {
+                e.printStackTrace();
+            }
+            SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyMMddHHmmssSSS");
+            String[][] CardSecret = new String[10][8];
+            String SerialNo = "1"+ org.apache.commons.lang3.StringUtils.leftPad(simpleDateFormat.format(new Date()),18,"0");
+            String[] xAxis = new String[]{"A", "B", "C", "D", "E", "F", "G", "H", "J", "K"};
+            String[] yAxis = new String[]{"1", "2", "3", "4", "5", "6", "7", "8"};
+            for (int j = 0; j < 8; j++) {
+                for (int i = 0; i < 10; i++) {
+                    String secretStr = yAxis[j] + ":::"+SerialNo+":::"+result.getSynctime()+":::" + xAxis[i];
+                    CardSecret[i][j] = OneTimePasswordAlgorithm.generateOTP(secretStr.getBytes(), 0, 2, false, -1);
+                }
+            }
+            result.setSecretkeys(CardSecret);
+            result.setSerialno(SerialNo);
+            result.setStatus(1);
+            result.setMessage("操作成功");
+        } catch (NoSuchAlgorithmException e) {
+            e.printStackTrace();
+            result.setStatus(0);
+            result.setMessage("服务异常");
+        } catch (InvalidKeyException e) {
+            e.printStackTrace();
+            result.setStatus(0);
+            result.setMessage("服务异常");
+        }
+        return result;
+    }
+
+    @ResponseBody
+    @RequestMapping(value = "json/secret/bind/card.action",method = RequestMethod.POST)
+    public JsonResult print_json_user_secret_bind(HttpSession session,@RequestBody BindCardEntity item) {
+        JsonResult result = new JsonResult();
+        try {
+            if(secureCardUtilsPro.verification(session,item.getToken(),item.getCardno(),item.getSynctime())==false){
+                result.setStatus(0);
+                result.setMessage("服务异常");
+                return result;
+            }
+            SimpleDateFormat syncDateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+            try {
+                Date syncDate=syncDateFormat.parse(syncDateFormat.format(item.getSynctime()));
+                Securekey record=secureKeyService.QueryOne(item.getUsername());
+                if(record==null){
+                    record=new Securekey();
+                }
+                record.setBinddatetime(new Date());
+                record.setCyclestep(0);
+                Calendar rightNow = Calendar.getInstance();
+                rightNow.setTime(new Date());
+                rightNow.add(Calendar.YEAR,1);
+                record.setExpiresdatetime(rightNow.getTime());
+                record.setSecurekey(item.getCardno());
+                record.setSyncdatetime(syncDate);
+                record.setSecurekeytype(0);
+                record.setUsername(item.getUsername());
+                if(record.getSecurekeyid()<=0) {
+                    if (secureKeyService.Insert(record)) {
+                        result.setStatus(1);
+                        result.setMessage("操作成功");
+                    } else {
+                        result.setStatus(1);
+                        result.setMessage("操作成功");
+                    }
+                }else{
+                    if (secureKeyService.Update(record)) {
+                        result.setStatus(1);
+                        result.setMessage("操作成功");
+                    } else {
+                        result.setStatus(1);
+                        result.setMessage("操作成功");
+                    }
+                }
+            } catch (ParseException e) {
+                e.printStackTrace();
+            }
+            result.setStatus(1);
+            result.setMessage("操作成功");
+        }catch (Exception e) {
+            e.printStackTrace();
+            result.setStatus(0);
+            result.setMessage("服务异常");
+        }
+        return result;
+    }
+}

+ 114 - 0
src/main/java/com/lightinit/hsdataplatform/controller/UploadController.java

@@ -0,0 +1,114 @@
+package com.lightinit.hsdataplatform.controller;
+
+import com.lightinit.hsdataplatform.common.FTPConfigurationUtilsPro;
+import com.lightinit.hsdataplatform.common.FTPTookitUtils;
+import com.lightinit.hsdataplatform.json.pojo.FTPConfigurationParameter;
+import com.lightinit.hsdataplatform.json.pojo.UploadResultEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.util.StringUtils;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import org.springframework.web.multipart.commons.CommonsMultipartResolver;
+
+import javax.servlet.http.HttpServletRequest;
+import java.io.IOException;
+import java.util.Iterator;
+
+/**
+ * Created by Mr.Yao on 2017/5/8.
+ */
+@Controller
+@RequestMapping("/upload")
+public class UploadController {
+    @Autowired
+    private FTPTookitUtils ftpTookitUtils;
+    @Autowired
+    private FTPConfigurationUtilsPro ftpConfigurationUtilsPro;
+    @ResponseBody
+    @RequestMapping(value = "deployment/{product}/zip/package.action")
+    public String print_save_file(HttpServletRequest request, @PathVariable String product){
+        try {
+            CommonsMultipartResolver multipartResolver=new CommonsMultipartResolver(request.getSession().getServletContext());
+            if(multipartResolver.isMultipart(request)){
+                MultipartHttpServletRequest multipartHttpServletRequest=(MultipartHttpServletRequest)request;
+                Iterator<String> iterator=multipartHttpServletRequest.getFileNames();
+                while (iterator.hasNext()){
+                    MultipartFile file=multipartHttpServletRequest.getFile(iterator.next());
+                    if(file!=null){
+                        String filename=file.getOriginalFilename();
+                        if(StringUtils.isEmpty(filename.trim())){
+                            continue;
+                        }
+                        FTPConfigurationParameter ftpConfigurationParameter=new FTPConfigurationParameter(ftpConfigurationUtilsPro.getDeploy_host(),ftpConfigurationUtilsPro.getDeploy_port(),ftpConfigurationUtilsPro.getDeploy_username(),ftpConfigurationUtilsPro.getDeploy_password());
+                        ftpTookitUtils.uploadFile(file.getInputStream(),String.format("deployment/%s/%s",product,filename),ftpConfigurationParameter);
+                    }
+                }
+            }
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        return "error";
+    }
+
+    @ResponseBody
+    @RequestMapping(value = "file/zip/upload.action")
+    public UploadResultEntity print_save_mtas_client_apk_file(HttpServletRequest request, @RequestParam String product) {
+        UploadResultEntity jsonResult=new UploadResultEntity();
+        try {
+            String remotePath = "test";
+            String itunsUrl = "";
+            if (StringUtils.isEmpty(remotePath) && StringUtils.isEmpty(itunsUrl))
+            {
+                jsonResult.setStatus(-1);
+                jsonResult.setMessage("参数异常");
+                jsonResult.setFilename("");
+                jsonResult.setDownloadurl("");
+                return jsonResult;
+            }
+            else if (!StringUtils.isEmpty(itunsUrl))
+            {
+                jsonResult.setStatus(1);
+                jsonResult.setMessage("上传成功");
+                jsonResult.setFilename("ios");
+                jsonResult.setDownloadurl(itunsUrl);
+                return jsonResult;
+            }
+            else {
+                CommonsMultipartResolver multipartResolver = new CommonsMultipartResolver(request.getSession().getServletContext());
+                if (multipartResolver.isMultipart(request)) {
+                    MultipartHttpServletRequest multipartHttpServletRequest = (MultipartHttpServletRequest) request;
+                    Iterator<String> iterator = multipartHttpServletRequest.getFileNames();
+                    while (iterator.hasNext()) {
+                        MultipartFile file = multipartHttpServletRequest.getFile(iterator.next());
+                        if (file != null) {
+                            String filename = file.getOriginalFilename();
+                            if (StringUtils.isEmpty(filename.trim())) {
+                                continue;
+                            }
+                            FTPConfigurationParameter ftpConfigurationParameter = new FTPConfigurationParameter(ftpConfigurationUtilsPro.getApk_host(), ftpConfigurationUtilsPro.getApk_port(), ftpConfigurationUtilsPro.getApk_username(), ftpConfigurationUtilsPro.getApk_password());
+                            ftpTookitUtils.uploadFile(file.getInputStream(), String.format("%s/%s", remotePath, filename), ftpConfigurationParameter);
+                            jsonResult.setStatus(1);
+                            jsonResult.setMessage("上传成功");
+                            jsonResult.setFilename(filename);
+                            jsonResult.setDownloadurl(String.format("http://localhost/file/down.action?p=%s", remotePath));
+                            return jsonResult;
+                        }
+                    }
+                } else {
+                    jsonResult.setStatus(-1);
+                    jsonResult.setMessage("参数错误");
+                }
+            }
+        } catch (IOException e) {
+            jsonResult.setStatus(-1);
+            jsonResult.setMessage("服务端异常");
+            e.printStackTrace();
+        }
+        return jsonResult;
+    }
+}

+ 344 - 0
src/main/java/com/lightinit/hsdataplatform/controller/UserController.java

@@ -0,0 +1,344 @@
+package com.lightinit.hsdataplatform.controller;
+
+import com.lightinit.hsdataplatform.common.MenuUtils;
+import com.lightinit.hsdataplatform.common.RoleModulesUtilsPro;
+import com.lightinit.hsdataplatform.entity.*;
+import com.lightinit.hsdataplatform.json.pojo.JsonResult;
+import com.lightinit.hsdataplatform.json.pojo.ListResult;
+import com.lightinit.hsdataplatform.service.IAdminService;
+import com.lightinit.hsdataplatform.service.IMenuService;
+import com.lightinit.hsdataplatform.service.IRoleService;
+import com.lightinit.hsdataplatform.service.IUserModuleService;
+import com.google.code.kaptcha.Constants;
+import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.crypto.SecureRandomNumberGenerator;
+import org.apache.shiro.crypto.hash.Md5Hash;
+import org.apache.shiro.subject.Subject;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.util.StringUtils;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import javax.servlet.http.HttpSession;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Created by Mr.Yao on 2017/4/11.
+ */
+@Controller
+@RequestMapping("/user")
+public class UserController {
+    @Autowired
+    private IAdminService adminService;
+    @Autowired
+    private IRoleService roleService;
+    @Autowired
+    private RoleModulesUtilsPro roleModulesUtilsPro;
+    @Autowired
+    private IMenuService menuService;
+    @Autowired
+    private IUserModuleService userModuleService;
+
+    @RequestMapping(value = "view/password.action")
+    public String print_user_modify_password(){
+        return "user/modifypwd";
+    }
+
+    @RequestMapping(value = "view/list.action")
+    public String print_user_list(){
+        return "user/userlist";
+    }
+
+    @ResponseBody
+    @RequestMapping(value = "json/list.action",method = RequestMethod.GET)
+    public ListResult<Admin> print_json_user_list(@RequestParam(defaultValue = "1") int page, @RequestParam(defaultValue = "10") int rows){
+        ListResult<Admin> result=new ListResult<Admin>();
+        result.setTotal(adminService.QueryCount(null,""));
+        result.setRows(adminService.QueryList(null,"",page,rows));
+        return result;
+    }
+
+    @ResponseBody
+    @RequestMapping(value = "json/save.action",method = RequestMethod.POST)
+    public JsonResult print_json_user_add(@RequestParam(defaultValue = "0") long id, @RequestParam String username, @RequestParam String fullname, @RequestParam String password, @RequestParam(defaultValue = "0") int lock){
+        JsonResult jsonResult=new JsonResult();
+        if(StringUtils.isEmpty(username)){
+            jsonResult.setStatus(0);
+            jsonResult.setMessage("用户名称不能为空");
+        }else if(StringUtils.isEmpty(fullname)){
+            jsonResult.setStatus(0);
+            jsonResult.setMessage("用户全称不能为空");
+        }else if(StringUtils.isEmpty(password)){
+            jsonResult.setStatus(0);
+            jsonResult.setMessage("账户密码不能为空");
+        }else if(lock<0){
+            jsonResult.setStatus(0);
+            jsonResult.setMessage("账户状态不能为空");
+        }else {
+            boolean success=false;
+            String salt ="";
+            String password_cipherText="";
+            Admin admin=adminService.QueryOne(id);
+            if(id <= 0  || admin==null){
+                if(adminService.IsExits(username)){
+                    jsonResult.setStatus(0);
+                    jsonResult.setMessage("账户已经存在");
+                    return jsonResult;
+                }else {
+                    admin = new Admin();
+                    salt = new SecureRandomNumberGenerator().nextBytes().toHex();
+                    password_cipherText = new Md5Hash(password, username + salt, 3).toHex();
+                    admin.setUsername(username);
+                    admin.setAccountlock(lock);
+                    admin.setPassword(password_cipherText);
+                    admin.setSalt(salt);
+                    admin.setShowname(fullname);
+                    admin.setCreatedAt(new Date());
+                    success = adminService.AddAdmin(admin);
+                }
+            }else if(admin.getUsername().equalsIgnoreCase(username)==false){
+                jsonResult.setStatus(0);
+                jsonResult.setMessage("用户信息错误");
+                return jsonResult;
+            }else{
+                salt = admin.getSalt();
+                password_cipherText= new Md5Hash(password,username+salt,3).toHex();
+                admin.setAccountlock(lock);
+                if(admin.getPassword().equalsIgnoreCase(password)==false && admin.getPassword().equalsIgnoreCase(password_cipherText)==false){
+                    admin.setPassword(password_cipherText);
+                }
+                admin.setShowname(fullname);
+                success =adminService.UpdateAdmin(admin);
+            }
+            jsonResult.setStatus(success?1:0);
+            jsonResult.setMessage(success?"账户添加成功":"账户添加失败");
+        }
+        return jsonResult;
+    }
+
+    @ResponseBody
+    @RequestMapping(value = "json/role/grant.action",method = RequestMethod.POST)
+    public JsonResult print_Grant_User_Role(@RequestParam(defaultValue = "0") long uid,@RequestParam(defaultValue = "") String ids){
+        JsonResult jsonResult=new JsonResult();
+        if(uid>0) {
+            String[]list=ids.split(";");
+            List<Long> idList=new ArrayList<Long>();
+            for (String id:list) {
+                if (StringUtils.isEmpty(id)==false){
+                    idList.add(Long.valueOf(id));
+                }
+            }
+            roleService.SaveUserRoles(uid,idList);
+            jsonResult.setStatus(1);
+            jsonResult.setMessage("授权成功");
+        }else{
+            jsonResult.setStatus(-1);
+            jsonResult.setMessage("参数错误");
+        }
+        return jsonResult;
+    }
+
+    @ResponseBody
+    @RequestMapping(value = "json/lock.action",method = RequestMethod.POST)
+    public JsonResult print_json_user_lock(@RequestParam(defaultValue = "0") long id,@RequestParam(defaultValue = "0") int lock){
+        JsonResult jsonResult=new JsonResult();
+        String errorMsg="";
+        String successMsg="";
+        if(id<=0){
+            jsonResult.setStatus(0);
+            jsonResult.setMessage("参数错误");
+        }else {
+            boolean success=false;
+            Admin admin=adminService.QueryOne(id);
+            if(id <= 0  || admin==null){
+                jsonResult.setStatus(0);
+                jsonResult.setMessage("账户已经存在");
+                return jsonResult;
+            }else{
+                if(lock==0){
+                    errorMsg="账户【"+admin.getShowname()+"】解除锁定失败";
+                    successMsg="账户【"+admin.getShowname()+"】已解除锁定";
+                }else if(lock==1){
+                    errorMsg="账户【"+admin.getShowname()+"】锁定失败";
+                    successMsg="账户【"+admin.getShowname()+"】已锁定";
+                }else{
+                    jsonResult.setStatus(0);
+                    jsonResult.setMessage("参数错误");
+                    return jsonResult;
+                }
+                admin.setAccountlock(lock);
+                success =adminService.UpdateAdmin(admin);
+            }
+            jsonResult.setStatus(success?1:0);
+            jsonResult.setMessage(success?successMsg:errorMsg);
+        }
+        return jsonResult;
+    }
+    @ResponseBody
+    @RequestMapping(value = "json/user/delete.action",method = RequestMethod.POST)
+    public JsonResult print_delete_user(@RequestParam(defaultValue = "0") long uid){
+        JsonResult jsonResult=new JsonResult();
+        if (uid > 1) {
+            Admin item = adminService.QueryOne(uid);
+            if(item==null){
+                jsonResult.setStatus(0);
+                jsonResult.setMessage("当前用户已不存在");
+            }else if(roleService.CheckUserHasRole(uid)){
+                jsonResult.setStatus(0);
+                jsonResult.setMessage("用户【"+item.getShowname()+"】已经分配角色,请先取消!");
+            }else if(userModuleService.CheckUserHasModules(uid)){
+                jsonResult.setStatus(0);
+                jsonResult.setMessage("用户【"+item.getShowname()+"】已经分配模块,请先取消!");
+            }else {
+              if(adminService.Delete(uid)){
+                  jsonResult.setStatus(1);
+                  jsonResult.setMessage("用户【"+item.getShowname()+"】删除成功");
+              }else{
+                  jsonResult.setStatus(0);
+                  jsonResult.setMessage("用户【"+item.getShowname()+"】删除失败");
+              }
+            }
+        } else {
+            jsonResult.setStatus(-1);
+            jsonResult.setMessage("参数错误");
+        }
+        return jsonResult;
+    }
+
+    @ResponseBody
+    @RequestMapping(value = "json/role/list.action",method = RequestMethod.POST)
+    public List<AdminRole> print_user_roles_list(@RequestParam(defaultValue = "0") long uid){
+        List<AdminRole> result=new ArrayList<AdminRole>();
+        if (uid > 0) {
+            result = roleService.QueryRoleList(uid);
+        }
+        return result;
+    }
+
+    @ResponseBody
+    @RequestMapping(value = "json/module/list.action",method = RequestMethod.POST)
+    public List<RoleModule> print_user_module_list(@RequestParam(defaultValue = "0") long uid){
+        List<RoleModule> result= roleModulesUtilsPro.UserHasModules(uid);
+        return result;
+    }
+    @ResponseBody
+    @RequestMapping(value = "json/menu/list.action",method = RequestMethod.GET)
+    public List<MenuDataEntity> print_Json_Menu_Role(@RequestParam(defaultValue = "0") long uid){
+        List<MenuDataEntity> resultList=new ArrayList<MenuDataEntity>();
+        List<MenuDataEntity> list=new ArrayList<MenuDataEntity>();
+        list.addAll(MenuUtils.InitSystemTopMenu());
+        List<Menu> menuList= menuService.QueryList(1,1000,null);
+        for (Menu item:menuList) {
+            MenuDataEntity _item= MenuUtils.MenuConverter(item,new ArrayList<RoleModule>(),true);
+            if(_item!=null)
+                list.add(_item);
+        }
+        list.addAll(MenuUtils.InitSystemBottomMenu());
+        if(uid>0){
+            List<AdminRole> adminRoleList= roleService.QueryRoleList(uid);
+            List<Long> roleIds=new ArrayList<Long>();
+            for (AdminRole mRrole:adminRoleList) {
+                roleIds.add(mRrole.getId());
+            }
+            List<SentryRole> sentryRole= roleService.QueryManyRole(roleIds);
+            List<Long> roleModules=new ArrayList<Long>();
+            for (SentryRole mSentryRole:sentryRole) {
+               List<Long> _tmpList=roleModulesUtilsPro.RoleHasModules(mSentryRole.getId());
+                for (Long i:_tmpList) {
+                    if(roleModules.contains(i)==false)
+                        roleModules.add(i);
+                }
+            }
+            resultList = MenuUtils.UserRolePermission(list, roleModules);
+        }else{
+            resultList.clear();
+        }
+        return resultList;
+    }
+
+    @ResponseBody
+    @RequestMapping(value = "json/module/grant.action",method = RequestMethod.POST)
+    public JsonResult print_Grant_User_Module(@RequestParam(defaultValue = "0") long uid,@RequestParam(defaultValue = "") String ids){
+        JsonResult jsonResult=new JsonResult();
+        if(uid>0) {
+            String[]list=ids.split(";");
+            List<Long> idList=new ArrayList<Long>();
+            for (String id:list) {
+                if (StringUtils.isEmpty(id)==false){
+                    idList.add(Long.valueOf(id));
+                }
+            }
+            userModuleService.SaveUserModule(uid,idList);
+            jsonResult.setStatus(1);
+            jsonResult.setMessage("授权成功");
+        }else{
+            jsonResult.setStatus(-1);
+            jsonResult.setMessage("参数错误");
+        }
+        return jsonResult;
+    }
+
+    @ResponseBody
+    @RequestMapping(value = "json/password/modify.action",method = RequestMethod.POST)
+    public JsonResult print_json_user_password_modify(HttpSession session, @RequestParam(defaultValue = "") String id, @RequestParam(defaultValue = "") String password, @RequestParam(defaultValue = "") String newpsw, @RequestParam(defaultValue = "") String captcha){
+        JsonResult jsonResult=new JsonResult();
+        String capText=session.getAttribute(Constants.KAPTCHA_SESSION_KEY)!=null?session.getAttribute(Constants.KAPTCHA_SESSION_KEY).toString():"";
+        if(StringUtils.isEmpty(capText) || StringUtils.isEmpty(captcha)){
+            jsonResult.setStatus(0);
+            jsonResult.setMessage("验证码错误");
+        }else if (capText.equalsIgnoreCase(captcha)==false){
+            jsonResult.setStatus(0);
+            jsonResult.setMessage("验证码错误");
+        }else {
+            if (StringUtils.isEmpty(id)) {
+                jsonResult.setStatus(0);
+                jsonResult.setMessage("用户不存在");
+            } else if (StringUtils.isEmpty(password)) {
+                jsonResult.setStatus(0);
+                jsonResult.setMessage("原始密码不能为空");
+            } else if (StringUtils.isEmpty(newpsw)) {
+                jsonResult.setStatus(0);
+                jsonResult.setMessage("新密码不能为空");
+            } else if (newpsw.equalsIgnoreCase(password)) {
+                jsonResult.setStatus(0);
+                jsonResult.setMessage("新密码不能与原始密码一样");
+            } else {
+                boolean success = false;
+                String salt = "";
+                Admin admin = adminService.SelectOne(id);
+                if (admin == null) {
+                    jsonResult.setStatus(0);
+                    jsonResult.setMessage("账户不存在");
+                    return jsonResult;
+                } else {
+                    salt = admin.getSalt();
+                    String password_cipherText = new Md5Hash(password, admin.getUsername() + salt, 3).toHex();
+                    if (admin.getPassword().equalsIgnoreCase(password_cipherText) == false) {
+                        jsonResult.setStatus(0);
+                        jsonResult.setMessage("原始密码错误");
+                        return jsonResult;
+                    }
+                    String password_cipherText_new = new Md5Hash(newpsw, admin.getUsername() + salt, 3).toHex();
+                    admin.setPassword(password_cipherText_new);
+                    success = adminService.UpdateAdmin(admin);
+                    if(success){
+                        Subject currentUser = SecurityUtils.getSubject();
+                        try {
+                            currentUser.logout();
+                        } catch (Exception e) {
+
+                        }
+                    }
+                }
+                jsonResult.setStatus(success ? 1 : 0);
+                jsonResult.setMessage(success ? "密码修改成功,请重新登录" : "密码修改失败");
+            }
+        }
+        return jsonResult;
+    }
+}

+ 233 - 0
src/main/java/com/lightinit/hsdataplatform/controller/admin/APIPublishController.java

@@ -0,0 +1,233 @@
+package com.lightinit.hsdataplatform.controller.admin;
+
+import com.lightinit.hsdataplatform.common.GuidGenerator;
+import com.lightinit.hsdataplatform.common.SysContants;
+import com.lightinit.hsdataplatform.common.UploadFileUtils;
+import com.lightinit.hsdataplatform.dictionary.DicPublishApiState;
+import com.lightinit.hsdataplatform.dictionary.DicResourceOpenType;
+import com.lightinit.hsdataplatform.dictionary.DicResourceShareType;
+import com.lightinit.hsdataplatform.dictionary.DicResourceState;
+import com.lightinit.hsdataplatform.entity.BaseExample;
+import com.lightinit.hsdataplatform.entity.PublishInfoWithBLOBs;
+import com.lightinit.hsdataplatform.entity.ResourceApiInterfaceWithBLOBs;
+import com.lightinit.hsdataplatform.model.ResultState;
+import com.lightinit.hsdataplatform.model.ResultStateCode;
+import com.lightinit.hsdataplatform.model.admin.*;
+import com.lightinit.hsdataplatform.service.admin.IApiPublishService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.util.StringUtils;
+import org.springframework.validation.BindingResult;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpSession;
+import java.io.File;
+import java.util.List;
+
+import static com.lightinit.hsdataplatform.controller.admin.BaseController.buildInvalidResultState;
+
+/**
+ * 资源注册->api注册
+ */
+@Controller
+@RequestMapping("/admin/api_publish")
+public class APIPublishController extends BaseController{
+
+    @Autowired
+    private IApiPublishService apiPublishService ;
+
+    @RequestMapping(value = "index.htm")
+    public ModelAndView index(){
+        ModelAndView modelAndView = new ModelAndView("admin/api_publish/index");
+        modelAndView.addObject("dicPublishApiState", DicPublishApiState.getInstacne().getDicMap());
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "list.action")
+    public ModelAndView list(APIPublishSearchModel inputModel, @RequestParam(defaultValue = "1") int pageNo,
+                             HttpSession session) {
+        LoginUser loginUser = (LoginUser) session.getAttribute(LoginUser.SESSION_KEY_LOGIN_USER);
+        ModelAndView modelAndView = new ModelAndView("admin/api_publish/list");
+        BaseExample.Page pager = new BaseExample.Page(pageNo, 10);
+        inputModel.setPage(pager);
+        int isFlag = apiPublishService.isAdminFalg(loginUser.getId()) ;
+        if (!(isFlag>0)){
+            inputModel.setOrgId(loginUser.getOrgId());
+        }
+        List<APIPublishListModel> outputModel = apiPublishService.queryList(inputModel);
+        pager.setTotal(apiPublishService.queryCount(inputModel));
+        modelAndView.addObject("list", outputModel);
+        modelAndView.addObject("pager", pager);
+        modelAndView.addObject("dicPublishApiState_DRAFT", DicPublishApiState.DRAFT) ;
+        modelAndView.addObject("dicPublishApiState_PUBLISH", DicPublishApiState.PUBLISH) ;
+        modelAndView.addObject("dicPublishApiState_UN_PUBLISH", DicPublishApiState.UN_PUBLISH) ;
+        modelAndView.addObject("dicPublishApiState_UNPASS", DicPublishApiState.UNPASS) ;
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "publishResource.htm")
+    public ModelAndView publishResource(){
+        ModelAndView modelAndView = new ModelAndView("admin/api_publish/publishResource");
+        modelAndView.addObject("dicResourceState", DicResourceState.getInstacne().getDicMap());
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "publish_list.action")
+    public ModelAndView publish_list(ResourceAPIRegisterSearchModel inputModel, @RequestParam(defaultValue = "1") int pageNo,
+                                     HttpSession session) {
+        LoginUser loginUser = (LoginUser) session.getAttribute(LoginUser.SESSION_KEY_LOGIN_USER);
+        ModelAndView modelAndView = new ModelAndView("admin/api_publish/publish_list");
+        BaseExample.Page pager = new BaseExample.Page(pageNo, 10);
+        inputModel.setPage(pager);
+        int isFlag = apiPublishService.isAdminFalg(loginUser.getId()) ;
+        if (!(isFlag>0)){
+            inputModel.setOrgId(loginUser.getOrgId());
+        }
+        List<ResourceAPIRegisterListModel> outputModel = apiPublishService.queryPublishList(inputModel);
+        pager.setTotal(apiPublishService.queryPublishCount(inputModel));
+        modelAndView.addObject("list", outputModel);
+        modelAndView.addObject("pager", pager);
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "publish_edit.htm/{id}")
+    public ModelAndView publish_edit(@PathVariable long id){
+        ModelAndView modelAndView = new ModelAndView("admin/api_publish/publish_edit");
+        modelAndView.addObject("resource", apiPublishService.queryOneViewResource(id)) ;
+        List<ResourceApiInterfaceWithBLOBs> resourceApiInterfaceWithBLOBsList = apiPublishService.queryOneResourceAPIInterface(id) ;
+        modelAndView.addObject("resourceApiInterface", resourceApiInterfaceWithBLOBsList) ;
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "apiPublish_setting.htm")
+    public ModelAndView apiPublic_setting(Long api_badge){
+        ModelAndView modelAndView = new ModelAndView("admin/api_publish/apiPublish_setting");
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "edit_setting.htm")
+    public ModelAndView edit_setting(APIPublishSettingModel apiPublishSettingModel){
+        ModelAndView modelAndView = new ModelAndView("admin/api_publish/apiPublish_setting");
+        modelAndView.addObject("publishSetting",apiPublishSettingModel) ;
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "publishAPI_add.action")
+    @ResponseBody
+    public ResultState publishAPI_add(
+             APIPublishInfoAndSettingModel apiPublishInfoAndSettingModel, String shareType, String openType) {
+        // 保存图片
+        String uniqueDir = GuidGenerator.generate() + File.separator;
+        String dataFileDir = UploadFileUtils.buildRelativeDir(SysContants.UploadFilePath.API_PUBLISH_ROOT_DIR, uniqueDir, SysContants.UploadFilePath.API_PUBLISH_RESOURCE_IMG_DIR);
+        if (apiPublishInfoAndSettingModel.getFileImg() != null && !apiPublishInfoAndSettingModel.getFileImg().isEmpty()){
+            if (UploadFileUtils.writeUploadFile(apiPublishInfoAndSettingModel.getFileImg(), dataFileDir, SysContants.PropertyKey.UPLOAD_IMAGE_ROOT_DIR)){
+                apiPublishInfoAndSettingModel.setResourceImg(dataFileDir + apiPublishInfoAndSettingModel.getFileImg().getOriginalFilename());
+            }else {
+                return buildInvalidResultState(ResultStateCode.INVALID_DATA, "资源图片保存失败");
+            }
+        }
+        if (shareType.equals(DicResourceShareType.CONDITIONAL)){
+            if (StringUtils.isEmpty(apiPublishInfoAndSettingModel.getShareCondition())){
+                return buildInvalidResultState(ResultStateCode.INVALID_DATA, "共享条件有条件共享时必须填写");
+            }
+        }
+        if (openType.equals(DicResourceOpenType.NEED_TO_APPLY)){
+            if (StringUtils.isEmpty(apiPublishInfoAndSettingModel.getOpenCondition())){
+                return buildInvalidResultState(ResultStateCode.INVALID_DATA, "开放类型为依申开放时必须填写");
+            }
+        }
+        ResultState<Long> resultState = apiPublishService.publishAPI_add(apiPublishInfoAndSettingModel) ;
+        return resultState ;
+    }
+
+    @RequestMapping(value = "delete.action/{id}")
+    @ResponseBody
+    public ResultState delete(@PathVariable long id){
+        ResultState<Long> resultState = apiPublishService.delete(id);
+        return resultState;
+    }
+
+    @RequestMapping(value = "downframe.action/{id}")
+    @ResponseBody
+    public ResultState downframe(@PathVariable long id){
+        ResultState<Long> resultState = apiPublishService.downframe(id);
+        return resultState;
+    }
+
+    @RequestMapping(value = "editPublish.htm/{id}/{publishInfoId}")
+    public ModelAndView editPublish(@PathVariable("id") long id,@PathVariable("publishInfoId") long publishInfoId){
+        ModelAndView modelAndView = new ModelAndView("admin/api_publish/editPublish");
+        modelAndView.addObject("resource", apiPublishService.queryOneViewResource(id)) ;
+        List<ResourceApiInterfaceWithBLOBs> resourceApiInterfaceWithBLOBsList = apiPublishService.queryOneResourceAPIInterface(id) ;
+        modelAndView.addObject("resourceApiInterface", resourceApiInterfaceWithBLOBsList) ;
+        PublishInfoWithBLOBs publishInfoWithBLOBs = apiPublishService.queryOnePublishInfoById(publishInfoId) ;
+        if (publishInfoWithBLOBs!=null){
+            modelAndView.addObject("resourceImgName", org.apache.commons.lang.StringUtils.isNotEmpty(publishInfoWithBLOBs.getResourceImg()) ? UploadFileUtils.getFileNameByPath(publishInfoWithBLOBs.getResourceImg()) : null);
+        }
+        modelAndView.addObject("publishInfo",publishInfoWithBLOBs ) ;
+        modelAndView.addObject("publishSettingList", apiPublishService.queryListPublishSettingByInfoId(publishInfoId)) ;
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "publishInfoView.htm/{id}/{publishInfoId}")
+    public ModelAndView publishInfoView(@PathVariable("id") long id,@PathVariable("publishInfoId") long publishInfoId){
+        ModelAndView modelAndView = new ModelAndView("admin/api_publish/publishInfo_view");
+        modelAndView.addObject("resource", apiPublishService.queryOneViewResource(id)) ;
+        List<ResourceApiInterfaceWithBLOBs> resourceApiInterfaceWithBLOBsList = apiPublishService.queryOneResourceAPIInterface(id) ;
+        modelAndView.addObject("resourceApiInterface", resourceApiInterfaceWithBLOBsList) ;
+        modelAndView.addObject("publishInfo", apiPublishService.queryOnePublishInfoById(publishInfoId)) ;
+        modelAndView.addObject("publishSettingList", apiPublishService.queryListPublishSettingByInfoId(publishInfoId)) ;
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "publishSettingView.htm/{id}")
+    public ModelAndView publishSettingView(@PathVariable("id") long id){
+        ModelAndView modelAndView = new ModelAndView("admin/api_publish/publishSettingView");
+        modelAndView.addObject("publishSetting", apiPublishService.queryOnePublishSettingById(id)) ;
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "editPublishSetting.htm/{id}")
+    public ModelAndView editPublishSetting(@PathVariable("id") long id){
+        ModelAndView modelAndView = new ModelAndView("admin/api_publish/editPublishSetting");
+        modelAndView.addObject("publishSetting", apiPublishService.queryOnePublishSettingById(id)) ;
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "publishAPI_edit.action")
+    @ResponseBody
+    public ResultState publishAPI_edit(APIPublishInfoAndSettingEditModel infoAndSettingEditModel, String shareType, String openType,MultipartFile fileImg) {
+        // 保存图片
+        String uniqueDir ;
+        if (org.apache.commons.lang.StringUtils.isNotEmpty(infoAndSettingEditModel.getImgFile())){
+            uniqueDir = UploadFileUtils.getExistingFileRelativeDir(1, infoAndSettingEditModel.getImgFile(), 2);
+        } else {
+            uniqueDir = GuidGenerator.generate() + File.separator;
+        }
+        String dataFileDir = UploadFileUtils.buildRelativeDir(SysContants.UploadFilePath.API_PUBLISH_ROOT_DIR, uniqueDir, SysContants.UploadFilePath.API_PUBLISH_RESOURCE_IMG_DIR);
+        if (fileImg != null && !fileImg.isEmpty()){
+            if (UploadFileUtils.writeUploadFile(fileImg, dataFileDir, SysContants.PropertyKey.UPLOAD_IMAGE_ROOT_DIR)){
+                infoAndSettingEditModel.setResourceImg(dataFileDir + fileImg.getOriginalFilename());
+            }else {
+                return buildInvalidResultState(ResultStateCode.INVALID_DATA, "资源图片保存失败");
+            }
+        }
+        if (shareType.equals(DicResourceShareType.CONDITIONAL)){
+            if (StringUtils.isEmpty(infoAndSettingEditModel.getShareCondition())){
+                return buildInvalidResultState(ResultStateCode.INVALID_DATA, "共享条件有条件共享时必须填写");
+            }
+        }
+        if (openType.equals(DicResourceOpenType.NEED_TO_APPLY)){
+            if (StringUtils.isEmpty(infoAndSettingEditModel.getOpenCondition())){
+                return buildInvalidResultState(ResultStateCode.INVALID_DATA, "开放类型为依申开放时必须填写");
+            }
+        }
+        ResultState<Long> resultState = apiPublishService.publishAPI_edit(infoAndSettingEditModel) ;
+        return resultState ;
+    }
+}

+ 158 - 0
src/main/java/com/lightinit/hsdataplatform/controller/admin/APIRecommendationController.java

@@ -0,0 +1,158 @@
+package com.lightinit.hsdataplatform.controller.admin;
+
+import com.lightinit.hsdataplatform.dictionary.DicResourceType;
+import com.lightinit.hsdataplatform.dictionary.DicSortCategory;
+import com.lightinit.hsdataplatform.entity.BaseExample;
+import com.lightinit.hsdataplatform.entity.ResourceSort;
+import com.lightinit.hsdataplatform.model.ResultState;
+import com.lightinit.hsdataplatform.model.admin.DataRecommenAddModel;
+import com.lightinit.hsdataplatform.model.admin.DataRecommendationListModel;
+import com.lightinit.hsdataplatform.model.admin.DataRecommendationSearchModel;
+import com.lightinit.hsdataplatform.service.admin.IDataRecommendationService;
+import org.springframework.beans.factory.annotation.Autowired;
+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.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.ModelAndView;
+
+import java.util.Date;
+import java.util.List;
+
+@Controller
+@RequestMapping(value="/admin/APIRecommendation")
+public class APIRecommendationController extends BaseController {
+    @Autowired
+    private IDataRecommendationService dataRecommendationService;
+    @RequestMapping(value="defaultIndex.htm")
+    public ModelAndView defaultIndex() {
+        ModelAndView modelAndView = new ModelAndView("/admin/apiRecommendation/default");
+        return modelAndView;
+    }
+
+
+    /**
+     * 默认列表
+     * @param inputModel
+     * @param pageNo
+     * @return
+     */
+    @RequestMapping(value="queryDefaultList.action")
+    public ModelAndView queryDefaultList(DataRecommendationSearchModel inputModel, @RequestParam(defaultValue = "1") int pageNo) {
+        ModelAndView modelAndView = new ModelAndView("/admin/apiRecommendation/defaultList");
+        BaseExample.Page pager = new BaseExample.Page(pageNo, 10);
+        inputModel.setPage(pager);
+        //inputModel.setSortCategory(DicSortCategory.DEFAULT_SORT);
+        inputModel.setResourceType(DicResourceType.API);
+        List<DataRecommendationListModel> outputModel = dataRecommendationService.queryDefaultList(inputModel);
+        pager.setTotal(dataRecommendationService.queryDefaultCount(inputModel));
+        modelAndView.addObject("list", outputModel);
+        modelAndView.addObject("pager", pager);
+        modelAndView.addObject("sortCategory",DicSortCategory.DEFAULT_SORT);
+        return modelAndView;
+    }
+    @RequestMapping(value="home.htm")
+    public ModelAndView home() {
+        ModelAndView modelAndView = new ModelAndView("/admin/apiRecommendation/home");
+        return modelAndView;
+    }
+
+    /**
+     * 首页列表
+     * @param inputModel
+     * @param
+     * @return
+     */
+    @RequestMapping(value="queryHomeList.action")
+    public ModelAndView queryHomeList(DataRecommendationSearchModel inputModel) {
+        ModelAndView modelAndView = new ModelAndView("/admin/apiRecommendation/homeList");
+        inputModel.setSortCategory(DicSortCategory.HOME_PAGE_SORT);
+        inputModel.setResourceType(DicResourceType.API);
+        List<DataRecommendationListModel> outputModel = dataRecommendationService.queryList(inputModel);
+        modelAndView.addObject("list", outputModel);
+        modelAndView.addObject("sortCategory", inputModel.getSortCategory());
+        return modelAndView;
+    }
+    @RequestMapping(value="selection.htm")
+    public ModelAndView selection() {
+        ModelAndView modelAndView = new ModelAndView("/admin/apiRecommendation/selection");
+        return modelAndView;
+    }
+
+    /**
+     * 精选列表
+     * @param inputModel
+     * @param
+     * @return
+     */
+    @RequestMapping(value="querySelectionList.action")
+    public ModelAndView querySelectionList(DataRecommendationSearchModel inputModel, @RequestParam(defaultValue = "1") int pageNo) {
+        ModelAndView modelAndView = new ModelAndView("/admin/apiRecommendation/selectionList");
+        BaseExample.Page pager = new BaseExample.Page(pageNo, 10);
+        inputModel.setPage(pager);
+        inputModel.setSortCategory(DicSortCategory.SELECTION_SORTING);
+        inputModel.setResourceType(DicResourceType.API);
+        List<DataRecommendationListModel> outputModel = dataRecommendationService.queryList(inputModel);
+        pager.setTotal(dataRecommendationService.queryCount(inputModel));
+        modelAndView.addObject("list", outputModel);
+        modelAndView.addObject("pager", pager);
+        modelAndView.addObject("sortCategory", inputModel.getSortCategory());
+        return modelAndView;
+    }
+    @RequestMapping(value="add.htm/{sortCategory}")
+    public ModelAndView add(@PathVariable String sortCategory) {
+        ModelAndView modelAndView = new ModelAndView("/admin/apiRecommendation/add");
+        modelAndView.addObject("resourceType", DicResourceType.getInstacne().getDicMap());
+        modelAndView.addObject("type", sortCategory);
+        return modelAndView;
+    }
+    @RequestMapping(value="add1.htm/{resourceId}/{sortCategory}")
+    public ModelAndView add1(@PathVariable Long resourceId,@PathVariable String sortCategory) {
+        ModelAndView modelAndView = new ModelAndView("/admin/apiRecommendation/move");
+        ResourceSort model = new  ResourceSort();
+        model.setResourceId(resourceId);
+        model.setCreatedAt(new Date());
+        model.setSortCategory(sortCategory);
+        modelAndView.addObject("model", model);
+        return modelAndView;
+    }
+
+    @RequestMapping(value="addList.htm")
+    public ModelAndView addList(DataRecommendationSearchModel inputModel, @RequestParam(defaultValue = "1") int pageNo) {
+        ModelAndView modelAndView = new ModelAndView("/admin/apiRecommendation/addList");
+        BaseExample.Page pager = new BaseExample.Page(pageNo, 10);
+        inputModel.setPage(pager);
+        inputModel.setResourceType(DicResourceType.API);
+        List<DataRecommendationListModel> outputModel = dataRecommendationService.queryResourceList(inputModel);
+        pager.setTotal(dataRecommendationService.queryResourceCount(inputModel));
+        modelAndView.addObject("list", outputModel);
+        modelAndView.addObject("pager", pager);
+        return modelAndView;
+    }
+    @RequestMapping(value="doAdd.action")
+    @ResponseBody
+    public ResultState doAdd(DataRecommenAddModel inputModel) {
+        ResultState resultState = dataRecommendationService.doAdd(inputModel);
+        return resultState;
+    }
+    @RequestMapping(value="move.htm/{id}")
+    public ModelAndView move(@PathVariable Long id) {
+        ModelAndView modelAndView = new ModelAndView("/admin/apiRecommendation/move");
+        ResourceSort model = dataRecommendationService.selectById(id);
+        modelAndView.addObject("model", model);
+        return modelAndView;
+    }
+    @RequestMapping(value="doMove.action")
+    @ResponseBody
+    public ResultState doMove(DataRecommenAddModel inputModel) {
+        ResultState resultState = dataRecommendationService.doMove(inputModel);
+        return resultState;
+    }
+    @RequestMapping(value="delete.action/{id}")
+    @ResponseBody
+    public ResultState delete(@PathVariable Long id) {
+        ResultState resultState = dataRecommendationService.delete(id);
+        return resultState;
+    }
+}

+ 144 - 0
src/main/java/com/lightinit/hsdataplatform/controller/admin/APIToExamineController.java

@@ -0,0 +1,144 @@
+package com.lightinit.hsdataplatform.controller.admin;
+
+import com.lightinit.hsdataplatform.common.HttpUtil;
+import com.lightinit.hsdataplatform.dictionary.DicPaasApi;
+import com.lightinit.hsdataplatform.dictionary.DicPublishApiState;
+import com.lightinit.hsdataplatform.entity.BaseExample;
+import com.lightinit.hsdataplatform.entity.ResourceApiInterfaceWithBLOBs;
+import com.lightinit.hsdataplatform.model.ResultState;
+import com.lightinit.hsdataplatform.model.admin.*;
+import com.lightinit.hsdataplatform.service.admin.IApiPublishService;
+import com.lightinit.hsdataplatform.service.admin.IPaasService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.validation.BindingResult;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpSession;
+import javax.validation.Valid;
+import java.util.List;
+import java.util.Map;
+
+import static com.lightinit.hsdataplatform.controller.admin.BaseController.getAllFieldInvalidResultState;
+
+@Controller
+@RequestMapping("/admin/api_toExamine")
+public class APIToExamineController {
+
+    @Autowired
+    private IApiPublishService apiPublishService ;
+    @Autowired
+    private IPaasService paasService ;
+
+    @RequestMapping(value = "index.htm")
+    public ModelAndView index(){
+        ModelAndView modelAndView = new ModelAndView("admin/api_toExamine/index");
+        modelAndView.addObject("dicPublishApiState", DicPublishApiState.getInstacne().getDicMap());
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "list.action")
+    public ModelAndView list(APIPublishSearchModel inputModel, @RequestParam(defaultValue = "1") int pageNo,
+                             HttpSession session) {
+        LoginUser loginUser = (LoginUser) session.getAttribute(LoginUser.SESSION_KEY_LOGIN_USER);
+        ModelAndView modelAndView = new ModelAndView("admin/api_toExamine/list");
+        BaseExample.Page pager = new BaseExample.Page(pageNo, 10);
+        inputModel.setPage(pager);
+        int isFlag = apiPublishService.isAdminFalg(loginUser.getId()) ;
+        if (!(isFlag>0)){
+            inputModel.setOrgId(loginUser.getOrgId());
+        }
+        inputModel.setPublishState(DicPublishApiState.PENDING);
+        List<APIPublishListModel> outputModel = apiPublishService.queryList(inputModel);
+        pager.setTotal(apiPublishService.queryCount(inputModel));
+        modelAndView.addObject("list", outputModel);
+        modelAndView.addObject("pager", pager);
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "toExamine.htm/{id}/{publishInfoId}")
+    public ModelAndView toExamine(@PathVariable("id") long id,@PathVariable("publishInfoId") long publishInfoId) throws Exception {
+        ModelAndView modelAndView = new ModelAndView("admin/api_toExamine/publishInfo_toExamine");
+        modelAndView.addObject("resource", apiPublishService.queryOneViewResource(id)) ;
+        List<ResourceApiInterfaceWithBLOBs> resourceApiInterfaceWithBLOBsList = apiPublishService.queryOneResourceAPIInterface(id) ;
+        modelAndView.addObject("resourceApiInterface", resourceApiInterfaceWithBLOBsList) ;
+        modelAndView.addObject("publishInfo", apiPublishService.queryOnePublishInfoById(publishInfoId)) ;
+        modelAndView.addObject("publishSettingList", apiPublishService.queryListPublishSettingByInfoId(publishInfoId)) ;
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "publishSettingView.htm/{id}")
+    public ModelAndView publishSettingView(@PathVariable("id") long id){
+        ModelAndView modelAndView = new ModelAndView("admin/api_publish/publishSettingView");
+        modelAndView.addObject("publishSetting", apiPublishService.queryOnePublishSettingById(id)) ;
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "toExamine.action")
+    @ResponseBody
+    public ResultState toExamine(APIToExamineModel inputModel) {
+        ResultState<Long> resultState = apiPublishService.toExamine(inputModel) ;
+        return resultState ;
+    }
+
+    @RequestMapping(value = "publishInfoView.htm/{id}/{publishInfoId}")
+    public ModelAndView publishInfoView(@PathVariable("id") long id,@PathVariable("publishInfoId") long publishInfoId){
+        ModelAndView modelAndView = new ModelAndView("admin/api_toExamine/publishInfo_view");
+        modelAndView.addObject("resource", apiPublishService.queryOneViewResource(id)) ;
+        List<ResourceApiInterfaceWithBLOBs> resourceApiInterfaceWithBLOBsList = apiPublishService.queryOneResourceAPIInterface(id) ;
+        modelAndView.addObject("resourceApiInterface", resourceApiInterfaceWithBLOBsList) ;
+        modelAndView.addObject("publishInfo", apiPublishService.queryOnePublishInfoById(publishInfoId)) ;
+        modelAndView.addObject("publishSettingList", apiPublishService.queryListPublishSettingByInfoId(publishInfoId)) ;
+        return modelAndView;
+    }
+
+    //===========================添加路由规则=========================
+    @RequestMapping(value = "routeView.htm/{id}/{publishInfoId}")
+    public ModelAndView routeView(@PathVariable("id") long id,@PathVariable("publishInfoId") long publishInfoId) throws Exception {
+        ModelAndView modelAndView = new ModelAndView("admin/api_toExamine/routeView");
+        modelAndView.addObject("resource", apiPublishService.queryOneViewResource(id)) ;
+        List<ResourceApiInterfaceWithBLOBs> resourceApiInterfaceWithBLOBsList = apiPublishService.queryOneResourceAPIInterface(id) ;
+        modelAndView.addObject("resourceApiInterface", resourceApiInterfaceWithBLOBsList) ;
+        modelAndView.addObject("publishInfo", apiPublishService.queryOnePublishInfoById(publishInfoId)) ;
+        modelAndView.addObject("publishSettingList", apiPublishService.queryListPublishSettingByInfoId(publishInfoId)) ;
+        //获取租户
+        Map<String,Object> tenants = HttpUtil.strToMap(HttpUtil.httpGet(DicPaasApi.TENANT,null,null)) ;
+        modelAndView.addObject("tenant", tenants) ;
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "routeView.action")
+    @ResponseBody
+    public ResultState routeViewPost(@Valid RouteAddInputModel inputModel, BindingResult bindingResult) {
+        if (bindingResult.hasErrors()){
+            return getAllFieldInvalidResultState(inputModel, bindingResult);
+        }
+        ResultState<Long> resultState = paasService.toExamine(inputModel) ;
+        return resultState ;
+    }
+
+    @RequestMapping(value = "outRouteView.htm/{id}/{publishInfoId}/{outId2}")
+    public ModelAndView outRouteView(@PathVariable("id") long id,@PathVariable("publishInfoId") long publishInfoId
+    ,@PathVariable("outId2") long outId2) throws Exception {
+        ModelAndView modelAndView = new ModelAndView("admin/api_toExamine/outRouteView");
+        modelAndView.addObject("resource", apiPublishService.queryOneViewResource(id)) ;
+        List<ResourceApiInterfaceWithBLOBs> resourceApiInterfaceWithBLOBsList = apiPublishService.queryOneResourceAPIInterface(id) ;
+        modelAndView.addObject("resourceApiInterface", resourceApiInterfaceWithBLOBsList) ;
+        modelAndView.addObject("publishInfo", apiPublishService.queryOnePublishInfoById(publishInfoId)) ;
+        modelAndView.addObject("publishSettingList", apiPublishService.queryListPublishSettingByInfoId(publishInfoId)) ;
+        modelAndView.addObject("outId2", outId2) ;
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "outRouteView.action")
+    @ResponseBody
+    public ResultState outRouteView(OutRouteAddInputModel inputModel) {
+        ResultState<Long> resultState = paasService.outRouteView(inputModel) ;
+        return resultState ;
+    }
+
+}

+ 103 - 0
src/main/java/com/lightinit/hsdataplatform/controller/admin/AccountController.java

@@ -0,0 +1,103 @@
+package com.lightinit.hsdataplatform.controller.admin;
+
+import com.google.code.kaptcha.Constants;
+import com.lightinit.hsdataplatform.common.ConfigUtils;
+import com.lightinit.hsdataplatform.common.SysContants;
+import com.lightinit.hsdataplatform.common.TokenUntils;
+import com.lightinit.hsdataplatform.json.pojo.ErrorEntity;
+import com.lightinit.hsdataplatform.json.pojo.LoginResult;
+import com.lightinit.hsdataplatform.model.admin.LoginUser;
+import com.lightinit.hsdataplatform.service.admin.IAccountService;
+import org.apache.shiro.SecurityUtils;
+import org.apache.shiro.authc.*;
+import org.apache.shiro.subject.Subject;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.ModelMap;
+import org.springframework.util.StringUtils;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+/**
+ * Created by WangYao on 2018/5/21.
+ */
+@Controller("adminAccountController")
+@RequestMapping("/admin/account")
+public class AccountController {
+
+    @Autowired
+    private IAccountService accountService;
+
+    @RequestMapping(value = {"login.htm", "login"},method = RequestMethod.GET)
+    public String printMain(ModelMap modelMap) {
+        return "admin/account/login";
+    }
+
+    @ResponseBody
+    @RequestMapping(method = RequestMethod.POST,value = "login.action")
+    public LoginResult printLoginAction(ModelMap model,HttpSession session, @RequestParam String username,@RequestParam String password){
+        LoginResult result = new LoginResult();
+        UsernamePasswordToken token = new UsernamePasswordToken(username, password);
+        Subject currentUser = SecurityUtils.getSubject();
+        //token.setRememberMe(true);
+        try {
+            //在调用了login方法后,SecurityManager会收到AuthenticationToken,并将其发送给已配置的Realm执行必须的认证检查
+            currentUser.login(token);
+            if (currentUser.isAuthenticated()) {
+                session.setAttribute("userinfo", username);
+                session.setAttribute(LoginUser.SESSION_KEY_LOGIN_USER, accountService.getLoginUserByUsername(username));
+                result.setStatus(2001);
+            } else {
+                token.clear();
+            }
+        } catch (UnknownAccountException uae) {
+            result.setStatus(2003);
+            token.clear();
+        } catch (IncorrectCredentialsException ice) {
+            result.setStatus(2004);
+            token.clear();
+        } catch (LockedAccountException lae) {
+            result.setStatus(2005);
+            token.clear();
+        } catch (ExcessiveAttemptsException eae) {
+            result.setStatus(2006);
+            token.clear();
+        } catch (AuthenticationException ae) {
+            //通过处理Shiro的运行时AuthenticationException就可以控制用户登录失败或密码错误时的情景
+            result.setStatus(2007);
+        }
+        result.setMessage(ErrorEntity.getMsg(result.getStatus()));
+        return result;
+    }
+    @ResponseBody
+    @RequestMapping(method = RequestMethod.POST,value = "logout.action")
+    public ModelAndView logout(ModelMap model,HttpSession session){
+        Subject currentUser = SecurityUtils.getSubject();
+        try {
+            currentUser.logout();
+        } catch (Exception e) {
+        }
+        String loyout = ConfigUtils.getConfiguration(SysContants.PropertyFilePath.CAS).getString(SysContants.CasKey.REDIRECTURL) ;
+
+        return new ModelAndView("redirect:"+loyout);
+    }
+
+    @ResponseBody
+    @RequestMapping(method = RequestMethod.GET,value = "auth.action")
+    public ModelAndView printAuthAction(ModelMap model, HttpServletRequest request, HttpServletResponse response,@CookieValue(defaultValue = "") String username){
+        try {
+           if(StringUtils.isEmpty(username)){
+               response.setStatus(401);
+           }else{
+               response.setStatus(200);
+           }
+        } catch (Exception e) {
+            response.setStatus(401);
+        }
+        return null;
+    }
+}

+ 81 - 0
src/main/java/com/lightinit/hsdataplatform/controller/admin/AccountManageController.java

@@ -0,0 +1,81 @@
+package com.lightinit.hsdataplatform.controller.admin;
+
+import com.lightinit.hsdataplatform.dictionary.DicAccountManageTransactionTransType;
+import com.lightinit.hsdataplatform.entity.BaseExample;
+import com.lightinit.hsdataplatform.model.admin.*;
+import com.lightinit.hsdataplatform.service.admin.IAccountManageService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.servlet.ModelAndView;
+
+import java.util.List;
+
+@Controller
+@RequestMapping("/admin/accountManage")
+public class AccountManageController {
+
+
+    @Autowired
+    private IAccountManageService accountManageService ;
+
+    @RequestMapping(value = "balance_index.htm")
+    public ModelAndView balance_index(){
+        ModelAndView modelAndView = new ModelAndView("admin/accountManage/balance_index");
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "balance_list.action")
+    public ModelAndView balance_list(AccountManageBalanceDtoModel inputModel, @RequestParam(defaultValue = "1") int pageNo) {
+        ModelAndView modelAndView = new ModelAndView("admin/accountManage/balance_list");
+        BaseExample.Page pager = new BaseExample.Page(pageNo, 10);
+        inputModel.setPage(pager);
+        List<AccountManageBalanceVOModel> outputModel = accountManageService.queryBalanceList(inputModel);
+        pager.setTotal(accountManageService.queryBalanceCount(inputModel));
+        modelAndView.addObject("list", outputModel);
+        modelAndView.addObject("pager", pager);
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "recharge_index.htm")
+    public ModelAndView recharge_index(){
+        ModelAndView modelAndView = new ModelAndView("admin/accountManage/recharge_index");
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "recharge_list.action")
+    public ModelAndView recharge_list(AccountManageRechargeDtoModel inputModel, @RequestParam(defaultValue = "1") int pageNo) {
+        ModelAndView modelAndView = new ModelAndView("admin/accountManage/recharge_list");
+        BaseExample.Page pager = new BaseExample.Page(pageNo, 10);
+        inputModel.setPage(pager);
+        inputModel.setTransType(DicAccountManageTransactionTransType.RECHARGE);
+        List<AccountManageRechargeVOModel> outputModel = accountManageService.queryRechargeList(inputModel);
+        pager.setTotal(accountManageService.queryRechargeCount(inputModel));
+        modelAndView.addObject("list", outputModel);
+        modelAndView.addObject("pager", pager);
+        modelAndView.addObject("sumTransAmount", accountManageService.querySumTransAmount(inputModel));
+        return modelAndView;
+    }
+
+
+
+    @RequestMapping(value = "transaction_index.htm")
+    public ModelAndView transaction_index(){
+        ModelAndView modelAndView = new ModelAndView("admin/accountManage/transaction_index");
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "transaction_list.action")
+    public ModelAndView transaction_list(AccountManageRechargeDtoModel inputModel, @RequestParam(defaultValue = "1") int pageNo) {
+        ModelAndView modelAndView = new ModelAndView("admin/accountManage/transaction_list");
+        BaseExample.Page pager = new BaseExample.Page(pageNo, 10);
+        inputModel.setPage(pager);
+        inputModel.setTransType(DicAccountManageTransactionTransType.TRANSACTION);
+        List<AccountManageTransactionVOModel> outputModel = accountManageService.queryTransactionList(inputModel);
+        pager.setTotal(accountManageService.queryTransactionCount(inputModel));
+        modelAndView.addObject("list", outputModel);
+        modelAndView.addObject("pager", pager);
+        return modelAndView;
+    }
+}

+ 85 - 0
src/main/java/com/lightinit/hsdataplatform/controller/admin/ActivityMgrController.java

@@ -0,0 +1,85 @@
+package com.lightinit.hsdataplatform.controller.admin;
+
+import com.lightinit.hsdataplatform.dictionary.DicActivityState;
+import com.lightinit.hsdataplatform.dictionary.DicActivityType;
+import com.lightinit.hsdataplatform.entity.Activity;
+import com.lightinit.hsdataplatform.entity.ActivityWithBLOBs;
+import com.lightinit.hsdataplatform.entity.BaseExample;
+import com.lightinit.hsdataplatform.model.ResultState;
+import com.lightinit.hsdataplatform.model.admin.ActivitySearchModel;
+import com.lightinit.hsdataplatform.service.admin.IActivityMgrService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.servlet.ModelAndView;
+
+import java.util.List;
+
+/**
+ * 用户管理
+ */
+@Controller
+@RequestMapping("/admin/activity_mgr")
+public class ActivityMgrController {
+
+    @Autowired
+    private IActivityMgrService activityMgrService;
+    @RequestMapping(value = "index.htm")
+    public ModelAndView index(){
+        ModelAndView modelAndView = new ModelAndView("admin/activity_mgr/index");
+        modelAndView.addObject("dicActivityType", DicActivityType.getInstacne().getDicMap());
+        modelAndView.addObject("dicActivityState", DicActivityState.getInstacne().getDicMap());
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "list.action")
+    public ModelAndView list(ActivitySearchModel inputModel, @RequestParam(defaultValue = "1") int pageNo){
+        ModelAndView modelAndView = new ModelAndView("admin/activity_mgr/list");
+        BaseExample.Page pager = new BaseExample.Page();
+        pager.setPageNo(pageNo);
+        List<Activity> outputModel = activityMgrService.queryList(inputModel, pager);
+        pager.setTotal(activityMgrService.queryCount(inputModel));
+        modelAndView.addObject("list", outputModel);
+        modelAndView.addObject("pager", pager);
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "add.htm")
+    public ModelAndView add(){
+        ModelAndView modelAndView = new ModelAndView("admin/activity_mgr/add");
+        modelAndView.addObject("dicActivityType", DicActivityType.getInstacne().getDicMap());
+        modelAndView.addObject("dicActivityState", DicActivityState.getInstacne().getDicMap());
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "add.action")
+    @ResponseBody
+    public ResultState doAdd(ActivityWithBLOBs inputModel){
+        ResultState resultState = activityMgrService.add(inputModel);
+        return resultState;
+    }
+
+    @RequestMapping(value = "edit.htm/{id}")
+    public ModelAndView edit(@PathVariable long id){
+        ModelAndView modelAndView = new ModelAndView("admin/activity_mgr/edit");
+        modelAndView.addObject("busiModel", activityMgrService.queryOne(id));
+        modelAndView.addObject("dicActivityType", DicActivityType.getInstacne().getDicMap());
+        modelAndView.addObject("dicActivityState", DicActivityState.getInstacne().getDicMap());
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "edit.action")
+    @ResponseBody
+    public ResultState doEdit(ActivityWithBLOBs inputModel){
+        ResultState resultState = activityMgrService.edit(inputModel);
+        return resultState;
+    }
+
+    @RequestMapping(value = "delete.action/{id}")
+    @ResponseBody
+    public ResultState delete(@PathVariable long id){
+        ResultState<Long> resultState = activityMgrService.delete(id);
+        return resultState;
+    }
+
+}

+ 94 - 0
src/main/java/com/lightinit/hsdataplatform/controller/admin/AuthorizationController.java

@@ -0,0 +1,94 @@
+package com.lightinit.hsdataplatform.controller.admin;
+
+
+import com.lightinit.hsdataplatform.dictionary.DicAuthorizationState;
+import com.lightinit.hsdataplatform.dictionary.DicPlatformType;
+import com.lightinit.hsdataplatform.dictionary.DicResourceType;
+import com.lightinit.hsdataplatform.entity.BaseExample;
+import com.lightinit.hsdataplatform.model.ResultState;
+import com.lightinit.hsdataplatform.model.admin.AuthorizationHeableModel;
+import com.lightinit.hsdataplatform.model.admin.AuthorizationListModel;
+import com.lightinit.hsdataplatform.model.admin.AuthorizationSearchModel;
+import com.lightinit.hsdataplatform.model.admin.LoginUser;
+import com.lightinit.hsdataplatform.service.admin.IAuthorizationService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.validation.BindingResult;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpSession;
+import javax.validation.Valid;
+import java.util.List;
+
+@Controller
+@RequestMapping("/admin/authorization")
+public class AuthorizationController extends BaseController{
+
+    @Autowired
+    private IAuthorizationService authorizationService ;
+
+    @RequestMapping(value = "index.htm")
+    public ModelAndView index(){
+        ModelAndView modelAndView = new ModelAndView("admin/authorization/index");
+        modelAndView.addObject("authorizationState", DicAuthorizationState.getInstacne().getDicMap()) ;
+        modelAndView.addObject("resourceType", DicResourceType.getInstacne().getDicMap()) ;
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "list.action")
+    public ModelAndView list(AuthorizationSearchModel inputModel, @RequestParam(defaultValue = "1") int pageNo,HttpSession session){
+        LoginUser loginUser = (LoginUser) session.getAttribute(LoginUser.SESSION_KEY_LOGIN_USER);
+        ModelAndView modelAndView = new ModelAndView("admin/authorization/list");
+        BaseExample.Page pager = new BaseExample.Page();
+        pager.setPageNo(pageNo);
+        inputModel.setPage(pager);
+        int isFlag = authorizationService.isAdminFalg(loginUser.getId()) ;
+        if (!(isFlag>0)){
+            inputModel.setOrgId(loginUser.getOrgId());
+        }
+        List<AuthorizationListModel> outputModel = authorizationService.queryList(inputModel);
+        pager.setTotal(authorizationService.queryCount(inputModel));
+        modelAndView.addObject("list", outputModel);
+        modelAndView.addObject("pager", pager);
+        modelAndView.addObject("open", DicPlatformType.OPEN);
+        modelAndView.addObject("share", DicPlatformType.SHARE);
+        modelAndView.addObject("state", DicAuthorizationState.AUTHORIZE_WAIT);
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "handle.htm/{id}")
+    public ModelAndView handle(@PathVariable long id,String platfromType,String outId1,long applier){
+        ModelAndView modelAndView = new ModelAndView("admin/authorization/handle");
+        modelAndView.addObject("authorization", authorizationService.queryOneView(id));
+        modelAndView.addObject("open", DicPlatformType.OPEN);
+        modelAndView.addObject("share", DicPlatformType.SHARE);
+        modelAndView.addObject("outId1", outId1);
+        modelAndView.addObject("applier", applier);
+        modelAndView.addObject("platfromType",platfromType);
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "handle.action")
+    @ResponseBody
+    public ResultState doEdit( @Valid AuthorizationHeableModel inputModel, BindingResult bindingResult,HttpSession session){
+        if (bindingResult.hasErrors()){
+            return getAllFieldInvalidResultState(inputModel, bindingResult);
+        }
+        LoginUser loginUser = (LoginUser) session.getAttribute(LoginUser.SESSION_KEY_LOGIN_USER);
+        ResultState<Long> resultState = authorizationService.handle(inputModel,loginUser.getId());
+        return resultState;
+    }
+
+    @RequestMapping(value = "view.htm/{id}")
+    public ModelAndView view(@PathVariable long id){
+        ModelAndView modelAndView = new ModelAndView("admin/authorization/view");
+        modelAndView.addObject("authorization", authorizationService.queryOneView(id));
+        modelAndView.addObject("open", DicPlatformType.OPEN);
+        modelAndView.addObject("share", DicPlatformType.SHARE);
+        return modelAndView;
+    }
+}

+ 62 - 0
src/main/java/com/lightinit/hsdataplatform/controller/admin/BaseController.java

@@ -0,0 +1,62 @@
+package com.lightinit.hsdataplatform.controller.admin;
+
+import com.lightinit.hsdataplatform.annotation.FieldDescriberHelper;
+import com.lightinit.hsdataplatform.model.ResultState;
+import com.lightinit.hsdataplatform.model.ResultStateCode;
+import org.springframework.validation.BindingResult;
+import org.springframework.validation.FieldError;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+/**
+ * @author WangYao
+ * @date 2018/6/2 11:33
+ * @description 控制器基类
+ */
+public class BaseController {
+
+    public static <T> LinkedHashMap<String, String> getAllFieldInvalidMsg(T modelObj, BindingResult bindingResult){
+        if (modelObj == null || bindingResult == null){
+            return null;
+        }
+        LinkedHashMap<String, String> result = new LinkedHashMap<>();
+        for (FieldError error : bindingResult.getFieldErrors()){
+            String fieldName = error.getField();
+            String fieldDescription = FieldDescriberHelper.getFieldDescription(modelObj, fieldName);
+            result.put(fieldName, fieldDescription + error.getDefaultMessage());
+        }
+
+        return result;
+    }
+
+    public static <T> Map.Entry<String, String> getFirstFieldInvalidMsg(T modelObj, BindingResult bindingResult){
+        LinkedHashMap<String, String> allFieldInvalidMsg = getAllFieldInvalidMsg(modelObj, bindingResult);
+        return allFieldInvalidMsg == null ? null : allFieldInvalidMsg.entrySet().stream().findFirst().get();
+    }
+
+    public static ResultState buildInvalidResultState(String message){
+        return buildInvalidResultState(message, null);
+    }
+
+    public static <T> ResultState<T> buildInvalidResultState(int stateCode, String message){
+        return buildInvalidResultState(stateCode, message, null);
+    }
+
+    public static <T> ResultState<T> buildInvalidResultState(String message, T data){
+        return buildInvalidResultState(ResultStateCode.INVALID_DATA, message, data);
+    }
+
+    public static <T> ResultState<T> buildInvalidResultState(int stateCode, String message, T data){
+        return new ResultState(stateCode, message, data);
+    }
+
+    public static <T> ResultState<LinkedHashMap<String, String>> getAllFieldInvalidResultState(T modelObj, BindingResult bindingResult){
+        return buildInvalidResultState("", getAllFieldInvalidMsg(modelObj, bindingResult));
+    }
+
+    public static <T> ResultState getFirstInvalidResultState(T modelObj, BindingResult bindingResult){
+        Map.Entry<String, String> firstFieldInvalidMsg = getFirstFieldInvalidMsg(modelObj, bindingResult);
+        return buildInvalidResultState(firstFieldInvalidMsg == null ? "" : firstFieldInvalidMsg.getValue());
+    }
+}

+ 33 - 0
src/main/java/com/lightinit/hsdataplatform/controller/admin/CatelogCountCountroller.java

@@ -0,0 +1,33 @@
+package com.lightinit.hsdataplatform.controller.admin;
+
+import com.lightinit.hsdataplatform.model.admin.CatelogCountListModel;
+import com.lightinit.hsdataplatform.model.admin.CatelogCountSearchModel;
+import com.lightinit.hsdataplatform.service.admin.ICatelogCountService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.servlet.ModelAndView;
+
+import java.util.List;
+
+@Controller
+    @RequestMapping(value = "/admin/catelogCount")
+public class CatelogCountCountroller extends BaseController {
+    @Autowired
+    private ICatelogCountService  catelogCountService;
+    @RequestMapping(value = "index.htm")
+    public ModelAndView index(){
+        ModelAndView modelAndView = new ModelAndView("admin/access_statistics/catelogCount");
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "list.action")
+    public ModelAndView list(CatelogCountSearchModel inputModel) {
+        ModelAndView modelAndView = new ModelAndView("admin/access_statistics/catelogCountList");
+
+        List<CatelogCountListModel> outputModel = catelogCountService.queryList(inputModel);
+        modelAndView.addObject("list", outputModel);
+        return modelAndView;
+    }
+
+}

+ 78 - 0
src/main/java/com/lightinit/hsdataplatform/controller/admin/ClassificationAndAggregationController.java

@@ -0,0 +1,78 @@
+package com.lightinit.hsdataplatform.controller.admin;
+
+import com.lightinit.hsdataplatform.dictionary.DicResourceType;
+import com.lightinit.hsdataplatform.entity.BaseExample;
+import com.lightinit.hsdataplatform.entity.Resource;
+import com.lightinit.hsdataplatform.entity.ResourceApiInterfaceWithBLOBs;
+import com.lightinit.hsdataplatform.model.ResultState;
+import com.lightinit.hsdataplatform.model.admin.AggregationModel;
+import com.lightinit.hsdataplatform.model.admin.ClassificationAndAggregationListModel;
+import com.lightinit.hsdataplatform.model.admin.ClassificationAndAggregationSearchModel;
+import com.lightinit.hsdataplatform.service.admin.IApiPublishService;
+import com.lightinit.hsdataplatform.service.admin.IClassificationAndAggregationService;
+import com.lightinit.hsdataplatform.service.admin.IResourceMicroappRegisterService;
+import org.springframework.beans.factory.annotation.Autowired;
+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.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.ModelAndView;
+
+import java.util.List;
+@Controller
+@RequestMapping(value = "/admin/classificationAndAggregation")
+public class ClassificationAndAggregationController extends BaseController {
+    @Autowired
+    private IClassificationAndAggregationService classificationAndAggregationService;
+    @Autowired
+    private IApiPublishService apiPublishService ;
+    @RequestMapping(value="index.htm")
+    public ModelAndView index() {
+        ModelAndView modelAndView = new ModelAndView("admin/classificationandAggregation/index");
+        modelAndView.addObject("resourceType",DicResourceType.getInstacne().getDicMap());
+        return modelAndView;
+    }
+    @RequestMapping(value = "list.action")
+    public ModelAndView list(ClassificationAndAggregationSearchModel inputModel, @RequestParam(defaultValue = "1") int pageNo) {
+        ModelAndView modelAndView = new ModelAndView("admin/classificationandAggregation/list");
+        BaseExample.Page pager = new BaseExample.Page(pageNo, 10);
+        inputModel.setPage(pager);
+        List<ClassificationAndAggregationListModel> outputModel = classificationAndAggregationService.queryList(inputModel);
+        pager.setTotal(classificationAndAggregationService.queryCount(inputModel));
+        modelAndView.addObject("list", outputModel);
+        modelAndView.addObject("pager", pager);
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "apiview.htm/{id}/{publishInfoId}")
+    public ModelAndView apiview(@PathVariable("id") long id, @PathVariable("publishInfoId") long publishInfoId) {
+        ModelAndView modelAndView = new ModelAndView("admin/classificationandAggregation/apiview");
+        modelAndView.addObject("resource", apiPublishService.queryOneViewResource(id)) ;
+        List<ResourceApiInterfaceWithBLOBs> resourceApiInterfaceWithBLOBsList = apiPublishService.queryOneResourceAPIInterface(id) ;
+        modelAndView.addObject("resourceApiInterface", resourceApiInterfaceWithBLOBsList) ;
+        modelAndView.addObject("publishInfo", apiPublishService.queryOnePublishInfoById(publishInfoId)) ;
+        modelAndView.addObject("publishSettingList", apiPublishService.queryListPublishSettingByInfoId(publishInfoId)) ;
+        return modelAndView;
+    }
+
+    /**
+     * 跳转归类页面
+     * @param id
+     * @return
+     */
+    @RequestMapping(value = "aggregation.htm/{id}")
+    public ModelAndView aggregation(@PathVariable long id) {
+        ModelAndView modelAndView = new ModelAndView("admin/classificationandAggregation/aggregation");
+       modelAndView.addObject("resource",classificationAndAggregationService.aggregation(id));
+        return modelAndView;
+    }
+
+
+    @RequestMapping(value = "toAggregation.action")
+    @ResponseBody
+    public ResultState toAggregation(AggregationModel inputModel) {
+        ResultState resultState = classificationAndAggregationService.toAggregation(inputModel);
+        return resultState;
+    }
+}

+ 58 - 0
src/main/java/com/lightinit/hsdataplatform/controller/admin/CommonController.java

@@ -0,0 +1,58 @@
+package com.lightinit.hsdataplatform.controller.admin;
+
+import com.lightinit.hsdataplatform.common.RoleModulesUtilsPro;
+import com.lightinit.hsdataplatform.entity.SentryRole;
+import com.lightinit.hsdataplatform.model.admin.*;
+import com.lightinit.hsdataplatform.service.IRoleService;
+import com.lightinit.hsdataplatform.service.admin.ICommonService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 通用
+ */
+@Controller
+@RequestMapping("/admin/common")
+public class CommonController {
+
+    @Autowired
+    private ICommonService commonService;
+    @Autowired
+    private IRoleService roleService;
+    @Autowired
+    private RoleModulesUtilsPro roleModulesUtilsPro;
+
+    @RequestMapping(value = "sector_tree_data.action")
+    @ResponseBody
+    public List<TreeModel> getSectorTreeData(Long selectedId){
+        return commonService.querySectorTreeData(selectedId);
+    }
+
+    @RequestMapping(value = "resource_catelog_tree_data.action")
+    @ResponseBody
+    public List<TreeModel> getResourceCatelogTreeData(String resourceCatelogType, Long selectedId){
+        return commonService.queryResourceCatelogTreeData(resourceCatelogType, selectedId);
+    }
+
+    @RequestMapping(value = "role_tree_data.action")
+    @ResponseBody
+    public List<TreeModel> getRoleTreeData(Long selectedId){
+        return commonService.queryRoleTreeData(selectedId);
+    }
+
+    @RequestMapping(value = "module_tree_data.action")
+    @ResponseBody
+//    public List<TreeModel> getModuleTreeData(@RequestParam(required = false, value = "selectedIds[]") Long[] selectedIds, @RequestParam Long roleId){
+    public List<TreeModel> getModuleTreeData(@RequestBody RoleMgrModuleDataModel inputModel){
+        List<Long> moduleIds = null;
+        SentryRole sentryRole= roleService.QueryOne(inputModel.getRoleId());
+        if(sentryRole.getParentid() != null && sentryRole.getParentid() > 0) {
+            moduleIds = roleModulesUtilsPro.RoleHasModules(sentryRole.getParentid());
+        }
+        return commonService.queryModuleTreeData(moduleIds, inputModel.getSelectedModuleIds(), inputModel.getSelectedActionIds());
+    }
+
+}

+ 200 - 0
src/main/java/com/lightinit/hsdataplatform/controller/admin/ConsultController.java

@@ -0,0 +1,200 @@
+package com.lightinit.hsdataplatform.controller.admin;
+
+import com.lightinit.hsdataplatform.common.ConfigUtils;
+import com.lightinit.hsdataplatform.common.GuidGenerator;
+import com.lightinit.hsdataplatform.common.SysContants;
+import com.lightinit.hsdataplatform.common.UploadFileUtils;
+import com.lightinit.hsdataplatform.dictionary.DicNewsCategory;
+import com.lightinit.hsdataplatform.entity.BaseExample;
+import com.lightinit.hsdataplatform.model.ResultState;
+import com.lightinit.hsdataplatform.model.ResultStateCode;
+import com.lightinit.hsdataplatform.model.admin.ConsultSearchModel;
+import com.lightinit.hsdataplatform.model.admin.LoginUser;
+import com.lightinit.hsdataplatform.model.admin.NewModel;
+import com.lightinit.hsdataplatform.service.admin.IConsultService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.validation.BindingResult;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpSession;
+import java.io.File;
+import java.util.List;
+
+/**
+ * @Author: sunxiang
+ * @Date: 2018/7/5 13:56
+ * @Description:
+ **/
+@Controller
+@RequestMapping("/admin/consult_mgr")
+public class ConsultController extends BaseController{
+
+    @Autowired
+    private IConsultService consultService;
+    @RequestMapping(value = "index.htm")
+    public ModelAndView index(){
+        ModelAndView modelAndView = new ModelAndView("admin/consult_mgr/index");
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "list.action")
+    public ModelAndView list(ConsultSearchModel inputModel,@RequestParam(defaultValue = "1") int pageNo){
+        ModelAndView modelAndView = new ModelAndView("admin/consult_mgr/list");
+        BaseExample.Page pager = new BaseExample.Page();
+        pager.setPageNo(pageNo);
+        inputModel.setPage(pager);
+        pager.setTotal(consultService.queryCount(inputModel));
+        modelAndView.addObject("list", consultService.getList(inputModel));
+        modelAndView.addObject("pager", pager);
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "add.htm")
+    public ModelAndView add(){
+        ModelAndView modelAndView = new ModelAndView("admin/consult_mgr/add");
+        modelAndView.addObject("dicNewsCategory", DicNewsCategory.getInstacne().getDicMap());
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "edit.action/{id}")
+    public ModelAndView edit(@PathVariable Long id){
+        ModelAndView modelAndView = new ModelAndView("admin/consult_mgr/add");
+        if(id !=null){
+            ConsultSearchModel inputModel = new ConsultSearchModel();
+            inputModel.setId(id);
+            List<NewModel> list = consultService.getList(inputModel);
+            if(list!=null && list.size()>0){
+                NewModel newModel = list.get(0);
+                //放入映射路径
+                String imageContextPath = ConfigUtils.getConfiguration(SysContants.PropertyFilePath.CONFIG).getString(SysContants.PropertyKey.IMAGE_CONTEXT_PATH);
+                String imgTag = "<img src=\"";
+                if(newModel.getNewsContent()!=null){
+                 newModel.setNewsContent(newModel.getNewsContent().replaceAll(imgTag, imgTag + imageContextPath));
+                }
+                modelAndView.addObject("outputModel",newModel);
+            }
+        }
+        modelAndView.addObject("dicNewsCategory", DicNewsCategory.getInstacne().getDicMap());
+        return modelAndView;
+    }
+    /*
+    *@Description 文本提交/修改:根据是否有id来区别
+    *@Param
+    *@Date 2018/7/6
+    *@return
+    **/
+    @RequestMapping(value = "consult.action")
+    @ResponseBody
+    public ResultState consult(@Validated NewModel inputModel, BindingResult bindingResult, HttpSession session){
+        if(bindingResult.hasErrors()){
+            return getAllFieldInvalidResultState(inputModel,bindingResult);
+        }
+        LoginUser loginUser = (LoginUser) session.getAttribute(LoginUser.SESSION_KEY_LOGIN_USER);
+        inputModel.setUserId(loginUser.getId());
+        //得到图片保存路径开头映射头
+        String imageContextPath = ConfigUtils.getConfiguration(SysContants.PropertyFilePath.CONFIG).getString(SysContants.PropertyKey.IMAGE_CONTEXT_PATH);
+        //将图片上传绝对路径切成相对路径
+        inputModel.setNewsContent(inputModel.getNewsContent().replaceAll(imageContextPath,""));
+        ResultState resultState=null;
+        if(inputModel.getId()==null){
+            resultState=consultService.add(inputModel);
+        }else{
+            resultState=consultService.update(inputModel);
+        }
+        return resultState;
+    }
+
+
+    /*
+    *@Description 图片上传
+    *@Param 
+    *@Date 2018/7/6
+    *@return 
+    **/
+    @RequestMapping(value = "upload.action")
+    @ResponseBody
+    public ResultState upload(MultipartFile file){
+        // 保存图片文件
+        ResultState resultState = new ResultState();
+        String uniqueDir = GuidGenerator.generate() + File.separator;
+        String dataFileDir = UploadFileUtils.buildRelativeDir(SysContants.UploadFilePath.CONSULT_ROOT_DIR, uniqueDir, SysContants.UploadFilePath.CONSULT_RESOURCE_IMG_DIR);
+        if (file != null && !file.isEmpty()){
+            if (UploadFileUtils.writeUploadFile(file, dataFileDir, SysContants.PropertyKey.UPLOAD_IMAGE_ROOT_DIR)){
+                resultState.setData(dataFileDir + file.getOriginalFilename());//得到图片上传路径
+                //得到图片保存路径开头映射头
+                String imageContextPath = ConfigUtils.getConfiguration(SysContants.PropertyFilePath.CONFIG).getString(SysContants.PropertyKey.IMAGE_CONTEXT_PATH);
+                resultState.setData(imageContextPath+resultState.getData());//拼接图片绝对路径
+                return resultState;
+            }
+        }
+        resultState.setStateCode(ResultStateCode.INVALID_DATA);
+        resultState.setMsg( "数据文件保存失败");
+        return resultState;
+    }
+
+    /*
+    *@Description 删除
+    *@Param 
+    *@Date 2018/7/8
+    *@return 
+    **/
+    @RequestMapping(value = "delete.action/{id}")
+    @ResponseBody
+    public ResultState delete(@PathVariable Long id){
+       return  consultService.delete(id);
+    }
+
+    /*
+    *@Description 视频上传,暂时不做
+    *@Param
+    *@Date 2018/7/6
+    *@return
+    **/
+    /*@RequestMapping(value = "uploadVideo.action")
+    @ResponseBody
+    public ResultState uploadVedio(MultipartFile file){
+        // 保存视频文件
+        ResultState resultState = new ResultState();
+        String uniqueDir = GuidGenerator.generate() + File.separator;
+        String dataFileDir = UploadFileUtils.buildRelativeDir(SysContants.UploadFilePath.CONSULT_ROOT_DIR, uniqueDir, SysContants.UploadFilePath.CONSULT_RESOURCE_VIDEO_DIR);
+        if (file != null && !file.isEmpty()){
+            if (UploadFileUtils.writeUploadFile(file, dataFileDir, SysContants.PropertyKey.UPLOAD_IMAGE_ROOT_DIR)){
+                resultState.setData(dataFileDir + file.getOriginalFilename());//得到图片上传路径
+                //得到图片保存路径开头映射头
+                String imageContextPath = ConfigUtils.getConfiguration(SysContants.PropertyFilePath.CONFIG).getString(SysContants.PropertyKey.IMAGE_CONTEXT_PATH);
+                resultState.setData(imageContextPath+resultState.getData());//拼接图片绝对路径
+                return resultState;
+            }
+        }
+        resultState.setStateCode(ResultStateCode.INVALID_DATA);
+        resultState.setMsg( "数据文件保存失败");
+        return resultState;
+    }*/
+
+
+    //////////////////////////////增加咨询日志////////////////
+    @RequestMapping(value = "logIndex.htm")
+    public ModelAndView logIndex(){
+        ModelAndView modelAndView = new ModelAndView("admin/consult_mgr/logIndex");
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "logList.action")
+    public ModelAndView logList(ConsultSearchModel inputModel,@RequestParam(defaultValue = "1") int pageNo){
+        ModelAndView modelAndView = new ModelAndView("admin/consult_mgr/logList");
+        BaseExample.Page pager = new BaseExample.Page();
+        pager.setPageNo(pageNo);
+        inputModel.setPage(pager);
+        pager.setTotal(consultService.queryCount(inputModel));
+        modelAndView.addObject("list", consultService.getList(inputModel));
+        modelAndView.addObject("pager", pager);
+        return modelAndView;
+    }
+}

+ 175 - 0
src/main/java/com/lightinit/hsdataplatform/controller/admin/ContractController.java

@@ -0,0 +1,175 @@
+package com.lightinit.hsdataplatform.controller.admin;
+
+import com.lightinit.hsdataplatform.common.ContractNumberUtils;
+import com.lightinit.hsdataplatform.common.GuidGenerator;
+import com.lightinit.hsdataplatform.common.SysContants;
+import com.lightinit.hsdataplatform.common.UploadFileUtils;
+import com.lightinit.hsdataplatform.dictionary.*;
+import com.lightinit.hsdataplatform.entity.BaseExample;
+import com.lightinit.hsdataplatform.model.ResultState;
+import com.lightinit.hsdataplatform.model.ResultStateCode;
+import com.lightinit.hsdataplatform.model.admin.*;
+import com.lightinit.hsdataplatform.service.admin.IContractService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.util.StringUtils;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpSession;
+import java.io.File;
+import java.util.List;
+
+import static com.lightinit.hsdataplatform.controller.admin.BaseController.buildInvalidResultState;
+
+@Controller
+@RequestMapping("/admin/contract")
+public class ContractController {
+
+    @Autowired
+    private IContractService contractService ;
+
+    @RequestMapping(value = "index.htm")
+    public ModelAndView index(){
+        ModelAndView modelAndView = new ModelAndView("admin/contract/index");
+        modelAndView.addObject("dicContractState", DicContractState.getInstacne().getDicMap());
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "list.action")
+    public ModelAndView list(ContractSearchModel inputModel, @RequestParam(defaultValue = "1") int pageNo, HttpSession session){
+        LoginUser loginUser = (LoginUser) session.getAttribute(LoginUser.SESSION_KEY_LOGIN_USER);
+        ModelAndView modelAndView = new ModelAndView("admin/contract/list");
+        BaseExample.Page pager = new BaseExample.Page();
+        pager.setPageNo(pageNo);
+        inputModel.setPage(pager);
+        int isFlag = contractService.isAdminFalg(loginUser.getId()) ;
+        if (!(isFlag>0)){
+            inputModel.setOrgId(loginUser.getOrgId());
+        }
+        List<ContractListModel> outputModel = contractService.queryList(inputModel);
+        pager.setTotal(contractService.queryCount(inputModel));
+        modelAndView.addObject("list", outputModel);
+        modelAndView.addObject("pager", pager);
+        modelAndView.addObject("weishengxiao", DicContractState.NO_EFFECT);
+        modelAndView.addObject("yiguoqi", DicContractState.OVERDUE);
+        modelAndView.addObject("yishengxiao", DicContractState.EFFECT);
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "add.htm")
+    public ModelAndView add(){
+        ModelAndView modelAndView = new ModelAndView("admin/contract/add");
+        modelAndView.addObject("contractNumber", ContractNumberUtils.generate()) ;
+        return modelAndView;
+    }
+
+
+
+    @RequestMapping(value = "addResource.htm")
+    public ModelAndView addResource(){
+        ModelAndView modelAndView = new ModelAndView("admin/contract/addResource");
+        modelAndView.addObject("resourceType", DicResourceType.getInstacne().getDicMap()) ;
+        modelAndView.addObject("chargeMethod", DicPublishSettingChargeMethod.getInstacne().getDicMap());
+        return modelAndView;
+    }
+
+    @RequestMapping(value="resourceList.action")
+    public ModelAndView resourceList(ContractResourceSearchModel inputModel, @RequestParam(defaultValue = "1") int pageNo,HttpSession session){
+        LoginUser loginUser = (LoginUser) session.getAttribute(LoginUser.SESSION_KEY_LOGIN_USER);
+        ModelAndView modelAndView = new ModelAndView("admin/contract/resourceList");
+        BaseExample.Page pager = new BaseExample.Page(pageNo, 10);
+        inputModel.setPage(pager);
+        int isFlag = contractService.isAdminFalg(loginUser.getId()) ;
+        if (!(isFlag>0)){
+            inputModel.setOrgId(loginUser.getOrgId());
+        }
+        inputModel.setOpenType(DicResourceOpenType.NOT_OPEN);
+        inputModel.setPublishState(DicDataPublishState.PUBLISHED);
+        List<ContractResourceListModel> resourceList = contractService.resourceList(inputModel);
+        pager.setTotal(contractService.resourceCount(inputModel));
+        modelAndView.addObject("resourceList", resourceList);
+        modelAndView.addObject("pager", pager);
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "addFinally.action")
+    @ResponseBody
+    public ResultState addFinally(ContractAddModel input,HttpSession session,MultipartFile attachmentFile){
+        LoginUser loginUser = (LoginUser) session.getAttribute(LoginUser.SESSION_KEY_LOGIN_USER);
+        // 保存图片
+        String uniqueDir = GuidGenerator.generate() + File.separator;
+        String dataFileDir = UploadFileUtils.buildRelativeDir(SysContants.UploadFilePath.CONTRACT_ATTACHMENT, uniqueDir, SysContants.UploadFilePath.CONTRACT_ATTACHMENT_DIR);
+        if (attachmentFile != null && !attachmentFile.isEmpty()){
+            if (UploadFileUtils.writeUploadFile(attachmentFile, dataFileDir, SysContants.PropertyKey.UPLOAD_IMAGE_ROOT_DIR)){
+                input.setAttachment(dataFileDir + attachmentFile.getOriginalFilename());
+            }else {
+                return buildInvalidResultState(ResultStateCode.INVALID_DATA, "电子版合同保存失败");
+            }
+        }
+        return contractService.addFinally(input,loginUser.getId());
+    }
+
+    @RequestMapping(value = "view.htm/{id}")
+    public ModelAndView view(@PathVariable Long id){
+        ModelAndView modelAndView = new ModelAndView("admin/contract/view");
+        ContractViewModel contractViewModel = contractService.queryOne(id) ;
+        modelAndView.addObject("contract", contractViewModel);
+        if (contractViewModel!=null){
+            modelAndView.addObject("attachmentName", org.apache.commons.lang.StringUtils.isNotEmpty(contractViewModel.getAttachment()) ? UploadFileUtils.getFileNameByPath(contractViewModel.getAttachment()) : null);
+        }
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "contractStop.action/{id}")
+    @ResponseBody
+    public ResultState contractStop(@PathVariable long id){
+        ResultState<Long> resultState = contractService.contractStop(id);
+        return resultState;
+    }
+
+    @RequestMapping(value = "edit.htm/{id}")
+    public ModelAndView edit(@PathVariable Long id){
+        ModelAndView modelAndView = new ModelAndView("admin/contract/edit");
+        ContractViewModel contractViewModel = contractService.queryOne(id) ;
+        modelAndView.addObject("contract", contractViewModel);
+        if (contractViewModel!=null){
+            modelAndView.addObject("attachmentName", org.apache.commons.lang.StringUtils.isNotEmpty(contractViewModel.getAttachment()) ? UploadFileUtils.getFileNameByPath(contractViewModel.getAttachment()) : null);
+        }
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "editFinally.action")
+    @ResponseBody
+    public ResultState editFinally(ContractEditModel input,HttpSession session,MultipartFile attachmentFile){
+        // 保存图片
+        String uniqueDir ;
+        if (org.apache.commons.lang.StringUtils.isNotEmpty(input.getAttachment())){
+            uniqueDir = UploadFileUtils.getExistingFileRelativeDir(1, input.getAttachment(), 2);
+        } else {
+            uniqueDir = GuidGenerator.generate() + File.separator;
+        }
+        String dataFileDir = UploadFileUtils.buildRelativeDir(SysContants.UploadFilePath.CONTRACT_ATTACHMENT, uniqueDir, SysContants.UploadFilePath.CONTRACT_ATTACHMENT_DIR);
+        if (attachmentFile != null && !attachmentFile.isEmpty()){
+            if (UploadFileUtils.writeUploadFile(attachmentFile, dataFileDir, SysContants.PropertyKey.UPLOAD_IMAGE_ROOT_DIR)){
+                input.setAttachment(dataFileDir + attachmentFile.getOriginalFilename());
+            }else {
+                return buildInvalidResultState(ResultStateCode.INVALID_DATA, "电子版合同保存失败");
+            }
+        }
+        LoginUser loginUser = (LoginUser) session.getAttribute(LoginUser.SESSION_KEY_LOGIN_USER);
+        return contractService.editFinally(input,loginUser.getId()) ;
+    }
+
+    @RequestMapping(value = "contractDelete.action/{id}")
+    @ResponseBody
+    public ResultState contractDelete(@PathVariable long id){
+        ResultState<Long> resultState = contractService.contractDelete(id);
+        return resultState;
+    }
+
+}

+ 100 - 0
src/main/java/com/lightinit/hsdataplatform/controller/admin/DataAuditController.java

@@ -0,0 +1,100 @@
+package com.lightinit.hsdataplatform.controller.admin;
+
+import com.lightinit.hsdataplatform.common.ConfigUtils;
+import com.lightinit.hsdataplatform.common.SysContants;
+import com.lightinit.hsdataplatform.dictionary.DicRoadShowAudit;
+import com.lightinit.hsdataplatform.dictionary.DicRoadShowStage;
+import com.lightinit.hsdataplatform.entity.BaseExample;
+import com.lightinit.hsdataplatform.entity.Roadshow;
+import com.lightinit.hsdataplatform.model.ResultState;
+import com.lightinit.hsdataplatform.model.admin.*;
+import com.lightinit.hsdataplatform.service.admin.IDataAuditService;
+import org.apache.commons.lang.StringUtils;
+import org.apache.http.protocol.HTTP;
+import org.apache.shiro.authz.annotation.RequiresAuthentication;
+import org.springframework.beans.factory.annotation.Autowired;
+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.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.servlet.ModelAndView;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+import java.util.List;
+
+/**
+ * @Author: sunxiang
+ * @Date: 2018/6/5 17:07
+ * @Description:
+ **/
+@Controller
+@RequestMapping("/admin/data_audit")
+public class DataAuditController {
+
+    @Autowired
+    private IDataAuditService dataAuditService;
+    @RequestMapping(value = "index.htm")
+    public ModelAndView index(){
+        ModelAndView modelAndView = new ModelAndView("admin/data_audit/index");
+        return modelAndView;
+    }
+
+    @RequestMapping(value = "list.action")
+    public ModelAndView list(DataPublishSearchModel inputModel, @RequestParam(defaultValue = "1") int pageNo,HttpSession session){
+        LoginUser loginUser = (LoginUser) session.getAttribute(LoginUser.SESSION_KEY_LOGIN_USER);
+        inputModel.setUserId(loginUser.getId());
+        ModelAndView modelAndView = new ModelAndView("admin/data_audit/list");
+        BaseExample.Page pager = new BaseExample.Page(pageNo,10);
+        inputModel.setPage(pager);
+        List<DataPublishListModel> outputModel = dataAuditService.queryList(inputModel);
+        pager.setTotal(dataAuditService.queryCount(inputModel));
+        modelAndView.addObject("list", outputModel);
+        modelAndView.addObject("pager", pager);
+        return modelAndView;
+    }
+
+    @RequestMapping(value="detail.htm/{id}")
+    public ModelAndView publishResourceDetail(@PathVariable Long id){
+        ModelAndView modelAndView = new ModelAndView("forward:/pages/admin/data_audit/detail.jsp");
+        DataPublishDetailModel dataPublishDetailModel = dataAuditService.queryOne(id);
+        //获取文件名
+        dataPublishDetailModel.setDataFile(StringUtils.substringAfterLast(dataPublishDetailModel.getDataFile(),"\\"));
+        dataPublishDetailModel.setDemoFile(StringUtils.substringAfterLast(dataPublishDetailModel.getDemoFile(),"\\"));
+        //获取图片映射路径
+        String imageContextPath = ConfigUtils.getConfiguration(SysContants.PropertyFilePath.CONFIG).getString(SysContants.PropertyKey.IMAGE_CONTEXT_PATH);
+        dataPublishDetailModel.setResourceImg(imageContextPath+dataPublishDetailModel.getResourceImg());
+        modelAndView.addObject("busiModel",dataPublishDetailModel);
+        return modelAndView;
+    }
+
+    @RequestMapping(value="audit.htm/{id}")
+    public ModelAndView publishResourceAudit(@PathVariable Long id){
+        ModelAndView modelAndView = new ModelAndView("forward:/pages/admin/data_audit/audit.jsp");
+        DataPublishDetailModel dataPublishDetailModel = dataAuditService.queryOne(id);
+        //获取文件名
+        dataPublishDetailModel.setDataFile(StringUtils.substringAfterLast(dataPublishDetailModel.getDataFile(),"\\"));
+        dataPublishDetailModel.setDemoFile(StringUtils.substringAfterLast(dataPublishDetailModel.getDemoFile(),"\\"));
+        //获取图片映射路径
+        String imageContextPath = ConfigUtils.getConfiguration(SysContants.PropertyFilePath.CONFIG).getString(SysContants.PropertyKey.IMAGE_CONTEXT_PATH);
+        dataPublishDetailModel.setResourceImg(imageContextPath+dataPublishDetailModel.getResourceImg());
+        modelAndView.addObject("busiModel",dataPublishDetailModel);
+        return modelAndView;
+    }
+
+    /*
+    *@Description
+    *@Param     param :1:审核通过,2:审核不通过
+    *@Date 2018/6/26
+    *@return
+    **/
+    @RequiresAuthentication
+    @RequestMapping(value="audit.action")
+    @ResponseBody
+    public ResultState<Long> audit(Long id, String auditComment, int param, HttpSession session){
+        LoginUser loginUser = (LoginUser) session.getAttribute(LoginUser.SESSION_KEY_LOGIN_USER);
+        ResultState<Long> resultState = dataAuditService.audit(id,auditComment,param,loginUser.getId());
+        return resultState;
+    }
+}

+ 0 - 0
src/main/java/com/lightinit/hsdataplatform/controller/admin/DataCatelogMgrController.java


Неке датотеке нису приказане због велике количине промена