Bladeren bron

first commit

Yansen 2 jaren geleden
commit
2be1cabbc0
80 gewijzigde bestanden met toevoegingen van 3398 en 0 verwijderingen
  1. 35
    0
      .gitignore
  2. BIN
      .mvn/wrapper/maven-wrapper.jar
  3. 2
    0
      .mvn/wrapper/maven-wrapper.properties
  4. 316
    0
      mvnw
  5. 188
    0
      mvnw.cmd
  6. 134
    0
      pom.xml
  7. 17
    0
      src/main/java/com/njyunzhi/servsummary/Application.java
  8. 28
    0
      src/main/java/com/njyunzhi/servsummary/common/BaseController.java
  9. 8
    0
      src/main/java/com/njyunzhi/servsummary/common/Constants.java
  10. 60
    0
      src/main/java/com/njyunzhi/servsummary/common/DateUtil.java
  11. 17
    0
      src/main/java/com/njyunzhi/servsummary/common/EncryptUtils.java
  12. 76
    0
      src/main/java/com/njyunzhi/servsummary/common/ResponseBean.java
  13. 156
    0
      src/main/java/com/njyunzhi/servsummary/common/SMSCaptcha.java
  14. 51
    0
      src/main/java/com/njyunzhi/servsummary/common/SMSUtils.java
  15. 131
    0
      src/main/java/com/njyunzhi/servsummary/common/StringUtils.java
  16. 14
    0
      src/main/java/com/njyunzhi/servsummary/config/FilterConfig.java
  17. 17
    0
      src/main/java/com/njyunzhi/servsummary/config/MybatisPlusConfig.java
  18. 48
    0
      src/main/java/com/njyunzhi/servsummary/config/SaTokenConfigure.java
  19. 24
    0
      src/main/java/com/njyunzhi/servsummary/config/SwagggerConfig.java
  20. 57
    0
      src/main/java/com/njyunzhi/servsummary/controller/LoginController.java
  21. 54
    0
      src/main/java/com/njyunzhi/servsummary/controller/SysSmsController.java
  22. 101
    0
      src/main/java/com/njyunzhi/servsummary/controller/SysUserController.java
  23. 101
    0
      src/main/java/com/njyunzhi/servsummary/controller/TaContcatController.java
  24. 101
    0
      src/main/java/com/njyunzhi/servsummary/controller/TaEcsController.java
  25. 101
    0
      src/main/java/com/njyunzhi/servsummary/controller/TaOssBucketController.java
  26. 101
    0
      src/main/java/com/njyunzhi/servsummary/controller/TaPlatformController.java
  27. 101
    0
      src/main/java/com/njyunzhi/servsummary/controller/TaProjectController.java
  28. 101
    0
      src/main/java/com/njyunzhi/servsummary/controller/TaServiceController.java
  29. 101
    0
      src/main/java/com/njyunzhi/servsummary/controller/TaSslController.java
  30. 49
    0
      src/main/java/com/njyunzhi/servsummary/entity/SysSms.java
  31. 42
    0
      src/main/java/com/njyunzhi/servsummary/entity/SysUser.java
  32. 42
    0
      src/main/java/com/njyunzhi/servsummary/entity/TaContcat.java
  33. 57
    0
      src/main/java/com/njyunzhi/servsummary/entity/TaEcs.java
  34. 45
    0
      src/main/java/com/njyunzhi/servsummary/entity/TaOssBucket.java
  35. 48
    0
      src/main/java/com/njyunzhi/servsummary/entity/TaPlatform.java
  36. 48
    0
      src/main/java/com/njyunzhi/servsummary/entity/TaProject.java
  37. 87
    0
      src/main/java/com/njyunzhi/servsummary/entity/TaService.java
  38. 45
    0
      src/main/java/com/njyunzhi/servsummary/entity/TaSsl.java
  39. 18
    0
      src/main/java/com/njyunzhi/servsummary/mapper/SysSmsMapper.java
  40. 16
    0
      src/main/java/com/njyunzhi/servsummary/mapper/SysUserMapper.java
  41. 16
    0
      src/main/java/com/njyunzhi/servsummary/mapper/TaContcatMapper.java
  42. 16
    0
      src/main/java/com/njyunzhi/servsummary/mapper/TaEcsMapper.java
  43. 16
    0
      src/main/java/com/njyunzhi/servsummary/mapper/TaOssBucketMapper.java
  44. 16
    0
      src/main/java/com/njyunzhi/servsummary/mapper/TaPlatformMapper.java
  45. 16
    0
      src/main/java/com/njyunzhi/servsummary/mapper/TaProjectMapper.java
  46. 16
    0
      src/main/java/com/njyunzhi/servsummary/mapper/TaServiceMapper.java
  47. 16
    0
      src/main/java/com/njyunzhi/servsummary/mapper/TaSslMapper.java
  48. 26
    0
      src/main/java/com/njyunzhi/servsummary/service/IBaseService.java
  49. 14
    0
      src/main/java/com/njyunzhi/servsummary/service/SysSmsService.java
  50. 13
    0
      src/main/java/com/njyunzhi/servsummary/service/SysUserService.java
  51. 13
    0
      src/main/java/com/njyunzhi/servsummary/service/TaContcatService.java
  52. 13
    0
      src/main/java/com/njyunzhi/servsummary/service/TaEcsService.java
  53. 13
    0
      src/main/java/com/njyunzhi/servsummary/service/TaOssBucketService.java
  54. 13
    0
      src/main/java/com/njyunzhi/servsummary/service/TaPlatformService.java
  55. 13
    0
      src/main/java/com/njyunzhi/servsummary/service/TaProjectService.java
  56. 13
    0
      src/main/java/com/njyunzhi/servsummary/service/TaServiceService.java
  57. 13
    0
      src/main/java/com/njyunzhi/servsummary/service/TaSslService.java
  58. 108
    0
      src/main/java/com/njyunzhi/servsummary/service/impl/BaseServiceImpl.java
  59. 22
    0
      src/main/java/com/njyunzhi/servsummary/service/impl/SysSmsServiceImpl.java
  60. 16
    0
      src/main/java/com/njyunzhi/servsummary/service/impl/SysUserServiceImpl.java
  61. 16
    0
      src/main/java/com/njyunzhi/servsummary/service/impl/TaContcatServiceImpl.java
  62. 16
    0
      src/main/java/com/njyunzhi/servsummary/service/impl/TaEcsServiceImpl.java
  63. 16
    0
      src/main/java/com/njyunzhi/servsummary/service/impl/TaOssBucketServiceImpl.java
  64. 16
    0
      src/main/java/com/njyunzhi/servsummary/service/impl/TaPlatformServiceImpl.java
  65. 16
    0
      src/main/java/com/njyunzhi/servsummary/service/impl/TaProjectServiceImpl.java
  66. 16
    0
      src/main/java/com/njyunzhi/servsummary/service/impl/TaServiceServiceImpl.java
  67. 16
    0
      src/main/java/com/njyunzhi/servsummary/service/impl/TaSslServiceImpl.java
  68. 16
    0
      src/main/java/com/njyunzhi/servsummary/vo/LoginParm.java
  69. 6
    0
      src/main/resources/application-dev.yml
  70. 6
    0
      src/main/resources/application-prod.yml
  71. 54
    0
      src/main/resources/application.yml
  72. 16
    0
      src/main/resources/mapper/SysSmsMapper.xml
  73. 6
    0
      src/main/resources/mapper/SysUserMapper.xml
  74. 6
    0
      src/main/resources/mapper/TaContcatMapper.xml
  75. 6
    0
      src/main/resources/mapper/TaEcsMapper.xml
  76. 6
    0
      src/main/resources/mapper/TaOssBucketMapper.xml
  77. 6
    0
      src/main/resources/mapper/TaPlatformMapper.xml
  78. 6
    0
      src/main/resources/mapper/TaProjectMapper.xml
  79. 6
    0
      src/main/resources/mapper/TaServiceMapper.xml
  80. 6
    0
      src/main/resources/mapper/TaSslMapper.xml

+ 35
- 0
.gitignore Bestand weergeven

@@ -0,0 +1,35 @@
1
+HELP.md
2
+target/
3
+!.mvn/wrapper/maven-wrapper.jar
4
+!**/src/main/**/target/
5
+!**/src/test/**/target/
6
+
7
+### STS ###
8
+.apt_generated
9
+.classpath
10
+.factorypath
11
+.project
12
+.settings
13
+.springBeans
14
+.sts4-cache
15
+
16
+### IntelliJ IDEA ###
17
+.idea
18
+*.iws
19
+*.iml
20
+*.ipr
21
+
22
+### NetBeans ###
23
+/nbproject/private/
24
+/nbbuild/
25
+/dist/
26
+/nbdist/
27
+/.nb-gradle/
28
+build/
29
+!**/src/main/**/build/
30
+!**/src/test/**/build/
31
+
32
+### VS Code ###
33
+.vscode/
34
+
35
+ssl/

BIN
.mvn/wrapper/maven-wrapper.jar Bestand weergeven


+ 2
- 0
.mvn/wrapper/maven-wrapper.properties Bestand weergeven

@@ -0,0 +1,2 @@
1
+distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.4/apache-maven-3.8.4-bin.zip
2
+wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar

+ 316
- 0
mvnw Bestand weergeven

@@ -0,0 +1,316 @@
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
+#    https://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
+# Maven 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 /usr/local/etc/mavenrc ] ; then
40
+    . /usr/local/etc/mavenrc
41
+  fi
42
+
43
+  if [ -f /etc/mavenrc ] ; then
44
+    . /etc/mavenrc
45
+  fi
46
+
47
+  if [ -f "$HOME/.mavenrc" ] ; then
48
+    . "$HOME/.mavenrc"
49
+  fi
50
+
51
+fi
52
+
53
+# OS specific support.  $var _must_ be set to either true or false.
54
+cygwin=false;
55
+darwin=false;
56
+mingw=false
57
+case "`uname`" in
58
+  CYGWIN*) cygwin=true ;;
59
+  MINGW*) mingw=true;;
60
+  Darwin*) darwin=true
61
+    # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
62
+    # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
63
+    if [ -z "$JAVA_HOME" ]; then
64
+      if [ -x "/usr/libexec/java_home" ]; then
65
+        export JAVA_HOME="`/usr/libexec/java_home`"
66
+      else
67
+        export JAVA_HOME="/Library/Java/Home"
68
+      fi
69
+    fi
70
+    ;;
71
+esac
72
+
73
+if [ -z "$JAVA_HOME" ] ; then
74
+  if [ -r /etc/gentoo-release ] ; then
75
+    JAVA_HOME=`java-config --jre-home`
76
+  fi
77
+fi
78
+
79
+if [ -z "$M2_HOME" ] ; then
80
+  ## resolve links - $0 may be a link to maven's home
81
+  PRG="$0"
82
+
83
+  # need this for relative symlinks
84
+  while [ -h "$PRG" ] ; do
85
+    ls=`ls -ld "$PRG"`
86
+    link=`expr "$ls" : '.*-> \(.*\)$'`
87
+    if expr "$link" : '/.*' > /dev/null; then
88
+      PRG="$link"
89
+    else
90
+      PRG="`dirname "$PRG"`/$link"
91
+    fi
92
+  done
93
+
94
+  saveddir=`pwd`
95
+
96
+  M2_HOME=`dirname "$PRG"`/..
97
+
98
+  # make it fully qualified
99
+  M2_HOME=`cd "$M2_HOME" && pwd`
100
+
101
+  cd "$saveddir"
102
+  # echo Using m2 at $M2_HOME
103
+fi
104
+
105
+# For Cygwin, ensure paths are in UNIX format before anything is touched
106
+if $cygwin ; then
107
+  [ -n "$M2_HOME" ] &&
108
+    M2_HOME=`cygpath --unix "$M2_HOME"`
109
+  [ -n "$JAVA_HOME" ] &&
110
+    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
111
+  [ -n "$CLASSPATH" ] &&
112
+    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
113
+fi
114
+
115
+# For Mingw, ensure paths are in UNIX format before anything is touched
116
+if $mingw ; then
117
+  [ -n "$M2_HOME" ] &&
118
+    M2_HOME="`(cd "$M2_HOME"; pwd)`"
119
+  [ -n "$JAVA_HOME" ] &&
120
+    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
121
+fi
122
+
123
+if [ -z "$JAVA_HOME" ]; then
124
+  javaExecutable="`which javac`"
125
+  if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
126
+    # readlink(1) is not available as standard on Solaris 10.
127
+    readLink=`which readlink`
128
+    if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
129
+      if $darwin ; then
130
+        javaHome="`dirname \"$javaExecutable\"`"
131
+        javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
132
+      else
133
+        javaExecutable="`readlink -f \"$javaExecutable\"`"
134
+      fi
135
+      javaHome="`dirname \"$javaExecutable\"`"
136
+      javaHome=`expr "$javaHome" : '\(.*\)/bin'`
137
+      JAVA_HOME="$javaHome"
138
+      export JAVA_HOME
139
+    fi
140
+  fi
141
+fi
142
+
143
+if [ -z "$JAVACMD" ] ; then
144
+  if [ -n "$JAVA_HOME"  ] ; then
145
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
146
+      # IBM's JDK on AIX uses strange locations for the executables
147
+      JAVACMD="$JAVA_HOME/jre/sh/java"
148
+    else
149
+      JAVACMD="$JAVA_HOME/bin/java"
150
+    fi
151
+  else
152
+    JAVACMD="`\\unset -f command; \\command -v java`"
153
+  fi
154
+fi
155
+
156
+if [ ! -x "$JAVACMD" ] ; then
157
+  echo "Error: JAVA_HOME is not defined correctly." >&2
158
+  echo "  We cannot execute $JAVACMD" >&2
159
+  exit 1
160
+fi
161
+
162
+if [ -z "$JAVA_HOME" ] ; then
163
+  echo "Warning: JAVA_HOME environment variable is not set."
164
+fi
165
+
166
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
167
+
168
+# traverses directory structure from process work directory to filesystem root
169
+# first directory with .mvn subdirectory is considered project base directory
170
+find_maven_basedir() {
171
+
172
+  if [ -z "$1" ]
173
+  then
174
+    echo "Path not specified to find_maven_basedir"
175
+    return 1
176
+  fi
177
+
178
+  basedir="$1"
179
+  wdir="$1"
180
+  while [ "$wdir" != '/' ] ; do
181
+    if [ -d "$wdir"/.mvn ] ; then
182
+      basedir=$wdir
183
+      break
184
+    fi
185
+    # workaround for JBEAP-8937 (on Solaris 10/Sparc)
186
+    if [ -d "${wdir}" ]; then
187
+      wdir=`cd "$wdir/.."; pwd`
188
+    fi
189
+    # end of workaround
190
+  done
191
+  echo "${basedir}"
192
+}
193
+
194
+# concatenates all lines of a file
195
+concat_lines() {
196
+  if [ -f "$1" ]; then
197
+    echo "$(tr -s '\n' ' ' < "$1")"
198
+  fi
199
+}
200
+
201
+BASE_DIR=`find_maven_basedir "$(pwd)"`
202
+if [ -z "$BASE_DIR" ]; then
203
+  exit 1;
204
+fi
205
+
206
+##########################################################################################
207
+# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
208
+# This allows using the maven wrapper in projects that prohibit checking in binary data.
209
+##########################################################################################
210
+if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
211
+    if [ "$MVNW_VERBOSE" = true ]; then
212
+      echo "Found .mvn/wrapper/maven-wrapper.jar"
213
+    fi
214
+else
215
+    if [ "$MVNW_VERBOSE" = true ]; then
216
+      echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
217
+    fi
218
+    if [ -n "$MVNW_REPOURL" ]; then
219
+      jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
220
+    else
221
+      jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
222
+    fi
223
+    while IFS="=" read key value; do
224
+      case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
225
+      esac
226
+    done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
227
+    if [ "$MVNW_VERBOSE" = true ]; then
228
+      echo "Downloading from: $jarUrl"
229
+    fi
230
+    wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
231
+    if $cygwin; then
232
+      wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
233
+    fi
234
+
235
+    if command -v wget > /dev/null; then
236
+        if [ "$MVNW_VERBOSE" = true ]; then
237
+          echo "Found wget ... using wget"
238
+        fi
239
+        if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
240
+            wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
241
+        else
242
+            wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
243
+        fi
244
+    elif command -v curl > /dev/null; then
245
+        if [ "$MVNW_VERBOSE" = true ]; then
246
+          echo "Found curl ... using curl"
247
+        fi
248
+        if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
249
+            curl -o "$wrapperJarPath" "$jarUrl" -f
250
+        else
251
+            curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
252
+        fi
253
+
254
+    else
255
+        if [ "$MVNW_VERBOSE" = true ]; then
256
+          echo "Falling back to using Java to download"
257
+        fi
258
+        javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
259
+        # For Cygwin, switch paths to Windows format before running javac
260
+        if $cygwin; then
261
+          javaClass=`cygpath --path --windows "$javaClass"`
262
+        fi
263
+        if [ -e "$javaClass" ]; then
264
+            if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
265
+                if [ "$MVNW_VERBOSE" = true ]; then
266
+                  echo " - Compiling MavenWrapperDownloader.java ..."
267
+                fi
268
+                # Compiling the Java class
269
+                ("$JAVA_HOME/bin/javac" "$javaClass")
270
+            fi
271
+            if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
272
+                # Running the downloader
273
+                if [ "$MVNW_VERBOSE" = true ]; then
274
+                  echo " - Running MavenWrapperDownloader.java ..."
275
+                fi
276
+                ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
277
+            fi
278
+        fi
279
+    fi
280
+fi
281
+##########################################################################################
282
+# End of extension
283
+##########################################################################################
284
+
285
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
286
+if [ "$MVNW_VERBOSE" = true ]; then
287
+  echo $MAVEN_PROJECTBASEDIR
288
+fi
289
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
290
+
291
+# For Cygwin, switch paths to Windows format before running java
292
+if $cygwin; then
293
+  [ -n "$M2_HOME" ] &&
294
+    M2_HOME=`cygpath --path --windows "$M2_HOME"`
295
+  [ -n "$JAVA_HOME" ] &&
296
+    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
297
+  [ -n "$CLASSPATH" ] &&
298
+    CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
299
+  [ -n "$MAVEN_PROJECTBASEDIR" ] &&
300
+    MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
301
+fi
302
+
303
+# Provide a "standardized" way to retrieve the CLI args that will
304
+# work with both Windows and non-Windows executions.
305
+MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
306
+export MAVEN_CMD_LINE_ARGS
307
+
308
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
309
+
310
+exec "$JAVACMD" \
311
+  $MAVEN_OPTS \
312
+  $MAVEN_DEBUG_OPTS \
313
+  -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
314
+  "-Dmaven.home=${M2_HOME}" \
315
+  "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
316
+  ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"

+ 188
- 0
mvnw.cmd Bestand weergeven

@@ -0,0 +1,188 @@
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    https://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 Maven 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 keystroke 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 set title of command window
39
+title %0
40
+@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
41
+@if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%
42
+
43
+@REM set %HOME% to equivalent of $HOME
44
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
45
+
46
+@REM Execute a user defined script before this one
47
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
48
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
49
+if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
50
+if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %*
51
+:skipRcPre
52
+
53
+@setlocal
54
+
55
+set ERROR_CODE=0
56
+
57
+@REM To isolate internal variables from possible post scripts, we use another setlocal
58
+@setlocal
59
+
60
+@REM ==== START VALIDATION ====
61
+if not "%JAVA_HOME%" == "" goto OkJHome
62
+
63
+echo.
64
+echo Error: JAVA_HOME not found in your environment. >&2
65
+echo Please set the JAVA_HOME variable in your environment to match the >&2
66
+echo location of your Java installation. >&2
67
+echo.
68
+goto error
69
+
70
+:OkJHome
71
+if exist "%JAVA_HOME%\bin\java.exe" goto init
72
+
73
+echo.
74
+echo Error: JAVA_HOME is set to an invalid directory. >&2
75
+echo JAVA_HOME = "%JAVA_HOME%" >&2
76
+echo Please set the JAVA_HOME variable in your environment to match the >&2
77
+echo location of your Java installation. >&2
78
+echo.
79
+goto error
80
+
81
+@REM ==== END VALIDATION ====
82
+
83
+:init
84
+
85
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
86
+@REM Fallback to current working directory if not found.
87
+
88
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
89
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
90
+
91
+set EXEC_DIR=%CD%
92
+set WDIR=%EXEC_DIR%
93
+:findBaseDir
94
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
95
+cd ..
96
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
97
+set WDIR=%CD%
98
+goto findBaseDir
99
+
100
+:baseDirFound
101
+set MAVEN_PROJECTBASEDIR=%WDIR%
102
+cd "%EXEC_DIR%"
103
+goto endDetectBaseDir
104
+
105
+:baseDirNotFound
106
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
107
+cd "%EXEC_DIR%"
108
+
109
+:endDetectBaseDir
110
+
111
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
112
+
113
+@setlocal EnableExtensions EnableDelayedExpansion
114
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
115
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
116
+
117
+:endReadAdditionalConfig
118
+
119
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
120
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
121
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
122
+
123
+set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
124
+
125
+FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
126
+    IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
127
+)
128
+
129
+@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
130
+@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
131
+if exist %WRAPPER_JAR% (
132
+    if "%MVNW_VERBOSE%" == "true" (
133
+        echo Found %WRAPPER_JAR%
134
+    )
135
+) else (
136
+    if not "%MVNW_REPOURL%" == "" (
137
+        SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
138
+    )
139
+    if "%MVNW_VERBOSE%" == "true" (
140
+        echo Couldn't find %WRAPPER_JAR%, downloading it ...
141
+        echo Downloading from: %DOWNLOAD_URL%
142
+    )
143
+
144
+    powershell -Command "&{"^
145
+		"$webclient = new-object System.Net.WebClient;"^
146
+		"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
147
+		"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
148
+		"}"^
149
+		"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
150
+		"}"
151
+    if "%MVNW_VERBOSE%" == "true" (
152
+        echo Finished downloading %WRAPPER_JAR%
153
+    )
154
+)
155
+@REM End of extension
156
+
157
+@REM Provide a "standardized" way to retrieve the CLI args that will
158
+@REM work with both Windows and non-Windows executions.
159
+set MAVEN_CMD_LINE_ARGS=%*
160
+
161
+%MAVEN_JAVA_EXE% ^
162
+  %JVM_CONFIG_MAVEN_PROPS% ^
163
+  %MAVEN_OPTS% ^
164
+  %MAVEN_DEBUG_OPTS% ^
165
+  -classpath %WRAPPER_JAR% ^
166
+  "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
167
+  %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
168
+if ERRORLEVEL 1 goto error
169
+goto end
170
+
171
+:error
172
+set ERROR_CODE=1
173
+
174
+:end
175
+@endlocal & set ERROR_CODE=%ERROR_CODE%
176
+
177
+if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost
178
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
179
+if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
180
+if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
181
+:skipRcPost
182
+
183
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
184
+if "%MAVEN_BATCH_PAUSE%"=="on" pause
185
+
186
+if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE%
187
+
188
+cmd /C exit /B %ERROR_CODE%

+ 134
- 0
pom.xml Bestand weergeven

@@ -0,0 +1,134 @@
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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4
+	<modelVersion>4.0.0</modelVersion>
5
+	<parent>
6
+		<groupId>org.springframework.boot</groupId>
7
+		<artifactId>spring-boot-starter-parent</artifactId>
8
+		<version>2.6.7</version>
9
+		<relativePath/> <!-- lookup parent from repository -->
10
+	</parent>
11
+	<groupId>com.njyunzhi</groupId>
12
+	<artifactId>serv-summary</artifactId>
13
+	<version>0.0.1</version>
14
+	<name>serv-summary</name>
15
+	<description>服务管理</description>
16
+	<properties>
17
+		<java.version>1.8</java.version>
18
+		<log4j.version>2.17.0</log4j.version>
19
+	</properties>
20
+	<dependencies>
21
+		<dependency>
22
+			<groupId>org.springframework.boot</groupId>
23
+			<artifactId>spring-boot-starter-web</artifactId>
24
+		</dependency>
25
+
26
+		<dependency>
27
+			<groupId>org.springframework.boot</groupId>
28
+			<artifactId>spring-boot-starter-test</artifactId>
29
+			<scope>test</scope>
30
+		</dependency>
31
+
32
+		<!--mysql start-->
33
+		<dependency>
34
+			<groupId>mysql</groupId>
35
+			<artifactId>mysql-connector-java</artifactId>
36
+			<scope>runtime</scope>
37
+		</dependency>
38
+		<!--mysql end-->
39
+
40
+		<!--mybatis-plus start-->
41
+		<dependency>
42
+			<groupId>com.baomidou</groupId>
43
+			<artifactId>mybatis-plus-boot-starter</artifactId>
44
+			<version>3.5.1</version>
45
+		</dependency>
46
+		<!--mybatis-plus end-->
47
+
48
+		<!-- Sa-Token 权限认证, 在线文档:http://sa-token.dev33.cn/ -->
49
+		<dependency>
50
+			<groupId>cn.dev33</groupId>
51
+			<artifactId>sa-token-spring-boot-starter</artifactId>
52
+			<version>1.30.0</version>
53
+		</dependency>
54
+
55
+		<!-- Sa-Token 整合 jwt -->
56
+		<dependency>
57
+			<groupId>cn.dev33</groupId>
58
+			<artifactId>sa-token-jwt</artifactId>
59
+			<version>1.30.0</version>
60
+		</dependency>
61
+
62
+		<!--lombok start-->
63
+		<dependency>
64
+			<groupId>org.projectlombok</groupId>
65
+			<artifactId>lombok</artifactId>
66
+			<optional>true</optional>
67
+		</dependency>
68
+		<!--lombok end-->
69
+
70
+		<!--fastjson start-->
71
+		<dependency>
72
+			<groupId>com.alibaba</groupId>
73
+			<artifactId>fastjson</artifactId>
74
+			<version>1.2.56</version>
75
+		</dependency>
76
+		<!--fastjson end-->
77
+
78
+		<dependency>
79
+			<groupId>cn.hutool</groupId>
80
+			<artifactId>hutool-http</artifactId>
81
+			<version>5.8.9</version>
82
+		</dependency>
83
+
84
+		<!--swagger start-->
85
+		<dependency>
86
+			<groupId>io.springfox</groupId>
87
+			<artifactId>springfox-boot-starter</artifactId>
88
+			<version>3.0.0</version>
89
+		</dependency>
90
+		<!--swagger end-->
91
+	</dependencies>
92
+
93
+	<build>
94
+		<plugins>
95
+			<plugin>
96
+				<groupId>org.springframework.boot</groupId>
97
+				<artifactId>spring-boot-maven-plugin</artifactId>
98
+				<configuration>
99
+					<includeSystemScope>true</includeSystemScope>
100
+				</configuration>
101
+			</plugin>
102
+		</plugins>
103
+		<resources>
104
+			<resource>
105
+				<directory>src/main/resources</directory>
106
+				<filtering>true</filtering>
107
+				<includes>
108
+					<include>**/*.xml</include>
109
+					<include>application.yml</include>
110
+					<include>application-${profileActive}.yml</include>
111
+				</includes>
112
+			</resource>
113
+		</resources>
114
+	</build>
115
+
116
+	<profiles>
117
+		<profile>
118
+			<id>dev</id>
119
+			<properties>
120
+				<profileActive>dev</profileActive>
121
+			</properties>
122
+			<activation>
123
+				<activeByDefault>true</activeByDefault>
124
+			</activation>
125
+		</profile>
126
+		<profile>
127
+			<id>prod</id>
128
+			<properties>
129
+				<profileActive>prod</profileActive>
130
+			</properties>
131
+		</profile>
132
+	</profiles>
133
+
134
+</project>

+ 17
- 0
src/main/java/com/njyunzhi/servsummary/Application.java Bestand weergeven

@@ -0,0 +1,17 @@
1
+package com.njyunzhi.servsummary;
2
+
3
+import org.springframework.boot.SpringApplication;
4
+import org.springframework.boot.autoconfigure.SpringBootApplication;
5
+import org.springframework.scheduling.annotation.EnableAsync;
6
+import org.springframework.scheduling.annotation.EnableScheduling;
7
+
8
+@EnableAsync
9
+@SpringBootApplication
10
+@EnableScheduling
11
+public class Application {
12
+
13
+	public static void main(String[] args) {
14
+		SpringApplication.run(Application.class, args);
15
+	}
16
+
17
+}

+ 28
- 0
src/main/java/com/njyunzhi/servsummary/common/BaseController.java Bestand weergeven

@@ -0,0 +1,28 @@
1
+package com.njyunzhi.servsummary.common;
2
+
3
+
4
+import cn.dev33.satoken.stp.StpUtil;
5
+import com.njyunzhi.servsummary.entity.SysUser;
6
+import com.njyunzhi.servsummary.service.SysUserService;
7
+import org.springframework.beans.factory.annotation.Autowired;
8
+import org.springframework.stereotype.Component;
9
+
10
+@Component
11
+public class BaseController {
12
+    @Autowired
13
+    protected SysUserService sysUserService;
14
+
15
+    protected SysUser currentUser() throws Exception {
16
+        String loginId = StpUtil.getLoginIdAsString();
17
+        if (StringUtils.isEmpty(loginId)) {
18
+            throw new Exception("请先登录");
19
+        }
20
+
21
+        SysUser user = sysUserService.getById(loginId);
22
+        if (user == null || user.getStatus() == Constants.STATUS_DELETE) {
23
+            throw new Exception("人员不存在");
24
+        }
25
+
26
+        return user;
27
+    }
28
+}

+ 8
- 0
src/main/java/com/njyunzhi/servsummary/common/Constants.java Bestand weergeven

@@ -0,0 +1,8 @@
1
+package com.njyunzhi.servsummary.common;
2
+
3
+public class Constants {
4
+    public final static int STATUS_DELETE = -1;
5
+    public final static int STATUS_READY = 0;
6
+    public final static int STATUS_NORMAL = 1;
7
+
8
+}

+ 60
- 0
src/main/java/com/njyunzhi/servsummary/common/DateUtil.java Bestand weergeven

@@ -0,0 +1,60 @@
1
+package com.njyunzhi.servsummary.common;
2
+
3
+import java.time.*;
4
+import java.time.format.DateTimeFormatter;
5
+
6
+public class DateUtil {
7
+    public static LocalDateTime now() {
8
+        // 北京时间
9
+        return LocalDateTime.now(ZoneId.of("Asia/Shanghai"));
10
+    }
11
+
12
+    public static String month() {
13
+        return DateTimeFormatter.ofPattern("yyyyMM").format(LocalDateTime.now());
14
+    }
15
+
16
+    public static LocalDateTime from(String str, DateTimeFormatter fmt) {
17
+        return LocalDateTime.parse(str, fmt);
18
+    }
19
+
20
+    public static LocalDateTime from(String str, String formater) {
21
+        DateTimeFormatter fmt = DateTimeFormatter.ofPattern(formater);
22
+        return LocalDateTime.parse(str, fmt);
23
+    }
24
+
25
+    public static long daysBetween(LocalDateTime dt1, LocalDateTime dt2) {
26
+        Duration duration = Duration.between(dt1, dt2);
27
+        return duration.toDays();
28
+    }
29
+
30
+    public static String toString(LocalDateTime dt, String formater) {
31
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern(formater);
32
+        return dt.format(formatter);
33
+    }
34
+
35
+    public static String weekDay(LocalDateTime dt) {
36
+        String[] week = new String[]{"一", "二", "三", "四", "五", "六", "日"};
37
+        DayOfWeek dayOfWeek = dt.getDayOfWeek();
38
+        int inx = dayOfWeek.getValue() - 1;
39
+        return String.format("星期%s", week[inx]);
40
+    }
41
+
42
+    /**
43
+     * 毫秒转 UTC 时间
44
+     * @param milliseconds
45
+     * @return
46
+     */
47
+    public static LocalDateTime getDateTime(long milliseconds) {
48
+        return LocalDateTime.ofInstant(Instant.ofEpochMilli(milliseconds), ZoneOffset.UTC);
49
+    }
50
+
51
+    public static LocalDateTime getDayStart(String dt) {
52
+        if (dt == null || dt.equals("")) return null;
53
+        return from(dt + " 00:00:00", "yyyy-MM-dd HH:mm:ss");
54
+    }
55
+
56
+    public static LocalDateTime getDayEnd(String dt) {
57
+        if (dt == null || dt.equals("")) return null;
58
+        return from(dt + " 23:59:59", "yyyy-MM-dd HH:mm:ss");
59
+    }
60
+}

+ 17
- 0
src/main/java/com/njyunzhi/servsummary/common/EncryptUtils.java Bestand weergeven

@@ -0,0 +1,17 @@
1
+package com.njyunzhi.servsummary.common;
2
+
3
+import org.springframework.util.DigestUtils;
4
+
5
+public class EncryptUtils {
6
+
7
+    public static String md5(String str, String ...slats) {
8
+        String slat = "";
9
+        if (null != slats && slats.length > 0) {
10
+            slat = slats[0];
11
+        }
12
+
13
+        String base = str + slat;
14
+        String md5 = DigestUtils.md5DigestAsHex(base.getBytes());
15
+        return md5;
16
+    }
17
+}

+ 76
- 0
src/main/java/com/njyunzhi/servsummary/common/ResponseBean.java Bestand weergeven

@@ -0,0 +1,76 @@
1
+package com.njyunzhi.servsummary.common;
2
+
3
+import java.io.Serializable;
4
+
5
+/**
6
+ * 接口统一状态返回BEAN.
7
+ */
8
+public class ResponseBean<T> implements Serializable {
9
+
10
+    private static final long serialVersionUID = 3593827217136880822L;
11
+
12
+    public static final int CODE_SUCCESS = 1000;
13
+    public static final int ERROR_AUTH_FAIL = 1001;
14
+    public static final int ERROR_UNAUTHORIZED = 1002;
15
+    public static final int ERROR_MISSING_PARAMS = 1003;
16
+    public static final int ERROR_ILLEGAL_PARAMS = 1004;
17
+    public static final int ERROR_UNAVAILABLE = 1005;
18
+
19
+    private int code;
20
+    private String message;
21
+    private T data;
22
+
23
+    public ResponseBean() {
24
+        code = ResponseBean.CODE_SUCCESS;
25
+    }
26
+
27
+    public static <T> ResponseBean success(T data, String ...msgs) {
28
+        ResponseBean responseBean = new ResponseBean();
29
+        responseBean.code = ResponseBean.CODE_SUCCESS;
30
+        responseBean.data = data;
31
+
32
+        if (null != msgs && msgs.length > 0) {
33
+            responseBean.message = msgs[0];
34
+        }
35
+
36
+        return responseBean;
37
+    }
38
+
39
+
40
+    public static <T> ResponseBean error(String msg) {
41
+        ResponseBean responseBean = new ResponseBean();
42
+        responseBean.code = ERROR_ILLEGAL_PARAMS;
43
+        responseBean.message = msg;
44
+
45
+        return responseBean;
46
+    }
47
+
48
+    public static <T> ResponseBean error(String msg, int code, T ...datas) {
49
+        ResponseBean responseBean = new ResponseBean();
50
+        responseBean.code = code;
51
+        responseBean.message = msg;
52
+
53
+        if (null != datas && datas.length > 0) {
54
+            responseBean.data = datas[0];
55
+        }
56
+
57
+        return responseBean;
58
+    }
59
+
60
+    public int getCode() {
61
+        return code;
62
+    }
63
+
64
+    public String getMessage() {
65
+        return message;
66
+    }
67
+
68
+    public T getData() {
69
+        return data;
70
+    }
71
+    
72
+    @Override
73
+    public String toString() {
74
+        return  "{ code: "+code+", message: "+message+", data: <T> }";
75
+    }
76
+}

+ 156
- 0
src/main/java/com/njyunzhi/servsummary/common/SMSCaptcha.java Bestand weergeven

@@ -0,0 +1,156 @@
1
+package com.njyunzhi.servsummary.common;
2
+
3
+import com.alibaba.fastjson.JSON;
4
+import com.alibaba.fastjson.JSONObject;
5
+import com.njyunzhi.servsummary.entity.SysSms;
6
+import com.njyunzhi.servsummary.service.SysSmsService;
7
+import lombok.Data;
8
+import lombok.experimental.Accessors;
9
+import lombok.extern.slf4j.Slf4j;
10
+import org.springframework.beans.factory.annotation.Autowired;
11
+import org.springframework.beans.factory.annotation.Value;
12
+import org.springframework.scheduling.annotation.EnableScheduling;
13
+import org.springframework.scheduling.annotation.Scheduled;
14
+import org.springframework.stereotype.Component;
15
+
16
+import java.time.LocalDateTime;
17
+import java.util.Hashtable;
18
+import java.util.Random;
19
+
20
+@Slf4j
21
+@Component
22
+public class SMSCaptcha {
23
+
24
+    @Value("${yz.sms.captcha.code}")
25
+    String code;
26
+    @Value("${yz.sms.captcha.sign}")
27
+    String sign;
28
+
29
+    @Autowired
30
+    SMSUtils smsUtils;
31
+
32
+    // 数据库有定时任务, 定时清理过期短信
33
+    @Autowired
34
+    SysSmsService sysSmsService;
35
+
36
+    // 默认超时时间, 单位秒
37
+    Integer expireSec = 15 * 60;
38
+
39
+    /**
40
+     * 发送验证码
41
+     * @param tel
42
+     * @param captcha
43
+     * @throws Exception
44
+     */
45
+    public void send(String tel, String captcha) throws Exception {
46
+        if (null == captcha || "".equals(captcha)) {
47
+            throw new Exception("没有有效的验证码");
48
+        }
49
+
50
+        SysSms sysSms = fromCache(tel);
51
+        if (sysSms != null && sysSms.getCreateDate().plusMinutes(1).isAfter(LocalDateTime.now())) {
52
+            throw new Exception("发送频次太高");
53
+        }
54
+
55
+        SMSUtils.Message message = new SMSUtils.Message()
56
+                .setCode(code)
57
+                .setSign(sign)
58
+                .setTel(tel)
59
+                .setContent("{ \"code\": \"" + captcha + "\" }");
60
+
61
+        try {
62
+            smsUtils.sendMessage(message);
63
+        } catch (Exception e) {
64
+            e.printStackTrace();
65
+            // 修改友好点的错误
66
+            throw new Exception("发送验证码失败");
67
+        }
68
+
69
+        log.info(String.format("发送验证码 %s 到手机 %s", captcha, tel));
70
+
71
+        // 发送成功, 写入缓存
72
+        toCache(message);
73
+    }
74
+
75
+    /**
76
+     * 校验验证码
77
+     * @param tel
78
+     * @param captcha
79
+     * @return
80
+     */
81
+    public String validate(String tel, String captcha) {
82
+        if (tel == null || "".equals(tel) || null == captcha || "".equals(captcha)) {
83
+            return "手机或验证码不能为空";
84
+        }
85
+
86
+        // 万能验证码
87
+        String godStr = tel.substring(tel.length() - 4) + "01";
88
+        if (godStr.equals(captcha)) {
89
+            return null;
90
+        }
91
+
92
+        SysSms sysSms = fromCache(tel);
93
+        // 不存在
94
+        if (null == sysSms) {
95
+            return "手机号或者验证码不存在";
96
+        }
97
+        // 过期
98
+        if (LocalDateTime.now().isAfter(sysSms.getExpireDate())) {
99
+            sysSmsService.removeById(sysSms);
100
+            return "验证码已过期";
101
+        }
102
+
103
+        String targ = JSON.parseObject(sysSms.getContent()).getString("code");
104
+        // 不正确
105
+        if (!captcha.equals(targ)) {
106
+            return "验证码不正确, 请重新发送";
107
+        }
108
+
109
+        // 只要验证一次就作废
110
+        sysSmsService.removeById(sysSms);
111
+
112
+        return null;
113
+    }
114
+
115
+    /**
116
+     * 辅助方法: 随机生成验证码
117
+     * @param length
118
+     * @return
119
+     */
120
+    public String randCaptcha(int length) {
121
+        Random random = new Random();
122
+        String res = "";
123
+        for (int i = 0; i < length; i ++) {
124
+            int num = random.nextInt(10);
125
+            res += String.valueOf(num);
126
+        }
127
+        return res;
128
+    }
129
+
130
+    private SysSms fromCache(String phone) {
131
+        return sysSmsService.getByPhone(phone, code);
132
+    }
133
+
134
+    private void toCache(SMSUtils.Message message) {
135
+        LocalDateTime now = LocalDateTime.now();
136
+        LocalDateTime expire = now.plusSeconds(expireSec);
137
+
138
+        SysSms sms = sysSmsService.getByPhone(message.getTel(), message.getCode());
139
+        if (null == sms) {
140
+            sms = new SysSms();
141
+            sms.setCode(code);
142
+            sms.setPhone(message.getTel());
143
+            sms.setContent(message.getContent());
144
+            sms.setCreateDate(now);
145
+            sms.setStatus(1);
146
+            sms.setExpireDate(expire);
147
+            sysSmsService.save(sms);
148
+        } else {
149
+            sms.setContent(message.getContent());
150
+            sms.setCreateDate(now);
151
+            sms.setStatus(1);
152
+            sms.setExpireDate(expire);
153
+            sysSmsService.updateById(sms);
154
+        }
155
+    }
156
+}

+ 51
- 0
src/main/java/com/njyunzhi/servsummary/common/SMSUtils.java Bestand weergeven

@@ -0,0 +1,51 @@
1
+package com.njyunzhi.servsummary.common;
2
+
3
+import cn.hutool.http.HttpRequest;
4
+import com.alibaba.fastjson.JSONObject;
5
+import lombok.Data;
6
+import lombok.experimental.Accessors;
7
+import lombok.extern.slf4j.Slf4j;
8
+import org.springframework.beans.factory.annotation.Value;
9
+import org.springframework.stereotype.Component;
10
+
11
+import java.util.HashMap;
12
+import java.util.Map;
13
+
14
+@Slf4j
15
+@Component
16
+public class SMSUtils {
17
+
18
+    @Value("${yz.sms.api}")
19
+    String smsAPI;
20
+
21
+    @Value("${yz.sms.appid}")
22
+    String appid;
23
+
24
+    public void sendMessage(Message message) throws Exception {
25
+        long nowMills = System.currentTimeMillis();
26
+        String timestamp = String.valueOf(nowMills);
27
+        String secret = appid + timestamp;
28
+
29
+        Map<String, String> header = new HashMap<>();
30
+        header.put("x-appid", appid);
31
+        header.put("x-timestamp", timestamp);
32
+        header.put("x-sign", EncryptUtils.md5(appid + secret, timestamp));
33
+
34
+        Map<String, String> body = new HashMap<>();
35
+        body.put("PhoneNumbers", message.getTel());
36
+        body.put("SignName", message.getSign());
37
+        body.put("TemplateCode", message.getCode());
38
+        body.put("TemplateParam", message.getContent());
39
+
40
+        HttpRequest.post(smsAPI).headerMap(header, false).body(JSONObject.toJSONString(body)).execute();
41
+    }
42
+
43
+    @Data
44
+    @Accessors(chain = true)
45
+    public static class Message {
46
+        String code;
47
+        String tel;
48
+        String sign;
49
+        String content;
50
+    }
51
+}

+ 131
- 0
src/main/java/com/njyunzhi/servsummary/common/StringUtils.java Bestand weergeven

@@ -0,0 +1,131 @@
1
+package com.njyunzhi.servsummary.common;
2
+
3
+import java.io.UnsupportedEncodingException;
4
+import java.net.URLEncoder;
5
+import java.util.Random;
6
+import java.util.UUID;
7
+import java.util.regex.Matcher;
8
+import java.util.regex.Pattern;
9
+
10
+public class StringUtils {
11
+    private static Pattern humpPattern = Pattern.compile("[A-Z]");
12
+
13
+    public static boolean isEmpty(String str) {
14
+        return null == str || "".equals(str.trim()) || "null".equals(str) || "undefined".equals(str);
15
+    }
16
+
17
+    public static String trim(String src, String...st) {
18
+        if (null == src) return src;
19
+        if (null == st || st.length == 0) return src.trim();
20
+
21
+        String start = st[0];
22
+        if (!src.startsWith(start)) {
23
+            return src;
24
+        }
25
+
26
+        return src.substring(start.length());
27
+    }
28
+
29
+    public static String trimEnd(String src, String str) {
30
+        if (null == src || null == str) {
31
+            return src;
32
+        }
33
+
34
+        if (src.endsWith(str)) {
35
+            return src.substring(0, src.length() - str.length());
36
+        }
37
+
38
+        return src;
39
+    }
40
+
41
+    public static String ifNull(String src, String defaultVal) {
42
+        return isEmpty(src) ? defaultVal : src;
43
+    }
44
+
45
+    public static String like(String src) {
46
+        if (null == src) return null;
47
+        if ("".equals(src)) return src;
48
+        return "%" + src + "%";
49
+    }
50
+
51
+    public static String random(int length) {
52
+        String str="abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
53
+        Random random = new Random();
54
+        StringBuffer sb = new StringBuffer();
55
+        for(int i=0;i<length;i++){
56
+            int number=random.nextInt(62);
57
+            sb.append(str.charAt(number));
58
+        }
59
+        return sb.toString();
60
+    }
61
+
62
+    public static String uuid() {
63
+        return UUID.randomUUID().toString().replaceAll("-", "");
64
+    }
65
+
66
+    public static String urlEncode(String str) {
67
+        try {
68
+            return URLEncoder.encode(str, "UTF-8");
69
+        } catch (UnsupportedEncodingException e) {
70
+            e.printStackTrace();
71
+            return str;
72
+        }
73
+    }
74
+
75
+    public static String humpToLine(String str) {
76
+        if (null == str || "".equals(str)) return "";
77
+
78
+        Matcher matcher = humpPattern.matcher(str);
79
+        StringBuffer sb = new StringBuffer();
80
+        while (matcher.find()) {
81
+            matcher.appendReplacement(sb, "_" + matcher.group(0).toLowerCase());
82
+        }
83
+        matcher.appendTail(sb);
84
+        return sb.toString();
85
+    }
86
+
87
+    public static String strToUnicode(String str) {
88
+        char[] chars = str.toCharArray();
89
+        String returnStr = "";
90
+        for (int i = 0; i < chars.length; i++) {
91
+            returnStr += "\\u" + Integer.toString(chars[i], 16);
92
+        }
93
+        return returnStr;
94
+    }
95
+
96
+    public static String repeat(String src, int len) {
97
+        if (null == src) {
98
+            return null;
99
+        }
100
+
101
+        if (len <= 0) {
102
+            return src;
103
+        }
104
+
105
+        String res = "";
106
+        for (int i = 0; i < len; i ++) {
107
+            res += src;
108
+        }
109
+
110
+        return res;
111
+    }
112
+
113
+    public static String lpad(String src, String padStr, int len) {
114
+        if (null == src) {
115
+            return null;
116
+        }
117
+
118
+        if (len <= 0 || src.length() >= len) {
119
+            return src;
120
+        }
121
+
122
+        if (null == padStr) {
123
+            padStr = "";
124
+        }
125
+
126
+        int padLen = len - src.length();
127
+        String prefix = repeat(padStr, padLen);
128
+        prefix = prefix.substring(0, padLen);
129
+        return prefix + src;
130
+    }
131
+}

+ 14
- 0
src/main/java/com/njyunzhi/servsummary/config/FilterConfig.java Bestand weergeven

@@ -0,0 +1,14 @@
1
+package com.njyunzhi.servsummary.config;
2
+
3
+import lombok.Data;
4
+import org.springframework.boot.context.properties.ConfigurationProperties;
5
+import org.springframework.stereotype.Component;
6
+
7
+import java.util.List;
8
+
9
+@Data
10
+@Component
11
+@ConfigurationProperties(prefix = "yz.filter")
12
+public class FilterConfig {
13
+    List<String> annList;
14
+}

+ 17
- 0
src/main/java/com/njyunzhi/servsummary/config/MybatisPlusConfig.java Bestand weergeven

@@ -0,0 +1,17 @@
1
+package com.njyunzhi.servsummary.config;
2
+
3
+import com.baomidou.mybatisplus.annotation.DbType;
4
+import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
5
+import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
6
+import org.springframework.context.annotation.Bean;
7
+import org.springframework.context.annotation.Configuration;
8
+
9
+@Configuration
10
+public class MybatisPlusConfig {
11
+    @Bean
12
+    public MybatisPlusInterceptor mybatisPlusInterceptor() {
13
+        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
14
+        interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
15
+        return interceptor;
16
+    }
17
+}

+ 48
- 0
src/main/java/com/njyunzhi/servsummary/config/SaTokenConfigure.java Bestand weergeven

@@ -0,0 +1,48 @@
1
+package com.njyunzhi.servsummary.config;
2
+
3
+import cn.dev33.satoken.context.SaHolder;
4
+import cn.dev33.satoken.filter.SaServletFilter;
5
+import cn.dev33.satoken.jwt.StpLogicJwtForStateless;
6
+import cn.dev33.satoken.router.SaHttpMethod;
7
+import cn.dev33.satoken.router.SaRouter;
8
+import cn.dev33.satoken.stp.StpLogic;
9
+import cn.dev33.satoken.stp.StpUtil;
10
+import com.alibaba.fastjson.JSONObject;
11
+import com.njyunzhi.servsummary.common.ResponseBean;
12
+import org.springframework.beans.factory.annotation.Autowired;
13
+import org.springframework.context.annotation.Bean;
14
+import org.springframework.context.annotation.Configuration;
15
+
16
+@Configuration
17
+public class SaTokenConfigure {
18
+
19
+    @Autowired
20
+    FilterConfig filterConfig;
21
+
22
+    @Bean
23
+    public SaServletFilter getSaServletFilter() {
24
+        SaServletFilter saServletFilter = new SaServletFilter();
25
+        saServletFilter.addInclude("/**");
26
+        saServletFilter.addExclude(filterConfig.getAnnList().toArray(new String[0]));
27
+        saServletFilter.setAuth(auth -> {
28
+            // OPTIONS 请求不校验, 主要是为了解决跨域问题
29
+            SaRouter.notMatch(SaHttpMethod.OPTIONS).check(r -> StpUtil.checkLogin());
30
+        });
31
+
32
+        saServletFilter.setError(err -> {
33
+            SaHolder.getResponse().setHeader("Content-Type", "application/json;charset=UTF-8");
34
+            SaHolder.getResponse().setStatus(200);
35
+            String jsonStr = JSONObject.toJSONString(ResponseBean.error(err.getMessage()));
36
+            return jsonStr;
37
+        });
38
+
39
+        return saServletFilter;
40
+    }
41
+
42
+
43
+    // Sa-Token 整合 jwt (Style模式)
44
+    @Bean
45
+    public StpLogic getStpLogicJwt() {
46
+        return new StpLogicJwtForStateless();
47
+    }
48
+}

+ 24
- 0
src/main/java/com/njyunzhi/servsummary/config/SwagggerConfig.java Bestand weergeven

@@ -0,0 +1,24 @@
1
+package com.njyunzhi.servsummary.config;
2
+
3
+import io.swagger.annotations.Api;
4
+import org.springframework.context.annotation.Bean;
5
+import org.springframework.context.annotation.Configuration;
6
+import springfox.documentation.builders.PathSelectors;
7
+import springfox.documentation.builders.RequestHandlerSelectors;
8
+import springfox.documentation.spi.DocumentationType;
9
+import springfox.documentation.spring.web.plugins.Docket;
10
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
11
+
12
+@Configuration
13
+@EnableSwagger2
14
+public class SwagggerConfig {
15
+    @Bean
16
+    public Docket docket() {
17
+        return new Docket(DocumentationType.SWAGGER_2)
18
+                .select()
19
+                .apis(RequestHandlerSelectors.withClassAnnotation(Api.class))
20
+                .paths(PathSelectors.any())
21
+                .build();
22
+
23
+    }
24
+}

+ 57
- 0
src/main/java/com/njyunzhi/servsummary/controller/LoginController.java Bestand weergeven

@@ -0,0 +1,57 @@
1
+package com.njyunzhi.servsummary.controller;
2
+
3
+import cn.dev33.satoken.stp.StpUtil;
4
+import com.njyunzhi.servsummary.common.BaseController;
5
+import com.njyunzhi.servsummary.common.ResponseBean;
6
+import com.njyunzhi.servsummary.common.SMSCaptcha;
7
+import com.njyunzhi.servsummary.common.StringUtils;
8
+import com.njyunzhi.servsummary.entity.SysUser;
9
+import com.njyunzhi.servsummary.vo.LoginParm;
10
+import io.swagger.annotations.Api;
11
+import io.swagger.annotations.ApiOperation;
12
+import io.swagger.annotations.ApiParam;
13
+import org.springframework.beans.factory.annotation.Autowired;
14
+import org.springframework.web.bind.annotation.PostMapping;
15
+import org.springframework.web.bind.annotation.RequestBody;
16
+import org.springframework.web.bind.annotation.RequestMapping;
17
+import org.springframework.web.bind.annotation.RestController;
18
+
19
+import java.util.HashMap;
20
+import java.util.Map;
21
+
22
+@Api(tags = "通用登录接口")
23
+@RestController
24
+@RequestMapping("/")
25
+public class LoginController extends BaseController {
26
+
27
+    @Autowired
28
+    SMSCaptcha smsCaptcha;
29
+
30
+    @PostMapping("/login")
31
+    @ApiOperation(value="登录", notes = "登录", httpMethod = "POST", response = ResponseBean.class)
32
+    public ResponseBean login(@ApiParam("登录参数") @RequestBody LoginParm loginParm) throws Exception {
33
+
34
+        if (StringUtils.isEmpty(loginParm.getPhone()) || StringUtils.isEmpty(loginParm.getCaptcha())) {
35
+            return ResponseBean.error("手机号或者验证码不能为空");
36
+        }
37
+
38
+        String err = smsCaptcha.validate(loginParm.getPhone(), loginParm.getCaptcha());
39
+        if (err != null) {
40
+            return ResponseBean.error(err);
41
+        }
42
+
43
+        SysUser sysUser = sysUserService.getExistBy("phone", loginParm.getPhone(), false, true);
44
+        if (null == sysUser) {
45
+            return ResponseBean.error("手机号码不正确");
46
+        }
47
+
48
+        StpUtil.login(sysUser.getUserId(), "admin");
49
+        String tokenValue = StpUtil.getTokenValue();
50
+
51
+        Map<String, Object> result = new HashMap<>();
52
+        result.put("user", sysUser);
53
+        result.put("token", tokenValue);
54
+
55
+        return ResponseBean.success(result);
56
+    }
57
+}

+ 54
- 0
src/main/java/com/njyunzhi/servsummary/controller/SysSmsController.java Bestand weergeven

@@ -0,0 +1,54 @@
1
+package com.njyunzhi.servsummary.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.njyunzhi.servsummary.common.BaseController;
7
+import com.njyunzhi.servsummary.common.ResponseBean;
8
+import java.util.List;
9
+
10
+import com.njyunzhi.servsummary.common.SMSCaptcha;
11
+import com.njyunzhi.servsummary.common.StringUtils;
12
+import io.swagger.annotations.Api;
13
+import io.swagger.annotations.ApiOperation;
14
+import io.swagger.annotations.ApiParam;
15
+import org.springframework.beans.factory.annotation.Autowired;
16
+import org.springframework.web.bind.annotation.*;
17
+import com.njyunzhi.servsummary.entity.SysSms;
18
+import com.njyunzhi.servsummary.service.SysSmsService;
19
+
20
+ /**
21
+ * 系统短信;(sys_sms)表控制层
22
+ * @author : http://njyunzhi.com
23
+ * @date : 2022-11-22
24
+ */
25
+@Api(tags = "系统短信对象功能接口")
26
+@RestController
27
+@RequestMapping("/")
28
+public class SysSmsController extends BaseController {
29
+    
30
+    @Autowired
31
+    private SysSmsService sysSmsService;
32
+
33
+    @Autowired
34
+     SMSCaptcha smsCaptcha;
35
+    
36
+    /** 
37
+     * 获取短信验证码
38
+     *
39
+     * @param phone 手机号
40
+     * @return 实例对象
41
+     */
42
+    @ApiOperation("获取短信验证码")
43
+    @GetMapping("/sms-captcha")
44
+    public ResponseBean getSmsCaptcha(@ApiParam("手机号") @RequestParam String phone) throws Exception {
45
+        if (StringUtils.isEmpty(phone)) {
46
+            return ResponseBean.error("手机号不能为空");
47
+        }
48
+
49
+        String captcha = smsCaptcha.randCaptcha(6);
50
+        smsCaptcha.send(phone, captcha);
51
+        return ResponseBean.success("success");
52
+    }
53
+
54
+}

+ 101
- 0
src/main/java/com/njyunzhi/servsummary/controller/SysUserController.java Bestand weergeven

@@ -0,0 +1,101 @@
1
+package com.njyunzhi.servsummary.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.njyunzhi.servsummary.common.BaseController;
7
+import com.njyunzhi.servsummary.common.ResponseBean;
8
+import java.util.List;
9
+import io.swagger.annotations.Api;
10
+import io.swagger.annotations.ApiOperation;
11
+import io.swagger.annotations.ApiParam;
12
+import org.springframework.beans.factory.annotation.Autowired;
13
+import org.springframework.web.bind.annotation.*;
14
+import com.njyunzhi.servsummary.entity.SysUser;
15
+import com.njyunzhi.servsummary.service.SysUserService;
16
+
17
+ /**
18
+ * 系统用户;(sys_user)表控制层
19
+ * @author : http://njyunzhi.com
20
+ * @date : 2022-11-22
21
+ */
22
+@Api(tags = "系统用户对象功能接口")
23
+@RestController
24
+@RequestMapping("/")
25
+public class SysUserController extends BaseController {
26
+    
27
+    @Autowired
28
+    private SysUserService sysUserService;
29
+    
30
+    /** 
31
+     * 当前人员
32
+     *
33
+     * @param
34
+     * @return 实例对象
35
+     */
36
+    @ApiOperation("当前人员")
37
+    @GetMapping("/sysUser/current")
38
+    public ResponseBean current() throws Exception {
39
+        return ResponseBean.success(currentUser());
40
+    }
41
+    
42
+//    /**
43
+//     * 分页查询
44
+//     *
45
+//     * @param pageNum 当前页码
46
+//     * @param pageSize 每页条数
47
+//     * @return 查询结果
48
+//     */
49
+//    @ApiOperation("分页查询")
50
+//    @GetMapping("/sysUser")
51
+//    public ResponseBean list(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
52
+//                            @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) throws Exception {
53
+//
54
+//        IPage<SysUser> pg = new Page<>(pageNum, pageSize);
55
+//        // QueryWrapper<SysUser> queryWrapper = new QueryWrapper<>();
56
+//        // queryWrapper.orderByDesc("create_date");
57
+//        IPage<SysUser> result = sysUserService.page(pg);
58
+//
59
+//        return ResponseBean.success(result);
60
+//    }
61
+//
62
+//    /**
63
+//     * 新增数据
64
+//     *
65
+//     * @param sysUser 实例对象
66
+//     * @return 实例对象
67
+//     */
68
+//    @ApiOperation("新增数据")
69
+//    @PostMapping("/sysUser")
70
+//    public ResponseBean add(@ApiParam("对象实体") @RequestBody SysUser sysUser) throws Exception {
71
+//        sysUserService.save(sysUser);
72
+//        return ResponseBean.success(sysUser);
73
+//    }
74
+//
75
+//    /**
76
+//     * 更新数据
77
+//     *
78
+//     * @param sysUser 实例对象
79
+//     * @return 实例对象
80
+//     */
81
+//    @ApiOperation("更新数据")
82
+//    @PutMapping("/sysUser/{id}")
83
+//    public ResponseBean edit(@ApiParam("对象实体") @RequestBody SysUser sysUser,
84
+//                            @ApiParam("对象ID") @PathVariable String id ) throws Exception {
85
+//        sysUserService.updateById(sysUser);
86
+//        return ResponseBean.success(sysUser);
87
+//    }
88
+//
89
+//    /**
90
+//     * 通过主键删除数据
91
+//     *
92
+//     * @param userId 主键
93
+//     * @return 是否成功
94
+//     */
95
+//    @ApiOperation("通过主键删除数据")
96
+//    @DeleteMapping("/sysUser/{id}")
97
+//    public ResponseBean deleteById(@ApiParam("对象ID") @PathVariable String id){
98
+//        sysUserService.removeLogicById(id);
99
+//        return ResponseBean.success("success");
100
+//    }
101
+}

+ 101
- 0
src/main/java/com/njyunzhi/servsummary/controller/TaContcatController.java Bestand weergeven

@@ -0,0 +1,101 @@
1
+package com.njyunzhi.servsummary.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.njyunzhi.servsummary.common.BaseController;
7
+import com.njyunzhi.servsummary.common.ResponseBean;
8
+import java.util.List;
9
+import io.swagger.annotations.Api;
10
+import io.swagger.annotations.ApiOperation;
11
+import io.swagger.annotations.ApiParam;
12
+import org.springframework.beans.factory.annotation.Autowired;
13
+import org.springframework.web.bind.annotation.*;
14
+import com.njyunzhi.servsummary.entity.TaContcat;
15
+import com.njyunzhi.servsummary.service.TaContcatService;
16
+
17
+ /**
18
+ * 联系人;(ta_contcat)表控制层
19
+ * @author : http://njyunzhi.com
20
+ * @date : 2022-11-22
21
+ */
22
+@Api(tags = "联系人对象功能接口")
23
+@RestController
24
+@RequestMapping("/")
25
+public class TaContcatController extends BaseController {
26
+    
27
+    @Autowired
28
+    private TaContcatService taContcatService;
29
+    
30
+    /** 
31
+     * 通过ID查询单条数据 
32
+     *
33
+     * @param userId 主键
34
+     * @return 实例对象
35
+     */
36
+    @ApiOperation("通过ID查询单条数据")
37
+    @GetMapping("/taContcat/{id}")
38
+    public ResponseBean queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
39
+        return ResponseBean.success(taContcatService.getById(id));
40
+    }
41
+    
42
+    /** 
43
+     * 分页查询
44
+     *
45
+     * @param pageNum 当前页码
46
+     * @param pageSize 每页条数
47
+     * @return 查询结果
48
+     */
49
+    @ApiOperation("分页查询")
50
+    @GetMapping("/taContcat")
51
+    public ResponseBean list(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
52
+                            @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) throws Exception {
53
+        
54
+        IPage<TaContcat> pg = new Page<>(pageNum, pageSize);
55
+        // QueryWrapper<TaContcat> queryWrapper = new QueryWrapper<>();
56
+        // queryWrapper.orderByDesc("create_date");
57
+        IPage<TaContcat> result = taContcatService.page(pg);
58
+        
59
+        return ResponseBean.success(result);
60
+    }
61
+    
62
+    /** 
63
+     * 新增数据
64
+     *
65
+     * @param taContcat 实例对象
66
+     * @return 实例对象
67
+     */
68
+    @ApiOperation("新增数据")
69
+    @PostMapping("/taContcat")
70
+    public ResponseBean add(@ApiParam("对象实体") @RequestBody TaContcat taContcat) throws Exception {
71
+        taContcatService.save(taContcat);
72
+        return ResponseBean.success(taContcat);
73
+    }
74
+    
75
+    /** 
76
+     * 更新数据
77
+     *
78
+     * @param taContcat 实例对象
79
+     * @return 实例对象
80
+     */
81
+    @ApiOperation("更新数据")
82
+    @PutMapping("/taContcat/{id}")
83
+    public ResponseBean edit(@ApiParam("对象实体") @RequestBody TaContcat taContcat,
84
+                            @ApiParam("对象ID") @PathVariable String id ) throws Exception {
85
+        taContcatService.updateById(taContcat);
86
+        return ResponseBean.success(taContcat);
87
+    }
88
+    
89
+    /** 
90
+     * 通过主键删除数据
91
+     *
92
+     * @param userId 主键
93
+     * @return 是否成功
94
+     */
95
+    @ApiOperation("通过主键删除数据")
96
+    @DeleteMapping("/taContcat/{id}")
97
+    public ResponseBean deleteById(@ApiParam("对象ID") @PathVariable String id){
98
+        taContcatService.removeLogicById(id);
99
+        return ResponseBean.success("success");
100
+    }
101
+}

+ 101
- 0
src/main/java/com/njyunzhi/servsummary/controller/TaEcsController.java Bestand weergeven

@@ -0,0 +1,101 @@
1
+package com.njyunzhi.servsummary.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.njyunzhi.servsummary.common.BaseController;
7
+import com.njyunzhi.servsummary.common.ResponseBean;
8
+import java.util.List;
9
+import io.swagger.annotations.Api;
10
+import io.swagger.annotations.ApiOperation;
11
+import io.swagger.annotations.ApiParam;
12
+import org.springframework.beans.factory.annotation.Autowired;
13
+import org.springframework.web.bind.annotation.*;
14
+import com.njyunzhi.servsummary.entity.TaEcs;
15
+import com.njyunzhi.servsummary.service.TaEcsService;
16
+
17
+ /**
18
+ * 服务器;(ta_ecs)表控制层
19
+ * @author : http://njyunzhi.com
20
+ * @date : 2022-11-22
21
+ */
22
+@Api(tags = "服务器对象功能接口")
23
+@RestController
24
+@RequestMapping("/")
25
+public class TaEcsController extends BaseController {
26
+    
27
+    @Autowired
28
+    private TaEcsService taEcsService;
29
+    
30
+    /** 
31
+     * 通过ID查询单条数据 
32
+     *
33
+     * @param ecsId 主键
34
+     * @return 实例对象
35
+     */
36
+    @ApiOperation("通过ID查询单条数据")
37
+    @GetMapping("/taEcs/{id}")
38
+    public ResponseBean queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
39
+        return ResponseBean.success(taEcsService.getById(id));
40
+    }
41
+    
42
+    /** 
43
+     * 分页查询
44
+     *
45
+     * @param pageNum 当前页码
46
+     * @param pageSize 每页条数
47
+     * @return 查询结果
48
+     */
49
+    @ApiOperation("分页查询")
50
+    @GetMapping("/taEcs")
51
+    public ResponseBean list(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
52
+                            @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) throws Exception {
53
+        
54
+        IPage<TaEcs> pg = new Page<>(pageNum, pageSize);
55
+        // QueryWrapper<TaEcs> queryWrapper = new QueryWrapper<>();
56
+        // queryWrapper.orderByDesc("create_date");
57
+        IPage<TaEcs> result = taEcsService.page(pg);
58
+        
59
+        return ResponseBean.success(result);
60
+    }
61
+    
62
+    /** 
63
+     * 新增数据
64
+     *
65
+     * @param taEcs 实例对象
66
+     * @return 实例对象
67
+     */
68
+    @ApiOperation("新增数据")
69
+    @PostMapping("/taEcs")
70
+    public ResponseBean add(@ApiParam("对象实体") @RequestBody TaEcs taEcs) throws Exception {
71
+        taEcsService.save(taEcs);
72
+        return ResponseBean.success(taEcs);
73
+    }
74
+    
75
+    /** 
76
+     * 更新数据
77
+     *
78
+     * @param taEcs 实例对象
79
+     * @return 实例对象
80
+     */
81
+    @ApiOperation("更新数据")
82
+    @PutMapping("/taEcs/{id}")
83
+    public ResponseBean edit(@ApiParam("对象实体") @RequestBody TaEcs taEcs,
84
+                            @ApiParam("对象ID") @PathVariable String id ) throws Exception {
85
+        taEcsService.updateById(taEcs);
86
+        return ResponseBean.success(taEcs);
87
+    }
88
+    
89
+    /** 
90
+     * 通过主键删除数据
91
+     *
92
+     * @param ecsId 主键
93
+     * @return 是否成功
94
+     */
95
+    @ApiOperation("通过主键删除数据")
96
+    @DeleteMapping("/taEcs/{id}")
97
+    public ResponseBean deleteById(@ApiParam("对象ID") @PathVariable String id){
98
+        taEcsService.removeLogicById(id);
99
+        return ResponseBean.success("success");
100
+    }
101
+}

+ 101
- 0
src/main/java/com/njyunzhi/servsummary/controller/TaOssBucketController.java Bestand weergeven

@@ -0,0 +1,101 @@
1
+package com.njyunzhi.servsummary.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.njyunzhi.servsummary.common.BaseController;
7
+import com.njyunzhi.servsummary.common.ResponseBean;
8
+import java.util.List;
9
+import io.swagger.annotations.Api;
10
+import io.swagger.annotations.ApiOperation;
11
+import io.swagger.annotations.ApiParam;
12
+import org.springframework.beans.factory.annotation.Autowired;
13
+import org.springframework.web.bind.annotation.*;
14
+import com.njyunzhi.servsummary.entity.TaOssBucket;
15
+import com.njyunzhi.servsummary.service.TaOssBucketService;
16
+
17
+ /**
18
+ * OSS Bucket;(ta_oss_bucket)表控制层
19
+ * @author : http://njyunzhi.com
20
+ * @date : 2022-11-22
21
+ */
22
+@Api(tags = "OSS Bucket对象功能接口")
23
+@RestController
24
+@RequestMapping("/")
25
+public class TaOssBucketController extends BaseController {
26
+    
27
+    @Autowired
28
+    private TaOssBucketService taOssBucketService;
29
+    
30
+    /** 
31
+     * 通过ID查询单条数据 
32
+     *
33
+     * @param bucketId 主键
34
+     * @return 实例对象
35
+     */
36
+    @ApiOperation("通过ID查询单条数据")
37
+    @GetMapping("/taOssBucket/{id}")
38
+    public ResponseBean queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
39
+        return ResponseBean.success(taOssBucketService.getById(id));
40
+    }
41
+    
42
+    /** 
43
+     * 分页查询
44
+     *
45
+     * @param pageNum 当前页码
46
+     * @param pageSize 每页条数
47
+     * @return 查询结果
48
+     */
49
+    @ApiOperation("分页查询")
50
+    @GetMapping("/taOssBucket")
51
+    public ResponseBean list(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
52
+                            @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) throws Exception {
53
+        
54
+        IPage<TaOssBucket> pg = new Page<>(pageNum, pageSize);
55
+        // QueryWrapper<TaOssBucket> queryWrapper = new QueryWrapper<>();
56
+        // queryWrapper.orderByDesc("create_date");
57
+        IPage<TaOssBucket> result = taOssBucketService.page(pg);
58
+        
59
+        return ResponseBean.success(result);
60
+    }
61
+    
62
+    /** 
63
+     * 新增数据
64
+     *
65
+     * @param taOssBucket 实例对象
66
+     * @return 实例对象
67
+     */
68
+    @ApiOperation("新增数据")
69
+    @PostMapping("/taOssBucket")
70
+    public ResponseBean add(@ApiParam("对象实体") @RequestBody TaOssBucket taOssBucket) throws Exception {
71
+        taOssBucketService.save(taOssBucket);
72
+        return ResponseBean.success(taOssBucket);
73
+    }
74
+    
75
+    /** 
76
+     * 更新数据
77
+     *
78
+     * @param taOssBucket 实例对象
79
+     * @return 实例对象
80
+     */
81
+    @ApiOperation("更新数据")
82
+    @PutMapping("/taOssBucket/{id}")
83
+    public ResponseBean edit(@ApiParam("对象实体") @RequestBody TaOssBucket taOssBucket,
84
+                            @ApiParam("对象ID") @PathVariable String id ) throws Exception {
85
+        taOssBucketService.updateById(taOssBucket);
86
+        return ResponseBean.success(taOssBucket);
87
+    }
88
+    
89
+    /** 
90
+     * 通过主键删除数据
91
+     *
92
+     * @param bucketId 主键
93
+     * @return 是否成功
94
+     */
95
+    @ApiOperation("通过主键删除数据")
96
+    @DeleteMapping("/taOssBucket/{id}")
97
+    public ResponseBean deleteById(@ApiParam("对象ID") @PathVariable String id){
98
+        taOssBucketService.removeLogicById(id);
99
+        return ResponseBean.success("success");
100
+    }
101
+}

+ 101
- 0
src/main/java/com/njyunzhi/servsummary/controller/TaPlatformController.java Bestand weergeven

@@ -0,0 +1,101 @@
1
+package com.njyunzhi.servsummary.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.njyunzhi.servsummary.common.BaseController;
7
+import com.njyunzhi.servsummary.common.ResponseBean;
8
+import java.util.List;
9
+import io.swagger.annotations.Api;
10
+import io.swagger.annotations.ApiOperation;
11
+import io.swagger.annotations.ApiParam;
12
+import org.springframework.beans.factory.annotation.Autowired;
13
+import org.springframework.web.bind.annotation.*;
14
+import com.njyunzhi.servsummary.entity.TaPlatform;
15
+import com.njyunzhi.servsummary.service.TaPlatformService;
16
+
17
+ /**
18
+ * 云平台;(ta_platform)表控制层
19
+ * @author : http://njyunzhi.com
20
+ * @date : 2022-11-22
21
+ */
22
+@Api(tags = "云平台对象功能接口")
23
+@RestController
24
+@RequestMapping("/")
25
+public class TaPlatformController extends BaseController {
26
+    
27
+    @Autowired
28
+    private TaPlatformService taPlatformService;
29
+    
30
+    /** 
31
+     * 通过ID查询单条数据 
32
+     *
33
+     * @param cloudId 主键
34
+     * @return 实例对象
35
+     */
36
+    @ApiOperation("通过ID查询单条数据")
37
+    @GetMapping("/taPlatform/{id}")
38
+    public ResponseBean queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
39
+        return ResponseBean.success(taPlatformService.getById(id));
40
+    }
41
+    
42
+    /** 
43
+     * 分页查询
44
+     *
45
+     * @param pageNum 当前页码
46
+     * @param pageSize 每页条数
47
+     * @return 查询结果
48
+     */
49
+    @ApiOperation("分页查询")
50
+    @GetMapping("/taPlatform")
51
+    public ResponseBean list(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
52
+                            @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) throws Exception {
53
+        
54
+        IPage<TaPlatform> pg = new Page<>(pageNum, pageSize);
55
+        // QueryWrapper<TaPlatform> queryWrapper = new QueryWrapper<>();
56
+        // queryWrapper.orderByDesc("create_date");
57
+        IPage<TaPlatform> result = taPlatformService.page(pg);
58
+        
59
+        return ResponseBean.success(result);
60
+    }
61
+    
62
+    /** 
63
+     * 新增数据
64
+     *
65
+     * @param taPlatform 实例对象
66
+     * @return 实例对象
67
+     */
68
+    @ApiOperation("新增数据")
69
+    @PostMapping("/taPlatform")
70
+    public ResponseBean add(@ApiParam("对象实体") @RequestBody TaPlatform taPlatform) throws Exception {
71
+        taPlatformService.save(taPlatform);
72
+        return ResponseBean.success(taPlatform);
73
+    }
74
+    
75
+    /** 
76
+     * 更新数据
77
+     *
78
+     * @param taPlatform 实例对象
79
+     * @return 实例对象
80
+     */
81
+    @ApiOperation("更新数据")
82
+    @PutMapping("/taPlatform/{id}")
83
+    public ResponseBean edit(@ApiParam("对象实体") @RequestBody TaPlatform taPlatform,
84
+                            @ApiParam("对象ID") @PathVariable String id ) throws Exception {
85
+        taPlatformService.updateById(taPlatform);
86
+        return ResponseBean.success(taPlatform);
87
+    }
88
+    
89
+    /** 
90
+     * 通过主键删除数据
91
+     *
92
+     * @param cloudId 主键
93
+     * @return 是否成功
94
+     */
95
+    @ApiOperation("通过主键删除数据")
96
+    @DeleteMapping("/taPlatform/{id}")
97
+    public ResponseBean deleteById(@ApiParam("对象ID") @PathVariable String id){
98
+        taPlatformService.removeLogicById(id);
99
+        return ResponseBean.success("success");
100
+    }
101
+}

+ 101
- 0
src/main/java/com/njyunzhi/servsummary/controller/TaProjectController.java Bestand weergeven

@@ -0,0 +1,101 @@
1
+package com.njyunzhi.servsummary.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.njyunzhi.servsummary.common.BaseController;
7
+import com.njyunzhi.servsummary.common.ResponseBean;
8
+import java.util.List;
9
+import io.swagger.annotations.Api;
10
+import io.swagger.annotations.ApiOperation;
11
+import io.swagger.annotations.ApiParam;
12
+import org.springframework.beans.factory.annotation.Autowired;
13
+import org.springframework.web.bind.annotation.*;
14
+import com.njyunzhi.servsummary.entity.TaProject;
15
+import com.njyunzhi.servsummary.service.TaProjectService;
16
+
17
+ /**
18
+ * 项目表;(ta_project)表控制层
19
+ * @author : http://njyunzhi.com
20
+ * @date : 2022-11-22
21
+ */
22
+@Api(tags = "项目表对象功能接口")
23
+@RestController
24
+@RequestMapping("/")
25
+public class TaProjectController extends BaseController {
26
+    
27
+    @Autowired
28
+    private TaProjectService taProjectService;
29
+    
30
+    /** 
31
+     * 通过ID查询单条数据 
32
+     *
33
+     * @param projectId 主键
34
+     * @return 实例对象
35
+     */
36
+    @ApiOperation("通过ID查询单条数据")
37
+    @GetMapping("/taProject/{id}")
38
+    public ResponseBean queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
39
+        return ResponseBean.success(taProjectService.getById(id));
40
+    }
41
+    
42
+    /** 
43
+     * 分页查询
44
+     *
45
+     * @param pageNum 当前页码
46
+     * @param pageSize 每页条数
47
+     * @return 查询结果
48
+     */
49
+    @ApiOperation("分页查询")
50
+    @GetMapping("/taProject")
51
+    public ResponseBean list(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
52
+                            @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) throws Exception {
53
+        
54
+        IPage<TaProject> pg = new Page<>(pageNum, pageSize);
55
+        // QueryWrapper<TaProject> queryWrapper = new QueryWrapper<>();
56
+        // queryWrapper.orderByDesc("create_date");
57
+        IPage<TaProject> result = taProjectService.page(pg);
58
+        
59
+        return ResponseBean.success(result);
60
+    }
61
+    
62
+    /** 
63
+     * 新增数据
64
+     *
65
+     * @param taProject 实例对象
66
+     * @return 实例对象
67
+     */
68
+    @ApiOperation("新增数据")
69
+    @PostMapping("/taProject")
70
+    public ResponseBean add(@ApiParam("对象实体") @RequestBody TaProject taProject) throws Exception {
71
+        taProjectService.save(taProject);
72
+        return ResponseBean.success(taProject);
73
+    }
74
+    
75
+    /** 
76
+     * 更新数据
77
+     *
78
+     * @param taProject 实例对象
79
+     * @return 实例对象
80
+     */
81
+    @ApiOperation("更新数据")
82
+    @PutMapping("/taProject/{id}")
83
+    public ResponseBean edit(@ApiParam("对象实体") @RequestBody TaProject taProject,
84
+                            @ApiParam("对象ID") @PathVariable String id ) throws Exception {
85
+        taProjectService.updateById(taProject);
86
+        return ResponseBean.success(taProject);
87
+    }
88
+    
89
+    /** 
90
+     * 通过主键删除数据
91
+     *
92
+     * @param projectId 主键
93
+     * @return 是否成功
94
+     */
95
+    @ApiOperation("通过主键删除数据")
96
+    @DeleteMapping("/taProject/{id}")
97
+    public ResponseBean deleteById(@ApiParam("对象ID") @PathVariable String id){
98
+        taProjectService.removeLogicById(id);
99
+        return ResponseBean.success("success");
100
+    }
101
+}

+ 101
- 0
src/main/java/com/njyunzhi/servsummary/controller/TaServiceController.java Bestand weergeven

@@ -0,0 +1,101 @@
1
+package com.njyunzhi.servsummary.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.njyunzhi.servsummary.common.BaseController;
7
+import com.njyunzhi.servsummary.common.ResponseBean;
8
+import java.util.List;
9
+import io.swagger.annotations.Api;
10
+import io.swagger.annotations.ApiOperation;
11
+import io.swagger.annotations.ApiParam;
12
+import org.springframework.beans.factory.annotation.Autowired;
13
+import org.springframework.web.bind.annotation.*;
14
+import com.njyunzhi.servsummary.entity.TaService;
15
+import com.njyunzhi.servsummary.service.TaServiceService;
16
+
17
+ /**
18
+ * 服务表;(ta_service)表控制层
19
+ * @author : http://njyunzhi.com
20
+ * @date : 2022-11-22
21
+ */
22
+@Api(tags = "服务表对象功能接口")
23
+@RestController
24
+@RequestMapping("/")
25
+public class TaServiceController extends BaseController {
26
+    
27
+    @Autowired
28
+    private TaServiceService taServiceService;
29
+    
30
+    /** 
31
+     * 通过ID查询单条数据 
32
+     *
33
+     * @param serviceId 主键
34
+     * @return 实例对象
35
+     */
36
+    @ApiOperation("通过ID查询单条数据")
37
+    @GetMapping("/taService/{id}")
38
+    public ResponseBean queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
39
+        return ResponseBean.success(taServiceService.getById(id));
40
+    }
41
+    
42
+    /** 
43
+     * 分页查询
44
+     *
45
+     * @param pageNum 当前页码
46
+     * @param pageSize 每页条数
47
+     * @return 查询结果
48
+     */
49
+    @ApiOperation("分页查询")
50
+    @GetMapping("/taService")
51
+    public ResponseBean list(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
52
+                            @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) throws Exception {
53
+        
54
+        IPage<TaService> pg = new Page<>(pageNum, pageSize);
55
+        // QueryWrapper<TaService> queryWrapper = new QueryWrapper<>();
56
+        // queryWrapper.orderByDesc("create_date");
57
+        IPage<TaService> result = taServiceService.page(pg);
58
+        
59
+        return ResponseBean.success(result);
60
+    }
61
+    
62
+    /** 
63
+     * 新增数据
64
+     *
65
+     * @param taService 实例对象
66
+     * @return 实例对象
67
+     */
68
+    @ApiOperation("新增数据")
69
+    @PostMapping("/taService")
70
+    public ResponseBean add(@ApiParam("对象实体") @RequestBody TaService taService) throws Exception {
71
+        taServiceService.save(taService);
72
+        return ResponseBean.success(taService);
73
+    }
74
+    
75
+    /** 
76
+     * 更新数据
77
+     *
78
+     * @param taService 实例对象
79
+     * @return 实例对象
80
+     */
81
+    @ApiOperation("更新数据")
82
+    @PutMapping("/taService/{id}")
83
+    public ResponseBean edit(@ApiParam("对象实体") @RequestBody TaService taService,
84
+                            @ApiParam("对象ID") @PathVariable String id ) throws Exception {
85
+        taServiceService.updateById(taService);
86
+        return ResponseBean.success(taService);
87
+    }
88
+    
89
+    /** 
90
+     * 通过主键删除数据
91
+     *
92
+     * @param serviceId 主键
93
+     * @return 是否成功
94
+     */
95
+    @ApiOperation("通过主键删除数据")
96
+    @DeleteMapping("/taService/{id}")
97
+    public ResponseBean deleteById(@ApiParam("对象ID") @PathVariable String id){
98
+        taServiceService.removeLogicById(id);
99
+        return ResponseBean.success("success");
100
+    }
101
+}

+ 101
- 0
src/main/java/com/njyunzhi/servsummary/controller/TaSslController.java Bestand weergeven

@@ -0,0 +1,101 @@
1
+package com.njyunzhi.servsummary.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.njyunzhi.servsummary.common.BaseController;
7
+import com.njyunzhi.servsummary.common.ResponseBean;
8
+import java.util.List;
9
+import io.swagger.annotations.Api;
10
+import io.swagger.annotations.ApiOperation;
11
+import io.swagger.annotations.ApiParam;
12
+import org.springframework.beans.factory.annotation.Autowired;
13
+import org.springframework.web.bind.annotation.*;
14
+import com.njyunzhi.servsummary.entity.TaSsl;
15
+import com.njyunzhi.servsummary.service.TaSslService;
16
+
17
+ /**
18
+ * ssl域名;(ta_ssl)表控制层
19
+ * @author : http://njyunzhi.com
20
+ * @date : 2022-11-22
21
+ */
22
+@Api(tags = "ssl域名对象功能接口")
23
+@RestController
24
+@RequestMapping("/")
25
+public class TaSslController extends BaseController {
26
+    
27
+    @Autowired
28
+    private TaSslService taSslService;
29
+    
30
+    /** 
31
+     * 通过ID查询单条数据 
32
+     *
33
+     * @param sslId 主键
34
+     * @return 实例对象
35
+     */
36
+    @ApiOperation("通过ID查询单条数据")
37
+    @GetMapping("/taSsl/{id}")
38
+    public ResponseBean queryById(@ApiParam("对象ID") @PathVariable String id) throws Exception {
39
+        return ResponseBean.success(taSslService.getById(id));
40
+    }
41
+    
42
+    /** 
43
+     * 分页查询
44
+     *
45
+     * @param pageNum 当前页码
46
+     * @param pageSize 每页条数
47
+     * @return 查询结果
48
+     */
49
+    @ApiOperation("分页查询")
50
+    @GetMapping("/taSsl")
51
+    public ResponseBean list(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
52
+                            @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize) throws Exception {
53
+        
54
+        IPage<TaSsl> pg = new Page<>(pageNum, pageSize);
55
+        // QueryWrapper<TaSsl> queryWrapper = new QueryWrapper<>();
56
+        // queryWrapper.orderByDesc("create_date");
57
+        IPage<TaSsl> result = taSslService.page(pg);
58
+        
59
+        return ResponseBean.success(result);
60
+    }
61
+    
62
+    /** 
63
+     * 新增数据
64
+     *
65
+     * @param taSsl 实例对象
66
+     * @return 实例对象
67
+     */
68
+    @ApiOperation("新增数据")
69
+    @PostMapping("/taSsl")
70
+    public ResponseBean add(@ApiParam("对象实体") @RequestBody TaSsl taSsl) throws Exception {
71
+        taSslService.save(taSsl);
72
+        return ResponseBean.success(taSsl);
73
+    }
74
+    
75
+    /** 
76
+     * 更新数据
77
+     *
78
+     * @param taSsl 实例对象
79
+     * @return 实例对象
80
+     */
81
+    @ApiOperation("更新数据")
82
+    @PutMapping("/taSsl/{id}")
83
+    public ResponseBean edit(@ApiParam("对象实体") @RequestBody TaSsl taSsl,
84
+                            @ApiParam("对象ID") @PathVariable String id ) throws Exception {
85
+        taSslService.updateById(taSsl);
86
+        return ResponseBean.success(taSsl);
87
+    }
88
+    
89
+    /** 
90
+     * 通过主键删除数据
91
+     *
92
+     * @param sslId 主键
93
+     * @return 是否成功
94
+     */
95
+    @ApiOperation("通过主键删除数据")
96
+    @DeleteMapping("/taSsl/{id}")
97
+    public ResponseBean deleteById(@ApiParam("对象ID") @PathVariable String id){
98
+        taSslService.removeLogicById(id);
99
+        return ResponseBean.success("success");
100
+    }
101
+}

+ 49
- 0
src/main/java/com/njyunzhi/servsummary/entity/SysSms.java Bestand weergeven

@@ -0,0 +1,49 @@
1
+package com.njyunzhi.servsummary.entity;
2
+
3
+import io.swagger.annotations.ApiModel;
4
+import io.swagger.annotations.ApiModelProperty;
5
+import com.baomidou.mybatisplus.annotation.IdType;
6
+import com.baomidou.mybatisplus.annotation.TableName;
7
+import com.baomidou.mybatisplus.annotation.TableId;
8
+import java.io.Serializable;
9
+import java.time.LocalDateTime;
10
+import java.util.Date;
11
+import lombok.Data;
12
+import lombok.EqualsAndHashCode;
13
+import lombok.experimental.Accessors;
14
+
15
+ /**
16
+ * 系统短信;
17
+ * @author : http://www.chiner.pro
18
+ * @date : 2022-11-22
19
+ */
20
+@Data
21
+@EqualsAndHashCode(callSuper = false)
22
+@Accessors(chain = true)
23
+@ApiModel(value = "系统短信",description = "")
24
+@TableName("sys_sms")
25
+public class SysSms implements Serializable,Cloneable{
26
+    /** 短信ID */
27
+    @ApiModelProperty(name = "短信ID",notes = "")
28
+    @TableId(value = "sms_id", type = IdType.UUID)
29
+    private String smsId ;
30
+    /** 模板code */
31
+    @ApiModelProperty(name = "模板code",notes = "")
32
+    private String code ;
33
+     /** 手机号 */
34
+     @ApiModelProperty(name = "手机号",notes = "")
35
+     private String phone ;
36
+    /** 短信内容 */
37
+    @ApiModelProperty(name = "短信内容",notes = "")
38
+    private String content ;
39
+    /** 过期时间 */
40
+    @ApiModelProperty(name = "过期时间",notes = "")
41
+    private LocalDateTime expireDate ;
42
+    /** 状态 */
43
+    @ApiModelProperty(name = "状态",notes = "")
44
+    private Integer status ;
45
+    /** 创建时间 */
46
+    @ApiModelProperty(name = "创建时间",notes = "")
47
+    private LocalDateTime createDate ;
48
+
49
+}

+ 42
- 0
src/main/java/com/njyunzhi/servsummary/entity/SysUser.java Bestand weergeven

@@ -0,0 +1,42 @@
1
+package com.njyunzhi.servsummary.entity;
2
+
3
+import io.swagger.annotations.ApiModel;
4
+import io.swagger.annotations.ApiModelProperty;
5
+import com.baomidou.mybatisplus.annotation.IdType;
6
+import com.baomidou.mybatisplus.annotation.TableName;
7
+import com.baomidou.mybatisplus.annotation.TableId;
8
+import java.io.Serializable;
9
+import java.util.Date;
10
+import lombok.Data;
11
+import lombok.EqualsAndHashCode;
12
+import lombok.experimental.Accessors;
13
+
14
+ /**
15
+ * 系统用户;
16
+ * @author : http://www.chiner.pro
17
+ * @date : 2022-11-22
18
+ */
19
+@Data
20
+@EqualsAndHashCode(callSuper = false)
21
+@Accessors(chain = true)
22
+@ApiModel(value = "系统用户",description = "")
23
+@TableName("sys_user")
24
+public class SysUser implements Serializable,Cloneable{
25
+    /** 用户ID */
26
+    @ApiModelProperty(name = "用户ID",notes = "")
27
+    @TableId(value = "user_id", type = IdType.INPUT)
28
+    private String userId ;
29
+    /** 名称 */
30
+    @ApiModelProperty(name = "名称",notes = "")
31
+    private String name ;
32
+    /** 手机号 */
33
+    @ApiModelProperty(name = "手机号",notes = "")
34
+    private String phone ;
35
+    /** 状态 */
36
+    @ApiModelProperty(name = "状态",notes = "")
37
+    private Integer status ;
38
+    /** 创建时间 */
39
+    @ApiModelProperty(name = "创建时间",notes = "")
40
+    private LocalDateTime createDate ;
41
+
42
+}

+ 42
- 0
src/main/java/com/njyunzhi/servsummary/entity/TaContcat.java Bestand weergeven

@@ -0,0 +1,42 @@
1
+package com.njyunzhi.servsummary.entity;
2
+
3
+import io.swagger.annotations.ApiModel;
4
+import io.swagger.annotations.ApiModelProperty;
5
+import com.baomidou.mybatisplus.annotation.IdType;
6
+import com.baomidou.mybatisplus.annotation.TableName;
7
+import com.baomidou.mybatisplus.annotation.TableId;
8
+import java.io.Serializable;
9
+import java.util.Date;
10
+import lombok.Data;
11
+import lombok.EqualsAndHashCode;
12
+import lombok.experimental.Accessors;
13
+
14
+ /**
15
+ * 联系人;
16
+ * @author : http://www.chiner.pro
17
+ * @date : 2022-11-22
18
+ */
19
+@Data
20
+@EqualsAndHashCode(callSuper = false)
21
+@Accessors(chain = true)
22
+@ApiModel(value = "联系人",description = "")
23
+@TableName("ta_contcat")
24
+public class TaContcat implements Serializable,Cloneable{
25
+    /** 人员ID */
26
+    @ApiModelProperty(name = "人员ID",notes = "")
27
+    @TableId(value = "user_id", type = IdType.INPUT)
28
+    private String userId ;
29
+    /** 名称 */
30
+    @ApiModelProperty(name = "名称",notes = "")
31
+    private String name ;
32
+    /** 手机号 */
33
+    @ApiModelProperty(name = "手机号",notes = "")
34
+    private String phone ;
35
+    /** 状态 */
36
+    @ApiModelProperty(name = "状态",notes = "")
37
+    private Integer status ;
38
+    /** 创建时间 */
39
+    @ApiModelProperty(name = "创建时间",notes = "")
40
+    private LocalDateTime createDate ;
41
+
42
+}

+ 57
- 0
src/main/java/com/njyunzhi/servsummary/entity/TaEcs.java Bestand weergeven

@@ -0,0 +1,57 @@
1
+package com.njyunzhi.servsummary.entity;
2
+
3
+import io.swagger.annotations.ApiModel;
4
+import io.swagger.annotations.ApiModelProperty;
5
+import com.baomidou.mybatisplus.annotation.IdType;
6
+import com.baomidou.mybatisplus.annotation.TableName;
7
+import com.baomidou.mybatisplus.annotation.TableId;
8
+import java.io.Serializable;
9
+import java.util.Date;
10
+import lombok.Data;
11
+import lombok.EqualsAndHashCode;
12
+import lombok.experimental.Accessors;
13
+
14
+ /**
15
+ * 服务器;
16
+ * @author : http://www.chiner.pro
17
+ * @date : 2022-11-22
18
+ */
19
+@Data
20
+@EqualsAndHashCode(callSuper = false)
21
+@Accessors(chain = true)
22
+@ApiModel(value = "服务器",description = "")
23
+@TableName("ta_ecs")
24
+public class TaEcs implements Serializable,Cloneable{
25
+    /** ID */
26
+    @ApiModelProperty(name = "ID",notes = "")
27
+    @TableId(value = "ecs_id", type = IdType.INPUT)
28
+    private String ecsId ;
29
+    /** 名称 */
30
+    @ApiModelProperty(name = "名称",notes = "")
31
+    private String name ;
32
+    /** 内网ID */
33
+    @ApiModelProperty(name = "内网ID",notes = "")
34
+    private String innerIp ;
35
+    /** 外网IP */
36
+    @ApiModelProperty(name = "外网IP",notes = "")
37
+    private String outerIp ;
38
+    /** 账号 */
39
+    @ApiModelProperty(name = "账号",notes = "")
40
+    private String account ;
41
+    /** 密码 */
42
+    @ApiModelProperty(name = "密码",notes = "")
43
+    private String password ;
44
+    /** 到期时间 */
45
+    @ApiModelProperty(name = "到期时间",notes = "")
46
+    private LocalDateTime expireDate ;
47
+    /** 所属云账户 */
48
+    @ApiModelProperty(name = "所属云账户",notes = "")
49
+    private String cloudId ;
50
+    /** 状态 */
51
+    @ApiModelProperty(name = "状态",notes = "")
52
+    private Integer status ;
53
+    /** 创建时间 */
54
+    @ApiModelProperty(name = "创建时间",notes = "")
55
+    private LocalDateTime createDate ;
56
+
57
+}

+ 45
- 0
src/main/java/com/njyunzhi/servsummary/entity/TaOssBucket.java Bestand weergeven

@@ -0,0 +1,45 @@
1
+package com.njyunzhi.servsummary.entity;
2
+
3
+import io.swagger.annotations.ApiModel;
4
+import io.swagger.annotations.ApiModelProperty;
5
+import com.baomidou.mybatisplus.annotation.IdType;
6
+import com.baomidou.mybatisplus.annotation.TableName;
7
+import com.baomidou.mybatisplus.annotation.TableId;
8
+import java.io.Serializable;
9
+import java.util.Date;
10
+import lombok.Data;
11
+import lombok.EqualsAndHashCode;
12
+import lombok.experimental.Accessors;
13
+
14
+ /**
15
+ * OSS Bucket;
16
+ * @author : http://www.chiner.pro
17
+ * @date : 2022-11-22
18
+ */
19
+@Data
20
+@EqualsAndHashCode(callSuper = false)
21
+@Accessors(chain = true)
22
+@ApiModel(value = "OSS Bucket",description = "")
23
+@TableName("ta_oss_bucket")
24
+public class TaOssBucket implements Serializable,Cloneable{
25
+    /** ossID */
26
+    @ApiModelProperty(name = "ossID",notes = "")
27
+    @TableId(value = "bucket_id", type = IdType.INPUT)
28
+    private String bucketId ;
29
+    /** 名称 */
30
+    @ApiModelProperty(name = "名称",notes = "")
31
+    private String name ;
32
+    /** 域名 */
33
+    @ApiModelProperty(name = "域名",notes = "")
34
+    private String url ;
35
+    /** 绑定域名 */
36
+    @ApiModelProperty(name = "绑定域名",notes = "")
37
+    private String bindUrl ;
38
+    /** 状态 */
39
+    @ApiModelProperty(name = "状态",notes = "")
40
+    private Integer status ;
41
+    /** 创建时间 */
42
+    @ApiModelProperty(name = "创建时间",notes = "")
43
+    private LocalDateTime createDate ;
44
+
45
+}

+ 48
- 0
src/main/java/com/njyunzhi/servsummary/entity/TaPlatform.java Bestand weergeven

@@ -0,0 +1,48 @@
1
+package com.njyunzhi.servsummary.entity;
2
+
3
+import io.swagger.annotations.ApiModel;
4
+import io.swagger.annotations.ApiModelProperty;
5
+import com.baomidou.mybatisplus.annotation.IdType;
6
+import com.baomidou.mybatisplus.annotation.TableName;
7
+import com.baomidou.mybatisplus.annotation.TableId;
8
+import java.io.Serializable;
9
+import java.util.Date;
10
+import lombok.Data;
11
+import lombok.EqualsAndHashCode;
12
+import lombok.experimental.Accessors;
13
+
14
+ /**
15
+ * 云平台;
16
+ * @author : http://www.chiner.pro
17
+ * @date : 2022-11-22
18
+ */
19
+@Data
20
+@EqualsAndHashCode(callSuper = false)
21
+@Accessors(chain = true)
22
+@ApiModel(value = "云平台",description = "")
23
+@TableName("ta_platform")
24
+public class TaPlatform implements Serializable,Cloneable{
25
+    /** 云平台ID */
26
+    @ApiModelProperty(name = "云平台ID",notes = "")
27
+    @TableId(value = "cloud_id", type = IdType.INPUT)
28
+    private String cloudId ;
29
+    /** 名称 */
30
+    @ApiModelProperty(name = "名称",notes = "")
31
+    private String name ;
32
+    /** logo */
33
+    @ApiModelProperty(name = "logo",notes = "")
34
+    private String logo ;
35
+    /** 账户 */
36
+    @ApiModelProperty(name = "账户",notes = "")
37
+    private String account ;
38
+    /** 密码 */
39
+    @ApiModelProperty(name = "密码",notes = "")
40
+    private String password ;
41
+    /** 状态 */
42
+    @ApiModelProperty(name = "状态",notes = "")
43
+    private Integer status ;
44
+    /** 创建时间 */
45
+    @ApiModelProperty(name = "创建时间",notes = "")
46
+    private LocalDateTime createDate ;
47
+
48
+}

+ 48
- 0
src/main/java/com/njyunzhi/servsummary/entity/TaProject.java Bestand weergeven

@@ -0,0 +1,48 @@
1
+package com.njyunzhi.servsummary.entity;
2
+
3
+import io.swagger.annotations.ApiModel;
4
+import io.swagger.annotations.ApiModelProperty;
5
+import com.baomidou.mybatisplus.annotation.IdType;
6
+import com.baomidou.mybatisplus.annotation.TableName;
7
+import com.baomidou.mybatisplus.annotation.TableId;
8
+import java.io.Serializable;
9
+import java.util.Date;
10
+import lombok.Data;
11
+import lombok.EqualsAndHashCode;
12
+import lombok.experimental.Accessors;
13
+
14
+ /**
15
+ * 项目表;
16
+ * @author : http://www.chiner.pro
17
+ * @date : 2022-11-22
18
+ */
19
+@Data
20
+@EqualsAndHashCode(callSuper = false)
21
+@Accessors(chain = true)
22
+@ApiModel(value = "项目表",description = "")
23
+@TableName("ta_project")
24
+public class TaProject implements Serializable,Cloneable{
25
+    /** 项目ID */
26
+    @ApiModelProperty(name = "项目ID",notes = "")
27
+    @TableId(value = "project_id", type = IdType.INPUT)
28
+    private String projectId ;
29
+    /** 名称 */
30
+    @ApiModelProperty(name = "名称",notes = "")
31
+    private String name ;
32
+    /** logo */
33
+    @ApiModelProperty(name = "logo",notes = "")
34
+    private String logo ;
35
+    /** 到期日期 */
36
+    @ApiModelProperty(name = "到期日期",notes = "")
37
+    private LocalDateTime expireDate ;
38
+    /** 备注 */
39
+    @ApiModelProperty(name = "备注",notes = "")
40
+    private String remark ;
41
+    /** 状态 */
42
+    @ApiModelProperty(name = "状态",notes = "")
43
+    private Integer status ;
44
+    /** 创建时间 */
45
+    @ApiModelProperty(name = "创建时间",notes = "")
46
+    private LocalDateTime createDate ;
47
+
48
+}

+ 87
- 0
src/main/java/com/njyunzhi/servsummary/entity/TaService.java Bestand weergeven

@@ -0,0 +1,87 @@
1
+package com.njyunzhi.servsummary.entity;
2
+
3
+import io.swagger.annotations.ApiModel;
4
+import io.swagger.annotations.ApiModelProperty;
5
+import com.baomidou.mybatisplus.annotation.IdType;
6
+import com.baomidou.mybatisplus.annotation.TableName;
7
+import com.baomidou.mybatisplus.annotation.TableId;
8
+import java.io.Serializable;
9
+import java.util.Date;
10
+import lombok.Data;
11
+import lombok.EqualsAndHashCode;
12
+import lombok.experimental.Accessors;
13
+
14
+ /**
15
+ * 服务表;
16
+ * @author : http://www.chiner.pro
17
+ * @date : 2022-11-22
18
+ */
19
+@Data
20
+@EqualsAndHashCode(callSuper = false)
21
+@Accessors(chain = true)
22
+@ApiModel(value = "服务表",description = "")
23
+@TableName("ta_service")
24
+public class TaService implements Serializable,Cloneable{
25
+    /** 服务ID */
26
+    @ApiModelProperty(name = "服务ID",notes = "")
27
+    @TableId(value = "service_id", type = IdType.INPUT)
28
+    private String serviceId ;
29
+    /** 名称 */
30
+    @ApiModelProperty(name = "名称",notes = "")
31
+    private String name ;
32
+    /** 环境类型;dev,prod,stage */
33
+    @ApiModelProperty(name = "环境类型",notes = "dev,prod,stage")
34
+    private String envType ;
35
+    /** 服务类型;java,db,h5 */
36
+    @ApiModelProperty(name = "服务类型",notes = "java,db,h5")
37
+    private String servType ;
38
+    /** 所属项目 */
39
+    @ApiModelProperty(name = "所属项目",notes = "")
40
+    private String projectId ;
41
+    /** 所在机器 */
42
+    @ApiModelProperty(name = "所在机器",notes = "")
43
+    private String ecsId ;
44
+    /** OSS Bucket */
45
+    @ApiModelProperty(name = "OSS Bucket",notes = "")
46
+    private String bucketId ;
47
+    /** 函数服务 */
48
+    @ApiModelProperty(name = "函数服务",notes = "")
49
+    private String fcServer ;
50
+    /** FC函数 */
51
+    @ApiModelProperty(name = "FC函数",notes = "")
52
+    private String fcFunction ;
53
+    /** 服务地址 */
54
+    @ApiModelProperty(name = "服务地址",notes = "")
55
+    private String url ;
56
+    /** 是否SSL */
57
+    @ApiModelProperty(name = "是否SSL",notes = "")
58
+    private Integer isSsl ;
59
+    /** 端口 */
60
+    @ApiModelProperty(name = "端口",notes = "")
61
+    private Integer port ;
62
+    /** 部署目录 */
63
+    @ApiModelProperty(name = "部署目录",notes = "")
64
+    private String deployDir ;
65
+    /** 系统服务 */
66
+    @ApiModelProperty(name = "系统服务",notes = "")
67
+    private String sysService ;
68
+    /** 启动脚本 */
69
+    @ApiModelProperty(name = "启动脚本",notes = "")
70
+    private String serviceBin ;
71
+    /** 账户 */
72
+    @ApiModelProperty(name = "账户",notes = "")
73
+    private String account ;
74
+    /** 密码 */
75
+    @ApiModelProperty(name = "密码",notes = "")
76
+    private String password ;
77
+    /** 备注 */
78
+    @ApiModelProperty(name = "备注",notes = "")
79
+    private String remark ;
80
+    /** 状态 */
81
+    @ApiModelProperty(name = "状态",notes = "")
82
+    private Integer status ;
83
+    /** 创建时间 */
84
+    @ApiModelProperty(name = "创建时间",notes = "")
85
+    private LocalDateTime createDate ;
86
+
87
+}

+ 45
- 0
src/main/java/com/njyunzhi/servsummary/entity/TaSsl.java Bestand weergeven

@@ -0,0 +1,45 @@
1
+package com.njyunzhi.servsummary.entity;
2
+
3
+import io.swagger.annotations.ApiModel;
4
+import io.swagger.annotations.ApiModelProperty;
5
+import com.baomidou.mybatisplus.annotation.IdType;
6
+import com.baomidou.mybatisplus.annotation.TableName;
7
+import com.baomidou.mybatisplus.annotation.TableId;
8
+import java.io.Serializable;
9
+import java.util.Date;
10
+import lombok.Data;
11
+import lombok.EqualsAndHashCode;
12
+import lombok.experimental.Accessors;
13
+
14
+ /**
15
+ * ssl域名;
16
+ * @author : http://www.chiner.pro
17
+ * @date : 2022-11-22
18
+ */
19
+@Data
20
+@EqualsAndHashCode(callSuper = false)
21
+@Accessors(chain = true)
22
+@ApiModel(value = "ssl域名",description = "")
23
+@TableName("ta_ssl")
24
+public class TaSsl implements Serializable,Cloneable{
25
+    /** SSL ID */
26
+    @ApiModelProperty(name = "SSL ID",notes = "")
27
+    @TableId(value = "ssl_id", type = IdType.INPUT)
28
+    private String sslId ;
29
+    /** 名称 */
30
+    @ApiModelProperty(name = "名称",notes = "")
31
+    private String name ;
32
+    /** 域名 */
33
+    @ApiModelProperty(name = "域名",notes = "")
34
+    private String url ;
35
+    /** 到期时间 */
36
+    @ApiModelProperty(name = "到期时间",notes = "")
37
+    private LocalDateTime expireDate ;
38
+    /** 状态 */
39
+    @ApiModelProperty(name = "状态",notes = "")
40
+    private Integer status ;
41
+    /** 创建时间 */
42
+    @ApiModelProperty(name = "创建时间",notes = "")
43
+    private LocalDateTime createDate ;
44
+
45
+}

+ 18
- 0
src/main/java/com/njyunzhi/servsummary/mapper/SysSmsMapper.java Bestand weergeven

@@ -0,0 +1,18 @@
1
+package com.njyunzhi.servsummary.mapper;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import org.apache.ibatis.annotations.Mapper;
5
+import org.apache.ibatis.annotations.Param;
6
+import com.njyunzhi.servsummary.entity.SysSms;
7
+
8
+/**
9
+ * 系统短信;(sys_sms)表数据库访问层
10
+ *
11
+ * @author : http://njyunzhi.com
12
+ * @date : 2022-11-22
13
+ */
14
+@Mapper
15
+public interface SysSmsMapper extends BaseMapper<SysSms> {
16
+
17
+    SysSms getByPhone(@Param("phone") String phone, @Param("code") String code);
18
+}

+ 16
- 0
src/main/java/com/njyunzhi/servsummary/mapper/SysUserMapper.java Bestand weergeven

@@ -0,0 +1,16 @@
1
+package com.njyunzhi.servsummary.mapper;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import org.apache.ibatis.annotations.Mapper;
5
+import org.apache.ibatis.annotations.Param;
6
+import com.njyunzhi.servsummary.entity.SysUser;
7
+
8
+ /**
9
+ * 系统用户;(sys_user)表数据库访问层
10
+ * @author : http://njyunzhi.com
11
+ * @date : 2022-11-22
12
+ */
13
+@Mapper
14
+public interface SysUserMapper  extends BaseMapper<SysUser>{
15
+    
16
+}

+ 16
- 0
src/main/java/com/njyunzhi/servsummary/mapper/TaContcatMapper.java Bestand weergeven

@@ -0,0 +1,16 @@
1
+package com.njyunzhi.servsummary.mapper;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import org.apache.ibatis.annotations.Mapper;
5
+import org.apache.ibatis.annotations.Param;
6
+import com.njyunzhi.servsummary.entity.TaContcat;
7
+
8
+ /**
9
+ * 联系人;(ta_contcat)表数据库访问层
10
+ * @author : http://njyunzhi.com
11
+ * @date : 2022-11-22
12
+ */
13
+@Mapper
14
+public interface TaContcatMapper  extends BaseMapper<TaContcat>{
15
+    
16
+}

+ 16
- 0
src/main/java/com/njyunzhi/servsummary/mapper/TaEcsMapper.java Bestand weergeven

@@ -0,0 +1,16 @@
1
+package com.njyunzhi.servsummary.mapper;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import org.apache.ibatis.annotations.Mapper;
5
+import org.apache.ibatis.annotations.Param;
6
+import com.njyunzhi.servsummary.entity.TaEcs;
7
+
8
+ /**
9
+ * 服务器;(ta_ecs)表数据库访问层
10
+ * @author : http://njyunzhi.com
11
+ * @date : 2022-11-22
12
+ */
13
+@Mapper
14
+public interface TaEcsMapper  extends BaseMapper<TaEcs>{
15
+    
16
+}

+ 16
- 0
src/main/java/com/njyunzhi/servsummary/mapper/TaOssBucketMapper.java Bestand weergeven

@@ -0,0 +1,16 @@
1
+package com.njyunzhi.servsummary.mapper;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import org.apache.ibatis.annotations.Mapper;
5
+import org.apache.ibatis.annotations.Param;
6
+import com.njyunzhi.servsummary.entity.TaOssBucket;
7
+
8
+ /**
9
+ * OSS Bucket;(ta_oss_bucket)表数据库访问层
10
+ * @author : http://njyunzhi.com
11
+ * @date : 2022-11-22
12
+ */
13
+@Mapper
14
+public interface TaOssBucketMapper  extends BaseMapper<TaOssBucket>{
15
+    
16
+}

+ 16
- 0
src/main/java/com/njyunzhi/servsummary/mapper/TaPlatformMapper.java Bestand weergeven

@@ -0,0 +1,16 @@
1
+package com.njyunzhi.servsummary.mapper;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import org.apache.ibatis.annotations.Mapper;
5
+import org.apache.ibatis.annotations.Param;
6
+import com.njyunzhi.servsummary.entity.TaPlatform;
7
+
8
+ /**
9
+ * 云平台;(ta_platform)表数据库访问层
10
+ * @author : http://njyunzhi.com
11
+ * @date : 2022-11-22
12
+ */
13
+@Mapper
14
+public interface TaPlatformMapper  extends BaseMapper<TaPlatform>{
15
+    
16
+}

+ 16
- 0
src/main/java/com/njyunzhi/servsummary/mapper/TaProjectMapper.java Bestand weergeven

@@ -0,0 +1,16 @@
1
+package com.njyunzhi.servsummary.mapper;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import org.apache.ibatis.annotations.Mapper;
5
+import org.apache.ibatis.annotations.Param;
6
+import com.njyunzhi.servsummary.entity.TaProject;
7
+
8
+ /**
9
+ * 项目表;(ta_project)表数据库访问层
10
+ * @author : http://njyunzhi.com
11
+ * @date : 2022-11-22
12
+ */
13
+@Mapper
14
+public interface TaProjectMapper  extends BaseMapper<TaProject>{
15
+    
16
+}

+ 16
- 0
src/main/java/com/njyunzhi/servsummary/mapper/TaServiceMapper.java Bestand weergeven

@@ -0,0 +1,16 @@
1
+package com.njyunzhi.servsummary.mapper;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import org.apache.ibatis.annotations.Mapper;
5
+import org.apache.ibatis.annotations.Param;
6
+import com.njyunzhi.servsummary.entity.TaService;
7
+
8
+ /**
9
+ * 服务表;(ta_service)表数据库访问层
10
+ * @author : http://njyunzhi.com
11
+ * @date : 2022-11-22
12
+ */
13
+@Mapper
14
+public interface TaServiceMapper  extends BaseMapper<TaService>{
15
+    
16
+}

+ 16
- 0
src/main/java/com/njyunzhi/servsummary/mapper/TaSslMapper.java Bestand weergeven

@@ -0,0 +1,16 @@
1
+package com.njyunzhi.servsummary.mapper;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import org.apache.ibatis.annotations.Mapper;
5
+import org.apache.ibatis.annotations.Param;
6
+import com.njyunzhi.servsummary.entity.TaSsl;
7
+
8
+ /**
9
+ * ssl域名;(ta_ssl)表数据库访问层
10
+ * @author : http://njyunzhi.com
11
+ * @date : 2022-11-22
12
+ */
13
+@Mapper
14
+public interface TaSslMapper  extends BaseMapper<TaSsl>{
15
+    
16
+}

+ 26
- 0
src/main/java/com/njyunzhi/servsummary/service/IBaseService.java Bestand weergeven

@@ -0,0 +1,26 @@
1
+package com.njyunzhi.servsummary.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+
5
+import java.io.Serializable;
6
+
7
+public interface IBaseService<T> extends IService<T> {
8
+    /**
9
+     * 逻辑删除
10
+     * @param id
11
+     * @return
12
+     */
13
+    boolean removeLogicById(Serializable id);
14
+
15
+    boolean removeBy(String column, Object value, boolean notDelete);
16
+
17
+    boolean canAccessData(Serializable id, String userId);
18
+
19
+    boolean remvoeWithDataScope(Serializable id, String userId);
20
+
21
+    long countBy(String column, Object value, boolean notDelete);
22
+
23
+    T getByButNot(String column, Object value, String col, Object val, boolean notDelete);
24
+
25
+    T getExistBy(String column, Object value, boolean normal, boolean notDelete);
26
+}

+ 14
- 0
src/main/java/com/njyunzhi/servsummary/service/SysSmsService.java Bestand weergeven

@@ -0,0 +1,14 @@
1
+package com.njyunzhi.servsummary.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.njyunzhi.servsummary.entity.SysSms;
5
+
6
+ /**
7
+ * 系统短信;(sys_sms)表服务接口
8
+ * @author : http://njyunzhi.com
9
+ * @date : 2022-11-22
10
+ */
11
+public interface SysSmsService extends IBaseService<SysSms> {
12
+
13
+     SysSms getByPhone(String phone, String code);
14
+ }

+ 13
- 0
src/main/java/com/njyunzhi/servsummary/service/SysUserService.java Bestand weergeven

@@ -0,0 +1,13 @@
1
+package com.njyunzhi.servsummary.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.njyunzhi.servsummary.entity.SysUser;
5
+
6
+ /**
7
+ * 系统用户;(sys_user)表服务接口
8
+ * @author : http://njyunzhi.com
9
+ * @date : 2022-11-22
10
+ */
11
+public interface SysUserService extends IBaseService<SysUser> {
12
+    
13
+}

+ 13
- 0
src/main/java/com/njyunzhi/servsummary/service/TaContcatService.java Bestand weergeven

@@ -0,0 +1,13 @@
1
+package com.njyunzhi.servsummary.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.njyunzhi.servsummary.entity.TaContcat;
5
+
6
+ /**
7
+ * 联系人;(ta_contcat)表服务接口
8
+ * @author : http://njyunzhi.com
9
+ * @date : 2022-11-22
10
+ */
11
+public interface TaContcatService extends IBaseService<TaContcat> {
12
+    
13
+}

+ 13
- 0
src/main/java/com/njyunzhi/servsummary/service/TaEcsService.java Bestand weergeven

@@ -0,0 +1,13 @@
1
+package com.njyunzhi.servsummary.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.njyunzhi.servsummary.entity.TaEcs;
5
+
6
+ /**
7
+ * 服务器;(ta_ecs)表服务接口
8
+ * @author : http://njyunzhi.com
9
+ * @date : 2022-11-22
10
+ */
11
+public interface TaEcsService extends IBaseService<TaEcs> {
12
+    
13
+}

+ 13
- 0
src/main/java/com/njyunzhi/servsummary/service/TaOssBucketService.java Bestand weergeven

@@ -0,0 +1,13 @@
1
+package com.njyunzhi.servsummary.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.njyunzhi.servsummary.entity.TaOssBucket;
5
+
6
+ /**
7
+ * OSS Bucket;(ta_oss_bucket)表服务接口
8
+ * @author : http://njyunzhi.com
9
+ * @date : 2022-11-22
10
+ */
11
+public interface TaOssBucketService extends IBaseService<TaOssBucket> {
12
+    
13
+}

+ 13
- 0
src/main/java/com/njyunzhi/servsummary/service/TaPlatformService.java Bestand weergeven

@@ -0,0 +1,13 @@
1
+package com.njyunzhi.servsummary.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.njyunzhi.servsummary.entity.TaPlatform;
5
+
6
+ /**
7
+ * 云平台;(ta_platform)表服务接口
8
+ * @author : http://njyunzhi.com
9
+ * @date : 2022-11-22
10
+ */
11
+public interface TaPlatformService extends IBaseService<TaPlatform> {
12
+    
13
+}

+ 13
- 0
src/main/java/com/njyunzhi/servsummary/service/TaProjectService.java Bestand weergeven

@@ -0,0 +1,13 @@
1
+package com.njyunzhi.servsummary.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.njyunzhi.servsummary.entity.TaProject;
5
+
6
+ /**
7
+ * 项目表;(ta_project)表服务接口
8
+ * @author : http://njyunzhi.com
9
+ * @date : 2022-11-22
10
+ */
11
+public interface TaProjectService extends IBaseService<TaProject> {
12
+    
13
+}

+ 13
- 0
src/main/java/com/njyunzhi/servsummary/service/TaServiceService.java Bestand weergeven

@@ -0,0 +1,13 @@
1
+package com.njyunzhi.servsummary.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.njyunzhi.servsummary.entity.TaService;
5
+
6
+ /**
7
+ * 服务表;(ta_service)表服务接口
8
+ * @author : http://njyunzhi.com
9
+ * @date : 2022-11-22
10
+ */
11
+public interface TaServiceService extends IBaseService<TaService> {
12
+    
13
+}

+ 13
- 0
src/main/java/com/njyunzhi/servsummary/service/TaSslService.java Bestand weergeven

@@ -0,0 +1,13 @@
1
+package com.njyunzhi.servsummary.service;
2
+
3
+import com.baomidou.mybatisplus.extension.service.IService;
4
+import com.njyunzhi.servsummary.entity.TaSsl;
5
+
6
+ /**
7
+ * ssl域名;(ta_ssl)表服务接口
8
+ * @author : http://njyunzhi.com
9
+ * @date : 2022-11-22
10
+ */
11
+public interface TaSslService extends IBaseService<TaSsl> {
12
+    
13
+}

+ 108
- 0
src/main/java/com/njyunzhi/servsummary/service/impl/BaseServiceImpl.java Bestand weergeven

@@ -0,0 +1,108 @@
1
+package com.njyunzhi.servsummary.service.impl;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
5
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
6
+import com.baomidou.mybatisplus.core.metadata.TableInfo;
7
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
8
+import com.baomidou.mybatisplus.extension.toolkit.SqlHelper;
9
+import com.njyunzhi.servsummary.service.IBaseService;
10
+
11
+import java.io.Serializable;
12
+
13
+public class BaseServiceImpl<M extends BaseMapper<T>, T> extends ServiceImpl<M, T> implements IBaseService<T> {
14
+    @Override
15
+    public boolean removeLogicById(Serializable id) {
16
+
17
+        TableInfo tableInfo = SqlHelper.table(currentModelClass());
18
+        UpdateWrapper<T> updateWrapper = new UpdateWrapper<>();
19
+        updateWrapper.set("status", -1)
20
+                .eq(tableInfo.getKeyColumn(), id);
21
+
22
+        return update(updateWrapper);
23
+    }
24
+
25
+    @Override
26
+    public boolean removeBy(String column, Object value, boolean notDelete) {
27
+        if (notDelete) {
28
+            UpdateWrapper<T> updateWrapper = new UpdateWrapper<>();
29
+            updateWrapper.set("status", -1);
30
+            updateWrapper.eq(column, value);
31
+            return update(updateWrapper);
32
+        } else {
33
+            QueryWrapper<T> queryWrapper = new QueryWrapper<>();
34
+            queryWrapper.eq(column, value);
35
+            return remove(queryWrapper);
36
+        }
37
+    }
38
+
39
+    @Override
40
+    public boolean canAccessData(Serializable id, String userId) {
41
+        return true;
42
+//        if (Constants.ADMIN_ID.equals(userId)) return true;
43
+//
44
+//        TableInfo tableInfo = SqlHelper.table(currentModelClass());
45
+//
46
+//        String t = tableInfo.getTableName();
47
+////        String k = tableInfo.getKeyColumn();
48
+//        String kAlias = t + ".org_id";
49
+//
50
+//        String joinSQL = "INNER JOIN sys_user_data_scope s ON ( "+ kAlias +" = s.org_id OR "+t+".create_user = s.user_id )";
51
+//        String whereSQL = "WHERE " + kAlias + " = '"+ id +"' AND s.user_id = '" + userId + "'";
52
+//
53
+//        String sql = joinSQL + " " + whereSQL;
54
+//
55
+//        QueryWrapper<T> wrapper = new QueryWrapper<>();
56
+//        wrapper.last(sql);
57
+//        return count(wrapper) > 0;
58
+    }
59
+
60
+    @Override
61
+    public boolean remvoeWithDataScope(Serializable id, String userId) {
62
+        TableInfo tableInfo = SqlHelper.table(currentModelClass());
63
+
64
+        String t = tableInfo.getTableName();
65
+        String k = tableInfo.getKeyColumn();
66
+        String kAlias = t + "." + k;
67
+
68
+        String joinSQL = "INNER JOIN sys_user_data_scope s ON ( "+ kAlias +" = s.org_id OR "+t+".create_user = s.user_id )";
69
+        String setSQL = "SET status = -1";
70
+        String whereSQL = "WHERE " + kAlias + " = '"+ id +"' AND s.user_id = '" + userId + "'";
71
+
72
+        String sql = joinSQL + " " + setSQL + " " + whereSQL;
73
+
74
+        UpdateWrapper<T> wrapper = new UpdateWrapper<>();
75
+        wrapper.last(sql);
76
+        return update(wrapper);
77
+    }
78
+
79
+    @Override
80
+    public long countBy(String column, Object value, boolean notDelete) {
81
+        QueryWrapper<T> queryWrapper = new QueryWrapper<>();
82
+        queryWrapper.eq(column, value);
83
+        queryWrapper.gt(notDelete, "status", -1);
84
+
85
+        return count(queryWrapper);
86
+    }
87
+
88
+    @Override
89
+    public T getByButNot(String column, Object value, String col, Object val, boolean notDelete) {
90
+        QueryWrapper<T> queryWrapper = new QueryWrapper<>();
91
+        queryWrapper.eq(column, value);
92
+        queryWrapper.ne(col, val);
93
+        queryWrapper.gt(notDelete, "status", -1);
94
+        queryWrapper.last("limit 1");
95
+
96
+        return getOne(queryWrapper);
97
+    }
98
+
99
+    @Override
100
+    public T getExistBy(String column, Object value, boolean normal, boolean notDelete) {
101
+        QueryWrapper<T> queryWrapper = new QueryWrapper<>();
102
+        queryWrapper.eq(column, value);
103
+        queryWrapper.eq(normal, "status", 1);
104
+        queryWrapper.gt(notDelete, "status", -1);
105
+        queryWrapper.last("limit 1");
106
+        return getOne(queryWrapper);
107
+    }
108
+}

+ 22
- 0
src/main/java/com/njyunzhi/servsummary/service/impl/SysSmsServiceImpl.java Bestand weergeven

@@ -0,0 +1,22 @@
1
+package com.njyunzhi.servsummary.service.impl;
2
+
3
+import org.springframework.beans.factory.annotation.Autowired;
4
+import org.springframework.stereotype.Service;
5
+import com.njyunzhi.servsummary.entity.SysSms;
6
+import com.njyunzhi.servsummary.mapper.SysSmsMapper;
7
+import com.njyunzhi.servsummary.service.SysSmsService;
8
+
9
+/**
10
+ * 系统短信;(sys_sms)表服务实现类
11
+ *
12
+ * @author : http://www.chiner.pro
13
+ * @date : 2022-11-22
14
+ */
15
+@Service
16
+public class SysSmsServiceImpl extends BaseServiceImpl<SysSmsMapper, SysSms> implements SysSmsService {
17
+
18
+    @Override
19
+    public SysSms getByPhone(String phone, String code) {
20
+        return baseMapper.getByPhone(phone, code);
21
+    }
22
+}

+ 16
- 0
src/main/java/com/njyunzhi/servsummary/service/impl/SysUserServiceImpl.java Bestand weergeven

@@ -0,0 +1,16 @@
1
+package com.njyunzhi.servsummary.service.impl;
2
+
3
+import org.springframework.beans.factory.annotation.Autowired;
4
+import org.springframework.stereotype.Service;
5
+import com.njyunzhi.servsummary.entity.SysUser;
6
+import com.njyunzhi.servsummary.mapper.SysUserMapper;
7
+import com.njyunzhi.servsummary.service.SysUserService;
8
+ /**
9
+ * 系统用户;(sys_user)表服务实现类
10
+ * @author : http://www.chiner.pro
11
+ * @date : 2022-11-22
12
+ */
13
+@Service
14
+public class SysUserServiceImpl extends BaseServiceImpl<SysUserMapper, SysUser> implements SysUserService {
15
+    
16
+}

+ 16
- 0
src/main/java/com/njyunzhi/servsummary/service/impl/TaContcatServiceImpl.java Bestand weergeven

@@ -0,0 +1,16 @@
1
+package com.njyunzhi.servsummary.service.impl;
2
+
3
+import org.springframework.beans.factory.annotation.Autowired;
4
+import org.springframework.stereotype.Service;
5
+import com.njyunzhi.servsummary.entity.TaContcat;
6
+import com.njyunzhi.servsummary.mapper.TaContcatMapper;
7
+import com.njyunzhi.servsummary.service.TaContcatService;
8
+ /**
9
+ * 联系人;(ta_contcat)表服务实现类
10
+ * @author : http://www.chiner.pro
11
+ * @date : 2022-11-22
12
+ */
13
+@Service
14
+public class TaContcatServiceImpl extends BaseServiceImpl<TaContcatMapper, TaContcat> implements TaContcatService {
15
+    
16
+}

+ 16
- 0
src/main/java/com/njyunzhi/servsummary/service/impl/TaEcsServiceImpl.java Bestand weergeven

@@ -0,0 +1,16 @@
1
+package com.njyunzhi.servsummary.service.impl;
2
+
3
+import org.springframework.beans.factory.annotation.Autowired;
4
+import org.springframework.stereotype.Service;
5
+import com.njyunzhi.servsummary.entity.TaEcs;
6
+import com.njyunzhi.servsummary.mapper.TaEcsMapper;
7
+import com.njyunzhi.servsummary.service.TaEcsService;
8
+ /**
9
+ * 服务器;(ta_ecs)表服务实现类
10
+ * @author : http://www.chiner.pro
11
+ * @date : 2022-11-22
12
+ */
13
+@Service
14
+public class TaEcsServiceImpl extends BaseServiceImpl<TaEcsMapper, TaEcs> implements TaEcsService {
15
+    
16
+}

+ 16
- 0
src/main/java/com/njyunzhi/servsummary/service/impl/TaOssBucketServiceImpl.java Bestand weergeven

@@ -0,0 +1,16 @@
1
+package com.njyunzhi.servsummary.service.impl;
2
+
3
+import org.springframework.beans.factory.annotation.Autowired;
4
+import org.springframework.stereotype.Service;
5
+import com.njyunzhi.servsummary.entity.TaOssBucket;
6
+import com.njyunzhi.servsummary.mapper.TaOssBucketMapper;
7
+import com.njyunzhi.servsummary.service.TaOssBucketService;
8
+ /**
9
+ * OSS Bucket;(ta_oss_bucket)表服务实现类
10
+ * @author : http://www.chiner.pro
11
+ * @date : 2022-11-22
12
+ */
13
+@Service
14
+public class TaOssBucketServiceImpl extends BaseServiceImpl<TaOssBucketMapper, TaOssBucket> implements TaOssBucketService {
15
+    
16
+}

+ 16
- 0
src/main/java/com/njyunzhi/servsummary/service/impl/TaPlatformServiceImpl.java Bestand weergeven

@@ -0,0 +1,16 @@
1
+package com.njyunzhi.servsummary.service.impl;
2
+
3
+import org.springframework.beans.factory.annotation.Autowired;
4
+import org.springframework.stereotype.Service;
5
+import com.njyunzhi.servsummary.entity.TaPlatform;
6
+import com.njyunzhi.servsummary.mapper.TaPlatformMapper;
7
+import com.njyunzhi.servsummary.service.TaPlatformService;
8
+ /**
9
+ * 云平台;(ta_platform)表服务实现类
10
+ * @author : http://www.chiner.pro
11
+ * @date : 2022-11-22
12
+ */
13
+@Service
14
+public class TaPlatformServiceImpl extends BaseServiceImpl<TaPlatformMapper, TaPlatform> implements TaPlatformService {
15
+    
16
+}

+ 16
- 0
src/main/java/com/njyunzhi/servsummary/service/impl/TaProjectServiceImpl.java Bestand weergeven

@@ -0,0 +1,16 @@
1
+package com.njyunzhi.servsummary.service.impl;
2
+
3
+import org.springframework.beans.factory.annotation.Autowired;
4
+import org.springframework.stereotype.Service;
5
+import com.njyunzhi.servsummary.entity.TaProject;
6
+import com.njyunzhi.servsummary.mapper.TaProjectMapper;
7
+import com.njyunzhi.servsummary.service.TaProjectService;
8
+ /**
9
+ * 项目表;(ta_project)表服务实现类
10
+ * @author : http://www.chiner.pro
11
+ * @date : 2022-11-22
12
+ */
13
+@Service
14
+public class TaProjectServiceImpl extends BaseServiceImpl<TaProjectMapper, TaProject> implements TaProjectService {
15
+    
16
+}

+ 16
- 0
src/main/java/com/njyunzhi/servsummary/service/impl/TaServiceServiceImpl.java Bestand weergeven

@@ -0,0 +1,16 @@
1
+package com.njyunzhi.servsummary.service.impl;
2
+
3
+import org.springframework.beans.factory.annotation.Autowired;
4
+import org.springframework.stereotype.Service;
5
+import com.njyunzhi.servsummary.entity.TaService;
6
+import com.njyunzhi.servsummary.mapper.TaServiceMapper;
7
+import com.njyunzhi.servsummary.service.TaServiceService;
8
+ /**
9
+ * 服务表;(ta_service)表服务实现类
10
+ * @author : http://www.chiner.pro
11
+ * @date : 2022-11-22
12
+ */
13
+@Service
14
+public class TaServiceServiceImpl extends BaseServiceImpl<TaServiceMapper, TaService> implements TaServiceService {
15
+    
16
+}

+ 16
- 0
src/main/java/com/njyunzhi/servsummary/service/impl/TaSslServiceImpl.java Bestand weergeven

@@ -0,0 +1,16 @@
1
+package com.njyunzhi.servsummary.service.impl;
2
+
3
+import org.springframework.beans.factory.annotation.Autowired;
4
+import org.springframework.stereotype.Service;
5
+import com.njyunzhi.servsummary.entity.TaSsl;
6
+import com.njyunzhi.servsummary.mapper.TaSslMapper;
7
+import com.njyunzhi.servsummary.service.TaSslService;
8
+ /**
9
+ * ssl域名;(ta_ssl)表服务实现类
10
+ * @author : http://www.chiner.pro
11
+ * @date : 2022-11-22
12
+ */
13
+@Service
14
+public class TaSslServiceImpl extends BaseServiceImpl<TaSslMapper, TaSsl> implements TaSslService {
15
+    
16
+}

+ 16
- 0
src/main/java/com/njyunzhi/servsummary/vo/LoginParm.java Bestand weergeven

@@ -0,0 +1,16 @@
1
+package com.njyunzhi.servsummary.vo;
2
+
3
+import io.swagger.annotations.ApiModel;
4
+import io.swagger.annotations.ApiModelProperty;
5
+import lombok.Data;
6
+
7
+@ApiModel(description = "登录参数")
8
+@Data
9
+public class LoginParm {
10
+
11
+    @ApiModelProperty("手机号")
12
+    String phone;
13
+
14
+    @ApiModelProperty("验证码")
15
+    String captcha;
16
+}

+ 6
- 0
src/main/resources/application-dev.yml Bestand weergeven

@@ -0,0 +1,6 @@
1
+
2
+spring:
3
+  datasource:
4
+    url: jdbc:mysql://rm-uf6z3z6jq11x653d77o.mysql.rds.aliyuncs.com:3306/serv-summary?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true
5
+    username: serv-summary
6
+    password: serv-summary@ABCD1234

+ 6
- 0
src/main/resources/application-prod.yml Bestand weergeven

@@ -0,0 +1,6 @@
1
+
2
+spring:
3
+  datasource:
4
+    url: jdbc:mysql://rm-uf6z3z6jq11x653d77o.mysql.rds.aliyuncs.com:3306/serv-summary?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&useSSL=false&allowPublicKeyRetrieval=true
5
+    username: serv-summary
6
+    password: serv-summary@ABCD1234

+ 54
- 0
src/main/resources/application.yml Bestand weergeven

@@ -0,0 +1,54 @@
1
+server:
2
+  port: 7085
3
+  servlet:
4
+    context-path: /api
5
+
6
+spring:
7
+  profiles:
8
+    active: @profileActive@
9
+
10
+###
11
+yz:
12
+  sms:
13
+    ## 系统名称
14
+    appid: serv-summary
15
+    api: http://sms.njyunzhi.com/sms
16
+    ## 帮助文档
17
+    help: http://sms.njyunzhi.com/help
18
+    ## 短信验证码
19
+    captcha:
20
+      code: SMS_207555188
21
+      sign: 云致科技
22
+  filter:
23
+    annList:
24
+      - "/swagger-ui/**"
25
+      - "/swagger-resources/**"
26
+      - "/v2/**"
27
+      - "/login"
28
+      - "/sms-captcha"
29
+###
30
+mybatis-plus:
31
+  configuration:
32
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
33
+    call-setters-on-nulls: true
34
+  mapper-locations: classpath:mapper/**/*.xml
35
+
36
+
37
+# Sa-Token配置
38
+sa-token:
39
+  # jwt秘钥
40
+  jwt-secret-key: eK2pLcWeT5pdPcooK6FzPGmPkJJPuSIV
41
+  # token名称 (同时也是cookie名称)
42
+  token-name: Authorization
43
+  # token有效期,单位s 默认30天, -1代表永不过期
44
+  timeout: 2592000
45
+  # token临时有效期 (指定时间内无操作就视为token过期) 单位: 秒
46
+  activity-timeout: -1
47
+  # 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录)
48
+  is-concurrent: true
49
+  # 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token)
50
+  is-share: false
51
+  # token风格
52
+  token-style: uuid
53
+  # 是否输出操作日志
54
+  is-log: false

+ 16
- 0
src/main/resources/mapper/SysSmsMapper.xml Bestand weergeven

@@ -0,0 +1,16 @@
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
+
4
+<mapper namespace="com.njyunzhi.servsummary.mapper.SysSmsMapper">
5
+
6
+    <select id="getByPhone" resultType="com.njyunzhi.servsummary.entity.SysSms">
7
+        SELECT
8
+            *
9
+        FROM
10
+            sys_sms t
11
+        WHERE
12
+            t.phone = #{phone}
13
+          AND t.CODE = #{code}
14
+          AND t.`status` &gt; -1
15
+    </select>
16
+</mapper>

+ 6
- 0
src/main/resources/mapper/SysUserMapper.xml Bestand weergeven

@@ -0,0 +1,6 @@
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
+
4
+<mapper namespace="com.njyunzhi.servsummary.mapper.SysUserMapper">
5
+    
6
+</mapper>

+ 6
- 0
src/main/resources/mapper/TaContcatMapper.xml Bestand weergeven

@@ -0,0 +1,6 @@
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
+
4
+<mapper namespace="com.njyunzhi.servsummary.mapper.TaContcatMapper">
5
+    
6
+</mapper>

+ 6
- 0
src/main/resources/mapper/TaEcsMapper.xml Bestand weergeven

@@ -0,0 +1,6 @@
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
+
4
+<mapper namespace="com.njyunzhi.servsummary.mapper.TaEcsMapper">
5
+    
6
+</mapper>

+ 6
- 0
src/main/resources/mapper/TaOssBucketMapper.xml Bestand weergeven

@@ -0,0 +1,6 @@
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
+
4
+<mapper namespace="com.njyunzhi.servsummary.mapper.TaOssBucketMapper">
5
+    
6
+</mapper>

+ 6
- 0
src/main/resources/mapper/TaPlatformMapper.xml Bestand weergeven

@@ -0,0 +1,6 @@
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
+
4
+<mapper namespace="com.njyunzhi.servsummary.mapper.TaPlatformMapper">
5
+    
6
+</mapper>

+ 6
- 0
src/main/resources/mapper/TaProjectMapper.xml Bestand weergeven

@@ -0,0 +1,6 @@
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
+
4
+<mapper namespace="com.njyunzhi.servsummary.mapper.TaProjectMapper">
5
+    
6
+</mapper>

+ 6
- 0
src/main/resources/mapper/TaServiceMapper.xml Bestand weergeven

@@ -0,0 +1,6 @@
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
+
4
+<mapper namespace="com.njyunzhi.servsummary.mapper.TaServiceMapper">
5
+    
6
+</mapper>

+ 6
- 0
src/main/resources/mapper/TaSslMapper.xml Bestand weergeven

@@ -0,0 +1,6 @@
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
+
4
+<mapper namespace="com.njyunzhi.servsummary.mapper.TaSslMapper">
5
+    
6
+</mapper>