傅行帆 6 jaren geleden
bovenliggende
commit
c9b503f125
34 gewijzigde bestanden met toevoegingen van 5612 en 16 verwijderingen
  1. 25
    0
      CODE/smart-community/mq-message/.gitignore
  2. BIN
      CODE/smart-community/mq-message/.mvn/wrapper/maven-wrapper.jar
  3. 1
    0
      CODE/smart-community/mq-message/.mvn/wrapper/maven-wrapper.properties
  4. 225
    0
      CODE/smart-community/mq-message/mvnw
  5. 143
    0
      CODE/smart-community/mq-message/mvnw.cmd
  6. 275
    0
      CODE/smart-community/mq-message/pom.xml
  7. 40
    0
      CODE/smart-community/mq-message/src/main/java/com/community/huiju/MqApplication.java
  8. 40
    0
      CODE/smart-community/mq-message/src/main/java/com/community/huiju/Swagger2.java
  9. 15
    0
      CODE/smart-community/mq-message/src/main/java/com/community/huiju/common/code/ICode.java
  10. 46
    0
      CODE/smart-community/mq-message/src/main/java/com/community/huiju/common/code/cache/AppkeyCache.java
  11. 23
    0
      CODE/smart-community/mq-message/src/main/java/com/community/huiju/common/code/entity/CodeEntity.java
  12. 13
    0
      CODE/smart-community/mq-message/src/main/java/com/community/huiju/common/code/impl/ImgCodeImpl.java
  13. 74
    0
      CODE/smart-community/mq-message/src/main/java/com/community/huiju/common/code/impl/PhoneCodeImpl.java
  14. 130
    0
      CODE/smart-community/mq-message/src/main/java/com/community/huiju/common/hk/HKConstant.java
  15. 1278
    0
      CODE/smart-community/mq-message/src/main/java/com/community/huiju/common/hk/code/AcsEvent.java
  16. 1050
    0
      CODE/smart-community/mq-message/src/main/java/com/community/huiju/common/hk/code/Comm.java
  17. 1048
    0
      CODE/smart-community/mq-message/src/main/java/com/community/huiju/common/hk/code/EventDis.java
  18. 40
    0
      CODE/smart-community/mq-message/src/main/java/com/community/huiju/common/hk/entity/MonitoryPoint.java
  19. 22
    0
      CODE/smart-community/mq-message/src/main/java/com/community/huiju/config/HttpSessionConfig.java
  20. 21
    0
      CODE/smart-community/mq-message/src/main/java/com/community/huiju/dao/MqMessageMapper.java
  21. 285
    0
      CODE/smart-community/mq-message/src/main/java/com/community/huiju/model/MqMessage.java
  22. 84
    0
      CODE/smart-community/mq-message/src/main/java/com/community/huiju/runner/MqRunner.java
  23. 10
    0
      CODE/smart-community/mq-message/src/main/java/com/community/huiju/service/MqMessageServiceI.java
  24. 65
    0
      CODE/smart-community/mq-message/src/main/java/com/community/huiju/service/impl/MqMessageServiceImpl.java
  25. 61
    0
      CODE/smart-community/mq-message/src/main/java/com/community/huiju/vo/TaUserVO.java
  26. 36
    0
      CODE/smart-community/mq-message/src/main/java/com/community/huiju/vo/TpTicketInfoVO.java
  27. 63
    0
      CODE/smart-community/mq-message/src/main/java/com/community/huiju/vo/TpTicketVO.java
  28. 21
    0
      CODE/smart-community/mq-message/src/main/resources/application.yml
  29. 24
    0
      CODE/smart-community/mq-message/src/main/resources/bootstrap.yml
  30. 31
    0
      CODE/smart-community/mq-message/src/main/resources/log4j.properties
  31. 402
    0
      CODE/smart-community/mq-message/src/main/resources/mapper/MqMessageMapper.xml
  32. 1
    0
      CODE/smart-community/pom.xml
  33. 10
    8
      文档/MYSQL/smartCommunity.pdb
  34. 10
    8
      文档/MYSQL/smartCommunity.pdm

+ 25
- 0
CODE/smart-community/mq-message/.gitignore Bestand weergeven

@@ -0,0 +1,25 @@
1
+/target/
2
+!.mvn/wrapper/maven-wrapper.jar
3
+
4
+### STS ###
5
+.apt_generated
6
+.classpath
7
+.factorypath
8
+.project
9
+.settings
10
+.springBeans
11
+.sts4-cache
12
+
13
+### IntelliJ IDEA ###
14
+.idea
15
+*.iws
16
+*.iml
17
+*.ipr
18
+
19
+### NetBeans ###
20
+/nbproject/private/
21
+/build/
22
+/nbbuild/
23
+/dist/
24
+/nbdist/
25
+/.nb-gradle/

BIN
CODE/smart-community/mq-message/.mvn/wrapper/maven-wrapper.jar Bestand weergeven


+ 1
- 0
CODE/smart-community/mq-message/.mvn/wrapper/maven-wrapper.properties Bestand weergeven

@@ -0,0 +1 @@
1
+distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip

+ 225
- 0
CODE/smart-community/mq-message/mvnw Bestand weergeven

@@ -0,0 +1,225 @@
1
+#!/bin/sh
2
+# ----------------------------------------------------------------------------
3
+# Licensed to the Apache Software Foundation (ASF) under one
4
+# or more contributor license agreements.  See the NOTICE file
5
+# distributed with this work for additional information
6
+# regarding copyright ownership.  The ASF licenses this file
7
+# to you under the Apache License, Version 2.0 (the
8
+# "License"); you may not use this file except in compliance
9
+# with the License.  You may obtain a copy of the License at
10
+#
11
+#    http://www.apache.org/licenses/LICENSE-2.0
12
+#
13
+# Unless required by applicable law or agreed to in writing,
14
+# software distributed under the License is distributed on an
15
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+# KIND, either express or implied.  See the License for the
17
+# specific language governing permissions and limitations
18
+# under the License.
19
+# ----------------------------------------------------------------------------
20
+
21
+# ----------------------------------------------------------------------------
22
+# Maven2 Start Up Batch script
23
+#
24
+# Required ENV vars:
25
+# ------------------
26
+#   JAVA_HOME - location of a JDK home dir
27
+#
28
+# Optional ENV vars
29
+# -----------------
30
+#   M2_HOME - location of maven2's installed home dir
31
+#   MAVEN_OPTS - parameters passed to the Java VM when running Maven
32
+#     e.g. to debug Maven itself, use
33
+#       set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
34
+#   MAVEN_SKIP_RC - flag to disable loading of mavenrc files
35
+# ----------------------------------------------------------------------------
36
+
37
+if [ -z "$MAVEN_SKIP_RC" ] ; then
38
+
39
+  if [ -f /etc/mavenrc ] ; then
40
+    . /etc/mavenrc
41
+  fi
42
+
43
+  if [ -f "$HOME/.mavenrc" ] ; then
44
+    . "$HOME/.mavenrc"
45
+  fi
46
+
47
+fi
48
+
49
+# OS specific support.  $var _must_ be set to either true or false.
50
+cygwin=false;
51
+darwin=false;
52
+mingw=false
53
+case "`uname`" in
54
+  CYGWIN*) cygwin=true ;;
55
+  MINGW*) mingw=true;;
56
+  Darwin*) darwin=true
57
+    # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
58
+    # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
59
+    if [ -z "$JAVA_HOME" ]; then
60
+      if [ -x "/usr/libexec/java_home" ]; then
61
+        export JAVA_HOME="`/usr/libexec/java_home`"
62
+      else
63
+        export JAVA_HOME="/Library/Java/Home"
64
+      fi
65
+    fi
66
+    ;;
67
+esac
68
+
69
+if [ -z "$JAVA_HOME" ] ; then
70
+  if [ -r /etc/gentoo-release ] ; then
71
+    JAVA_HOME=`java-config --jre-home`
72
+  fi
73
+fi
74
+
75
+if [ -z "$M2_HOME" ] ; then
76
+  ## resolve links - $0 may be a link to maven's home
77
+  PRG="$0"
78
+
79
+  # need this for relative symlinks
80
+  while [ -h "$PRG" ] ; do
81
+    ls=`ls -ld "$PRG"`
82
+    link=`expr "$ls" : '.*-> \(.*\)$'`
83
+    if expr "$link" : '/.*' > /dev/null; then
84
+      PRG="$link"
85
+    else
86
+      PRG="`dirname "$PRG"`/$link"
87
+    fi
88
+  done
89
+
90
+  saveddir=`pwd`
91
+
92
+  M2_HOME=`dirname "$PRG"`/..
93
+
94
+  # make it fully qualified
95
+  M2_HOME=`cd "$M2_HOME" && pwd`
96
+
97
+  cd "$saveddir"
98
+  # echo Using m2 at $M2_HOME
99
+fi
100
+
101
+# For Cygwin, ensure paths are in UNIX format before anything is touched
102
+if $cygwin ; then
103
+  [ -n "$M2_HOME" ] &&
104
+    M2_HOME=`cygpath --unix "$M2_HOME"`
105
+  [ -n "$JAVA_HOME" ] &&
106
+    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
107
+  [ -n "$CLASSPATH" ] &&
108
+    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
109
+fi
110
+
111
+# For Migwn, ensure paths are in UNIX format before anything is touched
112
+if $mingw ; then
113
+  [ -n "$M2_HOME" ] &&
114
+    M2_HOME="`(cd "$M2_HOME"; pwd)`"
115
+  [ -n "$JAVA_HOME" ] &&
116
+    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
117
+  # TODO classpath?
118
+fi
119
+
120
+if [ -z "$JAVA_HOME" ]; then
121
+  javaExecutable="`which javac`"
122
+  if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
123
+    # readlink(1) is not available as standard on Solaris 10.
124
+    readLink=`which readlink`
125
+    if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
126
+      if $darwin ; then
127
+        javaHome="`dirname \"$javaExecutable\"`"
128
+        javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
129
+      else
130
+        javaExecutable="`readlink -f \"$javaExecutable\"`"
131
+      fi
132
+      javaHome="`dirname \"$javaExecutable\"`"
133
+      javaHome=`expr "$javaHome" : '\(.*\)/bin'`
134
+      JAVA_HOME="$javaHome"
135
+      export JAVA_HOME
136
+    fi
137
+  fi
138
+fi
139
+
140
+if [ -z "$JAVACMD" ] ; then
141
+  if [ -n "$JAVA_HOME"  ] ; then
142
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
143
+      # IBM's JDK on AIX uses strange locations for the executables
144
+      JAVACMD="$JAVA_HOME/jre/sh/java"
145
+    else
146
+      JAVACMD="$JAVA_HOME/bin/java"
147
+    fi
148
+  else
149
+    JAVACMD="`which java`"
150
+  fi
151
+fi
152
+
153
+if [ ! -x "$JAVACMD" ] ; then
154
+  echo "Error: JAVA_HOME is not defined correctly." >&2
155
+  echo "  We cannot execute $JAVACMD" >&2
156
+  exit 1
157
+fi
158
+
159
+if [ -z "$JAVA_HOME" ] ; then
160
+  echo "Warning: JAVA_HOME environment variable is not set."
161
+fi
162
+
163
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
164
+
165
+# traverses directory structure from process work directory to filesystem root
166
+# first directory with .mvn subdirectory is considered project base directory
167
+find_maven_basedir() {
168
+
169
+  if [ -z "$1" ]
170
+  then
171
+    echo "Path not specified to find_maven_basedir"
172
+    return 1
173
+  fi
174
+
175
+  basedir="$1"
176
+  wdir="$1"
177
+  while [ "$wdir" != '/' ] ; do
178
+    if [ -d "$wdir"/.mvn ] ; then
179
+      basedir=$wdir
180
+      break
181
+    fi
182
+    # workaround for JBEAP-8937 (on Solaris 10/Sparc)
183
+    if [ -d "${wdir}" ]; then
184
+      wdir=`cd "$wdir/.."; pwd`
185
+    fi
186
+    # end of workaround
187
+  done
188
+  echo "${basedir}"
189
+}
190
+
191
+# concatenates all lines of a file
192
+concat_lines() {
193
+  if [ -f "$1" ]; then
194
+    echo "$(tr -s '\n' ' ' < "$1")"
195
+  fi
196
+}
197
+
198
+BASE_DIR=`find_maven_basedir "$(pwd)"`
199
+if [ -z "$BASE_DIR" ]; then
200
+  exit 1;
201
+fi
202
+
203
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
204
+echo $MAVEN_PROJECTBASEDIR
205
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
206
+
207
+# For Cygwin, switch paths to Windows format before running java
208
+if $cygwin; then
209
+  [ -n "$M2_HOME" ] &&
210
+    M2_HOME=`cygpath --path --windows "$M2_HOME"`
211
+  [ -n "$JAVA_HOME" ] &&
212
+    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
213
+  [ -n "$CLASSPATH" ] &&
214
+    CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
215
+  [ -n "$MAVEN_PROJECTBASEDIR" ] &&
216
+    MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
217
+fi
218
+
219
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
220
+
221
+exec "$JAVACMD" \
222
+  $MAVEN_OPTS \
223
+  -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
224
+  "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
225
+  ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"

+ 143
- 0
CODE/smart-community/mq-message/mvnw.cmd Bestand weergeven

@@ -0,0 +1,143 @@
1
+@REM ----------------------------------------------------------------------------
2
+@REM Licensed to the Apache Software Foundation (ASF) under one
3
+@REM or more contributor license agreements.  See the NOTICE file
4
+@REM distributed with this work for additional information
5
+@REM regarding copyright ownership.  The ASF licenses this file
6
+@REM to you under the Apache License, Version 2.0 (the
7
+@REM "License"); you may not use this file except in compliance
8
+@REM with the License.  You may obtain a copy of the License at
9
+@REM
10
+@REM    http://www.apache.org/licenses/LICENSE-2.0
11
+@REM
12
+@REM Unless required by applicable law or agreed to in writing,
13
+@REM software distributed under the License is distributed on an
14
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+@REM KIND, either express or implied.  See the License for the
16
+@REM specific language governing permissions and limitations
17
+@REM under the License.
18
+@REM ----------------------------------------------------------------------------
19
+
20
+@REM ----------------------------------------------------------------------------
21
+@REM Maven2 Start Up Batch script
22
+@REM
23
+@REM Required ENV vars:
24
+@REM JAVA_HOME - location of a JDK home dir
25
+@REM
26
+@REM Optional ENV vars
27
+@REM M2_HOME - location of maven2's installed home dir
28
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
29
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
30
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
31
+@REM     e.g. to debug Maven itself, use
32
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
33
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
34
+@REM ----------------------------------------------------------------------------
35
+
36
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
37
+@echo off
38
+@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
39
+@if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%
40
+
41
+@REM set %HOME% to equivalent of $HOME
42
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
43
+
44
+@REM Execute a user defined script before this one
45
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
46
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
47
+if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
48
+if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
49
+:skipRcPre
50
+
51
+@setlocal
52
+
53
+set ERROR_CODE=0
54
+
55
+@REM To isolate internal variables from possible post scripts, we use another setlocal
56
+@setlocal
57
+
58
+@REM ==== START VALIDATION ====
59
+if not "%JAVA_HOME%" == "" goto OkJHome
60
+
61
+echo.
62
+echo Error: JAVA_HOME not found in your environment. >&2
63
+echo Please set the JAVA_HOME variable in your environment to match the >&2
64
+echo location of your Java installation. >&2
65
+echo.
66
+goto error
67
+
68
+:OkJHome
69
+if exist "%JAVA_HOME%\bin\java.exe" goto init
70
+
71
+echo.
72
+echo Error: JAVA_HOME is set to an invalid directory. >&2
73
+echo JAVA_HOME = "%JAVA_HOME%" >&2
74
+echo Please set the JAVA_HOME variable in your environment to match the >&2
75
+echo location of your Java installation. >&2
76
+echo.
77
+goto error
78
+
79
+@REM ==== END VALIDATION ====
80
+
81
+:init
82
+
83
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
84
+@REM Fallback to current working directory if not found.
85
+
86
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
87
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
88
+
89
+set EXEC_DIR=%CD%
90
+set WDIR=%EXEC_DIR%
91
+:findBaseDir
92
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
93
+cd ..
94
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
95
+set WDIR=%CD%
96
+goto findBaseDir
97
+
98
+:baseDirFound
99
+set MAVEN_PROJECTBASEDIR=%WDIR%
100
+cd "%EXEC_DIR%"
101
+goto endDetectBaseDir
102
+
103
+:baseDirNotFound
104
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
105
+cd "%EXEC_DIR%"
106
+
107
+:endDetectBaseDir
108
+
109
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
110
+
111
+@setlocal EnableExtensions EnableDelayedExpansion
112
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
113
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
114
+
115
+:endReadAdditionalConfig
116
+
117
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
118
+
119
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
120
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
121
+
122
+%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
123
+if ERRORLEVEL 1 goto error
124
+goto end
125
+
126
+:error
127
+set ERROR_CODE=1
128
+
129
+:end
130
+@endlocal & set ERROR_CODE=%ERROR_CODE%
131
+
132
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
133
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
134
+if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
135
+if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
136
+:skipRcPost
137
+
138
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
139
+if "%MAVEN_BATCH_PAUSE%" == "on" pause
140
+
141
+if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
142
+
143
+exit /B %ERROR_CODE%

+ 275
- 0
CODE/smart-community/mq-message/pom.xml Bestand weergeven

@@ -0,0 +1,275 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4
+	<modelVersion>4.0.0</modelVersion>
5
+
6
+	<groupId>com.community</groupId>
7
+	<artifactId>mq-message</artifactId>
8
+	<version>0.0.1</version>
9
+	<packaging>jar</packaging>
10
+
11
+	<name>mq-message</name>
12
+	<description>mq-message</description>
13
+
14
+	<parent>
15
+		<groupId>com.community</groupId>
16
+		<artifactId>smart-community</artifactId>
17
+		<version>0.0.1</version>
18
+	</parent>
19
+
20
+	<properties>
21
+		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
22
+		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
23
+		<java.version>1.8</java.version>
24
+		<spring-cloud.version>Finchley.SR1</spring-cloud.version>
25
+		<spring-session-jdbc.version>2.0.5.RELEASE</spring-session-jdbc.version>
26
+		<logback.version>1.1.6</logback.version>
27
+		<logback.access.version>1.1.2</logback.access.version>
28
+		<commons.logging.version>1.2</commons.logging.version>
29
+	</properties>
30
+
31
+	<dependencies>
32
+		<dependency>
33
+			<groupId>org.springframework.boot</groupId>
34
+			<artifactId>spring-boot-starter-web</artifactId>
35
+		</dependency>
36
+		<dependency>
37
+			<groupId>org.springframework.cloud</groupId>
38
+			<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
39
+		</dependency>
40
+
41
+		<dependency>
42
+			<groupId>org.springframework.cloud</groupId>
43
+			<artifactId>spring-cloud-starter-openfeign</artifactId>
44
+		</dependency>
45
+
46
+		<dependency>
47
+			<groupId>io.springfox</groupId>
48
+			<artifactId>springfox-swagger2</artifactId>
49
+			<version>2.7.0</version>
50
+		</dependency>
51
+
52
+		<dependency>
53
+			<groupId>io.springfox</groupId>
54
+			<artifactId>springfox-swagger-ui</artifactId>
55
+			<version>2.7.0</version>
56
+		</dependency>
57
+
58
+		<dependency>
59
+			<groupId>org.springframework.cloud</groupId>
60
+			<artifactId>spring-cloud-starter-config</artifactId>
61
+		</dependency>
62
+
63
+		<dependency>
64
+			<groupId>org.springframework.boot</groupId>
65
+			<artifactId>spring-boot-starter-actuator</artifactId>
66
+		</dependency>
67
+
68
+		<dependency>
69
+			<groupId>org.mybatis.spring.boot</groupId>
70
+			<artifactId>mybatis-spring-boot-starter</artifactId>
71
+			<version>1.3.2</version>
72
+		</dependency>
73
+
74
+		<dependency>
75
+			<groupId>com.github.pagehelper</groupId>
76
+			<artifactId>pagehelper-spring-boot-starter</artifactId>
77
+			<version>1.2.3</version>
78
+		</dependency>
79
+
80
+		<dependency>
81
+			<groupId>mysql</groupId>
82
+			<artifactId>mysql-connector-java</artifactId>
83
+			<scope>runtime</scope>
84
+		</dependency>
85
+
86
+		<dependency>
87
+			<groupId>com.community</groupId>
88
+			<artifactId>community-common</artifactId>
89
+			<version>0.0.1</version>
90
+		</dependency>
91
+
92
+		<dependency>
93
+			<groupId>org.springframework.boot</groupId>
94
+			<artifactId>spring-boot-starter-test</artifactId>
95
+			<scope>test</scope>
96
+		</dependency>
97
+
98
+		<dependency>
99
+			<groupId>org.springframework.boot</groupId>
100
+			<artifactId>spring-boot-starter-jdbc</artifactId>
101
+		</dependency>
102
+
103
+		<dependency>
104
+			<groupId>org.springframework.session</groupId>
105
+			<artifactId>spring-session-jdbc</artifactId>
106
+			<version>${spring-session-jdbc.version}</version>
107
+		</dependency>
108
+
109
+		<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
110
+		<dependency>
111
+			<groupId>org.projectlombok</groupId>
112
+			<artifactId>lombok</artifactId>
113
+			<version>1.18.2</version>
114
+			<scope>provided</scope>
115
+		</dependency>
116
+
117
+		<!-- log4j -->
118
+		<dependency>
119
+			<groupId>org.apache.activemq</groupId>
120
+			<artifactId>activemq-core</artifactId>
121
+			<version>5.7.0</version>
122
+		</dependency>
123
+
124
+		<dependency>
125
+			<groupId>com.google.protobuf</groupId>
126
+			<artifactId>protobuf-java</artifactId>
127
+			<version>2.3.0</version>
128
+		</dependency>
129
+
130
+
131
+		<dependency>
132
+			<groupId>net.sf.json-lib</groupId>
133
+			<artifactId>json-lib</artifactId>
134
+			<version>2.4</version>
135
+			<classifier>jdk15</classifier>
136
+			<scope>compile</scope>
137
+		</dependency>
138
+		<dependency>
139
+			<groupId>commons-beanutils</groupId>
140
+			<artifactId>commons-beanutils</artifactId>
141
+			<version>1.8.1</version>
142
+			<scope>compile</scope>
143
+		</dependency>
144
+		<dependency>
145
+			<groupId>commons-collections</groupId>
146
+			<artifactId>commons-collections</artifactId>
147
+			<version>3.2.1</version>
148
+			<scope>compile</scope>
149
+		</dependency>
150
+		<dependency>
151
+			<groupId>commons-lang</groupId>
152
+			<artifactId>commons-lang</artifactId>
153
+			<version>2.6</version>
154
+			<scope>${jar.scope}</scope>
155
+		</dependency>
156
+		<dependency>
157
+			<groupId>commons-logging</groupId>
158
+			<artifactId>commons-logging</artifactId>
159
+			<version>1.1.1</version>
160
+			<scope>${jar.scope}</scope>
161
+		</dependency>
162
+		<dependency>
163
+			<groupId>net.sf.ezmorph</groupId>
164
+			<artifactId>ezmorph</artifactId>
165
+			<version>1.0.6</version>
166
+			<scope>${jar.scope}</scope>
167
+		</dependency>
168
+
169
+		<!--<dependency>-->
170
+			<!--<groupId>org.springframework.boot</groupId>-->
171
+			<!--<artifactId>spring-boot-starter-log4j</artifactId>-->
172
+		<!--</dependency>-->
173
+
174
+		<dependency>
175
+			<groupId>org.springframework.boot</groupId>
176
+			<artifactId>spring-boot-starter</artifactId>
177
+		</dependency>
178
+
179
+
180
+		<dependency>
181
+			<groupId>commons-logging</groupId>
182
+			<artifactId>commons-logging</artifactId>
183
+			<version>${commons.logging.version}</version>
184
+		</dependency>
185
+
186
+		<!-- https://mvnrepository.com/artifact/com.google.guava/guava -->
187
+		<dependency>
188
+			<groupId>com.google.guava</groupId>
189
+			<artifactId>guava</artifactId>
190
+			<version>26.0-jre</version>
191
+		</dependency>
192
+
193
+		<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
194
+		<dependency>
195
+			<groupId>org.apache.commons</groupId>
196
+			<artifactId>commons-lang3</artifactId>
197
+			<version>3.8.1</version>
198
+		</dependency>
199
+
200
+		<!-- https://mvnrepository.com/artifact/commons-lang/commons-lang -->
201
+		<dependency>
202
+			<groupId>commons-lang</groupId>
203
+			<artifactId>commons-lang</artifactId>
204
+			<version>2.6</version>
205
+		</dependency>
206
+
207
+		<!-- https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp -->
208
+		<dependency>
209
+			<groupId>com.squareup.okhttp3</groupId>
210
+			<artifactId>okhttp</artifactId>
211
+			<version>3.11.0</version>
212
+		</dependency>
213
+
214
+		<dependency>
215
+			<groupId>commons-httpclient</groupId>
216
+			<artifactId>commons-httpclient</artifactId>
217
+			<version>3.1</version>
218
+		</dependency>
219
+
220
+		<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
221
+		<dependency>
222
+			<groupId>commons-io</groupId>
223
+			<artifactId>commons-io</artifactId>
224
+			<version>1.4</version>
225
+		</dependency>
226
+
227
+		<dependency>
228
+			<groupId>net.coobird</groupId>
229
+			<artifactId>thumbnailator</artifactId>
230
+			<version>0.4.2</version>
231
+		</dependency>
232
+        <dependency>
233
+            <groupId>mysql</groupId>
234
+            <artifactId>mysql-connector-java</artifactId>
235
+        </dependency>
236
+
237
+
238
+    </dependencies>
239
+
240
+	<dependencyManagement>
241
+		<dependencies>
242
+			<dependency>
243
+				<groupId>org.springframework.cloud</groupId>
244
+				<artifactId>spring-cloud-dependencies</artifactId>
245
+				<version>${spring-cloud.version}</version>
246
+				<type>pom</type>
247
+				<scope>import</scope>
248
+			</dependency>
249
+		</dependencies>
250
+	</dependencyManagement>
251
+
252
+	<build>
253
+		<plugins>
254
+			<plugin>
255
+				<groupId>org.springframework.boot</groupId>
256
+				<artifactId>spring-boot-maven-plugin</artifactId>
257
+			</plugin>
258
+			<plugin>
259
+				<groupId>org.apache.maven.plugins</groupId>
260
+				<artifactId>maven-compiler-plugin</artifactId>
261
+				<version>3.7.0</version>
262
+				<configuration>
263
+					<source>1.8</source>
264
+					<target>1.8</target>
265
+					<encoding>UTF-8</encoding>
266
+					<compilerArguments>
267
+						<extdirs>${project.basedir}/lib</extdirs>
268
+					</compilerArguments>
269
+				</configuration>
270
+			</plugin>
271
+		</plugins>
272
+	</build>
273
+
274
+
275
+</project>

+ 40
- 0
CODE/smart-community/mq-message/src/main/java/com/community/huiju/MqApplication.java Bestand weergeven

@@ -0,0 +1,40 @@
1
+package com.community.huiju;
2
+
3
+import com.alibaba.fastjson.serializer.SerializerFeature;
4
+import com.alibaba.fastjson.support.config.FastJsonConfig;
5
+import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
6
+import com.community.huiju.common.hk.code.AcsEvent;
7
+import com.community.huiju.common.hk.code.EventDis;
8
+import com.google.protobuf.ByteString;
9
+import org.apache.activemq.ActiveMQConnectionFactory;
10
+import org.springframework.boot.SpringApplication;
11
+import org.springframework.boot.autoconfigure.SpringBootApplication;
12
+import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
13
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
14
+import org.springframework.cloud.openfeign.EnableFeignClients;
15
+import org.springframework.context.annotation.Bean;
16
+import org.springframework.transaction.annotation.EnableTransactionManagement;
17
+import org.springframework.web.client.RestTemplate;
18
+
19
+import javax.jms.BytesMessage;
20
+import javax.jms.Connection;
21
+import javax.jms.Message;
22
+import javax.jms.MessageConsumer;
23
+import javax.jms.MessageListener;
24
+import javax.jms.Session;
25
+import javax.jms.Topic;
26
+
27
+/**
28
+ * @author fxf
29
+ */
30
+@EnableDiscoveryClient
31
+@SpringBootApplication
32
+@EnableFeignClients
33
+@EnableTransactionManagement
34
+public class MqApplication {
35
+	
36
+	public static void main(String[] args) {
37
+		SpringApplication.run(MqApplication.class, args);
38
+	}
39
+
40
+}

+ 40
- 0
CODE/smart-community/mq-message/src/main/java/com/community/huiju/Swagger2.java Bestand weergeven

@@ -0,0 +1,40 @@
1
+package com.community.huiju;
2
+
3
+import org.springframework.context.annotation.Bean;
4
+import org.springframework.context.annotation.Configuration;
5
+import springfox.documentation.builders.ApiInfoBuilder;
6
+import springfox.documentation.builders.PathSelectors;
7
+import springfox.documentation.builders.RequestHandlerSelectors;
8
+import springfox.documentation.service.ApiInfo;
9
+import springfox.documentation.service.Contact;
10
+import springfox.documentation.spi.DocumentationType;
11
+import springfox.documentation.spring.web.plugins.Docket;
12
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
13
+
14
+/**
15
+ * @author FXF
16
+ * @date 2018-09-27
17
+ */
18
+@Configuration
19
+@EnableSwagger2
20
+public class Swagger2 {
21
+    @Bean
22
+    public Docket docket(){
23
+        return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).select()
24
+                .apis(RequestHandlerSelectors.basePackage("com.community.huiju.controller"))
25
+                .paths(PathSelectors.any()).build();
26
+    }
27
+    //构建api文档的详细信息函数
28
+    private ApiInfo apiInfo(){
29
+        return new ApiInfoBuilder()
30
+                //页面标题
31
+                .title("app端的 RESTful API")
32
+                //创建人
33
+                .contact(new Contact("fuxingfan","","fuxingfan@dingtalk.com"))
34
+                //版本号
35
+                .version("1.0")
36
+                //描述
37
+                .description("API 描述")
38
+                .build();
39
+    }
40
+}

+ 15
- 0
CODE/smart-community/mq-message/src/main/java/com/community/huiju/common/code/ICode.java Bestand weergeven

@@ -0,0 +1,15 @@
1
+package com.community.huiju.common.code;
2
+
3
+
4
+/**
5
+ * 验证码接口
6
+ * @author weiximei
7
+ */
8
+public interface ICode {
9
+
10
+    /**
11
+     * 验证码
12
+     */
13
+    boolean sendCode(String phone,String code);
14
+
15
+}

+ 46
- 0
CODE/smart-community/mq-message/src/main/java/com/community/huiju/common/code/cache/AppkeyCache.java Bestand weergeven

@@ -0,0 +1,46 @@
1
+package com.community.huiju.common.code.cache;
2
+import com.community.commom.constant.Constant;
3
+import com.google.common.cache.CacheBuilder;
4
+import com.google.common.cache.CacheLoader;
5
+import com.google.common.cache.LoadingCache;
6
+import lombok.extern.slf4j.Slf4j;
7
+import java.util.concurrent.TimeUnit;
8
+
9
+/**
10
+ * 缓存
11
+ * @author weiximei
12
+ */
13
+@Slf4j
14
+public class AppkeyCache {
15
+
16
+    // .refreshAfterWrite(3, TimeUnit.HOURS)// 给定时间内没有被读/写访问,则回收。
17
+    static LoadingCache<String, Object> cache = CacheBuilder.newBuilder()
18
+            .expireAfterAccess(Constant.CACHE_EXPIRE, TimeUnit.HOURS)// 缓存过期时间和redis缓存时长一样
19
+            .maximumSize(Constant.CACHE_SIZE).// 设置缓存个数
20
+            build(new CacheLoader<String, Object>() {
21
+            @Override
22
+            /** 当本地缓存命没有中时,调用load方法获取结果并将结果缓存 **/
23
+            public String load(String appKey) throws Exception {
24
+                return null;
25
+            }
26
+
27
+    });
28
+
29
+    public static Object getCache(String appKey) {
30
+        Object value = null;
31
+        try {
32
+            value = cache.get(appKey);
33
+        } catch (Exception e) {
34
+            //e.printStackTrace();
35
+            value = null;
36
+        }
37
+        return value;
38
+    }
39
+
40
+    public static void setCache(String appKey,Object appValue){
41
+        log.info("缓存的key-value: {}-{}", appKey,appValue);
42
+        cache.put(appKey,appValue);
43
+    }
44
+
45
+
46
+}

+ 23
- 0
CODE/smart-community/mq-message/src/main/java/com/community/huiju/common/code/entity/CodeEntity.java Bestand weergeven

@@ -0,0 +1,23 @@
1
+package com.community.huiju.common.code.entity;
2
+
3
+import lombok.AllArgsConstructor;
4
+import lombok.Data;
5
+import lombok.NoArgsConstructor;
6
+
7
+@Data
8
+@AllArgsConstructor
9
+@NoArgsConstructor
10
+public class CodeEntity {
11
+
12
+   private String code;
13
+
14
+   private String tel;
15
+
16
+    /**
17
+     * 参数 格式 String params = "["xxx"]"
18
+     */
19
+   private String params;
20
+
21
+
22
+
23
+}

+ 13
- 0
CODE/smart-community/mq-message/src/main/java/com/community/huiju/common/code/impl/ImgCodeImpl.java Bestand weergeven

@@ -0,0 +1,13 @@
1
+package com.community.huiju.common.code.impl;
2
+
3
+import com.community.huiju.common.code.ICode;
4
+
5
+/**
6
+ * 图片验证码
7
+ * @author weiximei
8
+ */
9
+public class ImgCodeImpl {
10
+
11
+
12
+
13
+}

+ 74
- 0
CODE/smart-community/mq-message/src/main/java/com/community/huiju/common/code/impl/PhoneCodeImpl.java Bestand weergeven

@@ -0,0 +1,74 @@
1
+package com.community.huiju.common.code.impl;
2
+
3
+import com.community.commom.constant.Constant;
4
+import com.community.commom.utils.AccountValidatorUtil;
5
+import com.community.huiju.common.code.ICode;
6
+import com.community.huiju.common.code.cache.AppkeyCache;
7
+import lombok.extern.slf4j.Slf4j;
8
+import okhttp3.*;
9
+import org.springframework.beans.factory.annotation.Autowired;
10
+import org.springframework.stereotype.Service;
11
+import org.springframework.web.client.RestTemplate;
12
+
13
+import java.io.IOException;
14
+import java.util.concurrent.TimeUnit;
15
+
16
+/**
17
+ * 手机验证码
18
+ * @author weiximei
19
+ */
20
+@Service("phoneCodeImpl")
21
+@Slf4j
22
+public class PhoneCodeImpl implements ICode {
23
+
24
+    public static final MediaType JSON = MediaType.parse("application/json; charset=utf-8");
25
+
26
+    @Autowired
27
+    private RestTemplate restTemplate;
28
+
29
+    public OkHttpClient getClient() {
30
+        OkHttpClient client  = new OkHttpClient.Builder()
31
+                .connectTimeout(10, TimeUnit.SECONDS)
32
+                .writeTimeout(10,TimeUnit.SECONDS)
33
+                .readTimeout(20, TimeUnit.SECONDS)
34
+                .build();
35
+        return client;
36
+    }
37
+
38
+    @Override
39
+    public boolean sendCode(String phone, String code) {
40
+        boolean bool = false;
41
+
42
+        try {
43
+            String result = null;
44
+            OkHttpClient client = getClient();
45
+            RequestBody body = RequestBody.create(JSON, "{\"code\":\""+Constant.CODE+"\"," + "\"tel\":\""+phone+"\"," + "\"params\":[\""+code+"\"]}");
46
+            Request request = new Request.Builder()
47
+                    .url(Constant.REQUEST_URL)
48
+                    .post(body)
49
+                    .build();
50
+            Response response = client.newCall(request).execute();
51
+            if (response.isSuccessful()) {
52
+                result = response.body().string();
53
+            } else {
54
+                throw new IOException("Unexpected code " + response);
55
+            }
56
+
57
+
58
+
59
+            if ("发送成功".equals(result)) {
60
+                bool = true;
61
+                log.info("手机号 {} 验证码 {} 发送成功!",phone,code);
62
+            }else {
63
+                bool = false;
64
+                log.error("短信发送验证码失败!{}", result);
65
+            }
66
+        } catch (Exception e){
67
+            e.printStackTrace();
68
+            log.error("短信发送错误!",e);
69
+            bool = false;
70
+        }
71
+
72
+        return bool;
73
+    }
74
+}

+ 130
- 0
CODE/smart-community/mq-message/src/main/java/com/community/huiju/common/hk/HKConstant.java Bestand weergeven

@@ -0,0 +1,130 @@
1
+package com.community.huiju.common.hk;
2
+
3
+public class HKConstant {
4
+
5
+    /**
6
+     * APPKEY需要到部署的平台服务器上生成。
7
+     * <p>
8
+     * 调用Openpai的操作码,需要去平台上生成,详见《海康威视iVMS-8700平台SDKV2.*.* HTTP-OpenAPI使用说明书.chm》中[获取AppKey和Secret]章节说明
9
+     * </p>
10
+     * <p>
11
+     * 《海康威视iVMS-8700平台SDKV2.*.* HTTP-OpenAPI使用说明书.chm》 该文档请找技术支持或者交付的同事提供
12
+     * </p>
13
+     */
14
+    public static final String APPKEY = "b4434b13";
15
+
16
+    /**
17
+     * SECRET需要到部署的平台服务器上生成。
18
+     * <p>
19
+     * 调用Openpai的操作码,需要去平台上生成,详见《海康威视iVMS-8700平台SDKV2.*.* HTTP-OpenAPI使用说明书.chm》中[获取AppKey和Secret]章节说明
20
+     * </p>
21
+     * <p>
22
+     * 《海康威视iVMS-8700平台SDKV2.*.* HTTP-OpenAPI使用说明书.chm》 该文档请找技术支持或者交付的同事提供
23
+     * </p>
24
+     */
25
+    public static final String SECRET = "64a1f32d53784ce2a34bd81822db1b91";
26
+
27
+
28
+    /**
29
+     * http请求地址
30
+     * <p>openapi的地址,默认情况下openapi的IP端口与基础应用的IP端口是一致的</p>
31
+     * <p>请将地址配置正确.</p>
32
+     * <p>默认情况下是127.0.0.1:80 ,如果地址不通请根据实际情况修改IP端口</p>
33
+     */
34
+   // public static final String OPENAPI_IP_PORT_HTTP = "http://192.168.0.122";
35
+    //  public static final String OPENAPI_IP_PORT_HTTPS = "http://192.168.0.122";
36
+    //public static final String OPENAPI_IP_PORT_HTTP = "http://huiju.ngrok.xiaomiqiu.cn";
37
+    public static final String OPENAPI_IP_PORT_HTTP = "http://huifang.vipgz1.idcfengye.com";
38
+
39
+    /**
40
+     * <p>操作用户UUID,即用户UUID,首次使用操作用户UUID可以通过接口 [获取默认用户UUID]来获取</p>
41
+     * <p>也可以通过接口[分页获取用户]来获取</p>
42
+     */
43
+
44
+    /**
45
+     * 获取默认用户UUID的接口地址,此地址可以从《海康威视iVMS-8700平台SDKV2.*.* HTTP-OpenAPI使用说明书.chm》中具体的接口说明上获取
46
+     */
47
+    public static final String ITF_ADDRESS_GET_DEFAULT_USER_UUID = "/openapi/service/base/user/getDefaultUserUuid";
48
+
49
+    /**
50
+     * 分页获取监控点信息的接口地址,此地址可以从《海康威视iVMS-8700平台SDKV2.*.* HTTP-OpenAPI使用说明书.chm》中具体的接口说明上获取
51
+     */
52
+    public static final String ITF_ADDRESS_GET_CAMERAS = "/openapi/service/vss/res/getCameras";
53
+
54
+    /**
55
+     * 查询监控点地址
56
+     */
57
+    public static final String OP_USER_UUID = "5b2eb534696b11e89c2e438f92627767";
58
+
59
+    /**--主要是推送图片到海康
60
+     * 通过此接口将人员名单添加到指定的人员分组当中,此接口适合一次添加一个人员,如果需要批量添加可以使用平台上自带的图片压缩包的方式批量添加。
61
+     */
62
+    public  static  final  String OP_IMG="/openapi/service/fas/personInfo/addPersonInfoIntoGroup";
63
+
64
+    public static final String ITF_MONITORY_POINT = "/openapi/service/vss/res/getCamerasEx";
65
+    
66
+    /**
67
+     * 根据区域UUID集获取门禁点
68
+     */
69
+    public static final String DOORS_BY_REGION_UUIDS = "/openapi/service/acs/res/getDoorsByRegionUuids";
70
+    
71
+    /**
72
+     * 根据人员ID集添加权限
73
+     */
74
+    public static final String ADD_AUTHORITIES_BY_PERSONIDS = "/openapi/service/acs/auth/addAuthoritiesByPersonIds";
75
+    
76
+    /**
77
+     * 根据设备UUID集异动下载门禁权限
78
+     */
79
+    public static final String DOWNLOAD_AUTHORITY_BY_DEVICEUUIDS = "/openapi/service/acs/auth/downloadAuthorityByDeviceUuids";
80
+    
81
+    /**
82
+     * 指定人员人脸/指纹权限下载
83
+     */
84
+    public static final String DOWNLOAD_FACE_AND_FINGERINFOS = "/openapi/service/acs/auth/downloadFaceAndFingerInfos";
85
+
86
+    /**--推送图片时需要获取人员分组下的,人员分组ID
87
+     * --personGroupId--
88
+     */
89
+    public static final  String OP_PERSON_ID="/openapi/service/fas/personGroup/getPersonGroup";
90
+
91
+    /**
92
+     * 分页获取部门
93
+     */
94
+    public static final String ITF_DEPT= "/openapi/service/base/dept/getDeptInfos";
95
+
96
+    /**
97
+     * 根据部门名称分页获取部门
98
+     */
99
+    public static final String ITF_LIKE_DEPT_NAME = "/openapi/service/base/dept/getDeptInfosByName";
100
+
101
+    /**
102
+     * 添加 人员
103
+     */
104
+    public static final String ITF_ADD_USER = "/openapi/service/base/person/addPersonInfo";
105
+
106
+
107
+    /**
108
+     * 修改人员
109
+     */
110
+    public static final String ITF_UPDATE_USER ="/openapi/service/base/person/modifyPersonInfo";
111
+
112
+
113
+    /**
114
+     * 批量开卡
115
+     */
116
+    public static final String ITF_OPEN_CARD = "/openapi/service/base/person/batchOpenCards";
117
+
118
+    /**
119
+     * 根据人员ID集获取人员
120
+     */
121
+    public static final String ITF_GET_USER_ID = "/openapi/service/base/person/getPersonInfosByIds";
122
+    
123
+    /**
124
+     * 未预约登记(临时登记)
125
+     */
126
+    public static final String TEMPORARY_REGISTER = "/openapi/service/rvs/register/temporaryRegister";
127
+
128
+    
129
+
130
+}

+ 1278
- 0
CODE/smart-community/mq-message/src/main/java/com/community/huiju/common/hk/code/AcsEvent.java
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 1050
- 0
CODE/smart-community/mq-message/src/main/java/com/community/huiju/common/hk/code/Comm.java
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 1048
- 0
CODE/smart-community/mq-message/src/main/java/com/community/huiju/common/hk/code/EventDis.java
Diff onderdrukt omdat het te groot bestand
Bestand weergeven


+ 40
- 0
CODE/smart-community/mq-message/src/main/java/com/community/huiju/common/hk/entity/MonitoryPoint.java Bestand weergeven

@@ -0,0 +1,40 @@
1
+package com.community.huiju.common.hk.entity;
2
+
3
+import lombok.AllArgsConstructor;
4
+import lombok.Data;
5
+import lombok.NoArgsConstructor;
6
+
7
+/**
8
+ * 响应 监控中心 实体类
9
+ * @author weiximei
10
+ */
11
+@AllArgsConstructor
12
+@NoArgsConstructor
13
+@Data
14
+public class MonitoryPoint {
15
+
16
+    private Integer errorCode;
17
+
18
+    private String errorMessage;
19
+
20
+    private String data;
21
+
22
+
23
+    private class MonitoryPointData {
24
+        Integer total;
25
+        Integer pageNo;
26
+        Integer pageSize;
27
+        String list;
28
+
29
+
30
+    }
31
+
32
+    private class MonitoryPointList {
33
+
34
+        String cameraUuid;
35
+        String cameraName;
36
+
37
+    }
38
+
39
+
40
+}

+ 22
- 0
CODE/smart-community/mq-message/src/main/java/com/community/huiju/config/HttpSessionConfig.java Bestand weergeven

@@ -0,0 +1,22 @@
1
+package com.community.huiju.config;
2
+
3
+import org.springframework.context.annotation.Bean;
4
+import org.springframework.context.annotation.Configuration;
5
+import org.springframework.session.MapSession;
6
+import org.springframework.session.jdbc.config.annotation.web.http.EnableJdbcHttpSession;
7
+import org.springframework.session.web.http.HeaderHttpSessionIdResolver;
8
+import org.springframework.session.web.http.HttpSessionIdResolver;
9
+
10
+/**
11
+ * @author weiximei
12
+ */
13
+@Configuration
14
+@EnableJdbcHttpSession(maxInactiveIntervalInSeconds = MapSession.DEFAULT_MAX_INACTIVE_INTERVAL_SECONDS*4)
15
+public class HttpSessionConfig {
16
+
17
+    @Bean
18
+    public HttpSessionIdResolver httpSessionIdResolver() {
19
+        return HeaderHttpSessionIdResolver.xAuthToken();
20
+    }
21
+
22
+}

+ 21
- 0
CODE/smart-community/mq-message/src/main/java/com/community/huiju/dao/MqMessageMapper.java Bestand weergeven

@@ -0,0 +1,21 @@
1
+package com.community.huiju.dao;
2
+
3
+import com.community.huiju.model.MqMessage;
4
+import org.apache.ibatis.annotations.Mapper;
5
+
6
+@Mapper
7
+public interface MqMessageMapper {
8
+    int deleteByPrimaryKey(Integer id);
9
+
10
+    int insert(MqMessage record);
11
+
12
+    int insertSelective(MqMessage record);
13
+
14
+    MqMessage selectByPrimaryKey(Integer id);
15
+
16
+    int updateByPrimaryKeySelective(MqMessage record);
17
+
18
+    int updateByPrimaryKeyWithBLOBs(MqMessage record);
19
+
20
+    int updateByPrimaryKey(MqMessage record);
21
+}

+ 285
- 0
CODE/smart-community/mq-message/src/main/java/com/community/huiju/model/MqMessage.java Bestand weergeven

@@ -0,0 +1,285 @@
1
+package com.community.huiju.model;
2
+
3
+import java.util.Date;
4
+
5
+public class MqMessage {
6
+    private Integer id;
7
+
8
+    private Integer eventState;
9
+
10
+    private Integer eventLevel;
11
+
12
+    private String unitIdx;
13
+
14
+    private Integer eventType;
15
+
16
+    private String eventTypeName;
17
+
18
+    private Integer subSysType;
19
+
20
+    private String eventName;
21
+
22
+    private Date startTime;
23
+
24
+    private Date stopTime;
25
+
26
+    private String sourceIdx;
27
+
28
+    private Integer sourceType;
29
+
30
+    private String sourceName;
31
+
32
+    private String regionIdx;
33
+
34
+    private Integer eventCode;
35
+
36
+    private Integer deviceId;
37
+
38
+    private Integer deviceType;
39
+
40
+    private String deviceName;
41
+
42
+    private String eventCard;
43
+
44
+    private Integer personId;
45
+
46
+    private String personName;
47
+
48
+    private Integer deptId;
49
+
50
+    private String deptName;
51
+
52
+    private String deptCode;
53
+
54
+    private Integer inOut;
55
+
56
+    private Integer cardStatus;
57
+
58
+    private String picUrl;
59
+
60
+    private String extTxt;
61
+
62
+    public Integer getId() {
63
+        return id;
64
+    }
65
+
66
+    public void setId(Integer id) {
67
+        this.id = id;
68
+    }
69
+
70
+    public Integer getEventState() {
71
+        return eventState;
72
+    }
73
+
74
+    public void setEventState(Integer eventState) {
75
+        this.eventState = eventState;
76
+    }
77
+
78
+    public Integer getEventLevel() {
79
+        return eventLevel;
80
+    }
81
+
82
+    public void setEventLevel(Integer eventLevel) {
83
+        this.eventLevel = eventLevel;
84
+    }
85
+
86
+    public String getUnitIdx() {
87
+        return unitIdx;
88
+    }
89
+
90
+    public void setUnitIdx(String unitIdx) {
91
+        this.unitIdx = unitIdx == null ? null : unitIdx.trim();
92
+    }
93
+
94
+    public Integer getEventType() {
95
+        return eventType;
96
+    }
97
+
98
+    public void setEventType(Integer eventType) {
99
+        this.eventType = eventType;
100
+    }
101
+
102
+    public String getEventTypeName() {
103
+        return eventTypeName;
104
+    }
105
+
106
+    public void setEventTypeName(String eventTypeName) {
107
+        this.eventTypeName = eventTypeName == null ? null : eventTypeName.trim();
108
+    }
109
+
110
+    public Integer getSubSysType() {
111
+        return subSysType;
112
+    }
113
+
114
+    public void setSubSysType(Integer subSysType) {
115
+        this.subSysType = subSysType;
116
+    }
117
+
118
+    public String getEventName() {
119
+        return eventName;
120
+    }
121
+
122
+    public void setEventName(String eventName) {
123
+        this.eventName = eventName == null ? null : eventName.trim();
124
+    }
125
+
126
+    public Date getStartTime() {
127
+        return startTime;
128
+    }
129
+
130
+    public void setStartTime(Date startTime) {
131
+        this.startTime = startTime;
132
+    }
133
+
134
+    public Date getStopTime() {
135
+        return stopTime;
136
+    }
137
+
138
+    public void setStopTime(Date stopTime) {
139
+        this.stopTime = stopTime;
140
+    }
141
+
142
+    public String getSourceIdx() {
143
+        return sourceIdx;
144
+    }
145
+
146
+    public void setSourceIdx(String sourceIdx) {
147
+        this.sourceIdx = sourceIdx == null ? null : sourceIdx.trim();
148
+    }
149
+
150
+    public String getSourceName() {
151
+        return sourceName;
152
+    }
153
+
154
+    public void setSourceName(String sourceName) {
155
+        this.sourceName = sourceName == null ? null : sourceName.trim();
156
+    }
157
+
158
+    public String getRegionIdx() {
159
+        return regionIdx;
160
+    }
161
+
162
+    public void setRegionIdx(String regionIdx) {
163
+        this.regionIdx = regionIdx == null ? null : regionIdx.trim();
164
+    }
165
+
166
+    public Integer getEventCode() {
167
+        return eventCode;
168
+    }
169
+
170
+    public void setEventCode(Integer eventCode) {
171
+        this.eventCode = eventCode;
172
+    }
173
+
174
+    public Integer getDeviceId() {
175
+        return deviceId;
176
+    }
177
+
178
+    public void setDeviceId(Integer deviceId) {
179
+        this.deviceId = deviceId;
180
+    }
181
+
182
+    public Integer getDeviceType() {
183
+        return deviceType;
184
+    }
185
+
186
+    public void setDeviceType(Integer deviceType) {
187
+        this.deviceType = deviceType;
188
+    }
189
+
190
+    public String getDeviceName() {
191
+        return deviceName;
192
+    }
193
+
194
+    public void setDeviceName(String deviceName) {
195
+        this.deviceName = deviceName == null ? null : deviceName.trim();
196
+    }
197
+
198
+    public String getEventCard() {
199
+        return eventCard;
200
+    }
201
+
202
+    public void setEventCard(String eventCard) {
203
+        this.eventCard = eventCard == null ? null : eventCard.trim();
204
+    }
205
+
206
+    public Integer getPersonId() {
207
+        return personId;
208
+    }
209
+
210
+    public void setPersonId(Integer personId) {
211
+        this.personId = personId;
212
+    }
213
+
214
+    public String getPersonName() {
215
+        return personName;
216
+    }
217
+
218
+    public void setPersonName(String personName) {
219
+        this.personName = personName == null ? null : personName.trim();
220
+    }
221
+
222
+    public Integer getDeptId() {
223
+        return deptId;
224
+    }
225
+
226
+    public void setDeptId(Integer deptId) {
227
+        this.deptId = deptId;
228
+    }
229
+
230
+    public String getDeptName() {
231
+        return deptName;
232
+    }
233
+
234
+    public void setDeptName(String deptName) {
235
+        this.deptName = deptName == null ? null : deptName.trim();
236
+    }
237
+
238
+    public String getDeptCode() {
239
+        return deptCode;
240
+    }
241
+
242
+    public void setDeptCode(String deptCode) {
243
+        this.deptCode = deptCode == null ? null : deptCode.trim();
244
+    }
245
+
246
+    public Integer getInOut() {
247
+        return inOut;
248
+    }
249
+
250
+    public void setInOut(Integer inOut) {
251
+        this.inOut = inOut;
252
+    }
253
+
254
+    public Integer getCardStatus() {
255
+        return cardStatus;
256
+    }
257
+
258
+    public void setCardStatus(Integer cardStatus) {
259
+        this.cardStatus = cardStatus;
260
+    }
261
+
262
+    public String getPicUrl() {
263
+        return picUrl;
264
+    }
265
+
266
+    public void setPicUrl(String picUrl) {
267
+        this.picUrl = picUrl == null ? null : picUrl.trim();
268
+    }
269
+
270
+    public String getExtTxt() {
271
+        return extTxt;
272
+    }
273
+
274
+    public void setExtTxt(String extTxt) {
275
+        this.extTxt = extTxt == null ? null : extTxt.trim();
276
+    }
277
+    
278
+    public Integer getSourceType() {
279
+        return sourceType;
280
+    }
281
+    
282
+    public void setSourceType(Integer sourceType) {
283
+        this.sourceType = sourceType;
284
+    }
285
+}

+ 84
- 0
CODE/smart-community/mq-message/src/main/java/com/community/huiju/runner/MqRunner.java Bestand weergeven

@@ -0,0 +1,84 @@
1
+package com.community.huiju.runner;
2
+
3
+import com.community.huiju.common.hk.code.EventDis;
4
+import com.community.huiju.service.MqMessageServiceI;
5
+import org.apache.activemq.ActiveMQConnectionFactory;
6
+import org.springframework.beans.factory.annotation.Autowired;
7
+import org.springframework.boot.ApplicationArguments;
8
+import org.springframework.boot.ApplicationRunner;
9
+import org.springframework.stereotype.Component;
10
+
11
+import javax.jms.BytesMessage;
12
+import javax.jms.Connection;
13
+import javax.jms.Message;
14
+import javax.jms.MessageConsumer;
15
+import javax.jms.MessageListener;
16
+import javax.jms.Session;
17
+import javax.jms.Topic;
18
+
19
+/**
20
+ * @author FXF
21
+ * @date 2018-11-23
22
+ */
23
+@Component
24
+public class MqRunner implements ApplicationRunner {
25
+	
26
+	public static final String BROKER_URL = "failover:(tcp://192.168.0.122:61618)?timeout=2000";
27
+	
28
+	public static final String TARGET = "openapi.acs.topic";
29
+	
30
+	@Autowired
31
+	private MqMessageServiceI mqMessageService;
32
+	
33
+	@Override
34
+	public void run(ApplicationArguments args) throws Exception {
35
+		
36
+		Connection connection = null;
37
+		Session session = null;
38
+		try {
39
+			// 创建链接工厂
40
+			ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(BROKER_URL);
41
+			// 通过工厂创建一个连接
42
+			connection = factory.createConnection();
43
+			// factory.createConnection(userName, password)
44
+			// 启动连接
45
+			connection.start();
46
+			// 第一个参数表示是否使用事务,第二个参数指定消息的确认模式
47
+			session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
48
+			Topic topic = session.createTopic(TARGET);
49
+			MessageConsumer consumer = session.createConsumer(topic);
50
+			// 消费者异步接收topic里的消息
51
+			consumer.setMessageListener(new MessageListener() {
52
+				@Override
53
+				public void onMessage(Message msg) {
54
+					try {
55
+						// cms里发送的消息为BytesMessage,此处不做判断亦可
56
+						if (msg instanceof BytesMessage) {
57
+							BytesMessage bytesMessage = (BytesMessage)msg;
58
+							long length = bytesMessage.getBodyLength();
59
+							byte[] bt = new byte[(int)length];
60
+							// 将BytesMessage转换为byte类型
61
+							bytesMessage.readBytes(bt);
62
+							// 壳文件字段,EventDis类为event_dis.proto文件解析而来,CommEventLog类为事件壳文件类
63
+							EventDis.CommEventLog parseFrom = EventDis.CommEventLog.parseFrom(bt);
64
+							
65
+							//插入数据库
66
+							mqMessageService.saveMqMessage(parseFrom);
67
+							// 输出壳文件字段
68
+							//System.out.println(parseFrom.toString());
69
+							// 扩展字段,此字段为设备上报事件内容,部分事件需要使用pb文件再次解析
70
+							//ByteString extInfo = parseFrom.getExtInfo();
71
+							// 输出扩展字段
72
+							//System.out.println("序列化解析:" + AcsEvent.AccessEventLog.parseFrom(extInfo));
73
+						}
74
+					} catch (Exception e) {
75
+						System.out.println("订阅程序出错!");
76
+						e.printStackTrace();
77
+					}
78
+				}
79
+			});
80
+		} catch (Exception e) {
81
+			e.printStackTrace();
82
+		}
83
+	}
84
+}

+ 10
- 0
CODE/smart-community/mq-message/src/main/java/com/community/huiju/service/MqMessageServiceI.java Bestand weergeven

@@ -0,0 +1,10 @@
1
+package com.community.huiju.service;
2
+
3
+import com.community.huiju.common.hk.code.EventDis;
4
+import com.google.protobuf.InvalidProtocolBufferException;
5
+
6
+import java.text.ParseException;
7
+
8
+public interface MqMessageServiceI {
9
+	void saveMqMessage(EventDis.CommEventLog parseFrom) throws InvalidProtocolBufferException, ParseException;
10
+}

+ 65
- 0
CODE/smart-community/mq-message/src/main/java/com/community/huiju/service/impl/MqMessageServiceImpl.java Bestand weergeven

@@ -0,0 +1,65 @@
1
+package com.community.huiju.service.impl;
2
+
3
+import com.community.huiju.common.hk.code.AcsEvent;
4
+import com.community.huiju.common.hk.code.EventDis;
5
+import com.community.huiju.dao.MqMessageMapper;
6
+import com.community.huiju.model.MqMessage;
7
+import com.community.huiju.service.MqMessageServiceI;
8
+import com.google.protobuf.ByteString;
9
+import com.google.protobuf.InvalidProtocolBufferException;
10
+import org.springframework.beans.factory.annotation.Autowired;
11
+import org.springframework.stereotype.Service;
12
+
13
+import java.text.DateFormat;
14
+import java.text.ParseException;
15
+import java.text.SimpleDateFormat;
16
+
17
+/**
18
+ * @author FXF
19
+ * @date 2018-11-23
20
+ */
21
+@Service("mqMessageService")
22
+public class MqMessageServiceImpl implements MqMessageServiceI {
23
+	
24
+	@Autowired
25
+	private MqMessageMapper mqMessageMapper;
26
+	
27
+	@Override
28
+	public void saveMqMessage(EventDis.CommEventLog parseFrom) throws InvalidProtocolBufferException, ParseException {
29
+		DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
30
+		ByteString extInfo = parseFrom.getExtInfo();
31
+		//额外信息
32
+		AcsEvent.AccessEventLog exitFrom = AcsEvent.AccessEventLog.parseFrom(extInfo);
33
+		//插入数据库
34
+		MqMessage mqMessage = new MqMessage();
35
+		mqMessage.setEventState(parseFrom.getEventState());
36
+		mqMessage.setEventLevel(parseFrom.getEventLevel());
37
+		mqMessage.setUnitIdx(parseFrom.getUnitIdx());
38
+		mqMessage.setEventType(parseFrom.getEventType());
39
+		mqMessage.setEventTypeName(parseFrom.getEventTypeName());
40
+		mqMessage.setSubSysType(parseFrom.getSubSysType());
41
+		mqMessage.setEventName(parseFrom.getEventName());
42
+		mqMessage.setStartTime(format.parse(parseFrom.getStartTime()));
43
+		mqMessage.setStopTime(format.parse(parseFrom.getStopTime()));
44
+		mqMessage.setSourceIdx(parseFrom.getSourceIdx());
45
+		mqMessage.setSourceType(parseFrom.getSourceType());
46
+		mqMessage.setSourceName(parseFrom.getSourceName());
47
+		mqMessage.setRegionIdx(parseFrom.getRegionIdx());
48
+		mqMessage.setEventCode(exitFrom.getEventCode());
49
+		mqMessage.setDeviceId(exitFrom.getDeviceId());
50
+		mqMessage.setDeviceType(exitFrom.getDeviceType());
51
+		mqMessage.setDeviceName(exitFrom.getDeviceName());
52
+		mqMessage.setEventCard(exitFrom.getEventCard());
53
+		mqMessage.setPersonId(exitFrom.getPersonId());
54
+		mqMessage.setPersonName(exitFrom.getPersonName());
55
+		mqMessage.setDeptId(exitFrom.getDeptId());
56
+		mqMessage.setDeptName(exitFrom.getDeptName());
57
+		mqMessage.setDeptCode(exitFrom.getDeptCode());
58
+		mqMessage.setInOut(exitFrom.getInOut());
59
+		mqMessage.setExtTxt(exitFrom.getExtTxt());
60
+		mqMessage.setCardStatus(exitFrom.getCardStatus());
61
+		mqMessage.setPicUrl(exitFrom.getPicUrl());
62
+		//插入mq_message
63
+		mqMessageMapper.insertSelective(mqMessage);
64
+	}
65
+}

+ 61
- 0
CODE/smart-community/mq-message/src/main/java/com/community/huiju/vo/TaUserVO.java Bestand weergeven

@@ -0,0 +1,61 @@
1
+package com.community.huiju.vo;
2
+
3
+import lombok.AllArgsConstructor;
4
+import lombok.Data;
5
+import lombok.NoArgsConstructor;
6
+
7
+/**
8
+ * 用户数据
9
+ * @author weiximei
10
+ */
11
+@Data
12
+@AllArgsConstructor
13
+@NoArgsConstructor
14
+public class TaUserVO {
15
+
16
+    /** 编号 **/
17
+    private Integer id;
18
+
19
+    /** 小区编号 **/
20
+    private Integer communityId;
21
+
22
+    /** 头像 **/
23
+    private String headPortrait;
24
+
25
+    /** 用户名 **/
26
+    private String userName;
27
+
28
+    /** 登录名 **/
29
+    private String loginName;
30
+
31
+    /** 邮箱 **/
32
+    private String email;
33
+
34
+    /** 性别 **/
35
+    private String gender;
36
+
37
+    /** 认证状态 **/
38
+    private String verifyStatus;
39
+
40
+    /** 角色 **/
41
+    private String role;
42
+
43
+    /** 用户状态 **/
44
+    private String status;
45
+
46
+    /** 用户token **/
47
+    private String token;
48
+
49
+    /** 地址省市区 **/
50
+    private String addressProvince;
51
+
52
+    /** 小区名 **/
53
+    private String communityName;
54
+
55
+    /** 楼栋单元号 **/
56
+    private String addressBuilding;
57
+
58
+    /** 人脸录入 **/
59
+    private String face;
60
+
61
+}

+ 36
- 0
CODE/smart-community/mq-message/src/main/java/com/community/huiju/vo/TpTicketInfoVO.java Bestand weergeven

@@ -0,0 +1,36 @@
1
+package com.community.huiju.vo;
2
+
3
+import lombok.AllArgsConstructor;
4
+import lombok.Data;
5
+import lombok.NoArgsConstructor;
6
+
7
+import java.util.Date;
8
+
9
+/**
10
+ * 工单不包含所有的 答复 记录
11
+ * 只包含最新的 答复和答复时间
12
+ * @author weiximei
13
+ */
14
+@Data
15
+@AllArgsConstructor
16
+@NoArgsConstructor
17
+public class TpTicketInfoVO extends TpTicketVO {
18
+
19
+
20
+    /** 工单内容 **/
21
+    private String ticketContent;
22
+
23
+    /** 流转状态 **/
24
+    private String status;
25
+
26
+    /** 报修类型 0:公共区域  1: 房屋质量  2::户内设施   **/
27
+    private String repairType;
28
+
29
+    /** 评分 **/
30
+    private String score;
31
+
32
+    /** 评语 **/
33
+    private String comment;
34
+
35
+
36
+}

+ 63
- 0
CODE/smart-community/mq-message/src/main/java/com/community/huiju/vo/TpTicketVO.java Bestand weergeven

@@ -0,0 +1,63 @@
1
+package com.community.huiju.vo;
2
+
3
+import lombok.AllArgsConstructor;
4
+import lombok.Data;
5
+import lombok.NoArgsConstructor;
6
+
7
+import java.util.Date;
8
+
9
+/**
10
+ * 工单列表数据
11
+ * @author weiximei
12
+ */
13
+@Data
14
+@AllArgsConstructor
15
+@NoArgsConstructor
16
+public class TpTicketVO {
17
+
18
+    /** 编号 **/
19
+    private Integer id;
20
+
21
+    /** 小区编号 **/
22
+    private Integer communityId;
23
+
24
+    /** 用户app的id **/
25
+    private Integer taUserId;
26
+
27
+    /** ================================ **/
28
+
29
+    /** 工单标题 **/
30
+    private String ticketTitle;
31
+
32
+    /** 类型 报修/投诉/联系单 **/
33
+    private String type;
34
+
35
+    /** 受理人的id **/
36
+    private Integer tpUserId;
37
+
38
+    private Date createDate;
39
+
40
+    private Date updateDate;
41
+
42
+    /** 报修类型:0:公共区域  1: 房屋质量  2::户内设施  PS : 报修的情况下才有报修类型  **/
43
+    private String repairType;
44
+
45
+    /**
46
+     * 报修类型的名字
47
+     */
48
+    private String repairName;
49
+
50
+    /** ====================================== **/
51
+
52
+    /** 流程状态 **/
53
+    private String status;
54
+
55
+    /** 流程状态名称 **/
56
+    private String ticketStatusName;
57
+
58
+    /** 最新进展 **/
59
+    private String commentContent;
60
+
61
+    /** 最新进展的时间 **/
62
+    private Date commentCreateDate;
63
+}

+ 21
- 0
CODE/smart-community/mq-message/src/main/resources/application.yml Bestand weergeven

@@ -0,0 +1,21 @@
1
+management:
2
+  endpoints:
3
+    web:
4
+      exposure:
5
+        include: refresh,health,info
6
+## Mybatis
7
+mybatis:
8
+  typeAliasesPackage: com.community.huiju.model
9
+  mapperLocations: classpath:mapper/*.xml
10
+  configuration:
11
+    call-setters-on-nulls: true
12
+# 分页配置
13
+pagehelper:
14
+  helper-dialect: mysql
15
+  reasonable: true
16
+  support-methods-arguments: true
17
+  params: count=countSql
18
+# 打印sql
19
+logging:
20
+  level:
21
+    com.community.huiju.dao: debug

+ 24
- 0
CODE/smart-community/mq-message/src/main/resources/bootstrap.yml Bestand weergeven

@@ -0,0 +1,24 @@
1
+server:
2
+  port: 8087
3
+spring:
4
+  application:
5
+    name: mq-meaasge
6
+  cloud:
7
+    config:
8
+      name: application
9
+      profile: dev
10
+      label: master
11
+      discovery:
12
+        enabled: true
13
+        serviceId: config-server
14
+  session:
15
+    store-type: jdbc
16
+  servlet:
17
+    multipart:
18
+      max-file-size: 10MB
19
+      max-request-size: 50MB
20
+eureka:
21
+  client:
22
+    service-url:
23
+      defaultZone: http://localhost:8080/eureka/
24
+

+ 31
- 0
CODE/smart-community/mq-message/src/main/resources/log4j.properties Bestand weergeven

@@ -0,0 +1,31 @@
1
+log4j.rootLogger=info,A1,R
2
+log4j.appender.A1=org.apache.log4j.ConsoleAppender
3
+log4j.appender.A1.Target=System.out
4
+log4j.appender.A1.layout=org.apache.log4j.PatternLayout
5
+log4j.appender.A1.layout.ConversionPattern=%-5p%x [%t] %d - %c %m%n  
6
+
7
+log4j.appender.R=org.apache.log4j.DailyRollingFileAppender
8
+log4j.appender.R.File=../logs/resold_admin_.log
9
+log4j.appender.R.layout=org.apache.log4j.PatternLayout
10
+log4j.appender.R.Append = true
11
+log4j.appender.R.ImmediateFlush = true
12
+log4j.appender.R.DatePattern = '.' yyyy - MM - dd '.txt'
13
+log4j.appender.R.layout.ConversionPattern=%-5p%x [%t] %d -%c %m%n
14
+
15
+#log4j.logger.com.ibatis=DEBUG
16
+log4j.logger.org.springframework.transaction.support.TransactionSynchronizationManager = INFO
17
+log4j.logger.java.sql.Connection=DEBUG
18
+log4j.logger.java.sql.Statement=DEBUG
19
+log4j.logger.java.sql.PreparedStatement=DEBUG
20
+
21
+###############Log4j 4 SQL Output start################# #DEBUG
22
+log4j.logger.com.**.dao=INFO
23
+log4j.logger.com.springframework=DEBUG
24
+log4j.logger.com.ibatis=DEBUG  
25
+log4j.logger.com.ibatis.common.jdbc.SimpleDataSource=DEBUG  
26
+log4j.logger.com.ibatis.common.jdbc.ScriptRunner=DEBUG  
27
+log4j.logger.com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate=DEBUG
28
+log4j.logger.java.sql.ResultSet=DEBUG
29
+log4j.logger.org.apache.ibatis.logging.commons.JakartaCommonsLoggingImpl=DEBUG
30
+log4j.logger.java.sql=DEBUG,CONSOLE 
31
+###############Log4j 4 SQL Output end###################

+ 402
- 0
CODE/smart-community/mq-message/src/main/resources/mapper/MqMessageMapper.xml Bestand weergeven

@@ -0,0 +1,402 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.community.huiju.dao.MqMessageMapper" >
4
+  <resultMap id="BaseResultMap" type="com.community.huiju.model.MqMessage" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="event_state" property="eventState" jdbcType="INTEGER" />
7
+    <result column="event_level" property="eventLevel" jdbcType="INTEGER" />
8
+    <result column="unit_idx" property="unitIdx" jdbcType="VARCHAR" />
9
+    <result column="event_type" property="eventType" jdbcType="INTEGER" />
10
+    <result column="event_type_name" property="eventTypeName" jdbcType="VARCHAR" />
11
+    <result column="sub_sys_type" property="subSysType" jdbcType="INTEGER" />
12
+    <result column="event_name" property="eventName" jdbcType="VARCHAR" />
13
+    <result column="start_time" property="startTime" jdbcType="TIMESTAMP" />
14
+    <result column="stop_time" property="stopTime" jdbcType="TIMESTAMP" />
15
+    <result column="source_idx" property="sourceIdx" jdbcType="CHAR" />
16
+    <result column="source_type" property="sourceType" jdbcType="INTEGER" />
17
+    <result column="source_name" property="sourceName" jdbcType="VARCHAR" />
18
+    <result column="region_idx" property="regionIdx" jdbcType="VARCHAR" />
19
+    <result column="event_code" property="eventCode" jdbcType="INTEGER" />
20
+    <result column="device_id" property="deviceId" jdbcType="INTEGER" />
21
+    <result column="device_type" property="deviceType" jdbcType="INTEGER" />
22
+    <result column="device_name" property="deviceName" jdbcType="VARCHAR" />
23
+    <result column="event_card" property="eventCard" jdbcType="VARCHAR" />
24
+    <result column="person_id" property="personId" jdbcType="INTEGER" />
25
+    <result column="person_name" property="personName" jdbcType="VARCHAR" />
26
+    <result column="dept_id" property="deptId" jdbcType="INTEGER" />
27
+    <result column="dept_name" property="deptName" jdbcType="VARCHAR" />
28
+    <result column="dept_code" property="deptCode" jdbcType="VARCHAR" />
29
+    <result column="in_out" property="inOut" jdbcType="INTEGER" />
30
+    <result column="card_status" property="cardStatus" jdbcType="INTEGER" />
31
+    <result column="pic_url" property="picUrl" jdbcType="VARCHAR" />
32
+  </resultMap>
33
+  <resultMap id="ResultMapWithBLOBs" type="com.community.huiju.model.MqMessage" extends="BaseResultMap" >
34
+    <result column="ext_txt" property="extTxt" jdbcType="LONGVARCHAR" />
35
+  </resultMap>
36
+  <sql id="Base_Column_List" >
37
+    id, event_state, event_level, unit_idx, event_type, event_type_name, sub_sys_type, 
38
+    event_name, start_time, stop_time, source_idx, source_type, source_name, region_idx, 
39
+    event_code, device_id, device_type, device_name, event_card, person_id, person_name, 
40
+    dept_id, dept_name, dept_code, in_out, card_status, pic_url
41
+  </sql>
42
+  <sql id="Blob_Column_List" >
43
+    ext_txt
44
+  </sql>
45
+  <select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Integer" >
46
+    select 
47
+    <include refid="Base_Column_List" />
48
+    ,
49
+    <include refid="Blob_Column_List" />
50
+    from mq_message
51
+    where id = #{id,jdbcType=INTEGER}
52
+  </select>
53
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
54
+    delete from mq_message
55
+    where id = #{id,jdbcType=INTEGER}
56
+  </delete>
57
+  <insert id="insert" parameterType="com.community.huiju.model.MqMessage" >
58
+    insert into mq_message (id, event_state, event_level, 
59
+      unit_idx, event_type, event_type_name, 
60
+      sub_sys_type, event_name, start_time, 
61
+      stop_time, source_idx, source_type, 
62
+      source_name, region_idx, event_code, 
63
+      device_id, device_type, device_name, 
64
+      event_card, person_id, person_name, 
65
+      dept_id, dept_name, dept_code, 
66
+      in_out, card_status, pic_url, 
67
+      ext_txt)
68
+    values (#{id,jdbcType=INTEGER}, #{eventState,jdbcType=INTEGER}, #{eventLevel,jdbcType=INTEGER}, 
69
+      #{unitIdx,jdbcType=VARCHAR}, #{eventType,jdbcType=INTEGER}, #{eventTypeName,jdbcType=VARCHAR}, 
70
+      #{subSysType,jdbcType=INTEGER}, #{eventName,jdbcType=VARCHAR}, #{startTime,jdbcType=TIMESTAMP}, 
71
+      #{stopTime,jdbcType=TIMESTAMP}, #{sourceIdx,jdbcType=CHAR}, #{sourceType,jdbcType=INTEGER},
72
+      #{sourceName,jdbcType=VARCHAR}, #{regionIdx,jdbcType=VARCHAR}, #{eventCode,jdbcType=INTEGER}, 
73
+      #{deviceId,jdbcType=INTEGER}, #{deviceType,jdbcType=INTEGER}, #{deviceName,jdbcType=VARCHAR}, 
74
+      #{eventCard,jdbcType=VARCHAR}, #{personId,jdbcType=INTEGER}, #{personName,jdbcType=VARCHAR}, 
75
+      #{deptId,jdbcType=INTEGER}, #{deptName,jdbcType=VARCHAR}, #{deptCode,jdbcType=VARCHAR}, 
76
+      #{inOut,jdbcType=INTEGER}, #{cardStatus,jdbcType=INTEGER}, #{picUrl,jdbcType=VARCHAR}, 
77
+      #{extTxt,jdbcType=LONGVARCHAR})
78
+  </insert>
79
+  <insert id="insertSelective" parameterType="com.community.huiju.model.MqMessage" >
80
+    insert into mq_message
81
+    <trim prefix="(" suffix=")" suffixOverrides="," >
82
+      <if test="id != null" >
83
+        id,
84
+      </if>
85
+      <if test="eventState != null" >
86
+        event_state,
87
+      </if>
88
+      <if test="eventLevel != null" >
89
+        event_level,
90
+      </if>
91
+      <if test="unitIdx != null" >
92
+        unit_idx,
93
+      </if>
94
+      <if test="eventType != null" >
95
+        event_type,
96
+      </if>
97
+      <if test="eventTypeName != null" >
98
+        event_type_name,
99
+      </if>
100
+      <if test="subSysType != null" >
101
+        sub_sys_type,
102
+      </if>
103
+      <if test="eventName != null" >
104
+        event_name,
105
+      </if>
106
+      <if test="startTime != null" >
107
+        start_time,
108
+      </if>
109
+      <if test="stopTime != null" >
110
+        stop_time,
111
+      </if>
112
+      <if test="sourceIdx != null" >
113
+        source_idx,
114
+      </if>
115
+      <if test="sourceType != null" >
116
+        source_type,
117
+      </if>
118
+      <if test="sourceName != null" >
119
+        source_name,
120
+      </if>
121
+      <if test="regionIdx != null" >
122
+        region_idx,
123
+      </if>
124
+      <if test="eventCode != null" >
125
+        event_code,
126
+      </if>
127
+      <if test="deviceId != null" >
128
+        device_id,
129
+      </if>
130
+      <if test="deviceType != null" >
131
+        device_type,
132
+      </if>
133
+      <if test="deviceName != null" >
134
+        device_name,
135
+      </if>
136
+      <if test="eventCard != null" >
137
+        event_card,
138
+      </if>
139
+      <if test="personId != null" >
140
+        person_id,
141
+      </if>
142
+      <if test="personName != null" >
143
+        person_name,
144
+      </if>
145
+      <if test="deptId != null" >
146
+        dept_id,
147
+      </if>
148
+      <if test="deptName != null" >
149
+        dept_name,
150
+      </if>
151
+      <if test="deptCode != null" >
152
+        dept_code,
153
+      </if>
154
+      <if test="inOut != null" >
155
+        in_out,
156
+      </if>
157
+      <if test="cardStatus != null" >
158
+        card_status,
159
+      </if>
160
+      <if test="picUrl != null" >
161
+        pic_url,
162
+      </if>
163
+      <if test="extTxt != null" >
164
+        ext_txt,
165
+      </if>
166
+    </trim>
167
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
168
+      <if test="id != null" >
169
+        #{id,jdbcType=INTEGER},
170
+      </if>
171
+      <if test="eventState != null" >
172
+        #{eventState,jdbcType=INTEGER},
173
+      </if>
174
+      <if test="eventLevel != null" >
175
+        #{eventLevel,jdbcType=INTEGER},
176
+      </if>
177
+      <if test="unitIdx != null" >
178
+        #{unitIdx,jdbcType=VARCHAR},
179
+      </if>
180
+      <if test="eventType != null" >
181
+        #{eventType,jdbcType=INTEGER},
182
+      </if>
183
+      <if test="eventTypeName != null" >
184
+        #{eventTypeName,jdbcType=VARCHAR},
185
+      </if>
186
+      <if test="subSysType != null" >
187
+        #{subSysType,jdbcType=INTEGER},
188
+      </if>
189
+      <if test="eventName != null" >
190
+        #{eventName,jdbcType=VARCHAR},
191
+      </if>
192
+      <if test="startTime != null" >
193
+        #{startTime,jdbcType=TIMESTAMP},
194
+      </if>
195
+      <if test="stopTime != null" >
196
+        #{stopTime,jdbcType=TIMESTAMP},
197
+      </if>
198
+      <if test="sourceIdx != null" >
199
+        #{sourceIdx,jdbcType=CHAR},
200
+      </if>
201
+      <if test="sourceType != null" >
202
+        #{sourceType,jdbcType=INTEGER},
203
+      </if>
204
+      <if test="sourceName != null" >
205
+        #{sourceName,jdbcType=VARCHAR},
206
+      </if>
207
+      <if test="regionIdx != null" >
208
+        #{regionIdx,jdbcType=VARCHAR},
209
+      </if>
210
+      <if test="eventCode != null" >
211
+        #{eventCode,jdbcType=INTEGER},
212
+      </if>
213
+      <if test="deviceId != null" >
214
+        #{deviceId,jdbcType=INTEGER},
215
+      </if>
216
+      <if test="deviceType != null" >
217
+        #{deviceType,jdbcType=INTEGER},
218
+      </if>
219
+      <if test="deviceName != null" >
220
+        #{deviceName,jdbcType=VARCHAR},
221
+      </if>
222
+      <if test="eventCard != null" >
223
+        #{eventCard,jdbcType=VARCHAR},
224
+      </if>
225
+      <if test="personId != null" >
226
+        #{personId,jdbcType=INTEGER},
227
+      </if>
228
+      <if test="personName != null" >
229
+        #{personName,jdbcType=VARCHAR},
230
+      </if>
231
+      <if test="deptId != null" >
232
+        #{deptId,jdbcType=INTEGER},
233
+      </if>
234
+      <if test="deptName != null" >
235
+        #{deptName,jdbcType=VARCHAR},
236
+      </if>
237
+      <if test="deptCode != null" >
238
+        #{deptCode,jdbcType=VARCHAR},
239
+      </if>
240
+      <if test="inOut != null" >
241
+        #{inOut,jdbcType=INTEGER},
242
+      </if>
243
+      <if test="cardStatus != null" >
244
+        #{cardStatus,jdbcType=INTEGER},
245
+      </if>
246
+      <if test="picUrl != null" >
247
+        #{picUrl,jdbcType=VARCHAR},
248
+      </if>
249
+      <if test="extTxt != null" >
250
+        #{extTxt,jdbcType=LONGVARCHAR},
251
+      </if>
252
+    </trim>
253
+  </insert>
254
+  <update id="updateByPrimaryKeySelective" parameterType="com.community.huiju.model.MqMessage" >
255
+    update mq_message
256
+    <set >
257
+      <if test="eventState != null" >
258
+        event_state = #{eventState,jdbcType=INTEGER},
259
+      </if>
260
+      <if test="eventLevel != null" >
261
+        event_level = #{eventLevel,jdbcType=INTEGER},
262
+      </if>
263
+      <if test="unitIdx != null" >
264
+        unit_idx = #{unitIdx,jdbcType=VARCHAR},
265
+      </if>
266
+      <if test="eventType != null" >
267
+        event_type = #{eventType,jdbcType=INTEGER},
268
+      </if>
269
+      <if test="eventTypeName != null" >
270
+        event_type_name = #{eventTypeName,jdbcType=VARCHAR},
271
+      </if>
272
+      <if test="subSysType != null" >
273
+        sub_sys_type = #{subSysType,jdbcType=INTEGER},
274
+      </if>
275
+      <if test="eventName != null" >
276
+        event_name = #{eventName,jdbcType=VARCHAR},
277
+      </if>
278
+      <if test="startTime != null" >
279
+        start_time = #{startTime,jdbcType=TIMESTAMP},
280
+      </if>
281
+      <if test="stopTime != null" >
282
+        stop_time = #{stopTime,jdbcType=TIMESTAMP},
283
+      </if>
284
+      <if test="sourceIdx != null" >
285
+        source_idx = #{sourceIdx,jdbcType=CHAR},
286
+      </if>
287
+      <if test="sourceType != null" >
288
+        source_type = #{sourceType,jdbcType=INTEGER},
289
+      </if>
290
+      <if test="sourceName != null" >
291
+        source_name = #{sourceName,jdbcType=VARCHAR},
292
+      </if>
293
+      <if test="regionIdx != null" >
294
+        region_idx = #{regionIdx,jdbcType=VARCHAR},
295
+      </if>
296
+      <if test="eventCode != null" >
297
+        event_code = #{eventCode,jdbcType=INTEGER},
298
+      </if>
299
+      <if test="deviceId != null" >
300
+        device_id = #{deviceId,jdbcType=INTEGER},
301
+      </if>
302
+      <if test="deviceType != null" >
303
+        device_type = #{deviceType,jdbcType=INTEGER},
304
+      </if>
305
+      <if test="deviceName != null" >
306
+        device_name = #{deviceName,jdbcType=VARCHAR},
307
+      </if>
308
+      <if test="eventCard != null" >
309
+        event_card = #{eventCard,jdbcType=VARCHAR},
310
+      </if>
311
+      <if test="personId != null" >
312
+        person_id = #{personId,jdbcType=INTEGER},
313
+      </if>
314
+      <if test="personName != null" >
315
+        person_name = #{personName,jdbcType=VARCHAR},
316
+      </if>
317
+      <if test="deptId != null" >
318
+        dept_id = #{deptId,jdbcType=INTEGER},
319
+      </if>
320
+      <if test="deptName != null" >
321
+        dept_name = #{deptName,jdbcType=VARCHAR},
322
+      </if>
323
+      <if test="deptCode != null" >
324
+        dept_code = #{deptCode,jdbcType=VARCHAR},
325
+      </if>
326
+      <if test="inOut != null" >
327
+        in_out = #{inOut,jdbcType=INTEGER},
328
+      </if>
329
+      <if test="cardStatus != null" >
330
+        card_status = #{cardStatus,jdbcType=INTEGER},
331
+      </if>
332
+      <if test="picUrl != null" >
333
+        pic_url = #{picUrl,jdbcType=VARCHAR},
334
+      </if>
335
+      <if test="extTxt != null" >
336
+        ext_txt = #{extTxt,jdbcType=LONGVARCHAR},
337
+      </if>
338
+    </set>
339
+    where id = #{id,jdbcType=INTEGER}
340
+  </update>
341
+  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.community.huiju.model.MqMessage" >
342
+    update mq_message
343
+    set event_state = #{eventState,jdbcType=INTEGER},
344
+      event_level = #{eventLevel,jdbcType=INTEGER},
345
+      unit_idx = #{unitIdx,jdbcType=VARCHAR},
346
+      event_type = #{eventType,jdbcType=INTEGER},
347
+      event_type_name = #{eventTypeName,jdbcType=VARCHAR},
348
+      sub_sys_type = #{subSysType,jdbcType=INTEGER},
349
+      event_name = #{eventName,jdbcType=VARCHAR},
350
+      start_time = #{startTime,jdbcType=TIMESTAMP},
351
+      stop_time = #{stopTime,jdbcType=TIMESTAMP},
352
+      source_idx = #{sourceIdx,jdbcType=CHAR},
353
+      source_type = #{sourceType,jdbcType=INTEGER},
354
+      source_name = #{sourceName,jdbcType=VARCHAR},
355
+      region_idx = #{regionIdx,jdbcType=VARCHAR},
356
+      event_code = #{eventCode,jdbcType=INTEGER},
357
+      device_id = #{deviceId,jdbcType=INTEGER},
358
+      device_type = #{deviceType,jdbcType=INTEGER},
359
+      device_name = #{deviceName,jdbcType=VARCHAR},
360
+      event_card = #{eventCard,jdbcType=VARCHAR},
361
+      person_id = #{personId,jdbcType=INTEGER},
362
+      person_name = #{personName,jdbcType=VARCHAR},
363
+      dept_id = #{deptId,jdbcType=INTEGER},
364
+      dept_name = #{deptName,jdbcType=VARCHAR},
365
+      dept_code = #{deptCode,jdbcType=VARCHAR},
366
+      in_out = #{inOut,jdbcType=INTEGER},
367
+      card_status = #{cardStatus,jdbcType=INTEGER},
368
+      pic_url = #{picUrl,jdbcType=VARCHAR},
369
+      ext_txt = #{extTxt,jdbcType=LONGVARCHAR}
370
+    where id = #{id,jdbcType=INTEGER}
371
+  </update>
372
+  <update id="updateByPrimaryKey" parameterType="com.community.huiju.model.MqMessage" >
373
+    update mq_message
374
+    set event_state = #{eventState,jdbcType=INTEGER},
375
+      event_level = #{eventLevel,jdbcType=INTEGER},
376
+      unit_idx = #{unitIdx,jdbcType=VARCHAR},
377
+      event_type = #{eventType,jdbcType=INTEGER},
378
+      event_type_name = #{eventTypeName,jdbcType=VARCHAR},
379
+      sub_sys_type = #{subSysType,jdbcType=INTEGER},
380
+      event_name = #{eventName,jdbcType=VARCHAR},
381
+      start_time = #{startTime,jdbcType=TIMESTAMP},
382
+      stop_time = #{stopTime,jdbcType=TIMESTAMP},
383
+      source_idx = #{sourceIdx,jdbcType=CHAR},
384
+      source_type = #{sourceType,jdbcType=INTEGER},
385
+      source_name = #{sourceName,jdbcType=VARCHAR},
386
+      region_idx = #{regionIdx,jdbcType=VARCHAR},
387
+      event_code = #{eventCode,jdbcType=INTEGER},
388
+      device_id = #{deviceId,jdbcType=INTEGER},
389
+      device_type = #{deviceType,jdbcType=INTEGER},
390
+      device_name = #{deviceName,jdbcType=VARCHAR},
391
+      event_card = #{eventCard,jdbcType=VARCHAR},
392
+      person_id = #{personId,jdbcType=INTEGER},
393
+      person_name = #{personName,jdbcType=VARCHAR},
394
+      dept_id = #{deptId,jdbcType=INTEGER},
395
+      dept_name = #{deptName,jdbcType=VARCHAR},
396
+      dept_code = #{deptCode,jdbcType=VARCHAR},
397
+      in_out = #{inOut,jdbcType=INTEGER},
398
+      card_status = #{cardStatus,jdbcType=INTEGER},
399
+      pic_url = #{picUrl,jdbcType=VARCHAR}
400
+    where id = #{id,jdbcType=INTEGER}
401
+  </update>
402
+</mapper>

+ 1
- 0
CODE/smart-community/pom.xml Bestand weergeven

@@ -15,6 +15,7 @@
15 15
 		<module>eureka-sever</module>
16 16
 		<module>zuul</module>
17 17
 		<module>operate-api</module>
18
+		<module>mq-message</module>
18 19
         <module>community-common</module>
19 20
     </modules>
20 21
 

+ 10
- 8
文档/MYSQL/smartCommunity.pdb Bestand weergeven

@@ -1,5 +1,5 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2
-<?PowerDesigner AppLocale="UTF16" ID="{1EFA7B8F-E5BE-422B-A0AE-B907AA87924F}" Label="" LastModificationDate="1542953140" Name="smartCommunity" Objects="697" Symbols="79" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
2
+<?PowerDesigner AppLocale="UTF16" ID="{1EFA7B8F-E5BE-422B-A0AE-B907AA87924F}" Label="" LastModificationDate="1542960175" Name="smartCommunity" Objects="686" Symbols="79" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
3 3
 <!-- do not edit this file -->
4 4
 
5 5
 <Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object">
@@ -12262,11 +12262,11 @@ LABL 0 新宋体,8,N</a:FontList>
12262 12262
 </o:Table>
12263 12263
 <o:Table Id="o162">
12264 12264
 <a:ObjectID>DA8BCB49-B53D-4292-8F74-53A643DB2C6C</a:ObjectID>
12265
-<a:Name>mq_messa</a:Name>
12266
-<a:Code>mq_messa</a:Code>
12265
+<a:Name>mq_message</a:Name>
12266
+<a:Code>mq_message</a:Code>
12267 12267
 <a:CreationDate>1542952019</a:CreationDate>
12268 12268
 <a:Creator>szc</a:Creator>
12269
-<a:ModificationDate>1542953140</a:ModificationDate>
12269
+<a:ModificationDate>1542957441</a:ModificationDate>
12270 12270
 <a:Modifier>szc</a:Modifier>
12271 12271
 <a:Comment>消息订阅消息表</a:Comment>
12272 12272
 <a:TotalSavingCurrency/>
@@ -12387,8 +12387,10 @@ LABL 0 新宋体,8,N</a:FontList>
12387 12387
 <a:Code>source_idx</a:Code>
12388 12388
 <a:CreationDate>1542952568</a:CreationDate>
12389 12389
 <a:Creator>szc</a:Creator>
12390
-<a:ModificationDate>1542953140</a:ModificationDate>
12390
+<a:ModificationDate>1542960175</a:ModificationDate>
12391 12391
 <a:Modifier>szc</a:Modifier>
12392
+<a:DataType>varchar(255)</a:DataType>
12393
+<a:Length>255</a:Length>
12392 12394
 </o:Column>
12393 12395
 <o:Column Id="o625">
12394 12396
 <a:ObjectID>5DA158D3-6F7D-4D03-8D78-C3D556CB6AC5</a:ObjectID>
@@ -12396,10 +12398,10 @@ LABL 0 新宋体,8,N</a:FontList>
12396 12398
 <a:Code>source_type</a:Code>
12397 12399
 <a:CreationDate>1542952568</a:CreationDate>
12398 12400
 <a:Creator>szc</a:Creator>
12399
-<a:ModificationDate>1542953140</a:ModificationDate>
12401
+<a:ModificationDate>1542959578</a:ModificationDate>
12400 12402
 <a:Modifier>szc</a:Modifier>
12401
-<a:DataType>varchar(255)</a:DataType>
12402
-<a:Length>255</a:Length>
12403
+<a:DataType>int(90)</a:DataType>
12404
+<a:Length>90</a:Length>
12403 12405
 </o:Column>
12404 12406
 <o:Column Id="o626">
12405 12407
 <a:ObjectID>3D617607-AAB2-4D24-8C28-578B3FBC4917</a:ObjectID>

+ 10
- 8
文档/MYSQL/smartCommunity.pdm Bestand weergeven

@@ -1,5 +1,5 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2
-<?PowerDesigner AppLocale="UTF16" ID="{1EFA7B8F-E5BE-422B-A0AE-B907AA87924F}" Label="" LastModificationDate="1542953140" Name="smartCommunity" Objects="697" Symbols="79" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
2
+<?PowerDesigner AppLocale="UTF16" ID="{1EFA7B8F-E5BE-422B-A0AE-B907AA87924F}" Label="" LastModificationDate="1542960175" Name="smartCommunity" Objects="686" Symbols="79" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
3 3
 <!-- do not edit this file -->
4 4
 
5 5
 <Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object">
@@ -12262,11 +12262,11 @@ LABL 0 新宋体,8,N</a:FontList>
12262 12262
 </o:Table>
12263 12263
 <o:Table Id="o162">
12264 12264
 <a:ObjectID>DA8BCB49-B53D-4292-8F74-53A643DB2C6C</a:ObjectID>
12265
-<a:Name>mq_messa</a:Name>
12266
-<a:Code>mq_messa</a:Code>
12265
+<a:Name>mq_message</a:Name>
12266
+<a:Code>mq_message</a:Code>
12267 12267
 <a:CreationDate>1542952019</a:CreationDate>
12268 12268
 <a:Creator>szc</a:Creator>
12269
-<a:ModificationDate>1542953140</a:ModificationDate>
12269
+<a:ModificationDate>1542957441</a:ModificationDate>
12270 12270
 <a:Modifier>szc</a:Modifier>
12271 12271
 <a:Comment>消息订阅消息表</a:Comment>
12272 12272
 <a:TotalSavingCurrency/>
@@ -12387,8 +12387,10 @@ LABL 0 新宋体,8,N</a:FontList>
12387 12387
 <a:Code>source_idx</a:Code>
12388 12388
 <a:CreationDate>1542952568</a:CreationDate>
12389 12389
 <a:Creator>szc</a:Creator>
12390
-<a:ModificationDate>1542953140</a:ModificationDate>
12390
+<a:ModificationDate>1542960175</a:ModificationDate>
12391 12391
 <a:Modifier>szc</a:Modifier>
12392
+<a:DataType>varchar(255)</a:DataType>
12393
+<a:Length>255</a:Length>
12392 12394
 </o:Column>
12393 12395
 <o:Column Id="o625">
12394 12396
 <a:ObjectID>5DA158D3-6F7D-4D03-8D78-C3D556CB6AC5</a:ObjectID>
@@ -12396,10 +12398,10 @@ LABL 0 新宋体,8,N</a:FontList>
12396 12398
 <a:Code>source_type</a:Code>
12397 12399
 <a:CreationDate>1542952568</a:CreationDate>
12398 12400
 <a:Creator>szc</a:Creator>
12399
-<a:ModificationDate>1542953140</a:ModificationDate>
12401
+<a:ModificationDate>1542959578</a:ModificationDate>
12400 12402
 <a:Modifier>szc</a:Modifier>
12401
-<a:DataType>varchar(255)</a:DataType>
12402
-<a:Length>255</a:Length>
12403
+<a:DataType>int(90)</a:DataType>
12404
+<a:Length>90</a:Length>
12403 12405
 </o:Column>
12404 12406
 <o:Column Id="o626">
12405 12407
 <a:ObjectID>3D617607-AAB2-4D24-8C28-578B3FBC4917</a:ObjectID>