diff --git a/spring-boot/.gitignore b/spring-boot/.gitignore deleted file mode 100644 index 549e00a2..00000000 --- a/spring-boot/.gitignore +++ /dev/null @@ -1,33 +0,0 @@ -HELP.md -target/ -!.mvn/wrapper/maven-wrapper.jar -!**/src/main/**/target/ -!**/src/test/**/target/ - -### STS ### -.apt_generated -.classpath -.factorypath -.project -.settings -.springBeans -.sts4-cache - -### IntelliJ IDEA ### -.idea -*.iws -*.iml -*.ipr - -### NetBeans ### -/nbproject/private/ -/nbbuild/ -/dist/ -/nbdist/ -/.nb-gradle/ -build/ -!**/src/main/**/build/ -!**/src/test/**/build/ - -### VS Code ### -.vscode/ diff --git a/spring-boot/.mvn/wrapper/MavenWrapperDownloader.java b/spring-boot/.mvn/wrapper/MavenWrapperDownloader.java deleted file mode 100644 index e76d1f32..00000000 --- a/spring-boot/.mvn/wrapper/MavenWrapperDownloader.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright 2007-present the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import java.net.*; -import java.io.*; -import java.nio.channels.*; -import java.util.Properties; - -public class MavenWrapperDownloader { - - private static final String WRAPPER_VERSION = "0.5.6"; - /** - * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. - */ - private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" - + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; - - /** - * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to - * use instead of the default one. - */ - private static final String MAVEN_WRAPPER_PROPERTIES_PATH = - ".mvn/wrapper/maven-wrapper.properties"; - - /** - * Path where the maven-wrapper.jar will be saved to. - */ - private static final String MAVEN_WRAPPER_JAR_PATH = - ".mvn/wrapper/maven-wrapper.jar"; - - /** - * Name of the property which should be used to override the default download url for the wrapper. - */ - private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; - - public static void main(String args[]) { - System.out.println("- Downloader started"); - File baseDirectory = new File(args[0]); - System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); - - // If the maven-wrapper.properties exists, read it and check if it contains a custom - // wrapperUrl parameter. - File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); - String url = DEFAULT_DOWNLOAD_URL; - if(mavenWrapperPropertyFile.exists()) { - FileInputStream mavenWrapperPropertyFileInputStream = null; - try { - mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); - Properties mavenWrapperProperties = new Properties(); - mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); - url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); - } catch (IOException e) { - System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); - } finally { - try { - if(mavenWrapperPropertyFileInputStream != null) { - mavenWrapperPropertyFileInputStream.close(); - } - } catch (IOException e) { - // Ignore ... - } - } - } - System.out.println("- Downloading from: " + url); - - File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); - if(!outputFile.getParentFile().exists()) { - if(!outputFile.getParentFile().mkdirs()) { - System.out.println( - "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); - } - } - System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); - try { - downloadFileFromURL(url, outputFile); - System.out.println("Done"); - System.exit(0); - } catch (Throwable e) { - System.out.println("- Error downloading"); - e.printStackTrace(); - System.exit(1); - } - } - - private static void downloadFileFromURL(String urlString, File destination) throws Exception { - if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { - String username = System.getenv("MVNW_USERNAME"); - char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); - Authenticator.setDefault(new Authenticator() { - @Override - protected PasswordAuthentication getPasswordAuthentication() { - return new PasswordAuthentication(username, password); - } - }); - } - URL website = new URL(urlString); - ReadableByteChannel rbc; - rbc = Channels.newChannel(website.openStream()); - FileOutputStream fos = new FileOutputStream(destination); - fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); - fos.close(); - rbc.close(); - } - -} diff --git a/spring-boot/.mvn/wrapper/maven-wrapper.jar b/spring-boot/.mvn/wrapper/maven-wrapper.jar deleted file mode 100644 index 2cc7d4a5..00000000 Binary files a/spring-boot/.mvn/wrapper/maven-wrapper.jar and /dev/null differ diff --git a/spring-boot/.mvn/wrapper/maven-wrapper.properties b/spring-boot/.mvn/wrapper/maven-wrapper.properties deleted file mode 100644 index abd303b6..00000000 --- a/spring-boot/.mvn/wrapper/maven-wrapper.properties +++ /dev/null @@ -1,2 +0,0 @@ -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.2/apache-maven-3.8.2-bin.zip -wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar diff --git a/spring-boot/LICENSE b/spring-boot/LICENSE deleted file mode 100644 index 8564f294..00000000 --- a/spring-boot/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2018 RuoYi - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/spring-boot/README.md b/spring-boot/README.md deleted file mode 100644 index 2b5d9866..00000000 --- a/spring-boot/README.md +++ /dev/null @@ -1,32 +0,0 @@ -## 平台简介 - -若依是一套全部开源的快速开发平台,毫无保留给个人及企业免费使用。 - -* 前端采用Vue、Element UI。 -* 后端采用Spring Boot、Spring Security、Redis & Jwt。 -* 权限认证使用Jwt,支持多终端认证系统。 -* 支持加载动态权限菜单,多方式轻松权限控制。 -* 高效率开发,使用代码生成器可以一键生成前后端代码。 - -## 内置功能 - -1. 用户管理:用户是系统操作者,该功能主要完成系统用户配置。 -2. 部门管理:配置系统组织机构(公司、部门、小组),树结构展现支持数据权限。 -3. 岗位管理:配置系统用户所属担任职务。 -4. 菜单管理:配置系统菜单,操作权限,按钮权限标识等。 -5. 角色管理:角色菜单权限分配、设置角色按机构进行数据范围权限划分。 -6. 字典管理:对系统中经常使用的一些较为固定的数据进行维护。 -7. 参数管理:对系统动态配置常用参数。 -8. 通知公告:系统通知公告信息发布维护。 -9. 操作日志:系统正常操作日志记录和查询;系统异常信息日志记录和查询。 -10. 登录日志:系统登录日志记录查询包含登录异常。 -11. 在线用户:当前系统中活跃用户状态监控。 -12. 定时任务:在线(添加、修改、删除)任务调度包含执行结果日志。 -13. 代码生成:前后端代码的生成(java、html、xml、sql)支持CRUD下载 。 -14. 系统接口:根据业务代码自动生成相关的api接口文档。 -15. 服务监控:监视当前系统CPU、内存、磁盘、堆栈等相关信息。 -16. 缓存监控:对系统的缓存信息查询,命令统计等。 -17. 在线构建器:拖动表单元素生成相应的HTML代码。 -18. 连接池监视:监视当前系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈。 - - diff --git a/spring-boot/bin/clean.bat b/spring-boot/bin/clean.bat deleted file mode 100644 index 5c2a3b2b..00000000 --- a/spring-boot/bin/clean.bat +++ /dev/null @@ -1,12 +0,0 @@ -@echo off -echo. -echo [Ϣ] · -echo. - -%~d0 -cd %~dp0 - -cd .. -call mvn clean - -pause \ No newline at end of file diff --git a/spring-boot/bin/package.bat b/spring-boot/bin/package.bat deleted file mode 100644 index c693ec06..00000000 --- a/spring-boot/bin/package.bat +++ /dev/null @@ -1,12 +0,0 @@ -@echo off -echo. -echo [Ϣ] Weḅwar/jarļ -echo. - -%~d0 -cd %~dp0 - -cd .. -call mvn clean package -Dmaven.test.skip=true - -pause \ No newline at end of file diff --git a/spring-boot/bin/run.bat b/spring-boot/bin/run.bat deleted file mode 100644 index 90073a82..00000000 --- a/spring-boot/bin/run.bat +++ /dev/null @@ -1,14 +0,0 @@ -@echo off -echo. -echo [Ϣ] Web̡ -echo. - -cd %~dp0 -cd ../ruoyi-admin/target - -set JAVA_OPTS=-Xms256m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m - -java -jar %JAVA_OPTS% ruoyi-admin.jar - -cd bin -pause \ No newline at end of file diff --git a/spring-boot/doc/基于ruoyi-vue-v3.4.0.txt b/spring-boot/doc/基于ruoyi-vue-v3.4.0.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/spring-boot/doc/若依环境使用手册.docx b/spring-boot/doc/若依环境使用手册.docx deleted file mode 100644 index 9e4daef4..00000000 Binary files a/spring-boot/doc/若依环境使用手册.docx and /dev/null differ diff --git a/spring-boot/mvnw b/spring-boot/mvnw deleted file mode 100644 index a16b5431..00000000 --- a/spring-boot/mvnw +++ /dev/null @@ -1,310 +0,0 @@ -#!/bin/sh -# ---------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# ---------------------------------------------------------------------------- - -# ---------------------------------------------------------------------------- -# Maven Start Up Batch script -# -# Required ENV vars: -# ------------------ -# JAVA_HOME - location of a JDK home dir -# -# Optional ENV vars -# ----------------- -# M2_HOME - location of maven2's installed home dir -# MAVEN_OPTS - parameters passed to the Java VM when running Maven -# e.g. to debug Maven itself, use -# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -# MAVEN_SKIP_RC - flag to disable loading of mavenrc files -# ---------------------------------------------------------------------------- - -if [ -z "$MAVEN_SKIP_RC" ] ; then - - if [ -f /etc/mavenrc ] ; then - . /etc/mavenrc - fi - - if [ -f "$HOME/.mavenrc" ] ; then - . "$HOME/.mavenrc" - fi - -fi - -# OS specific support. $var _must_ be set to either true or false. -cygwin=false; -darwin=false; -mingw=false -case "`uname`" in - CYGWIN*) cygwin=true ;; - MINGW*) mingw=true;; - Darwin*) darwin=true - # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home - # See https://developer.apple.com/library/mac/qa/qa1170/_index.html - if [ -z "$JAVA_HOME" ]; then - if [ -x "/usr/libexec/java_home" ]; then - export JAVA_HOME="`/usr/libexec/java_home`" - else - export JAVA_HOME="/Library/Java/Home" - fi - fi - ;; -esac - -if [ -z "$JAVA_HOME" ] ; then - if [ -r /etc/gentoo-release ] ; then - JAVA_HOME=`java-config --jre-home` - fi -fi - -if [ -z "$M2_HOME" ] ; then - ## resolve links - $0 may be a link to maven's home - PRG="$0" - - # need this for relative symlinks - while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG="`dirname "$PRG"`/$link" - fi - done - - saveddir=`pwd` - - M2_HOME=`dirname "$PRG"`/.. - - # make it fully qualified - M2_HOME=`cd "$M2_HOME" && pwd` - - cd "$saveddir" - # echo Using m2 at $M2_HOME -fi - -# For Cygwin, ensure paths are in UNIX format before anything is touched -if $cygwin ; then - [ -n "$M2_HOME" ] && - M2_HOME=`cygpath --unix "$M2_HOME"` - [ -n "$JAVA_HOME" ] && - JAVA_HOME=`cygpath --unix "$JAVA_HOME"` - [ -n "$CLASSPATH" ] && - CLASSPATH=`cygpath --path --unix "$CLASSPATH"` -fi - -# For Mingw, ensure paths are in UNIX format before anything is touched -if $mingw ; then - [ -n "$M2_HOME" ] && - M2_HOME="`(cd "$M2_HOME"; pwd)`" - [ -n "$JAVA_HOME" ] && - JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" -fi - -if [ -z "$JAVA_HOME" ]; then - javaExecutable="`which javac`" - if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then - # readlink(1) is not available as standard on Solaris 10. - readLink=`which readlink` - if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then - if $darwin ; then - javaHome="`dirname \"$javaExecutable\"`" - javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" - else - javaExecutable="`readlink -f \"$javaExecutable\"`" - fi - javaHome="`dirname \"$javaExecutable\"`" - javaHome=`expr "$javaHome" : '\(.*\)/bin'` - JAVA_HOME="$javaHome" - export JAVA_HOME - fi - fi -fi - -if [ -z "$JAVACMD" ] ; then - if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - else - JAVACMD="`which java`" - fi -fi - -if [ ! -x "$JAVACMD" ] ; then - echo "Error: JAVA_HOME is not defined correctly." >&2 - echo " We cannot execute $JAVACMD" >&2 - exit 1 -fi - -if [ -z "$JAVA_HOME" ] ; then - echo "Warning: JAVA_HOME environment variable is not set." -fi - -CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher - -# traverses directory structure from process work directory to filesystem root -# first directory with .mvn subdirectory is considered project base directory -find_maven_basedir() { - - if [ -z "$1" ] - then - echo "Path not specified to find_maven_basedir" - return 1 - fi - - basedir="$1" - wdir="$1" - while [ "$wdir" != '/' ] ; do - if [ -d "$wdir"/.mvn ] ; then - basedir=$wdir - break - fi - # workaround for JBEAP-8937 (on Solaris 10/Sparc) - if [ -d "${wdir}" ]; then - wdir=`cd "$wdir/.."; pwd` - fi - # end of workaround - done - echo "${basedir}" -} - -# concatenates all lines of a file -concat_lines() { - if [ -f "$1" ]; then - echo "$(tr -s '\n' ' ' < "$1")" - fi -} - -BASE_DIR=`find_maven_basedir "$(pwd)"` -if [ -z "$BASE_DIR" ]; then - exit 1; -fi - -########################################################################################## -# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central -# This allows using the maven wrapper in projects that prohibit checking in binary data. -########################################################################################## -if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then - if [ "$MVNW_VERBOSE" = true ]; then - echo "Found .mvn/wrapper/maven-wrapper.jar" - fi -else - if [ "$MVNW_VERBOSE" = true ]; then - echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." - fi - if [ -n "$MVNW_REPOURL" ]; then - jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" - else - jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" - fi - while IFS="=" read key value; do - case "$key" in (wrapperUrl) jarUrl="$value"; break ;; - esac - done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" - if [ "$MVNW_VERBOSE" = true ]; then - echo "Downloading from: $jarUrl" - fi - wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" - if $cygwin; then - wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` - fi - - if command -v wget > /dev/null; then - if [ "$MVNW_VERBOSE" = true ]; then - echo "Found wget ... using wget" - fi - if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - wget "$jarUrl" -O "$wrapperJarPath" - else - wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" - fi - elif command -v curl > /dev/null; then - if [ "$MVNW_VERBOSE" = true ]; then - echo "Found curl ... using curl" - fi - if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - curl -o "$wrapperJarPath" "$jarUrl" -f - else - curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f - fi - - else - if [ "$MVNW_VERBOSE" = true ]; then - echo "Falling back to using Java to download" - fi - javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" - # For Cygwin, switch paths to Windows format before running javac - if $cygwin; then - javaClass=`cygpath --path --windows "$javaClass"` - fi - if [ -e "$javaClass" ]; then - if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then - if [ "$MVNW_VERBOSE" = true ]; then - echo " - Compiling MavenWrapperDownloader.java ..." - fi - # Compiling the Java class - ("$JAVA_HOME/bin/javac" "$javaClass") - fi - if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then - # Running the downloader - if [ "$MVNW_VERBOSE" = true ]; then - echo " - Running MavenWrapperDownloader.java ..." - fi - ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") - fi - fi - fi -fi -########################################################################################## -# End of extension -########################################################################################## - -export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} -if [ "$MVNW_VERBOSE" = true ]; then - echo $MAVEN_PROJECTBASEDIR -fi -MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" - -# For Cygwin, switch paths to Windows format before running java -if $cygwin; then - [ -n "$M2_HOME" ] && - M2_HOME=`cygpath --path --windows "$M2_HOME"` - [ -n "$JAVA_HOME" ] && - JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` - [ -n "$CLASSPATH" ] && - CLASSPATH=`cygpath --path --windows "$CLASSPATH"` - [ -n "$MAVEN_PROJECTBASEDIR" ] && - MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` -fi - -# Provide a "standardized" way to retrieve the CLI args that will -# work with both Windows and non-Windows executions. -MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" -export MAVEN_CMD_LINE_ARGS - -WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain - -exec "$JAVACMD" \ - $MAVEN_OPTS \ - -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ - "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ - ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/spring-boot/mvnw.cmd b/spring-boot/mvnw.cmd deleted file mode 100644 index c8d43372..00000000 --- a/spring-boot/mvnw.cmd +++ /dev/null @@ -1,182 +0,0 @@ -@REM ---------------------------------------------------------------------------- -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM https://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. -@REM ---------------------------------------------------------------------------- - -@REM ---------------------------------------------------------------------------- -@REM Maven Start Up Batch script -@REM -@REM Required ENV vars: -@REM JAVA_HOME - location of a JDK home dir -@REM -@REM Optional ENV vars -@REM M2_HOME - location of maven2's installed home dir -@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands -@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending -@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven -@REM e.g. to debug Maven itself, use -@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files -@REM ---------------------------------------------------------------------------- - -@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' -@echo off -@REM set title of command window -title %0 -@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' -@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% - -@REM set %HOME% to equivalent of $HOME -if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") - -@REM Execute a user defined script before this one -if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre -@REM check for pre script, once with legacy .bat ending and once with .cmd ending -if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" -if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" -:skipRcPre - -@setlocal - -set ERROR_CODE=0 - -@REM To isolate internal variables from possible post scripts, we use another setlocal -@setlocal - -@REM ==== START VALIDATION ==== -if not "%JAVA_HOME%" == "" goto OkJHome - -echo. -echo Error: JAVA_HOME not found in your environment. >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -:OkJHome -if exist "%JAVA_HOME%\bin\java.exe" goto init - -echo. -echo Error: JAVA_HOME is set to an invalid directory. >&2 -echo JAVA_HOME = "%JAVA_HOME%" >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -@REM ==== END VALIDATION ==== - -:init - -@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". -@REM Fallback to current working directory if not found. - -set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% -IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir - -set EXEC_DIR=%CD% -set WDIR=%EXEC_DIR% -:findBaseDir -IF EXIST "%WDIR%"\.mvn goto baseDirFound -cd .. -IF "%WDIR%"=="%CD%" goto baseDirNotFound -set WDIR=%CD% -goto findBaseDir - -:baseDirFound -set MAVEN_PROJECTBASEDIR=%WDIR% -cd "%EXEC_DIR%" -goto endDetectBaseDir - -:baseDirNotFound -set MAVEN_PROJECTBASEDIR=%EXEC_DIR% -cd "%EXEC_DIR%" - -:endDetectBaseDir - -IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig - -@setlocal EnableExtensions EnableDelayedExpansion -for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a -@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% - -:endReadAdditionalConfig - -SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" -set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" -set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain - -set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" - -FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( - IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B -) - -@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central -@REM This allows using the maven wrapper in projects that prohibit checking in binary data. -if exist %WRAPPER_JAR% ( - if "%MVNW_VERBOSE%" == "true" ( - echo Found %WRAPPER_JAR% - ) -) else ( - if not "%MVNW_REPOURL%" == "" ( - SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" - ) - if "%MVNW_VERBOSE%" == "true" ( - echo Couldn't find %WRAPPER_JAR%, downloading it ... - echo Downloading from: %DOWNLOAD_URL% - ) - - powershell -Command "&{"^ - "$webclient = new-object System.Net.WebClient;"^ - "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ - "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ - "}"^ - "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ - "}" - if "%MVNW_VERBOSE%" == "true" ( - echo Finished downloading %WRAPPER_JAR% - ) -) -@REM End of extension - -@REM Provide a "standardized" way to retrieve the CLI args that will -@REM work with both Windows and non-Windows executions. -set MAVEN_CMD_LINE_ARGS=%* - -%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* -if ERRORLEVEL 1 goto error -goto end - -:error -set ERROR_CODE=1 - -:end -@endlocal & set ERROR_CODE=%ERROR_CODE% - -if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost -@REM check for post script, once with legacy .bat ending and once with .cmd ending -if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" -if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" -:skipRcPost - -@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' -if "%MAVEN_BATCH_PAUSE%" == "on" pause - -if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% - -exit /B %ERROR_CODE% diff --git a/spring-boot/pom.xml b/spring-boot/pom.xml deleted file mode 100644 index a3bacd0b..00000000 --- a/spring-boot/pom.xml +++ /dev/null @@ -1,261 +0,0 @@ - - - 4.0.0 - - com.ruoyi - ruoyi - 3.4.0 - - - ruoyi - http://www.ruoyi.vip - 若依管理系统 - - - 3.4.0 - UTF-8 - UTF-8 - 1.8 - 3.1.1 - 1.2.4 - 1.21 - 2.9.2 - 2.3.2 - 1.3.0 - 1.2.75 - 5.3.6 - 5.6.0 - 2.5 - 1.3.3 - 4.1.2 - 1.7 - 0.9.1 - - - - - - - - - org.springframework.boot - spring-boot-dependencies - 2.2.13.RELEASE - pom - import - - - - - com.alibaba - druid-spring-boot-starter - ${druid.version} - - - - - eu.bitwalker - UserAgentUtils - ${bitwalker.version} - - - - - com.github.pagehelper - pagehelper-spring-boot-starter - ${pagehelper.boot.version} - - - - - com.github.oshi - oshi-core - ${oshi.version} - - - - net.java.dev.jna - jna - ${jna.version} - - - - net.java.dev.jna - jna-platform - ${jna.version} - - - - - io.springfox - springfox-swagger2 - ${swagger.version} - - - io.swagger - swagger-annotations - - - io.swagger - swagger-models - - - - - - - io.springfox - springfox-swagger-ui - ${swagger.version} - - - - - commons-io - commons-io - ${commons.io.version} - - - - - commons-fileupload - commons-fileupload - ${commons.fileupload.version} - - - - - org.apache.poi - poi-ooxml - ${poi.version} - - - - - org.apache.velocity - velocity - ${velocity.version} - - - - - com.alibaba - fastjson - ${fastjson.version} - - - - - io.jsonwebtoken - jjwt - ${jwt.version} - - - - - com.github.penggle - kaptcha - ${kaptcha.version} - - - - - com.ruoyi - ruoyi-quartz - ${ruoyi.version} - - - - - com.ruoyi - ruoyi-generator - ${ruoyi.version} - - - - - com.ruoyi - ruoyi-framework - ${ruoyi.version} - - - - - com.ruoyi - ruoyi-system - ${ruoyi.version} - - - - - com.ruoyi - ruoyi-common - ${ruoyi.version} - - - - com.zaxxer - HikariCP - 3.2.0 - - - - - - ruoyi-admin - ruoyi-framework - ruoyi-system - ruoyi-quartz - ruoyi-generator - ruoyi-common - - pom - - - - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.1 - - ${java.version} - ${java.version} - ${project.build.sourceEncoding} - - - - - - - - public - aliyun nexus - http://maven.aliyun.com/nexus/content/groups/public/ - - true - - - - - - - public - aliyun nexus - http://maven.aliyun.com/nexus/content/groups/public/ - - true - - - false - - - - - \ No newline at end of file diff --git a/spring-boot/ruoyi-admin/pom.xml b/spring-boot/ruoyi-admin/pom.xml deleted file mode 100644 index bde32892..00000000 --- a/spring-boot/ruoyi-admin/pom.xml +++ /dev/null @@ -1,120 +0,0 @@ - - - - ruoyi - com.ruoyi - 3.4.0 - - 4.0.0 - - jar - ruoyi-admin - - - web服务入口 - - - - - - - org.springframework.boot - spring-boot-devtools - true - - - - - io.springfox - springfox-swagger2 - - - - - io.swagger - swagger-annotations - 1.5.21 - - - - io.swagger - swagger-models - 1.5.21 - - - - - io.springfox - springfox-swagger-ui - - - - - mysql - mysql-connector-java - - - - - com.ruoyi - ruoyi-framework - - - - - com.ruoyi - ruoyi-quartz - - - - - com.ruoyi - ruoyi-generator - - - com.zaxxer - HikariCP - 4.0.3 - - - com.zaxxer - HikariCP - 4.0.3 - - - - - - - - - org.springframework.boot - spring-boot-maven-plugin - 2.1.1.RELEASE - - true - - - - - repackage - - - - - - org.apache.maven.plugins - maven-war-plugin - 3.1.0 - - false - ${project.artifactId} - - - - ${project.artifactId} - - - \ No newline at end of file diff --git a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java b/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java deleted file mode 100644 index 8498b9fa..00000000 --- a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.ruoyi; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; - -/** - * 启动程序 - * - * @author ruoyi - */ -@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) -public class RuoYiApplication { - public static void main(String[] args) { - // System.setProperty("spring.devtools.restart.enabled", "false"); - SpringApplication.run(RuoYiApplication.class, args); - System.out.println("(♥◠‿◠)ノ゙ 若依启动成功 ლ(´ڡ`ლ)゙ \n" + - " .-------. ____ __ \n" + - " | _ _ \\ \\ \\ / / \n" + - " | ( ' ) | \\ _. / ' \n" + - " |(_ o _) / _( )_ .' \n" + - " | (_,_).' __ ___(_ o _)' \n" + - " | |\\ \\ | || |(_,_)' \n" + - " | | \\ `' /| `-' / \n" + - " | | \\ / \\ / \n" + - " ''-' `'-' `-..-' "); - } -} diff --git a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/RuoYiServletInitializer.java b/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/RuoYiServletInitializer.java deleted file mode 100644 index 70cb1b36..00000000 --- a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/RuoYiServletInitializer.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.ruoyi; - -import org.springframework.boot.builder.SpringApplicationBuilder; -import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; - -/** - * web容器中进行部署 - * - * @author ruoyi - */ -public class RuoYiServletInitializer extends SpringBootServletInitializer { - @Override - protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { - return application.sources(RuoYiApplication.class); - } -} diff --git a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CaptchaController.java b/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CaptchaController.java deleted file mode 100644 index c45e9daa..00000000 --- a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CaptchaController.java +++ /dev/null @@ -1,79 +0,0 @@ -package com.ruoyi.web.controller.common; - -import java.awt.image.BufferedImage; -import java.io.IOException; -import java.util.concurrent.TimeUnit; -import javax.annotation.Resource; -import javax.imageio.ImageIO; -import javax.servlet.http.HttpServletResponse; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.util.FastByteArrayOutputStream; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RestController; -import com.google.code.kaptcha.Producer; -import com.ruoyi.common.constant.Constants; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.core.redis.RedisCache; -import com.ruoyi.common.utils.sign.Base64; -import com.ruoyi.common.utils.uuid.IdUtils; - -/** - * 验证码操作处理 - * - * @author ruoyi - */ -@RestController -public class CaptchaController { - @Resource(name = "captchaProducer") - private Producer captchaProducer; - - @Resource(name = "captchaProducerMath") - private Producer captchaProducerMath; - - @Autowired - private RedisCache redisCache; - - // 验证码类型 - @Value("${ruoyi.captchaType}") - private String captchaType; - - /** - * 生成验证码 - */ - @GetMapping("/captchaImage") - public AjaxResult getCode(HttpServletResponse response) throws IOException { - // 保存验证码信息 - String uuid = IdUtils.simpleUUID(); - String verifyKey = Constants.CAPTCHA_CODE_KEY + uuid; - - String capStr = null, code = null; - BufferedImage image = null; - - // 生成验证码 - if ("math".equals(captchaType)) { - String capText = captchaProducerMath.createText(); - capStr = capText.substring(0, capText.lastIndexOf("@")); - code = capText.substring(capText.lastIndexOf("@") + 1); - image = captchaProducerMath.createImage(capStr); - } else if ("char".equals(captchaType)) { - capStr = code = captchaProducer.createText(); - image = captchaProducer.createImage(capStr); - } - - redisCache.setCacheObject(verifyKey, code, Constants.CAPTCHA_EXPIRATION, TimeUnit.MINUTES); - // 转换流信息写出 - FastByteArrayOutputStream os = new FastByteArrayOutputStream(); - try { - ImageIO.write(image, "jpg", os); - } catch (IOException e) { - return AjaxResult.error(e.getMessage()); - } - - AjaxResult ajax = AjaxResult.success(); - ajax.put("uuid", uuid); - ajax.put("img", Base64.encode(os.toByteArray())); - return ajax; - } -} diff --git a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java b/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java deleted file mode 100644 index a6188d6b..00000000 --- a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java +++ /dev/null @@ -1,103 +0,0 @@ -package com.ruoyi.web.controller.common; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.MediaType; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.multipart.MultipartFile; -import com.ruoyi.common.config.RuoYiConfig; -import com.ruoyi.common.constant.Constants; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.common.utils.file.FileUploadUtils; -import com.ruoyi.common.utils.file.FileUtils; -import com.ruoyi.framework.config.ServerConfig; - -/** - * 通用请求处理 - * - * @author ruoyi - */ -@RestController -public class CommonController { - private static final Logger log = LoggerFactory.getLogger(CommonController.class); - - @Autowired - private ServerConfig serverConfig; - - /** - * 通用下载请求 - * - * @param fileName 文件名称 - * @param delete 是否删除 - */ - @GetMapping("common/download") - public void fileDownload(String fileName, Boolean delete, HttpServletResponse response, HttpServletRequest request) { - try { - if (!FileUtils.checkAllowDownload(fileName)) { - throw new Exception(StringUtils.format("文件名称({})非法,不允许下载。 ", fileName)); - } - String realFileName = System.currentTimeMillis() + fileName.substring(fileName.indexOf("_") + 1); - String filePath = RuoYiConfig.getDownloadPath() + fileName; - - response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE); - FileUtils.setAttachmentResponseHeader(response, realFileName); - FileUtils.writeBytes(filePath, response.getOutputStream()); - if (delete) { - FileUtils.deleteFile(filePath); - } - } catch (Exception e) { - log.error("下载文件失败", e); - } - } - - /** - * 通用上传请求 - */ - @PostMapping("/common/upload") - public AjaxResult uploadFile(MultipartFile file) throws Exception { - try { - // 上传文件路径 - String filePath = RuoYiConfig.getUploadPath(); - // 上传并返回新文件名称 - String fileName = FileUploadUtils.upload(filePath, file); - String url = serverConfig.getUrl() + fileName; - AjaxResult ajax = AjaxResult.success(); - ajax.put("fileName", fileName); - ajax.put("url", url); - return ajax; - } catch (Exception e) { - return AjaxResult.error(e.getMessage()); - } - } - - /** - * 本地资源通用下载 - */ - @GetMapping("/common/download/resource") - public void resourceDownload(String resource, HttpServletRequest request, HttpServletResponse response) - throws Exception { - try { - if (!FileUtils.checkAllowDownload(resource)) { - throw new Exception(StringUtils.format("资源文件({})非法,不允许下载。 ", resource)); - } - // 本地资源路径 - String localPath = RuoYiConfig.getProfile(); - // 数据库资源地址 - String downloadPath = localPath + StringUtils.substringAfter(resource, Constants.RESOURCE_PREFIX); - // 下载名称 - String downloadName = StringUtils.substringAfterLast(downloadPath, "/"); - response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE); - FileUtils.setAttachmentResponseHeader(response, downloadName); - FileUtils.writeBytes(downloadPath, response.getOutputStream()); - } catch (Exception e) { - log.error("下载文件失败", e); - } - } -} diff --git a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/CacheController.java b/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/CacheController.java deleted file mode 100644 index 6add5519..00000000 --- a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/CacheController.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.ruoyi.web.controller.monitor; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Properties; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.data.redis.core.RedisCallback; -import org.springframework.data.redis.core.RedisTemplate; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.utils.StringUtils; - -/** - * 缓存监控 - * - * @author ruoyi - */ -@RestController -@RequestMapping("/monitor/cache") -public class CacheController { - @Autowired - private RedisTemplate redisTemplate; - - @PreAuthorize("@ss.hasPermi('monitor:cache:list')") - @GetMapping() - public AjaxResult getInfo() throws Exception { - Properties info = (Properties) redisTemplate.execute((RedisCallback) connection -> connection.info()); - Properties commandStats = (Properties) redisTemplate.execute((RedisCallback) connection -> connection.info("commandstats")); - Object dbSize = redisTemplate.execute((RedisCallback) connection -> connection.dbSize()); - - Map result = new HashMap<>(3); - result.put("info", info); - result.put("dbSize", dbSize); - - List> pieList = new ArrayList<>(); - commandStats.stringPropertyNames().forEach(key -> { - Map data = new HashMap<>(2); - String property = commandStats.getProperty(key); - data.put("name", StringUtils.removeStart(key, "cmdstat_")); - data.put("value", StringUtils.substringBetween(property, "calls=", ",usec")); - pieList.add(data); - }); - result.put("commandStats", pieList); - return AjaxResult.success(result); - } -} diff --git a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/ServerController.java b/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/ServerController.java deleted file mode 100644 index 63da0b83..00000000 --- a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/ServerController.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.ruoyi.web.controller.monitor; - -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.framework.web.domain.Server; - -/** - * 服务器监控 - * - * @author ruoyi - */ -@RestController -@RequestMapping("/monitor/server") -public class ServerController { - @PreAuthorize("@ss.hasPermi('monitor:server:list')") - @GetMapping() - public AjaxResult getInfo() throws Exception { - Server server = new Server(); - server.copyTo(); - return AjaxResult.success(server); - } -} diff --git a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysLogininforController.java b/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysLogininforController.java deleted file mode 100644 index 9db3e65c..00000000 --- a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysLogininforController.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.ruoyi.web.controller.monitor; - -import java.util.List; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.core.page.TableDataInfo; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.system.domain.SysLogininfor; -import com.ruoyi.system.service.ISysLogininforService; - -/** - * 系统访问记录 - * - * @author ruoyi - */ -@RestController -@RequestMapping("/monitor/logininfor") -public class SysLogininforController extends BaseController { - @Autowired - private ISysLogininforService logininforService; - - @PreAuthorize("@ss.hasPermi('monitor:logininfor:list')") - @GetMapping("/list") - public TableDataInfo list(SysLogininfor logininfor) { - startPage(); - List list = logininforService.selectLogininforList(logininfor); - return getDataTable(list); - } - - @Log(title = "登录日志", businessType = BusinessType.EXPORT) - @PreAuthorize("@ss.hasPermi('monitor:logininfor:export')") - @GetMapping("/export") - public AjaxResult export(SysLogininfor logininfor) { - List list = logininforService.selectLogininforList(logininfor); - ExcelUtil util = new ExcelUtil(SysLogininfor.class); - return util.exportExcel(list, "登录日志"); - } - - @PreAuthorize("@ss.hasPermi('monitor:logininfor:remove')") - @Log(title = "登录日志", businessType = BusinessType.DELETE) - @DeleteMapping("/{infoIds}") - public AjaxResult remove(@PathVariable Long[] infoIds) { - return toAjax(logininforService.deleteLogininforByIds(infoIds)); - } - - @PreAuthorize("@ss.hasPermi('monitor:logininfor:remove')") - @Log(title = "登录日志", businessType = BusinessType.CLEAN) - @DeleteMapping("/clean") - public AjaxResult clean() { - logininforService.cleanLogininfor(); - return AjaxResult.success(); - } -} diff --git a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysOperlogController.java b/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysOperlogController.java deleted file mode 100644 index d9ed0d6b..00000000 --- a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysOperlogController.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.ruoyi.web.controller.monitor; - -import java.util.List; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.core.page.TableDataInfo; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.system.domain.SysOperLog; -import com.ruoyi.system.service.ISysOperLogService; - -/** - * 操作日志记录 - * - * @author ruoyi - */ -@RestController -@RequestMapping("/monitor/operlog") -public class SysOperlogController extends BaseController { - @Autowired - private ISysOperLogService operLogService; - - @PreAuthorize("@ss.hasPermi('monitor:operlog:list')") - @GetMapping("/list") - public TableDataInfo list(SysOperLog operLog) { - startPage(); - List list = operLogService.selectOperLogList(operLog); - return getDataTable(list); - } - - @Log(title = "操作日志", businessType = BusinessType.EXPORT) - @PreAuthorize("@ss.hasPermi('monitor:operlog:export')") - @GetMapping("/export") - public AjaxResult export(SysOperLog operLog) { - List list = operLogService.selectOperLogList(operLog); - ExcelUtil util = new ExcelUtil(SysOperLog.class); - return util.exportExcel(list, "操作日志"); - } - - @PreAuthorize("@ss.hasPermi('monitor:operlog:remove')") - @DeleteMapping("/{operIds}") - public AjaxResult remove(@PathVariable Long[] operIds) { - return toAjax(operLogService.deleteOperLogByIds(operIds)); - } - - @Log(title = "操作日志", businessType = BusinessType.CLEAN) - @PreAuthorize("@ss.hasPermi('monitor:operlog:remove')") - @DeleteMapping("/clean") - public AjaxResult clean() { - operLogService.cleanOperLog(); - return AjaxResult.success(); - } -} diff --git a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysUserOnlineController.java b/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysUserOnlineController.java deleted file mode 100644 index 6bab7a1e..00000000 --- a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/monitor/SysUserOnlineController.java +++ /dev/null @@ -1,79 +0,0 @@ -package com.ruoyi.web.controller.monitor; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.List; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.constant.Constants; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.core.domain.model.LoginUser; -import com.ruoyi.common.core.page.TableDataInfo; -import com.ruoyi.common.core.redis.RedisCache; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.system.domain.SysUserOnline; -import com.ruoyi.system.service.ISysUserOnlineService; - -/** - * 在线用户监控 - * - * @author ruoyi - */ -@RestController -@RequestMapping("/monitor/online") -public class SysUserOnlineController extends BaseController { - @Autowired - private ISysUserOnlineService userOnlineService; - - @Autowired - private RedisCache redisCache; - - @PreAuthorize("@ss.hasPermi('monitor:online:list')") - @GetMapping("/list") - public TableDataInfo list(String ipaddr, String userName) { - Collection keys = redisCache.keys(Constants.LOGIN_TOKEN_KEY + "*"); - List userOnlineList = new ArrayList(); - for (String key : keys) { - LoginUser user = redisCache.getCacheObject(key); - if (StringUtils.isNotEmpty(ipaddr) && StringUtils.isNotEmpty(userName)) { - if (StringUtils.equals(ipaddr, user.getIpaddr()) && StringUtils.equals(userName, user.getUsername())) { - userOnlineList.add(userOnlineService.selectOnlineByInfo(ipaddr, userName, user)); - } - } else if (StringUtils.isNotEmpty(ipaddr)) { - if (StringUtils.equals(ipaddr, user.getIpaddr())) { - userOnlineList.add(userOnlineService.selectOnlineByIpaddr(ipaddr, user)); - } - } else if (StringUtils.isNotEmpty(userName) && StringUtils.isNotNull(user.getUser())) { - if (StringUtils.equals(userName, user.getUsername())) { - userOnlineList.add(userOnlineService.selectOnlineByUserName(userName, user)); - } - } else { - userOnlineList.add(userOnlineService.loginUserToUserOnline(user)); - } - } - Collections.reverse(userOnlineList); - userOnlineList.removeAll(Collections.singleton(null)); - return getDataTable(userOnlineList); - } - - /** - * 强退用户 - */ - @PreAuthorize("@ss.hasPermi('monitor:online:forceLogout')") - @Log(title = "在线用户", businessType = BusinessType.FORCE) - @DeleteMapping("/{tokenId}") - public AjaxResult forceLogout(@PathVariable String tokenId) { - redisCache.deleteObject(Constants.LOGIN_TOKEN_KEY + tokenId); - return AjaxResult.success(); - } -} diff --git a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysConfigController.java b/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysConfigController.java deleted file mode 100644 index 6b66d059..00000000 --- a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysConfigController.java +++ /dev/null @@ -1,125 +0,0 @@ -package com.ruoyi.web.controller.system; - -import java.util.List; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.annotation.RepeatSubmit; -import com.ruoyi.common.constant.UserConstants; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.core.page.TableDataInfo; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.common.utils.SecurityUtils; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.system.domain.SysConfig; -import com.ruoyi.system.service.ISysConfigService; - -/** - * 参数配置 信息操作处理 - * - * @author ruoyi - */ -@RestController -@RequestMapping("/system/config") -public class SysConfigController extends BaseController { - @Autowired - private ISysConfigService configService; - - /** - * 获取参数配置列表 - */ - @PreAuthorize("@ss.hasPermi('system:config:list')") - @GetMapping("/list") - public TableDataInfo list(SysConfig config) { - startPage(); - List list = configService.selectConfigList(config); - return getDataTable(list); - } - - @Log(title = "参数管理", businessType = BusinessType.EXPORT) - @PreAuthorize("@ss.hasPermi('system:config:export')") - @GetMapping("/export") - public AjaxResult export(SysConfig config) { - List list = configService.selectConfigList(config); - ExcelUtil util = new ExcelUtil(SysConfig.class); - return util.exportExcel(list, "参数数据"); - } - - /** - * 根据参数编号获取详细信息 - */ - @PreAuthorize("@ss.hasPermi('system:config:query')") - @GetMapping(value = "/{configId}") - public AjaxResult getInfo(@PathVariable Long configId) { - return AjaxResult.success(configService.selectConfigById(configId)); - } - - /** - * 根据参数键名查询参数值 - */ - @GetMapping(value = "/configKey/{configKey}") - public AjaxResult getConfigKey(@PathVariable String configKey) { - return AjaxResult.success(configService.selectConfigByKey(configKey)); - } - - /** - * 新增参数配置 - */ - @PreAuthorize("@ss.hasPermi('system:config:add')") - @Log(title = "参数管理", businessType = BusinessType.INSERT) - @PostMapping - @RepeatSubmit - public AjaxResult add(@Validated @RequestBody SysConfig config) { - if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config))) { - return AjaxResult.error("新增参数'" + config.getConfigName() + "'失败,参数键名已存在"); - } - config.setCreateBy(SecurityUtils.getUsername()); - return toAjax(configService.insertConfig(config)); - } - - /** - * 修改参数配置 - */ - @PreAuthorize("@ss.hasPermi('system:config:edit')") - @Log(title = "参数管理", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@Validated @RequestBody SysConfig config) { - if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config))) { - return AjaxResult.error("修改参数'" + config.getConfigName() + "'失败,参数键名已存在"); - } - config.setUpdateBy(SecurityUtils.getUsername()); - return toAjax(configService.updateConfig(config)); - } - - /** - * 删除参数配置 - */ - @PreAuthorize("@ss.hasPermi('system:config:remove')") - @Log(title = "参数管理", businessType = BusinessType.DELETE) - @DeleteMapping("/{configIds}") - public AjaxResult remove(@PathVariable Long[] configIds) { - return toAjax(configService.deleteConfigByIds(configIds)); - } - - /** - * 清空缓存 - */ - @PreAuthorize("@ss.hasPermi('system:config:remove')") - @Log(title = "参数管理", businessType = BusinessType.CLEAN) - @DeleteMapping("/clearCache") - public AjaxResult clearCache() { - configService.clearCache(); - return AjaxResult.success(); - } -} diff --git a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java b/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java deleted file mode 100644 index 848da05a..00000000 --- a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDeptController.java +++ /dev/null @@ -1,145 +0,0 @@ -package com.ruoyi.web.controller.system; - -import java.util.Iterator; -import java.util.List; - -import org.apache.commons.lang3.ArrayUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.constant.UserConstants; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.core.domain.entity.SysDept; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.common.utils.SecurityUtils; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.system.service.ISysDeptService; - -/** - * 部门信息 - * - * @author ruoyi - */ -@RestController -@RequestMapping("/system/dept") -public class SysDeptController extends BaseController { - @Autowired - private ISysDeptService deptService; - - /** - * 获取部门列表 - */ - @PreAuthorize("@ss.hasPermi('system:dept:list')") - @GetMapping("/list") - public AjaxResult list(SysDept dept) { - List depts = deptService.selectDeptList(dept); - return AjaxResult.success(depts); - } - - /** - * 查询部门列表(排除节点) - */ - @PreAuthorize("@ss.hasPermi('system:dept:list')") - @GetMapping("/list/exclude/{deptId}") - public AjaxResult excludeChild(@PathVariable(value = "deptId", required = false) Long deptId) { - List depts = deptService.selectDeptList(new SysDept()); - Iterator it = depts.iterator(); - while (it.hasNext()) { - SysDept d = (SysDept) it.next(); - if (d.getDeptId().intValue() == deptId - || ArrayUtils.contains(StringUtils.split(d.getAncestors(), ","), deptId + "")) { - it.remove(); - } - } - return AjaxResult.success(depts); - } - - /** - * 根据部门编号获取详细信息 - */ - @PreAuthorize("@ss.hasPermi('system:dept:query')") - @GetMapping(value = "/{deptId}") - public AjaxResult getInfo(@PathVariable Long deptId) { - return AjaxResult.success(deptService.selectDeptById(deptId)); - } - - /** - * 获取部门下拉树列表 - */ - @GetMapping("/treeselect") - public AjaxResult treeselect(SysDept dept) { - List depts = deptService.selectDeptList(dept); - return AjaxResult.success(deptService.buildDeptTreeSelect(depts)); - } - - /** - * 加载对应角色部门列表树 - */ - @GetMapping(value = "/roleDeptTreeselect/{roleId}") - public AjaxResult roleDeptTreeselect(@PathVariable("roleId") Long roleId) { - List depts = deptService.selectDeptList(new SysDept()); - AjaxResult ajax = AjaxResult.success(); - ajax.put("checkedKeys", deptService.selectDeptListByRoleId(roleId)); - ajax.put("depts", deptService.buildDeptTreeSelect(depts)); - return ajax; - } - - /** - * 新增部门 - */ - @PreAuthorize("@ss.hasPermi('system:dept:add')") - @Log(title = "部门管理", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@Validated @RequestBody SysDept dept) { - if (UserConstants.NOT_UNIQUE.equals(deptService.checkDeptNameUnique(dept))) { - return AjaxResult.error("新增部门'" + dept.getDeptName() + "'失败,部门名称已存在"); - } - dept.setCreateBy(SecurityUtils.getUsername()); - return toAjax(deptService.insertDept(dept)); - } - - /** - * 修改部门 - */ - @PreAuthorize("@ss.hasPermi('system:dept:edit')") - @Log(title = "部门管理", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@Validated @RequestBody SysDept dept) { - if (UserConstants.NOT_UNIQUE.equals(deptService.checkDeptNameUnique(dept))) { - return AjaxResult.error("修改部门'" + dept.getDeptName() + "'失败,部门名称已存在"); - } else if (dept.getParentId().equals(dept.getDeptId())) { - return AjaxResult.error("修改部门'" + dept.getDeptName() + "'失败,上级部门不能是自己"); - } else if (StringUtils.equals(UserConstants.DEPT_DISABLE, dept.getStatus()) - && deptService.selectNormalChildrenDeptById(dept.getDeptId()) > 0) { - return AjaxResult.error("该部门包含未停用的子部门!"); - } - dept.setUpdateBy(SecurityUtils.getUsername()); - return toAjax(deptService.updateDept(dept)); - } - - /** - * 删除部门 - */ - @PreAuthorize("@ss.hasPermi('system:dept:remove')") - @Log(title = "部门管理", businessType = BusinessType.DELETE) - @DeleteMapping("/{deptId}") - public AjaxResult remove(@PathVariable Long deptId) { - if (deptService.hasChildByDeptId(deptId)) { - return AjaxResult.error("存在下级部门,不允许删除"); - } - if (deptService.checkDeptExistUser(deptId)) { - return AjaxResult.error("部门存在用户,不允许删除"); - } - return toAjax(deptService.deleteDeptById(deptId)); - } -} diff --git a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictDataController.java b/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictDataController.java deleted file mode 100644 index f367daec..00000000 --- a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictDataController.java +++ /dev/null @@ -1,115 +0,0 @@ -package com.ruoyi.web.controller.system; - -import java.util.ArrayList; -import java.util.List; - -import com.alibaba.druid.pool.DruidDataSource; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.core.domain.entity.SysDictData; -import com.ruoyi.common.core.page.TableDataInfo; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.common.utils.SecurityUtils; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.system.service.ISysDictDataService; -import com.ruoyi.system.service.ISysDictTypeService; - -/** - * 数据字典信息 - * - * @author ruoyi - */ -@RestController -@RequestMapping("/system/dict/data") -public class SysDictDataController extends BaseController { - @Autowired - private ISysDictDataService dictDataService; - - @Autowired - private ISysDictTypeService dictTypeService; - - @PreAuthorize("@ss.hasPermi('system:dict:list')") - @GetMapping("/list") - public TableDataInfo list(SysDictData dictData) { - - startPage(); - - List list = dictDataService.selectDictDataList(dictData); - return getDataTable(list); - } - - @Log(title = "字典数据", businessType = BusinessType.EXPORT) - @PreAuthorize("@ss.hasPermi('system:dict:export')") - @GetMapping("/export") - public AjaxResult export(SysDictData dictData) { - List list = dictDataService.selectDictDataList(dictData); - ExcelUtil util = new ExcelUtil(SysDictData.class); - return util.exportExcel(list, "字典数据"); - } - - /** - * 查询字典数据详细 - */ - @PreAuthorize("@ss.hasPermi('system:dict:query')") - @GetMapping(value = "/{dictCode}") - public AjaxResult getInfo(@PathVariable Long dictCode) { - return AjaxResult.success(dictDataService.selectDictDataById(dictCode)); - } - - /** - * 根据字典类型查询字典数据信息 - */ - @GetMapping(value = "/type/{dictType}") - public AjaxResult dictType(@PathVariable String dictType) { - List data = dictTypeService.selectDictDataByType(dictType); - if (StringUtils.isNull(data)) { - data = new ArrayList(); - } - return AjaxResult.success(data); - } - - /** - * 新增字典类型 - */ - @PreAuthorize("@ss.hasPermi('system:dict:add')") - @Log(title = "字典数据", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@Validated @RequestBody SysDictData dict) { - dict.setCreateBy(SecurityUtils.getUsername()); - return toAjax(dictDataService.insertDictData(dict)); - } - - /** - * 修改保存字典类型 - */ - @PreAuthorize("@ss.hasPermi('system:dict:edit')") - @Log(title = "字典数据", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@Validated @RequestBody SysDictData dict) { - dict.setUpdateBy(SecurityUtils.getUsername()); - return toAjax(dictDataService.updateDictData(dict)); - } - - /** - * 删除字典类型 - */ - @PreAuthorize("@ss.hasPermi('system:dict:remove')") - @Log(title = "字典类型", businessType = BusinessType.DELETE) - @DeleteMapping("/{dictCodes}") - public AjaxResult remove(@PathVariable Long[] dictCodes) { - return toAjax(dictDataService.deleteDictDataByIds(dictCodes)); - } -} diff --git a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictTypeController.java b/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictTypeController.java deleted file mode 100644 index ecf841cf..00000000 --- a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysDictTypeController.java +++ /dev/null @@ -1,121 +0,0 @@ -package com.ruoyi.web.controller.system; - -import java.util.List; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.constant.UserConstants; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.core.domain.entity.SysDictType; -import com.ruoyi.common.core.page.TableDataInfo; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.common.utils.SecurityUtils; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.system.service.ISysDictTypeService; - -/** - * 数据字典信息 - * - * @author ruoyi - */ -@RestController -@RequestMapping("/system/dict/type") -public class SysDictTypeController extends BaseController { - @Autowired - private ISysDictTypeService dictTypeService; - - @PreAuthorize("@ss.hasPermi('system:dict:list')") - @GetMapping("/list") - public TableDataInfo list(SysDictType dictType) { - startPage(); - List list = dictTypeService.selectDictTypeList(dictType); - return getDataTable(list); - } - - @Log(title = "字典类型", businessType = BusinessType.EXPORT) - @PreAuthorize("@ss.hasPermi('system:dict:export')") - @GetMapping("/export") - public AjaxResult export(SysDictType dictType) { - List list = dictTypeService.selectDictTypeList(dictType); - ExcelUtil util = new ExcelUtil(SysDictType.class); - return util.exportExcel(list, "字典类型"); - } - - /** - * 查询字典类型详细 - */ - @PreAuthorize("@ss.hasPermi('system:dict:query')") - @GetMapping(value = "/{dictId}") - public AjaxResult getInfo(@PathVariable Long dictId) { - return AjaxResult.success(dictTypeService.selectDictTypeById(dictId)); - } - - /** - * 新增字典类型 - */ - @PreAuthorize("@ss.hasPermi('system:dict:add')") - @Log(title = "字典类型", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@Validated @RequestBody SysDictType dict) { - if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict))) { - return AjaxResult.error("新增字典'" + dict.getDictName() + "'失败,字典类型已存在"); - } - dict.setCreateBy(SecurityUtils.getUsername()); - return toAjax(dictTypeService.insertDictType(dict)); - } - - /** - * 修改字典类型 - */ - @PreAuthorize("@ss.hasPermi('system:dict:edit')") - @Log(title = "字典类型", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@Validated @RequestBody SysDictType dict) { - if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict))) { - return AjaxResult.error("修改字典'" + dict.getDictName() + "'失败,字典类型已存在"); - } - dict.setUpdateBy(SecurityUtils.getUsername()); - return toAjax(dictTypeService.updateDictType(dict)); - } - - /** - * 删除字典类型 - */ - @PreAuthorize("@ss.hasPermi('system:dict:remove')") - @Log(title = "字典类型", businessType = BusinessType.DELETE) - @DeleteMapping("/{dictIds}") - public AjaxResult remove(@PathVariable Long[] dictIds) { - return toAjax(dictTypeService.deleteDictTypeByIds(dictIds)); - } - - /** - * 清空缓存 - */ - @PreAuthorize("@ss.hasPermi('system:dict:remove')") - @Log(title = "字典类型", businessType = BusinessType.CLEAN) - @DeleteMapping("/clearCache") - public AjaxResult clearCache() { - dictTypeService.clearCache(); - return AjaxResult.success(); - } - - /** - * 获取字典选择框列表 - */ - @GetMapping("/optionselect") - public AjaxResult optionselect() { - List dictTypes = dictTypeService.selectDictTypeAll(); - return AjaxResult.success(dictTypes); - } -} diff --git a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java b/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java deleted file mode 100644 index e6bfd0c2..00000000 --- a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java +++ /dev/null @@ -1,112 +0,0 @@ -package com.ruoyi.web.controller.system; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import com.ruoyi.common.core.domain.model.MpLoginBody; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RestController; -import com.ruoyi.common.constant.Constants; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.core.domain.entity.SysMenu; -import com.ruoyi.common.core.domain.entity.SysUser; -import com.ruoyi.common.core.domain.model.LoginBody; -import com.ruoyi.common.core.domain.model.LoginUser; -import com.ruoyi.common.utils.ServletUtils; -import com.ruoyi.framework.web.service.SysLoginService; -import com.ruoyi.framework.web.service.SysPermissionService; -import com.ruoyi.framework.web.service.TokenService; -import com.ruoyi.system.service.ISysMenuService; - -/** - * 登录验证 - * - * @author ruoyi - */ -@RestController -public class SysLoginController { - @Autowired - private SysLoginService loginService; - - @Autowired - private ISysMenuService menuService; - - @Autowired - private SysPermissionService permissionService; - - @Autowired - private TokenService tokenService; - - /** - * 登录方法 - * - * @param loginBody 登录信息 - * @return 结果 - */ - @PostMapping("/login") - public AjaxResult login(@RequestBody LoginBody loginBody) { - AjaxResult ajax = AjaxResult.success(); - // 生成令牌 - String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(), - loginBody.getUuid()); - ajax.put(Constants.TOKEN, token); - return ajax; - } - - /** - * @return - * @Method 微信小程序用户登录 - * @Description TODO - * @Param null - * @date 2021-08-26,0026 11:47 - * @author admin - */ - @PostMapping("/wxLogin") - public AjaxResult wxLogin(@RequestBody MpLoginBody loginBody) { - AjaxResult ajax = AjaxResult.success(); - // 生成令牌 - String token = loginService.mpLlogin(loginBody); - ajax.put(Constants.TOKEN, token); - - return ajax; - } - - /** - * 获取用户信息 - * - * @return 用户信息 - */ - @GetMapping("getInfo") - public AjaxResult getInfo() { - LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); - SysUser user = loginUser.getUser(); - // 角色集合 - Set roles = permissionService.getRolePermission(user); - // 权限集合 - Set permissions = permissionService.getMenuPermission(user); - AjaxResult ajax = AjaxResult.success(); - ajax.put("user", user); - ajax.put("roles", roles); - ajax.put("permissions", permissions); - return ajax; - } - - /** - * 获取路由信息 - * - * @return 路由信息 - */ - @GetMapping("getRouters") - public AjaxResult getRouters() { - LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); - // 用户信息 - SysUser user = loginUser.getUser(); - List menus = menuService.selectMenuTreeByUserId(user.getUserId()); - return AjaxResult.success(menuService.buildMenus(menus)); - } -} diff --git a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysMenuController.java b/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysMenuController.java deleted file mode 100644 index ce646e13..00000000 --- a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysMenuController.java +++ /dev/null @@ -1,141 +0,0 @@ -package com.ruoyi.web.controller.system; - -import java.util.List; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.constant.Constants; -import com.ruoyi.common.constant.UserConstants; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.core.domain.entity.SysMenu; -import com.ruoyi.common.core.domain.model.LoginUser; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.common.utils.SecurityUtils; -import com.ruoyi.common.utils.ServletUtils; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.framework.web.service.TokenService; -import com.ruoyi.system.service.ISysMenuService; - -/** - * 菜单信息 - * - * @author ruoyi - */ -@RestController -@RequestMapping("/system/menu") -public class SysMenuController extends BaseController { - @Autowired - private ISysMenuService menuService; - - @Autowired - private TokenService tokenService; - - /** - * 获取菜单列表 - */ - @PreAuthorize("@ss.hasPermi('system:menu:list')") - @GetMapping("/list") - public AjaxResult list(SysMenu menu) { - LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); - Long userId = loginUser.getUser().getUserId(); - List menus = menuService.selectMenuList(menu, userId); - - return AjaxResult.success(menus); - } - - /** - * 根据菜单编号获取详细信息 - */ - @PreAuthorize("@ss.hasPermi('system:menu:query')") - @GetMapping(value = "/{menuId}") - public AjaxResult getInfo(@PathVariable Long menuId) { - return AjaxResult.success(menuService.selectMenuById(menuId)); - } - - /** - * 获取菜单下拉树列表 - */ - @GetMapping("/treeselect") - public AjaxResult treeselect(SysMenu menu) { - LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); - Long userId = loginUser.getUser().getUserId(); - List menus = menuService.selectMenuList(menu, userId); - return AjaxResult.success(menuService.buildMenuTreeSelect(menus)); - } - - /** - * 加载对应角色菜单列表树 - */ - @GetMapping(value = "/roleMenuTreeselect/{roleId}") - public AjaxResult roleMenuTreeselect(@PathVariable("roleId") Long roleId) { - LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); - List menus = menuService.selectMenuList(loginUser.getUser().getUserId()); - AjaxResult ajax = AjaxResult.success(); - ajax.put("checkedKeys", menuService.selectMenuListByRoleId(roleId)); - ajax.put("menus", menuService.buildMenuTreeSelect(menus)); - return ajax; - } - - /** - * 新增菜单 - */ - @PreAuthorize("@ss.hasPermi('system:menu:add')") - @Log(title = "菜单管理", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@Validated @RequestBody SysMenu menu) { - if (UserConstants.NOT_UNIQUE.equals(menuService.checkMenuNameUnique(menu))) { - return AjaxResult.error("新增菜单'" + menu.getMenuName() + "'失败,菜单名称已存在"); - } else if (UserConstants.YES_FRAME.equals(menu.getIsFrame()) - && !StringUtils.startsWithAny(menu.getPath(), Constants.HTTP, Constants.HTTPS)) { - return AjaxResult.error("新增菜单'" + menu.getMenuName() + "'失败,地址必须以http(s)://开头"); - } - menu.setCreateBy(SecurityUtils.getUsername()); - return toAjax(menuService.insertMenu(menu)); - } - - /** - * 修改菜单 - */ - @PreAuthorize("@ss.hasPermi('system:menu:edit')") - @Log(title = "菜单管理", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@Validated @RequestBody SysMenu menu) { - if (UserConstants.NOT_UNIQUE.equals(menuService.checkMenuNameUnique(menu))) { - return AjaxResult.error("修改菜单'" + menu.getMenuName() + "'失败,菜单名称已存在"); - } else if (UserConstants.YES_FRAME.equals(menu.getIsFrame()) - && !StringUtils.startsWithAny(menu.getPath(), Constants.HTTP, Constants.HTTPS)) { - return AjaxResult.error("修改菜单'" + menu.getMenuName() + "'失败,地址必须以http(s)://开头"); - } else if (menu.getMenuId().equals(menu.getParentId())) { - return AjaxResult.error("修改菜单'" + menu.getMenuName() + "'失败,上级菜单不能选择自己"); - } - menu.setUpdateBy(SecurityUtils.getUsername()); - return toAjax(menuService.updateMenu(menu)); - } - - /** - * 删除菜单 - */ - @PreAuthorize("@ss.hasPermi('system:menu:remove')") - @Log(title = "菜单管理", businessType = BusinessType.DELETE) - @DeleteMapping("/{menuId}") - public AjaxResult remove(@PathVariable("menuId") Long menuId) { - if (menuService.hasChildByMenuId(menuId)) { - return AjaxResult.error("存在子菜单,不允许删除"); - } - if (menuService.checkMenuExistRole(menuId)) { - return AjaxResult.error("菜单已分配,不允许删除"); - } - return toAjax(menuService.deleteMenuById(menuId)); - } -} \ No newline at end of file diff --git a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysNoticeController.java b/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysNoticeController.java deleted file mode 100644 index d0ac4231..00000000 --- a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysNoticeController.java +++ /dev/null @@ -1,87 +0,0 @@ -package com.ruoyi.web.controller.system; - -import java.util.List; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.core.page.TableDataInfo; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.common.utils.SecurityUtils; -import com.ruoyi.system.domain.SysNotice; -import com.ruoyi.system.service.ISysNoticeService; - -/** - * 公告 信息操作处理 - * - * @author ruoyi - */ -@RestController -@RequestMapping("/system/notice") -public class SysNoticeController extends BaseController { - @Autowired - private ISysNoticeService noticeService; - - /** - * 获取通知公告列表 - */ - @PreAuthorize("@ss.hasPermi('system:notice:list')") - @GetMapping("/list") - public TableDataInfo list(SysNotice notice) { - startPage(); - List list = noticeService.selectNoticeList(notice); - return getDataTable(list); - } - - /** - * 根据通知公告编号获取详细信息 - */ - @PreAuthorize("@ss.hasPermi('system:notice:query')") - @GetMapping(value = "/{noticeId}") - public AjaxResult getInfo(@PathVariable Long noticeId) { - return AjaxResult.success(noticeService.selectNoticeById(noticeId)); - } - - /** - * 新增通知公告 - */ - @PreAuthorize("@ss.hasPermi('system:notice:add')") - @Log(title = "通知公告", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@Validated @RequestBody SysNotice notice) { - notice.setCreateBy(SecurityUtils.getUsername()); - return toAjax(noticeService.insertNotice(notice)); - } - - /** - * 修改通知公告 - */ - @PreAuthorize("@ss.hasPermi('system:notice:edit')") - @Log(title = "通知公告", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@Validated @RequestBody SysNotice notice) { - notice.setUpdateBy(SecurityUtils.getUsername()); - return toAjax(noticeService.updateNotice(notice)); - } - - /** - * 删除通知公告 - */ - @PreAuthorize("@ss.hasPermi('system:notice:remove')") - @Log(title = "通知公告", businessType = BusinessType.DELETE) - @DeleteMapping("/{noticeIds}") - public AjaxResult remove(@PathVariable Long[] noticeIds) { - return toAjax(noticeService.deleteNoticeByIds(noticeIds)); - } -} diff --git a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysPostController.java b/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysPostController.java deleted file mode 100644 index 83149d46..00000000 --- a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysPostController.java +++ /dev/null @@ -1,117 +0,0 @@ -package com.ruoyi.web.controller.system; - -import java.util.List; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.constant.UserConstants; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.core.page.TableDataInfo; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.common.utils.SecurityUtils; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.system.domain.SysPost; -import com.ruoyi.system.service.ISysPostService; - -/** - * 岗位信息操作处理 - * - * @author ruoyi - */ -@RestController -@RequestMapping("/system/post") -public class SysPostController extends BaseController { - @Autowired - private ISysPostService postService; - - /** - * 获取岗位列表 - */ - @PreAuthorize("@ss.hasPermi('system:post:list')") - @GetMapping("/list") - public TableDataInfo list(SysPost post) { - startPage(); - List list = postService.selectPostList(post); - return getDataTable(list); - } - - @Log(title = "岗位管理", businessType = BusinessType.EXPORT) - @PreAuthorize("@ss.hasPermi('system:post:export')") - @GetMapping("/export") - public AjaxResult export(SysPost post) { - List list = postService.selectPostList(post); - ExcelUtil util = new ExcelUtil(SysPost.class); - return util.exportExcel(list, "岗位数据"); - } - - /** - * 根据岗位编号获取详细信息 - */ - @PreAuthorize("@ss.hasPermi('system:post:query')") - @GetMapping(value = "/{postId}") - public AjaxResult getInfo(@PathVariable Long postId) { - return AjaxResult.success(postService.selectPostById(postId)); - } - - /** - * 新增岗位 - */ - @PreAuthorize("@ss.hasPermi('system:post:add')") - @Log(title = "岗位管理", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@Validated @RequestBody SysPost post) { - if (UserConstants.NOT_UNIQUE.equals(postService.checkPostNameUnique(post))) { - return AjaxResult.error("新增岗位'" + post.getPostName() + "'失败,岗位名称已存在"); - } else if (UserConstants.NOT_UNIQUE.equals(postService.checkPostCodeUnique(post))) { - return AjaxResult.error("新增岗位'" + post.getPostName() + "'失败,岗位编码已存在"); - } - post.setCreateBy(SecurityUtils.getUsername()); - return toAjax(postService.insertPost(post)); - } - - /** - * 修改岗位 - */ - @PreAuthorize("@ss.hasPermi('system:post:edit')") - @Log(title = "岗位管理", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@Validated @RequestBody SysPost post) { - if (UserConstants.NOT_UNIQUE.equals(postService.checkPostNameUnique(post))) { - return AjaxResult.error("修改岗位'" + post.getPostName() + "'失败,岗位名称已存在"); - } else if (UserConstants.NOT_UNIQUE.equals(postService.checkPostCodeUnique(post))) { - return AjaxResult.error("修改岗位'" + post.getPostName() + "'失败,岗位编码已存在"); - } - post.setUpdateBy(SecurityUtils.getUsername()); - return toAjax(postService.updatePost(post)); - } - - /** - * 删除岗位 - */ - @PreAuthorize("@ss.hasPermi('system:post:remove')") - @Log(title = "岗位管理", businessType = BusinessType.DELETE) - @DeleteMapping("/{postIds}") - public AjaxResult remove(@PathVariable Long[] postIds) { - return toAjax(postService.deletePostByIds(postIds)); - } - - /** - * 获取岗位选择框列表 - */ - @GetMapping("/optionselect") - public AjaxResult optionselect() { - List posts = postService.selectPostAll(); - return AjaxResult.success(posts); - } -} diff --git a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java b/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java deleted file mode 100644 index caa25394..00000000 --- a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java +++ /dev/null @@ -1,117 +0,0 @@ -package com.ruoyi.web.controller.system; - -import java.io.IOException; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.multipart.MultipartFile; -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.config.RuoYiConfig; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.core.domain.entity.SysUser; -import com.ruoyi.common.core.domain.model.LoginUser; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.common.utils.SecurityUtils; -import com.ruoyi.common.utils.ServletUtils; -import com.ruoyi.common.utils.file.FileUploadUtils; -import com.ruoyi.framework.web.service.TokenService; -import com.ruoyi.system.service.ISysUserService; - -/** - * 个人信息 业务处理 - * - * @author ruoyi - */ -@RestController -@RequestMapping("/system/user/profile") -public class SysProfileController extends BaseController { - @Autowired - private ISysUserService userService; - - @Autowired - private TokenService tokenService; - - /** - * 个人信息 - */ - @GetMapping - public AjaxResult profile() { - LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); - SysUser user = loginUser.getUser(); - AjaxResult ajax = AjaxResult.success(user); - ajax.put("roleGroup", userService.selectUserRoleGroup(loginUser.getUsername())); - ajax.put("postGroup", userService.selectUserPostGroup(loginUser.getUsername())); - return ajax; - } - - /** - * 修改用户 - */ - @Log(title = "个人信息", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult updateProfile(@RequestBody SysUser user) { - if (userService.updateUserProfile(user) > 0) { - LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); - // 更新缓存用户信息 - loginUser.getUser().setNickName(user.getNickName()); - loginUser.getUser().setPhonenumber(user.getPhonenumber()); - loginUser.getUser().setEmail(user.getEmail()); - loginUser.getUser().setSex(user.getSex()); - tokenService.setLoginUser(loginUser); - return AjaxResult.success(); - } - return AjaxResult.error("修改个人信息异常,请联系管理员"); - } - - /** - * 重置密码 - */ - @Log(title = "个人信息", businessType = BusinessType.UPDATE) - @PutMapping("/updatePwd") - public AjaxResult updatePwd(String oldPassword, String newPassword) { - LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); - String userName = loginUser.getUsername(); - String password = loginUser.getPassword(); - if (!SecurityUtils.matchesPassword(oldPassword, password)) { - return AjaxResult.error("修改密码失败,旧密码错误"); - } - if (SecurityUtils.matchesPassword(newPassword, password)) { - return AjaxResult.error("新密码不能与旧密码相同"); - } - if (userService.resetUserPwd(userName, SecurityUtils.encryptPassword(newPassword)) > 0) { - // 更新缓存用户密码 - loginUser.getUser().setPassword(SecurityUtils.encryptPassword(newPassword)); - tokenService.setLoginUser(loginUser); - return AjaxResult.success(); - } - return AjaxResult.error("修改密码异常,请联系管理员"); - } - - /** - * 头像上传 - */ - @Log(title = "用户头像", businessType = BusinessType.UPDATE) - @PostMapping("/avatar") - public AjaxResult avatar(@RequestParam("avatarfile") MultipartFile file) throws IOException { - if (!file.isEmpty()) { - LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); - String avatar = FileUploadUtils.upload(RuoYiConfig.getAvatarPath(), file); - if (userService.updateUserAvatar(loginUser.getUsername(), avatar)) { - AjaxResult ajax = AjaxResult.success(); - ajax.put("imgUrl", avatar); - // 更新缓存用户头像 - loginUser.getUser().setAvatar(avatar); - tokenService.setLoginUser(loginUser); - return ajax; - } - } - return AjaxResult.error("上传图片异常,请联系管理员"); - } -} diff --git a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java b/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java deleted file mode 100644 index 7b4d50f4..00000000 --- a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysRoleController.java +++ /dev/null @@ -1,165 +0,0 @@ -package com.ruoyi.web.controller.system; - -import java.util.List; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.constant.UserConstants; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.core.domain.entity.SysRole; -import com.ruoyi.common.core.domain.model.LoginUser; -import com.ruoyi.common.core.page.TableDataInfo; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.common.utils.SecurityUtils; -import com.ruoyi.common.utils.ServletUtils; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.framework.web.service.SysPermissionService; -import com.ruoyi.framework.web.service.TokenService; -import com.ruoyi.system.service.ISysRoleService; -import com.ruoyi.system.service.ISysUserService; - -/** - * 角色信息 - * - * @author ruoyi - */ -@RestController -@RequestMapping("/system/role") -public class SysRoleController extends BaseController { - @Autowired - private ISysRoleService roleService; - - @Autowired - private TokenService tokenService; - - @Autowired - private SysPermissionService permissionService; - - @Autowired - private ISysUserService userService; - - @PreAuthorize("@ss.hasPermi('system:role:list')") - @GetMapping("/list") - public TableDataInfo list(SysRole role) { - startPage(); - List list = roleService.selectRoleList(role); - return getDataTable(list); - } - - @Log(title = "角色管理", businessType = BusinessType.EXPORT) - @PreAuthorize("@ss.hasPermi('system:role:export')") - @GetMapping("/export") - public AjaxResult export(SysRole role) { - List list = roleService.selectRoleList(role); - ExcelUtil util = new ExcelUtil(SysRole.class); - return util.exportExcel(list, "角色数据"); - } - - /** - * 根据角色编号获取详细信息 - */ - @PreAuthorize("@ss.hasPermi('system:role:query')") - @GetMapping(value = "/{roleId}") - public AjaxResult getInfo(@PathVariable Long roleId) { - return AjaxResult.success(roleService.selectRoleById(roleId)); - } - - /** - * 新增角色 - */ - @PreAuthorize("@ss.hasPermi('system:role:add')") - @Log(title = "角色管理", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@Validated @RequestBody SysRole role) { - if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role))) { - return AjaxResult.error("新增角色'" + role.getRoleName() + "'失败,角色名称已存在"); - } else if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleKeyUnique(role))) { - return AjaxResult.error("新增角色'" + role.getRoleName() + "'失败,角色权限已存在"); - } - role.setCreateBy(SecurityUtils.getUsername()); - return toAjax(roleService.insertRole(role)); - - } - - /** - * 修改保存角色 - */ - @PreAuthorize("@ss.hasPermi('system:role:edit')") - @Log(title = "角色管理", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@Validated @RequestBody SysRole role) { - roleService.checkRoleAllowed(role); - if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role))) { - return AjaxResult.error("修改角色'" + role.getRoleName() + "'失败,角色名称已存在"); - } else if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleKeyUnique(role))) { - return AjaxResult.error("修改角色'" + role.getRoleName() + "'失败,角色权限已存在"); - } - role.setUpdateBy(SecurityUtils.getUsername()); - - if (roleService.updateRole(role) > 0) { - // 更新缓存用户权限 - LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); - if (StringUtils.isNotNull(loginUser.getUser()) && !loginUser.getUser().isAdmin()) { - loginUser.setPermissions(permissionService.getMenuPermission(loginUser.getUser())); - loginUser.setUser(userService.selectUserByUserName(loginUser.getUser().getUserName())); - tokenService.setLoginUser(loginUser); - } - return AjaxResult.success(); - } - return AjaxResult.error("修改角色'" + role.getRoleName() + "'失败,请联系管理员"); - } - - /** - * 修改保存数据权限 - */ - @PreAuthorize("@ss.hasPermi('system:role:edit')") - @Log(title = "角色管理", businessType = BusinessType.UPDATE) - @PutMapping("/dataScope") - public AjaxResult dataScope(@RequestBody SysRole role) { - roleService.checkRoleAllowed(role); - return toAjax(roleService.authDataScope(role)); - } - - /** - * 状态修改 - */ - @PreAuthorize("@ss.hasPermi('system:role:edit')") - @Log(title = "角色管理", businessType = BusinessType.UPDATE) - @PutMapping("/changeStatus") - public AjaxResult changeStatus(@RequestBody SysRole role) { - roleService.checkRoleAllowed(role); - role.setUpdateBy(SecurityUtils.getUsername()); - return toAjax(roleService.updateRoleStatus(role)); - } - - /** - * 删除角色 - */ - @PreAuthorize("@ss.hasPermi('system:role:remove')") - @Log(title = "角色管理", businessType = BusinessType.DELETE) - @DeleteMapping("/{roleIds}") - public AjaxResult remove(@PathVariable Long[] roleIds) { - return toAjax(roleService.deleteRoleByIds(roleIds)); - } - - /** - * 获取角色选择框列表 - */ - @PreAuthorize("@ss.hasPermi('system:role:query')") - @GetMapping("/optionselect") - public AjaxResult optionselect() { - return AjaxResult.success(roleService.selectRoleAll()); - } -} diff --git a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java b/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java deleted file mode 100644 index 21b29f87..00000000 --- a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java +++ /dev/null @@ -1,217 +0,0 @@ -package com.ruoyi.web.controller.system; - -import java.util.List; -import java.util.stream.Collectors; - -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.multipart.MultipartFile; -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.constant.UserConstants; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.core.domain.entity.SysRole; -import com.ruoyi.common.core.domain.entity.SysUser; -import com.ruoyi.common.core.domain.model.LoginUser; -import com.ruoyi.common.core.page.TableDataInfo; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.common.utils.SecurityUtils; -import com.ruoyi.common.utils.ServletUtils; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.framework.web.service.TokenService; -import com.ruoyi.system.service.ISysPostService; -import com.ruoyi.system.service.ISysRoleService; -import com.ruoyi.system.service.ISysUserService; - -/** - * 用户信息 - * - * @author ruoyi - */ -@Api(value = "用户管理", tags = "用户管理") -@RestController -@RequestMapping("/system/user") -public class SysUserController extends BaseController { - @Autowired - private ISysUserService userService; - - @Autowired - private ISysRoleService roleService; - - @Autowired - private ISysPostService postService; - - @Autowired - private TokenService tokenService; - - /** - * 获取用户列表 - */ - @ApiOperation(value = "获取用户列表", notes = "获取用户列表") - @PreAuthorize("@ss.hasPermi('system:user:list')") - @GetMapping("/list") - public TableDataInfo list(SysUser user) { - startPage(); - List list = userService.selectUserList(user); - return getDataTable(list); - } - - @Log(title = "用户管理", businessType = BusinessType.EXPORT) - @PreAuthorize("@ss.hasPermi('system:user:export')") - @GetMapping("/export") - public AjaxResult export(SysUser user) { - List list = userService.selectUserList(user); - ExcelUtil util = new ExcelUtil(SysUser.class); - return util.exportExcel(list, "用户数据"); - } - - @Log(title = "用户管理", businessType = BusinessType.IMPORT) - @PreAuthorize("@ss.hasPermi('system:user:import')") - @PostMapping("/importData") - public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception { - ExcelUtil util = new ExcelUtil(SysUser.class); - List userList = util.importExcel(file.getInputStream()); - LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); - String operName = loginUser.getUsername(); - String message = userService.importUser(userList, updateSupport, operName); - return AjaxResult.success(message); - } - - @GetMapping("/importTemplate") - public AjaxResult importTemplate() { - ExcelUtil util = new ExcelUtil(SysUser.class); - return util.importTemplateExcel("用户数据"); - } - - /** - * 根据用户编号获取详细信息 - */ - @ApiOperation(value = "根据用户编号获取详细信息", notes = "根据用户编号获取详细信息") - @PreAuthorize("@ss.hasPermi('system:user:query')") - @GetMapping(value = {"/", "/{userId}"}) - public AjaxResult getInfo(@PathVariable(value = "userId", required = false) Long userId) { - AjaxResult ajax = AjaxResult.success(); - List roles = roleService.selectRoleAll(); - ajax.put("roles", SysUser.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList())); - ajax.put("posts", postService.selectPostAll()); - if (StringUtils.isNotNull(userId)) { - ajax.put(AjaxResult.DATA_TAG, userService.selectUserById(userId)); - ajax.put("postIds", postService.selectPostListByUserId(userId)); - ajax.put("roleIds", roleService.selectRoleListByUserId(userId)); - } - return ajax; - } - - /** - * 新增用户 - */ - @PreAuthorize("@ss.hasPermi('system:user:add')") - @Log(title = "用户管理", businessType = BusinessType.INSERT) - @PostMapping - @ApiOperation(value = "新增用户", notes = "新增用户") - public AjaxResult add(@Validated @RequestBody SysUser user) { - if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(user.getUserName()))) { - return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,登录账号已存在"); - } else if (StringUtils.isNotEmpty(user.getPhonenumber()) - && UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user))) { - return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,手机号码已存在"); - } else if (StringUtils.isNotEmpty(user.getEmail()) - && UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user))) { - return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,邮箱账号已存在"); - } - user.setCreateBy(SecurityUtils.getUsername()); - user.setPassword(SecurityUtils.encryptPassword(user.getPassword())); - return toAjax(userService.insertUser(user)); - } - - /** - * 用户注册 - */ - @Log(title = "用户管理", businessType = BusinessType.INSERT) - @PostMapping("/register") - @ApiOperation(value = "用户注册", notes = "用户注册") - public AjaxResult register(@Validated @RequestBody SysUser user) { - if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(user.getUserName()))) { - return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,登录账号已存在"); - } else if (StringUtils.isNotEmpty(user.getPhonenumber()) - && UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user))) { - return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,手机号码已存在"); - } else if (StringUtils.isNotEmpty(user.getEmail()) - && UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user))) { - return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,邮箱账号已存在"); - } - user.setDelFlag("0"); - user.setPassword(SecurityUtils.encryptPassword(user.getPassword())); - return toAjax(userService.insertUser(user)); - } - - /** - * 修改用户 - */ - @ApiOperation(value = "修改用户", notes = "修改用户") - @PreAuthorize("@ss.hasPermi('system:user:edit')") - @Log(title = "用户管理", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@Validated @RequestBody SysUser user) { - userService.checkUserAllowed(user); - if (StringUtils.isNotEmpty(user.getPhonenumber()) - && UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user))) { - return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,手机号码已存在"); - } else if (StringUtils.isNotEmpty(user.getEmail()) - && UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user))) { - return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在"); - } - user.setUpdateBy(SecurityUtils.getUsername()); - return toAjax(userService.updateUser(user)); - } - - /** - * 删除用户 - */ - @ApiOperation(value = "删除用户", notes = "删除用户") - @PreAuthorize("@ss.hasPermi('system:user:remove')") - @Log(title = "用户管理", businessType = BusinessType.DELETE) - @DeleteMapping("/{userIds}") - public AjaxResult remove(@PathVariable Long[] userIds) { - return toAjax(userService.deleteUserByIds(userIds)); - } - - /** - * 重置密码 - */ - @ApiOperation(value = "重置密码", notes = "重置密码") - @PreAuthorize("@ss.hasPermi('system:user:resetPwd')") - @Log(title = "用户管理", businessType = BusinessType.UPDATE) - @PutMapping("/resetPwd") - public AjaxResult resetPwd(@RequestBody SysUser user) { - userService.checkUserAllowed(user); - user.setPassword(SecurityUtils.encryptPassword(user.getPassword())); - user.setUpdateBy(SecurityUtils.getUsername()); - return toAjax(userService.resetPwd(user)); - } - - /** - * 状态修改 - */ - @ApiOperation(value = "状态修改", notes = "状态修改") - @PreAuthorize("@ss.hasPermi('system:user:edit')") - @Log(title = "用户管理", businessType = BusinessType.UPDATE) - @PutMapping("/changeStatus") - public AjaxResult changeStatus(@RequestBody SysUser user) { - userService.checkUserAllowed(user); - user.setUpdateBy(SecurityUtils.getUsername()); - return toAjax(userService.updateUserStatus(user)); - } -} diff --git a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/SwaggerController.java b/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/SwaggerController.java deleted file mode 100644 index b79c15f4..00000000 --- a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/SwaggerController.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.ruoyi.web.controller.tool; - -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import com.ruoyi.common.core.controller.BaseController; - -/** - * swagger 接口 - * - * @author ruoyi - */ -@Controller -@RequestMapping("/tool/swagger") -public class SwaggerController extends BaseController { - @PreAuthorize("@ss.hasPermi('tool:swagger:view')") - @GetMapping() - public String index() { - return redirect("/swagger-ui.html"); - } -} diff --git a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/TestController.java b/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/TestController.java deleted file mode 100644 index 9e94bda1..00000000 --- a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/TestController.java +++ /dev/null @@ -1,151 +0,0 @@ -package com.ruoyi.web.controller.tool; - -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.utils.StringUtils; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiImplicitParam; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import io.swagger.annotations.ApiOperation; - -/** - * swagger 用户测试方法 - * - * @author ruoyi - */ -@Api("用户信息管理") -@RestController -@RequestMapping("/test/user") -public class TestController extends BaseController { - private final static Map users = new LinkedHashMap(); - - { - users.put(1, new UserEntity(1, "admin", "admin123", "15888888888")); - users.put(2, new UserEntity(2, "ry", "admin123", "15666666666")); - } - - @ApiOperation("获取用户列表") - @GetMapping("/list") - public AjaxResult userList() { - List userList = new ArrayList(users.values()); - return AjaxResult.success(userList); - } - - @ApiOperation("获取用户详细") - @ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path") - @GetMapping("/{userId}") - public AjaxResult getUser(@PathVariable Integer userId) { - if (!users.isEmpty() && users.containsKey(userId)) { - return AjaxResult.success(users.get(userId)); - } else { - return AjaxResult.error("用户不存在"); - } - } - - @ApiOperation("新增用户") - @ApiImplicitParam(name = "userEntity", value = "新增用户信息", dataType = "UserEntity") - @PostMapping("/save") - public AjaxResult save(UserEntity user) { - if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId())) { - return AjaxResult.error("用户ID不能为空"); - } - return AjaxResult.success(users.put(user.getUserId(), user)); - } - - @ApiOperation("更新用户") - @ApiImplicitParam(name = "userEntity", value = "新增用户信息", dataType = "UserEntity") - @PutMapping("/update") - public AjaxResult update(UserEntity user) { - if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId())) { - return AjaxResult.error("用户ID不能为空"); - } - if (users.isEmpty() || !users.containsKey(user.getUserId())) { - return AjaxResult.error("用户不存在"); - } - users.remove(user.getUserId()); - return AjaxResult.success(users.put(user.getUserId(), user)); - } - - @ApiOperation("删除用户信息") - @ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path") - @DeleteMapping("/{userId}") - public AjaxResult delete(@PathVariable Integer userId) { - if (!users.isEmpty() && users.containsKey(userId)) { - users.remove(userId); - return AjaxResult.success(); - } else { - return AjaxResult.error("用户不存在"); - } - } -} - -@ApiModel("用户实体") -class UserEntity { - @ApiModelProperty("用户ID") - private Integer userId; - - @ApiModelProperty("用户名称") - private String username; - - @ApiModelProperty("用户密码") - private String password; - - @ApiModelProperty("用户手机") - private String mobile; - - public UserEntity() { - - } - - public UserEntity(Integer userId, String username, String password, String mobile) { - this.userId = userId; - this.username = username; - this.password = password; - this.mobile = mobile; - } - - public Integer getUserId() { - return userId; - } - - public void setUserId(Integer userId) { - this.userId = userId; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - public String getMobile() { - return mobile; - } - - public void setMobile(String mobile) { - this.mobile = mobile; - } -} diff --git a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java b/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java deleted file mode 100644 index 5ea47cd5..00000000 --- a/spring-boot/ruoyi-admin/src/main/java/com/ruoyi/web/core/config/SwaggerConfig.java +++ /dev/null @@ -1,126 +0,0 @@ -package com.ruoyi.web.core.config; - -import java.util.ArrayList; -import java.util.List; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import com.ruoyi.common.config.RuoYiConfig; -import io.swagger.annotations.ApiOperation; -import springfox.documentation.builders.ApiInfoBuilder; -import springfox.documentation.builders.PathSelectors; -import springfox.documentation.builders.RequestHandlerSelectors; -import springfox.documentation.service.ApiInfo; -import springfox.documentation.service.ApiKey; -import springfox.documentation.service.AuthorizationScope; -import springfox.documentation.service.Contact; -import springfox.documentation.service.SecurityReference; -import springfox.documentation.spi.DocumentationType; -import springfox.documentation.spi.service.contexts.SecurityContext; -import springfox.documentation.spring.web.plugins.Docket; -import springfox.documentation.swagger2.annotations.EnableSwagger2; - -/** - * Swagger2的接口配置 - * - * @author ruoyi - */ -@Configuration -@EnableSwagger2 -public class SwaggerConfig { - /** - * 系统基础配置 - */ - @Autowired - private RuoYiConfig ruoyiConfig; - - /** - * 是否开启swagger - */ - @Value("${swagger.enabled}") - private boolean enabled; - - /** - * 设置请求的统一前缀 - */ - @Value("${swagger.pathMapping}") - private String pathMapping; - - /** - * 创建API - */ - @Bean - public Docket createRestApi() { - return new Docket(DocumentationType.SWAGGER_2) - // 是否启用Swagger - .enable(enabled) - // 用来创建该API的基本信息,展示在文档的页面中(自定义展示的信息) - .apiInfo(apiInfo()) - // 设置哪些接口暴露给Swagger展示 - .select() - // 扫描所有有注解的api,用这种方式更灵活 - .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class)) - // 扫描指定包中的swagger注解 - // .apis(RequestHandlerSelectors.basePackage("com.ruoyi.project.tool.swagger")) - // 扫描所有 .apis(RequestHandlerSelectors.any()) - .paths(PathSelectors.any()) - .build() - /* 设置安全模式,swagger可以设置访问token */ - .securitySchemes(securitySchemes()) - .securityContexts(securityContexts()) - .pathMapping(pathMapping); - } - - /** - * 安全模式,这里指定token通过Authorization头请求头传递 - */ - private List securitySchemes() { - List apiKeyList = new ArrayList(); - apiKeyList.add(new ApiKey("Authorization", "Authorization", "header")); - return apiKeyList; - } - - /** - * 安全上下文 - */ - private List securityContexts() { - List securityContexts = new ArrayList<>(); - securityContexts.add( - SecurityContext.builder() - .securityReferences(defaultAuth()) - .forPaths(PathSelectors.regex("^(?!auth).*$")) - .build()); - return securityContexts; - } - - /** - * 默认的安全上引用 - */ - private List defaultAuth() { - AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything"); - AuthorizationScope[] authorizationScopes = new AuthorizationScope[1]; - authorizationScopes[0] = authorizationScope; - List securityReferences = new ArrayList<>(); - securityReferences.add(new SecurityReference("Authorization", authorizationScopes)); - return securityReferences; - } - - /** - * 添加摘要信息 - */ - private ApiInfo apiInfo() { - // 用ApiInfoBuilder进行定制 - return new ApiInfoBuilder() - // 设置标题 - .title("标题:物美智能设备_接口文档") - // 描述 - .description("描述:物联网模块接口") - // 作者信息 - .contact(new Contact(ruoyiConfig.getName(), null, null)) - // 版本 - .version("版本号:" + ruoyiConfig.getVersion()) - .build(); - } -} diff --git a/spring-boot/ruoyi-admin/src/main/resources/META-INF/spring-devtools.properties b/spring-boot/ruoyi-admin/src/main/resources/META-INF/spring-devtools.properties deleted file mode 100644 index 2b23f85a..00000000 --- a/spring-boot/ruoyi-admin/src/main/resources/META-INF/spring-devtools.properties +++ /dev/null @@ -1 +0,0 @@ -restart.include.json=/com.alibaba.fastjson.*.jar \ No newline at end of file diff --git a/spring-boot/ruoyi-admin/src/main/resources/application-druid.yml b/spring-boot/ruoyi-admin/src/main/resources/application-druid.yml deleted file mode 100644 index be3184d8..00000000 --- a/spring-boot/ruoyi-admin/src/main/resources/application-druid.yml +++ /dev/null @@ -1,57 +0,0 @@ -# 数据源配置 -spring: - datasource: - type: com.alibaba.druid.pool.DruidDataSource - driverClassName: com.mysql.cj.jdbc.Driver - druid: - # 主库数据源 - master: - url: jdbc:mysql://localhost:3306/wumei-smart?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 - username: root - password: root - # 从库数据源 - slave: - # 从数据源开关/默认关闭 - enabled: false - url: - username: - password: - # 初始连接数 - initialSize: 5 - # 最小连接池数量 - minIdle: 10 - # 最大连接池数量 - maxActive: 20 - # 配置获取连接等待超时的时间 - maxWait: 60000 - # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 - timeBetweenEvictionRunsMillis: 60000 - # 配置一个连接在池中最小生存的时间,单位是毫秒 - minEvictableIdleTimeMillis: 300000 - # 配置一个连接在池中最大生存的时间,单位是毫秒 - maxEvictableIdleTimeMillis: 900000 - # 配置检测连接是否有效 - validationQuery: SELECT 1 FROM DUAL - testWhileIdle: true - testOnBorrow: false - testOnReturn: false - webStatFilter: - enabled: true - statViewServlet: - enabled: true - # 设置白名单,不填则允许所有访问 - allow: - url-pattern: /druid/* - # 控制台管理用户名和密码 - login-username: - login-password: - filter: - stat: - enabled: true - # 慢SQL记录 - log-slow-sql: true - slow-sql-millis: 1000 - merge-sql: true - wall: - config: - multi-statement-allow: true diff --git a/spring-boot/ruoyi-admin/src/main/resources/application.yml b/spring-boot/ruoyi-admin/src/main/resources/application.yml deleted file mode 100644 index 1f620734..00000000 --- a/spring-boot/ruoyi-admin/src/main/resources/application.yml +++ /dev/null @@ -1,146 +0,0 @@ -# 项目相关配置 -ruoyi: - # 名称 - name: RuoYi - # 版本 - version: 3.4.0 - # 版权年份 - copyrightYear: 2021 - # 实例演示开关 - demoEnabled: true - # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath) - profile: D:/ruoyi/uploadPath - # 获取ip地址开关 - addressEnabled: false - # 验证码类型 math 数组计算 char 字符验证 - captchaType: math - -# 开发环境配置 -server: - # 服务器的HTTP端口,默认为8080 - port: 8080 - servlet: - # 应用的访问路径 - context-path: / - tomcat: - # tomcat的URI编码 - uri-encoding: UTF-8 - # tomcat最大线程数,默认为200 - max-threads: 800 - # Tomcat启动初始化的线程数,默认值25 - min-spare-threads: 30 - -# 日志配置 -logging: - level: - com.ruoyi: debug - org.springframework: warn - -# Spring配置 -spring: - # 资源信息 - messages: - # 国际化资源文件路径 - basename: i18n/messages - profiles: - active: druid - # 文件上传 - servlet: - multipart: - # 单个文件大小 - max-file-size: 10MB - # 设置总上传的文件大小 - max-request-size: 20MB - # 服务模块 - devtools: - restart: - # 热部署开关 - enabled: true - # redis 配置 - redis: - # 地址 - host: localhost - # 端口,默认为6379 - port: 6379 - # 数据库索引 - database: 0 - # 密码 - password: - # 连接超时时间 - timeout: 10s - lettuce: - pool: - # 连接池中的最小空闲连接 - min-idle: 0 - # 连接池中的最大空闲连接 - max-idle: 8 - # 连接池的最大数据库连接数 - max-active: 8 - # #连接池最大阻塞等待时间(使用负值表示没有限制) - max-wait: -1ms - - mqtt: - username: admin # 账号 - password: admin # 密码 - host-url: tcp://localhost:1883 # mqtt连接tcp地址 - client-id: server-wumei-${random.value} # 客户端Id,每个启动的id要不同 随机:${random.value} - default-topic: test # 默认主题 - timeout: 100 # 超时时间 - keepalive: 100 # 保持连接数 - -# token配置 -token: - # 令牌自定义标识 - header: Authorization - # 令牌密钥 - secret: abcdefghijklmnopqrstuvwxyz - # 令牌有效期(默认30分钟,设置为1周过期) - expireTime: 10000 - -# MyBatis配置 -mybatis: - # 搜索指定包别名 - typeAliasesPackage: com.ruoyi.**.domain - # 配置mapper的扫描,找到所有的mapper.xml映射文件 - mapperLocations: classpath*:mapper/**/*Mapper.xml - # 加载全局的配置文件 - configLocation: classpath:mybatis/mybatis-config.xml - -# PageHelper分页插件 -pagehelper: - helperDialect: mysql - reasonable: false - supportMethodsArguments: true - params: count=countSql - -# Swagger配置 -swagger: - # 是否开启swagger - enabled: true - # 请求前缀 - pathMapping: /dev-api - -# 防止XSS攻击 -xss: - # 过滤开关 - enabled: true - # 排除链接(多个用逗号分隔) - excludes: /system/notice/* - # 匹配链接 - urlPatterns: /system/*,/monitor/*,/tool/* - -# 公众号配置(必填) -wx: - miniapp: - appid: appid # # - appSecret: appSecret # # - config-storage: - type: Memory # 配置类型: Memory(默认), Jedis, RedisTemplate - key-prefix: wa # 相关redis前缀配置: wa(默认) - redis: - host: 127.0.0.1 - port: 6379 - passowrd: - # http客户端配置 - http-client-type: HttpClient # http客户端类型: HttpClient(默认), OkHttp, JoddHttp - diff --git a/spring-boot/ruoyi-admin/src/main/resources/banner.txt b/spring-boot/ruoyi-admin/src/main/resources/banner.txt deleted file mode 100644 index 0931cb84..00000000 --- a/spring-boot/ruoyi-admin/src/main/resources/banner.txt +++ /dev/null @@ -1,24 +0,0 @@ -Application Version: ${ruoyi.version} -Spring Boot Version: ${spring-boot.version} -//////////////////////////////////////////////////////////////////// -// _ooOoo_ // -// o8888888o // -// 88" . "88 // -// (| ^_^ |) // -// O\ = /O // -// ____/`---'\____ // -// .' \\| |// `. // -// / \\||| : |||// \ // -// / _||||| -:- |||||- \ // -// | | \\\ - /// | | // -// | \_| ''\---/'' | | // -// \ .-\__ `-` ___/-. / // -// ___`. .' /--.--\ `. . ___ // -// ."" '< `.___\_<|>_/___.' >'"". // -// | | : `- \`.;`\ _ /`;.`/ - ` : | | // -// \ \ `-. \_ __\ /__ _/ .-` / / // -// ========`-.____`-.___\_____/___.-`____.-'======== // -// `=---=' // -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// 佛祖保佑 永不宕机 永无BUG // -//////////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/spring-boot/ruoyi-admin/src/main/resources/i18n/messages.properties b/spring-boot/ruoyi-admin/src/main/resources/i18n/messages.properties deleted file mode 100644 index 46f023be..00000000 --- a/spring-boot/ruoyi-admin/src/main/resources/i18n/messages.properties +++ /dev/null @@ -1,31 +0,0 @@ -#错误消息 -not.null=* 必须填写 -user.jcaptcha.error=验证码错误 -user.jcaptcha.expire=验证码已失效 -user.not.exists=用户不存在/密码错误 -user.password.not.match=用户不存在/密码错误 -user.password.retry.limit.count=密码输入错误{0}次 -user.password.retry.limit.exceed=密码输入错误{0}次,帐户锁定10分钟 -user.password.delete=对不起,您的账号已被删除 -user.blocked=用户已封禁,请联系管理员 -role.blocked=角色已封禁,请联系管理员 -user.logout.success=退出成功 -length.not.valid=长度必须在{min}到{max}个字符之间 -user.username.not.valid=* 2到20个汉字、字母、数字或下划线组成,且必须以非数字开头 -user.password.not.valid=* 5-50个字符 -user.email.not.valid=邮箱格式错误 -user.mobile.phone.number.not.valid=手机号格式错误 -user.login.success=登录成功 -user.notfound=请重新登录 -user.forcelogout=管理员强制退出,请重新登录 -user.unknown.error=未知错误,请重新登录 -##文件上传消息 -upload.exceed.maxSize=上传的文件大小超出限制的文件大小!
允许的文件最大大小是:{0}MB! -upload.filename.exceed.length=上传的文件名最长{0}个字符 -##权限 -no.permission=您没有数据的权限,请联系管理员添加权限 [{0}] -no.create.permission=您没有创建数据的权限,请联系管理员添加权限 [{0}] -no.update.permission=您没有修改数据的权限,请联系管理员添加权限 [{0}] -no.delete.permission=您没有删除数据的权限,请联系管理员添加权限 [{0}] -no.export.permission=您没有导出数据的权限,请联系管理员添加权限 [{0}] -no.view.permission=您没有查看数据的权限,请联系管理员添加权限 [{0}] diff --git a/spring-boot/ruoyi-admin/src/main/resources/logback.xml b/spring-boot/ruoyi-admin/src/main/resources/logback.xml deleted file mode 100644 index 7793b8d8..00000000 --- a/spring-boot/ruoyi-admin/src/main/resources/logback.xml +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - ${log.pattern} - - - - - - ${log.path}/sys-info.log - - - - ${log.path}/sys-info.%d{yyyy-MM-dd}.log - - 60 - - - ${log.pattern} - - - - INFO - - ACCEPT - - DENY - - - - - ${log.path}/sys-error.log - - - - ${log.path}/sys-error.%d{yyyy-MM-dd}.log - - 60 - - - ${log.pattern} - - - - ERROR - - ACCEPT - - DENY - - - - - - ${log.path}/sys-user.log - - - ${log.path}/sys-user.%d{yyyy-MM-dd}.log - - 60 - - - ${log.pattern} - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-boot/ruoyi-admin/src/main/resources/mybatis/mybatis-config.xml b/spring-boot/ruoyi-admin/src/main/resources/mybatis/mybatis-config.xml deleted file mode 100644 index 55005995..00000000 --- a/spring-boot/ruoyi-admin/src/main/resources/mybatis/mybatis-config.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - diff --git a/spring-boot/ruoyi-common/pom.xml b/spring-boot/ruoyi-common/pom.xml deleted file mode 100644 index e6d5e8e0..00000000 --- a/spring-boot/ruoyi-common/pom.xml +++ /dev/null @@ -1,149 +0,0 @@ - - - - ruoyi - com.ruoyi - 3.4.0 - - 4.0.0 - - ruoyi-common - - - common通用工具 - - - - - - - org.springframework - spring-context-support - - - - - org.springframework - spring-web - - - - - org.springframework.boot - spring-boot-starter-security - - - - - com.github.pagehelper - pagehelper-spring-boot-starter - - - - - javax.validation - validation-api - - - - - org.apache.commons - commons-lang3 - - - - - com.fasterxml.jackson.core - jackson-databind - - - - - com.alibaba - fastjson - - - - - commons-io - commons-io - - - - - commons-fileupload - commons-fileupload - - - - - org.apache.poi - poi-ooxml - - - - - org.yaml - snakeyaml - - - - - io.jsonwebtoken - jjwt - - - - - org.springframework.boot - spring-boot-starter-data-redis - - - - - org.apache.commons - commons-pool2 - - - - - eu.bitwalker - UserAgentUtils - - - - - javax.servlet - javax.servlet-api - - - org.projectlombok - lombok - - - org.projectlombok - lombok - 1.18.20 - - - com.github.binarywang - weixin-java-miniapp - 4.1.5.B - compile - - - com.github.binarywang - weixin-java-miniapp - 4.1.5.B - - - com.github.binarywang - weixin-java-mp - 4.1.5.B - - - - - \ No newline at end of file diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/DataScope.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/DataScope.java deleted file mode 100644 index b0d4b7ff..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/DataScope.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.ruoyi.common.annotation; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * 数据权限过滤注解 - * - * @author ruoyi - */ -@Target(ElementType.METHOD) -@Retention(RetentionPolicy.RUNTIME) -@Documented -public @interface DataScope { - /** - * 部门表的别名 - */ - public String deptAlias() default ""; - - /** - * 用户表的别名 - */ - public String userAlias() default ""; -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/DataSource.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/DataSource.java deleted file mode 100644 index 48f6ffdb..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/DataSource.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.ruoyi.common.annotation; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Inherited; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -import com.ruoyi.common.enums.DataSourceType; - -/** - * 自定义多数据源切换注解 - *

- * 优先级:先方法,后类,如果方法覆盖了类上的数据源类型,以方法的为准,否则以类上的为准 - * - * @author ruoyi - */ -@Target({ElementType.METHOD, ElementType.TYPE}) -@Retention(RetentionPolicy.RUNTIME) -@Documented -@Inherited -public @interface DataSource { - /** - * 切换数据源名称 - */ - public DataSourceType value() default DataSourceType.MASTER; -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/Excel.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/Excel.java deleted file mode 100644 index c21655e8..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/Excel.java +++ /dev/null @@ -1,155 +0,0 @@ -package com.ruoyi.common.annotation; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; -import java.math.BigDecimal; - -/** - * 自定义导出Excel数据注解 - * - * @author ruoyi - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.FIELD) -public @interface Excel { - /** - * 导出时在excel中排序 - */ - public int sort() default Integer.MAX_VALUE; - - /** - * 导出到Excel中的名字. - */ - public String name() default ""; - - /** - * 日期格式, 如: yyyy-MM-dd - */ - public String dateFormat() default ""; - - /** - * 如果是字典类型,请设置字典的type值 (如: sys_user_sex) - */ - public String dictType() default ""; - - /** - * 读取内容转表达式 (如: 0=男,1=女,2=未知) - */ - public String readConverterExp() default ""; - - /** - * 分隔符,读取字符串组内容 - */ - public String separator() default ","; - - /** - * BigDecimal 精度 默认:-1(默认不开启BigDecimal格式化) - */ - public int scale() default -1; - - /** - * BigDecimal 舍入规则 默认:BigDecimal.ROUND_HALF_EVEN - */ - public int roundingMode() default BigDecimal.ROUND_HALF_EVEN; - - /** - * 导出类型(0数字 1字符串) - */ - public ColumnType cellType() default ColumnType.STRING; - - /** - * 导出时在excel中每个列的高度 单位为字符 - */ - public double height() default 14; - - /** - * 导出时在excel中每个列的宽 单位为字符 - */ - public double width() default 16; - - /** - * 文字后缀,如% 90 变成90% - */ - public String suffix() default ""; - - /** - * 当值为空时,字段的默认值 - */ - public String defaultValue() default ""; - - /** - * 提示信息 - */ - public String prompt() default ""; - - /** - * 设置只能选择不能输入的列内容. - */ - public String[] combo() default {}; - - /** - * 是否导出数据,应对需求:有时我们需要导出一份模板,这是标题需要但内容需要用户手工填写. - */ - public boolean isExport() default true; - - /** - * 另一个类中的属性名称,支持多级获取,以小数点隔开 - */ - public String targetAttr() default ""; - - /** - * 是否自动统计数据,在最后追加一行统计数据总和 - */ - public boolean isStatistics() default false; - - /** - * 导出字段对齐方式(0:默认;1:靠左;2:居中;3:靠右) - */ - Align align() default Align.AUTO; - - public enum Align { - AUTO(0), LEFT(1), CENTER(2), RIGHT(3); - private final int value; - - Align(int value) { - this.value = value; - } - - public int value() { - return this.value; - } - } - - /** - * 字段类型(0:导出导入;1:仅导出;2:仅导入) - */ - Type type() default Type.ALL; - - public enum Type { - ALL(0), EXPORT(1), IMPORT(2); - private final int value; - - Type(int value) { - this.value = value; - } - - public int value() { - return this.value; - } - } - - public enum ColumnType { - NUMERIC(0), STRING(1), IMAGE(2); - private final int value; - - ColumnType(int value) { - this.value = value; - } - - public int value() { - return this.value; - } - } -} \ No newline at end of file diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/Excels.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/Excels.java deleted file mode 100644 index 271210ef..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/Excels.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.ruoyi.common.annotation; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Excel注解集 - * - * @author ruoyi - */ -@Target(ElementType.FIELD) -@Retention(RetentionPolicy.RUNTIME) -public @interface Excels { - Excel[] value(); -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/Log.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/Log.java deleted file mode 100644 index a8683c8a..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/Log.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.ruoyi.common.annotation; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.common.enums.OperatorType; - -/** - * 自定义操作日志记录注解 - * - * @author ruoyi - */ -@Target({ElementType.PARAMETER, ElementType.METHOD}) -@Retention(RetentionPolicy.RUNTIME) -@Documented -public @interface Log { - /** - * 模块 - */ - public String title() default ""; - - /** - * 功能 - */ - public BusinessType businessType() default BusinessType.OTHER; - - /** - * 操作人类别 - */ - public OperatorType operatorType() default OperatorType.MANAGE; - - /** - * 是否保存请求的参数 - */ - public boolean isSaveRequestData() default true; -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/RepeatSubmit.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/RepeatSubmit.java deleted file mode 100644 index 29c667f8..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/annotation/RepeatSubmit.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.ruoyi.common.annotation; - -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Inherited; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * 自定义注解防止表单重复提交 - * - * @author ruoyi - */ -@Inherited -@Target(ElementType.METHOD) -@Retention(RetentionPolicy.RUNTIME) -@Documented -public @interface RepeatSubmit { - -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/config/RuoYiConfig.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/config/RuoYiConfig.java deleted file mode 100644 index efc85bdb..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/config/RuoYiConfig.java +++ /dev/null @@ -1,112 +0,0 @@ -package com.ruoyi.common.config; - -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.stereotype.Component; - -/** - * 读取项目相关配置 - * - * @author ruoyi - */ -@Component -@ConfigurationProperties(prefix = "ruoyi") -public class RuoYiConfig { - /** - * 项目名称 - */ - private String name; - - /** - * 版本 - */ - private String version; - - /** - * 版权年份 - */ - private String copyrightYear; - - /** - * 实例演示开关 - */ - private boolean demoEnabled; - - /** - * 上传路径 - */ - private static String profile; - - /** - * 获取地址开关 - */ - private static boolean addressEnabled; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getVersion() { - return version; - } - - public void setVersion(String version) { - this.version = version; - } - - public String getCopyrightYear() { - return copyrightYear; - } - - public void setCopyrightYear(String copyrightYear) { - this.copyrightYear = copyrightYear; - } - - public boolean isDemoEnabled() { - return demoEnabled; - } - - public void setDemoEnabled(boolean demoEnabled) { - this.demoEnabled = demoEnabled; - } - - public static String getProfile() { - return profile; - } - - public void setProfile(String profile) { - RuoYiConfig.profile = profile; - } - - public static boolean isAddressEnabled() { - return addressEnabled; - } - - public void setAddressEnabled(boolean addressEnabled) { - RuoYiConfig.addressEnabled = addressEnabled; - } - - /** - * 获取头像上传路径 - */ - public static String getAvatarPath() { - return getProfile() + "/avatar"; - } - - /** - * 获取下载路径 - */ - public static String getDownloadPath() { - return getProfile() + "/download/"; - } - - /** - * 获取上传路径 - */ - public static String getUploadPath() { - return getProfile() + "/upload"; - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/config/WxConfig.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/config/WxConfig.java deleted file mode 100644 index b07732cc..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/config/WxConfig.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.ruoyi.common.config; - -import cn.binarywang.wx.miniapp.api.WxMaService; -import cn.binarywang.wx.miniapp.api.impl.WxMaServiceImpl; -import cn.binarywang.wx.miniapp.config.WxMaConfig; -import cn.binarywang.wx.miniapp.config.impl.WxMaDefaultConfigImpl; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -@Configuration -public class WxConfig { - - @Autowired - private WxProperties properties; - - @Bean - public WxMaConfig wxMaConfig() { - WxMaDefaultConfigImpl config = new WxMaDefaultConfigImpl(); - - config.setAppid(properties.getAppId()); - config.setSecret(properties.getAppSecret()); - return config; - } - - @Bean - public WxMaService wxMaService(WxMaConfig maConfig) { - WxMaService service = new WxMaServiceImpl(); - service.setWxMaConfig(maConfig); - return service; - } - -} - - - diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/config/WxMpConfig.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/config/WxMpConfig.java deleted file mode 100644 index 71531c32..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/config/WxMpConfig.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.ruoyi.common.config; - -import com.ruoyi.common.constant.Constants; -import me.chanjar.weixin.mp.api.WxMpQrcodeService; -import me.chanjar.weixin.mp.api.WxMpService; -import me.chanjar.weixin.mp.api.impl.WxMpQrcodeServiceImpl; -import me.chanjar.weixin.mp.api.impl.WxMpServiceImpl; -import me.chanjar.weixin.mp.config.WxMpConfigStorage; -import me.chanjar.weixin.mp.config.impl.WxMpDefaultConfigImpl; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -/** - * 类名: WxConfig - * 描述: TODO - * 时间: 2021/1/10 13:08 - * 开发人: admin - */ -@Configuration -public class WxMpConfig { - - @Bean - public WxMpConfigStorage wxMpConfigStorage() { - - WxMpDefaultConfigImpl wxMpInMemoryConfigStorage = new WxMpDefaultConfigImpl(); - //设置appid 这个在项目中肯定是通过配置来实现 - wxMpInMemoryConfigStorage.setAppId(Constants.wxAppId); - //设置密码 - wxMpInMemoryConfigStorage.setSecret(Constants.wxAppSecret); - return wxMpInMemoryConfigStorage; - - } - - @Bean//文档中需要用到这个对象 - public WxMpService wxMpService() { - WxMpServiceImpl wxMpService = new WxMpServiceImpl(); - //设置微信配置的存储 - wxMpService.setWxMpConfigStorage(wxMpConfigStorage()); - return wxMpService; - - } - - @Bean//文档中需要用到这个对象 - public WxMpQrcodeService wxMpQrcodeService() { - WxMpQrcodeService wxMpQrcodeService = new WxMpQrcodeServiceImpl(wxMpService()); - //设置微信配置的存储 - return wxMpQrcodeService; - - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/config/WxProperties.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/config/WxProperties.java deleted file mode 100644 index 05fb732c..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/config/WxProperties.java +++ /dev/null @@ -1,69 +0,0 @@ -package com.ruoyi.common.config; - -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.context.annotation.Configuration; - -@Configuration -@ConfigurationProperties(prefix = "wx.miniapp") -public class WxProperties { - - private String appId; - - private String appSecret; - - private String mchId; - - private String mchKey; - - private String notifyUrl; - - private String keyPath; - - public String getNotifyUrl() { - return notifyUrl; - } - - public void setNotifyUrl(String notifyUrl) { - this.notifyUrl = notifyUrl; - } - - public String getMchKey() { - return mchKey; - } - - public void setMchKey(String mchKey) { - this.mchKey = mchKey; - } - - public String getAppId() { - return this.appId; - } - - public void setAppId(String appId) { - this.appId = appId; - } - - public String getAppSecret() { - return appSecret; - } - - public void setAppSecret(String appSecret) { - this.appSecret = appSecret; - } - - public String getMchId() { - return mchId; - } - - public void setMchId(String mchId) { - this.mchId = mchId; - } - - public String getKeyPath() { - return keyPath; - } - - public void setKeyPath(String keyPath) { - this.keyPath = keyPath; - } -} \ No newline at end of file diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java deleted file mode 100644 index 9cb56056..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/constant/Constants.java +++ /dev/null @@ -1,132 +0,0 @@ -package com.ruoyi.common.constant; - -/** - * 通用常量信息 - * - * @author ruoyi - */ -public class Constants { - /** - * UTF-8 字符集 - */ - public static final String UTF8 = "UTF-8"; - - /** - * GBK 字符集 - */ - public static final String GBK = "GBK"; - - /** - * http请求 - */ - public static final String HTTP = "http://"; - - /** - * https请求 - */ - public static final String HTTPS = "https://"; - - /** - * 通用成功标识 - */ - public static final String SUCCESS = "0"; - - /** - * 通用失败标识 - */ - public static final String FAIL = "1"; - - /** - * 登录成功 - */ - public static final String LOGIN_SUCCESS = "Success"; - - /** - * 注销 - */ - public static final String LOGOUT = "Logout"; - - /** - * 登录失败 - */ - public static final String LOGIN_FAIL = "Error"; - - /** - * 验证码 redis key - */ - public static final String CAPTCHA_CODE_KEY = "captcha_codes:"; - - /** - * 登录用户 redis key - */ - public static final String LOGIN_TOKEN_KEY = "login_tokens:"; - - /** - * 防重提交 redis key - */ - public static final String REPEAT_SUBMIT_KEY = "repeat_submit:"; - - /** - * 验证码有效期(分钟) - */ - public static final Integer CAPTCHA_EXPIRATION = 2; - - /** - * 令牌 - */ - public static final String TOKEN = "token"; - - /** - * 令牌前缀 - */ - public static final String TOKEN_PREFIX = "Bearer "; - - /** - * 令牌前缀 - */ - public static final String LOGIN_USER_KEY = "login_user_key"; - - /** - * 用户ID - */ - public static final String JWT_USERID = "userid"; - - /** - * 用户名称 - */ - public static final String JWT_USERNAME = "sub"; - - /** - * 用户头像 - */ - public static final String JWT_AVATAR = "avatar"; - - /** - * 创建时间 - */ - public static final String JWT_CREATED = "created"; - - /** - * 用户权限 - */ - public static final String JWT_AUTHORITIES = "authorities"; - - /** - * 参数管理 cache key - */ - public static final String SYS_CONFIG_KEY = "sys_config:"; - - /** - * 字典管理 cache key - */ - public static final String SYS_DICT_KEY = "sys_dict:"; - - /** - * 资源映射路径 前缀 - */ - public static final String RESOURCE_PREFIX = "/profile"; - public static final String DEFAULT_AVATAR = "https://c-ssl.duitang.com/uploads/item/201912/27/20191227145714_rtHRc.thumb.1000_0.jpeg"; - - public static String wxAppId = "wx00e680cbf69d159c"; - public static String wxAppSecret = "4902e0e4470663112f505f498b036c55"; -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/constant/GenConstants.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/constant/GenConstants.java deleted file mode 100644 index c831bd7f..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/constant/GenConstants.java +++ /dev/null @@ -1,181 +0,0 @@ -package com.ruoyi.common.constant; - -/** - * 代码生成通用常量 - * - * @author ruoyi - */ -public class GenConstants { - /** - * 单表(增删改查) - */ - public static final String TPL_CRUD = "crud"; - - /** - * 树表(增删改查) - */ - public static final String TPL_TREE = "tree"; - - /** - * 主子表(增删改查) - */ - public static final String TPL_SUB = "sub"; - - /** - * 树编码字段 - */ - public static final String TREE_CODE = "treeCode"; - - /** - * 树父编码字段 - */ - public static final String TREE_PARENT_CODE = "treeParentCode"; - - /** - * 树名称字段 - */ - public static final String TREE_NAME = "treeName"; - - /** - * 上级菜单ID字段 - */ - public static final String PARENT_MENU_ID = "parentMenuId"; - - /** - * 上级菜单名称字段 - */ - public static final String PARENT_MENU_NAME = "parentMenuName"; - - /** - * 数据库字符串类型 - */ - public static final String[] COLUMNTYPE_STR = {"char", "varchar", "nvarchar", "varchar2"}; - - /** - * 数据库文本类型 - */ - public static final String[] COLUMNTYPE_TEXT = {"tinytext", "text", "mediumtext", "longtext"}; - - /** - * 数据库时间类型 - */ - public static final String[] COLUMNTYPE_TIME = {"datetime", "time", "date", "timestamp"}; - - /** - * 数据库数字类型 - */ - public static final String[] COLUMNTYPE_NUMBER = {"tinyint", "smallint", "mediumint", "int", "number", "integer", - "bit", "bigint", "float", "double", "decimal"}; - - /** - * 页面不需要编辑字段 - */ - public static final String[] COLUMNNAME_NOT_EDIT = {"id", "create_by", "create_time", "del_flag"}; - - /** - * 页面不需要显示的列表字段 - */ - public static final String[] COLUMNNAME_NOT_LIST = {"id", "create_by", "create_time", "del_flag", "update_by", - "update_time"}; - - /** - * 页面不需要查询字段 - */ - public static final String[] COLUMNNAME_NOT_QUERY = {"id", "create_by", "create_time", "del_flag", "update_by", - "update_time", "remark"}; - - /** - * Entity基类字段 - */ - public static final String[] BASE_ENTITY = {"createBy", "createTime", "updateBy", "updateTime", "remark"}; - - /** - * Tree基类字段 - */ - public static final String[] TREE_ENTITY = {"parentName", "parentId", "orderNum", "ancestors", "children"}; - - /** - * 文本框 - */ - public static final String HTML_INPUT = "input"; - - /** - * 文本域 - */ - public static final String HTML_TEXTAREA = "textarea"; - - /** - * 下拉框 - */ - public static final String HTML_SELECT = "select"; - - /** - * 单选框 - */ - public static final String HTML_RADIO = "radio"; - - /** - * 复选框 - */ - public static final String HTML_CHECKBOX = "checkbox"; - - /** - * 日期控件 - */ - public static final String HTML_DATETIME = "datetime"; - - /** - * 图片上传控件 - */ - public static final String HTML_IMAGE_UPLOAD = "imageUpload"; - - /** - * 文件上传控件 - */ - public static final String HTML_FILE_UPLOAD = "fileUpload"; - - /** - * 富文本控件 - */ - public static final String HTML_EDITOR = "editor"; - - /** - * 字符串类型 - */ - public static final String TYPE_STRING = "String"; - - /** - * 整型 - */ - public static final String TYPE_INTEGER = "Integer"; - - /** - * 长整型 - */ - public static final String TYPE_LONG = "Long"; - - /** - * 浮点型 - */ - public static final String TYPE_DOUBLE = "Double"; - - /** - * 高精度计算类型 - */ - public static final String TYPE_BIGDECIMAL = "BigDecimal"; - - /** - * 时间类型 - */ - public static final String TYPE_DATE = "Date"; - - /** - * 模糊查询 - */ - public static final String QUERY_LIKE = "LIKE"; - - /** - * 需要 - */ - public static final String REQUIRE = "1"; -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/constant/HttpStatus.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/constant/HttpStatus.java deleted file mode 100644 index 4ce8f31a..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/constant/HttpStatus.java +++ /dev/null @@ -1,88 +0,0 @@ -package com.ruoyi.common.constant; - -/** - * 返回状态码 - * - * @author ruoyi - */ -public class HttpStatus { - /** - * 操作成功 - */ - public static final int SUCCESS = 200; - - /** - * 对象创建成功 - */ - public static final int CREATED = 201; - - /** - * 请求已经被接受 - */ - public static final int ACCEPTED = 202; - - /** - * 操作已经执行成功,但是没有返回数据 - */ - public static final int NO_CONTENT = 204; - - /** - * 资源已被移除 - */ - public static final int MOVED_PERM = 301; - - /** - * 重定向 - */ - public static final int SEE_OTHER = 303; - - /** - * 资源没有被修改 - */ - public static final int NOT_MODIFIED = 304; - - /** - * 参数列表错误(缺少,格式不匹配) - */ - public static final int BAD_REQUEST = 400; - - /** - * 未授权 - */ - public static final int UNAUTHORIZED = 401; - - /** - * 访问受限,授权过期 - */ - public static final int FORBIDDEN = 403; - - /** - * 资源,服务未找到 - */ - public static final int NOT_FOUND = 404; - - /** - * 不允许的http方法 - */ - public static final int BAD_METHOD = 405; - - /** - * 资源冲突,或者资源被锁 - */ - public static final int CONFLICT = 409; - - /** - * 不支持的数据,媒体类型 - */ - public static final int UNSUPPORTED_TYPE = 415; - - /** - * 系统内部错误 - */ - public static final int ERROR = 500; - - /** - * 接口未实现 - */ - public static final int NOT_IMPLEMENTED = 501; -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/constant/ScheduleConstants.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/constant/ScheduleConstants.java deleted file mode 100644 index 0af14ad2..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/constant/ScheduleConstants.java +++ /dev/null @@ -1,56 +0,0 @@ -package com.ruoyi.common.constant; - -/** - * 任务调度通用常量 - * - * @author ruoyi - */ -public class ScheduleConstants { - public static final String TASK_CLASS_NAME = "TASK_CLASS_NAME"; - - /** - * 执行目标key - */ - public static final String TASK_PROPERTIES = "TASK_PROPERTIES"; - - /** - * 默认 - */ - public static final String MISFIRE_DEFAULT = "0"; - - /** - * 立即触发执行 - */ - public static final String MISFIRE_IGNORE_MISFIRES = "1"; - - /** - * 触发一次执行 - */ - public static final String MISFIRE_FIRE_AND_PROCEED = "2"; - - /** - * 不触发立即执行 - */ - public static final String MISFIRE_DO_NOTHING = "3"; - - public enum Status { - /** - * 正常 - */ - NORMAL("0"), - /** - * 暂停 - */ - PAUSE("1"); - - private String value; - - private Status(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/constant/UserConstants.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/constant/UserConstants.java deleted file mode 100644 index 67bc9baf..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/constant/UserConstants.java +++ /dev/null @@ -1,94 +0,0 @@ -package com.ruoyi.common.constant; - -/** - * 用户常量信息 - * - * @author ruoyi - */ -public class UserConstants { - /** - * 平台内系统用户的唯一标志 - */ - public static final String SYS_USER = "SYS_USER"; - - /** - * 正常状态 - */ - public static final String NORMAL = "0"; - - /** - * 异常状态 - */ - public static final String EXCEPTION = "1"; - - /** - * 用户封禁状态 - */ - public static final String USER_DISABLE = "1"; - - /** - * 角色封禁状态 - */ - public static final String ROLE_DISABLE = "1"; - - /** - * 部门正常状态 - */ - public static final String DEPT_NORMAL = "0"; - - /** - * 部门停用状态 - */ - public static final String DEPT_DISABLE = "1"; - - /** - * 字典正常状态 - */ - public static final String DICT_NORMAL = "0"; - - /** - * 是否为系统默认(是) - */ - public static final String YES = "Y"; - - /** - * 是否菜单外链(是) - */ - public static final String YES_FRAME = "0"; - - /** - * 是否菜单外链(否) - */ - public static final String NO_FRAME = "1"; - - /** - * 菜单类型(目录) - */ - public static final String TYPE_DIR = "M"; - - /** - * 菜单类型(菜单) - */ - public static final String TYPE_MENU = "C"; - - /** - * 菜单类型(按钮) - */ - public static final String TYPE_BUTTON = "F"; - - /** - * Layout组件标识 - */ - public final static String LAYOUT = "Layout"; - - /** - * ParentView组件标识 - */ - public final static String PARENT_VIEW = "ParentView"; - - /** - * 校验返回结果码 - */ - public final static String UNIQUE = "0"; - public final static String NOT_UNIQUE = "1"; -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/controller/BaseController.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/controller/BaseController.java deleted file mode 100644 index 2eae5289..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/controller/BaseController.java +++ /dev/null @@ -1,86 +0,0 @@ -package com.ruoyi.common.core.controller; - -import java.beans.PropertyEditorSupport; -import java.util.Date; -import java.util.List; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.web.bind.WebDataBinder; -import org.springframework.web.bind.annotation.InitBinder; -import com.github.pagehelper.PageHelper; -import com.github.pagehelper.PageInfo; -import com.ruoyi.common.constant.HttpStatus; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.core.page.PageDomain; -import com.ruoyi.common.core.page.TableDataInfo; -import com.ruoyi.common.core.page.TableSupport; -import com.ruoyi.common.utils.DateUtils; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.common.utils.sql.SqlUtil; - -/** - * web层通用数据处理 - * - * @author ruoyi - */ -public class BaseController { - protected final Logger logger = LoggerFactory.getLogger(BaseController.class); - - /** - * 将前台传递过来的日期格式的字符串,自动转化为Date类型 - */ - @InitBinder - public void initBinder(WebDataBinder binder) { - // Date 类型转换 - binder.registerCustomEditor(Date.class, new PropertyEditorSupport() { - @Override - public void setAsText(String text) { - setValue(DateUtils.parseDate(text)); - } - }); - } - - /** - * 设置请求分页数据 - */ - protected void startPage() { - PageDomain pageDomain = TableSupport.buildPageRequest(); - Integer pageNum = pageDomain.getPageNum(); - Integer pageSize = pageDomain.getPageSize(); - if (StringUtils.isNotNull(pageNum) && StringUtils.isNotNull(pageSize)) { - String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy()); - PageHelper.startPage(pageNum, pageSize, orderBy); - } - } - - /** - * 响应请求分页数据 - */ - @SuppressWarnings({"rawtypes", "unchecked"}) - protected TableDataInfo getDataTable(List list) { - TableDataInfo rspData = new TableDataInfo(); - rspData.setCode(HttpStatus.SUCCESS); - rspData.setMsg("查询成功"); - rspData.setRows(list); - rspData.setTotal(new PageInfo(list).getTotal()); - return rspData; - } - - /** - * 响应返回结果 - * - * @param rows 影响行数 - * @return 操作结果 - */ - protected AjaxResult toAjax(int rows) { - return rows > 0 ? AjaxResult.success() : AjaxResult.error(); - } - - /** - * 页面跳转 - */ - public String redirect(String url) { - return StringUtils.format("redirect:{}", url); - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/AjaxResult.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/AjaxResult.java deleted file mode 100644 index f6db15df..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/AjaxResult.java +++ /dev/null @@ -1,142 +0,0 @@ -package com.ruoyi.common.core.domain; - -import java.util.HashMap; - -import com.ruoyi.common.constant.HttpStatus; -import com.ruoyi.common.utils.StringUtils; - -/** - * 操作消息提醒 - * - * @author ruoyi - */ -public class AjaxResult extends HashMap { - private static final long serialVersionUID = 1L; - - /** - * 状态码 - */ - public static final String CODE_TAG = "code"; - - /** - * 返回内容 - */ - public static final String MSG_TAG = "msg"; - - /** - * 数据对象 - */ - public static final String DATA_TAG = "data"; - - /** - * 初始化一个新创建的 AjaxResult 对象,使其表示一个空消息。 - */ - public AjaxResult() { - } - - /** - * 初始化一个新创建的 AjaxResult 对象 - * - * @param code 状态码 - * @param msg 返回内容 - */ - public AjaxResult(int code, String msg) { - super.put(CODE_TAG, code); - super.put(MSG_TAG, msg); - } - - /** - * 初始化一个新创建的 AjaxResult 对象 - * - * @param code 状态码 - * @param msg 返回内容 - * @param data 数据对象 - */ - public AjaxResult(int code, String msg, Object data) { - super.put(CODE_TAG, code); - super.put(MSG_TAG, msg); - if (StringUtils.isNotNull(data)) { - super.put(DATA_TAG, data); - } - } - - /** - * 返回成功消息 - * - * @return 成功消息 - */ - public static AjaxResult success() { - return AjaxResult.success("操作成功"); - } - - /** - * 返回成功数据 - * - * @return 成功消息 - */ - public static AjaxResult success(Object data) { - return AjaxResult.success("操作成功", data); - } - - /** - * 返回成功消息 - * - * @param msg 返回内容 - * @return 成功消息 - */ - public static AjaxResult success(String msg) { - return AjaxResult.success(msg, null); - } - - /** - * 返回成功消息 - * - * @param msg 返回内容 - * @param data 数据对象 - * @return 成功消息 - */ - public static AjaxResult success(String msg, Object data) { - return new AjaxResult(HttpStatus.SUCCESS, msg, data); - } - - /** - * 返回错误消息 - * - * @return - */ - public static AjaxResult error() { - return AjaxResult.error("操作失败"); - } - - /** - * 返回错误消息 - * - * @param msg 返回内容 - * @return 警告消息 - */ - public static AjaxResult error(String msg) { - return AjaxResult.error(msg, null); - } - - /** - * 返回错误消息 - * - * @param msg 返回内容 - * @param data 数据对象 - * @return 警告消息 - */ - public static AjaxResult error(String msg, Object data) { - return new AjaxResult(HttpStatus.ERROR, msg, data); - } - - /** - * 返回错误消息 - * - * @param code 状态码 - * @param msg 返回内容 - * @return 警告消息 - */ - public static AjaxResult error(int code, String msg) { - return new AjaxResult(code, msg, null); - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java deleted file mode 100644 index 093fee41..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/BaseEntity.java +++ /dev/null @@ -1,113 +0,0 @@ -package com.ruoyi.common.core.domain; - -import java.io.Serializable; -import java.util.Date; -import java.util.HashMap; -import java.util.Map; - -import com.fasterxml.jackson.annotation.JsonFormat; - -/** - * Entity基类 - * - * @author ruoyi - */ -public class BaseEntity implements Serializable { - private static final long serialVersionUID = 1L; - - /** - * 搜索值 - */ - private String searchValue; - - /** - * 创建者 - */ - private String createBy; - - /** - * 创建时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date createTime; - - /** - * 更新者 - */ - private String updateBy; - - /** - * 更新时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date updateTime; - - /** - * 备注 - */ - private String remark; - - /** - * 请求参数 - */ - private Map params; - - public String getSearchValue() { - return searchValue; - } - - public void setSearchValue(String searchValue) { - this.searchValue = searchValue; - } - - public String getCreateBy() { - return createBy; - } - - public void setCreateBy(String createBy) { - this.createBy = createBy; - } - - public Date getCreateTime() { - return createTime; - } - - public void setCreateTime(Date createTime) { - this.createTime = createTime; - } - - public String getUpdateBy() { - return updateBy; - } - - public void setUpdateBy(String updateBy) { - this.updateBy = updateBy; - } - - public Date getUpdateTime() { - return updateTime; - } - - public void setUpdateTime(Date updateTime) { - this.updateTime = updateTime; - } - - public String getRemark() { - return remark; - } - - public void setRemark(String remark) { - this.remark = remark; - } - - public Map getParams() { - if (params == null) { - params = new HashMap<>(); - } - return params; - } - - public void setParams(Map params) { - this.params = params; - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/TreeEntity.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/TreeEntity.java deleted file mode 100644 index 265c7385..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/TreeEntity.java +++ /dev/null @@ -1,78 +0,0 @@ -package com.ruoyi.common.core.domain; - -import java.util.ArrayList; -import java.util.List; - -/** - * Tree基类 - * - * @author ruoyi - */ -public class TreeEntity extends BaseEntity { - private static final long serialVersionUID = 1L; - - /** - * 父菜单名称 - */ - private String parentName; - - /** - * 父菜单ID - */ - private Long parentId; - - /** - * 显示顺序 - */ - private Integer orderNum; - - /** - * 祖级列表 - */ - private String ancestors; - - /** - * 子部门 - */ - private List children = new ArrayList<>(); - - public String getParentName() { - return parentName; - } - - public void setParentName(String parentName) { - this.parentName = parentName; - } - - public Long getParentId() { - return parentId; - } - - public void setParentId(Long parentId) { - this.parentId = parentId; - } - - public Integer getOrderNum() { - return orderNum; - } - - public void setOrderNum(Integer orderNum) { - this.orderNum = orderNum; - } - - public String getAncestors() { - return ancestors; - } - - public void setAncestors(String ancestors) { - this.ancestors = ancestors; - } - - public List getChildren() { - return children; - } - - public void setChildren(List children) { - this.children = children; - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/TreeSelect.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/TreeSelect.java deleted file mode 100644 index 8649ccec..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/TreeSelect.java +++ /dev/null @@ -1,74 +0,0 @@ -package com.ruoyi.common.core.domain; - -import java.io.Serializable; -import java.util.List; -import java.util.stream.Collectors; - -import com.fasterxml.jackson.annotation.JsonInclude; -import com.ruoyi.common.core.domain.entity.SysDept; -import com.ruoyi.common.core.domain.entity.SysMenu; - -/** - * Treeselect树结构实体类 - * - * @author ruoyi - */ -public class TreeSelect implements Serializable { - private static final long serialVersionUID = 1L; - - /** - * 节点ID - */ - private Long id; - - /** - * 节点名称 - */ - private String label; - - /** - * 子节点 - */ - @JsonInclude(JsonInclude.Include.NON_EMPTY) - private List children; - - public TreeSelect() { - - } - - public TreeSelect(SysDept dept) { - this.id = dept.getDeptId(); - this.label = dept.getDeptName(); - this.children = dept.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList()); - } - - public TreeSelect(SysMenu menu) { - this.id = menu.getMenuId(); - this.label = menu.getMenuName(); - this.children = menu.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList()); - } - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getLabel() { - return label; - } - - public void setLabel(String label) { - this.label = label; - } - - public List getChildren() { - return children; - } - - public void setChildren(List children) { - this.children = children; - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java deleted file mode 100644 index df48444f..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDept.java +++ /dev/null @@ -1,202 +0,0 @@ -package com.ruoyi.common.core.domain.entity; - -import java.util.ArrayList; -import java.util.List; -import javax.validation.constraints.Email; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Size; - -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.core.domain.BaseEntity; - -/** - * 部门表 sys_dept - * - * @author ruoyi - */ -public class SysDept extends BaseEntity { - private static final long serialVersionUID = 1L; - - /** - * 部门ID - */ - private Long deptId; - - /** - * 父部门ID - */ - private Long parentId; - - /** - * 祖级列表 - */ - private String ancestors; - - /** - * 部门名称 - */ - private String deptName; - - /** - * 显示顺序 - */ - private String orderNum; - - /** - * 负责人 - */ - private String leader; - - /** - * 联系电话 - */ - private String phone; - - /** - * 邮箱 - */ - private String email; - - /** - * 部门状态:0正常,1停用 - */ - private String status; - - /** - * 删除标志(0代表存在 2代表删除) - */ - private String delFlag; - - /** - * 父部门名称 - */ - private String parentName; - - /** - * 子部门 - */ - private List children = new ArrayList(); - - public Long getDeptId() { - return deptId; - } - - public void setDeptId(Long deptId) { - this.deptId = deptId; - } - - public Long getParentId() { - return parentId; - } - - public void setParentId(Long parentId) { - this.parentId = parentId; - } - - public String getAncestors() { - return ancestors; - } - - public void setAncestors(String ancestors) { - this.ancestors = ancestors; - } - - @NotBlank(message = "部门名称不能为空") - @Size(min = 0, max = 30, message = "部门名称长度不能超过30个字符") - public String getDeptName() { - return deptName; - } - - public void setDeptName(String deptName) { - this.deptName = deptName; - } - - @NotBlank(message = "显示顺序不能为空") - public String getOrderNum() { - return orderNum; - } - - public void setOrderNum(String orderNum) { - this.orderNum = orderNum; - } - - public String getLeader() { - return leader; - } - - public void setLeader(String leader) { - this.leader = leader; - } - - @Size(min = 0, max = 11, message = "联系电话长度不能超过11个字符") - public String getPhone() { - return phone; - } - - public void setPhone(String phone) { - this.phone = phone; - } - - @Email(message = "邮箱格式不正确") - @Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符") - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - public String getDelFlag() { - return delFlag; - } - - public void setDelFlag(String delFlag) { - this.delFlag = delFlag; - } - - public String getParentName() { - return parentName; - } - - public void setParentName(String parentName) { - this.parentName = parentName; - } - - public List getChildren() { - return children; - } - - public void setChildren(List children) { - this.children = children; - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("deptId", getDeptId()) - .append("parentId", getParentId()) - .append("ancestors", getAncestors()) - .append("deptName", getDeptName()) - .append("orderNum", getOrderNum()) - .append("leader", getLeader()) - .append("phone", getPhone()) - .append("email", getEmail()) - .append("status", getStatus()) - .append("delFlag", getDelFlag()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .toString(); - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictData.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictData.java deleted file mode 100644 index 709c6c7a..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictData.java +++ /dev/null @@ -1,175 +0,0 @@ -package com.ruoyi.common.core.domain.entity; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Size; - -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.annotation.Excel.ColumnType; -import com.ruoyi.common.constant.UserConstants; -import com.ruoyi.common.core.domain.BaseEntity; - -/** - * 字典数据表 sys_dict_data - * - * @author ruoyi - */ -public class SysDictData extends BaseEntity { - private static final long serialVersionUID = 1L; - - /** - * 字典编码 - */ - @Excel(name = "字典编码", cellType = ColumnType.NUMERIC) - private Long dictCode; - - /** - * 字典排序 - */ - @Excel(name = "字典排序", cellType = ColumnType.NUMERIC) - private Long dictSort; - - /** - * 字典标签 - */ - @Excel(name = "字典标签") - private String dictLabel; - - /** - * 字典键值 - */ - @Excel(name = "字典键值") - private String dictValue; - - /** - * 字典类型 - */ - @Excel(name = "字典类型") - private String dictType; - - /** - * 样式属性(其他样式扩展) - */ - private String cssClass; - - /** - * 表格字典样式 - */ - private String listClass; - - /** - * 是否默认(Y是 N否) - */ - @Excel(name = "是否默认", readConverterExp = "Y=是,N=否") - private String isDefault; - - /** - * 状态(0正常 1停用) - */ - @Excel(name = "状态", readConverterExp = "0=正常,1=停用") - private String status; - - public Long getDictCode() { - return dictCode; - } - - public void setDictCode(Long dictCode) { - this.dictCode = dictCode; - } - - public Long getDictSort() { - return dictSort; - } - - public void setDictSort(Long dictSort) { - this.dictSort = dictSort; - } - - @NotBlank(message = "字典标签不能为空") - @Size(min = 0, max = 100, message = "字典标签长度不能超过100个字符") - public String getDictLabel() { - return dictLabel; - } - - public void setDictLabel(String dictLabel) { - this.dictLabel = dictLabel; - } - - @NotBlank(message = "字典键值不能为空") - @Size(min = 0, max = 100, message = "字典键值长度不能超过100个字符") - public String getDictValue() { - return dictValue; - } - - public void setDictValue(String dictValue) { - this.dictValue = dictValue; - } - - @NotBlank(message = "字典类型不能为空") - @Size(min = 0, max = 100, message = "字典类型长度不能超过100个字符") - public String getDictType() { - return dictType; - } - - public void setDictType(String dictType) { - this.dictType = dictType; - } - - @Size(min = 0, max = 100, message = "样式属性长度不能超过100个字符") - public String getCssClass() { - return cssClass; - } - - public void setCssClass(String cssClass) { - this.cssClass = cssClass; - } - - public String getListClass() { - return listClass; - } - - public void setListClass(String listClass) { - this.listClass = listClass; - } - - public boolean getDefault() { - return UserConstants.YES.equals(this.isDefault) ? true : false; - } - - public String getIsDefault() { - return isDefault; - } - - public void setIsDefault(String isDefault) { - this.isDefault = isDefault; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("dictCode", getDictCode()) - .append("dictSort", getDictSort()) - .append("dictLabel", getDictLabel()) - .append("dictValue", getDictValue()) - .append("dictType", getDictType()) - .append("cssClass", getCssClass()) - .append("listClass", getListClass()) - .append("isDefault", getIsDefault()) - .append("status", getStatus()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .toString(); - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictType.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictType.java deleted file mode 100644 index 8627553c..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysDictType.java +++ /dev/null @@ -1,94 +0,0 @@ -package com.ruoyi.common.core.domain.entity; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Size; - -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.annotation.Excel.ColumnType; -import com.ruoyi.common.core.domain.BaseEntity; - -/** - * 字典类型表 sys_dict_type - * - * @author ruoyi - */ -public class SysDictType extends BaseEntity { - private static final long serialVersionUID = 1L; - - /** - * 字典主键 - */ - @Excel(name = "字典主键", cellType = ColumnType.NUMERIC) - private Long dictId; - - /** - * 字典名称 - */ - @Excel(name = "字典名称") - private String dictName; - - /** - * 字典类型 - */ - @Excel(name = "字典类型") - private String dictType; - - /** - * 状态(0正常 1停用) - */ - @Excel(name = "状态", readConverterExp = "0=正常,1=停用") - private String status; - - public Long getDictId() { - return dictId; - } - - public void setDictId(Long dictId) { - this.dictId = dictId; - } - - @NotBlank(message = "字典名称不能为空") - @Size(min = 0, max = 100, message = "字典类型名称长度不能超过100个字符") - public String getDictName() { - return dictName; - } - - public void setDictName(String dictName) { - this.dictName = dictName; - } - - @NotBlank(message = "字典类型不能为空") - @Size(min = 0, max = 100, message = "字典类型类型长度不能超过100个字符") - public String getDictType() { - return dictType; - } - - public void setDictType(String dictType) { - this.dictType = dictType; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("dictId", getDictId()) - .append("dictName", getDictName()) - .append("dictType", getDictType()) - .append("status", getStatus()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .toString(); - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java deleted file mode 100644 index 59f6ae96..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysMenu.java +++ /dev/null @@ -1,245 +0,0 @@ -package com.ruoyi.common.core.domain.entity; - -import java.util.ArrayList; -import java.util.List; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Size; - -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.core.domain.BaseEntity; - -/** - * 菜单权限表 sys_menu - * - * @author ruoyi - */ -public class SysMenu extends BaseEntity { - private static final long serialVersionUID = 1L; - - /** - * 菜单ID - */ - private Long menuId; - - /** - * 菜单名称 - */ - private String menuName; - - /** - * 父菜单名称 - */ - private String parentName; - - /** - * 父菜单ID - */ - private Long parentId; - - /** - * 显示顺序 - */ - private String orderNum; - - /** - * 路由地址 - */ - private String path; - - /** - * 组件路径 - */ - private String component; - - /** - * 是否为外链(0是 1否) - */ - private String isFrame; - - /** - * 是否缓存(0缓存 1不缓存) - */ - private String isCache; - - /** - * 类型(M目录 C菜单 F按钮) - */ - private String menuType; - - /** - * 显示状态(0显示 1隐藏) - */ - private String visible; - - /** - * 菜单状态(0显示 1隐藏) - */ - private String status; - - /** - * 权限字符串 - */ - private String perms; - - /** - * 菜单图标 - */ - private String icon; - - /** - * 子菜单 - */ - private List children = new ArrayList(); - - public Long getMenuId() { - return menuId; - } - - public void setMenuId(Long menuId) { - this.menuId = menuId; - } - - @NotBlank(message = "菜单名称不能为空") - @Size(min = 0, max = 50, message = "菜单名称长度不能超过50个字符") - public String getMenuName() { - return menuName; - } - - public void setMenuName(String menuName) { - this.menuName = menuName; - } - - public String getParentName() { - return parentName; - } - - public void setParentName(String parentName) { - this.parentName = parentName; - } - - public Long getParentId() { - return parentId; - } - - public void setParentId(Long parentId) { - this.parentId = parentId; - } - - @NotBlank(message = "显示顺序不能为空") - public String getOrderNum() { - return orderNum; - } - - public void setOrderNum(String orderNum) { - this.orderNum = orderNum; - } - - @Size(min = 0, max = 200, message = "路由地址不能超过200个字符") - public String getPath() { - return path; - } - - public void setPath(String path) { - this.path = path; - } - - @Size(min = 0, max = 200, message = "组件路径不能超过255个字符") - public String getComponent() { - return component; - } - - public void setComponent(String component) { - this.component = component; - } - - public String getIsFrame() { - return isFrame; - } - - public void setIsFrame(String isFrame) { - this.isFrame = isFrame; - } - - public String getIsCache() { - return isCache; - } - - public void setIsCache(String isCache) { - this.isCache = isCache; - } - - @NotBlank(message = "菜单类型不能为空") - public String getMenuType() { - return menuType; - } - - public void setMenuType(String menuType) { - this.menuType = menuType; - } - - public String getVisible() { - return visible; - } - - public void setVisible(String visible) { - this.visible = visible; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - @Size(min = 0, max = 100, message = "权限标识长度不能超过100个字符") - public String getPerms() { - return perms; - } - - public void setPerms(String perms) { - this.perms = perms; - } - - public String getIcon() { - return icon; - } - - public void setIcon(String icon) { - this.icon = icon; - } - - public List getChildren() { - return children; - } - - public void setChildren(List children) { - this.children = children; - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("menuId", getMenuId()) - .append("menuName", getMenuName()) - .append("parentId", getParentId()) - .append("orderNum", getOrderNum()) - .append("path", getPath()) - .append("component", getComponent()) - .append("isFrame", getIsFrame()) - .append("IsCache", getIsCache()) - .append("menuType", getMenuType()) - .append("visible", getVisible()) - .append("status ", getStatus()) - .append("perms", getPerms()) - .append("icon", getIcon()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .toString(); - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java deleted file mode 100644 index 43b6b89f..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysRole.java +++ /dev/null @@ -1,222 +0,0 @@ -package com.ruoyi.common.core.domain.entity; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Size; - -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.annotation.Excel.ColumnType; -import com.ruoyi.common.core.domain.BaseEntity; - -/** - * 角色表 sys_role - * - * @author ruoyi - */ -public class SysRole extends BaseEntity { - private static final long serialVersionUID = 1L; - - /** - * 角色ID - */ - @Excel(name = "角色序号", cellType = ColumnType.NUMERIC) - private Long roleId; - - /** - * 角色名称 - */ - @Excel(name = "角色名称") - private String roleName; - - /** - * 角色权限 - */ - @Excel(name = "角色权限") - private String roleKey; - - /** - * 角色排序 - */ - @Excel(name = "角色排序") - private String roleSort; - - /** - * 数据范围(1:所有数据权限;2:自定义数据权限;3:本部门数据权限;4:本部门及以下数据权限) - */ - @Excel(name = "数据范围", readConverterExp = "1=所有数据权限,2=自定义数据权限,3=本部门数据权限,4=本部门及以下数据权限") - private String dataScope; - - /** - * 菜单树选择项是否关联显示( 0:父子不互相关联显示 1:父子互相关联显示) - */ - private boolean menuCheckStrictly; - - /** - * 部门树选择项是否关联显示(0:父子不互相关联显示 1:父子互相关联显示 ) - */ - private boolean deptCheckStrictly; - - /** - * 角色状态(0正常 1停用) - */ - @Excel(name = "角色状态", readConverterExp = "0=正常,1=停用") - private String status; - - /** - * 删除标志(0代表存在 2代表删除) - */ - private String delFlag; - - /** - * 用户是否存在此角色标识 默认不存在 - */ - private boolean flag = false; - - /** - * 菜单组 - */ - private Long[] menuIds; - - /** - * 部门组(数据权限) - */ - private Long[] deptIds; - - public SysRole() { - - } - - public SysRole(Long roleId) { - this.roleId = roleId; - } - - public Long getRoleId() { - return roleId; - } - - public void setRoleId(Long roleId) { - this.roleId = roleId; - } - - public boolean isAdmin() { - return isAdmin(this.roleId); - } - - public static boolean isAdmin(Long roleId) { - return roleId != null && 1L == roleId; - } - - @NotBlank(message = "角色名称不能为空") - @Size(min = 0, max = 30, message = "角色名称长度不能超过30个字符") - public String getRoleName() { - return roleName; - } - - public void setRoleName(String roleName) { - this.roleName = roleName; - } - - @NotBlank(message = "权限字符不能为空") - @Size(min = 0, max = 100, message = "权限字符长度不能超过100个字符") - public String getRoleKey() { - return roleKey; - } - - public void setRoleKey(String roleKey) { - this.roleKey = roleKey; - } - - @NotBlank(message = "显示顺序不能为空") - public String getRoleSort() { - return roleSort; - } - - public void setRoleSort(String roleSort) { - this.roleSort = roleSort; - } - - public String getDataScope() { - return dataScope; - } - - public void setDataScope(String dataScope) { - this.dataScope = dataScope; - } - - public boolean isMenuCheckStrictly() { - return menuCheckStrictly; - } - - public void setMenuCheckStrictly(boolean menuCheckStrictly) { - this.menuCheckStrictly = menuCheckStrictly; - } - - public boolean isDeptCheckStrictly() { - return deptCheckStrictly; - } - - public void setDeptCheckStrictly(boolean deptCheckStrictly) { - this.deptCheckStrictly = deptCheckStrictly; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - public String getDelFlag() { - return delFlag; - } - - public void setDelFlag(String delFlag) { - this.delFlag = delFlag; - } - - public boolean isFlag() { - return flag; - } - - public void setFlag(boolean flag) { - this.flag = flag; - } - - public Long[] getMenuIds() { - return menuIds; - } - - public void setMenuIds(Long[] menuIds) { - this.menuIds = menuIds; - } - - public Long[] getDeptIds() { - return deptIds; - } - - public void setDeptIds(Long[] deptIds) { - this.deptIds = deptIds; - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("roleId", getRoleId()) - .append("roleName", getRoleName()) - .append("roleKey", getRoleKey()) - .append("roleSort", getRoleSort()) - .append("dataScope", getDataScope()) - .append("menuCheckStrictly", isMenuCheckStrictly()) - .append("deptCheckStrictly", isDeptCheckStrictly()) - .append("status", getStatus()) - .append("delFlag", getDelFlag()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .toString(); - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java deleted file mode 100644 index 0c21b684..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/SysUser.java +++ /dev/null @@ -1,335 +0,0 @@ -package com.ruoyi.common.core.domain.entity; - -import java.util.Date; -import java.util.List; -import javax.validation.constraints.Email; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Size; - -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.annotation.Excel.ColumnType; -import com.ruoyi.common.annotation.Excel.Type; -import com.ruoyi.common.annotation.Excels; -import com.ruoyi.common.core.domain.BaseEntity; - -/** - * 用户对象 sys_user - * - * @author ruoyi - */ -public class SysUser extends BaseEntity { - private static final long serialVersionUID = 1L; - - /** - * 用户ID - */ - @Excel(name = "用户序号", cellType = ColumnType.NUMERIC, prompt = "用户编号") - private Long userId; - - /** - * 部门ID - */ - @Excel(name = "部门编号", type = Type.IMPORT) - private Long deptId; - - /** - * 用户账号 - */ - @Excel(name = "登录名称") - private String userName; - - /** - * 用户昵称 - */ - @Excel(name = "用户名称") - private String nickName; - - @Excel(name = "用户OpenId") - private String openId; - - /** - * 用户邮箱 - */ - @Excel(name = "用户邮箱") - private String email; - - /** - * 手机号码 - */ - @Excel(name = "手机号码") - private String phonenumber; - - /** - * 用户性别 - */ - @Excel(name = "用户性别", readConverterExp = "0=男,1=女,2=未知") - private String sex; - - /** - * 用户头像 - */ - private String avatar; - - /** - * 密码 - */ - private String password; - - /** - * 盐加密 - */ - private String salt; - - /** - * 帐号状态(0正常 1停用) - */ - @Excel(name = "帐号状态", readConverterExp = "0=正常,1=停用") - private String status; - - /** - * 删除标志(0代表存在 2代表删除) - */ - private String delFlag; - - /** - * 最后登录IP - */ - @Excel(name = "最后登录IP", type = Type.EXPORT) - private String loginIp; - - /** - * 最后登录时间 - */ - @Excel(name = "最后登录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Type.EXPORT) - private Date loginDate; - - /** - * 部门对象 - */ - @Excels({ - @Excel(name = "部门名称", targetAttr = "deptName", type = Type.EXPORT), - @Excel(name = "部门负责人", targetAttr = "leader", type = Type.EXPORT) - }) - private SysDept dept; - - /** - * 角色对象 - */ - private List roles; - - /** - * 角色组 - */ - private Long[] roleIds; - - /** - * 岗位组 - */ - private Long[] postIds; - - public SysUser() { - - } - - public String getOpenId() { - return openId; - } - - public void setOpenId(String openId) { - this.openId = openId; - } - - public SysUser(Long userId) { - this.userId = userId; - } - - public Long getUserId() { - return userId; - } - - public void setUserId(Long userId) { - this.userId = userId; - } - - public boolean isAdmin() { - return isAdmin(this.userId); - } - - public static boolean isAdmin(Long userId) { - return userId != null && 1L == userId; - } - - public Long getDeptId() { - return deptId; - } - - public void setDeptId(Long deptId) { - this.deptId = deptId; - } - - @Size(min = 0, max = 30, message = "用户昵称长度不能超过30个字符") - public String getNickName() { - return nickName; - } - - public void setNickName(String nickName) { - this.nickName = nickName; - } - - @NotBlank(message = "用户账号不能为空") - @Size(min = 0, max = 30, message = "用户账号长度不能超过30个字符") - public String getUserName() { - return userName; - } - - public void setUserName(String userName) { - this.userName = userName; - } - - @Email(message = "邮箱格式不正确") - @Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符") - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - @Size(min = 0, max = 11, message = "手机号码长度不能超过11个字符") - public String getPhonenumber() { - return phonenumber; - } - - public void setPhonenumber(String phonenumber) { - this.phonenumber = phonenumber; - } - - public String getSex() { - return sex; - } - - public void setSex(String sex) { - this.sex = sex; - } - - public String getAvatar() { - return avatar; - } - - public void setAvatar(String avatar) { - this.avatar = avatar; - } - - @JsonIgnore - @JsonProperty - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - public String getSalt() { - return salt; - } - - public void setSalt(String salt) { - this.salt = salt; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - public String getDelFlag() { - return delFlag; - } - - public void setDelFlag(String delFlag) { - this.delFlag = delFlag; - } - - public String getLoginIp() { - return loginIp; - } - - public void setLoginIp(String loginIp) { - this.loginIp = loginIp; - } - - public Date getLoginDate() { - return loginDate; - } - - public void setLoginDate(Date loginDate) { - this.loginDate = loginDate; - } - - public SysDept getDept() { - return dept; - } - - public void setDept(SysDept dept) { - this.dept = dept; - } - - public List getRoles() { - return roles; - } - - public void setRoles(List roles) { - this.roles = roles; - } - - public Long[] getRoleIds() { - return roleIds; - } - - public void setRoleIds(Long[] roleIds) { - this.roleIds = roleIds; - } - - public Long[] getPostIds() { - return postIds; - } - - public void setPostIds(Long[] postIds) { - this.postIds = postIds; - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("userId", getUserId()) - .append("deptId", getDeptId()) - .append("userName", getUserName()) - .append("nickName", getNickName()) - .append("email", getEmail()) - .append("phonenumber", getPhonenumber()) - .append("sex", getSex()) - .append("avatar", getAvatar()) - .append("password", getPassword()) - .append("salt", getSalt()) - .append("status", getStatus()) - .append("delFlag", getDelFlag()) - .append("loginIp", getLoginIp()) - .append("loginDate", getLoginDate()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .append("dept", getDept()) - .toString(); - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/LoginBody.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/LoginBody.java deleted file mode 100644 index 2d2fe112..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/LoginBody.java +++ /dev/null @@ -1,60 +0,0 @@ -package com.ruoyi.common.core.domain.model; - -/** - * 用户登录对象 - * - * @author ruoyi - */ -public class LoginBody { - /** - * 用户名 - */ - private String username; - - /** - * 用户密码 - */ - private String password; - - /** - * 验证码 - */ - private String code; - - /** - * 唯一标识 - */ - private String uuid = ""; - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - public String getCode() { - return code; - } - - public void setCode(String code) { - this.code = code; - } - - public String getUuid() { - return uuid; - } - - public void setUuid(String uuid) { - this.uuid = uuid; - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/LoginUser.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/LoginUser.java deleted file mode 100644 index f9867ba9..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/LoginUser.java +++ /dev/null @@ -1,205 +0,0 @@ -package com.ruoyi.common.core.domain.model; - -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; - -import org.springframework.security.core.GrantedAuthority; -import org.springframework.security.core.userdetails.UserDetails; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.ruoyi.common.core.domain.entity.SysUser; - -/** - * 登录用户身份权限 - * - * @author ruoyi - */ -public class LoginUser implements UserDetails { - private static final long serialVersionUID = 1L; - - /** - * 用户唯一标识 - */ - private String token; - - /** - * 登录时间 - */ - private Long loginTime; - - /** - * 过期时间 - */ - private Long expireTime; - - /** - * 登录IP地址 - */ - private String ipaddr; - - /** - * 登录地点 - */ - private String loginLocation; - - /** - * 浏览器类型 - */ - private String browser; - - /** - * 操作系统 - */ - private String os; - - /** - * 权限列表 - */ - private Set permissions; - - /** - * 用户信息 - */ - private SysUser user; - - public String getToken() { - return token; - } - - public void setToken(String token) { - this.token = token; - } - - public LoginUser() { - } - - public LoginUser(SysUser user, Set permissions) { - this.user = user; - this.permissions = permissions; - } - - - - @JsonIgnore - @Override - public String getPassword() { - return user.getPassword(); - } - - @Override - public String getUsername() { - return user.getUserName(); - } - - /** - * 账户是否未过期,过期无法验证 - */ - @JsonIgnore - @Override - public boolean isAccountNonExpired() { - return true; - } - - /** - * 指定用户是否解锁,锁定的用户无法进行身份验证 - * - * @return - */ - @JsonIgnore - @Override - public boolean isAccountNonLocked() { - return true; - } - - /** - * 指示是否已过期的用户的凭据(密码),过期的凭据防止认证 - * - * @return - */ - @JsonIgnore - @Override - public boolean isCredentialsNonExpired() { - return true; - } - - /** - * 是否可用 ,禁用的用户不能身份验证 - * - * @return - */ - @JsonIgnore - @Override - public boolean isEnabled() { - return true; - } - - public Long getLoginTime() { - return loginTime; - } - - public void setLoginTime(Long loginTime) { - this.loginTime = loginTime; - } - - public String getIpaddr() { - return ipaddr; - } - - public void setIpaddr(String ipaddr) { - this.ipaddr = ipaddr; - } - - public String getLoginLocation() { - return loginLocation; - } - - public void setLoginLocation(String loginLocation) { - this.loginLocation = loginLocation; - } - - public String getBrowser() { - return browser; - } - - public void setBrowser(String browser) { - this.browser = browser; - } - - public String getOs() { - return os; - } - - public void setOs(String os) { - this.os = os; - } - - public Long getExpireTime() { - return expireTime; - } - - public void setExpireTime(Long expireTime) { - this.expireTime = expireTime; - } - - public Set getPermissions() { - System.out.println("用户权限:"+permissions); - return permissions; - } - - public void setPermissions(Set permissions) { - this.permissions = permissions; - } - - public SysUser getUser() { - return user; - } - - public void setUser(SysUser user) { - this.user = user; - } - - @Override - public Collection getAuthorities() { - return null; - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/MpLoginBody.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/MpLoginBody.java deleted file mode 100644 index 161fba39..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/MpLoginBody.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.ruoyi.common.core.domain.model; - -import com.alibaba.fastjson.JSONObject; -import lombok.Data; - -/** - * 微信小程序用户登录对象 - * - * @author ruoyi - */ -@Data -public class MpLoginBody { - private String code; - - private JSONObject options; //{"path":"pages/mine/help/index","query":{},"scene":1001,"referrerInfo":{}} - -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/page/PageDomain.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/page/PageDomain.java deleted file mode 100644 index b63c3feb..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/page/PageDomain.java +++ /dev/null @@ -1,69 +0,0 @@ -package com.ruoyi.common.core.page; - -import com.ruoyi.common.utils.StringUtils; - -/** - * 分页数据 - * - * @author ruoyi - */ -public class PageDomain { - /** - * 当前记录起始索引 - */ - private Integer pageNum; - - /** - * 每页显示记录数 - */ - private Integer pageSize; - - /** - * 排序列 - */ - private String orderByColumn; - - /** - * 排序的方向desc或者asc - */ - private String isAsc = "asc"; - - public String getOrderBy() { - if (StringUtils.isEmpty(orderByColumn)) { - return ""; - } - return StringUtils.toUnderScoreCase(orderByColumn) + " " + isAsc; - } - - public Integer getPageNum() { - return pageNum; - } - - public void setPageNum(Integer pageNum) { - this.pageNum = pageNum; - } - - public Integer getPageSize() { - return pageSize; - } - - public void setPageSize(Integer pageSize) { - this.pageSize = pageSize; - } - - public String getOrderByColumn() { - return orderByColumn; - } - - public void setOrderByColumn(String orderByColumn) { - this.orderByColumn = orderByColumn; - } - - public String getIsAsc() { - return isAsc; - } - - public void setIsAsc(String isAsc) { - this.isAsc = isAsc; - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/page/TableDataInfo.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/page/TableDataInfo.java deleted file mode 100644 index d223e860..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/page/TableDataInfo.java +++ /dev/null @@ -1,82 +0,0 @@ -package com.ruoyi.common.core.page; - -import java.io.Serializable; -import java.util.List; - -/** - * 表格分页数据对象 - * - * @author ruoyi - */ -public class TableDataInfo implements Serializable { - private static final long serialVersionUID = 1L; - - /** - * 总记录数 - */ - private long total; - - /** - * 列表数据 - */ - private List rows; - - /** - * 消息状态码 - */ - private int code; - - /** - * 消息内容 - */ - private String msg; - - /** - * 表格数据对象 - */ - public TableDataInfo() { - } - - /** - * 分页 - * - * @param list 列表数据 - * @param total 总记录数 - */ - public TableDataInfo(List list, int total) { - this.rows = list; - this.total = total; - } - - public long getTotal() { - return total; - } - - public void setTotal(long total) { - this.total = total; - } - - public List getRows() { - return rows; - } - - public void setRows(List rows) { - this.rows = rows; - } - - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public String getMsg() { - return msg; - } - - public void setMsg(String msg) { - this.msg = msg; - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/page/TableSupport.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/page/TableSupport.java deleted file mode 100644 index 812bee2b..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/page/TableSupport.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.ruoyi.common.core.page; - -import com.ruoyi.common.utils.ServletUtils; - -/** - * 表格数据处理 - * - * @author ruoyi - */ -public class TableSupport { - /** - * 当前记录起始索引 - */ - public static final String PAGE_NUM = "pageNum"; - - /** - * 每页显示记录数 - */ - public static final String PAGE_SIZE = "pageSize"; - - /** - * 排序列 - */ - public static final String ORDER_BY_COLUMN = "orderByColumn"; - - /** - * 排序的方向 "desc" 或者 "asc". - */ - public static final String IS_ASC = "isAsc"; - - /** - * 封装分页对象 - */ - public static PageDomain getPageDomain() { - PageDomain pageDomain = new PageDomain(); - pageDomain.setPageNum(ServletUtils.getParameterToInt(PAGE_NUM)); - pageDomain.setPageSize(ServletUtils.getParameterToInt(PAGE_SIZE)); - pageDomain.setOrderByColumn(ServletUtils.getParameter(ORDER_BY_COLUMN)); - pageDomain.setIsAsc(ServletUtils.getParameter(IS_ASC)); - return pageDomain; - } - - public static PageDomain buildPageRequest() { - return getPageDomain(); - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java deleted file mode 100644 index d354cf4f..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/redis/RedisCache.java +++ /dev/null @@ -1,216 +0,0 @@ -package com.ruoyi.common.core.redis; - -import java.util.Collection; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.TimeUnit; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.data.redis.core.BoundSetOperations; -import org.springframework.data.redis.core.HashOperations; -import org.springframework.data.redis.core.RedisTemplate; -import org.springframework.data.redis.core.ValueOperations; -import org.springframework.stereotype.Component; - -/** - * spring redis 工具类 - * - * @author ruoyi - **/ -@SuppressWarnings(value = {"unchecked", "rawtypes"}) -@Component -public class RedisCache { - @Autowired - public RedisTemplate redisTemplate; - - /** - * 缓存基本的对象,Integer、String、实体类等 - * - * @param key 缓存的键值 - * @param value 缓存的值 - */ - public void setCacheObject(final String key, final T value) { - redisTemplate.opsForValue().set(key, value); - } - - /** - * 缓存基本的对象,Integer、String、实体类等 - * - * @param key 缓存的键值 - * @param value 缓存的值 - * @param timeout 时间 - * @param timeUnit 时间颗粒度 - */ - public void setCacheObject(final String key, final T value, final Integer timeout, final TimeUnit timeUnit) { - redisTemplate.opsForValue().set(key, value, timeout, timeUnit); - } - - /** - * 设置有效时间 - * - * @param key Redis键 - * @param timeout 超时时间 - * @return true=设置成功;false=设置失败 - */ - public boolean expire(final String key, final long timeout) { - return expire(key, timeout, TimeUnit.SECONDS); - } - - /** - * 设置有效时间 - * - * @param key Redis键 - * @param timeout 超时时间 - * @param unit 时间单位 - * @return true=设置成功;false=设置失败 - */ - public boolean expire(final String key, final long timeout, final TimeUnit unit) { - return redisTemplate.expire(key, timeout, unit); - } - - /** - * 获得缓存的基本对象。 - * - * @param key 缓存键值 - * @return 缓存键值对应的数据 - */ - public T getCacheObject(final String key) { - ValueOperations operation = redisTemplate.opsForValue(); - return operation.get(key); - } - - /** - * 删除单个对象 - * - * @param key - */ - public boolean deleteObject(final String key) { - return redisTemplate.delete(key); - } - - /** - * 删除集合对象 - * - * @param collection 多个对象 - * @return - */ - public long deleteObject(final Collection collection) { - return redisTemplate.delete(collection); - } - - /** - * 缓存List数据 - * - * @param key 缓存的键值 - * @param dataList 待缓存的List数据 - * @return 缓存的对象 - */ - public long setCacheList(final String key, final List dataList) { - Long count = redisTemplate.opsForList().rightPushAll(key, dataList); - return count == null ? 0 : count; - } - - /** - * 获得缓存的list对象 - * - * @param key 缓存的键值 - * @return 缓存键值对应的数据 - */ - public List getCacheList(final String key) { - return redisTemplate.opsForList().range(key, 0, -1); - } - - /** - * 缓存Set - * - * @param key 缓存键值 - * @param dataSet 缓存的数据 - * @return 缓存数据的对象 - */ - public BoundSetOperations setCacheSet(final String key, final Set dataSet) { - BoundSetOperations setOperation = redisTemplate.boundSetOps(key); - Iterator it = dataSet.iterator(); - while (it.hasNext()) { - setOperation.add(it.next()); - } - return setOperation; - } - - /** - * 获得缓存的set - * - * @param key - * @return - */ - public Set getCacheSet(final String key) { - return redisTemplate.opsForSet().members(key); - } - - /** - * 缓存Map - * - * @param key - * @param dataMap - */ - public void setCacheMap(final String key, final Map dataMap) { - if (dataMap != null) { - redisTemplate.opsForHash().putAll(key, dataMap); - } - } - - /** - * 获得缓存的Map - * - * @param key - * @return - */ - public Map getCacheMap(final String key) { - return redisTemplate.opsForHash().entries(key); - } - - /** - * 往Hash中存入数据 - * - * @param key Redis键 - * @param hKey Hash键 - * @param value 值 - */ - public void setCacheMapValue(final String key, final String hKey, final T value) { - redisTemplate.opsForHash().put(key, hKey, value); - } - - /** - * 获取Hash中的数据 - * - * @param key Redis键 - * @param hKey Hash键 - * @return Hash中的对象 - */ - public T getCacheMapValue(final String key, final String hKey) { - HashOperations opsForHash = redisTemplate.opsForHash(); - return opsForHash.get(key, hKey); - } - - /** - * 获取多个Hash中的数据 - * - * @param key Redis键 - * @param hKeys Hash键集合 - * @return Hash对象集合 - */ - public List getMultiCacheMapValue(final String key, final Collection hKeys) { - return redisTemplate.opsForHash().multiGet(key, hKeys); - } - - /** - * 获得缓存的基本对象列表 - * - * @param pattern 字符串前缀 - * @return 对象列表 - */ - public Collection keys(final String pattern) { - return redisTemplate.keys(pattern); - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/text/CharsetKit.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/text/CharsetKit.java deleted file mode 100644 index 71f33353..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/text/CharsetKit.java +++ /dev/null @@ -1,91 +0,0 @@ -package com.ruoyi.common.core.text; - -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; - -import com.ruoyi.common.utils.StringUtils; - -/** - * 字符集工具类 - * - * @author ruoyi - */ -public class CharsetKit { - /** - * ISO-8859-1 - */ - public static final String ISO_8859_1 = "ISO-8859-1"; - /** - * UTF-8 - */ - public static final String UTF_8 = "UTF-8"; - /** - * GBK - */ - public static final String GBK = "GBK"; - - /** - * ISO-8859-1 - */ - public static final Charset CHARSET_ISO_8859_1 = Charset.forName(ISO_8859_1); - /** - * UTF-8 - */ - public static final Charset CHARSET_UTF_8 = Charset.forName(UTF_8); - /** - * GBK - */ - public static final Charset CHARSET_GBK = Charset.forName(GBK); - - /** - * 转换为Charset对象 - * - * @param charset 字符集,为空则返回默认字符集 - * @return Charset - */ - public static Charset charset(String charset) { - return StringUtils.isEmpty(charset) ? Charset.defaultCharset() : Charset.forName(charset); - } - - /** - * 转换字符串的字符集编码 - * - * @param source 字符串 - * @param srcCharset 源字符集,默认ISO-8859-1 - * @param destCharset 目标字符集,默认UTF-8 - * @return 转换后的字符集 - */ - public static String convert(String source, String srcCharset, String destCharset) { - return convert(source, Charset.forName(srcCharset), Charset.forName(destCharset)); - } - - /** - * 转换字符串的字符集编码 - * - * @param source 字符串 - * @param srcCharset 源字符集,默认ISO-8859-1 - * @param destCharset 目标字符集,默认UTF-8 - * @return 转换后的字符集 - */ - public static String convert(String source, Charset srcCharset, Charset destCharset) { - if (null == srcCharset) { - srcCharset = StandardCharsets.ISO_8859_1; - } - - if (null == destCharset) { - destCharset = StandardCharsets.UTF_8; - } - - if (StringUtils.isEmpty(source) || srcCharset.equals(destCharset)) { - return source; - } - return new String(source.getBytes(srcCharset), destCharset); - } - - /** - * @return 系统字符集编码 - */ - public static String systemCharset() { - return Charset.defaultCharset().name(); - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/text/Convert.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/text/Convert.java deleted file mode 100644 index f9dce907..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/text/Convert.java +++ /dev/null @@ -1,850 +0,0 @@ -package com.ruoyi.common.core.text; - -import java.math.BigDecimal; -import java.math.BigInteger; -import java.nio.ByteBuffer; -import java.nio.charset.Charset; -import java.text.NumberFormat; -import java.util.Set; - -import com.ruoyi.common.utils.StringUtils; - -/** - * 类型转换器 - * - * @author ruoyi - */ -public class Convert { - /** - * 转换为字符串
- * 如果给定的值为null,或者转换失败,返回默认值
- * 转换失败不会报错 - * - * @param value 被转换的值 - * @param defaultValue 转换错误时的默认值 - * @return 结果 - */ - public static String toStr(Object value, String defaultValue) { - if (null == value) { - return defaultValue; - } - if (value instanceof String) { - return (String) value; - } - return value.toString(); - } - - /** - * 转换为字符串
- * 如果给定的值为null,或者转换失败,返回默认值null
- * 转换失败不会报错 - * - * @param value 被转换的值 - * @return 结果 - */ - public static String toStr(Object value) { - return toStr(value, null); - } - - /** - * 转换为字符
- * 如果给定的值为null,或者转换失败,返回默认值
- * 转换失败不会报错 - * - * @param value 被转换的值 - * @param defaultValue 转换错误时的默认值 - * @return 结果 - */ - public static Character toChar(Object value, Character defaultValue) { - if (null == value) { - return defaultValue; - } - if (value instanceof Character) { - return (Character) value; - } - - final String valueStr = toStr(value, null); - return StringUtils.isEmpty(valueStr) ? defaultValue : valueStr.charAt(0); - } - - /** - * 转换为字符
- * 如果给定的值为null,或者转换失败,返回默认值null
- * 转换失败不会报错 - * - * @param value 被转换的值 - * @return 结果 - */ - public static Character toChar(Object value) { - return toChar(value, null); - } - - /** - * 转换为byte
- * 如果给定的值为null,或者转换失败,返回默认值
- * 转换失败不会报错 - * - * @param value 被转换的值 - * @param defaultValue 转换错误时的默认值 - * @return 结果 - */ - public static Byte toByte(Object value, Byte defaultValue) { - if (value == null) { - return defaultValue; - } - if (value instanceof Byte) { - return (Byte) value; - } - if (value instanceof Number) { - return ((Number) value).byteValue(); - } - final String valueStr = toStr(value, null); - if (StringUtils.isEmpty(valueStr)) { - return defaultValue; - } - try { - return Byte.parseByte(valueStr); - } catch (Exception e) { - return defaultValue; - } - } - - /** - * 转换为byte
- * 如果给定的值为null,或者转换失败,返回默认值null
- * 转换失败不会报错 - * - * @param value 被转换的值 - * @return 结果 - */ - public static Byte toByte(Object value) { - return toByte(value, null); - } - - /** - * 转换为Short
- * 如果给定的值为null,或者转换失败,返回默认值
- * 转换失败不会报错 - * - * @param value 被转换的值 - * @param defaultValue 转换错误时的默认值 - * @return 结果 - */ - public static Short toShort(Object value, Short defaultValue) { - if (value == null) { - return defaultValue; - } - if (value instanceof Short) { - return (Short) value; - } - if (value instanceof Number) { - return ((Number) value).shortValue(); - } - final String valueStr = toStr(value, null); - if (StringUtils.isEmpty(valueStr)) { - return defaultValue; - } - try { - return Short.parseShort(valueStr.trim()); - } catch (Exception e) { - return defaultValue; - } - } - - /** - * 转换为Short
- * 如果给定的值为null,或者转换失败,返回默认值null
- * 转换失败不会报错 - * - * @param value 被转换的值 - * @return 结果 - */ - public static Short toShort(Object value) { - return toShort(value, null); - } - - /** - * 转换为Number
- * 如果给定的值为空,或者转换失败,返回默认值
- * 转换失败不会报错 - * - * @param value 被转换的值 - * @param defaultValue 转换错误时的默认值 - * @return 结果 - */ - public static Number toNumber(Object value, Number defaultValue) { - if (value == null) { - return defaultValue; - } - if (value instanceof Number) { - return (Number) value; - } - final String valueStr = toStr(value, null); - if (StringUtils.isEmpty(valueStr)) { - return defaultValue; - } - try { - return NumberFormat.getInstance().parse(valueStr); - } catch (Exception e) { - return defaultValue; - } - } - - /** - * 转换为Number
- * 如果给定的值为空,或者转换失败,返回默认值null
- * 转换失败不会报错 - * - * @param value 被转换的值 - * @return 结果 - */ - public static Number toNumber(Object value) { - return toNumber(value, null); - } - - /** - * 转换为int
- * 如果给定的值为空,或者转换失败,返回默认值
- * 转换失败不会报错 - * - * @param value 被转换的值 - * @param defaultValue 转换错误时的默认值 - * @return 结果 - */ - public static Integer toInt(Object value, Integer defaultValue) { - if (value == null) { - return defaultValue; - } - if (value instanceof Integer) { - return (Integer) value; - } - if (value instanceof Number) { - return ((Number) value).intValue(); - } - final String valueStr = toStr(value, null); - if (StringUtils.isEmpty(valueStr)) { - return defaultValue; - } - try { - return Integer.parseInt(valueStr.trim()); - } catch (Exception e) { - return defaultValue; - } - } - - /** - * 转换为int
- * 如果给定的值为null,或者转换失败,返回默认值null
- * 转换失败不会报错 - * - * @param value 被转换的值 - * @return 结果 - */ - public static Integer toInt(Object value) { - return toInt(value, null); - } - - /** - * 转换为Integer数组
- * - * @param str 被转换的值 - * @return 结果 - */ - public static Integer[] toIntArray(String str) { - return toIntArray(",", str); - } - - /** - * 转换为Long数组
- * - * @param str 被转换的值 - * @return 结果 - */ - public static Long[] toLongArray(String str) { - return toLongArray(",", str); - } - - /** - * 转换为Integer数组
- * - * @param split 分隔符 - * @param split 被转换的值 - * @return 结果 - */ - public static Integer[] toIntArray(String split, String str) { - if (StringUtils.isEmpty(str)) { - return new Integer[]{}; - } - String[] arr = str.split(split); - final Integer[] ints = new Integer[arr.length]; - for (int i = 0; i < arr.length; i++) { - final Integer v = toInt(arr[i], 0); - ints[i] = v; - } - return ints; - } - - /** - * 转换为Long数组
- * - * @param split 分隔符 - * @param str 被转换的值 - * @return 结果 - */ - public static Long[] toLongArray(String split, String str) { - if (StringUtils.isEmpty(str)) { - return new Long[]{}; - } - String[] arr = str.split(split); - final Long[] longs = new Long[arr.length]; - for (int i = 0; i < arr.length; i++) { - final Long v = toLong(arr[i], null); - longs[i] = v; - } - return longs; - } - - /** - * 转换为String数组
- * - * @param str 被转换的值 - * @return 结果 - */ - public static String[] toStrArray(String str) { - return toStrArray(",", str); - } - - /** - * 转换为String数组
- * - * @param split 分隔符 - * @param split 被转换的值 - * @return 结果 - */ - public static String[] toStrArray(String split, String str) { - return str.split(split); - } - - /** - * 转换为long
- * 如果给定的值为空,或者转换失败,返回默认值
- * 转换失败不会报错 - * - * @param value 被转换的值 - * @param defaultValue 转换错误时的默认值 - * @return 结果 - */ - public static Long toLong(Object value, Long defaultValue) { - if (value == null) { - return defaultValue; - } - if (value instanceof Long) { - return (Long) value; - } - if (value instanceof Number) { - return ((Number) value).longValue(); - } - final String valueStr = toStr(value, null); - if (StringUtils.isEmpty(valueStr)) { - return defaultValue; - } - try { - // 支持科学计数法 - return new BigDecimal(valueStr.trim()).longValue(); - } catch (Exception e) { - return defaultValue; - } - } - - /** - * 转换为long
- * 如果给定的值为null,或者转换失败,返回默认值null
- * 转换失败不会报错 - * - * @param value 被转换的值 - * @return 结果 - */ - public static Long toLong(Object value) { - return toLong(value, null); - } - - /** - * 转换为double
- * 如果给定的值为空,或者转换失败,返回默认值
- * 转换失败不会报错 - * - * @param value 被转换的值 - * @param defaultValue 转换错误时的默认值 - * @return 结果 - */ - public static Double toDouble(Object value, Double defaultValue) { - if (value == null) { - return defaultValue; - } - if (value instanceof Double) { - return (Double) value; - } - if (value instanceof Number) { - return ((Number) value).doubleValue(); - } - final String valueStr = toStr(value, null); - if (StringUtils.isEmpty(valueStr)) { - return defaultValue; - } - try { - // 支持科学计数法 - return new BigDecimal(valueStr.trim()).doubleValue(); - } catch (Exception e) { - return defaultValue; - } - } - - /** - * 转换为double
- * 如果给定的值为空,或者转换失败,返回默认值null
- * 转换失败不会报错 - * - * @param value 被转换的值 - * @return 结果 - */ - public static Double toDouble(Object value) { - return toDouble(value, null); - } - - /** - * 转换为Float
- * 如果给定的值为空,或者转换失败,返回默认值
- * 转换失败不会报错 - * - * @param value 被转换的值 - * @param defaultValue 转换错误时的默认值 - * @return 结果 - */ - public static Float toFloat(Object value, Float defaultValue) { - if (value == null) { - return defaultValue; - } - if (value instanceof Float) { - return (Float) value; - } - if (value instanceof Number) { - return ((Number) value).floatValue(); - } - final String valueStr = toStr(value, null); - if (StringUtils.isEmpty(valueStr)) { - return defaultValue; - } - try { - return Float.parseFloat(valueStr.trim()); - } catch (Exception e) { - return defaultValue; - } - } - - /** - * 转换为Float
- * 如果给定的值为空,或者转换失败,返回默认值null
- * 转换失败不会报错 - * - * @param value 被转换的值 - * @return 结果 - */ - public static Float toFloat(Object value) { - return toFloat(value, null); - } - - /** - * 转换为boolean
- * String支持的值为:true、false、yes、ok、no,1,0 如果给定的值为空,或者转换失败,返回默认值
- * 转换失败不会报错 - * - * @param value 被转换的值 - * @param defaultValue 转换错误时的默认值 - * @return 结果 - */ - public static Boolean toBool(Object value, Boolean defaultValue) { - if (value == null) { - return defaultValue; - } - if (value instanceof Boolean) { - return (Boolean) value; - } - String valueStr = toStr(value, null); - if (StringUtils.isEmpty(valueStr)) { - return defaultValue; - } - valueStr = valueStr.trim().toLowerCase(); - switch (valueStr) { - case "true": - return true; - case "false": - return false; - case "yes": - return true; - case "ok": - return true; - case "no": - return false; - case "1": - return true; - case "0": - return false; - default: - return defaultValue; - } - } - - /** - * 转换为boolean
- * 如果给定的值为空,或者转换失败,返回默认值null
- * 转换失败不会报错 - * - * @param value 被转换的值 - * @return 结果 - */ - public static Boolean toBool(Object value) { - return toBool(value, null); - } - - /** - * 转换为Enum对象
- * 如果给定的值为空,或者转换失败,返回默认值
- * - * @param clazz Enum的Class - * @param value 值 - * @param defaultValue 默认值 - * @return Enum - */ - public static > E toEnum(Class clazz, Object value, E defaultValue) { - if (value == null) { - return defaultValue; - } - if (clazz.isAssignableFrom(value.getClass())) { - @SuppressWarnings("unchecked") - E myE = (E) value; - return myE; - } - final String valueStr = toStr(value, null); - if (StringUtils.isEmpty(valueStr)) { - return defaultValue; - } - try { - return Enum.valueOf(clazz, valueStr); - } catch (Exception e) { - return defaultValue; - } - } - - /** - * 转换为Enum对象
- * 如果给定的值为空,或者转换失败,返回默认值null
- * - * @param clazz Enum的Class - * @param value 值 - * @return Enum - */ - public static > E toEnum(Class clazz, Object value) { - return toEnum(clazz, value, null); - } - - /** - * 转换为BigInteger
- * 如果给定的值为空,或者转换失败,返回默认值
- * 转换失败不会报错 - * - * @param value 被转换的值 - * @param defaultValue 转换错误时的默认值 - * @return 结果 - */ - public static BigInteger toBigInteger(Object value, BigInteger defaultValue) { - if (value == null) { - return defaultValue; - } - if (value instanceof BigInteger) { - return (BigInteger) value; - } - if (value instanceof Long) { - return BigInteger.valueOf((Long) value); - } - final String valueStr = toStr(value, null); - if (StringUtils.isEmpty(valueStr)) { - return defaultValue; - } - try { - return new BigInteger(valueStr); - } catch (Exception e) { - return defaultValue; - } - } - - /** - * 转换为BigInteger
- * 如果给定的值为空,或者转换失败,返回默认值null
- * 转换失败不会报错 - * - * @param value 被转换的值 - * @return 结果 - */ - public static BigInteger toBigInteger(Object value) { - return toBigInteger(value, null); - } - - /** - * 转换为BigDecimal
- * 如果给定的值为空,或者转换失败,返回默认值
- * 转换失败不会报错 - * - * @param value 被转换的值 - * @param defaultValue 转换错误时的默认值 - * @return 结果 - */ - public static BigDecimal toBigDecimal(Object value, BigDecimal defaultValue) { - if (value == null) { - return defaultValue; - } - if (value instanceof BigDecimal) { - return (BigDecimal) value; - } - if (value instanceof Long) { - return new BigDecimal((Long) value); - } - if (value instanceof Double) { - return new BigDecimal((Double) value); - } - if (value instanceof Integer) { - return new BigDecimal((Integer) value); - } - final String valueStr = toStr(value, null); - if (StringUtils.isEmpty(valueStr)) { - return defaultValue; - } - try { - return new BigDecimal(valueStr); - } catch (Exception e) { - return defaultValue; - } - } - - /** - * 转换为BigDecimal
- * 如果给定的值为空,或者转换失败,返回默认值
- * 转换失败不会报错 - * - * @param value 被转换的值 - * @return 结果 - */ - public static BigDecimal toBigDecimal(Object value) { - return toBigDecimal(value, null); - } - - /** - * 将对象转为字符串
- * 1、Byte数组和ByteBuffer会被转换为对应字符串的数组 2、对象数组会调用Arrays.toString方法 - * - * @param obj 对象 - * @return 字符串 - */ - public static String utf8Str(Object obj) { - return str(obj, CharsetKit.CHARSET_UTF_8); - } - - /** - * 将对象转为字符串
- * 1、Byte数组和ByteBuffer会被转换为对应字符串的数组 2、对象数组会调用Arrays.toString方法 - * - * @param obj 对象 - * @param charsetName 字符集 - * @return 字符串 - */ - public static String str(Object obj, String charsetName) { - return str(obj, Charset.forName(charsetName)); - } - - /** - * 将对象转为字符串
- * 1、Byte数组和ByteBuffer会被转换为对应字符串的数组 2、对象数组会调用Arrays.toString方法 - * - * @param obj 对象 - * @param charset 字符集 - * @return 字符串 - */ - public static String str(Object obj, Charset charset) { - if (null == obj) { - return null; - } - - if (obj instanceof String) { - return (String) obj; - } else if (obj instanceof byte[] || obj instanceof Byte[]) { - return str((Byte[]) obj, charset); - } else if (obj instanceof ByteBuffer) { - return str((ByteBuffer) obj, charset); - } - return obj.toString(); - } - - /** - * 将byte数组转为字符串 - * - * @param bytes byte数组 - * @param charset 字符集 - * @return 字符串 - */ - public static String str(byte[] bytes, String charset) { - return str(bytes, StringUtils.isEmpty(charset) ? Charset.defaultCharset() : Charset.forName(charset)); - } - - /** - * 解码字节码 - * - * @param data 字符串 - * @param charset 字符集,如果此字段为空,则解码的结果取决于平台 - * @return 解码后的字符串 - */ - public static String str(byte[] data, Charset charset) { - if (data == null) { - return null; - } - - if (null == charset) { - return new String(data); - } - return new String(data, charset); - } - - /** - * 将编码的byteBuffer数据转换为字符串 - * - * @param data 数据 - * @param charset 字符集,如果为空使用当前系统字符集 - * @return 字符串 - */ - public static String str(ByteBuffer data, String charset) { - if (data == null) { - return null; - } - - return str(data, Charset.forName(charset)); - } - - /** - * 将编码的byteBuffer数据转换为字符串 - * - * @param data 数据 - * @param charset 字符集,如果为空使用当前系统字符集 - * @return 字符串 - */ - public static String str(ByteBuffer data, Charset charset) { - if (null == charset) { - charset = Charset.defaultCharset(); - } - return charset.decode(data).toString(); - } - - // ----------------------------------------------------------------------- 全角半角转换 - - /** - * 半角转全角 - * - * @param input String. - * @return 全角字符串. - */ - public static String toSBC(String input) { - return toSBC(input, null); - } - - /** - * 半角转全角 - * - * @param input String - * @param notConvertSet 不替换的字符集合 - * @return 全角字符串. - */ - public static String toSBC(String input, Set notConvertSet) { - char c[] = input.toCharArray(); - for (int i = 0; i < c.length; i++) { - if (null != notConvertSet && notConvertSet.contains(c[i])) { - // 跳过不替换的字符 - continue; - } - - if (c[i] == ' ') { - c[i] = '\u3000'; - } else if (c[i] < '\177') { - c[i] = (char) (c[i] + 65248); - - } - } - return new String(c); - } - - /** - * 全角转半角 - * - * @param input String. - * @return 半角字符串 - */ - public static String toDBC(String input) { - return toDBC(input, null); - } - - /** - * 替换全角为半角 - * - * @param text 文本 - * @param notConvertSet 不替换的字符集合 - * @return 替换后的字符 - */ - public static String toDBC(String text, Set notConvertSet) { - char c[] = text.toCharArray(); - for (int i = 0; i < c.length; i++) { - if (null != notConvertSet && notConvertSet.contains(c[i])) { - // 跳过不替换的字符 - continue; - } - - if (c[i] == '\u3000') { - c[i] = ' '; - } else if (c[i] > '\uFF00' && c[i] < '\uFF5F') { - c[i] = (char) (c[i] - 65248); - } - } - String returnString = new String(c); - - return returnString; - } - - /** - * 数字金额大写转换 先写个完整的然后将如零拾替换成零 - * - * @param n 数字 - * @return 中文大写数字 - */ - public static String digitUppercase(double n) { - String[] fraction = {"角", "分"}; - String[] digit = {"零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"}; - String[][] unit = {{"元", "万", "亿"}, {"", "拾", "佰", "仟"}}; - - String head = n < 0 ? "负" : ""; - n = Math.abs(n); - - String s = ""; - for (int i = 0; i < fraction.length; i++) { - s += (digit[(int) (Math.floor(n * 10 * Math.pow(10, i)) % 10)] + fraction[i]).replaceAll("(零.)+", ""); - } - if (s.length() < 1) { - s = "整"; - } - int integerPart = (int) Math.floor(n); - - for (int i = 0; i < unit[0].length && integerPart > 0; i++) { - String p = ""; - for (int j = 0; j < unit[1].length && n > 0; j++) { - p = digit[integerPart % 10] + unit[1][j] + p; - integerPart = integerPart / 10; - } - s = p.replaceAll("(零.)*零$", "").replaceAll("^$", "零") + unit[0][i] + s; - } - return head + s.replaceAll("(零.)*零元", "元").replaceFirst("(零.)+", "").replaceAll("(零.)+", "零").replaceAll("^整$", "零元整"); - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/text/StrFormatter.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/text/StrFormatter.java deleted file mode 100644 index eec64f99..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/core/text/StrFormatter.java +++ /dev/null @@ -1,76 +0,0 @@ -package com.ruoyi.common.core.text; - -import com.ruoyi.common.utils.StringUtils; - -/** - * 字符串格式化 - * - * @author ruoyi - */ -public class StrFormatter { - public static final String EMPTY_JSON = "{}"; - public static final char C_BACKSLASH = '\\'; - public static final char C_DELIM_START = '{'; - public static final char C_DELIM_END = '}'; - - /** - * 格式化字符串
- * 此方法只是简单将占位符 {} 按照顺序替换为参数
- * 如果想输出 {} 使用 \\转义 { 即可,如果想输出 {} 之前的 \ 使用双转义符 \\\\ 即可
- * 例:
- * 通常使用:format("this is {} for {}", "a", "b") -> this is a for b
- * 转义{}: format("this is \\{} for {}", "a", "b") -> this is \{} for a
- * 转义\: format("this is \\\\{} for {}", "a", "b") -> this is \a for b
- * - * @param strPattern 字符串模板 - * @param argArray 参数列表 - * @return 结果 - */ - public static String format(final String strPattern, final Object... argArray) { - if (StringUtils.isEmpty(strPattern) || StringUtils.isEmpty(argArray)) { - return strPattern; - } - final int strPatternLength = strPattern.length(); - - // 初始化定义好的长度以获得更好的性能 - StringBuilder sbuf = new StringBuilder(strPatternLength + 50); - - int handledPosition = 0; - int delimIndex;// 占位符所在位置 - for (int argIndex = 0; argIndex < argArray.length; argIndex++) { - delimIndex = strPattern.indexOf(EMPTY_JSON, handledPosition); - if (delimIndex == -1) { - if (handledPosition == 0) { - return strPattern; - } else { // 字符串模板剩余部分不再包含占位符,加入剩余部分后返回结果 - sbuf.append(strPattern, handledPosition, strPatternLength); - return sbuf.toString(); - } - } else { - if (delimIndex > 0 && strPattern.charAt(delimIndex - 1) == C_BACKSLASH) { - if (delimIndex > 1 && strPattern.charAt(delimIndex - 2) == C_BACKSLASH) { - // 转义符之前还有一个转义符,占位符依旧有效 - sbuf.append(strPattern, handledPosition, delimIndex - 1); - sbuf.append(Convert.utf8Str(argArray[argIndex])); - handledPosition = delimIndex + 2; - } else { - // 占位符被转义 - argIndex--; - sbuf.append(strPattern, handledPosition, delimIndex - 1); - sbuf.append(C_DELIM_START); - handledPosition = delimIndex + 1; - } - } else { - // 正常占位符 - sbuf.append(strPattern, handledPosition, delimIndex); - sbuf.append(Convert.utf8Str(argArray[argIndex])); - handledPosition = delimIndex + 2; - } - } - } - // 加入最后一个占位符后所有的字符 - sbuf.append(strPattern, handledPosition, strPattern.length()); - - return sbuf.toString(); - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/enums/BusinessStatus.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/enums/BusinessStatus.java deleted file mode 100644 index ce32cb41..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/enums/BusinessStatus.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.ruoyi.common.enums; - -/** - * 操作状态 - * - * @author ruoyi - */ -public enum BusinessStatus { - /** - * 成功 - */ - SUCCESS, - - /** - * 失败 - */ - FAIL, -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/enums/BusinessType.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/enums/BusinessType.java deleted file mode 100644 index 2d2f2e46..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/enums/BusinessType.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.ruoyi.common.enums; - -/** - * 业务操作类型 - * - * @author ruoyi - */ -public enum BusinessType { - /** - * 其它 - */ - OTHER, - - /** - * 新增 - */ - INSERT, - - /** - * 修改 - */ - UPDATE, - - /** - * 删除 - */ - DELETE, - - /** - * 授权 - */ - GRANT, - - /** - * 导出 - */ - EXPORT, - - /** - * 导入 - */ - IMPORT, - - /** - * 强退 - */ - FORCE, - - /** - * 生成代码 - */ - GENCODE, - - /** - * 清空数据 - */ - CLEAN, -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/enums/DataSourceType.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/enums/DataSourceType.java deleted file mode 100644 index e9ed99af..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/enums/DataSourceType.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.ruoyi.common.enums; - -/** - * 数据源 - * - * @author ruoyi - */ -public enum DataSourceType { - /** - * 主库 - */ - MASTER, - - /** - * 从库 - */ - SLAVE -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/enums/HttpMethod.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/enums/HttpMethod.java deleted file mode 100644 index a0cf8e5e..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/enums/HttpMethod.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.ruoyi.common.enums; - -import java.util.HashMap; -import java.util.Map; - -import org.springframework.lang.Nullable; - -/** - * 请求方式 - * - * @author ruoyi - */ -public enum HttpMethod { - GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS, TRACE; - - private static final Map mappings = new HashMap<>(16); - - static { - for (HttpMethod httpMethod : values()) { - mappings.put(httpMethod.name(), httpMethod); - } - } - - @Nullable - public static HttpMethod resolve(@Nullable String method) { - return (method != null ? mappings.get(method) : null); - } - - public boolean matches(String method) { - return (this == resolve(method)); - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/enums/OperatorType.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/enums/OperatorType.java deleted file mode 100644 index 3c4127d9..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/enums/OperatorType.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.ruoyi.common.enums; - -/** - * 操作人类别 - * - * @author ruoyi - */ -public enum OperatorType { - /** - * 其它 - */ - OTHER, - - /** - * 后台用户 - */ - MANAGE, - - /** - * 手机端用户 - */ - MOBILE -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/enums/UserStatus.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/enums/UserStatus.java deleted file mode 100644 index 673ddebd..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/enums/UserStatus.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.ruoyi.common.enums; - -/** - * 用户状态 - * - * @author ruoyi - */ -public enum UserStatus { - OK("0", "正常"), DISABLE("1", "停用"), DELETED("2", "删除"); - - private final String code; - private final String info; - - UserStatus(String code, String info) { - this.code = code; - this.info = info; - } - - public String getCode() { - return code; - } - - public String getInfo() { - return info; - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/BaseException.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/BaseException.java deleted file mode 100644 index 21ff9fae..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/BaseException.java +++ /dev/null @@ -1,84 +0,0 @@ -package com.ruoyi.common.exception; - -import com.ruoyi.common.utils.MessageUtils; -import com.ruoyi.common.utils.StringUtils; - -/** - * 基础异常 - * - * @author ruoyi - */ -public class BaseException extends RuntimeException { - private static final long serialVersionUID = 1L; - - /** - * 所属模块 - */ - private String module; - - /** - * 错误码 - */ - private String code; - - /** - * 错误码对应的参数 - */ - private Object[] args; - - /** - * 错误消息 - */ - private String defaultMessage; - - public BaseException(String module, String code, Object[] args, String defaultMessage) { - this.module = module; - this.code = code; - this.args = args; - this.defaultMessage = defaultMessage; - } - - public BaseException(String module, String code, Object[] args) { - this(module, code, args, null); - } - - public BaseException(String module, String defaultMessage) { - this(module, null, null, defaultMessage); - } - - public BaseException(String code, Object[] args) { - this(null, code, args, null); - } - - public BaseException(String defaultMessage) { - this(null, null, null, defaultMessage); - } - - @Override - public String getMessage() { - String message = null; - if (!StringUtils.isEmpty(code)) { - message = MessageUtils.message(code, args); - } - if (message == null) { - message = defaultMessage; - } - return message; - } - - public String getModule() { - return module; - } - - public String getCode() { - return code; - } - - public Object[] getArgs() { - return args; - } - - public String getDefaultMessage() { - return defaultMessage; - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/CustomException.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/CustomException.java deleted file mode 100644 index b9ee3afb..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/CustomException.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.ruoyi.common.exception; - -/** - * 自定义异常 - * - * @author ruoyi - */ -public class CustomException extends RuntimeException { - private static final long serialVersionUID = 1L; - - private Integer code; - - private String message; - - public CustomException(String message) { - this.message = message; - } - - public CustomException(String message, Integer code) { - this.message = message; - this.code = code; - } - - public CustomException(String message, Throwable e) { - super(message, e); - this.message = message; - } - - @Override - public String getMessage() { - return message; - } - - public Integer getCode() { - return code; - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/DemoModeException.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/DemoModeException.java deleted file mode 100644 index 9178131d..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/DemoModeException.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.ruoyi.common.exception; - -/** - * 演示模式异常 - * - * @author ruoyi - */ -public class DemoModeException extends RuntimeException { - private static final long serialVersionUID = 1L; - - public DemoModeException() { - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/UtilException.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/UtilException.java deleted file mode 100644 index 01cc8782..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/UtilException.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.ruoyi.common.exception; - -/** - * 工具类异常 - * - * @author ruoyi - */ -public class UtilException extends RuntimeException { - private static final long serialVersionUID = 8247610319171014183L; - - public UtilException(Throwable e) { - super(e.getMessage(), e); - } - - public UtilException(String message) { - super(message); - } - - public UtilException(String message, Throwable throwable) { - super(message, throwable); - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/file/FileException.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/file/FileException.java deleted file mode 100644 index 95f59be5..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/file/FileException.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.ruoyi.common.exception.file; - -import com.ruoyi.common.exception.BaseException; - -/** - * 文件信息异常类 - * - * @author ruoyi - */ -public class FileException extends BaseException { - private static final long serialVersionUID = 1L; - - public FileException(String code, Object[] args) { - super("file", code, args, null); - } - -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/file/FileNameLengthLimitExceededException.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/file/FileNameLengthLimitExceededException.java deleted file mode 100644 index 64a5020d..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/file/FileNameLengthLimitExceededException.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.ruoyi.common.exception.file; - -/** - * 文件名称超长限制异常类 - * - * @author ruoyi - */ -public class FileNameLengthLimitExceededException extends FileException { - private static final long serialVersionUID = 1L; - - public FileNameLengthLimitExceededException(int defaultFileNameLength) { - super("upload.filename.exceed.length", new Object[]{defaultFileNameLength}); - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/file/FileSizeLimitExceededException.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/file/FileSizeLimitExceededException.java deleted file mode 100644 index 93e9e1c6..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/file/FileSizeLimitExceededException.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.ruoyi.common.exception.file; - -/** - * 文件名大小限制异常类 - * - * @author ruoyi - */ -public class FileSizeLimitExceededException extends FileException { - private static final long serialVersionUID = 1L; - - public FileSizeLimitExceededException(long defaultMaxSize) { - super("upload.exceed.maxSize", new Object[]{defaultMaxSize}); - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/file/InvalidExtensionException.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/file/InvalidExtensionException.java deleted file mode 100644 index ce5c7fda..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/file/InvalidExtensionException.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.ruoyi.common.exception.file; - -import java.util.Arrays; - -import org.apache.commons.fileupload.FileUploadException; - -/** - * 文件上传 误异常类 - * - * @author ruoyi - */ -public class InvalidExtensionException extends FileUploadException { - private static final long serialVersionUID = 1L; - - private String[] allowedExtension; - private String extension; - private String filename; - - public InvalidExtensionException(String[] allowedExtension, String extension, String filename) { - super("filename : [" + filename + "], extension : [" + extension + "], allowed extension : [" + Arrays.toString(allowedExtension) + "]"); - this.allowedExtension = allowedExtension; - this.extension = extension; - this.filename = filename; - } - - public String[] getAllowedExtension() { - return allowedExtension; - } - - public String getExtension() { - return extension; - } - - public String getFilename() { - return filename; - } - - public static class InvalidImageExtensionException extends InvalidExtensionException { - private static final long serialVersionUID = 1L; - - public InvalidImageExtensionException(String[] allowedExtension, String extension, String filename) { - super(allowedExtension, extension, filename); - } - } - - public static class InvalidFlashExtensionException extends InvalidExtensionException { - private static final long serialVersionUID = 1L; - - public InvalidFlashExtensionException(String[] allowedExtension, String extension, String filename) { - super(allowedExtension, extension, filename); - } - } - - public static class InvalidMediaExtensionException extends InvalidExtensionException { - private static final long serialVersionUID = 1L; - - public InvalidMediaExtensionException(String[] allowedExtension, String extension, String filename) { - super(allowedExtension, extension, filename); - } - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/job/TaskException.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/job/TaskException.java deleted file mode 100644 index c9ac31f1..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/job/TaskException.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.ruoyi.common.exception.job; - -/** - * 计划策略异常 - * - * @author ruoyi - */ -public class TaskException extends Exception { - private static final long serialVersionUID = 1L; - - private Code code; - - public TaskException(String msg, Code code) { - this(msg, code, null); - } - - public TaskException(String msg, Code code, Exception nestedEx) { - super(msg, nestedEx); - this.code = code; - } - - public Code getCode() { - return code; - } - - public enum Code { - TASK_EXISTS, NO_TASK_EXISTS, TASK_ALREADY_STARTED, UNKNOWN, CONFIG_ERROR, TASK_NODE_NOT_AVAILABLE - } -} \ No newline at end of file diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/user/CaptchaException.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/user/CaptchaException.java deleted file mode 100644 index 90404854..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/user/CaptchaException.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.ruoyi.common.exception.user; - -/** - * 验证码错误异常类 - * - * @author ruoyi - */ -public class CaptchaException extends UserException { - private static final long serialVersionUID = 1L; - - public CaptchaException() { - super("user.jcaptcha.error", null); - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/user/CaptchaExpireException.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/user/CaptchaExpireException.java deleted file mode 100644 index ae5f759f..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/user/CaptchaExpireException.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.ruoyi.common.exception.user; - -/** - * 验证码失效异常类 - * - * @author ruoyi - */ -public class CaptchaExpireException extends UserException { - private static final long serialVersionUID = 1L; - - public CaptchaExpireException() { - super("user.jcaptcha.expire", null); - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/user/UserException.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/user/UserException.java deleted file mode 100644 index 886ffb5a..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/user/UserException.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.ruoyi.common.exception.user; - -import com.ruoyi.common.exception.BaseException; - -/** - * 用户信息异常类 - * - * @author ruoyi - */ -public class UserException extends BaseException { - private static final long serialVersionUID = 1L; - - public UserException(String code, Object[] args) { - super("user", code, args, null); - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/user/UserPasswordNotMatchException.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/user/UserPasswordNotMatchException.java deleted file mode 100644 index 0fab1167..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/exception/user/UserPasswordNotMatchException.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.ruoyi.common.exception.user; - -/** - * 用户密码不正确或不符合规范异常类 - * - * @author ruoyi - */ -public class UserPasswordNotMatchException extends UserException { - private static final long serialVersionUID = 1L; - - public UserPasswordNotMatchException() { - super("user.password.not.match", null); - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/filter/RepeatableFilter.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/filter/RepeatableFilter.java deleted file mode 100644 index e1fc3a61..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/filter/RepeatableFilter.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.ruoyi.common.filter; - -import java.io.IOException; -import javax.servlet.Filter; -import javax.servlet.FilterChain; -import javax.servlet.FilterConfig; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.http.HttpServletRequest; - -import org.springframework.http.MediaType; -import com.ruoyi.common.utils.StringUtils; - -/** - * Repeatable 过滤器 - * - * @author ruoyi - */ -public class RepeatableFilter implements Filter { - @Override - public void init(FilterConfig filterConfig) throws ServletException { - - } - - @Override - public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) - throws IOException, ServletException { - ServletRequest requestWrapper = null; - if (request instanceof HttpServletRequest - && StringUtils.equalsAnyIgnoreCase(request.getContentType(), MediaType.APPLICATION_JSON_VALUE)) { - requestWrapper = new RepeatedlyRequestWrapper((HttpServletRequest) request, response); - } - if (null == requestWrapper) { - chain.doFilter(request, response); - } else { - chain.doFilter(requestWrapper, response); - } - } - - @Override - public void destroy() { - - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/filter/RepeatedlyRequestWrapper.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/filter/RepeatedlyRequestWrapper.java deleted file mode 100644 index f72291ce..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/filter/RepeatedlyRequestWrapper.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.ruoyi.common.filter; - -import java.io.BufferedReader; -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStreamReader; -import javax.servlet.ReadListener; -import javax.servlet.ServletInputStream; -import javax.servlet.ServletResponse; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletRequestWrapper; - -import com.ruoyi.common.utils.http.HttpHelper; - -/** - * 构建可重复读取inputStream的request - * - * @author ruoyi - */ -public class RepeatedlyRequestWrapper extends HttpServletRequestWrapper { - private final byte[] body; - - public RepeatedlyRequestWrapper(HttpServletRequest request, ServletResponse response) throws IOException { - super(request); - request.setCharacterEncoding("UTF-8"); - response.setCharacterEncoding("UTF-8"); - - body = HttpHelper.getBodyString(request).getBytes("UTF-8"); - } - - @Override - public BufferedReader getReader() throws IOException { - return new BufferedReader(new InputStreamReader(getInputStream())); - } - - @Override - public ServletInputStream getInputStream() throws IOException { - - final ByteArrayInputStream bais = new ByteArrayInputStream(body); - - return new ServletInputStream() { - - @Override - public int read() throws IOException { - return bais.read(); - } - - @Override - public boolean isFinished() { - return false; - } - - @Override - public boolean isReady() { - return false; - } - - @Override - public void setReadListener(ReadListener readListener) { - - } - }; - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/filter/XssFilter.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/filter/XssFilter.java deleted file mode 100644 index 729aa2d2..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/filter/XssFilter.java +++ /dev/null @@ -1,85 +0,0 @@ -package com.ruoyi.common.filter; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import javax.servlet.Filter; -import javax.servlet.FilterChain; -import javax.servlet.FilterConfig; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import com.ruoyi.common.utils.StringUtils; - -/** - * 防止XSS攻击的过滤器 - * - * @author ruoyi - */ -public class XssFilter implements Filter { - /** - * 排除链接 - */ - public List excludes = new ArrayList<>(); - - /** - * xss过滤开关 - */ - public boolean enabled = false; - - @Override - public void init(FilterConfig filterConfig) throws ServletException { - String tempExcludes = filterConfig.getInitParameter("excludes"); - String tempEnabled = filterConfig.getInitParameter("enabled"); - if (StringUtils.isNotEmpty(tempExcludes)) { - String[] url = tempExcludes.split(","); - for (int i = 0; url != null && i < url.length; i++) { - excludes.add(url[i]); - } - } - if (StringUtils.isNotEmpty(tempEnabled)) { - enabled = Boolean.valueOf(tempEnabled); - } - } - - @Override - public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) - throws IOException, ServletException { - HttpServletRequest req = (HttpServletRequest) request; - HttpServletResponse resp = (HttpServletResponse) response; - if (handleExcludeURL(req, resp)) { - chain.doFilter(request, response); - return; - } - XssHttpServletRequestWrapper xssRequest = new XssHttpServletRequestWrapper((HttpServletRequest) request); - chain.doFilter(xssRequest, response); - } - - private boolean handleExcludeURL(HttpServletRequest request, HttpServletResponse response) { - if (!enabled) { - return true; - } - if (excludes == null || excludes.isEmpty()) { - return false; - } - String url = request.getServletPath(); - for (String pattern : excludes) { - Pattern p = Pattern.compile("^" + pattern); - Matcher m = p.matcher(url); - if (m.find()) { - return true; - } - } - return false; - } - - @Override - public void destroy() { - - } -} \ No newline at end of file diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/filter/XssHttpServletRequestWrapper.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/filter/XssHttpServletRequestWrapper.java deleted file mode 100644 index 7152f4d3..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/filter/XssHttpServletRequestWrapper.java +++ /dev/null @@ -1,91 +0,0 @@ -package com.ruoyi.common.filter; - -import java.io.ByteArrayInputStream; -import java.io.IOException; -import javax.servlet.ReadListener; -import javax.servlet.ServletInputStream; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletRequestWrapper; - -import org.apache.commons.io.IOUtils; -import org.springframework.http.HttpHeaders; -import org.springframework.http.MediaType; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.common.utils.html.EscapeUtil; - -/** - * XSS过滤处理 - * - * @author ruoyi - */ -public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper { - /** - * @param request - */ - public XssHttpServletRequestWrapper(HttpServletRequest request) { - super(request); - } - - @Override - public String[] getParameterValues(String name) { - String[] values = super.getParameterValues(name); - if (values != null) { - int length = values.length; - String[] escapseValues = new String[length]; - for (int i = 0; i < length; i++) { - // 防xss攻击和过滤前后空格 - escapseValues[i] = EscapeUtil.clean(values[i]).trim(); - } - return escapseValues; - } - return super.getParameterValues(name); - } - - @Override - public ServletInputStream getInputStream() throws IOException { - // 非json类型,直接返回 - if (!isJsonRequest()) { - return super.getInputStream(); - } - - // 为空,直接返回 - String json = IOUtils.toString(super.getInputStream(), "utf-8"); - if (StringUtils.isEmpty(json)) { - return super.getInputStream(); - } - - // xss过滤 - json = EscapeUtil.clean(json).trim(); - final ByteArrayInputStream bis = new ByteArrayInputStream(json.getBytes("utf-8")); - return new ServletInputStream() { - @Override - public boolean isFinished() { - return true; - } - - @Override - public boolean isReady() { - return true; - } - - @Override - public void setReadListener(ReadListener readListener) { - } - - @Override - public int read() throws IOException { - return bis.read(); - } - }; - } - - /** - * 是否是Json请求 - * - * @param request - */ - public boolean isJsonRequest() { - String header = super.getHeader(HttpHeaders.CONTENT_TYPE); - return MediaType.APPLICATION_JSON_VALUE.equalsIgnoreCase(header); - } -} \ No newline at end of file diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/Arith.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/Arith.java deleted file mode 100644 index e8abc25e..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/Arith.java +++ /dev/null @@ -1,113 +0,0 @@ -package com.ruoyi.common.utils; - -import java.math.BigDecimal; -import java.math.RoundingMode; - -/** - * 精确的浮点数运算 - * - * @author ruoyi - */ -public class Arith { - - /** - * 默认除法运算精度 - */ - private static final int DEF_DIV_SCALE = 10; - - /** - * 这个类不能实例化 - */ - private Arith() { - } - - /** - * 提供精确的加法运算。 - * - * @param v1 被加数 - * @param v2 加数 - * @return 两个参数的和 - */ - public static double add(double v1, double v2) { - BigDecimal b1 = new BigDecimal(Double.toString(v1)); - BigDecimal b2 = new BigDecimal(Double.toString(v2)); - return b1.add(b2).doubleValue(); - } - - /** - * 提供精确的减法运算。 - * - * @param v1 被减数 - * @param v2 减数 - * @return 两个参数的差 - */ - public static double sub(double v1, double v2) { - BigDecimal b1 = new BigDecimal(Double.toString(v1)); - BigDecimal b2 = new BigDecimal(Double.toString(v2)); - return b1.subtract(b2).doubleValue(); - } - - /** - * 提供精确的乘法运算。 - * - * @param v1 被乘数 - * @param v2 乘数 - * @return 两个参数的积 - */ - public static double mul(double v1, double v2) { - BigDecimal b1 = new BigDecimal(Double.toString(v1)); - BigDecimal b2 = new BigDecimal(Double.toString(v2)); - return b1.multiply(b2).doubleValue(); - } - - /** - * 提供(相对)精确的除法运算,当发生除不尽的情况时,精确到 - * 小数点以后10位,以后的数字四舍五入。 - * - * @param v1 被除数 - * @param v2 除数 - * @return 两个参数的商 - */ - public static double div(double v1, double v2) { - return div(v1, v2, DEF_DIV_SCALE); - } - - /** - * 提供(相对)精确的除法运算。当发生除不尽的情况时,由scale参数指 - * 定精度,以后的数字四舍五入。 - * - * @param v1 被除数 - * @param v2 除数 - * @param scale 表示表示需要精确到小数点以后几位。 - * @return 两个参数的商 - */ - public static double div(double v1, double v2, int scale) { - if (scale < 0) { - throw new IllegalArgumentException( - "The scale must be a positive integer or zero"); - } - BigDecimal b1 = new BigDecimal(Double.toString(v1)); - BigDecimal b2 = new BigDecimal(Double.toString(v2)); - if (b1.compareTo(BigDecimal.ZERO) == 0) { - return BigDecimal.ZERO.doubleValue(); - } - return b1.divide(b2, scale, RoundingMode.HALF_UP).doubleValue(); - } - - /** - * 提供精确的小数位四舍五入处理。 - * - * @param v 需要四舍五入的数字 - * @param scale 小数点后保留几位 - * @return 四舍五入后的结果 - */ - public static double round(double v, int scale) { - if (scale < 0) { - throw new IllegalArgumentException( - "The scale must be a positive integer or zero"); - } - BigDecimal b = new BigDecimal(Double.toString(v)); - BigDecimal one = new BigDecimal("1"); - return b.divide(one, scale, RoundingMode.HALF_UP).doubleValue(); - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/DateUtils.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/DateUtils.java deleted file mode 100644 index 0ecacf32..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/DateUtils.java +++ /dev/null @@ -1,135 +0,0 @@ -package com.ruoyi.common.utils; - -import java.lang.management.ManagementFactory; -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.Date; - -import org.apache.commons.lang3.time.DateFormatUtils; - -/** - * 时间工具类 - * - * @author ruoyi - */ -public class DateUtils extends org.apache.commons.lang3.time.DateUtils { - public static String YYYY = "yyyy"; - - public static String YYYY_MM = "yyyy-MM"; - - public static String YYYY_MM_DD = "yyyy-MM-dd"; - - public static String YYYYMMDDHHMMSS = "yyyyMMddHHmmss"; - - public static String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss"; - - private static String[] parsePatterns = { - "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM", - "yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy/MM", - "yyyy.MM.dd", "yyyy.MM.dd HH:mm:ss", "yyyy.MM.dd HH:mm", "yyyy.MM"}; - - /** - * 获取当前Date型日期 - * - * @return Date() 当前日期 - */ - public static Date getNowDate() { - return new Date(); - } - - /** - * 获取当前日期, 默认格式为yyyy-MM-dd - * - * @return String - */ - public static String getDate() { - return dateTimeNow(YYYY_MM_DD); - } - - public static final String getTime() { - return dateTimeNow(YYYY_MM_DD_HH_MM_SS); - } - - public static final String dateTimeNow() { - return dateTimeNow(YYYYMMDDHHMMSS); - } - - public static final String dateTimeNow(final String format) { - return parseDateToStr(format, new Date()); - } - - public static final String dateTime(final Date date) { - return parseDateToStr(YYYY_MM_DD, date); - } - - public static final String parseDateToStr(final String format, final Date date) { - return new SimpleDateFormat(format).format(date); - } - - public static final Date dateTime(final String format, final String ts) { - try { - return new SimpleDateFormat(format).parse(ts); - } catch (ParseException e) { - throw new RuntimeException(e); - } - } - - /** - * 日期路径 即年/月/日 如2018/08/08 - */ - public static final String datePath() { - Date now = new Date(); - return DateFormatUtils.format(now, "yyyy/MM/dd"); - } - - /** - * 日期路径 即年/月/日 如20180808 - */ - public static final String dateTime() { - Date now = new Date(); - return DateFormatUtils.format(now, "yyyyMMdd"); - } - - /** - * 日期型字符串转化为日期 格式 - */ - public static Date parseDate(Object str) { - if (str == null) { - return null; - } - try { - return parseDate(str.toString(), parsePatterns); - } catch (ParseException e) { - return null; - } - } - - /** - * 获取服务器启动时间 - */ - public static Date getServerStartDate() { - long time = ManagementFactory.getRuntimeMXBean().getStartTime(); - return new Date(time); - } - - /** - * 计算两个时间差 - */ - public static String getDatePoor(Date endDate, Date nowDate) { - long nd = 1000 * 24 * 60 * 60; - long nh = 1000 * 60 * 60; - long nm = 1000 * 60; - // long ns = 1000; - // 获得两个时间的毫秒时间差异 - long diff = endDate.getTime() - nowDate.getTime(); - // 计算差多少天 - long day = diff / nd; - // 计算差多少小时 - long hour = diff % nd / nh; - // 计算差多少分钟 - long min = diff % nd % nh / nm; - // 计算差多少秒//输出结果 - // long sec = diff % nd % nh % nm / ns; - return day + "天" + hour + "小时" + min + "分钟"; - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/DictUtils.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/DictUtils.java deleted file mode 100644 index 5d7e838c..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/DictUtils.java +++ /dev/null @@ -1,148 +0,0 @@ -package com.ruoyi.common.utils; - -import java.util.Collection; -import java.util.List; - -import com.ruoyi.common.constant.Constants; -import com.ruoyi.common.core.domain.entity.SysDictData; -import com.ruoyi.common.core.redis.RedisCache; -import com.ruoyi.common.utils.spring.SpringUtils; - -/** - * 字典工具类 - * - * @author ruoyi - */ -public class DictUtils { - /** - * 分隔符 - */ - public static final String SEPARATOR = ","; - - /** - * 设置字典缓存 - * - * @param key 参数键 - * @param dictDatas 字典数据列表 - */ - public static void setDictCache(String key, List dictDatas) { - SpringUtils.getBean(RedisCache.class).setCacheObject(getCacheKey(key), dictDatas); - } - - /** - * 获取字典缓存 - * - * @param key 参数键 - * @return dictDatas 字典数据列表 - */ - public static List getDictCache(String key) { - Object cacheObj = SpringUtils.getBean(RedisCache.class).getCacheObject(getCacheKey(key)); - if (StringUtils.isNotNull(cacheObj)) { - List dictDatas = StringUtils.cast(cacheObj); - return dictDatas; - } - return null; - } - - /** - * 根据字典类型和字典值获取字典标签 - * - * @param dictType 字典类型 - * @param dictValue 字典值 - * @return 字典标签 - */ - public static String getDictLabel(String dictType, String dictValue) { - return getDictLabel(dictType, dictValue, SEPARATOR); - } - - /** - * 根据字典类型和字典标签获取字典值 - * - * @param dictType 字典类型 - * @param dictLabel 字典标签 - * @return 字典值 - */ - public static String getDictValue(String dictType, String dictLabel) { - return getDictValue(dictType, dictLabel, SEPARATOR); - } - - /** - * 根据字典类型和字典值获取字典标签 - * - * @param dictType 字典类型 - * @param dictValue 字典值 - * @param separator 分隔符 - * @return 字典标签 - */ - public static String getDictLabel(String dictType, String dictValue, String separator) { - StringBuilder propertyString = new StringBuilder(); - List datas = getDictCache(dictType); - - if (StringUtils.containsAny(separator, dictValue) && StringUtils.isNotEmpty(datas)) { - for (SysDictData dict : datas) { - for (String value : dictValue.split(separator)) { - if (value.equals(dict.getDictValue())) { - propertyString.append(dict.getDictLabel() + separator); - break; - } - } - } - } else { - for (SysDictData dict : datas) { - if (dictValue.equals(dict.getDictValue())) { - return dict.getDictLabel(); - } - } - } - return StringUtils.stripEnd(propertyString.toString(), separator); - } - - /** - * 根据字典类型和字典标签获取字典值 - * - * @param dictType 字典类型 - * @param dictLabel 字典标签 - * @param separator 分隔符 - * @return 字典值 - */ - public static String getDictValue(String dictType, String dictLabel, String separator) { - StringBuilder propertyString = new StringBuilder(); - List datas = getDictCache(dictType); - - if (StringUtils.containsAny(separator, dictLabel) && StringUtils.isNotEmpty(datas)) { - for (SysDictData dict : datas) { - for (String label : dictLabel.split(separator)) { - if (label.equals(dict.getDictLabel())) { - propertyString.append(dict.getDictValue() + separator); - break; - } - } - } - } else { - for (SysDictData dict : datas) { - if (dictLabel.equals(dict.getDictLabel())) { - return dict.getDictValue(); - } - } - } - return StringUtils.stripEnd(propertyString.toString(), separator); - } - - /** - * 清空字典缓存 - */ - public static void clearDictCache() { - Collection keys = SpringUtils.getBean(RedisCache.class).keys(Constants.SYS_DICT_KEY + "*"); - SpringUtils.getBean(RedisCache.class).deleteObject(keys); - } - - /** - * 设置cache key - * - * @param configKey 参数键 - * @return 缓存键key - */ - public static String getCacheKey(String configKey) { - return Constants.SYS_DICT_KEY + configKey; - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/ExceptionUtil.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/ExceptionUtil.java deleted file mode 100644 index 56406fdf..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/ExceptionUtil.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.ruoyi.common.utils; - -import java.io.PrintWriter; -import java.io.StringWriter; - -import org.apache.commons.lang3.exception.ExceptionUtils; - -/** - * 错误信息处理类。 - * - * @author ruoyi - */ -public class ExceptionUtil { - /** - * 获取exception的详细错误信息。 - */ - public static String getExceptionMessage(Throwable e) { - StringWriter sw = new StringWriter(); - e.printStackTrace(new PrintWriter(sw, true)); - String str = sw.toString(); - return str; - } - - public static String getRootErrorMseeage(Exception e) { - Throwable root = ExceptionUtils.getRootCause(e); - root = (root == null ? e : root); - if (root == null) { - return ""; - } - String msg = root.getMessage(); - if (msg == null) { - return "null"; - } - return StringUtils.defaultString(msg); - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/LogUtils.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/LogUtils.java deleted file mode 100644 index a0d5c9f6..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/LogUtils.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.ruoyi.common.utils; - -/** - * 处理并记录日志文件 - * - * @author ruoyi - */ -public class LogUtils { - public static String getBlock(Object msg) { - if (msg == null) { - msg = ""; - } - return "[" + msg.toString() + "]"; - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/MessageUtils.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/MessageUtils.java deleted file mode 100644 index d9eb4b97..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/MessageUtils.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.ruoyi.common.utils; - -import org.springframework.context.MessageSource; -import org.springframework.context.i18n.LocaleContextHolder; -import com.ruoyi.common.utils.spring.SpringUtils; - -/** - * 获取i18n资源文件 - * - * @author ruoyi - */ -public class MessageUtils { - /** - * 根据消息键和参数 获取消息 委托给spring messageSource - * - * @param code 消息键 - * @param args 参数 - * @return 获取国际化翻译值 - */ - public static String message(String code, Object... args) { - MessageSource messageSource = SpringUtils.getBean(MessageSource.class); - return messageSource.getMessage(code, args, LocaleContextHolder.getLocale()); - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/SecurityUtils.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/SecurityUtils.java deleted file mode 100644 index bef342f2..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/SecurityUtils.java +++ /dev/null @@ -1,78 +0,0 @@ -package com.ruoyi.common.utils; - -import org.springframework.security.core.Authentication; -import org.springframework.security.core.context.SecurityContextHolder; -import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; -import com.ruoyi.common.constant.HttpStatus; -import com.ruoyi.common.core.domain.model.LoginUser; -import com.ruoyi.common.exception.CustomException; - -/** - * 安全服务工具类 - * - * @author ruoyi - */ -public class SecurityUtils { - /** - * 获取用户账户 - **/ - public static String getUsername() { - try { - return getLoginUser().getUsername(); - } catch (Exception e) { - e.printStackTrace(); - throw new CustomException("获取用户账户异常", HttpStatus.UNAUTHORIZED); - } - } - - /** - * 获取用户 - **/ - public static LoginUser getLoginUser() { - try { - return (LoginUser) getAuthentication().getPrincipal(); - } catch (Exception e) { - throw new CustomException("获取用户信息异常", HttpStatus.UNAUTHORIZED); - } - } - - /** - * 获取Authentication - */ - public static Authentication getAuthentication() { - return SecurityContextHolder.getContext().getAuthentication(); - } - - /** - * 生成BCryptPasswordEncoder密码 - * - * @param password 密码 - * @return 加密字符串 - */ - public static String encryptPassword(String password) { - BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder(); - return passwordEncoder.encode(password); - } - - /** - * 判断密码是否相同 - * - * @param rawPassword 真实密码 - * @param encodedPassword 加密后字符 - * @return 结果 - */ - public static boolean matchesPassword(String rawPassword, String encodedPassword) { - BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder(); - return passwordEncoder.matches(rawPassword, encodedPassword); - } - - /** - * 是否为管理员 - * - * @param userId 用户ID - * @return 结果 - */ - public static boolean isAdmin(Long userId) { - return userId != null && 1L == userId; - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/ServletUtils.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/ServletUtils.java deleted file mode 100644 index cc245797..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/ServletUtils.java +++ /dev/null @@ -1,119 +0,0 @@ -package com.ruoyi.common.utils; - -import java.io.IOException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import org.springframework.web.context.request.RequestAttributes; -import org.springframework.web.context.request.RequestContextHolder; -import org.springframework.web.context.request.ServletRequestAttributes; -import com.ruoyi.common.core.text.Convert; - -/** - * 客户端工具类 - * - * @author ruoyi - */ -public class ServletUtils { - /** - * 获取String参数 - */ - public static String getParameter(String name) { - return getRequest().getParameter(name); - } - - /** - * 获取String参数 - */ - public static String getParameter(String name, String defaultValue) { - return Convert.toStr(getRequest().getParameter(name), defaultValue); - } - - /** - * 获取Integer参数 - */ - public static Integer getParameterToInt(String name) { - return Convert.toInt(getRequest().getParameter(name)); - } - - /** - * 获取Integer参数 - */ - public static Integer getParameterToInt(String name, Integer defaultValue) { - return Convert.toInt(getRequest().getParameter(name), defaultValue); - } - - /** - * 获取request - */ - public static HttpServletRequest getRequest() { - return getRequestAttributes().getRequest(); - } - - /** - * 获取response - */ - public static HttpServletResponse getResponse() { - return getRequestAttributes().getResponse(); - } - - /** - * 获取session - */ - public static HttpSession getSession() { - return getRequest().getSession(); - } - - public static ServletRequestAttributes getRequestAttributes() { - RequestAttributes attributes = RequestContextHolder.getRequestAttributes(); - return (ServletRequestAttributes) attributes; - } - - /** - * 将字符串渲染到客户端 - * - * @param response 渲染对象 - * @param string 待渲染的字符串 - * @return null - */ - public static String renderString(HttpServletResponse response, String string) { - try { - response.setStatus(200); - response.setContentType("application/json"); - response.setCharacterEncoding("utf-8"); - response.getWriter().print(string); - } catch (IOException e) { - e.printStackTrace(); - } - return null; - } - - /** - * 是否是Ajax异步请求 - * - * @param request - */ - public static boolean isAjaxRequest(HttpServletRequest request) { - String accept = request.getHeader("accept"); - if (accept != null && accept.indexOf("application/json") != -1) { - return true; - } - - String xRequestedWith = request.getHeader("X-Requested-With"); - if (xRequestedWith != null && xRequestedWith.indexOf("XMLHttpRequest") != -1) { - return true; - } - - String uri = request.getRequestURI(); - if (StringUtils.inStringIgnoreCase(uri, ".json", ".xml")) { - return true; - } - - String ajax = request.getParameter("__ajax"); - if (StringUtils.inStringIgnoreCase(ajax, "json", "xml")) { - return true; - } - return false; - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/StringUtils.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/StringUtils.java deleted file mode 100644 index 4802bc94..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/StringUtils.java +++ /dev/null @@ -1,399 +0,0 @@ -package com.ruoyi.common.utils; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import com.ruoyi.common.core.text.StrFormatter; - -/** - * 字符串工具类 - * - * @author ruoyi - */ -public class StringUtils extends org.apache.commons.lang3.StringUtils { - /** - * 空字符串 - */ - private static final String NULLSTR = ""; - - /** - * 下划线 - */ - private static final char SEPARATOR = '_'; - - /** - * 获取参数不为空值 - * - * @param value defaultValue 要判断的value - * @return value 返回值 - */ - public static T nvl(T value, T defaultValue) { - return value != null ? value : defaultValue; - } - - /** - * * 判断一个Collection是否为空, 包含List,Set,Queue - * - * @param coll 要判断的Collection - * @return true:为空 false:非空 - */ - public static boolean isEmpty(Collection coll) { - return isNull(coll) || coll.isEmpty(); - } - - /** - * * 判断一个Collection是否非空,包含List,Set,Queue - * - * @param coll 要判断的Collection - * @return true:非空 false:空 - */ - public static boolean isNotEmpty(Collection coll) { - return !isEmpty(coll); - } - - /** - * * 判断一个对象数组是否为空 - * - * @param objects 要判断的对象数组 - * * @return true:为空 false:非空 - */ - public static boolean isEmpty(Object[] objects) { - return isNull(objects) || (objects.length == 0); - } - - /** - * * 判断一个对象数组是否非空 - * - * @param objects 要判断的对象数组 - * @return true:非空 false:空 - */ - public static boolean isNotEmpty(Object[] objects) { - return !isEmpty(objects); - } - - /** - * * 判断一个Map是否为空 - * - * @param map 要判断的Map - * @return true:为空 false:非空 - */ - public static boolean isEmpty(Map map) { - return isNull(map) || map.isEmpty(); - } - - /** - * * 判断一个Map是否为空 - * - * @param map 要判断的Map - * @return true:非空 false:空 - */ - public static boolean isNotEmpty(Map map) { - return !isEmpty(map); - } - - /** - * * 判断一个字符串是否为空串 - * - * @param str String - * @return true:为空 false:非空 - */ - public static boolean isEmpty(String str) { - return isNull(str) || NULLSTR.equals(str.trim()); - } - - /** - * * 判断一个字符串是否为非空串 - * - * @param str String - * @return true:非空串 false:空串 - */ - public static boolean isNotEmpty(String str) { - return !isEmpty(str); - } - - /** - * * 判断一个对象是否为空 - * - * @param object Object - * @return true:为空 false:非空 - */ - public static boolean isNull(Object object) { - return object == null; - } - - /** - * * 判断一个对象是否非空 - * - * @param object Object - * @return true:非空 false:空 - */ - public static boolean isNotNull(Object object) { - return !isNull(object); - } - - /** - * * 判断一个对象是否是数组类型(Java基本型别的数组) - * - * @param object 对象 - * @return true:是数组 false:不是数组 - */ - public static boolean isArray(Object object) { - return isNotNull(object) && object.getClass().isArray(); - } - - /** - * 去空格 - */ - public static String trim(String str) { - return (str == null ? "" : str.trim()); - } - - /** - * 截取字符串 - * - * @param str 字符串 - * @param start 开始 - * @return 结果 - */ - public static String substring(final String str, int start) { - if (str == null) { - return NULLSTR; - } - - if (start < 0) { - start = str.length() + start; - } - - if (start < 0) { - start = 0; - } - if (start > str.length()) { - return NULLSTR; - } - - return str.substring(start); - } - - /** - * 截取字符串 - * - * @param str 字符串 - * @param start 开始 - * @param end 结束 - * @return 结果 - */ - public static String substring(final String str, int start, int end) { - if (str == null) { - return NULLSTR; - } - - if (end < 0) { - end = str.length() + end; - } - if (start < 0) { - start = str.length() + start; - } - - if (end > str.length()) { - end = str.length(); - } - - if (start > end) { - return NULLSTR; - } - - if (start < 0) { - start = 0; - } - if (end < 0) { - end = 0; - } - - return str.substring(start, end); - } - - /** - * 格式化文本, {} 表示占位符
- * 此方法只是简单将占位符 {} 按照顺序替换为参数
- * 如果想输出 {} 使用 \\转义 { 即可,如果想输出 {} 之前的 \ 使用双转义符 \\\\ 即可
- * 例:
- * 通常使用:format("this is {} for {}", "a", "b") -> this is a for b
- * 转义{}: format("this is \\{} for {}", "a", "b") -> this is \{} for a
- * 转义\: format("this is \\\\{} for {}", "a", "b") -> this is \a for b
- * - * @param template 文本模板,被替换的部分用 {} 表示 - * @param params 参数值 - * @return 格式化后的文本 - */ - public static String format(String template, Object... params) { - if (isEmpty(params) || isEmpty(template)) { - return template; - } - return StrFormatter.format(template, params); - } - - /** - * 字符串转set - * - * @param str 字符串 - * @param sep 分隔符 - * @return set集合 - */ - public static final Set str2Set(String str, String sep) { - return new HashSet(str2List(str, sep, true, false)); - } - - /** - * 字符串转list - * - * @param str 字符串 - * @param sep 分隔符 - * @param filterBlank 过滤纯空白 - * @param trim 去掉首尾空白 - * @return list集合 - */ - public static final List str2List(String str, String sep, boolean filterBlank, boolean trim) { - List list = new ArrayList(); - if (StringUtils.isEmpty(str)) { - return list; - } - - // 过滤空白字符串 - if (filterBlank && StringUtils.isBlank(str)) { - return list; - } - String[] split = str.split(sep); - for (String string : split) { - if (filterBlank && StringUtils.isBlank(string)) { - continue; - } - if (trim) { - string = string.trim(); - } - list.add(string); - } - - return list; - } - - /** - * 下划线转驼峰命名 - */ - public static String toUnderScoreCase(String str) { - if (str == null) { - return null; - } - StringBuilder sb = new StringBuilder(); - // 前置字符是否大写 - boolean preCharIsUpperCase = true; - // 当前字符是否大写 - boolean curreCharIsUpperCase = true; - // 下一字符是否大写 - boolean nexteCharIsUpperCase = true; - for (int i = 0; i < str.length(); i++) { - char c = str.charAt(i); - if (i > 0) { - preCharIsUpperCase = Character.isUpperCase(str.charAt(i - 1)); - } else { - preCharIsUpperCase = false; - } - - curreCharIsUpperCase = Character.isUpperCase(c); - - if (i < (str.length() - 1)) { - nexteCharIsUpperCase = Character.isUpperCase(str.charAt(i + 1)); - } - - if (preCharIsUpperCase && curreCharIsUpperCase && !nexteCharIsUpperCase) { - sb.append(SEPARATOR); - } else if ((i != 0 && !preCharIsUpperCase) && curreCharIsUpperCase) { - sb.append(SEPARATOR); - } - sb.append(Character.toLowerCase(c)); - } - - return sb.toString(); - } - - /** - * 是否包含字符串 - * - * @param str 验证字符串 - * @param strs 字符串组 - * @return 包含返回true - */ - public static boolean inStringIgnoreCase(String str, String... strs) { - if (str != null && strs != null) { - for (String s : strs) { - if (str.equalsIgnoreCase(trim(s))) { - return true; - } - } - } - return false; - } - - /** - * 将下划线大写方式命名的字符串转换为驼峰式。如果转换前的下划线大写方式命名的字符串为空,则返回空字符串。 例如:HELLO_WORLD->HelloWorld - * - * @param name 转换前的下划线大写方式命名的字符串 - * @return 转换后的驼峰式命名的字符串 - */ - public static String convertToCamelCase(String name) { - StringBuilder result = new StringBuilder(); - // 快速检查 - if (name == null || name.isEmpty()) { - // 没必要转换 - return ""; - } else if (!name.contains("_")) { - // 不含下划线,仅将首字母大写 - return name.substring(0, 1).toUpperCase() + name.substring(1); - } - // 用下划线将原始字符串分割 - String[] camels = name.split("_"); - for (String camel : camels) { - // 跳过原始字符串中开头、结尾的下换线或双重下划线 - if (camel.isEmpty()) { - continue; - } - // 首字母大写 - result.append(camel.substring(0, 1).toUpperCase()); - result.append(camel.substring(1).toLowerCase()); - } - return result.toString(); - } - - /** - * 驼峰式命名法 例如:user_name->userName - */ - public static String toCamelCase(String s) { - if (s == null) { - return null; - } - s = s.toLowerCase(); - StringBuilder sb = new StringBuilder(s.length()); - boolean upperCase = false; - for (int i = 0; i < s.length(); i++) { - char c = s.charAt(i); - - if (c == SEPARATOR) { - upperCase = true; - } else if (upperCase) { - sb.append(Character.toUpperCase(c)); - upperCase = false; - } else { - sb.append(c); - } - } - return sb.toString(); - } - - @SuppressWarnings("unchecked") - public static T cast(Object obj) { - return (T) obj; - } -} \ No newline at end of file diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/Threads.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/Threads.java deleted file mode 100644 index f427c314..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/Threads.java +++ /dev/null @@ -1,77 +0,0 @@ -package com.ruoyi.common.utils; - -import java.util.concurrent.CancellationException; -import java.util.concurrent.ExecutionException; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Future; -import java.util.concurrent.TimeUnit; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * 线程相关工具类. - * - * @author ruoyi - */ -public class Threads { - private static final Logger logger = LoggerFactory.getLogger(Threads.class); - - /** - * sleep等待,单位为毫秒 - */ - public static void sleep(long milliseconds) { - try { - Thread.sleep(milliseconds); - } catch (InterruptedException e) { - return; - } - } - - /** - * 停止线程池 - * 先使用shutdown, 停止接收新任务并尝试完成所有已存在任务. - * 如果超时, 则调用shutdownNow, 取消在workQueue中Pending的任务,并中断所有阻塞函数. - * 如果仍人超時,則強制退出. - * 另对在shutdown时线程本身被调用中断做了处理. - */ - public static void shutdownAndAwaitTermination(ExecutorService pool) { - if (pool != null && !pool.isShutdown()) { - pool.shutdown(); - try { - if (!pool.awaitTermination(120, TimeUnit.SECONDS)) { - pool.shutdownNow(); - if (!pool.awaitTermination(120, TimeUnit.SECONDS)) { - logger.info("Pool did not terminate"); - } - } - } catch (InterruptedException ie) { - pool.shutdownNow(); - Thread.currentThread().interrupt(); - } - } - } - - /** - * 打印线程异常信息 - */ - public static void printException(Runnable r, Throwable t) { - if (t == null && r instanceof Future) { - try { - Future future = (Future) r; - if (future.isDone()) { - future.get(); - } - } catch (CancellationException ce) { - t = ce; - } catch (ExecutionException ee) { - t = ee.getCause(); - } catch (InterruptedException ie) { - Thread.currentThread().interrupt(); - } - } - if (t != null) { - logger.error(t.getMessage(), t); - } - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/VerifyCodeUtils.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/VerifyCodeUtils.java deleted file mode 100644 index 12e2d465..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/VerifyCodeUtils.java +++ /dev/null @@ -1,206 +0,0 @@ -package com.ruoyi.common.utils; - -import java.awt.Color; -import java.awt.Font; -import java.awt.Graphics; -import java.awt.Graphics2D; -import java.awt.RenderingHints; -import java.awt.geom.AffineTransform; -import java.awt.image.BufferedImage; -import java.io.IOException; -import java.io.OutputStream; -import java.security.SecureRandom; -import java.util.Arrays; -import java.util.Random; -import javax.imageio.ImageIO; - -/** - * 验证码工具类 - * - * @author ruoyi - */ -public class VerifyCodeUtils { - // 使用到Algerian字体,系统里没有的话需要安装字体,字体只显示大写,去掉了1,0,i,o几个容易混淆的字符 - public static final String VERIFY_CODES = "123456789ABCDEFGHJKLMNPQRSTUVWXYZ"; - - private static Random random = new SecureRandom(); - - /** - * 使用系统默认字符源生成验证码 - * - * @param verifySize 验证码长度 - * @return - */ - public static String generateVerifyCode(int verifySize) { - return generateVerifyCode(verifySize, VERIFY_CODES); - } - - /** - * 使用指定源生成验证码 - * - * @param verifySize 验证码长度 - * @param sources 验证码字符源 - * @return - */ - public static String generateVerifyCode(int verifySize, String sources) { - if (sources == null || sources.length() == 0) { - sources = VERIFY_CODES; - } - int codesLen = sources.length(); - Random rand = new Random(System.currentTimeMillis()); - StringBuilder verifyCode = new StringBuilder(verifySize); - for (int i = 0; i < verifySize; i++) { - verifyCode.append(sources.charAt(rand.nextInt(codesLen - 1))); - } - return verifyCode.toString(); - } - - /** - * 输出指定验证码图片流 - * - * @param w - * @param h - * @param os - * @param code - * @throws IOException - */ - public static void outputImage(int w, int h, OutputStream os, String code) throws IOException { - int verifySize = code.length(); - BufferedImage image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB); - Random rand = new Random(); - Graphics2D g2 = image.createGraphics(); - g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); - Color[] colors = new Color[5]; - Color[] colorSpaces = new Color[]{Color.WHITE, Color.CYAN, Color.GRAY, Color.LIGHT_GRAY, Color.MAGENTA, - Color.ORANGE, Color.PINK, Color.YELLOW}; - float[] fractions = new float[colors.length]; - for (int i = 0; i < colors.length; i++) { - colors[i] = colorSpaces[rand.nextInt(colorSpaces.length)]; - fractions[i] = rand.nextFloat(); - } - Arrays.sort(fractions); - - g2.setColor(Color.GRAY);// 设置边框色 - g2.fillRect(0, 0, w, h); - - Color c = getRandColor(200, 250); - g2.setColor(c);// 设置背景色 - g2.fillRect(0, 2, w, h - 4); - - // 绘制干扰线 - Random random = new Random(); - g2.setColor(getRandColor(160, 200));// 设置线条的颜色 - for (int i = 0; i < 20; i++) { - int x = random.nextInt(w - 1); - int y = random.nextInt(h - 1); - int xl = random.nextInt(6) + 1; - int yl = random.nextInt(12) + 1; - g2.drawLine(x, y, x + xl + 40, y + yl + 20); - } - - // 添加噪点 - float yawpRate = 0.05f;// 噪声率 - int area = (int) (yawpRate * w * h); - for (int i = 0; i < area; i++) { - int x = random.nextInt(w); - int y = random.nextInt(h); - int rgb = getRandomIntColor(); - image.setRGB(x, y, rgb); - } - - shear(g2, w, h, c);// 使图片扭曲 - - g2.setColor(getRandColor(100, 160)); - int fontSize = h - 4; - Font font = new Font("Algerian", Font.ITALIC, fontSize); - g2.setFont(font); - char[] chars = code.toCharArray(); - for (int i = 0; i < verifySize; i++) { - AffineTransform affine = new AffineTransform(); - affine.setToRotation(Math.PI / 4 * rand.nextDouble() * (rand.nextBoolean() ? 1 : -1), - (w / verifySize) * i + fontSize / 2, h / 2); - g2.setTransform(affine); - g2.drawChars(chars, i, 1, ((w - 10) / verifySize) * i + 5, h / 2 + fontSize / 2 - 10); - } - - g2.dispose(); - ImageIO.write(image, "jpg", os); - } - - private static Color getRandColor(int fc, int bc) { - if (fc > 255) { - fc = 255; - } - if (bc > 255) { - bc = 255; - } - int r = fc + random.nextInt(bc - fc); - int g = fc + random.nextInt(bc - fc); - int b = fc + random.nextInt(bc - fc); - return new Color(r, g, b); - } - - private static int getRandomIntColor() { - int[] rgb = getRandomRgb(); - int color = 0; - for (int c : rgb) { - color = color << 8; - color = color | c; - } - return color; - } - - private static int[] getRandomRgb() { - int[] rgb = new int[3]; - for (int i = 0; i < 3; i++) { - rgb[i] = random.nextInt(255); - } - return rgb; - } - - private static void shear(Graphics g, int w1, int h1, Color color) { - shearX(g, w1, h1, color); - shearY(g, w1, h1, color); - } - - private static void shearX(Graphics g, int w1, int h1, Color color) { - - int period = random.nextInt(2); - - boolean borderGap = true; - int frames = 1; - int phase = random.nextInt(2); - - for (int i = 0; i < h1; i++) { - double d = (double) (period >> 1) - * Math.sin((double) i / (double) period + (6.2831853071795862D * (double) phase) / (double) frames); - g.copyArea(0, i, w1, 1, (int) d, 0); - if (borderGap) { - g.setColor(color); - g.drawLine((int) d, i, 0, i); - g.drawLine((int) d + w1, i, w1, i); - } - } - - } - - private static void shearY(Graphics g, int w1, int h1, Color color) { - - int period = random.nextInt(40) + 10; // 50; - - boolean borderGap = true; - int frames = 20; - int phase = 7; - for (int i = 0; i < w1; i++) { - double d = (double) (period >> 1) - * Math.sin((double) i / (double) period + (6.2831853071795862D * (double) phase) / (double) frames); - g.copyArea(i, 0, 1, h1, 0, (int) d); - if (borderGap) { - g.setColor(color); - g.drawLine(i, (int) d, i, 0); - g.drawLine(i, (int) d + h1, i, h1); - } - - } - } -} \ No newline at end of file diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/bean/BeanUtils.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/bean/BeanUtils.java deleted file mode 100644 index 43114b30..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/bean/BeanUtils.java +++ /dev/null @@ -1,104 +0,0 @@ -package com.ruoyi.common.utils.bean; - -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.List; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * Bean 工具类 - * - * @author ruoyi - */ -public class BeanUtils extends org.springframework.beans.BeanUtils { - /** - * Bean方法名中属性名开始的下标 - */ - private static final int BEAN_METHOD_PROP_INDEX = 3; - - /** - * 匹配getter方法的正则表达式 - */ - private static final Pattern GET_PATTERN = Pattern.compile("get(\\p{javaUpperCase}\\w*)"); - - /** - * 匹配setter方法的正则表达式 - */ - private static final Pattern SET_PATTERN = Pattern.compile("set(\\p{javaUpperCase}\\w*)"); - - /** - * Bean属性复制工具方法。 - * - * @param dest 目标对象 - * @param src 源对象 - */ - public static void copyBeanProp(Object dest, Object src) { - try { - copyProperties(src, dest); - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * 获取对象的setter方法。 - * - * @param obj 对象 - * @return 对象的setter方法列表 - */ - public static List getSetterMethods(Object obj) { - // setter方法列表 - List setterMethods = new ArrayList(); - - // 获取所有方法 - Method[] methods = obj.getClass().getMethods(); - - // 查找setter方法 - - for (Method method : methods) { - Matcher m = SET_PATTERN.matcher(method.getName()); - if (m.matches() && (method.getParameterTypes().length == 1)) { - setterMethods.add(method); - } - } - // 返回setter方法列表 - return setterMethods; - } - - /** - * 获取对象的getter方法。 - * - * @param obj 对象 - * @return 对象的getter方法列表 - */ - - public static List getGetterMethods(Object obj) { - // getter方法列表 - List getterMethods = new ArrayList(); - // 获取所有方法 - Method[] methods = obj.getClass().getMethods(); - // 查找getter方法 - for (Method method : methods) { - Matcher m = GET_PATTERN.matcher(method.getName()); - if (m.matches() && (method.getParameterTypes().length == 0)) { - getterMethods.add(method); - } - } - // 返回getter方法列表 - return getterMethods; - } - - /** - * 检查Bean方法名中的属性名是否相等。
- * 如getName()和setName()属性名一样,getName()和setAge()属性名不一样。 - * - * @param m1 方法名1 - * @param m2 方法名2 - * @return 属性名一样返回true,否则返回false - */ - - public static boolean isMethodPropEquals(String m1, String m2) { - return m1.substring(BEAN_METHOD_PROP_INDEX).equals(m2.substring(BEAN_METHOD_PROP_INDEX)); - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileTypeUtils.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileTypeUtils.java deleted file mode 100644 index 23155448..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileTypeUtils.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.ruoyi.common.utils.file; - -import java.io.File; - -import org.apache.commons.lang3.StringUtils; - -/** - * 文件类型工具类 - * - * @author ruoyi - */ -public class FileTypeUtils { - /** - * 获取文件类型 - *

- * 例如: ruoyi.txt, 返回: txt - * - * @param file 文件名 - * @return 后缀(不含".") - */ - public static String getFileType(File file) { - if (null == file) { - return StringUtils.EMPTY; - } - return getFileType(file.getName()); - } - - /** - * 获取文件类型 - *

- * 例如: ruoyi.txt, 返回: txt - * - * @param fileName 文件名 - * @return 后缀(不含".") - */ - public static String getFileType(String fileName) { - int separatorIndex = fileName.lastIndexOf("."); - if (separatorIndex < 0) { - return ""; - } - return fileName.substring(separatorIndex + 1).toLowerCase(); - } - - /** - * 获取文件类型 - * - * @param photoByte 文件字节码 - * @return 后缀(不含".") - */ - public static String getFileExtendName(byte[] photoByte) { - String strFileExtendName = "JPG"; - if ((photoByte[0] == 71) && (photoByte[1] == 73) && (photoByte[2] == 70) && (photoByte[3] == 56) - && ((photoByte[4] == 55) || (photoByte[4] == 57)) && (photoByte[5] == 97)) { - strFileExtendName = "GIF"; - } else if ((photoByte[6] == 74) && (photoByte[7] == 70) && (photoByte[8] == 73) && (photoByte[9] == 70)) { - strFileExtendName = "JPG"; - } else if ((photoByte[0] == 66) && (photoByte[1] == 77)) { - strFileExtendName = "BMP"; - } else if ((photoByte[1] == 80) && (photoByte[2] == 78) && (photoByte[3] == 71)) { - strFileExtendName = "PNG"; - } - return strFileExtendName; - } -} \ No newline at end of file diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java deleted file mode 100644 index bd0b0160..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java +++ /dev/null @@ -1,199 +0,0 @@ -package com.ruoyi.common.utils.file; - -import java.io.File; -import java.io.IOException; - -import org.apache.commons.io.FilenameUtils; -import org.springframework.web.multipart.MultipartFile; -import com.ruoyi.common.config.RuoYiConfig; -import com.ruoyi.common.constant.Constants; -import com.ruoyi.common.exception.file.FileNameLengthLimitExceededException; -import com.ruoyi.common.exception.file.FileSizeLimitExceededException; -import com.ruoyi.common.exception.file.InvalidExtensionException; -import com.ruoyi.common.utils.DateUtils; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.common.utils.uuid.IdUtils; - -/** - * 文件上传工具类 - * - * @author ruoyi - */ -public class FileUploadUtils { - /** - * 默认大小 50M - */ - public static final long DEFAULT_MAX_SIZE = 50 * 1024 * 1024; - - /** - * 默认的文件名最大长度 100 - */ - public static final int DEFAULT_FILE_NAME_LENGTH = 100; - - /** - * 默认上传的地址 - */ - private static String defaultBaseDir = RuoYiConfig.getProfile(); - - public static void setDefaultBaseDir(String defaultBaseDir) { - FileUploadUtils.defaultBaseDir = defaultBaseDir; - } - - public static String getDefaultBaseDir() { - return defaultBaseDir; - } - - /** - * 以默认配置进行文件上传 - * - * @param file 上传的文件 - * @return 文件名称 - * @throws Exception - */ - public static final String upload(MultipartFile file) throws IOException { - try { - return upload(getDefaultBaseDir(), file, MimeTypeUtils.DEFAULT_ALLOWED_EXTENSION); - } catch (Exception e) { - throw new IOException(e.getMessage(), e); - } - } - - /** - * 根据文件路径上传 - * - * @param baseDir 相对应用的基目录 - * @param file 上传的文件 - * @return 文件名称 - * @throws IOException - */ - public static final String upload(String baseDir, MultipartFile file) throws IOException { - try { - return upload(baseDir, file, MimeTypeUtils.DEFAULT_ALLOWED_EXTENSION); - } catch (Exception e) { - throw new IOException(e.getMessage(), e); - } - } - - /** - * 文件上传 - * - * @param baseDir 相对应用的基目录 - * @param file 上传的文件 - * @param allowedExtension 上传文件类型 - * @return 返回上传成功的文件名 - * @throws FileSizeLimitExceededException 如果超出最大大小 - * @throws FileNameLengthLimitExceededException 文件名太长 - * @throws IOException 比如读写文件出错时 - * @throws InvalidExtensionException 文件校验异常 - */ - public static final String upload(String baseDir, MultipartFile file, String[] allowedExtension) - throws FileSizeLimitExceededException, IOException, FileNameLengthLimitExceededException, - InvalidExtensionException { - int fileNamelength = file.getOriginalFilename().length(); - if (fileNamelength > FileUploadUtils.DEFAULT_FILE_NAME_LENGTH) { - throw new FileNameLengthLimitExceededException(FileUploadUtils.DEFAULT_FILE_NAME_LENGTH); - } - - assertAllowed(file, allowedExtension); - - String fileName = extractFilename(file); - - File desc = getAbsoluteFile(baseDir, fileName); - file.transferTo(desc); - String pathFileName = getPathFileName(baseDir, fileName); - return pathFileName; - } - - /** - * 编码文件名 - */ - public static final String extractFilename(MultipartFile file) { - String fileName = file.getOriginalFilename(); - String extension = getExtension(file); - fileName = DateUtils.datePath() + "/" + IdUtils.fastUUID() + "." + extension; - return fileName; - } - - private static final File getAbsoluteFile(String uploadDir, String fileName) throws IOException { - File desc = new File(uploadDir + File.separator + fileName); - - if (!desc.getParentFile().exists()) { - desc.getParentFile().mkdirs(); - } - if (!desc.exists()) { - desc.createNewFile(); - } - return desc; - } - - private static final String getPathFileName(String uploadDir, String fileName) throws IOException { - int dirLastIndex = RuoYiConfig.getProfile().length() + 1; - String currentDir = StringUtils.substring(uploadDir, dirLastIndex); - String pathFileName = Constants.RESOURCE_PREFIX + "/" + currentDir + "/" + fileName; - return pathFileName; - } - - /** - * 文件大小校验 - * - * @param file 上传的文件 - * @return - * @throws FileSizeLimitExceededException 如果超出最大大小 - * @throws InvalidExtensionException - */ - public static final void assertAllowed(MultipartFile file, String[] allowedExtension) - throws FileSizeLimitExceededException, InvalidExtensionException { - long size = file.getSize(); - if (DEFAULT_MAX_SIZE != -1 && size > DEFAULT_MAX_SIZE) { - throw new FileSizeLimitExceededException(DEFAULT_MAX_SIZE / 1024 / 1024); - } - - String fileName = file.getOriginalFilename(); - String extension = getExtension(file); - if (allowedExtension != null && !isAllowedExtension(extension, allowedExtension)) { - if (allowedExtension == MimeTypeUtils.IMAGE_EXTENSION) { - throw new InvalidExtensionException.InvalidImageExtensionException(allowedExtension, extension, - fileName); - } else if (allowedExtension == MimeTypeUtils.FLASH_EXTENSION) { - throw new InvalidExtensionException.InvalidFlashExtensionException(allowedExtension, extension, - fileName); - } else if (allowedExtension == MimeTypeUtils.MEDIA_EXTENSION) { - throw new InvalidExtensionException.InvalidMediaExtensionException(allowedExtension, extension, - fileName); - } else { - throw new InvalidExtensionException(allowedExtension, extension, fileName); - } - } - - } - - /** - * 判断MIME类型是否是允许的MIME类型 - * - * @param extension - * @param allowedExtension - * @return - */ - public static final boolean isAllowedExtension(String extension, String[] allowedExtension) { - for (String str : allowedExtension) { - if (str.equalsIgnoreCase(extension)) { - return true; - } - } - return false; - } - - /** - * 获取文件名的后缀 - * - * @param file 表单文件 - * @return 后缀名 - */ - public static final String getExtension(MultipartFile file) { - String extension = FilenameUtils.getExtension(file.getOriginalFilename()); - if (StringUtils.isEmpty(extension)) { - extension = MimeTypeUtils.getExtension(file.getContentType()); - } - return extension; - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUtils.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUtils.java deleted file mode 100644 index adabd6f4..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUtils.java +++ /dev/null @@ -1,171 +0,0 @@ -package com.ruoyi.common.utils.file; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.OutputStream; -import java.io.UnsupportedEncodingException; -import java.net.URLEncoder; -import java.nio.charset.StandardCharsets; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.commons.lang3.ArrayUtils; -import com.ruoyi.common.utils.StringUtils; - -/** - * 文件处理工具类 - * - * @author ruoyi - */ -public class FileUtils extends org.apache.commons.io.FileUtils { - public static String FILENAME_PATTERN = "[a-zA-Z0-9_\\-\\|\\.\\u4e00-\\u9fa5]+"; - - /** - * 输出指定文件的byte数组 - * - * @param filePath 文件路径 - * @param os 输出流 - * @return - */ - public static void writeBytes(String filePath, OutputStream os) throws IOException { - FileInputStream fis = null; - try { - File file = new File(filePath); - if (!file.exists()) { - throw new FileNotFoundException(filePath); - } - fis = new FileInputStream(file); - byte[] b = new byte[1024]; - int length; - while ((length = fis.read(b)) > 0) { - os.write(b, 0, length); - } - } catch (IOException e) { - throw e; - } finally { - if (os != null) { - try { - os.close(); - } catch (IOException e1) { - e1.printStackTrace(); - } - } - if (fis != null) { - try { - fis.close(); - } catch (IOException e1) { - e1.printStackTrace(); - } - } - } - } - - /** - * 删除文件 - * - * @param filePath 文件 - * @return - */ - public static boolean deleteFile(String filePath) { - boolean flag = false; - File file = new File(filePath); - // 路径为文件且不为空则进行删除 - if (file.isFile() && file.exists()) { - file.delete(); - flag = true; - } - return flag; - } - - /** - * 文件名称验证 - * - * @param filename 文件名称 - * @return true 正常 false 非法 - */ - public static boolean isValidFilename(String filename) { - return filename.matches(FILENAME_PATTERN); - } - - /** - * 检查文件是否可下载 - * - * @param resource 需要下载的文件 - * @return true 正常 false 非法 - */ - public static boolean checkAllowDownload(String resource) { - // 禁止目录上跳级别 - if (StringUtils.contains(resource, "..")) { - return false; - } - - // 检查允许下载的文件规则 - if (ArrayUtils.contains(MimeTypeUtils.DEFAULT_ALLOWED_EXTENSION, FileTypeUtils.getFileType(resource))) { - return true; - } - - // 不在允许下载的文件规则 - return false; - } - - /** - * 下载文件名重新编码 - * - * @param request 请求对象 - * @param fileName 文件名 - * @return 编码后的文件名 - */ - public static String setFileDownloadHeader(HttpServletRequest request, String fileName) throws UnsupportedEncodingException { - final String agent = request.getHeader("USER-AGENT"); - String filename = fileName; - if (agent.contains("MSIE")) { - // IE浏览器 - filename = URLEncoder.encode(filename, "utf-8"); - filename = filename.replace("+", " "); - } else if (agent.contains("Firefox")) { - // 火狐浏览器 - filename = new String(fileName.getBytes(), "ISO8859-1"); - } else if (agent.contains("Chrome")) { - // google浏览器 - filename = URLEncoder.encode(filename, "utf-8"); - } else { - // 其它浏览器 - filename = URLEncoder.encode(filename, "utf-8"); - } - return filename; - } - - /** - * 下载文件名重新编码 - * - * @param response 响应对象 - * @param realFileName 真实文件名 - * @return - */ - public static void setAttachmentResponseHeader(HttpServletResponse response, String realFileName) throws UnsupportedEncodingException { - String percentEncodedFileName = percentEncode(realFileName); - - StringBuilder contentDispositionValue = new StringBuilder(); - contentDispositionValue.append("attachment; filename=") - .append(percentEncodedFileName) - .append(";") - .append("filename*=") - .append("utf-8''") - .append(percentEncodedFileName); - - response.setHeader("Content-disposition", contentDispositionValue.toString()); - } - - /** - * 百分号编码工具方法 - * - * @param s 需要百分号编码的字符串 - * @return 百分号编码后的字符串 - */ - public static String percentEncode(String s) throws UnsupportedEncodingException { - String encode = URLEncoder.encode(s, StandardCharsets.UTF_8.toString()); - return encode.replaceAll("\\+", "%20"); - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/ImageUtils.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/ImageUtils.java deleted file mode 100644 index 4744eaff..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/ImageUtils.java +++ /dev/null @@ -1,81 +0,0 @@ -package com.ruoyi.common.utils.file; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.FileInputStream; -import java.io.InputStream; -import java.net.URL; -import java.net.URLConnection; -import java.util.Arrays; - -import org.apache.poi.util.IOUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import com.ruoyi.common.config.RuoYiConfig; -import com.ruoyi.common.constant.Constants; -import com.ruoyi.common.utils.StringUtils; - -/** - * 图片处理工具类 - * - * @author ruoyi - */ -public class ImageUtils { - private static final Logger log = LoggerFactory.getLogger(ImageUtils.class); - - public static byte[] getImage(String imagePath) { - InputStream is = getFile(imagePath); - try { - return IOUtils.toByteArray(is); - } catch (Exception e) { - log.error("图片加载异常 {}", e); - return null; - } finally { - IOUtils.closeQuietly(is); - } - } - - public static InputStream getFile(String imagePath) { - try { - byte[] result = readFile(imagePath); - result = Arrays.copyOf(result, result.length); - return new ByteArrayInputStream(result); - } catch (Exception e) { - log.error("获取图片异常 {}", e); - } - return null; - } - - /** - * 读取文件为字节数据 - * - * @param key 地址 - * @return 字节数据 - */ - public static byte[] readFile(String url) { - InputStream in = null; - ByteArrayOutputStream baos = null; - try { - if (url.startsWith("http")) { - // 网络地址 - URL urlObj = new URL(url); - URLConnection urlConnection = urlObj.openConnection(); - urlConnection.setConnectTimeout(30 * 1000); - urlConnection.setReadTimeout(60 * 1000); - urlConnection.setDoInput(true); - in = urlConnection.getInputStream(); - } else { - // 本机地址 - String localPath = RuoYiConfig.getProfile(); - String downloadPath = localPath + StringUtils.substringAfter(url, Constants.RESOURCE_PREFIX); - in = new FileInputStream(downloadPath); - } - return IOUtils.toByteArray(in); - } catch (Exception e) { - log.error("获取文件路径异常 {}", e); - return null; - } finally { - IOUtils.closeQuietly(baos); - } - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/MimeTypeUtils.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/MimeTypeUtils.java deleted file mode 100644 index 4369fc65..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/file/MimeTypeUtils.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.ruoyi.common.utils.file; - -/** - * 媒体类型工具类 - * - * @author ruoyi - */ -public class MimeTypeUtils { - public static final String IMAGE_PNG = "image/png"; - - public static final String IMAGE_JPG = "image/jpg"; - - public static final String IMAGE_JPEG = "image/jpeg"; - - public static final String IMAGE_BMP = "image/bmp"; - - public static final String IMAGE_GIF = "image/gif"; - - public static final String[] IMAGE_EXTENSION = {"bmp", "gif", "jpg", "jpeg", "png"}; - - public static final String[] FLASH_EXTENSION = {"swf", "flv"}; - - public static final String[] MEDIA_EXTENSION = {"swf", "flv", "mp3", "wav", "wma", "wmv", "mid", "avi", "mpg", - "asf", "rm", "rmvb"}; - - public static final String[] DEFAULT_ALLOWED_EXTENSION = { - // 图片 - "bmp", "gif", "jpg", "jpeg", "png", - // word excel powerpoint - "doc", "docx", "xls", "xlsx", "ppt", "pptx", "html", "htm", "txt", - // 压缩文件 - "rar", "zip", "gz", "bz2", - // pdf - "pdf"}; - - public static String getExtension(String prefix) { - switch (prefix) { - case IMAGE_PNG: - return "png"; - case IMAGE_JPG: - return "jpg"; - case IMAGE_JPEG: - return "jpeg"; - case IMAGE_BMP: - return "bmp"; - case IMAGE_GIF: - return "gif"; - default: - return ""; - } - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/html/EscapeUtil.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/html/EscapeUtil.java deleted file mode 100644 index f2e81f2c..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/html/EscapeUtil.java +++ /dev/null @@ -1,130 +0,0 @@ -package com.ruoyi.common.utils.html; - -import com.ruoyi.common.utils.StringUtils; - -/** - * 转义和反转义工具类 - * - * @author ruoyi - */ -public class EscapeUtil { - public static final String RE_HTML_MARK = "(<[^<]*?>)|(<[\\s]*?/[^<]*?>)|(<[^<]*?/[\\s]*?>)"; - - private static final char[][] TEXT = new char[64][]; - - static { - for (int i = 0; i < 64; i++) { - TEXT[i] = new char[]{(char) i}; - } - - // special HTML characters - TEXT['\''] = "'".toCharArray(); // 单引号 - TEXT['"'] = """.toCharArray(); // 单引号 - TEXT['&'] = "&".toCharArray(); // &符 - TEXT['<'] = "<".toCharArray(); // 小于号 - TEXT['>'] = ">".toCharArray(); // 大于号 - } - - /** - * 转义文本中的HTML字符为安全的字符 - * - * @param text 被转义的文本 - * @return 转义后的文本 - */ - public static String escape(String text) { - return encode(text); - } - - /** - * 还原被转义的HTML特殊字符 - * - * @param content 包含转义符的HTML内容 - * @return 转换后的字符串 - */ - public static String unescape(String content) { - return decode(content); - } - - /** - * 清除所有HTML标签,但是不删除标签内的内容 - * - * @param content 文本 - * @return 清除标签后的文本 - */ - public static String clean(String content) { - return new HTMLFilter().filter(content); - } - - /** - * Escape编码 - * - * @param text 被编码的文本 - * @return 编码后的字符 - */ - private static String encode(String text) { - int len; - if ((text == null) || ((len = text.length()) == 0)) { - return StringUtils.EMPTY; - } - StringBuilder buffer = new StringBuilder(len + (len >> 2)); - char c; - for (int i = 0; i < len; i++) { - c = text.charAt(i); - if (c < 64) { - buffer.append(TEXT[c]); - } else { - buffer.append(c); - } - } - return buffer.toString(); - } - - /** - * Escape解码 - * - * @param content 被转义的内容 - * @return 解码后的字符串 - */ - public static String decode(String content) { - if (StringUtils.isEmpty(content)) { - return content; - } - - StringBuilder tmp = new StringBuilder(content.length()); - int lastPos = 0, pos = 0; - char ch; - while (lastPos < content.length()) { - pos = content.indexOf("%", lastPos); - if (pos == lastPos) { - if (content.charAt(pos + 1) == 'u') { - ch = (char) Integer.parseInt(content.substring(pos + 2, pos + 6), 16); - tmp.append(ch); - lastPos = pos + 6; - } else { - ch = (char) Integer.parseInt(content.substring(pos + 1, pos + 3), 16); - tmp.append(ch); - lastPos = pos + 3; - } - } else { - if (pos == -1) { - tmp.append(content.substring(lastPos)); - lastPos = content.length(); - } else { - tmp.append(content.substring(lastPos, pos)); - lastPos = pos; - } - } - } - return tmp.toString(); - } - - public static void main(String[] args) { - String html = ""; - // String html = "ipt>alert(\"XSS\")ipt>"; - // String html = "<123"; - // String html = "123>"; - System.out.println(EscapeUtil.clean(html)); - System.out.println(EscapeUtil.escape(html)); - System.out.println(EscapeUtil.unescape(html)); - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/html/HTMLFilter.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/html/HTMLFilter.java deleted file mode 100644 index 12375b1b..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/html/HTMLFilter.java +++ /dev/null @@ -1,501 +0,0 @@ -package com.ruoyi.common.utils.html; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentMap; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * HTML过滤器,用于去除XSS漏洞隐患。 - * - * @author ruoyi - */ -public final class HTMLFilter { - /** - * regex flag union representing /si modifiers in php - **/ - private static final int REGEX_FLAGS_SI = Pattern.CASE_INSENSITIVE | Pattern.DOTALL; - private static final Pattern P_COMMENTS = Pattern.compile("", Pattern.DOTALL); - private static final Pattern P_COMMENT = Pattern.compile("^!--(.*)--$", REGEX_FLAGS_SI); - private static final Pattern P_TAGS = Pattern.compile("<(.*?)>", Pattern.DOTALL); - private static final Pattern P_END_TAG = Pattern.compile("^/([a-z0-9]+)", REGEX_FLAGS_SI); - private static final Pattern P_START_TAG = Pattern.compile("^([a-z0-9]+)(.*?)(/?)$", REGEX_FLAGS_SI); - private static final Pattern P_QUOTED_ATTRIBUTES = Pattern.compile("([a-z0-9]+)=([\"'])(.*?)\\2", REGEX_FLAGS_SI); - private static final Pattern P_UNQUOTED_ATTRIBUTES = Pattern.compile("([a-z0-9]+)(=)([^\"\\s']+)", REGEX_FLAGS_SI); - private static final Pattern P_PROTOCOL = Pattern.compile("^([^:]+):", REGEX_FLAGS_SI); - private static final Pattern P_ENTITY = Pattern.compile("&#(\\d+);?"); - private static final Pattern P_ENTITY_UNICODE = Pattern.compile("&#x([0-9a-f]+);?"); - private static final Pattern P_ENCODE = Pattern.compile("%([0-9a-f]{2});?"); - private static final Pattern P_VALID_ENTITIES = Pattern.compile("&([^&;]*)(?=(;|&|$))"); - private static final Pattern P_VALID_QUOTES = Pattern.compile("(>|^)([^<]+?)(<|$)", Pattern.DOTALL); - private static final Pattern P_END_ARROW = Pattern.compile("^>"); - private static final Pattern P_BODY_TO_END = Pattern.compile("<([^>]*?)(?=<|$)"); - private static final Pattern P_XML_CONTENT = Pattern.compile("(^|>)([^<]*?)(?=>)"); - private static final Pattern P_STRAY_LEFT_ARROW = Pattern.compile("<([^>]*?)(?=<|$)"); - private static final Pattern P_STRAY_RIGHT_ARROW = Pattern.compile("(^|>)([^<]*?)(?=>)"); - private static final Pattern P_AMP = Pattern.compile("&"); - private static final Pattern P_QUOTE = Pattern.compile("\""); - private static final Pattern P_LEFT_ARROW = Pattern.compile("<"); - private static final Pattern P_RIGHT_ARROW = Pattern.compile(">"); - private static final Pattern P_BOTH_ARROWS = Pattern.compile("<>"); - - // @xxx could grow large... maybe use sesat's ReferenceMap - private static final ConcurrentMap P_REMOVE_PAIR_BLANKS = new ConcurrentHashMap<>(); - private static final ConcurrentMap P_REMOVE_SELF_BLANKS = new ConcurrentHashMap<>(); - - /** - * set of allowed html elements, along with allowed attributes for each element - **/ - private final Map> vAllowed; - /** - * counts of open tags for each (allowable) html element - **/ - private final Map vTagCounts = new HashMap<>(); - - /** - * html elements which must always be self-closing (e.g. "") - **/ - private final String[] vSelfClosingTags; - /** - * html elements which must always have separate opening and closing tags (e.g. "") - **/ - private final String[] vNeedClosingTags; - /** - * set of disallowed html elements - **/ - private final String[] vDisallowed; - /** - * attributes which should be checked for valid protocols - **/ - private final String[] vProtocolAtts; - /** - * allowed protocols - **/ - private final String[] vAllowedProtocols; - /** - * tags which should be removed if they contain no content (e.g. "" or "") - **/ - private final String[] vRemoveBlanks; - /** - * entities allowed within html markup - **/ - private final String[] vAllowedEntities; - /** - * flag determining whether comments are allowed in input String. - */ - private final boolean stripComment; - private final boolean encodeQuotes; - /** - * flag determining whether to try to make tags when presented with "unbalanced" angle brackets (e.g. "" - * becomes " text "). If set to false, unbalanced angle brackets will be html escaped. - */ - private final boolean alwaysMakeTags; - - /** - * Default constructor. - */ - public HTMLFilter() { - vAllowed = new HashMap<>(); - - final ArrayList a_atts = new ArrayList<>(); - a_atts.add("href"); - a_atts.add("target"); - vAllowed.put("a", a_atts); - - final ArrayList img_atts = new ArrayList<>(); - img_atts.add("src"); - img_atts.add("width"); - img_atts.add("height"); - img_atts.add("alt"); - vAllowed.put("img", img_atts); - - final ArrayList no_atts = new ArrayList<>(); - vAllowed.put("b", no_atts); - vAllowed.put("strong", no_atts); - vAllowed.put("i", no_atts); - vAllowed.put("em", no_atts); - - vSelfClosingTags = new String[]{"img"}; - vNeedClosingTags = new String[]{"a", "b", "strong", "i", "em"}; - vDisallowed = new String[]{}; - vAllowedProtocols = new String[]{"http", "mailto", "https"}; // no ftp. - vProtocolAtts = new String[]{"src", "href"}; - vRemoveBlanks = new String[]{"a", "b", "strong", "i", "em"}; - vAllowedEntities = new String[]{"amp", "gt", "lt", "quot"}; - stripComment = true; - encodeQuotes = true; - alwaysMakeTags = false; - } - - /** - * Map-parameter configurable constructor. - * - * @param conf map containing configuration. keys match field names. - */ - @SuppressWarnings("unchecked") - public HTMLFilter(final Map conf) { - - assert conf.containsKey("vAllowed") : "configuration requires vAllowed"; - assert conf.containsKey("vSelfClosingTags") : "configuration requires vSelfClosingTags"; - assert conf.containsKey("vNeedClosingTags") : "configuration requires vNeedClosingTags"; - assert conf.containsKey("vDisallowed") : "configuration requires vDisallowed"; - assert conf.containsKey("vAllowedProtocols") : "configuration requires vAllowedProtocols"; - assert conf.containsKey("vProtocolAtts") : "configuration requires vProtocolAtts"; - assert conf.containsKey("vRemoveBlanks") : "configuration requires vRemoveBlanks"; - assert conf.containsKey("vAllowedEntities") : "configuration requires vAllowedEntities"; - - vAllowed = Collections.unmodifiableMap((HashMap>) conf.get("vAllowed")); - vSelfClosingTags = (String[]) conf.get("vSelfClosingTags"); - vNeedClosingTags = (String[]) conf.get("vNeedClosingTags"); - vDisallowed = (String[]) conf.get("vDisallowed"); - vAllowedProtocols = (String[]) conf.get("vAllowedProtocols"); - vProtocolAtts = (String[]) conf.get("vProtocolAtts"); - vRemoveBlanks = (String[]) conf.get("vRemoveBlanks"); - vAllowedEntities = (String[]) conf.get("vAllowedEntities"); - stripComment = conf.containsKey("stripComment") ? (Boolean) conf.get("stripComment") : true; - encodeQuotes = conf.containsKey("encodeQuotes") ? (Boolean) conf.get("encodeQuotes") : true; - alwaysMakeTags = conf.containsKey("alwaysMakeTags") ? (Boolean) conf.get("alwaysMakeTags") : true; - } - - private void reset() { - vTagCounts.clear(); - } - - // --------------------------------------------------------------- - // my versions of some PHP library functions - public static String chr(final int decimal) { - return String.valueOf((char) decimal); - } - - public static String htmlSpecialChars(final String s) { - String result = s; - result = regexReplace(P_AMP, "&", result); - result = regexReplace(P_QUOTE, """, result); - result = regexReplace(P_LEFT_ARROW, "<", result); - result = regexReplace(P_RIGHT_ARROW, ">", result); - return result; - } - - // --------------------------------------------------------------- - - /** - * given a user submitted input String, filter out any invalid or restricted html. - * - * @param input text (i.e. submitted by a user) than may contain html - * @return "clean" version of input, with only valid, whitelisted html elements allowed - */ - public String filter(final String input) { - reset(); - String s = input; - - s = escapeComments(s); - - s = balanceHTML(s); - - s = checkTags(s); - - s = processRemoveBlanks(s); - - // s = validateEntities(s); - - return s; - } - - public boolean isAlwaysMakeTags() { - return alwaysMakeTags; - } - - public boolean isStripComments() { - return stripComment; - } - - private String escapeComments(final String s) { - final Matcher m = P_COMMENTS.matcher(s); - final StringBuffer buf = new StringBuffer(); - if (m.find()) { - final String match = m.group(1); // (.*?) - m.appendReplacement(buf, Matcher.quoteReplacement("")); - } - m.appendTail(buf); - - return buf.toString(); - } - - private String balanceHTML(String s) { - if (alwaysMakeTags) { - // - // try and form html - // - s = regexReplace(P_END_ARROW, "", s); - // 不追加结束标签 - s = regexReplace(P_BODY_TO_END, "<$1>", s); - s = regexReplace(P_XML_CONTENT, "$1<$2", s); - - } else { - // - // escape stray brackets - // - s = regexReplace(P_STRAY_LEFT_ARROW, "<$1", s); - s = regexReplace(P_STRAY_RIGHT_ARROW, "$1$2><", s); - - // - // the last regexp causes '<>' entities to appear - // (we need to do a lookahead assertion so that the last bracket can - // be used in the next pass of the regexp) - // - s = regexReplace(P_BOTH_ARROWS, "", s); - } - - return s; - } - - private String checkTags(String s) { - Matcher m = P_TAGS.matcher(s); - - final StringBuffer buf = new StringBuffer(); - while (m.find()) { - String replaceStr = m.group(1); - replaceStr = processTag(replaceStr); - m.appendReplacement(buf, Matcher.quoteReplacement(replaceStr)); - } - m.appendTail(buf); - - // these get tallied in processTag - // (remember to reset before subsequent calls to filter method) - final StringBuilder sBuilder = new StringBuilder(buf.toString()); - for (String key : vTagCounts.keySet()) { - for (int ii = 0; ii < vTagCounts.get(key); ii++) { - sBuilder.append(""); - } - } - s = sBuilder.toString(); - - return s; - } - - private String processRemoveBlanks(final String s) { - String result = s; - for (String tag : vRemoveBlanks) { - if (!P_REMOVE_PAIR_BLANKS.containsKey(tag)) { - P_REMOVE_PAIR_BLANKS.putIfAbsent(tag, Pattern.compile("<" + tag + "(\\s[^>]*)?>")); - } - result = regexReplace(P_REMOVE_PAIR_BLANKS.get(tag), "", result); - if (!P_REMOVE_SELF_BLANKS.containsKey(tag)) { - P_REMOVE_SELF_BLANKS.putIfAbsent(tag, Pattern.compile("<" + tag + "(\\s[^>]*)?/>")); - } - result = regexReplace(P_REMOVE_SELF_BLANKS.get(tag), "", result); - } - - return result; - } - - private static String regexReplace(final Pattern regex_pattern, final String replacement, final String s) { - Matcher m = regex_pattern.matcher(s); - return m.replaceAll(replacement); - } - - private String processTag(final String s) { - // ending tags - Matcher m = P_END_TAG.matcher(s); - if (m.find()) { - final String name = m.group(1).toLowerCase(); - if (allowed(name)) { - if (false == inArray(name, vSelfClosingTags)) { - if (vTagCounts.containsKey(name)) { - vTagCounts.put(name, vTagCounts.get(name) - 1); - return ""; - } - } - } - } - - // starting tags - m = P_START_TAG.matcher(s); - if (m.find()) { - final String name = m.group(1).toLowerCase(); - final String body = m.group(2); - String ending = m.group(3); - - // debug( "in a starting tag, name='" + name + "'; body='" + body + "'; ending='" + ending + "'" ); - if (allowed(name)) { - final StringBuilder params = new StringBuilder(); - - final Matcher m2 = P_QUOTED_ATTRIBUTES.matcher(body); - final Matcher m3 = P_UNQUOTED_ATTRIBUTES.matcher(body); - final List paramNames = new ArrayList<>(); - final List paramValues = new ArrayList<>(); - while (m2.find()) { - paramNames.add(m2.group(1)); // ([a-z0-9]+) - paramValues.add(m2.group(3)); // (.*?) - } - while (m3.find()) { - paramNames.add(m3.group(1)); // ([a-z0-9]+) - paramValues.add(m3.group(3)); // ([^\"\\s']+) - } - - String paramName, paramValue; - for (int ii = 0; ii < paramNames.size(); ii++) { - paramName = paramNames.get(ii).toLowerCase(); - paramValue = paramValues.get(ii); - - // debug( "paramName='" + paramName + "'" ); - // debug( "paramValue='" + paramValue + "'" ); - // debug( "allowed? " + vAllowed.get( name ).contains( paramName ) ); - - if (allowedAttribute(name, paramName)) { - if (inArray(paramName, vProtocolAtts)) { - paramValue = processParamProtocol(paramValue); - } - params.append(' ').append(paramName).append("=\"").append(paramValue).append("\""); - } - } - - if (inArray(name, vSelfClosingTags)) { - ending = " /"; - } - - if (inArray(name, vNeedClosingTags)) { - ending = ""; - } - - if (ending == null || ending.length() < 1) { - if (vTagCounts.containsKey(name)) { - vTagCounts.put(name, vTagCounts.get(name) + 1); - } else { - vTagCounts.put(name, 1); - } - } else { - ending = " /"; - } - return "<" + name + params + ending + ">"; - } else { - return ""; - } - } - - // comments - m = P_COMMENT.matcher(s); - if (!stripComment && m.find()) { - return "<" + m.group() + ">"; - } - - return ""; - } - - private String processParamProtocol(String s) { - s = decodeEntities(s); - final Matcher m = P_PROTOCOL.matcher(s); - if (m.find()) { - final String protocol = m.group(1); - if (!inArray(protocol, vAllowedProtocols)) { - // bad protocol, turn into local anchor link instead - s = "#" + s.substring(protocol.length() + 1); - if (s.startsWith("#//")) { - s = "#" + s.substring(3); - } - } - } - - return s; - } - - private String decodeEntities(String s) { - StringBuffer buf = new StringBuffer(); - - Matcher m = P_ENTITY.matcher(s); - while (m.find()) { - final String match = m.group(1); - final int decimal = Integer.decode(match).intValue(); - m.appendReplacement(buf, Matcher.quoteReplacement(chr(decimal))); - } - m.appendTail(buf); - s = buf.toString(); - - buf = new StringBuffer(); - m = P_ENTITY_UNICODE.matcher(s); - while (m.find()) { - final String match = m.group(1); - final int decimal = Integer.valueOf(match, 16).intValue(); - m.appendReplacement(buf, Matcher.quoteReplacement(chr(decimal))); - } - m.appendTail(buf); - s = buf.toString(); - - buf = new StringBuffer(); - m = P_ENCODE.matcher(s); - while (m.find()) { - final String match = m.group(1); - final int decimal = Integer.valueOf(match, 16).intValue(); - m.appendReplacement(buf, Matcher.quoteReplacement(chr(decimal))); - } - m.appendTail(buf); - s = buf.toString(); - - s = validateEntities(s); - return s; - } - - private String validateEntities(final String s) { - StringBuffer buf = new StringBuffer(); - - // validate entities throughout the string - Matcher m = P_VALID_ENTITIES.matcher(s); - while (m.find()) { - final String one = m.group(1); // ([^&;]*) - final String two = m.group(2); // (?=(;|&|$)) - m.appendReplacement(buf, Matcher.quoteReplacement(checkEntity(one, two))); - } - m.appendTail(buf); - - return encodeQuotes(buf.toString()); - } - - private String encodeQuotes(final String s) { - if (encodeQuotes) { - StringBuffer buf = new StringBuffer(); - Matcher m = P_VALID_QUOTES.matcher(s); - while (m.find()) { - final String one = m.group(1); // (>|^) - final String two = m.group(2); // ([^<]+?) - final String three = m.group(3); // (<|$) - // 不替换双引号为",防止json格式无效 regexReplace(P_QUOTE, """, two) - m.appendReplacement(buf, Matcher.quoteReplacement(one + two + three)); - } - m.appendTail(buf); - return buf.toString(); - } else { - return s; - } - } - - private String checkEntity(final String preamble, final String term) { - - return ";".equals(term) && isValidEntity(preamble) ? '&' + preamble : "&" + preamble; - } - - private boolean isValidEntity(final String entity) { - return inArray(entity, vAllowedEntities); - } - - private static boolean inArray(final String s, final String[] array) { - for (String item : array) { - if (item != null && item.equals(s)) { - return true; - } - } - return false; - } - - private boolean allowed(final String name) { - return (vAllowed.isEmpty() || vAllowed.containsKey(name)) && !inArray(name, vDisallowed); - } - - private boolean allowedAttribute(final String name, final String paramName) { - return allowed(name) && (vAllowed.isEmpty() || vAllowed.get(name).contains(paramName)); - } -} \ No newline at end of file diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/http/HttpHelper.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/http/HttpHelper.java deleted file mode 100644 index dcb8e4ce..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/http/HttpHelper.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.ruoyi.common.utils.http; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.nio.charset.Charset; -import javax.servlet.ServletRequest; - -import org.apache.commons.lang3.exception.ExceptionUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * 通用http工具封装 - * - * @author ruoyi - */ -public class HttpHelper { - private static final Logger LOGGER = LoggerFactory.getLogger(HttpHelper.class); - - public static String getBodyString(ServletRequest request) { - StringBuilder sb = new StringBuilder(); - BufferedReader reader = null; - try (InputStream inputStream = request.getInputStream()) { - reader = new BufferedReader(new InputStreamReader(inputStream, Charset.forName("UTF-8"))); - String line = ""; - while ((line = reader.readLine()) != null) { - sb.append(line); - } - } catch (IOException e) { - LOGGER.warn("getBodyString出现问题!"); - } finally { - if (reader != null) { - try { - reader.close(); - } catch (IOException e) { - LOGGER.error(ExceptionUtils.getMessage(e)); - } - } - } - return sb.toString(); - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java deleted file mode 100644 index 8213c6f3..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/http/HttpUtils.java +++ /dev/null @@ -1,208 +0,0 @@ -package com.ruoyi.common.utils.http; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.PrintWriter; -import java.net.ConnectException; -import java.net.SocketTimeoutException; -import java.net.URL; -import java.net.URLConnection; -import java.security.cert.X509Certificate; -import javax.net.ssl.HostnameVerifier; -import javax.net.ssl.HttpsURLConnection; -import javax.net.ssl.SSLContext; -import javax.net.ssl.SSLSession; -import javax.net.ssl.TrustManager; -import javax.net.ssl.X509TrustManager; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import com.ruoyi.common.constant.Constants; - -/** - * 通用http发送方法 - * - * @author ruoyi - */ -public class HttpUtils { - private static final Logger log = LoggerFactory.getLogger(HttpUtils.class); - - /** - * 向指定 URL 发送GET方法的请求 - * - * @param url 发送请求的 URL - * @param param 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。 - * @return 所代表远程资源的响应结果 - */ - public static String sendGet(String url, String param) { - return sendGet(url, param, Constants.UTF8); - } - - /** - * 向指定 URL 发送GET方法的请求 - * - * @param url 发送请求的 URL - * @param param 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。 - * @param contentType 编码类型 - * @return 所代表远程资源的响应结果 - */ - public static String sendGet(String url, String param, String contentType) { - StringBuilder result = new StringBuilder(); - BufferedReader in = null; - try { - String urlNameString = url + "?" + param; - log.info("sendGet - {}", urlNameString); - URL realUrl = new URL(urlNameString); - URLConnection connection = realUrl.openConnection(); - connection.setRequestProperty("accept", "*/*"); - connection.setRequestProperty("connection", "Keep-Alive"); - connection.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); - connection.connect(); - in = new BufferedReader(new InputStreamReader(connection.getInputStream(), contentType)); - String line; - while ((line = in.readLine()) != null) { - result.append(line); - } - log.info("recv - {}", result); - } catch (ConnectException e) { - log.error("调用HttpUtils.sendGet ConnectException, url=" + url + ",param=" + param, e); - } catch (SocketTimeoutException e) { - log.error("调用HttpUtils.sendGet SocketTimeoutException, url=" + url + ",param=" + param, e); - } catch (IOException e) { - log.error("调用HttpUtils.sendGet IOException, url=" + url + ",param=" + param, e); - } catch (Exception e) { - log.error("调用HttpsUtil.sendGet Exception, url=" + url + ",param=" + param, e); - } finally { - try { - if (in != null) { - in.close(); - } - } catch (Exception ex) { - log.error("调用in.close Exception, url=" + url + ",param=" + param, ex); - } - } - return result.toString(); - } - - /** - * 向指定 URL 发送POST方法的请求 - * - * @param url 发送请求的 URL - * @param param 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。 - * @return 所代表远程资源的响应结果 - */ - public static String sendPost(String url, String param) { - PrintWriter out = null; - BufferedReader in = null; - StringBuilder result = new StringBuilder(); - try { - String urlNameString = url; - log.info("sendPost - {}", urlNameString); - URL realUrl = new URL(urlNameString); - URLConnection conn = realUrl.openConnection(); - conn.setRequestProperty("accept", "*/*"); - conn.setRequestProperty("connection", "Keep-Alive"); - conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); - conn.setRequestProperty("Accept-Charset", "utf-8"); - conn.setRequestProperty("contentType", "utf-8"); - conn.setDoOutput(true); - conn.setDoInput(true); - out = new PrintWriter(conn.getOutputStream()); - out.print(param); - out.flush(); - in = new BufferedReader(new InputStreamReader(conn.getInputStream(), "utf-8")); - String line; - while ((line = in.readLine()) != null) { - result.append(line); - } - log.info("recv - {}", result); - } catch (ConnectException e) { - log.error("调用HttpUtils.sendPost ConnectException, url=" + url + ",param=" + param, e); - } catch (SocketTimeoutException e) { - log.error("调用HttpUtils.sendPost SocketTimeoutException, url=" + url + ",param=" + param, e); - } catch (IOException e) { - log.error("调用HttpUtils.sendPost IOException, url=" + url + ",param=" + param, e); - } catch (Exception e) { - log.error("调用HttpsUtil.sendPost Exception, url=" + url + ",param=" + param, e); - } finally { - try { - if (out != null) { - out.close(); - } - if (in != null) { - in.close(); - } - } catch (IOException ex) { - log.error("调用in.close Exception, url=" + url + ",param=" + param, ex); - } - } - return result.toString(); - } - - public static String sendSSLPost(String url, String param) { - StringBuilder result = new StringBuilder(); - String urlNameString = url + "?" + param; - try { - log.info("sendSSLPost - {}", urlNameString); - SSLContext sc = SSLContext.getInstance("SSL"); - sc.init(null, new TrustManager[]{new TrustAnyTrustManager()}, new java.security.SecureRandom()); - URL console = new URL(urlNameString); - HttpsURLConnection conn = (HttpsURLConnection) console.openConnection(); - conn.setRequestProperty("accept", "*/*"); - conn.setRequestProperty("connection", "Keep-Alive"); - conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); - conn.setRequestProperty("Accept-Charset", "utf-8"); - conn.setRequestProperty("contentType", "utf-8"); - conn.setDoOutput(true); - conn.setDoInput(true); - - conn.setSSLSocketFactory(sc.getSocketFactory()); - conn.setHostnameVerifier(new TrustAnyHostnameVerifier()); - conn.connect(); - InputStream is = conn.getInputStream(); - BufferedReader br = new BufferedReader(new InputStreamReader(is)); - String ret = ""; - while ((ret = br.readLine()) != null) { - if (ret != null && !"".equals(ret.trim())) { - result.append(new String(ret.getBytes("ISO-8859-1"), "utf-8")); - } - } - log.info("recv - {}", result); - conn.disconnect(); - br.close(); - } catch (ConnectException e) { - log.error("调用HttpUtils.sendSSLPost ConnectException, url=" + url + ",param=" + param, e); - } catch (SocketTimeoutException e) { - log.error("调用HttpUtils.sendSSLPost SocketTimeoutException, url=" + url + ",param=" + param, e); - } catch (IOException e) { - log.error("调用HttpUtils.sendSSLPost IOException, url=" + url + ",param=" + param, e); - } catch (Exception e) { - log.error("调用HttpsUtil.sendSSLPost Exception, url=" + url + ",param=" + param, e); - } - return result.toString(); - } - - private static class TrustAnyTrustManager implements X509TrustManager { - @Override - public void checkClientTrusted(X509Certificate[] chain, String authType) { - } - - @Override - public void checkServerTrusted(X509Certificate[] chain, String authType) { - } - - @Override - public X509Certificate[] getAcceptedIssuers() { - return new X509Certificate[]{}; - } - } - - private static class TrustAnyHostnameVerifier implements HostnameVerifier { - @Override - public boolean verify(String hostname, SSLSession session) { - return true; - } - } -} \ No newline at end of file diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/ip/AddressUtils.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/ip/AddressUtils.java deleted file mode 100644 index ce391a88..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/ip/AddressUtils.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.ruoyi.common.utils.ip; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import com.alibaba.fastjson.JSONObject; -import com.ruoyi.common.config.RuoYiConfig; -import com.ruoyi.common.constant.Constants; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.common.utils.http.HttpUtils; - -/** - * 获取地址类 - * - * @author ruoyi - */ -public class AddressUtils { - private static final Logger log = LoggerFactory.getLogger(AddressUtils.class); - - // IP地址查询 - public static final String IP_URL = "http://whois.pconline.com.cn/ipJson.jsp"; - - // 未知地址 - public static final String UNKNOWN = "XX XX"; - - public static String getRealAddressByIP(String ip) { - String address = UNKNOWN; - // 内网不查询 - if (IpUtils.internalIp(ip)) { - return "内网IP"; - } - if (RuoYiConfig.isAddressEnabled()) { - try { - String rspStr = HttpUtils.sendGet(IP_URL, "ip=" + ip + "&json=true", Constants.GBK); - if (StringUtils.isEmpty(rspStr)) { - log.error("获取地理位置异常 {}", ip); - return UNKNOWN; - } - JSONObject obj = JSONObject.parseObject(rspStr); - String region = obj.getString("pro"); - String city = obj.getString("city"); - return String.format("%s %s", region, city); - } catch (Exception e) { - log.error("获取地理位置异常 {}", ip); - } - } - return address; - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/ip/IpUtils.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/ip/IpUtils.java deleted file mode 100644 index 4fa9eb89..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/ip/IpUtils.java +++ /dev/null @@ -1,166 +0,0 @@ -package com.ruoyi.common.utils.ip; - -import java.net.InetAddress; -import java.net.UnknownHostException; -import javax.servlet.http.HttpServletRequest; - -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.common.utils.html.EscapeUtil; - -/** - * 获取IP方法 - * - * @author ruoyi - */ -public class IpUtils { - public static String getIpAddr(HttpServletRequest request) { - if (request == null) { - return "unknown"; - } - String ip = request.getHeader("x-forwarded-for"); - if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { - ip = request.getHeader("Proxy-Client-IP"); - } - if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { - ip = request.getHeader("X-Forwarded-For"); - } - if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { - ip = request.getHeader("WL-Proxy-Client-IP"); - } - if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { - ip = request.getHeader("X-Real-IP"); - } - - if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { - ip = request.getRemoteAddr(); - } - return "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : EscapeUtil.clean(ip); - } - - public static boolean internalIp(String ip) { - byte[] addr = textToNumericFormatV4(ip); - return internalIp(addr) || "127.0.0.1".equals(ip); - } - - private static boolean internalIp(byte[] addr) { - if (StringUtils.isNull(addr) || addr.length < 2) { - return true; - } - final byte b0 = addr[0]; - final byte b1 = addr[1]; - // 10.x.x.x/8 - final byte SECTION_1 = 0x0A; - // 172.16.x.x/12 - final byte SECTION_2 = (byte) 0xAC; - final byte SECTION_3 = (byte) 0x10; - final byte SECTION_4 = (byte) 0x1F; - // 192.168.x.x/16 - final byte SECTION_5 = (byte) 0xC0; - final byte SECTION_6 = (byte) 0xA8; - switch (b0) { - case SECTION_1: - return true; - case SECTION_2: - if (b1 >= SECTION_3 && b1 <= SECTION_4) { - return true; - } - case SECTION_5: - switch (b1) { - case SECTION_6: - return true; - } - default: - return false; - } - } - - /** - * 将IPv4地址转换成字节 - * - * @param text IPv4地址 - * @return byte 字节 - */ - public static byte[] textToNumericFormatV4(String text) { - if (text.length() == 0) { - return null; - } - - byte[] bytes = new byte[4]; - String[] elements = text.split("\\.", -1); - try { - long l; - int i; - switch (elements.length) { - case 1: - l = Long.parseLong(elements[0]); - if ((l < 0L) || (l > 4294967295L)) { - return null; - } - bytes[0] = (byte) (int) (l >> 24 & 0xFF); - bytes[1] = (byte) (int) ((l & 0xFFFFFF) >> 16 & 0xFF); - bytes[2] = (byte) (int) ((l & 0xFFFF) >> 8 & 0xFF); - bytes[3] = (byte) (int) (l & 0xFF); - break; - case 2: - l = Integer.parseInt(elements[0]); - if ((l < 0L) || (l > 255L)) { - return null; - } - bytes[0] = (byte) (int) (l & 0xFF); - l = Integer.parseInt(elements[1]); - if ((l < 0L) || (l > 16777215L)) { - return null; - } - bytes[1] = (byte) (int) (l >> 16 & 0xFF); - bytes[2] = (byte) (int) ((l & 0xFFFF) >> 8 & 0xFF); - bytes[3] = (byte) (int) (l & 0xFF); - break; - case 3: - for (i = 0; i < 2; ++i) { - l = Integer.parseInt(elements[i]); - if ((l < 0L) || (l > 255L)) { - return null; - } - bytes[i] = (byte) (int) (l & 0xFF); - } - l = Integer.parseInt(elements[2]); - if ((l < 0L) || (l > 65535L)) { - return null; - } - bytes[2] = (byte) (int) (l >> 8 & 0xFF); - bytes[3] = (byte) (int) (l & 0xFF); - break; - case 4: - for (i = 0; i < 4; ++i) { - l = Integer.parseInt(elements[i]); - if ((l < 0L) || (l > 255L)) { - return null; - } - bytes[i] = (byte) (int) (l & 0xFF); - } - break; - default: - return null; - } - } catch (NumberFormatException e) { - return null; - } - return bytes; - } - - public static String getHostIp() { - try { - return InetAddress.getLocalHost().getHostAddress(); - } catch (UnknownHostException e) { - } - return "127.0.0.1"; - } - - public static String getHostName() { - try { - return InetAddress.getLocalHost().getHostName(); - } catch (UnknownHostException e) { - } - return "未知"; - } -} \ No newline at end of file diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java deleted file mode 100644 index 9bb72174..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java +++ /dev/null @@ -1,911 +0,0 @@ -package com.ruoyi.common.utils.poi; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.lang.reflect.Field; -import java.math.BigDecimal; -import java.text.DecimalFormat; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Comparator; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.UUID; -import java.util.stream.Collectors; - -import org.apache.poi.ss.usermodel.BorderStyle; -import org.apache.poi.ss.usermodel.Cell; -import org.apache.poi.ss.usermodel.CellStyle; -import org.apache.poi.ss.usermodel.CellType; -import org.apache.poi.ss.usermodel.ClientAnchor; -import org.apache.poi.ss.usermodel.DataValidation; -import org.apache.poi.ss.usermodel.DataValidationConstraint; -import org.apache.poi.ss.usermodel.DataValidationHelper; -import org.apache.poi.ss.usermodel.DateUtil; -import org.apache.poi.ss.usermodel.Drawing; -import org.apache.poi.ss.usermodel.FillPatternType; -import org.apache.poi.ss.usermodel.Font; -import org.apache.poi.ss.usermodel.HorizontalAlignment; -import org.apache.poi.ss.usermodel.IndexedColors; -import org.apache.poi.ss.usermodel.Row; -import org.apache.poi.ss.usermodel.Sheet; -import org.apache.poi.ss.usermodel.VerticalAlignment; -import org.apache.poi.ss.usermodel.Workbook; -import org.apache.poi.ss.usermodel.WorkbookFactory; -import org.apache.poi.ss.util.CellRangeAddressList; -import org.apache.poi.xssf.streaming.SXSSFWorkbook; -import org.apache.poi.xssf.usermodel.XSSFClientAnchor; -import org.apache.poi.xssf.usermodel.XSSFDataValidation; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.annotation.Excel.ColumnType; -import com.ruoyi.common.annotation.Excel.Type; -import com.ruoyi.common.annotation.Excels; -import com.ruoyi.common.config.RuoYiConfig; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.core.text.Convert; -import com.ruoyi.common.exception.CustomException; -import com.ruoyi.common.utils.DateUtils; -import com.ruoyi.common.utils.DictUtils; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.common.utils.file.FileTypeUtils; -import com.ruoyi.common.utils.file.ImageUtils; -import com.ruoyi.common.utils.reflect.ReflectUtils; - -/** - * Excel相关处理 - * - * @author ruoyi - */ -public class ExcelUtil { - private static final Logger log = LoggerFactory.getLogger(ExcelUtil.class); - - /** - * Excel sheet最大行数,默认65536 - */ - public static final int sheetSize = 65536; - - /** - * 工作表名称 - */ - private String sheetName; - - /** - * 导出类型(EXPORT:导出数据;IMPORT:导入模板) - */ - private Type type; - - /** - * 工作薄对象 - */ - private Workbook wb; - - /** - * 工作表对象 - */ - private Sheet sheet; - - /** - * 样式列表 - */ - private Map styles; - - /** - * 导入导出数据列表 - */ - private List list; - - /** - * 注解列表 - */ - private List fields; - - /** - * 最大高度 - */ - private short maxHeight; - - /** - * 统计列表 - */ - private Map statistics = new HashMap(); - - /** - * 数字格式 - */ - private static final DecimalFormat DOUBLE_FORMAT = new DecimalFormat("######0.00"); - - /** - * 实体对象 - */ - public Class clazz; - - public ExcelUtil(Class clazz) { - this.clazz = clazz; - } - - public void init(List list, String sheetName, Type type) { - if (list == null) { - list = new ArrayList(); - } - this.list = list; - this.sheetName = sheetName; - this.type = type; - createExcelField(); - createWorkbook(); - } - - /** - * 对excel表单默认第一个索引名转换成list - * - * @param is 输入流 - * @return 转换后集合 - */ - public List importExcel(InputStream is) throws Exception { - return importExcel(StringUtils.EMPTY, is); - } - - /** - * 对excel表单指定表格索引名转换成list - * - * @param sheetName 表格索引名 - * @param is 输入流 - * @return 转换后集合 - */ - public List importExcel(String sheetName, InputStream is) throws Exception { - this.type = Type.IMPORT; - this.wb = WorkbookFactory.create(is); - List list = new ArrayList(); - Sheet sheet = null; - if (StringUtils.isNotEmpty(sheetName)) { - // 如果指定sheet名,则取指定sheet中的内容. - sheet = wb.getSheet(sheetName); - } else { - // 如果传入的sheet名不存在则默认指向第1个sheet. - sheet = wb.getSheetAt(0); - } - - if (sheet == null) { - throw new IOException("文件sheet不存在"); - } - - int rows = sheet.getPhysicalNumberOfRows(); - - if (rows > 0) { - // 定义一个map用于存放excel列的序号和field. - Map cellMap = new HashMap(); - // 获取表头 - Row heard = sheet.getRow(0); - for (int i = 0; i < heard.getPhysicalNumberOfCells(); i++) { - Cell cell = heard.getCell(i); - if (StringUtils.isNotNull(cell)) { - String value = this.getCellValue(heard, i).toString(); - cellMap.put(value, i); - } else { - cellMap.put(null, i); - } - } - // 有数据时才处理 得到类的所有field. - Field[] allFields = clazz.getDeclaredFields(); - // 定义一个map用于存放列的序号和field. - Map fieldsMap = new HashMap(); - for (int col = 0; col < allFields.length; col++) { - Field field = allFields[col]; - Excel attr = field.getAnnotation(Excel.class); - if (attr != null && (attr.type() == Type.ALL || attr.type() == type)) { - // 设置类的私有字段属性可访问. - field.setAccessible(true); - Integer column = cellMap.get(attr.name()); - if (column != null) { - fieldsMap.put(column, field); - } - } - } - for (int i = 1; i < rows; i++) { - // 从第2行开始取数据,默认第一行是表头. - Row row = sheet.getRow(i); - T entity = null; - for (Map.Entry entry : fieldsMap.entrySet()) { - Object val = this.getCellValue(row, entry.getKey()); - - // 如果不存在实例则新建. - entity = (entity == null ? clazz.newInstance() : entity); - // 从map中得到对应列的field. - Field field = fieldsMap.get(entry.getKey()); - // 取得类型,并根据对象类型设置值. - Class fieldType = field.getType(); - if (String.class == fieldType) { - String s = Convert.toStr(val); - if (StringUtils.endsWith(s, ".0")) { - val = StringUtils.substringBefore(s, ".0"); - } else { - String dateFormat = field.getAnnotation(Excel.class).dateFormat(); - if (StringUtils.isNotEmpty(dateFormat)) { - val = DateUtils.parseDateToStr(dateFormat, (Date) val); - } else { - val = Convert.toStr(val); - } - } - } else if ((Integer.TYPE == fieldType || Integer.class == fieldType) && StringUtils.isNumeric(Convert.toStr(val))) { - val = Convert.toInt(val); - } else if (Long.TYPE == fieldType || Long.class == fieldType) { - val = Convert.toLong(val); - } else if (Double.TYPE == fieldType || Double.class == fieldType) { - val = Convert.toDouble(val); - } else if (Float.TYPE == fieldType || Float.class == fieldType) { - val = Convert.toFloat(val); - } else if (BigDecimal.class == fieldType) { - val = Convert.toBigDecimal(val); - } else if (Date.class == fieldType) { - if (val instanceof String) { - val = DateUtils.parseDate(val); - } else if (val instanceof Double) { - val = DateUtil.getJavaDate((Double) val); - } - } else if (Boolean.TYPE == fieldType || Boolean.class == fieldType) { - val = Convert.toBool(val, false); - } - if (StringUtils.isNotNull(fieldType)) { - Excel attr = field.getAnnotation(Excel.class); - String propertyName = field.getName(); - if (StringUtils.isNotEmpty(attr.targetAttr())) { - propertyName = field.getName() + "." + attr.targetAttr(); - } else if (StringUtils.isNotEmpty(attr.readConverterExp())) { - val = reverseByExp(Convert.toStr(val), attr.readConverterExp(), attr.separator()); - } else if (StringUtils.isNotEmpty(attr.dictType())) { - val = reverseDictByExp(Convert.toStr(val), attr.dictType(), attr.separator()); - } - ReflectUtils.invokeSetter(entity, propertyName, val); - } - } - list.add(entity); - } - } - return list; - } - - /** - * 对list数据源将其里面的数据导入到excel表单 - * - * @param list 导出数据集合 - * @param sheetName 工作表的名称 - * @return 结果 - */ - public AjaxResult exportExcel(List list, String sheetName) { - this.init(list, sheetName, Type.EXPORT); - return exportExcel(); - } - - /** - * 对list数据源将其里面的数据导入到excel表单 - * - * @param sheetName 工作表的名称 - * @return 结果 - */ - public AjaxResult importTemplateExcel(String sheetName) { - this.init(null, sheetName, Type.IMPORT); - return exportExcel(); - } - - /** - * 对list数据源将其里面的数据导入到excel表单 - * - * @return 结果 - */ - public AjaxResult exportExcel() { - OutputStream out = null; - try { - // 取出一共有多少个sheet. - double sheetNo = Math.ceil(list.size() / sheetSize); - for (int index = 0; index <= sheetNo; index++) { - createSheet(sheetNo, index); - - // 产生一行 - Row row = sheet.createRow(0); - int column = 0; - // 写入各个字段的列头名称 - for (Object[] os : fields) { - Excel excel = (Excel) os[1]; - this.createCell(excel, row, column++); - } - if (Type.EXPORT.equals(type)) { - fillExcelData(index, row); - addStatisticsRow(); - } - } - String filename = encodingFilename(sheetName); - out = new FileOutputStream(getAbsoluteFile(filename)); - wb.write(out); - return AjaxResult.success(filename); - } catch (Exception e) { - log.error("导出Excel异常{}", e.getMessage()); - throw new CustomException("导出Excel失败,请联系网站管理员!"); - } finally { - if (wb != null) { - try { - wb.close(); - } catch (IOException e1) { - e1.printStackTrace(); - } - } - if (out != null) { - try { - out.close(); - } catch (IOException e1) { - e1.printStackTrace(); - } - } - } - } - - /** - * 填充excel数据 - * - * @param index 序号 - * @param row 单元格行 - */ - public void fillExcelData(int index, Row row) { - int startNo = index * sheetSize; - int endNo = Math.min(startNo + sheetSize, list.size()); - for (int i = startNo; i < endNo; i++) { - row = sheet.createRow(i + 1 - startNo); - // 得到导出对象. - T vo = (T) list.get(i); - int column = 0; - for (Object[] os : fields) { - Field field = (Field) os[0]; - Excel excel = (Excel) os[1]; - // 设置实体类私有属性可访问 - field.setAccessible(true); - this.addCell(excel, row, vo, field, column++); - } - } - } - - /** - * 创建表格样式 - * - * @param wb 工作薄对象 - * @return 样式列表 - */ - private Map createStyles(Workbook wb) { - // 写入各条记录,每条记录对应excel表中的一行 - Map styles = new HashMap(); - CellStyle style = wb.createCellStyle(); - style.setAlignment(HorizontalAlignment.CENTER); - style.setVerticalAlignment(VerticalAlignment.CENTER); - style.setBorderRight(BorderStyle.THIN); - style.setRightBorderColor(IndexedColors.GREY_50_PERCENT.getIndex()); - style.setBorderLeft(BorderStyle.THIN); - style.setLeftBorderColor(IndexedColors.GREY_50_PERCENT.getIndex()); - style.setBorderTop(BorderStyle.THIN); - style.setTopBorderColor(IndexedColors.GREY_50_PERCENT.getIndex()); - style.setBorderBottom(BorderStyle.THIN); - style.setBottomBorderColor(IndexedColors.GREY_50_PERCENT.getIndex()); - Font dataFont = wb.createFont(); - dataFont.setFontName("Arial"); - dataFont.setFontHeightInPoints((short) 10); - style.setFont(dataFont); - styles.put("data", style); - - style = wb.createCellStyle(); - style.cloneStyleFrom(styles.get("data")); - style.setAlignment(HorizontalAlignment.CENTER); - style.setVerticalAlignment(VerticalAlignment.CENTER); - style.setFillForegroundColor(IndexedColors.GREY_50_PERCENT.getIndex()); - style.setFillPattern(FillPatternType.SOLID_FOREGROUND); - Font headerFont = wb.createFont(); - headerFont.setFontName("Arial"); - headerFont.setFontHeightInPoints((short) 10); - headerFont.setBold(true); - headerFont.setColor(IndexedColors.WHITE.getIndex()); - style.setFont(headerFont); - styles.put("header", style); - - style = wb.createCellStyle(); - style.setAlignment(HorizontalAlignment.CENTER); - style.setVerticalAlignment(VerticalAlignment.CENTER); - Font totalFont = wb.createFont(); - totalFont.setFontName("Arial"); - totalFont.setFontHeightInPoints((short) 10); - style.setFont(totalFont); - styles.put("total", style); - - style = wb.createCellStyle(); - style.cloneStyleFrom(styles.get("data")); - style.setAlignment(HorizontalAlignment.LEFT); - styles.put("data1", style); - - style = wb.createCellStyle(); - style.cloneStyleFrom(styles.get("data")); - style.setAlignment(HorizontalAlignment.CENTER); - styles.put("data2", style); - - style = wb.createCellStyle(); - style.cloneStyleFrom(styles.get("data")); - style.setAlignment(HorizontalAlignment.RIGHT); - styles.put("data3", style); - - return styles; - } - - /** - * 创建单元格 - */ - public Cell createCell(Excel attr, Row row, int column) { - // 创建列 - Cell cell = row.createCell(column); - // 写入列信息 - cell.setCellValue(attr.name()); - setDataValidation(attr, row, column); - cell.setCellStyle(styles.get("header")); - return cell; - } - - /** - * 设置单元格信息 - * - * @param value 单元格值 - * @param attr 注解相关 - * @param cell 单元格信息 - */ - public void setCellVo(Object value, Excel attr, Cell cell) { - if (ColumnType.STRING == attr.cellType()) { - cell.setCellValue(StringUtils.isNull(value) ? attr.defaultValue() : value + attr.suffix()); - } else if (ColumnType.NUMERIC == attr.cellType()) { - cell.setCellValue(StringUtils.contains(Convert.toStr(value), ".") ? Convert.toDouble(value) : Convert.toInt(value)); - } else if (ColumnType.IMAGE == attr.cellType()) { - ClientAnchor anchor = new XSSFClientAnchor(0, 0, 0, 0, (short) cell.getColumnIndex(), cell.getRow().getRowNum(), (short) (cell.getColumnIndex() + 1), - cell.getRow().getRowNum() + 1); - String imagePath = Convert.toStr(value); - if (StringUtils.isNotEmpty(imagePath)) { - byte[] data = ImageUtils.getImage(imagePath); - getDrawingPatriarch(cell.getSheet()).createPicture(anchor, - cell.getSheet().getWorkbook().addPicture(data, getImageType(data))); - } - } - } - - /** - * 获取画布 - */ - public static Drawing getDrawingPatriarch(Sheet sheet) { - if (sheet.getDrawingPatriarch() == null) { - sheet.createDrawingPatriarch(); - } - return sheet.getDrawingPatriarch(); - } - - /** - * 获取图片类型,设置图片插入类型 - */ - public int getImageType(byte[] value) { - String type = FileTypeUtils.getFileExtendName(value); - if ("JPG".equalsIgnoreCase(type)) { - return Workbook.PICTURE_TYPE_JPEG; - } else if ("PNG".equalsIgnoreCase(type)) { - return Workbook.PICTURE_TYPE_PNG; - } - return Workbook.PICTURE_TYPE_JPEG; - } - - /** - * 创建表格样式 - */ - public void setDataValidation(Excel attr, Row row, int column) { - if (attr.name().indexOf("注:") >= 0) { - sheet.setColumnWidth(column, 6000); - } else { - // 设置列宽 - sheet.setColumnWidth(column, (int) ((attr.width() + 0.72) * 256)); - } - // 如果设置了提示信息则鼠标放上去提示. - if (StringUtils.isNotEmpty(attr.prompt())) { - // 这里默认设了2-101列提示. - setXSSFPrompt(sheet, "", attr.prompt(), 1, 100, column, column); - } - // 如果设置了combo属性则本列只能选择不能输入 - if (attr.combo().length > 0) { - // 这里默认设了2-101列只能选择不能输入. - setXSSFValidation(sheet, attr.combo(), 1, 100, column, column); - } - } - - /** - * 添加单元格 - */ - public Cell addCell(Excel attr, Row row, T vo, Field field, int column) { - Cell cell = null; - try { - // 设置行高 - row.setHeight(maxHeight); - // 根据Excel中设置情况决定是否导出,有些情况需要保持为空,希望用户填写这一列. - if (attr.isExport()) { - // 创建cell - cell = row.createCell(column); - int align = attr.align().value(); - cell.setCellStyle(styles.get("data" + (align >= 1 && align <= 3 ? align : ""))); - - // 用于读取对象中的属性 - Object value = getTargetValue(vo, field, attr); - String dateFormat = attr.dateFormat(); - String readConverterExp = attr.readConverterExp(); - String separator = attr.separator(); - String dictType = attr.dictType(); - if (StringUtils.isNotEmpty(dateFormat) && StringUtils.isNotNull(value)) { - cell.setCellValue(DateUtils.parseDateToStr(dateFormat, (Date) value)); - } else if (StringUtils.isNotEmpty(readConverterExp) && StringUtils.isNotNull(value)) { - cell.setCellValue(convertByExp(Convert.toStr(value), readConverterExp, separator)); - } else if (StringUtils.isNotEmpty(dictType) && StringUtils.isNotNull(value)) { - cell.setCellValue(convertDictByExp(Convert.toStr(value), dictType, separator)); - } else if (value instanceof BigDecimal && -1 != attr.scale()) { - cell.setCellValue((((BigDecimal) value).setScale(attr.scale(), attr.roundingMode())).toString()); - } else { - // 设置列类型 - setCellVo(value, attr, cell); - } - addStatisticsData(column, Convert.toStr(value), attr); - } - } catch (Exception e) { - log.error("导出Excel失败{}", e); - } - return cell; - } - - /** - * 设置 POI XSSFSheet 单元格提示 - * - * @param sheet 表单 - * @param promptTitle 提示标题 - * @param promptContent 提示内容 - * @param firstRow 开始行 - * @param endRow 结束行 - * @param firstCol 开始列 - * @param endCol 结束列 - */ - public void setXSSFPrompt(Sheet sheet, String promptTitle, String promptContent, int firstRow, int endRow, - int firstCol, int endCol) { - DataValidationHelper helper = sheet.getDataValidationHelper(); - DataValidationConstraint constraint = helper.createCustomConstraint("DD1"); - CellRangeAddressList regions = new CellRangeAddressList(firstRow, endRow, firstCol, endCol); - DataValidation dataValidation = helper.createValidation(constraint, regions); - dataValidation.createPromptBox(promptTitle, promptContent); - dataValidation.setShowPromptBox(true); - sheet.addValidationData(dataValidation); - } - - /** - * 设置某些列的值只能输入预制的数据,显示下拉框. - * - * @param sheet 要设置的sheet. - * @param textlist 下拉框显示的内容 - * @param firstRow 开始行 - * @param endRow 结束行 - * @param firstCol 开始列 - * @param endCol 结束列 - * @return 设置好的sheet. - */ - public void setXSSFValidation(Sheet sheet, String[] textlist, int firstRow, int endRow, int firstCol, int endCol) { - DataValidationHelper helper = sheet.getDataValidationHelper(); - // 加载下拉列表内容 - DataValidationConstraint constraint = helper.createExplicitListConstraint(textlist); - // 设置数据有效性加载在哪个单元格上,四个参数分别是:起始行、终止行、起始列、终止列 - CellRangeAddressList regions = new CellRangeAddressList(firstRow, endRow, firstCol, endCol); - // 数据有效性对象 - DataValidation dataValidation = helper.createValidation(constraint, regions); - // 处理Excel兼容性问题 - if (dataValidation instanceof XSSFDataValidation) { - dataValidation.setSuppressDropDownArrow(true); - dataValidation.setShowErrorBox(true); - } else { - dataValidation.setSuppressDropDownArrow(false); - } - - sheet.addValidationData(dataValidation); - } - - /** - * 解析导出值 0=男,1=女,2=未知 - * - * @param propertyValue 参数值 - * @param converterExp 翻译注解 - * @param separator 分隔符 - * @return 解析后值 - */ - public static String convertByExp(String propertyValue, String converterExp, String separator) { - StringBuilder propertyString = new StringBuilder(); - String[] convertSource = converterExp.split(","); - for (String item : convertSource) { - String[] itemArray = item.split("="); - if (StringUtils.containsAny(separator, propertyValue)) { - for (String value : propertyValue.split(separator)) { - if (itemArray[0].equals(value)) { - propertyString.append(itemArray[1] + separator); - break; - } - } - } else { - if (itemArray[0].equals(propertyValue)) { - return itemArray[1]; - } - } - } - return StringUtils.stripEnd(propertyString.toString(), separator); - } - - /** - * 反向解析值 男=0,女=1,未知=2 - * - * @param propertyValue 参数值 - * @param converterExp 翻译注解 - * @param separator 分隔符 - * @return 解析后值 - */ - public static String reverseByExp(String propertyValue, String converterExp, String separator) { - StringBuilder propertyString = new StringBuilder(); - String[] convertSource = converterExp.split(","); - for (String item : convertSource) { - String[] itemArray = item.split("="); - if (StringUtils.containsAny(separator, propertyValue)) { - for (String value : propertyValue.split(separator)) { - if (itemArray[1].equals(value)) { - propertyString.append(itemArray[0] + separator); - break; - } - } - } else { - if (itemArray[1].equals(propertyValue)) { - return itemArray[0]; - } - } - } - return StringUtils.stripEnd(propertyString.toString(), separator); - } - - /** - * 解析字典值 - * - * @param dictValue 字典值 - * @param dictType 字典类型 - * @param separator 分隔符 - * @return 字典标签 - */ - public static String convertDictByExp(String dictValue, String dictType, String separator) { - return DictUtils.getDictLabel(dictType, dictValue, separator); - } - - /** - * 反向解析值字典值 - * - * @param dictLabel 字典标签 - * @param dictType 字典类型 - * @param separator 分隔符 - * @return 字典值 - */ - public static String reverseDictByExp(String dictLabel, String dictType, String separator) { - return DictUtils.getDictValue(dictType, dictLabel, separator); - } - - /** - * 合计统计信息 - */ - private void addStatisticsData(Integer index, String text, Excel entity) { - if (entity != null && entity.isStatistics()) { - Double temp = 0D; - if (!statistics.containsKey(index)) { - statistics.put(index, temp); - } - try { - temp = Double.valueOf(text); - } catch (NumberFormatException e) { - } - statistics.put(index, statistics.get(index) + temp); - } - } - - /** - * 创建统计行 - */ - public void addStatisticsRow() { - if (statistics.size() > 0) { - Cell cell = null; - Row row = sheet.createRow(sheet.getLastRowNum() + 1); - Set keys = statistics.keySet(); - cell = row.createCell(0); - cell.setCellStyle(styles.get("total")); - cell.setCellValue("合计"); - - for (Integer key : keys) { - cell = row.createCell(key); - cell.setCellStyle(styles.get("total")); - cell.setCellValue(DOUBLE_FORMAT.format(statistics.get(key))); - } - statistics.clear(); - } - } - - /** - * 编码文件名 - */ - public String encodingFilename(String filename) { - filename = UUID.randomUUID().toString() + "_" + filename + ".xlsx"; - return filename; - } - - /** - * 获取下载路径 - * - * @param filename 文件名称 - */ - public String getAbsoluteFile(String filename) { - String downloadPath = RuoYiConfig.getDownloadPath() + filename; - File desc = new File(downloadPath); - if (!desc.getParentFile().exists()) { - desc.getParentFile().mkdirs(); - } - return downloadPath; - } - - /** - * 获取bean中的属性值 - * - * @param vo 实体对象 - * @param field 字段 - * @param excel 注解 - * @return 最终的属性值 - * @throws Exception - */ - private Object getTargetValue(T vo, Field field, Excel excel) throws Exception { - Object o = field.get(vo); - if (StringUtils.isNotEmpty(excel.targetAttr())) { - String target = excel.targetAttr(); - if (target.indexOf(".") > -1) { - String[] targets = target.split("[.]"); - for (String name : targets) { - o = getValue(o, name); - } - } else { - o = getValue(o, target); - } - } - return o; - } - - /** - * 以类的属性的get方法方法形式获取值 - * - * @param o - * @param name - * @return value - * @throws Exception - */ - private Object getValue(Object o, String name) throws Exception { - if (StringUtils.isNotNull(o) && StringUtils.isNotEmpty(name)) { - Class clazz = o.getClass(); - Field field = clazz.getDeclaredField(name); - field.setAccessible(true); - o = field.get(o); - } - return o; - } - - /** - * 得到所有定义字段 - */ - private void createExcelField() { - this.fields = new ArrayList(); - List tempFields = new ArrayList<>(); - tempFields.addAll(Arrays.asList(clazz.getSuperclass().getDeclaredFields())); - tempFields.addAll(Arrays.asList(clazz.getDeclaredFields())); - for (Field field : tempFields) { - // 单注解 - if (field.isAnnotationPresent(Excel.class)) { - putToField(field, field.getAnnotation(Excel.class)); - } - - // 多注解 - if (field.isAnnotationPresent(Excels.class)) { - Excels attrs = field.getAnnotation(Excels.class); - Excel[] excels = attrs.value(); - for (Excel excel : excels) { - putToField(field, excel); - } - } - } - this.fields = this.fields.stream().sorted(Comparator.comparing(objects -> ((Excel) objects[1]).sort())).collect(Collectors.toList()); - this.maxHeight = getRowHeight(); - } - - /** - * 根据注解获取最大行高 - */ - public short getRowHeight() { - double maxHeight = 0; - for (Object[] os : this.fields) { - Excel excel = (Excel) os[1]; - maxHeight = maxHeight > excel.height() ? maxHeight : excel.height(); - } - return (short) (maxHeight * 20); - } - - /** - * 放到字段集合中 - */ - private void putToField(Field field, Excel attr) { - if (attr != null && (attr.type() == Type.ALL || attr.type() == type)) { - this.fields.add(new Object[]{field, attr}); - } - } - - /** - * 创建一个工作簿 - */ - public void createWorkbook() { - this.wb = new SXSSFWorkbook(500); - } - - /** - * 创建工作表 - * - * @param sheetNo sheet数量 - * @param index 序号 - */ - public void createSheet(double sheetNo, int index) { - this.sheet = wb.createSheet(); - this.styles = createStyles(wb); - // 设置工作表的名称. - if (sheetNo == 0) { - wb.setSheetName(index, sheetName); - } else { - wb.setSheetName(index, sheetName + index); - } - } - - /** - * 获取单元格值 - * - * @param row 获取的行 - * @param column 获取单元格列号 - * @return 单元格值 - */ - public Object getCellValue(Row row, int column) { - if (row == null) { - return row; - } - Object val = ""; - try { - Cell cell = row.getCell(column); - if (StringUtils.isNotNull(cell)) { - if (cell.getCellType() == CellType.NUMERIC || cell.getCellType() == CellType.FORMULA) { - val = cell.getNumericCellValue(); - if (DateUtil.isCellDateFormatted(cell)) { - val = DateUtil.getJavaDate((Double) val); // POI Excel 日期格式转换 - } else { - if ((Double) val % 1 != 0) { - val = new BigDecimal(val.toString()); - } else { - val = new DecimalFormat("0").format(val); - } - } - } else if (cell.getCellType() == CellType.STRING) { - val = cell.getStringCellValue(); - } else if (cell.getCellType() == CellType.BOOLEAN) { - val = cell.getBooleanCellValue(); - } else if (cell.getCellType() == CellType.ERROR) { - val = cell.getErrorCellValue(); - } - - } - } catch (Exception e) { - return val; - } - return val; - } -} \ No newline at end of file diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/reflect/ReflectUtils.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/reflect/ReflectUtils.java deleted file mode 100644 index da362e3b..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/reflect/ReflectUtils.java +++ /dev/null @@ -1,329 +0,0 @@ -package com.ruoyi.common.utils.reflect; - -import java.lang.reflect.Field; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.lang.reflect.Modifier; -import java.lang.reflect.ParameterizedType; -import java.lang.reflect.Type; -import java.util.Date; - -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.Validate; -import org.apache.poi.ss.usermodel.DateUtil; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import com.ruoyi.common.core.text.Convert; -import com.ruoyi.common.utils.DateUtils; - -/** - * 反射工具类. 提供调用getter/setter方法, 访问私有变量, 调用私有方法, 获取泛型类型Class, 被AOP过的真实类等工具函数. - * - * @author ruoyi - */ -@SuppressWarnings("rawtypes") -public class ReflectUtils { - private static final String SETTER_PREFIX = "set"; - - private static final String GETTER_PREFIX = "get"; - - private static final String CGLIB_CLASS_SEPARATOR = "$$"; - - private static Logger logger = LoggerFactory.getLogger(ReflectUtils.class); - - /** - * 调用Getter方法. - * 支持多级,如:对象名.对象名.方法 - */ - @SuppressWarnings("unchecked") - public static E invokeGetter(Object obj, String propertyName) { - Object object = obj; - for (String name : StringUtils.split(propertyName, ".")) { - String getterMethodName = GETTER_PREFIX + StringUtils.capitalize(name); - object = invokeMethod(object, getterMethodName, new Class[]{}, new Object[]{}); - } - return (E) object; - } - - /** - * 调用Setter方法, 仅匹配方法名。 - * 支持多级,如:对象名.对象名.方法 - */ - public static void invokeSetter(Object obj, String propertyName, E value) { - Object object = obj; - String[] names = StringUtils.split(propertyName, "."); - for (int i = 0; i < names.length; i++) { - if (i < names.length - 1) { - String getterMethodName = GETTER_PREFIX + StringUtils.capitalize(names[i]); - object = invokeMethod(object, getterMethodName, new Class[]{}, new Object[]{}); - } else { - String setterMethodName = SETTER_PREFIX + StringUtils.capitalize(names[i]); - invokeMethodByName(object, setterMethodName, new Object[]{value}); - } - } - } - - /** - * 直接读取对象属性值, 无视private/protected修饰符, 不经过getter函数. - */ - @SuppressWarnings("unchecked") - public static E getFieldValue(final Object obj, final String fieldName) { - Field field = getAccessibleField(obj, fieldName); - if (field == null) { - logger.debug("在 [" + obj.getClass() + "] 中,没有找到 [" + fieldName + "] 字段 "); - return null; - } - E result = null; - try { - result = (E) field.get(obj); - } catch (IllegalAccessException e) { - logger.error("不可能抛出的异常{}", e.getMessage()); - } - return result; - } - - /** - * 直接设置对象属性值, 无视private/protected修饰符, 不经过setter函数. - */ - public static void setFieldValue(final Object obj, final String fieldName, final E value) { - Field field = getAccessibleField(obj, fieldName); - if (field == null) { - // throw new IllegalArgumentException("在 [" + obj.getClass() + "] 中,没有找到 [" + fieldName + "] 字段 "); - logger.debug("在 [" + obj.getClass() + "] 中,没有找到 [" + fieldName + "] 字段 "); - return; - } - try { - field.set(obj, value); - } catch (IllegalAccessException e) { - logger.error("不可能抛出的异常: {}", e.getMessage()); - } - } - - /** - * 直接调用对象方法, 无视private/protected修饰符. - * 用于一次性调用的情况,否则应使用getAccessibleMethod()函数获得Method后反复调用. - * 同时匹配方法名+参数类型, - */ - @SuppressWarnings("unchecked") - public static E invokeMethod(final Object obj, final String methodName, final Class[] parameterTypes, - final Object[] args) { - if (obj == null || methodName == null) { - return null; - } - Method method = getAccessibleMethod(obj, methodName, parameterTypes); - if (method == null) { - logger.debug("在 [" + obj.getClass() + "] 中,没有找到 [" + methodName + "] 方法 "); - return null; - } - try { - return (E) method.invoke(obj, args); - } catch (Exception e) { - String msg = "method: " + method + ", obj: " + obj + ", args: " + args + ""; - throw convertReflectionExceptionToUnchecked(msg, e); - } - } - - /** - * 直接调用对象方法, 无视private/protected修饰符, - * 用于一次性调用的情况,否则应使用getAccessibleMethodByName()函数获得Method后反复调用. - * 只匹配函数名,如果有多个同名函数调用第一个。 - */ - @SuppressWarnings("unchecked") - public static E invokeMethodByName(final Object obj, final String methodName, final Object[] args) { - Method method = getAccessibleMethodByName(obj, methodName, args.length); - if (method == null) { - // 如果为空不报错,直接返回空。 - logger.debug("在 [" + obj.getClass() + "] 中,没有找到 [" + methodName + "] 方法 "); - return null; - } - try { - // 类型转换(将参数数据类型转换为目标方法参数类型) - Class[] cs = method.getParameterTypes(); - for (int i = 0; i < cs.length; i++) { - if (args[i] != null && !args[i].getClass().equals(cs[i])) { - if (cs[i] == String.class) { - args[i] = Convert.toStr(args[i]); - if (StringUtils.endsWith((String) args[i], ".0")) { - args[i] = StringUtils.substringBefore((String) args[i], ".0"); - } - } else if (cs[i] == Integer.class) { - args[i] = Convert.toInt(args[i]); - } else if (cs[i] == Long.class) { - args[i] = Convert.toLong(args[i]); - } else if (cs[i] == Double.class) { - args[i] = Convert.toDouble(args[i]); - } else if (cs[i] == Float.class) { - args[i] = Convert.toFloat(args[i]); - } else if (cs[i] == Date.class) { - if (args[i] instanceof String) { - args[i] = DateUtils.parseDate(args[i]); - } else { - args[i] = DateUtil.getJavaDate((Double) args[i]); - } - } else if (cs[i] == boolean.class || cs[i] == Boolean.class) { - args[i] = Convert.toBool(args[i]); - } - } - } - return (E) method.invoke(obj, args); - } catch (Exception e) { - String msg = "method: " + method + ", obj: " + obj + ", args: " + args + ""; - throw convertReflectionExceptionToUnchecked(msg, e); - } - } - - /** - * 循环向上转型, 获取对象的DeclaredField, 并强制设置为可访问. - * 如向上转型到Object仍无法找到, 返回null. - */ - public static Field getAccessibleField(final Object obj, final String fieldName) { - // 为空不报错。直接返回 null - if (obj == null) { - return null; - } - Validate.notBlank(fieldName, "fieldName can't be blank"); - for (Class superClass = obj.getClass(); superClass != Object.class; superClass = superClass.getSuperclass()) { - try { - Field field = superClass.getDeclaredField(fieldName); - makeAccessible(field); - return field; - } catch (NoSuchFieldException e) { - continue; - } - } - return null; - } - - /** - * 循环向上转型, 获取对象的DeclaredMethod,并强制设置为可访问. - * 如向上转型到Object仍无法找到, 返回null. - * 匹配函数名+参数类型。 - * 用于方法需要被多次调用的情况. 先使用本函数先取得Method,然后调用Method.invoke(Object obj, Object... args) - */ - public static Method getAccessibleMethod(final Object obj, final String methodName, - final Class... parameterTypes) { - // 为空不报错。直接返回 null - if (obj == null) { - return null; - } - Validate.notBlank(methodName, "methodName can't be blank"); - for (Class searchType = obj.getClass(); searchType != Object.class; searchType = searchType.getSuperclass()) { - try { - Method method = searchType.getDeclaredMethod(methodName, parameterTypes); - makeAccessible(method); - return method; - } catch (NoSuchMethodException e) { - continue; - } - } - return null; - } - - /** - * 循环向上转型, 获取对象的DeclaredMethod,并强制设置为可访问. - * 如向上转型到Object仍无法找到, 返回null. - * 只匹配函数名。 - * 用于方法需要被多次调用的情况. 先使用本函数先取得Method,然后调用Method.invoke(Object obj, Object... args) - */ - public static Method getAccessibleMethodByName(final Object obj, final String methodName, int argsNum) { - // 为空不报错。直接返回 null - if (obj == null) { - return null; - } - Validate.notBlank(methodName, "methodName can't be blank"); - for (Class searchType = obj.getClass(); searchType != Object.class; searchType = searchType.getSuperclass()) { - Method[] methods = searchType.getDeclaredMethods(); - for (Method method : methods) { - if (method.getName().equals(methodName) && method.getParameterTypes().length == argsNum) { - makeAccessible(method); - return method; - } - } - } - return null; - } - - /** - * 改变private/protected的方法为public,尽量不调用实际改动的语句,避免JDK的SecurityManager抱怨。 - */ - public static void makeAccessible(Method method) { - if ((!Modifier.isPublic(method.getModifiers()) || !Modifier.isPublic(method.getDeclaringClass().getModifiers())) - && !method.isAccessible()) { - method.setAccessible(true); - } - } - - /** - * 改变private/protected的成员变量为public,尽量不调用实际改动的语句,避免JDK的SecurityManager抱怨。 - */ - public static void makeAccessible(Field field) { - if ((!Modifier.isPublic(field.getModifiers()) || !Modifier.isPublic(field.getDeclaringClass().getModifiers()) - || Modifier.isFinal(field.getModifiers())) && !field.isAccessible()) { - field.setAccessible(true); - } - } - - /** - * 通过反射, 获得Class定义中声明的泛型参数的类型, 注意泛型必须定义在父类处 - * 如无法找到, 返回Object.class. - */ - @SuppressWarnings("unchecked") - public static Class getClassGenricType(final Class clazz) { - return getClassGenricType(clazz, 0); - } - - /** - * 通过反射, 获得Class定义中声明的父类的泛型参数的类型. - * 如无法找到, 返回Object.class. - */ - public static Class getClassGenricType(final Class clazz, final int index) { - Type genType = clazz.getGenericSuperclass(); - - if (!(genType instanceof ParameterizedType)) { - logger.debug(clazz.getSimpleName() + "'s superclass not ParameterizedType"); - return Object.class; - } - - Type[] params = ((ParameterizedType) genType).getActualTypeArguments(); - - if (index >= params.length || index < 0) { - logger.debug("Index: " + index + ", Size of " + clazz.getSimpleName() + "'s Parameterized Type: " - + params.length); - return Object.class; - } - if (!(params[index] instanceof Class)) { - logger.debug(clazz.getSimpleName() + " not set the actual class on superclass generic parameter"); - return Object.class; - } - - return (Class) params[index]; - } - - public static Class getUserClass(Object instance) { - if (instance == null) { - throw new RuntimeException("Instance must not be null"); - } - Class clazz = instance.getClass(); - if (clazz != null && clazz.getName().contains(CGLIB_CLASS_SEPARATOR)) { - Class superClass = clazz.getSuperclass(); - if (superClass != null && !Object.class.equals(superClass)) { - return superClass; - } - } - return clazz; - - } - - /** - * 将反射时的checked exception转换为unchecked exception. - */ - public static RuntimeException convertReflectionExceptionToUnchecked(String msg, Exception e) { - if (e instanceof IllegalAccessException || e instanceof IllegalArgumentException - || e instanceof NoSuchMethodException) { - return new IllegalArgumentException(msg, e); - } else if (e instanceof InvocationTargetException) { - return new RuntimeException(msg, ((InvocationTargetException) e).getTargetException()); - } - return new RuntimeException(msg, e); - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/sign/Base64.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/sign/Base64.java deleted file mode 100644 index 55659bcf..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/sign/Base64.java +++ /dev/null @@ -1,253 +0,0 @@ -package com.ruoyi.common.utils.sign; - -/** - * Base64工具类 - * - * @author ruoyi - */ -public final class Base64 { - static private final int BASELENGTH = 128; - static private final int LOOKUPLENGTH = 64; - static private final int TWENTYFOURBITGROUP = 24; - static private final int EIGHTBIT = 8; - static private final int SIXTEENBIT = 16; - static private final int FOURBYTE = 4; - static private final int SIGN = -128; - static private final char PAD = '='; - static final private byte[] base64Alphabet = new byte[BASELENGTH]; - static final private char[] lookUpBase64Alphabet = new char[LOOKUPLENGTH]; - - static { - for (int i = 0; i < BASELENGTH; ++i) { - base64Alphabet[i] = -1; - } - for (int i = 'Z'; i >= 'A'; i--) { - base64Alphabet[i] = (byte) (i - 'A'); - } - for (int i = 'z'; i >= 'a'; i--) { - base64Alphabet[i] = (byte) (i - 'a' + 26); - } - - for (int i = '9'; i >= '0'; i--) { - base64Alphabet[i] = (byte) (i - '0' + 52); - } - - base64Alphabet['+'] = 62; - base64Alphabet['/'] = 63; - - for (int i = 0; i <= 25; i++) { - lookUpBase64Alphabet[i] = (char) ('A' + i); - } - - for (int i = 26, j = 0; i <= 51; i++, j++) { - lookUpBase64Alphabet[i] = (char) ('a' + j); - } - - for (int i = 52, j = 0; i <= 61; i++, j++) { - lookUpBase64Alphabet[i] = (char) ('0' + j); - } - lookUpBase64Alphabet[62] = (char) '+'; - lookUpBase64Alphabet[63] = (char) '/'; - } - - private static boolean isWhiteSpace(char octect) { - return (octect == 0x20 || octect == 0xd || octect == 0xa || octect == 0x9); - } - - private static boolean isPad(char octect) { - return (octect == PAD); - } - - private static boolean isData(char octect) { - return (octect < BASELENGTH && base64Alphabet[octect] != -1); - } - - /** - * Encodes hex octects into Base64 - * - * @param binaryData Array containing binaryData - * @return Encoded Base64 array - */ - public static String encode(byte[] binaryData) { - if (binaryData == null) { - return null; - } - - int lengthDataBits = binaryData.length * EIGHTBIT; - if (lengthDataBits == 0) { - return ""; - } - - int fewerThan24bits = lengthDataBits % TWENTYFOURBITGROUP; - int numberTriplets = lengthDataBits / TWENTYFOURBITGROUP; - int numberQuartet = fewerThan24bits != 0 ? numberTriplets + 1 : numberTriplets; - char encodedData[] = null; - - encodedData = new char[numberQuartet * 4]; - - byte k = 0, l = 0, b1 = 0, b2 = 0, b3 = 0; - - int encodedIndex = 0; - int dataIndex = 0; - - for (int i = 0; i < numberTriplets; i++) { - b1 = binaryData[dataIndex++]; - b2 = binaryData[dataIndex++]; - b3 = binaryData[dataIndex++]; - - l = (byte) (b2 & 0x0f); - k = (byte) (b1 & 0x03); - - byte val1 = ((b1 & SIGN) == 0) ? (byte) (b1 >> 2) : (byte) ((b1) >> 2 ^ 0xc0); - byte val2 = ((b2 & SIGN) == 0) ? (byte) (b2 >> 4) : (byte) ((b2) >> 4 ^ 0xf0); - byte val3 = ((b3 & SIGN) == 0) ? (byte) (b3 >> 6) : (byte) ((b3) >> 6 ^ 0xfc); - - encodedData[encodedIndex++] = lookUpBase64Alphabet[val1]; - encodedData[encodedIndex++] = lookUpBase64Alphabet[val2 | (k << 4)]; - encodedData[encodedIndex++] = lookUpBase64Alphabet[(l << 2) | val3]; - encodedData[encodedIndex++] = lookUpBase64Alphabet[b3 & 0x3f]; - } - - // form integral number of 6-bit groups - if (fewerThan24bits == EIGHTBIT) { - b1 = binaryData[dataIndex]; - k = (byte) (b1 & 0x03); - byte val1 = ((b1 & SIGN) == 0) ? (byte) (b1 >> 2) : (byte) ((b1) >> 2 ^ 0xc0); - encodedData[encodedIndex++] = lookUpBase64Alphabet[val1]; - encodedData[encodedIndex++] = lookUpBase64Alphabet[k << 4]; - encodedData[encodedIndex++] = PAD; - encodedData[encodedIndex++] = PAD; - } else if (fewerThan24bits == SIXTEENBIT) { - b1 = binaryData[dataIndex]; - b2 = binaryData[dataIndex + 1]; - l = (byte) (b2 & 0x0f); - k = (byte) (b1 & 0x03); - - byte val1 = ((b1 & SIGN) == 0) ? (byte) (b1 >> 2) : (byte) ((b1) >> 2 ^ 0xc0); - byte val2 = ((b2 & SIGN) == 0) ? (byte) (b2 >> 4) : (byte) ((b2) >> 4 ^ 0xf0); - - encodedData[encodedIndex++] = lookUpBase64Alphabet[val1]; - encodedData[encodedIndex++] = lookUpBase64Alphabet[val2 | (k << 4)]; - encodedData[encodedIndex++] = lookUpBase64Alphabet[l << 2]; - encodedData[encodedIndex++] = PAD; - } - return new String(encodedData); - } - - /** - * Decodes Base64 data into octects - * - * @param encoded string containing Base64 data - * @return Array containind decoded data. - */ - public static byte[] decode(String encoded) { - if (encoded == null) { - return null; - } - - char[] base64Data = encoded.toCharArray(); - // remove white spaces - int len = removeWhiteSpace(base64Data); - - if (len % FOURBYTE != 0) { - return null;// should be divisible by four - } - - int numberQuadruple = (len / FOURBYTE); - - if (numberQuadruple == 0) { - return new byte[0]; - } - - byte decodedData[] = null; - byte b1 = 0, b2 = 0, b3 = 0, b4 = 0; - char d1 = 0, d2 = 0, d3 = 0, d4 = 0; - - int i = 0; - int encodedIndex = 0; - int dataIndex = 0; - decodedData = new byte[(numberQuadruple) * 3]; - - for (; i < numberQuadruple - 1; i++) { - - if (!isData((d1 = base64Data[dataIndex++])) || !isData((d2 = base64Data[dataIndex++])) - || !isData((d3 = base64Data[dataIndex++])) || !isData((d4 = base64Data[dataIndex++]))) { - return null; - } // if found "no data" just return null - - b1 = base64Alphabet[d1]; - b2 = base64Alphabet[d2]; - b3 = base64Alphabet[d3]; - b4 = base64Alphabet[d4]; - - decodedData[encodedIndex++] = (byte) (b1 << 2 | b2 >> 4); - decodedData[encodedIndex++] = (byte) (((b2 & 0xf) << 4) | ((b3 >> 2) & 0xf)); - decodedData[encodedIndex++] = (byte) (b3 << 6 | b4); - } - - if (!isData((d1 = base64Data[dataIndex++])) || !isData((d2 = base64Data[dataIndex++]))) { - return null;// if found "no data" just return null - } - - b1 = base64Alphabet[d1]; - b2 = base64Alphabet[d2]; - - d3 = base64Data[dataIndex++]; - d4 = base64Data[dataIndex++]; - if (!isData((d3)) || !isData((d4))) {// Check if they are PAD characters - if (isPad(d3) && isPad(d4)) { - if ((b2 & 0xf) != 0)// last 4 bits should be zero - { - return null; - } - byte[] tmp = new byte[i * 3 + 1]; - System.arraycopy(decodedData, 0, tmp, 0, i * 3); - tmp[encodedIndex] = (byte) (b1 << 2 | b2 >> 4); - return tmp; - } else if (!isPad(d3) && isPad(d4)) { - b3 = base64Alphabet[d3]; - if ((b3 & 0x3) != 0)// last 2 bits should be zero - { - return null; - } - byte[] tmp = new byte[i * 3 + 2]; - System.arraycopy(decodedData, 0, tmp, 0, i * 3); - tmp[encodedIndex++] = (byte) (b1 << 2 | b2 >> 4); - tmp[encodedIndex] = (byte) (((b2 & 0xf) << 4) | ((b3 >> 2) & 0xf)); - return tmp; - } else { - return null; - } - } else { // No PAD e.g 3cQl - b3 = base64Alphabet[d3]; - b4 = base64Alphabet[d4]; - decodedData[encodedIndex++] = (byte) (b1 << 2 | b2 >> 4); - decodedData[encodedIndex++] = (byte) (((b2 & 0xf) << 4) | ((b3 >> 2) & 0xf)); - decodedData[encodedIndex++] = (byte) (b3 << 6 | b4); - - } - return decodedData; - } - - /** - * remove WhiteSpace from MIME containing encoded Base64 data. - * - * @param data the byte array of base64 data (with WS) - * @return the new length - */ - private static int removeWhiteSpace(char[] data) { - if (data == null) { - return 0; - } - - // count characters that's not whitespace - int newSize = 0; - int len = data.length; - for (int i = 0; i < len; i++) { - if (!isWhiteSpace(data[i])) { - data[newSize++] = data[i]; - } - } - return newSize; - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/sign/Md5Utils.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/sign/Md5Utils.java deleted file mode 100644 index 70bdcb0d..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/sign/Md5Utils.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.ruoyi.common.utils.sign; - -import java.security.MessageDigest; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Md5加密方法 - * - * @author ruoyi - */ -public class Md5Utils { - private static final Logger log = LoggerFactory.getLogger(Md5Utils.class); - - private static byte[] md5(String s) { - MessageDigest algorithm; - try { - algorithm = MessageDigest.getInstance("MD5"); - algorithm.reset(); - algorithm.update(s.getBytes("UTF-8")); - byte[] messageDigest = algorithm.digest(); - return messageDigest; - } catch (Exception e) { - log.error("MD5 Error...", e); - } - return null; - } - - private static final String toHex(byte hash[]) { - if (hash == null) { - return null; - } - StringBuffer buf = new StringBuffer(hash.length * 2); - int i; - - for (i = 0; i < hash.length; i++) { - if ((hash[i] & 0xff) < 0x10) { - buf.append("0"); - } - buf.append(Long.toString(hash[i] & 0xff, 16)); - } - return buf.toString(); - } - - public static String hash(String s) { - try { - return new String(toHex(md5(s)).getBytes("UTF-8"), "UTF-8"); - } catch (Exception e) { - log.error("not supported charset...{}", e); - return s; - } - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/spring/SpringUtils.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/spring/SpringUtils.java deleted file mode 100644 index 8fd4951b..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/spring/SpringUtils.java +++ /dev/null @@ -1,131 +0,0 @@ -package com.ruoyi.common.utils.spring; - -import org.springframework.aop.framework.AopContext; -import org.springframework.beans.BeansException; -import org.springframework.beans.factory.NoSuchBeanDefinitionException; -import org.springframework.beans.factory.config.BeanFactoryPostProcessor; -import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; -import org.springframework.context.ApplicationContext; -import org.springframework.context.ApplicationContextAware; -import org.springframework.stereotype.Component; -import com.ruoyi.common.utils.StringUtils; - -/** - * spring工具类 方便在非spring管理环境中获取bean - * - * @author ruoyi - */ -@Component -public final class SpringUtils implements BeanFactoryPostProcessor, ApplicationContextAware { - /** - * Spring应用上下文环境 - */ - private static ConfigurableListableBeanFactory beanFactory; - - private static ApplicationContext applicationContext; - - @Override - public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { - SpringUtils.beanFactory = beanFactory; - } - - @Override - public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { - SpringUtils.applicationContext = applicationContext; - } - - /** - * 获取对象 - * - * @param name - * @return Object 一个以所给名字注册的bean的实例 - * @throws org.springframework.beans.BeansException - */ - @SuppressWarnings("unchecked") - public static T getBean(String name) throws BeansException { - return (T) beanFactory.getBean(name); - } - - /** - * 获取类型为requiredType的对象 - * - * @param clz - * @return - * @throws org.springframework.beans.BeansException - */ - public static T getBean(Class clz) throws BeansException { - T result = (T) beanFactory.getBean(clz); - return result; - } - - /** - * 如果BeanFactory包含一个与所给名称匹配的bean定义,则返回true - * - * @param name - * @return boolean - */ - public static boolean containsBean(String name) { - return beanFactory.containsBean(name); - } - - /** - * 判断以给定名字注册的bean定义是一个singleton还是一个prototype。 如果与给定名字相应的bean定义没有被找到,将会抛出一个异常(NoSuchBeanDefinitionException) - * - * @param name - * @return boolean - * @throws org.springframework.beans.factory.NoSuchBeanDefinitionException - */ - public static boolean isSingleton(String name) throws NoSuchBeanDefinitionException { - return beanFactory.isSingleton(name); - } - - /** - * @param name - * @return Class 注册对象的类型 - * @throws org.springframework.beans.factory.NoSuchBeanDefinitionException - */ - public static Class getType(String name) throws NoSuchBeanDefinitionException { - return beanFactory.getType(name); - } - - /** - * 如果给定的bean名字在bean定义中有别名,则返回这些别名 - * - * @param name - * @return - * @throws org.springframework.beans.factory.NoSuchBeanDefinitionException - */ - public static String[] getAliases(String name) throws NoSuchBeanDefinitionException { - return beanFactory.getAliases(name); - } - - /** - * 获取aop代理对象 - * - * @param invoker - * @return - */ - @SuppressWarnings("unchecked") - public static T getAopProxy(T invoker) { - return (T) AopContext.currentProxy(); - } - - /** - * 获取当前的环境配置,无配置返回null - * - * @return 当前的环境配置 - */ - public static String[] getActiveProfiles() { - return applicationContext.getEnvironment().getActiveProfiles(); - } - - /** - * 获取当前的环境配置,当有多个环境配置时,只获取第一个 - * - * @return 当前的环境配置 - */ - public static String getActiveProfile() { - final String[] activeProfiles = getActiveProfiles(); - return StringUtils.isNotEmpty(activeProfiles) ? activeProfiles[0] : null; - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/sql/SqlUtil.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/sql/SqlUtil.java deleted file mode 100644 index 2e6d36a5..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/sql/SqlUtil.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.ruoyi.common.utils.sql; - -import com.ruoyi.common.exception.BaseException; -import com.ruoyi.common.utils.StringUtils; - -/** - * sql操作工具类 - * - * @author ruoyi - */ -public class SqlUtil { - /** - * 仅支持字母、数字、下划线、空格、逗号、小数点(支持多个字段排序) - */ - public static String SQL_PATTERN = "[a-zA-Z0-9_\\ \\,\\.]+"; - - /** - * 检查字符,防止注入绕过 - */ - public static String escapeOrderBySql(String value) { - if (StringUtils.isNotEmpty(value) && !isValidOrderBySql(value)) { - throw new BaseException("参数不符合规范,不能进行查询"); - } - return value; - } - - /** - * 验证 order by 语法是否符合规范 - */ - public static boolean isValidOrderBySql(String value) { - return value.matches(SQL_PATTERN); - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/uuid/IdUtils.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/uuid/IdUtils.java deleted file mode 100644 index 11ef56e4..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/uuid/IdUtils.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.ruoyi.common.utils.uuid; - -import com.ruoyi.common.utils.uuid.UUID; - -/** - * ID生成器工具类 - * - * @author ruoyi - */ -public class IdUtils { - /** - * 获取随机UUID - * - * @return 随机UUID - */ - public static String randomUUID() { - return UUID.randomUUID().toString(); - } - - /** - * 简化的UUID,去掉了横线 - * - * @return 简化的UUID,去掉了横线 - */ - public static String simpleUUID() { - return UUID.randomUUID().toString(true); - } - - /** - * 获取随机UUID,使用性能更好的ThreadLocalRandom生成UUID - * - * @return 随机UUID - */ - public static String fastUUID() { - return UUID.fastUUID().toString(); - } - - /** - * 简化的UUID,去掉了横线,使用性能更好的ThreadLocalRandom生成UUID - * - * @return 简化的UUID,去掉了横线 - */ - public static String fastSimpleUUID() { - return UUID.fastUUID().toString(true); - } -} diff --git a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/uuid/UUID.java b/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/uuid/UUID.java deleted file mode 100644 index d87e4988..00000000 --- a/spring-boot/ruoyi-common/src/main/java/com/ruoyi/common/utils/uuid/UUID.java +++ /dev/null @@ -1,441 +0,0 @@ -package com.ruoyi.common.utils.uuid; - -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; -import java.security.SecureRandom; -import java.util.Random; -import java.util.concurrent.ThreadLocalRandom; - -import com.ruoyi.common.exception.UtilException; - -/** - * 提供通用唯一识别码(universally unique identifier)(UUID)实现 - * - * @author ruoyi - */ -public final class UUID implements java.io.Serializable, Comparable { - private static final long serialVersionUID = -1185015143654744140L; - - /** - * SecureRandom 的单例 - */ - private static class Holder { - static final SecureRandom numberGenerator = getSecureRandom(); - } - - /** - * 此UUID的最高64有效位 - */ - private final long mostSigBits; - - /** - * 此UUID的最低64有效位 - */ - private final long leastSigBits; - - /** - * 私有构造 - * - * @param data 数据 - */ - private UUID(byte[] data) { - long msb = 0; - long lsb = 0; - assert data.length == 16 : "data must be 16 bytes in length"; - for (int i = 0; i < 8; i++) { - msb = (msb << 8) | (data[i] & 0xff); - } - for (int i = 8; i < 16; i++) { - lsb = (lsb << 8) | (data[i] & 0xff); - } - this.mostSigBits = msb; - this.leastSigBits = lsb; - } - - /** - * 使用指定的数据构造新的 UUID。 - * - * @param mostSigBits 用于 {@code UUID} 的最高有效 64 位 - * @param leastSigBits 用于 {@code UUID} 的最低有效 64 位 - */ - public UUID(long mostSigBits, long leastSigBits) { - this.mostSigBits = mostSigBits; - this.leastSigBits = leastSigBits; - } - - /** - * 获取类型 4(伪随机生成的)UUID 的静态工厂。 使用加密的本地线程伪随机数生成器生成该 UUID。 - * - * @return 随机生成的 {@code UUID} - */ - public static UUID fastUUID() { - return randomUUID(false); - } - - /** - * 获取类型 4(伪随机生成的)UUID 的静态工厂。 使用加密的强伪随机数生成器生成该 UUID。 - * - * @return 随机生成的 {@code UUID} - */ - public static UUID randomUUID() { - return randomUUID(true); - } - - /** - * 获取类型 4(伪随机生成的)UUID 的静态工厂。 使用加密的强伪随机数生成器生成该 UUID。 - * - * @param isSecure 是否使用{@link SecureRandom}如果是可以获得更安全的随机码,否则可以得到更好的性能 - * @return 随机生成的 {@code UUID} - */ - public static UUID randomUUID(boolean isSecure) { - final Random ng = isSecure ? Holder.numberGenerator : getRandom(); - - byte[] randomBytes = new byte[16]; - ng.nextBytes(randomBytes); - randomBytes[6] &= 0x0f; /* clear version */ - randomBytes[6] |= 0x40; /* set to version 4 */ - randomBytes[8] &= 0x3f; /* clear variant */ - randomBytes[8] |= 0x80; /* set to IETF variant */ - return new UUID(randomBytes); - } - - /** - * 根据指定的字节数组获取类型 3(基于名称的)UUID 的静态工厂。 - * - * @param name 用于构造 UUID 的字节数组。 - * @return 根据指定数组生成的 {@code UUID} - */ - public static UUID nameUUIDFromBytes(byte[] name) { - MessageDigest md; - try { - md = MessageDigest.getInstance("MD5"); - } catch (NoSuchAlgorithmException nsae) { - throw new InternalError("MD5 not supported"); - } - byte[] md5Bytes = md.digest(name); - md5Bytes[6] &= 0x0f; /* clear version */ - md5Bytes[6] |= 0x30; /* set to version 3 */ - md5Bytes[8] &= 0x3f; /* clear variant */ - md5Bytes[8] |= 0x80; /* set to IETF variant */ - return new UUID(md5Bytes); - } - - /** - * 根据 {@link #toString()} 方法中描述的字符串标准表示形式创建{@code UUID}。 - * - * @param name 指定 {@code UUID} 字符串 - * @return 具有指定值的 {@code UUID} - * @throws IllegalArgumentException 如果 name 与 {@link #toString} 中描述的字符串表示形式不符抛出此异常 - */ - public static UUID fromString(String name) { - String[] components = name.split("-"); - if (components.length != 5) { - throw new IllegalArgumentException("Invalid UUID string: " + name); - } - for (int i = 0; i < 5; i++) { - components[i] = "0x" + components[i]; - } - - long mostSigBits = Long.decode(components[0]).longValue(); - mostSigBits <<= 16; - mostSigBits |= Long.decode(components[1]).longValue(); - mostSigBits <<= 16; - mostSigBits |= Long.decode(components[2]).longValue(); - - long leastSigBits = Long.decode(components[3]).longValue(); - leastSigBits <<= 48; - leastSigBits |= Long.decode(components[4]).longValue(); - - return new UUID(mostSigBits, leastSigBits); - } - - /** - * 返回此 UUID 的 128 位值中的最低有效 64 位。 - * - * @return 此 UUID 的 128 位值中的最低有效 64 位。 - */ - public long getLeastSignificantBits() { - return leastSigBits; - } - - /** - * 返回此 UUID 的 128 位值中的最高有效 64 位。 - * - * @return 此 UUID 的 128 位值中最高有效 64 位。 - */ - public long getMostSignificantBits() { - return mostSigBits; - } - - /** - * 与此 {@code UUID} 相关联的版本号. 版本号描述此 {@code UUID} 是如何生成的。 - *

- * 版本号具有以下含意: - *

    - *
  • 1 基于时间的 UUID - *
  • 2 DCE 安全 UUID - *
  • 3 基于名称的 UUID - *
  • 4 随机生成的 UUID - *
- * - * @return 此 {@code UUID} 的版本号 - */ - public int version() { - // Version is bits masked by 0x000000000000F000 in MS long - return (int) ((mostSigBits >> 12) & 0x0f); - } - - /** - * 与此 {@code UUID} 相关联的变体号。变体号描述 {@code UUID} 的布局。 - *

- * 变体号具有以下含意: - *

    - *
  • 0 为 NCS 向后兼容保留 - *
  • 2 IETF RFC 4122(Leach-Salz), 用于此类 - *
  • 6 保留,微软向后兼容 - *
  • 7 保留供以后定义使用 - *
- * - * @return 此 {@code UUID} 相关联的变体号 - */ - public int variant() { - // This field is composed of a varying number of bits. - // 0 - - Reserved for NCS backward compatibility - // 1 0 - The IETF aka Leach-Salz variant (used by this class) - // 1 1 0 Reserved, Microsoft backward compatibility - // 1 1 1 Reserved for future definition. - return (int) ((leastSigBits >>> (64 - (leastSigBits >>> 62))) & (leastSigBits >> 63)); - } - - /** - * 与此 UUID 相关联的时间戳值。 - * - *

- * 60 位的时间戳值根据此 {@code UUID} 的 time_low、time_mid 和 time_hi 字段构造。
- * 所得到的时间戳以 100 毫微秒为单位,从 UTC(通用协调时间) 1582 年 10 月 15 日零时开始。 - * - *

- * 时间戳值仅在在基于时间的 UUID(其 version 类型为 1)中才有意义。
- * 如果此 {@code UUID} 不是基于时间的 UUID,则此方法抛出 UnsupportedOperationException。 - * - * @throws UnsupportedOperationException 如果此 {@code UUID} 不是 version 为 1 的 UUID。 - */ - public long timestamp() throws UnsupportedOperationException { - checkTimeBase(); - return (mostSigBits & 0x0FFFL) << 48// - | ((mostSigBits >> 16) & 0x0FFFFL) << 32// - | mostSigBits >>> 32; - } - - /** - * 与此 UUID 相关联的时钟序列值。 - * - *

- * 14 位的时钟序列值根据此 UUID 的 clock_seq 字段构造。clock_seq 字段用于保证在基于时间的 UUID 中的时间唯一性。 - *

- * {@code clockSequence} 值仅在基于时间的 UUID(其 version 类型为 1)中才有意义。 如果此 UUID 不是基于时间的 UUID,则此方法抛出 - * UnsupportedOperationException。 - * - * @return 此 {@code UUID} 的时钟序列 - * @throws UnsupportedOperationException 如果此 UUID 的 version 不为 1 - */ - public int clockSequence() throws UnsupportedOperationException { - checkTimeBase(); - return (int) ((leastSigBits & 0x3FFF000000000000L) >>> 48); - } - - /** - * 与此 UUID 相关的节点值。 - * - *

- * 48 位的节点值根据此 UUID 的 node 字段构造。此字段旨在用于保存机器的 IEEE 802 地址,该地址用于生成此 UUID 以保证空间唯一性。 - *

- * 节点值仅在基于时间的 UUID(其 version 类型为 1)中才有意义。
- * 如果此 UUID 不是基于时间的 UUID,则此方法抛出 UnsupportedOperationException。 - * - * @return 此 {@code UUID} 的节点值 - * @throws UnsupportedOperationException 如果此 UUID 的 version 不为 1 - */ - public long node() throws UnsupportedOperationException { - checkTimeBase(); - return leastSigBits & 0x0000FFFFFFFFFFFFL; - } - - /** - * 返回此{@code UUID} 的字符串表现形式。 - * - *

- * UUID 的字符串表示形式由此 BNF 描述: - * - *

-     * {@code
-     * UUID                   = ----
-     * time_low               = 4*
-     * time_mid               = 2*
-     * time_high_and_version  = 2*
-     * variant_and_sequence   = 2*
-     * node                   = 6*
-     * hexOctet               = 
-     * hexDigit               = [0-9a-fA-F]
-     * }
-     * 
- * - * - * - * @return 此{@code UUID} 的字符串表现形式 - * @see #toString(boolean) - */ - @Override - public String toString() { - return toString(false); - } - - /** - * 返回此{@code UUID} 的字符串表现形式。 - * - *

- * UUID 的字符串表示形式由此 BNF 描述: - * - *

-     * {@code
-     * UUID                   = ----
-     * time_low               = 4*
-     * time_mid               = 2*
-     * time_high_and_version  = 2*
-     * variant_and_sequence   = 2*
-     * node                   = 6*
-     * hexOctet               = 
-     * hexDigit               = [0-9a-fA-F]
-     * }
-     * 
- * - * - * - * @param isSimple 是否简单模式,简单模式为不带'-'的UUID字符串 - * @return 此{@code UUID} 的字符串表现形式 - */ - public String toString(boolean isSimple) { - final StringBuilder builder = new StringBuilder(isSimple ? 32 : 36); - // time_low - builder.append(digits(mostSigBits >> 32, 8)); - if (false == isSimple) { - builder.append('-'); - } - // time_mid - builder.append(digits(mostSigBits >> 16, 4)); - if (false == isSimple) { - builder.append('-'); - } - // time_high_and_version - builder.append(digits(mostSigBits, 4)); - if (false == isSimple) { - builder.append('-'); - } - // variant_and_sequence - builder.append(digits(leastSigBits >> 48, 4)); - if (false == isSimple) { - builder.append('-'); - } - // node - builder.append(digits(leastSigBits, 12)); - - return builder.toString(); - } - - /** - * 返回此 UUID 的哈希码。 - * - * @return UUID 的哈希码值。 - */ - @Override - public int hashCode() { - long hilo = mostSigBits ^ leastSigBits; - return ((int) (hilo >> 32)) ^ (int) hilo; - } - - /** - * 将此对象与指定对象比较。 - *

- * 当且仅当参数不为 {@code null}、而是一个 UUID 对象、具有与此 UUID 相同的 varriant、包含相同的值(每一位均相同)时,结果才为 {@code true}。 - * - * @param obj 要与之比较的对象 - * @return 如果对象相同,则返回 {@code true};否则返回 {@code false} - */ - @Override - public boolean equals(Object obj) { - if ((null == obj) || (obj.getClass() != UUID.class)) { - return false; - } - UUID id = (UUID) obj; - return (mostSigBits == id.mostSigBits && leastSigBits == id.leastSigBits); - } - - // Comparison Operations - - /** - * 将此 UUID 与指定的 UUID 比较。 - * - *

- * 如果两个 UUID 不同,且第一个 UUID 的最高有效字段大于第二个 UUID 的对应字段,则第一个 UUID 大于第二个 UUID。 - * - * @param val 与此 UUID 比较的 UUID - * @return 在此 UUID 小于、等于或大于 val 时,分别返回 -1、0 或 1。 - */ - @Override - public int compareTo(UUID val) { - // The ordering is intentionally set up so that the UUIDs - // can simply be numerically compared as two numbers - return (this.mostSigBits < val.mostSigBits ? -1 : // - (this.mostSigBits > val.mostSigBits ? 1 : // - (this.leastSigBits < val.leastSigBits ? -1 : // - (this.leastSigBits > val.leastSigBits ? 1 : // - 0)))); - } - - // ------------------------------------------------------------------------------------------------------------------- - // Private method start - - /** - * 返回指定数字对应的hex值 - * - * @param val 值 - * @param digits 位 - * @return 值 - */ - private static String digits(long val, int digits) { - long hi = 1L << (digits * 4); - return Long.toHexString(hi | (val & (hi - 1))).substring(1); - } - - /** - * 检查是否为time-based版本UUID - */ - private void checkTimeBase() { - if (version() != 1) { - throw new UnsupportedOperationException("Not a time-based UUID"); - } - } - - /** - * 获取{@link SecureRandom},类提供加密的强随机数生成器 (RNG) - * - * @return {@link SecureRandom} - */ - public static SecureRandom getSecureRandom() { - try { - return SecureRandom.getInstance("SHA1PRNG"); - } catch (NoSuchAlgorithmException e) { - throw new UtilException(e); - } - } - - /** - * 获取随机数生成器对象
- * ThreadLocalRandom是JDK 7之后提供并发产生随机数,能够解决多个线程发生的竞争争夺。 - * - * @return {@link ThreadLocalRandom} - */ - public static ThreadLocalRandom getRandom() { - return ThreadLocalRandom.current(); - } -} diff --git a/spring-boot/ruoyi-framework/pom.xml b/spring-boot/ruoyi-framework/pom.xml deleted file mode 100644 index 982c8993..00000000 --- a/spring-boot/ruoyi-framework/pom.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - ruoyi - com.ruoyi - 3.4.0 - - 4.0.0 - - ruoyi-framework - - - framework框架核心 - - - - - - - org.springframework.boot - spring-boot-starter-web - - - - - org.springframework.boot - spring-boot-starter-aop - - - - - com.alibaba - druid-spring-boot-starter - - - - - com.github.penggle - kaptcha - - - javax.servlet-api - javax.servlet - - - - - - - com.github.oshi - oshi-core - - - - - com.ruoyi - ruoyi-system - - - com.github.binarywang - weixin-java-miniapp - 4.0.0 - - - - - - \ No newline at end of file diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java deleted file mode 100644 index cc01b942..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataScopeAspect.java +++ /dev/null @@ -1,145 +0,0 @@ -package com.ruoyi.framework.aspectj; - -import java.lang.reflect.Method; - -import org.aspectj.lang.JoinPoint; -import org.aspectj.lang.Signature; -import org.aspectj.lang.annotation.Aspect; -import org.aspectj.lang.annotation.Before; -import org.aspectj.lang.annotation.Pointcut; -import org.aspectj.lang.reflect.MethodSignature; -import org.springframework.stereotype.Component; -import com.ruoyi.common.annotation.DataScope; -import com.ruoyi.common.core.domain.BaseEntity; -import com.ruoyi.common.core.domain.entity.SysRole; -import com.ruoyi.common.core.domain.entity.SysUser; -import com.ruoyi.common.core.domain.model.LoginUser; -import com.ruoyi.common.utils.ServletUtils; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.common.utils.spring.SpringUtils; -import com.ruoyi.framework.web.service.TokenService; - -/** - * 数据过滤处理 - * - * @author ruoyi - */ -@Aspect -@Component -public class DataScopeAspect { - /** - * 全部数据权限 - */ - public static final String DATA_SCOPE_ALL = "1"; - - /** - * 自定数据权限 - */ - public static final String DATA_SCOPE_CUSTOM = "2"; - - /** - * 部门数据权限 - */ - public static final String DATA_SCOPE_DEPT = "3"; - - /** - * 部门及以下数据权限 - */ - public static final String DATA_SCOPE_DEPT_AND_CHILD = "4"; - - /** - * 仅本人数据权限 - */ - public static final String DATA_SCOPE_SELF = "5"; - - /** - * 数据权限过滤关键字 - */ - public static final String DATA_SCOPE = "dataScope"; - - // 配置织入点 - @Pointcut("@annotation(com.ruoyi.common.annotation.DataScope)") - public void dataScopePointCut() { - } - - @Before("dataScopePointCut()") - public void doBefore(JoinPoint point) throws Throwable { - handleDataScope(point); - } - - protected void handleDataScope(final JoinPoint joinPoint) { - // 获得注解 - DataScope controllerDataScope = getAnnotationLog(joinPoint); - if (controllerDataScope == null) { - return; - } - // 获取当前的用户 - LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest()); - if (StringUtils.isNotNull(loginUser)) { - SysUser currentUser = loginUser.getUser(); - // 如果是超级管理员,则不过滤数据 - if (StringUtils.isNotNull(currentUser) && !currentUser.isAdmin()) { - dataScopeFilter(joinPoint, currentUser, controllerDataScope.deptAlias(), - controllerDataScope.userAlias()); - } - } - } - - /** - * 数据范围过滤 - * - * @param joinPoint 切点 - * @param user 用户 - * @param userAlias 别名 - */ - public static void dataScopeFilter(JoinPoint joinPoint, SysUser user, String deptAlias, String userAlias) { - StringBuilder sqlString = new StringBuilder(); - - for (SysRole role : user.getRoles()) { - String dataScope = role.getDataScope(); - if (DATA_SCOPE_ALL.equals(dataScope)) { - sqlString = new StringBuilder(); - break; - } else if (DATA_SCOPE_CUSTOM.equals(dataScope)) { - sqlString.append(StringUtils.format( - " OR {}.dept_id IN ( SELECT dept_id FROM sys_role_dept WHERE role_id = {} ) ", deptAlias, - role.getRoleId())); - } else if (DATA_SCOPE_DEPT.equals(dataScope)) { - sqlString.append(StringUtils.format(" OR {}.dept_id = {} ", deptAlias, user.getDeptId())); - } else if (DATA_SCOPE_DEPT_AND_CHILD.equals(dataScope)) { - sqlString.append(StringUtils.format( - " OR {}.dept_id IN ( SELECT dept_id FROM sys_dept WHERE dept_id = {} or find_in_set( {} , ancestors ) )", - deptAlias, user.getDeptId(), user.getDeptId())); - } else if (DATA_SCOPE_SELF.equals(dataScope)) { - if (StringUtils.isNotBlank(userAlias)) { - sqlString.append(StringUtils.format(" OR {}.user_id = {} ", userAlias, user.getUserId())); - } else { - // 数据权限为仅本人且没有userAlias别名不查询任何数据 - sqlString.append(" OR 1=0 "); - } - } - } - - if (StringUtils.isNotBlank(sqlString.toString())) { - Object params = joinPoint.getArgs()[0]; - if (StringUtils.isNotNull(params) && params instanceof BaseEntity) { - BaseEntity baseEntity = (BaseEntity) params; - baseEntity.getParams().put(DATA_SCOPE, " AND (" + sqlString.substring(4) + ")"); - } - } - } - - /** - * 是否存在注解,如果存在就获取 - */ - private DataScope getAnnotationLog(JoinPoint joinPoint) { - Signature signature = joinPoint.getSignature(); - MethodSignature methodSignature = (MethodSignature) signature; - Method method = methodSignature.getMethod(); - - if (method != null) { - return method.getAnnotation(DataScope.class); - } - return null; - } -} diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataSourceAspect.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataSourceAspect.java deleted file mode 100644 index 020493d2..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/DataSourceAspect.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.ruoyi.framework.aspectj; - -import java.util.Objects; - -import org.aspectj.lang.ProceedingJoinPoint; -import org.aspectj.lang.annotation.Around; -import org.aspectj.lang.annotation.Aspect; -import org.aspectj.lang.annotation.Pointcut; -import org.aspectj.lang.reflect.MethodSignature; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.core.annotation.AnnotationUtils; -import org.springframework.core.annotation.Order; -import org.springframework.stereotype.Component; -import com.ruoyi.common.annotation.DataSource; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.framework.datasource.DynamicDataSourceContextHolder; - -/** - * 多数据源处理 - * - * @author ruoyi - */ -@Aspect -@Order(1) -@Component -public class DataSourceAspect { - protected Logger logger = LoggerFactory.getLogger(getClass()); - - @Pointcut("@annotation(com.ruoyi.common.annotation.DataSource)" - + "|| @within(com.ruoyi.common.annotation.DataSource)") - public void dsPointCut() { - - } - - @Around("dsPointCut()") - public Object around(ProceedingJoinPoint point) throws Throwable { - DataSource dataSource = getDataSource(point); - - if (StringUtils.isNotNull(dataSource)) { - DynamicDataSourceContextHolder.setDataSourceType(dataSource.value().name()); - } - - try { - return point.proceed(); - } finally { - // 销毁数据源 在执行方法之后 - DynamicDataSourceContextHolder.clearDataSourceType(); - } - } - - /** - * 获取需要切换的数据源 - */ - public DataSource getDataSource(ProceedingJoinPoint point) { - MethodSignature signature = (MethodSignature) point.getSignature(); - DataSource dataSource = AnnotationUtils.findAnnotation(signature.getMethod(), DataSource.class); - if (Objects.nonNull(dataSource)) { - return dataSource; - } - - return AnnotationUtils.findAnnotation(signature.getDeclaringType(), DataSource.class); - } -} diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java deleted file mode 100644 index 7c53fc23..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java +++ /dev/null @@ -1,212 +0,0 @@ -package com.ruoyi.framework.aspectj; - -import java.lang.reflect.Method; -import java.util.Collection; -import java.util.Iterator; -import java.util.Map; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.aspectj.lang.JoinPoint; -import org.aspectj.lang.Signature; -import org.aspectj.lang.annotation.AfterReturning; -import org.aspectj.lang.annotation.AfterThrowing; -import org.aspectj.lang.annotation.Aspect; -import org.aspectj.lang.annotation.Pointcut; -import org.aspectj.lang.reflect.MethodSignature; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; -import org.springframework.web.multipart.MultipartFile; -import org.springframework.web.servlet.HandlerMapping; -import com.alibaba.fastjson.JSON; -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.core.domain.model.LoginUser; -import com.ruoyi.common.enums.BusinessStatus; -import com.ruoyi.common.enums.HttpMethod; -import com.ruoyi.common.utils.ServletUtils; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.common.utils.ip.IpUtils; -import com.ruoyi.common.utils.spring.SpringUtils; -import com.ruoyi.framework.manager.AsyncManager; -import com.ruoyi.framework.manager.factory.AsyncFactory; -import com.ruoyi.framework.web.service.TokenService; -import com.ruoyi.system.domain.SysOperLog; - -/** - * 操作日志记录处理 - * - * @author ruoyi - */ -@Aspect -@Component -public class LogAspect { - private static final Logger log = LoggerFactory.getLogger(LogAspect.class); - - // 配置织入点 - @Pointcut("@annotation(com.ruoyi.common.annotation.Log)") - public void logPointCut() { - } - - /** - * 处理完请求后执行 - * - * @param joinPoint 切点 - */ - @AfterReturning(pointcut = "logPointCut()", returning = "jsonResult") - public void doAfterReturning(JoinPoint joinPoint, Object jsonResult) { - handleLog(joinPoint, null, jsonResult); - } - - /** - * 拦截异常操作 - * - * @param joinPoint 切点 - * @param e 异常 - */ - @AfterThrowing(value = "logPointCut()", throwing = "e") - public void doAfterThrowing(JoinPoint joinPoint, Exception e) { - handleLog(joinPoint, e, null); - } - - protected void handleLog(final JoinPoint joinPoint, final Exception e, Object jsonResult) { - try { - // 获得注解 - Log controllerLog = getAnnotationLog(joinPoint); - if (controllerLog == null) { - return; - } - - // 获取当前的用户 - LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest()); - - // *========数据库日志=========*// - SysOperLog operLog = new SysOperLog(); - operLog.setStatus(BusinessStatus.SUCCESS.ordinal()); - // 请求的地址 - String ip = IpUtils.getIpAddr(ServletUtils.getRequest()); - operLog.setOperIp(ip); - // 返回参数 - operLog.setJsonResult(JSON.toJSONString(jsonResult)); - - operLog.setOperUrl(ServletUtils.getRequest().getRequestURI()); - if (loginUser != null) { - operLog.setOperName(loginUser.getUsername()); - } - - if (e != null) { - operLog.setStatus(BusinessStatus.FAIL.ordinal()); - operLog.setErrorMsg(StringUtils.substring(e.getMessage(), 0, 2000)); - } - // 设置方法名称 - String className = joinPoint.getTarget().getClass().getName(); - String methodName = joinPoint.getSignature().getName(); - operLog.setMethod(className + "." + methodName + "()"); - // 设置请求方式 - operLog.setRequestMethod(ServletUtils.getRequest().getMethod()); - // 处理设置注解上的参数 - getControllerMethodDescription(joinPoint, controllerLog, operLog); - // 保存数据库 - AsyncManager.me().execute(AsyncFactory.recordOper(operLog)); - } catch (Exception exp) { - // 记录本地异常日志 - log.error("==前置通知异常=="); - log.error("异常信息:{}", exp.getMessage()); - exp.printStackTrace(); - } - } - - /** - * 获取注解中对方法的描述信息 用于Controller层注解 - * - * @param log 日志 - * @param operLog 操作日志 - * @throws Exception - */ - public void getControllerMethodDescription(JoinPoint joinPoint, Log log, SysOperLog operLog) throws Exception { - // 设置action动作 - operLog.setBusinessType(log.businessType().ordinal()); - // 设置标题 - operLog.setTitle(log.title()); - // 设置操作人类别 - operLog.setOperatorType(log.operatorType().ordinal()); - // 是否需要保存request,参数和值 - if (log.isSaveRequestData()) { - // 获取参数的信息,传入到数据库中。 - setRequestValue(joinPoint, operLog); - } - } - - /** - * 获取请求的参数,放到log中 - * - * @param operLog 操作日志 - * @throws Exception 异常 - */ - private void setRequestValue(JoinPoint joinPoint, SysOperLog operLog) throws Exception { - String requestMethod = operLog.getRequestMethod(); - if (HttpMethod.PUT.name().equals(requestMethod) || HttpMethod.POST.name().equals(requestMethod)) { - String params = argsArrayToString(joinPoint.getArgs()); - operLog.setOperParam(StringUtils.substring(params, 0, 2000)); - } else { - Map paramsMap = (Map) ServletUtils.getRequest().getAttribute(HandlerMapping.URI_TEMPLATE_VARIABLES_ATTRIBUTE); - operLog.setOperParam(StringUtils.substring(paramsMap.toString(), 0, 2000)); - } - } - - /** - * 是否存在注解,如果存在就获取 - */ - private Log getAnnotationLog(JoinPoint joinPoint) throws Exception { - Signature signature = joinPoint.getSignature(); - MethodSignature methodSignature = (MethodSignature) signature; - Method method = methodSignature.getMethod(); - - if (method != null) { - return method.getAnnotation(Log.class); - } - return null; - } - - /** - * 参数拼装 - */ - private String argsArrayToString(Object[] paramsArray) { - String params = ""; - if (paramsArray != null && paramsArray.length > 0) { - for (int i = 0; i < paramsArray.length; i++) { - if (!isFilterObject(paramsArray[i])) { - Object jsonObj = JSON.toJSON(paramsArray[i]); - params += jsonObj.toString() + " "; - } - } - } - return params.trim(); - } - - /** - * 判断是否需要过滤的对象。 - * - * @param o 对象信息。 - * @return 如果是需要过滤的对象,则返回true;否则返回false。 - */ - @SuppressWarnings("rawtypes") - public boolean isFilterObject(final Object o) { - Class clazz = o.getClass(); - if (clazz.isArray()) { - return clazz.getComponentType().isAssignableFrom(MultipartFile.class); - } else if (Collection.class.isAssignableFrom(clazz)) { - Collection collection = (Collection) o; - for (Iterator iter = collection.iterator(); iter.hasNext(); ) { - return iter.next() instanceof MultipartFile; - } - } else if (Map.class.isAssignableFrom(clazz)) { - Map map = (Map) o; - for (Iterator iter = map.entrySet().iterator(); iter.hasNext(); ) { - Map.Entry entry = (Map.Entry) iter.next(); - return entry.getValue() instanceof MultipartFile; - } - } - return o instanceof MultipartFile || o instanceof HttpServletRequest || o instanceof HttpServletResponse; - } -} diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ApplicationConfig.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ApplicationConfig.java deleted file mode 100644 index dbc30d90..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ApplicationConfig.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.ruoyi.framework.config; - -import java.util.TimeZone; - -import org.mybatis.spring.annotation.MapperScan; -import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.EnableAspectJAutoProxy; - -/** - * 程序注解配置 - * - * @author ruoyi - */ -@Configuration -// 表示通过aop框架暴露该代理对象,AopContext能够访问 -@EnableAspectJAutoProxy(exposeProxy = true) -// 指定要扫描的Mapper类的包的路径 -@MapperScan("com.ruoyi.**.mapper") -public class ApplicationConfig { - /** - * 时区配置 - */ - @Bean - public Jackson2ObjectMapperBuilderCustomizer jacksonObjectMapperCustomization() { - return jacksonObjectMapperBuilder -> jacksonObjectMapperBuilder.timeZone(TimeZone.getDefault()); - } -} diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/CaptchaConfig.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/CaptchaConfig.java deleted file mode 100644 index be2a6e34..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/CaptchaConfig.java +++ /dev/null @@ -1,82 +0,0 @@ -package com.ruoyi.framework.config; - -import java.util.Properties; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import com.google.code.kaptcha.impl.DefaultKaptcha; -import com.google.code.kaptcha.util.Config; - -import static com.google.code.kaptcha.Constants.*; - -/** - * 验证码配置 - * - * @author ruoyi - */ -@Configuration -public class CaptchaConfig { - @Bean(name = "captchaProducer") - public DefaultKaptcha getKaptchaBean() { - DefaultKaptcha defaultKaptcha = new DefaultKaptcha(); - Properties properties = new Properties(); - // 是否有边框 默认为true 我们可以自己设置yes,no - properties.setProperty(KAPTCHA_BORDER, "yes"); - // 验证码文本字符颜色 默认为Color.BLACK - properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_COLOR, "black"); - // 验证码图片宽度 默认为200 - properties.setProperty(KAPTCHA_IMAGE_WIDTH, "160"); - // 验证码图片高度 默认为50 - properties.setProperty(KAPTCHA_IMAGE_HEIGHT, "60"); - // 验证码文本字符大小 默认为40 - properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_SIZE, "38"); - // KAPTCHA_SESSION_KEY - properties.setProperty(KAPTCHA_SESSION_CONFIG_KEY, "kaptchaCode"); - // 验证码文本字符长度 默认为5 - properties.setProperty(KAPTCHA_TEXTPRODUCER_CHAR_LENGTH, "4"); - // 验证码文本字体样式 默认为new Font("Arial", 1, fontSize), new Font("Courier", 1, fontSize) - properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_NAMES, "Arial,Courier"); - // 图片样式 水纹com.google.code.kaptcha.impl.WaterRipple 鱼眼com.google.code.kaptcha.impl.FishEyeGimpy 阴影com.google.code.kaptcha.impl.ShadowGimpy - properties.setProperty(KAPTCHA_OBSCURIFICATOR_IMPL, "com.google.code.kaptcha.impl.ShadowGimpy"); - Config config = new Config(properties); - defaultKaptcha.setConfig(config); - return defaultKaptcha; - } - - @Bean(name = "captchaProducerMath") - public DefaultKaptcha getKaptchaBeanMath() { - DefaultKaptcha defaultKaptcha = new DefaultKaptcha(); - Properties properties = new Properties(); - // 是否有边框 默认为true 我们可以自己设置yes,no - properties.setProperty(KAPTCHA_BORDER, "yes"); - // 边框颜色 默认为Color.BLACK - properties.setProperty(KAPTCHA_BORDER_COLOR, "105,179,90"); - // 验证码文本字符颜色 默认为Color.BLACK - properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_COLOR, "blue"); - // 验证码图片宽度 默认为200 - properties.setProperty(KAPTCHA_IMAGE_WIDTH, "160"); - // 验证码图片高度 默认为50 - properties.setProperty(KAPTCHA_IMAGE_HEIGHT, "60"); - // 验证码文本字符大小 默认为40 - properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_SIZE, "35"); - // KAPTCHA_SESSION_KEY - properties.setProperty(KAPTCHA_SESSION_CONFIG_KEY, "kaptchaCodeMath"); - // 验证码文本生成器 - properties.setProperty(KAPTCHA_TEXTPRODUCER_IMPL, "com.ruoyi.framework.config.KaptchaTextCreator"); - // 验证码文本字符间距 默认为2 - properties.setProperty(KAPTCHA_TEXTPRODUCER_CHAR_SPACE, "3"); - // 验证码文本字符长度 默认为5 - properties.setProperty(KAPTCHA_TEXTPRODUCER_CHAR_LENGTH, "6"); - // 验证码文本字体样式 默认为new Font("Arial", 1, fontSize), new Font("Courier", 1, fontSize) - properties.setProperty(KAPTCHA_TEXTPRODUCER_FONT_NAMES, "Arial,Courier"); - // 验证码噪点颜色 默认为Color.BLACK - properties.setProperty(KAPTCHA_NOISE_COLOR, "white"); - // 干扰实现类 - properties.setProperty(KAPTCHA_NOISE_IMPL, "com.google.code.kaptcha.impl.NoNoise"); - // 图片样式 水纹com.google.code.kaptcha.impl.WaterRipple 鱼眼com.google.code.kaptcha.impl.FishEyeGimpy 阴影com.google.code.kaptcha.impl.ShadowGimpy - properties.setProperty(KAPTCHA_OBSCURIFICATOR_IMPL, "com.google.code.kaptcha.impl.ShadowGimpy"); - Config config = new Config(properties); - defaultKaptcha.setConfig(config); - return defaultKaptcha; - } -} diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/DruidConfig.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/DruidConfig.java deleted file mode 100644 index 7e9f4b03..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/DruidConfig.java +++ /dev/null @@ -1,116 +0,0 @@ -package com.ruoyi.framework.config; - -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; -import javax.servlet.Filter; -import javax.servlet.FilterChain; -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import javax.sql.DataSource; - -import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.boot.web.servlet.FilterRegistrationBean; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Primary; -import com.alibaba.druid.pool.DruidDataSource; -import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceBuilder; -import com.alibaba.druid.spring.boot.autoconfigure.properties.DruidStatProperties; -import com.alibaba.druid.util.Utils; -import com.ruoyi.common.enums.DataSourceType; -import com.ruoyi.common.utils.spring.SpringUtils; -import com.ruoyi.framework.config.properties.DruidProperties; -import com.ruoyi.framework.datasource.DynamicDataSource; - -/** - * druid 配置多数据源 - * - * @author ruoyi - */ -@Configuration -public class DruidConfig { - @Bean - @ConfigurationProperties("spring.datasource.druid.master") - public DataSource masterDataSource(DruidProperties druidProperties) { - DruidDataSource dataSource = DruidDataSourceBuilder.create().build(); - return druidProperties.dataSource(dataSource); - } - - @Bean - @ConfigurationProperties("spring.datasource.druid.slave") - @ConditionalOnProperty(prefix = "spring.datasource.druid.slave", name = "enabled", havingValue = "true") - public DataSource slaveDataSource(DruidProperties druidProperties) { - DruidDataSource dataSource = DruidDataSourceBuilder.create().build(); - return druidProperties.dataSource(dataSource); - } - - @Bean(name = "dynamicDataSource") - @Primary - public DynamicDataSource dataSource(DataSource masterDataSource) { - Map targetDataSources = new HashMap<>(); - targetDataSources.put(DataSourceType.MASTER.name(), masterDataSource); - setDataSource(targetDataSources, DataSourceType.SLAVE.name(), "slaveDataSource"); - return new DynamicDataSource(masterDataSource, targetDataSources); - } - - /** - * 设置数据源 - * - * @param targetDataSources 备选数据源集合 - * @param sourceName 数据源名称 - * @param beanName bean名称 - */ - public void setDataSource(Map targetDataSources, String sourceName, String beanName) { - try { - DataSource dataSource = SpringUtils.getBean(beanName); - targetDataSources.put(sourceName, dataSource); - } catch (Exception e) { - } - } - - /** - * 去除监控页面底部的广告 - */ - @SuppressWarnings({"rawtypes", "unchecked"}) - @Bean - @ConditionalOnProperty(name = "spring.datasource.druid.statViewServlet.enabled", havingValue = "true") - public FilterRegistrationBean removeDruidFilterRegistrationBean(DruidStatProperties properties) { - // 获取web监控页面的参数 - DruidStatProperties.StatViewServlet config = properties.getStatViewServlet(); - // 提取common.js的配置路径 - String pattern = config.getUrlPattern() != null ? config.getUrlPattern() : "/druid/*"; - String commonJsPattern = pattern.replaceAll("\\*", "js/common.js"); - final String filePath = "support/http/resources/js/common.js"; - // 创建filter进行过滤 - Filter filter = new Filter() { - @Override - public void init(javax.servlet.FilterConfig filterConfig) throws ServletException { - } - - @Override - public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) - throws IOException, ServletException { - chain.doFilter(request, response); - // 重置缓冲区,响应头不会被重置 - response.resetBuffer(); - // 获取common.js - String text = Utils.readFromResource(filePath); - // 正则替换banner, 除去底部的广告信息 - text = text.replaceAll("
", ""); - text = text.replaceAll("powered.*?shrek.wang", ""); - response.getWriter().write(text); - } - - @Override - public void destroy() { - } - }; - FilterRegistrationBean registrationBean = new FilterRegistrationBean(); - registrationBean.setFilter(filter); - registrationBean.addUrlPatterns(commonJsPattern); - return registrationBean; - } -} diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/FastJson2JsonRedisSerializer.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/FastJson2JsonRedisSerializer.java deleted file mode 100644 index a7c29f3f..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/FastJson2JsonRedisSerializer.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.ruoyi.framework.config; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.serializer.SerializerFeature; -import com.fasterxml.jackson.databind.JavaType; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.type.TypeFactory; -import org.springframework.data.redis.serializer.RedisSerializer; -import org.springframework.data.redis.serializer.SerializationException; -import com.alibaba.fastjson.parser.ParserConfig; -import org.springframework.util.Assert; - -import java.nio.charset.Charset; - -/** - * Redis使用FastJson序列化 - * - * @author ruoyi - */ -public class FastJson2JsonRedisSerializer implements RedisSerializer { - @SuppressWarnings("unused") - private ObjectMapper objectMapper = new ObjectMapper(); - - public static final Charset DEFAULT_CHARSET = Charset.forName("UTF-8"); - - private Class clazz; - - static { - ParserConfig.getGlobalInstance().setAutoTypeSupport(true); - } - - public FastJson2JsonRedisSerializer(Class clazz) { - super(); - this.clazz = clazz; - } - - @Override - public byte[] serialize(T t) throws SerializationException { - if (t == null) { - return new byte[0]; - } - return JSON.toJSONString(t, SerializerFeature.WriteClassName).getBytes(DEFAULT_CHARSET); - } - - @Override - public T deserialize(byte[] bytes) throws SerializationException { - if (bytes == null || bytes.length <= 0) { - return null; - } - String str = new String(bytes, DEFAULT_CHARSET); - - return JSON.parseObject(str, clazz); - } - - public void setObjectMapper(ObjectMapper objectMapper) { - Assert.notNull(objectMapper, "'objectMapper' must not be null"); - this.objectMapper = objectMapper; - } - - protected JavaType getJavaType(Class clazz) { - return TypeFactory.defaultInstance().constructType(clazz); - } -} diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/FilterConfig.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/FilterConfig.java deleted file mode 100644 index 4feef0d0..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/FilterConfig.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.ruoyi.framework.config; - -import java.util.HashMap; -import java.util.Map; -import javax.servlet.DispatcherType; - -import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.web.servlet.FilterRegistrationBean; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import com.ruoyi.common.filter.RepeatableFilter; -import com.ruoyi.common.filter.XssFilter; -import com.ruoyi.common.utils.StringUtils; - -/** - * Filter配置 - * - * @author ruoyi - */ -@Configuration -public class FilterConfig { - @Value("${xss.enabled}") - private String enabled; - - @Value("${xss.excludes}") - private String excludes; - - @Value("${xss.urlPatterns}") - private String urlPatterns; - - @SuppressWarnings({"rawtypes", "unchecked"}) - @Bean - public FilterRegistrationBean xssFilterRegistration() { - FilterRegistrationBean registration = new FilterRegistrationBean(); - registration.setDispatcherTypes(DispatcherType.REQUEST); - registration.setFilter(new XssFilter()); - registration.addUrlPatterns(StringUtils.split(urlPatterns, ",")); - registration.setName("xssFilter"); - registration.setOrder(FilterRegistrationBean.HIGHEST_PRECEDENCE); - Map initParameters = new HashMap(); - initParameters.put("excludes", excludes); - initParameters.put("enabled", enabled); - registration.setInitParameters(initParameters); - return registration; - } - - @SuppressWarnings({"rawtypes", "unchecked"}) - @Bean - public FilterRegistrationBean someFilterRegistration() { - FilterRegistrationBean registration = new FilterRegistrationBean(); - registration.setFilter(new RepeatableFilter()); - registration.addUrlPatterns("/*"); - registration.setName("repeatableFilter"); - registration.setOrder(FilterRegistrationBean.LOWEST_PRECEDENCE); - return registration; - } - -} diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/KaptchaTextCreator.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/KaptchaTextCreator.java deleted file mode 100644 index 4f028959..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/KaptchaTextCreator.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.ruoyi.framework.config; - -import java.util.Random; - -import com.google.code.kaptcha.text.impl.DefaultTextCreator; - -/** - * 验证码文本生成器 - * - * @author ruoyi - */ -public class KaptchaTextCreator extends DefaultTextCreator { - private static final String[] CNUMBERS = "0,1,2,3,4,5,6,7,8,9,10".split(","); - - @Override - public String getText() { - Integer result = 0; - Random random = new Random(); - int x = random.nextInt(10); - int y = random.nextInt(10); - StringBuilder suChinese = new StringBuilder(); - int randomoperands = (int) Math.round(Math.random() * 2); - if (randomoperands == 0) { - result = x * y; - suChinese.append(CNUMBERS[x]); - suChinese.append("*"); - suChinese.append(CNUMBERS[y]); - } else if (randomoperands == 1) { - if (!(x == 0) && y % x == 0) { - result = y / x; - suChinese.append(CNUMBERS[y]); - suChinese.append("/"); - suChinese.append(CNUMBERS[x]); - } else { - result = x + y; - suChinese.append(CNUMBERS[x]); - suChinese.append("+"); - suChinese.append(CNUMBERS[y]); - } - } else if (randomoperands == 2) { - if (x >= y) { - result = x - y; - suChinese.append(CNUMBERS[x]); - suChinese.append("-"); - suChinese.append(CNUMBERS[y]); - } else { - result = y - x; - suChinese.append(CNUMBERS[y]); - suChinese.append("-"); - suChinese.append(CNUMBERS[x]); - } - } else { - result = x + y; - suChinese.append(CNUMBERS[x]); - suChinese.append("+"); - suChinese.append(CNUMBERS[y]); - } - suChinese.append("=?@" + result); - return suChinese.toString(); - } -} \ No newline at end of file diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/MyBatisConfig.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/MyBatisConfig.java deleted file mode 100644 index 31387ee6..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/MyBatisConfig.java +++ /dev/null @@ -1,110 +0,0 @@ -package com.ruoyi.framework.config; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import javax.sql.DataSource; - -import org.apache.ibatis.io.VFS; -import org.apache.ibatis.session.SqlSessionFactory; -import org.mybatis.spring.SqlSessionFactoryBean; -import org.mybatis.spring.boot.autoconfigure.SpringBootVFS; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.core.env.Environment; -import org.springframework.core.io.DefaultResourceLoader; -import org.springframework.core.io.Resource; -import org.springframework.core.io.support.PathMatchingResourcePatternResolver; -import org.springframework.core.io.support.ResourcePatternResolver; -import org.springframework.core.type.classreading.CachingMetadataReaderFactory; -import org.springframework.core.type.classreading.MetadataReader; -import org.springframework.core.type.classreading.MetadataReaderFactory; -import org.springframework.util.ClassUtils; -import com.ruoyi.common.utils.StringUtils; - -/** - * Mybatis支持*匹配扫描包 - * - * @author ruoyi - */ -@Configuration -public class MyBatisConfig { - @Autowired - private Environment env; - - static final String DEFAULT_RESOURCE_PATTERN = "**/*.class"; - - public static String setTypeAliasesPackage(String typeAliasesPackage) { - ResourcePatternResolver resolver = (ResourcePatternResolver) new PathMatchingResourcePatternResolver(); - MetadataReaderFactory metadataReaderFactory = new CachingMetadataReaderFactory(resolver); - List allResult = new ArrayList(); - try { - for (String aliasesPackage : typeAliasesPackage.split(",")) { - List result = new ArrayList(); - aliasesPackage = ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX - + ClassUtils.convertClassNameToResourcePath(aliasesPackage.trim()) + "/" + DEFAULT_RESOURCE_PATTERN; - Resource[] resources = resolver.getResources(aliasesPackage); - if (resources != null && resources.length > 0) { - MetadataReader metadataReader = null; - for (Resource resource : resources) { - if (resource.isReadable()) { - metadataReader = metadataReaderFactory.getMetadataReader(resource); - try { - result.add(Class.forName(metadataReader.getClassMetadata().getClassName()).getPackage().getName()); - } catch (ClassNotFoundException e) { - e.printStackTrace(); - } - } - } - } - if (result.size() > 0) { - HashSet hashResult = new HashSet(result); - allResult.addAll(hashResult); - } - } - if (allResult.size() > 0) { - typeAliasesPackage = String.join(",", (String[]) allResult.toArray(new String[0])); - } else { - throw new RuntimeException("mybatis typeAliasesPackage 路径扫描错误,参数typeAliasesPackage:" + typeAliasesPackage + "未找到任何包"); - } - } catch (IOException e) { - e.printStackTrace(); - } - return typeAliasesPackage; - } - - public Resource[] resolveMapperLocations(String[] mapperLocations) { - ResourcePatternResolver resourceResolver = new PathMatchingResourcePatternResolver(); - List resources = new ArrayList(); - if (mapperLocations != null) { - for (String mapperLocation : mapperLocations) { - try { - Resource[] mappers = resourceResolver.getResources(mapperLocation); - resources.addAll(Arrays.asList(mappers)); - } catch (IOException e) { - // ignore - } - } - } - return resources.toArray(new Resource[resources.size()]); - } - - @Bean - public SqlSessionFactory sqlSessionFactory(DataSource dataSource) throws Exception { - String typeAliasesPackage = env.getProperty("mybatis.typeAliasesPackage"); - String mapperLocations = env.getProperty("mybatis.mapperLocations"); - String configLocation = env.getProperty("mybatis.configLocation"); - typeAliasesPackage = setTypeAliasesPackage(typeAliasesPackage); - VFS.addImplClass(SpringBootVFS.class); - - final SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean(); - sessionFactory.setDataSource(dataSource); - sessionFactory.setTypeAliasesPackage(typeAliasesPackage); - sessionFactory.setMapperLocations(resolveMapperLocations(StringUtils.split(mapperLocations, ","))); - sessionFactory.setConfigLocation(new DefaultResourceLoader().getResource(configLocation)); - return sessionFactory.getObject(); - } -} \ No newline at end of file diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/RedisConfig.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/RedisConfig.java deleted file mode 100644 index a55670e9..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/RedisConfig.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.ruoyi.framework.config; - -import org.springframework.cache.annotation.CachingConfigurerSupport; -import org.springframework.cache.annotation.EnableCaching; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.data.redis.connection.RedisConnectionFactory; -import org.springframework.data.redis.core.RedisTemplate; -import org.springframework.data.redis.serializer.StringRedisSerializer; -import com.fasterxml.jackson.annotation.JsonAutoDetect; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.PropertyAccessor; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.jsontype.impl.LaissezFaireSubTypeValidator; - -/** - * redis配置 - * - * @author ruoyi - */ -@Configuration -@EnableCaching -public class RedisConfig extends CachingConfigurerSupport { - @Bean - @SuppressWarnings(value = {"unchecked", "rawtypes"}) - public RedisTemplate redisTemplate(RedisConnectionFactory connectionFactory) { - RedisTemplate template = new RedisTemplate<>(); - template.setConnectionFactory(connectionFactory); - - FastJson2JsonRedisSerializer serializer = new FastJson2JsonRedisSerializer(Object.class); - - ObjectMapper mapper = new ObjectMapper(); - mapper.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY); - mapper.activateDefaultTyping(LaissezFaireSubTypeValidator.instance, ObjectMapper.DefaultTyping.NON_FINAL, JsonTypeInfo.As.PROPERTY); - serializer.setObjectMapper(mapper); - - template.setValueSerializer(serializer); - // 使用StringRedisSerializer来序列化和反序列化redis的key值 - template.setKeySerializer(new StringRedisSerializer()); - template.afterPropertiesSet(); - return template; - } -} diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java deleted file mode 100644 index 80b91dce..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ResourcesConfig.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.ruoyi.framework.config; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.web.cors.CorsConfiguration; -import org.springframework.web.cors.UrlBasedCorsConfigurationSource; -import org.springframework.web.filter.CorsFilter; -import org.springframework.web.servlet.config.annotation.InterceptorRegistry; -import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; -import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; -import com.ruoyi.common.config.RuoYiConfig; -import com.ruoyi.common.constant.Constants; -import com.ruoyi.framework.interceptor.RepeatSubmitInterceptor; - -/** - * 通用配置 - * - * @author ruoyi - */ -@Configuration -public class ResourcesConfig implements WebMvcConfigurer { - @Autowired - private RepeatSubmitInterceptor repeatSubmitInterceptor; - - @Override - public void addResourceHandlers(ResourceHandlerRegistry registry) { - /** 本地文件上传路径 */ - registry.addResourceHandler(Constants.RESOURCE_PREFIX + "/**").addResourceLocations("file:" + RuoYiConfig.getProfile() + "/"); - - /** swagger配置 */ - registry.addResourceHandler("swagger-ui.html").addResourceLocations("classpath:/META-INF/resources/"); - registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/"); - } - - /** - * 自定义拦截规则 - */ - @Override - public void addInterceptors(InterceptorRegistry registry) { - registry.addInterceptor(repeatSubmitInterceptor).addPathPatterns("/**"); - } - - /** - * 跨域配置 - */ - @Bean - public CorsFilter corsFilter() { - UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); - CorsConfiguration config = new CorsConfiguration(); - config.setAllowCredentials(true); - // 设置访问源地址 - config.addAllowedOrigin("*"); - // 设置访问源请求头 - config.addAllowedHeader("*"); - // 设置访问源请求方法 - config.addAllowedMethod("*"); - // 对接口配置跨域设置 - source.registerCorsConfiguration("/**", config); - return new CorsFilter(source); - } -} \ No newline at end of file diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java deleted file mode 100644 index 64c1a5d8..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java +++ /dev/null @@ -1,141 +0,0 @@ -package com.ruoyi.framework.config; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Bean; -import org.springframework.http.HttpMethod; -import org.springframework.security.authentication.AuthenticationManager; -import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; -import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; -import org.springframework.security.config.annotation.web.builders.HttpSecurity; -import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; -import org.springframework.security.config.http.SessionCreationPolicy; -import org.springframework.security.core.userdetails.UserDetailsService; -import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; -import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; -import org.springframework.security.web.authentication.logout.LogoutFilter; -import org.springframework.web.filter.CorsFilter; -import com.ruoyi.framework.security.filter.JwtAuthenticationTokenFilter; -import com.ruoyi.framework.security.handle.AuthenticationEntryPointImpl; -import com.ruoyi.framework.security.handle.LogoutSuccessHandlerImpl; - -/** - * spring security配置 - * - * @author ruoyi - */ -@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true) -public class SecurityConfig extends WebSecurityConfigurerAdapter { - /** - * 自定义用户认证逻辑 - */ - @Autowired - private UserDetailsService userDetailsService; - - /** - * 认证失败处理类 - */ - @Autowired - private AuthenticationEntryPointImpl unauthorizedHandler; - - /** - * 退出处理类 - */ - @Autowired - private LogoutSuccessHandlerImpl logoutSuccessHandler; - - /** - * token认证过滤器 - */ - @Autowired - private JwtAuthenticationTokenFilter authenticationTokenFilter; - - /** - * 跨域过滤器 - */ - @Autowired - private CorsFilter corsFilter; - - /** - * 解决 无法直接注入 AuthenticationManager - * - * @return - * @throws Exception - */ - @Bean - @Override - public AuthenticationManager authenticationManagerBean() throws Exception { - return super.authenticationManagerBean(); - } - - /** - * anyRequest | 匹配所有请求路径 - * access | SpringEl表达式结果为true时可以访问 - * anonymous | 匿名可以访问 - * denyAll | 用户不能访问 - * fullyAuthenticated | 用户完全认证可以访问(非remember-me下自动登录) - * hasAnyAuthority | 如果有参数,参数表示权限,则其中任何一个权限可以访问 - * hasAnyRole | 如果有参数,参数表示角色,则其中任何一个角色可以访问 - * hasAuthority | 如果有参数,参数表示权限,则其权限可以访问 - * hasIpAddress | 如果有参数,参数表示IP地址,如果用户IP和参数匹配,则可以访问 - * hasRole | 如果有参数,参数表示角色,则其角色可以访问 - * permitAll | 用户可以任意访问 - * rememberMe | 允许通过remember-me登录的用户访问 - * authenticated | 用户登录后可访问 - */ - @Override - protected void configure(HttpSecurity httpSecurity) throws Exception { - httpSecurity - // CSRF禁用,因为不使用session - .csrf().disable() - // 认证失败处理类 - .exceptionHandling().authenticationEntryPoint(unauthorizedHandler).and() - // 基于token,所以不需要session - .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and() - // 过滤请求 - .authorizeRequests() - // 对于登录login 验证码captchaImage 允许匿名访问 - .antMatchers("/wxLogin", "/login", "/captchaImage", "/system/user/register").anonymous() - .antMatchers( - HttpMethod.GET, - "/*.html", - "/**/*.html", - "/**/*.css", - "/**/*.js" - ).permitAll() - .antMatchers("/profile/**").anonymous() - .antMatchers("/common/download**").anonymous() - .antMatchers("/common/download/resource**").anonymous() - .antMatchers("/swagger-ui.html").anonymous() - .antMatchers("/swagger-resources/**").anonymous() - .antMatchers("/webjars/**").anonymous() - .antMatchers("/*/api-docs").anonymous() - .antMatchers("/druid/**").anonymous() - // 除上面外的所有请求全部需要鉴权认证 - .anyRequest().authenticated() - .and() - .headers().frameOptions().disable(); - httpSecurity.logout().logoutUrl("/logout").logoutSuccessHandler(logoutSuccessHandler); - // 添加JWT filter - httpSecurity.addFilterBefore(authenticationTokenFilter, UsernamePasswordAuthenticationFilter.class); - // 添加CORS filter - httpSecurity.addFilterBefore(corsFilter, JwtAuthenticationTokenFilter.class); - httpSecurity.addFilterBefore(corsFilter, LogoutFilter.class); - } - - - /** - * 强散列哈希加密实现 - */ - @Bean - public BCryptPasswordEncoder bCryptPasswordEncoder() { - return new BCryptPasswordEncoder(); - } - - /** - * 身份认证接口 - */ - @Override - protected void configure(AuthenticationManagerBuilder auth) throws Exception { - auth.userDetailsService(userDetailsService).passwordEncoder(bCryptPasswordEncoder()); - } -} diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ServerConfig.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ServerConfig.java deleted file mode 100644 index d50be60a..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ServerConfig.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.ruoyi.framework.config; - -import javax.servlet.http.HttpServletRequest; - -import org.springframework.stereotype.Component; -import com.ruoyi.common.utils.ServletUtils; - -/** - * 服务相关配置 - * - * @author ruoyi - */ -@Component -public class ServerConfig { - /** - * 获取完整的请求路径,包括:域名,端口,上下文访问路径 - * - * @return 服务地址 - */ - public String getUrl() { - HttpServletRequest request = ServletUtils.getRequest(); - return getDomain(request); - } - - public static String getDomain(HttpServletRequest request) { - StringBuffer url = request.getRequestURL(); - String contextPath = request.getServletContext().getContextPath(); - return url.delete(url.length() - request.getRequestURI().length(), url.length()).append(contextPath).toString(); - } -} diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ThreadPoolConfig.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ThreadPoolConfig.java deleted file mode 100644 index dac6f6e8..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/ThreadPoolConfig.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.ruoyi.framework.config; - -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.ScheduledThreadPoolExecutor; -import java.util.concurrent.ThreadPoolExecutor; - -import org.apache.commons.lang3.concurrent.BasicThreadFactory; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; -import com.ruoyi.common.utils.Threads; - -/** - * 线程池配置 - * - * @author ruoyi - **/ -@Configuration -public class ThreadPoolConfig { - // 核心线程池大小 - private int corePoolSize = 50; - - // 最大可创建的线程数 - private int maxPoolSize = 200; - - // 队列最大长度 - private int queueCapacity = 1000; - - // 线程池维护线程所允许的空闲时间 - private int keepAliveSeconds = 300; - - @Bean(name = "threadPoolTaskExecutor") - public ThreadPoolTaskExecutor threadPoolTaskExecutor() { - ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); - executor.setMaxPoolSize(maxPoolSize); - executor.setCorePoolSize(corePoolSize); - executor.setQueueCapacity(queueCapacity); - executor.setKeepAliveSeconds(keepAliveSeconds); - // 线程池对拒绝任务(无线程可用)的处理策略 - executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); - return executor; - } - - /** - * 执行周期性或定时任务 - */ - @Bean(name = "scheduledExecutorService") - protected ScheduledExecutorService scheduledExecutorService() { - return new ScheduledThreadPoolExecutor(corePoolSize, - new BasicThreadFactory.Builder().namingPattern("schedule-pool-%d").daemon(true).build()) { - @Override - protected void afterExecute(Runnable r, Throwable t) { - super.afterExecute(r, t); - Threads.printException(r, t); - } - }; - } -} diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/properties/DruidProperties.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/properties/DruidProperties.java deleted file mode 100644 index 33983900..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/config/properties/DruidProperties.java +++ /dev/null @@ -1,75 +0,0 @@ -package com.ruoyi.framework.config.properties; - -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Configuration; -import com.alibaba.druid.pool.DruidDataSource; - -/** - * druid 配置属性 - * - * @author ruoyi - */ -@Configuration -public class DruidProperties { - @Value("${spring.datasource.druid.initialSize}") - private int initialSize; - - @Value("${spring.datasource.druid.minIdle}") - private int minIdle; - - @Value("${spring.datasource.druid.maxActive}") - private int maxActive; - - @Value("${spring.datasource.druid.maxWait}") - private int maxWait; - - @Value("${spring.datasource.druid.timeBetweenEvictionRunsMillis}") - private int timeBetweenEvictionRunsMillis; - - @Value("${spring.datasource.druid.minEvictableIdleTimeMillis}") - private int minEvictableIdleTimeMillis; - - @Value("${spring.datasource.druid.maxEvictableIdleTimeMillis}") - private int maxEvictableIdleTimeMillis; - - @Value("${spring.datasource.druid.validationQuery}") - private String validationQuery; - - @Value("${spring.datasource.druid.testWhileIdle}") - private boolean testWhileIdle; - - @Value("${spring.datasource.druid.testOnBorrow}") - private boolean testOnBorrow; - - @Value("${spring.datasource.druid.testOnReturn}") - private boolean testOnReturn; - - public DruidDataSource dataSource(DruidDataSource datasource) { - /** 配置初始化大小、最小、最大 */ - datasource.setInitialSize(initialSize); - datasource.setMaxActive(maxActive); - datasource.setMinIdle(minIdle); - - /** 配置获取连接等待超时的时间 */ - datasource.setMaxWait(maxWait); - - /** 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 */ - datasource.setTimeBetweenEvictionRunsMillis(timeBetweenEvictionRunsMillis); - - /** 配置一个连接在池中最小、最大生存的时间,单位是毫秒 */ - datasource.setMinEvictableIdleTimeMillis(minEvictableIdleTimeMillis); - datasource.setMaxEvictableIdleTimeMillis(maxEvictableIdleTimeMillis); - - /** - * 用来检测连接是否有效的sql,要求是一个查询语句,常用select 'x'。如果validationQuery为null,testOnBorrow、testOnReturn、testWhileIdle都不会起作用。 - */ - datasource.setValidationQuery(validationQuery); - /** 建议配置为true,不影响性能,并且保证安全性。申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效。 */ - datasource.setTestWhileIdle(testWhileIdle); - /** 申请连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。 */ - datasource.setTestOnBorrow(testOnBorrow); - /** 归还连接时执行validationQuery检测连接是否有效,做了这个配置会降低性能。 */ - datasource.setTestOnReturn(testOnReturn); - return datasource; - } -} diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/datasource/DynamicDataSource.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/datasource/DynamicDataSource.java deleted file mode 100644 index 8bd0f04a..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/datasource/DynamicDataSource.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.ruoyi.framework.datasource; - -import java.util.Map; -import javax.sql.DataSource; - -import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource; - -/** - * 动态数据源 - * - * @author ruoyi - */ -public class DynamicDataSource extends AbstractRoutingDataSource { - public DynamicDataSource(DataSource defaultTargetDataSource, Map targetDataSources) { - super.setDefaultTargetDataSource(defaultTargetDataSource); - super.setTargetDataSources(targetDataSources); - super.afterPropertiesSet(); - } - - @Override - protected Object determineCurrentLookupKey() { - return DynamicDataSourceContextHolder.getDataSourceType(); - } -} \ No newline at end of file diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/datasource/DynamicDataSourceContextHolder.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/datasource/DynamicDataSourceContextHolder.java deleted file mode 100644 index 37a5f8e5..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/datasource/DynamicDataSourceContextHolder.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.ruoyi.framework.datasource; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * 数据源切换处理 - * - * @author ruoyi - */ -public class DynamicDataSourceContextHolder { - public static final Logger log = LoggerFactory.getLogger(DynamicDataSourceContextHolder.class); - - /** - * 使用ThreadLocal维护变量,ThreadLocal为每个使用该变量的线程提供独立的变量副本, - * 所以每一个线程都可以独立地改变自己的副本,而不会影响其它线程所对应的副本。 - */ - private static final ThreadLocal CONTEXT_HOLDER = new ThreadLocal<>(); - - /** - * 设置数据源的变量 - */ - public static void setDataSourceType(String dsType) { - log.info("切换到{}数据源", dsType); - CONTEXT_HOLDER.set(dsType); - } - - /** - * 获得数据源的变量 - */ - public static String getDataSourceType() { - return CONTEXT_HOLDER.get(); - } - - /** - * 清空数据源变量 - */ - public static void clearDataSourceType() { - CONTEXT_HOLDER.remove(); - } -} diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/interceptor/RepeatSubmitInterceptor.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/interceptor/RepeatSubmitInterceptor.java deleted file mode 100644 index e07e6de6..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/interceptor/RepeatSubmitInterceptor.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.ruoyi.framework.interceptor; - -import java.lang.reflect.Method; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.springframework.stereotype.Component; -import org.springframework.web.method.HandlerMethod; -import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; -import com.alibaba.fastjson.JSONObject; -import com.ruoyi.common.annotation.RepeatSubmit; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.utils.ServletUtils; - -/** - * 防止重复提交拦截器 - * - * @author ruoyi - */ -@Component -public abstract class RepeatSubmitInterceptor extends HandlerInterceptorAdapter { - @Override - public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { - if (handler instanceof HandlerMethod) { - HandlerMethod handlerMethod = (HandlerMethod) handler; - Method method = handlerMethod.getMethod(); - RepeatSubmit annotation = method.getAnnotation(RepeatSubmit.class); - if (annotation != null) { - if (this.isRepeatSubmit(request)) { - AjaxResult ajaxResult = AjaxResult.error("不允许重复提交,请稍后再试"); - ServletUtils.renderString(response, JSONObject.toJSONString(ajaxResult)); - return false; - } - } - return true; - } else { - return super.preHandle(request, response, handler); - } - } - - /** - * 验证是否重复提交由子类实现具体的防重复提交的规则 - * - * @param request - * @return - * @throws Exception - */ - public abstract boolean isRepeatSubmit(HttpServletRequest request); -} diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/interceptor/impl/SameUrlDataInterceptor.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/interceptor/impl/SameUrlDataInterceptor.java deleted file mode 100644 index 3386b411..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/interceptor/impl/SameUrlDataInterceptor.java +++ /dev/null @@ -1,114 +0,0 @@ -package com.ruoyi.framework.interceptor.impl; - -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.servlet.http.HttpServletRequest; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Component; -import com.alibaba.fastjson.JSONObject; -import com.ruoyi.common.constant.Constants; -import com.ruoyi.common.core.redis.RedisCache; -import com.ruoyi.common.filter.RepeatedlyRequestWrapper; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.common.utils.http.HttpHelper; -import com.ruoyi.framework.interceptor.RepeatSubmitInterceptor; - -/** - * 判断请求url和数据是否和上一次相同, - * 如果和上次相同,则是重复提交表单。 有效时间为10秒内。 - * - * @author ruoyi - */ -@Component -public class SameUrlDataInterceptor extends RepeatSubmitInterceptor { - public final String REPEAT_PARAMS = "repeatParams"; - - public final String REPEAT_TIME = "repeatTime"; - - // 令牌自定义标识 - @Value("${token.header}") - private String header; - - @Autowired - private RedisCache redisCache; - - /** - * 间隔时间,单位:秒 默认10秒 - *

- * 两次相同参数的请求,如果间隔时间大于该参数,系统不会认定为重复提交的数据 - */ - private int intervalTime = 10; - - public void setIntervalTime(int intervalTime) { - this.intervalTime = intervalTime; - } - - @SuppressWarnings("unchecked") - @Override - public boolean isRepeatSubmit(HttpServletRequest request) { - String nowParams = ""; - if (request instanceof RepeatedlyRequestWrapper) { - RepeatedlyRequestWrapper repeatedlyRequest = (RepeatedlyRequestWrapper) request; - nowParams = HttpHelper.getBodyString(repeatedlyRequest); - } - - // body参数为空,获取Parameter的数据 - if (StringUtils.isEmpty(nowParams)) { - nowParams = JSONObject.toJSONString(request.getParameterMap()); - } - Map nowDataMap = new HashMap(); - nowDataMap.put(REPEAT_PARAMS, nowParams); - nowDataMap.put(REPEAT_TIME, System.currentTimeMillis()); - - // 请求地址(作为存放cache的key值) - String url = request.getRequestURI(); - - // 唯一值(没有消息头则使用请求地址) - String submitKey = request.getHeader(header); - if (StringUtils.isEmpty(submitKey)) { - submitKey = url; - } - - // 唯一标识(指定key + 消息头) - String cache_repeat_key = Constants.REPEAT_SUBMIT_KEY + submitKey; - - Object sessionObj = redisCache.getCacheObject(cache_repeat_key); - if (sessionObj != null) { - Map sessionMap = (Map) sessionObj; - if (sessionMap.containsKey(url)) { - Map preDataMap = (Map) sessionMap.get(url); - if (compareParams(nowDataMap, preDataMap) && compareTime(nowDataMap, preDataMap)) { - return true; - } - } - } - Map cacheMap = new HashMap(); - cacheMap.put(url, nowDataMap); - redisCache.setCacheObject(cache_repeat_key, cacheMap, intervalTime, TimeUnit.SECONDS); - return false; - } - - /** - * 判断参数是否相同 - */ - private boolean compareParams(Map nowMap, Map preMap) { - String nowParams = (String) nowMap.get(REPEAT_PARAMS); - String preParams = (String) preMap.get(REPEAT_PARAMS); - return nowParams.equals(preParams); - } - - /** - * 判断两次间隔时间 - */ - private boolean compareTime(Map nowMap, Map preMap) { - long time1 = (Long) nowMap.get(REPEAT_TIME); - long time2 = (Long) preMap.get(REPEAT_TIME); - if ((time1 - time2) < (this.intervalTime * 1000)) { - return true; - } - return false; - } -} diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/manager/AsyncManager.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/manager/AsyncManager.java deleted file mode 100644 index e8a8e84c..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/manager/AsyncManager.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.ruoyi.framework.manager; - -import java.util.TimerTask; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.TimeUnit; - -import com.ruoyi.common.utils.Threads; -import com.ruoyi.common.utils.spring.SpringUtils; - -/** - * 异步任务管理器 - * - * @author ruoyi - */ -public class AsyncManager { - /** - * 操作延迟10毫秒 - */ - private final int OPERATE_DELAY_TIME = 10; - - /** - * 异步操作任务调度线程池 - */ - private ScheduledExecutorService executor = SpringUtils.getBean("scheduledExecutorService"); - - /** - * 单例模式 - */ - private AsyncManager() { - } - - private static AsyncManager me = new AsyncManager(); - - public static AsyncManager me() { - return me; - } - - /** - * 执行任务 - * - * @param task 任务 - */ - public void execute(TimerTask task) { - executor.schedule(task, OPERATE_DELAY_TIME, TimeUnit.MILLISECONDS); - } - - /** - * 停止任务线程池 - */ - public void shutdown() { - Threads.shutdownAndAwaitTermination(executor); - } -} diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/manager/ShutdownManager.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/manager/ShutdownManager.java deleted file mode 100644 index 0d6a67b1..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/manager/ShutdownManager.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.ruoyi.framework.manager; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.stereotype.Component; - -import javax.annotation.PreDestroy; - -/** - * 确保应用退出时能关闭后台线程 - * - * @author ruoyi - */ -@Component -public class ShutdownManager { - private static final Logger logger = LoggerFactory.getLogger("sys-user"); - - @PreDestroy - public void destroy() { - shutdownAsyncManager(); - } - - /** - * 停止异步执行任务 - */ - private void shutdownAsyncManager() { - try { - logger.info("====关闭后台任务任务线程池===="); - AsyncManager.me().shutdown(); - } catch (Exception e) { - logger.error(e.getMessage(), e); - } - } -} diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/manager/factory/AsyncFactory.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/manager/factory/AsyncFactory.java deleted file mode 100644 index a94953b9..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/manager/factory/AsyncFactory.java +++ /dev/null @@ -1,92 +0,0 @@ -package com.ruoyi.framework.manager.factory; - -import java.util.TimerTask; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import com.ruoyi.common.constant.Constants; -import com.ruoyi.common.utils.LogUtils; -import com.ruoyi.common.utils.ServletUtils; -import com.ruoyi.common.utils.ip.AddressUtils; -import com.ruoyi.common.utils.ip.IpUtils; -import com.ruoyi.common.utils.spring.SpringUtils; -import com.ruoyi.system.domain.SysLogininfor; -import com.ruoyi.system.domain.SysOperLog; -import com.ruoyi.system.service.ISysLogininforService; -import com.ruoyi.system.service.ISysOperLogService; -import eu.bitwalker.useragentutils.UserAgent; - -/** - * 异步工厂(产生任务用) - * - * @author ruoyi - */ -public class AsyncFactory { - private static final Logger sys_user_logger = LoggerFactory.getLogger("sys-user"); - - /** - * 记录登录信息 - * - * @param username 用户名 - * @param status 状态 - * @param message 消息 - * @param args 列表 - * @return 任务task - */ - public static TimerTask recordLogininfor(final String username, final String status, final String message, - final Object... args) { - final UserAgent userAgent = UserAgent.parseUserAgentString(ServletUtils.getRequest().getHeader("User-Agent")); - final String ip = IpUtils.getIpAddr(ServletUtils.getRequest()); - return new TimerTask() { - @Override - public void run() { - String address = AddressUtils.getRealAddressByIP(ip); - StringBuilder s = new StringBuilder(); - s.append(LogUtils.getBlock(ip)); - s.append(address); - s.append(LogUtils.getBlock(username)); - s.append(LogUtils.getBlock(status)); - s.append(LogUtils.getBlock(message)); - // 打印信息到日志 - sys_user_logger.info(s.toString(), args); - // 获取客户端操作系统 - String os = userAgent.getOperatingSystem().getName(); - // 获取客户端浏览器 - String browser = userAgent.getBrowser().getName(); - // 封装对象 - SysLogininfor logininfor = new SysLogininfor(); - logininfor.setUserName(username); - logininfor.setIpaddr(ip); - logininfor.setLoginLocation(address); - logininfor.setBrowser(browser); - logininfor.setOs(os); - logininfor.setMsg(message); - // 日志状态 - if (Constants.LOGIN_SUCCESS.equals(status) || Constants.LOGOUT.equals(status)) { - logininfor.setStatus(Constants.SUCCESS); - } else if (Constants.LOGIN_FAIL.equals(status)) { - logininfor.setStatus(Constants.FAIL); - } - // 插入数据 - SpringUtils.getBean(ISysLogininforService.class).insertLogininfor(logininfor); - } - }; - } - - /** - * 操作日志记录 - * - * @param operLog 操作日志信息 - * @return 任务task - */ - public static TimerTask recordOper(final SysOperLog operLog) { - return new TimerTask() { - @Override - public void run() { - // 远程查询操作地点 - operLog.setOperLocation(AddressUtils.getRealAddressByIP(operLog.getOperIp())); - SpringUtils.getBean(ISysOperLogService.class).insertOperlog(operLog); - } - }; - } -} diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/security/filter/JwtAuthenticationTokenFilter.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/security/filter/JwtAuthenticationTokenFilter.java deleted file mode 100644 index 58f480b2..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/security/filter/JwtAuthenticationTokenFilter.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.ruoyi.framework.security.filter; - -import java.io.IOException; -import javax.servlet.FilterChain; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; -import org.springframework.security.core.context.SecurityContextHolder; -import org.springframework.security.web.authentication.WebAuthenticationDetailsSource; -import org.springframework.stereotype.Component; -import org.springframework.web.filter.OncePerRequestFilter; -import com.ruoyi.common.core.domain.model.LoginUser; -import com.ruoyi.common.utils.SecurityUtils; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.framework.web.service.TokenService; - -/** - * token过滤器 验证token有效性 - * - * @author ruoyi - */ -@Component -public class JwtAuthenticationTokenFilter extends OncePerRequestFilter { - @Autowired - private TokenService tokenService; - - @Override - protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain) - throws ServletException, IOException { - LoginUser loginUser = tokenService.getLoginUser(request); - if (StringUtils.isNotNull(loginUser) && StringUtils.isNull(SecurityUtils.getAuthentication())) { - tokenService.verifyToken(loginUser); - UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(loginUser, null, loginUser.getAuthorities()); - authenticationToken.setDetails(new WebAuthenticationDetailsSource().buildDetails(request)); - SecurityContextHolder.getContext().setAuthentication(authenticationToken); - } - chain.doFilter(request, response); - } -} diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/security/handle/AuthenticationEntryPointImpl.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/security/handle/AuthenticationEntryPointImpl.java deleted file mode 100644 index a506100c..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/security/handle/AuthenticationEntryPointImpl.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.ruoyi.framework.security.handle; - -import java.io.IOException; -import java.io.Serializable; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.springframework.security.core.AuthenticationException; -import org.springframework.security.web.AuthenticationEntryPoint; -import org.springframework.stereotype.Component; -import com.alibaba.fastjson.JSON; -import com.ruoyi.common.constant.HttpStatus; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.utils.ServletUtils; -import com.ruoyi.common.utils.StringUtils; - -/** - * 认证失败处理类 返回未授权 - * - * @author ruoyi - */ -@Component -public class AuthenticationEntryPointImpl implements AuthenticationEntryPoint, Serializable { - private static final long serialVersionUID = -8970718410437077606L; - - @Override - public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException e) - throws IOException { - int code = HttpStatus.UNAUTHORIZED; - String msg = StringUtils.format("请求访问:{},认证失败,无法访问系统资源", request.getRequestURI()); - ServletUtils.renderString(response, JSON.toJSONString(AjaxResult.error(code, msg))); - } -} diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/security/handle/LogoutSuccessHandlerImpl.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/security/handle/LogoutSuccessHandlerImpl.java deleted file mode 100644 index 6df16a6b..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/security/handle/LogoutSuccessHandlerImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.ruoyi.framework.security.handle; - -import java.io.IOException; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Configuration; -import org.springframework.security.core.Authentication; -import org.springframework.security.web.authentication.logout.LogoutSuccessHandler; -import com.alibaba.fastjson.JSON; -import com.ruoyi.common.constant.Constants; -import com.ruoyi.common.constant.HttpStatus; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.core.domain.model.LoginUser; -import com.ruoyi.common.utils.ServletUtils; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.framework.manager.AsyncManager; -import com.ruoyi.framework.manager.factory.AsyncFactory; -import com.ruoyi.framework.web.service.TokenService; - -/** - * 自定义退出处理类 返回成功 - * - * @author ruoyi - */ -@Configuration -public class LogoutSuccessHandlerImpl implements LogoutSuccessHandler { - @Autowired - private TokenService tokenService; - - /** - * 退出处理 - * - * @return - */ - @Override - public void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) - throws IOException, ServletException { - LoginUser loginUser = tokenService.getLoginUser(request); - if (StringUtils.isNotNull(loginUser)) { - String userName = loginUser.getUsername(); - // 删除用户缓存记录 - tokenService.delLoginUser(loginUser.getToken()); - // 记录用户退出日志 - AsyncManager.me().execute(AsyncFactory.recordLogininfor(userName, Constants.LOGOUT, "退出成功")); - } - ServletUtils.renderString(response, JSON.toJSONString(AjaxResult.error(HttpStatus.SUCCESS, "退出成功"))); - } -} diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/Server.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/Server.java deleted file mode 100644 index b2fc3d95..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/Server.java +++ /dev/null @@ -1,215 +0,0 @@ -package com.ruoyi.framework.web.domain; - -import java.net.UnknownHostException; -import java.util.LinkedList; -import java.util.List; -import java.util.Properties; - -import com.ruoyi.common.utils.Arith; -import com.ruoyi.common.utils.ip.IpUtils; -import com.ruoyi.framework.web.domain.server.Cpu; -import com.ruoyi.framework.web.domain.server.Jvm; -import com.ruoyi.framework.web.domain.server.Mem; -import com.ruoyi.framework.web.domain.server.Sys; -import com.ruoyi.framework.web.domain.server.SysFile; -import oshi.SystemInfo; -import oshi.hardware.CentralProcessor; -import oshi.hardware.CentralProcessor.TickType; -import oshi.hardware.GlobalMemory; -import oshi.hardware.HardwareAbstractionLayer; -import oshi.software.os.FileSystem; -import oshi.software.os.OSFileStore; -import oshi.software.os.OperatingSystem; -import oshi.util.Util; - -/** - * 服务器相关信息 - * - * @author ruoyi - */ -public class Server { - private static final int OSHI_WAIT_SECOND = 1000; - - /** - * CPU相关信息 - */ - private Cpu cpu = new Cpu(); - - /** - * 內存相关信息 - */ - private Mem mem = new Mem(); - - /** - * JVM相关信息 - */ - private Jvm jvm = new Jvm(); - - /** - * 服务器相关信息 - */ - private Sys sys = new Sys(); - - /** - * 磁盘相关信息 - */ - private List sysFiles = new LinkedList(); - - public Cpu getCpu() { - return cpu; - } - - public void setCpu(Cpu cpu) { - this.cpu = cpu; - } - - public Mem getMem() { - return mem; - } - - public void setMem(Mem mem) { - this.mem = mem; - } - - public Jvm getJvm() { - return jvm; - } - - public void setJvm(Jvm jvm) { - this.jvm = jvm; - } - - public Sys getSys() { - return sys; - } - - public void setSys(Sys sys) { - this.sys = sys; - } - - public List getSysFiles() { - return sysFiles; - } - - public void setSysFiles(List sysFiles) { - this.sysFiles = sysFiles; - } - - public void copyTo() throws Exception { - SystemInfo si = new SystemInfo(); - HardwareAbstractionLayer hal = si.getHardware(); - - setCpuInfo(hal.getProcessor()); - - setMemInfo(hal.getMemory()); - - setSysInfo(); - - setJvmInfo(); - - setSysFiles(si.getOperatingSystem()); - } - - /** - * 设置CPU信息 - */ - private void setCpuInfo(CentralProcessor processor) { - // CPU信息 - long[] prevTicks = processor.getSystemCpuLoadTicks(); - Util.sleep(OSHI_WAIT_SECOND); - long[] ticks = processor.getSystemCpuLoadTicks(); - long nice = ticks[TickType.NICE.getIndex()] - prevTicks[TickType.NICE.getIndex()]; - long irq = ticks[TickType.IRQ.getIndex()] - prevTicks[TickType.IRQ.getIndex()]; - long softirq = ticks[TickType.SOFTIRQ.getIndex()] - prevTicks[TickType.SOFTIRQ.getIndex()]; - long steal = ticks[TickType.STEAL.getIndex()] - prevTicks[TickType.STEAL.getIndex()]; - long cSys = ticks[TickType.SYSTEM.getIndex()] - prevTicks[TickType.SYSTEM.getIndex()]; - long user = ticks[TickType.USER.getIndex()] - prevTicks[TickType.USER.getIndex()]; - long iowait = ticks[TickType.IOWAIT.getIndex()] - prevTicks[TickType.IOWAIT.getIndex()]; - long idle = ticks[TickType.IDLE.getIndex()] - prevTicks[TickType.IDLE.getIndex()]; - long totalCpu = user + nice + cSys + idle + iowait + irq + softirq + steal; - cpu.setCpuNum(processor.getLogicalProcessorCount()); - cpu.setTotal(totalCpu); - cpu.setSys(cSys); - cpu.setUsed(user); - cpu.setWait(iowait); - cpu.setFree(idle); - } - - /** - * 设置内存信息 - */ - private void setMemInfo(GlobalMemory memory) { - mem.setTotal(memory.getTotal()); - mem.setUsed(memory.getTotal() - memory.getAvailable()); - mem.setFree(memory.getAvailable()); - } - - /** - * 设置服务器信息 - */ - private void setSysInfo() { - Properties props = System.getProperties(); - sys.setComputerName(IpUtils.getHostName()); - sys.setComputerIp(IpUtils.getHostIp()); - sys.setOsName(props.getProperty("os.name")); - sys.setOsArch(props.getProperty("os.arch")); - sys.setUserDir(props.getProperty("user.dir")); - } - - /** - * 设置Java虚拟机 - */ - private void setJvmInfo() throws UnknownHostException { - Properties props = System.getProperties(); - jvm.setTotal(Runtime.getRuntime().totalMemory()); - jvm.setMax(Runtime.getRuntime().maxMemory()); - jvm.setFree(Runtime.getRuntime().freeMemory()); - jvm.setVersion(props.getProperty("java.version")); - jvm.setHome(props.getProperty("java.home")); - } - - /** - * 设置磁盘信息 - */ - private void setSysFiles(OperatingSystem os) { - FileSystem fileSystem = os.getFileSystem(); - List fsArray = fileSystem.getFileStores(); - for (OSFileStore fs : fsArray) { - long free = fs.getUsableSpace(); - long total = fs.getTotalSpace(); - long used = total - free; - SysFile sysFile = new SysFile(); - sysFile.setDirName(fs.getMount()); - sysFile.setSysTypeName(fs.getType()); - sysFile.setTypeName(fs.getName()); - sysFile.setTotal(convertFileSize(total)); - sysFile.setFree(convertFileSize(free)); - sysFile.setUsed(convertFileSize(used)); - sysFile.setUsage(Arith.mul(Arith.div(used, total, 4), 100)); - sysFiles.add(sysFile); - } - } - - /** - * 字节转换 - * - * @param size 字节大小 - * @return 转换后值 - */ - public String convertFileSize(long size) { - long kb = 1024; - long mb = kb * 1024; - long gb = mb * 1024; - if (size >= gb) { - return String.format("%.1f GB", (float) size / gb); - } else if (size >= mb) { - float f = (float) size / mb; - return String.format(f > 100 ? "%.0f MB" : "%.1f MB", f); - } else if (size >= kb) { - float f = (float) size / kb; - return String.format(f > 100 ? "%.0f KB" : "%.1f KB", f); - } else { - return String.format("%d B", size); - } - } -} diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Cpu.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Cpu.java deleted file mode 100644 index 4878bbd3..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Cpu.java +++ /dev/null @@ -1,88 +0,0 @@ -package com.ruoyi.framework.web.domain.server; - -import com.ruoyi.common.utils.Arith; - -/** - * CPU相关信息 - * - * @author ruoyi - */ -public class Cpu { - /** - * 核心数 - */ - private int cpuNum; - - /** - * CPU总的使用率 - */ - private double total; - - /** - * CPU系统使用率 - */ - private double sys; - - /** - * CPU用户使用率 - */ - private double used; - - /** - * CPU当前等待率 - */ - private double wait; - - /** - * CPU当前空闲率 - */ - private double free; - - public int getCpuNum() { - return cpuNum; - } - - public void setCpuNum(int cpuNum) { - this.cpuNum = cpuNum; - } - - public double getTotal() { - return Arith.round(Arith.mul(total, 100), 2); - } - - public void setTotal(double total) { - this.total = total; - } - - public double getSys() { - return Arith.round(Arith.mul(sys / total, 100), 2); - } - - public void setSys(double sys) { - this.sys = sys; - } - - public double getUsed() { - return Arith.round(Arith.mul(used / total, 100), 2); - } - - public void setUsed(double used) { - this.used = used; - } - - public double getWait() { - return Arith.round(Arith.mul(wait / total, 100), 2); - } - - public void setWait(double wait) { - this.wait = wait; - } - - public double getFree() { - return Arith.round(Arith.mul(free / total, 100), 2); - } - - public void setFree(double free) { - this.free = free; - } -} diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Jvm.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Jvm.java deleted file mode 100644 index 62d043b1..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Jvm.java +++ /dev/null @@ -1,107 +0,0 @@ -package com.ruoyi.framework.web.domain.server; - -import java.lang.management.ManagementFactory; - -import com.ruoyi.common.utils.Arith; -import com.ruoyi.common.utils.DateUtils; - -/** - * JVM相关信息 - * - * @author ruoyi - */ -public class Jvm { - /** - * 当前JVM占用的内存总数(M) - */ - private double total; - - /** - * JVM最大可用内存总数(M) - */ - private double max; - - /** - * JVM空闲内存(M) - */ - private double free; - - /** - * JDK版本 - */ - private String version; - - /** - * JDK路径 - */ - private String home; - - public double getTotal() { - return Arith.div(total, (1024 * 1024), 2); - } - - public void setTotal(double total) { - this.total = total; - } - - public double getMax() { - return Arith.div(max, (1024 * 1024), 2); - } - - public void setMax(double max) { - this.max = max; - } - - public double getFree() { - return Arith.div(free, (1024 * 1024), 2); - } - - public void setFree(double free) { - this.free = free; - } - - public double getUsed() { - return Arith.div(total - free, (1024 * 1024), 2); - } - - public double getUsage() { - return Arith.mul(Arith.div(total - free, total, 4), 100); - } - - /** - * 获取JDK名称 - */ - public String getName() { - return ManagementFactory.getRuntimeMXBean().getVmName(); - } - - public String getVersion() { - return version; - } - - public void setVersion(String version) { - this.version = version; - } - - public String getHome() { - return home; - } - - public void setHome(String home) { - this.home = home; - } - - /** - * JDK启动时间 - */ - public String getStartTime() { - return DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, DateUtils.getServerStartDate()); - } - - /** - * JDK运行时间 - */ - public String getRunTime() { - return DateUtils.getDatePoor(DateUtils.getNowDate(), DateUtils.getServerStartDate()); - } -} diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Mem.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Mem.java deleted file mode 100644 index f065d819..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Mem.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.ruoyi.framework.web.domain.server; - -import com.ruoyi.common.utils.Arith; - -/** - * 內存相关信息 - * - * @author ruoyi - */ -public class Mem { - /** - * 内存总量 - */ - private double total; - - /** - * 已用内存 - */ - private double used; - - /** - * 剩余内存 - */ - private double free; - - public double getTotal() { - return Arith.div(total, (1024 * 1024 * 1024), 2); - } - - public void setTotal(long total) { - this.total = total; - } - - public double getUsed() { - return Arith.div(used, (1024 * 1024 * 1024), 2); - } - - public void setUsed(long used) { - this.used = used; - } - - public double getFree() { - return Arith.div(free, (1024 * 1024 * 1024), 2); - } - - public void setFree(long free) { - this.free = free; - } - - public double getUsage() { - return Arith.mul(Arith.div(used, total, 4), 100); - } -} diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Sys.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Sys.java deleted file mode 100644 index 7c3857ee..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/Sys.java +++ /dev/null @@ -1,73 +0,0 @@ -package com.ruoyi.framework.web.domain.server; - -/** - * 系统相关信息 - * - * @author ruoyi - */ -public class Sys { - /** - * 服务器名称 - */ - private String computerName; - - /** - * 服务器Ip - */ - private String computerIp; - - /** - * 项目路径 - */ - private String userDir; - - /** - * 操作系统 - */ - private String osName; - - /** - * 系统架构 - */ - private String osArch; - - public String getComputerName() { - return computerName; - } - - public void setComputerName(String computerName) { - this.computerName = computerName; - } - - public String getComputerIp() { - return computerIp; - } - - public void setComputerIp(String computerIp) { - this.computerIp = computerIp; - } - - public String getUserDir() { - return userDir; - } - - public void setUserDir(String userDir) { - this.userDir = userDir; - } - - public String getOsName() { - return osName; - } - - public void setOsName(String osName) { - this.osName = osName; - } - - public String getOsArch() { - return osArch; - } - - public void setOsArch(String osArch) { - this.osArch = osArch; - } -} diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/SysFile.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/SysFile.java deleted file mode 100644 index 0c4710a6..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/domain/server/SysFile.java +++ /dev/null @@ -1,99 +0,0 @@ -package com.ruoyi.framework.web.domain.server; - -/** - * 系统文件相关信息 - * - * @author ruoyi - */ -public class SysFile { - /** - * 盘符路径 - */ - private String dirName; - - /** - * 盘符类型 - */ - private String sysTypeName; - - /** - * 文件类型 - */ - private String typeName; - - /** - * 总大小 - */ - private String total; - - /** - * 剩余大小 - */ - private String free; - - /** - * 已经使用量 - */ - private String used; - - /** - * 资源的使用率 - */ - private double usage; - - public String getDirName() { - return dirName; - } - - public void setDirName(String dirName) { - this.dirName = dirName; - } - - public String getSysTypeName() { - return sysTypeName; - } - - public void setSysTypeName(String sysTypeName) { - this.sysTypeName = sysTypeName; - } - - public String getTypeName() { - return typeName; - } - - public void setTypeName(String typeName) { - this.typeName = typeName; - } - - public String getTotal() { - return total; - } - - public void setTotal(String total) { - this.total = total; - } - - public String getFree() { - return free; - } - - public void setFree(String free) { - this.free = free; - } - - public String getUsed() { - return used; - } - - public void setUsed(String used) { - this.used = used; - } - - public double getUsage() { - return usage; - } - - public void setUsage(double usage) { - this.usage = usage; - } -} diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java deleted file mode 100644 index 44d5222d..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java +++ /dev/null @@ -1,105 +0,0 @@ -package com.ruoyi.framework.web.exception; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.security.access.AccessDeniedException; -import org.springframework.security.authentication.AccountExpiredException; -import org.springframework.security.core.userdetails.UsernameNotFoundException; -import org.springframework.validation.BindException; -import org.springframework.web.bind.MethodArgumentNotValidException; -import org.springframework.web.bind.annotation.ExceptionHandler; -import org.springframework.web.bind.annotation.RestControllerAdvice; -import org.springframework.web.servlet.NoHandlerFoundException; -import com.ruoyi.common.constant.HttpStatus; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.exception.BaseException; -import com.ruoyi.common.exception.CustomException; -import com.ruoyi.common.exception.DemoModeException; -import com.ruoyi.common.utils.StringUtils; - -/** - * 全局异常处理器 - * - * @author ruoyi - */ -@RestControllerAdvice -public class GlobalExceptionHandler { - private static final Logger log = LoggerFactory.getLogger(GlobalExceptionHandler.class); - - /** - * 基础异常 - */ - @ExceptionHandler(BaseException.class) - public AjaxResult baseException(BaseException e) { - return AjaxResult.error(e.getMessage()); - } - - /** - * 业务异常 - */ - @ExceptionHandler(CustomException.class) - public AjaxResult businessException(CustomException e) { - if (StringUtils.isNull(e.getCode())) { - return AjaxResult.error(e.getMessage()); - } - return AjaxResult.error(e.getCode(), e.getMessage()); - } - - @ExceptionHandler(NoHandlerFoundException.class) - public AjaxResult handlerNoFoundException(Exception e) { - log.error(e.getMessage(), e); - return AjaxResult.error(HttpStatus.NOT_FOUND, "路径不存在,请检查路径是否正确"); - } - - @ExceptionHandler(AccessDeniedException.class) - public AjaxResult handleAuthorizationException(AccessDeniedException e) { - log.error(e.getMessage()); - return AjaxResult.error(HttpStatus.FORBIDDEN, "没有权限,请联系管理员授权"); - } - - @ExceptionHandler(AccountExpiredException.class) - public AjaxResult handleAccountExpiredException(AccountExpiredException e) { - log.error(e.getMessage(), e); - return AjaxResult.error(e.getMessage()); - } - - @ExceptionHandler(UsernameNotFoundException.class) - public AjaxResult handleUsernameNotFoundException(UsernameNotFoundException e) { - log.error(e.getMessage(), e); - return AjaxResult.error(e.getMessage()); - } - - @ExceptionHandler(Exception.class) - public AjaxResult handleException(Exception e) { - log.error(e.getMessage(), e); - return AjaxResult.error(e.getMessage()); - } - - /** - * 自定义验证异常 - */ - @ExceptionHandler(BindException.class) - public AjaxResult validatedBindException(BindException e) { - log.error(e.getMessage(), e); - String message = e.getAllErrors().get(0).getDefaultMessage(); - return AjaxResult.error(message); - } - - /** - * 自定义验证异常 - */ - @ExceptionHandler(MethodArgumentNotValidException.class) - public Object validExceptionHandler(MethodArgumentNotValidException e) { - log.error(e.getMessage(), e); - String message = e.getBindingResult().getFieldError().getDefaultMessage(); - return AjaxResult.error(message); - } - - /** - * 演示模式异常 - */ - @ExceptionHandler(DemoModeException.class) - public AjaxResult demoModeException(DemoModeException e) { - return AjaxResult.error("演示模式,不允许操作"); - } -} diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/AuthService.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/AuthService.java deleted file mode 100644 index e90b554c..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/AuthService.java +++ /dev/null @@ -1,106 +0,0 @@ -package com.ruoyi.framework.web.service; - - -import com.ruoyi.common.constant.Constants; -import com.ruoyi.common.core.domain.entity.SysUser; -import com.ruoyi.common.core.domain.model.LoginUser; -import com.ruoyi.common.exception.CustomException; -import com.ruoyi.common.exception.user.UserPasswordNotMatchException; -import com.ruoyi.common.utils.MessageUtils; -import com.ruoyi.common.utils.SecurityUtils; -import com.ruoyi.common.utils.sign.Md5Utils; -import com.ruoyi.framework.manager.AsyncManager; -import com.ruoyi.framework.manager.factory.AsyncFactory; -import com.ruoyi.system.domain.TUserAccountInfo; -import com.ruoyi.system.domain.TUserLoginLog; -import com.ruoyi.system.mapper.TUserAccountInfoMapper; -import com.ruoyi.system.mapper.TUserLoginLogMapper; -import com.ruoyi.system.service.ISysUserService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.authentication.AuthenticationManager; -import org.springframework.security.authentication.BadCredentialsException; -import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; -import org.springframework.security.core.Authentication; -import org.springframework.security.core.userdetails.UserDetails; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import javax.annotation.Resource; -import java.util.Date; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -/** - * 类名: AuthServiceImpl - * 描述: TODO - * 时间: 2021-08-11,0011 12:34 - * 开发人: admin - */ -@Service -public class AuthService { - - @Autowired - private TUserAccountInfoMapper userAccountInfoMapper; - - @Autowired - private TUserLoginLogMapper userLoginLogMapper; - - @Autowired - private TokenService tokenService; - - @Resource - private AuthenticationManager authenticationManager; - @Autowired - private ISysUserService sysUserService; - - - @Transactional - public String mpLogin(String code, String openId, String sessionKey, String accessToken) { - //查询用户是否存在,不存在创建 - SysUser sysUser = sysUserService.selectUserByOpenId(openId); - if(sysUser==null) - { - //创建用户 - sysUser=new SysUser(); - sysUser.setOpenId(openId); - sysUser.setNickName("微信注册用户"); - sysUser.setPassword("123456"); - sysUser.setUserName(Md5Utils.hash(openId).toUpperCase().substring(20)); - sysUser.setCreateBy("微信小程序"); - sysUser.setPassword(SecurityUtils.encryptPassword(sysUser.getPassword())); - sysUserService.insertUser(sysUser); - } -// Authentication authentication = null; -// try { -// -// // 该方法会去调用 UserDetailsServiceImpl.loadUserByUsername -// authentication = authenticationManager -// .authenticate(new UsernamePasswordAuthenticationToken(openId, sysUser.getPassword())); -// }catch (Exception e){ -// e.printStackTrace(); -// } -// LoginUser loginUser = (LoginUser) authentication.getPrincipal(); - Set permissions=new HashSet<>(); - permissions.add("*:*:*"); - LoginUser loginUser = new LoginUser(sysUser,permissions); - - // 生成token - String token= tokenService.createToken(loginUser); - return token; - - } - -// public UserDetails loadUserByOpenId(String openId) { -// TUserAccountInfoExample tUserAccountInfoExample = new TUserAccountInfoExample(); -// TUserAccountInfoExample.Criteria criteria = tUserAccountInfoExample.createCriteria(); -// criteria.andOpenIdEqualTo(openId); -// TUserAccountInfo tUserAccountInfo = userAccountInfoMapper.selectOneByExample(tUserAccountInfoExample); -// if (tUserAccountInfo == null) { -// return null; -// } else { -// UserInfoDetails userInfoDetails = new UserInfoDetails(tUserAccountInfo); -// return userInfoDetails; -// } -// } -} diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/PermissionService.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/PermissionService.java deleted file mode 100644 index d91532e5..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/PermissionService.java +++ /dev/null @@ -1,152 +0,0 @@ -package com.ruoyi.framework.web.service; - -import java.util.Set; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.util.CollectionUtils; -import com.ruoyi.common.core.domain.entity.SysRole; -import com.ruoyi.common.core.domain.model.LoginUser; -import com.ruoyi.common.utils.ServletUtils; -import com.ruoyi.common.utils.StringUtils; - -/** - * RuoYi首创 自定义权限实现,ss取自SpringSecurity首字母 - * - * @author ruoyi - */ -@Service("ss") -public class PermissionService { - /** - * 所有权限标识 - */ - private static final String ALL_PERMISSION = "*:*:*"; - - /** - * 管理员角色权限标识 - */ - private static final String SUPER_ADMIN = "admin"; - - private static final String ROLE_DELIMETER = ","; - - private static final String PERMISSION_DELIMETER = ","; - - @Autowired - private TokenService tokenService; - - /** - * 验证用户是否具备某权限 - * - * @param permission 权限字符串 - * @return 用户是否具备某权限 - */ - public boolean hasPermi(String permission) { - if (StringUtils.isEmpty(permission)) { - return false; - } - LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); - if (StringUtils.isNull(loginUser) || CollectionUtils.isEmpty(loginUser.getPermissions())) { - return false; - } - return hasPermissions(loginUser.getPermissions(), permission); - } - - /** - * 验证用户是否不具备某权限,与 hasPermi逻辑相反 - * - * @param permission 权限字符串 - * @return 用户是否不具备某权限 - */ - public boolean lacksPermi(String permission) { - return hasPermi(permission) != true; - } - - /** - * 验证用户是否具有以下任意一个权限 - * - * @param permissions 以 PERMISSION_NAMES_DELIMETER 为分隔符的权限列表 - * @return 用户是否具有以下任意一个权限 - */ - public boolean hasAnyPermi(String permissions) { - if (StringUtils.isEmpty(permissions)) { - return false; - } - LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); - if (StringUtils.isNull(loginUser) || CollectionUtils.isEmpty(loginUser.getPermissions())) { - return false; - } - Set authorities = loginUser.getPermissions(); - for (String permission : permissions.split(PERMISSION_DELIMETER)) { - if (permission != null && hasPermissions(authorities, permission)) { - return true; - } - } - return false; - } - - /** - * 判断用户是否拥有某个角色 - * - * @param role 角色字符串 - * @return 用户是否具备某角色 - */ - public boolean hasRole(String role) { - if (StringUtils.isEmpty(role)) { - return false; - } - LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); - if (StringUtils.isNull(loginUser) || CollectionUtils.isEmpty(loginUser.getUser().getRoles())) { - return false; - } - for (SysRole sysRole : loginUser.getUser().getRoles()) { - String roleKey = sysRole.getRoleKey(); - if (SUPER_ADMIN.equals(roleKey) || roleKey.equals(StringUtils.trim(role))) { - return true; - } - } - return false; - } - - /** - * 验证用户是否不具备某角色,与 isRole逻辑相反。 - * - * @param role 角色名称 - * @return 用户是否不具备某角色 - */ - public boolean lacksRole(String role) { - return hasRole(role) != true; - } - - /** - * 验证用户是否具有以下任意一个角色 - * - * @param roles 以 ROLE_NAMES_DELIMETER 为分隔符的角色列表 - * @return 用户是否具有以下任意一个角色 - */ - public boolean hasAnyRoles(String roles) { - if (StringUtils.isEmpty(roles)) { - return false; - } - LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest()); - if (StringUtils.isNull(loginUser) || CollectionUtils.isEmpty(loginUser.getUser().getRoles())) { - return false; - } - for (String role : roles.split(ROLE_DELIMETER)) { - if (hasRole(role)) { - return true; - } - } - return false; - } - - /** - * 判断是否包含权限 - * - * @param permissions 权限列表 - * @param permission 权限字符串 - * @return 用户是否具备某权限 - */ - private boolean hasPermissions(Set permissions, String permission) { - return permissions.contains(ALL_PERMISSION) || permissions.contains(StringUtils.trim(permission)); - } -} diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java deleted file mode 100644 index f9fe2864..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java +++ /dev/null @@ -1,175 +0,0 @@ -package com.ruoyi.framework.web.service; - -import javax.annotation.Resource; - -import cn.binarywang.wx.miniapp.api.WxMaService; -import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult; -import cn.binarywang.wx.miniapp.config.WxMaConfig; -import com.google.gson.Gson; -import com.ruoyi.common.core.domain.entity.SysUser; -import com.ruoyi.common.core.domain.model.MpLoginBody; -import com.ruoyi.common.utils.SecurityUtils; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.common.utils.sign.Md5Utils; -import com.ruoyi.common.utils.uuid.UUID; -import com.ruoyi.system.service.ISysUserService; -import com.ruoyi.system.service.impl.SysUserServiceImpl; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.authentication.AuthenticationManager; -import org.springframework.security.authentication.BadCredentialsException; -import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; -import org.springframework.security.core.Authentication; -import org.springframework.stereotype.Component; -import com.ruoyi.common.constant.Constants; -import com.ruoyi.common.core.domain.model.LoginUser; -import com.ruoyi.common.core.redis.RedisCache; -import com.ruoyi.common.exception.CustomException; -import com.ruoyi.common.exception.user.CaptchaException; -import com.ruoyi.common.exception.user.CaptchaExpireException; -import com.ruoyi.common.exception.user.UserPasswordNotMatchException; -import com.ruoyi.common.utils.MessageUtils; -import com.ruoyi.framework.manager.AsyncManager; -import com.ruoyi.framework.manager.factory.AsyncFactory; -import org.springframework.transaction.annotation.Transactional; - -import java.util.HashMap; -import java.util.Map; - -/** - * 登录校验方法 - * - * @author ruoyi - */ -@Component -public class SysLoginService { - @Autowired - private TokenService tokenService; - - @Resource - private AuthenticationManager authenticationManager; - - @Autowired - private RedisCache redisCache; - - @Autowired - private WxMaService wxMaService; - - @Autowired - private AuthService authService; - - @Autowired - private ISysUserService sysUserService; - - /** - * 登录验证 - * - * @param username 用户名 - * @param password 密码 - * @param code 验证码 - * @param uuid 唯一标识 - * @return 结果 - */ - public String login(String username, String password, String code, String uuid) { - String verifyKey = Constants.CAPTCHA_CODE_KEY + uuid; - String captcha = redisCache.getCacheObject(verifyKey); - redisCache.deleteObject(verifyKey); - if (captcha == null) { - AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire"))); - throw new CaptchaExpireException(); - } - if (!code.equalsIgnoreCase(captcha)) { - AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error"))); - throw new CaptchaException(); - } - // 用户验证 - Authentication authentication = null; - try { - // 该方法会去调用UserDetailsServiceImpl.loadUserByUsername - authentication = authenticationManager - .authenticate(new UsernamePasswordAuthenticationToken(username, password)); - } catch (Exception e) { - if (e instanceof BadCredentialsException) { - AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.password.not.match"))); - throw new UserPasswordNotMatchException(); - } else { - AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, e.getMessage())); - throw new CustomException(e.getMessage()); - } - } - AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success"))); - LoginUser loginUser = (LoginUser) authentication.getPrincipal(); - // 生成token - return tokenService.createToken(loginUser); - } - - public String mpLlogin(MpLoginBody loginBody) { - - System.out.println(loginBody); - String code = loginBody.getCode(); - if (StringUtils.isEmpty(code)) { - throw new CustomException("无效的code"); - - } else { - String sessionKey = null; - String openid = null; - String unionid = null; - - if("123456".equals(code)) - { - sessionKey = "123456"; - openid = "123456"; - unionid = "123456"; - }else { - //存在有效的 code - System.out.println("这里请求了一次code==========" + code); - WxMaJscode2SessionResult session = null; - try { - session = wxMaService.getUserService().getSessionInfo(code); - } catch (Exception e) { - e.printStackTrace(); - throw new CustomException(e.getMessage()); - } - WxMaConfig wxMaConfig = wxMaService.getWxMaConfig(); - System.out.println(wxMaConfig); - System.out.println(new Gson().toJson(wxMaConfig)); - sessionKey = session.getSessionKey(); - openid = session.getOpenid(); - unionid = session.getUnionid(); - System.out.println("sessionKey= " + sessionKey); - System.out.println("openid= " + openid); - System.out.println("unionid= " + unionid); - } - //通过openId sessionKey 生成3rd session 返回给客户端小程序 - String accessToken = UUID.fastUUID().toString().replace("-", ""); - - String token = authService.mpLogin(code, openid, sessionKey, accessToken); - -// TUserAccountInfo userInfo = userAccoutInfoSevice.getUserInfo(openid); -// Integer userType = userInfo.getUserType(); - - Map data = new HashMap<>(); - data.put("token", token); -// data.put("userInfo", userInfo); -// data.put("userType", userType); - - -// if (userType.intValue() == 0)//新用户 -// { -//// HashMap supplierInfo = supplierInfoSevice.getSupplierInfo(userInfo.getId()); -//// data.put("userInfo", userInfo); -//// data.put("supplyInfo", supplierInfo); -// -// //已授权用户 -// } else if (userType.intValue() == 1)//注册老用户 -// { -//// data.put("userInfo", userInfo); -// } else if (userType.intValue() == 2) { //注册商家 -//// data.put("userInfo", userInfo); -//// data.put("userType", userType); -// } - - System.out.println("jwtToken : " + token); - return token; - } - } -} diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysPermissionService.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysPermissionService.java deleted file mode 100644 index f1dfd2b6..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysPermissionService.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.ruoyi.framework.web.service; - -import java.util.HashSet; -import java.util.Set; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import com.ruoyi.common.core.domain.entity.SysUser; -import com.ruoyi.system.service.ISysMenuService; -import com.ruoyi.system.service.ISysRoleService; - -/** - * 用户权限处理 - * - * @author ruoyi - */ -@Component -public class SysPermissionService { - @Autowired - private ISysRoleService roleService; - - @Autowired - private ISysMenuService menuService; - - /** - * 获取角色数据权限 - * - * @param user 用户信息 - * @return 角色权限信息 - */ - public Set getRolePermission(SysUser user) { - Set roles = new HashSet(); - // 管理员拥有所有权限 - if (user.isAdmin()) { - roles.add("admin"); - } else { - roles.addAll(roleService.selectRolePermissionByUserId(user.getUserId())); - } - return roles; - } - - /** - * 获取菜单数据权限 - * - * @param user 用户信息 - * @return 菜单权限信息 - */ - public Set getMenuPermission(SysUser user) { - Set perms = new HashSet(); - // 管理员拥有所有权限 - if (user.isAdmin()) { - perms.add("*:*:*"); - } else { - perms.addAll(menuService.selectMenuPermsByUserId(user.getUserId())); - } - return perms; - } -} diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/TokenService.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/TokenService.java deleted file mode 100644 index ff9ede00..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/TokenService.java +++ /dev/null @@ -1,208 +0,0 @@ -package com.ruoyi.framework.web.service; - -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.servlet.http.HttpServletRequest; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Component; -import com.ruoyi.common.constant.Constants; -import com.ruoyi.common.core.domain.model.LoginUser; -import com.ruoyi.common.core.redis.RedisCache; -import com.ruoyi.common.utils.ServletUtils; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.common.utils.ip.AddressUtils; -import com.ruoyi.common.utils.ip.IpUtils; -import com.ruoyi.common.utils.uuid.IdUtils; -import eu.bitwalker.useragentutils.UserAgent; -import io.jsonwebtoken.Claims; -import io.jsonwebtoken.Jwts; -import io.jsonwebtoken.SignatureAlgorithm; - -/** - * token验证处理 - * - * @author ruoyi - */ -@Component -public class TokenService { - // 令牌自定义标识 - @Value("${token.header}") - private String header; - - // 令牌秘钥 - @Value("${token.secret}") - private String secret; - - // 令牌有效期(默认30分钟) - @Value("${token.expireTime}") - private int expireTime; - - protected static final long MILLIS_SECOND = 1000; - - protected static final long MILLIS_MINUTE = 60 * MILLIS_SECOND; - - private static final Long MILLIS_MINUTE_TEN = 20 * 60 * 1000L; - - @Autowired - private RedisCache redisCache; - - /** - * 获取用户身份信息 - * - * @return 用户信息 - */ - public LoginUser getLoginUser(HttpServletRequest request) { - // 获取请求携带的令牌 - String token = getToken(request); - String requestURI = request.getRequestURI(); - StringBuffer requestURL = request.getRequestURL(); - if(requestURI.contains( "wxLogin")) - { - return null; - } - if (StringUtils.isNotEmpty(token) ) { - Claims claims = parseToken(token); - // 解析对应的权限以及用户信息 - String uuid = (String) claims.get(Constants.LOGIN_USER_KEY); - String userKey = getTokenKey(uuid); - LoginUser user = redisCache.getCacheObject(userKey); - return user; - } - return null; - } - - /** - * 设置用户身份信息 - */ - public void setLoginUser(LoginUser loginUser) { - if (StringUtils.isNotNull(loginUser) && StringUtils.isNotEmpty(loginUser.getToken())) { - refreshToken(loginUser); - } - } - - /** - * 删除用户身份信息 - */ - public void delLoginUser(String token) { - if (StringUtils.isNotEmpty(token)) { - String userKey = getTokenKey(token); - redisCache.deleteObject(userKey); - } - } - - /** - * 创建令牌 - * - * @param loginUser 用户信息 - * @return 令牌 - */ - public String createToken(LoginUser loginUser) { - String token = IdUtils.fastUUID(); - loginUser.setToken(token); - setUserAgent(loginUser); - refreshToken(loginUser); - - Map claims = new HashMap<>(); - claims.put(Constants.LOGIN_USER_KEY, token); - return createToken(claims); - } - - /** - * 验证令牌有效期,相差不足20分钟,自动刷新缓存 - * - * @param loginUser - * @return 令牌 - */ - public void verifyToken(LoginUser loginUser) { - long expireTime = loginUser.getExpireTime(); - long currentTime = System.currentTimeMillis(); - if (expireTime - currentTime <= MILLIS_MINUTE_TEN) { - refreshToken(loginUser); - } - } - - /** - * 刷新令牌有效期 - * - * @param loginUser 登录信息 - */ - public void refreshToken(LoginUser loginUser) { - loginUser.setLoginTime(System.currentTimeMillis()); - loginUser.setExpireTime(loginUser.getLoginTime() + expireTime * MILLIS_MINUTE); - // 根据uuid将loginUser缓存 - String userKey = getTokenKey(loginUser.getToken()); - redisCache.setCacheObject(userKey, loginUser, expireTime, TimeUnit.MINUTES); - } - - /** - * 设置用户代理信息 - * - * @param loginUser 登录信息 - */ - public void setUserAgent(LoginUser loginUser) { - UserAgent userAgent = UserAgent.parseUserAgentString(ServletUtils.getRequest().getHeader("User-Agent")); - String ip = IpUtils.getIpAddr(ServletUtils.getRequest()); - loginUser.setIpaddr(ip); - loginUser.setLoginLocation(AddressUtils.getRealAddressByIP(ip)); - loginUser.setBrowser(userAgent.getBrowser().getName()); - loginUser.setOs(userAgent.getOperatingSystem().getName()); - } - - /** - * 从数据声明生成令牌 - * - * @param claims 数据声明 - * @return 令牌 - */ - private String createToken(Map claims) { - String token = Jwts.builder() - .setClaims(claims) - .signWith(SignatureAlgorithm.HS512, secret).compact(); - return token; - } - - /** - * 从令牌中获取数据声明 - * - * @param token 令牌 - * @return 数据声明 - */ - private Claims parseToken(String token) { - return Jwts.parser() - .setSigningKey(secret) - .parseClaimsJws(token) - .getBody(); - } - - /** - * 从令牌中获取用户名 - * - * @param token 令牌 - * @return 用户名 - */ - public String getUsernameFromToken(String token) { - Claims claims = parseToken(token); - return claims.getSubject(); - } - - /** - * 获取请求token - * - * @param request - * @return token - */ - private String getToken(HttpServletRequest request) { - String token = request.getHeader(header); - if (StringUtils.isNotEmpty(token) && token.startsWith(Constants.TOKEN_PREFIX)) { - token = token.replace(Constants.TOKEN_PREFIX, ""); - } - return token; - } - - private String getTokenKey(String uuid) { - return Constants.LOGIN_TOKEN_KEY + uuid; - } -} diff --git a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/UserDetailsServiceImpl.java b/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/UserDetailsServiceImpl.java deleted file mode 100644 index 9b60dedb..00000000 --- a/spring-boot/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/UserDetailsServiceImpl.java +++ /dev/null @@ -1,74 +0,0 @@ -package com.ruoyi.framework.web.service; - -import com.ruoyi.system.domain.TUserAccountInfo; -import com.ruoyi.system.service.impl.TUserAccountInfoServiceImpl; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.core.userdetails.UserDetails; -import org.springframework.security.core.userdetails.UserDetailsService; -import org.springframework.security.core.userdetails.UsernameNotFoundException; -import org.springframework.stereotype.Service; -import com.ruoyi.common.core.domain.entity.SysUser; -import com.ruoyi.common.core.domain.model.LoginUser; -import com.ruoyi.common.enums.UserStatus; -import com.ruoyi.common.exception.BaseException; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.system.service.ISysUserService; - -import java.util.HashSet; -import java.util.List; - -/** - * 用户验证处理 - * - * @author ruoyi - */ -@Service -public class UserDetailsServiceImpl implements UserDetailsService { - private static final Logger log = LoggerFactory.getLogger(UserDetailsServiceImpl.class); - - @Autowired - private ISysUserService userService; - - @Autowired - private SysPermissionService permissionService; - - @Autowired - private TUserAccountInfoServiceImpl userAccountInfoService; - - @Override - public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { - SysUser user = userService.selectUserByUserName(username); - if (user == null) { - //微信小程序登陆 - user = userService.selectUserByOpenId(username); - if (user == null ) { - log.info("新用户登录:{} ", username); - } - return createLoginUser(user); - } - if (StringUtils.isNull(user)) { - log.info("登录用户:{} 不存在.", username); - throw new UsernameNotFoundException("登录用户:" + username + " 不存在"); - } else if (UserStatus.DELETED.getCode().equals(user.getDelFlag())) { - log.info("登录用户:{} 已被删除.", username); - throw new BaseException("对不起,您的账号:" + username + " 已被删除"); - } else if (UserStatus.DISABLE.getCode().equals(user.getStatus())) { - log.info("登录用户:{} 已被停用.", username); - throw new BaseException("对不起,您的账号:" + username + " 已停用"); - } - - return createLoginUser(user); - } - - public UserDetails createLoginUser(SysUser user) { - return new LoginUser(user, permissionService.getMenuPermission(user)); - } - - public UserDetails createWxLoginUser(SysUser user) { - HashSet permissions = new HashSet<>(); - permissions.add("*:*:*"); - return new LoginUser(user, permissions); - } -} diff --git a/spring-boot/ruoyi-generator/pom.xml b/spring-boot/ruoyi-generator/pom.xml deleted file mode 100644 index 62bd419b..00000000 --- a/spring-boot/ruoyi-generator/pom.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - ruoyi - com.ruoyi - 3.4.0 - - 4.0.0 - - ruoyi-generator - - - generator代码生成 - - - - - - - org.apache.velocity - velocity - - - - - com.ruoyi - ruoyi-common - - - com.baomidou - mybatis-plus-generator - 3.3.2 - - - mysql - mysql-connector-java - - - - - \ No newline at end of file diff --git a/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/SggCodeGenerator.java b/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/SggCodeGenerator.java deleted file mode 100644 index 4cc8e9ae..00000000 --- a/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/SggCodeGenerator.java +++ /dev/null @@ -1,70 +0,0 @@ -package com.ruoyi.generator; - -import com.baomidou.mybatisplus.annotation.DbType; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.generator.AutoGenerator; -import com.baomidou.mybatisplus.generator.config.DataSourceConfig; -import com.baomidou.mybatisplus.generator.config.GlobalConfig; -import com.baomidou.mybatisplus.generator.config.PackageConfig; -import com.baomidou.mybatisplus.generator.config.StrategyConfig; -import com.baomidou.mybatisplus.generator.config.rules.DateType; -import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy; - -public class SggCodeGenerator { - - public static void main(String[] args) { - - // 1、创建代码生成器 - AutoGenerator mpg = new AutoGenerator(); - - // 2、全局配置 - GlobalConfig gc = new GlobalConfig(); - String projectPath = System.getProperty("user.dir"); - gc.setOutputDir(projectPath + "/ruoyi-system/src/main/java"); - gc.setAuthor("wxy"); - gc.setOpen(false); //生成后是否打开资源管理器 - gc.setFileOverride(false); //重新生成时文件是否覆盖 - gc.setServiceName("%sService"); //去掉Service接口的首字母I - gc.setIdType(IdType.ID_WORKER_STR); //主键策略 - gc.setDateType(DateType.ONLY_DATE);//定义生成的实体类中日期类型 - gc.setSwagger2(false);//开启Swagger2模式 - - mpg.setGlobalConfig(gc); - - // 3、数据源配置 - DataSourceConfig dsc = new DataSourceConfig(); - dsc.setUrl("jdbc:mysql://51xy.xyz:3316/develop_xiaoyi_wumei?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8"); - dsc.setDriverName("com.mysql.cj.jdbc.Driver"); - dsc.setUsername("xiaoyi"); - dsc.setPassword("123456"); - dsc.setDbType(DbType.MYSQL); - mpg.setDataSource(dsc); - - // 4、包配置 - PackageConfig pc = new PackageConfig(); - pc.setModuleName(null); //模块名 - pc.setParent("com.ruoyi.common.core"); - pc.setController("controller"); - pc.setEntity("entity"); - pc.setService("service"); - pc.setMapper("mapper"); - mpg.setPackageInfo(pc); - - // 5、策略配置 - StrategyConfig strategy = new StrategyConfig(); - strategy.setTablePrefix("t_%");//对那一张表生成代码 - strategy.setNaming(NamingStrategy.underline_to_camel);//数据库表映射到实体的命名策略 - strategy.setTablePrefix(pc.getModuleName() + "_"); //生成实体时去掉表前缀 - - strategy.setColumnNaming(NamingStrategy.underline_to_camel);//数据库表字段映射到实体的命名策略 - strategy.setEntityLombokModel(true); // lombok 模型 @Accessors(chain = true) setter链式操作 - - strategy.setRestControllerStyle(true); //restful api风格控制器 - strategy.setControllerMappingHyphenStyle(true); //url中驼峰转连字符 - - mpg.setStrategy(strategy); - - // 6、执行 - mpg.execute(); - } -} \ No newline at end of file diff --git a/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/config/GenConfig.java b/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/config/GenConfig.java deleted file mode 100644 index 7baa6cd5..00000000 --- a/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/config/GenConfig.java +++ /dev/null @@ -1,72 +0,0 @@ -package com.ruoyi.generator.config; - -import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.context.annotation.PropertySource; -import org.springframework.stereotype.Component; - -/** - * 读取代码生成相关配置 - * - * @author ruoyi - */ -@Component -@ConfigurationProperties(prefix = "gen") -@PropertySource(value = {"classpath:generator.yml"}) -public class GenConfig { - /** - * 作者 - */ - public static String author; - - /** - * 生成包路径 - */ - public static String packageName; - - /** - * 自动去除表前缀,默认是false - */ - public static boolean autoRemovePre; - - /** - * 表前缀(类名不会包含表前缀) - */ - public static String tablePrefix; - - public static String getAuthor() { - return author; - } - - @Value("${author}") - public void setAuthor(String author) { - GenConfig.author = author; - } - - public static String getPackageName() { - return packageName; - } - - @Value("${packageName}") - public void setPackageName(String packageName) { - GenConfig.packageName = packageName; - } - - public static boolean getAutoRemovePre() { - return autoRemovePre; - } - - @Value("${autoRemovePre}") - public void setAutoRemovePre(boolean autoRemovePre) { - GenConfig.autoRemovePre = autoRemovePre; - } - - public static String getTablePrefix() { - return tablePrefix; - } - - @Value("${tablePrefix}") - public void setTablePrefix(String tablePrefix) { - GenConfig.tablePrefix = tablePrefix; - } -} diff --git a/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/controller/GenController.java b/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/controller/GenController.java deleted file mode 100644 index 52759edf..00000000 --- a/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/controller/GenController.java +++ /dev/null @@ -1,201 +0,0 @@ -package com.ruoyi.generator.controller; - -import java.io.IOException; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import javax.servlet.http.HttpServletResponse; - -import org.apache.commons.io.IOUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.core.page.TableDataInfo; -import com.ruoyi.common.core.text.Convert; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.generator.domain.GenTable; -import com.ruoyi.generator.domain.GenTableColumn; -import com.ruoyi.generator.service.IGenTableColumnService; -import com.ruoyi.generator.service.IGenTableService; - -/** - * 代码生成 操作处理 - * - * @author ruoyi - */ -@RestController -@RequestMapping("/tool/gen") -public class GenController extends BaseController { - @Autowired - private IGenTableService genTableService; - - @Autowired - private IGenTableColumnService genTableColumnService; - - /** - * 查询代码生成列表 - */ - @PreAuthorize("@ss.hasPermi('tool:gen:list')") - @GetMapping("/list") - public TableDataInfo genList(GenTable genTable) { - startPage(); - List list = genTableService.selectGenTableList(genTable); - return getDataTable(list); - } - - /** - * 修改代码生成业务 - */ - @PreAuthorize("@ss.hasPermi('tool:gen:query')") - @GetMapping(value = "/{talbleId}") - public AjaxResult getInfo(@PathVariable Long talbleId) { - GenTable table = genTableService.selectGenTableById(talbleId); - List tables = genTableService.selectGenTableAll(); - List list = genTableColumnService.selectGenTableColumnListByTableId(talbleId); - Map map = new HashMap(); - map.put("info", table); - map.put("rows", list); - map.put("tables", tables); - return AjaxResult.success(map); - } - - /** - * 查询数据库列表 - */ - @PreAuthorize("@ss.hasPermi('tool:gen:list')") - @GetMapping("/db/list") - public TableDataInfo dataList(GenTable genTable) { - startPage(); - List list = genTableService.selectDbTableList(genTable); - return getDataTable(list); - } - - /** - * 查询数据表字段列表 - */ - @PreAuthorize("@ss.hasPermi('tool:gen:list')") - @GetMapping(value = "/column/{talbleId}") - public TableDataInfo columnList(Long tableId) { - TableDataInfo dataInfo = new TableDataInfo(); - List list = genTableColumnService.selectGenTableColumnListByTableId(tableId); - dataInfo.setRows(list); - dataInfo.setTotal(list.size()); - return dataInfo; - } - - /** - * 导入表结构(保存) - */ - @PreAuthorize("@ss.hasPermi('tool:gen:list')") - @Log(title = "代码生成", businessType = BusinessType.IMPORT) - @PostMapping("/importTable") - public AjaxResult importTableSave(String tables) { - String[] tableNames = Convert.toStrArray(tables); - // 查询表信息 - List tableList = genTableService.selectDbTableListByNames(tableNames); - genTableService.importGenTable(tableList); - return AjaxResult.success(); - } - - /** - * 修改保存代码生成业务 - */ - @PreAuthorize("@ss.hasPermi('tool:gen:edit')") - @Log(title = "代码生成", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult editSave(@Validated @RequestBody GenTable genTable) { - genTableService.validateEdit(genTable); - genTableService.updateGenTable(genTable); - return AjaxResult.success(); - } - - /** - * 删除代码生成 - */ - @PreAuthorize("@ss.hasPermi('tool:gen:remove')") - @Log(title = "代码生成", businessType = BusinessType.DELETE) - @DeleteMapping("/{tableIds}") - public AjaxResult remove(@PathVariable Long[] tableIds) { - genTableService.deleteGenTableByIds(tableIds); - return AjaxResult.success(); - } - - /** - * 预览代码 - */ - @PreAuthorize("@ss.hasPermi('tool:gen:preview')") - @GetMapping("/preview/{tableId}") - public AjaxResult preview(@PathVariable("tableId") Long tableId) throws IOException { - Map dataMap = genTableService.previewCode(tableId); - return AjaxResult.success(dataMap); - } - - /** - * 生成代码(下载方式) - */ - @PreAuthorize("@ss.hasPermi('tool:gen:code')") - @Log(title = "代码生成", businessType = BusinessType.GENCODE) - @GetMapping("/download/{tableName}") - public void download(HttpServletResponse response, @PathVariable("tableName") String tableName) throws IOException { - byte[] data = genTableService.downloadCode(tableName); - genCode(response, data); - } - - /** - * 生成代码(自定义路径) - */ - @PreAuthorize("@ss.hasPermi('tool:gen:code')") - @Log(title = "代码生成", businessType = BusinessType.GENCODE) - @GetMapping("/genCode/{tableName}") - public AjaxResult genCode(@PathVariable("tableName") String tableName) { - genTableService.generatorCode(tableName); - return AjaxResult.success(); - } - - /** - * 同步数据库 - */ - @PreAuthorize("@ss.hasPermi('tool:gen:edit')") - @Log(title = "代码生成", businessType = BusinessType.UPDATE) - @GetMapping("/synchDb/{tableName}") - public AjaxResult synchDb(@PathVariable("tableName") String tableName) { - genTableService.synchDb(tableName); - return AjaxResult.success(); - } - - /** - * 批量生成代码 - */ - @PreAuthorize("@ss.hasPermi('tool:gen:code')") - @Log(title = "代码生成", businessType = BusinessType.GENCODE) - @GetMapping("/batchGenCode") - public void batchGenCode(HttpServletResponse response, String tables) throws IOException { - String[] tableNames = Convert.toStrArray(tables); - byte[] data = genTableService.downloadCode(tableNames); - genCode(response, data); - } - - /** - * 生成zip文件 - */ - private void genCode(HttpServletResponse response, byte[] data) throws IOException { - response.reset(); - response.addHeader("Access-Control-Allow-Origin", "*"); - response.addHeader("Access-Control-Expose-Headers", "Content-Disposition"); - response.setHeader("Content-Disposition", "attachment; filename=\"ruoyi.zip\""); - response.addHeader("Content-Length", "" + data.length); - response.setContentType("application/octet-stream; charset=UTF-8"); - IOUtils.write(data, response.getOutputStream()); - } -} \ No newline at end of file diff --git a/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/domain/GenTable.java b/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/domain/GenTable.java deleted file mode 100644 index eaa01081..00000000 --- a/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/domain/GenTable.java +++ /dev/null @@ -1,363 +0,0 @@ -package com.ruoyi.generator.domain; - -import java.util.List; -import javax.validation.Valid; -import javax.validation.constraints.NotBlank; - -import org.apache.commons.lang3.ArrayUtils; -import com.ruoyi.common.constant.GenConstants; -import com.ruoyi.common.core.domain.BaseEntity; -import com.ruoyi.common.utils.StringUtils; - -/** - * 业务表 gen_table - * - * @author ruoyi - */ -public class GenTable extends BaseEntity { - private static final long serialVersionUID = 1L; - - /** - * 编号 - */ - private Long tableId; - - /** - * 表名称 - */ - @NotBlank(message = "表名称不能为空") - private String tableName; - - /** - * 表描述 - */ - @NotBlank(message = "表描述不能为空") - private String tableComment; - - /** - * 关联父表的表名 - */ - private String subTableName; - - /** - * 本表关联父表的外键名 - */ - private String subTableFkName; - - /** - * 实体类名称(首字母大写) - */ - @NotBlank(message = "实体类名称不能为空") - private String className; - - /** - * 使用的模板(crud单表操作 tree树表操作 sub主子表操作) - */ - private String tplCategory; - - /** - * 生成包路径 - */ - @NotBlank(message = "生成包路径不能为空") - private String packageName; - - /** - * 生成模块名 - */ - @NotBlank(message = "生成模块名不能为空") - private String moduleName; - - /** - * 生成业务名 - */ - @NotBlank(message = "生成业务名不能为空") - private String businessName; - - /** - * 生成功能名 - */ - @NotBlank(message = "生成功能名不能为空") - private String functionName; - - /** - * 生成作者 - */ - @NotBlank(message = "作者不能为空") - private String functionAuthor; - - /** - * 生成代码方式(0zip压缩包 1自定义路径) - */ - private String genType; - - /** - * 生成路径(不填默认项目路径) - */ - private String genPath; - - /** - * 主键信息 - */ - private GenTableColumn pkColumn; - - /** - * 子表信息 - */ - private GenTable subTable; - - /** - * 表列信息 - */ - @Valid - private List columns; - - /** - * 其它生成选项 - */ - private String options; - - /** - * 树编码字段 - */ - private String treeCode; - - /** - * 树父编码字段 - */ - private String treeParentCode; - - /** - * 树名称字段 - */ - private String treeName; - - /** - * 上级菜单ID字段 - */ - private String parentMenuId; - - /** - * 上级菜单名称字段 - */ - private String parentMenuName; - - public Long getTableId() { - return tableId; - } - - public void setTableId(Long tableId) { - this.tableId = tableId; - } - - public String getTableName() { - return tableName; - } - - public void setTableName(String tableName) { - this.tableName = tableName; - } - - public String getTableComment() { - return tableComment; - } - - public void setTableComment(String tableComment) { - this.tableComment = tableComment; - } - - public String getSubTableName() { - return subTableName; - } - - public void setSubTableName(String subTableName) { - this.subTableName = subTableName; - } - - public String getSubTableFkName() { - return subTableFkName; - } - - public void setSubTableFkName(String subTableFkName) { - this.subTableFkName = subTableFkName; - } - - public String getClassName() { - return className; - } - - public void setClassName(String className) { - this.className = className; - } - - public String getTplCategory() { - return tplCategory; - } - - public void setTplCategory(String tplCategory) { - this.tplCategory = tplCategory; - } - - public String getPackageName() { - return packageName; - } - - public void setPackageName(String packageName) { - this.packageName = packageName; - } - - public String getModuleName() { - return moduleName; - } - - public void setModuleName(String moduleName) { - this.moduleName = moduleName; - } - - public String getBusinessName() { - return businessName; - } - - public void setBusinessName(String businessName) { - this.businessName = businessName; - } - - public String getFunctionName() { - return functionName; - } - - public void setFunctionName(String functionName) { - this.functionName = functionName; - } - - public String getFunctionAuthor() { - return functionAuthor; - } - - public void setFunctionAuthor(String functionAuthor) { - this.functionAuthor = functionAuthor; - } - - public String getGenType() { - return genType; - } - - public void setGenType(String genType) { - this.genType = genType; - } - - public String getGenPath() { - return genPath; - } - - public void setGenPath(String genPath) { - this.genPath = genPath; - } - - public GenTableColumn getPkColumn() { - return pkColumn; - } - - public void setPkColumn(GenTableColumn pkColumn) { - this.pkColumn = pkColumn; - } - - public GenTable getSubTable() { - return subTable; - } - - public void setSubTable(GenTable subTable) { - this.subTable = subTable; - } - - public List getColumns() { - return columns; - } - - public void setColumns(List columns) { - this.columns = columns; - } - - public String getOptions() { - return options; - } - - public void setOptions(String options) { - this.options = options; - } - - public String getTreeCode() { - return treeCode; - } - - public void setTreeCode(String treeCode) { - this.treeCode = treeCode; - } - - public String getTreeParentCode() { - return treeParentCode; - } - - public void setTreeParentCode(String treeParentCode) { - this.treeParentCode = treeParentCode; - } - - public String getTreeName() { - return treeName; - } - - public void setTreeName(String treeName) { - this.treeName = treeName; - } - - public String getParentMenuId() { - return parentMenuId; - } - - public void setParentMenuId(String parentMenuId) { - this.parentMenuId = parentMenuId; - } - - public String getParentMenuName() { - return parentMenuName; - } - - public void setParentMenuName(String parentMenuName) { - this.parentMenuName = parentMenuName; - } - - public boolean isSub() { - return isSub(this.tplCategory); - } - - public static boolean isSub(String tplCategory) { - return tplCategory != null && StringUtils.equals(GenConstants.TPL_SUB, tplCategory); - } - - public boolean isTree() { - return isTree(this.tplCategory); - } - - public static boolean isTree(String tplCategory) { - return tplCategory != null && StringUtils.equals(GenConstants.TPL_TREE, tplCategory); - } - - public boolean isCrud() { - return isCrud(this.tplCategory); - } - - public static boolean isCrud(String tplCategory) { - return tplCategory != null && StringUtils.equals(GenConstants.TPL_CRUD, tplCategory); - } - - public boolean isSuperColumn(String javaField) { - return isSuperColumn(this.tplCategory, javaField); - } - - public static boolean isSuperColumn(String tplCategory, String javaField) { - if (isTree(tplCategory)) { - return StringUtils.equalsAnyIgnoreCase(javaField, - ArrayUtils.addAll(GenConstants.TREE_ENTITY, GenConstants.BASE_ENTITY)); - } - return StringUtils.equalsAnyIgnoreCase(javaField, GenConstants.BASE_ENTITY); - } -} \ No newline at end of file diff --git a/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/domain/GenTableColumn.java b/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/domain/GenTableColumn.java deleted file mode 100644 index cb65d2a0..00000000 --- a/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/domain/GenTableColumn.java +++ /dev/null @@ -1,348 +0,0 @@ -package com.ruoyi.generator.domain; - -import javax.validation.constraints.NotBlank; - -import com.ruoyi.common.core.domain.BaseEntity; -import com.ruoyi.common.utils.StringUtils; - -/** - * 代码生成业务字段表 gen_table_column - * - * @author ruoyi - */ -public class GenTableColumn extends BaseEntity { - private static final long serialVersionUID = 1L; - - /** - * 编号 - */ - private Long columnId; - - /** - * 归属表编号 - */ - private Long tableId; - - /** - * 列名称 - */ - private String columnName; - - /** - * 列描述 - */ - private String columnComment; - - /** - * 列类型 - */ - private String columnType; - - /** - * JAVA类型 - */ - private String javaType; - - /** - * JAVA字段名 - */ - @NotBlank(message = "Java属性不能为空") - private String javaField; - - /** - * 是否主键(1是) - */ - private String isPk; - - /** - * 是否自增(1是) - */ - private String isIncrement; - - /** - * 是否必填(1是) - */ - private String isRequired; - - /** - * 是否为插入字段(1是) - */ - private String isInsert; - - /** - * 是否编辑字段(1是) - */ - private String isEdit; - - /** - * 是否列表字段(1是) - */ - private String isList; - - /** - * 是否查询字段(1是) - */ - private String isQuery; - - /** - * 查询方式(EQ等于、NE不等于、GT大于、LT小于、LIKE模糊、BETWEEN范围) - */ - private String queryType; - - /** - * 显示类型(input文本框、textarea文本域、select下拉框、checkbox复选框、radio单选框、datetime日期控件、image图片上传控件、upload文件上传控件、editor富文本控件) - */ - private String htmlType; - - /** - * 字典类型 - */ - private String dictType; - - /** - * 排序 - */ - private Integer sort; - - public void setColumnId(Long columnId) { - this.columnId = columnId; - } - - public Long getColumnId() { - return columnId; - } - - public void setTableId(Long tableId) { - this.tableId = tableId; - } - - public Long getTableId() { - return tableId; - } - - public void setColumnName(String columnName) { - this.columnName = columnName; - } - - public String getColumnName() { - return columnName; - } - - public void setColumnComment(String columnComment) { - this.columnComment = columnComment; - } - - public String getColumnComment() { - return columnComment; - } - - public void setColumnType(String columnType) { - this.columnType = columnType; - } - - public String getColumnType() { - return columnType; - } - - public void setJavaType(String javaType) { - this.javaType = javaType; - } - - public String getJavaType() { - return javaType; - } - - public void setJavaField(String javaField) { - this.javaField = javaField; - } - - public String getJavaField() { - return javaField; - } - - public String getCapJavaField() { - return StringUtils.capitalize(javaField); - } - - public void setIsPk(String isPk) { - this.isPk = isPk; - } - - public String getIsPk() { - return isPk; - } - - public boolean isPk() { - return isPk(this.isPk); - } - - public boolean isPk(String isPk) { - return isPk != null && StringUtils.equals("1", isPk); - } - - public String getIsIncrement() { - return isIncrement; - } - - public void setIsIncrement(String isIncrement) { - this.isIncrement = isIncrement; - } - - public boolean isIncrement() { - return isIncrement(this.isIncrement); - } - - public boolean isIncrement(String isIncrement) { - return isIncrement != null && StringUtils.equals("1", isIncrement); - } - - public void setIsRequired(String isRequired) { - this.isRequired = isRequired; - } - - public String getIsRequired() { - return isRequired; - } - - public boolean isRequired() { - return isRequired(this.isRequired); - } - - public boolean isRequired(String isRequired) { - return isRequired != null && StringUtils.equals("1", isRequired); - } - - public void setIsInsert(String isInsert) { - this.isInsert = isInsert; - } - - public String getIsInsert() { - return isInsert; - } - - public boolean isInsert() { - return isInsert(this.isInsert); - } - - public boolean isInsert(String isInsert) { - return isInsert != null && StringUtils.equals("1", isInsert); - } - - public void setIsEdit(String isEdit) { - this.isEdit = isEdit; - } - - public String getIsEdit() { - return isEdit; - } - - public boolean isEdit() { - return isInsert(this.isEdit); - } - - public boolean isEdit(String isEdit) { - return isEdit != null && StringUtils.equals("1", isEdit); - } - - public void setIsList(String isList) { - this.isList = isList; - } - - public String getIsList() { - return isList; - } - - public boolean isList() { - return isList(this.isList); - } - - public boolean isList(String isList) { - return isList != null && StringUtils.equals("1", isList); - } - - public void setIsQuery(String isQuery) { - this.isQuery = isQuery; - } - - public String getIsQuery() { - return isQuery; - } - - public boolean isQuery() { - return isQuery(this.isQuery); - } - - public boolean isQuery(String isQuery) { - return isQuery != null && StringUtils.equals("1", isQuery); - } - - public void setQueryType(String queryType) { - this.queryType = queryType; - } - - public String getQueryType() { - return queryType; - } - - public String getHtmlType() { - return htmlType; - } - - public void setHtmlType(String htmlType) { - this.htmlType = htmlType; - } - - public void setDictType(String dictType) { - this.dictType = dictType; - } - - public String getDictType() { - return dictType; - } - - public void setSort(Integer sort) { - this.sort = sort; - } - - public Integer getSort() { - return sort; - } - - public boolean isSuperColumn() { - return isSuperColumn(this.javaField); - } - - public static boolean isSuperColumn(String javaField) { - return StringUtils.equalsAnyIgnoreCase(javaField, - // BaseEntity - "createBy", "createTime", "updateBy", "updateTime", "remark", - // TreeEntity - "parentName", "parentId", "orderNum", "ancestors"); - } - - public boolean isUsableColumn() { - return isUsableColumn(javaField); - } - - public static boolean isUsableColumn(String javaField) { - // isSuperColumn()中的名单用于避免生成多余Domain属性,若某些属性在生成页面时需要用到不能忽略,则放在此处白名单 - return StringUtils.equalsAnyIgnoreCase(javaField, "parentId", "orderNum", "remark"); - } - - public String readConverterExp() { - String remarks = StringUtils.substringBetween(this.columnComment, "(", ")"); - StringBuffer sb = new StringBuffer(); - if (StringUtils.isNotEmpty(remarks)) { - for (String value : remarks.split(" ")) { - if (StringUtils.isNotEmpty(value)) { - Object startStr = value.subSequence(0, 1); - String endStr = value.substring(1); - sb.append("").append(startStr).append("=").append(endStr).append(","); - } - } - return sb.deleteCharAt(sb.length() - 1).toString(); - } else { - return this.columnComment; - } - } -} diff --git a/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/mapper/GenTableColumnMapper.java b/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/mapper/GenTableColumnMapper.java deleted file mode 100644 index ffbb6ca4..00000000 --- a/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/mapper/GenTableColumnMapper.java +++ /dev/null @@ -1,60 +0,0 @@ -package com.ruoyi.generator.mapper; - -import java.util.List; - -import com.ruoyi.generator.domain.GenTableColumn; - -/** - * 业务字段 数据层 - * - * @author ruoyi - */ -public interface GenTableColumnMapper { - /** - * 根据表名称查询列信息 - * - * @param tableName 表名称 - * @return 列信息 - */ - public List selectDbTableColumnsByName(String tableName); - - /** - * 查询业务字段列表 - * - * @param tableId 业务字段编号 - * @return 业务字段集合 - */ - public List selectGenTableColumnListByTableId(Long tableId); - - /** - * 新增业务字段 - * - * @param genTableColumn 业务字段信息 - * @return 结果 - */ - public int insertGenTableColumn(GenTableColumn genTableColumn); - - /** - * 修改业务字段 - * - * @param genTableColumn 业务字段信息 - * @return 结果 - */ - public int updateGenTableColumn(GenTableColumn genTableColumn); - - /** - * 删除业务字段 - * - * @param genTableColumns 列数据 - * @return 结果 - */ - public int deleteGenTableColumns(List genTableColumns); - - /** - * 批量删除业务字段 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - public int deleteGenTableColumnByIds(Long[] ids); -} diff --git a/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/mapper/GenTableMapper.java b/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/mapper/GenTableMapper.java deleted file mode 100644 index 7ea272e0..00000000 --- a/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/mapper/GenTableMapper.java +++ /dev/null @@ -1,83 +0,0 @@ -package com.ruoyi.generator.mapper; - -import java.util.List; - -import com.ruoyi.generator.domain.GenTable; - -/** - * 业务 数据层 - * - * @author ruoyi - */ -public interface GenTableMapper { - /** - * 查询业务列表 - * - * @param genTable 业务信息 - * @return 业务集合 - */ - public List selectGenTableList(GenTable genTable); - - /** - * 查询据库列表 - * - * @param genTable 业务信息 - * @return 数据库表集合 - */ - public List selectDbTableList(GenTable genTable); - - /** - * 查询据库列表 - * - * @param tableNames 表名称组 - * @return 数据库表集合 - */ - public List selectDbTableListByNames(String[] tableNames); - - /** - * 查询所有表信息 - * - * @return 表信息集合 - */ - public List selectGenTableAll(); - - /** - * 查询表ID业务信息 - * - * @param id 业务ID - * @return 业务信息 - */ - public GenTable selectGenTableById(Long id); - - /** - * 查询表名称业务信息 - * - * @param tableName 表名称 - * @return 业务信息 - */ - public GenTable selectGenTableByName(String tableName); - - /** - * 新增业务 - * - * @param genTable 业务信息 - * @return 结果 - */ - public int insertGenTable(GenTable genTable); - - /** - * 修改业务 - * - * @param genTable 业务信息 - * @return 结果 - */ - public int updateGenTable(GenTable genTable); - - /** - * 批量删除业务 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - public int deleteGenTableByIds(Long[] ids); -} diff --git a/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableColumnServiceImpl.java b/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableColumnServiceImpl.java deleted file mode 100644 index 9f57c46a..00000000 --- a/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableColumnServiceImpl.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.ruoyi.generator.service; - -import java.util.List; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import com.ruoyi.common.core.text.Convert; -import com.ruoyi.generator.domain.GenTableColumn; -import com.ruoyi.generator.mapper.GenTableColumnMapper; - -/** - * 业务字段 服务层实现 - * - * @author ruoyi - */ -@Service -public class GenTableColumnServiceImpl implements IGenTableColumnService { - @Autowired - private GenTableColumnMapper genTableColumnMapper; - - /** - * 查询业务字段列表 - * - * @param tableId 业务字段编号 - * @return 业务字段集合 - */ - @Override - public List selectGenTableColumnListByTableId(Long tableId) { - return genTableColumnMapper.selectGenTableColumnListByTableId(tableId); - } - - /** - * 新增业务字段 - * - * @param genTableColumn 业务字段信息 - * @return 结果 - */ - @Override - public int insertGenTableColumn(GenTableColumn genTableColumn) { - return genTableColumnMapper.insertGenTableColumn(genTableColumn); - } - - /** - * 修改业务字段 - * - * @param genTableColumn 业务字段信息 - * @return 结果 - */ - @Override - public int updateGenTableColumn(GenTableColumn genTableColumn) { - return genTableColumnMapper.updateGenTableColumn(genTableColumn); - } - - /** - * 删除业务字段对象 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - @Override - public int deleteGenTableColumnByIds(String ids) { - return genTableColumnMapper.deleteGenTableColumnByIds(Convert.toLongArray(ids)); - } -} diff --git a/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableServiceImpl.java b/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableServiceImpl.java deleted file mode 100644 index f14d1680..00000000 --- a/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/service/GenTableServiceImpl.java +++ /dev/null @@ -1,438 +0,0 @@ -package com.ruoyi.generator.service; - -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.IOException; -import java.io.StringWriter; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; -import java.util.zip.ZipEntry; -import java.util.zip.ZipOutputStream; - -import org.apache.commons.io.IOUtils; -import org.apache.velocity.Template; -import org.apache.velocity.VelocityContext; -import org.apache.velocity.app.Velocity; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import com.ruoyi.common.constant.Constants; -import com.ruoyi.common.constant.GenConstants; -import com.ruoyi.common.core.text.CharsetKit; -import com.ruoyi.common.exception.CustomException; -import com.ruoyi.common.utils.SecurityUtils; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.common.utils.file.FileUtils; -import com.ruoyi.generator.domain.GenTable; -import com.ruoyi.generator.domain.GenTableColumn; -import com.ruoyi.generator.mapper.GenTableColumnMapper; -import com.ruoyi.generator.mapper.GenTableMapper; -import com.ruoyi.generator.util.GenUtils; -import com.ruoyi.generator.util.VelocityInitializer; -import com.ruoyi.generator.util.VelocityUtils; - -/** - * 业务 服务层实现 - * - * @author ruoyi - */ -@Service -public class GenTableServiceImpl implements IGenTableService { - private static final Logger log = LoggerFactory.getLogger(GenTableServiceImpl.class); - - @Autowired - private GenTableMapper genTableMapper; - - @Autowired - private GenTableColumnMapper genTableColumnMapper; - - /** - * 查询业务信息 - * - * @param id 业务ID - * @return 业务信息 - */ - @Override - public GenTable selectGenTableById(Long id) { - GenTable genTable = genTableMapper.selectGenTableById(id); - setTableFromOptions(genTable); - return genTable; - } - - /** - * 查询业务列表 - * - * @param genTable 业务信息 - * @return 业务集合 - */ - @Override - public List selectGenTableList(GenTable genTable) { - return genTableMapper.selectGenTableList(genTable); - } - - /** - * 查询据库列表 - * - * @param genTable 业务信息 - * @return 数据库表集合 - */ - @Override - public List selectDbTableList(GenTable genTable) { - return genTableMapper.selectDbTableList(genTable); - } - - /** - * 查询据库列表 - * - * @param tableNames 表名称组 - * @return 数据库表集合 - */ - @Override - public List selectDbTableListByNames(String[] tableNames) { - return genTableMapper.selectDbTableListByNames(tableNames); - } - - /** - * 查询所有表信息 - * - * @return 表信息集合 - */ - @Override - public List selectGenTableAll() { - return genTableMapper.selectGenTableAll(); - } - - /** - * 修改业务 - * - * @param genTable 业务信息 - * @return 结果 - */ - @Override - @Transactional - public void updateGenTable(GenTable genTable) { - String options = JSON.toJSONString(genTable.getParams()); - genTable.setOptions(options); - int row = genTableMapper.updateGenTable(genTable); - if (row > 0) { - for (GenTableColumn cenTableColumn : genTable.getColumns()) { - genTableColumnMapper.updateGenTableColumn(cenTableColumn); - } - } - } - - /** - * 删除业务对象 - * - * @param tableIds 需要删除的数据ID - * @return 结果 - */ - @Override - @Transactional - public void deleteGenTableByIds(Long[] tableIds) { - genTableMapper.deleteGenTableByIds(tableIds); - genTableColumnMapper.deleteGenTableColumnByIds(tableIds); - } - - /** - * 导入表结构 - * - * @param tableList 导入表列表 - */ - @Override - @Transactional - public void importGenTable(List tableList) { - String operName = SecurityUtils.getUsername(); - try { - for (GenTable table : tableList) { - String tableName = table.getTableName(); - GenUtils.initTable(table, operName); - int row = genTableMapper.insertGenTable(table); - if (row > 0) { - // 保存列信息 - List genTableColumns = genTableColumnMapper.selectDbTableColumnsByName(tableName); - for (GenTableColumn column : genTableColumns) { - GenUtils.initColumnField(column, table); - genTableColumnMapper.insertGenTableColumn(column); - } - } - } - } catch (Exception e) { - throw new CustomException("导入失败:" + e.getMessage()); - } - } - - /** - * 预览代码 - * - * @param tableId 表编号 - * @return 预览数据列表 - */ - @Override - public Map previewCode(Long tableId) { - Map dataMap = new LinkedHashMap<>(); - // 查询表信息 - GenTable table = genTableMapper.selectGenTableById(tableId); - // 设置主子表信息 - setSubTable(table); - // 设置主键列信息 - setPkColumn(table); - VelocityInitializer.initVelocity(); - - VelocityContext context = VelocityUtils.prepareContext(table); - - // 获取模板列表 - List templates = VelocityUtils.getTemplateList(table.getTplCategory()); - for (String template : templates) { - // 渲染模板 - StringWriter sw = new StringWriter(); - Template tpl = Velocity.getTemplate(template, Constants.UTF8); - tpl.merge(context, sw); - dataMap.put(template, sw.toString()); - } - return dataMap; - } - - /** - * 生成代码(下载方式) - * - * @param tableName 表名称 - * @return 数据 - */ - @Override - public byte[] downloadCode(String tableName) { - ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); - ZipOutputStream zip = new ZipOutputStream(outputStream); - generatorCode(tableName, zip); - IOUtils.closeQuietly(zip); - return outputStream.toByteArray(); - } - - /** - * 生成代码(自定义路径) - * - * @param tableName 表名称 - */ - @Override - public void generatorCode(String tableName) { - // 查询表信息 - GenTable table = genTableMapper.selectGenTableByName(tableName); - // 设置主子表信息 - setSubTable(table); - // 设置主键列信息 - setPkColumn(table); - - VelocityInitializer.initVelocity(); - - VelocityContext context = VelocityUtils.prepareContext(table); - - // 获取模板列表 - List templates = VelocityUtils.getTemplateList(table.getTplCategory()); - for (String template : templates) { - if (!StringUtils.containsAny(template, "sql.vm", "api.js.vm", "index.vue.vm", "index-tree.vue.vm")) { - // 渲染模板 - StringWriter sw = new StringWriter(); - Template tpl = Velocity.getTemplate(template, Constants.UTF8); - tpl.merge(context, sw); - try { - String path = getGenPath(table, template); - FileUtils.writeStringToFile(new File(path), sw.toString(), CharsetKit.UTF_8); - } catch (IOException e) { - throw new CustomException("渲染模板失败,表名:" + table.getTableName()); - } - } - } - } - - /** - * 同步数据库 - * - * @param tableName 表名称 - */ - @Override - @Transactional - public void synchDb(String tableName) { - GenTable table = genTableMapper.selectGenTableByName(tableName); - List tableColumns = table.getColumns(); - List tableColumnNames = tableColumns.stream().map(GenTableColumn::getColumnName).collect(Collectors.toList()); - - List dbTableColumns = genTableColumnMapper.selectDbTableColumnsByName(tableName); - if (StringUtils.isEmpty(dbTableColumns)) { - throw new CustomException("同步数据失败,原表结构不存在"); - } - List dbTableColumnNames = dbTableColumns.stream().map(GenTableColumn::getColumnName).collect(Collectors.toList()); - - dbTableColumns.forEach(column -> { - if (!tableColumnNames.contains(column.getColumnName())) { - GenUtils.initColumnField(column, table); - genTableColumnMapper.insertGenTableColumn(column); - } - }); - - List delColumns = tableColumns.stream().filter(column -> !dbTableColumnNames.contains(column.getColumnName())).collect(Collectors.toList()); - if (StringUtils.isNotEmpty(delColumns)) { - genTableColumnMapper.deleteGenTableColumns(delColumns); - } - } - - /** - * 批量生成代码(下载方式) - * - * @param tableNames 表数组 - * @return 数据 - */ - @Override - public byte[] downloadCode(String[] tableNames) { - ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); - ZipOutputStream zip = new ZipOutputStream(outputStream); - for (String tableName : tableNames) { - generatorCode(tableName, zip); - } - IOUtils.closeQuietly(zip); - return outputStream.toByteArray(); - } - - /** - * 查询表信息并生成代码 - */ - private void generatorCode(String tableName, ZipOutputStream zip) { - // 查询表信息 - GenTable table = genTableMapper.selectGenTableByName(tableName); - // 设置主子表信息 - setSubTable(table); - // 设置主键列信息 - setPkColumn(table); - - VelocityInitializer.initVelocity(); - - VelocityContext context = VelocityUtils.prepareContext(table); - - // 获取模板列表 - List templates = VelocityUtils.getTemplateList(table.getTplCategory()); - for (String template : templates) { - // 渲染模板 - StringWriter sw = new StringWriter(); - Template tpl = Velocity.getTemplate(template, Constants.UTF8); - tpl.merge(context, sw); - try { - // 添加到zip - zip.putNextEntry(new ZipEntry(VelocityUtils.getFileName(template, table))); - IOUtils.write(sw.toString(), zip, Constants.UTF8); - IOUtils.closeQuietly(sw); - zip.flush(); - zip.closeEntry(); - } catch (IOException e) { - log.error("渲染模板失败,表名:" + table.getTableName(), e); - } - } - } - - /** - * 修改保存参数校验 - * - * @param genTable 业务信息 - */ - @Override - public void validateEdit(GenTable genTable) { - if (GenConstants.TPL_TREE.equals(genTable.getTplCategory())) { - String options = JSON.toJSONString(genTable.getParams()); - JSONObject paramsObj = JSONObject.parseObject(options); - if (StringUtils.isEmpty(paramsObj.getString(GenConstants.TREE_CODE))) { - throw new CustomException("树编码字段不能为空"); - } else if (StringUtils.isEmpty(paramsObj.getString(GenConstants.TREE_PARENT_CODE))) { - throw new CustomException("树父编码字段不能为空"); - } else if (StringUtils.isEmpty(paramsObj.getString(GenConstants.TREE_NAME))) { - throw new CustomException("树名称字段不能为空"); - } else if (GenConstants.TPL_SUB.equals(genTable.getTplCategory())) { - if (StringUtils.isEmpty(genTable.getSubTableName())) { - throw new CustomException("关联子表的表名不能为空"); - } else if (StringUtils.isEmpty(genTable.getSubTableFkName())) { - throw new CustomException("子表关联的外键名不能为空"); - } - } - } - } - - /** - * 设置主键列信息 - * - * @param table 业务表信息 - */ - public void setPkColumn(GenTable table) { - for (GenTableColumn column : table.getColumns()) { - if (column.isPk()) { - table.setPkColumn(column); - break; - } - } - if (StringUtils.isNull(table.getPkColumn())) { - table.setPkColumn(table.getColumns().get(0)); - } - if (GenConstants.TPL_SUB.equals(table.getTplCategory())) { - for (GenTableColumn column : table.getSubTable().getColumns()) { - if (column.isPk()) { - table.getSubTable().setPkColumn(column); - break; - } - } - if (StringUtils.isNull(table.getSubTable().getPkColumn())) { - table.getSubTable().setPkColumn(table.getSubTable().getColumns().get(0)); - } - } - } - - /** - * 设置主子表信息 - * - * @param table 业务表信息 - */ - public void setSubTable(GenTable table) { - String subTableName = table.getSubTableName(); - if (StringUtils.isNotEmpty(subTableName)) { - table.setSubTable(genTableMapper.selectGenTableByName(subTableName)); - } - } - - /** - * 设置代码生成其他选项值 - * - * @param genTable 设置后的生成对象 - */ - public void setTableFromOptions(GenTable genTable) { - JSONObject paramsObj = JSONObject.parseObject(genTable.getOptions()); - if (StringUtils.isNotNull(paramsObj)) { - String treeCode = paramsObj.getString(GenConstants.TREE_CODE); - String treeParentCode = paramsObj.getString(GenConstants.TREE_PARENT_CODE); - String treeName = paramsObj.getString(GenConstants.TREE_NAME); - String parentMenuId = paramsObj.getString(GenConstants.PARENT_MENU_ID); - String parentMenuName = paramsObj.getString(GenConstants.PARENT_MENU_NAME); - - genTable.setTreeCode(treeCode); - genTable.setTreeParentCode(treeParentCode); - genTable.setTreeName(treeName); - genTable.setParentMenuId(parentMenuId); - genTable.setParentMenuName(parentMenuName); - } - } - - /** - * 获取代码生成地址 - * - * @param table 业务表信息 - * @param template 模板文件路径 - * @return 生成地址 - */ - public static String getGenPath(GenTable table, String template) { - String genPath = table.getGenPath(); - if (StringUtils.equals(genPath, "/")) { - return System.getProperty("user.dir") + File.separator + "src" + File.separator + VelocityUtils.getFileName(template, table); - } - return genPath + File.separator + VelocityUtils.getFileName(template, table); - } -} \ No newline at end of file diff --git a/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/service/IGenTableColumnService.java b/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/service/IGenTableColumnService.java deleted file mode 100644 index 417453af..00000000 --- a/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/service/IGenTableColumnService.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.ruoyi.generator.service; - -import java.util.List; - -import com.ruoyi.generator.domain.GenTableColumn; - -/** - * 业务字段 服务层 - * - * @author ruoyi - */ -public interface IGenTableColumnService { - /** - * 查询业务字段列表 - * - * @param tableId 业务字段编号 - * @return 业务字段集合 - */ - public List selectGenTableColumnListByTableId(Long tableId); - - /** - * 新增业务字段 - * - * @param genTableColumn 业务字段信息 - * @return 结果 - */ - public int insertGenTableColumn(GenTableColumn genTableColumn); - - /** - * 修改业务字段 - * - * @param genTableColumn 业务字段信息 - * @return 结果 - */ - public int updateGenTableColumn(GenTableColumn genTableColumn); - - /** - * 删除业务字段信息 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - public int deleteGenTableColumnByIds(String ids); -} diff --git a/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/service/IGenTableService.java b/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/service/IGenTableService.java deleted file mode 100644 index e7419d07..00000000 --- a/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/service/IGenTableService.java +++ /dev/null @@ -1,121 +0,0 @@ -package com.ruoyi.generator.service; - -import java.util.List; -import java.util.Map; - -import com.ruoyi.generator.domain.GenTable; - -/** - * 业务 服务层 - * - * @author ruoyi - */ -public interface IGenTableService { - /** - * 查询业务列表 - * - * @param genTable 业务信息 - * @return 业务集合 - */ - public List selectGenTableList(GenTable genTable); - - /** - * 查询据库列表 - * - * @param genTable 业务信息 - * @return 数据库表集合 - */ - public List selectDbTableList(GenTable genTable); - - /** - * 查询据库列表 - * - * @param tableNames 表名称组 - * @return 数据库表集合 - */ - public List selectDbTableListByNames(String[] tableNames); - - /** - * 查询所有表信息 - * - * @return 表信息集合 - */ - public List selectGenTableAll(); - - /** - * 查询业务信息 - * - * @param id 业务ID - * @return 业务信息 - */ - public GenTable selectGenTableById(Long id); - - /** - * 修改业务 - * - * @param genTable 业务信息 - * @return 结果 - */ - public void updateGenTable(GenTable genTable); - - /** - * 删除业务信息 - * - * @param tableIds 需要删除的表数据ID - * @return 结果 - */ - public void deleteGenTableByIds(Long[] tableIds); - - /** - * 导入表结构 - * - * @param tableList 导入表列表 - */ - public void importGenTable(List tableList); - - /** - * 预览代码 - * - * @param tableId 表编号 - * @return 预览数据列表 - */ - public Map previewCode(Long tableId); - - /** - * 生成代码(下载方式) - * - * @param tableName 表名称 - * @return 数据 - */ - public byte[] downloadCode(String tableName); - - /** - * 生成代码(自定义路径) - * - * @param tableName 表名称 - * @return 数据 - */ - public void generatorCode(String tableName); - - /** - * 同步数据库 - * - * @param tableName 表名称 - */ - public void synchDb(String tableName); - - /** - * 批量生成代码(下载方式) - * - * @param tableNames 表数组 - * @return 数据 - */ - public byte[] downloadCode(String[] tableNames); - - /** - * 修改保存参数校验 - * - * @param genTable 业务信息 - */ - public void validateEdit(GenTable genTable); -} diff --git a/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/util/GenUtils.java b/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/util/GenUtils.java deleted file mode 100644 index 395cdc87..00000000 --- a/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/util/GenUtils.java +++ /dev/null @@ -1,222 +0,0 @@ -package com.ruoyi.generator.util; - -import java.util.Arrays; - -import org.apache.commons.lang3.RegExUtils; -import com.ruoyi.common.constant.GenConstants; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.generator.config.GenConfig; -import com.ruoyi.generator.domain.GenTable; -import com.ruoyi.generator.domain.GenTableColumn; - -/** - * 代码生成器 工具类 - * - * @author ruoyi - */ -public class GenUtils { - /** - * 初始化表信息 - */ - public static void initTable(GenTable genTable, String operName) { - genTable.setClassName(convertClassName(genTable.getTableName())); - genTable.setPackageName(GenConfig.getPackageName()); - genTable.setModuleName(getModuleName(GenConfig.getPackageName())); - genTable.setBusinessName(getBusinessName(genTable.getTableName())); - genTable.setFunctionName(replaceText(genTable.getTableComment())); - genTable.setFunctionAuthor(GenConfig.getAuthor()); - genTable.setCreateBy(operName); - } - - /** - * 初始化列属性字段 - */ - public static void initColumnField(GenTableColumn column, GenTable table) { - String dataType = getDbType(column.getColumnType()); - String columnName = column.getColumnName(); - column.setTableId(table.getTableId()); - column.setCreateBy(table.getCreateBy()); - // 设置java字段名 - column.setJavaField(StringUtils.toCamelCase(columnName)); - // 设置默认类型 - column.setJavaType(GenConstants.TYPE_STRING); - - if (arraysContains(GenConstants.COLUMNTYPE_STR, dataType) || arraysContains(GenConstants.COLUMNTYPE_TEXT, dataType)) { - // 字符串长度超过500设置为文本域 - Integer columnLength = getColumnLength(column.getColumnType()); - String htmlType = columnLength >= 500 || arraysContains(GenConstants.COLUMNTYPE_TEXT, dataType) ? GenConstants.HTML_TEXTAREA : GenConstants.HTML_INPUT; - column.setHtmlType(htmlType); - } else if (arraysContains(GenConstants.COLUMNTYPE_TIME, dataType)) { - column.setJavaType(GenConstants.TYPE_DATE); - column.setHtmlType(GenConstants.HTML_DATETIME); - } else if (arraysContains(GenConstants.COLUMNTYPE_NUMBER, dataType)) { - column.setHtmlType(GenConstants.HTML_INPUT); - - // 如果是浮点型 统一用BigDecimal - String[] str = StringUtils.split(StringUtils.substringBetween(column.getColumnType(), "(", ")"), ","); - if (str != null && str.length == 2 && Integer.parseInt(str[1]) > 0) { - column.setJavaType(GenConstants.TYPE_BIGDECIMAL); - } - // 如果是整形 - else if (str != null && str.length == 1 && Integer.parseInt(str[0]) <= 10) { - column.setJavaType(GenConstants.TYPE_INTEGER); - } - // 长整形 - else { - column.setJavaType(GenConstants.TYPE_LONG); - } - } - - // 插入字段(默认所有字段都需要插入) - column.setIsInsert(GenConstants.REQUIRE); - - // 编辑字段 - if (!arraysContains(GenConstants.COLUMNNAME_NOT_EDIT, columnName) && !column.isPk()) { - column.setIsEdit(GenConstants.REQUIRE); - } - // 列表字段 - if (!arraysContains(GenConstants.COLUMNNAME_NOT_LIST, columnName) && !column.isPk()) { - column.setIsList(GenConstants.REQUIRE); - } - // 查询字段 - if (!arraysContains(GenConstants.COLUMNNAME_NOT_QUERY, columnName) && !column.isPk()) { - column.setIsQuery(GenConstants.REQUIRE); - } - - // 查询字段类型 - if (StringUtils.endsWithIgnoreCase(columnName, "name")) { - column.setQueryType(GenConstants.QUERY_LIKE); - } - // 状态字段设置单选框 - if (StringUtils.endsWithIgnoreCase(columnName, "status")) { - column.setHtmlType(GenConstants.HTML_RADIO); - } - // 类型&性别字段设置下拉框 - else if (StringUtils.endsWithIgnoreCase(columnName, "type") - || StringUtils.endsWithIgnoreCase(columnName, "sex")) { - column.setHtmlType(GenConstants.HTML_SELECT); - } - // 图片字段设置图片上传控件 - else if (StringUtils.endsWithIgnoreCase(columnName, "image")) { - column.setHtmlType(GenConstants.HTML_IMAGE_UPLOAD); - } - // 文件字段设置文件上传控件 - else if (StringUtils.endsWithIgnoreCase(columnName, "file")) { - column.setHtmlType(GenConstants.HTML_FILE_UPLOAD); - } - // 内容字段设置富文本控件 - else if (StringUtils.endsWithIgnoreCase(columnName, "content")) { - column.setHtmlType(GenConstants.HTML_EDITOR); - } - } - - /** - * 校验数组是否包含指定值 - * - * @param arr 数组 - * @param targetValue 值 - * @return 是否包含 - */ - public static boolean arraysContains(String[] arr, String targetValue) { - return Arrays.asList(arr).contains(targetValue); - } - - /** - * 获取模块名 - * - * @param packageName 包名 - * @return 模块名 - */ - public static String getModuleName(String packageName) { - int lastIndex = packageName.lastIndexOf("."); - int nameLength = packageName.length(); - String moduleName = StringUtils.substring(packageName, lastIndex + 1, nameLength); - return moduleName; - } - - /** - * 获取业务名 - * - * @param tableName 表名 - * @return 业务名 - */ - public static String getBusinessName(String tableName) { - int lastIndex = tableName.lastIndexOf("_"); - int nameLength = tableName.length(); - String businessName = StringUtils.substring(tableName, lastIndex + 1, nameLength); - return businessName; - } - - /** - * 表名转换成Java类名 - * - * @param tableName 表名称 - * @return 类名 - */ - public static String convertClassName(String tableName) { - boolean autoRemovePre = GenConfig.getAutoRemovePre(); - String tablePrefix = GenConfig.getTablePrefix(); - if (autoRemovePre && StringUtils.isNotEmpty(tablePrefix)) { - String[] searchList = StringUtils.split(tablePrefix, ","); - tableName = replaceFirst(tableName, searchList); - } - return StringUtils.convertToCamelCase(tableName); - } - - /** - * 批量替换前缀 - * - * @param replacementm 替换值 - * @param searchList 替换列表 - * @return - */ - public static String replaceFirst(String replacementm, String[] searchList) { - String text = replacementm; - for (String searchString : searchList) { - if (replacementm.startsWith(searchString)) { - text = replacementm.replaceFirst(searchString, ""); - break; - } - } - return text; - } - - /** - * 关键字替换 - * - * @param text 需要被替换的名字 - * @return 替换后的名字 - */ - public static String replaceText(String text) { - return RegExUtils.replaceAll(text, "(?:表|若依)", ""); - } - - /** - * 获取数据库类型字段 - * - * @param columnType 列类型 - * @return 截取后的列类型 - */ - public static String getDbType(String columnType) { - if (StringUtils.indexOf(columnType, "(") > 0) { - return StringUtils.substringBefore(columnType, "("); - } else { - return columnType; - } - } - - /** - * 获取字段长度 - * - * @param columnType 列类型 - * @return 截取后的列类型 - */ - public static Integer getColumnLength(String columnType) { - if (StringUtils.indexOf(columnType, "(") > 0) { - String length = StringUtils.substringBetween(columnType, "(", ")"); - return Integer.valueOf(length); - } else { - return 0; - } - } -} diff --git a/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityInitializer.java b/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityInitializer.java deleted file mode 100644 index 06f8c8fc..00000000 --- a/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityInitializer.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.ruoyi.generator.util; - -import java.util.Properties; - -import org.apache.velocity.app.Velocity; -import com.ruoyi.common.constant.Constants; - -/** - * VelocityEngine工厂 - * - * @author ruoyi - */ -public class VelocityInitializer { - /** - * 初始化vm方法 - */ - public static void initVelocity() { - Properties p = new Properties(); - try { - // 加载classpath目录下的vm文件 - p.setProperty("file.resource.loader.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader"); - // 定义字符集 - p.setProperty(Velocity.ENCODING_DEFAULT, Constants.UTF8); - p.setProperty(Velocity.OUTPUT_ENCODING, Constants.UTF8); - // 初始化Velocity引擎,指定配置Properties - Velocity.init(p); - } catch (Exception e) { - throw new RuntimeException(e); - } - } -} diff --git a/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityUtils.java b/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityUtils.java deleted file mode 100644 index ead5f928..00000000 --- a/spring-boot/ruoyi-generator/src/main/java/com/ruoyi/generator/util/VelocityUtils.java +++ /dev/null @@ -1,312 +0,0 @@ -package com.ruoyi.generator.util; - -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; - -import org.apache.velocity.VelocityContext; -import com.alibaba.fastjson.JSONObject; -import com.ruoyi.common.constant.GenConstants; -import com.ruoyi.common.utils.DateUtils; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.generator.domain.GenTable; -import com.ruoyi.generator.domain.GenTableColumn; - -/** - * 模板处理工具类 - * - * @author ruoyi - */ -public class VelocityUtils { - /** - * 项目空间路径 - */ - private static final String PROJECT_PATH = "main/java"; - - /** - * mybatis空间路径 - */ - private static final String MYBATIS_PATH = "main/resources/mapper"; - - /** - * 默认上级菜单,系统工具 - */ - private static final String DEFAULT_PARENT_MENU_ID = "3"; - - /** - * 设置模板变量信息 - * - * @return 模板列表 - */ - public static VelocityContext prepareContext(GenTable genTable) { - String moduleName = genTable.getModuleName(); - String businessName = genTable.getBusinessName(); - String packageName = genTable.getPackageName(); - String tplCategory = genTable.getTplCategory(); - String functionName = genTable.getFunctionName(); - - VelocityContext velocityContext = new VelocityContext(); - velocityContext.put("tplCategory", genTable.getTplCategory()); - velocityContext.put("tableName", genTable.getTableName()); - velocityContext.put("functionName", StringUtils.isNotEmpty(functionName) ? functionName : "【请填写功能名称】"); - velocityContext.put("ClassName", genTable.getClassName()); - velocityContext.put("className", StringUtils.uncapitalize(genTable.getClassName())); - velocityContext.put("moduleName", genTable.getModuleName()); - velocityContext.put("BusinessName", StringUtils.capitalize(genTable.getBusinessName())); - velocityContext.put("businessName", genTable.getBusinessName()); - velocityContext.put("basePackage", getPackagePrefix(packageName)); - velocityContext.put("packageName", packageName); - velocityContext.put("author", genTable.getFunctionAuthor()); - velocityContext.put("datetime", DateUtils.getDate()); - velocityContext.put("pkColumn", genTable.getPkColumn()); - velocityContext.put("importList", getImportList(genTable)); - velocityContext.put("permissionPrefix", getPermissionPrefix(moduleName, businessName)); - velocityContext.put("columns", genTable.getColumns()); - velocityContext.put("table", genTable); - setMenuVelocityContext(velocityContext, genTable); - if (GenConstants.TPL_TREE.equals(tplCategory)) { - setTreeVelocityContext(velocityContext, genTable); - } - if (GenConstants.TPL_SUB.equals(tplCategory)) { - setSubVelocityContext(velocityContext, genTable); - } - return velocityContext; - } - - public static void setMenuVelocityContext(VelocityContext context, GenTable genTable) { - String options = genTable.getOptions(); - JSONObject paramsObj = JSONObject.parseObject(options); - String parentMenuId = getParentMenuId(paramsObj); - context.put("parentMenuId", parentMenuId); - } - - public static void setTreeVelocityContext(VelocityContext context, GenTable genTable) { - String options = genTable.getOptions(); - JSONObject paramsObj = JSONObject.parseObject(options); - String treeCode = getTreecode(paramsObj); - String treeParentCode = getTreeParentCode(paramsObj); - String treeName = getTreeName(paramsObj); - - context.put("treeCode", treeCode); - context.put("treeParentCode", treeParentCode); - context.put("treeName", treeName); - context.put("expandColumn", getExpandColumn(genTable)); - if (paramsObj.containsKey(GenConstants.TREE_PARENT_CODE)) { - context.put("tree_parent_code", paramsObj.getString(GenConstants.TREE_PARENT_CODE)); - } - if (paramsObj.containsKey(GenConstants.TREE_NAME)) { - context.put("tree_name", paramsObj.getString(GenConstants.TREE_NAME)); - } - } - - public static void setSubVelocityContext(VelocityContext context, GenTable genTable) { - GenTable subTable = genTable.getSubTable(); - String subTableName = genTable.getSubTableName(); - String subTableFkName = genTable.getSubTableFkName(); - String subClassName = genTable.getSubTable().getClassName(); - String subTableFkClassName = StringUtils.convertToCamelCase(subTableFkName); - - context.put("subTable", subTable); - context.put("subTableName", subTableName); - context.put("subTableFkName", subTableFkName); - context.put("subTableFkClassName", subTableFkClassName); - context.put("subTableFkclassName", StringUtils.uncapitalize(subTableFkClassName)); - context.put("subClassName", subClassName); - context.put("subclassName", StringUtils.uncapitalize(subClassName)); - context.put("subImportList", getImportList(genTable.getSubTable())); - } - - /** - * 获取模板信息 - * - * @return 模板列表 - */ - public static List getTemplateList(String tplCategory) { - List templates = new ArrayList(); - templates.add("vm/java/domain.java.vm"); - templates.add("vm/java/mapper.java.vm"); - templates.add("vm/java/service.java.vm"); - templates.add("vm/java/serviceImpl.java.vm"); - templates.add("vm/java/controller.java.vm"); - templates.add("vm/xml/mapper.xml.vm"); - templates.add("vm/sql/sql.vm"); - templates.add("vm/js/api.js.vm"); - if (GenConstants.TPL_CRUD.equals(tplCategory)) { - templates.add("vm/vue/index.vue.vm"); - } else if (GenConstants.TPL_TREE.equals(tplCategory)) { - templates.add("vm/vue/index-tree.vue.vm"); - } else if (GenConstants.TPL_SUB.equals(tplCategory)) { - templates.add("vm/vue/index.vue.vm"); - templates.add("vm/java/sub-domain.java.vm"); - } - return templates; - } - - /** - * 获取文件名 - */ - public static String getFileName(String template, GenTable genTable) { - // 文件名称 - String fileName = ""; - // 包路径 - String packageName = genTable.getPackageName(); - // 模块名 - String moduleName = genTable.getModuleName(); - // 大写类名 - String className = genTable.getClassName(); - // 业务名称 - String businessName = genTable.getBusinessName(); - - String javaPath = PROJECT_PATH + "/" + StringUtils.replace(packageName, ".", "/"); - String mybatisPath = MYBATIS_PATH + "/" + moduleName; - String vuePath = "vue"; - - if (template.contains("domain.java.vm")) { - fileName = StringUtils.format("{}/domain/{}.java", javaPath, className); - } - if (template.contains("sub-domain.java.vm") && StringUtils.equals(GenConstants.TPL_SUB, genTable.getTplCategory())) { - fileName = StringUtils.format("{}/domain/{}.java", javaPath, genTable.getSubTable().getClassName()); - } else if (template.contains("mapper.java.vm")) { - fileName = StringUtils.format("{}/mapper/{}Mapper.java", javaPath, className); - } else if (template.contains("service.java.vm")) { - fileName = StringUtils.format("{}/service/I{}Service.java", javaPath, className); - } else if (template.contains("serviceImpl.java.vm")) { - fileName = StringUtils.format("{}/service/impl/{}ServiceImpl.java", javaPath, className); - } else if (template.contains("controller.java.vm")) { - fileName = StringUtils.format("{}/controller/{}Controller.java", javaPath, className); - } else if (template.contains("mapper.xml.vm")) { - fileName = StringUtils.format("{}/{}Mapper.xml", mybatisPath, className); - } else if (template.contains("sql.vm")) { - fileName = businessName + "Menu.sql"; - } else if (template.contains("api.js.vm")) { - fileName = StringUtils.format("{}/api/{}/{}.js", vuePath, moduleName, businessName); - } else if (template.contains("index.vue.vm")) { - fileName = StringUtils.format("{}/views/{}/{}/index.vue", vuePath, moduleName, businessName); - } else if (template.contains("index-tree.vue.vm")) { - fileName = StringUtils.format("{}/views/{}/{}/index.vue", vuePath, moduleName, businessName); - } - return fileName; - } - - /** - * 获取包前缀 - * - * @param packageName 包名称 - * @return 包前缀名称 - */ - public static String getPackagePrefix(String packageName) { - int lastIndex = packageName.lastIndexOf("."); - String basePackage = StringUtils.substring(packageName, 0, lastIndex); - return basePackage; - } - - /** - * 根据列类型获取导入包 - * - * @param genTable 业务表对象 - * @return 返回需要导入的包列表 - */ - public static HashSet getImportList(GenTable genTable) { - List columns = genTable.getColumns(); - GenTable subGenTable = genTable.getSubTable(); - HashSet importList = new HashSet(); - if (StringUtils.isNotNull(subGenTable)) { - importList.add("java.util.List"); - } - for (GenTableColumn column : columns) { - if (!column.isSuperColumn() && GenConstants.TYPE_DATE.equals(column.getJavaType())) { - importList.add("java.util.Date"); - importList.add("com.fasterxml.jackson.annotation.JsonFormat"); - } else if (!column.isSuperColumn() && GenConstants.TYPE_BIGDECIMAL.equals(column.getJavaType())) { - importList.add("java.math.BigDecimal"); - } - } - return importList; - } - - /** - * 获取权限前缀 - * - * @param moduleName 模块名称 - * @param businessName 业务名称 - * @return 返回权限前缀 - */ - public static String getPermissionPrefix(String moduleName, String businessName) { - return StringUtils.format("{}:{}", moduleName, businessName); - } - - /** - * 获取上级菜单ID字段 - * - * @param paramsObj 生成其他选项 - * @return 上级菜单ID字段 - */ - public static String getParentMenuId(JSONObject paramsObj) { - if (StringUtils.isNotEmpty(paramsObj) && paramsObj.containsKey(GenConstants.PARENT_MENU_ID)) { - return paramsObj.getString(GenConstants.PARENT_MENU_ID); - } - return DEFAULT_PARENT_MENU_ID; - } - - /** - * 获取树编码 - * - * @param paramsObj 生成其他选项 - * @return 树编码 - */ - public static String getTreecode(JSONObject paramsObj) { - if (paramsObj.containsKey(GenConstants.TREE_CODE)) { - return StringUtils.toCamelCase(paramsObj.getString(GenConstants.TREE_CODE)); - } - return StringUtils.EMPTY; - } - - /** - * 获取树父编码 - * - * @param paramsObj 生成其他选项 - * @return 树父编码 - */ - public static String getTreeParentCode(JSONObject paramsObj) { - if (paramsObj.containsKey(GenConstants.TREE_PARENT_CODE)) { - return StringUtils.toCamelCase(paramsObj.getString(GenConstants.TREE_PARENT_CODE)); - } - return StringUtils.EMPTY; - } - - /** - * 获取树名称 - * - * @param paramsObj 生成其他选项 - * @return 树名称 - */ - public static String getTreeName(JSONObject paramsObj) { - if (paramsObj.containsKey(GenConstants.TREE_NAME)) { - return StringUtils.toCamelCase(paramsObj.getString(GenConstants.TREE_NAME)); - } - return StringUtils.EMPTY; - } - - /** - * 获取需要在哪一列上面显示展开按钮 - * - * @param genTable 业务表对象 - * @return 展开按钮列序号 - */ - public static int getExpandColumn(GenTable genTable) { - String options = genTable.getOptions(); - JSONObject paramsObj = JSONObject.parseObject(options); - String treeName = paramsObj.getString(GenConstants.TREE_NAME); - int num = 0; - for (GenTableColumn column : genTable.getColumns()) { - if (column.isList()) { - num++; - String columnName = column.getColumnName(); - if (columnName.equals(treeName)) { - break; - } - } - } - return num; - } -} diff --git a/spring-boot/ruoyi-generator/src/main/resources/generator.yml b/spring-boot/ruoyi-generator/src/main/resources/generator.yml deleted file mode 100644 index 55db2bd7..00000000 --- a/spring-boot/ruoyi-generator/src/main/resources/generator.yml +++ /dev/null @@ -1,10 +0,0 @@ -# 代码生成 -gen: - # 作者 - author: wxy - # 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool - packageName: com.ruoyi.system - # 自动去除表前缀,默认是false - autoRemovePre: false - # 表前缀(生成类名不会包含表前缀,多个用逗号分隔) - tablePrefix: sys_ \ No newline at end of file diff --git a/spring-boot/ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml b/spring-boot/ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml deleted file mode 100644 index 27e3f654..00000000 --- a/spring-boot/ruoyi-generator/src/main/resources/mapper/generator/GenTableColumnMapper.xml +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - select column_id, table_id, column_name, column_comment, column_type, java_type, java_field, is_pk, - is_increment, is_required, is_insert, is_edit, is_list, is_query, query_type, html_type, dict_type, sort, - create_by, create_time, update_by, update_time from gen_table_column - - - - - - - - insert into gen_table_column ( - table_id, - column_name, - column_comment, - column_type, - java_type, - java_field, - is_pk, - is_increment, - is_required, - is_insert, - is_edit, - is_list, - is_query, - query_type, - html_type, - dict_type, - sort, - create_by, - create_time - )values( - #{tableId}, - #{columnName}, - #{columnComment}, - #{columnType}, - #{javaType}, - #{javaField}, - #{isPk}, - #{isIncrement}, - #{isRequired}, - #{isInsert}, - #{isEdit}, - #{isList}, - #{isQuery}, - #{queryType}, - #{htmlType}, - #{dictType}, - #{sort}, - #{createBy}, - sysdate() - ) - - - - update gen_table_column - - column_comment = #{columnComment}, - java_type = #{javaType}, - java_field = #{javaField}, - is_insert = #{isInsert}, - is_edit = #{isEdit}, - is_list = #{isList}, - is_query = #{isQuery}, - is_required = #{isRequired}, - query_type = #{queryType}, - html_type = #{htmlType}, - dict_type = #{dictType}, - sort = #{sort}, - update_by = #{updateBy}, - update_time = sysdate() - - where column_id = #{columnId} - - - - delete from gen_table_column where table_id in - - #{tableId} - - - - - delete from gen_table_column where column_id in - - #{item.columnId} - - - - \ No newline at end of file diff --git a/spring-boot/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml b/spring-boot/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml deleted file mode 100644 index 089192d4..00000000 --- a/spring-boot/ruoyi-generator/src/main/resources/mapper/generator/GenTableMapper.xml +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - select table_id, table_name, table_comment, sub_table_name, sub_table_fk_name, class_name, tpl_category, - package_name, module_name, business_name, function_name, function_author, gen_type, gen_path, options, - create_by, create_time, update_by, update_time, remark from gen_table - - - - - - - - - - - - - - - - - - insert into gen_table ( - table_name, - table_comment, - class_name, - tpl_category, - package_name, - module_name, - business_name, - function_name, - function_author, - gen_type, - gen_path, - remark, - create_by, - create_time - )values( - #{tableName}, - #{tableComment}, - #{className}, - #{tplCategory}, - #{packageName}, - #{moduleName}, - #{businessName}, - #{functionName}, - #{functionAuthor}, - #{genType}, - #{genPath}, - #{remark}, - #{createBy}, - sysdate() - ) - - - - update gen_table - - table_name = #{tableName}, - table_comment = #{tableComment}, - sub_table_name = #{subTableName}, - sub_table_fk_name = #{subTableFkName}, - class_name = #{className}, - function_author = #{functionAuthor}, - gen_type = #{genType}, - gen_path = #{genPath}, - tpl_category = #{tplCategory}, - package_name = #{packageName}, - module_name = #{moduleName}, - business_name = #{businessName}, - function_name = #{functionName}, - options = #{options}, - update_by = #{updateBy}, - remark = #{remark}, - update_time = sysdate() - - where table_id = #{tableId} - - - - delete from gen_table where table_id in - - #{tableId} - - - - \ No newline at end of file diff --git a/spring-boot/ruoyi-generator/src/main/resources/vm/java/controller.java.vm b/spring-boot/ruoyi-generator/src/main/resources/vm/java/controller.java.vm deleted file mode 100644 index a66cdab0..00000000 --- a/spring-boot/ruoyi-generator/src/main/resources/vm/java/controller.java.vm +++ /dev/null @@ -1,107 +0,0 @@ -package ${packageName}.controller; - -import java.util.List; - -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.enums.BusinessType; -import ${packageName}.domain.${ClassName}; -import ${packageName}.service.I${ClassName}Service; -import com.ruoyi.common.utils.poi.ExcelUtil; -#if($table.crud || $table.sub) -import com.ruoyi.common.core.page.TableDataInfo; -#elseif($table.tree) -#end - -/** - * ${functionName}Controller - * - * @author ${author} - * @date ${datetime} - */ -@RestController -@RequestMapping("/${moduleName}/${businessName}") -public class ${ClassName}Controller extends BaseController { - @Autowired - private I${ClassName}Service ${className}Service; - -/** - * 查询${functionName}列表 - */ -@PreAuthorize("@ss.hasPermi('${permissionPrefix}:list')") -@GetMapping("/list") - #if($table.crud || $table.sub) - public TableDataInfo list(${ClassName} ${className}) { - startPage(); - List<${ClassName}> list = ${className}Service.select${ClassName}List(${className}); - return getDataTable(list); - } - #elseif($table.tree) - public AjaxResult list(${ClassName} ${className}) { - List<${ClassName}> list = ${className}Service.select${ClassName}List(${className}); - return AjaxResult.success(list); - } - #end - - /** - * 导出${functionName}列表 - */ - @PreAuthorize("@ss.hasPermi('${permissionPrefix}:export')") - @Log(title = "${functionName}", businessType = BusinessType.EXPORT) - @GetMapping("/export") - public AjaxResult export(${ClassName} ${className}) { - List<${ClassName}> list = ${className}Service.select${ClassName}List(${className}); - ExcelUtil<${ClassName}> util = new ExcelUtil<${ClassName}>(${ClassName}. class); - return util.exportExcel(list, "${businessName}"); - } - - /** - * 获取${functionName}详细信息 - */ - @PreAuthorize("@ss.hasPermi('${permissionPrefix}:query')") - @GetMapping(value = "/{${pkColumn.javaField}}") - public AjaxResult getInfo(@PathVariable("${pkColumn.javaField}") ${pkColumn.javaType} ${pkColumn.javaField}) { - return AjaxResult.success(${className}Service.select${ClassName}ById(${pkColumn.javaField})); - } - - /** - * 新增${functionName} - */ - @PreAuthorize("@ss.hasPermi('${permissionPrefix}:add')") - @Log(title = "${functionName}", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@RequestBody ${ClassName} ${className}) { - return toAjax(${className}Service.insert${ClassName}(${className})); - } - - /** - * 修改${functionName} - */ - @PreAuthorize("@ss.hasPermi('${permissionPrefix}:edit')") - @Log(title = "${functionName}", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@RequestBody ${ClassName} ${className}) { - return toAjax(${className}Service.update${ClassName}(${className})); - } - - /** - * 删除${functionName} - */ - @PreAuthorize("@ss.hasPermi('${permissionPrefix}:remove')") - @Log(title = "${functionName}", businessType = BusinessType.DELETE) - @DeleteMapping("/{${pkColumn.javaField}s}") - public AjaxResult remove(@PathVariable ${pkColumn.javaType}[] ${pkColumn.javaField}s) { - return toAjax(${className}Service.delete${ClassName}ByIds(${pkColumn.javaField}s)); - } -} diff --git a/spring-boot/ruoyi-generator/src/main/resources/vm/java/domain.java.vm b/spring-boot/ruoyi-generator/src/main/resources/vm/java/domain.java.vm deleted file mode 100644 index ea9d7aa2..00000000 --- a/spring-boot/ruoyi-generator/src/main/resources/vm/java/domain.java.vm +++ /dev/null @@ -1,105 +0,0 @@ -package ${packageName}.domain; - -#foreach ($import in $importList) -import ${import}; -#end -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.annotation.Excel; -#if($table.crud || $table.sub) -import com.ruoyi.common.core.domain.BaseEntity; -#elseif($table.tree) -import com.ruoyi.common.core.domain.TreeEntity; -#end - -/** - * ${functionName}对象 ${tableName} - * - * @author ${author} - * @date ${datetime} - */ -#if($table.crud || $table.sub) - #set($Entity="BaseEntity") -#elseif($table.tree) - #set($Entity="TreeEntity") -#end -public class ${ClassName} extends ${Entity} - { -private static final long serialVersionUID=1L; - -#foreach ($column in $columns) - #if(!$table.isSuperColumn($column.javaField)) - /** $column.columnComment */ - #if($column.list) - #set($parentheseIndex=$column.columnComment.indexOf("(")) - #if($parentheseIndex != -1) - #set($comment=$column.columnComment.substring(0, $parentheseIndex)) - #else - #set($comment=$column.columnComment) - #end - #if($parentheseIndex != -1) - @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") - #elseif($column.javaType == 'Date') - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "${comment}", width = 30, dateFormat = "yyyy-MM-dd") - #else - @Excel(name = "${comment}") - #end - #end - private $column.javaType $column.javaField; - - #end -#end -#if($table.sub) -/** $table.subTable.functionName信息 */ -private List<${subClassName}> ${subclassName}List; - -#end -#foreach ($column in $columns) - #if(!$table.isSuperColumn($column.javaField)) - #if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]")) - #set($AttrName=$column.javaField) - #else - #set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) - #end - public void set${AttrName}($column.javaType $column.javaField) - { - this.$column.javaField = $column.javaField; - } - - public $column.javaType get${AttrName}() - { - return $column.javaField; - } - #end -#end - -#if($table.sub) -public List<${subClassName}> get${subClassName}List() - { - return ${subclassName}List; - } - -public void set${subClassName}List(List<${subClassName}> ${subclassName}List) - { - this.${subclassName}List= ${subclassName}List; - } - -#end -@Override -public String toString(){ - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - #foreach ($column in $columns) - #if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]")) - #set($AttrName=$column.javaField) - #else - #set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) - #end - .append("${column.javaField}",get${AttrName}()) - #end - #if($table.sub) - .append("${subclassName}List",get${subClassName}List()) - #end - .toString(); - } - } diff --git a/spring-boot/ruoyi-generator/src/main/resources/vm/java/mapper.java.vm b/spring-boot/ruoyi-generator/src/main/resources/vm/java/mapper.java.vm deleted file mode 100644 index 16d7807c..00000000 --- a/spring-boot/ruoyi-generator/src/main/resources/vm/java/mapper.java.vm +++ /dev/null @@ -1,91 +0,0 @@ -package ${packageName}.mapper; - -import java.util.List; - -import ${packageName}.domain.${ClassName}; -#if($table.sub) -import ${packageName}.domain.${subClassName}; -#end - -/** - * ${functionName}Mapper接口 - * - * @author ${author} - * @date ${datetime} - */ -public interface ${ClassName}Mapper { - /** - * 查询${functionName} - * - * @param ${pkColumn.javaField} ${functionName}ID - * @return ${functionName} - */ - public ${ClassName} select${ClassName}ById(${pkColumn.javaType} ${pkColumn.javaField}); - - /** - * 查询${functionName}列表 - * - * @param ${className} ${functionName} - * @return ${functionName}集合 - */ - public List<${ClassName}> select${ClassName}List(${ClassName} ${className}); - - /** - * 新增${functionName} - * - * @param ${className} ${functionName} - * @return 结果 - */ - public int insert${ClassName}(${ClassName} ${className}); - - /** - * 修改${functionName} - * - * @param ${className} ${functionName} - * @return 结果 - */ - public int update${ClassName}(${ClassName} ${className}); - - /** - * 删除${functionName} - * - * @param ${pkColumn.javaField} ${functionName}ID - * @return 结果 - */ - public int delete${ClassName}ById(${pkColumn.javaType} ${pkColumn.javaField}); - - /** - * 批量删除${functionName} - * - * @param ${pkColumn.javaField}s 需要删除的数据ID - * @return 结果 - */ - public int delete${ClassName}ByIds(${pkColumn.javaType}[] ${pkColumn.javaField}s); - #if($table.sub) - - /** - * 批量删除${subTable.functionName} - * - * @param customerIds 需要删除的数据ID - * @return 结果 - */ - public int delete${subClassName}By${subTableFkClassName}s(${pkColumn.javaType}[] ${pkColumn.javaField}s); - - /** - * 批量新增${subTable.functionName} - * - * @param ${subclassName}List ${subTable.functionName}列表 - * @return 结果 - */ - public int batch${subClassName}(List<${subClassName}> ${subclassName}List); - - - /** - * 通过${functionName}ID删除${subTable.functionName}信息 - * - * @param roleId 角色ID - * @return 结果 - */ - public int delete${subClassName}By${subTableFkClassName}(${pkColumn.javaType} ${pkColumn.javaField}); - #end -} diff --git a/spring-boot/ruoyi-generator/src/main/resources/vm/java/service.java.vm b/spring-boot/ruoyi-generator/src/main/resources/vm/java/service.java.vm deleted file mode 100644 index ac08ba9b..00000000 --- a/spring-boot/ruoyi-generator/src/main/resources/vm/java/service.java.vm +++ /dev/null @@ -1,61 +0,0 @@ -package ${packageName}.service; - -import java.util.List; - -import ${packageName}.domain.${ClassName}; - -/** - * ${functionName}Service接口 - * - * @author ${author} - * @date ${datetime} - */ -public interface I${ClassName}Service { - /** - * 查询${functionName} - * - * @param ${pkColumn.javaField} ${functionName}ID - * @return ${functionName} - */ - public ${ClassName} select${ClassName}ById(${pkColumn.javaType} ${pkColumn.javaField}); - - /** - * 查询${functionName}列表 - * - * @param ${className} ${functionName} - * @return ${functionName}集合 - */ - public List<${ClassName}> select${ClassName}List(${ClassName} ${className}); - - /** - * 新增${functionName} - * - * @param ${className} ${functionName} - * @return 结果 - */ - public int insert${ClassName}(${ClassName} ${className}); - - /** - * 修改${functionName} - * - * @param ${className} ${functionName} - * @return 结果 - */ - public int update${ClassName}(${ClassName} ${className}); - - /** - * 批量删除${functionName} - * - * @param ${pkColumn.javaField}s 需要删除的${functionName}ID - * @return 结果 - */ - public int delete${ClassName}ByIds(${pkColumn.javaType}[] ${pkColumn.javaField}s); - - /** - * 删除${functionName}信息 - * - * @param ${pkColumn.javaField} ${functionName}ID - * @return 结果 - */ - public int delete${ClassName}ById(${pkColumn.javaType} ${pkColumn.javaField}); -} diff --git a/spring-boot/ruoyi-generator/src/main/resources/vm/java/serviceImpl.java.vm b/spring-boot/ruoyi-generator/src/main/resources/vm/java/serviceImpl.java.vm deleted file mode 100644 index fa0b6ee6..00000000 --- a/spring-boot/ruoyi-generator/src/main/resources/vm/java/serviceImpl.java.vm +++ /dev/null @@ -1,158 +0,0 @@ -package ${packageName}.service.impl; - -import java.util.List; - #foreach ($column in $columns) - #if($column.javaField == 'createTime' || $column.javaField == 'updateTime') - import com.ruoyi.common.utils.DateUtils; - #break - #end - #end -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - #if($table.sub) - import java.util.ArrayList; - - import com.ruoyi.common.utils.StringUtils; - import org.springframework.transaction.annotation.Transactional; - import ${packageName}.domain.${subClassName}; - #end -import ${packageName}.mapper.${ClassName}Mapper; -import ${packageName}.domain.${ClassName}; -import ${packageName}.service.I${ClassName}Service; - -/** - * ${functionName}Service业务层处理 - * - * @author ${author} - * @date ${datetime} - */ -@Service -public class ${ClassName}ServiceImpl implements I${ClassName}Service { - @Autowired - private ${ClassName}Mapper ${className}Mapper; - - /** - * 查询${functionName} - * - * @param ${pkColumn.javaField} ${functionName}ID - * @return ${functionName} - */ - @Override - public ${ClassName} select${ClassName}ById(${pkColumn.javaType} ${pkColumn.javaField}) { - return ${className}Mapper.select${ClassName}ById(${pkColumn.javaField}); - } - - /** - * 查询${functionName}列表 - * - * @param ${className} ${functionName} - * @return ${functionName} - */ - @Override - public List<${ClassName}> select${ClassName}List(${ClassName} ${className}) { - return ${className}Mapper.select${ClassName}List(${className}); - } - - /** - * 新增${functionName} - * - * @param ${className} ${functionName} - * @return 结果 - */ - #if($table.sub) - @Transactional - #end - @Override - public int insert${ClassName}(${ClassName} ${className}) { - #foreach ($column in $columns) - #if($column.javaField == 'createTime') - ${className}.setCreateTime(DateUtils.getNowDate()); - #end - #end - #if($table.sub) - int rows = ${className}Mapper.insert${ClassName}(${className}); - insert${subClassName}(${className}); - return rows; - #else - return ${className}Mapper.insert${ClassName}(${className}); - #end - } - - /** - * 修改${functionName} - * - * @param ${className} ${functionName} - * @return 结果 - */ - #if($table.sub) - @Transactional - #end - @Override - public int update${ClassName}(${ClassName} ${className}) { - #foreach ($column in $columns) - #if($column.javaField == 'updateTime') - ${className}.setUpdateTime(DateUtils.getNowDate()); - #end - #end - #if($table.sub) - ${className}Mapper.delete${subClassName}By${subTableFkClassName}(${className}.get${pkColumn.capJavaField}()) - ; - insert${subClassName}(${className}); - #end - return ${className}Mapper.update${ClassName}(${className}); - } - - /** - * 批量删除${functionName} - * - * @param ${pkColumn.javaField}s 需要删除的${functionName}ID - * @return 结果 - */ - #if($table.sub) - @Transactional - #end - @Override - public int delete${ClassName}ByIds(${pkColumn.javaType}[] ${pkColumn.javaField}s) { - #if($table.sub) - ${className}Mapper.delete${subClassName}By${subTableFkClassName}s(${pkColumn.javaField}s); - #end - return ${className}Mapper.delete${ClassName}ByIds(${pkColumn.javaField}s); - } - - /** - * 删除${functionName}信息 - * - * @param ${pkColumn.javaField} ${functionName}ID - * @return 结果 - */ - @Override - public int delete${ClassName}ById(${pkColumn.javaType} ${pkColumn.javaField}) { - #if($table.sub) - ${className}Mapper.delete${subClassName}By${subTableFkClassName}(${pkColumn.javaField}); - #end - return ${className}Mapper.delete${ClassName}ById(${pkColumn.javaField}); - } - #if($table.sub) - - /** - * 新增${subTable.functionName}信息 - * - * @param ${className} ${functionName}对象 - */ - public void insert${subClassName}(${ClassName} ${className}) { - List<${subClassName}> ${subclassName}List = ${className}.get${subClassName}List(); - Long ${pkColumn.javaField} = ${className}.get${pkColumn.capJavaField}(); - if (StringUtils.isNotNull(${subclassName}List)) { - List<${subClassName}> list = new ArrayList<${subClassName}>(); - for (${subClassName} ${subclassName} :${subclassName}List) - { - ${subclassName}.set${subTableFkClassName}(${pkColumn.javaField}); - list.add(${subclassName}); - } - if (list.size() > 0) { - ${className}Mapper.batch${subClassName}(list); - } - } - } - #end -} diff --git a/spring-boot/ruoyi-generator/src/main/resources/vm/java/sub-domain.java.vm b/spring-boot/ruoyi-generator/src/main/resources/vm/java/sub-domain.java.vm deleted file mode 100644 index ad3890a0..00000000 --- a/spring-boot/ruoyi-generator/src/main/resources/vm/java/sub-domain.java.vm +++ /dev/null @@ -1,76 +0,0 @@ -package ${packageName}.domain; - - #foreach ($import in $subImportList) - import ${import}; - #end -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.core.domain.BaseEntity; - -/** - * ${subTable.functionName}对象 ${subTableName} - * - * @author ${author} - * @date ${datetime} - */ -public class ${subClassName} extends BaseEntity - { -private static final long serialVersionUID=1L; - -#foreach ($column in $subTable.columns) - #if(!$table.isSuperColumn($column.javaField)) - /** $column.columnComment */ - #if($column.list) - #set($parentheseIndex=$column.columnComment.indexOf("(")) - #if($parentheseIndex != -1) - #set($comment=$column.columnComment.substring(0, $parentheseIndex)) - #else - #set($comment=$column.columnComment) - #end - #if($parentheseIndex != -1) - @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") - #elseif($column.javaType == 'Date') - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "${comment}", width = 30, dateFormat = "yyyy-MM-dd") - #else - @Excel(name = "${comment}") - #end - #end - private $column.javaType $column.javaField; - - #end -#end -#foreach ($column in $subTable.columns) - #if(!$table.isSuperColumn($column.javaField)) - #if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]")) - #set($AttrName=$column.javaField) - #else - #set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) - #end - public void set${AttrName}($column.javaType $column.javaField) - { - this.$column.javaField = $column.javaField; - } - - public $column.javaType get${AttrName}() - { - return $column.javaField; - } - #end -#end - -@Override -public String toString(){ - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - #foreach ($column in $subTable.columns) - #if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]")) - #set($AttrName=$column.javaField) - #else - #set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) - #end - .append("${column.javaField}",get${AttrName}()) - #end - .toString(); - } - } diff --git a/spring-boot/ruoyi-generator/src/main/resources/vm/js/api.js.vm b/spring-boot/ruoyi-generator/src/main/resources/vm/js/api.js.vm deleted file mode 100644 index 2947d623..00000000 --- a/spring-boot/ruoyi-generator/src/main/resources/vm/js/api.js.vm +++ /dev/null @@ -1,53 +0,0 @@ -import request from '@/utils/request' - -// 查询${functionName}列表 -export function list${BusinessName}(query) { - return request({ - url: '/${moduleName}/${businessName}/list', - method: 'get', - params: query - }) -} - -// 查询${functionName}详细 -export function get${BusinessName}(${pkColumn.javaField}) { - return request({ - url: '/${moduleName}/${businessName}/' + ${pkColumn.javaField}, - method: 'get' - }) -} - -// 新增${functionName} -export function add${BusinessName}(data) { - return request({ - url: '/${moduleName}/${businessName}', - method: 'post', - data: data - }) -} - -// 修改${functionName} -export function update${BusinessName}(data) { - return request({ - url: '/${moduleName}/${businessName}', - method: 'put', - data: data - }) -} - -// 删除${functionName} -export function del${BusinessName}(${pkColumn.javaField}) { - return request({ - url: '/${moduleName}/${businessName}/' + ${pkColumn.javaField}, - method: 'delete' - }) -} - -// 导出${functionName} -export function export${BusinessName}(query) { - return request({ - url: '/${moduleName}/${businessName}/export', - method: 'get', - params: query - }) -} \ No newline at end of file diff --git a/spring-boot/ruoyi-generator/src/main/resources/vm/sql/sql.vm b/spring-boot/ruoyi-generator/src/main/resources/vm/sql/sql.vm deleted file mode 100644 index 05755835..00000000 --- a/spring-boot/ruoyi-generator/src/main/resources/vm/sql/sql.vm +++ /dev/null @@ -1,22 +0,0 @@ --- 菜单 SQL -insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) -values('${functionName}', '${parentMenuId}', '1', '${businessName}', '${moduleName}/${businessName}/index', 1, 0, 'C', '0', '0', '${permissionPrefix}:list', '#', 'admin', sysdate(), '', null, '${functionName}菜单'); - --- 按钮父菜单ID -SELECT @parentId := LAST_INSERT_ID(); - --- 按钮 SQL -insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) -values('${functionName}查询', @parentId, '1', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:query', '#', 'admin', sysdate(), '', null, ''); - -insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) -values('${functionName}新增', @parentId, '2', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:add', '#', 'admin', sysdate(), '', null, ''); - -insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) -values('${functionName}修改', @parentId, '3', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:edit', '#', 'admin', sysdate(), '', null, ''); - -insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) -values('${functionName}删除', @parentId, '4', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:remove', '#', 'admin', sysdate(), '', null, ''); - -insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) -values('${functionName}导出', @parentId, '5', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:export', '#', 'admin', sysdate(), '', null, ''); \ No newline at end of file diff --git a/spring-boot/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm b/spring-boot/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm deleted file mode 100644 index 3e23b928..00000000 --- a/spring-boot/ruoyi-generator/src/main/resources/vm/vue/index-tree.vue.vm +++ /dev/null @@ -1,568 +0,0 @@ - - - diff --git a/spring-boot/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm b/spring-boot/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm deleted file mode 100644 index 9f6bfad7..00000000 --- a/spring-boot/ruoyi-generator/src/main/resources/vm/vue/index.vue.vm +++ /dev/null @@ -1,689 +0,0 @@ - - - diff --git a/spring-boot/ruoyi-generator/src/main/resources/vm/xml/mapper.xml.vm b/spring-boot/ruoyi-generator/src/main/resources/vm/xml/mapper.xml.vm deleted file mode 100644 index 53c3e50e..00000000 --- a/spring-boot/ruoyi-generator/src/main/resources/vm/xml/mapper.xml.vm +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - #foreach ($column in $columns) - - #end - - #if($table.sub) - - - - - - - #foreach ($column in $subTable.columns) - - #end - - #end - - - select#foreach($column in $columns) $column.columnName#if($velocityCount != $columns.size()),#end#end - from ${tableName} - - - - - - - - insert into ${tableName} - - #foreach($column in $columns) - #if($column.columnName != $pkColumn.columnName || !$pkColumn.increment) - $column.columnName, - - #end - #end - - - #foreach($column in $columns) - #if($column.columnName != $pkColumn.columnName || !$pkColumn.increment) - #{$column.javaField}, - - #end - #end - - - - - update ${tableName} - - #foreach($column in $columns) - #if($column.columnName != $pkColumn.columnName) - $column.columnName = - #{$column.javaField}, - - #end - #end - - where ${pkColumn.columnName} = #{${pkColumn.javaField}} - - - - delete from ${tableName} where ${pkColumn.columnName} = #{${pkColumn.javaField}} - - - - delete from ${tableName} where ${pkColumn.columnName} in - - #{${pkColumn.javaField}} - - - #if($table.sub) - - - delete from ${subTableName} where ${subTableFkName} in - - #{${subTableFkclassName}} - - - - - delete from ${subTableName} where ${subTableFkName} = #{${subTableFkclassName}} - - - - insert into ${subTableName} - (#foreach($column in $subTable.columns) $column.columnName#if($velocityCount != $subTable.columns.size()) - ,#end#end) values - - (#foreach($column in $subTable.columns) #{item.$column.javaField - }#if($velocityCount != $subTable.columns.size()),#end#end) - - - #end - \ No newline at end of file diff --git a/spring-boot/ruoyi-quartz/pom.xml b/spring-boot/ruoyi-quartz/pom.xml deleted file mode 100644 index 864ece1d..00000000 --- a/spring-boot/ruoyi-quartz/pom.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - ruoyi - com.ruoyi - 3.4.0 - - 4.0.0 - - ruoyi-quartz - - - quartz定时任务 - - - - - - - org.quartz-scheduler - quartz - - - com.mchange - c3p0 - - - - - - - com.ruoyi - ruoyi-common - - - - - \ No newline at end of file diff --git a/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/config/ScheduleConfig.java b/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/config/ScheduleConfig.java deleted file mode 100644 index 98b5bbb1..00000000 --- a/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/config/ScheduleConfig.java +++ /dev/null @@ -1,56 +0,0 @@ -package com.ruoyi.quartz.config; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.scheduling.quartz.SchedulerFactoryBean; - -import javax.sql.DataSource; -import java.util.Properties; - -/** - * 定时任务配置 - * - * @author ruoyi - */ -@Configuration -public class ScheduleConfig { - @Bean - public SchedulerFactoryBean schedulerFactoryBean(DataSource dataSource) { - SchedulerFactoryBean factory = new SchedulerFactoryBean(); - factory.setDataSource(dataSource); - - // quartz参数 - Properties prop = new Properties(); - prop.put("org.quartz.scheduler.instanceName", "RuoyiScheduler"); - prop.put("org.quartz.scheduler.instanceId", "AUTO"); - // 线程池配置 - prop.put("org.quartz.threadPool.class", "org.quartz.simpl.SimpleThreadPool"); - prop.put("org.quartz.threadPool.threadCount", "20"); - prop.put("org.quartz.threadPool.threadPriority", "5"); - // JobStore配置 - prop.put("org.quartz.jobStore.class", "org.quartz.impl.jdbcjobstore.JobStoreTX"); - // 集群配置 - prop.put("org.quartz.jobStore.isClustered", "true"); - prop.put("org.quartz.jobStore.clusterCheckinInterval", "15000"); - prop.put("org.quartz.jobStore.maxMisfiresToHandleAtATime", "1"); - prop.put("org.quartz.jobStore.txIsolationLevelSerializable", "true"); - - // sqlserver 启用 - // prop.put("org.quartz.jobStore.selectWithLockSQL", "SELECT * FROM {0}LOCKS UPDLOCK WHERE LOCK_NAME = ?"); - prop.put("org.quartz.jobStore.misfireThreshold", "12000"); - prop.put("org.quartz.jobStore.tablePrefix", "QRTZ_"); - factory.setQuartzProperties(prop); - - factory.setSchedulerName("RuoyiScheduler"); - // 延时启动 - factory.setStartupDelay(1); - factory.setApplicationContextSchedulerContextKey("applicationContextKey"); - // 可选,QuartzScheduler - // 启动时更新己存在的Job,这样就不用每次修改targetObject后删除qrtz_job_details表对应记录了 - factory.setOverwriteExistingJobs(true); - // 设置自动启动,默认为true - factory.setAutoStartup(true); - - return factory; - } -} diff --git a/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobController.java b/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobController.java deleted file mode 100644 index ec35b03a..00000000 --- a/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobController.java +++ /dev/null @@ -1,132 +0,0 @@ -package com.ruoyi.quartz.controller; - -import java.util.List; - -import org.quartz.SchedulerException; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.core.page.TableDataInfo; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.common.exception.job.TaskException; -import com.ruoyi.common.utils.SecurityUtils; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.quartz.domain.SysJob; -import com.ruoyi.quartz.service.ISysJobService; -import com.ruoyi.quartz.util.CronUtils; - -/** - * 调度任务信息操作处理 - * - * @author ruoyi - */ -@RestController -@RequestMapping("/monitor/job") -public class SysJobController extends BaseController { - @Autowired - private ISysJobService jobService; - - /** - * 查询定时任务列表 - */ - @PreAuthorize("@ss.hasPermi('monitor:job:list')") - @GetMapping("/list") - public TableDataInfo list(SysJob sysJob) { - startPage(); - List list = jobService.selectJobList(sysJob); - return getDataTable(list); - } - - /** - * 导出定时任务列表 - */ - @PreAuthorize("@ss.hasPermi('monitor:job:export')") - @Log(title = "定时任务", businessType = BusinessType.EXPORT) - @GetMapping("/export") - public AjaxResult export(SysJob sysJob) { - List list = jobService.selectJobList(sysJob); - ExcelUtil util = new ExcelUtil(SysJob.class); - return util.exportExcel(list, "定时任务"); - } - - /** - * 获取定时任务详细信息 - */ - @PreAuthorize("@ss.hasPermi('monitor:job:query')") - @GetMapping(value = "/{jobId}") - public AjaxResult getInfo(@PathVariable("jobId") Long jobId) { - return AjaxResult.success(jobService.selectJobById(jobId)); - } - - /** - * 新增定时任务 - */ - @PreAuthorize("@ss.hasPermi('monitor:job:add')") - @Log(title = "定时任务", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@RequestBody SysJob sysJob) throws SchedulerException, TaskException { - if (!CronUtils.isValid(sysJob.getCronExpression())) { - return AjaxResult.error("cron表达式不正确"); - } - sysJob.setCreateBy(SecurityUtils.getUsername()); - return toAjax(jobService.insertJob(sysJob)); - } - - /** - * 修改定时任务 - */ - @PreAuthorize("@ss.hasPermi('monitor:job:edit')") - @Log(title = "定时任务", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@RequestBody SysJob sysJob) throws SchedulerException, TaskException { - if (!CronUtils.isValid(sysJob.getCronExpression())) { - return AjaxResult.error("cron表达式不正确"); - } - sysJob.setUpdateBy(SecurityUtils.getUsername()); - return toAjax(jobService.updateJob(sysJob)); - } - - /** - * 定时任务状态修改 - */ - @PreAuthorize("@ss.hasPermi('monitor:job:changeStatus')") - @Log(title = "定时任务", businessType = BusinessType.UPDATE) - @PutMapping("/changeStatus") - public AjaxResult changeStatus(@RequestBody SysJob job) throws SchedulerException { - SysJob newJob = jobService.selectJobById(job.getJobId()); - newJob.setStatus(job.getStatus()); - return toAjax(jobService.changeStatus(newJob)); - } - - /** - * 定时任务立即执行一次 - */ - @PreAuthorize("@ss.hasPermi('monitor:job:changeStatus')") - @Log(title = "定时任务", businessType = BusinessType.UPDATE) - @PutMapping("/run") - public AjaxResult run(@RequestBody SysJob job) throws SchedulerException { - jobService.run(job); - return AjaxResult.success(); - } - - /** - * 删除定时任务 - */ - @PreAuthorize("@ss.hasPermi('monitor:job:remove')") - @Log(title = "定时任务", businessType = BusinessType.DELETE) - @DeleteMapping("/{jobIds}") - public AjaxResult remove(@PathVariable Long[] jobIds) throws SchedulerException, TaskException { - jobService.deleteJobByIds(jobIds); - return AjaxResult.success(); - } -} diff --git a/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobLogController.java b/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobLogController.java deleted file mode 100644 index 52fc973a..00000000 --- a/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/SysJobLogController.java +++ /dev/null @@ -1,85 +0,0 @@ -package com.ruoyi.quartz.controller; - -import java.util.List; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.core.page.TableDataInfo; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.quartz.domain.SysJobLog; -import com.ruoyi.quartz.service.ISysJobLogService; - -/** - * 调度日志操作处理 - * - * @author ruoyi - */ -@RestController -@RequestMapping("/monitor/jobLog") -public class SysJobLogController extends BaseController { - @Autowired - private ISysJobLogService jobLogService; - - /** - * 查询定时任务调度日志列表 - */ - @PreAuthorize("@ss.hasPermi('monitor:job:list')") - @GetMapping("/list") - public TableDataInfo list(SysJobLog sysJobLog) { - startPage(); - List list = jobLogService.selectJobLogList(sysJobLog); - return getDataTable(list); - } - - /** - * 导出定时任务调度日志列表 - */ - @PreAuthorize("@ss.hasPermi('monitor:job:export')") - @Log(title = "任务调度日志", businessType = BusinessType.EXPORT) - @GetMapping("/export") - public AjaxResult export(SysJobLog sysJobLog) { - List list = jobLogService.selectJobLogList(sysJobLog); - ExcelUtil util = new ExcelUtil(SysJobLog.class); - return util.exportExcel(list, "调度日志"); - } - - /** - * 根据调度编号获取详细信息 - */ - @PreAuthorize("@ss.hasPermi('monitor:job:query')") - @GetMapping(value = "/{configId}") - public AjaxResult getInfo(@PathVariable Long jobLogId) { - return AjaxResult.success(jobLogService.selectJobLogById(jobLogId)); - } - - - /** - * 删除定时任务调度日志 - */ - @PreAuthorize("@ss.hasPermi('monitor:job:remove')") - @Log(title = "定时任务调度日志", businessType = BusinessType.DELETE) - @DeleteMapping("/{jobLogIds}") - public AjaxResult remove(@PathVariable Long[] jobLogIds) { - return toAjax(jobLogService.deleteJobLogByIds(jobLogIds)); - } - - /** - * 清空定时任务调度日志 - */ - @PreAuthorize("@ss.hasPermi('monitor:job:remove')") - @Log(title = "调度日志", businessType = BusinessType.CLEAN) - @DeleteMapping("/clean") - public AjaxResult clean() { - jobLogService.cleanJobLog(); - return AjaxResult.success(); - } -} diff --git a/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/domain/SysJob.java b/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/domain/SysJob.java deleted file mode 100644 index 77b66e3a..00000000 --- a/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/domain/SysJob.java +++ /dev/null @@ -1,170 +0,0 @@ -package com.ruoyi.quartz.domain; - -import java.io.Serializable; -import java.util.Date; -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Size; - -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.fasterxml.jackson.annotation.JsonFormat; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.annotation.Excel.ColumnType; -import com.ruoyi.common.constant.ScheduleConstants; -import com.ruoyi.common.core.domain.BaseEntity; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.quartz.util.CronUtils; - -/** - * 定时任务调度表 sys_job - * - * @author ruoyi - */ -public class SysJob extends BaseEntity implements Serializable { - private static final long serialVersionUID = 1L; - - /** - * 任务ID - */ - @Excel(name = "任务序号", cellType = ColumnType.NUMERIC) - private Long jobId; - - /** - * 任务名称 - */ - @Excel(name = "任务名称") - private String jobName; - - /** - * 任务组名 - */ - @Excel(name = "任务组名") - private String jobGroup; - - /** - * 调用目标字符串 - */ - @Excel(name = "调用目标字符串") - private String invokeTarget; - - /** - * cron执行表达式 - */ - @Excel(name = "执行表达式 ") - private String cronExpression; - - /** - * cron计划策略 - */ - @Excel(name = "计划策略 ", readConverterExp = "0=默认,1=立即触发执行,2=触发一次执行,3=不触发立即执行") - private String misfirePolicy = ScheduleConstants.MISFIRE_DEFAULT; - - /** - * 是否并发执行(0允许 1禁止) - */ - @Excel(name = "并发执行", readConverterExp = "0=允许,1=禁止") - private String concurrent; - - /** - * 任务状态(0正常 1暂停) - */ - @Excel(name = "任务状态", readConverterExp = "0=正常,1=暂停") - private String status; - - public Long getJobId() { - return jobId; - } - - public void setJobId(Long jobId) { - this.jobId = jobId; - } - - @NotBlank(message = "任务名称不能为空") - @Size(min = 0, max = 64, message = "任务名称不能超过64个字符") - public String getJobName() { - return jobName; - } - - public void setJobName(String jobName) { - this.jobName = jobName; - } - - public String getJobGroup() { - return jobGroup; - } - - public void setJobGroup(String jobGroup) { - this.jobGroup = jobGroup; - } - - @NotBlank(message = "调用目标字符串不能为空") - @Size(min = 0, max = 500, message = "调用目标字符串长度不能超过500个字符") - public String getInvokeTarget() { - return invokeTarget; - } - - public void setInvokeTarget(String invokeTarget) { - this.invokeTarget = invokeTarget; - } - - @NotBlank(message = "Cron执行表达式不能为空") - @Size(min = 0, max = 255, message = "Cron执行表达式不能超过255个字符") - public String getCronExpression() { - return cronExpression; - } - - public void setCronExpression(String cronExpression) { - this.cronExpression = cronExpression; - } - - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - public Date getNextValidTime() { - if (StringUtils.isNotEmpty(cronExpression)) { - return CronUtils.getNextExecution(cronExpression); - } - return null; - } - - public String getMisfirePolicy() { - return misfirePolicy; - } - - public void setMisfirePolicy(String misfirePolicy) { - this.misfirePolicy = misfirePolicy; - } - - public String getConcurrent() { - return concurrent; - } - - public void setConcurrent(String concurrent) { - this.concurrent = concurrent; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("jobId", getJobId()) - .append("jobName", getJobName()) - .append("jobGroup", getJobGroup()) - .append("cronExpression", getCronExpression()) - .append("nextValidTime", getNextValidTime()) - .append("misfirePolicy", getMisfirePolicy()) - .append("concurrent", getConcurrent()) - .append("status", getStatus()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .toString(); - } -} diff --git a/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/domain/SysJobLog.java b/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/domain/SysJobLog.java deleted file mode 100644 index 3f36a43c..00000000 --- a/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/domain/SysJobLog.java +++ /dev/null @@ -1,155 +0,0 @@ -package com.ruoyi.quartz.domain; - -import java.util.Date; - -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.core.domain.BaseEntity; - -/** - * 定时任务调度日志表 sys_job_log - * - * @author ruoyi - */ -public class SysJobLog extends BaseEntity { - private static final long serialVersionUID = 1L; - - /** - * ID - */ - @Excel(name = "日志序号") - private Long jobLogId; - - /** - * 任务名称 - */ - @Excel(name = "任务名称") - private String jobName; - - /** - * 任务组名 - */ - @Excel(name = "任务组名") - private String jobGroup; - - /** - * 调用目标字符串 - */ - @Excel(name = "调用目标字符串") - private String invokeTarget; - - /** - * 日志信息 - */ - @Excel(name = "日志信息") - private String jobMessage; - - /** - * 执行状态(0正常 1失败) - */ - @Excel(name = "执行状态", readConverterExp = "0=正常,1=失败") - private String status; - - /** - * 异常信息 - */ - @Excel(name = "异常信息") - private String exceptionInfo; - - /** - * 开始时间 - */ - private Date startTime; - - /** - * 停止时间 - */ - private Date stopTime; - - public Long getJobLogId() { - return jobLogId; - } - - public void setJobLogId(Long jobLogId) { - this.jobLogId = jobLogId; - } - - public String getJobName() { - return jobName; - } - - public void setJobName(String jobName) { - this.jobName = jobName; - } - - public String getJobGroup() { - return jobGroup; - } - - public void setJobGroup(String jobGroup) { - this.jobGroup = jobGroup; - } - - public String getInvokeTarget() { - return invokeTarget; - } - - public void setInvokeTarget(String invokeTarget) { - this.invokeTarget = invokeTarget; - } - - public String getJobMessage() { - return jobMessage; - } - - public void setJobMessage(String jobMessage) { - this.jobMessage = jobMessage; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - public String getExceptionInfo() { - return exceptionInfo; - } - - public void setExceptionInfo(String exceptionInfo) { - this.exceptionInfo = exceptionInfo; - } - - public Date getStartTime() { - return startTime; - } - - public void setStartTime(Date startTime) { - this.startTime = startTime; - } - - public Date getStopTime() { - return stopTime; - } - - public void setStopTime(Date stopTime) { - this.stopTime = stopTime; - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("jobLogId", getJobLogId()) - .append("jobName", getJobName()) - .append("jobGroup", getJobGroup()) - .append("jobMessage", getJobMessage()) - .append("status", getStatus()) - .append("exceptionInfo", getExceptionInfo()) - .append("startTime", getStartTime()) - .append("stopTime", getStopTime()) - .toString(); - } -} diff --git a/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/mapper/SysJobLogMapper.java b/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/mapper/SysJobLogMapper.java deleted file mode 100644 index 8fb2a851..00000000 --- a/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/mapper/SysJobLogMapper.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.ruoyi.quartz.mapper; - -import java.util.List; - -import com.ruoyi.quartz.domain.SysJobLog; - -/** - * 调度任务日志信息 数据层 - * - * @author ruoyi - */ -public interface SysJobLogMapper { - /** - * 获取quartz调度器日志的计划任务 - * - * @param jobLog 调度日志信息 - * @return 调度任务日志集合 - */ - public List selectJobLogList(SysJobLog jobLog); - - /** - * 查询所有调度任务日志 - * - * @return 调度任务日志列表 - */ - public List selectJobLogAll(); - - /** - * 通过调度任务日志ID查询调度信息 - * - * @param jobLogId 调度任务日志ID - * @return 调度任务日志对象信息 - */ - public SysJobLog selectJobLogById(Long jobLogId); - - /** - * 新增任务日志 - * - * @param jobLog 调度日志信息 - * @return 结果 - */ - public int insertJobLog(SysJobLog jobLog); - - /** - * 批量删除调度日志信息 - * - * @param logIds 需要删除的数据ID - * @return 结果 - */ - public int deleteJobLogByIds(Long[] logIds); - - /** - * 删除任务日志 - * - * @param jobId 调度日志ID - * @return 结果 - */ - public int deleteJobLogById(Long jobId); - - /** - * 清空任务日志 - */ - public void cleanJobLog(); -} diff --git a/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/mapper/SysJobMapper.java b/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/mapper/SysJobMapper.java deleted file mode 100644 index 7650d484..00000000 --- a/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/mapper/SysJobMapper.java +++ /dev/null @@ -1,67 +0,0 @@ -package com.ruoyi.quartz.mapper; - -import java.util.List; - -import com.ruoyi.quartz.domain.SysJob; - -/** - * 调度任务信息 数据层 - * - * @author ruoyi - */ -public interface SysJobMapper { - /** - * 查询调度任务日志集合 - * - * @param job 调度信息 - * @return 操作日志集合 - */ - public List selectJobList(SysJob job); - - /** - * 查询所有调度任务 - * - * @return 调度任务列表 - */ - public List selectJobAll(); - - /** - * 通过调度ID查询调度任务信息 - * - * @param jobId 调度ID - * @return 角色对象信息 - */ - public SysJob selectJobById(Long jobId); - - /** - * 通过调度ID删除调度任务信息 - * - * @param jobId 调度ID - * @return 结果 - */ - public int deleteJobById(Long jobId); - - /** - * 批量删除调度任务信息 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - public int deleteJobByIds(Long[] ids); - - /** - * 修改调度任务信息 - * - * @param job 调度任务信息 - * @return 结果 - */ - public int updateJob(SysJob job); - - /** - * 新增调度任务信息 - * - * @param job 调度任务信息 - * @return 结果 - */ - public int insertJob(SysJob job); -} diff --git a/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/ISysJobLogService.java b/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/ISysJobLogService.java deleted file mode 100644 index 41171f3b..00000000 --- a/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/ISysJobLogService.java +++ /dev/null @@ -1,56 +0,0 @@ -package com.ruoyi.quartz.service; - -import java.util.List; - -import com.ruoyi.quartz.domain.SysJobLog; - -/** - * 定时任务调度日志信息信息 服务层 - * - * @author ruoyi - */ -public interface ISysJobLogService { - /** - * 获取quartz调度器日志的计划任务 - * - * @param jobLog 调度日志信息 - * @return 调度任务日志集合 - */ - public List selectJobLogList(SysJobLog jobLog); - - /** - * 通过调度任务日志ID查询调度信息 - * - * @param jobLogId 调度任务日志ID - * @return 调度任务日志对象信息 - */ - public SysJobLog selectJobLogById(Long jobLogId); - - /** - * 新增任务日志 - * - * @param jobLog 调度日志信息 - */ - public void addJobLog(SysJobLog jobLog); - - /** - * 批量删除调度日志信息 - * - * @param logIds 需要删除的日志ID - * @return 结果 - */ - public int deleteJobLogByIds(Long[] logIds); - - /** - * 删除任务日志 - * - * @param jobId 调度日志ID - * @return 结果 - */ - public int deleteJobLogById(Long jobId); - - /** - * 清空任务日志 - */ - public void cleanJobLog(); -} diff --git a/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/ISysJobService.java b/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/ISysJobService.java deleted file mode 100644 index f4d38586..00000000 --- a/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/ISysJobService.java +++ /dev/null @@ -1,102 +0,0 @@ -package com.ruoyi.quartz.service; - -import java.util.List; - -import org.quartz.SchedulerException; -import com.ruoyi.common.exception.job.TaskException; -import com.ruoyi.quartz.domain.SysJob; - -/** - * 定时任务调度信息信息 服务层 - * - * @author ruoyi - */ -public interface ISysJobService { - /** - * 获取quartz调度器的计划任务 - * - * @param job 调度信息 - * @return 调度任务集合 - */ - public List selectJobList(SysJob job); - - /** - * 通过调度任务ID查询调度信息 - * - * @param jobId 调度任务ID - * @return 调度任务对象信息 - */ - public SysJob selectJobById(Long jobId); - - /** - * 暂停任务 - * - * @param job 调度信息 - * @return 结果 - */ - public int pauseJob(SysJob job) throws SchedulerException; - - /** - * 恢复任务 - * - * @param job 调度信息 - * @return 结果 - */ - public int resumeJob(SysJob job) throws SchedulerException; - - /** - * 删除任务后,所对应的trigger也将被删除 - * - * @param job 调度信息 - * @return 结果 - */ - public int deleteJob(SysJob job) throws SchedulerException; - - /** - * 批量删除调度信息 - * - * @param jobIds 需要删除的任务ID - * @return 结果 - */ - public void deleteJobByIds(Long[] jobIds) throws SchedulerException; - - /** - * 任务调度状态修改 - * - * @param job 调度信息 - * @return 结果 - */ - public int changeStatus(SysJob job) throws SchedulerException; - - /** - * 立即运行任务 - * - * @param job 调度信息 - * @return 结果 - */ - public void run(SysJob job) throws SchedulerException; - - /** - * 新增任务 - * - * @param job 调度信息 - * @return 结果 - */ - public int insertJob(SysJob job) throws SchedulerException, TaskException; - - /** - * 更新任务 - * - * @param job 调度信息 - * @return 结果 - */ - public int updateJob(SysJob job) throws SchedulerException, TaskException; - - /** - * 校验cron表达式是否有效 - * - * @param cronExpression 表达式 - * @return 结果 - */ - public boolean checkCronExpressionIsValid(String cronExpression); -} diff --git a/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/SysJobLogServiceImpl.java b/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/SysJobLogServiceImpl.java deleted file mode 100644 index 48d07073..00000000 --- a/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/SysJobLogServiceImpl.java +++ /dev/null @@ -1,81 +0,0 @@ -package com.ruoyi.quartz.service.impl; - -import java.util.List; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import com.ruoyi.quartz.domain.SysJobLog; -import com.ruoyi.quartz.mapper.SysJobLogMapper; -import com.ruoyi.quartz.service.ISysJobLogService; - -/** - * 定时任务调度日志信息 服务层 - * - * @author ruoyi - */ -@Service -public class SysJobLogServiceImpl implements ISysJobLogService { - @Autowired - private SysJobLogMapper jobLogMapper; - - /** - * 获取quartz调度器日志的计划任务 - * - * @param jobLog 调度日志信息 - * @return 调度任务日志集合 - */ - @Override - public List selectJobLogList(SysJobLog jobLog) { - return jobLogMapper.selectJobLogList(jobLog); - } - - /** - * 通过调度任务日志ID查询调度信息 - * - * @param jobLogId 调度任务日志ID - * @return 调度任务日志对象信息 - */ - @Override - public SysJobLog selectJobLogById(Long jobLogId) { - return jobLogMapper.selectJobLogById(jobLogId); - } - - /** - * 新增任务日志 - * - * @param jobLog 调度日志信息 - */ - @Override - public void addJobLog(SysJobLog jobLog) { - jobLogMapper.insertJobLog(jobLog); - } - - /** - * 批量删除调度日志信息 - * - * @param logIds 需要删除的数据ID - * @return 结果 - */ - @Override - public int deleteJobLogByIds(Long[] logIds) { - return jobLogMapper.deleteJobLogByIds(logIds); - } - - /** - * 删除任务日志 - * - * @param jobId 调度日志ID - */ - @Override - public int deleteJobLogById(Long jobId) { - return jobLogMapper.deleteJobLogById(jobId); - } - - /** - * 清空任务日志 - */ - @Override - public void cleanJobLog() { - jobLogMapper.cleanJobLog(); - } -} diff --git a/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/SysJobServiceImpl.java b/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/SysJobServiceImpl.java deleted file mode 100644 index 46e0eadb..00000000 --- a/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/SysJobServiceImpl.java +++ /dev/null @@ -1,230 +0,0 @@ -package com.ruoyi.quartz.service.impl; - -import java.util.List; -import javax.annotation.PostConstruct; - -import org.quartz.JobDataMap; -import org.quartz.JobKey; -import org.quartz.Scheduler; -import org.quartz.SchedulerException; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; -import com.ruoyi.common.constant.ScheduleConstants; -import com.ruoyi.common.exception.job.TaskException; -import com.ruoyi.quartz.domain.SysJob; -import com.ruoyi.quartz.mapper.SysJobMapper; -import com.ruoyi.quartz.service.ISysJobService; -import com.ruoyi.quartz.util.CronUtils; -import com.ruoyi.quartz.util.ScheduleUtils; - -/** - * 定时任务调度信息 服务层 - * - * @author ruoyi - */ -@Service -public class SysJobServiceImpl implements ISysJobService { - @Autowired - private Scheduler scheduler; - - @Autowired - private SysJobMapper jobMapper; - - /** - * 项目启动时,初始化定时器 主要是防止手动修改数据库导致未同步到定时任务处理(注:不能手动修改数据库ID和任务组名,否则会导致脏数据) - */ - @PostConstruct - public void init() throws SchedulerException, TaskException { - scheduler.clear(); - List jobList = jobMapper.selectJobAll(); - for (SysJob job : jobList) { - ScheduleUtils.createScheduleJob(scheduler, job); - } - } - - /** - * 获取quartz调度器的计划任务列表 - * - * @param job 调度信息 - * @return - */ - @Override - public List selectJobList(SysJob job) { - return jobMapper.selectJobList(job); - } - - /** - * 通过调度任务ID查询调度信息 - * - * @param jobId 调度任务ID - * @return 调度任务对象信息 - */ - @Override - public SysJob selectJobById(Long jobId) { - return jobMapper.selectJobById(jobId); - } - - /** - * 暂停任务 - * - * @param job 调度信息 - */ - @Override - @Transactional - public int pauseJob(SysJob job) throws SchedulerException { - Long jobId = job.getJobId(); - String jobGroup = job.getJobGroup(); - job.setStatus(ScheduleConstants.Status.PAUSE.getValue()); - int rows = jobMapper.updateJob(job); - if (rows > 0) { - scheduler.pauseJob(ScheduleUtils.getJobKey(jobId, jobGroup)); - } - return rows; - } - - /** - * 恢复任务 - * - * @param job 调度信息 - */ - @Override - @Transactional - public int resumeJob(SysJob job) throws SchedulerException { - Long jobId = job.getJobId(); - String jobGroup = job.getJobGroup(); - job.setStatus(ScheduleConstants.Status.NORMAL.getValue()); - int rows = jobMapper.updateJob(job); - if (rows > 0) { - scheduler.resumeJob(ScheduleUtils.getJobKey(jobId, jobGroup)); - } - return rows; - } - - /** - * 删除任务后,所对应的trigger也将被删除 - * - * @param job 调度信息 - */ - @Override - @Transactional - public int deleteJob(SysJob job) throws SchedulerException { - Long jobId = job.getJobId(); - String jobGroup = job.getJobGroup(); - int rows = jobMapper.deleteJobById(jobId); - if (rows > 0) { - scheduler.deleteJob(ScheduleUtils.getJobKey(jobId, jobGroup)); - } - return rows; - } - - /** - * 批量删除调度信息 - * - * @param jobIds 需要删除的任务ID - * @return 结果 - */ - @Override - @Transactional - public void deleteJobByIds(Long[] jobIds) throws SchedulerException { - for (Long jobId : jobIds) { - SysJob job = jobMapper.selectJobById(jobId); - deleteJob(job); - } - } - - /** - * 任务调度状态修改 - * - * @param job 调度信息 - */ - @Override - @Transactional - public int changeStatus(SysJob job) throws SchedulerException { - int rows = 0; - String status = job.getStatus(); - if (ScheduleConstants.Status.NORMAL.getValue().equals(status)) { - rows = resumeJob(job); - } else if (ScheduleConstants.Status.PAUSE.getValue().equals(status)) { - rows = pauseJob(job); - } - return rows; - } - - /** - * 立即运行任务 - * - * @param job 调度信息 - */ - @Override - @Transactional - public void run(SysJob job) throws SchedulerException { - Long jobId = job.getJobId(); - String jobGroup = job.getJobGroup(); - SysJob properties = selectJobById(job.getJobId()); - // 参数 - JobDataMap dataMap = new JobDataMap(); - dataMap.put(ScheduleConstants.TASK_PROPERTIES, properties); - scheduler.triggerJob(ScheduleUtils.getJobKey(jobId, jobGroup), dataMap); - } - - /** - * 新增任务 - * - * @param job 调度信息 调度信息 - */ - @Override - @Transactional - public int insertJob(SysJob job) throws SchedulerException, TaskException { - job.setStatus(ScheduleConstants.Status.PAUSE.getValue()); - int rows = jobMapper.insertJob(job); - if (rows > 0) { - ScheduleUtils.createScheduleJob(scheduler, job); - } - return rows; - } - - /** - * 更新任务的时间表达式 - * - * @param job 调度信息 - */ - @Override - @Transactional - public int updateJob(SysJob job) throws SchedulerException, TaskException { - SysJob properties = selectJobById(job.getJobId()); - int rows = jobMapper.updateJob(job); - if (rows > 0) { - updateSchedulerJob(job, properties.getJobGroup()); - } - return rows; - } - - /** - * 更新任务 - * - * @param job 任务对象 - * @param jobGroup 任务组名 - */ - public void updateSchedulerJob(SysJob job, String jobGroup) throws SchedulerException, TaskException { - Long jobId = job.getJobId(); - // 判断是否存在 - JobKey jobKey = ScheduleUtils.getJobKey(jobId, jobGroup); - if (scheduler.checkExists(jobKey)) { - // 防止创建时存在数据问题 先移除,然后在执行创建操作 - scheduler.deleteJob(jobKey); - } - ScheduleUtils.createScheduleJob(scheduler, job); - } - - /** - * 校验cron表达式是否有效 - * - * @param cronExpression 表达式 - * @return 结果 - */ - @Override - public boolean checkCronExpressionIsValid(String cronExpression) { - return CronUtils.isValid(cronExpression); - } -} diff --git a/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java b/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java deleted file mode 100644 index b4b94c89..00000000 --- a/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.ruoyi.quartz.task; - -import org.springframework.stereotype.Component; -import com.ruoyi.common.utils.StringUtils; - -/** - * 定时任务调度测试 - * - * @author ruoyi - */ -@Component("ryTask") -public class RyTask { - public void ryMultipleParams(String s, Boolean b, Long l, Double d, Integer i) { - System.out.println(StringUtils.format("执行多参方法: 字符串类型{},布尔类型{},长整型{},浮点型{},整形{}", s, b, l, d, i)); - } - - public void ryParams(String params) { - System.out.println("执行有参方法:" + params); - } - - public void ryNoParams() { - System.out.println("执行无参方法"); - } -} diff --git a/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/AbstractQuartzJob.java b/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/AbstractQuartzJob.java deleted file mode 100644 index f3db6aa1..00000000 --- a/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/AbstractQuartzJob.java +++ /dev/null @@ -1,97 +0,0 @@ -package com.ruoyi.quartz.util; - -import java.util.Date; - -import org.quartz.Job; -import org.quartz.JobExecutionContext; -import org.quartz.JobExecutionException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import com.ruoyi.common.constant.Constants; -import com.ruoyi.common.constant.ScheduleConstants; -import com.ruoyi.common.utils.ExceptionUtil; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.common.utils.bean.BeanUtils; -import com.ruoyi.common.utils.spring.SpringUtils; -import com.ruoyi.quartz.domain.SysJob; -import com.ruoyi.quartz.domain.SysJobLog; -import com.ruoyi.quartz.service.ISysJobLogService; - -/** - * 抽象quartz调用 - * - * @author ruoyi - */ -public abstract class AbstractQuartzJob implements Job { - private static final Logger log = LoggerFactory.getLogger(AbstractQuartzJob.class); - - /** - * 线程本地变量 - */ - private static ThreadLocal threadLocal = new ThreadLocal<>(); - - @Override - public void execute(JobExecutionContext context) throws JobExecutionException { - SysJob sysJob = new SysJob(); - BeanUtils.copyBeanProp(sysJob, context.getMergedJobDataMap().get(ScheduleConstants.TASK_PROPERTIES)); - try { - before(context, sysJob); - if (sysJob != null) { - doExecute(context, sysJob); - } - after(context, sysJob, null); - } catch (Exception e) { - log.error("任务执行异常 - :", e); - after(context, sysJob, e); - } - } - - /** - * 执行前 - * - * @param context 工作执行上下文对象 - * @param sysJob 系统计划任务 - */ - protected void before(JobExecutionContext context, SysJob sysJob) { - threadLocal.set(new Date()); - } - - /** - * 执行后 - * - * @param context 工作执行上下文对象 - * @param sysJob 系统计划任务 - */ - protected void after(JobExecutionContext context, SysJob sysJob, Exception e) { - Date startTime = threadLocal.get(); - threadLocal.remove(); - - final SysJobLog sysJobLog = new SysJobLog(); - sysJobLog.setJobName(sysJob.getJobName()); - sysJobLog.setJobGroup(sysJob.getJobGroup()); - sysJobLog.setInvokeTarget(sysJob.getInvokeTarget()); - sysJobLog.setStartTime(startTime); - sysJobLog.setStopTime(new Date()); - long runMs = sysJobLog.getStopTime().getTime() - sysJobLog.getStartTime().getTime(); - sysJobLog.setJobMessage(sysJobLog.getJobName() + " 总共耗时:" + runMs + "毫秒"); - if (e != null) { - sysJobLog.setStatus(Constants.FAIL); - String errorMsg = StringUtils.substring(ExceptionUtil.getExceptionMessage(e), 0, 2000); - sysJobLog.setExceptionInfo(errorMsg); - } else { - sysJobLog.setStatus(Constants.SUCCESS); - } - - // 写入数据库当中 - SpringUtils.getBean(ISysJobLogService.class).addJobLog(sysJobLog); - } - - /** - * 执行方法,由子类重载 - * - * @param context 工作执行上下文对象 - * @param sysJob 系统计划任务 - * @throws Exception 执行过程中的异常 - */ - protected abstract void doExecute(JobExecutionContext context, SysJob sysJob) throws Exception; -} diff --git a/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/CronUtils.java b/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/CronUtils.java deleted file mode 100644 index a91e2505..00000000 --- a/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/CronUtils.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.ruoyi.quartz.util; - -import java.text.ParseException; -import java.util.Date; - -import org.quartz.CronExpression; - -/** - * cron表达式工具类 - * - * @author ruoyi - */ -public class CronUtils { - /** - * 返回一个布尔值代表一个给定的Cron表达式的有效性 - * - * @param cronExpression Cron表达式 - * @return boolean 表达式是否有效 - */ - public static boolean isValid(String cronExpression) { - return CronExpression.isValidExpression(cronExpression); - } - - /** - * 返回一个字符串值,表示该消息无效Cron表达式给出有效性 - * - * @param cronExpression Cron表达式 - * @return String 无效时返回表达式错误描述,如果有效返回null - */ - public static String getInvalidMessage(String cronExpression) { - try { - new CronExpression(cronExpression); - return null; - } catch (ParseException pe) { - return pe.getMessage(); - } - } - - /** - * 返回下一个执行时间根据给定的Cron表达式 - * - * @param cronExpression Cron表达式 - * @return Date 下次Cron表达式执行时间 - */ - public static Date getNextExecution(String cronExpression) { - try { - CronExpression cron = new CronExpression(cronExpression); - return cron.getNextValidTimeAfter(new Date(System.currentTimeMillis())); - } catch (ParseException e) { - throw new IllegalArgumentException(e.getMessage()); - } - } -} diff --git a/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/JobInvokeUtil.java b/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/JobInvokeUtil.java deleted file mode 100644 index 7e5661a1..00000000 --- a/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/JobInvokeUtil.java +++ /dev/null @@ -1,159 +0,0 @@ -package com.ruoyi.quartz.util; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.LinkedList; -import java.util.List; - -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.common.utils.spring.SpringUtils; -import com.ruoyi.quartz.domain.SysJob; - -/** - * 任务执行工具 - * - * @author ruoyi - */ -public class JobInvokeUtil { - /** - * 执行方法 - * - * @param sysJob 系统任务 - */ - public static void invokeMethod(SysJob sysJob) throws Exception { - String invokeTarget = sysJob.getInvokeTarget(); - String beanName = getBeanName(invokeTarget); - String methodName = getMethodName(invokeTarget); - List methodParams = getMethodParams(invokeTarget); - - if (!isValidClassName(beanName)) { - Object bean = SpringUtils.getBean(beanName); - invokeMethod(bean, methodName, methodParams); - } else { - Object bean = Class.forName(beanName).newInstance(); - invokeMethod(bean, methodName, methodParams); - } - } - - /** - * 调用任务方法 - * - * @param bean 目标对象 - * @param methodName 方法名称 - * @param methodParams 方法参数 - */ - private static void invokeMethod(Object bean, String methodName, List methodParams) - throws NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, - InvocationTargetException { - if (StringUtils.isNotNull(methodParams) && methodParams.size() > 0) { - Method method = bean.getClass().getDeclaredMethod(methodName, getMethodParamsType(methodParams)); - method.invoke(bean, getMethodParamsValue(methodParams)); - } else { - Method method = bean.getClass().getDeclaredMethod(methodName); - method.invoke(bean); - } - } - - /** - * 校验是否为为class包名 - * - * @param str 名称 - * @return true是 false否 - */ - public static boolean isValidClassName(String invokeTarget) { - return StringUtils.countMatches(invokeTarget, ".") > 1; - } - - /** - * 获取bean名称 - * - * @param invokeTarget 目标字符串 - * @return bean名称 - */ - public static String getBeanName(String invokeTarget) { - String beanName = StringUtils.substringBefore(invokeTarget, "("); - return StringUtils.substringBeforeLast(beanName, "."); - } - - /** - * 获取bean方法 - * - * @param invokeTarget 目标字符串 - * @return method方法 - */ - public static String getMethodName(String invokeTarget) { - String methodName = StringUtils.substringBefore(invokeTarget, "("); - return StringUtils.substringAfterLast(methodName, "."); - } - - /** - * 获取method方法参数相关列表 - * - * @param invokeTarget 目标字符串 - * @return method方法相关参数列表 - */ - public static List getMethodParams(String invokeTarget) { - String methodStr = StringUtils.substringBetween(invokeTarget, "(", ")"); - if (StringUtils.isEmpty(methodStr)) { - return null; - } - String[] methodParams = methodStr.split(","); - List classs = new LinkedList<>(); - for (int i = 0; i < methodParams.length; i++) { - String str = StringUtils.trimToEmpty(methodParams[i]); - // String字符串类型,包含' - if (StringUtils.contains(str, "'")) { - classs.add(new Object[]{StringUtils.replace(str, "'", ""), String.class}); - } - // boolean布尔类型,等于true或者false - else if (StringUtils.equals(str, "true") || StringUtils.equalsIgnoreCase(str, "false")) { - classs.add(new Object[]{Boolean.valueOf(str), Boolean.class}); - } - // long长整形,包含L - else if (StringUtils.containsIgnoreCase(str, "L")) { - classs.add(new Object[]{Long.valueOf(StringUtils.replaceIgnoreCase(str, "L", "")), Long.class}); - } - // double浮点类型,包含D - else if (StringUtils.containsIgnoreCase(str, "D")) { - classs.add(new Object[]{Double.valueOf(StringUtils.replaceIgnoreCase(str, "D", "")), Double.class}); - } - // 其他类型归类为整形 - else { - classs.add(new Object[]{Integer.valueOf(str), Integer.class}); - } - } - return classs; - } - - /** - * 获取参数类型 - * - * @param methodParams 参数相关列表 - * @return 参数类型列表 - */ - public static Class[] getMethodParamsType(List methodParams) { - Class[] classs = new Class[methodParams.size()]; - int index = 0; - for (Object[] os : methodParams) { - classs[index] = (Class) os[1]; - index++; - } - return classs; - } - - /** - * 获取参数值 - * - * @param methodParams 参数相关列表 - * @return 参数值列表 - */ - public static Object[] getMethodParamsValue(List methodParams) { - Object[] classs = new Object[methodParams.size()]; - int index = 0; - for (Object[] os : methodParams) { - classs[index] = (Object) os[0]; - index++; - } - return classs; - } -} diff --git a/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/QuartzDisallowConcurrentExecution.java b/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/QuartzDisallowConcurrentExecution.java deleted file mode 100644 index 6d9c550d..00000000 --- a/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/QuartzDisallowConcurrentExecution.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.ruoyi.quartz.util; - -import org.quartz.DisallowConcurrentExecution; -import org.quartz.JobExecutionContext; -import com.ruoyi.quartz.domain.SysJob; - -/** - * 定时任务处理(禁止并发执行) - * - * @author ruoyi - */ -@DisallowConcurrentExecution -public class QuartzDisallowConcurrentExecution extends AbstractQuartzJob { - @Override - protected void doExecute(JobExecutionContext context, SysJob sysJob) throws Exception { - JobInvokeUtil.invokeMethod(sysJob); - } -} diff --git a/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/QuartzJobExecution.java b/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/QuartzJobExecution.java deleted file mode 100644 index 733f03e2..00000000 --- a/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/QuartzJobExecution.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.ruoyi.quartz.util; - -import org.quartz.JobExecutionContext; -import com.ruoyi.quartz.domain.SysJob; - -/** - * 定时任务处理(允许并发执行) - * - * @author ruoyi - */ -public class QuartzJobExecution extends AbstractQuartzJob { - @Override - protected void doExecute(JobExecutionContext context, SysJob sysJob) throws Exception { - JobInvokeUtil.invokeMethod(sysJob); - } -} diff --git a/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/ScheduleUtils.java b/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/ScheduleUtils.java deleted file mode 100644 index ec6dba39..00000000 --- a/spring-boot/ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/ScheduleUtils.java +++ /dev/null @@ -1,103 +0,0 @@ -package com.ruoyi.quartz.util; - -import org.quartz.CronScheduleBuilder; -import org.quartz.CronTrigger; -import org.quartz.Job; -import org.quartz.JobBuilder; -import org.quartz.JobDetail; -import org.quartz.JobKey; -import org.quartz.Scheduler; -import org.quartz.SchedulerException; -import org.quartz.TriggerBuilder; -import org.quartz.TriggerKey; -import com.ruoyi.common.constant.ScheduleConstants; -import com.ruoyi.common.exception.job.TaskException; -import com.ruoyi.common.exception.job.TaskException.Code; -import com.ruoyi.quartz.domain.SysJob; - -/** - * 定时任务工具类 - * - * @author ruoyi - */ -public class ScheduleUtils { - /** - * 得到quartz任务类 - * - * @param sysJob 执行计划 - * @return 具体执行任务类 - */ - private static Class getQuartzJobClass(SysJob sysJob) { - boolean isConcurrent = "0".equals(sysJob.getConcurrent()); - return isConcurrent ? QuartzJobExecution.class : QuartzDisallowConcurrentExecution.class; - } - - /** - * 构建任务触发对象 - */ - public static TriggerKey getTriggerKey(Long jobId, String jobGroup) { - return TriggerKey.triggerKey(ScheduleConstants.TASK_CLASS_NAME + jobId, jobGroup); - } - - /** - * 构建任务键对象 - */ - public static JobKey getJobKey(Long jobId, String jobGroup) { - return JobKey.jobKey(ScheduleConstants.TASK_CLASS_NAME + jobId, jobGroup); - } - - /** - * 创建定时任务 - */ - public static void createScheduleJob(Scheduler scheduler, SysJob job) throws SchedulerException, TaskException { - Class jobClass = getQuartzJobClass(job); - // 构建job信息 - Long jobId = job.getJobId(); - String jobGroup = job.getJobGroup(); - JobDetail jobDetail = JobBuilder.newJob(jobClass).withIdentity(getJobKey(jobId, jobGroup)).build(); - - // 表达式调度构建器 - CronScheduleBuilder cronScheduleBuilder = CronScheduleBuilder.cronSchedule(job.getCronExpression()); - cronScheduleBuilder = handleCronScheduleMisfirePolicy(job, cronScheduleBuilder); - - // 按新的cronExpression表达式构建一个新的trigger - CronTrigger trigger = TriggerBuilder.newTrigger().withIdentity(getTriggerKey(jobId, jobGroup)) - .withSchedule(cronScheduleBuilder).build(); - - // 放入参数,运行时的方法可以获取 - jobDetail.getJobDataMap().put(ScheduleConstants.TASK_PROPERTIES, job); - - // 判断是否存在 - if (scheduler.checkExists(getJobKey(jobId, jobGroup))) { - // 防止创建时存在数据问题 先移除,然后在执行创建操作 - scheduler.deleteJob(getJobKey(jobId, jobGroup)); - } - - scheduler.scheduleJob(jobDetail, trigger); - - // 暂停任务 - if (job.getStatus().equals(ScheduleConstants.Status.PAUSE.getValue())) { - scheduler.pauseJob(ScheduleUtils.getJobKey(jobId, jobGroup)); - } - } - - /** - * 设置定时任务策略 - */ - public static CronScheduleBuilder handleCronScheduleMisfirePolicy(SysJob job, CronScheduleBuilder cb) - throws TaskException { - switch (job.getMisfirePolicy()) { - case ScheduleConstants.MISFIRE_DEFAULT: - return cb; - case ScheduleConstants.MISFIRE_IGNORE_MISFIRES: - return cb.withMisfireHandlingInstructionIgnoreMisfires(); - case ScheduleConstants.MISFIRE_FIRE_AND_PROCEED: - return cb.withMisfireHandlingInstructionFireAndProceed(); - case ScheduleConstants.MISFIRE_DO_NOTHING: - return cb.withMisfireHandlingInstructionDoNothing(); - default: - throw new TaskException("The task misfire policy '" + job.getMisfirePolicy() - + "' cannot be used in cron schedule tasks", Code.CONFIG_ERROR); - } - } -} diff --git a/spring-boot/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobLogMapper.xml b/spring-boot/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobLogMapper.xml deleted file mode 100644 index 09ff5f2e..00000000 --- a/spring-boot/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobLogMapper.xml +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - - - - - - - select job_log_id, job_name, job_group, invoke_target, job_message, status, exception_info, create_time - from sys_job_log - - - - - - - - - - delete from sys_job_log where job_log_id = #{jobLogId} - - - - delete from sys_job_log where job_log_id in - - #{jobLogId} - - - - - truncate table sys_job_log - - - - insert into sys_job_log( - job_log_id, - job_name, - job_group, - invoke_target, - job_message, - status, - exception_info, - create_time - )values( - #{jobLogId}, - #{jobName}, - #{jobGroup}, - #{invokeTarget}, - #{jobMessage}, - #{status}, - #{exceptionInfo}, - sysdate() - ) - - - \ No newline at end of file diff --git a/spring-boot/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobMapper.xml b/spring-boot/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobMapper.xml deleted file mode 100644 index 225b82fb..00000000 --- a/spring-boot/ruoyi-quartz/src/main/resources/mapper/quartz/SysJobMapper.xml +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - select job_id, job_name, job_group, invoke_target, cron_expression, misfire_policy, concurrent, status, - create_by, create_time, remark - from sys_job - - - - - - - - - - delete from sys_job where job_id = #{jobId} - - - - delete from sys_job where job_id in - - #{jobId} - - - - - update sys_job - - job_name = #{jobName}, - job_group = #{jobGroup}, - invoke_target = #{invokeTarget}, - cron_expression = #{cronExpression}, - misfire_policy = #{misfirePolicy}, - concurrent = #{concurrent}, - status = #{status}, - remark = #{remark}, - update_by = #{updateBy}, - update_time = sysdate() - - where job_id = #{jobId} - - - - insert into sys_job( - job_id, - job_name, - job_group, - invoke_target, - cron_expression, - misfire_policy, - concurrent, - status, - remark, - create_by, - create_time - )values( - #{jobId}, - #{jobName}, - #{jobGroup}, - #{invokeTarget}, - #{cronExpression}, - #{misfirePolicy}, - #{concurrent}, - #{status}, - #{remark}, - #{createBy}, - sysdate() - ) - - - \ No newline at end of file diff --git a/spring-boot/ruoyi-system/pom.xml b/spring-boot/ruoyi-system/pom.xml deleted file mode 100644 index 64215f92..00000000 --- a/spring-boot/ruoyi-system/pom.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - ruoyi - com.ruoyi - 3.4.0 - - 4.0.0 - - ruoyi-system - - - system系统模块 - - - - - - - com.ruoyi - ruoyi-common - - - - - org.springframework.boot - spring-boot-starter-integration - - - org.springframework.integration - spring-integration-stream - - - org.springframework.integration - spring-integration-mqtt - - - org.eclipse.paho - org.eclipse.paho.client.mqttv3 - 1.2.0 - - - - io.swagger - swagger-annotations - 1.5.21 - compile - - - org.springframework.boot - spring-boot-test - 2.5.4 - test - - - junit - junit - 4.13.1 - test - - - com.alibaba - druid - 1.2.6 - - - - com.zaxxer - HikariCP - 3.2.0 - - - - \ No newline at end of file diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/controller/IotCategoryController.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/controller/IotCategoryController.java deleted file mode 100644 index bfdf5b7b..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/controller/IotCategoryController.java +++ /dev/null @@ -1,116 +0,0 @@ -/****************************************************************************** - * 作者:kerwincui - * 时间:2021-06-08 - * 邮箱:164770707@qq.com - * 源码地址:https://gitee.com/kerwincui/wumei-smart - * author: kerwincui - * create: 2021-06-08 - * email:164770707@qq.com - * source:https://github.com/kerwincui/wumei-smart - ******************************************************************************/ -package com.ruoyi.system.controller; - -import java.util.List; - -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.system.domain.IotCategory; -import com.ruoyi.system.service.IIotCategoryService; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.common.core.page.TableDataInfo; - -/** - * 设备分类Controller - * - * @author kerwincui - * @date 2021-05-07 - */ -@Api(value = "设备分类", tags = "设备分类") -@RestController -@RequestMapping("/system/category") -public class IotCategoryController extends BaseController { - @Autowired - private IIotCategoryService iotCategoryService; - - /** - * 查询设备分类列表 - */ - @ApiOperation(value = "分类列表", notes = "分类列表") - @PreAuthorize("@ss.hasPermi('system:category:list')") - @GetMapping("/list") - public TableDataInfo list(IotCategory iotCategory) { - startPage(); - List list = iotCategoryService.selectIotCategoryList(iotCategory); - return getDataTable(list); - } - - /** - * 导出设备分类列表 - */ - @ApiOperation(value = "导出分类列表", notes = "导出分类列表") - @PreAuthorize("@ss.hasPermi('system:category:export')") - @Log(title = "设备分类", businessType = BusinessType.EXPORT) - @GetMapping("/export") - public AjaxResult export(IotCategory iotCategory) { - List list = iotCategoryService.selectIotCategoryList(iotCategory); - ExcelUtil util = new ExcelUtil(IotCategory.class); - return util.exportExcel(list, "category"); - } - - /** - * 获取设备分类详细信息 - */ - @ApiOperation(value = "获取分类详情", notes = "获取分类详情") - @PreAuthorize("@ss.hasPermi('system:category:query')") - @GetMapping(value = "/{categoryId}") - public AjaxResult getInfo(@PathVariable("categoryId") Long categoryId) { - return AjaxResult.success(iotCategoryService.selectIotCategoryById(categoryId)); - } - - /** - * 新增设备分类 - */ - @ApiOperation(value = "新增分类", notes = "新增分类") - @PreAuthorize("@ss.hasPermi('system:category:add')") - @Log(title = "设备分类", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@RequestBody IotCategory iotCategory) { - return toAjax(iotCategoryService.insertIotCategory(iotCategory)); - } - - /** - * 修改设备分类 - */ - @ApiOperation(value = "修改分类", notes = "修改分类") - @PreAuthorize("@ss.hasPermi('system:category:edit')") - @Log(title = "设备分类", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@RequestBody IotCategory iotCategory) { - return toAjax(iotCategoryService.updateIotCategory(iotCategory)); - } - - /** - * 删除设备分类 - */ - @ApiOperation(value = "删除分类", notes = "删除分类") - @PreAuthorize("@ss.hasPermi('system:category:remove')") - @Log(title = "设备分类", businessType = BusinessType.DELETE) - @DeleteMapping("/{categoryIds}") - public AjaxResult remove(@PathVariable Long[] categoryIds) { - return toAjax(iotCategoryService.deleteIotCategoryByIds(categoryIds)); - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/controller/IotDeviceController.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/controller/IotDeviceController.java deleted file mode 100644 index 7d365408..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/controller/IotDeviceController.java +++ /dev/null @@ -1,238 +0,0 @@ -/****************************************************************************** - * 作者:kerwincui - * 时间:2021-06-08 - * 邮箱:164770707@qq.com - * 源码地址:https://gitee.com/kerwincui/wumei-smart - * author: kerwincui - * create: 2021-06-08 - * email:164770707@qq.com - * source:https://github.com/kerwincui/wumei-smart - ******************************************************************************/ -package com.ruoyi.system.controller; - -import java.math.BigDecimal; -import java.util.List; - -import com.ruoyi.common.core.domain.model.LoginUser; -import com.ruoyi.common.exception.CustomException; -import com.ruoyi.common.utils.ServletUtils; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.system.domain.vo.DeviceControlCMD; -import com.ruoyi.system.domain.vo.IotDeviceListDto; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.core.context.SecurityContextHolder; -import org.springframework.security.core.token.TokenService; -import org.springframework.web.bind.annotation.*; -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.system.domain.IotDevice; -import com.ruoyi.system.service.IIotDeviceService; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.common.core.page.TableDataInfo; - -import javax.validation.constraints.Size; - -/** - * 设备Controller - * - * @author kerwincui - * @date 2021-05-06 - */ -@Api(value = "设备", tags = "设备") -@RestController -@RequestMapping("/system/device") -public class IotDeviceController extends BaseController { - @Autowired - private IIotDeviceService iotDeviceService; - - /** - * 查询设备列表 - */ - @ApiOperation(value = "设备列表", notes = "设备列表") - @PreAuthorize("@ss.hasPermi('system:device:list')") - @GetMapping("/list") - public TableDataInfo list(IotDevice iotDevice) { - startPage(); - LoginUser user = (LoginUser) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); - iotDevice.setOwnerId(user.getUser().getUserId().toString()); - List list = iotDeviceService.selectIotDeviceList(iotDevice); - return getDataTable(list); - } - - - - /** - * 导出设备列表 - */ - @ApiOperation(value = "导出设备列表", notes = "导出设备列表") - @PreAuthorize("@ss.hasPermi('system:device:export')") - @Log(title = "设备", businessType = BusinessType.EXPORT) - @GetMapping("/export") - public AjaxResult export(IotDevice iotDevice) { - List list = iotDeviceService.selectIotDeviceList(iotDevice); - ExcelUtil util = new ExcelUtil(IotDeviceListDto.class); - return util.exportExcel(list, "device"); - } - - /** - * 获取设备详细信息 - */ - @ApiOperation(value = "获取设备详情", notes = "获取设备详情") - @PreAuthorize("@ss.hasPermi('system:device:query')") - @GetMapping(value = "/{deviceId}") - public AjaxResult getInfo(@PathVariable("deviceId") Long deviceId) { - return AjaxResult.success(iotDeviceService.selectIotDeviceById(deviceId)); - } - - /** - * 根据设备编号获取设备详细信息 - */ - @ApiOperation(value = "根据设备编号获取设备详情", notes = "根据设备编号获取设备详情") - @PreAuthorize("@ss.hasPermi('system:device:query')") - @GetMapping(value = "/getByNum/{deviceNum}") - public AjaxResult getInfoByNum(@PathVariable("deviceNum") String deviceNum) { - return AjaxResult.success(iotDeviceService.selectIotDeviceByNum(deviceNum)); - } - - /** - * 新增设备 - */ - @ApiOperation(value = "新增设备", notes = "新增设备") - @PreAuthorize("@ss.hasPermi('system:device:add')") - @Log(title = "设备", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@RequestBody IotDevice iotDevice) { - LoginUser user = (LoginUser) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); - iotDevice.setOwnerId(user.getUser().getUserId().toString()); - iotDevice.setStatus("未绑定"); - IotDevice device = iotDeviceService.selectIotDeviceByNum(iotDevice.getDeviceNum()); - if (device != null) { - return AjaxResult.error("设备编号已存在,请重新填写"); - } - return toAjax(iotDeviceService.insertIotDevice(iotDevice)); - } - - /** - * 修改设备 - */ - @ApiOperation(value = "修改设备", notes = "修改设备") - @PreAuthorize("@ss.hasPermi('system:device:edit')") - @Log(title = "设备", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@RequestBody IotDevice iotDevice) { - return toAjax(iotDeviceService.updateIotDevice(iotDevice)); - } - - /** - * 删除设备 - */ - @ApiOperation(value = "删除设备", notes = "删除设备") - @PreAuthorize("@ss.hasPermi('system:device:remove')") - @Log(title = "设备", businessType = BusinessType.DELETE) - @DeleteMapping("/{deviceIds}") - public AjaxResult remove(@PathVariable Long[] deviceIds) { - return toAjax(iotDeviceService.deleteIotDeviceByIds(deviceIds)); - } - - - @ApiOperation(value = "绑定设备", notes = "绑定设备") - @Log(title = "设备", businessType = BusinessType.UPDATE) - @PostMapping("/bindDevice") - public AjaxResult bindDevice(@RequestBody IotDevice iotDevice) { - LoginUser user = (LoginUser) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); - Long userId = user.getUser().getUserId(); - String username = user.getUsername(); - String deviceNum = iotDevice.getDeviceNum(); - String deviceName = iotDevice.getDeviceName(); - Long categoryId = iotDevice.getCategoryId(); - String remark = iotDevice.getRemark(); - return AjaxResult.success(iotDeviceService.bindDevice(userId,username,deviceNum,deviceName,categoryId, remark)); - } - - @ApiOperation(value = "控制设备", notes = "控制设备") - @PreAuthorize("@ss.hasPermi('system:device:control')") - @Log(title = "设备", businessType = BusinessType.UPDATE) - @PostMapping("/control") - public AjaxResult control(@RequestBody DeviceControlCMD deviceControlCMD) { - String deviceNum = deviceControlCMD.getDeviceNum(); - String cmd = deviceControlCMD.getCmd(); - if(StringUtils.isBlank(deviceNum)) { - throw new CustomException("设备编号不能为空"); - } - if(StringUtils.isBlank(cmd)) { - throw new CustomException("控制指令不能为空"); - } - return toAjax(iotDeviceService.controlDeviceByNum(deviceNum,cmd)); - } - - - - @ApiOperation(value = "小程序设备列表", notes = "小程序设备列表") - @PreAuthorize("@ss.hasPermi('system:device:list')") - @GetMapping("/listDevice") - public TableDataInfo listDevice(IotDevice iotDevice) { - startPage(); - LoginUser user = (LoginUser) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); - iotDevice.setOwnerId(user.getUser().getUserId().toString()); - List list = iotDeviceService.selectMpIotDeviceList(iotDevice); - return getDataTable(list); - } - - @ApiOperation(value = "修改设备名称和备注", notes = "修改设备名称和备注") - @Log(title = "设备", businessType = BusinessType.UPDATE) - @PostMapping("/updateDeviceInfo") - public AjaxResult updateDeviceInfo(@RequestBody IotDevice iotDevice) { - Long deviceId = iotDevice.getDeviceId(); - String deviceName = iotDevice.getDeviceName(); - String remark = iotDevice.getRemark(); - LoginUser user = (LoginUser) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); - Long userId = user.getUser().getUserId(); - String nickName = user.getUser().getNickName(); - return AjaxResult.success(iotDeviceService.updateDeviceInfo( userId, nickName, deviceId, deviceName, remark)); - } - - @ApiOperation(value = "根据用户设备编号获取设备详情", notes = "根据设备编号获取设备详情") - @GetMapping(value = "/getByUserAndNum/{deviceNum}") - public AjaxResult getInfoByUserAndNum(@PathVariable("deviceNum") String deviceNum) { - LoginUser user = (LoginUser) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); - Long userId = user.getUser().getUserId(); - return AjaxResult.success(iotDeviceService.selectIotDeviceByUserAndNum(userId,deviceNum)); - } - - @ApiOperation(value = "解除绑定设备", notes = "解除绑定设备") - @Log(title = "设备", businessType = BusinessType.UPDATE) - @PostMapping("/unBindDevice") - public AjaxResult unBindDevice(@RequestBody IotDevice iotDevice) { - LoginUser user = (LoginUser) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); - Long userId = user.getUser().getUserId(); - String username = user.getUsername(); - Long deviceId = iotDevice.getDeviceId(); - return AjaxResult.success(iotDeviceService.unBindDevice(userId,username,deviceId)); - } - - @ApiOperation(value = "根据设备编号查询设备信息", notes = "根据设备编号查询设备信息") - @Log(title = "设备", businessType = BusinessType.UPDATE) - @GetMapping("/getDeviceInfoByDeviceNum") - public AjaxResult getDeviceInfoByDeviceNum(@RequestParam String deviceNum ) { - LoginUser user = (LoginUser) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); - Long userId = user.getUser().getUserId(); - String username = user.getUsername(); - return AjaxResult.success(iotDeviceService.getDeviceInfoByDeviceNum(userId,username,deviceNum)); - } - - @ApiOperation(value = "根据设备编号查询设备信息", notes = "根据设备编号查询设备信息") - @Log(title = "设备", businessType = BusinessType.UPDATE) - @GetMapping("/getDeviceInfoByDeviceId") - public AjaxResult getDeviceInfoByDeviceId(@RequestParam Long deviceId ) { - LoginUser user = (LoginUser) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); - Long userId = user.getUser().getUserId(); - String username = user.getUsername(); - return AjaxResult.success(iotDeviceService.getDeviceInfoByDeviceId(userId,username,deviceId)); - } - -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/controller/IotDeviceSetController.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/controller/IotDeviceSetController.java deleted file mode 100644 index 68827ffc..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/controller/IotDeviceSetController.java +++ /dev/null @@ -1,222 +0,0 @@ -/****************************************************************************** - * 作者:kerwincui - * 时间:2021-06-08 - * 邮箱:164770707@qq.com - * 源码地址:https://gitee.com/kerwincui/wumei-smart - * author: kerwincui - * create: 2021-06-08 - * email:164770707@qq.com - * source:https://github.com/kerwincui/wumei-smart - ******************************************************************************/ -package com.ruoyi.system.controller; - -import java.util.List; - -import com.alibaba.fastjson.JSON; -import com.ruoyi.system.domain.IotDevice; -import com.ruoyi.system.domain.IotDeviceStatus; -import com.ruoyi.system.mqtt.config.MqttPushClient; -import com.ruoyi.system.service.IIotDeviceService; -import com.ruoyi.system.service.IIotDeviceStatusService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.system.domain.IotDeviceSet; -import com.ruoyi.system.service.IIotDeviceSetService; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.common.core.page.TableDataInfo; - -/** - * 设备配置Controller - * - * @author kerwincui - * @date 2021-05-06 - */ -@Api(value = "设备配置", tags = "设备配置") -@RestController -@RequestMapping("/system/set") -public class IotDeviceSetController extends BaseController { - @Autowired - private IIotDeviceSetService iotDeviceSetService; - @Autowired - private IIotDeviceStatusService iotDeviceStatusService; - @Autowired - private IIotDeviceService iotDeviceService; - - @Autowired - private MqttPushClient mqttPushClient; - - /** - * 查询设备配置列表 - */ - @ApiOperation(value = "查询设备配置列表", notes = "查询设备配置列表") - @PreAuthorize("@ss.hasPermi('system:set:list')") - @GetMapping("/list") - public TableDataInfo list(IotDeviceSet iotDeviceSet) { - startPage(); - List list = iotDeviceSetService.selectIotDeviceSetList(iotDeviceSet); - return getDataTable(list); - } - - /** - * 导出设备配置列表 - */ - @ApiOperation(value = "导出设备配置列表", notes = "导出设备配置列表") - @PreAuthorize("@ss.hasPermi('system:set:export')") - @Log(title = "设备配置", businessType = BusinessType.EXPORT) - @GetMapping("/export") - public AjaxResult export(IotDeviceSet iotDeviceSet) { - List list = iotDeviceSetService.selectIotDeviceSetList(iotDeviceSet); - ExcelUtil util = new ExcelUtil(IotDeviceSet.class); - return util.exportExcel(list, "set"); - } - - /** - * 获取设备配置详细信息 - */ - @ApiOperation(value = "获取设备配置详情", notes = "获取设备配置详情") - @PreAuthorize("@ss.hasPermi('system:set:query')") - @GetMapping(value = "/{deviceSetId}") - public AjaxResult getInfo(@PathVariable("deviceSetId") Long deviceSetId) { - return AjaxResult.success(iotDeviceSetService.selectIotDeviceSetById(deviceSetId)); - } - - /** - * 获取最新设备配置详细信息 - */ - @ApiOperation(value = "获取最新设备配置详情", notes = "获取最新设备配置详情") - @PreAuthorize("@ss.hasPermi('system:set:query')") - @GetMapping(value = "/new/{deviceId}") - public AjaxResult getNewInfo(@PathVariable("deviceId") Long deviceId) { - IotDeviceSet set = iotDeviceSetService.selectIotDeviceSetByDeviceId(deviceId); - if (set == null) { - // 构建默认数据 - IotDevice device = iotDeviceService.selectIotDeviceById(deviceId); - if (device != null) { - set = new IotDeviceSet(); - set.setDeviceId(device.getDeviceId()); - set.setDeviceNum(device.getDeviceNum()); - set.setOwnerId(device.getOwnerId()); - set.setIsRadar(0); - set.setIsAlarm(0); - set.setRadarInterval(5); - set.setIsRfControl(0); - set.setIsRfLearn(0); - set.setRfOneFunc(1); - set.setRfTwoFunc(2); - set.setRfThreeFunc(3); - set.setRfFourFunc(4); - set.setIsRfClear(0); - set.setIsAp(0); - set.setIsReset(0); - } - } - return AjaxResult.success(set); - } - - /** - * 新增设备配置 - */ - @ApiOperation(value = "新增设备配置", notes = "新增设备配置") - @PreAuthorize("@ss.hasPermi('system:set:add')") - @Log(title = "设备配置", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@RequestBody IotDeviceSet iotDeviceSet) { - return toAjax(iotDeviceSetService.insertIotDeviceSet(iotDeviceSet)); - } - - /** - * 修改设备配置 - */ - @ApiOperation(value = "修改设备配置", notes = "修改设备配置") - @PreAuthorize("@ss.hasPermi('system:set:edit')") - @Log(title = "设备配置", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@RequestBody IotDeviceSet iotDeviceSet) { - IotDeviceStatus status = iotDeviceStatusService.selectIotDeviceStatusByDeviceId(iotDeviceSet.getDeviceId()); - if (status == null || status.getIsOnline() == 0) { - return AjaxResult.error("设备已离线,不能更新状态。"); - } - // 存储 - iotDeviceSetService.updateIotDeviceSet(iotDeviceSet); - - //mqtt发布 - IotDeviceSet set = iotDeviceSetService.selectIotDeviceSetByDeviceId(iotDeviceSet.getDeviceId()); - if (iotDeviceSet.getIsRadar() != null) { - set.setIsRadar(iotDeviceSet.getIsRadar()); - } - if (iotDeviceSet.getIsAlarm() != null) { - set.setIsAlarm(iotDeviceSet.getIsAlarm()); - } - if (iotDeviceSet.getRadarInterval() != null) { - set.setRadarInterval(iotDeviceSet.getRadarInterval()); - } - if (iotDeviceSet.getIsRfControl() != null) { - set.setIsRfControl(iotDeviceSet.getIsRfControl()); - } - if (iotDeviceSet.getRfOneFunc() != null) { - set.setRfOneFunc(iotDeviceSet.getRfOneFunc()); - } - if (iotDeviceSet.getRfTwoFunc() != null) { - set.setRfTwoFunc(iotDeviceSet.getRfTwoFunc()); - } - if (iotDeviceSet.getRfThreeFunc() != null) { - set.setRfThreeFunc(iotDeviceSet.getRfThreeFunc()); - } - if (iotDeviceSet.getRfFourFunc() != null) { - set.setRfFourFunc(iotDeviceSet.getRfFourFunc()); - } - if (iotDeviceSet.getIsRfLearn() != null) { - set.setIsRfLearn(iotDeviceSet.getIsRfLearn()); - } - if (iotDeviceSet.getIsRfClear() != null) { - set.setIsRfClear(iotDeviceSet.getIsRfClear()); - } - if (iotDeviceSet.getIsAp() != null) { - set.setIsAp(iotDeviceSet.getIsAp()); - } - if (iotDeviceSet.getIsReset() != null) { - set.setIsReset(iotDeviceSet.getIsReset()); - } - String content = JSON.toJSONString(set); - boolean isSuccess = mqttPushClient.publish(0, true, "setting/set/" + set.getDeviceNum(), content); - if (isSuccess) { - return AjaxResult.success("mqtt 发布成功"); - } - return AjaxResult.error("mqtt 发布失败。"); - } - - @ApiOperation(value = "mqtt获取设备配置", notes = "mqtt获取设备配置") - @GetMapping(value = "/getSetting/{deviceNum}") - public AjaxResult getSetting(@PathVariable("deviceNum") String deviceNum) { - boolean isSuccess = mqttPushClient.publish(0, true, "setting/get/" + deviceNum, "wumei.live"); - if (isSuccess) { - return AjaxResult.success("mqtt 发布成功"); - } - return AjaxResult.error("mqtt 发布失败。"); - } - - /** - * 删除设备配置 - */ - @ApiOperation(value = "删除设备配置", notes = "删除设备配置") - @PreAuthorize("@ss.hasPermi('system:set:remove')") - @Log(title = "设备配置", businessType = BusinessType.DELETE) - @DeleteMapping("/{deviceSetIds}") - public AjaxResult remove(@PathVariable Long[] deviceSetIds) { - return toAjax(iotDeviceSetService.deleteIotDeviceSetByIds(deviceSetIds)); - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/controller/IotDeviceStatusController.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/controller/IotDeviceStatusController.java deleted file mode 100644 index 6a0fe27b..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/controller/IotDeviceStatusController.java +++ /dev/null @@ -1,219 +0,0 @@ -/****************************************************************************** - * 作者:kerwincui - * 时间:2021-06-08 - * 邮箱:164770707@qq.com - * 源码地址:https://gitee.com/kerwincui/wumei-smart - * author: kerwincui - * create: 2021-06-08 - * email:164770707@qq.com - * source:https://github.com/kerwincui/wumei-smart - ******************************************************************************/ -package com.ruoyi.system.controller; - -import java.math.BigDecimal; -import java.util.List; - -import com.alibaba.fastjson.JSON; -import com.ruoyi.system.domain.IotDevice; -import com.ruoyi.system.mqtt.config.MqttPushClient; -import com.ruoyi.system.service.IIotDeviceService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.system.domain.IotDeviceStatus; -import com.ruoyi.system.service.IIotDeviceStatusService; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.common.core.page.TableDataInfo; - -/** - * 设备状态Controller - * - * @author kerwincui - * @date 2021-05-06 - */ -@Api(value = "设备状态", tags = "设备状态") -@RestController -@RequestMapping("/system/status") -public class IotDeviceStatusController extends BaseController { - @Autowired - private IIotDeviceStatusService iotDeviceStatusService; - @Autowired - private IIotDeviceService iotDeviceService; - - @Autowired - private MqttPushClient mqttPushClient; - - /** - * 查询设备状态列表 - */ - @ApiOperation(value = "查询设备状态列表", notes = "查询设备状态列表") - @PreAuthorize("@ss.hasPermi('system:status:list')") - @GetMapping("/list") - public TableDataInfo list(IotDeviceStatus iotDeviceStatus) { - startPage(); - List list = iotDeviceStatusService.selectIotDeviceStatusList(iotDeviceStatus); - return getDataTable(list); - } - - /** - * 导出设备状态列表 - */ - @ApiOperation(value = "导出设备状态列表", notes = "导出设备状态列表") - @PreAuthorize("@ss.hasPermi('system:status:export')") - @Log(title = "设备状态", businessType = BusinessType.EXPORT) - @GetMapping("/export") - public AjaxResult export(IotDeviceStatus iotDeviceStatus) { - List list = iotDeviceStatusService.selectIotDeviceStatusList(iotDeviceStatus); - ExcelUtil util = new ExcelUtil(IotDeviceStatus.class); - return util.exportExcel(list, "status"); - } - - /** - * 获取设备状态详细信息 - */ - @ApiOperation(value = "获取设备状态详情", notes = "获取设备状态详情") - @PreAuthorize("@ss.hasPermi('system:status:query')") - @GetMapping(value = "/{deviceStatusId}") - public AjaxResult getInfo(@PathVariable("deviceStatusId") Long deviceStatusId) { - return AjaxResult.success(iotDeviceStatusService.selectIotDeviceStatusById(deviceStatusId)); - } - - /** - * 根据设备编号获取设备状态 - */ - @ApiOperation(value = "根据设备编号获取最新设备状态", notes = "根据设备编号获取最新设备状态") - @PreAuthorize("@ss.hasPermi('system:status:query')") - @GetMapping(value = "/newByNum/{deviceNum}") - public AjaxResult getNewStatus(@PathVariable("deviceNum") String deviceNum) { - return AjaxResult.success(iotDeviceStatusService.selectIotDeviceStatusByDeviceNum(deviceNum)); - } - - /** - * 获取最新设备状态详细信息 - */ - @ApiOperation(value = "获取最新设备状态详情", notes = "获取最新设备状态详情") - @PreAuthorize("@ss.hasPermi('system:status:query')") - @GetMapping(value = "/new/{deviceId}") - public AjaxResult getNewInfo(@PathVariable("deviceId") Long deviceId) { - IotDeviceStatus status = iotDeviceStatusService.selectIotDeviceStatusByDeviceId(deviceId); - if (status == null) { - // 构建默认数据 - IotDevice device = iotDeviceService.selectIotDeviceById(deviceId); - if (device != null) { - status = new IotDeviceStatus(); - status.setDeviceId(device.getDeviceId()); - status.setDeviceNum(device.getDeviceNum()); - status.setRelayStatus(0); - status.setLightStatus(0); - status.setLightMode(0); - status.setBrightness(100); - status.setLightInterval(500); - status.setFadeTime(300); - status.setRed(255L); - status.setBlue(255L); - status.setGreen(255L); - status.setAirTemperature(BigDecimal.valueOf(0)); - status.setAirHumidity(BigDecimal.valueOf(0)); - status.setDeviceTemperature(BigDecimal.valueOf(0)); - } - } - return AjaxResult.success(status); - } - - /** - * 新增设备状态 - */ - @ApiOperation(value = "新增设备状态", notes = "新增设备状态") - @PreAuthorize("@ss.hasPermi('system:status:add')") - @Log(title = "设备状态", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@RequestBody IotDeviceStatus iotDeviceStatus) { - return toAjax(iotDeviceStatusService.insertIotDeviceStatus(iotDeviceStatus)); - } - - /** - * 修改设备状态 - */ - @ApiOperation(value = "修改设备状态", notes = "修改设备状态") - @PreAuthorize("@ss.hasPermi('system:status:edit')") - @Log(title = "设备状态", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@RequestBody IotDeviceStatus iotDeviceStatus) { - IotDeviceStatus status = iotDeviceStatusService.selectIotDeviceStatusByDeviceId(iotDeviceStatus.getDeviceId()); - if (status == null || status.getIsOnline() == 0) { - return AjaxResult.error("设备已离线,不能更新状态。"); - } - // 存储 - iotDeviceStatusService.updateIotDeviceStatus(iotDeviceStatus); - - // mqtt发布 - if (iotDeviceStatus.getRelayStatus() != null) { - status.setRelayStatus(iotDeviceStatus.getRelayStatus()); - } - if (iotDeviceStatus.getLightStatus() != null) { - status.setLightStatus(iotDeviceStatus.getLightStatus()); - } - if (iotDeviceStatus.getLightMode() != null) { - status.setLightMode(iotDeviceStatus.getLightMode()); - } - if (iotDeviceStatus.getLightInterval() != null) { - status.setLightInterval(iotDeviceStatus.getLightInterval()); - } - if (iotDeviceStatus.getFadeTime() != null) { - status.setFadeTime(iotDeviceStatus.getFadeTime()); - } - if (iotDeviceStatus.getBrightness() != null) { - status.setBrightness(iotDeviceStatus.getBrightness()); - } - if (iotDeviceStatus.getRed() != null) { - status.setRed(iotDeviceStatus.getRed()); - } - if (iotDeviceStatus.getGreen() != null) { - status.setGreen(iotDeviceStatus.getGreen()); - } - if (iotDeviceStatus.getBlue() != null) { - status.setBlue(iotDeviceStatus.getBlue()); - } - String content = JSON.toJSONString(status); - boolean isSuccess = mqttPushClient.publish(1, true, "status/set/" + status.getDeviceNum(), content); - if (isSuccess) { - return AjaxResult.success("mqtt 发布成功"); - } - - return AjaxResult.error("mqtt 发布失败。"); - } - - @ApiOperation(value = "mqtt获取设备状态", notes = "mqtt获取设备状态") - @GetMapping(value = "/getStatus/{deviceNum}") - public AjaxResult getStatus(@PathVariable("deviceNum") String deviceNum) { - boolean isSuccess = mqttPushClient.publish(0, true, "status/get/" + deviceNum, "wumei.live"); - if (isSuccess) { - return AjaxResult.success("mqtt 发布成功"); - } - return AjaxResult.error("mqtt 发布失败。"); - } - - /** - * 删除设备状态 - */ - @ApiOperation(value = "删除设备状态", notes = "删除设备状态") - @PreAuthorize("@ss.hasPermi('system:status:remove')") - @Log(title = "设备状态", businessType = BusinessType.DELETE) - @DeleteMapping("/{deviceStatusIds}") - public AjaxResult remove(@PathVariable Long[] deviceStatusIds) { - return toAjax(iotDeviceStatusService.deleteIotDeviceStatusByIds(deviceStatusIds)); - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/controller/IotDeviceUserRelationController.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/controller/IotDeviceUserRelationController.java deleted file mode 100644 index 816cec51..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/controller/IotDeviceUserRelationController.java +++ /dev/null @@ -1,97 +0,0 @@ -package com.ruoyi.system.controller; - -import java.util.List; - -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.system.domain.IotDeviceUserRelation; -import com.ruoyi.system.service.IIotDeviceUserRelationService; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.common.core.page.TableDataInfo; - -/** - * 【请填写功能名称】Controller - * - * @author wxy - * @date 2021-08-27 - */ -@RestController -@RequestMapping("/system/relation") -public class IotDeviceUserRelationController extends BaseController { - @Autowired - private IIotDeviceUserRelationService iotDeviceUserRelationService; - -/** - * 查询【请填写功能名称】列表 - */ -@PreAuthorize("@ss.hasPermi('system:relation:list')") -@GetMapping("/list") - public TableDataInfo list(IotDeviceUserRelation iotDeviceUserRelation) { - startPage(); - List list = iotDeviceUserRelationService.selectIotDeviceUserRelationList(iotDeviceUserRelation); - return getDataTable(list); - } - - /** - * 导出【请填写功能名称】列表 - */ - @PreAuthorize("@ss.hasPermi('system:relation:export')") - @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) - @GetMapping("/export") - public AjaxResult export(IotDeviceUserRelation iotDeviceUserRelation) { - List list = iotDeviceUserRelationService.selectIotDeviceUserRelationList(iotDeviceUserRelation); - ExcelUtil util = new ExcelUtil(IotDeviceUserRelation. class); - return util.exportExcel(list, "relation"); - } - - /** - * 获取【请填写功能名称】详细信息 - */ - @PreAuthorize("@ss.hasPermi('system:relation:query')") - @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) { - return AjaxResult.success(iotDeviceUserRelationService.selectIotDeviceUserRelationById(id)); - } - - /** - * 新增【请填写功能名称】 - */ - @PreAuthorize("@ss.hasPermi('system:relation:add')") - @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@RequestBody IotDeviceUserRelation iotDeviceUserRelation) { - return toAjax(iotDeviceUserRelationService.insertIotDeviceUserRelation(iotDeviceUserRelation)); - } - - /** - * 修改【请填写功能名称】 - */ - @PreAuthorize("@ss.hasPermi('system:relation:edit')") - @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@RequestBody IotDeviceUserRelation iotDeviceUserRelation) { - return toAjax(iotDeviceUserRelationService.updateIotDeviceUserRelation(iotDeviceUserRelation)); - } - - /** - * 删除【请填写功能名称】 - */ - @PreAuthorize("@ss.hasPermi('system:relation:remove')") - @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) { - return toAjax(iotDeviceUserRelationService.deleteIotDeviceUserRelationByIds(ids)); - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/controller/IotGroupController.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/controller/IotGroupController.java deleted file mode 100644 index 3afdaf8b..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/controller/IotGroupController.java +++ /dev/null @@ -1,116 +0,0 @@ -/****************************************************************************** - * 作者:kerwincui - * 时间:2021-06-08 - * 邮箱:164770707@qq.com - * 源码地址:https://gitee.com/kerwincui/wumei-smart - * author: kerwincui - * create: 2021-06-08 - * email:164770707@qq.com - * source:https://github.com/kerwincui/wumei-smart - ******************************************************************************/ -package com.ruoyi.system.controller; - -import java.util.List; - -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.system.domain.IotGroup; -import com.ruoyi.system.service.IIotGroupService; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.common.core.page.TableDataInfo; - -/** - * 分组Controller - * - * @author kerwincui - * @date 2021-05-18 - */ -@Api(value = "设备分组", tags = "设备分组") -@RestController -@RequestMapping("/system/group") -public class IotGroupController extends BaseController { - @Autowired - private IIotGroupService iotGroupService; - - /** - * 查询分组列表 - */ - @ApiOperation(value = "分组列表", notes = "分组列表") - @PreAuthorize("@ss.hasPermi('system:group:list')") - @GetMapping("/list") - public TableDataInfo list(IotGroup iotGroup) { - startPage(); - List list = iotGroupService.selectIotGroupList(iotGroup); - return getDataTable(list); - } - - /** - * 导出分组列表 - */ - @ApiOperation(value = "导出分组", notes = "导出分组") - @PreAuthorize("@ss.hasPermi('system:group:export')") - @Log(title = "分组", businessType = BusinessType.EXPORT) - @GetMapping("/export") - public AjaxResult export(IotGroup iotGroup) { - List list = iotGroupService.selectIotGroupList(iotGroup); - ExcelUtil util = new ExcelUtil(IotGroup.class); - return util.exportExcel(list, "group"); - } - - /** - * 获取分组详细信息 - */ - @ApiOperation(value = "获取分组详情", notes = "获取分组详情") - @PreAuthorize("@ss.hasPermi('system:group:query')") - @GetMapping(value = "/{groupId}") - public AjaxResult getInfo(@PathVariable("groupId") Long groupId) { - return AjaxResult.success(iotGroupService.selectIotGroupById(groupId)); - } - - /** - * 新增分组 - */ - @ApiOperation(value = "新增分组", notes = "新增分组") - @PreAuthorize("@ss.hasPermi('system:group:add')") - @Log(title = "分组", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@RequestBody IotGroup iotGroup) { - return toAjax(iotGroupService.insertIotGroup(iotGroup)); - } - - /** - * 修改分组 - */ - @ApiOperation(value = "修改分组", notes = "修改分组") - @PreAuthorize("@ss.hasPermi('system:group:edit')") - @Log(title = "分组", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@RequestBody IotGroup iotGroup) { - return toAjax(iotGroupService.updateIotGroup(iotGroup)); - } - - /** - * 删除分组 - */ - @ApiOperation(value = "删除分组", notes = "删除分组") - @PreAuthorize("@ss.hasPermi('system:group:remove')") - @Log(title = "分组", businessType = BusinessType.DELETE) - @DeleteMapping("/{groupIds}") - public AjaxResult remove(@PathVariable Long[] groupIds) { - return toAjax(iotGroupService.deleteIotGroupByIds(groupIds)); - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/controller/MqttController.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/controller/MqttController.java deleted file mode 100644 index 4c9e6bf3..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/controller/MqttController.java +++ /dev/null @@ -1,69 +0,0 @@ -/****************************************************************************** - * 作者:kerwincui - * 时间:2021-06-08 - * 邮箱:164770707@qq.com - * 源码地址:https://gitee.com/kerwincui/wumei-smart - * author: kerwincui - * create: 2021-06-08 - * email:164770707@qq.com - * source:https://github.com/kerwincui/wumei-smart - ******************************************************************************/ -package com.ruoyi.system.controller; - -import com.alibaba.fastjson.JSON; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.system.domain.IotDeviceSet; -import com.ruoyi.system.domain.IotDeviceStatus; -import com.ruoyi.system.mqtt.config.MqttPushClient; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.web.bind.annotation.*; -import org.springframework.beans.factory.annotation.Autowired; - - -/** - * mqtt接口 - */ -@Api(value = "mqtt消息发布", tags = "mqtt消息发布") -@RestController -@RequestMapping("/system/mqtt") -public class MqttController extends BaseController { -// @Autowired -// private MqttPushClient mqttPushClient; -// -// @ApiOperation(value = "更新设备状态", notes = "更新设备状态") -// @PostMapping(value = "/updateStatus") -// public AjaxResult updateStatus(@RequestBody IotDeviceStatus iotDeviceStatus){ -// String content = JSON.toJSONString(iotDeviceStatus); -// boolean isSuccess=mqttPushClient.publish(1,false,"status/set/"+iotDeviceStatus.getDeviceNum(),content); -// if(isSuccess){return AjaxResult.success();} -// return AjaxResult.error("mqtt 发布失败。"); -// } -// -// @ApiOperation(value = "获取设备状态", notes = "获取设备状态") -// @GetMapping(value = "/getStatus/{deviceNum}") -// public AjaxResult getStatus(@PathVariable("deviceNum") String deviceNum){ -// boolean isSuccess=mqttPushClient.publish(0,false,"status/get/"+deviceNum,"wumei.live"); -// if(isSuccess){return AjaxResult.success();} -// return AjaxResult.error("mqtt 发布失败。"); -// } -// -// @ApiOperation(value = "更新设备配置", notes = "更新设备配置") -// @PostMapping(value = "/updateSetting") -// public AjaxResult updateSetting(@RequestBody IotDeviceSet iotDeviceSet){ -// String content = JSON.toJSONString(iotDeviceSet); -// boolean isSuccess=mqttPushClient.publish(0,false,"setting/set/"+iotDeviceSet.getDeviceNum(),content); -// if(isSuccess){return AjaxResult.success();} -// return AjaxResult.error("mqtt 发布失败。"); -// } -// -// @ApiOperation(value = "获取设备配置", notes = "获取设备配置") -// @GetMapping(value = "/getSetting/{deviceNum}") -// public AjaxResult getSetting(@PathVariable("deviceNum") String deviceNum){ -// boolean isSuccess=mqttPushClient.publish(0,false,"setting/get/"+deviceNum,"wumei.lie"); -// if(isSuccess){return AjaxResult.success();} -// return AjaxResult.error("mqtt 发布失败。"); -// } -} - diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/controller/TUserAccountInfoController.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/controller/TUserAccountInfoController.java deleted file mode 100644 index 6589adcc..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/controller/TUserAccountInfoController.java +++ /dev/null @@ -1,97 +0,0 @@ -package com.ruoyi.system.controller; - -import java.util.List; - -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.system.domain.TUserAccountInfo; -import com.ruoyi.system.service.ITUserAccountInfoService; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.common.core.page.TableDataInfo; - -/** - * 小程序用户Controller - * - * @author wxy - * @date 2021-08-26 - */ -@RestController -@RequestMapping("/system/info") -public class TUserAccountInfoController extends BaseController { - @Autowired - private ITUserAccountInfoService tUserAccountInfoService; - - /** - * 查询小程序用户列表 - */ - @PreAuthorize("@ss.hasPermi('system:info:list')") - @GetMapping("/list") - public TableDataInfo list(TUserAccountInfo tUserAccountInfo) { - startPage(); - List list = tUserAccountInfoService.selectTUserAccountInfoList(tUserAccountInfo); - return getDataTable(list); - } - - /** - * 导出小程序用户列表 - */ - @PreAuthorize("@ss.hasPermi('system:info:export')") - @Log(title = "小程序用户", businessType = BusinessType.EXPORT) - @GetMapping("/export") - public AjaxResult export(TUserAccountInfo tUserAccountInfo) { - List list = tUserAccountInfoService.selectTUserAccountInfoList(tUserAccountInfo); - ExcelUtil util = new ExcelUtil(TUserAccountInfo.class); - return util.exportExcel(list, "info"); - } - - /** - * 获取小程序用户详细信息 - */ - @PreAuthorize("@ss.hasPermi('system:info:query')") - @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) { - return AjaxResult.success(tUserAccountInfoService.selectTUserAccountInfoById(id)); - } - - /** - * 新增小程序用户 - */ - @PreAuthorize("@ss.hasPermi('system:info:add')") - @Log(title = "小程序用户", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@RequestBody TUserAccountInfo tUserAccountInfo) { - return toAjax(tUserAccountInfoService.insertTUserAccountInfo(tUserAccountInfo)); - } - - /** - * 修改小程序用户 - */ - @PreAuthorize("@ss.hasPermi('system:info:edit')") - @Log(title = "小程序用户", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@RequestBody TUserAccountInfo tUserAccountInfo) { - return toAjax(tUserAccountInfoService.updateTUserAccountInfo(tUserAccountInfo)); - } - - /** - * 删除小程序用户 - */ - @PreAuthorize("@ss.hasPermi('system:info:remove')") - @Log(title = "小程序用户", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) { - return toAjax(tUserAccountInfoService.deleteTUserAccountInfoByIds(ids)); - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/controller/TUserLoginLogController.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/controller/TUserLoginLogController.java deleted file mode 100644 index 0aa8868f..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/controller/TUserLoginLogController.java +++ /dev/null @@ -1,97 +0,0 @@ -package com.ruoyi.system.controller; - -import java.util.List; - -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import com.ruoyi.common.annotation.Log; -import com.ruoyi.common.core.controller.BaseController; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.enums.BusinessType; -import com.ruoyi.system.domain.TUserLoginLog; -import com.ruoyi.system.service.ITUserLoginLogService; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.common.core.page.TableDataInfo; - -/** - * 【请填写功能名称】Controller - * - * @author wxy - * @date 2021-08-26 - */ -@RestController -@RequestMapping("/system/log") -public class TUserLoginLogController extends BaseController { - @Autowired - private ITUserLoginLogService tUserLoginLogService; - - /** - * 查询【请填写功能名称】列表 - */ - @PreAuthorize("@ss.hasPermi('system:log:list')") - @GetMapping("/list") - public TableDataInfo list(TUserLoginLog tUserLoginLog) { - startPage(); - List list = tUserLoginLogService.selectTUserLoginLogList(tUserLoginLog); - return getDataTable(list); - } - - /** - * 导出【请填写功能名称】列表 - */ - @PreAuthorize("@ss.hasPermi('system:log:export')") - @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) - @GetMapping("/export") - public AjaxResult export(TUserLoginLog tUserLoginLog) { - List list = tUserLoginLogService.selectTUserLoginLogList(tUserLoginLog); - ExcelUtil util = new ExcelUtil(TUserLoginLog.class); - return util.exportExcel(list, "log"); - } - - /** - * 获取【请填写功能名称】详细信息 - */ - @PreAuthorize("@ss.hasPermi('system:log:query')") - @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) { - return AjaxResult.success(tUserLoginLogService.selectTUserLoginLogById(id)); - } - - /** - * 新增【请填写功能名称】 - */ - @PreAuthorize("@ss.hasPermi('system:log:add')") - @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@RequestBody TUserLoginLog tUserLoginLog) { - return toAjax(tUserLoginLogService.insertTUserLoginLog(tUserLoginLog)); - } - - /** - * 修改【请填写功能名称】 - */ - @PreAuthorize("@ss.hasPermi('system:log:edit')") - @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@RequestBody TUserLoginLog tUserLoginLog) { - return toAjax(tUserLoginLogService.updateTUserLoginLog(tUserLoginLog)); - } - - /** - * 删除【请填写功能名称】 - */ - @PreAuthorize("@ss.hasPermi('system:log:remove')") - @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) { - return toAjax(tUserLoginLogService.deleteTUserLoginLogByIds(ids)); - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/IotCategory.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/IotCategory.java deleted file mode 100644 index 458644c9..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/IotCategory.java +++ /dev/null @@ -1,80 +0,0 @@ -/****************************************************************************** - * 作者:kerwincui - * 时间:2021-06-08 - * 邮箱:164770707@qq.com - * 源码地址:https://gitee.com/kerwincui/wumei-smart - * author: kerwincui - * create: 2021-06-08 - * email:164770707@qq.com - * source:https://github.com/kerwincui/wumei-smart - ******************************************************************************/ -package com.ruoyi.system.domain; - -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.core.domain.BaseEntity; - -/** - * 设备分类对象 iot_category - * - * @author kerwincui - * @date 2021-05-07 - */ -public class IotCategory extends BaseEntity { - private static final long serialVersionUID = 1L; - - /** - * 序号 - */ - private Long categoryId; - - /** - * 分类名称 - */ - @Excel(name = "分类名称") - private String categoryName; - - /** - * 删除标志(0代表存在 2代表删除) - */ - private String delFlag; - - public void setCategoryId(Long categoryId) { - this.categoryId = categoryId; - } - - public Long getCategoryId() { - return categoryId; - } - - public void setCategoryName(String categoryName) { - this.categoryName = categoryName; - } - - public String getCategoryName() { - return categoryName; - } - - public void setDelFlag(String delFlag) { - this.delFlag = delFlag; - } - - public String getDelFlag() { - return delFlag; - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("categoryId", getCategoryId()) - .append("categoryName", getCategoryName()) - .append("delFlag", getDelFlag()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .toString(); - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/IotDevice.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/IotDevice.java deleted file mode 100644 index c010fd97..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/IotDevice.java +++ /dev/null @@ -1,196 +0,0 @@ -/****************************************************************************** - * 作者:kerwincui - * 时间:2021-06-08 - * 邮箱:164770707@qq.com - * 源码地址:https://gitee.com/kerwincui/wumei-smart - * author: kerwincui - * create: 2021-06-08 - * email:164770707@qq.com - * source:https://github.com/kerwincui/wumei-smart - ******************************************************************************/ -package com.ruoyi.system.domain; - -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.core.domain.BaseEntity; - -import java.math.BigDecimal; - -/** - * 设备对象 iot_device - * - * @author kerwincui - * @date 2021-05-06 - */ -public class IotDevice extends BaseEntity { - private static final long serialVersionUID = 1L; - - /** - * 序号 - */ - private Long deviceId; - - /** - * 编号 - */ - @Excel(name = "编号") - private String deviceNum; - - /** - * 分类 - */ - @Excel(name = "分类") - private Long categoryId; - - /** - * 分类名称 - */ - @Excel(name = "分类名称") - private String categoryName; - - /** - * 分类名称 - */ - @Excel(name = "分类名称") - private BigDecimal deviceTemp; - - /** - * 名称 - */ - @Excel(name = "名称") - private String deviceName; - - /** - * 固件版本 - */ - @Excel(name = "固件版本") - private String firmwareVersion; - - /** 设备状态:未激活,未绑定,已绑定 */ - @Excel(name = "设备状态:未激活,未绑定,已绑定") - private String status; - - /** - * 用户 - */ - @Excel(name = "用户") - private String ownerId; - - /** - * 分组ID - */ - private Long groupId; - - /** - * 删除标志(0代表存在 2代表删除) - */ - private String delFlag; - - public void setDeviceId(Long deviceId) { - this.deviceId = deviceId; - } - - public Long getDeviceId() { - return deviceId; - } - - public void setDeviceNum(String deviceNum) { - this.deviceNum = deviceNum; - } - - public String getDeviceNum() { - return deviceNum; - } - - public void setCategoryId(Long categoryId) { - this.categoryId = categoryId; - } - - public Long getCategoryId() { - return categoryId; - } - - public void setDeviceName(String deviceName) { - this.deviceName = deviceName; - } - - public String getDeviceName() { - return deviceName; - } - - public void setFirmwareVersion(String firmwareVersion) { - this.firmwareVersion = firmwareVersion; - } - - public String getFirmwareVersion() { - return firmwareVersion; - } - - public void setOwnerId(String ownerId) { - this.ownerId = ownerId; - } - - public String getOwnerId() { - return ownerId; - } - - public void setDelFlag(String delFlag) { - this.delFlag = delFlag; - } - public void setStatus(String status) { - this.status = status; - } - - public String getStatus() { - return status; - } - public String getDelFlag() { - return delFlag; - } - - public Long getGroupId() { - return groupId; - } - - public void setGroupId(Long groupId) { - this.groupId = groupId; - } - - public void setDeviceTemp(BigDecimal deviceTemp) { - this.deviceTemp = deviceTemp; - } - - public BigDecimal getDeviceTemp() { - return deviceTemp; - } - - public void setCategoryName(String categoryName) { - this.categoryName = categoryName; - } - - public String getCategoryName() { - return categoryName; - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("deviceId", getDeviceId()) - .append("deviceNum", getDeviceNum()) - .append("categoryName", getCategoryName()) - .append("deviceTemp", getDeviceTemp()) - .append("categoryId", getCategoryId()) - .append("groupId", getGroupId()) - .append("deviceName", getDeviceName()) - .append("firmwareVersion", getFirmwareVersion()) - .append("ownerId", getOwnerId()) - .append("delFlag", getDelFlag()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .toString(); - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/IotDeviceCmd.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/IotDeviceCmd.java deleted file mode 100644 index 986c1fd7..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/IotDeviceCmd.java +++ /dev/null @@ -1,335 +0,0 @@ -/****************************************************************************** - * 作者:kerwincui - * 时间:2021-06-08 - * 邮箱:164770707@qq.com - * 源码地址:https://gitee.com/kerwincui/wumei-smart - * author: kerwincui - * create: 2021-06-08 - * email:164770707@qq.com - * source:https://github.com/kerwincui/wumei-smart - ******************************************************************************/ -package com.ruoyi.system.domain; - -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.core.domain.BaseEntity; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -import java.math.BigDecimal; - -/** - * 设备状态对象 iot_device_status - * - * @author kerwincui - * @date 2021-05-06 - */ -public class IotDeviceCmd extends BaseEntity { - private static final long serialVersionUID = 1L; - - /** - * 序号 - */ - private Long deviceStatusId; - - /** - * 设备 - */ - @Excel(name = "设备") - private Long deviceId; - - /** - * 设备编号 - */ - @Excel(name = "设备编号") - private String deviceNum; - - /** - * 继电器 - */ - @Excel(name = "继电器") - private Integer relayStatus; - - /** - * 灯状态 - */ - @Excel(name = "灯状态") - private Integer lightStatus; - - /** - * 在线 - */ - @Excel(name = "在线") - private Integer isOnline; - - /** - * 设备温度 - */ - @Excel(name = "设备温度") - private BigDecimal deviceTemperature; - - /** - * 设备湿度 - */ - @Excel(name = "信号") - private Integer rssi; - - /** - * 空气温度 - */ - @Excel(name = "空气温度") - private BigDecimal airTemperature; - - /** - * 空气湿度 - */ - @Excel(name = "空气湿度") - private BigDecimal airHumidity; - - /** - * 触发源 - */ - @Excel(name = "触发源") - private Integer triggerSource; - - /** - * 彩灯亮度 - */ - @Excel(name = "彩灯亮度") - private Integer brightness; - - /** - * 渐变间隔 - */ - @Excel(name = "渐变间隔") - private Integer lightInterval; - - /** - * 彩灯模式 - */ - @Excel(name = "彩灯模式") - private Integer lightMode; - - /** - * 灯渐变时间 - */ - @Excel(name = "渐变时间") - private Integer fadeTime; - - /** - * 红灯 - */ - @Excel(name = "红灯") - private Long red; - - /** - * 绿灯 - */ - @Excel(name = "绿灯") - private Long green; - - /** - * 蓝灯 - */ - @Excel(name = "蓝灯") - private Long blue; - - /** - * 删除标志(0代表存在 2代表删除) - */ - private String delFlag; - - /** - * 控制命令 - */ - private String cmd; - - public String getCmd() { - return cmd; - } - - public void setCmd(String cmd) { - this.cmd = cmd; - } - - public void setDeviceStatusId(Long deviceStatusId) { - this.deviceStatusId = deviceStatusId; - } - - public Long getDeviceStatusId() { - return deviceStatusId; - } - - public void setDeviceId(Long deviceId) { - this.deviceId = deviceId; - } - - public Long getDeviceId() { - return deviceId; - } - - public void setDeviceNum(String deviceNum) { - this.deviceNum = deviceNum; - } - - public String getDeviceNum() { - return deviceNum; - } - - public void setRelayStatus(Integer relayStatus) { - this.relayStatus = relayStatus; - } - - public Integer getRelayStatus() { - return relayStatus; - } - - public void setLightStatus(Integer lightStatus) { - this.lightStatus = lightStatus; - } - - public Integer getLightStatus() { - return lightStatus; - } - - public void setIsOnline(Integer isOnline) { - this.isOnline = isOnline; - } - - public Integer getIsOnline() { - return isOnline; - } - - public void setDeviceTemperature(BigDecimal deviceTemperature) { - this.deviceTemperature = deviceTemperature; - } - - public BigDecimal getDeviceTemperature() { - return deviceTemperature; - } - - public void setRssi(Integer rssi) { - this.rssi = rssi; - } - - public Integer getRssi() { - return rssi; - } - - public void setAirTemperature(BigDecimal airTemperature) { - this.airTemperature = airTemperature; - } - - public BigDecimal getAirTemperature() { - return airTemperature; - } - - public void setAirHumidity(BigDecimal airHumidity) { - this.airHumidity = airHumidity; - } - - public BigDecimal getAirHumidity() { - return airHumidity; - } - - public void setTriggerSource(Integer triggerSource) { - this.triggerSource = triggerSource; - } - - public Integer getTriggerSource() { - return triggerSource; - } - - public void setBrightness(Integer brightness) { - this.brightness = brightness; - } - - public Integer getBrightness() { - return brightness; - } - - public void setLightInterval(Integer lightInterval) { - this.lightInterval = lightInterval; - } - - public Integer getLightInterval() { - return lightInterval; - } - - public void setLightMode(Integer lightMode) { - this.lightMode = lightMode; - } - - public Integer getLightMode() { - return lightMode; - } - - public void setRed(Long red) { - this.red = red; - } - - public Long getRed() { - return red; - } - - public void setGreen(Long green) { - this.green = green; - } - - public Long getGreen() { - return green; - } - - public void setBlue(Long blue) { - this.blue = blue; - } - - public Long getBlue() { - return blue; - } - - public void setDelFlag(String delFlag) { - this.delFlag = delFlag; - } - - public void setFadeTime(Integer fadeTime) { - this.fadeTime = fadeTime; - } - - public Integer getFadeTime() { - return fadeTime; - } - - public String getDelFlag() { - return delFlag; - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("deviceStatusId", getDeviceStatusId()) - .append("deviceId", getDeviceId()) - .append("deviceNum", getDeviceNum()) - .append("relayStatus", getRelayStatus()) - .append("lightStatus", getLightStatus()) - .append("isOnline", getIsOnline()) - .append("deviceTemperature", getDeviceTemperature()) - .append("rssid", getRssi()) - .append("airTemperature", getAirTemperature()) - .append("airHumidity", getAirHumidity()) - .append("triggerSource", getTriggerSource()) - .append("brightness", getBrightness()) - .append("lightInterval", getLightInterval()) - .append("lightMode", getLightMode()) - .append("fadeTime", getFadeTime()) - .append("red", getRed()) - .append("green", getGreen()) - .append("blue", getBlue()) - .append("delFlag", getDelFlag()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .toString(); - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/IotDeviceSet.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/IotDeviceSet.java deleted file mode 100644 index 1527531e..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/IotDeviceSet.java +++ /dev/null @@ -1,378 +0,0 @@ -/****************************************************************************** - * 作者:kerwincui - * 时间:2021-06-08 - * 邮箱:164770707@qq.com - * 源码地址:https://gitee.com/kerwincui/wumei-smart - * author: kerwincui - * create: 2021-06-08 - * email:164770707@qq.com - * source:https://github.com/kerwincui/wumei-smart - ******************************************************************************/ -package com.ruoyi.system.domain; - -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.core.domain.BaseEntity; - -/** - * 设备配置对象 iot_device_set - * - * @author kerwincui - * @date 2021-05-06 - */ -public class IotDeviceSet extends BaseEntity { - private static final long serialVersionUID = 1L; - - /** - * 序号 - */ - private Long deviceSetId; - - /** - * 设备 - */ - @Excel(name = "设备") - private Long deviceId; - - /** - * 设备编号 - */ - @Excel(name = "设备编号") - private String deviceNum; - - /** - * 报警 - */ - @Excel(name = "报警") - private Integer isAlarm; - - /** - * 雷达感应 - */ - @Excel(name = "雷达感应") - private Integer isRadar; - - /** - * 托管 - */ - @Excel(name = "托管") - private Integer isHost; - - /** - * 重启 - */ - @Excel(name = "重启") - private Integer isReset; - - /** - * 打开AP - */ - @Excel(name = "打开AP") - private Integer isAp; - - /** - * 是否离线使用 - */ - @Excel(name = "是否离线使用") - private Integer isWifiOffline; - - /** - * 是否使用证书 - */ - @Excel(name = "是否使用证书") - private Integer isOpenCertifi; - - /** - * 智能配网 - */ - @Excel(name = "智能配网") - private Integer isSmartConfig; - - /** - * 射频遥控 - */ - @Excel(name = "射频遥控") - private Integer isRfControl; - - /** - * 遥控配对 - */ - @Excel(name = "遥控配对") - private Integer isRfLearn; - - /** - * 遥控清码 - */ - @Excel(name = "遥控清码") - private Integer isRfClear; - - /** - * 按键一 - */ - @Excel(name = "按键一") - private Integer rfOneFunc; - - /** - * 按键二 - */ - @Excel(name = "按键二") - private Integer rfTwoFunc; - - /** - * 按键三 - */ - @Excel(name = "按键三") - private Integer rfThreeFunc; - - /** - * 按键四 - */ - @Excel(name = "按键四") - private Integer rfFourFunc; - - /** - * 用户 - */ - @Excel(name = "用户") - private String ownerId; - - /** - * 配网地址 - */ - @Excel(name = "配网地址") - private String networkAddress; - - /** - * 配网IP - */ - @Excel(name = "配网IP") - private String networkIp; - - /** - * 雷达感应间隔 - */ - @Excel(name = "雷达感应间隔") - private Integer radarInterval; - - /** - * 删除标志(0代表存在 2代表删除) - */ - private String delFlag; - - public void setDeviceSetId(Long deviceSetId) { - this.deviceSetId = deviceSetId; - } - - public Long getDeviceSetId() { - return deviceSetId; - } - - public void setDeviceId(Long deviceId) { - this.deviceId = deviceId; - } - - public Long getDeviceId() { - return deviceId; - } - - public void setDeviceNum(String deviceNum) { - this.deviceNum = deviceNum; - } - - public String getDeviceNum() { - return deviceNum; - } - - public void setIsAlarm(Integer isAlarm) { - this.isAlarm = isAlarm; - } - - public Integer getIsAlarm() { - return isAlarm; - } - - public void setIsRadar(Integer isRadar) { - this.isRadar = isRadar; - } - - public Integer getIsRadar() { - return isRadar; - } - - public void setIsHost(Integer isHost) { - this.isHost = isHost; - } - - public Integer getIsHost() { - return isHost; - } - - public void setIsReset(Integer isReset) { - this.isReset = isReset; - } - - public Integer getIsReset() { - return isReset; - } - - public void setIsAp(Integer isAp) { - this.isAp = isAp; - } - - public Integer getIsAp() { - return isAp; - } - - public void setIsWifiOffline(Integer isWifiOffline) { - this.isWifiOffline = isWifiOffline; - } - - public Integer getIsWifiOffline() { - return isWifiOffline; - } - - public void setIsOpenCertifi(Integer isOpenCertifi) { - this.isOpenCertifi = isOpenCertifi; - } - - public Integer getIsOpenCertifi() { - return isOpenCertifi; - } - - public void setIsSmartConfig(Integer isSmartConfig) { - this.isSmartConfig = isSmartConfig; - } - - public Integer getIsSmartConfig() { - return isSmartConfig; - } - - public void setIsRfControl(Integer isRfControl) { - this.isRfControl = isRfControl; - } - - public Integer getIsRfControl() { - return isRfControl; - } - - public void setIsRfLearn(Integer isRfLearn) { - this.isRfLearn = isRfLearn; - } - - public Integer getIsRfLearn() { - return isRfLearn; - } - - public void setIsRfClear(Integer isRfClear) { - this.isRfClear = isRfClear; - } - - public Integer getIsRfClear() { - return isRfClear; - } - - public void setRfOneFunc(Integer rfOneFunc) { - this.rfOneFunc = rfOneFunc; - } - - public Integer getRfOneFunc() { - return rfOneFunc; - } - - public void setRfTwoFunc(Integer rfTwoFunc) { - this.rfTwoFunc = rfTwoFunc; - } - - public Integer getRfTwoFunc() { - return rfTwoFunc; - } - - public void setRfThreeFunc(Integer rfThreeFunc) { - this.rfThreeFunc = rfThreeFunc; - } - - public Integer getRfThreeFunc() { - return rfThreeFunc; - } - - public void setRfFourFunc(Integer rfFourFunc) { - this.rfFourFunc = rfFourFunc; - } - - public Integer getRfFourFunc() { - return rfFourFunc; - } - - public void setOwnerId(String ownerId) { - this.ownerId = ownerId; - } - - public String getOwnerId() { - return ownerId; - } - - public void setNetworkAddress(String networkAddress) { - this.networkAddress = networkAddress; - } - - public String getNetworkAddress() { - return networkAddress; - } - - public void setNetworkIp(String networkIp) { - this.networkIp = networkIp; - } - - public String getNetworkIp() { - return networkIp; - } - - public void setDelFlag(String delFlag) { - this.delFlag = delFlag; - } - - public void setRadarInterval(Integer radarInterval) { - this.radarInterval = radarInterval; - } - - public Integer getRadarInterval() { - return radarInterval; - } - - public String getDelFlag() { - return delFlag; - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("deviceSetId", getDeviceSetId()) - .append("deviceId", getDeviceId()) - .append("deviceNum", getDeviceNum()) - .append("isAlarm", getIsAlarm()) - .append("isRadar", getIsRadar()) - .append("isHost", getIsHost()) - .append("isReset", getIsReset()) - .append("isAp", getIsAp()) - .append("isSmartConfig", getIsSmartConfig()) - .append("isRfControl", getIsRfControl()) - .append("isRfLearn", getIsRfLearn()) - .append("isRfClear", getIsRfClear()) - .append("rfOneFunc", getRfOneFunc()) - .append("rfTwoFunc", getRfTwoFunc()) - .append("rfThreeFunc", getRfThreeFunc()) - .append("rfFourFunc", getRfFourFunc()) - .append("ownerId", getOwnerId()) - .append("networkAddress", getNetworkAddress()) - .append("networkIp", getNetworkIp()) - .append("radarInterval", getRadarInterval()) - .append("delFlag", getDelFlag()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .toString(); - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/IotDeviceStatus.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/IotDeviceStatus.java deleted file mode 100644 index b3839e23..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/IotDeviceStatus.java +++ /dev/null @@ -1,322 +0,0 @@ -/****************************************************************************** - * 作者:kerwincui - * 时间:2021-06-08 - * 邮箱:164770707@qq.com - * 源码地址:https://gitee.com/kerwincui/wumei-smart - * author: kerwincui - * create: 2021-06-08 - * email:164770707@qq.com - * source:https://github.com/kerwincui/wumei-smart - ******************************************************************************/ -package com.ruoyi.system.domain; - -import java.math.BigDecimal; - -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.core.domain.BaseEntity; - -/** - * 设备状态对象 iot_device_status - * - * @author kerwincui - * @date 2021-05-06 - */ -public class IotDeviceStatus extends BaseEntity { - private static final long serialVersionUID = 1L; - - /** - * 序号 - */ - private Long deviceStatusId; - - /** - * 设备 - */ - @Excel(name = "设备") - private Long deviceId; - - /** - * 设备编号 - */ - @Excel(name = "设备编号") - private String deviceNum; - - /** - * 继电器 - */ - @Excel(name = "继电器") - private Integer relayStatus; - - /** - * 灯状态 - */ - @Excel(name = "灯状态") - private Integer lightStatus; - - /** - * 在线 - */ - @Excel(name = "在线") - private Integer isOnline; - - /** - * 设备温度 - */ - @Excel(name = "设备温度") - private BigDecimal deviceTemperature; - - /** - * 设备湿度 - */ - @Excel(name = "信号") - private Integer rssi; - - /** - * 空气温度 - */ - @Excel(name = "空气温度") - private BigDecimal airTemperature; - - /** - * 空气湿度 - */ - @Excel(name = "空气湿度") - private BigDecimal airHumidity; - - /** - * 触发源 - */ - @Excel(name = "触发源") - private Integer triggerSource; - - /** - * 彩灯亮度 - */ - @Excel(name = "彩灯亮度") - private Integer brightness; - - /** - * 渐变间隔 - */ - @Excel(name = "渐变间隔") - private Integer lightInterval; - - /** - * 彩灯模式 - */ - @Excel(name = "彩灯模式") - private Integer lightMode; - - /** - * 灯渐变时间 - */ - @Excel(name = "渐变时间") - private Integer fadeTime; - - /** - * 红灯 - */ - @Excel(name = "红灯") - private Long red; - - /** - * 绿灯 - */ - @Excel(name = "绿灯") - private Long green; - - /** - * 蓝灯 - */ - @Excel(name = "蓝灯") - private Long blue; - - /** - * 删除标志(0代表存在 2代表删除) - */ - private String delFlag; - - public void setDeviceStatusId(Long deviceStatusId) { - this.deviceStatusId = deviceStatusId; - } - - public Long getDeviceStatusId() { - return deviceStatusId; - } - - public void setDeviceId(Long deviceId) { - this.deviceId = deviceId; - } - - public Long getDeviceId() { - return deviceId; - } - - public void setDeviceNum(String deviceNum) { - this.deviceNum = deviceNum; - } - - public String getDeviceNum() { - return deviceNum; - } - - public void setRelayStatus(Integer relayStatus) { - this.relayStatus = relayStatus; - } - - public Integer getRelayStatus() { - return relayStatus; - } - - public void setLightStatus(Integer lightStatus) { - this.lightStatus = lightStatus; - } - - public Integer getLightStatus() { - return lightStatus; - } - - public void setIsOnline(Integer isOnline) { - this.isOnline = isOnline; - } - - public Integer getIsOnline() { - return isOnline; - } - - public void setDeviceTemperature(BigDecimal deviceTemperature) { - this.deviceTemperature = deviceTemperature; - } - - public BigDecimal getDeviceTemperature() { - return deviceTemperature; - } - - public void setRssi(Integer rssi) { - this.rssi = rssi; - } - - public Integer getRssi() { - return rssi; - } - - public void setAirTemperature(BigDecimal airTemperature) { - this.airTemperature = airTemperature; - } - - public BigDecimal getAirTemperature() { - return airTemperature; - } - - public void setAirHumidity(BigDecimal airHumidity) { - this.airHumidity = airHumidity; - } - - public BigDecimal getAirHumidity() { - return airHumidity; - } - - public void setTriggerSource(Integer triggerSource) { - this.triggerSource = triggerSource; - } - - public Integer getTriggerSource() { - return triggerSource; - } - - public void setBrightness(Integer brightness) { - this.brightness = brightness; - } - - public Integer getBrightness() { - return brightness; - } - - public void setLightInterval(Integer lightInterval) { - this.lightInterval = lightInterval; - } - - public Integer getLightInterval() { - return lightInterval; - } - - public void setLightMode(Integer lightMode) { - this.lightMode = lightMode; - } - - public Integer getLightMode() { - return lightMode; - } - - public void setRed(Long red) { - this.red = red; - } - - public Long getRed() { - return red; - } - - public void setGreen(Long green) { - this.green = green; - } - - public Long getGreen() { - return green; - } - - public void setBlue(Long blue) { - this.blue = blue; - } - - public Long getBlue() { - return blue; - } - - public void setDelFlag(String delFlag) { - this.delFlag = delFlag; - } - - public void setFadeTime(Integer fadeTime) { - this.fadeTime = fadeTime; - } - - public Integer getFadeTime() { - return fadeTime; - } - - public String getDelFlag() { - return delFlag; - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("deviceStatusId", getDeviceStatusId()) - .append("deviceId", getDeviceId()) - .append("deviceNum", getDeviceNum()) - .append("relayStatus", getRelayStatus()) - .append("lightStatus", getLightStatus()) - .append("isOnline", getIsOnline()) - .append("deviceTemperature", getDeviceTemperature()) - .append("rssid", getRssi()) - .append("airTemperature", getAirTemperature()) - .append("airHumidity", getAirHumidity()) - .append("triggerSource", getTriggerSource()) - .append("brightness", getBrightness()) - .append("lightInterval", getLightInterval()) - .append("lightMode", getLightMode()) - .append("fadeTime", getFadeTime()) - .append("red", getRed()) - .append("green", getGreen()) - .append("blue", getBlue()) - .append("delFlag", getDelFlag()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .toString(); - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/IotDeviceUserRelation.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/IotDeviceUserRelation.java deleted file mode 100644 index ad182195..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/IotDeviceUserRelation.java +++ /dev/null @@ -1,136 +0,0 @@ -package com.ruoyi.system.domain; - -import java.util.Date; - -import com.fasterxml.jackson.annotation.JsonFormat; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.core.domain.BaseEntity; - -/** - * 【请填写功能名称】对象 iot_device_user_relation - * - * @author wxy - * @date 2021-08-27 - */ -public class IotDeviceUserRelation extends BaseEntity { - private static final long serialVersionUID = 1L; - - /** - * $column.columnComment - */ - private Long id; - - /** - * $column.columnComment - */ - @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") - private Long userId; - - /** - * $column.columnComment - */ - @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") - private Long deviceId; - - /** - * $column.columnComment - */ - @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") - private String deviceNum; - - @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") - private String deviceName; - - @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") - private String remark; - - /** - * $column.columnComment - */ - @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") - private Date gmtTime; - - /** - * $column.columnComment - */ - @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") - private Date gmtUpdate; - - public void setId(Long id) { - this.id = id; - } - - public Long getId() { - return id; - } - - public void setUserId(Long userId) { - this.userId = userId; - } - - public Long getUserId() { - return userId; - } - - public void setDeviceId(Long deviceId) { - this.deviceId = deviceId; - } - - public Long getDeviceId() { - return deviceId; - } - - public void setDeviceName(String deviceName) { - this.deviceName = deviceName; - } - - public String getDeviceName() { - return deviceName; - } - - public String getRemark() { - return remark; - } - - public void setRemark(String remark) { - this.remark = remark; - } - - public void setDeviceNum(String deviceNum) { - this.deviceNum = deviceNum; - } - - public String getDeviceNum() { - return deviceNum; - } - - public void setGmtTime(Date gmtTime) { - this.gmtTime = gmtTime; - } - - public Date getGmtTime() { - return gmtTime; - } - - public void setGmtUpdate(Date gmtUpdate) { - this.gmtUpdate = gmtUpdate; - } - - public Date getGmtUpdate() { - return gmtUpdate; - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("userId", getUserId()) - .append("deviceId", getDeviceId()) - .append("deviceNum", getDeviceNum()) - .append("gmtTime", getGmtTime()) - .append("gmtUpdate", getGmtUpdate()) - .toString(); - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/IotGroup.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/IotGroup.java deleted file mode 100644 index 015abf9b..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/IotGroup.java +++ /dev/null @@ -1,110 +0,0 @@ -/****************************************************************************** - * 作者:kerwincui - * 时间:2021-06-08 - * 邮箱:164770707@qq.com - * 源码地址:https://gitee.com/kerwincui/wumei-smart - * author: kerwincui - * create: 2021-06-08 - * email:164770707@qq.com - * source:https://github.com/kerwincui/wumei-smart - ******************************************************************************/ -package com.ruoyi.system.domain; - -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.core.domain.BaseEntity; - -/** - * 分组对象 iot_group - * - * @author kerwincui - * @date 2021-05-18 - */ -public class IotGroup extends BaseEntity { - private static final long serialVersionUID = 1L; - - /** - * 设备分组 - */ - private Long groupId; - - /** - * 用户 - */ - @Excel(name = "用户") - private Long userId; - - /** - * 分组名称 - */ - @Excel(name = "分组名称") - private String groupName; - - /** - * 排序 - */ - @Excel(name = "排序") - private Integer groupOrder; - - /** - * 删除标志(0代表存在 2代表删除) - */ - private String delFlag; - - public void setGroupId(Long groupId) { - this.groupId = groupId; - } - - public Long getGroupId() { - return groupId; - } - - public void setUserId(Long userId) { - this.userId = userId; - } - - public Long getUserId() { - return userId; - } - - public void setGroupName(String groupName) { - this.groupName = groupName; - } - - public String getGroupName() { - return groupName; - } - - public void setGroupOrder(Integer groupOrder) { - this.groupOrder = groupOrder; - } - - public Integer getGroupOrder() { - return groupOrder; - } - - public void setDelFlag(String delFlag) { - this.delFlag = delFlag; - } - - public String getDelFlag() { - return delFlag; - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("groupId", getGroupId()) - .append("userId", getUserId()) - .append("groupName", getGroupName()) - .append("groupOrder", getGroupOrder()) - .append("delFlag", getDelFlag()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .toString(); - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysConfig.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysConfig.java deleted file mode 100644 index d57786ba..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysConfig.java +++ /dev/null @@ -1,121 +0,0 @@ -/****************************************************************************** - * 作者:kerwincui - * 时间:2021-06-08 - * 邮箱:164770707@qq.com - * 源码地址:https://gitee.com/kerwincui/wumei-smart - * author: kerwincui - * create: 2021-06-08 - * email:164770707@qq.com - * source:https://github.com/kerwincui/wumei-smart - ******************************************************************************/ -package com.ruoyi.system.domain; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Size; - -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.annotation.Excel.ColumnType; -import com.ruoyi.common.core.domain.BaseEntity; - -/** - * 参数配置表 sys_config - * - * @author ruoyi - */ -public class SysConfig extends BaseEntity { - private static final long serialVersionUID = 1L; - - /** - * 参数主键 - */ - @Excel(name = "参数主键", cellType = ColumnType.NUMERIC) - private Long configId; - - /** - * 参数名称 - */ - @Excel(name = "参数名称") - private String configName; - - /** - * 参数键名 - */ - @Excel(name = "参数键名") - private String configKey; - - /** - * 参数键值 - */ - @Excel(name = "参数键值") - private String configValue; - - /** - * 系统内置(Y是 N否) - */ - @Excel(name = "系统内置", readConverterExp = "Y=是,N=否") - private String configType; - - public Long getConfigId() { - return configId; - } - - public void setConfigId(Long configId) { - this.configId = configId; - } - - @NotBlank(message = "参数名称不能为空") - @Size(min = 0, max = 100, message = "参数名称不能超过100个字符") - public String getConfigName() { - return configName; - } - - public void setConfigName(String configName) { - this.configName = configName; - } - - @NotBlank(message = "参数键名长度不能为空") - @Size(min = 0, max = 100, message = "参数键名长度不能超过100个字符") - public String getConfigKey() { - return configKey; - } - - public void setConfigKey(String configKey) { - this.configKey = configKey; - } - - @NotBlank(message = "参数键值不能为空") - @Size(min = 0, max = 500, message = "参数键值长度不能超过500个字符") - public String getConfigValue() { - return configValue; - } - - public void setConfigValue(String configValue) { - this.configValue = configValue; - } - - public String getConfigType() { - return configType; - } - - public void setConfigType(String configType) { - this.configType = configType; - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("configId", getConfigId()) - .append("configName", getConfigName()) - .append("configKey", getConfigKey()) - .append("configValue", getConfigValue()) - .append("configType", getConfigType()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .toString(); - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysLogininfor.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysLogininfor.java deleted file mode 100644 index de1f8edb..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysLogininfor.java +++ /dev/null @@ -1,154 +0,0 @@ -/****************************************************************************** - * 作者:kerwincui - * 时间:2021-06-08 - * 邮箱:164770707@qq.com - * 源码地址:https://gitee.com/kerwincui/wumei-smart - * author: kerwincui - * create: 2021-06-08 - * email:164770707@qq.com - * source:https://github.com/kerwincui/wumei-smart - ******************************************************************************/ -package com.ruoyi.system.domain; - -import java.util.Date; - -import com.fasterxml.jackson.annotation.JsonFormat; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.annotation.Excel.ColumnType; -import com.ruoyi.common.core.domain.BaseEntity; - -/** - * 系统访问记录表 sys_logininfor - * - * @author ruoyi - */ -public class SysLogininfor extends BaseEntity { - private static final long serialVersionUID = 1L; - - /** - * ID - */ - @Excel(name = "序号", cellType = ColumnType.NUMERIC) - private Long infoId; - - /** - * 用户账号 - */ - @Excel(name = "用户账号") - private String userName; - - /** - * 登录状态 0成功 1失败 - */ - @Excel(name = "登录状态", readConverterExp = "0=成功,1=失败") - private String status; - - /** - * 登录IP地址 - */ - @Excel(name = "登录地址") - private String ipaddr; - - /** - * 登录地点 - */ - @Excel(name = "登录地点") - private String loginLocation; - - /** - * 浏览器类型 - */ - @Excel(name = "浏览器") - private String browser; - - /** - * 操作系统 - */ - @Excel(name = "操作系统") - private String os; - - /** - * 提示消息 - */ - @Excel(name = "提示消息") - private String msg; - - /** - * 访问时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - @Excel(name = "访问时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") - private Date loginTime; - - public Long getInfoId() { - return infoId; - } - - public void setInfoId(Long infoId) { - this.infoId = infoId; - } - - public String getUserName() { - return userName; - } - - public void setUserName(String userName) { - this.userName = userName; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - public String getIpaddr() { - return ipaddr; - } - - public void setIpaddr(String ipaddr) { - this.ipaddr = ipaddr; - } - - public String getLoginLocation() { - return loginLocation; - } - - public void setLoginLocation(String loginLocation) { - this.loginLocation = loginLocation; - } - - public String getBrowser() { - return browser; - } - - public void setBrowser(String browser) { - this.browser = browser; - } - - public String getOs() { - return os; - } - - public void setOs(String os) { - this.os = os; - } - - public String getMsg() { - return msg; - } - - public void setMsg(String msg) { - this.msg = msg; - } - - public Date getLoginTime() { - return loginTime; - } - - public void setLoginTime(Date loginTime) { - this.loginTime = loginTime; - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysNotice.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysNotice.java deleted file mode 100644 index 1007fb44..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysNotice.java +++ /dev/null @@ -1,110 +0,0 @@ -/****************************************************************************** - * 作者:kerwincui - * 时间:2021-06-08 - * 邮箱:164770707@qq.com - * 源码地址:https://gitee.com/kerwincui/wumei-smart - * author: kerwincui - * create: 2021-06-08 - * email:164770707@qq.com - * source:https://github.com/kerwincui/wumei-smart - ******************************************************************************/ -package com.ruoyi.system.domain; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Size; - -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.core.domain.BaseEntity; - -/** - * 通知公告表 sys_notice - * - * @author ruoyi - */ -public class SysNotice extends BaseEntity { - private static final long serialVersionUID = 1L; - - /** - * 公告ID - */ - private Long noticeId; - - /** - * 公告标题 - */ - private String noticeTitle; - - /** - * 公告类型(1通知 2公告) - */ - private String noticeType; - - /** - * 公告内容 - */ - private String noticeContent; - - /** - * 公告状态(0正常 1关闭) - */ - private String status; - - public Long getNoticeId() { - return noticeId; - } - - public void setNoticeId(Long noticeId) { - this.noticeId = noticeId; - } - - public void setNoticeTitle(String noticeTitle) { - this.noticeTitle = noticeTitle; - } - - @NotBlank(message = "公告标题不能为空") - @Size(min = 0, max = 50, message = "公告标题不能超过50个字符") - public String getNoticeTitle() { - return noticeTitle; - } - - public void setNoticeType(String noticeType) { - this.noticeType = noticeType; - } - - public String getNoticeType() { - return noticeType; - } - - public void setNoticeContent(String noticeContent) { - this.noticeContent = noticeContent; - } - - public String getNoticeContent() { - return noticeContent; - } - - public void setStatus(String status) { - this.status = status; - } - - public String getStatus() { - return status; - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("noticeId", getNoticeId()) - .append("noticeTitle", getNoticeTitle()) - .append("noticeType", getNoticeType()) - .append("noticeContent", getNoticeContent()) - .append("status", getStatus()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .toString(); - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysOperLog.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysOperLog.java deleted file mode 100644 index b4fa4782..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysOperLog.java +++ /dev/null @@ -1,255 +0,0 @@ -package com.ruoyi.system.domain; - -import java.util.Date; - -import com.fasterxml.jackson.annotation.JsonFormat; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.annotation.Excel.ColumnType; -import com.ruoyi.common.core.domain.BaseEntity; - -/** - * 操作日志记录表 oper_log - * - * @author ruoyi - */ -public class SysOperLog extends BaseEntity { - private static final long serialVersionUID = 1L; - - /** - * 日志主键 - */ - @Excel(name = "操作序号", cellType = ColumnType.NUMERIC) - private Long operId; - - /** - * 操作模块 - */ - @Excel(name = "操作模块") - private String title; - - /** - * 业务类型(0其它 1新增 2修改 3删除) - */ - @Excel(name = "业务类型", readConverterExp = "0=其它,1=新增,2=修改,3=删除,4=授权,5=导出,6=导入,7=强退,8=生成代码,9=清空数据") - private Integer businessType; - - /** - * 业务类型数组 - */ - private Integer[] businessTypes; - - /** - * 请求方法 - */ - @Excel(name = "请求方法") - private String method; - - /** - * 请求方式 - */ - @Excel(name = "请求方式") - private String requestMethod; - - /** - * 操作类别(0其它 1后台用户 2手机端用户) - */ - @Excel(name = "操作类别", readConverterExp = "0=其它,1=后台用户,2=手机端用户") - private Integer operatorType; - - /** - * 操作人员 - */ - @Excel(name = "操作人员") - private String operName; - - /** - * 部门名称 - */ - @Excel(name = "部门名称") - private String deptName; - - /** - * 请求url - */ - @Excel(name = "请求地址") - private String operUrl; - - /** - * 操作地址 - */ - @Excel(name = "操作地址") - private String operIp; - - /** - * 操作地点 - */ - @Excel(name = "操作地点") - private String operLocation; - - /** - * 请求参数 - */ - @Excel(name = "请求参数") - private String operParam; - - /** - * 返回参数 - */ - @Excel(name = "返回参数") - private String jsonResult; - - /** - * 操作状态(0正常 1异常) - */ - @Excel(name = "状态", readConverterExp = "0=正常,1=异常") - private Integer status; - - /** - * 错误消息 - */ - @Excel(name = "错误消息") - private String errorMsg; - - /** - * 操作时间 - */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - @Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") - private Date operTime; - - public Long getOperId() { - return operId; - } - - public void setOperId(Long operId) { - this.operId = operId; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public Integer getBusinessType() { - return businessType; - } - - public void setBusinessType(Integer businessType) { - this.businessType = businessType; - } - - public Integer[] getBusinessTypes() { - return businessTypes; - } - - public void setBusinessTypes(Integer[] businessTypes) { - this.businessTypes = businessTypes; - } - - public String getMethod() { - return method; - } - - public void setMethod(String method) { - this.method = method; - } - - public String getRequestMethod() { - return requestMethod; - } - - public void setRequestMethod(String requestMethod) { - this.requestMethod = requestMethod; - } - - public Integer getOperatorType() { - return operatorType; - } - - public void setOperatorType(Integer operatorType) { - this.operatorType = operatorType; - } - - public String getOperName() { - return operName; - } - - public void setOperName(String operName) { - this.operName = operName; - } - - public String getDeptName() { - return deptName; - } - - public void setDeptName(String deptName) { - this.deptName = deptName; - } - - public String getOperUrl() { - return operUrl; - } - - public void setOperUrl(String operUrl) { - this.operUrl = operUrl; - } - - public String getOperIp() { - return operIp; - } - - public void setOperIp(String operIp) { - this.operIp = operIp; - } - - public String getOperLocation() { - return operLocation; - } - - public void setOperLocation(String operLocation) { - this.operLocation = operLocation; - } - - public String getOperParam() { - return operParam; - } - - public void setOperParam(String operParam) { - this.operParam = operParam; - } - - public String getJsonResult() { - return jsonResult; - } - - public void setJsonResult(String jsonResult) { - this.jsonResult = jsonResult; - } - - public Integer getStatus() { - return status; - } - - public void setStatus(Integer status) { - this.status = status; - } - - public String getErrorMsg() { - return errorMsg; - } - - public void setErrorMsg(String errorMsg) { - this.errorMsg = errorMsg; - } - - public Date getOperTime() { - return operTime; - } - - public void setOperTime(Date operTime) { - this.operTime = operTime; - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysPost.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysPost.java deleted file mode 100644 index fcd24ed8..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysPost.java +++ /dev/null @@ -1,123 +0,0 @@ -package com.ruoyi.system.domain; - -import javax.validation.constraints.NotBlank; -import javax.validation.constraints.Size; - -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.annotation.Excel.ColumnType; -import com.ruoyi.common.core.domain.BaseEntity; - -/** - * 岗位表 sys_post - * - * @author ruoyi - */ -public class SysPost extends BaseEntity { - private static final long serialVersionUID = 1L; - - /** - * 岗位序号 - */ - @Excel(name = "岗位序号", cellType = ColumnType.NUMERIC) - private Long postId; - - /** - * 岗位编码 - */ - @Excel(name = "岗位编码") - private String postCode; - - /** - * 岗位名称 - */ - @Excel(name = "岗位名称") - private String postName; - - /** - * 岗位排序 - */ - @Excel(name = "岗位排序") - private String postSort; - - /** - * 状态(0正常 1停用) - */ - @Excel(name = "状态", readConverterExp = "0=正常,1=停用") - private String status; - - /** - * 用户是否存在此岗位标识 默认不存在 - */ - private boolean flag = false; - - public Long getPostId() { - return postId; - } - - public void setPostId(Long postId) { - this.postId = postId; - } - - @NotBlank(message = "岗位编码不能为空") - @Size(min = 0, max = 64, message = "岗位编码长度不能超过64个字符") - public String getPostCode() { - return postCode; - } - - public void setPostCode(String postCode) { - this.postCode = postCode; - } - - @NotBlank(message = "岗位名称不能为空") - @Size(min = 0, max = 50, message = "岗位名称长度不能超过50个字符") - public String getPostName() { - return postName; - } - - public void setPostName(String postName) { - this.postName = postName; - } - - @NotBlank(message = "显示顺序不能为空") - public String getPostSort() { - return postSort; - } - - public void setPostSort(String postSort) { - this.postSort = postSort; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - public boolean isFlag() { - return flag; - } - - public void setFlag(boolean flag) { - this.flag = flag; - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("postId", getPostId()) - .append("postCode", getPostCode()) - .append("postName", getPostName()) - .append("postSort", getPostSort()) - .append("status", getStatus()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .toString(); - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysRoleDept.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysRoleDept.java deleted file mode 100644 index aaaa06e4..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysRoleDept.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.ruoyi.system.domain; - -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - * 角色和部门关联 sys_role_dept - * - * @author ruoyi - */ -public class SysRoleDept { - /** - * 角色ID - */ - private Long roleId; - - /** - * 部门ID - */ - private Long deptId; - - public Long getRoleId() { - return roleId; - } - - public void setRoleId(Long roleId) { - this.roleId = roleId; - } - - public Long getDeptId() { - return deptId; - } - - public void setDeptId(Long deptId) { - this.deptId = deptId; - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("roleId", getRoleId()) - .append("deptId", getDeptId()) - .toString(); - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysRoleMenu.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysRoleMenu.java deleted file mode 100644 index af6ac320..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysRoleMenu.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.ruoyi.system.domain; - -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - * 角色和菜单关联 sys_role_menu - * - * @author ruoyi - */ -public class SysRoleMenu { - /** - * 角色ID - */ - private Long roleId; - - /** - * 菜单ID - */ - private Long menuId; - - public Long getRoleId() { - return roleId; - } - - public void setRoleId(Long roleId) { - this.roleId = roleId; - } - - public Long getMenuId() { - return menuId; - } - - public void setMenuId(Long menuId) { - this.menuId = menuId; - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("roleId", getRoleId()) - .append("menuId", getMenuId()) - .toString(); - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUserOnline.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUserOnline.java deleted file mode 100644 index d066cf8a..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUserOnline.java +++ /dev/null @@ -1,112 +0,0 @@ -package com.ruoyi.system.domain; - -/** - * 当前在线会话 - * - * @author ruoyi - */ -public class SysUserOnline { - /** - * 会话编号 - */ - private String tokenId; - - /** - * 部门名称 - */ - private String deptName; - - /** - * 用户名称 - */ - private String userName; - - /** - * 登录IP地址 - */ - private String ipaddr; - - /** - * 登录地址 - */ - private String loginLocation; - - /** - * 浏览器类型 - */ - private String browser; - - /** - * 操作系统 - */ - private String os; - - /** - * 登录时间 - */ - private Long loginTime; - - public String getTokenId() { - return tokenId; - } - - public void setTokenId(String tokenId) { - this.tokenId = tokenId; - } - - public String getDeptName() { - return deptName; - } - - public void setDeptName(String deptName) { - this.deptName = deptName; - } - - public String getUserName() { - return userName; - } - - public void setUserName(String userName) { - this.userName = userName; - } - - public String getIpaddr() { - return ipaddr; - } - - public void setIpaddr(String ipaddr) { - this.ipaddr = ipaddr; - } - - public String getLoginLocation() { - return loginLocation; - } - - public void setLoginLocation(String loginLocation) { - this.loginLocation = loginLocation; - } - - public String getBrowser() { - return browser; - } - - public void setBrowser(String browser) { - this.browser = browser; - } - - public String getOs() { - return os; - } - - public void setOs(String os) { - this.os = os; - } - - public Long getLoginTime() { - return loginTime; - } - - public void setLoginTime(Long loginTime) { - this.loginTime = loginTime; - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUserPost.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUserPost.java deleted file mode 100644 index eb2ba7b1..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUserPost.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.ruoyi.system.domain; - -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - * 用户和岗位关联 sys_user_post - * - * @author ruoyi - */ -public class SysUserPost { - /** - * 用户ID - */ - private Long userId; - - /** - * 岗位ID - */ - private Long postId; - - public Long getUserId() { - return userId; - } - - public void setUserId(Long userId) { - this.userId = userId; - } - - public Long getPostId() { - return postId; - } - - public void setPostId(Long postId) { - this.postId = postId; - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("userId", getUserId()) - .append("postId", getPostId()) - .toString(); - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUserRole.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUserRole.java deleted file mode 100644 index 6e0073fa..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUserRole.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.ruoyi.system.domain; - -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -/** - * 用户和角色关联 sys_user_role - * - * @author ruoyi - */ -public class SysUserRole { - /** - * 用户ID - */ - private Long userId; - - /** - * 角色ID - */ - private Long roleId; - - public Long getUserId() { - return userId; - } - - public void setUserId(Long userId) { - this.userId = userId; - } - - public Long getRoleId() { - return roleId; - } - - public void setRoleId(Long roleId) { - this.roleId = roleId; - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("userId", getUserId()) - .append("roleId", getRoleId()) - .toString(); - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/TUserAccountInfo.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/TUserAccountInfo.java deleted file mode 100644 index f1ee21fd..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/TUserAccountInfo.java +++ /dev/null @@ -1,327 +0,0 @@ -package com.ruoyi.system.domain; - -import java.util.Date; - -import com.fasterxml.jackson.annotation.JsonFormat; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.core.domain.BaseEntity; - -/** - * 小程序用户对象 t_user_account_info - * - * @author wxy - * @date 2021-08-26 - */ -public class TUserAccountInfo extends BaseEntity { - private static final long serialVersionUID = 1L; - - /** - * $column.columnComment - */ - private Long id; - - /** - * sessionKey - */ - @Excel(name = "sessionKey") - private String sessionkey; - - /** - * accessToken - */ - @Excel(name = "accessToken") - private String accessToken; - - /** - * $column.columnComment - */ - @Excel(name = "accessToken") - private String openId; - - /** - * $column.columnComment - */ - @Excel(name = "accessToken") - private String unionId; - - /** - * 昵称 - */ - @Excel(name = "昵称") - private String nickName; - - /** - * 头像 - */ - @Excel(name = "头像") - private String avatar; - - /** - * 手机号 - */ - @Excel(name = "手机号") - private String phone; - - /** - * 生日 - */ - @Excel(name = "生日") - private String birthday; - - /** - * 用户状态:0-冻结,1-正常 - */ - @Excel(name = "用户状态:0-冻结,1-正常") - private Long status; - - /** - * 国家 - */ - @Excel(name = "国家") - private String country; - - /** - * 省份 - */ - @Excel(name = "省份") - private String province; - - /** - * 城市 - */ - @Excel(name = "城市") - private String city; - - /** - * 地址 - */ - @Excel(name = "地址") - private String address; - - /** - * 用户类型:0-未授权用户,1-消费者,2-商家 - */ - @Excel(name = "用户类型:0-未授权用户,1-消费者,2-商家") - private Long userType; - - /** - * 绑定的管理员编号 - */ - @Excel(name = "绑定的管理员编号") - private Long adminId; - - /** - * $column.columnComment - */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "绑定的管理员编号", width = 30, dateFormat = "yyyy-MM-dd") - private Date lastLoginTime; - - /** - * $column.columnComment - */ - @Excel(name = "绑定的管理员编号") - private String lastLoginIp; - - /** - * $column.columnComment - */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "绑定的管理员编号", width = 30, dateFormat = "yyyy-MM-dd") - private Date gmtTime; - - /** - * $column.columnComment - */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "绑定的管理员编号", width = 30, dateFormat = "yyyy-MM-dd") - private Date gmtUpdate; - - public void setId(Long id) { - this.id = id; - } - - public Long getId() { - return id; - } - - public void setSessionkey(String sessionkey) { - this.sessionkey = sessionkey; - } - - public String getSessionkey() { - return sessionkey; - } - - public void setAccessToken(String accessToken) { - this.accessToken = accessToken; - } - - public String getAccessToken() { - return accessToken; - } - - public void setOpenId(String openId) { - this.openId = openId; - } - - public String getOpenId() { - return openId; - } - - public void setUnionId(String unionId) { - this.unionId = unionId; - } - - public String getUnionId() { - return unionId; - } - - public void setNickName(String nickName) { - this.nickName = nickName; - } - - public String getNickName() { - return nickName; - } - - public void setAvatar(String avatar) { - this.avatar = avatar; - } - - public String getAvatar() { - return avatar; - } - - public void setPhone(String phone) { - this.phone = phone; - } - - public String getPhone() { - return phone; - } - - public void setBirthday(String birthday) { - this.birthday = birthday; - } - - public String getBirthday() { - return birthday; - } - - public void setStatus(Long status) { - this.status = status; - } - - public Long getStatus() { - return status; - } - - public void setCountry(String country) { - this.country = country; - } - - public String getCountry() { - return country; - } - - public void setProvince(String province) { - this.province = province; - } - - public String getProvince() { - return province; - } - - public void setCity(String city) { - this.city = city; - } - - public String getCity() { - return city; - } - - public void setAddress(String address) { - this.address = address; - } - - public String getAddress() { - return address; - } - - public void setUserType(Long userType) { - this.userType = userType; - } - - public Long getUserType() { - return userType; - } - - public void setAdminId(Long adminId) { - this.adminId = adminId; - } - - public Long getAdminId() { - return adminId; - } - - public void setLastLoginTime(Date lastLoginTime) { - this.lastLoginTime = lastLoginTime; - } - - public Date getLastLoginTime() { - return lastLoginTime; - } - - public void setLastLoginIp(String lastLoginIp) { - this.lastLoginIp = lastLoginIp; - } - - public String getLastLoginIp() { - return lastLoginIp; - } - - public void setGmtTime(Date gmtTime) { - this.gmtTime = gmtTime; - } - - public Date getGmtTime() { - return gmtTime; - } - - public void setGmtUpdate(Date gmtUpdate) { - this.gmtUpdate = gmtUpdate; - } - - public Date getGmtUpdate() { - return gmtUpdate; - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("sessionkey", getSessionkey()) - .append("accessToken", getAccessToken()) - .append("openId", getOpenId()) - .append("unionId", getUnionId()) - .append("nickName", getNickName()) - .append("avatar", getAvatar()) - .append("phone", getPhone()) - .append("birthday", getBirthday()) - .append("status", getStatus()) - .append("country", getCountry()) - .append("province", getProvince()) - .append("city", getCity()) - .append("address", getAddress()) - .append("userType", getUserType()) - .append("adminId", getAdminId()) - .append("lastLoginTime", getLastLoginTime()) - .append("lastLoginIp", getLastLoginIp()) - .append("gmtTime", getGmtTime()) - .append("gmtUpdate", getGmtUpdate()) - .toString(); - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/TUserLoginLog.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/TUserLoginLog.java deleted file mode 100644 index cf6bb8f1..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/TUserLoginLog.java +++ /dev/null @@ -1,146 +0,0 @@ -package com.ruoyi.system.domain; - -import java.util.Date; - -import com.fasterxml.jackson.annotation.JsonFormat; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.core.domain.BaseEntity; - -/** - * 【请填写功能名称】对象 t_user_login_log - * - * @author wxy - * @date 2021-08-26 - */ -public class TUserLoginLog extends BaseEntity { - private static final long serialVersionUID = 1L; - - /** - * $column.columnComment - */ - private Long id; - - /** - * 用户类型 - */ - @Excel(name = "用户类型") - private String userType; - - /** - * $column.columnComment - */ - @Excel(name = "用户类型") - private Long userId; - - /** - * $column.columnComment - */ - @Excel(name = "用户类型") - private String code; - - /** - * $column.columnComment - */ - @Excel(name = "用户类型") - private String openId; - - /** - * IP地址 - */ - @Excel(name = "IP地址") - private String ip; - - /** - * $column.columnComment - */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "IP地址", width = 30, dateFormat = "yyyy-MM-dd") - private Date gmtTime; - - /** - * $column.columnComment - */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "IP地址", width = 30, dateFormat = "yyyy-MM-dd") - private Date gmtUpdate; - - public void setId(Long id) { - this.id = id; - } - - public Long getId() { - return id; - } - - public void setUserType(String userType) { - this.userType = userType; - } - - public String getUserType() { - return userType; - } - - public void setUserId(Long userId) { - this.userId = userId; - } - - public Long getUserId() { - return userId; - } - - public void setCode(String code) { - this.code = code; - } - - public String getCode() { - return code; - } - - public void setOpenId(String openId) { - this.openId = openId; - } - - public String getOpenId() { - return openId; - } - - public void setIp(String ip) { - this.ip = ip; - } - - public String getIp() { - return ip; - } - - public void setGmtTime(Date gmtTime) { - this.gmtTime = gmtTime; - } - - public Date getGmtTime() { - return gmtTime; - } - - public void setGmtUpdate(Date gmtUpdate) { - this.gmtUpdate = gmtUpdate; - } - - public Date getGmtUpdate() { - return gmtUpdate; - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("userType", getUserType()) - .append("userId", getUserId()) - .append("code", getCode()) - .append("openId", getOpenId()) - .append("ip", getIp()) - .append("gmtTime", getGmtTime()) - .append("gmtUpdate", getGmtUpdate()) - .toString(); - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/DeviceControlCMD.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/DeviceControlCMD.java deleted file mode 100644 index b0246e56..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/DeviceControlCMD.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.ruoyi.system.domain.vo; - -import lombok.Data; - -/** - * 类名: DeviceControlCMD - * 描述: 设备控制指令参数 - * 时间: 2021-08-26,0026 18:54 - * 开发人: admin - */ -@Data -public class DeviceControlCMD { - private Long deviceId; - String deviceNum; - String cmd; -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/IotDeviceListDto.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/IotDeviceListDto.java deleted file mode 100644 index 8e656937..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/IotDeviceListDto.java +++ /dev/null @@ -1,344 +0,0 @@ -/****************************************************************************** - * 作者:kerwincui - * 时间:2021-06-08 - * 邮箱:164770707@qq.com - * 源码地址:https://gitee.com/kerwincui/wumei-smart - * author: kerwincui - * create: 2021-06-08 - * email:164770707@qq.com - * source:https://github.com/kerwincui/wumei-smart - ******************************************************************************/ -package com.ruoyi.system.domain.vo; - -import com.ruoyi.common.annotation.Excel; -import com.ruoyi.common.core.domain.BaseEntity; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; - -import java.math.BigDecimal; - -/** - * 设备对象 iot_device - * - * @author kerwincui - * @date 2021-05-06 - */ -public class IotDeviceListDto extends BaseEntity { - private static final long serialVersionUID = 1L; - - /** - * 序号 - */ - private Long deviceId; - - /** - * 编号 - */ - @Excel(name = "编号") - private String deviceNum; - - /** - * 分类 - */ - @Excel(name = "分类") - private Long categoryId; - - /** - * 分类名称 - */ - @Excel(name = "分类名称") - private String categoryName; - - /** - * 名称 - */ - @Excel(name = "名称") - private String deviceName; - - /** - * 固件版本 - */ - @Excel(name = "固件版本") - private String firmwareVersion; - - /** - * 用户 - */ - @Excel(name = "用户") - private String ownerId; - - @Excel(name = "设备状态") - private String status; - - @Excel(name = "用户昵称") - private String nickName; - - /** - * 删除标志(0代表存在 2代表删除) - */ - private String delFlag; - - - /** - * 报警 - */ - @Excel(name = "报警") - private Integer isAlarm; - - /** - * 雷达感应 - */ - @Excel(name = "雷达感应") - private Integer isRadar; - - /** - * 射频遥控 - */ - @Excel(name = "射频遥控") - private Integer isRfControl; - - /** - * 配网地址 - */ - @Excel(name = "配网地址") - private String networkAddress; - - /** - * 配网IP - */ - @Excel(name = "配网IP") - private String networkIp; - - - /** - * 继电器 - */ - @Excel(name = "继电器") - private Integer relayStatus; - - /** - * 灯状态 - */ - @Excel(name = "灯状态") - private Integer lightStatus; - - /** - * 在线 - */ - @Excel(name = "在线") - private Integer isOnline; - - /** - * 设备温度 - */ - @Excel(name = "设备温度") - private BigDecimal deviceTemperature; - - /** - * 设备湿度 - */ - @Excel(name = "信号") - private Integer rssi; - - @Excel(name = "备注") - private String remark; - - - public void setDeviceId(Long deviceId) { - this.deviceId = deviceId; - } - - public Long getDeviceId() { - return deviceId; - } - - public void setDeviceNum(String deviceNum) { - this.deviceNum = deviceNum; - } - - public String getDeviceNum() { - return deviceNum; - } - - public void setCategoryId(Long categoryId) { - this.categoryId = categoryId; - } - - public Long getCategoryId() { - return categoryId; - } - - public void setCategoryName(String categoryName) { - this.categoryName = categoryName; - } - - public String getCategoryName() { - return categoryName; - } - - public void setDeviceName(String deviceName) { - this.deviceName = deviceName; - } - - public String getDeviceName() { - return deviceName; - } - - public void setStatus(String status) { - this.status = status; - } - - public String getStatus() { - return status; - } - - public void setFirmwareVersion(String firmwareVersion) { - this.firmwareVersion = firmwareVersion; - } - - public String getFirmwareVersion() { - return firmwareVersion; - } - - public void setOwnerId(String ownerId) { - this.ownerId = ownerId; - } - - public String getOwnerId() { - return ownerId; - } - - public void setNickName(String nickName) { - this.nickName = nickName; - } - - public String getNickName() { - return nickName; - } - - public void setDelFlag(String delFlag) { - this.delFlag = delFlag; - } - - public String getDelFlag() { - return delFlag; - } - - public void setIsAlarm(Integer isAlarm) { - this.isAlarm = isAlarm; - } - - public Integer getIsAlarm() { - return isAlarm; - } - - public void setIsRadar(Integer isRadar) { - this.isRadar = isRadar; - } - - public Integer getIsRadar() { - return isRadar; - } - - public void setIsRfControl(Integer isRfControl) { - this.isRfControl = isRfControl; - } - - public Integer getIsRfControl() { - return isRfControl; - } - - public void setNetworkAddress(String networkAddress) { - this.networkAddress = networkAddress; - } - - public String getNetworkAddress() { - return networkAddress; - } - - public void setNetworkIp(String networkIp) { - this.networkIp = networkIp; - } - - public String getNetworkIp() { - return networkIp; - } - - public void setRelayStatus(Integer relayStatus) { - this.relayStatus = relayStatus; - } - - public Integer getRelayStatus() { - return relayStatus; - } - - public void setLightStatus(Integer lightStatus) { - this.lightStatus = lightStatus; - } - - public Integer getLightStatus() { - return lightStatus; - } - - public void setIsOnline(Integer isOnline) { - this.isOnline = isOnline; - } - - public Integer getIsOnline() { - return isOnline; - } - - public void setDeviceTemperature(BigDecimal deviceTemperature) { - this.deviceTemperature = deviceTemperature; - } - - public BigDecimal getDeviceTemperature() { - return deviceTemperature; - } - - public void setRssi(Integer rssi) { - this.rssi = rssi; - } - - public Integer getRssi() { - return rssi; - } - - public void setRemark(String remark) { - this.remark = remark; - } - - public String getRemark() { - return remark; - } - - @Override - public String toString() { - return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) - .append("deviceId", getDeviceId()) - .append("deviceNum", getDeviceNum()) - .append("categoryId", getCategoryId()) - .append("categoryName", getCategoryName()) - .append("deviceName", getDeviceName()) - .append("firmwareVersion", getFirmwareVersion()) - .append("ownerId", getOwnerId()) - .append("nickName", getNickName()) - .append("delFlag", getDelFlag()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .append("isAlarm", getIsAlarm()) - .append("isRadar", getIsRadar()) - .append("isRfControl", getIsRfControl()) - .append("networkAddress", getNetworkAddress()) - .append("networkIp", getNetworkIp()) - .append("relayStatus", getRelayStatus()) - .append("lightStatus", getLightStatus()) - .append("isOnline", getIsOnline()) - .append("deviceTemperature", getDeviceTemperature()) - .append("rssid", getRssi()) - .toString(); - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/MetaVo.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/MetaVo.java deleted file mode 100644 index 908b5823..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/MetaVo.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.ruoyi.system.domain.vo; - -/** - * 路由显示信息 - * - * @author ruoyi - */ -public class MetaVo { - /** - * 设置该路由在侧边栏和面包屑中展示的名字 - */ - private String title; - - /** - * 设置该路由的图标,对应路径src/assets/icons/svg - */ - private String icon; - - /** - * 设置为true,则不会被 缓存 - */ - private boolean noCache; - - public MetaVo() { - } - - public MetaVo(String title, String icon) { - this.title = title; - this.icon = icon; - } - - public MetaVo(String title, String icon, boolean noCache) { - this.title = title; - this.icon = icon; - this.noCache = noCache; - } - - public boolean isNoCache() { - return noCache; - } - - public void setNoCache(boolean noCache) { - this.noCache = noCache; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public String getIcon() { - return icon; - } - - public void setIcon(String icon) { - this.icon = icon; - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/RouterVo.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/RouterVo.java deleted file mode 100644 index 9538383f..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/RouterVo.java +++ /dev/null @@ -1,117 +0,0 @@ -package com.ruoyi.system.domain.vo; - -import com.fasterxml.jackson.annotation.JsonInclude; - -import java.util.List; - -/** - * 路由配置信息 - * - * @author ruoyi - */ -@JsonInclude(JsonInclude.Include.NON_EMPTY) -public class RouterVo { - /** - * 路由名字 - */ - private String name; - - /** - * 路由地址 - */ - private String path; - - /** - * 是否隐藏路由,当设置 true 的时候该路由不会再侧边栏出现 - */ - private boolean hidden; - - /** - * 重定向地址,当设置 noRedirect 的时候该路由在面包屑导航中不可被点击 - */ - private String redirect; - - /** - * 组件地址 - */ - private String component; - - /** - * 当你一个路由下面的 children 声明的路由大于1个时,自动会变成嵌套的模式--如组件页面 - */ - private Boolean alwaysShow; - - /** - * 其他元素 - */ - private MetaVo meta; - - /** - * 子路由 - */ - private List children; - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getPath() { - return path; - } - - public void setPath(String path) { - this.path = path; - } - - public boolean getHidden() { - return hidden; - } - - public void setHidden(boolean hidden) { - this.hidden = hidden; - } - - public String getRedirect() { - return redirect; - } - - public void setRedirect(String redirect) { - this.redirect = redirect; - } - - public String getComponent() { - return component; - } - - public void setComponent(String component) { - this.component = component; - } - - public Boolean getAlwaysShow() { - return alwaysShow; - } - - public void setAlwaysShow(Boolean alwaysShow) { - this.alwaysShow = alwaysShow; - } - - public MetaVo getMeta() { - return meta; - } - - public void setMeta(MetaVo meta) { - this.meta = meta; - } - - public List getChildren() { - return children; - } - - public void setChildren(List children) { - this.children = children; - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/IotCategoryMapper.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/IotCategoryMapper.java deleted file mode 100644 index b3d2708a..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/IotCategoryMapper.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.ruoyi.system.mapper; - -import java.util.List; - -import com.ruoyi.system.domain.IotCategory; -import org.springframework.stereotype.Repository; - -/** - * 设备分类Mapper接口 - * - * @author kerwincui - * @date 2021-05-07 - */ -@Repository -public interface IotCategoryMapper { - /** - * 查询设备分类 - * - * @param categoryId 设备分类ID - * @return 设备分类 - */ - public IotCategory selectIotCategoryById(Long categoryId); - - /** - * 查询设备分类列表 - * - * @param iotCategory 设备分类 - * @return 设备分类集合 - */ - public List selectIotCategoryList(IotCategory iotCategory); - - /** - * 新增设备分类 - * - * @param iotCategory 设备分类 - * @return 结果 - */ - public int insertIotCategory(IotCategory iotCategory); - - /** - * 修改设备分类 - * - * @param iotCategory 设备分类 - * @return 结果 - */ - public int updateIotCategory(IotCategory iotCategory); - - /** - * 删除设备分类 - * - * @param categoryId 设备分类ID - * @return 结果 - */ - public int deleteIotCategoryById(Long categoryId); - - /** - * 批量删除设备分类 - * - * @param categoryIds 需要删除的数据ID - * @return 结果 - */ - public int deleteIotCategoryByIds(Long[] categoryIds); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/IotDeviceMapper.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/IotDeviceMapper.java deleted file mode 100644 index 81e58779..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/IotDeviceMapper.java +++ /dev/null @@ -1,80 +0,0 @@ -package com.ruoyi.system.mapper; - -import java.util.List; - -import com.alibaba.fastjson.JSONObject; -import com.ruoyi.system.domain.IotDevice; -import com.ruoyi.system.domain.vo.IotDeviceListDto; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; - -/** - * 设备Mapper接口 - * - * @author kerwincui - * @date 2021-05-06 - */ -@Repository -public interface IotDeviceMapper { - /** - * 查询设备 - * - * @param deviceId 设备ID - * @return 设备 - */ - public IotDevice selectIotDeviceById(Long deviceId); - - /** - * 根据编号查询设备 - * - * @param deviceNum 设备编号 - * @return 设备 - */ - public IotDevice selectIotDeviceByNum(String deviceNum); - - /** - * 查询设备列表 - * - * @param iotDevice 设备 - * @return 设备集合 - */ - public List selectIotDeviceList(IotDevice iotDevice); - - /** - * 新增设备 - * - * @param iotDevice 设备 - * @return 结果 - */ - public int insertIotDevice(IotDevice iotDevice); - - /** - * 修改设备 - * - * @param iotDevice 设备 - * @return 结果 - */ - public int updateIotDevice(IotDevice iotDevice); - - /** - * 删除设备 - * - * @param deviceId 设备ID - * @return 结果 - */ - public int deleteIotDeviceById(Long deviceId); - - /** - * 批量删除设备 - * - * @param deviceIds 需要删除的数据ID - * @return 结果 - */ - public int deleteIotDeviceByIds(Long[] deviceIds); - - List selectMpIotDeviceList(IotDevice iotDevice); - - JSONObject getDeviceInfoByDeviceNum(@Param("userId") Long userId,@Param("deviceNum") String deviceNum); - - JSONObject getDeviceInfoByDeviceId(@Param("userId") Long userId,@Param("deviceId") Long deviceId); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/IotDeviceSetMapper.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/IotDeviceSetMapper.java deleted file mode 100644 index c65ddcea..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/IotDeviceSetMapper.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.ruoyi.system.mapper; - -import java.util.List; - -import com.ruoyi.system.domain.IotDeviceSet; -import org.springframework.stereotype.Repository; - -/** - * 设备配置Mapper接口 - * - * @author kerwincui - * @date 2021-05-06 - */ -@Repository -public interface IotDeviceSetMapper { - /** - * 查询设备配置 - * - * @param deviceSetId 设备配置ID - * @return 设备配置 - */ - public IotDeviceSet selectIotDeviceSetById(Long deviceSetId); - - /** - * 查询设备最新配置 - * - * @param deviceId 设备配置ID - * @return 设备配置 - */ - public IotDeviceSet selectIotDeviceSetByDeviceId(Long deviceId); - - /** - * 查询设备配置列表 - * - * @param iotDeviceSet 设备配置 - * @return 设备配置集合 - */ - public List selectIotDeviceSetList(IotDeviceSet iotDeviceSet); - - /** - * 新增设备配置 - * - * @param iotDeviceSet 设备配置 - * @return 结果 - */ - public int insertIotDeviceSet(IotDeviceSet iotDeviceSet); - - /** - * 修改设备配置 - * - * @param iotDeviceSet 设备配置 - * @return 结果 - */ - public int updateIotDeviceSet(IotDeviceSet iotDeviceSet); - - /** - * 删除设备配置 - * - * @param deviceConfigId 设备配置ID - * @return 结果 - */ - public int deleteIotDeviceSetById(Long deviceConfigId); - - /** - * 批量删除设备配置 - * - * @param deviceConfigIds 需要删除的数据ID - * @return 结果 - */ - public int deleteIotDeviceSetByIds(Long[] deviceConfigIds); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/IotDeviceStatusMapper.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/IotDeviceStatusMapper.java deleted file mode 100644 index 439e30ed..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/IotDeviceStatusMapper.java +++ /dev/null @@ -1,79 +0,0 @@ -package com.ruoyi.system.mapper; - -import java.util.List; - -import com.ruoyi.system.domain.IotDeviceStatus; -import org.springframework.stereotype.Repository; - -/** - * 设备状态Mapper接口 - * - * @author kerwincui - * @date 2021-05-06 - */ -@Repository -public interface IotDeviceStatusMapper { - /** - * 查询设备状态 - * - * @param deviceStatusId 设备状态ID - * @return 设备状态 - */ - public IotDeviceStatus selectIotDeviceStatusById(Long deviceStatusId); - - /** - * 查询设备最新状态 - * - * @param deviceId 设备ID - * @return 设备状态 - */ - public IotDeviceStatus selectIotDeviceStatusByDeviceId(Long deviceId); - - /** - * 根据设备编号查询设备最新状态 - * - * @param deviceNum 设备编号 - * @return 设备状态 - */ - public IotDeviceStatus selectIotDeviceStatusByDeviceNum(String deviceNum); - - /** - * 查询设备状态列表 - * - * @param iotDeviceStatus 设备状态 - * @return 设备状态集合 - */ - public List selectIotDeviceStatusList(IotDeviceStatus iotDeviceStatus); - - /** - * 新增设备状态 - * - * @param iotDeviceStatus 设备状态 - * @return 结果 - */ - public int insertIotDeviceStatus(IotDeviceStatus iotDeviceStatus); - - /** - * 修改设备状态 - * - * @param iotDeviceStatus 设备状态 - * @return 结果 - */ - public int updateIotDeviceStatus(IotDeviceStatus iotDeviceStatus); - - /** - * 删除设备状态 - * - * @param deviceStatusId 设备状态ID - * @return 结果 - */ - public int deleteIotDeviceStatusById(Long deviceStatusId); - - /** - * 批量删除设备状态 - * - * @param deviceStatusIds 需要删除的数据ID - * @return 结果 - */ - public int deleteIotDeviceStatusByIds(Long[] deviceStatusIds); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/IotDeviceUserRelationMapper.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/IotDeviceUserRelationMapper.java deleted file mode 100644 index 7d70943b..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/IotDeviceUserRelationMapper.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.ruoyi.system.mapper; - -import java.util.List; - -import com.ruoyi.system.domain.IotDeviceUserRelation; -import org.springframework.stereotype.Repository; - -/** - * 【请填写功能名称】Mapper接口 - * - * @author wxy - * @date 2021-08-27 - */ -@Repository -public interface IotDeviceUserRelationMapper { - /** - * 查询【请填写功能名称】 - * - * @param id 【请填写功能名称】ID - * @return 【请填写功能名称】 - */ - public IotDeviceUserRelation selectIotDeviceUserRelationById(Long id); - - /** - * 查询【请填写功能名称】列表 - * - * @param iotDeviceUserRelation 【请填写功能名称】 - * @return 【请填写功能名称】集合 - */ - public List selectIotDeviceUserRelationList(IotDeviceUserRelation iotDeviceUserRelation); - - /** - * 新增【请填写功能名称】 - * - * @param iotDeviceUserRelation 【请填写功能名称】 - * @return 结果 - */ - public int insertIotDeviceUserRelation(IotDeviceUserRelation iotDeviceUserRelation); - - /** - * 修改【请填写功能名称】 - * - * @param iotDeviceUserRelation 【请填写功能名称】 - * @return 结果 - */ - public int updateIotDeviceUserRelation(IotDeviceUserRelation iotDeviceUserRelation); - - /** - * 删除【请填写功能名称】 - * - * @param id 【请填写功能名称】ID - * @return 结果 - */ - public int deleteIotDeviceUserRelationById(Long id); - - /** - * 批量删除【请填写功能名称】 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - public int deleteIotDeviceUserRelationByIds(Long[] ids); - } diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/IotGroupMapper.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/IotGroupMapper.java deleted file mode 100644 index 3f72812f..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/IotGroupMapper.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.ruoyi.system.mapper; - -import java.util.List; - -import com.ruoyi.system.domain.IotGroup; -import org.springframework.stereotype.Repository; - -/** - * 分组Mapper接口 - * - * @author kerwincui - * @date 2021-05-18 - */ -@Repository -public interface IotGroupMapper { - /** - * 查询分组 - * - * @param groupId 分组ID - * @return 分组 - */ - public IotGroup selectIotGroupById(Long groupId); - - /** - * 查询分组列表 - * - * @param iotGroup 分组 - * @return 分组集合 - */ - public List selectIotGroupList(IotGroup iotGroup); - - /** - * 新增分组 - * - * @param iotGroup 分组 - * @return 结果 - */ - public int insertIotGroup(IotGroup iotGroup); - - /** - * 修改分组 - * - * @param iotGroup 分组 - * @return 结果 - */ - public int updateIotGroup(IotGroup iotGroup); - - /** - * 删除分组 - * - * @param groupId 分组ID - * @return 结果 - */ - public int deleteIotGroupById(Long groupId); - - /** - * 批量删除分组 - * - * @param groupIds 需要删除的数据ID - * @return 结果 - */ - public int deleteIotGroupByIds(Long[] groupIds); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysConfigMapper.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysConfigMapper.java deleted file mode 100644 index 0e9a2d8a..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysConfigMapper.java +++ /dev/null @@ -1,70 +0,0 @@ -package com.ruoyi.system.mapper; - -import java.util.List; - -import com.ruoyi.system.domain.SysConfig; -import org.springframework.stereotype.Repository; - -/** - * 参数配置 数据层 - * - * @author ruoyi - */ -@Repository -public interface SysConfigMapper { - /** - * 查询参数配置信息 - * - * @param config 参数配置信息 - * @return 参数配置信息 - */ - public SysConfig selectConfig(SysConfig config); - - /** - * 查询参数配置列表 - * - * @param config 参数配置信息 - * @return 参数配置集合 - */ - public List selectConfigList(SysConfig config); - - /** - * 根据键名查询参数配置信息 - * - * @param configKey 参数键名 - * @return 参数配置信息 - */ - public SysConfig checkConfigKeyUnique(String configKey); - - /** - * 新增参数配置 - * - * @param config 参数配置信息 - * @return 结果 - */ - public int insertConfig(SysConfig config); - - /** - * 修改参数配置 - * - * @param config 参数配置信息 - * @return 结果 - */ - public int updateConfig(SysConfig config); - - /** - * 删除参数配置 - * - * @param configId 参数ID - * @return 结果 - */ - public int deleteConfigById(Long configId); - - /** - * 批量删除参数信息 - * - * @param configIds 需要删除的参数ID - * @return 结果 - */ - public int deleteConfigByIds(Long[] configIds); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java deleted file mode 100644 index 8837187d..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java +++ /dev/null @@ -1,120 +0,0 @@ -package com.ruoyi.system.mapper; - -import java.util.List; - -import org.apache.ibatis.annotations.Param; -import com.ruoyi.common.core.domain.entity.SysDept; -import org.springframework.stereotype.Repository; - -/** - * 部门管理 数据层 - * - * @author ruoyi - */ -@Repository -public interface SysDeptMapper { - /** - * 查询部门管理数据 - * - * @param dept 部门信息 - * @return 部门信息集合 - */ - public List selectDeptList(SysDept dept); - - /** - * 根据角色ID查询部门树信息 - * - * @param roleId 角色ID - * @param deptCheckStrictly 部门树选择项是否关联显示 - * @return 选中部门列表 - */ - public List selectDeptListByRoleId(@Param("roleId") Long roleId, @Param("deptCheckStrictly") boolean deptCheckStrictly); - - /** - * 根据部门ID查询信息 - * - * @param deptId 部门ID - * @return 部门信息 - */ - public SysDept selectDeptById(Long deptId); - - /** - * 根据ID查询所有子部门 - * - * @param deptId 部门ID - * @return 部门列表 - */ - public List selectChildrenDeptById(Long deptId); - - /** - * 根据ID查询所有子部门(正常状态) - * - * @param deptId 部门ID - * @return 子部门数 - */ - public int selectNormalChildrenDeptById(Long deptId); - - /** - * 是否存在子节点 - * - * @param deptId 部门ID - * @return 结果 - */ - public int hasChildByDeptId(Long deptId); - - /** - * 查询部门是否存在用户 - * - * @param deptId 部门ID - * @return 结果 - */ - public int checkDeptExistUser(Long deptId); - - /** - * 校验部门名称是否唯一 - * - * @param deptName 部门名称 - * @param parentId 父部门ID - * @return 结果 - */ - public SysDept checkDeptNameUnique(@Param("deptName") String deptName, @Param("parentId") Long parentId); - - /** - * 新增部门信息 - * - * @param dept 部门信息 - * @return 结果 - */ - public int insertDept(SysDept dept); - - /** - * 修改部门信息 - * - * @param dept 部门信息 - * @return 结果 - */ - public int updateDept(SysDept dept); - - /** - * 修改所在部门的父级部门状态 - * - * @param dept 部门 - */ - public void updateDeptStatus(SysDept dept); - - /** - * 修改子元素关系 - * - * @param depts 子元素 - * @return 结果 - */ - public int updateDeptChildren(@Param("depts") List depts); - - /** - * 删除部门管理信息 - * - * @param deptId 部门ID - * @return 结果 - */ - public int deleteDeptById(Long deptId); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDictDataMapper.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDictDataMapper.java deleted file mode 100644 index 72ef927b..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDictDataMapper.java +++ /dev/null @@ -1,97 +0,0 @@ -package com.ruoyi.system.mapper; - -import java.util.List; - -import org.apache.ibatis.annotations.Param; -import com.ruoyi.common.core.domain.entity.SysDictData; -import org.springframework.stereotype.Repository; - -/** - * 字典表 数据层 - * - * @author ruoyi - */ -@Repository -public interface SysDictDataMapper { - /** - * 根据条件分页查询字典数据 - * - * @param dictData 字典数据信息 - * @return 字典数据集合信息 - */ - public List selectDictDataList(SysDictData dictData); - - /** - * 根据字典类型查询字典数据 - * - * @param dictType 字典类型 - * @return 字典数据集合信息 - */ - public List selectDictDataByType(String dictType); - - /** - * 根据字典类型和字典键值查询字典数据信息 - * - * @param dictType 字典类型 - * @param dictValue 字典键值 - * @return 字典标签 - */ - public String selectDictLabel(@Param("dictType") String dictType, @Param("dictValue") String dictValue); - - /** - * 根据字典数据ID查询信息 - * - * @param dictCode 字典数据ID - * @return 字典数据 - */ - public SysDictData selectDictDataById(Long dictCode); - - /** - * 查询字典数据 - * - * @param dictType 字典类型 - * @return 字典数据 - */ - public int countDictDataByType(String dictType); - - /** - * 通过字典ID删除字典数据信息 - * - * @param dictCode 字典数据ID - * @return 结果 - */ - public int deleteDictDataById(Long dictCode); - - /** - * 批量删除字典数据信息 - * - * @param dictCodes 需要删除的字典数据ID - * @return 结果 - */ - public int deleteDictDataByIds(Long[] dictCodes); - - /** - * 新增字典数据信息 - * - * @param dictData 字典数据信息 - * @return 结果 - */ - public int insertDictData(SysDictData dictData); - - /** - * 修改字典数据信息 - * - * @param dictData 字典数据信息 - * @return 结果 - */ - public int updateDictData(SysDictData dictData); - - /** - * 同步修改字典类型 - * - * @param oldDictType 旧字典类型 - * @param newDictType 新旧字典类型 - * @return 结果 - */ - public int updateDictDataType(@Param("oldDictType") String oldDictType, @Param("newDictType") String newDictType); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDictTypeMapper.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDictTypeMapper.java deleted file mode 100644 index 2249832d..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDictTypeMapper.java +++ /dev/null @@ -1,85 +0,0 @@ -package com.ruoyi.system.mapper; - -import java.util.List; - -import org.apache.ibatis.annotations.Mapper; -import com.ruoyi.common.core.domain.entity.SysDictType; - -/** - * 字典表 数据层 - * - * @author ruoyi - */ -@Mapper -public interface SysDictTypeMapper { - /** - * 根据条件分页查询字典类型 - * - * @param dictType 字典类型信息 - * @return 字典类型集合信息 - */ - public List selectDictTypeList(SysDictType dictType); - - /** - * 根据所有字典类型 - * - * @return 字典类型集合信息 - */ - public List selectDictTypeAll(); - - /** - * 根据字典类型ID查询信息 - * - * @param dictId 字典类型ID - * @return 字典类型 - */ - public SysDictType selectDictTypeById(Long dictId); - - /** - * 根据字典类型查询信息 - * - * @param dictType 字典类型 - * @return 字典类型 - */ - public SysDictType selectDictTypeByType(String dictType); - - /** - * 通过字典ID删除字典信息 - * - * @param dictId 字典ID - * @return 结果 - */ - public int deleteDictTypeById(Long dictId); - - /** - * 批量删除字典类型信息 - * - * @param dictIds 需要删除的字典ID - * @return 结果 - */ - public int deleteDictTypeByIds(Long[] dictIds); - - /** - * 新增字典类型信息 - * - * @param dictType 字典类型信息 - * @return 结果 - */ - public int insertDictType(SysDictType dictType); - - /** - * 修改字典类型信息 - * - * @param dictType 字典类型信息 - * @return 结果 - */ - public int updateDictType(SysDictType dictType); - - /** - * 校验字典类型称是否唯一 - * - * @param dictType 字典类型 - * @return 结果 - */ - public SysDictType checkDictTypeUnique(String dictType); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysLogininforMapper.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysLogininforMapper.java deleted file mode 100644 index 89305f20..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysLogininforMapper.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.ruoyi.system.mapper; - -import java.util.List; - -import com.ruoyi.system.domain.SysLogininfor; -import org.springframework.stereotype.Repository; - -/** - * 系统访问日志情况信息 数据层 - * - * @author ruoyi - */ -@Repository -public interface SysLogininforMapper { - /** - * 新增系统登录日志 - * - * @param logininfor 访问日志对象 - */ - public void insertLogininfor(SysLogininfor logininfor); - - /** - * 查询系统登录日志集合 - * - * @param logininfor 访问日志对象 - * @return 登录记录集合 - */ - public List selectLogininforList(SysLogininfor logininfor); - - /** - * 批量删除系统登录日志 - * - * @param infoIds 需要删除的登录日志ID - * @return 结果 - */ - public int deleteLogininforByIds(Long[] infoIds); - - /** - * 清空系统登录日志 - * - * @return 结果 - */ - public int cleanLogininfor(); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysMenuMapper.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysMenuMapper.java deleted file mode 100644 index e2d6ef02..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysMenuMapper.java +++ /dev/null @@ -1,119 +0,0 @@ -package com.ruoyi.system.mapper; - -import java.util.List; - -import org.apache.ibatis.annotations.Param; -import com.ruoyi.common.core.domain.entity.SysMenu; -import org.springframework.stereotype.Repository; - -/** - * 菜单表 数据层 - * - * @author ruoyi - */ -@Repository -public interface SysMenuMapper { - /** - * 查询系统菜单列表 - * - * @param menu 菜单信息 - * @return 菜单列表 - */ - public List selectMenuList(SysMenu menu); - - /** - * 根据用户所有权限 - * - * @return 权限列表 - */ - public List selectMenuPerms(); - - /** - * 根据用户查询系统菜单列表 - * - * @param menu 菜单信息 - * @return 菜单列表 - */ - public List selectMenuListByUserId(SysMenu menu); - - /** - * 根据用户ID查询权限 - * - * @param userId 用户ID - * @return 权限列表 - */ - public List selectMenuPermsByUserId(Long userId); - - /** - * 根据用户ID查询菜单 - * - * @return 菜单列表 - */ - public List selectMenuTreeAll(); - - /** - * 根据用户ID查询菜单 - * - * @param userId 用户ID - * @return 菜单列表 - */ - public List selectMenuTreeByUserId(Long userId); - - /** - * 根据角色ID查询菜单树信息 - * - * @param roleId 角色ID - * @param menuCheckStrictly 菜单树选择项是否关联显示 - * @return 选中菜单列表 - */ - public List selectMenuListByRoleId(@Param("roleId") Long roleId, @Param("menuCheckStrictly") boolean menuCheckStrictly); - - /** - * 根据菜单ID查询信息 - * - * @param menuId 菜单ID - * @return 菜单信息 - */ - public SysMenu selectMenuById(Long menuId); - - /** - * 是否存在菜单子节点 - * - * @param menuId 菜单ID - * @return 结果 - */ - public int hasChildByMenuId(Long menuId); - - /** - * 新增菜单信息 - * - * @param menu 菜单信息 - * @return 结果 - */ - public int insertMenu(SysMenu menu); - - /** - * 修改菜单信息 - * - * @param menu 菜单信息 - * @return 结果 - */ - public int updateMenu(SysMenu menu); - - /** - * 删除菜单管理信息 - * - * @param menuId 菜单ID - * @return 结果 - */ - public int deleteMenuById(Long menuId); - - /** - * 校验菜单名称是否唯一 - * - * @param menuName 菜单名称 - * @param parentId 父菜单ID - * @return 结果 - */ - public SysMenu checkMenuNameUnique(@Param("menuName") String menuName, @Param("parentId") Long parentId); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysNoticeMapper.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysNoticeMapper.java deleted file mode 100644 index 689ff57c..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysNoticeMapper.java +++ /dev/null @@ -1,62 +0,0 @@ -package com.ruoyi.system.mapper; - -import java.util.List; - -import com.ruoyi.system.domain.SysNotice; -import org.springframework.stereotype.Repository; - -/** - * 通知公告表 数据层 - * - * @author ruoyi - */ -@Repository -public interface SysNoticeMapper { - /** - * 查询公告信息 - * - * @param noticeId 公告ID - * @return 公告信息 - */ - public SysNotice selectNoticeById(Long noticeId); - - /** - * 查询公告列表 - * - * @param notice 公告信息 - * @return 公告集合 - */ - public List selectNoticeList(SysNotice notice); - - /** - * 新增公告 - * - * @param notice 公告信息 - * @return 结果 - */ - public int insertNotice(SysNotice notice); - - /** - * 修改公告 - * - * @param notice 公告信息 - * @return 结果 - */ - public int updateNotice(SysNotice notice); - - /** - * 批量删除公告 - * - * @param noticeId 公告ID - * @return 结果 - */ - public int deleteNoticeById(Long noticeId); - - /** - * 批量删除公告信息 - * - * @param noticeIds 需要删除的公告ID - * @return 结果 - */ - public int deleteNoticeByIds(Long[] noticeIds); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysOperLogMapper.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysOperLogMapper.java deleted file mode 100644 index 90b74661..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysOperLogMapper.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.ruoyi.system.mapper; - -import java.util.List; - -import com.ruoyi.system.domain.SysOperLog; -import org.springframework.stereotype.Repository; - -/** - * 操作日志 数据层 - * - * @author ruoyi - */ -@Repository -public interface SysOperLogMapper { - /** - * 新增操作日志 - * - * @param operLog 操作日志对象 - */ - public void insertOperlog(SysOperLog operLog); - - /** - * 查询系统操作日志集合 - * - * @param operLog 操作日志对象 - * @return 操作日志集合 - */ - public List selectOperLogList(SysOperLog operLog); - - /** - * 批量删除系统操作日志 - * - * @param operIds 需要删除的操作日志ID - * @return 结果 - */ - public int deleteOperLogByIds(Long[] operIds); - - /** - * 查询操作日志详细 - * - * @param operId 操作ID - * @return 操作日志对象 - */ - public SysOperLog selectOperLogById(Long operId); - - /** - * 清空操作日志 - */ - public void cleanOperLog(); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysPostMapper.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysPostMapper.java deleted file mode 100644 index 5cce981e..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysPostMapper.java +++ /dev/null @@ -1,101 +0,0 @@ -package com.ruoyi.system.mapper; - -import java.util.List; - -import com.ruoyi.system.domain.SysPost; -import org.springframework.stereotype.Repository; - -/** - * 岗位信息 数据层 - * - * @author ruoyi - */ -@Repository -public interface SysPostMapper { - /** - * 查询岗位数据集合 - * - * @param post 岗位信息 - * @return 岗位数据集合 - */ - public List selectPostList(SysPost post); - - /** - * 查询所有岗位 - * - * @return 岗位列表 - */ - public List selectPostAll(); - - /** - * 通过岗位ID查询岗位信息 - * - * @param postId 岗位ID - * @return 角色对象信息 - */ - public SysPost selectPostById(Long postId); - - /** - * 根据用户ID获取岗位选择框列表 - * - * @param userId 用户ID - * @return 选中岗位ID列表 - */ - public List selectPostListByUserId(Long userId); - - /** - * 查询用户所属岗位组 - * - * @param userName 用户名 - * @return 结果 - */ - public List selectPostsByUserName(String userName); - - /** - * 删除岗位信息 - * - * @param postId 岗位ID - * @return 结果 - */ - public int deletePostById(Long postId); - - /** - * 批量删除岗位信息 - * - * @param postIds 需要删除的岗位ID - * @return 结果 - */ - public int deletePostByIds(Long[] postIds); - - /** - * 修改岗位信息 - * - * @param post 岗位信息 - * @return 结果 - */ - public int updatePost(SysPost post); - - /** - * 新增岗位信息 - * - * @param post 岗位信息 - * @return 结果 - */ - public int insertPost(SysPost post); - - /** - * 校验岗位名称 - * - * @param postName 岗位名称 - * @return 结果 - */ - public SysPost checkPostNameUnique(String postName); - - /** - * 校验岗位编码 - * - * @param postCode 岗位编码 - * @return 结果 - */ - public SysPost checkPostCodeUnique(String postCode); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleDeptMapper.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleDeptMapper.java deleted file mode 100644 index a3b8b4a6..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleDeptMapper.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.ruoyi.system.mapper; - -import java.util.List; - -import com.ruoyi.system.domain.SysRoleDept; -import org.springframework.stereotype.Repository; - -/** - * 角色与部门关联表 数据层 - * - * @author ruoyi - */ -@Repository -public interface SysRoleDeptMapper { - /** - * 通过角色ID删除角色和部门关联 - * - * @param roleId 角色ID - * @return 结果 - */ - public int deleteRoleDeptByRoleId(Long roleId); - - /** - * 批量删除角色部门关联信息 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - public int deleteRoleDept(Long[] ids); - - /** - * 查询部门使用数量 - * - * @param deptId 部门ID - * @return 结果 - */ - public int selectCountRoleDeptByDeptId(Long deptId); - - /** - * 批量新增角色部门信息 - * - * @param roleDeptList 角色部门列表 - * @return 结果 - */ - public int batchRoleDept(List roleDeptList); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java deleted file mode 100644 index cbc2738f..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java +++ /dev/null @@ -1,109 +0,0 @@ -package com.ruoyi.system.mapper; - -import java.util.List; - -import com.ruoyi.common.core.domain.entity.SysRole; -import org.springframework.stereotype.Repository; - -/** - * 角色表 数据层 - * - * @author ruoyi - */ -@Repository -public interface SysRoleMapper { - /** - * 根据条件分页查询角色数据 - * - * @param role 角色信息 - * @return 角色数据集合信息 - */ - public List selectRoleList(SysRole role); - - /** - * 根据用户ID查询角色 - * - * @param userId 用户ID - * @return 角色列表 - */ - public List selectRolePermissionByUserId(Long userId); - - /** - * 查询所有角色 - * - * @return 角色列表 - */ - public List selectRoleAll(); - - /** - * 根据用户ID获取角色选择框列表 - * - * @param userId 用户ID - * @return 选中角色ID列表 - */ - public List selectRoleListByUserId(Long userId); - - /** - * 通过角色ID查询角色 - * - * @param roleId 角色ID - * @return 角色对象信息 - */ - public SysRole selectRoleById(Long roleId); - - /** - * 根据用户ID查询角色 - * - * @param userName 用户名 - * @return 角色列表 - */ - public List selectRolesByUserName(String userName); - - /** - * 校验角色名称是否唯一 - * - * @param roleName 角色名称 - * @return 角色信息 - */ - public SysRole checkRoleNameUnique(String roleName); - - /** - * 校验角色权限是否唯一 - * - * @param roleKey 角色权限 - * @return 角色信息 - */ - public SysRole checkRoleKeyUnique(String roleKey); - - /** - * 修改角色信息 - * - * @param role 角色信息 - * @return 结果 - */ - public int updateRole(SysRole role); - - /** - * 新增角色信息 - * - * @param role 角色信息 - * @return 结果 - */ - public int insertRole(SysRole role); - - /** - * 通过角色ID删除角色 - * - * @param roleId 角色ID - * @return 结果 - */ - public int deleteRoleById(Long roleId); - - /** - * 批量删除角色信息 - * - * @param roleIds 需要删除的角色ID - * @return 结果 - */ - public int deleteRoleByIds(Long[] roleIds); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMenuMapper.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMenuMapper.java deleted file mode 100644 index 29170f75..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMenuMapper.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.ruoyi.system.mapper; - -import java.util.List; - -import com.ruoyi.system.domain.SysRoleMenu; -import org.springframework.stereotype.Repository; - -/** - * 角色与菜单关联表 数据层 - * - * @author ruoyi - */ -@Repository -public interface SysRoleMenuMapper { - /** - * 查询菜单使用数量 - * - * @param menuId 菜单ID - * @return 结果 - */ - public int checkMenuExistRole(Long menuId); - - /** - * 通过角色ID删除角色和菜单关联 - * - * @param roleId 角色ID - * @return 结果 - */ - public int deleteRoleMenuByRoleId(Long roleId); - - /** - * 批量删除角色菜单关联信息 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - public int deleteRoleMenu(Long[] ids); - - /** - * 批量新增角色菜单信息 - * - * @param roleMenuList 角色菜单列表 - * @return 结果 - */ - public int batchRoleMenu(List roleMenuList); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java deleted file mode 100644 index a111936e..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java +++ /dev/null @@ -1,115 +0,0 @@ -package com.ruoyi.system.mapper; - -import java.util.List; - -import org.apache.ibatis.annotations.Param; -import com.ruoyi.common.core.domain.entity.SysUser; -import org.springframework.stereotype.Repository; - -/** - * 用户表 数据层 - * - * @author ruoyi - */ -@Repository -public interface SysUserMapper { - /** - * 根据条件分页查询用户列表 - * - * @param sysUser 用户信息 - * @return 用户信息集合信息 - */ - public List selectUserList(SysUser sysUser); - - /** - * 通过用户名查询用户 - * - * @param userName 用户名 - * @return 用户对象信息 - */ - public SysUser selectUserByUserName(String userName); - - public SysUser selectUserByOpenId(String openId); - - /** - * 通过用户ID查询用户 - * - * @param userId 用户ID - * @return 用户对象信息 - */ - public SysUser selectUserById(Long userId); - - /** - * 新增用户信息 - * - * @param user 用户信息 - * @return 结果 - */ - public int insertUser(SysUser user); - - /** - * 修改用户信息 - * - * @param user 用户信息 - * @return 结果 - */ - public int updateUser(SysUser user); - - /** - * 修改用户头像 - * - * @param userName 用户名 - * @param avatar 头像地址 - * @return 结果 - */ - public int updateUserAvatar(@Param("userName") String userName, @Param("avatar") String avatar); - - /** - * 重置用户密码 - * - * @param userName 用户名 - * @param password 密码 - * @return 结果 - */ - public int resetUserPwd(@Param("userName") String userName, @Param("password") String password); - - /** - * 通过用户ID删除用户 - * - * @param userId 用户ID - * @return 结果 - */ - public int deleteUserById(Long userId); - - /** - * 批量删除用户信息 - * - * @param userIds 需要删除的用户ID - * @return 结果 - */ - public int deleteUserByIds(Long[] userIds); - - /** - * 校验用户名称是否唯一 - * - * @param userName 用户名称 - * @return 结果 - */ - public int checkUserNameUnique(String userName); - - /** - * 校验手机号码是否唯一 - * - * @param phonenumber 手机号码 - * @return 结果 - */ - public SysUser checkPhoneUnique(String phonenumber); - - /** - * 校验email是否唯一 - * - * @param email 用户邮箱 - * @return 结果 - */ - public SysUser checkEmailUnique(String email); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserPostMapper.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserPostMapper.java deleted file mode 100644 index 58c7808f..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserPostMapper.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.ruoyi.system.mapper; - -import java.util.List; - -import com.ruoyi.system.domain.SysUserPost; -import org.springframework.stereotype.Repository; - -/** - * 用户与岗位关联表 数据层 - * - * @author ruoyi - */ -@Repository -public interface SysUserPostMapper { - /** - * 通过用户ID删除用户和岗位关联 - * - * @param userId 用户ID - * @return 结果 - */ - public int deleteUserPostByUserId(Long userId); - - /** - * 通过岗位ID查询岗位使用数量 - * - * @param postId 岗位ID - * @return 结果 - */ - public int countUserPostById(Long postId); - - /** - * 批量删除用户和岗位关联 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - public int deleteUserPost(Long[] ids); - - /** - * 批量新增用户岗位信息 - * - * @param userPostList 用户角色列表 - * @return 结果 - */ - public int batchUserPost(List userPostList); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserRoleMapper.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserRoleMapper.java deleted file mode 100644 index 528878b6..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserRoleMapper.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.ruoyi.system.mapper; - -import java.util.List; - -import org.apache.ibatis.annotations.Param; -import com.ruoyi.system.domain.SysUserRole; -import org.springframework.stereotype.Repository; - -/** - * 用户与角色关联表 数据层 - * - * @author ruoyi - */ -@Repository -public interface SysUserRoleMapper { - /** - * 通过用户ID删除用户和角色关联 - * - * @param userId 用户ID - * @return 结果 - */ - public int deleteUserRoleByUserId(Long userId); - - /** - * 批量删除用户和角色关联 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - public int deleteUserRole(Long[] ids); - - /** - * 通过角色ID查询角色使用数量 - * - * @param roleId 角色ID - * @return 结果 - */ - public int countUserRoleByRoleId(Long roleId); - - /** - * 批量新增用户角色信息 - * - * @param userRoleList 用户角色列表 - * @return 结果 - */ - public int batchUserRole(List userRoleList); - - /** - * 删除用户和角色关联信息 - * - * @param userRole 用户和角色关联信息 - * @return 结果 - */ - public int deleteUserRoleInfo(SysUserRole userRole); - - /** - * 批量取消授权用户角色 - * - * @param roleId 角色ID - * @param userIds 需要删除的用户数据ID - * @return 结果 - */ - public int deleteUserRoleInfos(@Param("roleId") Long roleId, @Param("userIds") Long[] userIds); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TUserAccountInfoMapper.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TUserAccountInfoMapper.java deleted file mode 100644 index 3076be70..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TUserAccountInfoMapper.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.ruoyi.system.mapper; - -import java.util.List; - -import com.ruoyi.system.domain.TUserAccountInfo; -import org.springframework.stereotype.Repository; - -/** - * 小程序用户Mapper接口 - * - * @author wxy - * @date 2021-08-26 - */ -@Repository -public interface TUserAccountInfoMapper { - /** - * 查询小程序用户 - * - * @param id 小程序用户ID - * @return 小程序用户 - */ - public TUserAccountInfo selectTUserAccountInfoById(Long id); - - /** - * 查询小程序用户列表 - * - * @param tUserAccountInfo 小程序用户 - * @return 小程序用户集合 - */ - public List selectTUserAccountInfoList(TUserAccountInfo tUserAccountInfo); - - /** - * 新增小程序用户 - * - * @param tUserAccountInfo 小程序用户 - * @return 结果 - */ - public int insertTUserAccountInfo(TUserAccountInfo tUserAccountInfo); - - /** - * 修改小程序用户 - * - * @param tUserAccountInfo 小程序用户 - * @return 结果 - */ - public int updateTUserAccountInfo(TUserAccountInfo tUserAccountInfo); - - /** - * 删除小程序用户 - * - * @param id 小程序用户ID - * @return 结果 - */ - public int deleteTUserAccountInfoById(Long id); - - /** - * 批量删除小程序用户 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - public int deleteTUserAccountInfoByIds(Long[] ids); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TUserLoginLogMapper.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TUserLoginLogMapper.java deleted file mode 100644 index d293de0a..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TUserLoginLogMapper.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.ruoyi.system.mapper; - -import java.util.List; - -import com.ruoyi.system.domain.TUserLoginLog; -import org.springframework.stereotype.Repository; - -/** - * 【请填写功能名称】Mapper接口 - * - * @author wxy - * @date 2021-08-26 - */ -@Repository -public interface TUserLoginLogMapper { - /** - * 查询【请填写功能名称】 - * - * @param id 【请填写功能名称】ID - * @return 【请填写功能名称】 - */ - public TUserLoginLog selectTUserLoginLogById(Long id); - - /** - * 查询【请填写功能名称】列表 - * - * @param tUserLoginLog 【请填写功能名称】 - * @return 【请填写功能名称】集合 - */ - public List selectTUserLoginLogList(TUserLoginLog tUserLoginLog); - - /** - * 新增【请填写功能名称】 - * - * @param tUserLoginLog 【请填写功能名称】 - * @return 结果 - */ - public int insertTUserLoginLog(TUserLoginLog tUserLoginLog); - - /** - * 修改【请填写功能名称】 - * - * @param tUserLoginLog 【请填写功能名称】 - * @return 结果 - */ - public int updateTUserLoginLog(TUserLoginLog tUserLoginLog); - - /** - * 删除【请填写功能名称】 - * - * @param id 【请填写功能名称】ID - * @return 结果 - */ - public int deleteTUserLoginLogById(Long id); - - /** - * 批量删除【请填写功能名称】 - * - * @param ids 需要删除的数据ID - * @return 结果 - */ - public int deleteTUserLoginLogByIds(Long[] ids); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mqtt/config/MqttConfig.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mqtt/config/MqttConfig.java deleted file mode 100644 index 70a917ff..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mqtt/config/MqttConfig.java +++ /dev/null @@ -1,130 +0,0 @@ -/****************************************************************************** - * 作者:kerwincui - * 时间:2021-06-08 - * 邮箱:164770707@qq.com - * 源码地址:https://gitee.com/kerwincui/wumei-smart - * author: kerwincui - * create: 2021-06-08 - * email:164770707@qq.com - * source:https://github.com/kerwincui/wumei-smart - ******************************************************************************/ -package com.ruoyi.system.mqtt.config; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.context.properties.ConfigurationProperties; -import org.springframework.context.annotation.Bean; -import org.springframework.stereotype.Component; - -/** - * @Classname MtqqEntity - * @Description mqtt相关配置信息 - */ -@Component -@ConfigurationProperties("spring.mqtt") -public class MqttConfig { - @Autowired - private MqttPushClient mqttPushClient; - - /** - * 用户名 - */ - private String username; - /** - * 密码 - */ - private String password; - /** - * 连接地址 - */ - private String hostUrl; - /** - * 客户Id - */ - private String clientId; - /** - * 默认连接话题 - */ - private String defaultTopic; - /** - * 超时时间 - */ - private int timeout; - /** - * 保持连接数 - */ - private int keepalive; - - - public String getusername() { - return username; - } - - public void setusername(String username) { - this.username = username; - } - - public String getpassword() { - return password; - } - - public void setpassword(String password) { - this.password = password; - } - - public String gethostUrl() { - return hostUrl; - } - - public void sethostUrl(String hostUrl) { - this.hostUrl = hostUrl; - } - - public String getclientId() { - return clientId; - } - - public void setclientId(String clientId) { - this.clientId = clientId; - } - - public String getdefaultTopic() { - return defaultTopic; - } - - public void setdefaultTopic(String defaultTopic) { - this.defaultTopic = defaultTopic; - } - - public int gettimeout() { - return timeout; - } - - public void settimeout(int timeout) { - this.timeout = timeout; - } - - public int getkeepalive() { - return keepalive; - } - - public void setkeepalive(int keepalive) { - this.keepalive = keepalive; - } - - @Bean - public MqttPushClient getMqttPushClient() { - mqttPushClient.connect(hostUrl, clientId, username, password, timeout, keepalive); - // 订阅设备信息 - mqttPushClient.subscribe("device_info", 1); - // 订阅设备状态 - mqttPushClient.subscribe("status", 1); - // 订阅设备配置 - mqttPushClient.subscribe("setting", 1); - // 订阅设备离线遗嘱 - mqttPushClient.subscribe("offline", 1); - // 订阅CMD指令消息 - mqttPushClient.subscribe("cmd", 1); - return mqttPushClient; - } -} - diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mqtt/config/MqttPushClient.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mqtt/config/MqttPushClient.java deleted file mode 100644 index be6dfc29..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mqtt/config/MqttPushClient.java +++ /dev/null @@ -1,121 +0,0 @@ -/****************************************************************************** - * 作者:kerwincui - * 时间:2021-06-08 - * 邮箱:164770707@qq.com - * 源码地址:https://gitee.com/kerwincui/wumei-smart - * author: kerwincui - * create: 2021-06-08 - * email:164770707@qq.com - * source:https://github.com/kerwincui/wumei-smart - ******************************************************************************/ -package com.ruoyi.system.mqtt.config; - -import org.eclipse.paho.client.mqttv3.*; -import org.eclipse.paho.client.mqttv3.persist.MemoryPersistence; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Primary; -import org.springframework.stereotype.Component; - -/** - * @Classname MqttPushClient - * @Description mqtt推送客户端 - */ -@Component -@Primary -public class MqttPushClient { - private static final Logger logger = LoggerFactory.getLogger(MqttPushClient.class); - - @Autowired - private PushCallback pushCallback; - - private static MqttClient client; - - private static MqttClient getClient() { - return client; - } - - private static void setClient(MqttClient client) { - MqttPushClient.client = client; - } - - /** - * 客户端连接 - * - * @param host ip+端口 - * @param clientID 客户端Id - * @param username 用户名 - * @param password 密码 - * @param timeout 超时时间 - * @param keepalive 保留数 - */ - public void connect(String host, String clientID, String username, String password, int timeout, int keepalive) { - MqttClient client; - try { - client = new MqttClient(host, clientID, new MemoryPersistence()); - MqttConnectOptions options = new MqttConnectOptions(); - options.setCleanSession(true); - options.setUserName(username); - options.setPassword(password.toCharArray()); - options.setConnectionTimeout(timeout); - options.setKeepAliveInterval(keepalive); - MqttPushClient.setClient(client); - try { - client.setCallback(pushCallback); - client.connect(options); - System.out.println("MQTT Server Connected ..."); - } catch (Exception e) { - e.printStackTrace(); - } - } catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * 发布 - * - * @param qos 连接方式 - * @param retained 是否保留 - * @param topic 主题 - * @param pushMessage 消息体 - */ - public boolean publish(int qos, boolean retained, String topic, String pushMessage) { - MqttMessage message = new MqttMessage(); - message.setQos(qos); - message.setRetained(retained); - message.setPayload(pushMessage.getBytes()); - MqttTopic mTopic = MqttPushClient.getClient().getTopic(topic); - if (null == mTopic) { - logger.error("topic not exist"); - return false; - } - MqttDeliveryToken token; - try { - token = mTopic.publish(message); - token.waitForCompletion(); - return true; - } catch (MqttPersistenceException e) { - e.printStackTrace(); - } catch (MqttException e) { - e.printStackTrace(); - } - return false; - } - - /** - * 订阅某个主题 - * - * @param topic 主题 - * @param qos 连接方式 - */ - public void subscribe(String topic, int qos) { - logger.info("开始订阅主题" + topic); - try { - MqttPushClient.getClient().subscribe(topic, qos); - } catch (MqttException e) { - e.printStackTrace(); - } - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mqtt/config/PushCallback.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mqtt/config/PushCallback.java deleted file mode 100644 index 3d562c1e..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/mqtt/config/PushCallback.java +++ /dev/null @@ -1,146 +0,0 @@ -/****************************************************************************** - * 作者:kerwincui - * 时间:2021-06-08 - * 邮箱:164770707@qq.com - * 源码地址:https://gitee.com/kerwincui/wumei-smart - * author: kerwincui - * create: 2021-06-08 - * email:164770707@qq.com - * source:https://github.com/kerwincui/wumei-smart - ******************************************************************************/ -package com.ruoyi.system.mqtt.config; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.utils.DateUtils; -import com.ruoyi.common.utils.ServletUtils; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.common.utils.ip.AddressUtils; -import com.ruoyi.common.utils.ip.IpUtils; -import com.ruoyi.system.domain.*; -import com.ruoyi.system.service.IIotCategoryService; -import com.ruoyi.system.service.IIotDeviceService; -import com.ruoyi.system.service.IIotDeviceSetService; -import com.ruoyi.system.service.IIotDeviceStatusService; -import org.eclipse.paho.client.mqttv3.IMqttDeliveryToken; -import org.eclipse.paho.client.mqttv3.MqttCallback; -import org.eclipse.paho.client.mqttv3.MqttClient; -import org.eclipse.paho.client.mqttv3.MqttMessage; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -import java.util.Random; - -/** - * @Classname PushCallback - * @Description 消费监听类 - */ -@Component -public class PushCallback implements MqttCallback { - private static final Logger logger = LoggerFactory.getLogger(MqttPushClient.class); - - @Autowired - private MqttConfig mqttConfig; - @Autowired - private IIotDeviceService iotDeviceService; - @Autowired - private IIotCategoryService iotCategoryService; - @Autowired - private IIotDeviceStatusService iotDeviceStatusService; - @Autowired - private IIotDeviceSetService iotDeviceSetService; - @Autowired - private MqttPushClient mqttPushClient; - - private static MqttClient client; - - @Override - public void connectionLost(Throwable throwable) { - // 连接丢失后,一般在这里面进行重连 - logger.info("连接断开,可以做重连"); - if (client == null || !client.isConnected()) { - mqttConfig.getMqttPushClient(); - } - } - - @Override - public void messageArrived(String topic, MqttMessage mqttMessage) throws Exception { - // subscribe后得到的消息会执行到这里面 - logger.info("接收消息主题 : " + topic); - logger.info("接收消息Qos : " + mqttMessage.getQos()); - logger.info("接收消息内容 : " + new String(mqttMessage.getPayload())); - try { - JSONObject jsonObject = JSON.parseObject(new String(mqttMessage.getPayload())); - }catch (Exception e){ - System.err.println("===未知消息格式:"+new String(mqttMessage.getPayload())); - return; - } - if (topic.equals("device_info")) { - //添加设备信息 - IotDevice device = JSON.parseObject(new String(mqttMessage.getPayload()), IotDevice.class); - IotDevice deviceEntity = iotDeviceService.selectIotDeviceByNum(device.getDeviceNum()); - if (deviceEntity != null) { - device.setDeviceId(deviceEntity.getDeviceId()); - iotDeviceService.updateIotDevice(device); - } else { - IotCategory categoryEntity = iotCategoryService.selectIotCategoryById(device.getCategoryId()); - if (device.getDeviceName() == null || device.getDeviceNum().length() == 0) { - Random rand = new Random(); //随机生成两位数 - device.setDeviceName(categoryEntity.getCategoryName() + (rand.nextInt(90) + 10)); - } - iotDeviceService.insertIotDevice(device); - } - //获取设备状态(消息内容不能为空,硬件获取不到数据报错) - mqttPushClient.publish(1, false, "status/get/" + device.getDeviceNum(), "wumei.live"); - //获取设备配置 - mqttPushClient.publish(1, false, "setting/get/" + device.getDeviceNum(), "wumei.live"); - } else if (topic.equals("status")) { - IotDeviceStatus deviceStatus = JSON.parseObject(new String(mqttMessage.getPayload()), IotDeviceStatus.class); - IotDevice device = iotDeviceService.selectIotDeviceByNum(deviceStatus.getDeviceNum()); - //添加设备状态 - deviceStatus.setDeviceId(device.getDeviceId()); - iotDeviceStatusService.insertIotDeviceStatus(deviceStatus); - } else if (topic.equals("setting")) { - IotDeviceSet deviceSet = JSON.parseObject(new String(mqttMessage.getPayload()), IotDeviceSet.class); - // 智能配网时需要获取IP、地址和设备用户 - IotDevice device = iotDeviceService.selectIotDeviceByNum(deviceSet.getDeviceNum()); - if (deviceSet.getIsSmartConfig() == 1) { - final String ip = IpUtils.getIpAddr(ServletUtils.getRequest()); - deviceSet.setNetworkIp(ip); - deviceSet.setNetworkAddress(AddressUtils.getRealAddressByIP(ip)); - //更新设备用户 - device.setOwnerId(deviceSet.getOwnerId()); - iotDeviceService.updateIotDevice(device); - } - //添加设备配置 - deviceSet.setDeviceId(device.getDeviceId()); - iotDeviceSetService.insertIotDeviceSet(deviceSet); - } else if (topic.equals("offline")) { - //离线遗嘱 - IotDeviceStatus deviceStatus = JSON.parseObject(new String(mqttMessage.getPayload()), IotDeviceStatus.class); - IotDeviceStatus deviceStatusEntity = iotDeviceStatusService.selectIotDeviceStatusByDeviceNum(deviceStatus.getDeviceNum()); - //设备状态为离线 - if (deviceStatusEntity != null) { - deviceStatusEntity.setIsOnline(0); - iotDeviceStatusService.insertIotDeviceStatus(deviceStatusEntity); - } - } else if (topic.equals("cmd")) { - IotDeviceCmd deviceSet = JSON.parseObject(new String(mqttMessage.getPayload()), IotDeviceCmd.class); - // 智能配网时需要获取IP、地址和设备用户 - IotDevice device = iotDeviceService.selectIotDeviceByNum(deviceSet.getDeviceNum()); - - String cmdJson = JSONObject.toJSONString(deviceSet); - //向设备发送指令 - mqttPushClient.publish(1, false, "cmd/get/" + device.getDeviceNum(), cmdJson); - - } - } - - @Override - public void deliveryComplete(IMqttDeliveryToken iMqttDeliveryToken) { - logger.info("deliveryComplete---------" + iMqttDeliveryToken.isComplete()); - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/IIotCategoryService.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/IIotCategoryService.java deleted file mode 100644 index 344041ec..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/IIotCategoryService.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.ruoyi.system.service; - -import java.util.List; - -import com.ruoyi.system.domain.IotCategory; - -/** - * 设备分类Service接口 - * - * @author kerwincui - * @date 2021-05-07 - */ -public interface IIotCategoryService { - /** - * 查询设备分类 - * - * @param categoryId 设备分类ID - * @return 设备分类 - */ - public IotCategory selectIotCategoryById(Long categoryId); - - /** - * 查询设备分类列表 - * - * @param iotCategory 设备分类 - * @return 设备分类集合 - */ - public List selectIotCategoryList(IotCategory iotCategory); - - /** - * 新增设备分类 - * - * @param iotCategory 设备分类 - * @return 结果 - */ - public int insertIotCategory(IotCategory iotCategory); - - /** - * 修改设备分类 - * - * @param iotCategory 设备分类 - * @return 结果 - */ - public int updateIotCategory(IotCategory iotCategory); - - /** - * 批量删除设备分类 - * - * @param categoryIds 需要删除的设备分类ID - * @return 结果 - */ - public int deleteIotCategoryByIds(Long[] categoryIds); - - /** - * 删除设备分类信息 - * - * @param categoryId 设备分类ID - * @return 结果 - */ - public int deleteIotCategoryById(Long categoryId); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/IIotDeviceService.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/IIotDeviceService.java deleted file mode 100644 index 7aa0a4e9..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/IIotDeviceService.java +++ /dev/null @@ -1,87 +0,0 @@ -package com.ruoyi.system.service; - -import java.util.List; - -import com.alibaba.fastjson.JSONObject; -import com.ruoyi.system.domain.IotDevice; -import com.ruoyi.system.domain.vo.IotDeviceListDto; -import org.springframework.transaction.annotation.Transactional; - -/** - * 设备Service接口 - * - * @author kerwincui - * @date 2021-05-06 - */ -public interface IIotDeviceService { - /** - * 查询设备 - * - * @param deviceId 设备ID - * @return 设备 - */ - public IotDevice selectIotDeviceById(Long deviceId); - - /** - * 根据编号查询设备 - */ - public IotDevice selectIotDeviceByNum(String deviceNum); - - /** - * 查询设备列表 - * - * @param iotDevice 设备 - * @return 设备集合 - */ - public List selectIotDeviceList(IotDevice iotDevice); - - /** - * 新增设备 - * - * @param iotDevice 设备 - * @return 结果 - */ - public int insertIotDevice(IotDevice iotDevice); - - /** - * 修改设备 - * - * @param iotDevice 设备 - * @return 结果 - */ - public int updateIotDevice(IotDevice iotDevice); - - /** - * 批量删除设备 - * - * @param deviceIds 需要删除的设备ID - * @return 结果 - */ - public int deleteIotDeviceByIds(Long[] deviceIds); - - /** - * 删除设备信息 - * - * @param deviceId 设备ID - * @return 结果 - */ - public int deleteIotDeviceById(Long deviceId); - - int controlDeviceByNum(String deviceNum, String cmd); - - int bindDevice(Long userId,String nickname,String deviceNum,String name,Long categoryId,String remark); - - List selectMpIotDeviceList(IotDevice iotDevice); - - @Transactional - int updateDeviceInfo(Long userId, String nickName, Long deviceId, String name, String remark); - - IotDevice selectIotDeviceByUserAndNum(Long userId, String deviceNum); - - int unBindDevice(Long userId,String username,Long deviceId); - - JSONObject getDeviceInfoByDeviceNum(Long userId,String nickName,String deviceNum); - - JSONObject getDeviceInfoByDeviceId(Long userId, String username, Long deviceId); -} - diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/IIotDeviceSetService.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/IIotDeviceSetService.java deleted file mode 100644 index 4f2c8bef..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/IIotDeviceSetService.java +++ /dev/null @@ -1,69 +0,0 @@ -package com.ruoyi.system.service; - -import java.util.List; - -import com.ruoyi.system.domain.IotDeviceSet; - -/** - * 设备配置Service接口 - * - * @author kerwincui - * @date 2021-05-06 - */ -public interface IIotDeviceSetService { - /** - * 查询设备配置 - * - * @param deviceConfigId 设备配置ID - * @return 设备配置 - */ - public IotDeviceSet selectIotDeviceSetById(Long deviceSetId); - - /** - * 查询设备最新配置 - * - * @param deviceId 设备ID - * @return 设备配置 - */ - public IotDeviceSet selectIotDeviceSetByDeviceId(Long deviceId); - - /** - * 查询设备配置列表 - * - * @param iotDeviceSet 设备配置 - * @return 设备配置集合 - */ - public List selectIotDeviceSetList(IotDeviceSet iotDeviceSet); - - /** - * 新增设备配置 - * - * @param iotDeviceSet 设备配置 - * @return 结果 - */ - public int insertIotDeviceSet(IotDeviceSet iotDeviceSet); - - /** - * 修改设备配置 - * - * @param iotDeviceSet 设备配置 - * @return 结果 - */ - public int updateIotDeviceSet(IotDeviceSet iotDeviceSet); - - /** - * 批量删除设备配置 - * - * @param deviceConfigIds 需要删除的设备配置ID - * @return 结果 - */ - public int deleteIotDeviceSetByIds(Long[] deviceConfigIds); - - /** - * 删除设备配置信息 - * - * @param deviceConfigId 设备配置ID - * @return 结果 - */ - public int deleteIotDeviceSetById(Long deviceConfigId); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/IIotDeviceStatusService.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/IIotDeviceStatusService.java deleted file mode 100644 index f19213a7..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/IIotDeviceStatusService.java +++ /dev/null @@ -1,77 +0,0 @@ -package com.ruoyi.system.service; - -import java.util.List; - -import com.ruoyi.system.domain.IotDeviceStatus; - -/** - * 设备状态Service接口 - * - * @author kerwincui - * @date 2021-05-06 - */ -public interface IIotDeviceStatusService { - /** - * 查询设备状态 - * - * @param deviceStatusId 设备状态ID - * @return 设备状态 - */ - public IotDeviceStatus selectIotDeviceStatusById(Long deviceStatusId); - - /** - * 查询设备最新状态 - * - * @param deviceId 设备ID - * @return 设备状态 - */ - public IotDeviceStatus selectIotDeviceStatusByDeviceId(Long deviceId); - - /** - * 根据设备编号查询设备最新状态 - * - * @param deviceNum 设备编号 - * @return 设备状态 - */ - public IotDeviceStatus selectIotDeviceStatusByDeviceNum(String deviceNum); - - /** - * 查询设备状态列表 - * - * @param iotDeviceStatus 设备状态 - * @return 设备状态集合 - */ - public List selectIotDeviceStatusList(IotDeviceStatus iotDeviceStatus); - - /** - * 新增设备状态 - * - * @param iotDeviceStatus 设备状态 - * @return 结果 - */ - public int insertIotDeviceStatus(IotDeviceStatus iotDeviceStatus); - - /** - * 修改设备状态 - * - * @param iotDeviceStatus 设备状态 - * @return 结果 - */ - public int updateIotDeviceStatus(IotDeviceStatus iotDeviceStatus); - - /** - * 批量删除设备状态 - * - * @param deviceStatusIds 需要删除的设备状态ID - * @return 结果 - */ - public int deleteIotDeviceStatusByIds(Long[] deviceStatusIds); - - /** - * 删除设备状态信息 - * - * @param deviceStatusId 设备状态ID - * @return 结果 - */ - public int deleteIotDeviceStatusById(Long deviceStatusId); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/IIotDeviceUserRelationService.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/IIotDeviceUserRelationService.java deleted file mode 100644 index 1bda7cf2..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/IIotDeviceUserRelationService.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.ruoyi.system.service; - -import java.util.List; - -import com.ruoyi.system.domain.IotDeviceUserRelation; - -/** - * 【请填写功能名称】Service接口 - * - * @author wxy - * @date 2021-08-27 - */ -public interface IIotDeviceUserRelationService { - /** - * 查询【请填写功能名称】 - * - * @param id 【请填写功能名称】ID - * @return 【请填写功能名称】 - */ - public IotDeviceUserRelation selectIotDeviceUserRelationById(Long id); - - /** - * 查询【请填写功能名称】列表 - * - * @param iotDeviceUserRelation 【请填写功能名称】 - * @return 【请填写功能名称】集合 - */ - public List selectIotDeviceUserRelationList(IotDeviceUserRelation iotDeviceUserRelation); - - /** - * 新增【请填写功能名称】 - * - * @param iotDeviceUserRelation 【请填写功能名称】 - * @return 结果 - */ - public int insertIotDeviceUserRelation(IotDeviceUserRelation iotDeviceUserRelation); - - /** - * 修改【请填写功能名称】 - * - * @param iotDeviceUserRelation 【请填写功能名称】 - * @return 结果 - */ - public int updateIotDeviceUserRelation(IotDeviceUserRelation iotDeviceUserRelation); - - /** - * 批量删除【请填写功能名称】 - * - * @param ids 需要删除的【请填写功能名称】ID - * @return 结果 - */ - public int deleteIotDeviceUserRelationByIds(Long[] ids); - - /** - * 删除【请填写功能名称】信息 - * - * @param id 【请填写功能名称】ID - * @return 结果 - */ - public int deleteIotDeviceUserRelationById(Long id); - - List selectIotDeviceUserRelationByDeviceId(Long deviceId); - - List selectIotDeviceUserRelationByUserId(Long userId); - - IotDeviceUserRelation selectIotDeviceUserRelationByDeviceIdAndUserId(Long deviceId,Long userId); - -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/IIotGroupService.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/IIotGroupService.java deleted file mode 100644 index bb9ae4f8..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/IIotGroupService.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.ruoyi.system.service; - -import java.util.List; - -import com.ruoyi.system.domain.IotGroup; - -/** - * 分组Service接口 - * - * @author kerwincui - * @date 2021-05-18 - */ -public interface IIotGroupService { - /** - * 查询分组 - * - * @param groupId 分组ID - * @return 分组 - */ - public IotGroup selectIotGroupById(Long groupId); - - /** - * 查询分组列表 - * - * @param iotGroup 分组 - * @return 分组集合 - */ - public List selectIotGroupList(IotGroup iotGroup); - - /** - * 新增分组 - * - * @param iotGroup 分组 - * @return 结果 - */ - public int insertIotGroup(IotGroup iotGroup); - - /** - * 修改分组 - * - * @param iotGroup 分组 - * @return 结果 - */ - public int updateIotGroup(IotGroup iotGroup); - - /** - * 批量删除分组 - * - * @param groupIds 需要删除的分组ID - * @return 结果 - */ - public int deleteIotGroupByIds(Long[] groupIds); - - /** - * 删除分组信息 - * - * @param groupId 分组ID - * @return 结果 - */ - public int deleteIotGroupById(Long groupId); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysConfigService.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysConfigService.java deleted file mode 100644 index 0f7d9ed5..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysConfigService.java +++ /dev/null @@ -1,73 +0,0 @@ -package com.ruoyi.system.service; - -import java.util.List; - -import com.ruoyi.system.domain.SysConfig; - -/** - * 参数配置 服务层 - * - * @author ruoyi - */ -public interface ISysConfigService { - /** - * 查询参数配置信息 - * - * @param configId 参数配置ID - * @return 参数配置信息 - */ - public SysConfig selectConfigById(Long configId); - - /** - * 根据键名查询参数配置信息 - * - * @param configKey 参数键名 - * @return 参数键值 - */ - public String selectConfigByKey(String configKey); - - /** - * 查询参数配置列表 - * - * @param config 参数配置信息 - * @return 参数配置集合 - */ - public List selectConfigList(SysConfig config); - - /** - * 新增参数配置 - * - * @param config 参数配置信息 - * @return 结果 - */ - public int insertConfig(SysConfig config); - - /** - * 修改参数配置 - * - * @param config 参数配置信息 - * @return 结果 - */ - public int updateConfig(SysConfig config); - - /** - * 批量删除参数信息 - * - * @param configIds 需要删除的参数ID - * @return 结果 - */ - public int deleteConfigByIds(Long[] configIds); - - /** - * 清空缓存数据 - */ - public void clearCache(); - - /** - * 校验参数键名是否唯一 - * - * @param config 参数信息 - * @return 结果 - */ - public String checkConfigKeyUnique(SysConfig config); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDeptService.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDeptService.java deleted file mode 100644 index 44a7e107..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDeptService.java +++ /dev/null @@ -1,109 +0,0 @@ -package com.ruoyi.system.service; - -import java.util.List; - -import com.ruoyi.common.core.domain.TreeSelect; -import com.ruoyi.common.core.domain.entity.SysDept; - -/** - * 部门管理 服务层 - * - * @author ruoyi - */ -public interface ISysDeptService { - /** - * 查询部门管理数据 - * - * @param dept 部门信息 - * @return 部门信息集合 - */ - public List selectDeptList(SysDept dept); - - /** - * 构建前端所需要树结构 - * - * @param depts 部门列表 - * @return 树结构列表 - */ - public List buildDeptTree(List depts); - - /** - * 构建前端所需要下拉树结构 - * - * @param depts 部门列表 - * @return 下拉树结构列表 - */ - public List buildDeptTreeSelect(List depts); - - /** - * 根据角色ID查询部门树信息 - * - * @param roleId 角色ID - * @return 选中部门列表 - */ - public List selectDeptListByRoleId(Long roleId); - - /** - * 根据部门ID查询信息 - * - * @param deptId 部门ID - * @return 部门信息 - */ - public SysDept selectDeptById(Long deptId); - - /** - * 根据ID查询所有子部门(正常状态) - * - * @param deptId 部门ID - * @return 子部门数 - */ - public int selectNormalChildrenDeptById(Long deptId); - - /** - * 是否存在部门子节点 - * - * @param deptId 部门ID - * @return 结果 - */ - public boolean hasChildByDeptId(Long deptId); - - /** - * 查询部门是否存在用户 - * - * @param deptId 部门ID - * @return 结果 true 存在 false 不存在 - */ - public boolean checkDeptExistUser(Long deptId); - - /** - * 校验部门名称是否唯一 - * - * @param dept 部门信息 - * @return 结果 - */ - public String checkDeptNameUnique(SysDept dept); - - /** - * 新增保存部门信息 - * - * @param dept 部门信息 - * @return 结果 - */ - public int insertDept(SysDept dept); - - /** - * 修改保存部门信息 - * - * @param dept 部门信息 - * @return 结果 - */ - public int updateDept(SysDept dept); - - /** - * 删除部门管理信息 - * - * @param deptId 部门ID - * @return 结果 - */ - public int deleteDeptById(Long deptId); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictDataService.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictDataService.java deleted file mode 100644 index 849417ff..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictDataService.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.ruoyi.system.service; - -import java.util.List; - -import com.ruoyi.common.core.domain.entity.SysDictData; - -/** - * 字典 业务层 - * - * @author ruoyi - */ -public interface ISysDictDataService { - /** - * 根据条件分页查询字典数据 - * - * @param dictData 字典数据信息 - * @return 字典数据集合信息 - */ - public List selectDictDataList(SysDictData dictData); - - /** - * 根据字典类型和字典键值查询字典数据信息 - * - * @param dictType 字典类型 - * @param dictValue 字典键值 - * @return 字典标签 - */ - public String selectDictLabel(String dictType, String dictValue); - - /** - * 根据字典数据ID查询信息 - * - * @param dictCode 字典数据ID - * @return 字典数据 - */ - public SysDictData selectDictDataById(Long dictCode); - - /** - * 批量删除字典数据信息 - * - * @param dictCodes 需要删除的字典数据ID - * @return 结果 - */ - public int deleteDictDataByIds(Long[] dictCodes); - - /** - * 新增保存字典数据信息 - * - * @param dictData 字典数据信息 - * @return 结果 - */ - public int insertDictData(SysDictData dictData); - - /** - * 修改保存字典数据信息 - * - * @param dictData 字典数据信息 - * @return 结果 - */ - public int updateDictData(SysDictData dictData); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictTypeService.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictTypeService.java deleted file mode 100644 index aaa899e6..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysDictTypeService.java +++ /dev/null @@ -1,89 +0,0 @@ -package com.ruoyi.system.service; - -import java.util.List; - -import com.ruoyi.common.core.domain.entity.SysDictData; -import com.ruoyi.common.core.domain.entity.SysDictType; - -/** - * 字典 业务层 - * - * @author ruoyi - */ -public interface ISysDictTypeService { - /** - * 根据条件分页查询字典类型 - * - * @param dictType 字典类型信息 - * @return 字典类型集合信息 - */ - public List selectDictTypeList(SysDictType dictType); - - /** - * 根据所有字典类型 - * - * @return 字典类型集合信息 - */ - public List selectDictTypeAll(); - - /** - * 根据字典类型查询字典数据 - * - * @param dictType 字典类型 - * @return 字典数据集合信息 - */ - public List selectDictDataByType(String dictType); - - /** - * 根据字典类型ID查询信息 - * - * @param dictId 字典类型ID - * @return 字典类型 - */ - public SysDictType selectDictTypeById(Long dictId); - - /** - * 根据字典类型查询信息 - * - * @param dictType 字典类型 - * @return 字典类型 - */ - public SysDictType selectDictTypeByType(String dictType); - - /** - * 批量删除字典信息 - * - * @param dictIds 需要删除的字典ID - * @return 结果 - */ - public int deleteDictTypeByIds(Long[] dictIds); - - /** - * 清空缓存数据 - */ - public void clearCache(); - - /** - * 新增保存字典类型信息 - * - * @param dictType 字典类型信息 - * @return 结果 - */ - public int insertDictType(SysDictType dictType); - - /** - * 修改保存字典类型信息 - * - * @param dictType 字典类型信息 - * @return 结果 - */ - public int updateDictType(SysDictType dictType); - - /** - * 校验字典类型称是否唯一 - * - * @param dictType 字典类型 - * @return 结果 - */ - public String checkDictTypeUnique(SysDictType dictType); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysLogininforService.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysLogininforService.java deleted file mode 100644 index d36e2739..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysLogininforService.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.ruoyi.system.service; - -import java.util.List; - -import com.ruoyi.system.domain.SysLogininfor; - -/** - * 系统访问日志情况信息 服务层 - * - * @author ruoyi - */ -public interface ISysLogininforService { - /** - * 新增系统登录日志 - * - * @param logininfor 访问日志对象 - */ - public void insertLogininfor(SysLogininfor logininfor); - - /** - * 查询系统登录日志集合 - * - * @param logininfor 访问日志对象 - * @return 登录记录集合 - */ - public List selectLogininforList(SysLogininfor logininfor); - - /** - * 批量删除系统登录日志 - * - * @param infoIds 需要删除的登录日志ID - * @return - */ - public int deleteLogininforByIds(Long[] infoIds); - - /** - * 清空系统登录日志 - */ - public void cleanLogininfor(); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysMenuService.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysMenuService.java deleted file mode 100644 index 6405c0dc..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysMenuService.java +++ /dev/null @@ -1,136 +0,0 @@ -package com.ruoyi.system.service; - -import java.util.List; -import java.util.Set; - -import com.ruoyi.common.core.domain.TreeSelect; -import com.ruoyi.common.core.domain.entity.SysMenu; -import com.ruoyi.system.domain.vo.RouterVo; - -/** - * 菜单 业务层 - * - * @author ruoyi - */ -public interface ISysMenuService { - /** - * 根据用户查询系统菜单列表 - * - * @param userId 用户ID - * @return 菜单列表 - */ - public List selectMenuList(Long userId); - - /** - * 根据用户查询系统菜单列表 - * - * @param menu 菜单信息 - * @param userId 用户ID - * @return 菜单列表 - */ - public List selectMenuList(SysMenu menu, Long userId); - - /** - * 根据用户ID查询权限 - * - * @param userId 用户ID - * @return 权限列表 - */ - public Set selectMenuPermsByUserId(Long userId); - - /** - * 根据用户ID查询菜单树信息 - * - * @param userId 用户ID - * @return 菜单列表 - */ - public List selectMenuTreeByUserId(Long userId); - - /** - * 根据角色ID查询菜单树信息 - * - * @param roleId 角色ID - * @return 选中菜单列表 - */ - public List selectMenuListByRoleId(Long roleId); - - /** - * 构建前端路由所需要的菜单 - * - * @param menus 菜单列表 - * @return 路由列表 - */ - public List buildMenus(List menus); - - /** - * 构建前端所需要树结构 - * - * @param menus 菜单列表 - * @return 树结构列表 - */ - public List buildMenuTree(List menus); - - /** - * 构建前端所需要下拉树结构 - * - * @param menus 菜单列表 - * @return 下拉树结构列表 - */ - public List buildMenuTreeSelect(List menus); - - /** - * 根据菜单ID查询信息 - * - * @param menuId 菜单ID - * @return 菜单信息 - */ - public SysMenu selectMenuById(Long menuId); - - /** - * 是否存在菜单子节点 - * - * @param menuId 菜单ID - * @return 结果 true 存在 false 不存在 - */ - public boolean hasChildByMenuId(Long menuId); - - /** - * 查询菜单是否存在角色 - * - * @param menuId 菜单ID - * @return 结果 true 存在 false 不存在 - */ - public boolean checkMenuExistRole(Long menuId); - - /** - * 新增保存菜单信息 - * - * @param menu 菜单信息 - * @return 结果 - */ - public int insertMenu(SysMenu menu); - - /** - * 修改保存菜单信息 - * - * @param menu 菜单信息 - * @return 结果 - */ - public int updateMenu(SysMenu menu); - - /** - * 删除菜单管理信息 - * - * @param menuId 菜单ID - * @return 结果 - */ - public int deleteMenuById(Long menuId); - - /** - * 校验菜单名称是否唯一 - * - * @param menu 菜单信息 - * @return 结果 - */ - public String checkMenuNameUnique(SysMenu menu); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysNoticeService.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysNoticeService.java deleted file mode 100644 index 6ae35629..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysNoticeService.java +++ /dev/null @@ -1,60 +0,0 @@ -package com.ruoyi.system.service; - -import java.util.List; - -import com.ruoyi.system.domain.SysNotice; - -/** - * 公告 服务层 - * - * @author ruoyi - */ -public interface ISysNoticeService { - /** - * 查询公告信息 - * - * @param noticeId 公告ID - * @return 公告信息 - */ - public SysNotice selectNoticeById(Long noticeId); - - /** - * 查询公告列表 - * - * @param notice 公告信息 - * @return 公告集合 - */ - public List selectNoticeList(SysNotice notice); - - /** - * 新增公告 - * - * @param notice 公告信息 - * @return 结果 - */ - public int insertNotice(SysNotice notice); - - /** - * 修改公告 - * - * @param notice 公告信息 - * @return 结果 - */ - public int updateNotice(SysNotice notice); - - /** - * 删除公告信息 - * - * @param noticeId 公告ID - * @return 结果 - */ - public int deleteNoticeById(Long noticeId); - - /** - * 批量删除公告信息 - * - * @param noticeIds 需要删除的公告ID - * @return 结果 - */ - public int deleteNoticeByIds(Long[] noticeIds); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysOperLogService.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysOperLogService.java deleted file mode 100644 index f9b55283..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysOperLogService.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.ruoyi.system.service; - -import java.util.List; - -import com.ruoyi.system.domain.SysOperLog; - -/** - * 操作日志 服务层 - * - * @author ruoyi - */ -public interface ISysOperLogService { - /** - * 新增操作日志 - * - * @param operLog 操作日志对象 - */ - public void insertOperlog(SysOperLog operLog); - - /** - * 查询系统操作日志集合 - * - * @param operLog 操作日志对象 - * @return 操作日志集合 - */ - public List selectOperLogList(SysOperLog operLog); - - /** - * 批量删除系统操作日志 - * - * @param operIds 需要删除的操作日志ID - * @return 结果 - */ - public int deleteOperLogByIds(Long[] operIds); - - /** - * 查询操作日志详细 - * - * @param operId 操作ID - * @return 操作日志对象 - */ - public SysOperLog selectOperLogById(Long operId); - - /** - * 清空操作日志 - */ - public void cleanOperLog(); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysPostService.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysPostService.java deleted file mode 100644 index e251d503..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysPostService.java +++ /dev/null @@ -1,100 +0,0 @@ -package com.ruoyi.system.service; - -import java.util.List; - -import com.ruoyi.system.domain.SysPost; - -/** - * 岗位信息 服务层 - * - * @author ruoyi - */ -public interface ISysPostService { - /** - * 查询岗位信息集合 - * - * @param post 岗位信息 - * @return 岗位列表 - */ - public List selectPostList(SysPost post); - - /** - * 查询所有岗位 - * - * @return 岗位列表 - */ - public List selectPostAll(); - - /** - * 通过岗位ID查询岗位信息 - * - * @param postId 岗位ID - * @return 角色对象信息 - */ - public SysPost selectPostById(Long postId); - - /** - * 根据用户ID获取岗位选择框列表 - * - * @param userId 用户ID - * @return 选中岗位ID列表 - */ - public List selectPostListByUserId(Long userId); - - /** - * 校验岗位名称 - * - * @param post 岗位信息 - * @return 结果 - */ - public String checkPostNameUnique(SysPost post); - - /** - * 校验岗位编码 - * - * @param post 岗位信息 - * @return 结果 - */ - public String checkPostCodeUnique(SysPost post); - - /** - * 通过岗位ID查询岗位使用数量 - * - * @param postId 岗位ID - * @return 结果 - */ - public int countUserPostById(Long postId); - - /** - * 删除岗位信息 - * - * @param postId 岗位ID - * @return 结果 - */ - public int deletePostById(Long postId); - - /** - * 批量删除岗位信息 - * - * @param postIds 需要删除的岗位ID - * @return 结果 - * @throws Exception 异常 - */ - public int deletePostByIds(Long[] postIds); - - /** - * 新增保存岗位信息 - * - * @param post 岗位信息 - * @return 结果 - */ - public int insertPost(SysPost post); - - /** - * 修改保存岗位信息 - * - * @param post 岗位信息 - * @return 结果 - */ - public int updatePost(SysPost post); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysRoleService.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysRoleService.java deleted file mode 100644 index 2cb3871c..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysRoleService.java +++ /dev/null @@ -1,131 +0,0 @@ -package com.ruoyi.system.service; - -import java.util.List; -import java.util.Set; - -import com.ruoyi.common.core.domain.entity.SysRole; - -/** - * 角色业务层 - * - * @author ruoyi - */ -public interface ISysRoleService { - /** - * 根据条件分页查询角色数据 - * - * @param role 角色信息 - * @return 角色数据集合信息 - */ - public List selectRoleList(SysRole role); - - /** - * 根据用户ID查询角色 - * - * @param userId 用户ID - * @return 权限列表 - */ - public Set selectRolePermissionByUserId(Long userId); - - /** - * 查询所有角色 - * - * @return 角色列表 - */ - public List selectRoleAll(); - - /** - * 根据用户ID获取角色选择框列表 - * - * @param userId 用户ID - * @return 选中角色ID列表 - */ - public List selectRoleListByUserId(Long userId); - - /** - * 通过角色ID查询角色 - * - * @param roleId 角色ID - * @return 角色对象信息 - */ - public SysRole selectRoleById(Long roleId); - - /** - * 校验角色名称是否唯一 - * - * @param role 角色信息 - * @return 结果 - */ - public String checkRoleNameUnique(SysRole role); - - /** - * 校验角色权限是否唯一 - * - * @param role 角色信息 - * @return 结果 - */ - public String checkRoleKeyUnique(SysRole role); - - /** - * 校验角色是否允许操作 - * - * @param role 角色信息 - */ - public void checkRoleAllowed(SysRole role); - - /** - * 通过角色ID查询角色使用数量 - * - * @param roleId 角色ID - * @return 结果 - */ - public int countUserRoleByRoleId(Long roleId); - - /** - * 新增保存角色信息 - * - * @param role 角色信息 - * @return 结果 - */ - public int insertRole(SysRole role); - - /** - * 修改保存角色信息 - * - * @param role 角色信息 - * @return 结果 - */ - public int updateRole(SysRole role); - - /** - * 修改角色状态 - * - * @param role 角色信息 - * @return 结果 - */ - public int updateRoleStatus(SysRole role); - - /** - * 修改数据权限信息 - * - * @param role 角色信息 - * @return 结果 - */ - public int authDataScope(SysRole role); - - /** - * 通过角色ID删除角色 - * - * @param roleId 角色ID - * @return 结果 - */ - public int deleteRoleById(Long roleId); - - /** - * 批量删除角色信息 - * - * @param roleIds 需要删除的角色ID - * @return 结果 - */ - public int deleteRoleByIds(Long[] roleIds); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserOnlineService.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserOnlineService.java deleted file mode 100644 index 4e006497..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserOnlineService.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.ruoyi.system.service; - -import com.ruoyi.common.core.domain.model.LoginUser; -import com.ruoyi.system.domain.SysUserOnline; - -/** - * 在线用户 服务层 - * - * @author ruoyi - */ -public interface ISysUserOnlineService { - /** - * 通过登录地址查询信息 - * - * @param ipaddr 登录地址 - * @param user 用户信息 - * @return 在线用户信息 - */ - public SysUserOnline selectOnlineByIpaddr(String ipaddr, LoginUser user); - - /** - * 通过用户名称查询信息 - * - * @param userName 用户名称 - * @param user 用户信息 - * @return 在线用户信息 - */ - public SysUserOnline selectOnlineByUserName(String userName, LoginUser user); - - /** - * 通过登录地址/用户名称查询信息 - * - * @param ipaddr 登录地址 - * @param userName 用户名称 - * @param user 用户信息 - * @return 在线用户信息 - */ - public SysUserOnline selectOnlineByInfo(String ipaddr, String userName, LoginUser user); - - /** - * 设置在线用户信息 - * - * @param user 用户信息 - * @return 在线用户 - */ - public SysUserOnline loginUserToUserOnline(LoginUser user); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserService.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserService.java deleted file mode 100644 index c3643f56..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserService.java +++ /dev/null @@ -1,169 +0,0 @@ -package com.ruoyi.system.service; - -import java.util.List; - -import com.ruoyi.common.core.domain.entity.SysUser; - -/** - * 用户 业务层 - * - * @author ruoyi - */ -public interface ISysUserService { - /** - * 根据条件分页查询用户列表 - * - * @param user 用户信息 - * @return 用户信息集合信息 - */ - public List selectUserList(SysUser user); - - /** - * 通过用户名查询用户 - * - * @param userName 用户名 - * @return 用户对象信息 - */ - public SysUser selectUserByUserName(String userName); - - public SysUser selectUserByOpenId(String openId); - - /** - * 通过用户ID查询用户 - * - * @param userId 用户ID - * @return 用户对象信息 - */ - public SysUser selectUserById(Long userId); - - /** - * 根据用户ID查询用户所属角色组 - * - * @param userName 用户名 - * @return 结果 - */ - public String selectUserRoleGroup(String userName); - - /** - * 根据用户ID查询用户所属岗位组 - * - * @param userName 用户名 - * @return 结果 - */ - public String selectUserPostGroup(String userName); - - /** - * 校验用户名称是否唯一 - * - * @param userName 用户名称 - * @return 结果 - */ - public String checkUserNameUnique(String userName); - - /** - * 校验手机号码是否唯一 - * - * @param user 用户信息 - * @return 结果 - */ - public String checkPhoneUnique(SysUser user); - - /** - * 校验email是否唯一 - * - * @param user 用户信息 - * @return 结果 - */ - public String checkEmailUnique(SysUser user); - - /** - * 校验用户是否允许操作 - * - * @param user 用户信息 - */ - public void checkUserAllowed(SysUser user); - - /** - * 新增用户信息 - * - * @param user 用户信息 - * @return 结果 - */ - public int insertUser(SysUser user); - - /** - * 修改用户信息 - * - * @param user 用户信息 - * @return 结果 - */ - public int updateUser(SysUser user); - - /** - * 修改用户状态 - * - * @param user 用户信息 - * @return 结果 - */ - public int updateUserStatus(SysUser user); - - /** - * 修改用户基本信息 - * - * @param user 用户信息 - * @return 结果 - */ - public int updateUserProfile(SysUser user); - - /** - * 修改用户头像 - * - * @param userName 用户名 - * @param avatar 头像地址 - * @return 结果 - */ - public boolean updateUserAvatar(String userName, String avatar); - - /** - * 重置用户密码 - * - * @param user 用户信息 - * @return 结果 - */ - public int resetPwd(SysUser user); - - /** - * 重置用户密码 - * - * @param userName 用户名 - * @param password 密码 - * @return 结果 - */ - public int resetUserPwd(String userName, String password); - - /** - * 通过用户ID删除用户 - * - * @param userId 用户ID - * @return 结果 - */ - public int deleteUserById(Long userId); - - /** - * 批量删除用户信息 - * - * @param userIds 需要删除的用户ID - * @return 结果 - */ - public int deleteUserByIds(Long[] userIds); - - /** - * 导入用户数据 - * - * @param userList 用户数据列表 - * @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据 - * @param operName 操作用户 - * @return 结果 - */ - public String importUser(List userList, Boolean isUpdateSupport, String operName); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ITUserAccountInfoService.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ITUserAccountInfoService.java deleted file mode 100644 index d63efa1b..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ITUserAccountInfoService.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.ruoyi.system.service; - -import java.util.List; - -import com.ruoyi.system.domain.TUserAccountInfo; - -/** - * 小程序用户Service接口 - * - * @author wxy - * @date 2021-08-26 - */ -public interface ITUserAccountInfoService { - /** - * 查询小程序用户 - * - * @param id 小程序用户ID - * @return 小程序用户 - */ - public TUserAccountInfo selectTUserAccountInfoById(Long id); - - /** - * 查询小程序用户列表 - * - * @param tUserAccountInfo 小程序用户 - * @return 小程序用户集合 - */ - public List selectTUserAccountInfoList(TUserAccountInfo tUserAccountInfo); - - /** - * 新增小程序用户 - * - * @param tUserAccountInfo 小程序用户 - * @return 结果 - */ - public int insertTUserAccountInfo(TUserAccountInfo tUserAccountInfo); - - /** - * 修改小程序用户 - * - * @param tUserAccountInfo 小程序用户 - * @return 结果 - */ - public int updateTUserAccountInfo(TUserAccountInfo tUserAccountInfo); - - /** - * 批量删除小程序用户 - * - * @param ids 需要删除的小程序用户ID - * @return 结果 - */ - public int deleteTUserAccountInfoByIds(Long[] ids); - - /** - * 删除小程序用户信息 - * - * @param id 小程序用户ID - * @return 结果 - */ - public int deleteTUserAccountInfoById(Long id); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ITUserLoginLogService.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ITUserLoginLogService.java deleted file mode 100644 index 8030a1ec..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/ITUserLoginLogService.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.ruoyi.system.service; - -import java.util.List; - -import com.ruoyi.system.domain.TUserLoginLog; - -/** - * 【请填写功能名称】Service接口 - * - * @author wxy - * @date 2021-08-26 - */ -public interface ITUserLoginLogService { - /** - * 查询【请填写功能名称】 - * - * @param id 【请填写功能名称】ID - * @return 【请填写功能名称】 - */ - public TUserLoginLog selectTUserLoginLogById(Long id); - - /** - * 查询【请填写功能名称】列表 - * - * @param tUserLoginLog 【请填写功能名称】 - * @return 【请填写功能名称】集合 - */ - public List selectTUserLoginLogList(TUserLoginLog tUserLoginLog); - - /** - * 新增【请填写功能名称】 - * - * @param tUserLoginLog 【请填写功能名称】 - * @return 结果 - */ - public int insertTUserLoginLog(TUserLoginLog tUserLoginLog); - - /** - * 修改【请填写功能名称】 - * - * @param tUserLoginLog 【请填写功能名称】 - * @return 结果 - */ - public int updateTUserLoginLog(TUserLoginLog tUserLoginLog); - - /** - * 批量删除【请填写功能名称】 - * - * @param ids 需要删除的【请填写功能名称】ID - * @return 结果 - */ - public int deleteTUserLoginLogByIds(Long[] ids); - - /** - * 删除【请填写功能名称】信息 - * - * @param id 【请填写功能名称】ID - * @return 结果 - */ - public int deleteTUserLoginLogById(Long id); -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/IotCategoryServiceImpl.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/IotCategoryServiceImpl.java deleted file mode 100644 index eb023664..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/IotCategoryServiceImpl.java +++ /dev/null @@ -1,90 +0,0 @@ -package com.ruoyi.system.service.impl; - -import java.util.List; - -import com.ruoyi.common.utils.DateUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import com.ruoyi.system.mapper.IotCategoryMapper; -import com.ruoyi.system.domain.IotCategory; -import com.ruoyi.system.service.IIotCategoryService; - -/** - * 设备分类Service业务层处理 - * - * @author kerwincui - * @date 2021-05-07 - */ -@Service -public class IotCategoryServiceImpl implements IIotCategoryService { - @Autowired - private IotCategoryMapper iotCategoryMapper; - - /** - * 查询设备分类 - * - * @param categoryId 设备分类ID - * @return 设备分类 - */ - @Override - public IotCategory selectIotCategoryById(Long categoryId) { - return iotCategoryMapper.selectIotCategoryById(categoryId); - } - - /** - * 查询设备分类列表 - * - * @param iotCategory 设备分类 - * @return 设备分类 - */ - @Override - public List selectIotCategoryList(IotCategory iotCategory) { - return iotCategoryMapper.selectIotCategoryList(iotCategory); - } - - /** - * 新增设备分类 - * - * @param iotCategory 设备分类 - * @return 结果 - */ - @Override - public int insertIotCategory(IotCategory iotCategory) { - iotCategory.setCreateTime(DateUtils.getNowDate()); - return iotCategoryMapper.insertIotCategory(iotCategory); - } - - /** - * 修改设备分类 - * - * @param iotCategory 设备分类 - * @return 结果 - */ - @Override - public int updateIotCategory(IotCategory iotCategory) { - iotCategory.setUpdateTime(DateUtils.getNowDate()); - return iotCategoryMapper.updateIotCategory(iotCategory); - } - - /** - * 批量删除设备分类 - * - * @param categoryIds 需要删除的设备分类ID - * @return 结果 - */ - @Override - public int deleteIotCategoryByIds(Long[] categoryIds) { - return iotCategoryMapper.deleteIotCategoryByIds(categoryIds); - } - - /** - * 删除设备分类信息 - * - * @param categoryId 设备分类ID - * @return 结果 - */ - @Override - public int deleteIotCategoryById(Long categoryId) { - return iotCategoryMapper.deleteIotCategoryById(categoryId); - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/IotDeviceServiceImpl.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/IotDeviceServiceImpl.java deleted file mode 100644 index cf7c6a35..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/IotDeviceServiceImpl.java +++ /dev/null @@ -1,336 +0,0 @@ -package com.ruoyi.system.service.impl; - -import java.util.List; - -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import com.ruoyi.common.core.domain.AjaxResult; -import com.ruoyi.common.exception.CustomException; -import com.ruoyi.common.utils.DateUtils; -import com.ruoyi.system.domain.*; -import com.ruoyi.system.domain.vo.IotDeviceListDto; -import com.ruoyi.system.mqtt.config.MqttPushClient; -import com.ruoyi.system.service.*; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import com.ruoyi.system.mapper.IotDeviceMapper; -import org.springframework.transaction.annotation.Transactional; - -/** - * 设备Service业务层处理 - * - * @author kerwincui - * @date 2021-05-06 - */ -@Service -@Slf4j -public class IotDeviceServiceImpl implements IIotDeviceService { - @Autowired - private IotDeviceMapper iotDeviceMapper; - @Autowired - private MqttPushClient pushClient; - - @Autowired - private ITUserAccountInfoService userAccountInfoService; - - @Autowired - private IIotDeviceUserRelationService deviceUserRelationService; - - @Autowired - private IIotDeviceSetService iotDeviceSetService; - @Autowired - private IIotDeviceStatusService iotDeviceStatusService; - - - /** - * 查询设备 - * - * @param deviceId 设备ID - * @return 设备 - */ - @Override - public IotDevice selectIotDeviceById(Long deviceId) { - return iotDeviceMapper.selectIotDeviceById(deviceId); - } - - /** - * 根据编号查询设备 - * - * @param deviceNum 设备编号 - * @return 设备 - */ - @Override - public IotDevice selectIotDeviceByNum(String deviceNum) { - return iotDeviceMapper.selectIotDeviceByNum(deviceNum); - } - - /** - * 查询设备列表 - * - * @param iotDevice 设备 - * @return 设备 - */ - @Override - public List selectIotDeviceList(IotDevice iotDevice) { - return iotDeviceMapper.selectIotDeviceList(iotDevice); - } - - /** - * 新增设备 - * - * @param iotDevice 设备 - * @return 结果 - */ - @Override - public int insertIotDevice(IotDevice iotDevice) { - iotDevice.setCreateTime(DateUtils.getNowDate()); - return iotDeviceMapper.insertIotDevice(iotDevice); - } - - /** - * 修改设备 - * - * @param iotDevice 设备 - * @return 结果 - */ - @Override - public int updateIotDevice(IotDevice iotDevice) { - iotDevice.setUpdateTime(DateUtils.getNowDate()); - return iotDeviceMapper.updateIotDevice(iotDevice); - } - - /** - * 批量删除设备 - * - * @param deviceIds 需要删除的设备ID - * @return 结果 - */ - @Override - public int deleteIotDeviceByIds(Long[] deviceIds) { - return iotDeviceMapper.deleteIotDeviceByIds(deviceIds); - } - - /** - * 删除设备信息 - * - * @param deviceId 设备ID - * @return 结果 - */ - @Override - public int deleteIotDeviceById(Long deviceId) { - return iotDeviceMapper.deleteIotDeviceById(deviceId); - } - - @Override - public int controlDeviceByNum(String deviceNum, String cmd) { - IotDevice iotDevice = iotDeviceMapper.selectIotDeviceByNum(deviceNum); - if(iotDevice==null) - { - throw new CustomException("设备不存在"); - } - Long deviceId = iotDevice.getDeviceId(); - - - -// IotDeviceStatus status = iotDeviceStatusService.selectIotDeviceStatusByDeviceId(iotDeviceSet.getDeviceId()); -// if (status == null || status.getIsOnline() == 0) { -// return AjaxResult.error("设备已离线,不能更新状态。"); -// } -// // 存储 -// iotDeviceSetService.updateIotDeviceSet(iotDeviceSet); -// -// //mqtt发布 -// IotDeviceSet set = iotDeviceSetService.selectIotDeviceSetByDeviceId(iotDeviceSet.getDeviceId()); -// if (iotDeviceSet.getIsRadar() != null) { -// set.setIsRadar(iotDeviceSet.getIsRadar()); -// } -// if (iotDeviceSet.getIsAlarm() != null) { -// set.setIsAlarm(iotDeviceSet.getIsAlarm()); -// } -// if (iotDeviceSet.getRadarInterval() != null) { -// set.setRadarInterval(iotDeviceSet.getRadarInterval()); -// } -// if (iotDeviceSet.getIsRfControl() != null) { -// set.setIsRfControl(iotDeviceSet.getIsRfControl()); -// } -// if (iotDeviceSet.getRfOneFunc() != null) { -// set.setRfOneFunc(iotDeviceSet.getRfOneFunc()); -// } -// if (iotDeviceSet.getRfTwoFunc() != null) { -// set.setRfTwoFunc(iotDeviceSet.getRfTwoFunc()); -// } -// if (iotDeviceSet.getRfThreeFunc() != null) { -// set.setRfThreeFunc(iotDeviceSet.getRfThreeFunc()); -// } -// if (iotDeviceSet.getRfFourFunc() != null) { -// set.setRfFourFunc(iotDeviceSet.getRfFourFunc()); -// } -// if (iotDeviceSet.getIsRfLearn() != null) { -// set.setIsRfLearn(iotDeviceSet.getIsRfLearn()); -// } -// if (iotDeviceSet.getIsRfClear() != null) { -// set.setIsRfClear(iotDeviceSet.getIsRfClear()); -// } -// if (iotDeviceSet.getIsAp() != null) { -// set.setIsAp(iotDeviceSet.getIsAp()); -// } -// if (iotDeviceSet.getIsReset() != null) { -// set.setIsReset(iotDeviceSet.getIsReset()); -// } -// String content = JSON.toJSONString(set); - -// String topic = "xiaoyi/swtich/devices/"+deviceNum; - IotDeviceStatus iotDeviceStatus = new IotDeviceStatus(); - iotDeviceStatus.setDeviceId(deviceId); - if("on".equalsIgnoreCase(cmd)) - { - iotDeviceStatus.setRelayStatus(1); - }else{ - iotDeviceStatus.setRelayStatus(0); - } - - String topic = "status/set/" + deviceNum; - String content = JSON.toJSONString(iotDeviceStatus); -// content="{\"deviceId\":\"4\",\"params\":{},\"relayStatus\":\"1\"}"; - System.out.println("topic:"+topic); - System.out.println("content:"+content); - boolean publish = pushClient.publish(2, true, topic, content); - if(publish) - { - return 1; - }else{ - throw new CustomException("指令发送失败"); - } - } - - /** - * @Method - * @Description 用户添加设备 - * @Param null - * @return - * @date 2021-08-27,0027 11:33 - * @author admin - * - */ - @Override - @Transactional - public int bindDevice(Long userId,String nickName, String deviceNum, String name, Long categoryId, String remark) { - IotDevice iotDevice = iotDeviceMapper.selectIotDeviceByNum(deviceNum); - if(iotDevice==null) - { - throw new CustomException("设备【"+deviceNum+"】不存在"); - } - - Long deviceId = iotDevice.getDeviceId(); - IotDeviceUserRelation iotDeviceUserRelation = deviceUserRelationService.selectIotDeviceUserRelationByDeviceIdAndUserId(deviceId, userId); - - if(iotDeviceUserRelation!=null) - { - throw new CustomException("该设备已被绑定!"); -// throw new CustomException("设备【"+deviceNum+"】已经绑定,请换其他设备!"); - } - - log.info("用户: "+nickName+",添加设备【"+deviceNum+"】,名称为:"+name); -// iotDevice.setDeviceName(name); - iotDevice.setRemark(remark); - if("未激活".equals(iotDevice.getStatus())) - { - throw new CustomException("该设备未激活不能绑定!"); - } - iotDeviceMapper.updateIotDevice(iotDevice); - - //保存设备用户关联 - IotDeviceUserRelation iotDeviceUserRelation1 = new IotDeviceUserRelation(); - iotDeviceUserRelation1.setDeviceId(deviceId); - iotDeviceUserRelation1.setDeviceNum(deviceNum); - iotDeviceUserRelation1.setUserId(userId); - iotDeviceUserRelation1.setDeviceName(name); - return deviceUserRelationService.insertIotDeviceUserRelation(iotDeviceUserRelation1); - } - - @Override - public List selectMpIotDeviceList(IotDevice iotDevice) { - return iotDeviceMapper.selectMpIotDeviceList(iotDevice); - } - - @Override - @Transactional - public int updateDeviceInfo(Long userId, String nickName, Long deviceId, String name, String remark) { - IotDevice iotDevice = iotDeviceMapper.selectIotDeviceById(deviceId); - if(iotDevice==null) - { - throw new CustomException("设备不存在"); - } - - IotDeviceUserRelation iotDeviceUserRelation = deviceUserRelationService.selectIotDeviceUserRelationByDeviceIdAndUserId(deviceId, userId); - - if(iotDeviceUserRelation==null) - { - throw new CustomException("设备不存在!"); - } - String deviceNum=iotDevice.getDeviceNum(); - log.info("用户: "+nickName+",修改设备【"+deviceNum+"】名称为:"+name); - -// iotDeviceMapper.updateIotDevice(iotDevice); - - //保存设备用户关联 - IotDeviceUserRelation iotDeviceUserRelation1 = new IotDeviceUserRelation(); - iotDeviceUserRelation1.setId(iotDeviceUserRelation.getId()); - iotDeviceUserRelation1.setDeviceId(deviceId); - iotDeviceUserRelation1.setDeviceNum(deviceNum); - iotDeviceUserRelation1.setUserId(userId); - iotDeviceUserRelation1.setDeviceName(name); - iotDeviceUserRelation1.setRemark(remark); - return deviceUserRelationService.updateIotDeviceUserRelation(iotDeviceUserRelation1); - } - - @Override - public IotDevice selectIotDeviceByUserAndNum(Long userId, String deviceNum) { - IotDevice iotDevice = iotDeviceMapper.selectIotDeviceByNum(deviceNum); - if(iotDevice==null) - { - throw new CustomException("设备不存在"); - } - Long deviceId = iotDevice.getDeviceId(); - IotDeviceUserRelation iotDeviceUserRelation = deviceUserRelationService.selectIotDeviceUserRelationByDeviceIdAndUserId(deviceId, userId); - - if(iotDeviceUserRelation==null) - { - throw new CustomException("设备不存在!"); - } - iotDevice.setDeviceName(iotDeviceUserRelation.getDeviceName()); - iotDevice.setRemark(iotDeviceUserRelation.getRemark()); - return iotDevice; - } - - @Override - public int unBindDevice(Long userId, String nickName, Long deviceId) { - IotDevice iotDevice = iotDeviceMapper.selectIotDeviceById(deviceId); - if(iotDevice==null) - { - throw new CustomException("设备不存在"); - } - - IotDeviceUserRelation iotDeviceUserRelation = deviceUserRelationService.selectIotDeviceUserRelationByDeviceIdAndUserId(deviceId, userId); - - if(iotDeviceUserRelation==null) - { - throw new CustomException("设备不存在,或已解绑!"); - } - String deviceNum = iotDevice.getDeviceNum(); - log.info("用户: "+nickName+",解绑设备【"+deviceNum+"】"); - - return deviceUserRelationService.deleteIotDeviceUserRelationById(iotDeviceUserRelation.getId()); - } - - @Override - public JSONObject getDeviceInfoByDeviceNum(Long userId, String nickname,String deviceNum) { - return iotDeviceMapper.getDeviceInfoByDeviceNum(userId,deviceNum); - } - - @Override - public JSONObject getDeviceInfoByDeviceId(Long userId, String nickname,Long deviceId) { - return iotDeviceMapper.getDeviceInfoByDeviceId(userId,deviceId); - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/IotDeviceSetServiceImpl.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/IotDeviceSetServiceImpl.java deleted file mode 100644 index 4b730a35..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/IotDeviceSetServiceImpl.java +++ /dev/null @@ -1,101 +0,0 @@ -package com.ruoyi.system.service.impl; - -import java.util.List; - -import com.ruoyi.common.utils.DateUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import com.ruoyi.system.mapper.IotDeviceSetMapper; -import com.ruoyi.system.domain.IotDeviceSet; -import com.ruoyi.system.service.IIotDeviceSetService; - -/** - * 设备配置Service业务层处理 - * - * @author kerwincui - * @date 2021-05-06 - */ -@Service -public class IotDeviceSetServiceImpl implements IIotDeviceSetService { - @Autowired - private IotDeviceSetMapper iotDeviceSetMapper; - - /** - * 查询设备配置 - * - * @param deviceConfigId 设备配置ID - * @return 设备配置 - */ - @Override - public IotDeviceSet selectIotDeviceSetById(Long deviceSetId) { - return iotDeviceSetMapper.selectIotDeviceSetById(deviceSetId); - } - - /** - * 查询最新设备配置 - * - * @param deviceId 设备ID - * @return 设备配置 - */ - @Override - public IotDeviceSet selectIotDeviceSetByDeviceId(Long deviceId) { - return iotDeviceSetMapper.selectIotDeviceSetByDeviceId(deviceId); - } - - /** - * 查询设备配置列表 - * - * @param iotDeviceSet 设备配置 - * @return 设备配置 - */ - @Override - public List selectIotDeviceSetList(IotDeviceSet iotDeviceSet) { - return iotDeviceSetMapper.selectIotDeviceSetList(iotDeviceSet); - } - - /** - * 新增设备配置 - * - * @param iotDeviceSet 设备配置 - * @return 结果 - */ - @Override - public int insertIotDeviceSet(IotDeviceSet iotDeviceSet) { - iotDeviceSet.setCreateTime(DateUtils.getNowDate()); - return iotDeviceSetMapper.insertIotDeviceSet(iotDeviceSet); - } - - /** - * 修改设备配置 - * - * @param iotDeviceSet 设备配置 - * @return 结果 - */ - @Override - public int updateIotDeviceSet(IotDeviceSet iotDeviceSet) { - iotDeviceSet.setUpdateTime(DateUtils.getNowDate()); - return iotDeviceSetMapper.updateIotDeviceSet(iotDeviceSet); - } - - /** - * 批量删除设备配置 - * - * @param deviceConfigIds 需要删除的设备配置ID - * @return 结果 - */ - @Override - public int deleteIotDeviceSetByIds(Long[] deviceConfigIds) { - return iotDeviceSetMapper.deleteIotDeviceSetByIds(deviceConfigIds); - } - - /** - * 删除设备配置信息 - * - * @param deviceConfigId 设备配置ID - * @return 结果 - */ - @Override - public int deleteIotDeviceSetById(Long deviceConfigId) { - return iotDeviceSetMapper.deleteIotDeviceSetById(deviceConfigId); - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/IotDeviceStatusServiceImpl.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/IotDeviceStatusServiceImpl.java deleted file mode 100644 index 38c46733..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/IotDeviceStatusServiceImpl.java +++ /dev/null @@ -1,112 +0,0 @@ -package com.ruoyi.system.service.impl; - -import java.util.List; - -import com.ruoyi.common.utils.DateUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import com.ruoyi.system.mapper.IotDeviceStatusMapper; -import com.ruoyi.system.domain.IotDeviceStatus; -import com.ruoyi.system.service.IIotDeviceStatusService; - -/** - * 设备状态Service业务层处理 - * - * @author kerwincui - * @date 2021-05-06 - */ -@Service -public class IotDeviceStatusServiceImpl implements IIotDeviceStatusService { - @Autowired - private IotDeviceStatusMapper iotDeviceStatusMapper; - - /** - * 查询设备状态 - * - * @param deviceStatusId 设备状态ID - * @return 设备状态 - */ - @Override - public IotDeviceStatus selectIotDeviceStatusById(Long deviceStatusId) { - return iotDeviceStatusMapper.selectIotDeviceStatusById(deviceStatusId); - } - - /** - * 查询最新设备状态 - * - * @param deviceId 设备ID - * @return 设备状态 - */ - @Override - public IotDeviceStatus selectIotDeviceStatusByDeviceId(Long deviceId) { - return iotDeviceStatusMapper.selectIotDeviceStatusByDeviceId(deviceId); - } - - /** - * 根据设备编号查询最新设备状态 - * - * @param deviceNum 设备编号 - * @return 设备状态 - */ - @Override - public IotDeviceStatus selectIotDeviceStatusByDeviceNum(String deviceNum) { - return iotDeviceStatusMapper.selectIotDeviceStatusByDeviceNum(deviceNum); - } - - /** - * 查询设备状态列表 - * - * @param iotDeviceStatus 设备状态 - * @return 设备状态 - */ - @Override - public List selectIotDeviceStatusList(IotDeviceStatus iotDeviceStatus) { - return iotDeviceStatusMapper.selectIotDeviceStatusList(iotDeviceStatus); - } - - /** - * 新增设备状态 - * - * @param iotDeviceStatus 设备状态 - * @return 结果 - */ - @Override - public int insertIotDeviceStatus(IotDeviceStatus iotDeviceStatus) { - iotDeviceStatus.setCreateTime(DateUtils.getNowDate()); - return iotDeviceStatusMapper.insertIotDeviceStatus(iotDeviceStatus); - } - - /** - * 修改设备状态 - * - * @param iotDeviceStatus 设备状态 - * @return 结果 - */ - @Override - public int updateIotDeviceStatus(IotDeviceStatus iotDeviceStatus) { - iotDeviceStatus.setUpdateTime(DateUtils.getNowDate()); - return iotDeviceStatusMapper.updateIotDeviceStatus(iotDeviceStatus); - } - - /** - * 批量删除设备状态 - * - * @param deviceStatusIds 需要删除的设备状态ID - * @return 结果 - */ - @Override - public int deleteIotDeviceStatusByIds(Long[] deviceStatusIds) { - return iotDeviceStatusMapper.deleteIotDeviceStatusByIds(deviceStatusIds); - } - - /** - * 删除设备状态信息 - * - * @param deviceStatusId 设备状态ID - * @return 结果 - */ - @Override - public int deleteIotDeviceStatusById(Long deviceStatusId) { - return iotDeviceStatusMapper.deleteIotDeviceStatusById(deviceStatusId); - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/IotDeviceUserRelationServiceImpl.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/IotDeviceUserRelationServiceImpl.java deleted file mode 100644 index b590a7ff..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/IotDeviceUserRelationServiceImpl.java +++ /dev/null @@ -1,114 +0,0 @@ -package com.ruoyi.system.service.impl; - -import java.util.List; - import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - import com.ruoyi.system.mapper.IotDeviceUserRelationMapper; -import com.ruoyi.system.domain.IotDeviceUserRelation; -import com.ruoyi.system.service.IIotDeviceUserRelationService; - -/** - * 【请填写功能名称】Service业务层处理 - * - * @author wxy - * @date 2021-08-27 - */ -@Service -public class IotDeviceUserRelationServiceImpl implements IIotDeviceUserRelationService { - @Autowired - private IotDeviceUserRelationMapper iotDeviceUserRelationMapper; - - /** - * 查询【请填写功能名称】 - * - * @param id 【请填写功能名称】ID - * @return 【请填写功能名称】 - */ - @Override - public IotDeviceUserRelation selectIotDeviceUserRelationById(Long id) { - return iotDeviceUserRelationMapper.selectIotDeviceUserRelationById(id); - } - - /** - * 查询【请填写功能名称】列表 - * - * @param iotDeviceUserRelation 【请填写功能名称】 - * @return 【请填写功能名称】 - */ - @Override - public List selectIotDeviceUserRelationList(IotDeviceUserRelation iotDeviceUserRelation) { - return iotDeviceUserRelationMapper.selectIotDeviceUserRelationList(iotDeviceUserRelation); - } - - /** - * 新增【请填写功能名称】 - * - * @param iotDeviceUserRelation 【请填写功能名称】 - * @return 结果 - */ - @Override - public int insertIotDeviceUserRelation(IotDeviceUserRelation iotDeviceUserRelation) { - return iotDeviceUserRelationMapper.insertIotDeviceUserRelation(iotDeviceUserRelation); - } - - /** - * 修改【请填写功能名称】 - * - * @param iotDeviceUserRelation 【请填写功能名称】 - * @return 结果 - */ - @Override - public int updateIotDeviceUserRelation(IotDeviceUserRelation iotDeviceUserRelation) { - return iotDeviceUserRelationMapper.updateIotDeviceUserRelation(iotDeviceUserRelation); - } - - /** - * 批量删除【请填写功能名称】 - * - * @param ids 需要删除的【请填写功能名称】ID - * @return 结果 - */ - @Override - public int deleteIotDeviceUserRelationByIds(Long[] ids) { - return iotDeviceUserRelationMapper.deleteIotDeviceUserRelationByIds(ids); - } - - /** - * 删除【请填写功能名称】信息 - * - * @param id 【请填写功能名称】ID - * @return 结果 - */ - @Override - public int deleteIotDeviceUserRelationById(Long id) { - return iotDeviceUserRelationMapper.deleteIotDeviceUserRelationById(id); - } - - @Override - public List selectIotDeviceUserRelationByDeviceId(Long deviceId) { - IotDeviceUserRelation iotDeviceUserRelation = new IotDeviceUserRelation(); - iotDeviceUserRelation.setDeviceId(deviceId); - return iotDeviceUserRelationMapper.selectIotDeviceUserRelationList(iotDeviceUserRelation); - } - - @Override - public List selectIotDeviceUserRelationByUserId(Long userId) { - IotDeviceUserRelation iotDeviceUserRelation = new IotDeviceUserRelation(); - iotDeviceUserRelation.setUserId(userId); - return iotDeviceUserRelationMapper.selectIotDeviceUserRelationList(iotDeviceUserRelation); - } - - @Override - public IotDeviceUserRelation selectIotDeviceUserRelationByDeviceIdAndUserId(Long deviceId, Long userId) { - IotDeviceUserRelation iotDeviceUserRelation = new IotDeviceUserRelation(); - iotDeviceUserRelation.setUserId(userId); - iotDeviceUserRelation.setDeviceId(deviceId); - List iotDeviceUserRelations = iotDeviceUserRelationMapper.selectIotDeviceUserRelationList(iotDeviceUserRelation); - if(iotDeviceUserRelations==null || iotDeviceUserRelations.size()==0) - { - return null; - } - return iotDeviceUserRelations.get(0); - } - -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/IotGroupServiceImpl.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/IotGroupServiceImpl.java deleted file mode 100644 index 53457361..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/IotGroupServiceImpl.java +++ /dev/null @@ -1,90 +0,0 @@ -package com.ruoyi.system.service.impl; - -import java.util.List; - -import com.ruoyi.common.utils.DateUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import com.ruoyi.system.mapper.IotGroupMapper; -import com.ruoyi.system.domain.IotGroup; -import com.ruoyi.system.service.IIotGroupService; - -/** - * 分组Service业务层处理 - * - * @author kerwincui - * @date 2021-05-18 - */ -@Service -public class IotGroupServiceImpl implements IIotGroupService { - @Autowired - private IotGroupMapper iotGroupMapper; - - /** - * 查询分组 - * - * @param groupId 分组ID - * @return 分组 - */ - @Override - public IotGroup selectIotGroupById(Long groupId) { - return iotGroupMapper.selectIotGroupById(groupId); - } - - /** - * 查询分组列表 - * - * @param iotGroup 分组 - * @return 分组 - */ - @Override - public List selectIotGroupList(IotGroup iotGroup) { - return iotGroupMapper.selectIotGroupList(iotGroup); - } - - /** - * 新增分组 - * - * @param iotGroup 分组 - * @return 结果 - */ - @Override - public int insertIotGroup(IotGroup iotGroup) { - iotGroup.setCreateTime(DateUtils.getNowDate()); - return iotGroupMapper.insertIotGroup(iotGroup); - } - - /** - * 修改分组 - * - * @param iotGroup 分组 - * @return 结果 - */ - @Override - public int updateIotGroup(IotGroup iotGroup) { - iotGroup.setUpdateTime(DateUtils.getNowDate()); - return iotGroupMapper.updateIotGroup(iotGroup); - } - - /** - * 批量删除分组 - * - * @param groupIds 需要删除的分组ID - * @return 结果 - */ - @Override - public int deleteIotGroupByIds(Long[] groupIds) { - return iotGroupMapper.deleteIotGroupByIds(groupIds); - } - - /** - * 删除分组信息 - * - * @param groupId 分组ID - * @return 结果 - */ - @Override - public int deleteIotGroupById(Long groupId) { - return iotGroupMapper.deleteIotGroupById(groupId); - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java deleted file mode 100644 index ca88e985..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysConfigServiceImpl.java +++ /dev/null @@ -1,178 +0,0 @@ -package com.ruoyi.system.service.impl; - -import java.util.Collection; -import java.util.List; -import javax.annotation.PostConstruct; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import com.ruoyi.common.annotation.DataSource; -import com.ruoyi.common.constant.Constants; -import com.ruoyi.common.constant.UserConstants; -import com.ruoyi.common.core.redis.RedisCache; -import com.ruoyi.common.core.text.Convert; -import com.ruoyi.common.enums.DataSourceType; -import com.ruoyi.common.exception.CustomException; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.system.domain.SysConfig; -import com.ruoyi.system.mapper.SysConfigMapper; -import com.ruoyi.system.service.ISysConfigService; - -/** - * 参数配置 服务层实现 - * - * @author ruoyi - */ -@Service -public class SysConfigServiceImpl implements ISysConfigService { - @Autowired - private SysConfigMapper configMapper; - - @Autowired - private RedisCache redisCache; - - /** - * 项目启动时,初始化参数到缓存 - */ - @PostConstruct - public void init() { - List configsList = configMapper.selectConfigList(new SysConfig()); - for (SysConfig config : configsList) { - redisCache.setCacheObject(getCacheKey(config.getConfigKey()), config.getConfigValue()); - } - } - - /** - * 查询参数配置信息 - * - * @param configId 参数配置ID - * @return 参数配置信息 - */ - @Override - @DataSource(DataSourceType.MASTER) - public SysConfig selectConfigById(Long configId) { - SysConfig config = new SysConfig(); - config.setConfigId(configId); - return configMapper.selectConfig(config); - } - - /** - * 根据键名查询参数配置信息 - * - * @param configKey 参数key - * @return 参数键值 - */ - @Override - public String selectConfigByKey(String configKey) { - String configValue = Convert.toStr(redisCache.getCacheObject(getCacheKey(configKey))); - if (StringUtils.isNotEmpty(configValue)) { - return configValue; - } - SysConfig config = new SysConfig(); - config.setConfigKey(configKey); - SysConfig retConfig = configMapper.selectConfig(config); - if (StringUtils.isNotNull(retConfig)) { - redisCache.setCacheObject(getCacheKey(configKey), retConfig.getConfigValue()); - return retConfig.getConfigValue(); - } - return StringUtils.EMPTY; - } - - /** - * 查询参数配置列表 - * - * @param config 参数配置信息 - * @return 参数配置集合 - */ - @Override - public List selectConfigList(SysConfig config) { - return configMapper.selectConfigList(config); - } - - /** - * 新增参数配置 - * - * @param config 参数配置信息 - * @return 结果 - */ - @Override - public int insertConfig(SysConfig config) { - int row = configMapper.insertConfig(config); - if (row > 0) { - redisCache.setCacheObject(getCacheKey(config.getConfigKey()), config.getConfigValue()); - } - return row; - } - - /** - * 修改参数配置 - * - * @param config 参数配置信息 - * @return 结果 - */ - @Override - public int updateConfig(SysConfig config) { - int row = configMapper.updateConfig(config); - if (row > 0) { - redisCache.setCacheObject(getCacheKey(config.getConfigKey()), config.getConfigValue()); - } - return row; - } - - /** - * 批量删除参数信息 - * - * @param configIds 需要删除的参数ID - * @return 结果 - */ - @Override - public int deleteConfigByIds(Long[] configIds) { - for (Long configId : configIds) { - SysConfig config = selectConfigById(configId); - if (StringUtils.equals(UserConstants.YES, config.getConfigType())) { - throw new CustomException(String.format("内置参数【%1$s】不能删除 ", config.getConfigKey())); - } - } - int count = configMapper.deleteConfigByIds(configIds); - if (count > 0) { - Collection keys = redisCache.keys(Constants.SYS_CONFIG_KEY + "*"); - redisCache.deleteObject(keys); - } - return count; - } - - /** - * 清空缓存数据 - */ - @Override - public void clearCache() { - Collection keys = redisCache.keys(Constants.SYS_CONFIG_KEY + "*"); - redisCache.deleteObject(keys); - } - - /** - * 校验参数键名是否唯一 - * - * @param config 参数配置信息 - * @return 结果 - */ - @Override - public String checkConfigKeyUnique(SysConfig config) { - Long configId = StringUtils.isNull(config.getConfigId()) ? -1L : config.getConfigId(); - SysConfig info = configMapper.checkConfigKeyUnique(config.getConfigKey()); - if (StringUtils.isNotNull(info) && info.getConfigId().longValue() != configId.longValue()) { - return UserConstants.NOT_UNIQUE; - } - return UserConstants.UNIQUE; - } - - /** - * 设置cache key - * - * @param configKey 参数键 - * @return 缓存键key - */ - private String getCacheKey(String configKey) { - return Constants.SYS_CONFIG_KEY + configKey; - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java deleted file mode 100644 index f18682a9..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDeptServiceImpl.java +++ /dev/null @@ -1,275 +0,0 @@ -package com.ruoyi.system.service.impl; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.stream.Collectors; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import com.ruoyi.common.annotation.DataScope; -import com.ruoyi.common.constant.UserConstants; -import com.ruoyi.common.core.domain.TreeSelect; -import com.ruoyi.common.core.domain.entity.SysDept; -import com.ruoyi.common.core.domain.entity.SysRole; -import com.ruoyi.common.exception.CustomException; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.system.mapper.SysDeptMapper; -import com.ruoyi.system.mapper.SysRoleMapper; -import com.ruoyi.system.service.ISysDeptService; - -/** - * 部门管理 服务实现 - * - * @author ruoyi - */ -@Service -public class SysDeptServiceImpl implements ISysDeptService { - @Autowired - private SysDeptMapper deptMapper; - - @Autowired - private SysRoleMapper roleMapper; - - /** - * 查询部门管理数据 - * - * @param dept 部门信息 - * @return 部门信息集合 - */ - @Override - @DataScope(deptAlias = "d") - public List selectDeptList(SysDept dept) { - return deptMapper.selectDeptList(dept); - } - - /** - * 构建前端所需要树结构 - * - * @param depts 部门列表 - * @return 树结构列表 - */ - @Override - public List buildDeptTree(List depts) { - List returnList = new ArrayList(); - List tempList = new ArrayList(); - for (SysDept dept : depts) { - tempList.add(dept.getDeptId()); - } - for (Iterator iterator = depts.iterator(); iterator.hasNext(); ) { - SysDept dept = (SysDept) iterator.next(); - // 如果是顶级节点, 遍历该父节点的所有子节点 - if (!tempList.contains(dept.getParentId())) { - recursionFn(depts, dept); - returnList.add(dept); - } - } - if (returnList.isEmpty()) { - returnList = depts; - } - return returnList; - } - - /** - * 构建前端所需要下拉树结构 - * - * @param depts 部门列表 - * @return 下拉树结构列表 - */ - @Override - public List buildDeptTreeSelect(List depts) { - List deptTrees = buildDeptTree(depts); - return deptTrees.stream().map(TreeSelect::new).collect(Collectors.toList()); - } - - /** - * 根据角色ID查询部门树信息 - * - * @param roleId 角色ID - * @return 选中部门列表 - */ - @Override - public List selectDeptListByRoleId(Long roleId) { - SysRole role = roleMapper.selectRoleById(roleId); - return deptMapper.selectDeptListByRoleId(roleId, role.isDeptCheckStrictly()); - } - - /** - * 根据部门ID查询信息 - * - * @param deptId 部门ID - * @return 部门信息 - */ - @Override - public SysDept selectDeptById(Long deptId) { - return deptMapper.selectDeptById(deptId); - } - - /** - * 根据ID查询所有子部门(正常状态) - * - * @param deptId 部门ID - * @return 子部门数 - */ - @Override - public int selectNormalChildrenDeptById(Long deptId) { - return deptMapper.selectNormalChildrenDeptById(deptId); - } - - /** - * 是否存在子节点 - * - * @param deptId 部门ID - * @return 结果 - */ - @Override - public boolean hasChildByDeptId(Long deptId) { - int result = deptMapper.hasChildByDeptId(deptId); - return result > 0 ? true : false; - } - - /** - * 查询部门是否存在用户 - * - * @param deptId 部门ID - * @return 结果 true 存在 false 不存在 - */ - @Override - public boolean checkDeptExistUser(Long deptId) { - int result = deptMapper.checkDeptExistUser(deptId); - return result > 0 ? true : false; - } - - /** - * 校验部门名称是否唯一 - * - * @param dept 部门信息 - * @return 结果 - */ - @Override - public String checkDeptNameUnique(SysDept dept) { - Long deptId = StringUtils.isNull(dept.getDeptId()) ? -1L : dept.getDeptId(); - SysDept info = deptMapper.checkDeptNameUnique(dept.getDeptName(), dept.getParentId()); - if (StringUtils.isNotNull(info) && info.getDeptId().longValue() != deptId.longValue()) { - return UserConstants.NOT_UNIQUE; - } - return UserConstants.UNIQUE; - } - - /** - * 新增保存部门信息 - * - * @param dept 部门信息 - * @return 结果 - */ - @Override - public int insertDept(SysDept dept) { - SysDept info = deptMapper.selectDeptById(dept.getParentId()); - // 如果父节点不为正常状态,则不允许新增子节点 - if (!UserConstants.DEPT_NORMAL.equals(info.getStatus())) { - throw new CustomException("部门停用,不允许新增"); - } - dept.setAncestors(info.getAncestors() + "," + dept.getParentId()); - return deptMapper.insertDept(dept); - } - - /** - * 修改保存部门信息 - * - * @param dept 部门信息 - * @return 结果 - */ - @Override - public int updateDept(SysDept dept) { - SysDept newParentDept = deptMapper.selectDeptById(dept.getParentId()); - SysDept oldDept = deptMapper.selectDeptById(dept.getDeptId()); - if (StringUtils.isNotNull(newParentDept) && StringUtils.isNotNull(oldDept)) { - String newAncestors = newParentDept.getAncestors() + "," + newParentDept.getDeptId(); - String oldAncestors = oldDept.getAncestors(); - dept.setAncestors(newAncestors); - updateDeptChildren(dept.getDeptId(), newAncestors, oldAncestors); - } - int result = deptMapper.updateDept(dept); - if (UserConstants.DEPT_NORMAL.equals(dept.getStatus())) { - // 如果该部门是启用状态,则启用该部门的所有上级部门 - updateParentDeptStatus(dept); - } - return result; - } - - /** - * 修改该部门的父级部门状态 - * - * @param dept 当前部门 - */ - private void updateParentDeptStatus(SysDept dept) { - String updateBy = dept.getUpdateBy(); - dept = deptMapper.selectDeptById(dept.getDeptId()); - dept.setUpdateBy(updateBy); - deptMapper.updateDeptStatus(dept); - } - - /** - * 修改子元素关系 - * - * @param deptId 被修改的部门ID - * @param newAncestors 新的父ID集合 - * @param oldAncestors 旧的父ID集合 - */ - public void updateDeptChildren(Long deptId, String newAncestors, String oldAncestors) { - List children = deptMapper.selectChildrenDeptById(deptId); - for (SysDept child : children) { - child.setAncestors(child.getAncestors().replace(oldAncestors, newAncestors)); - } - if (children.size() > 0) { - deptMapper.updateDeptChildren(children); - } - } - - /** - * 删除部门管理信息 - * - * @param deptId 部门ID - * @return 结果 - */ - @Override - public int deleteDeptById(Long deptId) { - return deptMapper.deleteDeptById(deptId); - } - - /** - * 递归列表 - */ - private void recursionFn(List list, SysDept t) { - // 得到子节点列表 - List childList = getChildList(list, t); - t.setChildren(childList); - for (SysDept tChild : childList) { - if (hasChild(list, tChild)) { - recursionFn(list, tChild); - } - } - } - - /** - * 得到子节点列表 - */ - private List getChildList(List list, SysDept t) { - List tlist = new ArrayList(); - Iterator it = list.iterator(); - while (it.hasNext()) { - SysDept n = (SysDept) it.next(); - if (StringUtils.isNotNull(n.getParentId()) && n.getParentId().longValue() == t.getDeptId().longValue()) { - tlist.add(n); - } - } - return tlist; - } - - /** - * 判断是否有子节点 - */ - private boolean hasChild(List list, SysDept t) { - return getChildList(list, t).size() > 0 ? true : false; - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictDataServiceImpl.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictDataServiceImpl.java deleted file mode 100644 index f6dc8381..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictDataServiceImpl.java +++ /dev/null @@ -1,100 +0,0 @@ -package com.ruoyi.system.service.impl; - -import java.util.List; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import com.ruoyi.common.core.domain.entity.SysDictData; -import com.ruoyi.common.utils.DictUtils; -import com.ruoyi.system.mapper.SysDictDataMapper; -import com.ruoyi.system.service.ISysDictDataService; - -/** - * 字典 业务层处理 - * - * @author ruoyi - */ -@Service -public class SysDictDataServiceImpl implements ISysDictDataService { - @Autowired - private SysDictDataMapper dictDataMapper; - - /** - * 根据条件分页查询字典数据 - * - * @param dictData 字典数据信息 - * @return 字典数据集合信息 - */ - @Override - public List selectDictDataList(SysDictData dictData) { - return dictDataMapper.selectDictDataList(dictData); - } - - /** - * 根据字典类型和字典键值查询字典数据信息 - * - * @param dictType 字典类型 - * @param dictValue 字典键值 - * @return 字典标签 - */ - @Override - public String selectDictLabel(String dictType, String dictValue) { - return dictDataMapper.selectDictLabel(dictType, dictValue); - } - - /** - * 根据字典数据ID查询信息 - * - * @param dictCode 字典数据ID - * @return 字典数据 - */ - @Override - public SysDictData selectDictDataById(Long dictCode) { - return dictDataMapper.selectDictDataById(dictCode); - } - - /** - * 批量删除字典数据信息 - * - * @param dictCodes 需要删除的字典数据ID - * @return 结果 - */ - @Override - public int deleteDictDataByIds(Long[] dictCodes) { - int row = dictDataMapper.deleteDictDataByIds(dictCodes); - if (row > 0) { - DictUtils.clearDictCache(); - } - return row; - } - - /** - * 新增保存字典数据信息 - * - * @param dictData 字典数据信息 - * @return 结果 - */ - @Override - public int insertDictData(SysDictData dictData) { - int row = dictDataMapper.insertDictData(dictData); - if (row > 0) { - DictUtils.clearDictCache(); - } - return row; - } - - /** - * 修改保存字典数据信息 - * - * @param dictData 字典数据信息 - * @return 结果 - */ - @Override - public int updateDictData(SysDictData dictData) { - int row = dictDataMapper.updateDictData(dictData); - if (row > 0) { - DictUtils.clearDictCache(); - } - return row; - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictTypeServiceImpl.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictTypeServiceImpl.java deleted file mode 100644 index 3c54bf8d..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysDictTypeServiceImpl.java +++ /dev/null @@ -1,184 +0,0 @@ -package com.ruoyi.system.service.impl; - -import java.util.List; -import javax.annotation.PostConstruct; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; -import com.ruoyi.common.constant.UserConstants; -import com.ruoyi.common.core.domain.entity.SysDictData; -import com.ruoyi.common.core.domain.entity.SysDictType; -import com.ruoyi.common.exception.CustomException; -import com.ruoyi.common.utils.DictUtils; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.system.mapper.SysDictDataMapper; -import com.ruoyi.system.mapper.SysDictTypeMapper; -import com.ruoyi.system.service.ISysDictTypeService; - -/** - * 字典 业务层处理 - * - * @author ruoyi - */ -@Service -public class SysDictTypeServiceImpl implements ISysDictTypeService { - @Autowired - private SysDictTypeMapper dictTypeMapper; - - @Autowired - private SysDictDataMapper dictDataMapper; - - /** - * 项目启动时,初始化字典到缓存 - */ - @PostConstruct - public void init() { - List dictTypeList = dictTypeMapper.selectDictTypeAll(); - for (SysDictType dictType : dictTypeList) { - List dictDatas = dictDataMapper.selectDictDataByType(dictType.getDictType()); - DictUtils.setDictCache(dictType.getDictType(), dictDatas); - } - } - - /** - * 根据条件分页查询字典类型 - * - * @param dictType 字典类型信息 - * @return 字典类型集合信息 - */ - @Override - public List selectDictTypeList(SysDictType dictType) { - return dictTypeMapper.selectDictTypeList(dictType); - } - - /** - * 根据所有字典类型 - * - * @return 字典类型集合信息 - */ - @Override - public List selectDictTypeAll() { - return dictTypeMapper.selectDictTypeAll(); - } - - /** - * 根据字典类型查询字典数据 - * - * @param dictType 字典类型 - * @return 字典数据集合信息 - */ - @Override - public List selectDictDataByType(String dictType) { - List dictDatas = DictUtils.getDictCache(dictType); - if (StringUtils.isNotEmpty(dictDatas)) { - return dictDatas; - } - dictDatas = dictDataMapper.selectDictDataByType(dictType); - if (StringUtils.isNotEmpty(dictDatas)) { - DictUtils.setDictCache(dictType, dictDatas); - return dictDatas; - } - return null; - } - - /** - * 根据字典类型ID查询信息 - * - * @param dictId 字典类型ID - * @return 字典类型 - */ - @Override - public SysDictType selectDictTypeById(Long dictId) { - return dictTypeMapper.selectDictTypeById(dictId); - } - - /** - * 根据字典类型查询信息 - * - * @param dictType 字典类型 - * @return 字典类型 - */ - @Override - public SysDictType selectDictTypeByType(String dictType) { - return dictTypeMapper.selectDictTypeByType(dictType); - } - - /** - * 批量删除字典类型信息 - * - * @param dictIds 需要删除的字典ID - * @return 结果 - */ - @Override - public int deleteDictTypeByIds(Long[] dictIds) { - for (Long dictId : dictIds) { - SysDictType dictType = selectDictTypeById(dictId); - if (dictDataMapper.countDictDataByType(dictType.getDictType()) > 0) { - throw new CustomException(String.format("%1$s已分配,不能删除", dictType.getDictName())); - } - } - int count = dictTypeMapper.deleteDictTypeByIds(dictIds); - if (count > 0) { - DictUtils.clearDictCache(); - } - return count; - } - - /** - * 清空缓存数据 - */ - @Override - public void clearCache() { - DictUtils.clearDictCache(); - } - - /** - * 新增保存字典类型信息 - * - * @param dictType 字典类型信息 - * @return 结果 - */ - @Override - public int insertDictType(SysDictType dictType) { - int row = dictTypeMapper.insertDictType(dictType); - if (row > 0) { - DictUtils.clearDictCache(); - } - return row; - } - - /** - * 修改保存字典类型信息 - * - * @param dictType 字典类型信息 - * @return 结果 - */ - @Override - @Transactional - public int updateDictType(SysDictType dictType) { - SysDictType oldDict = dictTypeMapper.selectDictTypeById(dictType.getDictId()); - dictDataMapper.updateDictDataType(oldDict.getDictType(), dictType.getDictType()); - int row = dictTypeMapper.updateDictType(dictType); - if (row > 0) { - DictUtils.clearDictCache(); - } - return row; - } - - /** - * 校验字典类型称是否唯一 - * - * @param dict 字典类型 - * @return 结果 - */ - @Override - public String checkDictTypeUnique(SysDictType dict) { - Long dictId = StringUtils.isNull(dict.getDictId()) ? -1L : dict.getDictId(); - SysDictType dictType = dictTypeMapper.checkDictTypeUnique(dict.getDictType()); - if (StringUtils.isNotNull(dictType) && dictType.getDictId().longValue() != dictId.longValue()) { - return UserConstants.NOT_UNIQUE; - } - return UserConstants.UNIQUE; - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysLogininforServiceImpl.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysLogininforServiceImpl.java deleted file mode 100644 index bddfd4aa..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysLogininforServiceImpl.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.ruoyi.system.service.impl; - -import java.util.List; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import com.ruoyi.system.domain.SysLogininfor; -import com.ruoyi.system.mapper.SysLogininforMapper; -import com.ruoyi.system.service.ISysLogininforService; - -/** - * 系统访问日志情况信息 服务层处理 - * - * @author ruoyi - */ -@Service -public class SysLogininforServiceImpl implements ISysLogininforService { - - @Autowired - private SysLogininforMapper logininforMapper; - - /** - * 新增系统登录日志 - * - * @param logininfor 访问日志对象 - */ - @Override - public void insertLogininfor(SysLogininfor logininfor) { - logininforMapper.insertLogininfor(logininfor); - } - - /** - * 查询系统登录日志集合 - * - * @param logininfor 访问日志对象 - * @return 登录记录集合 - */ - @Override - public List selectLogininforList(SysLogininfor logininfor) { - return logininforMapper.selectLogininforList(logininfor); - } - - /** - * 批量删除系统登录日志 - * - * @param infoIds 需要删除的登录日志ID - * @return - */ - @Override - public int deleteLogininforByIds(Long[] infoIds) { - return logininforMapper.deleteLogininforByIds(infoIds); - } - - /** - * 清空系统登录日志 - */ - @Override - public void cleanLogininfor() { - logininforMapper.cleanLogininfor(); - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java deleted file mode 100644 index 5bd219d3..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysMenuServiceImpl.java +++ /dev/null @@ -1,412 +0,0 @@ -package com.ruoyi.system.service.impl; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; -import java.util.Set; -import java.util.stream.Collectors; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import com.ruoyi.common.constant.UserConstants; -import com.ruoyi.common.core.domain.TreeSelect; -import com.ruoyi.common.core.domain.entity.SysMenu; -import com.ruoyi.common.core.domain.entity.SysRole; -import com.ruoyi.common.core.domain.entity.SysUser; -import com.ruoyi.common.utils.SecurityUtils; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.system.domain.vo.MetaVo; -import com.ruoyi.system.domain.vo.RouterVo; -import com.ruoyi.system.mapper.SysMenuMapper; -import com.ruoyi.system.mapper.SysRoleMapper; -import com.ruoyi.system.mapper.SysRoleMenuMapper; -import com.ruoyi.system.service.ISysMenuService; - -/** - * 菜单 业务层处理 - * - * @author ruoyi - */ -@Service -public class SysMenuServiceImpl implements ISysMenuService { - public static final String PREMISSION_STRING = "perms[\"{0}\"]"; - - @Autowired - private SysMenuMapper menuMapper; - - @Autowired - private SysRoleMapper roleMapper; - - @Autowired - private SysRoleMenuMapper roleMenuMapper; - - /** - * 根据用户查询系统菜单列表 - * - * @param userId 用户ID - * @return 菜单列表 - */ - @Override - public List selectMenuList(Long userId) { - return selectMenuList(new SysMenu(), userId); - } - - /** - * 查询系统菜单列表 - * - * @param menu 菜单信息 - * @return 菜单列表 - */ - @Override - public List selectMenuList(SysMenu menu, Long userId) { - List menuList = null; - // 管理员显示所有菜单信息 - if (SysUser.isAdmin(userId)) { - menuList = menuMapper.selectMenuList(menu); - } else { - menu.getParams().put("userId", userId); - menuList = menuMapper.selectMenuListByUserId(menu); - } - return menuList; - } - - /** - * 根据用户ID查询权限 - * - * @param userId 用户ID - * @return 权限列表 - */ - @Override - public Set selectMenuPermsByUserId(Long userId) { - List perms = menuMapper.selectMenuPermsByUserId(userId); - Set permsSet = new HashSet<>(); - for (String perm : perms) { - if (StringUtils.isNotEmpty(perm)) { - permsSet.addAll(Arrays.asList(perm.trim().split(","))); - } - } - return permsSet; - } - - /** - * 根据用户ID查询菜单 - * - * @param userId 用户名称 - * @return 菜单列表 - */ - @Override - public List selectMenuTreeByUserId(Long userId) { - List menus = null; - if (SecurityUtils.isAdmin(userId)) { - menus = menuMapper.selectMenuTreeAll(); - } else { - menus = menuMapper.selectMenuTreeByUserId(userId); - } - return getChildPerms(menus, 0); - } - - /** - * 根据角色ID查询菜单树信息 - * - * @param roleId 角色ID - * @return 选中菜单列表 - */ - @Override - public List selectMenuListByRoleId(Long roleId) { - SysRole role = roleMapper.selectRoleById(roleId); - return menuMapper.selectMenuListByRoleId(roleId, role.isMenuCheckStrictly()); - } - - /** - * 构建前端路由所需要的菜单 - * - * @param menus 菜单列表 - * @return 路由列表 - */ - @Override - public List buildMenus(List menus) { - List routers = new LinkedList(); - for (SysMenu menu : menus) { - RouterVo router = new RouterVo(); - router.setHidden("1".equals(menu.getVisible())); - router.setName(getRouteName(menu)); - router.setPath(getRouterPath(menu)); - router.setComponent(getComponent(menu)); - router.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), StringUtils.equals("1", menu.getIsCache()))); - List cMenus = menu.getChildren(); - if (!cMenus.isEmpty() && cMenus.size() > 0 && UserConstants.TYPE_DIR.equals(menu.getMenuType())) { - router.setAlwaysShow(true); - router.setRedirect("noRedirect"); - router.setChildren(buildMenus(cMenus)); - } else if (isMeunFrame(menu)) { - List childrenList = new ArrayList(); - RouterVo children = new RouterVo(); - children.setPath(menu.getPath()); - children.setComponent(menu.getComponent()); - children.setName(StringUtils.capitalize(menu.getPath())); - children.setMeta(new MetaVo(menu.getMenuName(), menu.getIcon(), StringUtils.equals("1", menu.getIsCache()))); - childrenList.add(children); - router.setChildren(childrenList); - } - routers.add(router); - } - return routers; - } - - /** - * 构建前端所需要树结构 - * - * @param menus 菜单列表 - * @return 树结构列表 - */ - @Override - public List buildMenuTree(List menus) { - List returnList = new ArrayList(); - List tempList = new ArrayList(); - for (SysMenu dept : menus) { - tempList.add(dept.getMenuId()); - } - for (Iterator iterator = menus.iterator(); iterator.hasNext(); ) { - SysMenu menu = (SysMenu) iterator.next(); - // 如果是顶级节点, 遍历该父节点的所有子节点 - if (!tempList.contains(menu.getParentId())) { - recursionFn(menus, menu); - returnList.add(menu); - } - } - if (returnList.isEmpty()) { - returnList = menus; - } - return returnList; - } - - /** - * 构建前端所需要下拉树结构 - * - * @param menus 菜单列表 - * @return 下拉树结构列表 - */ - @Override - public List buildMenuTreeSelect(List menus) { - List menuTrees = buildMenuTree(menus); - return menuTrees.stream().map(TreeSelect::new).collect(Collectors.toList()); - } - - /** - * 根据菜单ID查询信息 - * - * @param menuId 菜单ID - * @return 菜单信息 - */ - @Override - public SysMenu selectMenuById(Long menuId) { - return menuMapper.selectMenuById(menuId); - } - - /** - * 是否存在菜单子节点 - * - * @param menuId 菜单ID - * @return 结果 - */ - @Override - public boolean hasChildByMenuId(Long menuId) { - int result = menuMapper.hasChildByMenuId(menuId); - return result > 0 ? true : false; - } - - /** - * 查询菜单使用数量 - * - * @param menuId 菜单ID - * @return 结果 - */ - @Override - public boolean checkMenuExistRole(Long menuId) { - int result = roleMenuMapper.checkMenuExistRole(menuId); - return result > 0 ? true : false; - } - - /** - * 新增保存菜单信息 - * - * @param menu 菜单信息 - * @return 结果 - */ - @Override - public int insertMenu(SysMenu menu) { - return menuMapper.insertMenu(menu); - } - - /** - * 修改保存菜单信息 - * - * @param menu 菜单信息 - * @return 结果 - */ - @Override - public int updateMenu(SysMenu menu) { - return menuMapper.updateMenu(menu); - } - - /** - * 删除菜单管理信息 - * - * @param menuId 菜单ID - * @return 结果 - */ - @Override - public int deleteMenuById(Long menuId) { - return menuMapper.deleteMenuById(menuId); - } - - /** - * 校验菜单名称是否唯一 - * - * @param menu 菜单信息 - * @return 结果 - */ - @Override - public String checkMenuNameUnique(SysMenu menu) { - Long menuId = StringUtils.isNull(menu.getMenuId()) ? -1L : menu.getMenuId(); - SysMenu info = menuMapper.checkMenuNameUnique(menu.getMenuName(), menu.getParentId()); - if (StringUtils.isNotNull(info) && info.getMenuId().longValue() != menuId.longValue()) { - return UserConstants.NOT_UNIQUE; - } - return UserConstants.UNIQUE; - } - - /** - * 获取路由名称 - * - * @param menu 菜单信息 - * @return 路由名称 - */ - public String getRouteName(SysMenu menu) { - String routerName = StringUtils.capitalize(menu.getPath()); - // 非外链并且是一级目录(类型为目录) - if (isMeunFrame(menu)) { - routerName = StringUtils.EMPTY; - } - return routerName; - } - - /** - * 获取路由地址 - * - * @param menu 菜单信息 - * @return 路由地址 - */ - public String getRouterPath(SysMenu menu) { - String routerPath = menu.getPath(); - // 非外链并且是一级目录(类型为目录) - if (0 == menu.getParentId().intValue() && UserConstants.TYPE_DIR.equals(menu.getMenuType()) - && UserConstants.NO_FRAME.equals(menu.getIsFrame())) { - routerPath = "/" + menu.getPath(); - } - // 非外链并且是一级目录(类型为菜单) - else if (isMeunFrame(menu)) { - routerPath = "/"; - } - return routerPath; - } - - /** - * 获取组件信息 - * - * @param menu 菜单信息 - * @return 组件信息 - */ - public String getComponent(SysMenu menu) { - String component = UserConstants.LAYOUT; - if (StringUtils.isNotEmpty(menu.getComponent()) && !isMeunFrame(menu)) { - component = menu.getComponent(); - } else if (StringUtils.isEmpty(menu.getComponent()) && isParentView(menu)) { - component = UserConstants.PARENT_VIEW; - } - return component; - } - - /** - * 是否为菜单内部跳转 - * - * @param menu 菜单信息 - * @return 结果 - */ - public boolean isMeunFrame(SysMenu menu) { - return menu.getParentId().intValue() == 0 && UserConstants.TYPE_MENU.equals(menu.getMenuType()) - && menu.getIsFrame().equals(UserConstants.NO_FRAME); - } - - /** - * 是否为parent_view组件 - * - * @param menu 菜单信息 - * @return 结果 - */ - public boolean isParentView(SysMenu menu) { - return menu.getParentId().intValue() != 0 && UserConstants.TYPE_DIR.equals(menu.getMenuType()); - } - - /** - * 根据父节点的ID获取所有子节点 - * - * @param list 分类表 - * @param parentId 传入的父节点ID - * @return String - */ - public List getChildPerms(List list, int parentId) { - List returnList = new ArrayList(); - for (Iterator iterator = list.iterator(); iterator.hasNext(); ) { - SysMenu t = (SysMenu) iterator.next(); - // 一、根据传入的某个父节点ID,遍历该父节点的所有子节点 - if (t.getParentId() == parentId) { - recursionFn(list, t); - returnList.add(t); - } - } - return returnList; - } - - /** - * 递归列表 - * - * @param list - * @param t - */ - private void recursionFn(List list, SysMenu t) { - // 得到子节点列表 - List childList = getChildList(list, t); - t.setChildren(childList); - for (SysMenu tChild : childList) { - if (hasChild(list, tChild)) { - recursionFn(list, tChild); - } - } - } - - /** - * 得到子节点列表 - */ - private List getChildList(List list, SysMenu t) { - List tlist = new ArrayList(); - Iterator it = list.iterator(); - while (it.hasNext()) { - SysMenu n = (SysMenu) it.next(); - if (n.getParentId().longValue() == t.getMenuId().longValue()) { - tlist.add(n); - } - } - return tlist; - } - - /** - * 判断是否有子节点 - */ - private boolean hasChild(List list, SysMenu t) { - return getChildList(list, t).size() > 0 ? true : false; - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysNoticeServiceImpl.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysNoticeServiceImpl.java deleted file mode 100644 index bdd94ac3..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysNoticeServiceImpl.java +++ /dev/null @@ -1,86 +0,0 @@ -package com.ruoyi.system.service.impl; - -import java.util.List; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import com.ruoyi.system.domain.SysNotice; -import com.ruoyi.system.mapper.SysNoticeMapper; -import com.ruoyi.system.service.ISysNoticeService; - -/** - * 公告 服务层实现 - * - * @author ruoyi - */ -@Service -public class SysNoticeServiceImpl implements ISysNoticeService { - @Autowired - private SysNoticeMapper noticeMapper; - - /** - * 查询公告信息 - * - * @param noticeId 公告ID - * @return 公告信息 - */ - @Override - public SysNotice selectNoticeById(Long noticeId) { - return noticeMapper.selectNoticeById(noticeId); - } - - /** - * 查询公告列表 - * - * @param notice 公告信息 - * @return 公告集合 - */ - @Override - public List selectNoticeList(SysNotice notice) { - return noticeMapper.selectNoticeList(notice); - } - - /** - * 新增公告 - * - * @param notice 公告信息 - * @return 结果 - */ - @Override - public int insertNotice(SysNotice notice) { - return noticeMapper.insertNotice(notice); - } - - /** - * 修改公告 - * - * @param notice 公告信息 - * @return 结果 - */ - @Override - public int updateNotice(SysNotice notice) { - return noticeMapper.updateNotice(notice); - } - - /** - * 删除公告对象 - * - * @param noticeId 公告ID - * @return 结果 - */ - @Override - public int deleteNoticeById(Long noticeId) { - return noticeMapper.deleteNoticeById(noticeId); - } - - /** - * 批量删除公告信息 - * - * @param noticeIds 需要删除的公告ID - * @return 结果 - */ - @Override - public int deleteNoticeByIds(Long[] noticeIds) { - return noticeMapper.deleteNoticeByIds(noticeIds); - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOperLogServiceImpl.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOperLogServiceImpl.java deleted file mode 100644 index 0dc2ec77..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysOperLogServiceImpl.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.ruoyi.system.service.impl; - -import java.util.List; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import com.ruoyi.system.domain.SysOperLog; -import com.ruoyi.system.mapper.SysOperLogMapper; -import com.ruoyi.system.service.ISysOperLogService; - -/** - * 操作日志 服务层处理 - * - * @author ruoyi - */ -@Service -public class SysOperLogServiceImpl implements ISysOperLogService { - @Autowired - private SysOperLogMapper operLogMapper; - - /** - * 新增操作日志 - * - * @param operLog 操作日志对象 - */ - @Override - public void insertOperlog(SysOperLog operLog) { - operLogMapper.insertOperlog(operLog); - } - - /** - * 查询系统操作日志集合 - * - * @param operLog 操作日志对象 - * @return 操作日志集合 - */ - @Override - public List selectOperLogList(SysOperLog operLog) { - return operLogMapper.selectOperLogList(operLog); - } - - /** - * 批量删除系统操作日志 - * - * @param operIds 需要删除的操作日志ID - * @return 结果 - */ - @Override - public int deleteOperLogByIds(Long[] operIds) { - return operLogMapper.deleteOperLogByIds(operIds); - } - - /** - * 查询操作日志详细 - * - * @param operId 操作ID - * @return 操作日志对象 - */ - @Override - public SysOperLog selectOperLogById(Long operId) { - return operLogMapper.selectOperLogById(operId); - } - - /** - * 清空操作日志 - */ - @Override - public void cleanOperLog() { - operLogMapper.cleanOperLog(); - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysPostServiceImpl.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysPostServiceImpl.java deleted file mode 100644 index 9e93a8f9..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysPostServiceImpl.java +++ /dev/null @@ -1,164 +0,0 @@ -package com.ruoyi.system.service.impl; - -import java.util.List; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import com.ruoyi.common.constant.UserConstants; -import com.ruoyi.common.exception.CustomException; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.system.domain.SysPost; -import com.ruoyi.system.mapper.SysPostMapper; -import com.ruoyi.system.mapper.SysUserPostMapper; -import com.ruoyi.system.service.ISysPostService; - -/** - * 岗位信息 服务层处理 - * - * @author ruoyi - */ -@Service -public class SysPostServiceImpl implements ISysPostService { - @Autowired - private SysPostMapper postMapper; - - @Autowired - private SysUserPostMapper userPostMapper; - - /** - * 查询岗位信息集合 - * - * @param post 岗位信息 - * @return 岗位信息集合 - */ - @Override - public List selectPostList(SysPost post) { - return postMapper.selectPostList(post); - } - - /** - * 查询所有岗位 - * - * @return 岗位列表 - */ - @Override - public List selectPostAll() { - return postMapper.selectPostAll(); - } - - /** - * 通过岗位ID查询岗位信息 - * - * @param postId 岗位ID - * @return 角色对象信息 - */ - @Override - public SysPost selectPostById(Long postId) { - return postMapper.selectPostById(postId); - } - - /** - * 根据用户ID获取岗位选择框列表 - * - * @param userId 用户ID - * @return 选中岗位ID列表 - */ - @Override - public List selectPostListByUserId(Long userId) { - return postMapper.selectPostListByUserId(userId); - } - - /** - * 校验岗位名称是否唯一 - * - * @param post 岗位信息 - * @return 结果 - */ - @Override - public String checkPostNameUnique(SysPost post) { - Long postId = StringUtils.isNull(post.getPostId()) ? -1L : post.getPostId(); - SysPost info = postMapper.checkPostNameUnique(post.getPostName()); - if (StringUtils.isNotNull(info) && info.getPostId().longValue() != postId.longValue()) { - return UserConstants.NOT_UNIQUE; - } - return UserConstants.UNIQUE; - } - - /** - * 校验岗位编码是否唯一 - * - * @param post 岗位信息 - * @return 结果 - */ - @Override - public String checkPostCodeUnique(SysPost post) { - Long postId = StringUtils.isNull(post.getPostId()) ? -1L : post.getPostId(); - SysPost info = postMapper.checkPostCodeUnique(post.getPostCode()); - if (StringUtils.isNotNull(info) && info.getPostId().longValue() != postId.longValue()) { - return UserConstants.NOT_UNIQUE; - } - return UserConstants.UNIQUE; - } - - /** - * 通过岗位ID查询岗位使用数量 - * - * @param postId 岗位ID - * @return 结果 - */ - @Override - public int countUserPostById(Long postId) { - return userPostMapper.countUserPostById(postId); - } - - /** - * 删除岗位信息 - * - * @param postId 岗位ID - * @return 结果 - */ - @Override - public int deletePostById(Long postId) { - return postMapper.deletePostById(postId); - } - - /** - * 批量删除岗位信息 - * - * @param postIds 需要删除的岗位ID - * @return 结果 - * @throws Exception 异常 - */ - @Override - public int deletePostByIds(Long[] postIds) { - for (Long postId : postIds) { - SysPost post = selectPostById(postId); - if (countUserPostById(postId) > 0) { - throw new CustomException(String.format("%1$s已分配,不能删除", post.getPostName())); - } - } - return postMapper.deletePostByIds(postIds); - } - - /** - * 新增保存岗位信息 - * - * @param post 岗位信息 - * @return 结果 - */ - @Override - public int insertPost(SysPost post) { - return postMapper.insertPost(post); - } - - /** - * 修改保存岗位信息 - * - * @param post 岗位信息 - * @return 结果 - */ - @Override - public int updatePost(SysPost post) { - return postMapper.updatePost(post); - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java deleted file mode 100644 index 657d1829..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java +++ /dev/null @@ -1,300 +0,0 @@ -package com.ruoyi.system.service.impl; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; -import com.ruoyi.common.annotation.DataScope; -import com.ruoyi.common.constant.UserConstants; -import com.ruoyi.common.core.domain.entity.SysRole; -import com.ruoyi.common.exception.CustomException; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.common.utils.spring.SpringUtils; -import com.ruoyi.system.domain.SysRoleDept; -import com.ruoyi.system.domain.SysRoleMenu; -import com.ruoyi.system.mapper.SysRoleDeptMapper; -import com.ruoyi.system.mapper.SysRoleMapper; -import com.ruoyi.system.mapper.SysRoleMenuMapper; -import com.ruoyi.system.mapper.SysUserRoleMapper; -import com.ruoyi.system.service.ISysRoleService; - -/** - * 角色 业务层处理 - * - * @author ruoyi - */ -@Service -public class SysRoleServiceImpl implements ISysRoleService { - @Autowired - private SysRoleMapper roleMapper; - - @Autowired - private SysRoleMenuMapper roleMenuMapper; - - @Autowired - private SysUserRoleMapper userRoleMapper; - - @Autowired - private SysRoleDeptMapper roleDeptMapper; - - /** - * 根据条件分页查询角色数据 - * - * @param role 角色信息 - * @return 角色数据集合信息 - */ - @Override - @DataScope(deptAlias = "d") - public List selectRoleList(SysRole role) { - return roleMapper.selectRoleList(role); - } - - /** - * 根据用户ID查询权限 - * - * @param userId 用户ID - * @return 权限列表 - */ - @Override - public Set selectRolePermissionByUserId(Long userId) { - List perms = roleMapper.selectRolePermissionByUserId(userId); - Set permsSet = new HashSet<>(); - for (SysRole perm : perms) { - if (StringUtils.isNotNull(perm)) { - permsSet.addAll(Arrays.asList(perm.getRoleKey().trim().split(","))); - } - } - return permsSet; - } - - /** - * 查询所有角色 - * - * @return 角色列表 - */ - @Override - public List selectRoleAll() { - return SpringUtils.getAopProxy(this).selectRoleList(new SysRole()); - } - - /** - * 根据用户ID获取角色选择框列表 - * - * @param userId 用户ID - * @return 选中角色ID列表 - */ - @Override - public List selectRoleListByUserId(Long userId) { - return roleMapper.selectRoleListByUserId(userId); - } - - /** - * 通过角色ID查询角色 - * - * @param roleId 角色ID - * @return 角色对象信息 - */ - @Override - public SysRole selectRoleById(Long roleId) { - return roleMapper.selectRoleById(roleId); - } - - /** - * 校验角色名称是否唯一 - * - * @param role 角色信息 - * @return 结果 - */ - @Override - public String checkRoleNameUnique(SysRole role) { - Long roleId = StringUtils.isNull(role.getRoleId()) ? -1L : role.getRoleId(); - SysRole info = roleMapper.checkRoleNameUnique(role.getRoleName()); - if (StringUtils.isNotNull(info) && info.getRoleId().longValue() != roleId.longValue()) { - return UserConstants.NOT_UNIQUE; - } - return UserConstants.UNIQUE; - } - - /** - * 校验角色权限是否唯一 - * - * @param role 角色信息 - * @return 结果 - */ - @Override - public String checkRoleKeyUnique(SysRole role) { - Long roleId = StringUtils.isNull(role.getRoleId()) ? -1L : role.getRoleId(); - SysRole info = roleMapper.checkRoleKeyUnique(role.getRoleKey()); - if (StringUtils.isNotNull(info) && info.getRoleId().longValue() != roleId.longValue()) { - return UserConstants.NOT_UNIQUE; - } - return UserConstants.UNIQUE; - } - - /** - * 校验角色是否允许操作 - * - * @param role 角色信息 - */ - @Override - public void checkRoleAllowed(SysRole role) { - if (StringUtils.isNotNull(role.getRoleId()) && role.isAdmin()) { - throw new CustomException("不允许操作超级管理员角色"); - } - } - - /** - * 通过角色ID查询角色使用数量 - * - * @param roleId 角色ID - * @return 结果 - */ - @Override - public int countUserRoleByRoleId(Long roleId) { - return userRoleMapper.countUserRoleByRoleId(roleId); - } - - /** - * 新增保存角色信息 - * - * @param role 角色信息 - * @return 结果 - */ - @Override - @Transactional - public int insertRole(SysRole role) { - // 新增角色信息 - roleMapper.insertRole(role); - return insertRoleMenu(role); - } - - /** - * 修改保存角色信息 - * - * @param role 角色信息 - * @return 结果 - */ - @Override - @Transactional - public int updateRole(SysRole role) { - // 修改角色信息 - roleMapper.updateRole(role); - // 删除角色与菜单关联 - roleMenuMapper.deleteRoleMenuByRoleId(role.getRoleId()); - return insertRoleMenu(role); - } - - /** - * 修改角色状态 - * - * @param role 角色信息 - * @return 结果 - */ - @Override - public int updateRoleStatus(SysRole role) { - return roleMapper.updateRole(role); - } - - /** - * 修改数据权限信息 - * - * @param role 角色信息 - * @return 结果 - */ - @Override - @Transactional - public int authDataScope(SysRole role) { - // 修改角色信息 - roleMapper.updateRole(role); - // 删除角色与部门关联 - roleDeptMapper.deleteRoleDeptByRoleId(role.getRoleId()); - // 新增角色和部门信息(数据权限) - return insertRoleDept(role); - } - - /** - * 新增角色菜单信息 - * - * @param role 角色对象 - */ - public int insertRoleMenu(SysRole role) { - int rows = 1; - // 新增用户与角色管理 - List list = new ArrayList(); - for (Long menuId : role.getMenuIds()) { - SysRoleMenu rm = new SysRoleMenu(); - rm.setRoleId(role.getRoleId()); - rm.setMenuId(menuId); - list.add(rm); - } - if (list.size() > 0) { - rows = roleMenuMapper.batchRoleMenu(list); - } - return rows; - } - - /** - * 新增角色部门信息(数据权限) - * - * @param role 角色对象 - */ - public int insertRoleDept(SysRole role) { - int rows = 1; - // 新增角色与部门(数据权限)管理 - List list = new ArrayList(); - for (Long deptId : role.getDeptIds()) { - SysRoleDept rd = new SysRoleDept(); - rd.setRoleId(role.getRoleId()); - rd.setDeptId(deptId); - list.add(rd); - } - if (list.size() > 0) { - rows = roleDeptMapper.batchRoleDept(list); - } - return rows; - } - - /** - * 通过角色ID删除角色 - * - * @param roleId 角色ID - * @return 结果 - */ - @Override - @Transactional - public int deleteRoleById(Long roleId) { - // 删除角色与菜单关联 - roleMenuMapper.deleteRoleMenuByRoleId(roleId); - // 删除角色与部门关联 - roleDeptMapper.deleteRoleDeptByRoleId(roleId); - return roleMapper.deleteRoleById(roleId); - } - - /** - * 批量删除角色信息 - * - * @param roleIds 需要删除的角色ID - * @return 结果 - */ - @Override - @Transactional - public int deleteRoleByIds(Long[] roleIds) { - for (Long roleId : roleIds) { - checkRoleAllowed(new SysRole(roleId)); - SysRole role = selectRoleById(roleId); - if (countUserRoleByRoleId(roleId) > 0) { - throw new CustomException(String.format("%1$s已分配,不能删除", role.getRoleName())); - } - } - // 删除角色与菜单关联 - roleMenuMapper.deleteRoleMenu(roleIds); - // 删除角色与部门关联 - roleDeptMapper.deleteRoleDept(roleIds); - return roleMapper.deleteRoleByIds(roleIds); - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserOnlineServiceImpl.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserOnlineServiceImpl.java deleted file mode 100644 index f0a29982..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserOnlineServiceImpl.java +++ /dev/null @@ -1,86 +0,0 @@ -package com.ruoyi.system.service.impl; - -import org.springframework.stereotype.Service; -import com.ruoyi.common.core.domain.model.LoginUser; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.system.domain.SysUserOnline; -import com.ruoyi.system.service.ISysUserOnlineService; - -/** - * 在线用户 服务层处理 - * - * @author ruoyi - */ -@Service -public class SysUserOnlineServiceImpl implements ISysUserOnlineService { - /** - * 通过登录地址查询信息 - * - * @param ipaddr 登录地址 - * @param user 用户信息 - * @return 在线用户信息 - */ - @Override - public SysUserOnline selectOnlineByIpaddr(String ipaddr, LoginUser user) { - if (StringUtils.equals(ipaddr, user.getIpaddr())) { - return loginUserToUserOnline(user); - } - return null; - } - - /** - * 通过用户名称查询信息 - * - * @param userName 用户名称 - * @param user 用户信息 - * @return 在线用户信息 - */ - @Override - public SysUserOnline selectOnlineByUserName(String userName, LoginUser user) { - if (StringUtils.equals(userName, user.getUsername())) { - return loginUserToUserOnline(user); - } - return null; - } - - /** - * 通过登录地址/用户名称查询信息 - * - * @param ipaddr 登录地址 - * @param userName 用户名称 - * @param user 用户信息 - * @return 在线用户信息 - */ - @Override - public SysUserOnline selectOnlineByInfo(String ipaddr, String userName, LoginUser user) { - if (StringUtils.equals(ipaddr, user.getIpaddr()) && StringUtils.equals(userName, user.getUsername())) { - return loginUserToUserOnline(user); - } - return null; - } - - /** - * 设置在线用户信息 - * - * @param user 用户信息 - * @return 在线用户 - */ - @Override - public SysUserOnline loginUserToUserOnline(LoginUser user) { - if (StringUtils.isNull(user) || StringUtils.isNull(user.getUser())) { - return null; - } - SysUserOnline sysUserOnline = new SysUserOnline(); - sysUserOnline.setTokenId(user.getToken()); - sysUserOnline.setUserName(user.getUsername()); - sysUserOnline.setIpaddr(user.getIpaddr()); - sysUserOnline.setLoginLocation(user.getLoginLocation()); - sysUserOnline.setBrowser(user.getBrowser()); - sysUserOnline.setOs(user.getOs()); - sysUserOnline.setLoginTime(user.getLoginTime()); - if (StringUtils.isNotNull(user.getUser().getDept())) { - sysUserOnline.setDeptName(user.getUser().getDept().getDeptName()); - } - return sysUserOnline; - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java deleted file mode 100644 index 9d9697df..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java +++ /dev/null @@ -1,419 +0,0 @@ -package com.ruoyi.system.service.impl; - -import java.util.ArrayList; -import java.util.List; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; -import com.ruoyi.common.annotation.DataScope; -import com.ruoyi.common.constant.UserConstants; -import com.ruoyi.common.core.domain.entity.SysRole; -import com.ruoyi.common.core.domain.entity.SysUser; -import com.ruoyi.common.exception.CustomException; -import com.ruoyi.common.utils.SecurityUtils; -import com.ruoyi.common.utils.StringUtils; -import com.ruoyi.system.domain.SysPost; -import com.ruoyi.system.domain.SysUserPost; -import com.ruoyi.system.domain.SysUserRole; -import com.ruoyi.system.mapper.SysPostMapper; -import com.ruoyi.system.mapper.SysRoleMapper; -import com.ruoyi.system.mapper.SysUserMapper; -import com.ruoyi.system.mapper.SysUserPostMapper; -import com.ruoyi.system.mapper.SysUserRoleMapper; -import com.ruoyi.system.service.ISysConfigService; -import com.ruoyi.system.service.ISysUserService; - -/** - * 用户 业务层处理 - * - * @author ruoyi - */ -@Service -public class SysUserServiceImpl implements ISysUserService { - private static final Logger log = LoggerFactory.getLogger(SysUserServiceImpl.class); - - @Autowired - private SysUserMapper userMapper; - - @Autowired - private SysRoleMapper roleMapper; - - @Autowired - private SysPostMapper postMapper; - - @Autowired - private SysUserRoleMapper userRoleMapper; - - @Autowired - private SysUserPostMapper userPostMapper; - - @Autowired - private ISysConfigService configService; - - /** - * 根据条件分页查询用户列表 - * - * @param user 用户信息 - * @return 用户信息集合信息 - */ - @Override - @DataScope(deptAlias = "d", userAlias = "u") - public List selectUserList(SysUser user) { - return userMapper.selectUserList(user); - } - - /** - * 通过用户名查询用户 - * - * @param userName 用户名 - * @return 用户对象信息 - */ - @Override - public SysUser selectUserByUserName(String userName) { - return userMapper.selectUserByUserName(userName); - } - - @Override - public SysUser selectUserByOpenId(String openId) { - return userMapper.selectUserByOpenId(openId); - } - - /** - * 通过用户ID查询用户 - * - * @param userId 用户ID - * @return 用户对象信息 - */ - @Override - public SysUser selectUserById(Long userId) { - return userMapper.selectUserById(userId); - } - - /** - * 查询用户所属角色组 - * - * @param userName 用户名 - * @return 结果 - */ - @Override - public String selectUserRoleGroup(String userName) { - List list = roleMapper.selectRolesByUserName(userName); - StringBuffer idsStr = new StringBuffer(); - for (SysRole role : list) { - idsStr.append(role.getRoleName()).append(","); - } - if (StringUtils.isNotEmpty(idsStr.toString())) { - return idsStr.substring(0, idsStr.length() - 1); - } - return idsStr.toString(); - } - - /** - * 查询用户所属岗位组 - * - * @param userName 用户名 - * @return 结果 - */ - @Override - public String selectUserPostGroup(String userName) { - List list = postMapper.selectPostsByUserName(userName); - StringBuffer idsStr = new StringBuffer(); - for (SysPost post : list) { - idsStr.append(post.getPostName()).append(","); - } - if (StringUtils.isNotEmpty(idsStr.toString())) { - return idsStr.substring(0, idsStr.length() - 1); - } - return idsStr.toString(); - } - - /** - * 校验用户名称是否唯一 - * - * @param userName 用户名称 - * @return 结果 - */ - @Override - public String checkUserNameUnique(String userName) { - int count = userMapper.checkUserNameUnique(userName); - if (count > 0) { - return UserConstants.NOT_UNIQUE; - } - return UserConstants.UNIQUE; - } - - /** - * 校验用户名称是否唯一 - * - * @param user 用户信息 - * @return - */ - @Override - public String checkPhoneUnique(SysUser user) { - Long userId = StringUtils.isNull(user.getUserId()) ? -1L : user.getUserId(); - SysUser info = userMapper.checkPhoneUnique(user.getPhonenumber()); - if (StringUtils.isNotNull(info) && info.getUserId().longValue() != userId.longValue()) { - return UserConstants.NOT_UNIQUE; - } - return UserConstants.UNIQUE; - } - - /** - * 校验email是否唯一 - * - * @param user 用户信息 - * @return - */ - @Override - public String checkEmailUnique(SysUser user) { - Long userId = StringUtils.isNull(user.getUserId()) ? -1L : user.getUserId(); - SysUser info = userMapper.checkEmailUnique(user.getEmail()); - if (StringUtils.isNotNull(info) && info.getUserId().longValue() != userId.longValue()) { - return UserConstants.NOT_UNIQUE; - } - return UserConstants.UNIQUE; - } - - /** - * 校验用户是否允许操作 - * - * @param user 用户信息 - */ - @Override - public void checkUserAllowed(SysUser user) { - if (StringUtils.isNotNull(user.getUserId()) && user.isAdmin()) { - throw new CustomException("不允许操作超级管理员用户"); - } - } - - /** - * 新增保存用户信息 - * - * @param user 用户信息 - * @return 结果 - */ - @Override - @Transactional - public int insertUser(SysUser user) { - // 新增用户信息 - int rows = userMapper.insertUser(user); - // 新增用户岗位关联 - insertUserPost(user); - // 新增用户与角色管理 - insertUserRole(user); - return rows; - } - - /** - * 修改保存用户信息 - * - * @param user 用户信息 - * @return 结果 - */ - @Override - @Transactional - public int updateUser(SysUser user) { - Long userId = user.getUserId(); - // 删除用户与角色关联 - userRoleMapper.deleteUserRoleByUserId(userId); - // 新增用户与角色管理 - insertUserRole(user); - // 删除用户与岗位关联 - userPostMapper.deleteUserPostByUserId(userId); - // 新增用户与岗位管理 - insertUserPost(user); - return userMapper.updateUser(user); - } - - /** - * 修改用户状态 - * - * @param user 用户信息 - * @return 结果 - */ - @Override - public int updateUserStatus(SysUser user) { - return userMapper.updateUser(user); - } - - /** - * 修改用户基本信息 - * - * @param user 用户信息 - * @return 结果 - */ - @Override - public int updateUserProfile(SysUser user) { - return userMapper.updateUser(user); - } - - /** - * 修改用户头像 - * - * @param userName 用户名 - * @param avatar 头像地址 - * @return 结果 - */ - @Override - public boolean updateUserAvatar(String userName, String avatar) { - return userMapper.updateUserAvatar(userName, avatar) > 0; - } - - /** - * 重置用户密码 - * - * @param user 用户信息 - * @return 结果 - */ - @Override - public int resetPwd(SysUser user) { - return userMapper.updateUser(user); - } - - /** - * 重置用户密码 - * - * @param userName 用户名 - * @param password 密码 - * @return 结果 - */ - @Override - public int resetUserPwd(String userName, String password) { - return userMapper.resetUserPwd(userName, password); - } - - /** - * 新增用户角色信息 - * - * @param user 用户对象 - */ - public void insertUserRole(SysUser user) { - Long[] roles = user.getRoleIds(); - if (StringUtils.isNotNull(roles)) { - // 新增用户与角色管理 - List list = new ArrayList(); - for (Long roleId : roles) { - SysUserRole ur = new SysUserRole(); - ur.setUserId(user.getUserId()); - ur.setRoleId(roleId); - list.add(ur); - } - if (list.size() > 0) { - userRoleMapper.batchUserRole(list); - } - } - } - - /** - * 新增用户岗位信息 - * - * @param user 用户对象 - */ - public void insertUserPost(SysUser user) { - Long[] posts = user.getPostIds(); - if (StringUtils.isNotNull(posts)) { - // 新增用户与岗位管理 - List list = new ArrayList(); - for (Long postId : posts) { - SysUserPost up = new SysUserPost(); - up.setUserId(user.getUserId()); - up.setPostId(postId); - list.add(up); - } - if (list.size() > 0) { - userPostMapper.batchUserPost(list); - } - } - } - - /** - * 通过用户ID删除用户 - * - * @param userId 用户ID - * @return 结果 - */ - @Override - @Transactional - public int deleteUserById(Long userId) { - // 删除用户与角色关联 - userRoleMapper.deleteUserRoleByUserId(userId); - // 删除用户与岗位表 - userPostMapper.deleteUserPostByUserId(userId); - return userMapper.deleteUserById(userId); - } - - /** - * 批量删除用户信息 - * - * @param userIds 需要删除的用户ID - * @return 结果 - */ - @Override - @Transactional - public int deleteUserByIds(Long[] userIds) { - for (Long userId : userIds) { - checkUserAllowed(new SysUser(userId)); - } - // 删除用户与角色关联 - userRoleMapper.deleteUserRole(userIds); - // 删除用户与岗位关联 - userPostMapper.deleteUserPost(userIds); - return userMapper.deleteUserByIds(userIds); - } - - /** - * 导入用户数据 - * - * @param userList 用户数据列表 - * @param isUpdateSupport 是否更新支持,如果已存在,则进行更新数据 - * @param operName 操作用户 - * @return 结果 - */ - @Override - public String importUser(List userList, Boolean isUpdateSupport, String operName) { - if (StringUtils.isNull(userList) || userList.size() == 0) { - throw new CustomException("导入用户数据不能为空!"); - } - int successNum = 0; - int failureNum = 0; - StringBuilder successMsg = new StringBuilder(); - StringBuilder failureMsg = new StringBuilder(); - String password = configService.selectConfigByKey("sys.user.initPassword"); - for (SysUser user : userList) { - try { - // 验证是否存在这个用户 - SysUser u = userMapper.selectUserByUserName(user.getUserName()); - if (StringUtils.isNull(u)) { - user.setPassword(SecurityUtils.encryptPassword(password)); - user.setCreateBy(operName); - this.insertUser(user); - successNum++; - successMsg.append("
" + successNum + "、账号 " + user.getUserName() + " 导入成功"); - } else if (isUpdateSupport) { - user.setUpdateBy(operName); - this.updateUser(user); - successNum++; - successMsg.append("
" + successNum + "、账号 " + user.getUserName() + " 更新成功"); - } else { - failureNum++; - failureMsg.append("
" + failureNum + "、账号 " + user.getUserName() + " 已存在"); - } - } catch (Exception e) { - failureNum++; - String msg = "
" + failureNum + "、账号 " + user.getUserName() + " 导入失败:"; - failureMsg.append(msg + e.getMessage()); - log.error(msg, e); - } - } - if (failureNum > 0) { - failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:"); - throw new CustomException(failureMsg.toString()); - } else { - successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:"); - } - return successMsg.toString(); - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TUserAccountInfoServiceImpl.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TUserAccountInfoServiceImpl.java deleted file mode 100644 index ac820062..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TUserAccountInfoServiceImpl.java +++ /dev/null @@ -1,87 +0,0 @@ -package com.ruoyi.system.service.impl; - -import java.util.List; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import com.ruoyi.system.mapper.TUserAccountInfoMapper; -import com.ruoyi.system.domain.TUserAccountInfo; -import com.ruoyi.system.service.ITUserAccountInfoService; - -/** - * 小程序用户Service业务层处理 - * - * @author wxy - * @date 2021-08-26 - */ -@Service -public class TUserAccountInfoServiceImpl implements ITUserAccountInfoService { - @Autowired - private TUserAccountInfoMapper tUserAccountInfoMapper; - - /** - * 查询小程序用户 - * - * @param id 小程序用户ID - * @return 小程序用户 - */ - @Override - public TUserAccountInfo selectTUserAccountInfoById(Long id) { - return tUserAccountInfoMapper.selectTUserAccountInfoById(id); - } - - /** - * 查询小程序用户列表 - * - * @param tUserAccountInfo 小程序用户 - * @return 小程序用户 - */ - @Override - public List selectTUserAccountInfoList(TUserAccountInfo tUserAccountInfo) { - return tUserAccountInfoMapper.selectTUserAccountInfoList(tUserAccountInfo); - } - - /** - * 新增小程序用户 - * - * @param tUserAccountInfo 小程序用户 - * @return 结果 - */ - @Override - public int insertTUserAccountInfo(TUserAccountInfo tUserAccountInfo) { - return tUserAccountInfoMapper.insertTUserAccountInfo(tUserAccountInfo); - } - - /** - * 修改小程序用户 - * - * @param tUserAccountInfo 小程序用户 - * @return 结果 - */ - @Override - public int updateTUserAccountInfo(TUserAccountInfo tUserAccountInfo) { - return tUserAccountInfoMapper.updateTUserAccountInfo(tUserAccountInfo); - } - - /** - * 批量删除小程序用户 - * - * @param ids 需要删除的小程序用户ID - * @return 结果 - */ - @Override - public int deleteTUserAccountInfoByIds(Long[] ids) { - return tUserAccountInfoMapper.deleteTUserAccountInfoByIds(ids); - } - - /** - * 删除小程序用户信息 - * - * @param id 小程序用户ID - * @return 结果 - */ - @Override - public int deleteTUserAccountInfoById(Long id) { - return tUserAccountInfoMapper.deleteTUserAccountInfoById(id); - } -} diff --git a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TUserLoginLogServiceImpl.java b/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TUserLoginLogServiceImpl.java deleted file mode 100644 index 83e7c1e5..00000000 --- a/spring-boot/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TUserLoginLogServiceImpl.java +++ /dev/null @@ -1,87 +0,0 @@ -package com.ruoyi.system.service.impl; - -import java.util.List; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import com.ruoyi.system.mapper.TUserLoginLogMapper; -import com.ruoyi.system.domain.TUserLoginLog; -import com.ruoyi.system.service.ITUserLoginLogService; - -/** - * 【请填写功能名称】Service业务层处理 - * - * @author wxy - * @date 2021-08-26 - */ -@Service -public class TUserLoginLogServiceImpl implements ITUserLoginLogService { - @Autowired - private TUserLoginLogMapper tUserLoginLogMapper; - - /** - * 查询【请填写功能名称】 - * - * @param id 【请填写功能名称】ID - * @return 【请填写功能名称】 - */ - @Override - public TUserLoginLog selectTUserLoginLogById(Long id) { - return tUserLoginLogMapper.selectTUserLoginLogById(id); - } - - /** - * 查询【请填写功能名称】列表 - * - * @param tUserLoginLog 【请填写功能名称】 - * @return 【请填写功能名称】 - */ - @Override - public List selectTUserLoginLogList(TUserLoginLog tUserLoginLog) { - return tUserLoginLogMapper.selectTUserLoginLogList(tUserLoginLog); - } - - /** - * 新增【请填写功能名称】 - * - * @param tUserLoginLog 【请填写功能名称】 - * @return 结果 - */ - @Override - public int insertTUserLoginLog(TUserLoginLog tUserLoginLog) { - return tUserLoginLogMapper.insertTUserLoginLog(tUserLoginLog); - } - - /** - * 修改【请填写功能名称】 - * - * @param tUserLoginLog 【请填写功能名称】 - * @return 结果 - */ - @Override - public int updateTUserLoginLog(TUserLoginLog tUserLoginLog) { - return tUserLoginLogMapper.updateTUserLoginLog(tUserLoginLog); - } - - /** - * 批量删除【请填写功能名称】 - * - * @param ids 需要删除的【请填写功能名称】ID - * @return 结果 - */ - @Override - public int deleteTUserLoginLogByIds(Long[] ids) { - return tUserLoginLogMapper.deleteTUserLoginLogByIds(ids); - } - - /** - * 删除【请填写功能名称】信息 - * - * @param id 【请填写功能名称】ID - * @return 结果 - */ - @Override - public int deleteTUserLoginLogById(Long id) { - return tUserLoginLogMapper.deleteTUserLoginLogById(id); - } -} diff --git a/spring-boot/ruoyi-system/src/main/resources/mapper/system/IotCategoryMapper.xml b/spring-boot/ruoyi-system/src/main/resources/mapper/system/IotCategoryMapper.xml deleted file mode 100644 index d7edf4d7..00000000 --- a/spring-boot/ruoyi-system/src/main/resources/mapper/system/IotCategoryMapper.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - select category_id, category_name, create_by, create_time, update_by, update_time, remark from iot_category - - - - - - - - insert into iot_category - - category_name, - create_by, - create_time, - update_by, - update_time, - remark, - - - #{categoryName}, - #{createBy}, - #{createTime}, - #{updateBy}, - #{updateTime}, - #{remark}, - - - - - update iot_category - - category_name = #{categoryName}, - create_by = #{createBy}, - create_time = #{createTime}, - update_by = #{updateBy}, - update_time = #{updateTime}, - remark = #{remark}, - - where category_id = #{categoryId} - - - - update iot_category set del_flag= '2' where category_id = #{categoryId} - - - - update iot_category set del_flag= '2' where category_id in - - #{categoryId} - - - \ No newline at end of file diff --git a/spring-boot/ruoyi-system/src/main/resources/mapper/system/IotDeviceMapper.xml b/spring-boot/ruoyi-system/src/main/resources/mapper/system/IotDeviceMapper.xml deleted file mode 100644 index 76094901..00000000 --- a/spring-boot/ruoyi-system/src/main/resources/mapper/system/IotDeviceMapper.xml +++ /dev/null @@ -1,285 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - select d.device_id, d.device_num, d.category_id, d.device_name, d.firmware_version, d.owner_id,d.status, d.create_by, - d.create_time, d.update_by, d.update_time, d.remark, - c.category_name, - s.device_temperature as device_temp - from iot_device d - left join iot_category c on d.category_id=c.category_id - left join (select device_id,device_temperature from iot_device_status - right join (select max(device_status_id) as status_id from iot_device_status group by device_id) mt - on mt.status_id=device_status_id ) as s - on d.device_id=s.device_id - - - - select d.device_id,d.status, d.device_num, d.category_id, d.device_name, d.firmware_version, d.owner_id, d.create_time, - s.relay_status,s.light_status,s.is_online,s.rssi,s.device_temperature, - t.network_address, t.network_ip,t.is_alarm, t.is_radar,t.is_rf_control, - u.nick_name, - c.category_name - ,g.group_id - from iot_device d - left join (select * from iot_device_set - right join (select max(device_set_id) as set_id from iot_device_set group by device_id) ms on - ms.set_id=device_set_id ) as t - on d.device_id = t.device_id - left join (select * from iot_device_status - right join (select max(device_status_id) as status_id from iot_device_status group by device_id) mt on - mt.status_id=device_status_id ) as s - on d.device_id=s.device_id - left join sys_user u on d.owner_id=u.user_id - left join iot_category c on d.category_id=c.category_id - left join iot_device_group g on d.device_id=g.device_id - - - - SELECT - t2.device_id, - t2.status, - t2.device_num, - t2.category_id, - t1.device_name, - t2.firmware_version, - t2.owner_id, - t2.create_time, - s.relay_status, - s.light_status, - s.is_online, - s.rssi, - s.device_temperature, - t.network_address, - t.network_ip, - t.is_alarm, - t.is_radar, - t.is_rf_control, - t4.nick_name, - t3.category_name, - t1.remark - FROM - iot_device_user_relation t1 - LEFT JOIN iot_device t2 ON t1.device_id = t2.device_id - AND t1.user_id = #{ownerId} - LEFT JOIN sys_user t4 on t4.user_id = t1.user_id - LEFT JOIN iot_category t3 ON t3.category_id = t2.category_id - LEFT JOIN ( - SELECT - * - FROM - iot_device_set - RIGHT JOIN ( SELECT max( device_set_id ) AS set_id FROM iot_device_set GROUP BY device_id ) ms ON ms.set_id = device_set_id - ) AS t ON t2.device_id = t.device_id - LEFT JOIN ( - SELECT - * - FROM - iot_device_status - RIGHT JOIN ( SELECT max( device_status_id ) AS status_id FROM iot_device_status GROUP BY device_id ) mt ON mt.status_id = device_status_id - ) AS s ON t2.device_id = s.device_id - - - - - - - - - - insert into iot_device - - device_num, - category_id, - device_name, - firmware_version, - owner_id, - status, - - create_by, - create_time, - update_by, - update_time, - remark, - - - #{deviceNum}, - #{categoryId}, - #{deviceName}, - #{firmwareVersion}, - #{ownerId}, - #{status}, - #{createBy}, - #{createTime}, - #{updateBy}, - #{updateTime}, - #{remark}, - - - - - update iot_device - - device_num = #{deviceNum}, - category_id = #{categoryId}, - device_name = #{deviceName}, - firmware_version = #{firmwareVersion}, - owner_id = #{ownerId}, - status = #{status}, - create_by = #{createBy}, - create_time = #{createTime}, - update_by = #{updateBy}, - update_time = #{updateTime}, - remark = #{remark}, - - where device_id = #{deviceId} - - - - delete from iot_device where device_id = #{deviceId} - - - - delete from iot_device where device_id in - - #{deviceId} - - - - - - - - - \ No newline at end of file diff --git a/spring-boot/ruoyi-system/src/main/resources/mapper/system/IotDeviceSetMapper.xml b/spring-boot/ruoyi-system/src/main/resources/mapper/system/IotDeviceSetMapper.xml deleted file mode 100644 index 33b96c00..00000000 --- a/spring-boot/ruoyi-system/src/main/resources/mapper/system/IotDeviceSetMapper.xml +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - select device_set_id, device_id, device_num, is_alarm, is_radar, is_host, is_reset, is_ap, is_wifi_offline, - is_open_certifi, is_smart_config, is_rf_control, is_rf_learn, is_rf_clear, rf_one_func, rf_two_func, - rf_three_func, rf_four_func, owner_id, network_address, network_ip,radar_interval, create_by, create_time, - update_by, update_time, remark from iot_device_set - - - - - - - - - - insert into iot_device_set - - device_set_id, - device_id, - device_num, - is_alarm, - is_radar, - is_host, - is_reset, - is_ap, - is_wifi_offline, - is_open_certifi, - is_smart_config, - is_rf_control, - is_rf_learn, - is_rf_clear, - rf_one_func, - rf_two_func, - rf_three_func, - rf_four_func, - owner_id, - network_address, - network_ip, - radar_interval, - create_by, - create_time, - update_by, - update_time, - remark, - - - #{deviceSetId}, - #{deviceId}, - #{deviceNum}, - #{isAlarm}, - #{isRadar}, - #{isHost}, - #{isReset}, - #{isAp}, - #{isWifiOffline}, - #{isOpenCertifi}, - #{isSmartConfig}, - #{isRfControl}, - #{isRfLearn}, - #{isRfClear}, - #{rfOneFunc}, - #{rfTwoFunc}, - #{rfThreeFunc}, - #{rfFourFunc}, - #{ownerId}, - #{networkAddress}, - #{networkIp}, - #{radarInterval}, - #{createBy}, - #{createTime}, - #{updateBy}, - #{updateTime}, - #{remark}, - - - - - update iot_device_set - - device_id = #{deviceId}, - device_num = #{deviceNum}, - is_alarm = #{isAlarm}, - is_radar = #{isRadar}, - is_host = #{isHost}, - is_reset = #{isReset}, - is_ap = #{isAp}, - is_wifi_offline = #{isWifiOffline}, - is_open_certifi = #{isOpenCertifi}, - is_smart_config = #{isSmartConfig}, - is_rf_control = #{isRfControl}, - is_rf_learn = #{isRfLearn}, - is_rf_clear = #{isRfClear}, - rf_one_func = #{rfOneFunc}, - rf_two_func = #{rfTwoFunc}, - rf_three_func = #{rfThreeFunc}, - rf_four_func = #{rfFourFunc}, - owner_id = #{ownerId}, - network_address = #{networkAddress}, - network_ip = #{networkIp}, - radar_interval = #{radarInterval}, - create_by = #{createBy}, - create_time = #{createTime}, - update_by = #{updateBy}, - update_time = #{updateTime}, - remark = #{remark}, - - where device_set_id = #{deviceSetId} - - - - update iot_device_set set del_flag= '2' where device_set_id = #{deviceSetId} - - - - update iot_device_set set del_flag= '2' where device_set_id in - - #{deviceSetId} - - - \ No newline at end of file diff --git a/spring-boot/ruoyi-system/src/main/resources/mapper/system/IotDeviceStatusMapper.xml b/spring-boot/ruoyi-system/src/main/resources/mapper/system/IotDeviceStatusMapper.xml deleted file mode 100644 index 49ae7adb..00000000 --- a/spring-boot/ruoyi-system/src/main/resources/mapper/system/IotDeviceStatusMapper.xml +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - select device_status_id, device_id, device_num, relay_status, light_status, is_online, device_temperature, rssi, - air_temperature, air_humidity, trigger_source, brightness, light_interval, light_mode,fade_time, red, green, - blue, create_by, create_time, update_by, update_time, remark from iot_device_status - - - - - - - - - - - - insert into iot_device_status - - device_id, - device_num, - relay_status, - light_status, - is_online, - device_temperature, - rssi, - air_temperature, - air_humidity, - trigger_source, - brightness, - light_interval, - light_mode, - fade_time, - red, - green, - blue, - create_by, - create_time, - update_by, - update_time, - remark, - - - #{deviceId}, - #{deviceNum}, - #{relayStatus}, - #{lightStatus}, - #{isOnline}, - #{deviceTemperature}, - #{rssi}, - #{airTemperature}, - #{airHumidity}, - #{triggerSource}, - #{brightness}, - #{lightInterval}, - #{lightMode}, - #{fadeTime}, - #{red}, - #{green}, - #{blue}, - #{createBy}, - #{createTime}, - #{updateBy}, - #{updateTime}, - #{remark}, - - - - - update iot_device_status - - device_id = #{deviceId}, - device_num = #{deviceNum}, - relay_status = #{relayStatus}, - light_status = #{lightStatus}, - is_online = #{isOnline}, - device_temperature = #{deviceTemperature}, - rssi = #{rssi}, - air_temperature = #{airTemperature}, - air_humidity = #{airHumidity}, - trigger_source = #{triggerSource}, - brightness = #{brightness}, - light_interval = #{lightInterval}, - light_mode = #{lightMode}, - fade_time = #{fadeTime}, - red = #{red}, - green = #{green}, - blue = #{blue}, - create_by = #{createBy}, - create_time = #{createTime}, - update_by = #{updateBy}, - update_time = #{updateTime}, - remark = #{remark}, - - where device_status_id = #{deviceStatusId} - - - - update iot_device_status set del_flag= '2' where device_status_id = #{deviceStatusId} - - - - update iot_device_status set del_flag= '2' where device_status_id in - - #{deviceStatusId} - - - \ No newline at end of file diff --git a/spring-boot/ruoyi-system/src/main/resources/mapper/system/IotDeviceUserRelationMapper.xml b/spring-boot/ruoyi-system/src/main/resources/mapper/system/IotDeviceUserRelationMapper.xml deleted file mode 100644 index 81c00ede..00000000 --- a/spring-boot/ruoyi-system/src/main/resources/mapper/system/IotDeviceUserRelationMapper.xml +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - select id, user_id, device_id, device_num,device_name,remark, gmt_time, gmt_update from iot_device_user_relation - - - - - - - - insert into iot_device_user_relation - - user_id, - - device_id, - - device_num, - - device_name, - - remark, - - gmt_time, - - gmt_update, - - - - #{userId}, - - #{deviceId}, - - #{deviceNum}, - - #{deviceName}, - - #{remark}, - - - #{gmtTime}, - - #{gmtUpdate}, - - - - - - update iot_device_user_relation - - user_id = - #{userId}, - - device_id = - #{deviceId}, - - device_num = - #{deviceNum}, - - device_name = - #{deviceName}, - - remark = - #{remark}, - - gmt_time = - #{gmtTime}, - - gmt_update = - #{gmtUpdate}, - - - where id = #{id} - - - - delete from iot_device_user_relation where id = #{id} - - - - delete from iot_device_user_relation where id in - - #{id} - - - \ No newline at end of file diff --git a/spring-boot/ruoyi-system/src/main/resources/mapper/system/IotGroupMapper.xml b/spring-boot/ruoyi-system/src/main/resources/mapper/system/IotGroupMapper.xml deleted file mode 100644 index ba188a3f..00000000 --- a/spring-boot/ruoyi-system/src/main/resources/mapper/system/IotGroupMapper.xml +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - - - - - - - - - select group_id, user_id, group_name, group_order, del_flag, create_by, create_time, update_by, update_time, - remark from iot_group - - - - - - - - insert into iot_group - - user_id, - group_name, - group_order, - del_flag, - create_by, - create_time, - update_by, - update_time, - remark, - - - #{userId}, - #{groupName}, - #{groupOrder}, - #{delFlag}, - #{createBy}, - #{createTime}, - #{updateBy}, - #{updateTime}, - #{remark}, - - - - - update iot_group - - user_id = #{userId}, - group_name = #{groupName}, - group_order = #{groupOrder}, - del_flag = #{delFlag}, - create_by = #{createBy}, - create_time = #{createTime}, - update_by = #{updateBy}, - update_time = #{updateTime}, - remark = #{remark}, - - where group_id = #{groupId} - - - - delete from iot_group where group_id = #{groupId} - - - - delete from iot_group where group_id in - - #{groupId} - - - \ No newline at end of file diff --git a/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysConfigMapper.xml b/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysConfigMapper.xml deleted file mode 100644 index 35f3e922..00000000 --- a/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysConfigMapper.xml +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - - - - - - - - - - select config_id, config_name, config_key, config_value, config_type, create_by, create_time, update_by, - update_time, remark - from sys_config - - - - - - - and config_id = #{configId} - - - and config_key = #{configKey} - - - - - - - - - - - - insert into sys_config ( - config_name, - config_key, - config_value, - config_type, - create_by, - remark, - create_time - )values( - #{configName}, - #{configKey}, - #{configValue}, - #{configType}, - #{createBy}, - #{remark}, - sysdate() - ) - - - - update sys_config - - config_name = #{configName}, - config_key = #{configKey}, - config_value = #{configValue}, - config_type = #{configType}, - update_by = #{updateBy}, - remark = #{remark}, - update_time = sysdate() - - where config_id = #{configId} - - - - delete from sys_config where config_id = #{configId} - - - - delete from sys_config where config_id in - - #{configId} - - - - \ No newline at end of file diff --git a/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml b/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml deleted file mode 100644 index d7f454a0..00000000 --- a/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, - d.del_flag, d.create_by, d.create_time - from sys_dept d - - - - - - - - - - - - - - - - - - - - insert into sys_dept( - dept_id, - parent_id, - dept_name, - ancestors, - order_num, - leader, - phone, - email, - status, - create_by, - create_time - )values( - #{deptId}, - #{parentId}, - #{deptName}, - #{ancestors}, - #{orderNum}, - #{leader}, - #{phone}, - #{email}, - #{status}, - #{createBy}, - sysdate() - ) - - - - update sys_dept - - parent_id = #{parentId}, - dept_name = #{deptName}, - ancestors = #{ancestors}, - order_num = #{orderNum}, - leader = #{leader}, - phone = #{phone}, - email = #{email}, - status = #{status}, - update_by = #{updateBy}, - update_time = sysdate() - - where dept_id = #{deptId} - - - - update sys_dept set ancestors = - - when #{item.deptId} then #{item.ancestors} - - where dept_id in - - #{item.deptId} - - - - - update sys_dept - - status = #{status}, - update_by = #{updateBy}, - update_time = sysdate() - - where dept_id in (${ancestors}) - - - - update sys_dept set del_flag = '2' where dept_id = #{deptId} - - - \ No newline at end of file diff --git a/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysDictDataMapper.xml b/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysDictDataMapper.xml deleted file mode 100644 index 814a4db4..00000000 --- a/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysDictDataMapper.xml +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, - create_by, create_time, remark - from sys_dict_data - - - - - - - - - - - - - - delete from sys_dict_data where dict_code = #{dictCode} - - - - delete from sys_dict_data where dict_code in - - #{dictCode} - - - - - update sys_dict_data - - dict_sort = #{dictSort}, - dict_label = #{dictLabel}, - dict_value = #{dictValue}, - dict_type = #{dictType}, - css_class = #{cssClass}, - list_class = #{listClass}, - is_default = #{isDefault}, - status = #{status}, - remark = #{remark}, - update_by = #{updateBy}, - update_time = sysdate() - - where dict_code = #{dictCode} - - - - update sys_dict_data set dict_type = #{newDictType} where dict_type = #{oldDictType} - - - - insert into sys_dict_data( - dict_sort, - dict_label, - dict_value, - dict_type, - css_class, - list_class, - is_default, - status, - remark, - create_by, - create_time - )values( - #{dictSort}, - #{dictLabel}, - #{dictValue}, - #{dictType}, - #{cssClass}, - #{listClass}, - #{isDefault}, - #{status}, - #{remark}, - #{createBy}, - sysdate() - ) - - - \ No newline at end of file diff --git a/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml b/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml deleted file mode 100644 index 546afc54..00000000 --- a/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysDictTypeMapper.xml +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - - - - - - - - - - select dict_id, dict_name, dict_type, status, create_by, create_time, remark - from sys_dict_type - - - - - - - - - - - - - - delete from sys_dict_type where dict_id = #{dictId} - - - - delete from sys_dict_type where dict_id in - - #{dictId} - - - - - update sys_dict_type - - dict_name = #{dictName}, - dict_type = #{dictType}, - status = #{status}, - remark = #{remark}, - update_by = #{updateBy}, - update_time = sysdate() - - where dict_id = #{dictId} - - - - insert into sys_dict_type( - dict_name, - dict_type, - status, - remark, - create_by, - create_time - )values( - #{dictName}, - #{dictType}, - #{status}, - #{remark}, - #{createBy}, - sysdate() - ) - - - \ No newline at end of file diff --git a/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysLogininforMapper.xml b/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysLogininforMapper.xml deleted file mode 100644 index add7d539..00000000 --- a/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysLogininforMapper.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - insert into sys_logininfor (user_name, status, ipaddr, login_location, browser, os, msg, login_time) - values (#{userName}, #{status}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{msg}, sysdate()) - - - - - - delete from sys_logininfor where info_id in - - #{infoId} - - - - - truncate table sys_logininfor - - - \ No newline at end of file diff --git a/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml b/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml deleted file mode 100644 index f1ce3578..00000000 --- a/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - select menu_id, menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, - status, ifnull(perms,'') as perms, icon, create_time - from sys_menu - - - - - - - - - - - - - - - - - - - - - - - - update sys_menu - - menu_name = #{menuName}, - parent_id = #{parentId}, - order_num = #{orderNum}, - path = #{path}, - component = #{component}, - is_frame = #{isFrame}, - is_cache = #{isCache}, - menu_type = #{menuType}, - visible = #{visible}, - status = #{status}, - perms = #{perms}, - icon = #{icon}, - remark = #{remark}, - update_by = #{updateBy}, - update_time = sysdate() - - where menu_id = #{menuId} - - - - insert into sys_menu( - menu_id, - parent_id, - menu_name, - order_num, - path, - component, - is_frame, - is_cache, - menu_type, - visible, - status, - perms, - icon, - remark, - create_by, - create_time - )values( - #{menuId}, - #{parentId}, - #{menuName}, - #{orderNum}, - #{path}, - #{component}, - #{isFrame}, - #{isCache}, - #{menuType}, - #{visible}, - #{status}, - #{perms}, - #{icon}, - #{remark}, - #{createBy}, - sysdate() - ) - - - - delete from sys_menu where menu_id = #{menuId} - - - \ No newline at end of file diff --git a/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysNoticeMapper.xml b/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysNoticeMapper.xml deleted file mode 100644 index af674c37..00000000 --- a/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysNoticeMapper.xml +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - - - - - - - - - - select notice_id, notice_title, notice_type, cast(notice_content as char) as notice_content, status, create_by, - create_time, update_by, update_time, remark - from sys_notice - - - - - - - - insert into sys_notice ( - notice_title, - notice_type, - notice_content, - status, - remark, - create_by, - create_time - )values( - #{noticeTitle}, - #{noticeType}, - #{noticeContent}, - #{status}, - #{remark}, - #{createBy}, - sysdate() - ) - - - - update sys_notice - - notice_title = #{noticeTitle}, - notice_type = #{noticeType}, - notice_content = #{noticeContent}, - status = #{status}, - update_by = #{updateBy}, - update_time = sysdate() - - where notice_id = #{noticeId} - - - - delete from sys_notice where notice_id = #{noticeId} - - - - delete from sys_notice where notice_id in - - #{noticeId} - - - - \ No newline at end of file diff --git a/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml b/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml deleted file mode 100644 index 8a06ded7..00000000 --- a/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - select oper_id, title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, - oper_ip, oper_location, oper_param, json_result, status, error_msg, oper_time - from sys_oper_log - - - - insert into sys_oper_log(title, business_type, method, request_method, operator_type, oper_name, dept_name, - oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, oper_time) - values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, - #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, sysdate()) - - - - - - delete from sys_oper_log where oper_id in - - #{operId} - - - - - - - truncate table sys_oper_log - - - \ No newline at end of file diff --git a/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml b/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml deleted file mode 100644 index a4bd4c6e..00000000 --- a/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysPostMapper.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - - - - - - - - - - - select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark - from sys_post - - - - - - - - - - - - - - - - - - update sys_post - - post_code = #{postCode}, - post_name = #{postName}, - post_sort = #{postSort}, - status = #{status}, - remark = #{remark}, - update_by = #{updateBy}, - update_time = sysdate() - - where post_id = #{postId} - - - - insert into sys_post( - post_id, - post_code, - post_name, - post_sort, - status, - remark, - create_by, - create_time - )values( - #{postId}, - #{postCode}, - #{postName}, - #{postSort}, - #{status}, - #{remark}, - #{createBy}, - sysdate() - ) - - - - delete from sys_post where post_id = #{postId} - - - - delete from sys_post where post_id in - - #{postId} - - - - \ No newline at end of file diff --git a/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysRoleDeptMapper.xml b/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysRoleDeptMapper.xml deleted file mode 100644 index fb2f449c..00000000 --- a/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysRoleDeptMapper.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - delete from sys_role_dept where role_id=#{roleId} - - - - - - delete from sys_role_dept where role_id in - - #{roleId} - - - - - insert into sys_role_dept(role_id, dept_id) values - - (#{item.roleId},#{item.deptId}) - - - - \ No newline at end of file diff --git a/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml b/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml deleted file mode 100644 index 3caa3c40..00000000 --- a/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - select distinct r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.menu_check_strictly, - r.dept_check_strictly, - r.status, r.del_flag, r.create_time, r.remark - from sys_role r - left join sys_user_role ur on ur.role_id = r.role_id - left join sys_user u on u.user_id = ur.user_id - left join sys_dept d on u.dept_id = d.dept_id - - - - - - - - - - - - - - - - - - - - insert into sys_role( - role_id, - role_name, - role_key, - role_sort, - data_scope, - menu_check_strictly, - dept_check_strictly, - status, - remark, - create_by, - create_time - )values( - #{roleId}, - #{roleName}, - #{roleKey}, - #{roleSort}, - #{dataScope}, - #{menuCheckStrictly}, - #{deptCheckStrictly}, - #{status}, - #{remark}, - #{createBy}, - sysdate() - ) - - - - update sys_role - - role_name = #{roleName}, - role_key = #{roleKey}, - role_sort = #{roleSort}, - data_scope = #{dataScope}, - menu_check_strictly = #{menuCheckStrictly}, - dept_check_strictly = #{deptCheckStrictly}, - status = #{status}, - remark = #{remark}, - update_by = #{updateBy}, - update_time = sysdate() - - where role_id = #{roleId} - - - - update sys_user set status = #{status} where user_id = #{userId} - - - - delete from sys_role where role_id = #{roleId} - - - - update sys_role set del_flag = '2' where role_id in - - #{roleId} - - - - \ No newline at end of file diff --git a/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysRoleMenuMapper.xml b/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysRoleMenuMapper.xml deleted file mode 100644 index 34f8f18c..00000000 --- a/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysRoleMenuMapper.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - delete from sys_role_menu where role_id=#{roleId} - - - - delete from sys_role_menu where role_id in - - #{roleId} - - - - - insert into sys_role_menu(role_id, menu_id) values - - (#{item.roleId},#{item.menuId}) - - - - \ No newline at end of file diff --git a/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml deleted file mode 100644 index 69d6b24a..00000000 --- a/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - select u.user_id,open_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, - u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, - d.dept_id, d.parent_id, d.dept_name, d.order_num, d.leader, d.status as dept_status, - r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status - from sys_user u - left join sys_dept d on u.dept_id = d.dept_id - left join sys_user_role ur on u.user_id = ur.user_id - left join sys_role r on r.role_id = ur.role_id - - - - - - - - - - - - - - - - - - insert into sys_user( - user_id, - dept_id, - user_name, - nick_name, - open_id, - email, - avatar, - phonenumber, - sex, - password, - status, - create_by, - remark, - create_time - )values( - #{userId}, - #{deptId}, - #{userName}, - #{nickName}, - #{openId}, - #{email}, - #{avatar}, - #{phonenumber}, - #{sex}, - #{password}, - #{status}, - #{createBy}, - #{remark}, - sysdate() - ) - - - - update sys_user - - dept_id = #{deptId}, - user_name = #{userName}, - nick_name = #{nickName}, - open_id = #{openId}, - email = #{email}, - phonenumber = #{phonenumber}, - sex = #{sex}, - avatar = #{avatar}, - password = #{password}, - status = #{status}, - login_ip = #{loginIp}, - login_date = #{loginDate}, - update_by = #{updateBy}, - remark = #{remark}, - update_time = sysdate() - - where user_id = #{userId} - - - - update sys_user set status = #{status} where user_id = #{userId} - - - - update sys_user set avatar = #{avatar} where user_name = #{userName} - - - - update sys_user set password = #{password} where user_name = #{userName} - - - - delete from sys_user where user_id = #{userId} - - - - update sys_user set del_flag = '2' where user_id in - - #{userId} - - - - \ No newline at end of file diff --git a/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysUserPostMapper.xml b/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysUserPostMapper.xml deleted file mode 100644 index 4e103d3b..00000000 --- a/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysUserPostMapper.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - delete from sys_user_post where user_id=#{userId} - - - - - - delete from sys_user_post where user_id in - - #{userId} - - - - - insert into sys_user_post(user_id, post_id) values - - (#{item.userId},#{item.postId}) - - - - \ No newline at end of file diff --git a/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysUserRoleMapper.xml b/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysUserRoleMapper.xml deleted file mode 100644 index 3f696a53..00000000 --- a/spring-boot/ruoyi-system/src/main/resources/mapper/system/SysUserRoleMapper.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - delete from sys_user_role where user_id=#{userId} - - - - - - delete from sys_user_role where user_id in - - #{userId} - - - - - insert into sys_user_role(user_id, role_id) values - - (#{item.userId},#{item.roleId}) - - - - - delete from sys_user_role where user_id=#{userId} and role_id=#{roleId} - - - - delete from sys_user_role where role_id=#{roleId} and user_id in - - #{userId} - - - \ No newline at end of file diff --git a/spring-boot/ruoyi-system/src/main/resources/mapper/system/TUserAccountInfoMapper.xml b/spring-boot/ruoyi-system/src/main/resources/mapper/system/TUserAccountInfoMapper.xml deleted file mode 100644 index 77362242..00000000 --- a/spring-boot/ruoyi-system/src/main/resources/mapper/system/TUserAccountInfoMapper.xml +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - select id, sessionKey, access_token, open_id, union_id, nick_name, avatar, phone, birthday, status, country, - province, city, address, user_type, admin_id, last_login_time, last_login_ip, gmt_time, gmt_update from - t_user_account_info - - - - - - - - insert into t_user_account_info - - sessionKey, - access_token, - open_id, - union_id, - nick_name, - avatar, - phone, - birthday, - status, - country, - province, - city, - address, - user_type, - admin_id, - last_login_time, - last_login_ip, - gmt_time, - gmt_update, - - - #{sessionkey}, - #{accessToken}, - #{openId}, - #{unionId}, - #{nickName}, - #{avatar}, - #{phone}, - #{birthday}, - #{status}, - #{country}, - #{province}, - #{city}, - #{address}, - #{userType}, - #{adminId}, - #{lastLoginTime}, - #{lastLoginIp}, - #{gmtTime}, - #{gmtUpdate}, - - - - - update t_user_account_info - - sessionKey = #{sessionkey}, - access_token = #{accessToken}, - open_id = #{openId}, - union_id = #{unionId}, - nick_name = #{nickName}, - avatar = #{avatar}, - phone = #{phone}, - birthday = #{birthday}, - status = #{status}, - country = #{country}, - province = #{province}, - city = #{city}, - address = #{address}, - user_type = #{userType}, - admin_id = #{adminId}, - last_login_time = #{lastLoginTime}, - last_login_ip = #{lastLoginIp}, - gmt_time = #{gmtTime}, - gmt_update = #{gmtUpdate}, - - where id = #{id} - - - - delete from t_user_account_info where id = #{id} - - - - delete from t_user_account_info where id in - - #{id} - - - \ No newline at end of file diff --git a/spring-boot/ruoyi-system/src/main/resources/mapper/system/TUserLoginLogMapper.xml b/spring-boot/ruoyi-system/src/main/resources/mapper/system/TUserLoginLogMapper.xml deleted file mode 100644 index 11a85bc3..00000000 --- a/spring-boot/ruoyi-system/src/main/resources/mapper/system/TUserLoginLogMapper.xml +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - select id, user_type, user_id, code, open_id, ip, gmt_time, gmt_update from t_user_login_log - - - - - - - - insert into t_user_login_log - - user_type, - user_id, - code, - open_id, - ip, - gmt_time, - gmt_update, - - - #{userType}, - #{userId}, - #{code}, - #{openId}, - #{ip}, - #{gmtTime}, - #{gmtUpdate}, - - - - - update t_user_login_log - - user_type = #{userType}, - user_id = #{userId}, - code = #{code}, - open_id = #{openId}, - ip = #{ip}, - gmt_time = #{gmtTime}, - gmt_update = #{gmtUpdate}, - - where id = #{id} - - - - delete from t_user_login_log where id = #{id} - - - - delete from t_user_login_log where id in - - #{id} - - - \ No newline at end of file diff --git a/spring-boot/ry.sh b/spring-boot/ry.sh deleted file mode 100644 index ecf7a5f3..00000000 --- a/spring-boot/ry.sh +++ /dev/null @@ -1,86 +0,0 @@ -#!/bin/bash - -AppName=ruoyi-admin.jar - -#JVM参数 -JVM_OPTS="-Dname=$AppName -Duser.timezone=Asia/Shanghai -Xms512M -Xmx512M -XX:PermSize=256M -XX:MaxPermSize=512M -XX:+HeapDumpOnOutOfMemoryError -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:NewRatio=1 -XX:SurvivorRatio=30 -XX:+UseParallelGC -XX:+UseParallelOldGC" -APP_HOME=`pwd` -LOG_PATH=$APP_HOME/logs/$AppName.log - -if [ "$1" = "" ]; -then - echo -e "\033[0;31m 未输入操作名 \033[0m \033[0;34m {start|stop|restart|status} \033[0m" - exit 1 -fi - -if [ "$AppName" = "" ]; -then - echo -e "\033[0;31m 未输入应用名 \033[0m" - exit 1 -fi - -function start() -{ - PID=`ps -ef |grep java|grep $AppName|grep -v grep|awk '{print $2}'` - - if [ x"$PID" != x"" ]; then - echo "$AppName is running..." - else - nohup java -jar $JVM_OPTS target/$AppName > /dev/null 2>&1 & - echo "Start $AppName success..." - fi -} - -function stop() -{ - echo "Stop $AppName" - - PID="" - query(){ - PID=`ps -ef |grep java|grep $AppName|grep -v grep|awk '{print $2}'` - } - - query - if [ x"$PID" != x"" ]; then - kill -TERM $PID - echo "$AppName (pid:$PID) exiting..." - while [ x"$PID" != x"" ] - do - sleep 1 - query - done - echo "$AppName exited." - else - echo "$AppName already stopped." - fi -} - -function restart() -{ - stop - sleep 2 - start -} - -function status() -{ - PID=`ps -ef |grep java|grep $AppName|grep -v grep|wc -l` - if [ $PID != 0 ];then - echo "$AppName is running..." - else - echo "$AppName is not running..." - fi -} - -case $1 in - start) - start;; - stop) - stop;; - restart) - restart;; - status) - status;; - *) - -esac diff --git a/spring-boot/sql/develop_xiaoyi_wumei.sql b/spring-boot/sql/develop_xiaoyi_wumei.sql deleted file mode 100644 index feb86c2c..00000000 --- a/spring-boot/sql/develop_xiaoyi_wumei.sql +++ /dev/null @@ -1,2340 +0,0 @@ -/* - Navicat Premium Data Transfer - - Source Server : 51xy.xyz8.0 - Source Server Type : MySQL - Source Server Version : 80025 - Source Host : 51xy.xyz:3316 - Source Schema : develop_xiaoyi_wumei - - Target Server Type : MySQL - Target Server Version : 80025 - File Encoding : 65001 - - Date: 02/09/2021 10:03:22 -*/ - -SET NAMES utf8mb4; -SET FOREIGN_KEY_CHECKS = 0; - --- ---------------------------- --- Table structure for gen_table --- ---------------------------- -DROP TABLE IF EXISTS `gen_table`; -CREATE TABLE `gen_table` ( - `table_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '编号', - `table_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '表名称', - `table_comment` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '表描述', - `sub_table_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '关联子表的表名', - `sub_table_fk_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '子表关联的外键名', - `class_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '实体类名称', - `tpl_category` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'crud' COMMENT '使用的模板(crud单表操作 tree树表操作)', - `package_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '生成包路径', - `module_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '生成模块名', - `business_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '生成业务名', - `function_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '生成功能名', - `function_author` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '生成功能作者', - `gen_type` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '生成代码方式(0zip压缩包 1自定义路径)', - `gen_path` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '/' COMMENT '生成路径(不填默认项目路径)', - `options` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '其它生成选项', - `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`table_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 23 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '代码生成业务表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of gen_table --- ---------------------------- -INSERT INTO `gen_table` VALUES (12, 'iot_category', '设备分类', '', '', 'IotCategory', 'crud', 'com.ruoyi.system', 'system', 'category', '设备分类', 'kerwincui', '0', '/', '{\"parentMenuId\":\"2000\"}', 'admin', '2021-05-06 13:31:29', '', '2021-05-07 08:22:58', NULL); -INSERT INTO `gen_table` VALUES (14, 'iot_device_set', '设备配置', NULL, NULL, 'IotDeviceSet', 'crud', 'com.ruoyi.system', 'system', 'set', '设备配置', 'kerwincui', '0', '/', '{\"parentMenuId\":\"2000\"}', 'admin', '2021-05-06 13:31:32', '', '2021-05-06 15:14:45', NULL); -INSERT INTO `gen_table` VALUES (15, 'iot_device_status', '设备状态', NULL, NULL, 'IotDeviceStatus', 'crud', 'com.ruoyi.system', 'system', 'status', '设备状态', 'kerwincui', '0', '/', '{\"parentMenuId\":\"2000\"}', 'admin', '2021-05-06 13:31:35', '', '2021-05-06 15:15:04', NULL); -INSERT INTO `gen_table` VALUES (17, 'iot_group', '设备分组', NULL, NULL, 'IotGroup', 'crud', 'com.ruoyi.system', 'system', 'group', '分组', 'kerwincui', '0', '/', '{\"parentMenuId\":\"2000\"}', 'admin', '2021-05-18 08:04:15', '', '2021-05-18 08:13:40', NULL); -INSERT INTO `gen_table` VALUES (18, 't_user_account_info', '小程序用户表', NULL, NULL, 'TUserAccountInfo', 'crud', 'com.ruoyi.system', 'system', 'info', '小程序用户', 'wxy', '0', '/', NULL, 'admin', '2021-08-26 14:45:28', '', NULL, NULL); -INSERT INTO `gen_table` VALUES (19, 't_user_login_log', '', NULL, NULL, 'TUserLoginLog', 'crud', 'com.ruoyi.system', 'system', 'log', NULL, 'wxy', '0', '/', NULL, 'admin', '2021-08-26 14:45:29', '', NULL, NULL); -INSERT INTO `gen_table` VALUES (20, 'sys_user', '用户信息表', NULL, NULL, 'SysUser', 'crud', 'com.ruoyi.system', 'system', 'user', '用户信息', 'wxy', '0', '/', NULL, 'admin', '2021-08-26 17:07:44', '', NULL, NULL); -INSERT INTO `gen_table` VALUES (21, 'iot_device_user_relation', '', NULL, NULL, 'IotDeviceUserRelation', 'crud', 'com.ruoyi.system', 'system', 'relation', NULL, 'wxy', '0', '/', NULL, 'admin', '2021-08-27 11:55:05', '', NULL, NULL); -INSERT INTO `gen_table` VALUES (22, 'iot_device', '', NULL, NULL, 'IotDevice', 'crud', 'com.ruoyi.system', 'system', 'device', NULL, 'wxy', '0', '/', NULL, 'admin', '2021-08-27 13:45:40', '', NULL, NULL); - --- ---------------------------- --- Table structure for gen_table_column --- ---------------------------- -DROP TABLE IF EXISTS `gen_table_column`; -CREATE TABLE `gen_table_column` ( - `column_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '编号', - `table_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '归属表编号', - `column_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '列名称', - `column_comment` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '列描述', - `column_type` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '列类型', - `java_type` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'JAVA类型', - `java_field` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'JAVA字段名', - `is_pk` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '是否主键(1是)', - `is_increment` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '是否自增(1是)', - `is_required` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '是否必填(1是)', - `is_insert` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '是否为插入字段(1是)', - `is_edit` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '是否编辑字段(1是)', - `is_list` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '是否列表字段(1是)', - `is_query` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '是否查询字段(1是)', - `query_type` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'EQ' COMMENT '查询方式(等于、不等于、大于、小于、范围)', - `html_type` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '显示类型(文本框、文本域、下拉框、复选框、单选框、日期控件)', - `dict_type` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '字典类型', - `sort` int(0) NULL DEFAULT NULL COMMENT '排序', - `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - PRIMARY KEY (`column_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 371 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '代码生成业务表字段' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of gen_table_column --- ---------------------------- -INSERT INTO `gen_table_column` VALUES (217, '12', 'category_id', '序号', 'bigint(20)', 'Long', 'categoryId', '1', '1', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 1, 'admin', '2021-05-06 13:31:29', '', '2021-05-07 08:22:58'); -INSERT INTO `gen_table_column` VALUES (218, '12', 'category_name', '分类名称', 'varchar(100)', 'String', 'categoryName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 2, 'admin', '2021-05-06 13:31:29', '', '2021-05-07 08:22:58'); -INSERT INTO `gen_table_column` VALUES (219, '12', 'del_flag', '删除标志(0代表存在 2代表删除)', 'char(1)', 'String', 'delFlag', '0', '0', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 3, 'admin', '2021-05-06 13:31:29', '', '2021-05-07 08:22:58'); -INSERT INTO `gen_table_column` VALUES (220, '12', 'create_by', '创建者', 'varchar(64)', 'String', 'createBy', '0', '0', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 4, 'admin', '2021-05-06 13:31:29', '', '2021-05-07 08:22:58'); -INSERT INTO `gen_table_column` VALUES (221, '12', 'create_time', '创建时间', 'datetime', 'Date', 'createTime', '0', '0', NULL, '1', NULL, NULL, NULL, 'EQ', 'datetime', '', 5, 'admin', '2021-05-06 13:31:29', '', '2021-05-07 08:22:58'); -INSERT INTO `gen_table_column` VALUES (222, '12', 'update_by', '更新者', 'varchar(64)', 'String', 'updateBy', '0', '0', NULL, '1', '1', NULL, NULL, 'EQ', 'input', '', 6, 'admin', '2021-05-06 13:31:29', '', '2021-05-07 08:22:58'); -INSERT INTO `gen_table_column` VALUES (223, '12', 'update_time', '更新时间', 'datetime', 'Date', 'updateTime', '0', '0', NULL, '1', '1', NULL, NULL, 'EQ', 'datetime', '', 7, 'admin', '2021-05-06 13:31:30', '', '2021-05-07 08:22:59'); -INSERT INTO `gen_table_column` VALUES (224, '12', 'remark', '备注', 'varchar(500)', 'String', 'remark', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'textarea', '', 8, 'admin', '2021-05-06 13:31:30', '', '2021-05-07 08:22:59'); -INSERT INTO `gen_table_column` VALUES (237, '14', 'device_config_id', '序号', 'bigint(20)', 'Long', 'deviceConfigId', '1', '0', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 1, 'admin', '2021-05-06 13:31:32', '', '2021-05-06 15:14:45'); -INSERT INTO `gen_table_column` VALUES (238, '14', 'device_id', '设备', 'bigint(20)', 'Long', 'deviceId', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 2, 'admin', '2021-05-06 13:31:32', '', '2021-05-06 15:14:45'); -INSERT INTO `gen_table_column` VALUES (239, '14', 'device_num', '设备编号', 'varchar(64)', 'String', 'deviceNum', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 3, 'admin', '2021-05-06 13:31:32', '', '2021-05-06 15:14:45'); -INSERT INTO `gen_table_column` VALUES (240, '14', 'is_alarm', '报警', 'tinyint(1)', 'Integer', 'isAlarm', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'radio', 'sys_yes_no', 4, 'admin', '2021-05-06 13:31:32', '', '2021-05-06 15:14:45'); -INSERT INTO `gen_table_column` VALUES (241, '14', 'is_radar', '雷达感应', 'tinyint(1)', 'Integer', 'isRadar', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'radio', 'sys_yes_no', 5, 'admin', '2021-05-06 13:31:32', '', '2021-05-06 15:14:45'); -INSERT INTO `gen_table_column` VALUES (242, '14', 'is_host', '托管', 'tinyint(1)', 'Integer', 'isHost', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'radio', 'sys_yes_no', 6, 'admin', '2021-05-06 13:31:32', '', '2021-05-06 15:14:46'); -INSERT INTO `gen_table_column` VALUES (243, '14', 'is_reset', '重启', 'tinyint(1)', 'Integer', 'isReset', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'radio', 'sys_yes_no', 7, 'admin', '2021-05-06 13:31:33', '', '2021-05-06 15:14:46'); -INSERT INTO `gen_table_column` VALUES (244, '14', 'is_ap', '打开AP', 'tinyint(1)', 'Integer', 'isAp', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'radio', 'sys_yes_no', 8, 'admin', '2021-05-06 13:31:33', '', '2021-05-06 15:14:46'); -INSERT INTO `gen_table_column` VALUES (245, '14', 'is_rf_control', '射频遥控', 'tinyint(1)', 'Integer', 'isRfControl', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'radio', 'sys_yes_no', 9, 'admin', '2021-05-06 13:31:33', '', '2021-05-06 15:14:46'); -INSERT INTO `gen_table_column` VALUES (246, '14', 'is_rf_learn', '遥控配对', 'tinyint(1)', 'Integer', 'isRfLearn', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'radio', 'sys_yes_no', 10, 'admin', '2021-05-06 13:31:33', '', '2021-05-06 15:14:46'); -INSERT INTO `gen_table_column` VALUES (247, '14', 'is_rf_clear', '遥控清码', 'tinyint(1)', 'Integer', 'isRfClear', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'radio', 'sys_yes_no', 11, 'admin', '2021-05-06 13:31:33', '', '2021-05-06 15:14:46'); -INSERT INTO `gen_table_column` VALUES (248, '14', 'rf_one_func', '按键一', 'tinyint(10)', 'Integer', 'rfOneFunc', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'select', 'rf_function', 12, 'admin', '2021-05-06 13:31:33', '', '2021-05-06 15:14:46'); -INSERT INTO `gen_table_column` VALUES (249, '14', 'rf_two_func', '按键二', 'tinyint(10)', 'Integer', 'rfTwoFunc', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'select', 'rf_function', 13, 'admin', '2021-05-06 13:31:33', '', '2021-05-06 15:14:47'); -INSERT INTO `gen_table_column` VALUES (250, '14', 'rf_three_func', '按键三', 'tinyint(10)', 'Integer', 'rfThreeFunc', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'select', 'rf_function', 14, 'admin', '2021-05-06 13:31:34', '', '2021-05-06 15:14:47'); -INSERT INTO `gen_table_column` VALUES (251, '14', 'rf_four_func', '按键四', 'tinyint(10)', 'Integer', 'rfFourFunc', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'select', 'rf_function', 15, 'admin', '2021-05-06 13:31:34', '', '2021-05-06 15:14:47'); -INSERT INTO `gen_table_column` VALUES (252, '14', 'owner_id', '用户', 'varchar(64)', 'String', 'ownerId', '0', '0', NULL, '1', '1', '1', '1', 'LIKE', 'input', '', 16, 'admin', '2021-05-06 13:31:34', '', '2021-05-06 15:14:47'); -INSERT INTO `gen_table_column` VALUES (253, '14', 'network_address', '配网地址', 'varchar(255)', 'String', 'networkAddress', '0', '0', NULL, '1', '1', '1', '1', 'LIKE', 'input', '', 17, 'admin', '2021-05-06 13:31:34', '', '2021-05-06 15:14:47'); -INSERT INTO `gen_table_column` VALUES (254, '14', 'network_ip', '配网IP', 'varchar(32)', 'String', 'networkIp', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'input', '', 18, 'admin', '2021-05-06 13:31:34', '', '2021-05-06 15:14:47'); -INSERT INTO `gen_table_column` VALUES (255, '14', 'del_flag', '删除标志(0代表存在 2代表删除)', 'char(1)', 'String', 'delFlag', '0', '0', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 19, 'admin', '2021-05-06 13:31:34', '', '2021-05-06 15:14:47'); -INSERT INTO `gen_table_column` VALUES (256, '14', 'create_by', '创建者', 'varchar(64)', 'String', 'createBy', '0', '0', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 20, 'admin', '2021-05-06 13:31:34', '', '2021-05-06 15:14:47'); -INSERT INTO `gen_table_column` VALUES (257, '14', 'create_time', '创建时间', 'datetime', 'Date', 'createTime', '0', '0', NULL, '1', NULL, NULL, '1', 'BETWEEN', 'datetime', '', 21, 'admin', '2021-05-06 13:31:34', '', '2021-05-06 15:14:47'); -INSERT INTO `gen_table_column` VALUES (258, '14', 'update_by', '更新者', 'varchar(64)', 'String', 'updateBy', '0', '0', NULL, '1', '1', NULL, NULL, 'EQ', 'input', '', 22, 'admin', '2021-05-06 13:31:35', '', '2021-05-06 15:14:48'); -INSERT INTO `gen_table_column` VALUES (259, '14', 'update_time', '更新时间', 'datetime', 'Date', 'updateTime', '0', '0', '1', '1', '1', NULL, NULL, 'EQ', 'datetime', '', 23, 'admin', '2021-05-06 13:31:35', '', '2021-05-06 15:14:48'); -INSERT INTO `gen_table_column` VALUES (260, '14', 'remark', '备注', 'varchar(500)', 'String', 'remark', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'textarea', '', 24, 'admin', '2021-05-06 13:31:35', '', '2021-05-06 15:14:48'); -INSERT INTO `gen_table_column` VALUES (261, '15', 'device_status_id', '序号', 'bigint(20)', 'Long', 'deviceStatusId', '1', '1', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 1, 'admin', '2021-05-06 13:31:35', '', '2021-05-06 15:15:04'); -INSERT INTO `gen_table_column` VALUES (262, '15', 'device_id', '设备', 'bigint(20)', 'Long', 'deviceId', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 2, 'admin', '2021-05-06 13:31:35', '', '2021-05-06 15:15:04'); -INSERT INTO `gen_table_column` VALUES (263, '15', 'device_num', '设备编号', 'varchar(64)', 'String', 'deviceNum', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 3, 'admin', '2021-05-06 13:31:35', '', '2021-05-06 15:15:04'); -INSERT INTO `gen_table_column` VALUES (264, '15', 'relay_status', '继电器', 'tinyint(1)', 'Integer', 'relayStatus', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'radio', 'sys_yes_no', 4, 'admin', '2021-05-06 13:31:36', '', '2021-05-06 15:15:05'); -INSERT INTO `gen_table_column` VALUES (265, '15', 'light_status', '灯状态', 'tinyint(1)', 'Integer', 'lightStatus', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'radio', 'sys_yes_no', 5, 'admin', '2021-05-06 13:31:36', '', '2021-05-06 15:15:05'); -INSERT INTO `gen_table_column` VALUES (266, '15', 'is_online', '在线', 'tinyint(1)', 'Integer', 'isOnline', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'radio', 'sys_yes_no', 6, 'admin', '2021-05-06 13:31:36', '', '2021-05-06 15:15:05'); -INSERT INTO `gen_table_column` VALUES (267, '15', 'device_temperature', '设备温度', 'float(6,2)', 'BigDecimal', 'deviceTemperature', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'input', '', 7, 'admin', '2021-05-06 13:31:36', '', '2021-05-06 15:15:05'); -INSERT INTO `gen_table_column` VALUES (268, '15', 'device_humidity', '设备湿度', 'float(6,2)', 'BigDecimal', 'deviceHumidity', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'input', '', 8, 'admin', '2021-05-06 13:31:36', '', '2021-05-06 15:15:05'); -INSERT INTO `gen_table_column` VALUES (269, '15', 'air_temperature', '空气温度', 'float(6,2)', 'BigDecimal', 'airTemperature', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'input', '', 9, 'admin', '2021-05-06 13:31:36', '', '2021-05-06 15:15:05'); -INSERT INTO `gen_table_column` VALUES (270, '15', 'air_humidity', '空气湿度', 'float(6,2)', 'BigDecimal', 'airHumidity', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'input', '', 10, 'admin', '2021-05-06 13:31:36', '', '2021-05-06 15:15:05'); -INSERT INTO `gen_table_column` VALUES (271, '15', 'trigger_source', '触发源', 'tinyint(10)', 'Integer', 'triggerSource', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'select', 'iot_trigger_source', 11, 'admin', '2021-05-06 13:31:36', '', '2021-05-06 15:15:05'); -INSERT INTO `gen_table_column` VALUES (272, '15', 'brightness', '彩灯亮度', 'tinyint(10) unsigned', 'Integer', 'brightness', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'input', '', 12, 'admin', '2021-05-06 13:31:37', '', '2021-05-06 15:15:05'); -INSERT INTO `gen_table_column` VALUES (273, '15', 'light_interval', '渐变间隔', 'smallint(10)', 'Integer', 'lightInterval', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'input', '', 13, 'admin', '2021-05-06 13:31:37', '', '2021-05-06 15:15:06'); -INSERT INTO `gen_table_column` VALUES (274, '15', 'light_mode', '彩灯模式', 'tinyint(10)', 'Integer', 'lightMode', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'select', 'light_mode', 14, 'admin', '2021-05-06 13:31:37', '', '2021-05-06 15:15:06'); -INSERT INTO `gen_table_column` VALUES (275, '15', 'red', '红灯', 'tinyint(255) unsigned', 'Long', 'red', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'input', '', 15, 'admin', '2021-05-06 13:31:37', '', '2021-05-06 15:15:06'); -INSERT INTO `gen_table_column` VALUES (276, '15', 'green', '绿灯', 'tinyint(255) unsigned', 'Long', 'green', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'input', '', 16, 'admin', '2021-05-06 13:31:37', '', '2021-05-06 15:15:06'); -INSERT INTO `gen_table_column` VALUES (277, '15', 'blue', '蓝灯', 'tinyint(255) unsigned', 'Long', 'blue', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'input', '', 17, 'admin', '2021-05-06 13:31:37', '', '2021-05-06 15:15:06'); -INSERT INTO `gen_table_column` VALUES (278, '15', 'del_flag', '删除标志(0代表存在 2代表删除)', 'char(1)', 'String', 'delFlag', '0', '0', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 18, 'admin', '2021-05-06 13:31:37', '', '2021-05-06 15:15:06'); -INSERT INTO `gen_table_column` VALUES (279, '15', 'create_by', '创建者', 'varchar(64)', 'String', 'createBy', '0', '0', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 19, 'admin', '2021-05-06 13:31:38', '', '2021-05-06 15:15:06'); -INSERT INTO `gen_table_column` VALUES (280, '15', 'create_time', '创建时间', 'datetime', 'Date', 'createTime', '0', '0', NULL, '1', NULL, NULL, '1', 'BETWEEN', 'datetime', '', 20, 'admin', '2021-05-06 13:31:38', '', '2021-05-06 15:15:06'); -INSERT INTO `gen_table_column` VALUES (281, '15', 'update_by', '更新者', 'varchar(64)', 'String', 'updateBy', '0', '0', NULL, '1', '1', NULL, NULL, 'EQ', 'input', '', 21, 'admin', '2021-05-06 13:31:38', '', '2021-05-06 15:15:07'); -INSERT INTO `gen_table_column` VALUES (282, '15', 'update_time', '更新时间', 'datetime', 'Date', 'updateTime', '0', '0', '1', '1', '1', NULL, NULL, 'EQ', 'datetime', '', 22, 'admin', '2021-05-06 13:31:38', '', '2021-05-06 15:15:07'); -INSERT INTO `gen_table_column` VALUES (283, '15', 'remark', '备注', 'varchar(500)', 'String', 'remark', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'textarea', '', 23, 'admin', '2021-05-06 13:31:38', '', '2021-05-06 15:15:07'); -INSERT INTO `gen_table_column` VALUES (294, '17', 'group_id', '设备分组', 'bigint(20)', 'Long', 'groupId', '1', '1', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 1, 'admin', '2021-05-18 08:04:15', '', '2021-05-18 08:13:40'); -INSERT INTO `gen_table_column` VALUES (295, '17', 'user_id', '用户', 'bigint(20)', 'Long', 'userId', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 2, 'admin', '2021-05-18 08:04:16', '', '2021-05-18 08:13:40'); -INSERT INTO `gen_table_column` VALUES (296, '17', 'group_name', '分组名称', 'varchar(100)', 'String', 'groupName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 3, 'admin', '2021-05-18 08:04:16', '', '2021-05-18 08:13:40'); -INSERT INTO `gen_table_column` VALUES (297, '17', 'group_order', '排序', 'smallint(5) unsigned zerofill', 'Integer', 'groupOrder', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'input', '', 4, 'admin', '2021-05-18 08:04:16', '', '2021-05-18 08:13:41'); -INSERT INTO `gen_table_column` VALUES (298, '17', 'del_flag', '删除标志(0代表存在 2代表删除)', 'char(1)', 'String', 'delFlag', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 5, 'admin', '2021-05-18 08:04:16', '', '2021-05-18 08:13:41'); -INSERT INTO `gen_table_column` VALUES (299, '17', 'create_by', '创建者', 'varchar(64)', 'String', 'createBy', '0', '0', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 6, 'admin', '2021-05-18 08:04:16', '', '2021-05-18 08:13:41'); -INSERT INTO `gen_table_column` VALUES (300, '17', 'create_time', '创建时间', 'datetime', 'Date', 'createTime', '0', '0', NULL, '1', NULL, '1', '1', 'BETWEEN', 'datetime', '', 7, 'admin', '2021-05-18 08:04:17', '', '2021-05-18 08:13:41'); -INSERT INTO `gen_table_column` VALUES (301, '17', 'update_by', '更新者', 'varchar(64)', 'String', 'updateBy', '0', '0', NULL, '1', '1', NULL, NULL, 'EQ', 'input', '', 8, 'admin', '2021-05-18 08:04:17', '', '2021-05-18 08:13:41'); -INSERT INTO `gen_table_column` VALUES (302, '17', 'update_time', '更新时间', 'datetime', 'Date', 'updateTime', '0', '0', NULL, '1', '1', NULL, NULL, 'EQ', 'datetime', '', 9, 'admin', '2021-05-18 08:04:17', '', '2021-05-18 08:13:41'); -INSERT INTO `gen_table_column` VALUES (303, '17', 'remark', '备注', 'varchar(500)', 'String', 'remark', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'textarea', '', 10, 'admin', '2021-05-18 08:04:17', '', '2021-05-18 08:13:42'); -INSERT INTO `gen_table_column` VALUES (304, '18', 'id', NULL, 'int', 'Long', 'id', '1', '1', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 1, 'admin', '2021-08-26 14:45:28', '', NULL); -INSERT INTO `gen_table_column` VALUES (305, '18', 'sessionKey', 'sessionKey', 'varchar(255)', 'String', 'sessionkey', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 2, 'admin', '2021-08-26 14:45:28', '', NULL); -INSERT INTO `gen_table_column` VALUES (306, '18', 'access_token', 'accessToken', 'varchar(255)', 'String', 'accessToken', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 3, 'admin', '2021-08-26 14:45:28', '', NULL); -INSERT INTO `gen_table_column` VALUES (307, '18', 'open_id', NULL, 'varchar(50)', 'String', 'openId', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 4, 'admin', '2021-08-26 14:45:28', '', NULL); -INSERT INTO `gen_table_column` VALUES (308, '18', 'union_id', NULL, 'varchar(50)', 'String', 'unionId', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 5, 'admin', '2021-08-26 14:45:28', '', NULL); -INSERT INTO `gen_table_column` VALUES (309, '18', 'nick_name', '昵称', 'varchar(255)', 'String', 'nickName', '0', '0', NULL, '1', '1', '1', '1', 'LIKE', 'input', '', 6, 'admin', '2021-08-26 14:45:28', '', NULL); -INSERT INTO `gen_table_column` VALUES (310, '18', 'avatar', '头像', 'varchar(255)', 'String', 'avatar', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 7, 'admin', '2021-08-26 14:45:28', '', NULL); -INSERT INTO `gen_table_column` VALUES (311, '18', 'phone', '手机号', 'varchar(255)', 'String', 'phone', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 8, 'admin', '2021-08-26 14:45:28', '', NULL); -INSERT INTO `gen_table_column` VALUES (312, '18', 'birthday', '生日', 'varchar(255)', 'String', 'birthday', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 9, 'admin', '2021-08-26 14:45:28', '', NULL); -INSERT INTO `gen_table_column` VALUES (313, '18', 'status', '用户状态:0-冻结,1-正常', 'int', 'Long', 'status', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'radio', '', 10, 'admin', '2021-08-26 14:45:28', '', NULL); -INSERT INTO `gen_table_column` VALUES (314, '18', 'country', '国家', 'varchar(255)', 'String', 'country', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 11, 'admin', '2021-08-26 14:45:29', '', NULL); -INSERT INTO `gen_table_column` VALUES (315, '18', 'province', '省份', 'varchar(255)', 'String', 'province', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 12, 'admin', '2021-08-26 14:45:29', '', NULL); -INSERT INTO `gen_table_column` VALUES (316, '18', 'city', '城市', 'varchar(255)', 'String', 'city', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 13, 'admin', '2021-08-26 14:45:29', '', NULL); -INSERT INTO `gen_table_column` VALUES (317, '18', 'address', '地址', 'varchar(255)', 'String', 'address', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 14, 'admin', '2021-08-26 14:45:29', '', NULL); -INSERT INTO `gen_table_column` VALUES (318, '18', 'user_type', '用户类型:0-未授权用户,1-消费者,2-商家', 'int', 'Long', 'userType', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'select', '', 15, 'admin', '2021-08-26 14:45:29', '', NULL); -INSERT INTO `gen_table_column` VALUES (319, '18', 'admin_id', '绑定的管理员编号', 'int', 'Long', 'adminId', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 16, 'admin', '2021-08-26 14:45:29', '', NULL); -INSERT INTO `gen_table_column` VALUES (320, '18', 'last_login_time', NULL, 'timestamp', 'Date', 'lastLoginTime', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'datetime', '', 17, 'admin', '2021-08-26 14:45:29', '', NULL); -INSERT INTO `gen_table_column` VALUES (321, '18', 'last_login_ip', NULL, 'varchar(255)', 'String', 'lastLoginIp', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 18, 'admin', '2021-08-26 14:45:29', '', NULL); -INSERT INTO `gen_table_column` VALUES (322, '18', 'gmt_time', NULL, 'timestamp', 'Date', 'gmtTime', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'datetime', '', 19, 'admin', '2021-08-26 14:45:29', '', NULL); -INSERT INTO `gen_table_column` VALUES (323, '18', 'gmt_update', NULL, 'timestamp', 'Date', 'gmtUpdate', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'datetime', '', 20, 'admin', '2021-08-26 14:45:29', '', NULL); -INSERT INTO `gen_table_column` VALUES (324, '19', 'id', NULL, 'int', 'Long', 'id', '1', '1', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 1, 'admin', '2021-08-26 14:45:29', '', NULL); -INSERT INTO `gen_table_column` VALUES (325, '19', 'user_type', '用户类型', 'varchar(255)', 'String', 'userType', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'select', '', 2, 'admin', '2021-08-26 14:45:29', '', NULL); -INSERT INTO `gen_table_column` VALUES (326, '19', 'user_id', NULL, 'int', 'Long', 'userId', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 3, 'admin', '2021-08-26 14:45:29', '', NULL); -INSERT INTO `gen_table_column` VALUES (327, '19', 'code', NULL, 'varchar(50)', 'String', 'code', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 4, 'admin', '2021-08-26 14:45:29', '', NULL); -INSERT INTO `gen_table_column` VALUES (328, '19', 'open_id', NULL, 'varchar(50)', 'String', 'openId', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 5, 'admin', '2021-08-26 14:45:29', '', NULL); -INSERT INTO `gen_table_column` VALUES (329, '19', 'ip', 'IP地址', 'varchar(30)', 'String', 'ip', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 6, 'admin', '2021-08-26 14:45:29', '', NULL); -INSERT INTO `gen_table_column` VALUES (330, '19', 'gmt_time', NULL, 'timestamp', 'Date', 'gmtTime', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'datetime', '', 7, 'admin', '2021-08-26 14:45:29', '', NULL); -INSERT INTO `gen_table_column` VALUES (331, '19', 'gmt_update', NULL, 'timestamp', 'Date', 'gmtUpdate', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'datetime', '', 8, 'admin', '2021-08-26 14:45:29', '', NULL); -INSERT INTO `gen_table_column` VALUES (332, '20', 'user_id', '用户ID', 'bigint', 'Long', 'userId', '1', '1', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 1, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (333, '20', 'dept_id', '部门ID', 'bigint', 'Long', 'deptId', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 2, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (334, '20', 'open_id', '用户OpenId', 'varchar(40)', 'String', 'openId', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 3, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (335, '20', 'user_name', '用户账号', 'varchar(30)', 'String', 'userName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 4, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (336, '20', 'nick_name', '用户昵称', 'varchar(30)', 'String', 'nickName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 5, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (337, '20', 'user_type', '用户类型(00系统用户)', 'varchar(2)', 'String', 'userType', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'select', '', 6, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (338, '20', 'email', '用户邮箱', 'varchar(50)', 'String', 'email', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 7, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (339, '20', 'phonenumber', '手机号码', 'varchar(11)', 'String', 'phonenumber', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 8, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (340, '20', 'sex', '用户性别(0男 1女 2未知)', 'char(1)', 'String', 'sex', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'select', '', 9, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (341, '20', 'avatar', '头像地址', 'varchar(100)', 'String', 'avatar', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 10, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (342, '20', 'password', '密码', 'varchar(100)', 'String', 'password', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 11, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (343, '20', 'status', '帐号状态(0正常 1停用)', 'char(1)', 'String', 'status', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'radio', '', 12, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (344, '20', 'del_flag', '删除标志(0代表存在 2代表删除)', 'char(1)', 'String', 'delFlag', '0', '0', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 13, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (345, '20', 'login_ip', '最后登录IP', 'varchar(128)', 'String', 'loginIp', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 14, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (346, '20', 'login_date', '最后登录时间', 'datetime', 'Date', 'loginDate', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'datetime', '', 15, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (347, '20', 'create_by', '创建者', 'varchar(64)', 'String', 'createBy', '0', '0', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 16, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (348, '20', 'create_time', '创建时间', 'datetime', 'Date', 'createTime', '0', '0', NULL, '1', NULL, NULL, NULL, 'EQ', 'datetime', '', 17, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (349, '20', 'update_by', '更新者', 'varchar(64)', 'String', 'updateBy', '0', '0', NULL, '1', '1', NULL, NULL, 'EQ', 'input', '', 18, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (350, '20', 'update_time', '更新时间', 'datetime', 'Date', 'updateTime', '0', '0', NULL, '1', '1', NULL, NULL, 'EQ', 'datetime', '', 19, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (351, '20', 'remark', '备注', 'varchar(500)', 'String', 'remark', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'textarea', '', 20, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (352, '21', 'id', NULL, 'int', 'Long', 'id', '1', '1', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 1, 'admin', '2021-08-27 11:55:05', '', NULL); -INSERT INTO `gen_table_column` VALUES (353, '21', 'user_id', NULL, 'int', 'Long', 'userId', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 2, 'admin', '2021-08-27 11:55:05', '', NULL); -INSERT INTO `gen_table_column` VALUES (354, '21', 'device_id', NULL, 'int', 'Long', 'deviceId', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 3, 'admin', '2021-08-27 11:55:06', '', NULL); -INSERT INTO `gen_table_column` VALUES (355, '21', 'device_num', NULL, 'varchar(60)', 'String', 'deviceNum', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 4, 'admin', '2021-08-27 11:55:06', '', NULL); -INSERT INTO `gen_table_column` VALUES (356, '21', 'gmt_time', NULL, 'timestamp', 'Date', 'gmtTime', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'datetime', '', 5, 'admin', '2021-08-27 11:55:06', '', NULL); -INSERT INTO `gen_table_column` VALUES (357, '21', 'gmt_update', NULL, 'timestamp', 'Date', 'gmtUpdate', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'datetime', '', 6, 'admin', '2021-08-27 11:55:06', '', NULL); -INSERT INTO `gen_table_column` VALUES (358, '22', 'device_id', '设备ID', 'bigint', 'Long', 'deviceId', '1', '1', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 1, 'admin', '2021-08-27 13:45:40', '', NULL); -INSERT INTO `gen_table_column` VALUES (359, '22', 'device_num', '设备编号', 'varchar(64)', 'String', 'deviceNum', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 2, 'admin', '2021-08-27 13:45:40', '', NULL); -INSERT INTO `gen_table_column` VALUES (360, '22', 'category_id', '设备分类', 'bigint', 'Long', 'categoryId', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 3, 'admin', '2021-08-27 13:45:40', '', NULL); -INSERT INTO `gen_table_column` VALUES (361, '22', 'device_name', '设备名称', 'varchar(64)', 'String', 'deviceName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 4, 'admin', '2021-08-27 13:45:40', '', NULL); -INSERT INTO `gen_table_column` VALUES (362, '22', 'firmware_version', '固件版本', 'varchar(32)', 'String', 'firmwareVersion', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 5, 'admin', '2021-08-27 13:45:40', '', NULL); -INSERT INTO `gen_table_column` VALUES (363, '22', 'owner_id', '设备用户ID', 'varchar(64)', 'String', 'ownerId', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 6, 'admin', '2021-08-27 13:45:40', '', NULL); -INSERT INTO `gen_table_column` VALUES (364, '22', 'del_flag', '删除标志(0代表存在 2代表删除)', 'char(1)', 'String', 'delFlag', '0', '0', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 7, 'admin', '2021-08-27 13:45:40', '', NULL); -INSERT INTO `gen_table_column` VALUES (365, '22', 'status', '设备状态:未激活,未绑定,已绑定', 'varchar(255)', 'String', 'status', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'radio', '', 8, 'admin', '2021-08-27 13:45:40', '', NULL); -INSERT INTO `gen_table_column` VALUES (366, '22', 'create_by', '创建者', 'varchar(64)', 'String', 'createBy', '0', '0', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 9, 'admin', '2021-08-27 13:45:40', '', NULL); -INSERT INTO `gen_table_column` VALUES (367, '22', 'create_time', '创建时间', 'datetime', 'Date', 'createTime', '0', '0', NULL, '1', NULL, NULL, NULL, 'EQ', 'datetime', '', 10, 'admin', '2021-08-27 13:45:40', '', NULL); -INSERT INTO `gen_table_column` VALUES (368, '22', 'update_by', '更新者', 'varchar(64)', 'String', 'updateBy', '0', '0', NULL, '1', '1', NULL, NULL, 'EQ', 'input', '', 11, 'admin', '2021-08-27 13:45:40', '', NULL); -INSERT INTO `gen_table_column` VALUES (369, '22', 'update_time', '更新时间', 'datetime', 'Date', 'updateTime', '0', '0', NULL, '1', '1', NULL, NULL, 'EQ', 'datetime', '', 12, 'admin', '2021-08-27 13:45:40', '', NULL); -INSERT INTO `gen_table_column` VALUES (370, '22', 'remark', '备注', 'varchar(500)', 'String', 'remark', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'textarea', '', 13, 'admin', '2021-08-27 13:45:40', '', NULL); - --- ---------------------------- --- Table structure for iot_category --- ---------------------------- -DROP TABLE IF EXISTS `iot_category`; -CREATE TABLE `iot_category` ( - `category_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '设备分类ID', - `category_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '设备分类名称', - `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '删除标志(0代表存在 2代表删除)', - `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`category_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of iot_category --- ---------------------------- -INSERT INTO `iot_category` VALUES (1, 'wifi通断器', '0', '', '2021-05-06 01:00:04', '', '2021-05-06 01:05:08', '智能开关,带温湿度传感器,支持手机和射频遥控控制。应用于传统家电设备的控制等。'); -INSERT INTO `iot_category` VALUES (2, '智能灯', '0', '', '2021-05-06 01:01:39', '', '2021-05-06 01:05:32', '智能七彩灯,支持雷达感应、报警,手机和射频遥控控制。应用于环境灯、感应灯和传统灯的控制等。'); -INSERT INTO `iot_category` VALUES (3, '智能门锁', '0', '', '2021-05-06 01:02:34', '', '2021-05-06 01:04:22', '支持手机和射频遥控控制。'); -INSERT INTO `iot_category` VALUES (4, '智能水阀', '0', '', '2021-05-06 01:03:57', '', NULL, '手机和射频遥控控制,应用于浇灌系统。'); -INSERT INTO `iot_category` VALUES (5, '其他', '0', '', '2021-05-28 19:31:05', '', NULL, '其他硬件设备的接入'); - --- ---------------------------- --- Table structure for iot_device --- ---------------------------- -DROP TABLE IF EXISTS `iot_device`; -CREATE TABLE `iot_device` ( - `device_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '设备ID', - `device_num` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '设备编号', - `category_id` bigint(0) NULL DEFAULT NULL COMMENT '设备分类', - `device_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '设备名称', - `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注', - `firmware_version` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '固件版本', - `owner_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '设备用户ID', - `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '删除标志(0代表存在 2代表删除)', - `status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '未激活' COMMENT '设备状态:未激活,未绑定,已绑定', - `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - PRIMARY KEY (`device_id`) USING BTREE, - INDEX `iot_device_category`(`category_id`) USING BTREE, - CONSTRAINT `iot_device_category` FOREIGN KEY (`category_id`) REFERENCES `iot_category` (`category_id`) ON DELETE SET NULL ON UPDATE RESTRICT -) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of iot_device --- ---------------------------- -INSERT INTO `iot_device` VALUES (1, '7CDFA1049ADA', 2, '阿拉丁神灯', '阿拉丁灯灯灯灯灯。', '1.0', NULL, '0', '未激活', '', '2021-05-23 14:26:38', '', '2021-06-26 20:25:09'); -INSERT INTO `iot_device` VALUES (2, '7CDFA1049ADB', 1, '智能开关-测试', '暂无', '1.0', NULL, '0', '未激活', '', '2021-05-23 14:26:38', '', '2021-06-15 02:47:52'); -INSERT INTO `iot_device` VALUES (3, '7CDFA1049ADC', 1, '设备名称', 'remark', '1.0', NULL, '0', '未激活', '', '2021-05-23 14:26:38', '', '2021-06-15 02:47:52'); -INSERT INTO `iot_device` VALUES (4, '863488052352472', 4, '4G开关001', '灯等等灯', '1.0', '1', '0', '未绑定', '', NULL, '', '2021-08-31 20:11:17'); - --- ---------------------------- --- Table structure for iot_device_group --- ---------------------------- -DROP TABLE IF EXISTS `iot_device_group`; -CREATE TABLE `iot_device_group` ( - `device_group_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '设备分组ID', - `group_id` bigint(0) NOT NULL COMMENT '分组ID', - `device_id` bigint(0) NOT NULL COMMENT '设备ID', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - PRIMARY KEY (`device_group_id`) USING BTREE, - INDEX `iot_device_group_group_id`(`group_id`) USING BTREE, - INDEX `iot_device_group_device_id`(`device_id`) USING BTREE, - CONSTRAINT `iot_device_group_device_id` FOREIGN KEY (`device_id`) REFERENCES `iot_device` (`device_id`) ON DELETE RESTRICT ON UPDATE RESTRICT, - CONSTRAINT `iot_device_group_group_id` FOREIGN KEY (`group_id`) REFERENCES `iot_group` (`group_id`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of iot_device_group --- ---------------------------- -INSERT INTO `iot_device_group` VALUES (1, 1, 1, '2021-06-11 23:25:49'); -INSERT INTO `iot_device_group` VALUES (2, 2, 1, '2021-06-11 23:25:49'); -INSERT INTO `iot_device_group` VALUES (6, 1, 2, '2021-06-11 23:25:49'); -INSERT INTO `iot_device_group` VALUES (7, 2, 2, '2021-06-11 23:25:49'); - --- ---------------------------- --- Table structure for iot_device_set --- ---------------------------- -DROP TABLE IF EXISTS `iot_device_set`; -CREATE TABLE `iot_device_set` ( - `device_set_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '配置id', - `device_id` bigint(0) NULL DEFAULT NULL COMMENT '设备ID', - `device_num` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '设备编号', - `is_alarm` tinyint(1) NULL DEFAULT NULL COMMENT '是否启用报警', - `is_radar` tinyint(1) NULL DEFAULT NULL COMMENT '是否启用雷达感应', - `is_host` tinyint(1) NULL DEFAULT NULL COMMENT '是否托管', - `is_reset` tinyint(1) NULL DEFAULT NULL COMMENT '是否重启', - `is_ap` tinyint(1) NULL DEFAULT NULL COMMENT '是否打开AP', - `is_smart_config` tinyint(1) NULL DEFAULT NULL COMMENT '是否智能配网', - `is_wifi_offline` tinyint(1) NULL DEFAULT NULL COMMENT '是否离线模式', - `is_open_certifi` tinyint(1) NULL DEFAULT NULL COMMENT '是否使用证书', - `is_rf_control` tinyint(1) NULL DEFAULT NULL COMMENT '是否启用射频遥控', - `is_rf_learn` tinyint(1) NULL DEFAULT NULL COMMENT '是否遥控配对', - `is_rf_clear` tinyint(1) NULL DEFAULT NULL COMMENT '是否遥控清码', - `rf_one_func` tinyint(0) NULL DEFAULT NULL COMMENT 'RF遥控第一个按键功能', - `rf_two_func` tinyint(0) NULL DEFAULT NULL COMMENT 'RF遥控第二个按键功能', - `rf_three_func` tinyint(0) NULL DEFAULT NULL COMMENT 'RF遥控第三个按键功能', - `rf_four_func` tinyint(0) NULL DEFAULT NULL COMMENT 'RF遥控第四个按键功能', - `owner_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '设备用户ID,用于记录配网后用户的变更', - `network_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '配网地址', - `network_ip` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '配网IP', - `radar_interval` smallint(0) NULL DEFAULT NULL COMMENT '雷达感应间隔,单位秒', - `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '删除标志(0代表存在 2代表删除)', - `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`device_set_id`) USING BTREE, - INDEX `iot_device_config`(`device_id`) USING BTREE, - CONSTRAINT `iot_device_config` FOREIGN KEY (`device_id`) REFERENCES `iot_device` (`device_id`) ON DELETE SET NULL ON UPDATE RESTRICT -) ENGINE = InnoDB AUTO_INCREMENT = 300 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of iot_device_set --- ---------------------------- -INSERT INTO `iot_device_set` VALUES (1, 1, '7CDFA1049ADA', 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 2, 3, 4, '1', '内网', '127.0.0.1', 5, '0', '', '2021-06-26 20:25:10', '', NULL, NULL); -INSERT INTO `iot_device_set` VALUES (2, 2, '7CDFA1049ADB', 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 2, 3, 4, '1', '内网', '127.0.0.1', 5, '0', '', '2021-06-01 00:12:26', '', '2021-06-23 20:59:33', NULL); -INSERT INTO `iot_device_set` VALUES (3, 4, '863488052352472', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', NULL, '', NULL, NULL); - --- ---------------------------- --- Table structure for iot_device_status --- ---------------------------- -DROP TABLE IF EXISTS `iot_device_status`; -CREATE TABLE `iot_device_status` ( - `device_status_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '设备状态ID', - `device_id` bigint(0) NULL DEFAULT NULL COMMENT '设备ID', - `device_num` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '设备编号', - `relay_status` tinyint(1) NULL DEFAULT NULL COMMENT '继电器状态:0-关,1-开', - `light_status` tinyint(1) NULL DEFAULT NULL COMMENT '灯状态:0-关,1-开', - `is_online` tinyint(1) NULL DEFAULT NULL COMMENT '设备是否在线', - `rssi` tinyint(0) NULL DEFAULT NULL COMMENT 'wifi信号强度', - `device_temperature` float(6, 2) NULL DEFAULT NULL COMMENT '设备温度', - `air_temperature` float(6, 2) NULL DEFAULT NULL COMMENT '空气温度', - `air_humidity` float(6, 2) NULL DEFAULT NULL COMMENT '空气湿度', - `trigger_source` tinyint(0) NULL DEFAULT NULL COMMENT '触发源:0-无、1-按键、2.手机、3-浏览器、4-射频遥控、5-雷达、6-报警、7-定时', - `brightness` tinyint(0) UNSIGNED NULL DEFAULT NULL COMMENT '灯的亮度:0-100', - `light_interval` int(0) NULL DEFAULT NULL COMMENT '渐变、动感模式闪烁间隔,单位秒', - `light_mode` tinyint(0) NULL DEFAULT NULL COMMENT '灯模式:1-、2-、3-、4-、5-、6-', - `fade_time` int(0) NULL DEFAULT NULL COMMENT '灯渐变时间', - `red` tinyint(0) UNSIGNED NULL DEFAULT NULL COMMENT '红灯值:0-255', - `green` tinyint(0) UNSIGNED NULL DEFAULT NULL COMMENT '绿灯值:0-255', - `blue` tinyint(0) UNSIGNED NULL DEFAULT NULL COMMENT '蓝灯值:0-255', - `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '删除标志(0代表存在 2代表删除)', - `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`device_status_id`) USING BTREE, - INDEX `iot_device_status`(`device_id`) USING BTREE, - CONSTRAINT `iot_device_status` FOREIGN KEY (`device_id`) REFERENCES `iot_device` (`device_id`) ON DELETE SET NULL ON UPDATE RESTRICT -) ENGINE = InnoDB AUTO_INCREMENT = 2879 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of iot_device_status --- ---------------------------- -INSERT INTO `iot_device_status` VALUES (1, 1, '7CDFA1049ADA', 1, 1, 1, -80, 36.52, 0.00, 0.00, 0, 100, 432, 0, 259, 255, 254, 241, '0', '', '2021-06-26 20:27:17', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2, 2, '7CDFA1049ADB', 0, 1, 0, -46, 23.78, 0.00, 0.00, 0, 100, 100, 0, 100, 255, 255, 255, '0', '', '2021-06-01 00:13:38', '', '2021-06-23 21:00:37', NULL); -INSERT INTO `iot_device_status` VALUES (2846, 1, '7CDFA1049ADA', 1, 0, 1, -80, 36.52, 0.00, 0.00, 0, 100, 432, 0, 259, 255, 254, 241, '0', '', '2021-08-26 18:38:11', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2847, 1, '7CDFA1049ADA', 1, 1, 1, -80, 36.52, 0.00, 0.00, 0, 100, 432, 0, 259, 255, 254, 241, '0', '', '2021-08-26 18:38:12', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2848, 1, '7CDFA1049ADA', 1, 0, 1, -80, 36.52, 0.00, 0.00, 0, 100, 432, 0, 259, 255, 254, 241, '0', '', '2021-08-26 18:38:13', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2849, 1, '7CDFA1049ADA', 1, 1, 1, -80, 36.52, 0.00, 0.00, 0, 100, 432, 0, 259, 255, 254, 241, '0', '', '2021-08-26 18:38:17', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2850, 4, '863488052352472', 1, 1, 1, -80, 36.52, 0.00, 0.00, 0, 100, 432, 0, 259, 255, 254, 241, '0', '', '2021-08-26 18:38:17', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2851, 4, '863488052352472', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:11:20', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2852, 4, '863488052352472', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:11:22', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2853, 4, '863488052352472', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:11:23', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2854, 4, '863488052352472', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:14:13', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2855, 4, '863488052352472', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:14:13', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2856, 4, '863488052352472', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:19:29', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2857, 4, '863488052352472', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:19:31', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2858, 4, '863488052352472', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:20:02', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2859, 4, '863488052352472', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:20:03', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2860, 4, '863488052352472', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:23:34', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2861, 4, '863488052352472', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:23:40', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2862, 4, '863488052352472', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:24:37', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2863, 4, '863488052352472', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:24:39', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2864, 4, '863488052352472', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:24:41', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2865, 4, '863488052352472', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:24:43', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2866, 4, '863488052352472', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:24:47', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2867, 4, '863488052352472', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:24:50', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2868, 4, '863488052352472', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:24:51', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2869, 4, '863488052352472', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:25:08', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2870, 4, '863488052352472', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:25:10', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2871, 4, '863488052352472', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:25:10', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2872, 4, '863488052352472', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:25:11', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2873, 4, '863488052352472', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:25:12', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2874, 4, '863488052352472', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:25:13', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2875, 4, '863488052352472', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:25:14', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2876, 4, '863488052352472', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:25:14', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2877, 4, '863488052352472', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:25:15', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2878, 4, '863488052352472', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:25:15', '', NULL, NULL); - --- ---------------------------- --- Table structure for iot_device_user_relation --- ---------------------------- -DROP TABLE IF EXISTS `iot_device_user_relation`; -CREATE TABLE `iot_device_user_relation` ( - `id` int(0) NOT NULL AUTO_INCREMENT, - `user_id` int(0) NOT NULL, - `device_id` int(0) NOT NULL, - `device_num` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `device_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '设备名称', - `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '设备备注', - `gmt_time` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0), - `gmt_update` timestamp(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0), - PRIMARY KEY (`id`) USING BTREE, - INDEX `user_id`(`user_id`, `device_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 14 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '用户-设备关联表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of iot_device_user_relation --- ---------------------------- -INSERT INTO `iot_device_user_relation` VALUES (8, 115, 4, '863488052352472', 'wxy测试开关', NULL, '2021-08-28 13:35:23', NULL); -INSERT INTO `iot_device_user_relation` VALUES (10, 114, 4, '863488052352472', '阿拉丁神灯', '灯等等灯', '2021-08-30 10:57:14', '2021-08-30 15:28:25'); -INSERT INTO `iot_device_user_relation` VALUES (13, 116, 4, '863488052352472', '阿拉丁神灯', NULL, '2021-08-31 20:24:31', NULL); - --- ---------------------------- --- Table structure for iot_group --- ---------------------------- -DROP TABLE IF EXISTS `iot_group`; -CREATE TABLE `iot_group` ( - `group_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '设备分组ID', - `user_id` bigint(0) NOT NULL COMMENT '用户ID', - `group_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '设备分组名称', - `group_order` smallint(5) UNSIGNED ZEROFILL NULL DEFAULT 00000 COMMENT '分组的排序', - `del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '0' COMMENT '删除标志(0代表存在 2代表删除)', - `create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`group_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of iot_group --- ---------------------------- -INSERT INTO `iot_group` VALUES (1, 114, '一楼', 00001, '0', '', '2021-05-18 16:35:03', '', '2021-05-18 16:35:32', '智能灯'); -INSERT INTO `iot_group` VALUES (2, 114, '二楼', 00002, '0', '', '2021-05-18 16:35:03', '', '2021-05-18 16:35:32', '智能灯'); -INSERT INTO `iot_group` VALUES (3, 114, '三楼', 00003, '0', '', '2021-05-18 16:35:03', '', '2021-05-18 16:35:32', '智能灯'); -INSERT INTO `iot_group` VALUES (4, 114, '四楼', 00004, '0', '', '2021-05-18 16:35:03', '', '2021-05-18 16:35:32', '智能灯'); -INSERT INTO `iot_group` VALUES (5, 114, '五楼', 00005, '0', '', '2021-05-18 16:35:03', '', '2021-05-18 16:35:32', '智能灯'); - --- ---------------------------- --- Table structure for qrtz_blob_triggers --- ---------------------------- -DROP TABLE IF EXISTS `qrtz_blob_triggers`; -CREATE TABLE `qrtz_blob_triggers` ( - `sched_name` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `trigger_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `trigger_group` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `blob_data` blob NULL, - PRIMARY KEY (`sched_name`, `trigger_name`, `trigger_group`) USING BTREE, - CONSTRAINT `QRTZ_BLOB_TRIGGERS_ibfk_1` FOREIGN KEY (`sched_name`, `trigger_name`, `trigger_group`) REFERENCES `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for qrtz_calendars --- ---------------------------- -DROP TABLE IF EXISTS `qrtz_calendars`; -CREATE TABLE `qrtz_calendars` ( - `sched_name` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `calendar_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `calendar` blob NOT NULL, - PRIMARY KEY (`sched_name`, `calendar_name`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for qrtz_cron_triggers --- ---------------------------- -DROP TABLE IF EXISTS `qrtz_cron_triggers`; -CREATE TABLE `qrtz_cron_triggers` ( - `sched_name` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `trigger_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `trigger_group` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `cron_expression` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `time_zone_id` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, - PRIMARY KEY (`sched_name`, `trigger_name`, `trigger_group`) USING BTREE, - CONSTRAINT `QRTZ_CRON_TRIGGERS_ibfk_1` FOREIGN KEY (`sched_name`, `trigger_name`, `trigger_group`) REFERENCES `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of qrtz_cron_triggers --- ---------------------------- -INSERT INTO `qrtz_cron_triggers` VALUES ('RuoyiScheduler', 'TASK_CLASS_NAME1', 'DEFAULT', '0/10 * * * * ?', 'Asia/Shanghai'); -INSERT INTO `qrtz_cron_triggers` VALUES ('RuoyiScheduler', 'TASK_CLASS_NAME2', 'DEFAULT', '0/15 * * * * ?', 'Asia/Shanghai'); -INSERT INTO `qrtz_cron_triggers` VALUES ('RuoyiScheduler', 'TASK_CLASS_NAME3', 'DEFAULT', '0/20 * * * * ?', 'Asia/Shanghai'); - --- ---------------------------- --- Table structure for qrtz_fired_triggers --- ---------------------------- -DROP TABLE IF EXISTS `qrtz_fired_triggers`; -CREATE TABLE `qrtz_fired_triggers` ( - `sched_name` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `entry_id` varchar(95) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `trigger_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `trigger_group` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `instance_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `fired_time` bigint(0) NOT NULL, - `sched_time` bigint(0) NOT NULL, - `priority` int(0) NOT NULL, - `state` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `job_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, - `job_group` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, - `is_nonconcurrent` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, - `requests_recovery` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, - PRIMARY KEY (`sched_name`, `entry_id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for qrtz_job_details --- ---------------------------- -DROP TABLE IF EXISTS `qrtz_job_details`; -CREATE TABLE `qrtz_job_details` ( - `sched_name` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `job_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `job_group` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `description` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, - `job_class_name` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `is_durable` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `is_nonconcurrent` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `is_update_data` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `requests_recovery` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `job_data` blob NULL, - PRIMARY KEY (`sched_name`, `job_name`, `job_group`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of qrtz_job_details --- ---------------------------- -INSERT INTO `qrtz_job_details` VALUES ('RuoyiScheduler', 'TASK_CLASS_NAME1', 'DEFAULT', NULL, 'com.ruoyi.quartz.util.QuartzDisallowConcurrentExecution', '0', '1', '0', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C7708000000100000000174000F5441534B5F50524F504552544945537372001E636F6D2E72756F79692E71756172747A2E646F6D61696E2E5379734A6F6200000000000000010200084C000A636F6E63757272656E747400124C6A6176612F6C616E672F537472696E673B4C000E63726F6E45787072657373696F6E71007E00094C000C696E766F6B6554617267657471007E00094C00086A6F6247726F757071007E00094C00056A6F6249647400104C6A6176612F6C616E672F4C6F6E673B4C00076A6F624E616D6571007E00094C000D6D697366697265506F6C69637971007E00094C000673746174757371007E000978720027636F6D2E72756F79692E636F6D6D6F6E2E636F72652E646F6D61696E2E42617365456E7469747900000000000000010200074C0008637265617465427971007E00094C000A63726561746554696D657400104C6A6176612F7574696C2F446174653B4C0006706172616D7371007E00034C000672656D61726B71007E00094C000B73656172636856616C756571007E00094C0008757064617465427971007E00094C000A75706461746554696D6571007E000C787074000561646D696E7372000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001797B913EF878707400007070707400013174000E302F3130202A202A202A202A203F74001172795461736B2E72794E6F506172616D7374000744454641554C547372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000000000001740018E7B3BBE7BB9FE9BB98E8AEA4EFBC88E697A0E58F82EFBC8974000133740001317800); -INSERT INTO `qrtz_job_details` VALUES ('RuoyiScheduler', 'TASK_CLASS_NAME2', 'DEFAULT', NULL, 'com.ruoyi.quartz.util.QuartzDisallowConcurrentExecution', '0', '1', '0', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C7708000000100000000174000F5441534B5F50524F504552544945537372001E636F6D2E72756F79692E71756172747A2E646F6D61696E2E5379734A6F6200000000000000010200084C000A636F6E63757272656E747400124C6A6176612F6C616E672F537472696E673B4C000E63726F6E45787072657373696F6E71007E00094C000C696E766F6B6554617267657471007E00094C00086A6F6247726F757071007E00094C00056A6F6249647400104C6A6176612F6C616E672F4C6F6E673B4C00076A6F624E616D6571007E00094C000D6D697366697265506F6C69637971007E00094C000673746174757371007E000978720027636F6D2E72756F79692E636F6D6D6F6E2E636F72652E646F6D61696E2E42617365456E7469747900000000000000010200074C0008637265617465427971007E00094C000A63726561746554696D657400104C6A6176612F7574696C2F446174653B4C0006706172616D7371007E00034C000672656D61726B71007E00094C000B73656172636856616C756571007E00094C0008757064617465427971007E00094C000A75706461746554696D6571007E000C787074000561646D696E7372000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001797B913EF878707400007070707400013174000E302F3135202A202A202A202A203F74001572795461736B2E7279506172616D7328277279272974000744454641554C547372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000000000002740018E7B3BBE7BB9FE9BB98E8AEA4EFBC88E69C89E58F82EFBC8974000133740001317800); -INSERT INTO `qrtz_job_details` VALUES ('RuoyiScheduler', 'TASK_CLASS_NAME3', 'DEFAULT', NULL, 'com.ruoyi.quartz.util.QuartzDisallowConcurrentExecution', '0', '1', '0', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C7708000000100000000174000F5441534B5F50524F504552544945537372001E636F6D2E72756F79692E71756172747A2E646F6D61696E2E5379734A6F6200000000000000010200084C000A636F6E63757272656E747400124C6A6176612F6C616E672F537472696E673B4C000E63726F6E45787072657373696F6E71007E00094C000C696E766F6B6554617267657471007E00094C00086A6F6247726F757071007E00094C00056A6F6249647400104C6A6176612F6C616E672F4C6F6E673B4C00076A6F624E616D6571007E00094C000D6D697366697265506F6C69637971007E00094C000673746174757371007E000978720027636F6D2E72756F79692E636F6D6D6F6E2E636F72652E646F6D61696E2E42617365456E7469747900000000000000010200074C0008637265617465427971007E00094C000A63726561746554696D657400104C6A6176612F7574696C2F446174653B4C0006706172616D7371007E00034C000672656D61726B71007E00094C000B73656172636856616C756571007E00094C0008757064617465427971007E00094C000A75706461746554696D6571007E000C787074000561646D696E7372000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001797B913EF878707400007070707400013174000E302F3230202A202A202A202A203F74003872795461736B2E72794D756C7469706C65506172616D7328277279272C20747275652C20323030304C2C203331362E3530442C203130302974000744454641554C547372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000000000003740018E7B3BBE7BB9FE9BB98E8AEA4EFBC88E5A49AE58F82EFBC8974000133740001317800); - --- ---------------------------- --- Table structure for qrtz_locks --- ---------------------------- -DROP TABLE IF EXISTS `qrtz_locks`; -CREATE TABLE `qrtz_locks` ( - `sched_name` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `lock_name` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - PRIMARY KEY (`sched_name`, `lock_name`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of qrtz_locks --- ---------------------------- -INSERT INTO `qrtz_locks` VALUES ('RuoyiScheduler', 'STATE_ACCESS'); -INSERT INTO `qrtz_locks` VALUES ('RuoyiScheduler', 'TRIGGER_ACCESS'); - --- ---------------------------- --- Table structure for qrtz_paused_trigger_grps --- ---------------------------- -DROP TABLE IF EXISTS `qrtz_paused_trigger_grps`; -CREATE TABLE `qrtz_paused_trigger_grps` ( - `sched_name` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `trigger_group` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - PRIMARY KEY (`sched_name`, `trigger_group`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for qrtz_scheduler_state --- ---------------------------- -DROP TABLE IF EXISTS `qrtz_scheduler_state`; -CREATE TABLE `qrtz_scheduler_state` ( - `sched_name` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `instance_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `last_checkin_time` bigint(0) NOT NULL, - `checkin_interval` bigint(0) NOT NULL, - PRIMARY KEY (`sched_name`, `instance_name`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of qrtz_scheduler_state --- ---------------------------- -INSERT INTO `qrtz_scheduler_state` VALUES ('RuoyiScheduler', 'Admin1630461270994', 1630548198218, 15000); - --- ---------------------------- --- Table structure for qrtz_simple_triggers --- ---------------------------- -DROP TABLE IF EXISTS `qrtz_simple_triggers`; -CREATE TABLE `qrtz_simple_triggers` ( - `sched_name` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `trigger_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `trigger_group` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `repeat_count` bigint(0) NOT NULL, - `repeat_interval` bigint(0) NOT NULL, - `times_triggered` bigint(0) NOT NULL, - PRIMARY KEY (`sched_name`, `trigger_name`, `trigger_group`) USING BTREE, - CONSTRAINT `QRTZ_SIMPLE_TRIGGERS_ibfk_1` FOREIGN KEY (`sched_name`, `trigger_name`, `trigger_group`) REFERENCES `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for qrtz_simprop_triggers --- ---------------------------- -DROP TABLE IF EXISTS `qrtz_simprop_triggers`; -CREATE TABLE `qrtz_simprop_triggers` ( - `sched_name` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `trigger_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `trigger_group` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `str_prop_1` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, - `str_prop_2` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, - `str_prop_3` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, - `int_prop_1` int(0) NULL DEFAULT NULL, - `int_prop_2` int(0) NULL DEFAULT NULL, - `long_prop_1` bigint(0) NULL DEFAULT NULL, - `long_prop_2` bigint(0) NULL DEFAULT NULL, - `dec_prop_1` decimal(13, 4) NULL DEFAULT NULL, - `dec_prop_2` decimal(13, 4) NULL DEFAULT NULL, - `bool_prop_1` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, - `bool_prop_2` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, - PRIMARY KEY (`sched_name`, `trigger_name`, `trigger_group`) USING BTREE, - CONSTRAINT `QRTZ_SIMPROP_TRIGGERS_ibfk_1` FOREIGN KEY (`sched_name`, `trigger_name`, `trigger_group`) REFERENCES `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for qrtz_triggers --- ---------------------------- -DROP TABLE IF EXISTS `qrtz_triggers`; -CREATE TABLE `qrtz_triggers` ( - `sched_name` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `trigger_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `trigger_group` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `job_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `job_group` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `description` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, - `next_fire_time` bigint(0) NULL DEFAULT NULL, - `prev_fire_time` bigint(0) NULL DEFAULT NULL, - `priority` int(0) NULL DEFAULT NULL, - `trigger_state` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `trigger_type` varchar(8) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `start_time` bigint(0) NOT NULL, - `end_time` bigint(0) NULL DEFAULT NULL, - `calendar_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, - `misfire_instr` smallint(0) NULL DEFAULT NULL, - `job_data` blob NULL, - PRIMARY KEY (`sched_name`, `trigger_name`, `trigger_group`) USING BTREE, - INDEX `sched_name`(`sched_name`, `job_name`, `job_group`) USING BTREE, - CONSTRAINT `QRTZ_TRIGGERS_ibfk_1` FOREIGN KEY (`sched_name`, `job_name`, `job_group`) REFERENCES `qrtz_job_details` (`sched_name`, `job_name`, `job_group`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of qrtz_triggers --- ---------------------------- -INSERT INTO `qrtz_triggers` VALUES ('RuoyiScheduler', 'TASK_CLASS_NAME1', 'DEFAULT', 'TASK_CLASS_NAME1', 'DEFAULT', NULL, 1630461280000, -1, 5, 'PAUSED', 'CRON', 1630461271000, 0, NULL, 2, ''); -INSERT INTO `qrtz_triggers` VALUES ('RuoyiScheduler', 'TASK_CLASS_NAME2', 'DEFAULT', 'TASK_CLASS_NAME2', 'DEFAULT', NULL, 1630461285000, -1, 5, 'PAUSED', 'CRON', 1630461271000, 0, NULL, 2, ''); -INSERT INTO `qrtz_triggers` VALUES ('RuoyiScheduler', 'TASK_CLASS_NAME3', 'DEFAULT', 'TASK_CLASS_NAME3', 'DEFAULT', NULL, 1630461280000, -1, 5, 'PAUSED', 'CRON', 1630461271000, 0, NULL, 2, ''); - --- ---------------------------- --- Table structure for sys_config --- ---------------------------- -DROP TABLE IF EXISTS `sys_config`; -CREATE TABLE `sys_config` ( - `config_id` int(0) NOT NULL AUTO_INCREMENT COMMENT '参数主键', - `config_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '参数名称', - `config_key` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '参数键名', - `config_value` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '参数键值', - `config_type` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'N' COMMENT '系统内置(Y是 N否)', - `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`config_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '参数配置表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_config --- ---------------------------- -INSERT INTO `sys_config` VALUES (1, '主框架页-默认皮肤样式名称', 'sys.index.skinName', 'skin-blue', 'Y', 'admin', '2021-05-18 02:23:07', '', NULL, '蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow'); -INSERT INTO `sys_config` VALUES (2, '用户管理-账号初始密码', 'sys.user.initPassword', '123456', 'Y', 'admin', '2021-05-18 02:23:07', '', NULL, '初始化密码 123456'); -INSERT INTO `sys_config` VALUES (3, '主框架页-侧边栏主题', 'sys.index.sideTheme', 'theme-dark', 'Y', 'admin', '2021-05-18 02:23:07', '', NULL, '深色主题theme-dark,浅色主题theme-light'); - --- ---------------------------- --- Table structure for sys_dept --- ---------------------------- -DROP TABLE IF EXISTS `sys_dept`; -CREATE TABLE `sys_dept` ( - `dept_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '部门id', - `parent_id` bigint(0) NULL DEFAULT 0 COMMENT '父部门id', - `ancestors` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '祖级列表', - `dept_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '部门名称', - `order_num` int(0) NULL DEFAULT 0 COMMENT '显示顺序', - `leader` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '负责人', - `phone` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '联系电话', - `email` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮箱', - `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '部门状态(0正常 1停用)', - `del_flag` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '删除标志(0代表存在 2代表删除)', - `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - PRIMARY KEY (`dept_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 110 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '部门表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_dept --- ---------------------------- -INSERT INTO `sys_dept` VALUES (100, 0, '0', '若依科技', 0, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2021-05-18 02:23:06', '', NULL); -INSERT INTO `sys_dept` VALUES (101, 100, '0,100', '深圳总公司', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2021-05-18 02:23:06', '', NULL); -INSERT INTO `sys_dept` VALUES (102, 100, '0,100', '长沙分公司', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2021-05-18 02:23:06', '', NULL); -INSERT INTO `sys_dept` VALUES (103, 101, '0,100,101', '研发部门', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2021-05-18 02:23:06', '', NULL); -INSERT INTO `sys_dept` VALUES (104, 101, '0,100,101', '市场部门', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2021-05-18 02:23:06', '', NULL); -INSERT INTO `sys_dept` VALUES (105, 101, '0,100,101', '测试部门', 3, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2021-05-18 02:23:06', '', NULL); -INSERT INTO `sys_dept` VALUES (106, 101, '0,100,101', '财务部门', 4, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2021-05-18 02:23:06', '', NULL); -INSERT INTO `sys_dept` VALUES (107, 101, '0,100,101', '运维部门', 5, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2021-05-18 02:23:06', '', NULL); -INSERT INTO `sys_dept` VALUES (108, 102, '0,100,102', '市场部门', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2021-05-18 02:23:06', '', NULL); -INSERT INTO `sys_dept` VALUES (109, 102, '0,100,102', '财务部门', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2021-05-18 02:23:06', '', NULL); - --- ---------------------------- --- Table structure for sys_dict_data --- ---------------------------- -DROP TABLE IF EXISTS `sys_dict_data`; -CREATE TABLE `sys_dict_data` ( - `dict_code` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '字典编码', - `dict_sort` int(0) NULL DEFAULT 0 COMMENT '字典排序', - `dict_label` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '字典标签', - `dict_value` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '字典键值', - `dict_type` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '字典类型', - `css_class` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '样式属性(其他样式扩展)', - `list_class` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '表格回显样式', - `is_default` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'N' COMMENT '是否默认(Y是 N否)', - `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '状态(0正常 1停用)', - `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`dict_code`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 119 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '字典数据表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_dict_data --- ---------------------------- -INSERT INTO `sys_dict_data` VALUES (1, 1, '男', '0', 'sys_user_sex', '', '', 'Y', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '性别男'); -INSERT INTO `sys_dict_data` VALUES (2, 2, '女', '1', 'sys_user_sex', '', '', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '性别女'); -INSERT INTO `sys_dict_data` VALUES (3, 3, '未知', '2', 'sys_user_sex', '', '', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '性别未知'); -INSERT INTO `sys_dict_data` VALUES (4, 1, '显示', '0', 'sys_show_hide', '', 'primary', 'Y', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '显示菜单'); -INSERT INTO `sys_dict_data` VALUES (5, 2, '隐藏', '1', 'sys_show_hide', '', 'danger', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '隐藏菜单'); -INSERT INTO `sys_dict_data` VALUES (6, 1, '正常', '0', 'sys_normal_disable', '', 'primary', 'Y', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '正常状态'); -INSERT INTO `sys_dict_data` VALUES (7, 2, '停用', '1', 'sys_normal_disable', '', 'danger', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '停用状态'); -INSERT INTO `sys_dict_data` VALUES (8, 1, '正常', '0', 'sys_job_status', '', 'primary', 'Y', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '正常状态'); -INSERT INTO `sys_dict_data` VALUES (9, 2, '暂停', '1', 'sys_job_status', '', 'danger', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '停用状态'); -INSERT INTO `sys_dict_data` VALUES (10, 1, '默认', 'DEFAULT', 'sys_job_group', '', '', 'Y', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '默认分组'); -INSERT INTO `sys_dict_data` VALUES (11, 2, '系统', 'SYSTEM', 'sys_job_group', '', '', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '系统分组'); -INSERT INTO `sys_dict_data` VALUES (12, 1, '是', 'Y', 'sys_yes_no', '', 'primary', 'Y', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '系统默认是'); -INSERT INTO `sys_dict_data` VALUES (13, 2, '否', 'N', 'sys_yes_no', '', 'danger', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '系统默认否'); -INSERT INTO `sys_dict_data` VALUES (14, 1, '通知', '1', 'sys_notice_type', '', 'warning', 'Y', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '通知'); -INSERT INTO `sys_dict_data` VALUES (15, 2, '公告', '2', 'sys_notice_type', '', 'success', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '公告'); -INSERT INTO `sys_dict_data` VALUES (16, 1, '正常', '0', 'sys_notice_status', '', 'primary', 'Y', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '正常状态'); -INSERT INTO `sys_dict_data` VALUES (17, 2, '关闭', '1', 'sys_notice_status', '', 'danger', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '关闭状态'); -INSERT INTO `sys_dict_data` VALUES (18, 1, '新增', '1', 'sys_oper_type', '', 'info', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '新增操作'); -INSERT INTO `sys_dict_data` VALUES (19, 2, '修改', '2', 'sys_oper_type', '', 'info', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '修改操作'); -INSERT INTO `sys_dict_data` VALUES (20, 3, '删除', '3', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '删除操作'); -INSERT INTO `sys_dict_data` VALUES (21, 4, '授权', '4', 'sys_oper_type', '', 'primary', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '授权操作'); -INSERT INTO `sys_dict_data` VALUES (22, 5, '导出', '5', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '导出操作'); -INSERT INTO `sys_dict_data` VALUES (23, 6, '导入', '6', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '导入操作'); -INSERT INTO `sys_dict_data` VALUES (24, 7, '强退', '7', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '强退操作'); -INSERT INTO `sys_dict_data` VALUES (25, 8, '生成代码', '8', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '生成操作'); -INSERT INTO `sys_dict_data` VALUES (26, 9, '清空数据', '9', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '清空操作'); -INSERT INTO `sys_dict_data` VALUES (27, 1, '成功', '0', 'sys_common_status', '', 'primary', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '正常状态'); -INSERT INTO `sys_dict_data` VALUES (28, 2, '失败', '1', 'sys_common_status', '', 'danger', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '停用状态'); -INSERT INTO `sys_dict_data` VALUES (100, 0, '按键', '1', 'iot_trigger_source', NULL, NULL, 'N', '0', 'admin', '2021-05-05 15:53:34', 'admin', '2021-05-05 15:54:17', '按键操作'); -INSERT INTO `sys_dict_data` VALUES (101, 0, '手机', '2', 'iot_trigger_source', NULL, NULL, 'N', '0', 'admin', '2021-05-05 15:53:50', '', NULL, '手机操作'); -INSERT INTO `sys_dict_data` VALUES (102, 0, '浏览器', '3', 'iot_trigger_source', NULL, NULL, 'N', '0', 'admin', '2021-05-05 15:54:09', '', NULL, '浏览器操作'); -INSERT INTO `sys_dict_data` VALUES (103, 0, '射频遥控', '4', 'iot_trigger_source', NULL, NULL, 'N', '0', 'admin', '2021-05-05 15:54:44', '', NULL, '433M遥控操作'); -INSERT INTO `sys_dict_data` VALUES (104, 0, '雷达', '5', 'iot_trigger_source', NULL, NULL, 'N', '0', 'admin', '2021-05-05 15:55:03', '', NULL, '雷达触发'); -INSERT INTO `sys_dict_data` VALUES (105, 0, '报警', '6', 'iot_trigger_source', NULL, NULL, 'N', '0', 'admin', '2021-05-05 15:55:44', '', NULL, '报警触发'); -INSERT INTO `sys_dict_data` VALUES (106, 0, '定时', '7', 'iot_trigger_source', NULL, NULL, 'N', '0', 'admin', '2021-05-05 15:56:03', '', NULL, '定时触发'); -INSERT INTO `sys_dict_data` VALUES (107, 1, '继电器开关', '1', 'rf_function', NULL, NULL, 'N', '0', 'admin', '2021-05-05 15:58:36', 'admin', '2021-06-23 22:50:32', '继电器通断'); -INSERT INTO `sys_dict_data` VALUES (108, 2, '七彩灯开关', '2', 'rf_function', NULL, NULL, 'N', '0', 'admin', '2021-05-05 15:58:57', 'admin', '2021-06-23 22:50:44', '开关灯'); -INSERT INTO `sys_dict_data` VALUES (109, 3, '雷达开关', '3', 'rf_function', NULL, NULL, 'N', '0', 'admin', '2021-05-05 15:59:34', 'admin', '2021-06-23 22:50:21', '开关雷达'); -INSERT INTO `sys_dict_data` VALUES (110, 4, '报警开关', '4', 'rf_function', NULL, NULL, 'N', '0', 'admin', '2021-05-05 16:00:01', 'admin', '2021-06-01 15:44:44', '报警开关'); -INSERT INTO `sys_dict_data` VALUES (111, 5, '智能配网', '5', 'rf_function', NULL, NULL, 'N', '0', 'admin', '2021-05-05 16:00:16', 'admin', '2021-06-01 15:44:51', '智能配网'); -INSERT INTO `sys_dict_data` VALUES (112, 0, '固定颜色', '0', 'light_mode', NULL, NULL, 'N', '0', 'admin', '2021-05-05 16:07:22', '', NULL, '固定颜色'); -INSERT INTO `sys_dict_data` VALUES (113, 0, '七彩渐变', '1', 'light_mode', NULL, NULL, 'N', '0', 'admin', '2021-05-05 16:07:41', '', NULL, '七彩渐变'); -INSERT INTO `sys_dict_data` VALUES (114, 0, '动感模式', '2', 'light_mode', NULL, NULL, 'N', '0', 'admin', '2021-05-05 16:08:44', '', NULL, '动感模式'); -INSERT INTO `sys_dict_data` VALUES (115, 0, '单色渐变', '3', 'light_mode', NULL, NULL, 'N', '0', 'admin', '2021-05-05 16:09:12', '', NULL, '单色渐变'); -INSERT INTO `sys_dict_data` VALUES (116, 0, '白光', '4', 'light_mode', NULL, NULL, 'N', '0', 'admin', '2021-05-05 16:09:46', '', NULL, '白光'); -INSERT INTO `sys_dict_data` VALUES (117, 0, '暖光', '5', 'light_mode', NULL, NULL, 'N', '0', 'admin', '2021-05-05 16:10:07', '', NULL, '暖光'); -INSERT INTO `sys_dict_data` VALUES (118, 0, '无', '0', 'rf_function', NULL, NULL, 'N', '0', 'admin', '2021-06-01 15:43:44', 'admin', '2021-06-01 15:44:21', '不进行任何操作'); - --- ---------------------------- --- Table structure for sys_dict_type --- ---------------------------- -DROP TABLE IF EXISTS `sys_dict_type`; -CREATE TABLE `sys_dict_type` ( - `dict_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '字典主键', - `dict_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '字典名称', - `dict_type` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '字典类型', - `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '状态(0正常 1停用)', - `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`dict_id`) USING BTREE, - UNIQUE INDEX `dict_type`(`dict_type`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 103 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '字典类型表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_dict_type --- ---------------------------- -INSERT INTO `sys_dict_type` VALUES (1, '用户性别', 'sys_user_sex', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '用户性别列表'); -INSERT INTO `sys_dict_type` VALUES (2, '菜单状态', 'sys_show_hide', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '菜单状态列表'); -INSERT INTO `sys_dict_type` VALUES (3, '系统开关', 'sys_normal_disable', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '系统开关列表'); -INSERT INTO `sys_dict_type` VALUES (4, '任务状态', 'sys_job_status', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '任务状态列表'); -INSERT INTO `sys_dict_type` VALUES (5, '任务分组', 'sys_job_group', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '任务分组列表'); -INSERT INTO `sys_dict_type` VALUES (6, '系统是否', 'sys_yes_no', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '系统是否列表'); -INSERT INTO `sys_dict_type` VALUES (7, '通知类型', 'sys_notice_type', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '通知类型列表'); -INSERT INTO `sys_dict_type` VALUES (8, '通知状态', 'sys_notice_status', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '通知状态列表'); -INSERT INTO `sys_dict_type` VALUES (9, '操作类型', 'sys_oper_type', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '操作类型列表'); -INSERT INTO `sys_dict_type` VALUES (10, '系统状态', 'sys_common_status', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '登录状态列表'); -INSERT INTO `sys_dict_type` VALUES (100, '设备触发源', 'iot_trigger_source', '0', 'admin', '2021-05-05 15:51:26', '', NULL, '设备操作的触发源'); -INSERT INTO `sys_dict_type` VALUES (101, '射频遥控按键功能', 'rf_function', '0', 'admin', '2021-05-05 15:58:05', '', NULL, '射频遥控按键功能列表'); -INSERT INTO `sys_dict_type` VALUES (102, '彩灯模式', 'light_mode', '0', 'admin', '2021-05-05 16:04:53', '', NULL, '彩灯模式,单色、七彩、渐变、动感'); - --- ---------------------------- --- Table structure for sys_job --- ---------------------------- -DROP TABLE IF EXISTS `sys_job`; -CREATE TABLE `sys_job` ( - `job_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '任务ID', - `job_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '任务名称', - `job_group` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'DEFAULT' COMMENT '任务组名', - `invoke_target` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '调用目标字符串', - `cron_expression` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT 'cron执行表达式', - `misfire_policy` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '3' COMMENT '计划执行错误策略(1立即执行 2执行一次 3放弃执行)', - `concurrent` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '1' COMMENT '是否并发执行(0允许 1禁止)', - `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '状态(0正常 1暂停)', - `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '备注信息', - PRIMARY KEY (`job_id`, `job_name`, `job_group`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '定时任务调度表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_job --- ---------------------------- -INSERT INTO `sys_job` VALUES (1, '系统默认(无参)', 'DEFAULT', 'ryTask.ryNoParams', '0/10 * * * * ?', '3', '1', '1', 'admin', '2021-05-18 02:23:07', '', NULL, ''); -INSERT INTO `sys_job` VALUES (2, '系统默认(有参)', 'DEFAULT', 'ryTask.ryParams(\'ry\')', '0/15 * * * * ?', '3', '1', '1', 'admin', '2021-05-18 02:23:07', '', NULL, ''); -INSERT INTO `sys_job` VALUES (3, '系统默认(多参)', 'DEFAULT', 'ryTask.ryMultipleParams(\'ry\', true, 2000L, 316.50D, 100)', '0/20 * * * * ?', '3', '1', '1', 'admin', '2021-05-18 02:23:07', '', NULL, ''); - --- ---------------------------- --- Table structure for sys_job_log --- ---------------------------- -DROP TABLE IF EXISTS `sys_job_log`; -CREATE TABLE `sys_job_log` ( - `job_log_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '任务日志ID', - `job_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '任务名称', - `job_group` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '任务组名', - `invoke_target` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '调用目标字符串', - `job_message` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '日志信息', - `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '执行状态(0正常 1失败)', - `exception_info` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '异常信息', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - PRIMARY KEY (`job_log_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '定时任务调度日志表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_job_log --- ---------------------------- -INSERT INTO `sys_job_log` VALUES (1, '系统默认(有参)', 'DEFAULT', 'ryTask.ryParams(\'ry\')', '系统默认(有参) 总共耗时:1毫秒', '0', '', '2021-06-11 09:23:45'); - --- ---------------------------- --- Table structure for sys_logininfor --- ---------------------------- -DROP TABLE IF EXISTS `sys_logininfor`; -CREATE TABLE `sys_logininfor` ( - `info_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '访问ID', - `user_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '用户账号', - `ipaddr` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '登录IP地址', - `login_location` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '登录地点', - `browser` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '浏览器类型', - `os` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '操作系统', - `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '登录状态(0成功 1失败)', - `msg` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '提示消息', - `login_time` datetime(0) NULL DEFAULT NULL COMMENT '访问时间', - PRIMARY KEY (`info_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 435 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '系统访问记录' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_logininfor --- ---------------------------- -INSERT INTO `sys_logininfor` VALUES (385, 'admin', '172.17.0.1', '内网IP', 'Mobile Safari', 'Android 1.x', '1', '用户不存在/密码错误', '2021-06-30 17:13:17'); -INSERT INTO `sys_logininfor` VALUES (386, 'admin', '172.17.0.1', '内网IP', 'Mobile Safari', 'Android 1.x', '1', '验证码已失效', '2021-06-30 17:13:34'); -INSERT INTO `sys_logininfor` VALUES (387, 'admin', '172.17.0.1', '内网IP', 'Mobile Safari', 'Android 1.x', '0', '登录成功', '2021-06-30 17:14:13'); -INSERT INTO `sys_logininfor` VALUES (388, 'admin', '222.95.162.245', 'XX XX', 'Chrome 9', 'Windows 10', '1', '用户不存在/密码错误', '2021-08-26 14:44:02'); -INSERT INTO `sys_logininfor` VALUES (389, 'admin', '222.95.162.245', 'XX XX', 'Chrome 9', 'Windows 10', '1', '验证码错误', '2021-08-26 14:44:08'); -INSERT INTO `sys_logininfor` VALUES (390, 'admin', '222.95.162.245', 'XX XX', 'Chrome 9', 'Windows 10', '0', '登录成功', '2021-08-26 14:44:59'); -INSERT INTO `sys_logininfor` VALUES (391, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:35:01'); -INSERT INTO `sys_logininfor` VALUES (392, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:37:13'); -INSERT INTO `sys_logininfor` VALUES (393, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:37:24'); -INSERT INTO `sys_logininfor` VALUES (394, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:37:36'); -INSERT INTO `sys_logininfor` VALUES (395, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:38:40'); -INSERT INTO `sys_logininfor` VALUES (396, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:38:56'); -INSERT INTO `sys_logininfor` VALUES (397, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:39:53'); -INSERT INTO `sys_logininfor` VALUES (398, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:39:56'); -INSERT INTO `sys_logininfor` VALUES (399, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:40:10'); -INSERT INTO `sys_logininfor` VALUES (400, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:40:19'); -INSERT INTO `sys_logininfor` VALUES (401, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:40:49'); -INSERT INTO `sys_logininfor` VALUES (402, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:41:42'); -INSERT INTO `sys_logininfor` VALUES (403, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:42:10'); -INSERT INTO `sys_logininfor` VALUES (404, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:42:26'); -INSERT INTO `sys_logininfor` VALUES (405, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:42:56'); -INSERT INTO `sys_logininfor` VALUES (406, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:43:05'); -INSERT INTO `sys_logininfor` VALUES (407, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:44:38'); -INSERT INTO `sys_logininfor` VALUES (408, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:44:48'); -INSERT INTO `sys_logininfor` VALUES (409, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:45:01'); -INSERT INTO `sys_logininfor` VALUES (410, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:51:20'); -INSERT INTO `sys_logininfor` VALUES (411, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:51:40'); -INSERT INTO `sys_logininfor` VALUES (412, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:51:54'); -INSERT INTO `sys_logininfor` VALUES (413, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:55:17'); -INSERT INTO `sys_logininfor` VALUES (414, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:58:28'); -INSERT INTO `sys_logininfor` VALUES (415, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 16:11:13'); -INSERT INTO `sys_logininfor` VALUES (416, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 16:16:40'); -INSERT INTO `sys_logininfor` VALUES (417, 'oRHbg4mTdANmQwDhuQAD8vBbkNG0', '222.95.162.245', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 16:23:04'); -INSERT INTO `sys_logininfor` VALUES (418, 'admin', '222.95.162.245', 'XX XX', 'Chrome 9', 'Windows 10', '0', '退出成功', '2021-08-26 16:24:11'); -INSERT INTO `sys_logininfor` VALUES (419, 'admin', '222.95.162.245', 'XX XX', 'Chrome 9', 'Windows 10', '0', '退出成功', '2021-08-26 16:24:11'); -INSERT INTO `sys_logininfor` VALUES (420, 'admin', '222.95.162.245', 'XX XX', 'Chrome 9', 'Windows 10', '0', '登录成功', '2021-08-26 16:30:13'); -INSERT INTO `sys_logininfor` VALUES (421, 'oRHbg4mTdANmQwDhuQAD8vBbkNG0', '222.95.162.245', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '0', '登录成功', '2021-08-26 16:30:59'); -INSERT INTO `sys_logininfor` VALUES (422, 'admin', '222.95.162.245', 'XX XX', 'Chrome 9', 'Windows 10', '0', '登录成功', '2021-08-26 16:54:25'); -INSERT INTO `sys_logininfor` VALUES (423, 'oRHbg4mTdANmQwDhuQAD8vBbkNG0', '222.95.162.245', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '0', '登录成功', '2021-08-26 16:56:12'); -INSERT INTO `sys_logininfor` VALUES (424, 'admin', '222.95.162.245', 'XX XX', 'Chrome 9', 'Windows 10', '0', '登录成功', '2021-08-26 16:58:05'); -INSERT INTO `sys_logininfor` VALUES (425, 'oRHbg4mTdANmQwDhuQAD8vBbkNG0', '222.95.162.245', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '0', '登录成功', '2021-08-26 16:59:32'); -INSERT INTO `sys_logininfor` VALUES (426, 'oRHbg4mTdANmQwDhuQAD8vBbkNG0', '222.95.162.245', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '0', '登录成功', '2021-08-26 16:59:48'); -INSERT INTO `sys_logininfor` VALUES (427, 'oRHbg4mTdANmQwDhuQAD8vBbkNG0', '222.95.162.245', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '0', '登录成功', '2021-08-26 17:00:19'); -INSERT INTO `sys_logininfor` VALUES (428, 'oRHbg4mTdANmQwDhuQAD8vBbkNG0', '222.95.162.245', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '0', '登录成功', '2021-08-26 17:01:36'); -INSERT INTO `sys_logininfor` VALUES (429, 'oRHbg4mTdANmQwDhuQAD8vBbkNG0', '222.95.162.245', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '0', '登录成功', '2021-08-26 17:02:12'); -INSERT INTO `sys_logininfor` VALUES (430, 'admin', '222.95.162.245', 'XX XX', 'Chrome 9', 'Windows 10', '0', '登录成功', '2021-08-26 17:06:05'); -INSERT INTO `sys_logininfor` VALUES (431, 'admin', '222.95.162.245', 'XX XX', 'Chrome 9', 'Windows 10', '0', '登录成功', '2021-08-27 11:53:54'); -INSERT INTO `sys_logininfor` VALUES (432, 'admin', '222.95.162.245', 'XX XX', 'Chrome 9', 'Windows 10', '0', '登录成功', '2021-08-27 11:54:00'); -INSERT INTO `sys_logininfor` VALUES (433, 'admin', '58.212.134.111', 'XX XX', 'Mobile Safari', 'Android 1.x', '0', '登录成功', '2021-08-27 19:20:43'); -INSERT INTO `sys_logininfor` VALUES (434, 'admin', '127.0.0.1', '内网IP', 'Chrome 9', 'Windows 10', '0', '登录成功', '2021-08-28 13:59:02'); - --- ---------------------------- --- Table structure for sys_menu --- ---------------------------- -DROP TABLE IF EXISTS `sys_menu`; -CREATE TABLE `sys_menu` ( - `menu_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '菜单ID', - `menu_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '菜单名称', - `parent_id` bigint(0) NULL DEFAULT 0 COMMENT '父菜单ID', - `order_num` int(0) NULL DEFAULT 0 COMMENT '显示顺序', - `path` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '路由地址', - `component` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '组件路径', - `is_frame` int(0) NULL DEFAULT 1 COMMENT '是否为外链(0是 1否)', - `is_cache` int(0) NULL DEFAULT 0 COMMENT '是否缓存(0缓存 1不缓存)', - `menu_type` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '菜单类型(M目录 C菜单 F按钮)', - `visible` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '菜单状态(0显示 1隐藏)', - `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '菜单状态(0正常 1停用)', - `perms` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '权限标识', - `icon` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '#' COMMENT '菜单图标', - `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '备注', - PRIMARY KEY (`menu_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2074 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '菜单权限表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_menu --- ---------------------------- -INSERT INTO `sys_menu` VALUES (1, '系统管理', 0, 1, 'system', NULL, 1, 0, 'M', '0', '0', '', 'system', 'admin', '2021-05-18 02:23:06', '', NULL, '系统管理目录'); -INSERT INTO `sys_menu` VALUES (2, '系统监控', 0, 2, 'monitor', NULL, 1, 0, 'M', '0', '0', '', 'monitor', 'admin', '2021-05-18 02:23:06', '', NULL, '系统监控目录'); -INSERT INTO `sys_menu` VALUES (3, '系统工具', 0, 3, 'tool', NULL, 1, 0, 'M', '0', '0', '', 'tool', 'admin', '2021-05-18 02:23:06', '', NULL, '系统工具目录'); -INSERT INTO `sys_menu` VALUES (4, '物美官网', 0, 4, 'http://wumei.live', NULL, 0, 0, 'M', '0', '0', '', 'guide', 'admin', '2021-05-18 02:23:06', 'admin', '2021-05-24 14:17:14', '若依官网地址'); -INSERT INTO `sys_menu` VALUES (100, '用户管理', 1, 1, 'user', 'system/user/index', 1, 0, 'C', '0', '0', 'system:user:list', 'user', 'admin', '2021-05-18 02:23:06', '', NULL, '用户管理菜单'); -INSERT INTO `sys_menu` VALUES (101, '角色管理', 1, 2, 'role', 'system/role/index', 1, 0, 'C', '0', '0', 'system:role:list', 'peoples', 'admin', '2021-05-18 02:23:06', '', NULL, '角色管理菜单'); -INSERT INTO `sys_menu` VALUES (102, '菜单管理', 1, 3, 'menu', 'system/menu/index', 1, 0, 'C', '0', '0', 'system:menu:list', 'tree-table', 'admin', '2021-05-18 02:23:06', '', NULL, '菜单管理菜单'); -INSERT INTO `sys_menu` VALUES (103, '部门管理', 1, 4, 'dept', 'system/dept/index', 1, 0, 'C', '0', '0', 'system:dept:list', 'tree', 'admin', '2021-05-18 02:23:06', '', NULL, '部门管理菜单'); -INSERT INTO `sys_menu` VALUES (104, '岗位管理', 1, 5, 'post', 'system/post/index', 1, 0, 'C', '0', '0', 'system:post:list', 'post', 'admin', '2021-05-18 02:23:06', '', NULL, '岗位管理菜单'); -INSERT INTO `sys_menu` VALUES (105, '字典管理', 1, 6, 'dict', 'system/dict/index', 1, 0, 'C', '0', '0', 'system:dict:list', 'dict', 'admin', '2021-05-18 02:23:06', '', NULL, '字典管理菜单'); -INSERT INTO `sys_menu` VALUES (106, '参数设置', 1, 7, 'config', 'system/config/index', 1, 0, 'C', '0', '0', 'system:config:list', 'edit', 'admin', '2021-05-18 02:23:06', '', NULL, '参数设置菜单'); -INSERT INTO `sys_menu` VALUES (107, '通知公告', 1, 8, 'notice', 'system/notice/index', 1, 0, 'C', '0', '0', 'system:notice:list', 'message', 'admin', '2021-05-18 02:23:06', '', NULL, '通知公告菜单'); -INSERT INTO `sys_menu` VALUES (108, '日志管理', 1, 9, 'log', '', 1, 0, 'M', '0', '0', '', 'log', 'admin', '2021-05-18 02:23:06', '', NULL, '日志管理菜单'); -INSERT INTO `sys_menu` VALUES (109, '在线用户', 2, 1, 'online', 'monitor/online/index', 1, 0, 'C', '0', '0', 'monitor:online:list', 'online', 'admin', '2021-05-18 02:23:06', '', NULL, '在线用户菜单'); -INSERT INTO `sys_menu` VALUES (110, '定时任务', 2, 2, 'job', 'monitor/job/index', 1, 0, 'C', '0', '0', 'monitor:job:list', 'job', 'admin', '2021-05-18 02:23:06', '', NULL, '定时任务菜单'); -INSERT INTO `sys_menu` VALUES (111, '数据监控', 2, 3, 'druid', 'monitor/druid/index', 1, 0, 'C', '0', '0', 'monitor:druid:list', 'druid', 'admin', '2021-05-18 02:23:06', '', NULL, '数据监控菜单'); -INSERT INTO `sys_menu` VALUES (112, '服务监控', 2, 4, 'server', 'monitor/server/index', 1, 0, 'C', '0', '0', 'monitor:server:list', 'server', 'admin', '2021-05-18 02:23:06', '', NULL, '服务监控菜单'); -INSERT INTO `sys_menu` VALUES (113, '缓存监控', 2, 5, 'cache', 'monitor/cache/index', 1, 0, 'C', '0', '0', 'monitor:cache:list', 'redis', 'admin', '2021-05-18 02:23:06', '', NULL, '缓存监控菜单'); -INSERT INTO `sys_menu` VALUES (114, '表单构建', 3, 1, 'build', 'tool/build/index', 1, 0, 'C', '0', '0', 'tool:build:list', 'build', 'admin', '2021-05-18 02:23:06', '', NULL, '表单构建菜单'); -INSERT INTO `sys_menu` VALUES (115, '代码生成', 3, 2, 'gen', 'tool/gen/index', 1, 0, 'C', '0', '0', 'tool:gen:list', 'code', 'admin', '2021-05-18 02:23:06', '', NULL, '代码生成菜单'); -INSERT INTO `sys_menu` VALUES (116, '系统接口', 3, 3, 'swagger', 'tool/swagger/index', 1, 0, 'C', '0', '0', 'tool:swagger:list', 'swagger', 'admin', '2021-05-18 02:23:06', '', NULL, '系统接口菜单'); -INSERT INTO `sys_menu` VALUES (500, '操作日志', 108, 1, 'operlog', 'monitor/operlog/index', 1, 0, 'C', '0', '0', 'monitor:operlog:list', 'form', 'admin', '2021-05-18 02:23:06', '', NULL, '操作日志菜单'); -INSERT INTO `sys_menu` VALUES (501, '登录日志', 108, 2, 'logininfor', 'monitor/logininfor/index', 1, 0, 'C', '0', '0', 'monitor:logininfor:list', 'logininfor', 'admin', '2021-05-18 02:23:06', '', NULL, '登录日志菜单'); -INSERT INTO `sys_menu` VALUES (1001, '用户查询', 100, 1, '', '', 1, 0, 'F', '0', '0', 'system:user:query', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1002, '用户新增', 100, 2, '', '', 1, 0, 'F', '0', '0', 'system:user:add', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1003, '用户修改', 100, 3, '', '', 1, 0, 'F', '0', '0', 'system:user:edit', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1004, '用户删除', 100, 4, '', '', 1, 0, 'F', '0', '0', 'system:user:remove', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1005, '用户导出', 100, 5, '', '', 1, 0, 'F', '0', '0', 'system:user:export', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1006, '用户导入', 100, 6, '', '', 1, 0, 'F', '0', '0', 'system:user:import', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1007, '重置密码', 100, 7, '', '', 1, 0, 'F', '0', '0', 'system:user:resetPwd', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1008, '角色查询', 101, 1, '', '', 1, 0, 'F', '0', '0', 'system:role:query', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1009, '角色新增', 101, 2, '', '', 1, 0, 'F', '0', '0', 'system:role:add', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1010, '角色修改', 101, 3, '', '', 1, 0, 'F', '0', '0', 'system:role:edit', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1011, '角色删除', 101, 4, '', '', 1, 0, 'F', '0', '0', 'system:role:remove', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1012, '角色导出', 101, 5, '', '', 1, 0, 'F', '0', '0', 'system:role:export', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1013, '菜单查询', 102, 1, '', '', 1, 0, 'F', '0', '0', 'system:menu:query', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1014, '菜单新增', 102, 2, '', '', 1, 0, 'F', '0', '0', 'system:menu:add', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1015, '菜单修改', 102, 3, '', '', 1, 0, 'F', '0', '0', 'system:menu:edit', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1016, '菜单删除', 102, 4, '', '', 1, 0, 'F', '0', '0', 'system:menu:remove', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1017, '部门查询', 103, 1, '', '', 1, 0, 'F', '0', '0', 'system:dept:query', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1018, '部门新增', 103, 2, '', '', 1, 0, 'F', '0', '0', 'system:dept:add', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1019, '部门修改', 103, 3, '', '', 1, 0, 'F', '0', '0', 'system:dept:edit', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1020, '部门删除', 103, 4, '', '', 1, 0, 'F', '0', '0', 'system:dept:remove', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1021, '岗位查询', 104, 1, '', '', 1, 0, 'F', '0', '0', 'system:post:query', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1022, '岗位新增', 104, 2, '', '', 1, 0, 'F', '0', '0', 'system:post:add', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1023, '岗位修改', 104, 3, '', '', 1, 0, 'F', '0', '0', 'system:post:edit', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1024, '岗位删除', 104, 4, '', '', 1, 0, 'F', '0', '0', 'system:post:remove', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1025, '岗位导出', 104, 5, '', '', 1, 0, 'F', '0', '0', 'system:post:export', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1026, '字典查询', 105, 1, '#', '', 1, 0, 'F', '0', '0', 'system:dict:query', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1027, '字典新增', 105, 2, '#', '', 1, 0, 'F', '0', '0', 'system:dict:add', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1028, '字典修改', 105, 3, '#', '', 1, 0, 'F', '0', '0', 'system:dict:edit', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1029, '字典删除', 105, 4, '#', '', 1, 0, 'F', '0', '0', 'system:dict:remove', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1030, '字典导出', 105, 5, '#', '', 1, 0, 'F', '0', '0', 'system:dict:export', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1031, '参数查询', 106, 1, '#', '', 1, 0, 'F', '0', '0', 'system:config:query', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1032, '参数新增', 106, 2, '#', '', 1, 0, 'F', '0', '0', 'system:config:add', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1033, '参数修改', 106, 3, '#', '', 1, 0, 'F', '0', '0', 'system:config:edit', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1034, '参数删除', 106, 4, '#', '', 1, 0, 'F', '0', '0', 'system:config:remove', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1035, '参数导出', 106, 5, '#', '', 1, 0, 'F', '0', '0', 'system:config:export', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1036, '公告查询', 107, 1, '#', '', 1, 0, 'F', '0', '0', 'system:notice:query', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1037, '公告新增', 107, 2, '#', '', 1, 0, 'F', '0', '0', 'system:notice:add', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1038, '公告修改', 107, 3, '#', '', 1, 0, 'F', '0', '0', 'system:notice:edit', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1039, '公告删除', 107, 4, '#', '', 1, 0, 'F', '0', '0', 'system:notice:remove', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1040, '操作查询', 500, 1, '#', '', 1, 0, 'F', '0', '0', 'monitor:operlog:query', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1041, '操作删除', 500, 2, '#', '', 1, 0, 'F', '0', '0', 'monitor:operlog:remove', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1042, '日志导出', 500, 4, '#', '', 1, 0, 'F', '0', '0', 'monitor:operlog:export', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1043, '登录查询', 501, 1, '#', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:query', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1044, '登录删除', 501, 2, '#', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:remove', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1045, '日志导出', 501, 3, '#', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:export', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1046, '在线查询', 109, 1, '#', '', 1, 0, 'F', '0', '0', 'monitor:online:query', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1047, '批量强退', 109, 2, '#', '', 1, 0, 'F', '0', '0', 'monitor:online:batchLogout', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1048, '单条强退', 109, 3, '#', '', 1, 0, 'F', '0', '0', 'monitor:online:forceLogout', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1049, '任务查询', 110, 1, '#', '', 1, 0, 'F', '0', '0', 'monitor:job:query', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1050, '任务新增', 110, 2, '#', '', 1, 0, 'F', '0', '0', 'monitor:job:add', '#', 'admin', '2021-05-18 02:23:07', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1051, '任务修改', 110, 3, '#', '', 1, 0, 'F', '0', '0', 'monitor:job:edit', '#', 'admin', '2021-05-18 02:23:07', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1052, '任务删除', 110, 4, '#', '', 1, 0, 'F', '0', '0', 'monitor:job:remove', '#', 'admin', '2021-05-18 02:23:07', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1053, '状态修改', 110, 5, '#', '', 1, 0, 'F', '0', '0', 'monitor:job:changeStatus', '#', 'admin', '2021-05-18 02:23:07', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1054, '任务导出', 110, 7, '#', '', 1, 0, 'F', '0', '0', 'monitor:job:export', '#', 'admin', '2021-05-18 02:23:07', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1055, '生成查询', 115, 1, '#', '', 1, 0, 'F', '0', '0', 'tool:gen:query', '#', 'admin', '2021-05-18 02:23:07', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1056, '生成修改', 115, 2, '#', '', 1, 0, 'F', '0', '0', 'tool:gen:edit', '#', 'admin', '2021-05-18 02:23:07', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1057, '生成删除', 115, 3, '#', '', 1, 0, 'F', '0', '0', 'tool:gen:remove', '#', 'admin', '2021-05-18 02:23:07', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1058, '导入代码', 115, 2, '#', '', 1, 0, 'F', '0', '0', 'tool:gen:import', '#', 'admin', '2021-05-18 02:23:07', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1059, '预览代码', 115, 4, '#', '', 1, 0, 'F', '0', '0', 'tool:gen:preview', '#', 'admin', '2021-05-18 02:23:07', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1060, '生成代码', 115, 5, '#', '', 1, 0, 'F', '0', '0', 'tool:gen:code', '#', 'admin', '2021-05-18 02:23:07', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2000, '物联网', 0, 0, 'iot', NULL, 1, 0, 'M', '0', '0', '', 'iot', 'admin', '2021-05-03 17:20:27', 'admin', '2021-05-18 09:32:14', ''); -INSERT INTO `sys_menu` VALUES (2043, '设备分类', 2000, 10, 'category', 'system/category/index', 1, 0, 'C', '0', '0', 'system:category:list', 'category', 'admin', '2021-05-06 15:10:35', 'admin', '2021-05-18 09:32:58', '设备分类菜单'); -INSERT INTO `sys_menu` VALUES (2044, '设备分类查询', 2043, 1, '#', '', 1, 0, 'F', '0', '0', 'system:category:query', '#', 'admin', '2021-05-06 15:10:35', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2045, '设备分类新增', 2043, 2, '#', '', 1, 0, 'F', '0', '0', 'system:category:add', '#', 'admin', '2021-05-06 15:10:35', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2046, '设备分类修改', 2043, 3, '#', '', 1, 0, 'F', '0', '0', 'system:category:edit', '#', 'admin', '2021-05-06 15:10:35', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2047, '设备分类删除', 2043, 4, '#', '', 1, 0, 'F', '0', '0', 'system:category:remove', '#', 'admin', '2021-05-06 15:10:35', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2048, '设备分类导出', 2043, 5, '#', '', 1, 0, 'F', '0', '0', 'system:category:export', '#', 'admin', '2021-05-06 15:10:35', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2049, '设备列表', 2000, 11, 'device', 'system/device/index', 1, 0, 'C', '0', '0', 'system:device:list', 'device', 'admin', '2021-05-06 15:10:50', 'admin', '2021-05-18 09:33:08', '设备菜单'); -INSERT INTO `sys_menu` VALUES (2050, '设备查询', 2049, 1, '#', '', 1, 0, 'F', '0', '0', 'system:device:query', '#', 'admin', '2021-05-06 15:10:50', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2051, '设备新增', 2049, 2, '#', '', 1, 0, 'F', '0', '0', 'system:device:add', '#', 'admin', '2021-05-06 15:10:50', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2052, '设备修改', 2049, 3, '#', '', 1, 0, 'F', '0', '0', 'system:device:edit', '#', 'admin', '2021-05-06 15:10:50', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2053, '设备删除', 2049, 4, '#', '', 1, 0, 'F', '0', '0', 'system:device:remove', '#', 'admin', '2021-05-06 15:10:50', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2054, '设备导出', 2049, 5, '#', '', 1, 0, 'F', '0', '0', 'system:device:export', '#', 'admin', '2021-05-06 15:10:50', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2055, '配置日志', 2000, 13, 'set', 'system/set/index', 1, 0, 'C', '0', '0', 'system:set:list', 'config', 'admin', '2021-05-06 15:11:09', 'admin', '2021-05-26 14:54:24', '设备配置菜单'); -INSERT INTO `sys_menu` VALUES (2056, '设备配置查询', 2055, 1, '#', '', 1, 0, 'F', '0', '0', 'system:set:query', '#', 'admin', '2021-05-06 15:11:09', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2057, '设备配置新增', 2055, 2, '#', '', 1, 0, 'F', '0', '0', 'system:set:add', '#', 'admin', '2021-05-06 15:11:09', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2058, '设备配置修改', 2055, 3, '#', '', 1, 0, 'F', '0', '0', 'system:set:edit', '#', 'admin', '2021-05-06 15:11:09', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2059, '设备配置删除', 2055, 4, '#', '', 1, 0, 'F', '0', '0', 'system:set:remove', '#', 'admin', '2021-05-06 15:11:09', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2060, '设备配置导出', 2055, 5, '#', '', 1, 0, 'F', '0', '0', 'system:set:export', '#', 'admin', '2021-05-06 15:11:09', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2061, '状态日志', 2000, 12, 'status', 'system/status/index', 1, 0, 'C', '0', '0', 'system:status:list', 'status', 'admin', '2021-05-06 15:11:19', 'admin', '2021-05-26 14:54:38', '设备状态菜单'); -INSERT INTO `sys_menu` VALUES (2062, '设备状态查询', 2061, 1, '#', '', 1, 0, 'F', '0', '0', 'system:status:query', '#', 'admin', '2021-05-06 15:11:19', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2063, '设备状态新增', 2061, 2, '#', '', 1, 0, 'F', '0', '0', 'system:status:add', '#', 'admin', '2021-05-06 15:11:19', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2064, '设备状态修改', 2061, 3, '#', '', 1, 0, 'F', '0', '0', 'system:status:edit', '#', 'admin', '2021-05-06 15:11:19', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2065, '设备状态删除', 2061, 4, '#', '', 1, 0, 'F', '0', '0', 'system:status:remove', '#', 'admin', '2021-05-06 15:11:19', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2066, '设备状态导出', 2061, 5, '#', '', 1, 0, 'F', '0', '0', 'system:status:export', '#', 'admin', '2021-05-06 15:11:19', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2067, '设备分组', 2000, 1, 'group', 'system/group/index', 1, 0, 'C', '0', '0', 'system:group:list', 'group', 'admin', '2021-05-18 08:15:31', 'admin', '2021-05-18 09:40:59', '分组菜单'); -INSERT INTO `sys_menu` VALUES (2068, '分组查询', 2067, 1, '#', '', 1, 0, 'F', '0', '0', 'system:group:query', '#', 'admin', '2021-05-18 08:15:31', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2069, '分组新增', 2067, 2, '#', '', 1, 0, 'F', '0', '0', 'system:group:add', '#', 'admin', '2021-05-18 08:15:31', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2070, '分组修改', 2067, 3, '#', '', 1, 0, 'F', '0', '0', 'system:group:edit', '#', 'admin', '2021-05-18 08:15:31', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2071, '分组删除', 2067, 4, '#', '', 1, 0, 'F', '0', '0', 'system:group:remove', '#', 'admin', '2021-05-18 08:15:31', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2072, '分组导出', 2067, 5, '#', '', 1, 0, 'F', '0', '0', 'system:group:export', '#', 'admin', '2021-05-18 08:15:31', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2073, 'EMQ管理', 2000, 14, 'http://localhost:18083/#/login?redirect=%2F', NULL, 0, 0, 'C', '0', '0', '', 'mqtt', 'admin', '2021-05-26 14:53:48', 'admin', '2021-05-27 16:11:27', ''); - --- ---------------------------- --- Table structure for sys_notice --- ---------------------------- -DROP TABLE IF EXISTS `sys_notice`; -CREATE TABLE `sys_notice` ( - `notice_id` int(0) NOT NULL AUTO_INCREMENT COMMENT '公告ID', - `notice_title` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '公告标题', - `notice_type` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '公告类型(1通知 2公告)', - `notice_content` longblob NULL COMMENT '公告内容', - `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '公告状态(0正常 1关闭)', - `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`notice_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '通知公告表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_notice --- ---------------------------- -INSERT INTO `sys_notice` VALUES (1, '温馨提醒:2018-07-01 若依新版本发布啦', '2', 0xE696B0E78988E69CACE58685E5AEB9, '0', 'admin', '2021-05-18 02:23:07', '', NULL, '管理员'); -INSERT INTO `sys_notice` VALUES (2, '维护通知:2018-07-01 若依系统凌晨维护', '1', 0xE7BBB4E68AA4E58685E5AEB9, '0', 'admin', '2021-05-18 02:23:07', '', NULL, '管理员'); -INSERT INTO `sys_notice` VALUES (3, '111', '2', 0x3C703E3131313131313C2F703E, '0', 'admin', '2021-08-27 19:24:12', '', NULL, NULL); - --- ---------------------------- --- Table structure for sys_oper_log --- ---------------------------- -DROP TABLE IF EXISTS `sys_oper_log`; -CREATE TABLE `sys_oper_log` ( - `oper_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '日志主键', - `title` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '模块标题', - `business_type` int(0) NULL DEFAULT 0 COMMENT '业务类型(0其它 1新增 2修改 3删除)', - `method` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '方法名称', - `request_method` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '请求方式', - `operator_type` int(0) NULL DEFAULT 0 COMMENT '操作类别(0其它 1后台用户 2手机端用户)', - `oper_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '操作人员', - `dept_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '部门名称', - `oper_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '请求URL', - `oper_ip` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '主机地址', - `oper_location` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '操作地点', - `oper_param` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '请求参数', - `json_result` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '返回参数', - `status` int(0) NULL DEFAULT 0 COMMENT '操作状态(0正常 1异常)', - `error_msg` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '错误消息', - `oper_time` datetime(0) NULL DEFAULT NULL COMMENT '操作时间', - PRIMARY KEY (`oper_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2663 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '操作日志记录' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_oper_log --- ---------------------------- -INSERT INTO `sys_oper_log` VALUES (1873, '设备状态', 2, 'com.ruoyi.system.controller.IotDeviceStatusController.edit()', 'PUT', 1, 'admin', NULL, '/system/status', '172.17.0.1', '内网IP', '{\"deviceId\":1,\"deviceNum\":\"7CDFA1049ADA\",\"triggerSource\":1,\"relayStatus\":0,\"updateTime\":1625044821428,\"params\":{}}', '{\"msg\":\"mqtt 发布成功\",\"code\":200}', 0, NULL, '2021-06-30 17:20:21'); -INSERT INTO `sys_oper_log` VALUES (1874, '设备状态', 2, 'com.ruoyi.system.controller.IotDeviceStatusController.edit()', 'PUT', 1, 'admin', NULL, '/system/status', '172.17.0.1', '内网IP', '{\"deviceId\":1,\"deviceNum\":\"7CDFA1049ADA\",\"triggerSource\":1,\"relayStatus\":1,\"updateTime\":1625044822177,\"params\":{}}', '{\"msg\":\"mqtt 发布成功\",\"code\":200}', 0, NULL, '2021-06-30 17:20:22'); -INSERT INTO `sys_oper_log` VALUES (1875, '设备状态', 2, 'com.ruoyi.system.controller.IotDeviceStatusController.edit()', 'PUT', 1, 'admin', NULL, '/system/status', '172.17.0.1', '内网IP', '{\"lightStatus\":0,\"deviceId\":1,\"deviceNum\":\"7CDFA1049ADA\",\"triggerSource\":1,\"updateTime\":1625044822998,\"params\":{}}', '{\"msg\":\"mqtt 发布成功\",\"code\":200}', 0, NULL, '2021-06-30 17:20:23'); -INSERT INTO `sys_oper_log` VALUES (1876, '设备状态', 2, 'com.ruoyi.system.controller.IotDeviceStatusController.edit()', 'PUT', 1, 'admin', NULL, '/system/status', '172.17.0.1', '内网IP', '{\"lightStatus\":1,\"deviceId\":1,\"deviceNum\":\"7CDFA1049ADA\",\"triggerSource\":1,\"updateTime\":1625044823902,\"params\":{}}', '{\"msg\":\"mqtt 发布成功\",\"code\":200}', 0, NULL, '2021-06-30 17:20:23'); -INSERT INTO `sys_oper_log` VALUES (1877, '代码生成', 6, 'com.ruoyi.generator.controller.GenController.importTableSave()', 'POST', 1, 'admin', NULL, '/tool/gen/importTable', '222.95.162.245', 'XX XX', 't_user_account_info,t_user_login_log', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 14:45:29'); -INSERT INTO `sys_oper_log` VALUES (1878, '代码生成', 8, 'com.ruoyi.generator.controller.GenController.batchGenCode()', 'GET', 1, 'admin', NULL, '/tool/gen/batchGenCode', '222.95.162.245', 'XX XX', '{}', 'null', 0, NULL, '2021-08-26 14:45:39'); -INSERT INTO `sys_oper_log` VALUES (1879, '代码生成', 6, 'com.ruoyi.generator.controller.GenController.importTableSave()', 'POST', 1, 'admin', NULL, '/tool/gen/importTable', '222.95.162.245', 'XX XX', 'sys_user', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 17:07:45'); -INSERT INTO `sys_oper_log` VALUES (1880, '角色管理', 1, 'com.ruoyi.web.controller.system.SysRoleController.add()', 'POST', 1, 'admin', NULL, '/system/role', '222.95.162.245', 'XX XX', '{\"flag\":false,\"roleId\":101,\"admin\":false,\"params\":{},\"roleSort\":\"3\",\"deptCheckStrictly\":true,\"createBy\":\"admin\",\"menuCheckStrictly\":true,\"roleKey\":\"mp\",\"roleName\":\"小程序用户\",\"deptIds\":[],\"menuIds\":[2000,2067,2068,2069,2070,2071,2072,2043,2044,2045,2046,2047,2048,2049,2050,2051,2052,2053,2054,2061,2062,2063,2064,2065,2066,2055,2056,2057,2058,2059,2060,2073],\"status\":\"0\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 17:26:52'); -INSERT INTO `sys_oper_log` VALUES (1881, '角色管理', 2, 'com.ruoyi.web.controller.system.SysRoleController.edit()', 'PUT', 1, 'admin', NULL, '/system/role', '222.95.162.245', 'XX XX', '{\"flag\":false,\"roleId\":100,\"admin\":false,\"dataScope\":\"1\",\"delFlag\":\"0\",\"params\":{},\"roleSort\":\"8\",\"deptCheckStrictly\":true,\"createTime\":1622248952000,\"updateBy\":\"admin\",\"menuCheckStrictly\":true,\"roleKey\":\"visitor\",\"roleName\":\"游客角色\",\"menuIds\":[2000,2067,2043,2049,2061,2055,1,100,101,102,103,104,105,106,107,108,500,501,2,109,110,3,115,2068,2044,2050,2062,2056,2073,1001,1008,1013,1017,1021,1026,1031,1036,1040,1043,1046,1049,1055,116,4],\"status\":\"0\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 17:27:06'); -INSERT INTO `sys_oper_log` VALUES (1882, '用户管理', 1, 'com.ruoyi.web.controller.system.SysUserController.add()', 'POST', 1, 'admin', NULL, '/system/user', '222.95.162.245', 'XX XX', '{\"admin\":false,\"password\":\"$2a$10$f.KtWGpaUsdvl2E427/H4OnPi2dYx8HetxnBs1uasSNwCBBUDSwjO\",\"postIds\":[],\"nickName\":\"xxx\",\"params\":{},\"userName\":\"aaa\",\"userId\":101,\"createBy\":\"admin\",\"roleIds\":[101],\"status\":\"0\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 17:28:35'); -INSERT INTO `sys_oper_log` VALUES (1883, '设备状态', 1, 'com.ruoyi.system.controller.IotDeviceStatusController.add()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/status', '180.111.206.137', 'XX XX', '{\"params\":{},\"createTime\":1629974211324}', 'null', 1, '\r\n### Error updating database. Cause: java.sql.SQLException: Field \'device_num\' doesn\'t have a default value\r\n### The error may exist in file [D:\\codes\\IdeaProjects\\wumei-smart-master\\spring-boot\\ruoyi-system\\target\\classes\\mapper\\system\\IotDeviceStatusMapper.xml]\r\n### The error may involve com.ruoyi.system.mapper.IotDeviceStatusMapper.insertIotDeviceStatus-Inline\r\n### The error occurred while setting parameters\r\n### SQL: insert into iot_device_status ( create_time ) values ( ? )\r\n### Cause: java.sql.SQLException: Field \'device_num\' doesn\'t have a default value\n; Field \'device_num\' doesn\'t have a default value; nested exception is java.sql.SQLException: Field \'device_num\' doesn\'t have a default value', '2021-08-26 18:36:50'); -INSERT INTO `sys_oper_log` VALUES (1884, '设备状态', 1, 'com.ruoyi.system.controller.IotDeviceStatusController.add()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/status', '180.111.206.137', 'XX XX', '{\"lightMode\":0,\"isOnline\":1,\"lightStatus\":0,\"deviceId\":1,\"deviceNum\":\"7CDFA1049ADA\",\"red\":255,\"updateBy\":\"\",\"airHumidity\":0,\"triggerSource\":0,\"lightInterval\":432,\"rssi\":-80,\"green\":254,\"deviceTemperature\":36.52,\"relayStatus\":1,\"fadeTime\":259,\"params\":{},\"createBy\":\"\",\"airTemperature\":0,\"brightness\":100,\"blue\":241,\"createTime\":1629974291015,\"deviceStatusId\":2846}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 18:38:09'); -INSERT INTO `sys_oper_log` VALUES (1885, '设备状态', 1, 'com.ruoyi.system.controller.IotDeviceStatusController.add()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/status', '180.111.206.137', 'XX XX', '{\"lightMode\":0,\"isOnline\":1,\"lightStatus\":1,\"deviceId\":1,\"deviceNum\":\"7CDFA1049ADA\",\"red\":255,\"updateBy\":\"\",\"airHumidity\":0,\"triggerSource\":0,\"lightInterval\":432,\"rssi\":-80,\"green\":254,\"deviceTemperature\":36.52,\"relayStatus\":1,\"fadeTime\":259,\"params\":{},\"createBy\":\"\",\"airTemperature\":0,\"brightness\":100,\"blue\":241,\"createTime\":1629974292396,\"deviceStatusId\":2847}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 18:38:11'); -INSERT INTO `sys_oper_log` VALUES (1886, '设备状态', 1, 'com.ruoyi.system.controller.IotDeviceStatusController.add()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/status', '180.111.206.137', 'XX XX', '{\"lightMode\":0,\"isOnline\":1,\"lightStatus\":0,\"deviceId\":1,\"deviceNum\":\"7CDFA1049ADA\",\"red\":255,\"updateBy\":\"\",\"airHumidity\":0,\"triggerSource\":0,\"lightInterval\":432,\"rssi\":-80,\"green\":254,\"deviceTemperature\":36.52,\"relayStatus\":1,\"fadeTime\":259,\"params\":{},\"createBy\":\"\",\"airTemperature\":0,\"brightness\":100,\"blue\":241,\"createTime\":1629974293231,\"deviceStatusId\":2848}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 18:38:12'); -INSERT INTO `sys_oper_log` VALUES (1887, '设备状态', 1, 'com.ruoyi.system.controller.IotDeviceStatusController.add()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/status', '180.111.206.137', 'XX XX', '{\"lightMode\":0,\"isOnline\":1,\"lightStatus\":1,\"deviceId\":1,\"deviceNum\":\"7CDFA1049ADA\",\"red\":255,\"updateBy\":\"\",\"airHumidity\":0,\"triggerSource\":0,\"lightInterval\":432,\"rssi\":-80,\"green\":254,\"deviceTemperature\":36.52,\"relayStatus\":1,\"fadeTime\":259,\"params\":{},\"createBy\":\"\",\"airTemperature\":0,\"brightness\":100,\"blue\":241,\"createTime\":1629974297356,\"deviceStatusId\":2849}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 18:38:16'); -INSERT INTO `sys_oper_log` VALUES (1888, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '222.95.162.245', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADC\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 18:56:26'); -INSERT INTO `sys_oper_log` VALUES (1889, '设备状态', 1, 'com.ruoyi.system.controller.IotDeviceStatusController.add()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/status', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"params\":{},\"createTime\":1629976059277,\"deviceStatusId\":2850}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 19:07:38'); -INSERT INTO `sys_oper_log` VALUES (1890, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 19:16:49'); -INSERT INTO `sys_oper_log` VALUES (1891, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 19:17:08'); -INSERT INTO `sys_oper_log` VALUES (1892, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 19:17:09'); -INSERT INTO `sys_oper_log` VALUES (1893, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 19:17:09'); -INSERT INTO `sys_oper_log` VALUES (1894, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 19:17:10'); -INSERT INTO `sys_oper_log` VALUES (1895, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 19:17:10'); -INSERT INTO `sys_oper_log` VALUES (1896, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 19:17:11'); -INSERT INTO `sys_oper_log` VALUES (1897, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 19:17:12'); -INSERT INTO `sys_oper_log` VALUES (1898, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 19:17:13'); -INSERT INTO `sys_oper_log` VALUES (1899, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 19:17:14'); -INSERT INTO `sys_oper_log` VALUES (1900, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 19:17:14'); -INSERT INTO `sys_oper_log` VALUES (1901, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 19:17:15'); -INSERT INTO `sys_oper_log` VALUES (1902, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 19:17:16'); -INSERT INTO `sys_oper_log` VALUES (1903, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 19:17:17'); -INSERT INTO `sys_oper_log` VALUES (1904, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 19:17:17'); -INSERT INTO `sys_oper_log` VALUES (1905, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 19:17:18'); -INSERT INTO `sys_oper_log` VALUES (1906, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 19:18:38'); -INSERT INTO `sys_oper_log` VALUES (1907, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', 'null', 1, '设备不存在', '2021-08-26 19:25:16'); -INSERT INTO `sys_oper_log` VALUES (1908, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', 'null', 1, '设备不存在', '2021-08-26 19:25:19'); -INSERT INTO `sys_oper_log` VALUES (1909, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', 'null', 1, '设备不存在', '2021-08-27 10:23:46'); -INSERT INTO `sys_oper_log` VALUES (1910, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', 'null', 1, '设备不存在', '2021-08-27 10:23:59'); -INSERT INTO `sys_oper_log` VALUES (1911, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', 'null', 1, '设备不存在', '2021-08-27 10:24:32'); -INSERT INTO `sys_oper_log` VALUES (1912, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', 'null', 1, '设备不存在', '2021-08-27 10:25:53'); -INSERT INTO `sys_oper_log` VALUES (1913, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 10:30:18'); -INSERT INTO `sys_oper_log` VALUES (1914, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 10:30:22'); -INSERT INTO `sys_oper_log` VALUES (1915, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 10:30:23'); -INSERT INTO `sys_oper_log` VALUES (1916, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 10:30:30'); -INSERT INTO `sys_oper_log` VALUES (1917, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 10:33:53'); -INSERT INTO `sys_oper_log` VALUES (1918, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 10:33:56'); -INSERT INTO `sys_oper_log` VALUES (1919, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 10:33:57'); -INSERT INTO `sys_oper_log` VALUES (1920, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 10:33:58'); -INSERT INTO `sys_oper_log` VALUES (1921, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 10:35:34'); -INSERT INTO `sys_oper_log` VALUES (1922, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 10:35:35'); -INSERT INTO `sys_oper_log` VALUES (1923, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 10:35:36'); -INSERT INTO `sys_oper_log` VALUES (1924, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 10:36:33'); -INSERT INTO `sys_oper_log` VALUES (1925, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 10:36:34'); -INSERT INTO `sys_oper_log` VALUES (1926, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 10:36:35'); -INSERT INTO `sys_oper_log` VALUES (1927, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 10:36:35'); -INSERT INTO `sys_oper_log` VALUES (1928, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 10:36:36'); -INSERT INTO `sys_oper_log` VALUES (1929, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 10:40:04'); -INSERT INTO `sys_oper_log` VALUES (1930, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 10:40:06'); -INSERT INTO `sys_oper_log` VALUES (1931, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 10:40:10'); -INSERT INTO `sys_oper_log` VALUES (1932, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 10:40:10'); -INSERT INTO `sys_oper_log` VALUES (1933, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 10:40:21'); -INSERT INTO `sys_oper_log` VALUES (1934, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 10:40:21'); -INSERT INTO `sys_oper_log` VALUES (1935, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 10:41:55'); -INSERT INTO `sys_oper_log` VALUES (1936, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 10:41:55'); -INSERT INTO `sys_oper_log` VALUES (1937, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 10:41:56'); -INSERT INTO `sys_oper_log` VALUES (1938, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 10:41:57'); -INSERT INTO `sys_oper_log` VALUES (1939, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 10:44:07'); -INSERT INTO `sys_oper_log` VALUES (1940, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 10:44:08'); -INSERT INTO `sys_oper_log` VALUES (1941, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 10:44:09'); -INSERT INTO `sys_oper_log` VALUES (1942, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 10:44:09'); -INSERT INTO `sys_oper_log` VALUES (1943, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 11:38:52'); -INSERT INTO `sys_oper_log` VALUES (1944, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 11:38:54'); -INSERT INTO `sys_oper_log` VALUES (1945, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 11:53:43'); -INSERT INTO `sys_oper_log` VALUES (1946, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 11:53:44'); -INSERT INTO `sys_oper_log` VALUES (1947, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 11:53:54'); -INSERT INTO `sys_oper_log` VALUES (1948, '代码生成', 6, 'com.ruoyi.generator.controller.GenController.importTableSave()', 'POST', 1, 'admin', NULL, '/tool/gen/importTable', '222.95.162.245', 'XX XX', 'iot_device_user_relation', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 11:55:06'); -INSERT INTO `sys_oper_log` VALUES (1949, '代码生成', 8, 'com.ruoyi.generator.controller.GenController.batchGenCode()', 'GET', 1, 'admin', NULL, '/tool/gen/batchGenCode', '222.95.162.245', 'XX XX', '{}', 'null', 0, NULL, '2021-08-27 11:55:34'); -INSERT INTO `sys_oper_log` VALUES (1950, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/bindDevice', '222.95.162.245', 'XX XX', '{\"remark\":\"remark\",\"params\":{},\"deviceName\":\"设备名称\",\"deviceNum\":\"7CDFA1049ADC\",\"categoryId\":1}', 'null', 1, '', '2021-08-27 13:36:40'); -INSERT INTO `sys_oper_log` VALUES (1951, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/bindDevice', '222.95.162.245', 'XX XX', '{\"remark\":\"remark\",\"params\":{},\"deviceName\":\"设备名称\",\"deviceNum\":\"7CDFA1049ADC\",\"categoryId\":1}', '{\"msg\":\"操作失败\",\"code\":500}', 0, NULL, '2021-08-27 13:40:21'); -INSERT INTO `sys_oper_log` VALUES (1952, '代码生成', 8, 'com.ruoyi.generator.controller.GenController.batchGenCode()', 'GET', 1, 'admin', NULL, '/tool/gen/batchGenCode', '222.95.162.245', 'XX XX', '{}', 'null', 0, NULL, '2021-08-27 13:44:37'); -INSERT INTO `sys_oper_log` VALUES (1953, '代码生成', 3, 'com.ruoyi.generator.controller.GenController.remove()', 'DELETE', 1, 'admin', NULL, '/tool/gen/13', '222.95.162.245', 'XX XX', '{tableIds=13}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 13:45:30'); -INSERT INTO `sys_oper_log` VALUES (1954, '代码生成', 6, 'com.ruoyi.generator.controller.GenController.importTableSave()', 'POST', 1, 'admin', NULL, '/tool/gen/importTable', '222.95.162.245', 'XX XX', 'iot_device', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 13:45:40'); -INSERT INTO `sys_oper_log` VALUES (1955, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/bindDevice', '222.95.162.245', 'XX XX', '{\"remark\":\"remark\",\"params\":{},\"deviceName\":\"设备名称\",\"deviceNum\":\"7CDFA1049ADC\",\"categoryId\":1}', 'null', 1, 'Invalid bound statement (not found): com.ruoyi.system.mapper.IotDeviceMapper.selectIotDeviceByNum', '2021-08-27 13:47:50'); -INSERT INTO `sys_oper_log` VALUES (1956, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/bindDevice', '222.95.162.245', 'XX XX', '{\"remark\":\"remark\",\"params\":{},\"deviceName\":\"设备名称\",\"deviceNum\":\"7CDFA1049ADC\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-27 13:50:33'); -INSERT INTO `sys_oper_log` VALUES (1957, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/bindDevice', '222.95.162.245', 'XX XX', '{\"remark\":\"remark\",\"params\":{},\"deviceName\":\"设备名称\",\"deviceNum\":\"7CDFA1049ADC\",\"categoryId\":1}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":0}', 0, NULL, '2021-08-27 13:50:43'); -INSERT INTO `sys_oper_log` VALUES (1958, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"我的灯。\",\"params\":{},\"deviceName\":\"灯灯灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":0}', 0, NULL, '2021-08-27 14:05:05'); -INSERT INTO `sys_oper_log` VALUES (1959, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"我的灯。\",\"params\":{},\"deviceName\":\"灯灯灯\",\"deviceNum\":\"7CDFA1049AD2\",\"categoryId\":2}', 'null', 1, '设备【7CDFA1049AD2】不存在', '2021-08-27 14:07:01'); -INSERT INTO `sys_oper_log` VALUES (1960, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"qg34tq\",\"params\":{},\"deviceName\":\"eq3g3\",\"deviceNum\":\"2133r4r\",\"categoryId\":1}', 'null', 1, '设备【2133r4r】不存在', '2021-08-27 14:11:13'); -INSERT INTO `sys_oper_log` VALUES (1961, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"stu6ru\",\"params\":{},\"deviceName\":\"rtjsht\",\"deviceNum\":\"strjtj\",\"categoryId\":1}', 'null', 1, '设备【strjtj】不存在', '2021-08-27 14:14:40'); -INSERT INTO `sys_oper_log` VALUES (1962, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"stu6ru\",\"params\":{},\"deviceName\":\"rtjsht\",\"deviceNum\":\"strjtj\",\"categoryId\":1}', 'null', 1, '设备【strjtj】不存在', '2021-08-27 14:14:43'); -INSERT INTO `sys_oper_log` VALUES (1963, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"我的灯\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":0}', 0, NULL, '2021-08-27 14:27:15'); -INSERT INTO `sys_oper_log` VALUES (1964, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 14:31:26'); -INSERT INTO `sys_oper_log` VALUES (1965, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 14:31:49'); -INSERT INTO `sys_oper_log` VALUES (1966, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 14:31:50'); -INSERT INTO `sys_oper_log` VALUES (1967, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 14:31:51'); -INSERT INTO `sys_oper_log` VALUES (1968, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 14:31:52'); -INSERT INTO `sys_oper_log` VALUES (1969, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 14:31:53'); -INSERT INTO `sys_oper_log` VALUES (1970, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 14:31:54'); -INSERT INTO `sys_oper_log` VALUES (1971, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"阿拉丁\",\"params\":{},\"deviceName\":\"灯神\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-27 14:32:42'); -INSERT INTO `sys_oper_log` VALUES (1972, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"阿拉丁\",\"params\":{},\"deviceName\":\"灯神\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-27 14:32:43'); -INSERT INTO `sys_oper_log` VALUES (1973, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"阿拉丁\",\"params\":{},\"deviceName\":\"灯神\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-27 14:32:44'); -INSERT INTO `sys_oper_log` VALUES (1974, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"阿拉丁\",\"params\":{},\"deviceName\":\"灯神\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-27 14:32:47'); -INSERT INTO `sys_oper_log` VALUES (1975, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"阿拉丁\",\"params\":{},\"deviceName\":\"灯神\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-27 14:32:48'); -INSERT INTO `sys_oper_log` VALUES (1976, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"阿拉丁\",\"params\":{},\"deviceName\":\"灯神\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-27 14:32:48'); -INSERT INTO `sys_oper_log` VALUES (1977, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"阿拉丁\",\"params\":{},\"deviceName\":\"灯神\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-27 14:32:49'); -INSERT INTO `sys_oper_log` VALUES (1978, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"阿拉丁\",\"params\":{},\"deviceName\":\"灯神\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-27 14:32:50'); -INSERT INTO `sys_oper_log` VALUES (1979, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"阿拉丁\",\"params\":{},\"deviceName\":\"灯神\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-27 14:32:50'); -INSERT INTO `sys_oper_log` VALUES (1980, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"阿拉丁\",\"params\":{},\"deviceName\":\"灯神\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-27 14:32:51'); -INSERT INTO `sys_oper_log` VALUES (1981, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"阿拉丁\",\"params\":{},\"deviceName\":\"灯神\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-27 14:32:52'); -INSERT INTO `sys_oper_log` VALUES (1982, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"阿拉丁\",\"params\":{},\"deviceName\":\"灯神\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-27 14:32:52'); -INSERT INTO `sys_oper_log` VALUES (1983, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"阿拉丁\",\"params\":{},\"deviceName\":\"灯神\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-27 14:32:54'); -INSERT INTO `sys_oper_log` VALUES (1984, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"阿拉丁\",\"params\":{},\"deviceName\":\"灯神\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-27 14:32:55'); -INSERT INTO `sys_oper_log` VALUES (1985, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"阿拉丁\",\"params\":{},\"deviceName\":\"灯神\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-27 14:32:55'); -INSERT INTO `sys_oper_log` VALUES (1986, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"\",\"params\":{},\"deviceName\":\"srts\",\"deviceNum\":\"sh\",\"categoryId\":1}', 'null', 1, '设备【sh】不存在', '2021-08-27 14:34:31'); -INSERT INTO `sys_oper_log` VALUES (1987, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"\",\"params\":{},\"deviceName\":\"srts\",\"deviceNum\":\"sh\",\"categoryId\":1}', 'null', 1, '设备【sh】不存在', '2021-08-27 14:34:32'); -INSERT INTO `sys_oper_log` VALUES (1988, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"\",\"params\":{},\"deviceName\":\"trwhb4n\",\"deviceNum\":\"wt\",\"categoryId\":1}', 'null', 1, '设备【wt】不存在', '2021-08-27 14:34:59'); -INSERT INTO `sys_oper_log` VALUES (1989, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"阿拉丁\",\"params\":{},\"deviceName\":\"灯神\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-27 14:35:22'); -INSERT INTO `sys_oper_log` VALUES (1990, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"阿拉丁\",\"params\":{},\"deviceName\":\"灯神\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-27 14:35:23'); -INSERT INTO `sys_oper_log` VALUES (1991, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"阿拉丁\",\"params\":{},\"deviceName\":\"灯神\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-27 14:35:23'); -INSERT INTO `sys_oper_log` VALUES (1992, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"阿拉丁\",\"params\":{},\"deviceName\":\"灯神\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-27 14:35:24'); -INSERT INTO `sys_oper_log` VALUES (1993, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"阿拉丁\",\"params\":{},\"deviceName\":\"灯神\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-27 14:35:24'); -INSERT INTO `sys_oper_log` VALUES (1994, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"阿拉丁\",\"params\":{},\"deviceName\":\"灯神\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-27 14:35:25'); -INSERT INTO `sys_oper_log` VALUES (1995, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"阿拉丁\",\"params\":{},\"deviceName\":\"灯神\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-27 14:35:25'); -INSERT INTO `sys_oper_log` VALUES (1996, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"阿拉丁\",\"params\":{},\"deviceName\":\"灯神\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-27 14:35:25'); -INSERT INTO `sys_oper_log` VALUES (1997, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"阿拉丁\",\"params\":{},\"deviceName\":\"灯神\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-27 14:35:25'); -INSERT INTO `sys_oper_log` VALUES (1998, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"阿拉丁\",\"params\":{},\"deviceName\":\"灯神\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-27 14:35:26'); -INSERT INTO `sys_oper_log` VALUES (1999, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"阿拉丁\",\"params\":{},\"deviceName\":\"灯神\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-27 14:35:26'); -INSERT INTO `sys_oper_log` VALUES (2000, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"阿拉丁\",\"params\":{},\"deviceName\":\"灯神\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-27 14:35:26'); -INSERT INTO `sys_oper_log` VALUES (2001, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"阿拉丁\",\"params\":{},\"deviceName\":\"灯神\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-27 14:35:26'); -INSERT INTO `sys_oper_log` VALUES (2002, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"阿拉丁\",\"params\":{},\"deviceName\":\"灯神\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-27 14:35:26'); -INSERT INTO `sys_oper_log` VALUES (2003, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"阿拉丁\",\"params\":{},\"deviceName\":\"灯神\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-27 14:35:27'); -INSERT INTO `sys_oper_log` VALUES (2004, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"阿拉丁\",\"params\":{},\"deviceName\":\"灯神\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-27 14:35:27'); -INSERT INTO `sys_oper_log` VALUES (2005, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"阿拉丁灯灯灯灯灯。\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":0}', 0, NULL, '2021-08-27 15:00:17'); -INSERT INTO `sys_oper_log` VALUES (2006, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', 'null', 1, '该设备已被绑定!', '2021-08-27 15:05:11'); -INSERT INTO `sys_oper_log` VALUES (2007, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', 'null', 1, '该设备已被绑定!', '2021-08-27 15:06:01'); -INSERT INTO `sys_oper_log` VALUES (2008, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', 'null', 1, '该设备已被绑定!', '2021-08-27 15:06:11'); -INSERT INTO `sys_oper_log` VALUES (2009, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', 'null', 1, '该设备已被绑定!', '2021-08-27 15:06:20'); -INSERT INTO `sys_oper_log` VALUES (2010, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', 'null', 1, '该设备已被绑定!', '2021-08-27 15:07:41'); -INSERT INTO `sys_oper_log` VALUES (2011, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', 'null', 1, '该设备已被绑定!', '2021-08-27 15:09:18'); -INSERT INTO `sys_oper_log` VALUES (2012, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', 'null', 1, '该设备已被绑定!', '2021-08-27 15:09:28'); -INSERT INTO `sys_oper_log` VALUES (2013, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/bindDevice', '49.93.129.115', 'XX XX', '{\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":0}', 0, NULL, '2021-08-27 15:17:38'); -INSERT INTO `sys_oper_log` VALUES (2014, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/bindDevice', '49.93.129.115', 'XX XX', '{\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', 'null', 1, '该设备已被绑定!', '2021-08-27 15:17:41'); -INSERT INTO `sys_oper_log` VALUES (2015, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/bindDevice', '49.93.129.115', 'XX XX', '{\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":0}', 0, NULL, '2021-08-27 15:18:35'); -INSERT INTO `sys_oper_log` VALUES (2016, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.updateDeviceInfo()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/updateDeviceInfo', '222.95.162.245', 'XX XX', '{\"remark\":\"remark\",\"params\":{},\"deviceId\":1,\"deviceName\":\"设备名称\"}', '{\"msg\":\"操作失败\",\"code\":500}', 0, NULL, '2021-08-27 15:44:27'); -INSERT INTO `sys_oper_log` VALUES (2017, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.updateDeviceInfo()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/updateDeviceInfo', '222.95.162.245', 'XX XX', '{\"remark\":\"remark\",\"params\":{},\"deviceId\":1,\"deviceName\":\"设备名称\"}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":0}', 0, NULL, '2021-08-27 15:45:52'); -INSERT INTO `sys_oper_log` VALUES (2018, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.updateDeviceInfo()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/updateDeviceInfo', '222.95.162.245', 'XX XX', '{\"remark\":\"remark\",\"params\":{},\"deviceId\":51,\"deviceName\":\"设备名称\"}', 'null', 1, '设备不存在', '2021-08-27 15:46:30'); -INSERT INTO `sys_oper_log` VALUES (2019, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.updateDeviceInfo()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/updateDeviceInfo', '222.95.162.245', 'XX XX', '{\"remark\":\"remark\",\"params\":{},\"deviceId\":5,\"deviceName\":\"设备名称\"}', 'null', 1, '设备不存在', '2021-08-27 15:46:53'); -INSERT INTO `sys_oper_log` VALUES (2020, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.updateDeviceInfo()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/updateDeviceInfo', '222.95.162.245', 'XX XX', '{\"remark\":\"remark\",\"params\":{},\"deviceId\":5,\"deviceName\":\"设备名称\"}', 'null', 1, '设备不存在', '2021-08-27 15:46:59'); -INSERT INTO `sys_oper_log` VALUES (2021, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.updateDeviceInfo()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/updateDeviceInfo', '222.95.162.245', 'XX XX', '{\"remark\":\"remark\",\"params\":{},\"deviceId\":7,\"deviceName\":\"设备名称\"}', 'null', 1, '设备不存在', '2021-08-27 15:47:18'); -INSERT INTO `sys_oper_log` VALUES (2022, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.updateDeviceInfo()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/updateDeviceInfo', '222.95.162.245', 'XX XX', '{\"remark\":\"remark\",\"params\":{},\"deviceId\":7,\"deviceName\":\"设备名称\"}', 'null', 1, '设备不存在', '2021-08-27 15:47:46'); -INSERT INTO `sys_oper_log` VALUES (2023, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.updateDeviceInfo()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/updateDeviceInfo', '222.95.162.245', 'XX XX', '{\"remark\":\"remark\",\"params\":{},\"deviceId\":1,\"deviceName\":\"设备名称\"}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":0}', 0, NULL, '2021-08-27 15:48:03'); -INSERT INTO `sys_oper_log` VALUES (2024, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.updateDeviceInfo()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/updateDeviceInfo', '222.95.162.245', 'XX XX', '{\"remark\":\"remark\",\"params\":{},\"deviceId\":1,\"deviceName\":\"设备名称\"}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":0}', 0, NULL, '2021-08-27 15:49:24'); -INSERT INTO `sys_oper_log` VALUES (2025, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.updateDeviceInfo()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/updateDeviceInfo', '222.95.162.245', 'XX XX', '{\"remark\":\"remark\",\"params\":{},\"deviceId\":1,\"deviceName\":\"设备名称\"}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":1}', 0, NULL, '2021-08-27 15:51:57'); -INSERT INTO `sys_oper_log` VALUES (2026, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.updateDeviceInfo()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/updateDeviceInfo', '222.95.162.245', 'XX XX', '{\"remark\":\"remark2\",\"params\":{},\"deviceId\":1,\"deviceName\":\"设备名称\"}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":1}', 0, NULL, '2021-08-27 15:52:38'); -INSERT INTO `sys_oper_log` VALUES (2027, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:39'); -INSERT INTO `sys_oper_log` VALUES (2028, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:40'); -INSERT INTO `sys_oper_log` VALUES (2029, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:42'); -INSERT INTO `sys_oper_log` VALUES (2030, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:42'); -INSERT INTO `sys_oper_log` VALUES (2031, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:43'); -INSERT INTO `sys_oper_log` VALUES (2032, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:43'); -INSERT INTO `sys_oper_log` VALUES (2033, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:44'); -INSERT INTO `sys_oper_log` VALUES (2034, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:45'); -INSERT INTO `sys_oper_log` VALUES (2035, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:45'); -INSERT INTO `sys_oper_log` VALUES (2036, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:45'); -INSERT INTO `sys_oper_log` VALUES (2037, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:45'); -INSERT INTO `sys_oper_log` VALUES (2038, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:45'); -INSERT INTO `sys_oper_log` VALUES (2039, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:46'); -INSERT INTO `sys_oper_log` VALUES (2040, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:46'); -INSERT INTO `sys_oper_log` VALUES (2041, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:46'); -INSERT INTO `sys_oper_log` VALUES (2042, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:47'); -INSERT INTO `sys_oper_log` VALUES (2043, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:47'); -INSERT INTO `sys_oper_log` VALUES (2044, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:47'); -INSERT INTO `sys_oper_log` VALUES (2045, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:47'); -INSERT INTO `sys_oper_log` VALUES (2046, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:48'); -INSERT INTO `sys_oper_log` VALUES (2047, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:48'); -INSERT INTO `sys_oper_log` VALUES (2048, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:48'); -INSERT INTO `sys_oper_log` VALUES (2049, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:49'); -INSERT INTO `sys_oper_log` VALUES (2050, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:49'); -INSERT INTO `sys_oper_log` VALUES (2051, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:51'); -INSERT INTO `sys_oper_log` VALUES (2052, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:52'); -INSERT INTO `sys_oper_log` VALUES (2053, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:52'); -INSERT INTO `sys_oper_log` VALUES (2054, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:52'); -INSERT INTO `sys_oper_log` VALUES (2055, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:52'); -INSERT INTO `sys_oper_log` VALUES (2056, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:53'); -INSERT INTO `sys_oper_log` VALUES (2057, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:54'); -INSERT INTO `sys_oper_log` VALUES (2058, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:55'); -INSERT INTO `sys_oper_log` VALUES (2059, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:56'); -INSERT INTO `sys_oper_log` VALUES (2060, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:57'); -INSERT INTO `sys_oper_log` VALUES (2061, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:57'); -INSERT INTO `sys_oper_log` VALUES (2062, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:57'); -INSERT INTO `sys_oper_log` VALUES (2063, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:58'); -INSERT INTO `sys_oper_log` VALUES (2064, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:58'); -INSERT INTO `sys_oper_log` VALUES (2065, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:58'); -INSERT INTO `sys_oper_log` VALUES (2066, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:58'); -INSERT INTO `sys_oper_log` VALUES (2067, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:59'); -INSERT INTO `sys_oper_log` VALUES (2068, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:59'); -INSERT INTO `sys_oper_log` VALUES (2069, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:59'); -INSERT INTO `sys_oper_log` VALUES (2070, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:55:59'); -INSERT INTO `sys_oper_log` VALUES (2071, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:56:00'); -INSERT INTO `sys_oper_log` VALUES (2072, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:56:00'); -INSERT INTO `sys_oper_log` VALUES (2073, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:56:00'); -INSERT INTO `sys_oper_log` VALUES (2074, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:56:00'); -INSERT INTO `sys_oper_log` VALUES (2075, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:56:01'); -INSERT INTO `sys_oper_log` VALUES (2076, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:56:01'); -INSERT INTO `sys_oper_log` VALUES (2077, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:56:01'); -INSERT INTO `sys_oper_log` VALUES (2078, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:56:01'); -INSERT INTO `sys_oper_log` VALUES (2079, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:56:01'); -INSERT INTO `sys_oper_log` VALUES (2080, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:56:02'); -INSERT INTO `sys_oper_log` VALUES (2081, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:56:02'); -INSERT INTO `sys_oper_log` VALUES (2082, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:56:02'); -INSERT INTO `sys_oper_log` VALUES (2083, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:56:02'); -INSERT INTO `sys_oper_log` VALUES (2084, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:56:03'); -INSERT INTO `sys_oper_log` VALUES (2085, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:56:04'); -INSERT INTO `sys_oper_log` VALUES (2086, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:56:04'); -INSERT INTO `sys_oper_log` VALUES (2087, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:56:04'); -INSERT INTO `sys_oper_log` VALUES (2088, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:56:04'); -INSERT INTO `sys_oper_log` VALUES (2089, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:56:04'); -INSERT INTO `sys_oper_log` VALUES (2090, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:56:05'); -INSERT INTO `sys_oper_log` VALUES (2091, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 15:56:05'); -INSERT INTO `sys_oper_log` VALUES (2092, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.updateDeviceInfo()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/updateDeviceInfo', '180.111.206.137', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceId\":1,\"deviceName\":\"阿拉丁神灯\"}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":1}', 0, NULL, '2021-08-27 16:07:26'); -INSERT INTO `sys_oper_log` VALUES (2093, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.updateDeviceInfo()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/updateDeviceInfo', '180.111.206.137', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceId\":1,\"deviceName\":\"阿拉丁神灯\"}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":1}', 0, NULL, '2021-08-27 16:08:03'); -INSERT INTO `sys_oper_log` VALUES (2094, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.updateDeviceInfo()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/updateDeviceInfo', '180.111.206.137', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceId\":1,\"deviceName\":\"阿拉丁神灯\"}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":1}', 0, NULL, '2021-08-27 16:11:32'); -INSERT INTO `sys_oper_log` VALUES (2095, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.updateDeviceInfo()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/updateDeviceInfo', '180.111.206.137', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceId\":1234,\"deviceName\":\"阿拉丁神灯\"}', 'null', 1, '设备不存在', '2021-08-27 16:12:50'); -INSERT INTO `sys_oper_log` VALUES (2096, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.updateDeviceInfo()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/updateDeviceInfo', '180.111.206.137', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceId\":1234,\"deviceName\":\"阿拉丁神灯\"}', 'null', 1, '设备不存在', '2021-08-27 16:12:54'); -INSERT INTO `sys_oper_log` VALUES (2097, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.updateDeviceInfo()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/updateDeviceInfo', '180.111.206.137', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceId\":1,\"deviceName\":\"阿拉丁神灯\"}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":1}', 0, NULL, '2021-08-27 16:13:42'); -INSERT INTO `sys_oper_log` VALUES (2098, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.updateDeviceInfo()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/updateDeviceInfo', '180.111.206.137', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceId\":1,\"deviceName\":\"阿拉丁神灯\"}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":1}', 0, NULL, '2021-08-27 16:14:01'); -INSERT INTO `sys_oper_log` VALUES (2099, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 16:14:13'); -INSERT INTO `sys_oper_log` VALUES (2100, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 16:14:14'); -INSERT INTO `sys_oper_log` VALUES (2101, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.updateDeviceInfo()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/updateDeviceInfo', '180.111.206.137', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceId\":12133,\"deviceName\":\"阿拉丁神灯\"}', 'null', 1, '设备不存在', '2021-08-27 16:16:03'); -INSERT INTO `sys_oper_log` VALUES (2102, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.updateDeviceInfo()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/updateDeviceInfo', '180.111.206.137', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceId\":12133,\"deviceName\":\"阿拉丁神灯\"}', 'null', 1, '设备不存在', '2021-08-27 16:16:06'); -INSERT INTO `sys_oper_log` VALUES (2103, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.updateDeviceInfo()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/updateDeviceInfo', '180.111.206.137', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceId\":12133,\"deviceName\":\"阿拉丁神灯\"}', 'null', 1, '设备不存在', '2021-08-27 16:16:15'); -INSERT INTO `sys_oper_log` VALUES (2104, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.updateDeviceInfo()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/updateDeviceInfo', '180.111.206.137', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceId\":12133,\"deviceName\":\"阿拉丁神灯\"}', 'null', 1, '设备不存在', '2021-08-27 16:16:18'); -INSERT INTO `sys_oper_log` VALUES (2105, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.updateDeviceInfo()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/updateDeviceInfo', '180.111.206.137', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceId\":1,\"deviceName\":\"阿拉丁神灯\"}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":1}', 0, NULL, '2021-08-27 16:18:05'); -INSERT INTO `sys_oper_log` VALUES (2106, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/bindDevice', '49.93.129.115', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', 'null', 1, '该设备已被绑定!', '2021-08-27 16:22:53'); -INSERT INTO `sys_oper_log` VALUES (2107, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/bindDevice', '49.93.129.115', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', 'null', 1, '该设备已被绑定!', '2021-08-27 16:23:24'); -INSERT INTO `sys_oper_log` VALUES (2108, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 16:23:41'); -INSERT INTO `sys_oper_log` VALUES (2109, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 16:23:43'); -INSERT INTO `sys_oper_log` VALUES (2110, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/bindDevice', '49.93.129.115', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', 'null', 1, '该设备已被绑定!', '2021-08-27 16:26:33'); -INSERT INTO `sys_oper_log` VALUES (2111, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/bindDevice', '49.93.129.115', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', 'null', 1, '该设备已被绑定!', '2021-08-27 16:27:37'); -INSERT INTO `sys_oper_log` VALUES (2112, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/bindDevice', '49.93.129.115', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', 'null', 1, '该设备已被绑定!', '2021-08-27 16:27:54'); -INSERT INTO `sys_oper_log` VALUES (2113, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', 'null', 1, '该设备已被绑定!', '2021-08-27 16:28:12'); -INSERT INTO `sys_oper_log` VALUES (2114, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/bindDevice', '49.93.129.115', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', 'null', 1, '该设备已被绑定!', '2021-08-27 16:30:10'); -INSERT INTO `sys_oper_log` VALUES (2115, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/bindDevice', '49.93.129.115', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', 'null', 1, '该设备已被绑定!', '2021-08-27 16:30:32'); -INSERT INTO `sys_oper_log` VALUES (2116, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', 'null', 1, '该设备已被绑定!', '2021-08-27 16:30:35'); -INSERT INTO `sys_oper_log` VALUES (2117, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/bindDevice', '49.93.129.115', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', 'null', 1, '该设备已被绑定!', '2021-08-27 16:34:21'); -INSERT INTO `sys_oper_log` VALUES (2118, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', 'null', 1, '该设备已被绑定!', '2021-08-27 16:35:01'); -INSERT INTO `sys_oper_log` VALUES (2119, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', 'null', 1, '该设备已被绑定!', '2021-08-27 16:39:15'); -INSERT INTO `sys_oper_log` VALUES (2120, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', 'null', 1, '该设备已被绑定!', '2021-08-27 16:40:56'); -INSERT INTO `sys_oper_log` VALUES (2121, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', 'null', 1, '该设备已被绑定!', '2021-08-27 16:42:53'); -INSERT INTO `sys_oper_log` VALUES (2122, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', 'null', 1, '该设备已被绑定!', '2021-08-27 16:45:04'); -INSERT INTO `sys_oper_log` VALUES (2123, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', 'null', 1, '该设备已被绑定!', '2021-08-27 16:45:18'); -INSERT INTO `sys_oper_log` VALUES (2124, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', 'null', 1, '该设备已被绑定!', '2021-08-27 16:45:29'); -INSERT INTO `sys_oper_log` VALUES (2125, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', 'null', 1, '该设备已被绑定!', '2021-08-27 16:46:52'); -INSERT INTO `sys_oper_log` VALUES (2126, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', 'null', 1, '该设备已被绑定!', '2021-08-27 16:47:39'); -INSERT INTO `sys_oper_log` VALUES (2127, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', 'null', 1, '该设备已被绑定!', '2021-08-27 16:55:23'); -INSERT INTO `sys_oper_log` VALUES (2128, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', 'null', 1, '该设备已被绑定!', '2021-08-27 16:55:41'); -INSERT INTO `sys_oper_log` VALUES (2129, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 16:55:50'); -INSERT INTO `sys_oper_log` VALUES (2130, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 16:55:50'); -INSERT INTO `sys_oper_log` VALUES (2131, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', 'null', 1, '该设备已被绑定!', '2021-08-27 16:56:08'); -INSERT INTO `sys_oper_log` VALUES (2132, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', 'null', 1, '该设备已被绑定!', '2021-08-27 16:56:11'); -INSERT INTO `sys_oper_log` VALUES (2133, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', 'null', 1, '该设备已被绑定!', '2021-08-27 16:56:21'); -INSERT INTO `sys_oper_log` VALUES (2134, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 16:56:23'); -INSERT INTO `sys_oper_log` VALUES (2135, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 16:56:24'); -INSERT INTO `sys_oper_log` VALUES (2136, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 16:56:25'); -INSERT INTO `sys_oper_log` VALUES (2137, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 16:56:25'); -INSERT INTO `sys_oper_log` VALUES (2138, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 16:56:27'); -INSERT INTO `sys_oper_log` VALUES (2139, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 16:56:28'); -INSERT INTO `sys_oper_log` VALUES (2140, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 16:56:28'); -INSERT INTO `sys_oper_log` VALUES (2141, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 16:56:29'); -INSERT INTO `sys_oper_log` VALUES (2142, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 16:56:29'); -INSERT INTO `sys_oper_log` VALUES (2143, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 16:56:30'); -INSERT INTO `sys_oper_log` VALUES (2144, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/bindDevice', '49.93.129.115', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', 'null', 1, '该设备已被绑定!', '2021-08-27 16:56:55'); -INSERT INTO `sys_oper_log` VALUES (2145, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/bindDevice', '49.93.129.115', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', 'null', 1, '该设备已被绑定!', '2021-08-27 16:57:00'); -INSERT INTO `sys_oper_log` VALUES (2146, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/bindDevice', '49.93.129.115', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', 'null', 1, '该设备已被绑定!', '2021-08-27 16:57:15'); -INSERT INTO `sys_oper_log` VALUES (2147, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/bindDevice', '49.93.129.115', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', 'null', 1, '该设备已被绑定!', '2021-08-27 16:57:19'); -INSERT INTO `sys_oper_log` VALUES (2148, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 16:57:22'); -INSERT INTO `sys_oper_log` VALUES (2149, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 16:57:23'); -INSERT INTO `sys_oper_log` VALUES (2150, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 16:57:23'); -INSERT INTO `sys_oper_log` VALUES (2151, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 16:57:24'); -INSERT INTO `sys_oper_log` VALUES (2152, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.updateDeviceInfo()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/updateDeviceInfo', '49.93.129.115', 'XX XX', '{\"remark\":\"12\",\"params\":{},\"deviceId\":1,\"deviceName\":\"remark\"}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":1}', 0, NULL, '2021-08-27 16:59:38'); -INSERT INTO `sys_oper_log` VALUES (2153, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 16:59:45'); -INSERT INTO `sys_oper_log` VALUES (2154, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '49.93.129.115', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 16:59:46'); -INSERT INTO `sys_oper_log` VALUES (2155, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"122345678\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"7CDFA1049ADA\",\"categoryId\":2}', 'null', 1, '该设备已被绑定!', '2021-08-27 17:00:56'); -INSERT INTO `sys_oper_log` VALUES (2156, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"cmd\":\"off\"}', 'null', 1, '设备编号不能为空', '2021-08-27 17:27:02'); -INSERT INTO `sys_oper_log` VALUES (2157, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"cmd\":\"off\"}', 'null', 1, '设备编号不能为空', '2021-08-27 17:27:54'); -INSERT INTO `sys_oper_log` VALUES (2158, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"cmd\":\"off\"}', 'null', 1, '设备编号不能为空', '2021-08-27 17:27:56'); -INSERT INTO `sys_oper_log` VALUES (2159, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"cmd\":\"off\"}', 'null', 1, '设备编号不能为空', '2021-08-27 17:27:57'); -INSERT INTO `sys_oper_log` VALUES (2160, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"cmd\":\"off\"}', 'null', 1, '设备编号不能为空', '2021-08-27 17:27:57'); -INSERT INTO `sys_oper_log` VALUES (2161, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"cmd\":\"off\"}', 'null', 1, '设备编号不能为空', '2021-08-27 17:28:00'); -INSERT INTO `sys_oper_log` VALUES (2162, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceNum()', 'GET', 1, 'A1BB9722086A', NULL, '/system/device/getDeviceInfoByDeviceNum', '222.95.162.245', 'XX XX', '{}', 'null', 1, 'nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property=\'userId\', mode=IN, javaType=class java.lang.String, jdbcType=null, numericScale=null, resultMapId=\'null\', jdbcTypeName=\'null\', expression=\'null\'}. Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #1 with JdbcType null . Try setting a different JdbcType for this parameter or a different configuration property. Cause: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String', '2021-08-27 17:58:25'); -INSERT INTO `sys_oper_log` VALUES (2163, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceNum()', 'GET', 1, 'A1BB9722086A', NULL, '/system/device/getDeviceInfoByDeviceNum', '222.95.162.245', 'XX XX', '{}', 'null', 1, 'nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property=\'userId\', mode=IN, javaType=class java.lang.String, jdbcType=null, numericScale=null, resultMapId=\'null\', jdbcTypeName=\'null\', expression=\'null\'}. Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #1 with JdbcType null . Try setting a different JdbcType for this parameter or a different configuration property. Cause: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String', '2021-08-27 17:59:54'); -INSERT INTO `sys_oper_log` VALUES (2164, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceNum()', 'GET', 1, 'A1BB9722086A', NULL, '/system/device/getDeviceInfoByDeviceNum', '222.95.162.245', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"7CDFA1049ADA\",\"remark\":\"12\",\"isOnline\":true,\"deviceName\":\"remark\",\"deviceId\":1}}', 0, NULL, '2021-08-27 18:01:18'); -INSERT INTO `sys_oper_log` VALUES (2165, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.unBindDevice()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/unBindDevice', '222.95.162.245', 'XX XX', '{\"params\":{},\"deviceId\":1}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":1}', 0, NULL, '2021-08-27 18:02:38'); -INSERT INTO `sys_oper_log` VALUES (2166, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"7CDFA1049ADA\",\"remark\":\"122345678\",\"isOnline\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":1}}', 0, NULL, '2021-08-27 18:15:10'); -INSERT INTO `sys_oper_log` VALUES (2167, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"7CDFA1049ADA\",\"remark\":\"122345678\",\"isOnline\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":1}}', 0, NULL, '2021-08-27 18:16:30'); -INSERT INTO `sys_oper_log` VALUES (2168, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"7CDFA1049ADA\",\"category_name\":\"智能灯\",\"remark\":\"122345678\",\"isOnline\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":1}}', 0, NULL, '2021-08-27 18:22:10'); -INSERT INTO `sys_oper_log` VALUES (2169, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"7CDFA1049ADA\",\"remark\":\"122345678\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":1,\"categoryName\":\"智能灯\",\"categoryId\":2}}', 0, NULL, '2021-08-27 18:25:00'); -INSERT INTO `sys_oper_log` VALUES (2170, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"7CDFA1049ADA\",\"remark\":\"122345678\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":1,\"categoryName\":\"智能灯\",\"categoryId\":2}}', 0, NULL, '2021-08-27 18:26:08'); -INSERT INTO `sys_oper_log` VALUES (2171, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceNum()', 'GET', 1, 'A1BB9722086A', NULL, '/system/device/getDeviceInfoByDeviceNum', '222.95.162.245', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"7CDFA1049ADA\",\"isOnline\":true,\"lightStatus\":true,\"deviceId\":1,\"categoryName\":\"智能灯\",\"categoryId\":2}}', 0, NULL, '2021-08-27 18:27:17'); -INSERT INTO `sys_oper_log` VALUES (2172, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"7CDFA1049ADA\",\"remark\":\"122345678\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":1,\"categoryName\":\"智能灯\",\"categoryId\":2}}', 0, NULL, '2021-08-27 18:27:36'); -INSERT INTO `sys_oper_log` VALUES (2173, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"7CDFA1049ADA\",\"remark\":\"122345678\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":1,\"categoryName\":\"智能灯\",\"categoryId\":2}}', 0, NULL, '2021-08-27 18:28:40'); -INSERT INTO `sys_oper_log` VALUES (2174, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 18:28:42'); -INSERT INTO `sys_oper_log` VALUES (2175, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 18:28:43'); -INSERT INTO `sys_oper_log` VALUES (2176, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 18:28:44'); -INSERT INTO `sys_oper_log` VALUES (2177, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 18:28:44'); -INSERT INTO `sys_oper_log` VALUES (2178, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.unBindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/unBindDevice', '180.111.206.137', 'XX XX', '{\"params\":{},\"deviceId\":1}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":1}', 0, NULL, '2021-08-27 18:28:51'); -INSERT INTO `sys_oper_log` VALUES (2179, '通知公告', 1, 'com.ruoyi.web.controller.system.SysNoticeController.add()', 'POST', 1, 'admin', NULL, '/system/notice', '222.95.162.245', 'XX XX', '{\"noticeContent\":\"

111111

\",\"createBy\":\"admin\",\"noticeType\":\"2\",\"params\":{},\"noticeTitle\":\"111\",\"status\":\"0\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 19:24:12'); -INSERT INTO `sys_oper_log` VALUES (2180, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/bindDevice', '58.212.134.111', 'XX XX', '{\"remark\":\"\",\"params\":{},\"deviceName\":\"wxy测试开关\",\"deviceNum\":\"863488052352472\",\"categoryId\":1}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":1}', 0, NULL, '2021-08-28 13:35:23'); -INSERT INTO `sys_oper_log` VALUES (2181, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '58.212.134.111', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-28 13:39:38'); -INSERT INTO `sys_oper_log` VALUES (2182, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '58.212.134.111', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-28 13:39:40'); -INSERT INTO `sys_oper_log` VALUES (2183, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '58.212.134.111', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-28 13:39:50'); -INSERT INTO `sys_oper_log` VALUES (2184, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '58.212.134.111', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-28 13:39:51'); -INSERT INTO `sys_oper_log` VALUES (2185, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '58.212.134.111', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-28 13:39:57'); -INSERT INTO `sys_oper_log` VALUES (2186, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '58.212.134.111', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-28 13:39:58'); -INSERT INTO `sys_oper_log` VALUES (2187, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '58.212.134.111', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-28 13:40:00'); -INSERT INTO `sys_oper_log` VALUES (2188, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '58.212.134.111', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-28 13:40:01'); -INSERT INTO `sys_oper_log` VALUES (2189, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '58.212.134.111', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-28 13:40:01'); -INSERT INTO `sys_oper_log` VALUES (2190, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '58.212.134.111', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-28 13:40:02'); -INSERT INTO `sys_oper_log` VALUES (2191, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '58.212.134.111', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-28 13:43:55'); -INSERT INTO `sys_oper_log` VALUES (2192, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '58.212.134.111', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-28 13:43:56'); -INSERT INTO `sys_oper_log` VALUES (2193, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '58.212.134.111', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-28 13:44:03'); -INSERT INTO `sys_oper_log` VALUES (2194, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '58.212.134.111', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-28 13:44:03'); -INSERT INTO `sys_oper_log` VALUES (2195, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '58.212.134.111', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-28 13:48:43'); -INSERT INTO `sys_oper_log` VALUES (2196, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '58.212.134.111', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-28 13:50:44'); -INSERT INTO `sys_oper_log` VALUES (2197, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '58.212.134.111', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-28 13:50:56'); -INSERT INTO `sys_oper_log` VALUES (2198, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '58.212.134.111', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-28 13:51:02'); -INSERT INTO `sys_oper_log` VALUES (2199, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '58.212.134.111', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-28 13:51:11'); -INSERT INTO `sys_oper_log` VALUES (2200, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"阿拉丁等等等灯\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"863488052352472\",\"categoryId\":2}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":1}', 0, NULL, '2021-08-30 10:17:55'); -INSERT INTO `sys_oper_log` VALUES (2201, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 10:18:41'); -INSERT INTO `sys_oper_log` VALUES (2202, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 10:18:47'); -INSERT INTO `sys_oper_log` VALUES (2203, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 10:18:54'); -INSERT INTO `sys_oper_log` VALUES (2204, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 10:19:08'); -INSERT INTO `sys_oper_log` VALUES (2205, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 10:19:12'); -INSERT INTO `sys_oper_log` VALUES (2206, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 10:19:35'); -INSERT INTO `sys_oper_log` VALUES (2207, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 10:19:37'); -INSERT INTO `sys_oper_log` VALUES (2208, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 10:20:09'); -INSERT INTO `sys_oper_log` VALUES (2209, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 10:24:30'); -INSERT INTO `sys_oper_log` VALUES (2210, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 10:25:17'); -INSERT INTO `sys_oper_log` VALUES (2211, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 10:25:19'); -INSERT INTO `sys_oper_log` VALUES (2212, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 10:25:23'); -INSERT INTO `sys_oper_log` VALUES (2213, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 10:25:27'); -INSERT INTO `sys_oper_log` VALUES (2214, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 10:25:36'); -INSERT INTO `sys_oper_log` VALUES (2215, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 10:26:00'); -INSERT INTO `sys_oper_log` VALUES (2216, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 10:26:18'); -INSERT INTO `sys_oper_log` VALUES (2217, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 10:26:20'); -INSERT INTO `sys_oper_log` VALUES (2218, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 10:26:21'); -INSERT INTO `sys_oper_log` VALUES (2219, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 10:29:11'); -INSERT INTO `sys_oper_log` VALUES (2220, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 10:31:31'); -INSERT INTO `sys_oper_log` VALUES (2221, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 10:33:12'); -INSERT INTO `sys_oper_log` VALUES (2222, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 10:33:20'); -INSERT INTO `sys_oper_log` VALUES (2223, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 10:38:44'); -INSERT INTO `sys_oper_log` VALUES (2224, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 10:38:58'); -INSERT INTO `sys_oper_log` VALUES (2225, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 10:39:41'); -INSERT INTO `sys_oper_log` VALUES (2226, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 10:40:32'); -INSERT INTO `sys_oper_log` VALUES (2227, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 10:42:12'); -INSERT INTO `sys_oper_log` VALUES (2228, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 10:45:49'); -INSERT INTO `sys_oper_log` VALUES (2229, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 10:45:54'); -INSERT INTO `sys_oper_log` VALUES (2230, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 10:46:27'); -INSERT INTO `sys_oper_log` VALUES (2231, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 10:46:32'); -INSERT INTO `sys_oper_log` VALUES (2232, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 10:48:18'); -INSERT INTO `sys_oper_log` VALUES (2233, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 10:50:12'); -INSERT INTO `sys_oper_log` VALUES (2234, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 10:53:58'); -INSERT INTO `sys_oper_log` VALUES (2235, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 10:54:13'); -INSERT INTO `sys_oper_log` VALUES (2236, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 10:54:35'); -INSERT INTO `sys_oper_log` VALUES (2237, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 10:54:40'); -INSERT INTO `sys_oper_log` VALUES (2238, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 10:55:08'); -INSERT INTO `sys_oper_log` VALUES (2239, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 10:55:11'); -INSERT INTO `sys_oper_log` VALUES (2240, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 10:55:34'); -INSERT INTO `sys_oper_log` VALUES (2241, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 10:55:46'); -INSERT INTO `sys_oper_log` VALUES (2242, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.unBindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/unBindDevice', '180.111.206.137', 'XX XX', '{\"params\":{},\"deviceId\":4}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":1}', 0, NULL, '2021-08-30 10:55:59'); -INSERT INTO `sys_oper_log` VALUES (2243, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '180.111.206.137', 'XX XX', '{\"remark\":\"\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"863488052352472\",\"categoryId\":2}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":1}', 0, NULL, '2021-08-30 10:57:14'); -INSERT INTO `sys_oper_log` VALUES (2244, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 10:57:19'); -INSERT INTO `sys_oper_log` VALUES (2245, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 10:57:22'); -INSERT INTO `sys_oper_log` VALUES (2246, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 10:57:25'); -INSERT INTO `sys_oper_log` VALUES (2247, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.updateDeviceInfo()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/updateDeviceInfo', '180.111.206.137', 'XX XX', '{\"params\":{},\"deviceId\":4,\"deviceName\":\"阿拉丁\"}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":1}', 0, NULL, '2021-08-30 10:57:35'); -INSERT INTO `sys_oper_log` VALUES (2248, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 10:57:39'); -INSERT INTO `sys_oper_log` VALUES (2249, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 15:27:39'); -INSERT INTO `sys_oper_log` VALUES (2250, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 15:27:44'); -INSERT INTO `sys_oper_log` VALUES (2251, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.updateDeviceInfo()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/updateDeviceInfo', '180.111.206.137', 'XX XX', '{\"remark\":\"灯等等灯\",\"params\":{},\"deviceId\":4,\"deviceName\":\"阿拉丁\"}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":1}', 0, NULL, '2021-08-30 15:28:03'); -INSERT INTO `sys_oper_log` VALUES (2252, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 15:28:05'); -INSERT INTO `sys_oper_log` VALUES (2253, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.updateDeviceInfo()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/updateDeviceInfo', '180.111.206.137', 'XX XX', '{\"remark\":\"灯等等灯\",\"params\":{},\"deviceId\":4,\"deviceName\":\"阿拉丁神灯\"}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":1}', 0, NULL, '2021-08-30 15:28:25'); -INSERT INTO `sys_oper_log` VALUES (2254, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 15:28:27'); -INSERT INTO `sys_oper_log` VALUES (2255, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 15:28:33'); -INSERT INTO `sys_oper_log` VALUES (2256, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 15:28:35'); -INSERT INTO `sys_oper_log` VALUES (2257, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 15:28:55'); -INSERT INTO `sys_oper_log` VALUES (2258, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 15:30:29'); -INSERT INTO `sys_oper_log` VALUES (2259, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 15:30:46'); -INSERT INTO `sys_oper_log` VALUES (2260, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.137', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 15:31:12'); -INSERT INTO `sys_oper_log` VALUES (2261, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 18:53:02'); -INSERT INTO `sys_oper_log` VALUES (2262, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 18:54:39'); -INSERT INTO `sys_oper_log` VALUES (2263, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 18:54:46'); -INSERT INTO `sys_oper_log` VALUES (2264, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 18:57:11'); -INSERT INTO `sys_oper_log` VALUES (2265, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 18:57:19'); -INSERT INTO `sys_oper_log` VALUES (2266, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 18:57:22'); -INSERT INTO `sys_oper_log` VALUES (2267, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 18:57:30'); -INSERT INTO `sys_oper_log` VALUES (2268, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 18:57:34'); -INSERT INTO `sys_oper_log` VALUES (2269, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 18:57:56'); -INSERT INTO `sys_oper_log` VALUES (2270, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 18:58:26'); -INSERT INTO `sys_oper_log` VALUES (2271, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 19:00:11'); -INSERT INTO `sys_oper_log` VALUES (2272, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 19:08:36'); -INSERT INTO `sys_oper_log` VALUES (2273, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 19:17:25'); -INSERT INTO `sys_oper_log` VALUES (2274, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 19:17:30'); -INSERT INTO `sys_oper_log` VALUES (2275, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 19:19:06'); -INSERT INTO `sys_oper_log` VALUES (2276, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-30 19:50:40'); -INSERT INTO `sys_oper_log` VALUES (2277, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 19:50:41'); -INSERT INTO `sys_oper_log` VALUES (2278, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 19:50:42'); -INSERT INTO `sys_oper_log` VALUES (2279, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 19:50:43'); -INSERT INTO `sys_oper_log` VALUES (2280, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 19:50:44'); -INSERT INTO `sys_oper_log` VALUES (2281, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 19:50:45'); -INSERT INTO `sys_oper_log` VALUES (2282, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 19:50:45'); -INSERT INTO `sys_oper_log` VALUES (2283, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 19:50:46'); -INSERT INTO `sys_oper_log` VALUES (2284, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 19:50:46'); -INSERT INTO `sys_oper_log` VALUES (2285, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 19:50:47'); -INSERT INTO `sys_oper_log` VALUES (2286, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 19:50:47'); -INSERT INTO `sys_oper_log` VALUES (2287, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 19:50:48'); -INSERT INTO `sys_oper_log` VALUES (2288, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 19:50:49'); -INSERT INTO `sys_oper_log` VALUES (2289, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 19:50:49'); -INSERT INTO `sys_oper_log` VALUES (2290, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 19:50:53'); -INSERT INTO `sys_oper_log` VALUES (2291, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 19:50:54'); -INSERT INTO `sys_oper_log` VALUES (2292, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 19:50:55'); -INSERT INTO `sys_oper_log` VALUES (2293, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 19:50:55'); -INSERT INTO `sys_oper_log` VALUES (2294, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-30 19:50:55'); -INSERT INTO `sys_oper_log` VALUES (2295, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 10:35:17'); -INSERT INTO `sys_oper_log` VALUES (2296, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 14:46:28'); -INSERT INTO `sys_oper_log` VALUES (2297, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 14:48:05'); -INSERT INTO `sys_oper_log` VALUES (2298, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 14:48:10'); -INSERT INTO `sys_oper_log` VALUES (2299, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/bindDevice', '180.111.206.122', 'XX XX', '{\"remark\":\"灯等等灯\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"863488052352472\",\"categoryId\":1}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":1}', 0, NULL, '2021-08-31 14:48:23'); -INSERT INTO `sys_oper_log` VALUES (2300, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:48:32'); -INSERT INTO `sys_oper_log` VALUES (2301, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:48:34'); -INSERT INTO `sys_oper_log` VALUES (2302, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:48:39'); -INSERT INTO `sys_oper_log` VALUES (2303, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:48:40'); -INSERT INTO `sys_oper_log` VALUES (2304, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:48:49'); -INSERT INTO `sys_oper_log` VALUES (2305, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:48:50'); -INSERT INTO `sys_oper_log` VALUES (2306, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:48:50'); -INSERT INTO `sys_oper_log` VALUES (2307, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:49:03'); -INSERT INTO `sys_oper_log` VALUES (2308, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:49:04'); -INSERT INTO `sys_oper_log` VALUES (2309, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:49:05'); -INSERT INTO `sys_oper_log` VALUES (2310, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:49:06'); -INSERT INTO `sys_oper_log` VALUES (2311, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:49:06'); -INSERT INTO `sys_oper_log` VALUES (2312, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:49:07'); -INSERT INTO `sys_oper_log` VALUES (2313, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:49:08'); -INSERT INTO `sys_oper_log` VALUES (2314, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:49:08'); -INSERT INTO `sys_oper_log` VALUES (2315, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:49:15'); -INSERT INTO `sys_oper_log` VALUES (2316, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:49:16'); -INSERT INTO `sys_oper_log` VALUES (2317, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:49:34'); -INSERT INTO `sys_oper_log` VALUES (2318, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, '6F1B3F33DD38', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 14:49:42'); -INSERT INTO `sys_oper_log` VALUES (2319, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, '6F1B3F33DD38', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 14:49:48'); -INSERT INTO `sys_oper_log` VALUES (2320, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.unBindDevice()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/unBindDevice', '180.111.206.122', 'XX XX', '{\"params\":{},\"deviceId\":4}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":1}', 0, NULL, '2021-08-31 14:49:54'); -INSERT INTO `sys_oper_log` VALUES (2321, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 14:50:01'); -INSERT INTO `sys_oper_log` VALUES (2322, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/bindDevice', '180.111.206.122', 'XX XX', '{\"remark\":\"灯等等灯\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"863488052352472\",\"categoryId\":1}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":1}', 0, NULL, '2021-08-31 14:50:07'); -INSERT INTO `sys_oper_log` VALUES (2323, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:50:09'); -INSERT INTO `sys_oper_log` VALUES (2324, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:50:10'); -INSERT INTO `sys_oper_log` VALUES (2325, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/bindDevice', '180.111.206.122', 'XX XX', '{\"remark\":\"灯等等灯\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"863488052352472\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-31 14:50:14'); -INSERT INTO `sys_oper_log` VALUES (2326, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:50:17'); -INSERT INTO `sys_oper_log` VALUES (2327, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:50:18'); -INSERT INTO `sys_oper_log` VALUES (2328, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/bindDevice', '180.111.206.122', 'XX XX', '{\"remark\":\"灯等等灯\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"863488052352472\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-31 14:50:22'); -INSERT INTO `sys_oper_log` VALUES (2329, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:50:25'); -INSERT INTO `sys_oper_log` VALUES (2330, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:50:26'); -INSERT INTO `sys_oper_log` VALUES (2331, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, '6F1B3F33DD38', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 14:50:34'); -INSERT INTO `sys_oper_log` VALUES (2332, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 14:50:38'); -INSERT INTO `sys_oper_log` VALUES (2333, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, '6F1B3F33DD38', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 14:50:59'); -INSERT INTO `sys_oper_log` VALUES (2334, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:51:00'); -INSERT INTO `sys_oper_log` VALUES (2335, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:51:01'); -INSERT INTO `sys_oper_log` VALUES (2336, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:51:02'); -INSERT INTO `sys_oper_log` VALUES (2337, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:51:03'); -INSERT INTO `sys_oper_log` VALUES (2338, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:51:04'); -INSERT INTO `sys_oper_log` VALUES (2339, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:51:05'); -INSERT INTO `sys_oper_log` VALUES (2340, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:51:05'); -INSERT INTO `sys_oper_log` VALUES (2341, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:51:06'); -INSERT INTO `sys_oper_log` VALUES (2342, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:51:06'); -INSERT INTO `sys_oper_log` VALUES (2343, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:51:07'); -INSERT INTO `sys_oper_log` VALUES (2344, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:51:08'); -INSERT INTO `sys_oper_log` VALUES (2345, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:51:08'); -INSERT INTO `sys_oper_log` VALUES (2346, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:51:09'); -INSERT INTO `sys_oper_log` VALUES (2347, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:51:10'); -INSERT INTO `sys_oper_log` VALUES (2348, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, '6F1B3F33DD38', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 14:51:29'); -INSERT INTO `sys_oper_log` VALUES (2349, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:51:31'); -INSERT INTO `sys_oper_log` VALUES (2350, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:51:32'); -INSERT INTO `sys_oper_log` VALUES (2351, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:51:32'); -INSERT INTO `sys_oper_log` VALUES (2352, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:51:33'); -INSERT INTO `sys_oper_log` VALUES (2353, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:51:33'); -INSERT INTO `sys_oper_log` VALUES (2354, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:51:34'); -INSERT INTO `sys_oper_log` VALUES (2355, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:51:34'); -INSERT INTO `sys_oper_log` VALUES (2356, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:51:35'); -INSERT INTO `sys_oper_log` VALUES (2357, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, '6F1B3F33DD38', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 14:52:57'); -INSERT INTO `sys_oper_log` VALUES (2358, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:52:59'); -INSERT INTO `sys_oper_log` VALUES (2359, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:52:59'); -INSERT INTO `sys_oper_log` VALUES (2360, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:01'); -INSERT INTO `sys_oper_log` VALUES (2361, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:02'); -INSERT INTO `sys_oper_log` VALUES (2362, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:02'); -INSERT INTO `sys_oper_log` VALUES (2363, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:02'); -INSERT INTO `sys_oper_log` VALUES (2364, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:02'); -INSERT INTO `sys_oper_log` VALUES (2365, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:03'); -INSERT INTO `sys_oper_log` VALUES (2366, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:03'); -INSERT INTO `sys_oper_log` VALUES (2367, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:03'); -INSERT INTO `sys_oper_log` VALUES (2368, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:03'); -INSERT INTO `sys_oper_log` VALUES (2369, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:03'); -INSERT INTO `sys_oper_log` VALUES (2370, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:04'); -INSERT INTO `sys_oper_log` VALUES (2371, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:04'); -INSERT INTO `sys_oper_log` VALUES (2372, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:04'); -INSERT INTO `sys_oper_log` VALUES (2373, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:04'); -INSERT INTO `sys_oper_log` VALUES (2374, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:05'); -INSERT INTO `sys_oper_log` VALUES (2375, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:05'); -INSERT INTO `sys_oper_log` VALUES (2376, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:05'); -INSERT INTO `sys_oper_log` VALUES (2377, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:05'); -INSERT INTO `sys_oper_log` VALUES (2378, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:05'); -INSERT INTO `sys_oper_log` VALUES (2379, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:06'); -INSERT INTO `sys_oper_log` VALUES (2380, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:06'); -INSERT INTO `sys_oper_log` VALUES (2381, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:07'); -INSERT INTO `sys_oper_log` VALUES (2382, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:07'); -INSERT INTO `sys_oper_log` VALUES (2383, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:07'); -INSERT INTO `sys_oper_log` VALUES (2384, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:07'); -INSERT INTO `sys_oper_log` VALUES (2385, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:07'); -INSERT INTO `sys_oper_log` VALUES (2386, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:08'); -INSERT INTO `sys_oper_log` VALUES (2387, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:08'); -INSERT INTO `sys_oper_log` VALUES (2388, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:08'); -INSERT INTO `sys_oper_log` VALUES (2389, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:08'); -INSERT INTO `sys_oper_log` VALUES (2390, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:09'); -INSERT INTO `sys_oper_log` VALUES (2391, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:09'); -INSERT INTO `sys_oper_log` VALUES (2392, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:17'); -INSERT INTO `sys_oper_log` VALUES (2393, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:18'); -INSERT INTO `sys_oper_log` VALUES (2394, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:18'); -INSERT INTO `sys_oper_log` VALUES (2395, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:18'); -INSERT INTO `sys_oper_log` VALUES (2396, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:18'); -INSERT INTO `sys_oper_log` VALUES (2397, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, '6F1B3F33DD38', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 14:53:23'); -INSERT INTO `sys_oper_log` VALUES (2398, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:24'); -INSERT INTO `sys_oper_log` VALUES (2399, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:25'); -INSERT INTO `sys_oper_log` VALUES (2400, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, '6F1B3F33DD38', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 14:53:30'); -INSERT INTO `sys_oper_log` VALUES (2401, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:31'); -INSERT INTO `sys_oper_log` VALUES (2402, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:32'); -INSERT INTO `sys_oper_log` VALUES (2403, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:32'); -INSERT INTO `sys_oper_log` VALUES (2404, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:32'); -INSERT INTO `sys_oper_log` VALUES (2405, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:32'); -INSERT INTO `sys_oper_log` VALUES (2406, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:33'); -INSERT INTO `sys_oper_log` VALUES (2407, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:33'); -INSERT INTO `sys_oper_log` VALUES (2408, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:33'); -INSERT INTO `sys_oper_log` VALUES (2409, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:33'); -INSERT INTO `sys_oper_log` VALUES (2410, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:33'); -INSERT INTO `sys_oper_log` VALUES (2411, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:33'); -INSERT INTO `sys_oper_log` VALUES (2412, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:34'); -INSERT INTO `sys_oper_log` VALUES (2413, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:34'); -INSERT INTO `sys_oper_log` VALUES (2414, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:34'); -INSERT INTO `sys_oper_log` VALUES (2415, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:34'); -INSERT INTO `sys_oper_log` VALUES (2416, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:34'); -INSERT INTO `sys_oper_log` VALUES (2417, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:35'); -INSERT INTO `sys_oper_log` VALUES (2418, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:35'); -INSERT INTO `sys_oper_log` VALUES (2419, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:35'); -INSERT INTO `sys_oper_log` VALUES (2420, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:35'); -INSERT INTO `sys_oper_log` VALUES (2421, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:35'); -INSERT INTO `sys_oper_log` VALUES (2422, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:36'); -INSERT INTO `sys_oper_log` VALUES (2423, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:36'); -INSERT INTO `sys_oper_log` VALUES (2424, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:44'); -INSERT INTO `sys_oper_log` VALUES (2425, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:45'); -INSERT INTO `sys_oper_log` VALUES (2426, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:45'); -INSERT INTO `sys_oper_log` VALUES (2427, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:45'); -INSERT INTO `sys_oper_log` VALUES (2428, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:45'); -INSERT INTO `sys_oper_log` VALUES (2429, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:46'); -INSERT INTO `sys_oper_log` VALUES (2430, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:47'); -INSERT INTO `sys_oper_log` VALUES (2431, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:53:48'); -INSERT INTO `sys_oper_log` VALUES (2432, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, '6F1B3F33DD38', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 14:54:03'); -INSERT INTO `sys_oper_log` VALUES (2433, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, '6F1B3F33DD38', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 14:54:09'); -INSERT INTO `sys_oper_log` VALUES (2434, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, '6F1B3F33DD38', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 14:54:32'); -INSERT INTO `sys_oper_log` VALUES (2435, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:54:34'); -INSERT INTO `sys_oper_log` VALUES (2436, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:54:35'); -INSERT INTO `sys_oper_log` VALUES (2437, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:54:36'); -INSERT INTO `sys_oper_log` VALUES (2438, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:54:37'); -INSERT INTO `sys_oper_log` VALUES (2439, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:54:37'); -INSERT INTO `sys_oper_log` VALUES (2440, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:54:38'); -INSERT INTO `sys_oper_log` VALUES (2441, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:54:39'); -INSERT INTO `sys_oper_log` VALUES (2442, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:54:40'); -INSERT INTO `sys_oper_log` VALUES (2443, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:54:41'); -INSERT INTO `sys_oper_log` VALUES (2444, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:54:42'); -INSERT INTO `sys_oper_log` VALUES (2445, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:54:43'); -INSERT INTO `sys_oper_log` VALUES (2446, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:54:44'); -INSERT INTO `sys_oper_log` VALUES (2447, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:54:45'); -INSERT INTO `sys_oper_log` VALUES (2448, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:54:46'); -INSERT INTO `sys_oper_log` VALUES (2449, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:54:47'); -INSERT INTO `sys_oper_log` VALUES (2450, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:54:48'); -INSERT INTO `sys_oper_log` VALUES (2451, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:54:48'); -INSERT INTO `sys_oper_log` VALUES (2452, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:54:49'); -INSERT INTO `sys_oper_log` VALUES (2453, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:54:50'); -INSERT INTO `sys_oper_log` VALUES (2454, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:54:51'); -INSERT INTO `sys_oper_log` VALUES (2455, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 14:54:52'); -INSERT INTO `sys_oper_log` VALUES (2456, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:54:52'); -INSERT INTO `sys_oper_log` VALUES (2457, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:54:53'); -INSERT INTO `sys_oper_log` VALUES (2458, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:54:53'); -INSERT INTO `sys_oper_log` VALUES (2459, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:54:54'); -INSERT INTO `sys_oper_log` VALUES (2460, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:54:54'); -INSERT INTO `sys_oper_log` VALUES (2461, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:54:55'); -INSERT INTO `sys_oper_log` VALUES (2462, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 14:54:56'); -INSERT INTO `sys_oper_log` VALUES (2463, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 14:54:59'); -INSERT INTO `sys_oper_log` VALUES (2464, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/bindDevice', '180.111.206.122', 'XX XX', '{\"remark\":\"灯等等灯\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"863488052352472\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-31 14:58:05'); -INSERT INTO `sys_oper_log` VALUES (2465, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/bindDevice', '180.111.206.122', 'XX XX', '{\"remark\":\"灯等等灯\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"863488052352472\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-31 14:58:11'); -INSERT INTO `sys_oper_log` VALUES (2466, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:58:16'); -INSERT INTO `sys_oper_log` VALUES (2467, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:58:17'); -INSERT INTO `sys_oper_log` VALUES (2468, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:58:19'); -INSERT INTO `sys_oper_log` VALUES (2469, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:58:20'); -INSERT INTO `sys_oper_log` VALUES (2470, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:58:21'); -INSERT INTO `sys_oper_log` VALUES (2471, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:58:21'); -INSERT INTO `sys_oper_log` VALUES (2472, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:58:23'); -INSERT INTO `sys_oper_log` VALUES (2473, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:58:23'); -INSERT INTO `sys_oper_log` VALUES (2474, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, '6F1B3F33DD38', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 14:58:33'); -INSERT INTO `sys_oper_log` VALUES (2475, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:58:35'); -INSERT INTO `sys_oper_log` VALUES (2476, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:58:35'); -INSERT INTO `sys_oper_log` VALUES (2477, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 14:58:49'); -INSERT INTO `sys_oper_log` VALUES (2478, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '117.136.45.101', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:58:54'); -INSERT INTO `sys_oper_log` VALUES (2479, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, '6F1B3F33DD38', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 14:58:58'); -INSERT INTO `sys_oper_log` VALUES (2480, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, '6F1B3F33DD38', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 14:59:01'); -INSERT INTO `sys_oper_log` VALUES (2481, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:59:05'); -INSERT INTO `sys_oper_log` VALUES (2482, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:59:06'); -INSERT INTO `sys_oper_log` VALUES (2483, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:59:07'); -INSERT INTO `sys_oper_log` VALUES (2484, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:59:08'); -INSERT INTO `sys_oper_log` VALUES (2485, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 14:59:14'); -INSERT INTO `sys_oper_log` VALUES (2486, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 14:59:16'); -INSERT INTO `sys_oper_log` VALUES (2487, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:59:18'); -INSERT INTO `sys_oper_log` VALUES (2488, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:59:21'); -INSERT INTO `sys_oper_log` VALUES (2489, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:59:22'); -INSERT INTO `sys_oper_log` VALUES (2490, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:59:23'); -INSERT INTO `sys_oper_log` VALUES (2491, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:59:24'); -INSERT INTO `sys_oper_log` VALUES (2492, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:59:25'); -INSERT INTO `sys_oper_log` VALUES (2493, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, '6F1B3F33DD38', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 14:59:36'); -INSERT INTO `sys_oper_log` VALUES (2494, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:59:38'); -INSERT INTO `sys_oper_log` VALUES (2495, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:59:39'); -INSERT INTO `sys_oper_log` VALUES (2496, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:59:40'); -INSERT INTO `sys_oper_log` VALUES (2497, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:59:41'); -INSERT INTO `sys_oper_log` VALUES (2498, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:59:43'); -INSERT INTO `sys_oper_log` VALUES (2499, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:59:44'); -INSERT INTO `sys_oper_log` VALUES (2500, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:59:45'); -INSERT INTO `sys_oper_log` VALUES (2501, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:59:45'); -INSERT INTO `sys_oper_log` VALUES (2502, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:59:46'); -INSERT INTO `sys_oper_log` VALUES (2503, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 14:59:46'); -INSERT INTO `sys_oper_log` VALUES (2504, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, '6F1B3F33DD38', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 14:59:52'); -INSERT INTO `sys_oper_log` VALUES (2505, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 15:54:30'); -INSERT INTO `sys_oper_log` VALUES (2506, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 15:54:32'); -INSERT INTO `sys_oper_log` VALUES (2507, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 15:54:33'); -INSERT INTO `sys_oper_log` VALUES (2508, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 15:54:34'); -INSERT INTO `sys_oper_log` VALUES (2509, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 15:54:35'); -INSERT INTO `sys_oper_log` VALUES (2510, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 15:54:35'); -INSERT INTO `sys_oper_log` VALUES (2511, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 15:54:36'); -INSERT INTO `sys_oper_log` VALUES (2512, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, '6F1B3F33DD38', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.72', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 15:58:06'); -INSERT INTO `sys_oper_log` VALUES (2513, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '117.136.45.72', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 15:58:08'); -INSERT INTO `sys_oper_log` VALUES (2514, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '117.136.45.72', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 15:58:09'); -INSERT INTO `sys_oper_log` VALUES (2515, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '117.136.45.72', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 15:58:10'); -INSERT INTO `sys_oper_log` VALUES (2516, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '117.136.45.72', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 15:58:12'); -INSERT INTO `sys_oper_log` VALUES (2517, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '117.136.45.72', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 15:58:13'); -INSERT INTO `sys_oper_log` VALUES (2518, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '117.136.45.72', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 15:58:13'); -INSERT INTO `sys_oper_log` VALUES (2519, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '117.136.45.72', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 15:58:14'); -INSERT INTO `sys_oper_log` VALUES (2520, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '117.136.45.72', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 15:58:15'); -INSERT INTO `sys_oper_log` VALUES (2521, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '117.136.45.72', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 15:58:15'); -INSERT INTO `sys_oper_log` VALUES (2522, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '117.136.45.72', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 15:58:17'); -INSERT INTO `sys_oper_log` VALUES (2523, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 15:59:07'); -INSERT INTO `sys_oper_log` VALUES (2524, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 15:59:25'); -INSERT INTO `sys_oper_log` VALUES (2525, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '117.136.45.101', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 15:59:32'); -INSERT INTO `sys_oper_log` VALUES (2526, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '117.136.45.101', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 15:59:33'); -INSERT INTO `sys_oper_log` VALUES (2527, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 15:59:46'); -INSERT INTO `sys_oper_log` VALUES (2528, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 15:59:51'); -INSERT INTO `sys_oper_log` VALUES (2529, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 16:00:05'); -INSERT INTO `sys_oper_log` VALUES (2530, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 16:00:08'); -INSERT INTO `sys_oper_log` VALUES (2531, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 16:00:13'); -INSERT INTO `sys_oper_log` VALUES (2532, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '117.136.45.101', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 16:00:14'); -INSERT INTO `sys_oper_log` VALUES (2533, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '117.136.45.101', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 16:00:15'); -INSERT INTO `sys_oper_log` VALUES (2534, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 16:01:01'); -INSERT INTO `sys_oper_log` VALUES (2535, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '117.136.45.101', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 16:01:07'); -INSERT INTO `sys_oper_log` VALUES (2536, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 16:01:14'); -INSERT INTO `sys_oper_log` VALUES (2537, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '117.136.45.101', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 16:01:30'); -INSERT INTO `sys_oper_log` VALUES (2538, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 16:01:33'); -INSERT INTO `sys_oper_log` VALUES (2539, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 16:02:15'); -INSERT INTO `sys_oper_log` VALUES (2540, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '117.136.45.101', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 16:02:19'); -INSERT INTO `sys_oper_log` VALUES (2541, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 16:02:43'); -INSERT INTO `sys_oper_log` VALUES (2542, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '117.136.45.101', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 16:02:46'); -INSERT INTO `sys_oper_log` VALUES (2543, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 16:02:48'); -INSERT INTO `sys_oper_log` VALUES (2544, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 16:02:53'); -INSERT INTO `sys_oper_log` VALUES (2545, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '117.136.45.101', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 19:29:05'); -INSERT INTO `sys_oper_log` VALUES (2546, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '117.136.45.101', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 19:29:05'); -INSERT INTO `sys_oper_log` VALUES (2547, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '117.136.45.101', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 19:29:05'); -INSERT INTO `sys_oper_log` VALUES (2548, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '117.136.45.101', 'XX XX', '{\"remark\":\"灯等等灯\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"863488052352472\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-31 19:29:05'); -INSERT INTO `sys_oper_log` VALUES (2549, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 19:30:16'); -INSERT INTO `sys_oper_log` VALUES (2550, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 19:30:30'); -INSERT INTO `sys_oper_log` VALUES (2551, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 19:31:21'); -INSERT INTO `sys_oper_log` VALUES (2552, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 19:31:56'); -INSERT INTO `sys_oper_log` VALUES (2553, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '117.136.45.101', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 19:32:02'); -INSERT INTO `sys_oper_log` VALUES (2554, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '117.136.45.101', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 19:32:03'); -INSERT INTO `sys_oper_log` VALUES (2555, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 19:32:08'); -INSERT INTO `sys_oper_log` VALUES (2556, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 19:32:20'); -INSERT INTO `sys_oper_log` VALUES (2557, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 19:32:39'); -INSERT INTO `sys_oper_log` VALUES (2558, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 19:32:47'); -INSERT INTO `sys_oper_log` VALUES (2559, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '117.136.45.101', 'XX XX', '{\"remark\":\"灯等等灯\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"863488052352472\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-31 19:32:52'); -INSERT INTO `sys_oper_log` VALUES (2560, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 19:32:52'); -INSERT INTO `sys_oper_log` VALUES (2561, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 19:32:57'); -INSERT INTO `sys_oper_log` VALUES (2562, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 19:33:01'); -INSERT INTO `sys_oper_log` VALUES (2563, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/bindDevice', '117.136.45.101', 'XX XX', '{\"remark\":\"灯等等灯\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"863488052352472\",\"categoryId\":1}', 'null', 1, '该设备已被绑定!', '2021-08-31 19:33:05'); -INSERT INTO `sys_oper_log` VALUES (2564, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 19:33:05'); -INSERT INTO `sys_oper_log` VALUES (2565, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '117.136.45.101', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 19:33:11'); -INSERT INTO `sys_oper_log` VALUES (2566, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 19:33:18'); -INSERT INTO `sys_oper_log` VALUES (2567, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '117.136.45.101', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 19:33:20'); -INSERT INTO `sys_oper_log` VALUES (2568, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 19:33:22'); -INSERT INTO `sys_oper_log` VALUES (2569, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 19:38:01'); -INSERT INTO `sys_oper_log` VALUES (2570, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 19:38:07'); -INSERT INTO `sys_oper_log` VALUES (2571, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 19:40:39'); -INSERT INTO `sys_oper_log` VALUES (2572, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 19:40:42'); -INSERT INTO `sys_oper_log` VALUES (2573, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 19:41:12'); -INSERT INTO `sys_oper_log` VALUES (2574, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 19:41:20'); -INSERT INTO `sys_oper_log` VALUES (2575, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '117.136.45.101', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 19:41:21'); -INSERT INTO `sys_oper_log` VALUES (2576, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '117.136.45.101', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 19:41:23'); -INSERT INTO `sys_oper_log` VALUES (2577, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 19:41:27'); -INSERT INTO `sys_oper_log` VALUES (2578, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 19:41:31'); -INSERT INTO `sys_oper_log` VALUES (2579, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 19:41:35'); -INSERT INTO `sys_oper_log` VALUES (2580, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 19:41:37'); -INSERT INTO `sys_oper_log` VALUES (2581, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 19:41:41'); -INSERT INTO `sys_oper_log` VALUES (2582, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 19:41:54'); -INSERT INTO `sys_oper_log` VALUES (2583, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '117.136.45.101', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 19:41:55'); -INSERT INTO `sys_oper_log` VALUES (2584, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 19:41:57'); -INSERT INTO `sys_oper_log` VALUES (2585, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 19:43:27'); -INSERT INTO `sys_oper_log` VALUES (2586, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '117.136.45.101', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 19:43:30'); -INSERT INTO `sys_oper_log` VALUES (2587, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '117.136.45.101', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 19:43:35'); -INSERT INTO `sys_oper_log` VALUES (2588, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '117.136.45.101', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 19:43:38'); -INSERT INTO `sys_oper_log` VALUES (2589, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '117.136.45.101', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 19:43:42'); -INSERT INTO `sys_oper_log` VALUES (2590, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '117.136.45.101', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 19:43:43'); -INSERT INTO `sys_oper_log` VALUES (2591, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '117.136.45.101', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 19:43:45'); -INSERT INTO `sys_oper_log` VALUES (2592, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '117.136.45.101', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 19:43:47'); -INSERT INTO `sys_oper_log` VALUES (2593, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 19:52:01'); -INSERT INTO `sys_oper_log` VALUES (2594, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '117.136.45.101', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 19:52:06'); -INSERT INTO `sys_oper_log` VALUES (2595, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 19:53:21'); -INSERT INTO `sys_oper_log` VALUES (2596, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '117.136.45.101', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 19:53:25'); -INSERT INTO `sys_oper_log` VALUES (2597, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 19:53:41'); -INSERT INTO `sys_oper_log` VALUES (2598, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 19:59:40'); -INSERT INTO `sys_oper_log` VALUES (2599, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '117.136.45.101', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 19:59:42'); -INSERT INTO `sys_oper_log` VALUES (2600, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '117.136.45.101', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 19:59:45'); -INSERT INTO `sys_oper_log` VALUES (2601, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '117.136.45.101', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 19:59:46'); -INSERT INTO `sys_oper_log` VALUES (2602, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 19:59:50'); -INSERT INTO `sys_oper_log` VALUES (2603, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 20:02:10'); -INSERT INTO `sys_oper_log` VALUES (2604, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '117.136.45.101', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 20:02:30'); -INSERT INTO `sys_oper_log` VALUES (2605, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 20:02:33'); -INSERT INTO `sys_oper_log` VALUES (2606, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, '6F1B3F33DD38', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.72', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"lightStatus\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"wifi通断器\",\"categoryId\":1}}', 0, NULL, '2021-08-31 20:02:36'); -INSERT INTO `sys_oper_log` VALUES (2607, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '117.136.45.72', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 20:02:37'); -INSERT INTO `sys_oper_log` VALUES (2608, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '117.136.45.72', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 20:02:40'); -INSERT INTO `sys_oper_log` VALUES (2609, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '117.136.45.72', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 20:02:43'); -INSERT INTO `sys_oper_log` VALUES (2610, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '117.136.45.72', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 20:02:45'); -INSERT INTO `sys_oper_log` VALUES (2611, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '117.136.45.72', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 20:02:46'); -INSERT INTO `sys_oper_log` VALUES (2612, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '117.136.45.72', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 20:02:55'); -INSERT INTO `sys_oper_log` VALUES (2613, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '117.136.45.101', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 20:02:55'); -INSERT INTO `sys_oper_log` VALUES (2614, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '117.136.45.72', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 20:02:55'); -INSERT INTO `sys_oper_log` VALUES (2615, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, '6F1B3F33DD38', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.72', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"isOnline\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"智能水阀\",\"categoryId\":4}}', 0, NULL, '2021-08-31 20:11:29'); -INSERT INTO `sys_oper_log` VALUES (2616, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"智能水阀\",\"categoryId\":4}}', 0, NULL, '2021-08-31 20:14:10'); -INSERT INTO `sys_oper_log` VALUES (2617, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 20:14:11'); -INSERT INTO `sys_oper_log` VALUES (2618, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 20:14:12'); -INSERT INTO `sys_oper_log` VALUES (2619, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"remark\":\"灯等等灯\",\"isOnline\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"智能水阀\",\"categoryId\":4}}', 0, NULL, '2021-08-31 20:14:18'); -INSERT INTO `sys_oper_log` VALUES (2620, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"relayStatus\":false,\"remark\":\"灯等等灯\",\"isOnline\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"智能水阀\",\"categoryId\":4}}', 0, NULL, '2021-08-31 20:18:14'); -INSERT INTO `sys_oper_log` VALUES (2621, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"relayStatus\":false,\"remark\":\"灯等等灯\",\"isOnline\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"智能水阀\",\"categoryId\":4}}', 0, NULL, '2021-08-31 20:19:27'); -INSERT INTO `sys_oper_log` VALUES (2622, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 20:19:28'); -INSERT INTO `sys_oper_log` VALUES (2623, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '180.111.206.122', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 20:19:30'); -INSERT INTO `sys_oper_log` VALUES (2624, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '180.111.206.122', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"relayStatus\":false,\"remark\":\"灯等等灯\",\"isOnline\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"智能水阀\",\"categoryId\":4}}', 0, NULL, '2021-08-31 20:19:32'); -INSERT INTO `sys_oper_log` VALUES (2625, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"relayStatus\":false,\"remark\":\"灯等等灯\",\"isOnline\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"智能水阀\",\"categoryId\":4}}', 0, NULL, '2021-08-31 20:20:00'); -INSERT INTO `sys_oper_log` VALUES (2626, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '117.136.45.101', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 20:20:01'); -INSERT INTO `sys_oper_log` VALUES (2627, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '117.136.45.101', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 20:20:02'); -INSERT INTO `sys_oper_log` VALUES (2628, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"relayStatus\":false,\"remark\":\"灯等等灯\",\"isOnline\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"智能水阀\",\"categoryId\":4}}', 0, NULL, '2021-08-31 20:20:12'); -INSERT INTO `sys_oper_log` VALUES (2629, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"relayStatus\":false,\"remark\":\"灯等等灯\",\"isOnline\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"智能水阀\",\"categoryId\":4}}', 0, NULL, '2021-08-31 20:20:16'); -INSERT INTO `sys_oper_log` VALUES (2630, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"relayStatus\":false,\"remark\":\"灯等等灯\",\"isOnline\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"智能水阀\",\"categoryId\":4}}', 0, NULL, '2021-08-31 20:23:25'); -INSERT INTO `sys_oper_log` VALUES (2631, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, '6F1B3F33DD38', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.72', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"relayStatus\":false,\"isOnline\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"智能水阀\",\"categoryId\":4}}', 0, NULL, '2021-08-31 20:23:28'); -INSERT INTO `sys_oper_log` VALUES (2632, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '117.136.45.72', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 20:23:32'); -INSERT INTO `sys_oper_log` VALUES (2633, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"relayStatus\":true,\"remark\":\"灯等等灯\",\"isOnline\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"智能水阀\",\"categoryId\":4}}', 0, NULL, '2021-08-31 20:23:35'); -INSERT INTO `sys_oper_log` VALUES (2634, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/device/control', '117.136.45.101', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 20:23:38'); -INSERT INTO `sys_oper_log` VALUES (2635, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, '6F1B3F33DD38', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.72', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"relayStatus\":false,\"isOnline\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"智能水阀\",\"categoryId\":4}}', 0, NULL, '2021-08-31 20:23:43'); -INSERT INTO `sys_oper_log` VALUES (2636, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, '6F1B3F33DD38', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.72', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"relayStatus\":false,\"isOnline\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"智能水阀\",\"categoryId\":4}}', 0, NULL, '2021-08-31 20:23:48'); -INSERT INTO `sys_oper_log` VALUES (2637, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"relayStatus\":false,\"remark\":\"灯等等灯\",\"isOnline\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"智能水阀\",\"categoryId\":4}}', 0, NULL, '2021-08-31 20:23:55'); -INSERT INTO `sys_oper_log` VALUES (2638, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, '6F1B3F33DD38', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.72', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"relayStatus\":false,\"isOnline\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"智能水阀\",\"categoryId\":4}}', 0, NULL, '2021-08-31 20:23:55'); -INSERT INTO `sys_oper_log` VALUES (2639, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.unBindDevice()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/unBindDevice', '117.136.45.72', 'XX XX', '{\"params\":{},\"deviceId\":4}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":1}', 0, NULL, '2021-08-31 20:23:58'); -INSERT INTO `sys_oper_log` VALUES (2640, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, 'EB5312FB4A26', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.101', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":{\"deviceNum\":\"863488052352472\",\"relayStatus\":false,\"remark\":\"灯等等灯\",\"isOnline\":true,\"deviceName\":\"阿拉丁神灯\",\"deviceId\":4,\"categoryName\":\"智能水阀\",\"categoryId\":4}}', 0, NULL, '2021-08-31 20:24:04'); -INSERT INTO `sys_oper_log` VALUES (2641, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/bindDevice', '117.136.45.72', 'XX XX', '{\"remark\":\"灯等等灯\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"863488052352472\",\"categoryId\":4}', '{\"msg\":\"操作成功\",\"code\":200,\"data\":1}', 0, NULL, '2021-08-31 20:24:31'); -INSERT INTO `sys_oper_log` VALUES (2642, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, '6F1B3F33DD38', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.72', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 20:24:31'); -INSERT INTO `sys_oper_log` VALUES (2643, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '117.136.45.72', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 20:24:35'); -INSERT INTO `sys_oper_log` VALUES (2644, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '117.136.45.72', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 20:24:38'); -INSERT INTO `sys_oper_log` VALUES (2645, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '117.136.45.72', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 20:24:40'); -INSERT INTO `sys_oper_log` VALUES (2646, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '117.136.45.72', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 20:24:41'); -INSERT INTO `sys_oper_log` VALUES (2647, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '117.136.45.72', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 20:24:46'); -INSERT INTO `sys_oper_log` VALUES (2648, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '117.136.45.72', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 20:24:49'); -INSERT INTO `sys_oper_log` VALUES (2649, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '117.136.45.72', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 20:24:50'); -INSERT INTO `sys_oper_log` VALUES (2650, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, '6F1B3F33DD38', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.72', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 20:24:55'); -INSERT INTO `sys_oper_log` VALUES (2651, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/bindDevice', '117.136.45.72', 'XX XX', '{\"remark\":\"灯等等灯\",\"params\":{},\"deviceName\":\"阿拉丁神灯\",\"deviceNum\":\"863488052352472\",\"categoryId\":4}', 'null', 1, '该设备已被绑定!', '2021-08-31 20:25:05'); -INSERT INTO `sys_oper_log` VALUES (2652, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.getDeviceInfoByDeviceId()', 'GET', 1, '6F1B3F33DD38', NULL, '/system/device/getDeviceInfoByDeviceId', '117.136.45.72', 'XX XX', '{}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 20:25:05'); -INSERT INTO `sys_oper_log` VALUES (2653, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '117.136.45.72', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 20:25:07'); -INSERT INTO `sys_oper_log` VALUES (2654, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '117.136.45.72', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 20:25:08'); -INSERT INTO `sys_oper_log` VALUES (2655, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '117.136.45.72', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 20:25:09'); -INSERT INTO `sys_oper_log` VALUES (2656, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '117.136.45.72', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 20:25:10'); -INSERT INTO `sys_oper_log` VALUES (2657, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '117.136.45.72', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 20:25:11'); -INSERT INTO `sys_oper_log` VALUES (2658, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '117.136.45.72', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 20:25:12'); -INSERT INTO `sys_oper_log` VALUES (2659, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '117.136.45.72', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 20:25:12'); -INSERT INTO `sys_oper_log` VALUES (2660, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '117.136.45.72', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 20:25:13'); -INSERT INTO `sys_oper_log` VALUES (2661, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '117.136.45.72', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 20:25:14'); -INSERT INTO `sys_oper_log` VALUES (2662, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, '6F1B3F33DD38', NULL, '/system/device/control', '117.136.45.72', 'XX XX', '{\"deviceNum\":\"863488052352472\",\"cmd\":\"off\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-31 20:25:14'); - --- ---------------------------- --- Table structure for sys_post --- ---------------------------- -DROP TABLE IF EXISTS `sys_post`; -CREATE TABLE `sys_post` ( - `post_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '岗位ID', - `post_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '岗位编码', - `post_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '岗位名称', - `post_sort` int(0) NOT NULL COMMENT '显示顺序', - `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '状态(0正常 1停用)', - `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`post_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '岗位信息表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_post --- ---------------------------- -INSERT INTO `sys_post` VALUES (1, 'ceo', '董事长', 1, '0', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_post` VALUES (2, 'se', '项目经理', 2, '0', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_post` VALUES (3, 'hr', '人力资源', 3, '0', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_post` VALUES (4, 'user', '普通员工', 4, '0', 'admin', '2021-05-18 02:23:06', '', NULL, ''); - --- ---------------------------- --- Table structure for sys_role --- ---------------------------- -DROP TABLE IF EXISTS `sys_role`; -CREATE TABLE `sys_role` ( - `role_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '角色ID', - `role_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '角色名称', - `role_key` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '角色权限字符串', - `role_sort` int(0) NOT NULL COMMENT '显示顺序', - `data_scope` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '1' COMMENT '数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)', - `menu_check_strictly` tinyint(1) NULL DEFAULT 1 COMMENT '菜单树选择项是否关联显示', - `dept_check_strictly` tinyint(1) NULL DEFAULT 1 COMMENT '部门树选择项是否关联显示', - `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '角色状态(0正常 1停用)', - `del_flag` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '删除标志(0代表存在 2代表删除)', - `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`role_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 102 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色信息表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_role --- ---------------------------- -INSERT INTO `sys_role` VALUES (1, '超级管理员', 'admin', 1, '1', 1, 1, '0', '0', 'admin', '2021-05-18 02:23:06', '', NULL, '超级管理员'); -INSERT INTO `sys_role` VALUES (2, '普通角色', 'common', 2, '2', 1, 1, '0', '0', 'admin', '2021-05-18 02:23:06', '', NULL, '普通角色'); -INSERT INTO `sys_role` VALUES (100, '游客角色', 'visitor', 8, '1', 1, 1, '0', '0', 'admin', '2021-05-29 08:42:32', 'admin', '2021-08-26 17:27:05', NULL); -INSERT INTO `sys_role` VALUES (101, '小程序用户', 'mp', 3, '1', 1, 1, '0', '0', 'admin', '2021-08-26 17:26:52', '', NULL, NULL); - --- ---------------------------- --- Table structure for sys_role_dept --- ---------------------------- -DROP TABLE IF EXISTS `sys_role_dept`; -CREATE TABLE `sys_role_dept` ( - `role_id` bigint(0) NOT NULL COMMENT '角色ID', - `dept_id` bigint(0) NOT NULL COMMENT '部门ID', - PRIMARY KEY (`role_id`, `dept_id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色和部门关联表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_role_dept --- ---------------------------- -INSERT INTO `sys_role_dept` VALUES (2, 100); -INSERT INTO `sys_role_dept` VALUES (2, 101); -INSERT INTO `sys_role_dept` VALUES (2, 105); - --- ---------------------------- --- Table structure for sys_role_menu --- ---------------------------- -DROP TABLE IF EXISTS `sys_role_menu`; -CREATE TABLE `sys_role_menu` ( - `role_id` bigint(0) NOT NULL COMMENT '角色ID', - `menu_id` bigint(0) NOT NULL COMMENT '菜单ID', - PRIMARY KEY (`role_id`, `menu_id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色和菜单关联表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_role_menu --- ---------------------------- -INSERT INTO `sys_role_menu` VALUES (2, 1); -INSERT INTO `sys_role_menu` VALUES (2, 2); -INSERT INTO `sys_role_menu` VALUES (2, 3); -INSERT INTO `sys_role_menu` VALUES (2, 4); -INSERT INTO `sys_role_menu` VALUES (2, 100); -INSERT INTO `sys_role_menu` VALUES (2, 101); -INSERT INTO `sys_role_menu` VALUES (2, 102); -INSERT INTO `sys_role_menu` VALUES (2, 103); -INSERT INTO `sys_role_menu` VALUES (2, 104); -INSERT INTO `sys_role_menu` VALUES (2, 105); -INSERT INTO `sys_role_menu` VALUES (2, 106); -INSERT INTO `sys_role_menu` VALUES (2, 107); -INSERT INTO `sys_role_menu` VALUES (2, 108); -INSERT INTO `sys_role_menu` VALUES (2, 109); -INSERT INTO `sys_role_menu` VALUES (2, 110); -INSERT INTO `sys_role_menu` VALUES (2, 111); -INSERT INTO `sys_role_menu` VALUES (2, 112); -INSERT INTO `sys_role_menu` VALUES (2, 113); -INSERT INTO `sys_role_menu` VALUES (2, 114); -INSERT INTO `sys_role_menu` VALUES (2, 115); -INSERT INTO `sys_role_menu` VALUES (2, 116); -INSERT INTO `sys_role_menu` VALUES (2, 500); -INSERT INTO `sys_role_menu` VALUES (2, 501); -INSERT INTO `sys_role_menu` VALUES (2, 1000); -INSERT INTO `sys_role_menu` VALUES (2, 1001); -INSERT INTO `sys_role_menu` VALUES (2, 1002); -INSERT INTO `sys_role_menu` VALUES (2, 1003); -INSERT INTO `sys_role_menu` VALUES (2, 1004); -INSERT INTO `sys_role_menu` VALUES (2, 1005); -INSERT INTO `sys_role_menu` VALUES (2, 1006); -INSERT INTO `sys_role_menu` VALUES (2, 1007); -INSERT INTO `sys_role_menu` VALUES (2, 1008); -INSERT INTO `sys_role_menu` VALUES (2, 1009); -INSERT INTO `sys_role_menu` VALUES (2, 1010); -INSERT INTO `sys_role_menu` VALUES (2, 1011); -INSERT INTO `sys_role_menu` VALUES (2, 1012); -INSERT INTO `sys_role_menu` VALUES (2, 1013); -INSERT INTO `sys_role_menu` VALUES (2, 1014); -INSERT INTO `sys_role_menu` VALUES (2, 1015); -INSERT INTO `sys_role_menu` VALUES (2, 1016); -INSERT INTO `sys_role_menu` VALUES (2, 1017); -INSERT INTO `sys_role_menu` VALUES (2, 1018); -INSERT INTO `sys_role_menu` VALUES (2, 1019); -INSERT INTO `sys_role_menu` VALUES (2, 1020); -INSERT INTO `sys_role_menu` VALUES (2, 1021); -INSERT INTO `sys_role_menu` VALUES (2, 1022); -INSERT INTO `sys_role_menu` VALUES (2, 1023); -INSERT INTO `sys_role_menu` VALUES (2, 1024); -INSERT INTO `sys_role_menu` VALUES (2, 1025); -INSERT INTO `sys_role_menu` VALUES (2, 1026); -INSERT INTO `sys_role_menu` VALUES (2, 1027); -INSERT INTO `sys_role_menu` VALUES (2, 1028); -INSERT INTO `sys_role_menu` VALUES (2, 1029); -INSERT INTO `sys_role_menu` VALUES (2, 1030); -INSERT INTO `sys_role_menu` VALUES (2, 1031); -INSERT INTO `sys_role_menu` VALUES (2, 1032); -INSERT INTO `sys_role_menu` VALUES (2, 1033); -INSERT INTO `sys_role_menu` VALUES (2, 1034); -INSERT INTO `sys_role_menu` VALUES (2, 1035); -INSERT INTO `sys_role_menu` VALUES (2, 1036); -INSERT INTO `sys_role_menu` VALUES (2, 1037); -INSERT INTO `sys_role_menu` VALUES (2, 1038); -INSERT INTO `sys_role_menu` VALUES (2, 1039); -INSERT INTO `sys_role_menu` VALUES (2, 1040); -INSERT INTO `sys_role_menu` VALUES (2, 1041); -INSERT INTO `sys_role_menu` VALUES (2, 1042); -INSERT INTO `sys_role_menu` VALUES (2, 1043); -INSERT INTO `sys_role_menu` VALUES (2, 1044); -INSERT INTO `sys_role_menu` VALUES (2, 1045); -INSERT INTO `sys_role_menu` VALUES (2, 1046); -INSERT INTO `sys_role_menu` VALUES (2, 1047); -INSERT INTO `sys_role_menu` VALUES (2, 1048); -INSERT INTO `sys_role_menu` VALUES (2, 1049); -INSERT INTO `sys_role_menu` VALUES (2, 1050); -INSERT INTO `sys_role_menu` VALUES (2, 1051); -INSERT INTO `sys_role_menu` VALUES (2, 1052); -INSERT INTO `sys_role_menu` VALUES (2, 1053); -INSERT INTO `sys_role_menu` VALUES (2, 1054); -INSERT INTO `sys_role_menu` VALUES (2, 1055); -INSERT INTO `sys_role_menu` VALUES (2, 1056); -INSERT INTO `sys_role_menu` VALUES (2, 1057); -INSERT INTO `sys_role_menu` VALUES (2, 1058); -INSERT INTO `sys_role_menu` VALUES (2, 1059); -INSERT INTO `sys_role_menu` VALUES (2, 1060); -INSERT INTO `sys_role_menu` VALUES (100, 1); -INSERT INTO `sys_role_menu` VALUES (100, 2); -INSERT INTO `sys_role_menu` VALUES (100, 3); -INSERT INTO `sys_role_menu` VALUES (100, 4); -INSERT INTO `sys_role_menu` VALUES (100, 100); -INSERT INTO `sys_role_menu` VALUES (100, 101); -INSERT INTO `sys_role_menu` VALUES (100, 102); -INSERT INTO `sys_role_menu` VALUES (100, 103); -INSERT INTO `sys_role_menu` VALUES (100, 104); -INSERT INTO `sys_role_menu` VALUES (100, 105); -INSERT INTO `sys_role_menu` VALUES (100, 106); -INSERT INTO `sys_role_menu` VALUES (100, 107); -INSERT INTO `sys_role_menu` VALUES (100, 108); -INSERT INTO `sys_role_menu` VALUES (100, 109); -INSERT INTO `sys_role_menu` VALUES (100, 110); -INSERT INTO `sys_role_menu` VALUES (100, 115); -INSERT INTO `sys_role_menu` VALUES (100, 116); -INSERT INTO `sys_role_menu` VALUES (100, 500); -INSERT INTO `sys_role_menu` VALUES (100, 501); -INSERT INTO `sys_role_menu` VALUES (100, 1001); -INSERT INTO `sys_role_menu` VALUES (100, 1008); -INSERT INTO `sys_role_menu` VALUES (100, 1013); -INSERT INTO `sys_role_menu` VALUES (100, 1017); -INSERT INTO `sys_role_menu` VALUES (100, 1021); -INSERT INTO `sys_role_menu` VALUES (100, 1026); -INSERT INTO `sys_role_menu` VALUES (100, 1031); -INSERT INTO `sys_role_menu` VALUES (100, 1036); -INSERT INTO `sys_role_menu` VALUES (100, 1040); -INSERT INTO `sys_role_menu` VALUES (100, 1043); -INSERT INTO `sys_role_menu` VALUES (100, 1046); -INSERT INTO `sys_role_menu` VALUES (100, 1049); -INSERT INTO `sys_role_menu` VALUES (100, 1055); -INSERT INTO `sys_role_menu` VALUES (100, 2000); -INSERT INTO `sys_role_menu` VALUES (100, 2043); -INSERT INTO `sys_role_menu` VALUES (100, 2044); -INSERT INTO `sys_role_menu` VALUES (100, 2049); -INSERT INTO `sys_role_menu` VALUES (100, 2050); -INSERT INTO `sys_role_menu` VALUES (100, 2055); -INSERT INTO `sys_role_menu` VALUES (100, 2056); -INSERT INTO `sys_role_menu` VALUES (100, 2061); -INSERT INTO `sys_role_menu` VALUES (100, 2062); -INSERT INTO `sys_role_menu` VALUES (100, 2067); -INSERT INTO `sys_role_menu` VALUES (100, 2068); -INSERT INTO `sys_role_menu` VALUES (100, 2073); -INSERT INTO `sys_role_menu` VALUES (101, 2000); -INSERT INTO `sys_role_menu` VALUES (101, 2043); -INSERT INTO `sys_role_menu` VALUES (101, 2044); -INSERT INTO `sys_role_menu` VALUES (101, 2045); -INSERT INTO `sys_role_menu` VALUES (101, 2046); -INSERT INTO `sys_role_menu` VALUES (101, 2047); -INSERT INTO `sys_role_menu` VALUES (101, 2048); -INSERT INTO `sys_role_menu` VALUES (101, 2049); -INSERT INTO `sys_role_menu` VALUES (101, 2050); -INSERT INTO `sys_role_menu` VALUES (101, 2051); -INSERT INTO `sys_role_menu` VALUES (101, 2052); -INSERT INTO `sys_role_menu` VALUES (101, 2053); -INSERT INTO `sys_role_menu` VALUES (101, 2054); -INSERT INTO `sys_role_menu` VALUES (101, 2055); -INSERT INTO `sys_role_menu` VALUES (101, 2056); -INSERT INTO `sys_role_menu` VALUES (101, 2057); -INSERT INTO `sys_role_menu` VALUES (101, 2058); -INSERT INTO `sys_role_menu` VALUES (101, 2059); -INSERT INTO `sys_role_menu` VALUES (101, 2060); -INSERT INTO `sys_role_menu` VALUES (101, 2061); -INSERT INTO `sys_role_menu` VALUES (101, 2062); -INSERT INTO `sys_role_menu` VALUES (101, 2063); -INSERT INTO `sys_role_menu` VALUES (101, 2064); -INSERT INTO `sys_role_menu` VALUES (101, 2065); -INSERT INTO `sys_role_menu` VALUES (101, 2066); -INSERT INTO `sys_role_menu` VALUES (101, 2067); -INSERT INTO `sys_role_menu` VALUES (101, 2068); -INSERT INTO `sys_role_menu` VALUES (101, 2069); -INSERT INTO `sys_role_menu` VALUES (101, 2070); -INSERT INTO `sys_role_menu` VALUES (101, 2071); -INSERT INTO `sys_role_menu` VALUES (101, 2072); -INSERT INTO `sys_role_menu` VALUES (101, 2073); - --- ---------------------------- --- Table structure for sys_user --- ---------------------------- -DROP TABLE IF EXISTS `sys_user`; -CREATE TABLE `sys_user` ( - `user_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '用户ID', - `dept_id` bigint(0) NULL DEFAULT NULL COMMENT '部门ID', - `open_id` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户OpenId', - `user_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户账号', - `nick_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户昵称', - `user_type` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '00' COMMENT '用户类型(00系统用户)', - `email` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '用户邮箱', - `phonenumber` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '手机号码', - `sex` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '用户性别(0男 1女 2未知)', - `avatar` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '头像地址', - `password` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '密码', - `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '帐号状态(0正常 1停用)', - `del_flag` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '删除标志(0代表存在 2代表删除)', - `login_ip` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '最后登录IP', - `login_date` datetime(0) NULL DEFAULT NULL COMMENT '最后登录时间', - `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`user_id`) USING BTREE, - UNIQUE INDEX `open_id`(`open_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 117 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户信息表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_user --- ---------------------------- -INSERT INTO `sys_user` VALUES (1, 103, NULL, 'admin', '物美智能', '00', '164770707@qq.com', '15888888888', '1', '', '$2a$10$PXtk.97BgFUAK/7lpmxZ4eNPS6zL0VVHR7g.sjrdG5XUiX7pfGaRa', '0', '0', '127.0.0.1', '2021-05-18 02:23:06', 'admin', '2021-05-18 02:23:06', '', NULL, '管理员'); -INSERT INTO `sys_user` VALUES (2, 105, NULL, 'wumei', '物美智能', '00', 'admin@wumei.com', '15666666666', '1', '', '$2a$10$uLlHqgW4b5oAqoS81Rhkk.7Tf6wnGvh9FE9V160Dv2Kn9doOrB4qe', '0', '0', '127.0.0.1', '2021-05-18 02:23:06', 'admin', '2021-05-18 02:23:06', 'admin', '2021-06-19 09:31:14', '测试员'); -INSERT INTO `sys_user` VALUES (100, NULL, NULL, 'public', '访客', '00', '', '', '0', '', '$2a$10$E8d4gZ3.QQzDE7LBfY7XpuuGX.LvWFcA982AAdAzk24u91bQ1nete', '0', '0', '', NULL, 'admin', '2021-05-29 08:37:36', 'admin', '2021-06-19 09:31:20', NULL); -INSERT INTO `sys_user` VALUES (101, NULL, NULL, 'aaa', 'xxx', '00', '', '', '0', '', '$2a$10$f.KtWGpaUsdvl2E427/H4OnPi2dYx8HetxnBs1uasSNwCBBUDSwjO', '0', '0', '', NULL, 'admin', '2021-08-26 17:28:34', '', NULL, NULL); -INSERT INTO `sys_user` VALUES (114, NULL, 'oRHbg4lwGVJYu7GjfVwRv6pYygzQ', 'EB5312FB4A26', '微信注册用户', '00', '', '', '0', '', '$2a$10$iWySi4cYQ.0DFSMFCzofbu1H13Dd03WW7h/0OZPzQcBd.7f1fWjV.', '0', '0', '', NULL, '微信小程序', '2021-08-26 18:06:16', '', NULL, NULL); -INSERT INTO `sys_user` VALUES (115, NULL, 'oRHbg4mTdANmQwDhuQAD8vBbkNG0', 'A1BB9722086A', '微信注册用户', '00', '', '', '0', '', '$2a$10$rAoFt5nuPw/2CXhRsa/uoOjExW0XH3xM009kcWWo12rzFiSgIK.n2', '0', '0', '', NULL, '微信小程序', '2021-08-26 18:41:21', '', NULL, NULL); -INSERT INTO `sys_user` VALUES (116, NULL, 'oRHbg4kHhyFV8DPX-wpGREyjfQsM', '6F1B3F33DD38', '微信注册用户', '00', '', '', '0', '', '$2a$10$SUR7vd7YIiMkFBFSTKba7uTc5FdpAdwyMuzUsUpMjkgTC0NfiRpqK', '0', '0', '', NULL, '微信小程序', '2021-08-31 14:47:58', '', NULL, NULL); - --- ---------------------------- --- Table structure for sys_user_post --- ---------------------------- -DROP TABLE IF EXISTS `sys_user_post`; -CREATE TABLE `sys_user_post` ( - `user_id` bigint(0) NOT NULL COMMENT '用户ID', - `post_id` bigint(0) NOT NULL COMMENT '岗位ID', - PRIMARY KEY (`user_id`, `post_id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户与岗位关联表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_user_post --- ---------------------------- -INSERT INTO `sys_user_post` VALUES (1, 1); -INSERT INTO `sys_user_post` VALUES (2, 2); - --- ---------------------------- --- Table structure for sys_user_role --- ---------------------------- -DROP TABLE IF EXISTS `sys_user_role`; -CREATE TABLE `sys_user_role` ( - `user_id` bigint(0) NOT NULL COMMENT '用户ID', - `role_id` bigint(0) NOT NULL COMMENT '角色ID', - PRIMARY KEY (`user_id`, `role_id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户和角色关联表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_user_role --- ---------------------------- -INSERT INTO `sys_user_role` VALUES (1, 1); -INSERT INTO `sys_user_role` VALUES (2, 100); -INSERT INTO `sys_user_role` VALUES (100, 100); -INSERT INTO `sys_user_role` VALUES (101, 101); - --- ---------------------------- --- Table structure for t_user_account_info --- ---------------------------- -DROP TABLE IF EXISTS `t_user_account_info`; -CREATE TABLE `t_user_account_info` ( - `id` int(0) NOT NULL AUTO_INCREMENT, - `sessionKey` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT 'sessionKey', - `access_token` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT 'accessToken', - `open_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, - `union_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL, - `nick_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '昵称', - `avatar` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '头像', - `phone` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '手机号', - `birthday` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '生日', - `status` int(0) NOT NULL DEFAULT 1 COMMENT '用户状态:0-冻结,1-正常', - `country` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '国家', - `province` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '省份', - `city` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '城市', - `address` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '地址', - `user_type` int(0) NOT NULL DEFAULT 0 COMMENT '用户类型:0-未授权用户,1-消费者,2-商家', - `admin_id` int(0) NULL DEFAULT NULL COMMENT '绑定的管理员编号', - `last_login_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `last_login_ip` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL, - `gmt_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `gmt_update` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0), - PRIMARY KEY (`id`) USING BTREE, - UNIQUE INDEX `open_id`(`open_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 200030 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci COMMENT = '小程序用户表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of t_user_account_info --- ---------------------------- -INSERT INTO `t_user_account_info` VALUES (200029, 'wd4/hPuBQ+ummo/NOv1Rsw==', 'ced50c3733424484becfa6a68e4066fc', 'oRHbg4mTdANmQwDhuQAD8vBbkNG0', NULL, '新注册用户', 'https://c-ssl.duitang.com/uploads/item/201912/27/20191227145714_rtHRc.thumb.1000_0.jpeg', NULL, NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, '2021-08-26 17:02:10', '127.0.0.1', '2021-08-26 16:30:57', '2021-08-26 17:02:08'); - --- ---------------------------- --- Table structure for t_user_login_log --- ---------------------------- -DROP TABLE IF EXISTS `t_user_login_log`; -CREATE TABLE `t_user_login_log` ( - `id` int(0) NOT NULL AUTO_INCREMENT, - `user_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '用户类型', - `user_id` int(0) NOT NULL, - `code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `open_id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, - `ip` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT 'IP地址', - `gmt_time` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0), - `gmt_update` timestamp(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0), - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1725 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of t_user_login_log --- ---------------------------- -INSERT INTO `t_user_login_log` VALUES (1718, '未授权用户', 200029, '023mpv0w3w8VXW22mg2w34Vlyj3mpv01', 'oRHbg4mTdANmQwDhuQAD8vBbkNG0', '127.0.0.1', '2021-08-26 16:30:57', NULL); -INSERT INTO `t_user_login_log` VALUES (1719, '未授权用户', 200029, '083hBWkl269zD74Ioxol2Rqaaq0hBWkA', 'oRHbg4mTdANmQwDhuQAD8vBbkNG0', '127.0.0.1', '2021-08-26 16:56:12', NULL); -INSERT INTO `t_user_login_log` VALUES (1720, '未授权用户', 200029, '073d93000npdjM15qS100TtVyj3d930s', 'oRHbg4mTdANmQwDhuQAD8vBbkNG0', '127.0.0.1', '2021-08-26 16:59:18', NULL); -INSERT INTO `t_user_login_log` VALUES (1721, '未授权用户', 200029, '053NjS000cfoiM1siM300P1HhV1NjS0W', 'oRHbg4mTdANmQwDhuQAD8vBbkNG0', '127.0.0.1', '2021-08-26 16:59:42', NULL); -INSERT INTO `t_user_login_log` VALUES (1722, '未授权用户', 200029, '043nlS000U9niM1a6I0007YZCb3nlS0u', 'oRHbg4mTdANmQwDhuQAD8vBbkNG0', '127.0.0.1', '2021-08-26 17:00:07', NULL); -INSERT INTO `t_user_login_log` VALUES (1723, '未授权用户', 200029, '0039Zull2tOZC74R3Pnl2Hpg8l49Zul1', 'oRHbg4mTdANmQwDhuQAD8vBbkNG0', '127.0.0.1', '2021-08-26 17:00:51', NULL); -INSERT INTO `t_user_login_log` VALUES (1724, '未授权用户', 200029, '013pCmFa1E5TDB0fpIIa138qab2pCmFl', 'oRHbg4mTdANmQwDhuQAD8vBbkNG0', '127.0.0.1', '2021-08-26 17:02:08', NULL); - -SET FOREIGN_KEY_CHECKS = 1; diff --git a/spring-boot/sql/wumei-smart.sql b/spring-boot/sql/wumei-smart.sql deleted file mode 100644 index 50449348..00000000 --- a/spring-boot/sql/wumei-smart.sql +++ /dev/null @@ -1,1575 +0,0 @@ -/* - Navicat Premium Data Transfer - - Source Server : 51xy.xyz8.0 - Source Server Type : MySQL - Source Server Version : 80025 - Source Host : 51xy.xyz:3316 - Source Schema : develop_xiaoyi_wumei - - Target Server Type : MySQL - Target Server Version : 80025 - File Encoding : 65001 - - Date: 02/09/2021 10:03:22 -*/ - -SET NAMES utf8; -SET FOREIGN_KEY_CHECKS = 0; - --- ---------------------------- --- Table structure for gen_table --- ---------------------------- -DROP TABLE IF EXISTS `gen_table`; -CREATE TABLE `gen_table` ( - `table_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '编号', - `table_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '表名称', - `table_comment` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '表描述', - `sub_table_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '关联子表的表名', - `sub_table_fk_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '子表关联的外键名', - `class_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '实体类名称', - `tpl_category` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'crud' COMMENT '使用的模板(crud单表操作 tree树表操作)', - `package_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '生成包路径', - `module_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '生成模块名', - `business_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '生成业务名', - `function_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '生成功能名', - `function_author` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '生成功能作者', - `gen_type` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '生成代码方式(0zip压缩包 1自定义路径)', - `gen_path` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '/' COMMENT '生成路径(不填默认项目路径)', - `options` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '其它生成选项', - `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`table_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 23 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '代码生成业务表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of gen_table --- ---------------------------- -INSERT INTO `gen_table` VALUES (12, 'iot_category', '设备分类', '', '', 'IotCategory', 'crud', 'com.ruoyi.system', 'system', 'category', '设备分类', 'kerwincui', '0', '/', '{\"parentMenuId\":\"2000\"}', 'admin', '2021-05-06 13:31:29', '', '2021-05-07 08:22:58', NULL); -INSERT INTO `gen_table` VALUES (14, 'iot_device_set', '设备配置', NULL, NULL, 'IotDeviceSet', 'crud', 'com.ruoyi.system', 'system', 'set', '设备配置', 'kerwincui', '0', '/', '{\"parentMenuId\":\"2000\"}', 'admin', '2021-05-06 13:31:32', '', '2021-05-06 15:14:45', NULL); -INSERT INTO `gen_table` VALUES (15, 'iot_device_status', '设备状态', NULL, NULL, 'IotDeviceStatus', 'crud', 'com.ruoyi.system', 'system', 'status', '设备状态', 'kerwincui', '0', '/', '{\"parentMenuId\":\"2000\"}', 'admin', '2021-05-06 13:31:35', '', '2021-05-06 15:15:04', NULL); -INSERT INTO `gen_table` VALUES (17, 'iot_group', '设备分组', NULL, NULL, 'IotGroup', 'crud', 'com.ruoyi.system', 'system', 'group', '分组', 'kerwincui', '0', '/', '{\"parentMenuId\":\"2000\"}', 'admin', '2021-05-18 08:04:15', '', '2021-05-18 08:13:40', NULL); -INSERT INTO `gen_table` VALUES (18, 't_user_account_info', '小程序用户表', NULL, NULL, 'TUserAccountInfo', 'crud', 'com.ruoyi.system', 'system', 'info', '小程序用户', 'wxy', '0', '/', NULL, 'admin', '2021-08-26 14:45:28', '', NULL, NULL); -INSERT INTO `gen_table` VALUES (19, 't_user_login_log', '', NULL, NULL, 'TUserLoginLog', 'crud', 'com.ruoyi.system', 'system', 'log', NULL, 'wxy', '0', '/', NULL, 'admin', '2021-08-26 14:45:29', '', NULL, NULL); -INSERT INTO `gen_table` VALUES (20, 'sys_user', '用户信息表', NULL, NULL, 'SysUser', 'crud', 'com.ruoyi.system', 'system', 'user', '用户信息', 'wxy', '0', '/', NULL, 'admin', '2021-08-26 17:07:44', '', NULL, NULL); -INSERT INTO `gen_table` VALUES (21, 'iot_device_user_relation', '', NULL, NULL, 'IotDeviceUserRelation', 'crud', 'com.ruoyi.system', 'system', 'relation', NULL, 'wxy', '0', '/', NULL, 'admin', '2021-08-27 11:55:05', '', NULL, NULL); -INSERT INTO `gen_table` VALUES (22, 'iot_device', '', NULL, NULL, 'IotDevice', 'crud', 'com.ruoyi.system', 'system', 'device', NULL, 'wxy', '0', '/', NULL, 'admin', '2021-08-27 13:45:40', '', NULL, NULL); - --- ---------------------------- --- Table structure for gen_table_column --- ---------------------------- -DROP TABLE IF EXISTS `gen_table_column`; -CREATE TABLE `gen_table_column` ( - `column_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '编号', - `table_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '归属表编号', - `column_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '列名称', - `column_comment` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '列描述', - `column_type` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '列类型', - `java_type` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'JAVA类型', - `java_field` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'JAVA字段名', - `is_pk` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '是否主键(1是)', - `is_increment` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '是否自增(1是)', - `is_required` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '是否必填(1是)', - `is_insert` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '是否为插入字段(1是)', - `is_edit` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '是否编辑字段(1是)', - `is_list` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '是否列表字段(1是)', - `is_query` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '是否查询字段(1是)', - `query_type` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'EQ' COMMENT '查询方式(等于、不等于、大于、小于、范围)', - `html_type` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '显示类型(文本框、文本域、下拉框、复选框、单选框、日期控件)', - `dict_type` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '字典类型', - `sort` int(0) NULL DEFAULT NULL COMMENT '排序', - `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - PRIMARY KEY (`column_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 371 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '代码生成业务表字段' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of gen_table_column --- ---------------------------- -INSERT INTO `gen_table_column` VALUES (217, '12', 'category_id', '序号', 'bigint(20)', 'Long', 'categoryId', '1', '1', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 1, 'admin', '2021-05-06 13:31:29', '', '2021-05-07 08:22:58'); -INSERT INTO `gen_table_column` VALUES (218, '12', 'category_name', '分类名称', 'varchar(100)', 'String', 'categoryName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 2, 'admin', '2021-05-06 13:31:29', '', '2021-05-07 08:22:58'); -INSERT INTO `gen_table_column` VALUES (219, '12', 'del_flag', '删除标志(0代表存在 2代表删除)', 'char(1)', 'String', 'delFlag', '0', '0', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 3, 'admin', '2021-05-06 13:31:29', '', '2021-05-07 08:22:58'); -INSERT INTO `gen_table_column` VALUES (220, '12', 'create_by', '创建者', 'varchar(64)', 'String', 'createBy', '0', '0', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 4, 'admin', '2021-05-06 13:31:29', '', '2021-05-07 08:22:58'); -INSERT INTO `gen_table_column` VALUES (221, '12', 'create_time', '创建时间', 'datetime', 'Date', 'createTime', '0', '0', NULL, '1', NULL, NULL, NULL, 'EQ', 'datetime', '', 5, 'admin', '2021-05-06 13:31:29', '', '2021-05-07 08:22:58'); -INSERT INTO `gen_table_column` VALUES (222, '12', 'update_by', '更新者', 'varchar(64)', 'String', 'updateBy', '0', '0', NULL, '1', '1', NULL, NULL, 'EQ', 'input', '', 6, 'admin', '2021-05-06 13:31:29', '', '2021-05-07 08:22:58'); -INSERT INTO `gen_table_column` VALUES (223, '12', 'update_time', '更新时间', 'datetime', 'Date', 'updateTime', '0', '0', NULL, '1', '1', NULL, NULL, 'EQ', 'datetime', '', 7, 'admin', '2021-05-06 13:31:30', '', '2021-05-07 08:22:59'); -INSERT INTO `gen_table_column` VALUES (224, '12', 'remark', '备注', 'varchar(500)', 'String', 'remark', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'textarea', '', 8, 'admin', '2021-05-06 13:31:30', '', '2021-05-07 08:22:59'); -INSERT INTO `gen_table_column` VALUES (237, '14', 'device_config_id', '序号', 'bigint(20)', 'Long', 'deviceConfigId', '1', '0', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 1, 'admin', '2021-05-06 13:31:32', '', '2021-05-06 15:14:45'); -INSERT INTO `gen_table_column` VALUES (238, '14', 'device_id', '设备', 'bigint(20)', 'Long', 'deviceId', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 2, 'admin', '2021-05-06 13:31:32', '', '2021-05-06 15:14:45'); -INSERT INTO `gen_table_column` VALUES (239, '14', 'device_num', '设备编号', 'varchar(64)', 'String', 'deviceNum', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 3, 'admin', '2021-05-06 13:31:32', '', '2021-05-06 15:14:45'); -INSERT INTO `gen_table_column` VALUES (240, '14', 'is_alarm', '报警', 'tinyint(1)', 'Integer', 'isAlarm', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'radio', 'sys_yes_no', 4, 'admin', '2021-05-06 13:31:32', '', '2021-05-06 15:14:45'); -INSERT INTO `gen_table_column` VALUES (241, '14', 'is_radar', '雷达感应', 'tinyint(1)', 'Integer', 'isRadar', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'radio', 'sys_yes_no', 5, 'admin', '2021-05-06 13:31:32', '', '2021-05-06 15:14:45'); -INSERT INTO `gen_table_column` VALUES (242, '14', 'is_host', '托管', 'tinyint(1)', 'Integer', 'isHost', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'radio', 'sys_yes_no', 6, 'admin', '2021-05-06 13:31:32', '', '2021-05-06 15:14:46'); -INSERT INTO `gen_table_column` VALUES (243, '14', 'is_reset', '重启', 'tinyint(1)', 'Integer', 'isReset', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'radio', 'sys_yes_no', 7, 'admin', '2021-05-06 13:31:33', '', '2021-05-06 15:14:46'); -INSERT INTO `gen_table_column` VALUES (244, '14', 'is_ap', '打开AP', 'tinyint(1)', 'Integer', 'isAp', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'radio', 'sys_yes_no', 8, 'admin', '2021-05-06 13:31:33', '', '2021-05-06 15:14:46'); -INSERT INTO `gen_table_column` VALUES (245, '14', 'is_rf_control', '射频遥控', 'tinyint(1)', 'Integer', 'isRfControl', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'radio', 'sys_yes_no', 9, 'admin', '2021-05-06 13:31:33', '', '2021-05-06 15:14:46'); -INSERT INTO `gen_table_column` VALUES (246, '14', 'is_rf_learn', '遥控配对', 'tinyint(1)', 'Integer', 'isRfLearn', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'radio', 'sys_yes_no', 10, 'admin', '2021-05-06 13:31:33', '', '2021-05-06 15:14:46'); -INSERT INTO `gen_table_column` VALUES (247, '14', 'is_rf_clear', '遥控清码', 'tinyint(1)', 'Integer', 'isRfClear', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'radio', 'sys_yes_no', 11, 'admin', '2021-05-06 13:31:33', '', '2021-05-06 15:14:46'); -INSERT INTO `gen_table_column` VALUES (248, '14', 'rf_one_func', '按键一', 'tinyint(10)', 'Integer', 'rfOneFunc', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'select', 'rf_function', 12, 'admin', '2021-05-06 13:31:33', '', '2021-05-06 15:14:46'); -INSERT INTO `gen_table_column` VALUES (249, '14', 'rf_two_func', '按键二', 'tinyint(10)', 'Integer', 'rfTwoFunc', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'select', 'rf_function', 13, 'admin', '2021-05-06 13:31:33', '', '2021-05-06 15:14:47'); -INSERT INTO `gen_table_column` VALUES (250, '14', 'rf_three_func', '按键三', 'tinyint(10)', 'Integer', 'rfThreeFunc', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'select', 'rf_function', 14, 'admin', '2021-05-06 13:31:34', '', '2021-05-06 15:14:47'); -INSERT INTO `gen_table_column` VALUES (251, '14', 'rf_four_func', '按键四', 'tinyint(10)', 'Integer', 'rfFourFunc', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'select', 'rf_function', 15, 'admin', '2021-05-06 13:31:34', '', '2021-05-06 15:14:47'); -INSERT INTO `gen_table_column` VALUES (252, '14', 'owner_id', '用户', 'varchar(64)', 'String', 'ownerId', '0', '0', NULL, '1', '1', '1', '1', 'LIKE', 'input', '', 16, 'admin', '2021-05-06 13:31:34', '', '2021-05-06 15:14:47'); -INSERT INTO `gen_table_column` VALUES (253, '14', 'network_address', '配网地址', 'varchar(255)', 'String', 'networkAddress', '0', '0', NULL, '1', '1', '1', '1', 'LIKE', 'input', '', 17, 'admin', '2021-05-06 13:31:34', '', '2021-05-06 15:14:47'); -INSERT INTO `gen_table_column` VALUES (254, '14', 'network_ip', '配网IP', 'varchar(32)', 'String', 'networkIp', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'input', '', 18, 'admin', '2021-05-06 13:31:34', '', '2021-05-06 15:14:47'); -INSERT INTO `gen_table_column` VALUES (255, '14', 'del_flag', '删除标志(0代表存在 2代表删除)', 'char(1)', 'String', 'delFlag', '0', '0', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 19, 'admin', '2021-05-06 13:31:34', '', '2021-05-06 15:14:47'); -INSERT INTO `gen_table_column` VALUES (256, '14', 'create_by', '创建者', 'varchar(64)', 'String', 'createBy', '0', '0', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 20, 'admin', '2021-05-06 13:31:34', '', '2021-05-06 15:14:47'); -INSERT INTO `gen_table_column` VALUES (257, '14', 'create_time', '创建时间', 'datetime', 'Date', 'createTime', '0', '0', NULL, '1', NULL, NULL, '1', 'BETWEEN', 'datetime', '', 21, 'admin', '2021-05-06 13:31:34', '', '2021-05-06 15:14:47'); -INSERT INTO `gen_table_column` VALUES (258, '14', 'update_by', '更新者', 'varchar(64)', 'String', 'updateBy', '0', '0', NULL, '1', '1', NULL, NULL, 'EQ', 'input', '', 22, 'admin', '2021-05-06 13:31:35', '', '2021-05-06 15:14:48'); -INSERT INTO `gen_table_column` VALUES (259, '14', 'update_time', '更新时间', 'datetime', 'Date', 'updateTime', '0', '0', '1', '1', '1', NULL, NULL, 'EQ', 'datetime', '', 23, 'admin', '2021-05-06 13:31:35', '', '2021-05-06 15:14:48'); -INSERT INTO `gen_table_column` VALUES (260, '14', 'remark', '备注', 'varchar(500)', 'String', 'remark', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'textarea', '', 24, 'admin', '2021-05-06 13:31:35', '', '2021-05-06 15:14:48'); -INSERT INTO `gen_table_column` VALUES (261, '15', 'device_status_id', '序号', 'bigint(20)', 'Long', 'deviceStatusId', '1', '1', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 1, 'admin', '2021-05-06 13:31:35', '', '2021-05-06 15:15:04'); -INSERT INTO `gen_table_column` VALUES (262, '15', 'device_id', '设备', 'bigint(20)', 'Long', 'deviceId', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 2, 'admin', '2021-05-06 13:31:35', '', '2021-05-06 15:15:04'); -INSERT INTO `gen_table_column` VALUES (263, '15', 'device_num', '设备编号', 'varchar(64)', 'String', 'deviceNum', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 3, 'admin', '2021-05-06 13:31:35', '', '2021-05-06 15:15:04'); -INSERT INTO `gen_table_column` VALUES (264, '15', 'relay_status', '继电器', 'tinyint(1)', 'Integer', 'relayStatus', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'radio', 'sys_yes_no', 4, 'admin', '2021-05-06 13:31:36', '', '2021-05-06 15:15:05'); -INSERT INTO `gen_table_column` VALUES (265, '15', 'light_status', '灯状态', 'tinyint(1)', 'Integer', 'lightStatus', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'radio', 'sys_yes_no', 5, 'admin', '2021-05-06 13:31:36', '', '2021-05-06 15:15:05'); -INSERT INTO `gen_table_column` VALUES (266, '15', 'is_online', '在线', 'tinyint(1)', 'Integer', 'isOnline', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'radio', 'sys_yes_no', 6, 'admin', '2021-05-06 13:31:36', '', '2021-05-06 15:15:05'); -INSERT INTO `gen_table_column` VALUES (267, '15', 'device_temperature', '设备温度', 'float(6,2)', 'BigDecimal', 'deviceTemperature', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'input', '', 7, 'admin', '2021-05-06 13:31:36', '', '2021-05-06 15:15:05'); -INSERT INTO `gen_table_column` VALUES (268, '15', 'device_humidity', '设备湿度', 'float(6,2)', 'BigDecimal', 'deviceHumidity', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'input', '', 8, 'admin', '2021-05-06 13:31:36', '', '2021-05-06 15:15:05'); -INSERT INTO `gen_table_column` VALUES (269, '15', 'air_temperature', '空气温度', 'float(6,2)', 'BigDecimal', 'airTemperature', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'input', '', 9, 'admin', '2021-05-06 13:31:36', '', '2021-05-06 15:15:05'); -INSERT INTO `gen_table_column` VALUES (270, '15', 'air_humidity', '空气湿度', 'float(6,2)', 'BigDecimal', 'airHumidity', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'input', '', 10, 'admin', '2021-05-06 13:31:36', '', '2021-05-06 15:15:05'); -INSERT INTO `gen_table_column` VALUES (271, '15', 'trigger_source', '触发源', 'tinyint(10)', 'Integer', 'triggerSource', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'select', 'iot_trigger_source', 11, 'admin', '2021-05-06 13:31:36', '', '2021-05-06 15:15:05'); -INSERT INTO `gen_table_column` VALUES (272, '15', 'brightness', '彩灯亮度', 'tinyint(10) unsigned', 'Integer', 'brightness', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'input', '', 12, 'admin', '2021-05-06 13:31:37', '', '2021-05-06 15:15:05'); -INSERT INTO `gen_table_column` VALUES (273, '15', 'light_interval', '渐变间隔', 'smallint(10)', 'Integer', 'lightInterval', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'input', '', 13, 'admin', '2021-05-06 13:31:37', '', '2021-05-06 15:15:06'); -INSERT INTO `gen_table_column` VALUES (274, '15', 'light_mode', '彩灯模式', 'tinyint(10)', 'Integer', 'lightMode', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'select', 'light_mode', 14, 'admin', '2021-05-06 13:31:37', '', '2021-05-06 15:15:06'); -INSERT INTO `gen_table_column` VALUES (275, '15', 'red', '红灯', 'tinyint(255) unsigned', 'Long', 'red', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'input', '', 15, 'admin', '2021-05-06 13:31:37', '', '2021-05-06 15:15:06'); -INSERT INTO `gen_table_column` VALUES (276, '15', 'green', '绿灯', 'tinyint(255) unsigned', 'Long', 'green', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'input', '', 16, 'admin', '2021-05-06 13:31:37', '', '2021-05-06 15:15:06'); -INSERT INTO `gen_table_column` VALUES (277, '15', 'blue', '蓝灯', 'tinyint(255) unsigned', 'Long', 'blue', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'input', '', 17, 'admin', '2021-05-06 13:31:37', '', '2021-05-06 15:15:06'); -INSERT INTO `gen_table_column` VALUES (278, '15', 'del_flag', '删除标志(0代表存在 2代表删除)', 'char(1)', 'String', 'delFlag', '0', '0', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 18, 'admin', '2021-05-06 13:31:37', '', '2021-05-06 15:15:06'); -INSERT INTO `gen_table_column` VALUES (279, '15', 'create_by', '创建者', 'varchar(64)', 'String', 'createBy', '0', '0', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 19, 'admin', '2021-05-06 13:31:38', '', '2021-05-06 15:15:06'); -INSERT INTO `gen_table_column` VALUES (280, '15', 'create_time', '创建时间', 'datetime', 'Date', 'createTime', '0', '0', NULL, '1', NULL, NULL, '1', 'BETWEEN', 'datetime', '', 20, 'admin', '2021-05-06 13:31:38', '', '2021-05-06 15:15:06'); -INSERT INTO `gen_table_column` VALUES (281, '15', 'update_by', '更新者', 'varchar(64)', 'String', 'updateBy', '0', '0', NULL, '1', '1', NULL, NULL, 'EQ', 'input', '', 21, 'admin', '2021-05-06 13:31:38', '', '2021-05-06 15:15:07'); -INSERT INTO `gen_table_column` VALUES (282, '15', 'update_time', '更新时间', 'datetime', 'Date', 'updateTime', '0', '0', '1', '1', '1', NULL, NULL, 'EQ', 'datetime', '', 22, 'admin', '2021-05-06 13:31:38', '', '2021-05-06 15:15:07'); -INSERT INTO `gen_table_column` VALUES (283, '15', 'remark', '备注', 'varchar(500)', 'String', 'remark', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'textarea', '', 23, 'admin', '2021-05-06 13:31:38', '', '2021-05-06 15:15:07'); -INSERT INTO `gen_table_column` VALUES (294, '17', 'group_id', '设备分组', 'bigint(20)', 'Long', 'groupId', '1', '1', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 1, 'admin', '2021-05-18 08:04:15', '', '2021-05-18 08:13:40'); -INSERT INTO `gen_table_column` VALUES (295, '17', 'user_id', '用户', 'bigint(20)', 'Long', 'userId', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 2, 'admin', '2021-05-18 08:04:16', '', '2021-05-18 08:13:40'); -INSERT INTO `gen_table_column` VALUES (296, '17', 'group_name', '分组名称', 'varchar(100)', 'String', 'groupName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 3, 'admin', '2021-05-18 08:04:16', '', '2021-05-18 08:13:40'); -INSERT INTO `gen_table_column` VALUES (297, '17', 'group_order', '排序', 'smallint(5) unsigned zerofill', 'Integer', 'groupOrder', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'input', '', 4, 'admin', '2021-05-18 08:04:16', '', '2021-05-18 08:13:41'); -INSERT INTO `gen_table_column` VALUES (298, '17', 'del_flag', '删除标志(0代表存在 2代表删除)', 'char(1)', 'String', 'delFlag', '0', '0', NULL, NULL, NULL, NULL, NULL, 'EQ', 'input', '', 5, 'admin', '2021-05-18 08:04:16', '', '2021-05-18 08:13:41'); -INSERT INTO `gen_table_column` VALUES (299, '17', 'create_by', '创建者', 'varchar(64)', 'String', 'createBy', '0', '0', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 6, 'admin', '2021-05-18 08:04:16', '', '2021-05-18 08:13:41'); -INSERT INTO `gen_table_column` VALUES (300, '17', 'create_time', '创建时间', 'datetime', 'Date', 'createTime', '0', '0', NULL, '1', NULL, '1', '1', 'BETWEEN', 'datetime', '', 7, 'admin', '2021-05-18 08:04:17', '', '2021-05-18 08:13:41'); -INSERT INTO `gen_table_column` VALUES (301, '17', 'update_by', '更新者', 'varchar(64)', 'String', 'updateBy', '0', '0', NULL, '1', '1', NULL, NULL, 'EQ', 'input', '', 8, 'admin', '2021-05-18 08:04:17', '', '2021-05-18 08:13:41'); -INSERT INTO `gen_table_column` VALUES (302, '17', 'update_time', '更新时间', 'datetime', 'Date', 'updateTime', '0', '0', NULL, '1', '1', NULL, NULL, 'EQ', 'datetime', '', 9, 'admin', '2021-05-18 08:04:17', '', '2021-05-18 08:13:41'); -INSERT INTO `gen_table_column` VALUES (303, '17', 'remark', '备注', 'varchar(500)', 'String', 'remark', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'textarea', '', 10, 'admin', '2021-05-18 08:04:17', '', '2021-05-18 08:13:42'); -INSERT INTO `gen_table_column` VALUES (304, '18', 'id', NULL, 'int', 'Long', 'id', '1', '1', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 1, 'admin', '2021-08-26 14:45:28', '', NULL); -INSERT INTO `gen_table_column` VALUES (305, '18', 'sessionKey', 'sessionKey', 'varchar(255)', 'String', 'sessionkey', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 2, 'admin', '2021-08-26 14:45:28', '', NULL); -INSERT INTO `gen_table_column` VALUES (306, '18', 'access_token', 'accessToken', 'varchar(255)', 'String', 'accessToken', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 3, 'admin', '2021-08-26 14:45:28', '', NULL); -INSERT INTO `gen_table_column` VALUES (307, '18', 'open_id', NULL, 'varchar(50)', 'String', 'openId', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 4, 'admin', '2021-08-26 14:45:28', '', NULL); -INSERT INTO `gen_table_column` VALUES (308, '18', 'union_id', NULL, 'varchar(50)', 'String', 'unionId', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 5, 'admin', '2021-08-26 14:45:28', '', NULL); -INSERT INTO `gen_table_column` VALUES (309, '18', 'nick_name', '昵称', 'varchar(255)', 'String', 'nickName', '0', '0', NULL, '1', '1', '1', '1', 'LIKE', 'input', '', 6, 'admin', '2021-08-26 14:45:28', '', NULL); -INSERT INTO `gen_table_column` VALUES (310, '18', 'avatar', '头像', 'varchar(255)', 'String', 'avatar', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 7, 'admin', '2021-08-26 14:45:28', '', NULL); -INSERT INTO `gen_table_column` VALUES (311, '18', 'phone', '手机号', 'varchar(255)', 'String', 'phone', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 8, 'admin', '2021-08-26 14:45:28', '', NULL); -INSERT INTO `gen_table_column` VALUES (312, '18', 'birthday', '生日', 'varchar(255)', 'String', 'birthday', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 9, 'admin', '2021-08-26 14:45:28', '', NULL); -INSERT INTO `gen_table_column` VALUES (313, '18', 'status', '用户状态:0-冻结,1-正常', 'int', 'Long', 'status', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'radio', '', 10, 'admin', '2021-08-26 14:45:28', '', NULL); -INSERT INTO `gen_table_column` VALUES (314, '18', 'country', '国家', 'varchar(255)', 'String', 'country', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 11, 'admin', '2021-08-26 14:45:29', '', NULL); -INSERT INTO `gen_table_column` VALUES (315, '18', 'province', '省份', 'varchar(255)', 'String', 'province', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 12, 'admin', '2021-08-26 14:45:29', '', NULL); -INSERT INTO `gen_table_column` VALUES (316, '18', 'city', '城市', 'varchar(255)', 'String', 'city', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 13, 'admin', '2021-08-26 14:45:29', '', NULL); -INSERT INTO `gen_table_column` VALUES (317, '18', 'address', '地址', 'varchar(255)', 'String', 'address', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 14, 'admin', '2021-08-26 14:45:29', '', NULL); -INSERT INTO `gen_table_column` VALUES (318, '18', 'user_type', '用户类型:0-未授权用户,1-消费者,2-商家', 'int', 'Long', 'userType', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'select', '', 15, 'admin', '2021-08-26 14:45:29', '', NULL); -INSERT INTO `gen_table_column` VALUES (319, '18', 'admin_id', '绑定的管理员编号', 'int', 'Long', 'adminId', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 16, 'admin', '2021-08-26 14:45:29', '', NULL); -INSERT INTO `gen_table_column` VALUES (320, '18', 'last_login_time', NULL, 'timestamp', 'Date', 'lastLoginTime', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'datetime', '', 17, 'admin', '2021-08-26 14:45:29', '', NULL); -INSERT INTO `gen_table_column` VALUES (321, '18', 'last_login_ip', NULL, 'varchar(255)', 'String', 'lastLoginIp', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 18, 'admin', '2021-08-26 14:45:29', '', NULL); -INSERT INTO `gen_table_column` VALUES (322, '18', 'gmt_time', NULL, 'timestamp', 'Date', 'gmtTime', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'datetime', '', 19, 'admin', '2021-08-26 14:45:29', '', NULL); -INSERT INTO `gen_table_column` VALUES (323, '18', 'gmt_update', NULL, 'timestamp', 'Date', 'gmtUpdate', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'datetime', '', 20, 'admin', '2021-08-26 14:45:29', '', NULL); -INSERT INTO `gen_table_column` VALUES (324, '19', 'id', NULL, 'int', 'Long', 'id', '1', '1', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 1, 'admin', '2021-08-26 14:45:29', '', NULL); -INSERT INTO `gen_table_column` VALUES (325, '19', 'user_type', '用户类型', 'varchar(255)', 'String', 'userType', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'select', '', 2, 'admin', '2021-08-26 14:45:29', '', NULL); -INSERT INTO `gen_table_column` VALUES (326, '19', 'user_id', NULL, 'int', 'Long', 'userId', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 3, 'admin', '2021-08-26 14:45:29', '', NULL); -INSERT INTO `gen_table_column` VALUES (327, '19', 'code', NULL, 'varchar(50)', 'String', 'code', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 4, 'admin', '2021-08-26 14:45:29', '', NULL); -INSERT INTO `gen_table_column` VALUES (328, '19', 'open_id', NULL, 'varchar(50)', 'String', 'openId', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 5, 'admin', '2021-08-26 14:45:29', '', NULL); -INSERT INTO `gen_table_column` VALUES (329, '19', 'ip', 'IP地址', 'varchar(30)', 'String', 'ip', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 6, 'admin', '2021-08-26 14:45:29', '', NULL); -INSERT INTO `gen_table_column` VALUES (330, '19', 'gmt_time', NULL, 'timestamp', 'Date', 'gmtTime', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'datetime', '', 7, 'admin', '2021-08-26 14:45:29', '', NULL); -INSERT INTO `gen_table_column` VALUES (331, '19', 'gmt_update', NULL, 'timestamp', 'Date', 'gmtUpdate', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'datetime', '', 8, 'admin', '2021-08-26 14:45:29', '', NULL); -INSERT INTO `gen_table_column` VALUES (332, '20', 'user_id', '用户ID', 'bigint', 'Long', 'userId', '1', '1', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 1, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (333, '20', 'dept_id', '部门ID', 'bigint', 'Long', 'deptId', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 2, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (334, '20', 'open_id', '用户OpenId', 'varchar(40)', 'String', 'openId', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 3, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (335, '20', 'user_name', '用户账号', 'varchar(30)', 'String', 'userName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 4, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (336, '20', 'nick_name', '用户昵称', 'varchar(30)', 'String', 'nickName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 5, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (337, '20', 'user_type', '用户类型(00系统用户)', 'varchar(2)', 'String', 'userType', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'select', '', 6, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (338, '20', 'email', '用户邮箱', 'varchar(50)', 'String', 'email', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 7, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (339, '20', 'phonenumber', '手机号码', 'varchar(11)', 'String', 'phonenumber', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 8, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (340, '20', 'sex', '用户性别(0男 1女 2未知)', 'char(1)', 'String', 'sex', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'select', '', 9, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (341, '20', 'avatar', '头像地址', 'varchar(100)', 'String', 'avatar', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 10, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (342, '20', 'password', '密码', 'varchar(100)', 'String', 'password', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 11, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (343, '20', 'status', '帐号状态(0正常 1停用)', 'char(1)', 'String', 'status', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'radio', '', 12, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (344, '20', 'del_flag', '删除标志(0代表存在 2代表删除)', 'char(1)', 'String', 'delFlag', '0', '0', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 13, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (345, '20', 'login_ip', '最后登录IP', 'varchar(128)', 'String', 'loginIp', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 14, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (346, '20', 'login_date', '最后登录时间', 'datetime', 'Date', 'loginDate', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'datetime', '', 15, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (347, '20', 'create_by', '创建者', 'varchar(64)', 'String', 'createBy', '0', '0', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 16, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (348, '20', 'create_time', '创建时间', 'datetime', 'Date', 'createTime', '0', '0', NULL, '1', NULL, NULL, NULL, 'EQ', 'datetime', '', 17, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (349, '20', 'update_by', '更新者', 'varchar(64)', 'String', 'updateBy', '0', '0', NULL, '1', '1', NULL, NULL, 'EQ', 'input', '', 18, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (350, '20', 'update_time', '更新时间', 'datetime', 'Date', 'updateTime', '0', '0', NULL, '1', '1', NULL, NULL, 'EQ', 'datetime', '', 19, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (351, '20', 'remark', '备注', 'varchar(500)', 'String', 'remark', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'textarea', '', 20, 'admin', '2021-08-26 17:07:45', '', NULL); -INSERT INTO `gen_table_column` VALUES (352, '21', 'id', NULL, 'int', 'Long', 'id', '1', '1', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 1, 'admin', '2021-08-27 11:55:05', '', NULL); -INSERT INTO `gen_table_column` VALUES (353, '21', 'user_id', NULL, 'int', 'Long', 'userId', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 2, 'admin', '2021-08-27 11:55:05', '', NULL); -INSERT INTO `gen_table_column` VALUES (354, '21', 'device_id', NULL, 'int', 'Long', 'deviceId', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 3, 'admin', '2021-08-27 11:55:06', '', NULL); -INSERT INTO `gen_table_column` VALUES (355, '21', 'device_num', NULL, 'varchar(60)', 'String', 'deviceNum', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 4, 'admin', '2021-08-27 11:55:06', '', NULL); -INSERT INTO `gen_table_column` VALUES (356, '21', 'gmt_time', NULL, 'timestamp', 'Date', 'gmtTime', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'datetime', '', 5, 'admin', '2021-08-27 11:55:06', '', NULL); -INSERT INTO `gen_table_column` VALUES (357, '21', 'gmt_update', NULL, 'timestamp', 'Date', 'gmtUpdate', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'datetime', '', 6, 'admin', '2021-08-27 11:55:06', '', NULL); -INSERT INTO `gen_table_column` VALUES (358, '22', 'device_id', '设备ID', 'bigint', 'Long', 'deviceId', '1', '1', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 1, 'admin', '2021-08-27 13:45:40', '', NULL); -INSERT INTO `gen_table_column` VALUES (359, '22', 'device_num', '设备编号', 'varchar(64)', 'String', 'deviceNum', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'input', '', 2, 'admin', '2021-08-27 13:45:40', '', NULL); -INSERT INTO `gen_table_column` VALUES (360, '22', 'category_id', '设备分类', 'bigint', 'Long', 'categoryId', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 3, 'admin', '2021-08-27 13:45:40', '', NULL); -INSERT INTO `gen_table_column` VALUES (361, '22', 'device_name', '设备名称', 'varchar(64)', 'String', 'deviceName', '0', '0', '1', '1', '1', '1', '1', 'LIKE', 'input', '', 4, 'admin', '2021-08-27 13:45:40', '', NULL); -INSERT INTO `gen_table_column` VALUES (362, '22', 'firmware_version', '固件版本', 'varchar(32)', 'String', 'firmwareVersion', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 5, 'admin', '2021-08-27 13:45:40', '', NULL); -INSERT INTO `gen_table_column` VALUES (363, '22', 'owner_id', '设备用户ID', 'varchar(64)', 'String', 'ownerId', '0', '0', NULL, '1', '1', '1', '1', 'EQ', 'input', '', 6, 'admin', '2021-08-27 13:45:40', '', NULL); -INSERT INTO `gen_table_column` VALUES (364, '22', 'del_flag', '删除标志(0代表存在 2代表删除)', 'char(1)', 'String', 'delFlag', '0', '0', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 7, 'admin', '2021-08-27 13:45:40', '', NULL); -INSERT INTO `gen_table_column` VALUES (365, '22', 'status', '设备状态:未激活,未绑定,已绑定', 'varchar(255)', 'String', 'status', '0', '0', '1', '1', '1', '1', '1', 'EQ', 'radio', '', 8, 'admin', '2021-08-27 13:45:40', '', NULL); -INSERT INTO `gen_table_column` VALUES (366, '22', 'create_by', '创建者', 'varchar(64)', 'String', 'createBy', '0', '0', NULL, '1', NULL, NULL, NULL, 'EQ', 'input', '', 9, 'admin', '2021-08-27 13:45:40', '', NULL); -INSERT INTO `gen_table_column` VALUES (367, '22', 'create_time', '创建时间', 'datetime', 'Date', 'createTime', '0', '0', NULL, '1', NULL, NULL, NULL, 'EQ', 'datetime', '', 10, 'admin', '2021-08-27 13:45:40', '', NULL); -INSERT INTO `gen_table_column` VALUES (368, '22', 'update_by', '更新者', 'varchar(64)', 'String', 'updateBy', '0', '0', NULL, '1', '1', NULL, NULL, 'EQ', 'input', '', 11, 'admin', '2021-08-27 13:45:40', '', NULL); -INSERT INTO `gen_table_column` VALUES (369, '22', 'update_time', '更新时间', 'datetime', 'Date', 'updateTime', '0', '0', NULL, '1', '1', NULL, NULL, 'EQ', 'datetime', '', 12, 'admin', '2021-08-27 13:45:40', '', NULL); -INSERT INTO `gen_table_column` VALUES (370, '22', 'remark', '备注', 'varchar(500)', 'String', 'remark', '0', '0', NULL, '1', '1', '1', NULL, 'EQ', 'textarea', '', 13, 'admin', '2021-08-27 13:45:40', '', NULL); - --- ---------------------------- --- Table structure for iot_category --- ---------------------------- -DROP TABLE IF EXISTS `iot_category`; -CREATE TABLE `iot_category` ( - `category_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '设备分类ID', - `category_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '设备分类名称', - `del_flag` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '删除标志(0代表存在 2代表删除)', - `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`category_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of iot_category --- ---------------------------- -INSERT INTO `iot_category` VALUES (1, 'wifi通断器', '0', '', '2021-05-06 01:00:04', '', '2021-05-06 01:05:08', '智能开关,带温湿度传感器,支持手机和射频遥控控制。应用于传统家电设备的控制等。'); -INSERT INTO `iot_category` VALUES (2, '智能灯', '0', '', '2021-05-06 01:01:39', '', '2021-05-06 01:05:32', '智能七彩灯,支持雷达感应、报警,手机和射频遥控控制。应用于环境灯、感应灯和传统灯的控制等。'); -INSERT INTO `iot_category` VALUES (3, '智能门锁', '0', '', '2021-05-06 01:02:34', '', '2021-05-06 01:04:22', '支持手机和射频遥控控制。'); -INSERT INTO `iot_category` VALUES (4, '智能水阀', '0', '', '2021-05-06 01:03:57', '', NULL, '手机和射频遥控控制,应用于浇灌系统。'); -INSERT INTO `iot_category` VALUES (5, '其他', '0', '', '2021-05-28 19:31:05', '', NULL, '其他硬件设备的接入'); - --- ---------------------------- --- Table structure for iot_device --- ---------------------------- -DROP TABLE IF EXISTS `iot_device`; -CREATE TABLE `iot_device` ( - `device_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '设备ID', - `device_num` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '设备编号', - `category_id` bigint(0) NULL DEFAULT NULL COMMENT '设备分类', - `device_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '设备名称', - `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注', - `firmware_version` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '固件版本', - `owner_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备用户ID', - `del_flag` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '删除标志(0代表存在 2代表删除)', - `status` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '未激活' COMMENT '设备状态:未激活,未绑定,已绑定', - `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - PRIMARY KEY (`device_id`) USING BTREE, - INDEX `iot_device_category`(`category_id`) USING BTREE, - CONSTRAINT `iot_device_category` FOREIGN KEY (`category_id`) REFERENCES `iot_category` (`category_id`) ON DELETE SET NULL ON UPDATE RESTRICT -) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of iot_device --- ---------------------------- - -INSERT INTO `iot_device` VALUES (1, '7CDFA1049ADA', 1, '智能开关-测试', '暂无', '1.0', NULL, '0', '未绑定', '', '2021-05-23 14:26:38', '', '2021-06-15 02:47:52'); -INSERT INTO `iot_device` VALUES (2, '7CDFA1049ADB', 1, '设备名称', 'remark', '1.0', NULL, '0', '未绑定', '', '2021-05-23 14:26:38', '', '2021-06-15 02:47:52'); -INSERT INTO `iot_device` VALUES (3, '7CDFA1049ADC', 2, '4G开关', '灯等等灯', '1.0', '1', '0', '未绑定', '', '2021-05-23 14:26:38', '', '2021-08-31 20:11:17'); -INSERT INTO `iot_device` VALUES (4, '7CDFA1049ADD', 2, '阿拉丁神灯', '阿拉丁灯', '1.0', '1', '0', '未绑定', '', '2021-05-23 14:26:38', '', '2021-06-26 20:25:09'); - --- ---------------------------- --- Table structure for iot_device_group --- ---------------------------- -DROP TABLE IF EXISTS `iot_device_group`; -CREATE TABLE `iot_device_group` ( - `device_group_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '设备分组ID', - `group_id` bigint(0) NOT NULL COMMENT '分组ID', - `device_id` bigint(0) NOT NULL COMMENT '设备ID', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - PRIMARY KEY (`device_group_id`) USING BTREE, - INDEX `iot_device_group_group_id`(`group_id`) USING BTREE, - INDEX `iot_device_group_device_id`(`device_id`) USING BTREE, - CONSTRAINT `iot_device_group_device_id` FOREIGN KEY (`device_id`) REFERENCES `iot_device` (`device_id`) ON DELETE RESTRICT ON UPDATE RESTRICT, - CONSTRAINT `iot_device_group_group_id` FOREIGN KEY (`group_id`) REFERENCES `iot_group` (`group_id`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of iot_device_group --- ---------------------------- -INSERT INTO `iot_device_group` VALUES (1, 1, 1, '2021-06-11 23:25:49'); -INSERT INTO `iot_device_group` VALUES (2, 2, 1, '2021-06-11 23:25:49'); -INSERT INTO `iot_device_group` VALUES (6, 1, 2, '2021-06-11 23:25:49'); -INSERT INTO `iot_device_group` VALUES (7, 2, 2, '2021-06-11 23:25:49'); - --- ---------------------------- --- Table structure for iot_device_set --- ---------------------------- -DROP TABLE IF EXISTS `iot_device_set`; -CREATE TABLE `iot_device_set` ( - `device_set_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '配置id', - `device_id` bigint(0) NULL DEFAULT NULL COMMENT '设备ID', - `device_num` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '设备编号', - `is_alarm` tinyint(1) NULL DEFAULT NULL COMMENT '是否启用报警', - `is_radar` tinyint(1) NULL DEFAULT NULL COMMENT '是否启用雷达感应', - `is_host` tinyint(1) NULL DEFAULT NULL COMMENT '是否托管', - `is_reset` tinyint(1) NULL DEFAULT NULL COMMENT '是否重启', - `is_ap` tinyint(1) NULL DEFAULT NULL COMMENT '是否打开AP', - `is_smart_config` tinyint(1) NULL DEFAULT NULL COMMENT '是否智能配网', - `is_wifi_offline` tinyint(1) NULL DEFAULT NULL COMMENT '是否离线模式', - `is_open_certifi` tinyint(1) NULL DEFAULT NULL COMMENT '是否使用证书', - `is_rf_control` tinyint(1) NULL DEFAULT NULL COMMENT '是否启用射频遥控', - `is_rf_learn` tinyint(1) NULL DEFAULT NULL COMMENT '是否遥控配对', - `is_rf_clear` tinyint(1) NULL DEFAULT NULL COMMENT '是否遥控清码', - `rf_one_func` tinyint(0) NULL DEFAULT NULL COMMENT 'RF遥控第一个按键功能', - `rf_two_func` tinyint(0) NULL DEFAULT NULL COMMENT 'RF遥控第二个按键功能', - `rf_three_func` tinyint(0) NULL DEFAULT NULL COMMENT 'RF遥控第三个按键功能', - `rf_four_func` tinyint(0) NULL DEFAULT NULL COMMENT 'RF遥控第四个按键功能', - `owner_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备用户ID,用于记录配网后用户的变更', - `network_address` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '配网地址', - `network_ip` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '配网IP', - `radar_interval` smallint(0) NULL DEFAULT NULL COMMENT '雷达感应间隔,单位秒', - `del_flag` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '删除标志(0代表存在 2代表删除)', - `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`device_set_id`) USING BTREE, - INDEX `iot_device_config`(`device_id`) USING BTREE, - CONSTRAINT `iot_device_config` FOREIGN KEY (`device_id`) REFERENCES `iot_device` (`device_id`) ON DELETE SET NULL ON UPDATE RESTRICT -) ENGINE = InnoDB AUTO_INCREMENT = 300 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of iot_device_set --- ---------------------------- -INSERT INTO `iot_device_set` VALUES (1, 1, '7CDFA1049ADA', 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 2, 3, 4, '1', '内网', '127.0.0.1', 5, '0', '', '2021-06-26 20:25:10', '', NULL, NULL); -INSERT INTO `iot_device_set` VALUES (2, 2, '7CDFA1049ADB', 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 2, 3, 4, '1', '内网', '127.0.0.1', 5, '0', '', '2021-06-01 00:12:26', '', '2021-06-23 20:59:33', NULL); -INSERT INTO `iot_device_set` VALUES (3, 4, '863488052352472', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', NULL, '', NULL, NULL); - --- ---------------------------- --- Table structure for iot_device_status --- ---------------------------- -DROP TABLE IF EXISTS `iot_device_status`; -CREATE TABLE `iot_device_status` ( - `device_status_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '设备状态ID', - `device_id` bigint(0) NULL DEFAULT NULL COMMENT '设备ID', - `device_num` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '设备编号', - `relay_status` tinyint(1) NULL DEFAULT NULL COMMENT '继电器状态:0-关,1-开', - `light_status` tinyint(1) NULL DEFAULT NULL COMMENT '灯状态:0-关,1-开', - `is_online` tinyint(1) NULL DEFAULT NULL COMMENT '设备是否在线', - `rssi` tinyint(0) NULL DEFAULT NULL COMMENT 'wifi信号强度', - `device_temperature` float(6, 2) NULL DEFAULT NULL COMMENT '设备温度', - `air_temperature` float(6, 2) NULL DEFAULT NULL COMMENT '空气温度', - `air_humidity` float(6, 2) NULL DEFAULT NULL COMMENT '空气湿度', - `trigger_source` tinyint(0) NULL DEFAULT NULL COMMENT '触发源:0-无、1-按键、2.手机、3-浏览器、4-射频遥控、5-雷达、6-报警、7-定时', - `brightness` tinyint(0) UNSIGNED NULL DEFAULT NULL COMMENT '灯的亮度:0-100', - `light_interval` int(0) NULL DEFAULT NULL COMMENT '渐变、动感模式闪烁间隔,单位秒', - `light_mode` tinyint(0) NULL DEFAULT NULL COMMENT '灯模式:1-、2-、3-、4-、5-、6-', - `fade_time` int(0) NULL DEFAULT NULL COMMENT '灯渐变时间', - `red` tinyint(0) UNSIGNED NULL DEFAULT NULL COMMENT '红灯值:0-255', - `green` tinyint(0) UNSIGNED NULL DEFAULT NULL COMMENT '绿灯值:0-255', - `blue` tinyint(0) UNSIGNED NULL DEFAULT NULL COMMENT '蓝灯值:0-255', - `del_flag` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '删除标志(0代表存在 2代表删除)', - `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`device_status_id`) USING BTREE, - INDEX `iot_device_status`(`device_id`) USING BTREE, - CONSTRAINT `iot_device_status` FOREIGN KEY (`device_id`) REFERENCES `iot_device` (`device_id`) ON DELETE SET NULL ON UPDATE RESTRICT -) ENGINE = InnoDB AUTO_INCREMENT = 2879 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of iot_device_status --- ---------------------------- -INSERT INTO `iot_device_status` VALUES (1, 1, '7CDFA1049ADA', 1, 1, 1, -80, 36.52, 0.00, 0.00, 0, 100, 432, 0, 259, 255, 254, 241, '0', '', '2021-06-26 20:27:17', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2, 2, '7CDFA1049ADB', 0, 1, 0, -46, 23.78, 0.00, 0.00, 0, 100, 100, 0, 100, 255, 255, 255, '0', '', '2021-06-01 00:13:38', '', '2021-06-23 21:00:37', NULL); -INSERT INTO `iot_device_status` VALUES (2846, 1, '7CDFA1049ADA', 1, 0, 1, -80, 36.52, 0.00, 0.00, 0, 100, 432, 0, 259, 255, 254, 241, '0', '', '2021-08-26 18:38:11', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2847, 1, '7CDFA1049ADA', 1, 1, 1, -80, 36.52, 0.00, 0.00, 0, 100, 432, 0, 259, 255, 254, 241, '0', '', '2021-08-26 18:38:12', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2848, 1, '7CDFA1049ADA', 1, 0, 1, -80, 36.52, 0.00, 0.00, 0, 100, 432, 0, 259, 255, 254, 241, '0', '', '2021-08-26 18:38:13', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2849, 1, '7CDFA1049ADA', 1, 1, 1, -80, 36.52, 0.00, 0.00, 0, 100, 432, 0, 259, 255, 254, 241, '0', '', '2021-08-26 18:38:17', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2850, 4, '863488052352472', 1, 1, 1, -80, 36.52, 0.00, 0.00, 0, 100, 432, 0, 259, 255, 254, 241, '0', '', '2021-08-26 18:38:17', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2851, 4, '863488052352472', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:11:20', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2852, 4, '863488052352472', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:11:22', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2853, 4, '863488052352472', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:11:23', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2854, 4, '863488052352472', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:14:13', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2855, 4, '863488052352472', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:14:13', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2856, 4, '863488052352472', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:19:29', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2857, 4, '863488052352472', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:19:31', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2858, 4, '863488052352472', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:20:02', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2859, 4, '863488052352472', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:20:03', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2860, 4, '863488052352472', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:23:34', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2861, 4, '863488052352472', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:23:40', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2862, 4, '863488052352472', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:24:37', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2863, 4, '863488052352472', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:24:39', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2864, 4, '863488052352472', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:24:41', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2865, 4, '863488052352472', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:24:43', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2866, 4, '863488052352472', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:24:47', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2867, 4, '863488052352472', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:24:50', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2868, 4, '863488052352472', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:24:51', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2869, 4, '863488052352472', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:25:08', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2870, 4, '863488052352472', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:25:10', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2871, 4, '863488052352472', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:25:10', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2872, 4, '863488052352472', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:25:11', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2873, 4, '863488052352472', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:25:12', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2874, 4, '863488052352472', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:25:13', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2875, 4, '863488052352472', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:25:14', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2876, 4, '863488052352472', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:25:14', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2877, 4, '863488052352472', 1, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:25:15', '', NULL, NULL); -INSERT INTO `iot_device_status` VALUES (2878, 4, '863488052352472', 0, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '0', '', '2021-08-31 20:25:15', '', NULL, NULL); - --- ---------------------------- --- Table structure for iot_device_user_relation --- ---------------------------- -DROP TABLE IF EXISTS `iot_device_user_relation`; -CREATE TABLE `iot_device_user_relation` ( - `id` int(0) NOT NULL AUTO_INCREMENT, - `user_id` int(0) NOT NULL, - `device_id` int(0) NOT NULL, - `device_num` varchar(60) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, - `device_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '设备名称', - `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '设备备注', - `gmt_time` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0), - `gmt_update` timestamp(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0), - PRIMARY KEY (`id`) USING BTREE, - INDEX `user_id`(`user_id`, `device_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 14 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci COMMENT = '用户-设备关联表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of iot_device_user_relation --- ---------------------------- -INSERT INTO `iot_device_user_relation` VALUES (8, 115, 4, '863488052352472', 'wxy测试开关', NULL, '2021-08-28 13:35:23', NULL); -INSERT INTO `iot_device_user_relation` VALUES (10, 114, 4, '863488052352472', '阿拉丁神灯', '灯等等灯', '2021-08-30 10:57:14', '2021-08-30 15:28:25'); -INSERT INTO `iot_device_user_relation` VALUES (13, 116, 4, '863488052352472', '阿拉丁神灯', NULL, '2021-08-31 20:24:31', NULL); - --- ---------------------------- --- Table structure for iot_group --- ---------------------------- -DROP TABLE IF EXISTS `iot_group`; -CREATE TABLE `iot_group` ( - `group_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '设备分组ID', - `user_id` bigint(0) NOT NULL COMMENT '用户ID', - `group_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '设备分组名称', - `group_order` smallint(5) UNSIGNED ZEROFILL NULL DEFAULT 00000 COMMENT '分组的排序', - `del_flag` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '删除标志(0代表存在 2代表删除)', - `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`group_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of iot_group --- ---------------------------- -INSERT INTO `iot_group` VALUES (1, 114, '一楼', 00001, '0', '', '2021-05-18 16:35:03', '', '2021-05-18 16:35:32', '智能灯'); -INSERT INTO `iot_group` VALUES (2, 114, '二楼', 00002, '0', '', '2021-05-18 16:35:03', '', '2021-05-18 16:35:32', '智能灯'); -INSERT INTO `iot_group` VALUES (3, 114, '三楼', 00003, '0', '', '2021-05-18 16:35:03', '', '2021-05-18 16:35:32', '智能灯'); -INSERT INTO `iot_group` VALUES (4, 114, '四楼', 00004, '0', '', '2021-05-18 16:35:03', '', '2021-05-18 16:35:32', '智能灯'); -INSERT INTO `iot_group` VALUES (5, 114, '五楼', 00005, '0', '', '2021-05-18 16:35:03', '', '2021-05-18 16:35:32', '智能灯'); - --- ---------------------------- --- Table structure for qrtz_blob_triggers --- ---------------------------- -DROP TABLE IF EXISTS `qrtz_blob_triggers`; -CREATE TABLE `qrtz_blob_triggers` ( - `sched_name` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `trigger_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `trigger_group` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `blob_data` blob NULL, - PRIMARY KEY (`sched_name`, `trigger_name`, `trigger_group`) USING BTREE, - CONSTRAINT `QRTZ_BLOB_TRIGGERS_ibfk_1` FOREIGN KEY (`sched_name`, `trigger_name`, `trigger_group`) REFERENCES `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for qrtz_calendars --- ---------------------------- -DROP TABLE IF EXISTS `qrtz_calendars`; -CREATE TABLE `qrtz_calendars` ( - `sched_name` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `calendar_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `calendar` blob NOT NULL, - PRIMARY KEY (`sched_name`, `calendar_name`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for qrtz_cron_triggers --- ---------------------------- -DROP TABLE IF EXISTS `qrtz_cron_triggers`; -CREATE TABLE `qrtz_cron_triggers` ( - `sched_name` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `trigger_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `trigger_group` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `cron_expression` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `time_zone_id` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, - PRIMARY KEY (`sched_name`, `trigger_name`, `trigger_group`) USING BTREE, - CONSTRAINT `QRTZ_CRON_TRIGGERS_ibfk_1` FOREIGN KEY (`sched_name`, `trigger_name`, `trigger_group`) REFERENCES `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of qrtz_cron_triggers --- ---------------------------- -INSERT INTO `qrtz_cron_triggers` VALUES ('RuoyiScheduler', 'TASK_CLASS_NAME1', 'DEFAULT', '0/10 * * * * ?', 'Asia/Shanghai'); -INSERT INTO `qrtz_cron_triggers` VALUES ('RuoyiScheduler', 'TASK_CLASS_NAME2', 'DEFAULT', '0/15 * * * * ?', 'Asia/Shanghai'); -INSERT INTO `qrtz_cron_triggers` VALUES ('RuoyiScheduler', 'TASK_CLASS_NAME3', 'DEFAULT', '0/20 * * * * ?', 'Asia/Shanghai'); - --- ---------------------------- --- Table structure for qrtz_fired_triggers --- ---------------------------- -DROP TABLE IF EXISTS `qrtz_fired_triggers`; -CREATE TABLE `qrtz_fired_triggers` ( - `sched_name` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `entry_id` varchar(95) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `trigger_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `trigger_group` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `instance_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `fired_time` bigint(0) NOT NULL, - `sched_time` bigint(0) NOT NULL, - `priority` int(0) NOT NULL, - `state` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `job_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, - `job_group` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, - `is_nonconcurrent` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, - `requests_recovery` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, - PRIMARY KEY (`sched_name`, `entry_id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for qrtz_job_details --- ---------------------------- -DROP TABLE IF EXISTS `qrtz_job_details`; -CREATE TABLE `qrtz_job_details` ( - `sched_name` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `job_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `job_group` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `description` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, - `job_class_name` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `is_durable` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `is_nonconcurrent` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `is_update_data` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `requests_recovery` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `job_data` blob NULL, - PRIMARY KEY (`sched_name`, `job_name`, `job_group`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of qrtz_job_details --- ---------------------------- -INSERT INTO `qrtz_job_details` VALUES ('RuoyiScheduler', 'TASK_CLASS_NAME1', 'DEFAULT', NULL, 'com.ruoyi.quartz.util.QuartzDisallowConcurrentExecution', '0', '1', '0', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C7708000000100000000174000F5441534B5F50524F504552544945537372001E636F6D2E72756F79692E71756172747A2E646F6D61696E2E5379734A6F6200000000000000010200084C000A636F6E63757272656E747400124C6A6176612F6C616E672F537472696E673B4C000E63726F6E45787072657373696F6E71007E00094C000C696E766F6B6554617267657471007E00094C00086A6F6247726F757071007E00094C00056A6F6249647400104C6A6176612F6C616E672F4C6F6E673B4C00076A6F624E616D6571007E00094C000D6D697366697265506F6C69637971007E00094C000673746174757371007E000978720027636F6D2E72756F79692E636F6D6D6F6E2E636F72652E646F6D61696E2E42617365456E7469747900000000000000010200074C0008637265617465427971007E00094C000A63726561746554696D657400104C6A6176612F7574696C2F446174653B4C0006706172616D7371007E00034C000672656D61726B71007E00094C000B73656172636856616C756571007E00094C0008757064617465427971007E00094C000A75706461746554696D6571007E000C787074000561646D696E7372000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001797B913EF878707400007070707400013174000E302F3130202A202A202A202A203F74001172795461736B2E72794E6F506172616D7374000744454641554C547372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000000000001740018E7B3BBE7BB9FE9BB98E8AEA4EFBC88E697A0E58F82EFBC8974000133740001317800); -INSERT INTO `qrtz_job_details` VALUES ('RuoyiScheduler', 'TASK_CLASS_NAME2', 'DEFAULT', NULL, 'com.ruoyi.quartz.util.QuartzDisallowConcurrentExecution', '0', '1', '0', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C7708000000100000000174000F5441534B5F50524F504552544945537372001E636F6D2E72756F79692E71756172747A2E646F6D61696E2E5379734A6F6200000000000000010200084C000A636F6E63757272656E747400124C6A6176612F6C616E672F537472696E673B4C000E63726F6E45787072657373696F6E71007E00094C000C696E766F6B6554617267657471007E00094C00086A6F6247726F757071007E00094C00056A6F6249647400104C6A6176612F6C616E672F4C6F6E673B4C00076A6F624E616D6571007E00094C000D6D697366697265506F6C69637971007E00094C000673746174757371007E000978720027636F6D2E72756F79692E636F6D6D6F6E2E636F72652E646F6D61696E2E42617365456E7469747900000000000000010200074C0008637265617465427971007E00094C000A63726561746554696D657400104C6A6176612F7574696C2F446174653B4C0006706172616D7371007E00034C000672656D61726B71007E00094C000B73656172636856616C756571007E00094C0008757064617465427971007E00094C000A75706461746554696D6571007E000C787074000561646D696E7372000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001797B913EF878707400007070707400013174000E302F3135202A202A202A202A203F74001572795461736B2E7279506172616D7328277279272974000744454641554C547372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000000000002740018E7B3BBE7BB9FE9BB98E8AEA4EFBC88E69C89E58F82EFBC8974000133740001317800); -INSERT INTO `qrtz_job_details` VALUES ('RuoyiScheduler', 'TASK_CLASS_NAME3', 'DEFAULT', NULL, 'com.ruoyi.quartz.util.QuartzDisallowConcurrentExecution', '0', '1', '0', '0', 0xACED0005737200156F72672E71756172747A2E4A6F62446174614D61709FB083E8BFA9B0CB020000787200266F72672E71756172747A2E7574696C732E537472696E674B65794469727479466C61674D61708208E8C3FBC55D280200015A0013616C6C6F77735472616E7369656E74446174617872001D6F72672E71756172747A2E7574696C732E4469727479466C61674D617013E62EAD28760ACE0200025A000564697274794C00036D617074000F4C6A6176612F7574696C2F4D61703B787001737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F4000000000000C7708000000100000000174000F5441534B5F50524F504552544945537372001E636F6D2E72756F79692E71756172747A2E646F6D61696E2E5379734A6F6200000000000000010200084C000A636F6E63757272656E747400124C6A6176612F6C616E672F537472696E673B4C000E63726F6E45787072657373696F6E71007E00094C000C696E766F6B6554617267657471007E00094C00086A6F6247726F757071007E00094C00056A6F6249647400104C6A6176612F6C616E672F4C6F6E673B4C00076A6F624E616D6571007E00094C000D6D697366697265506F6C69637971007E00094C000673746174757371007E000978720027636F6D2E72756F79692E636F6D6D6F6E2E636F72652E646F6D61696E2E42617365456E7469747900000000000000010200074C0008637265617465427971007E00094C000A63726561746554696D657400104C6A6176612F7574696C2F446174653B4C0006706172616D7371007E00034C000672656D61726B71007E00094C000B73656172636856616C756571007E00094C0008757064617465427971007E00094C000A75706461746554696D6571007E000C787074000561646D696E7372000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001797B913EF878707400007070707400013174000E302F3230202A202A202A202A203F74003872795461736B2E72794D756C7469706C65506172616D7328277279272C20747275652C20323030304C2C203331362E3530442C203130302974000744454641554C547372000E6A6176612E6C616E672E4C6F6E673B8BE490CC8F23DF0200014A000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000000000003740018E7B3BBE7BB9FE9BB98E8AEA4EFBC88E5A49AE58F82EFBC8974000133740001317800); - --- ---------------------------- --- Table structure for qrtz_locks --- ---------------------------- -DROP TABLE IF EXISTS `qrtz_locks`; -CREATE TABLE `qrtz_locks` ( - `sched_name` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `lock_name` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - PRIMARY KEY (`sched_name`, `lock_name`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of qrtz_locks --- ---------------------------- -INSERT INTO `qrtz_locks` VALUES ('RuoyiScheduler', 'STATE_ACCESS'); -INSERT INTO `qrtz_locks` VALUES ('RuoyiScheduler', 'TRIGGER_ACCESS'); - --- ---------------------------- --- Table structure for qrtz_paused_trigger_grps --- ---------------------------- -DROP TABLE IF EXISTS `qrtz_paused_trigger_grps`; -CREATE TABLE `qrtz_paused_trigger_grps` ( - `sched_name` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `trigger_group` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - PRIMARY KEY (`sched_name`, `trigger_group`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for qrtz_scheduler_state --- ---------------------------- -DROP TABLE IF EXISTS `qrtz_scheduler_state`; -CREATE TABLE `qrtz_scheduler_state` ( - `sched_name` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `instance_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `last_checkin_time` bigint(0) NOT NULL, - `checkin_interval` bigint(0) NOT NULL, - PRIMARY KEY (`sched_name`, `instance_name`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of qrtz_scheduler_state --- ---------------------------- -INSERT INTO `qrtz_scheduler_state` VALUES ('RuoyiScheduler', 'Admin1630461270994', 1630548198218, 15000); - --- ---------------------------- --- Table structure for qrtz_simple_triggers --- ---------------------------- -DROP TABLE IF EXISTS `qrtz_simple_triggers`; -CREATE TABLE `qrtz_simple_triggers` ( - `sched_name` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `trigger_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `trigger_group` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `repeat_count` bigint(0) NOT NULL, - `repeat_interval` bigint(0) NOT NULL, - `times_triggered` bigint(0) NOT NULL, - PRIMARY KEY (`sched_name`, `trigger_name`, `trigger_group`) USING BTREE, - CONSTRAINT `QRTZ_SIMPLE_TRIGGERS_ibfk_1` FOREIGN KEY (`sched_name`, `trigger_name`, `trigger_group`) REFERENCES `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for qrtz_simprop_triggers --- ---------------------------- -DROP TABLE IF EXISTS `qrtz_simprop_triggers`; -CREATE TABLE `qrtz_simprop_triggers` ( - `sched_name` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `trigger_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `trigger_group` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `str_prop_1` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, - `str_prop_2` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, - `str_prop_3` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, - `int_prop_1` int(0) NULL DEFAULT NULL, - `int_prop_2` int(0) NULL DEFAULT NULL, - `long_prop_1` bigint(0) NULL DEFAULT NULL, - `long_prop_2` bigint(0) NULL DEFAULT NULL, - `dec_prop_1` decimal(13, 4) NULL DEFAULT NULL, - `dec_prop_2` decimal(13, 4) NULL DEFAULT NULL, - `bool_prop_1` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, - `bool_prop_2` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, - PRIMARY KEY (`sched_name`, `trigger_name`, `trigger_group`) USING BTREE, - CONSTRAINT `QRTZ_SIMPROP_TRIGGERS_ibfk_1` FOREIGN KEY (`sched_name`, `trigger_name`, `trigger_group`) REFERENCES `qrtz_triggers` (`sched_name`, `trigger_name`, `trigger_group`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for qrtz_triggers --- ---------------------------- -DROP TABLE IF EXISTS `qrtz_triggers`; -CREATE TABLE `qrtz_triggers` ( - `sched_name` varchar(120) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `trigger_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `trigger_group` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `job_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `job_group` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `description` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, - `next_fire_time` bigint(0) NULL DEFAULT NULL, - `prev_fire_time` bigint(0) NULL DEFAULT NULL, - `priority` int(0) NULL DEFAULT NULL, - `trigger_state` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `trigger_type` varchar(8) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, - `start_time` bigint(0) NOT NULL, - `end_time` bigint(0) NULL DEFAULT NULL, - `calendar_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, - `misfire_instr` smallint(0) NULL DEFAULT NULL, - `job_data` blob NULL, - PRIMARY KEY (`sched_name`, `trigger_name`, `trigger_group`) USING BTREE, - INDEX `sched_name`(`sched_name`, `job_name`, `job_group`) USING BTREE, - CONSTRAINT `QRTZ_TRIGGERS_ibfk_1` FOREIGN KEY (`sched_name`, `job_name`, `job_group`) REFERENCES `qrtz_job_details` (`sched_name`, `job_name`, `job_group`) ON DELETE RESTRICT ON UPDATE RESTRICT -) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of qrtz_triggers --- ---------------------------- -INSERT INTO `qrtz_triggers` VALUES ('RuoyiScheduler', 'TASK_CLASS_NAME1', 'DEFAULT', 'TASK_CLASS_NAME1', 'DEFAULT', NULL, 1630461280000, -1, 5, 'PAUSED', 'CRON', 1630461271000, 0, NULL, 2, ''); -INSERT INTO `qrtz_triggers` VALUES ('RuoyiScheduler', 'TASK_CLASS_NAME2', 'DEFAULT', 'TASK_CLASS_NAME2', 'DEFAULT', NULL, 1630461285000, -1, 5, 'PAUSED', 'CRON', 1630461271000, 0, NULL, 2, ''); -INSERT INTO `qrtz_triggers` VALUES ('RuoyiScheduler', 'TASK_CLASS_NAME3', 'DEFAULT', 'TASK_CLASS_NAME3', 'DEFAULT', NULL, 1630461280000, -1, 5, 'PAUSED', 'CRON', 1630461271000, 0, NULL, 2, ''); - --- ---------------------------- --- Table structure for sys_config --- ---------------------------- -DROP TABLE IF EXISTS `sys_config`; -CREATE TABLE `sys_config` ( - `config_id` int(0) NOT NULL AUTO_INCREMENT COMMENT '参数主键', - `config_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '参数名称', - `config_key` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '参数键名', - `config_value` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '参数键值', - `config_type` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'N' COMMENT '系统内置(Y是 N否)', - `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`config_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '参数配置表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_config --- ---------------------------- -INSERT INTO `sys_config` VALUES (1, '主框架页-默认皮肤样式名称', 'sys.index.skinName', 'skin-blue', 'Y', 'admin', '2021-05-18 02:23:07', '', NULL, '蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow'); -INSERT INTO `sys_config` VALUES (2, '用户管理-账号初始密码', 'sys.user.initPassword', '123456', 'Y', 'admin', '2021-05-18 02:23:07', '', NULL, '初始化密码 123456'); -INSERT INTO `sys_config` VALUES (3, '主框架页-侧边栏主题', 'sys.index.sideTheme', 'theme-dark', 'Y', 'admin', '2021-05-18 02:23:07', '', NULL, '深色主题theme-dark,浅色主题theme-light'); - --- ---------------------------- --- Table structure for sys_dept --- ---------------------------- -DROP TABLE IF EXISTS `sys_dept`; -CREATE TABLE `sys_dept` ( - `dept_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '部门id', - `parent_id` bigint(0) NULL DEFAULT 0 COMMENT '父部门id', - `ancestors` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '祖级列表', - `dept_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '部门名称', - `order_num` int(0) NULL DEFAULT 0 COMMENT '显示顺序', - `leader` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '负责人', - `phone` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '联系电话', - `email` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮箱', - `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '部门状态(0正常 1停用)', - `del_flag` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '删除标志(0代表存在 2代表删除)', - `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - PRIMARY KEY (`dept_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 110 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '部门表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_dept --- ---------------------------- -INSERT INTO `sys_dept` VALUES (100, 0, '0', '若依科技', 0, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2021-05-18 02:23:06', '', NULL); -INSERT INTO `sys_dept` VALUES (101, 100, '0,100', '深圳总公司', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2021-05-18 02:23:06', '', NULL); -INSERT INTO `sys_dept` VALUES (102, 100, '0,100', '长沙分公司', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2021-05-18 02:23:06', '', NULL); -INSERT INTO `sys_dept` VALUES (103, 101, '0,100,101', '研发部门', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2021-05-18 02:23:06', '', NULL); -INSERT INTO `sys_dept` VALUES (104, 101, '0,100,101', '市场部门', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2021-05-18 02:23:06', '', NULL); -INSERT INTO `sys_dept` VALUES (105, 101, '0,100,101', '测试部门', 3, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2021-05-18 02:23:06', '', NULL); -INSERT INTO `sys_dept` VALUES (106, 101, '0,100,101', '财务部门', 4, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2021-05-18 02:23:06', '', NULL); -INSERT INTO `sys_dept` VALUES (107, 101, '0,100,101', '运维部门', 5, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2021-05-18 02:23:06', '', NULL); -INSERT INTO `sys_dept` VALUES (108, 102, '0,100,102', '市场部门', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2021-05-18 02:23:06', '', NULL); -INSERT INTO `sys_dept` VALUES (109, 102, '0,100,102', '财务部门', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2021-05-18 02:23:06', '', NULL); - --- ---------------------------- --- Table structure for sys_dict_data --- ---------------------------- -DROP TABLE IF EXISTS `sys_dict_data`; -CREATE TABLE `sys_dict_data` ( - `dict_code` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '字典编码', - `dict_sort` int(0) NULL DEFAULT 0 COMMENT '字典排序', - `dict_label` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '字典标签', - `dict_value` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '字典键值', - `dict_type` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '字典类型', - `css_class` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '样式属性(其他样式扩展)', - `list_class` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '表格回显样式', - `is_default` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'N' COMMENT '是否默认(Y是 N否)', - `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '状态(0正常 1停用)', - `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`dict_code`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 119 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '字典数据表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_dict_data --- ---------------------------- -INSERT INTO `sys_dict_data` VALUES (1, 1, '男', '0', 'sys_user_sex', '', '', 'Y', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '性别男'); -INSERT INTO `sys_dict_data` VALUES (2, 2, '女', '1', 'sys_user_sex', '', '', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '性别女'); -INSERT INTO `sys_dict_data` VALUES (3, 3, '未知', '2', 'sys_user_sex', '', '', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '性别未知'); -INSERT INTO `sys_dict_data` VALUES (4, 1, '显示', '0', 'sys_show_hide', '', 'primary', 'Y', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '显示菜单'); -INSERT INTO `sys_dict_data` VALUES (5, 2, '隐藏', '1', 'sys_show_hide', '', 'danger', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '隐藏菜单'); -INSERT INTO `sys_dict_data` VALUES (6, 1, '正常', '0', 'sys_normal_disable', '', 'primary', 'Y', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '正常状态'); -INSERT INTO `sys_dict_data` VALUES (7, 2, '停用', '1', 'sys_normal_disable', '', 'danger', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '停用状态'); -INSERT INTO `sys_dict_data` VALUES (8, 1, '正常', '0', 'sys_job_status', '', 'primary', 'Y', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '正常状态'); -INSERT INTO `sys_dict_data` VALUES (9, 2, '暂停', '1', 'sys_job_status', '', 'danger', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '停用状态'); -INSERT INTO `sys_dict_data` VALUES (10, 1, '默认', 'DEFAULT', 'sys_job_group', '', '', 'Y', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '默认分组'); -INSERT INTO `sys_dict_data` VALUES (11, 2, '系统', 'SYSTEM', 'sys_job_group', '', '', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '系统分组'); -INSERT INTO `sys_dict_data` VALUES (12, 1, '是', 'Y', 'sys_yes_no', '', 'primary', 'Y', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '系统默认是'); -INSERT INTO `sys_dict_data` VALUES (13, 2, '否', 'N', 'sys_yes_no', '', 'danger', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '系统默认否'); -INSERT INTO `sys_dict_data` VALUES (14, 1, '通知', '1', 'sys_notice_type', '', 'warning', 'Y', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '通知'); -INSERT INTO `sys_dict_data` VALUES (15, 2, '公告', '2', 'sys_notice_type', '', 'success', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '公告'); -INSERT INTO `sys_dict_data` VALUES (16, 1, '正常', '0', 'sys_notice_status', '', 'primary', 'Y', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '正常状态'); -INSERT INTO `sys_dict_data` VALUES (17, 2, '关闭', '1', 'sys_notice_status', '', 'danger', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '关闭状态'); -INSERT INTO `sys_dict_data` VALUES (18, 1, '新增', '1', 'sys_oper_type', '', 'info', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '新增操作'); -INSERT INTO `sys_dict_data` VALUES (19, 2, '修改', '2', 'sys_oper_type', '', 'info', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '修改操作'); -INSERT INTO `sys_dict_data` VALUES (20, 3, '删除', '3', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '删除操作'); -INSERT INTO `sys_dict_data` VALUES (21, 4, '授权', '4', 'sys_oper_type', '', 'primary', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '授权操作'); -INSERT INTO `sys_dict_data` VALUES (22, 5, '导出', '5', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '导出操作'); -INSERT INTO `sys_dict_data` VALUES (23, 6, '导入', '6', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '导入操作'); -INSERT INTO `sys_dict_data` VALUES (24, 7, '强退', '7', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '强退操作'); -INSERT INTO `sys_dict_data` VALUES (25, 8, '生成代码', '8', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '生成操作'); -INSERT INTO `sys_dict_data` VALUES (26, 9, '清空数据', '9', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '清空操作'); -INSERT INTO `sys_dict_data` VALUES (27, 1, '成功', '0', 'sys_common_status', '', 'primary', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '正常状态'); -INSERT INTO `sys_dict_data` VALUES (28, 2, '失败', '1', 'sys_common_status', '', 'danger', 'N', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '停用状态'); -INSERT INTO `sys_dict_data` VALUES (100, 0, '按键', '1', 'iot_trigger_source', NULL, NULL, 'N', '0', 'admin', '2021-05-05 15:53:34', 'admin', '2021-05-05 15:54:17', '按键操作'); -INSERT INTO `sys_dict_data` VALUES (101, 0, '手机', '2', 'iot_trigger_source', NULL, NULL, 'N', '0', 'admin', '2021-05-05 15:53:50', '', NULL, '手机操作'); -INSERT INTO `sys_dict_data` VALUES (102, 0, '浏览器', '3', 'iot_trigger_source', NULL, NULL, 'N', '0', 'admin', '2021-05-05 15:54:09', '', NULL, '浏览器操作'); -INSERT INTO `sys_dict_data` VALUES (103, 0, '射频遥控', '4', 'iot_trigger_source', NULL, NULL, 'N', '0', 'admin', '2021-05-05 15:54:44', '', NULL, '433M遥控操作'); -INSERT INTO `sys_dict_data` VALUES (104, 0, '雷达', '5', 'iot_trigger_source', NULL, NULL, 'N', '0', 'admin', '2021-05-05 15:55:03', '', NULL, '雷达触发'); -INSERT INTO `sys_dict_data` VALUES (105, 0, '报警', '6', 'iot_trigger_source', NULL, NULL, 'N', '0', 'admin', '2021-05-05 15:55:44', '', NULL, '报警触发'); -INSERT INTO `sys_dict_data` VALUES (106, 0, '定时', '7', 'iot_trigger_source', NULL, NULL, 'N', '0', 'admin', '2021-05-05 15:56:03', '', NULL, '定时触发'); -INSERT INTO `sys_dict_data` VALUES (107, 1, '继电器开关', '1', 'rf_function', NULL, NULL, 'N', '0', 'admin', '2021-05-05 15:58:36', 'admin', '2021-06-23 22:50:32', '继电器通断'); -INSERT INTO `sys_dict_data` VALUES (108, 2, '七彩灯开关', '2', 'rf_function', NULL, NULL, 'N', '0', 'admin', '2021-05-05 15:58:57', 'admin', '2021-06-23 22:50:44', '开关灯'); -INSERT INTO `sys_dict_data` VALUES (109, 3, '雷达开关', '3', 'rf_function', NULL, NULL, 'N', '0', 'admin', '2021-05-05 15:59:34', 'admin', '2021-06-23 22:50:21', '开关雷达'); -INSERT INTO `sys_dict_data` VALUES (110, 4, '报警开关', '4', 'rf_function', NULL, NULL, 'N', '0', 'admin', '2021-05-05 16:00:01', 'admin', '2021-06-01 15:44:44', '报警开关'); -INSERT INTO `sys_dict_data` VALUES (111, 5, '智能配网', '5', 'rf_function', NULL, NULL, 'N', '0', 'admin', '2021-05-05 16:00:16', 'admin', '2021-06-01 15:44:51', '智能配网'); -INSERT INTO `sys_dict_data` VALUES (112, 0, '固定颜色', '0', 'light_mode', NULL, NULL, 'N', '0', 'admin', '2021-05-05 16:07:22', '', NULL, '固定颜色'); -INSERT INTO `sys_dict_data` VALUES (113, 0, '七彩渐变', '1', 'light_mode', NULL, NULL, 'N', '0', 'admin', '2021-05-05 16:07:41', '', NULL, '七彩渐变'); -INSERT INTO `sys_dict_data` VALUES (114, 0, '动感模式', '2', 'light_mode', NULL, NULL, 'N', '0', 'admin', '2021-05-05 16:08:44', '', NULL, '动感模式'); -INSERT INTO `sys_dict_data` VALUES (115, 0, '单色渐变', '3', 'light_mode', NULL, NULL, 'N', '0', 'admin', '2021-05-05 16:09:12', '', NULL, '单色渐变'); -INSERT INTO `sys_dict_data` VALUES (116, 0, '白光', '4', 'light_mode', NULL, NULL, 'N', '0', 'admin', '2021-05-05 16:09:46', '', NULL, '白光'); -INSERT INTO `sys_dict_data` VALUES (117, 0, '暖光', '5', 'light_mode', NULL, NULL, 'N', '0', 'admin', '2021-05-05 16:10:07', '', NULL, '暖光'); -INSERT INTO `sys_dict_data` VALUES (118, 0, '无', '0', 'rf_function', NULL, NULL, 'N', '0', 'admin', '2021-06-01 15:43:44', 'admin', '2021-06-01 15:44:21', '不进行任何操作'); - --- ---------------------------- --- Table structure for sys_dict_type --- ---------------------------- -DROP TABLE IF EXISTS `sys_dict_type`; -CREATE TABLE `sys_dict_type` ( - `dict_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '字典主键', - `dict_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '字典名称', - `dict_type` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '字典类型', - `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '状态(0正常 1停用)', - `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`dict_id`) USING BTREE, - UNIQUE INDEX `dict_type`(`dict_type`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 103 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '字典类型表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_dict_type --- ---------------------------- -INSERT INTO `sys_dict_type` VALUES (1, '用户性别', 'sys_user_sex', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '用户性别列表'); -INSERT INTO `sys_dict_type` VALUES (2, '菜单状态', 'sys_show_hide', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '菜单状态列表'); -INSERT INTO `sys_dict_type` VALUES (3, '系统开关', 'sys_normal_disable', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '系统开关列表'); -INSERT INTO `sys_dict_type` VALUES (4, '任务状态', 'sys_job_status', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '任务状态列表'); -INSERT INTO `sys_dict_type` VALUES (5, '任务分组', 'sys_job_group', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '任务分组列表'); -INSERT INTO `sys_dict_type` VALUES (6, '系统是否', 'sys_yes_no', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '系统是否列表'); -INSERT INTO `sys_dict_type` VALUES (7, '通知类型', 'sys_notice_type', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '通知类型列表'); -INSERT INTO `sys_dict_type` VALUES (8, '通知状态', 'sys_notice_status', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '通知状态列表'); -INSERT INTO `sys_dict_type` VALUES (9, '操作类型', 'sys_oper_type', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '操作类型列表'); -INSERT INTO `sys_dict_type` VALUES (10, '系统状态', 'sys_common_status', '0', 'admin', '2021-05-18 02:23:07', '', NULL, '登录状态列表'); -INSERT INTO `sys_dict_type` VALUES (100, '设备触发源', 'iot_trigger_source', '0', 'admin', '2021-05-05 15:51:26', '', NULL, '设备操作的触发源'); -INSERT INTO `sys_dict_type` VALUES (101, '射频遥控按键功能', 'rf_function', '0', 'admin', '2021-05-05 15:58:05', '', NULL, '射频遥控按键功能列表'); -INSERT INTO `sys_dict_type` VALUES (102, '彩灯模式', 'light_mode', '0', 'admin', '2021-05-05 16:04:53', '', NULL, '彩灯模式,单色、七彩、渐变、动感'); - --- ---------------------------- --- Table structure for sys_job --- ---------------------------- -DROP TABLE IF EXISTS `sys_job`; -CREATE TABLE `sys_job` ( - `job_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '任务ID', - `job_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '任务名称', - `job_group` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'DEFAULT' COMMENT '任务组名', - `invoke_target` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '调用目标字符串', - `cron_expression` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT 'cron执行表达式', - `misfire_policy` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '3' COMMENT '计划执行错误策略(1立即执行 2执行一次 3放弃执行)', - `concurrent` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '1' COMMENT '是否并发执行(0允许 1禁止)', - `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '状态(0正常 1暂停)', - `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '备注信息', - PRIMARY KEY (`job_id`, `job_name`, `job_group`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '定时任务调度表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_job --- ---------------------------- -INSERT INTO `sys_job` VALUES (1, '系统默认(无参)', 'DEFAULT', 'ryTask.ryNoParams', '0/10 * * * * ?', '3', '1', '1', 'admin', '2021-05-18 02:23:07', '', NULL, ''); -INSERT INTO `sys_job` VALUES (2, '系统默认(有参)', 'DEFAULT', 'ryTask.ryParams(\'ry\')', '0/15 * * * * ?', '3', '1', '1', 'admin', '2021-05-18 02:23:07', '', NULL, ''); -INSERT INTO `sys_job` VALUES (3, '系统默认(多参)', 'DEFAULT', 'ryTask.ryMultipleParams(\'ry\', true, 2000L, 316.50D, 100)', '0/20 * * * * ?', '3', '1', '1', 'admin', '2021-05-18 02:23:07', '', NULL, ''); - --- ---------------------------- --- Table structure for sys_job_log --- ---------------------------- -DROP TABLE IF EXISTS `sys_job_log`; -CREATE TABLE `sys_job_log` ( - `job_log_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '任务日志ID', - `job_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '任务名称', - `job_group` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '任务组名', - `invoke_target` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '调用目标字符串', - `job_message` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '日志信息', - `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '执行状态(0正常 1失败)', - `exception_info` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '异常信息', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - PRIMARY KEY (`job_log_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '定时任务调度日志表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_job_log --- ---------------------------- -INSERT INTO `sys_job_log` VALUES (1, '系统默认(有参)', 'DEFAULT', 'ryTask.ryParams(\'ry\')', '系统默认(有参) 总共耗时:1毫秒', '0', '', '2021-06-11 09:23:45'); - --- ---------------------------- --- Table structure for sys_logininfor --- ---------------------------- -DROP TABLE IF EXISTS `sys_logininfor`; -CREATE TABLE `sys_logininfor` ( - `info_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '访问ID', - `user_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '用户账号', - `ipaddr` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '登录IP地址', - `login_location` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '登录地点', - `browser` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '浏览器类型', - `os` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '操作系统', - `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '登录状态(0成功 1失败)', - `msg` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '提示消息', - `login_time` datetime(0) NULL DEFAULT NULL COMMENT '访问时间', - PRIMARY KEY (`info_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 435 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '系统访问记录' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_logininfor --- ---------------------------- -INSERT INTO `sys_logininfor` VALUES (385, 'admin', '172.17.0.1', '内网IP', 'Mobile Safari', 'Android 1.x', '1', '用户不存在/密码错误', '2021-06-30 17:13:17'); -INSERT INTO `sys_logininfor` VALUES (386, 'admin', '172.17.0.1', '内网IP', 'Mobile Safari', 'Android 1.x', '1', '验证码已失效', '2021-06-30 17:13:34'); -INSERT INTO `sys_logininfor` VALUES (387, 'admin', '172.17.0.1', '内网IP', 'Mobile Safari', 'Android 1.x', '0', '登录成功', '2021-06-30 17:14:13'); -INSERT INTO `sys_logininfor` VALUES (388, 'admin', '222.95.162.245', 'XX XX', 'Chrome 9', 'Windows 10', '1', '用户不存在/密码错误', '2021-08-26 14:44:02'); -INSERT INTO `sys_logininfor` VALUES (389, 'admin', '222.95.162.245', 'XX XX', 'Chrome 9', 'Windows 10', '1', '验证码错误', '2021-08-26 14:44:08'); -INSERT INTO `sys_logininfor` VALUES (390, 'admin', '222.95.162.245', 'XX XX', 'Chrome 9', 'Windows 10', '0', '登录成功', '2021-08-26 14:44:59'); -INSERT INTO `sys_logininfor` VALUES (391, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:35:01'); -INSERT INTO `sys_logininfor` VALUES (392, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:37:13'); -INSERT INTO `sys_logininfor` VALUES (393, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:37:24'); -INSERT INTO `sys_logininfor` VALUES (394, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:37:36'); -INSERT INTO `sys_logininfor` VALUES (395, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:38:40'); -INSERT INTO `sys_logininfor` VALUES (396, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:38:56'); -INSERT INTO `sys_logininfor` VALUES (397, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:39:53'); -INSERT INTO `sys_logininfor` VALUES (398, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:39:56'); -INSERT INTO `sys_logininfor` VALUES (399, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:40:10'); -INSERT INTO `sys_logininfor` VALUES (400, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:40:19'); -INSERT INTO `sys_logininfor` VALUES (401, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:40:49'); -INSERT INTO `sys_logininfor` VALUES (402, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:41:42'); -INSERT INTO `sys_logininfor` VALUES (403, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:42:10'); -INSERT INTO `sys_logininfor` VALUES (404, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:42:26'); -INSERT INTO `sys_logininfor` VALUES (405, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:42:56'); -INSERT INTO `sys_logininfor` VALUES (406, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:43:05'); -INSERT INTO `sys_logininfor` VALUES (407, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:44:38'); -INSERT INTO `sys_logininfor` VALUES (408, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:44:48'); -INSERT INTO `sys_logininfor` VALUES (409, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:45:01'); -INSERT INTO `sys_logininfor` VALUES (410, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:51:20'); -INSERT INTO `sys_logininfor` VALUES (411, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:51:40'); -INSERT INTO `sys_logininfor` VALUES (412, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:51:54'); -INSERT INTO `sys_logininfor` VALUES (413, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:55:17'); -INSERT INTO `sys_logininfor` VALUES (414, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 15:58:28'); -INSERT INTO `sys_logininfor` VALUES (415, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 16:11:13'); -INSERT INTO `sys_logininfor` VALUES (416, 'ozCz80FhaFo6rij0YLwz1aXTzKok', '180.111.206.137', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 16:16:40'); -INSERT INTO `sys_logininfor` VALUES (417, 'oRHbg4mTdANmQwDhuQAD8vBbkNG0', '222.95.162.245', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '1', '用户不存在/密码错误', '2021-08-26 16:23:04'); -INSERT INTO `sys_logininfor` VALUES (418, 'admin', '222.95.162.245', 'XX XX', 'Chrome 9', 'Windows 10', '0', '退出成功', '2021-08-26 16:24:11'); -INSERT INTO `sys_logininfor` VALUES (419, 'admin', '222.95.162.245', 'XX XX', 'Chrome 9', 'Windows 10', '0', '退出成功', '2021-08-26 16:24:11'); -INSERT INTO `sys_logininfor` VALUES (420, 'admin', '222.95.162.245', 'XX XX', 'Chrome 9', 'Windows 10', '0', '登录成功', '2021-08-26 16:30:13'); -INSERT INTO `sys_logininfor` VALUES (421, 'oRHbg4mTdANmQwDhuQAD8vBbkNG0', '222.95.162.245', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '0', '登录成功', '2021-08-26 16:30:59'); -INSERT INTO `sys_logininfor` VALUES (422, 'admin', '222.95.162.245', 'XX XX', 'Chrome 9', 'Windows 10', '0', '登录成功', '2021-08-26 16:54:25'); -INSERT INTO `sys_logininfor` VALUES (423, 'oRHbg4mTdANmQwDhuQAD8vBbkNG0', '222.95.162.245', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '0', '登录成功', '2021-08-26 16:56:12'); -INSERT INTO `sys_logininfor` VALUES (424, 'admin', '222.95.162.245', 'XX XX', 'Chrome 9', 'Windows 10', '0', '登录成功', '2021-08-26 16:58:05'); -INSERT INTO `sys_logininfor` VALUES (425, 'oRHbg4mTdANmQwDhuQAD8vBbkNG0', '222.95.162.245', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '0', '登录成功', '2021-08-26 16:59:32'); -INSERT INTO `sys_logininfor` VALUES (426, 'oRHbg4mTdANmQwDhuQAD8vBbkNG0', '222.95.162.245', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '0', '登录成功', '2021-08-26 16:59:48'); -INSERT INTO `sys_logininfor` VALUES (427, 'oRHbg4mTdANmQwDhuQAD8vBbkNG0', '222.95.162.245', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '0', '登录成功', '2021-08-26 17:00:19'); -INSERT INTO `sys_logininfor` VALUES (428, 'oRHbg4mTdANmQwDhuQAD8vBbkNG0', '222.95.162.245', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '0', '登录成功', '2021-08-26 17:01:36'); -INSERT INTO `sys_logininfor` VALUES (429, 'oRHbg4mTdANmQwDhuQAD8vBbkNG0', '222.95.162.245', 'XX XX', 'Mobile Safari', 'iOS 11 (iPhone)', '0', '登录成功', '2021-08-26 17:02:12'); -INSERT INTO `sys_logininfor` VALUES (430, 'admin', '222.95.162.245', 'XX XX', 'Chrome 9', 'Windows 10', '0', '登录成功', '2021-08-26 17:06:05'); -INSERT INTO `sys_logininfor` VALUES (431, 'admin', '222.95.162.245', 'XX XX', 'Chrome 9', 'Windows 10', '0', '登录成功', '2021-08-27 11:53:54'); -INSERT INTO `sys_logininfor` VALUES (432, 'admin', '222.95.162.245', 'XX XX', 'Chrome 9', 'Windows 10', '0', '登录成功', '2021-08-27 11:54:00'); -INSERT INTO `sys_logininfor` VALUES (433, 'admin', '58.212.134.111', 'XX XX', 'Mobile Safari', 'Android 1.x', '0', '登录成功', '2021-08-27 19:20:43'); -INSERT INTO `sys_logininfor` VALUES (434, 'admin', '127.0.0.1', '内网IP', 'Chrome 9', 'Windows 10', '0', '登录成功', '2021-08-28 13:59:02'); - --- ---------------------------- --- Table structure for sys_menu --- ---------------------------- -DROP TABLE IF EXISTS `sys_menu`; -CREATE TABLE `sys_menu` ( - `menu_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '菜单ID', - `menu_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '菜单名称', - `parent_id` bigint(0) NULL DEFAULT 0 COMMENT '父菜单ID', - `order_num` int(0) NULL DEFAULT 0 COMMENT '显示顺序', - `path` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '路由地址', - `component` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '组件路径', - `is_frame` int(0) NULL DEFAULT 1 COMMENT '是否为外链(0是 1否)', - `is_cache` int(0) NULL DEFAULT 0 COMMENT '是否缓存(0缓存 1不缓存)', - `menu_type` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '菜单类型(M目录 C菜单 F按钮)', - `visible` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '菜单状态(0显示 1隐藏)', - `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '菜单状态(0正常 1停用)', - `perms` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '权限标识', - `icon` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '#' COMMENT '菜单图标', - `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '备注', - PRIMARY KEY (`menu_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2074 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '菜单权限表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_menu --- ---------------------------- -INSERT INTO `sys_menu` VALUES (1, '系统管理', 0, 1, 'system', NULL, 1, 0, 'M', '0', '0', '', 'system', 'admin', '2021-05-18 02:23:06', '', NULL, '系统管理目录'); -INSERT INTO `sys_menu` VALUES (2, '系统监控', 0, 2, 'monitor', NULL, 1, 0, 'M', '0', '0', '', 'monitor', 'admin', '2021-05-18 02:23:06', '', NULL, '系统监控目录'); -INSERT INTO `sys_menu` VALUES (3, '系统工具', 0, 3, 'tool', NULL, 1, 0, 'M', '0', '0', '', 'tool', 'admin', '2021-05-18 02:23:06', '', NULL, '系统工具目录'); -INSERT INTO `sys_menu` VALUES (4, '物美官网', 0, 4, 'http://wumei.live', NULL, 0, 0, 'M', '0', '0', '', 'guide', 'admin', '2021-05-18 02:23:06', 'admin', '2021-05-24 14:17:14', '若依官网地址'); -INSERT INTO `sys_menu` VALUES (100, '用户管理', 1, 1, 'user', 'system/user/index', 1, 0, 'C', '0', '0', 'system:user:list', 'user', 'admin', '2021-05-18 02:23:06', '', NULL, '用户管理菜单'); -INSERT INTO `sys_menu` VALUES (101, '角色管理', 1, 2, 'role', 'system/role/index', 1, 0, 'C', '0', '0', 'system:role:list', 'peoples', 'admin', '2021-05-18 02:23:06', '', NULL, '角色管理菜单'); -INSERT INTO `sys_menu` VALUES (102, '菜单管理', 1, 3, 'menu', 'system/menu/index', 1, 0, 'C', '0', '0', 'system:menu:list', 'tree-table', 'admin', '2021-05-18 02:23:06', '', NULL, '菜单管理菜单'); -INSERT INTO `sys_menu` VALUES (103, '部门管理', 1, 4, 'dept', 'system/dept/index', 1, 0, 'C', '0', '0', 'system:dept:list', 'tree', 'admin', '2021-05-18 02:23:06', '', NULL, '部门管理菜单'); -INSERT INTO `sys_menu` VALUES (104, '岗位管理', 1, 5, 'post', 'system/post/index', 1, 0, 'C', '0', '0', 'system:post:list', 'post', 'admin', '2021-05-18 02:23:06', '', NULL, '岗位管理菜单'); -INSERT INTO `sys_menu` VALUES (105, '字典管理', 1, 6, 'dict', 'system/dict/index', 1, 0, 'C', '0', '0', 'system:dict:list', 'dict', 'admin', '2021-05-18 02:23:06', '', NULL, '字典管理菜单'); -INSERT INTO `sys_menu` VALUES (106, '参数设置', 1, 7, 'config', 'system/config/index', 1, 0, 'C', '0', '0', 'system:config:list', 'edit', 'admin', '2021-05-18 02:23:06', '', NULL, '参数设置菜单'); -INSERT INTO `sys_menu` VALUES (107, '通知公告', 1, 8, 'notice', 'system/notice/index', 1, 0, 'C', '0', '0', 'system:notice:list', 'message', 'admin', '2021-05-18 02:23:06', '', NULL, '通知公告菜单'); -INSERT INTO `sys_menu` VALUES (108, '日志管理', 1, 9, 'log', '', 1, 0, 'M', '0', '0', '', 'log', 'admin', '2021-05-18 02:23:06', '', NULL, '日志管理菜单'); -INSERT INTO `sys_menu` VALUES (109, '在线用户', 2, 1, 'online', 'monitor/online/index', 1, 0, 'C', '0', '0', 'monitor:online:list', 'online', 'admin', '2021-05-18 02:23:06', '', NULL, '在线用户菜单'); -INSERT INTO `sys_menu` VALUES (110, '定时任务', 2, 2, 'job', 'monitor/job/index', 1, 0, 'C', '0', '0', 'monitor:job:list', 'job', 'admin', '2021-05-18 02:23:06', '', NULL, '定时任务菜单'); -INSERT INTO `sys_menu` VALUES (111, '数据监控', 2, 3, 'druid', 'monitor/druid/index', 1, 0, 'C', '0', '0', 'monitor:druid:list', 'druid', 'admin', '2021-05-18 02:23:06', '', NULL, '数据监控菜单'); -INSERT INTO `sys_menu` VALUES (112, '服务监控', 2, 4, 'server', 'monitor/server/index', 1, 0, 'C', '0', '0', 'monitor:server:list', 'server', 'admin', '2021-05-18 02:23:06', '', NULL, '服务监控菜单'); -INSERT INTO `sys_menu` VALUES (113, '缓存监控', 2, 5, 'cache', 'monitor/cache/index', 1, 0, 'C', '0', '0', 'monitor:cache:list', 'redis', 'admin', '2021-05-18 02:23:06', '', NULL, '缓存监控菜单'); -INSERT INTO `sys_menu` VALUES (114, '表单构建', 3, 1, 'build', 'tool/build/index', 1, 0, 'C', '0', '0', 'tool:build:list', 'build', 'admin', '2021-05-18 02:23:06', '', NULL, '表单构建菜单'); -INSERT INTO `sys_menu` VALUES (115, '代码生成', 3, 2, 'gen', 'tool/gen/index', 1, 0, 'C', '0', '0', 'tool:gen:list', 'code', 'admin', '2021-05-18 02:23:06', '', NULL, '代码生成菜单'); -INSERT INTO `sys_menu` VALUES (116, '系统接口', 3, 3, 'swagger', 'tool/swagger/index', 1, 0, 'C', '0', '0', 'tool:swagger:list', 'swagger', 'admin', '2021-05-18 02:23:06', '', NULL, '系统接口菜单'); -INSERT INTO `sys_menu` VALUES (500, '操作日志', 108, 1, 'operlog', 'monitor/operlog/index', 1, 0, 'C', '0', '0', 'monitor:operlog:list', 'form', 'admin', '2021-05-18 02:23:06', '', NULL, '操作日志菜单'); -INSERT INTO `sys_menu` VALUES (501, '登录日志', 108, 2, 'logininfor', 'monitor/logininfor/index', 1, 0, 'C', '0', '0', 'monitor:logininfor:list', 'logininfor', 'admin', '2021-05-18 02:23:06', '', NULL, '登录日志菜单'); -INSERT INTO `sys_menu` VALUES (1001, '用户查询', 100, 1, '', '', 1, 0, 'F', '0', '0', 'system:user:query', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1002, '用户新增', 100, 2, '', '', 1, 0, 'F', '0', '0', 'system:user:add', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1003, '用户修改', 100, 3, '', '', 1, 0, 'F', '0', '0', 'system:user:edit', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1004, '用户删除', 100, 4, '', '', 1, 0, 'F', '0', '0', 'system:user:remove', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1005, '用户导出', 100, 5, '', '', 1, 0, 'F', '0', '0', 'system:user:export', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1006, '用户导入', 100, 6, '', '', 1, 0, 'F', '0', '0', 'system:user:import', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1007, '重置密码', 100, 7, '', '', 1, 0, 'F', '0', '0', 'system:user:resetPwd', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1008, '角色查询', 101, 1, '', '', 1, 0, 'F', '0', '0', 'system:role:query', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1009, '角色新增', 101, 2, '', '', 1, 0, 'F', '0', '0', 'system:role:add', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1010, '角色修改', 101, 3, '', '', 1, 0, 'F', '0', '0', 'system:role:edit', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1011, '角色删除', 101, 4, '', '', 1, 0, 'F', '0', '0', 'system:role:remove', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1012, '角色导出', 101, 5, '', '', 1, 0, 'F', '0', '0', 'system:role:export', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1013, '菜单查询', 102, 1, '', '', 1, 0, 'F', '0', '0', 'system:menu:query', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1014, '菜单新增', 102, 2, '', '', 1, 0, 'F', '0', '0', 'system:menu:add', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1015, '菜单修改', 102, 3, '', '', 1, 0, 'F', '0', '0', 'system:menu:edit', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1016, '菜单删除', 102, 4, '', '', 1, 0, 'F', '0', '0', 'system:menu:remove', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1017, '部门查询', 103, 1, '', '', 1, 0, 'F', '0', '0', 'system:dept:query', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1018, '部门新增', 103, 2, '', '', 1, 0, 'F', '0', '0', 'system:dept:add', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1019, '部门修改', 103, 3, '', '', 1, 0, 'F', '0', '0', 'system:dept:edit', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1020, '部门删除', 103, 4, '', '', 1, 0, 'F', '0', '0', 'system:dept:remove', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1021, '岗位查询', 104, 1, '', '', 1, 0, 'F', '0', '0', 'system:post:query', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1022, '岗位新增', 104, 2, '', '', 1, 0, 'F', '0', '0', 'system:post:add', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1023, '岗位修改', 104, 3, '', '', 1, 0, 'F', '0', '0', 'system:post:edit', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1024, '岗位删除', 104, 4, '', '', 1, 0, 'F', '0', '0', 'system:post:remove', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1025, '岗位导出', 104, 5, '', '', 1, 0, 'F', '0', '0', 'system:post:export', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1026, '字典查询', 105, 1, '#', '', 1, 0, 'F', '0', '0', 'system:dict:query', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1027, '字典新增', 105, 2, '#', '', 1, 0, 'F', '0', '0', 'system:dict:add', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1028, '字典修改', 105, 3, '#', '', 1, 0, 'F', '0', '0', 'system:dict:edit', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1029, '字典删除', 105, 4, '#', '', 1, 0, 'F', '0', '0', 'system:dict:remove', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1030, '字典导出', 105, 5, '#', '', 1, 0, 'F', '0', '0', 'system:dict:export', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1031, '参数查询', 106, 1, '#', '', 1, 0, 'F', '0', '0', 'system:config:query', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1032, '参数新增', 106, 2, '#', '', 1, 0, 'F', '0', '0', 'system:config:add', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1033, '参数修改', 106, 3, '#', '', 1, 0, 'F', '0', '0', 'system:config:edit', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1034, '参数删除', 106, 4, '#', '', 1, 0, 'F', '0', '0', 'system:config:remove', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1035, '参数导出', 106, 5, '#', '', 1, 0, 'F', '0', '0', 'system:config:export', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1036, '公告查询', 107, 1, '#', '', 1, 0, 'F', '0', '0', 'system:notice:query', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1037, '公告新增', 107, 2, '#', '', 1, 0, 'F', '0', '0', 'system:notice:add', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1038, '公告修改', 107, 3, '#', '', 1, 0, 'F', '0', '0', 'system:notice:edit', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1039, '公告删除', 107, 4, '#', '', 1, 0, 'F', '0', '0', 'system:notice:remove', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1040, '操作查询', 500, 1, '#', '', 1, 0, 'F', '0', '0', 'monitor:operlog:query', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1041, '操作删除', 500, 2, '#', '', 1, 0, 'F', '0', '0', 'monitor:operlog:remove', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1042, '日志导出', 500, 4, '#', '', 1, 0, 'F', '0', '0', 'monitor:operlog:export', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1043, '登录查询', 501, 1, '#', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:query', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1044, '登录删除', 501, 2, '#', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:remove', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1045, '日志导出', 501, 3, '#', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:export', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1046, '在线查询', 109, 1, '#', '', 1, 0, 'F', '0', '0', 'monitor:online:query', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1047, '批量强退', 109, 2, '#', '', 1, 0, 'F', '0', '0', 'monitor:online:batchLogout', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1048, '单条强退', 109, 3, '#', '', 1, 0, 'F', '0', '0', 'monitor:online:forceLogout', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1049, '任务查询', 110, 1, '#', '', 1, 0, 'F', '0', '0', 'monitor:job:query', '#', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1050, '任务新增', 110, 2, '#', '', 1, 0, 'F', '0', '0', 'monitor:job:add', '#', 'admin', '2021-05-18 02:23:07', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1051, '任务修改', 110, 3, '#', '', 1, 0, 'F', '0', '0', 'monitor:job:edit', '#', 'admin', '2021-05-18 02:23:07', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1052, '任务删除', 110, 4, '#', '', 1, 0, 'F', '0', '0', 'monitor:job:remove', '#', 'admin', '2021-05-18 02:23:07', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1053, '状态修改', 110, 5, '#', '', 1, 0, 'F', '0', '0', 'monitor:job:changeStatus', '#', 'admin', '2021-05-18 02:23:07', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1054, '任务导出', 110, 7, '#', '', 1, 0, 'F', '0', '0', 'monitor:job:export', '#', 'admin', '2021-05-18 02:23:07', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1055, '生成查询', 115, 1, '#', '', 1, 0, 'F', '0', '0', 'tool:gen:query', '#', 'admin', '2021-05-18 02:23:07', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1056, '生成修改', 115, 2, '#', '', 1, 0, 'F', '0', '0', 'tool:gen:edit', '#', 'admin', '2021-05-18 02:23:07', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1057, '生成删除', 115, 3, '#', '', 1, 0, 'F', '0', '0', 'tool:gen:remove', '#', 'admin', '2021-05-18 02:23:07', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1058, '导入代码', 115, 2, '#', '', 1, 0, 'F', '0', '0', 'tool:gen:import', '#', 'admin', '2021-05-18 02:23:07', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1059, '预览代码', 115, 4, '#', '', 1, 0, 'F', '0', '0', 'tool:gen:preview', '#', 'admin', '2021-05-18 02:23:07', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (1060, '生成代码', 115, 5, '#', '', 1, 0, 'F', '0', '0', 'tool:gen:code', '#', 'admin', '2021-05-18 02:23:07', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2000, '物联网', 0, 0, 'iot', NULL, 1, 0, 'M', '0', '0', '', 'iot', 'admin', '2021-05-03 17:20:27', 'admin', '2021-05-18 09:32:14', ''); -INSERT INTO `sys_menu` VALUES (2043, '设备分类', 2000, 10, 'category', 'system/category/index', 1, 0, 'C', '0', '0', 'system:category:list', 'category', 'admin', '2021-05-06 15:10:35', 'admin', '2021-05-18 09:32:58', '设备分类菜单'); -INSERT INTO `sys_menu` VALUES (2044, '设备分类查询', 2043, 1, '#', '', 1, 0, 'F', '0', '0', 'system:category:query', '#', 'admin', '2021-05-06 15:10:35', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2045, '设备分类新增', 2043, 2, '#', '', 1, 0, 'F', '0', '0', 'system:category:add', '#', 'admin', '2021-05-06 15:10:35', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2046, '设备分类修改', 2043, 3, '#', '', 1, 0, 'F', '0', '0', 'system:category:edit', '#', 'admin', '2021-05-06 15:10:35', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2047, '设备分类删除', 2043, 4, '#', '', 1, 0, 'F', '0', '0', 'system:category:remove', '#', 'admin', '2021-05-06 15:10:35', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2048, '设备分类导出', 2043, 5, '#', '', 1, 0, 'F', '0', '0', 'system:category:export', '#', 'admin', '2021-05-06 15:10:35', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2049, '设备列表', 2000, 11, 'device', 'system/device/index', 1, 0, 'C', '0', '0', 'system:device:list', 'device', 'admin', '2021-05-06 15:10:50', 'admin', '2021-05-18 09:33:08', '设备菜单'); -INSERT INTO `sys_menu` VALUES (2050, '设备查询', 2049, 1, '#', '', 1, 0, 'F', '0', '0', 'system:device:query', '#', 'admin', '2021-05-06 15:10:50', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2051, '设备新增', 2049, 2, '#', '', 1, 0, 'F', '0', '0', 'system:device:add', '#', 'admin', '2021-05-06 15:10:50', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2052, '设备修改', 2049, 3, '#', '', 1, 0, 'F', '0', '0', 'system:device:edit', '#', 'admin', '2021-05-06 15:10:50', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2053, '设备删除', 2049, 4, '#', '', 1, 0, 'F', '0', '0', 'system:device:remove', '#', 'admin', '2021-05-06 15:10:50', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2054, '设备导出', 2049, 5, '#', '', 1, 0, 'F', '0', '0', 'system:device:export', '#', 'admin', '2021-05-06 15:10:50', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2055, '配置日志', 2000, 13, 'set', 'system/set/index', 1, 0, 'C', '0', '0', 'system:set:list', 'config', 'admin', '2021-05-06 15:11:09', 'admin', '2021-05-26 14:54:24', '设备配置菜单'); -INSERT INTO `sys_menu` VALUES (2056, '设备配置查询', 2055, 1, '#', '', 1, 0, 'F', '0', '0', 'system:set:query', '#', 'admin', '2021-05-06 15:11:09', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2057, '设备配置新增', 2055, 2, '#', '', 1, 0, 'F', '0', '0', 'system:set:add', '#', 'admin', '2021-05-06 15:11:09', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2058, '设备配置修改', 2055, 3, '#', '', 1, 0, 'F', '0', '0', 'system:set:edit', '#', 'admin', '2021-05-06 15:11:09', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2059, '设备配置删除', 2055, 4, '#', '', 1, 0, 'F', '0', '0', 'system:set:remove', '#', 'admin', '2021-05-06 15:11:09', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2060, '设备配置导出', 2055, 5, '#', '', 1, 0, 'F', '0', '0', 'system:set:export', '#', 'admin', '2021-05-06 15:11:09', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2061, '状态日志', 2000, 12, 'status', 'system/status/index', 1, 0, 'C', '0', '0', 'system:status:list', 'status', 'admin', '2021-05-06 15:11:19', 'admin', '2021-05-26 14:54:38', '设备状态菜单'); -INSERT INTO `sys_menu` VALUES (2062, '设备状态查询', 2061, 1, '#', '', 1, 0, 'F', '0', '0', 'system:status:query', '#', 'admin', '2021-05-06 15:11:19', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2063, '设备状态新增', 2061, 2, '#', '', 1, 0, 'F', '0', '0', 'system:status:add', '#', 'admin', '2021-05-06 15:11:19', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2064, '设备状态修改', 2061, 3, '#', '', 1, 0, 'F', '0', '0', 'system:status:edit', '#', 'admin', '2021-05-06 15:11:19', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2065, '设备状态删除', 2061, 4, '#', '', 1, 0, 'F', '0', '0', 'system:status:remove', '#', 'admin', '2021-05-06 15:11:19', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2066, '设备状态导出', 2061, 5, '#', '', 1, 0, 'F', '0', '0', 'system:status:export', '#', 'admin', '2021-05-06 15:11:19', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2067, '设备分组', 2000, 1, 'group', 'system/group/index', 1, 0, 'C', '0', '0', 'system:group:list', 'group', 'admin', '2021-05-18 08:15:31', 'admin', '2021-05-18 09:40:59', '分组菜单'); -INSERT INTO `sys_menu` VALUES (2068, '分组查询', 2067, 1, '#', '', 1, 0, 'F', '0', '0', 'system:group:query', '#', 'admin', '2021-05-18 08:15:31', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2069, '分组新增', 2067, 2, '#', '', 1, 0, 'F', '0', '0', 'system:group:add', '#', 'admin', '2021-05-18 08:15:31', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2070, '分组修改', 2067, 3, '#', '', 1, 0, 'F', '0', '0', 'system:group:edit', '#', 'admin', '2021-05-18 08:15:31', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2071, '分组删除', 2067, 4, '#', '', 1, 0, 'F', '0', '0', 'system:group:remove', '#', 'admin', '2021-05-18 08:15:31', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2072, '分组导出', 2067, 5, '#', '', 1, 0, 'F', '0', '0', 'system:group:export', '#', 'admin', '2021-05-18 08:15:31', '', NULL, ''); -INSERT INTO `sys_menu` VALUES (2073, 'EMQ管理', 2000, 14, 'http://localhost:18083/#/login?redirect=%2F', NULL, 0, 0, 'C', '0', '0', '', 'mqtt', 'admin', '2021-05-26 14:53:48', 'admin', '2021-05-27 16:11:27', ''); - --- ---------------------------- --- Table structure for sys_notice --- ---------------------------- -DROP TABLE IF EXISTS `sys_notice`; -CREATE TABLE `sys_notice` ( - `notice_id` int(0) NOT NULL AUTO_INCREMENT COMMENT '公告ID', - `notice_title` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '公告标题', - `notice_type` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '公告类型(1通知 2公告)', - `notice_content` longblob NULL COMMENT '公告内容', - `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '公告状态(0正常 1关闭)', - `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`notice_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '通知公告表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_notice --- ---------------------------- -INSERT INTO `sys_notice` VALUES (1, '温馨提醒:2018-07-01 若依新版本发布啦', '2', 0xE696B0E78988E69CACE58685E5AEB9, '0', 'admin', '2021-05-18 02:23:07', '', NULL, '管理员'); -INSERT INTO `sys_notice` VALUES (2, '维护通知:2018-07-01 若依系统凌晨维护', '1', 0xE7BBB4E68AA4E58685E5AEB9, '0', 'admin', '2021-05-18 02:23:07', '', NULL, '管理员'); -INSERT INTO `sys_notice` VALUES (3, '111', '2', 0x3C703E3131313131313C2F703E, '0', 'admin', '2021-08-27 19:24:12', '', NULL, NULL); - --- ---------------------------- --- Table structure for sys_oper_log --- ---------------------------- -DROP TABLE IF EXISTS `sys_oper_log`; -CREATE TABLE `sys_oper_log` ( - `oper_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '日志主键', - `title` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '模块标题', - `business_type` int(0) NULL DEFAULT 0 COMMENT '业务类型(0其它 1新增 2修改 3删除)', - `method` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '方法名称', - `request_method` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '请求方式', - `operator_type` int(0) NULL DEFAULT 0 COMMENT '操作类别(0其它 1后台用户 2手机端用户)', - `oper_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '操作人员', - `dept_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '部门名称', - `oper_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '请求URL', - `oper_ip` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '主机地址', - `oper_location` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '操作地点', - `oper_param` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '请求参数', - `json_result` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '返回参数', - `status` int(0) NULL DEFAULT 0 COMMENT '操作状态(0正常 1异常)', - `error_msg` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '错误消息', - `oper_time` datetime(0) NULL DEFAULT NULL COMMENT '操作时间', - PRIMARY KEY (`oper_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2663 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '操作日志记录' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_oper_log --- ---------------------------- -INSERT INTO `sys_oper_log` VALUES (1873, '设备状态', 2, 'com.ruoyi.system.controller.IotDeviceStatusController.edit()', 'PUT', 1, 'admin', NULL, '/system/status', '172.17.0.1', '内网IP', '{\"deviceId\":1,\"deviceNum\":\"7CDFA1049ADA\",\"triggerSource\":1,\"relayStatus\":0,\"updateTime\":1625044821428,\"params\":{}}', '{\"msg\":\"mqtt 发布成功\",\"code\":200}', 0, NULL, '2021-06-30 17:20:21'); -INSERT INTO `sys_oper_log` VALUES (1874, '设备状态', 2, 'com.ruoyi.system.controller.IotDeviceStatusController.edit()', 'PUT', 1, 'admin', NULL, '/system/status', '172.17.0.1', '内网IP', '{\"deviceId\":1,\"deviceNum\":\"7CDFA1049ADA\",\"triggerSource\":1,\"relayStatus\":1,\"updateTime\":1625044822177,\"params\":{}}', '{\"msg\":\"mqtt 发布成功\",\"code\":200}', 0, NULL, '2021-06-30 17:20:22'); -INSERT INTO `sys_oper_log` VALUES (1875, '设备状态', 2, 'com.ruoyi.system.controller.IotDeviceStatusController.edit()', 'PUT', 1, 'admin', NULL, '/system/status', '172.17.0.1', '内网IP', '{\"lightStatus\":0,\"deviceId\":1,\"deviceNum\":\"7CDFA1049ADA\",\"triggerSource\":1,\"updateTime\":1625044822998,\"params\":{}}', '{\"msg\":\"mqtt 发布成功\",\"code\":200}', 0, NULL, '2021-06-30 17:20:23'); -INSERT INTO `sys_oper_log` VALUES (1876, '设备状态', 2, 'com.ruoyi.system.controller.IotDeviceStatusController.edit()', 'PUT', 1, 'admin', NULL, '/system/status', '172.17.0.1', '内网IP', '{\"lightStatus\":1,\"deviceId\":1,\"deviceNum\":\"7CDFA1049ADA\",\"triggerSource\":1,\"updateTime\":1625044823902,\"params\":{}}', '{\"msg\":\"mqtt 发布成功\",\"code\":200}', 0, NULL, '2021-06-30 17:20:23'); -INSERT INTO `sys_oper_log` VALUES (1877, '代码生成', 6, 'com.ruoyi.generator.controller.GenController.importTableSave()', 'POST', 1, 'admin', NULL, '/tool/gen/importTable', '222.95.162.245', 'XX XX', 't_user_account_info,t_user_login_log', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 14:45:29'); -INSERT INTO `sys_oper_log` VALUES (1878, '代码生成', 8, 'com.ruoyi.generator.controller.GenController.batchGenCode()', 'GET', 1, 'admin', NULL, '/tool/gen/batchGenCode', '222.95.162.245', 'XX XX', '{}', 'null', 0, NULL, '2021-08-26 14:45:39'); -INSERT INTO `sys_oper_log` VALUES (1879, '代码生成', 6, 'com.ruoyi.generator.controller.GenController.importTableSave()', 'POST', 1, 'admin', NULL, '/tool/gen/importTable', '222.95.162.245', 'XX XX', 'sys_user', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 17:07:45'); -INSERT INTO `sys_oper_log` VALUES (1880, '角色管理', 1, 'com.ruoyi.web.controller.system.SysRoleController.add()', 'POST', 1, 'admin', NULL, '/system/role', '222.95.162.245', 'XX XX', '{\"flag\":false,\"roleId\":101,\"admin\":false,\"params\":{},\"roleSort\":\"3\",\"deptCheckStrictly\":true,\"createBy\":\"admin\",\"menuCheckStrictly\":true,\"roleKey\":\"mp\",\"roleName\":\"小程序用户\",\"deptIds\":[],\"menuIds\":[2000,2067,2068,2069,2070,2071,2072,2043,2044,2045,2046,2047,2048,2049,2050,2051,2052,2053,2054,2061,2062,2063,2064,2065,2066,2055,2056,2057,2058,2059,2060,2073],\"status\":\"0\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 17:26:52'); -INSERT INTO `sys_oper_log` VALUES (1881, '角色管理', 2, 'com.ruoyi.web.controller.system.SysRoleController.edit()', 'PUT', 1, 'admin', NULL, '/system/role', '222.95.162.245', 'XX XX', '{\"flag\":false,\"roleId\":100,\"admin\":false,\"dataScope\":\"1\",\"delFlag\":\"0\",\"params\":{},\"roleSort\":\"8\",\"deptCheckStrictly\":true,\"createTime\":1622248952000,\"updateBy\":\"admin\",\"menuCheckStrictly\":true,\"roleKey\":\"visitor\",\"roleName\":\"游客角色\",\"menuIds\":[2000,2067,2043,2049,2061,2055,1,100,101,102,103,104,105,106,107,108,500,501,2,109,110,3,115,2068,2044,2050,2062,2056,2073,1001,1008,1013,1017,1021,1026,1031,1036,1040,1043,1046,1049,1055,116,4],\"status\":\"0\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 17:27:06'); -INSERT INTO `sys_oper_log` VALUES (1882, '用户管理', 1, 'com.ruoyi.web.controller.system.SysUserController.add()', 'POST', 1, 'admin', NULL, '/system/user', '222.95.162.245', 'XX XX', '{\"admin\":false,\"password\":\"$2a$10$f.KtWGpaUsdvl2E427/H4OnPi2dYx8HetxnBs1uasSNwCBBUDSwjO\",\"postIds\":[],\"nickName\":\"xxx\",\"params\":{},\"userName\":\"aaa\",\"userId\":101,\"createBy\":\"admin\",\"roleIds\":[101],\"status\":\"0\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 17:28:35'); -INSERT INTO `sys_oper_log` VALUES (1883, '设备状态', 1, 'com.ruoyi.system.controller.IotDeviceStatusController.add()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/status', '180.111.206.137', 'XX XX', '{\"params\":{},\"createTime\":1629974211324}', 'null', 1, '\r\n### Error updating database. Cause: java.sql.SQLException: Field \'device_num\' doesn\'t have a default value\r\n### The error may exist in file [D:\\codes\\IdeaProjects\\wumei-smart-master\\spring-boot\\ruoyi-system\\target\\classes\\mapper\\system\\IotDeviceStatusMapper.xml]\r\n### The error may involve com.ruoyi.system.mapper.IotDeviceStatusMapper.insertIotDeviceStatus-Inline\r\n### The error occurred while setting parameters\r\n### SQL: insert into iot_device_status ( create_time ) values ( ? )\r\n### Cause: java.sql.SQLException: Field \'device_num\' doesn\'t have a default value\n; Field \'device_num\' doesn\'t have a default value; nested exception is java.sql.SQLException: Field \'device_num\' doesn\'t have a default value', '2021-08-26 18:36:50'); -INSERT INTO `sys_oper_log` VALUES (1884, '设备状态', 1, 'com.ruoyi.system.controller.IotDeviceStatusController.add()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/status', '180.111.206.137', 'XX XX', '{\"lightMode\":0,\"isOnline\":1,\"lightStatus\":0,\"deviceId\":1,\"deviceNum\":\"7CDFA1049ADA\",\"red\":255,\"updateBy\":\"\",\"airHumidity\":0,\"triggerSource\":0,\"lightInterval\":432,\"rssi\":-80,\"green\":254,\"deviceTemperature\":36.52,\"relayStatus\":1,\"fadeTime\":259,\"params\":{},\"createBy\":\"\",\"airTemperature\":0,\"brightness\":100,\"blue\":241,\"createTime\":1629974291015,\"deviceStatusId\":2846}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 18:38:09'); -INSERT INTO `sys_oper_log` VALUES (1885, '设备状态', 1, 'com.ruoyi.system.controller.IotDeviceStatusController.add()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/status', '180.111.206.137', 'XX XX', '{\"lightMode\":0,\"isOnline\":1,\"lightStatus\":1,\"deviceId\":1,\"deviceNum\":\"7CDFA1049ADA\",\"red\":255,\"updateBy\":\"\",\"airHumidity\":0,\"triggerSource\":0,\"lightInterval\":432,\"rssi\":-80,\"green\":254,\"deviceTemperature\":36.52,\"relayStatus\":1,\"fadeTime\":259,\"params\":{},\"createBy\":\"\",\"airTemperature\":0,\"brightness\":100,\"blue\":241,\"createTime\":1629974292396,\"deviceStatusId\":2847}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 18:38:11'); -INSERT INTO `sys_oper_log` VALUES (1886, '设备状态', 1, 'com.ruoyi.system.controller.IotDeviceStatusController.add()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/status', '180.111.206.137', 'XX XX', '{\"lightMode\":0,\"isOnline\":1,\"lightStatus\":0,\"deviceId\":1,\"deviceNum\":\"7CDFA1049ADA\",\"red\":255,\"updateBy\":\"\",\"airHumidity\":0,\"triggerSource\":0,\"lightInterval\":432,\"rssi\":-80,\"green\":254,\"deviceTemperature\":36.52,\"relayStatus\":1,\"fadeTime\":259,\"params\":{},\"createBy\":\"\",\"airTemperature\":0,\"brightness\":100,\"blue\":241,\"createTime\":1629974293231,\"deviceStatusId\":2848}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 18:38:12'); -INSERT INTO `sys_oper_log` VALUES (1887, '设备状态', 1, 'com.ruoyi.system.controller.IotDeviceStatusController.add()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/status', '180.111.206.137', 'XX XX', '{\"lightMode\":0,\"isOnline\":1,\"lightStatus\":1,\"deviceId\":1,\"deviceNum\":\"7CDFA1049ADA\",\"red\":255,\"updateBy\":\"\",\"airHumidity\":0,\"triggerSource\":0,\"lightInterval\":432,\"rssi\":-80,\"green\":254,\"deviceTemperature\":36.52,\"relayStatus\":1,\"fadeTime\":259,\"params\":{},\"createBy\":\"\",\"airTemperature\":0,\"brightness\":100,\"blue\":241,\"createTime\":1629974297356,\"deviceStatusId\":2849}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 18:38:16'); -INSERT INTO `sys_oper_log` VALUES (1888, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.control()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/control', '222.95.162.245', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADC\",\"cmd\":\"on\"}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 18:56:26'); -INSERT INTO `sys_oper_log` VALUES (1889, '设备状态', 1, 'com.ruoyi.system.controller.IotDeviceStatusController.add()', 'POST', 1, 'EB5312FB4A26', NULL, '/system/status', '180.111.206.137', 'XX XX', '{\"deviceNum\":\"7CDFA1049ADA\",\"params\":{},\"createTime\":1629976059277,\"deviceStatusId\":2850}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-26 19:07:38'); -INSERT INTO `sys_oper_log` VALUES (1948, '代码生成', 6, 'com.ruoyi.generator.controller.GenController.importTableSave()', 'POST', 1, 'admin', NULL, '/tool/gen/importTable', '222.95.162.245', 'XX XX', 'iot_device_user_relation', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 11:55:06'); -INSERT INTO `sys_oper_log` VALUES (1949, '代码生成', 8, 'com.ruoyi.generator.controller.GenController.batchGenCode()', 'GET', 1, 'admin', NULL, '/tool/gen/batchGenCode', '222.95.162.245', 'XX XX', '{}', 'null', 0, NULL, '2021-08-27 11:55:34'); -INSERT INTO `sys_oper_log` VALUES (1950, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/bindDevice', '222.95.162.245', 'XX XX', '{\"remark\":\"remark\",\"params\":{},\"deviceName\":\"设备名称\",\"deviceNum\":\"7CDFA1049ADC\",\"categoryId\":1}', 'null', 1, '', '2021-08-27 13:36:40'); -INSERT INTO `sys_oper_log` VALUES (1951, '设备', 2, 'com.ruoyi.system.controller.IotDeviceController.bindDevice()', 'POST', 1, 'A1BB9722086A', NULL, '/system/device/bindDevice', '222.95.162.245', 'XX XX', '{\"remark\":\"remark\",\"params\":{},\"deviceName\":\"设备名称\",\"deviceNum\":\"7CDFA1049ADC\",\"categoryId\":1}', '{\"msg\":\"操作失败\",\"code\":500}', 0, NULL, '2021-08-27 13:40:21'); -INSERT INTO `sys_oper_log` VALUES (1952, '代码生成', 8, 'com.ruoyi.generator.controller.GenController.batchGenCode()', 'GET', 1, 'admin', NULL, '/tool/gen/batchGenCode', '222.95.162.245', 'XX XX', '{}', 'null', 0, NULL, '2021-08-27 13:44:37'); -INSERT INTO `sys_oper_log` VALUES (1953, '代码生成', 3, 'com.ruoyi.generator.controller.GenController.remove()', 'DELETE', 1, 'admin', NULL, '/tool/gen/13', '222.95.162.245', 'XX XX', '{tableIds=13}', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 13:45:30'); -INSERT INTO `sys_oper_log` VALUES (1954, '代码生成', 6, 'com.ruoyi.generator.controller.GenController.importTableSave()', 'POST', 1, 'admin', NULL, '/tool/gen/importTable', '222.95.162.245', 'XX XX', 'iot_device', '{\"msg\":\"操作成功\",\"code\":200}', 0, NULL, '2021-08-27 13:45:40'); - --- ---------------------------- --- Table structure for sys_post --- ---------------------------- -DROP TABLE IF EXISTS `sys_post`; -CREATE TABLE `sys_post` ( - `post_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '岗位ID', - `post_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '岗位编码', - `post_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '岗位名称', - `post_sort` int(0) NOT NULL COMMENT '显示顺序', - `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '状态(0正常 1停用)', - `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`post_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '岗位信息表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_post --- ---------------------------- -INSERT INTO `sys_post` VALUES (1, 'ceo', '董事长', 1, '0', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_post` VALUES (2, 'se', '项目经理', 2, '0', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_post` VALUES (3, 'hr', '人力资源', 3, '0', 'admin', '2021-05-18 02:23:06', '', NULL, ''); -INSERT INTO `sys_post` VALUES (4, 'user', '普通员工', 4, '0', 'admin', '2021-05-18 02:23:06', '', NULL, ''); - --- ---------------------------- --- Table structure for sys_role --- ---------------------------- -DROP TABLE IF EXISTS `sys_role`; -CREATE TABLE `sys_role` ( - `role_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '角色ID', - `role_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '角色名称', - `role_key` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '角色权限字符串', - `role_sort` int(0) NOT NULL COMMENT '显示顺序', - `data_scope` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '1' COMMENT '数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)', - `menu_check_strictly` tinyint(1) NULL DEFAULT 1 COMMENT '菜单树选择项是否关联显示', - `dept_check_strictly` tinyint(1) NULL DEFAULT 1 COMMENT '部门树选择项是否关联显示', - `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '角色状态(0正常 1停用)', - `del_flag` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '删除标志(0代表存在 2代表删除)', - `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`role_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 102 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色信息表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_role --- ---------------------------- -INSERT INTO `sys_role` VALUES (1, '超级管理员', 'admin', 1, '1', 1, 1, '0', '0', 'admin', '2021-05-18 02:23:06', '', NULL, '超级管理员'); -INSERT INTO `sys_role` VALUES (2, '普通角色', 'common', 2, '2', 1, 1, '0', '0', 'admin', '2021-05-18 02:23:06', '', NULL, '普通角色'); -INSERT INTO `sys_role` VALUES (100, '游客角色', 'visitor', 8, '1', 1, 1, '0', '0', 'admin', '2021-05-29 08:42:32', 'admin', '2021-08-26 17:27:05', NULL); -INSERT INTO `sys_role` VALUES (101, '小程序用户', 'mp', 3, '1', 1, 1, '0', '0', 'admin', '2021-08-26 17:26:52', '', NULL, NULL); - --- ---------------------------- --- Table structure for sys_role_dept --- ---------------------------- -DROP TABLE IF EXISTS `sys_role_dept`; -CREATE TABLE `sys_role_dept` ( - `role_id` bigint(0) NOT NULL COMMENT '角色ID', - `dept_id` bigint(0) NOT NULL COMMENT '部门ID', - PRIMARY KEY (`role_id`, `dept_id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色和部门关联表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_role_dept --- ---------------------------- -INSERT INTO `sys_role_dept` VALUES (2, 100); -INSERT INTO `sys_role_dept` VALUES (2, 101); -INSERT INTO `sys_role_dept` VALUES (2, 105); - --- ---------------------------- --- Table structure for sys_role_menu --- ---------------------------- -DROP TABLE IF EXISTS `sys_role_menu`; -CREATE TABLE `sys_role_menu` ( - `role_id` bigint(0) NOT NULL COMMENT '角色ID', - `menu_id` bigint(0) NOT NULL COMMENT '菜单ID', - PRIMARY KEY (`role_id`, `menu_id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色和菜单关联表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_role_menu --- ---------------------------- -INSERT INTO `sys_role_menu` VALUES (2, 1); -INSERT INTO `sys_role_menu` VALUES (2, 2); -INSERT INTO `sys_role_menu` VALUES (2, 3); -INSERT INTO `sys_role_menu` VALUES (2, 4); -INSERT INTO `sys_role_menu` VALUES (2, 100); -INSERT INTO `sys_role_menu` VALUES (2, 101); -INSERT INTO `sys_role_menu` VALUES (2, 102); -INSERT INTO `sys_role_menu` VALUES (2, 103); -INSERT INTO `sys_role_menu` VALUES (2, 104); -INSERT INTO `sys_role_menu` VALUES (2, 105); -INSERT INTO `sys_role_menu` VALUES (2, 106); -INSERT INTO `sys_role_menu` VALUES (2, 107); -INSERT INTO `sys_role_menu` VALUES (2, 108); -INSERT INTO `sys_role_menu` VALUES (2, 109); -INSERT INTO `sys_role_menu` VALUES (2, 110); -INSERT INTO `sys_role_menu` VALUES (2, 111); -INSERT INTO `sys_role_menu` VALUES (2, 112); -INSERT INTO `sys_role_menu` VALUES (2, 113); -INSERT INTO `sys_role_menu` VALUES (2, 114); -INSERT INTO `sys_role_menu` VALUES (2, 115); -INSERT INTO `sys_role_menu` VALUES (2, 116); -INSERT INTO `sys_role_menu` VALUES (2, 500); -INSERT INTO `sys_role_menu` VALUES (2, 501); -INSERT INTO `sys_role_menu` VALUES (2, 1000); -INSERT INTO `sys_role_menu` VALUES (2, 1001); -INSERT INTO `sys_role_menu` VALUES (2, 1002); -INSERT INTO `sys_role_menu` VALUES (2, 1003); -INSERT INTO `sys_role_menu` VALUES (2, 1004); -INSERT INTO `sys_role_menu` VALUES (2, 1005); -INSERT INTO `sys_role_menu` VALUES (2, 1006); -INSERT INTO `sys_role_menu` VALUES (2, 1007); -INSERT INTO `sys_role_menu` VALUES (2, 1008); -INSERT INTO `sys_role_menu` VALUES (2, 1009); -INSERT INTO `sys_role_menu` VALUES (2, 1010); -INSERT INTO `sys_role_menu` VALUES (2, 1011); -INSERT INTO `sys_role_menu` VALUES (2, 1012); -INSERT INTO `sys_role_menu` VALUES (2, 1013); -INSERT INTO `sys_role_menu` VALUES (2, 1014); -INSERT INTO `sys_role_menu` VALUES (2, 1015); -INSERT INTO `sys_role_menu` VALUES (2, 1016); -INSERT INTO `sys_role_menu` VALUES (2, 1017); -INSERT INTO `sys_role_menu` VALUES (2, 1018); -INSERT INTO `sys_role_menu` VALUES (2, 1019); -INSERT INTO `sys_role_menu` VALUES (2, 1020); -INSERT INTO `sys_role_menu` VALUES (2, 1021); -INSERT INTO `sys_role_menu` VALUES (2, 1022); -INSERT INTO `sys_role_menu` VALUES (2, 1023); -INSERT INTO `sys_role_menu` VALUES (2, 1024); -INSERT INTO `sys_role_menu` VALUES (2, 1025); -INSERT INTO `sys_role_menu` VALUES (2, 1026); -INSERT INTO `sys_role_menu` VALUES (2, 1027); -INSERT INTO `sys_role_menu` VALUES (2, 1028); -INSERT INTO `sys_role_menu` VALUES (2, 1029); -INSERT INTO `sys_role_menu` VALUES (2, 1030); -INSERT INTO `sys_role_menu` VALUES (2, 1031); -INSERT INTO `sys_role_menu` VALUES (2, 1032); -INSERT INTO `sys_role_menu` VALUES (2, 1033); -INSERT INTO `sys_role_menu` VALUES (2, 1034); -INSERT INTO `sys_role_menu` VALUES (2, 1035); -INSERT INTO `sys_role_menu` VALUES (2, 1036); -INSERT INTO `sys_role_menu` VALUES (2, 1037); -INSERT INTO `sys_role_menu` VALUES (2, 1038); -INSERT INTO `sys_role_menu` VALUES (2, 1039); -INSERT INTO `sys_role_menu` VALUES (2, 1040); -INSERT INTO `sys_role_menu` VALUES (2, 1041); -INSERT INTO `sys_role_menu` VALUES (2, 1042); -INSERT INTO `sys_role_menu` VALUES (2, 1043); -INSERT INTO `sys_role_menu` VALUES (2, 1044); -INSERT INTO `sys_role_menu` VALUES (2, 1045); -INSERT INTO `sys_role_menu` VALUES (2, 1046); -INSERT INTO `sys_role_menu` VALUES (2, 1047); -INSERT INTO `sys_role_menu` VALUES (2, 1048); -INSERT INTO `sys_role_menu` VALUES (2, 1049); -INSERT INTO `sys_role_menu` VALUES (2, 1050); -INSERT INTO `sys_role_menu` VALUES (2, 1051); -INSERT INTO `sys_role_menu` VALUES (2, 1052); -INSERT INTO `sys_role_menu` VALUES (2, 1053); -INSERT INTO `sys_role_menu` VALUES (2, 1054); -INSERT INTO `sys_role_menu` VALUES (2, 1055); -INSERT INTO `sys_role_menu` VALUES (2, 1056); -INSERT INTO `sys_role_menu` VALUES (2, 1057); -INSERT INTO `sys_role_menu` VALUES (2, 1058); -INSERT INTO `sys_role_menu` VALUES (2, 1059); -INSERT INTO `sys_role_menu` VALUES (2, 1060); -INSERT INTO `sys_role_menu` VALUES (100, 1); -INSERT INTO `sys_role_menu` VALUES (100, 2); -INSERT INTO `sys_role_menu` VALUES (100, 3); -INSERT INTO `sys_role_menu` VALUES (100, 4); -INSERT INTO `sys_role_menu` VALUES (100, 100); -INSERT INTO `sys_role_menu` VALUES (100, 101); -INSERT INTO `sys_role_menu` VALUES (100, 102); -INSERT INTO `sys_role_menu` VALUES (100, 103); -INSERT INTO `sys_role_menu` VALUES (100, 104); -INSERT INTO `sys_role_menu` VALUES (100, 105); -INSERT INTO `sys_role_menu` VALUES (100, 106); -INSERT INTO `sys_role_menu` VALUES (100, 107); -INSERT INTO `sys_role_menu` VALUES (100, 108); -INSERT INTO `sys_role_menu` VALUES (100, 109); -INSERT INTO `sys_role_menu` VALUES (100, 110); -INSERT INTO `sys_role_menu` VALUES (100, 115); -INSERT INTO `sys_role_menu` VALUES (100, 116); -INSERT INTO `sys_role_menu` VALUES (100, 500); -INSERT INTO `sys_role_menu` VALUES (100, 501); -INSERT INTO `sys_role_menu` VALUES (100, 1001); -INSERT INTO `sys_role_menu` VALUES (100, 1008); -INSERT INTO `sys_role_menu` VALUES (100, 1013); -INSERT INTO `sys_role_menu` VALUES (100, 1017); -INSERT INTO `sys_role_menu` VALUES (100, 1021); -INSERT INTO `sys_role_menu` VALUES (100, 1026); -INSERT INTO `sys_role_menu` VALUES (100, 1031); -INSERT INTO `sys_role_menu` VALUES (100, 1036); -INSERT INTO `sys_role_menu` VALUES (100, 1040); -INSERT INTO `sys_role_menu` VALUES (100, 1043); -INSERT INTO `sys_role_menu` VALUES (100, 1046); -INSERT INTO `sys_role_menu` VALUES (100, 1049); -INSERT INTO `sys_role_menu` VALUES (100, 1055); -INSERT INTO `sys_role_menu` VALUES (100, 2000); -INSERT INTO `sys_role_menu` VALUES (100, 2043); -INSERT INTO `sys_role_menu` VALUES (100, 2044); -INSERT INTO `sys_role_menu` VALUES (100, 2049); -INSERT INTO `sys_role_menu` VALUES (100, 2050); -INSERT INTO `sys_role_menu` VALUES (100, 2055); -INSERT INTO `sys_role_menu` VALUES (100, 2056); -INSERT INTO `sys_role_menu` VALUES (100, 2061); -INSERT INTO `sys_role_menu` VALUES (100, 2062); -INSERT INTO `sys_role_menu` VALUES (100, 2067); -INSERT INTO `sys_role_menu` VALUES (100, 2068); -INSERT INTO `sys_role_menu` VALUES (100, 2073); -INSERT INTO `sys_role_menu` VALUES (101, 2000); -INSERT INTO `sys_role_menu` VALUES (101, 2043); -INSERT INTO `sys_role_menu` VALUES (101, 2044); -INSERT INTO `sys_role_menu` VALUES (101, 2045); -INSERT INTO `sys_role_menu` VALUES (101, 2046); -INSERT INTO `sys_role_menu` VALUES (101, 2047); -INSERT INTO `sys_role_menu` VALUES (101, 2048); -INSERT INTO `sys_role_menu` VALUES (101, 2049); -INSERT INTO `sys_role_menu` VALUES (101, 2050); -INSERT INTO `sys_role_menu` VALUES (101, 2051); -INSERT INTO `sys_role_menu` VALUES (101, 2052); -INSERT INTO `sys_role_menu` VALUES (101, 2053); -INSERT INTO `sys_role_menu` VALUES (101, 2054); -INSERT INTO `sys_role_menu` VALUES (101, 2055); -INSERT INTO `sys_role_menu` VALUES (101, 2056); -INSERT INTO `sys_role_menu` VALUES (101, 2057); -INSERT INTO `sys_role_menu` VALUES (101, 2058); -INSERT INTO `sys_role_menu` VALUES (101, 2059); -INSERT INTO `sys_role_menu` VALUES (101, 2060); -INSERT INTO `sys_role_menu` VALUES (101, 2061); -INSERT INTO `sys_role_menu` VALUES (101, 2062); -INSERT INTO `sys_role_menu` VALUES (101, 2063); -INSERT INTO `sys_role_menu` VALUES (101, 2064); -INSERT INTO `sys_role_menu` VALUES (101, 2065); -INSERT INTO `sys_role_menu` VALUES (101, 2066); -INSERT INTO `sys_role_menu` VALUES (101, 2067); -INSERT INTO `sys_role_menu` VALUES (101, 2068); -INSERT INTO `sys_role_menu` VALUES (101, 2069); -INSERT INTO `sys_role_menu` VALUES (101, 2070); -INSERT INTO `sys_role_menu` VALUES (101, 2071); -INSERT INTO `sys_role_menu` VALUES (101, 2072); -INSERT INTO `sys_role_menu` VALUES (101, 2073); - --- ---------------------------- --- Table structure for sys_user --- ---------------------------- -DROP TABLE IF EXISTS `sys_user`; -CREATE TABLE `sys_user` ( - `user_id` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '用户ID', - `dept_id` bigint(0) NULL DEFAULT NULL COMMENT '部门ID', - `open_id` varchar(40) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户OpenId', - `user_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户账号', - `nick_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户昵称', - `user_type` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '00' COMMENT '用户类型(00系统用户)', - `email` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '用户邮箱', - `phonenumber` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '手机号码', - `sex` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '用户性别(0男 1女 2未知)', - `avatar` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '头像地址', - `password` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '密码', - `status` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '帐号状态(0正常 1停用)', - `del_flag` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '删除标志(0代表存在 2代表删除)', - `login_ip` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '最后登录IP', - `login_date` datetime(0) NULL DEFAULT NULL COMMENT '最后登录时间', - `create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', - `update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', - `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`user_id`) USING BTREE, - UNIQUE INDEX `open_id`(`open_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 117 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户信息表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_user --- ---------------------------- -INSERT INTO `sys_user` VALUES (1, 103, NULL, 'admin', '物美智能', '00', '164770707@qq.com', '15888888888', '1', '', '$2a$10$PXtk.97BgFUAK/7lpmxZ4eNPS6zL0VVHR7g.sjrdG5XUiX7pfGaRa', '0', '0', '127.0.0.1', '2021-05-18 02:23:06', 'admin', '2021-05-18 02:23:06', '', NULL, '管理员'); -INSERT INTO `sys_user` VALUES (2, 105, NULL, 'wumei', '物美智能', '00', 'admin@wumei.com', '15666666666', '1', '', '$2a$10$uLlHqgW4b5oAqoS81Rhkk.7Tf6wnGvh9FE9V160Dv2Kn9doOrB4qe', '0', '0', '127.0.0.1', '2021-05-18 02:23:06', 'admin', '2021-05-18 02:23:06', 'admin', '2021-06-19 09:31:14', '测试员'); -INSERT INTO `sys_user` VALUES (100, NULL, NULL, 'public', '访客', '00', '', '', '0', '', '$2a$10$E8d4gZ3.QQzDE7LBfY7XpuuGX.LvWFcA982AAdAzk24u91bQ1nete', '0', '0', '', NULL, 'admin', '2021-05-29 08:37:36', 'admin', '2021-06-19 09:31:20', NULL); -INSERT INTO `sys_user` VALUES (101, NULL, NULL, 'aaa', 'xxx', '00', '', '', '0', '', '$2a$10$f.KtWGpaUsdvl2E427/H4OnPi2dYx8HetxnBs1uasSNwCBBUDSwjO', '0', '0', '', NULL, 'admin', '2021-08-26 17:28:34', '', NULL, NULL); -INSERT INTO `sys_user` VALUES (114, NULL, 'oRHbg4lwGVJYu7GjfVwRv6pYygzQ', 'EB5312FB4A26', '微信注册用户', '00', '', '', '0', '', '$2a$10$iWySi4cYQ.0DFSMFCzofbu1H13Dd03WW7h/0OZPzQcBd.7f1fWjV.', '0', '0', '', NULL, '微信小程序', '2021-08-26 18:06:16', '', NULL, NULL); -INSERT INTO `sys_user` VALUES (115, NULL, 'oRHbg4mTdANmQwDhuQAD8vBbkNG0', 'A1BB9722086A', '微信注册用户', '00', '', '', '0', '', '$2a$10$rAoFt5nuPw/2CXhRsa/uoOjExW0XH3xM009kcWWo12rzFiSgIK.n2', '0', '0', '', NULL, '微信小程序', '2021-08-26 18:41:21', '', NULL, NULL); -INSERT INTO `sys_user` VALUES (116, NULL, 'oRHbg4kHhyFV8DPX-wpGREyjfQsM', '6F1B3F33DD38', '微信注册用户', '00', '', '', '0', '', '$2a$10$SUR7vd7YIiMkFBFSTKba7uTc5FdpAdwyMuzUsUpMjkgTC0NfiRpqK', '0', '0', '', NULL, '微信小程序', '2021-08-31 14:47:58', '', NULL, NULL); - --- ---------------------------- --- Table structure for sys_user_post --- ---------------------------- -DROP TABLE IF EXISTS `sys_user_post`; -CREATE TABLE `sys_user_post` ( - `user_id` bigint(0) NOT NULL COMMENT '用户ID', - `post_id` bigint(0) NOT NULL COMMENT '岗位ID', - PRIMARY KEY (`user_id`, `post_id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户与岗位关联表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_user_post --- ---------------------------- -INSERT INTO `sys_user_post` VALUES (1, 1); -INSERT INTO `sys_user_post` VALUES (2, 2); - --- ---------------------------- --- Table structure for sys_user_role --- ---------------------------- -DROP TABLE IF EXISTS `sys_user_role`; -CREATE TABLE `sys_user_role` ( - `user_id` bigint(0) NOT NULL COMMENT '用户ID', - `role_id` bigint(0) NOT NULL COMMENT '角色ID', - PRIMARY KEY (`user_id`, `role_id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户和角色关联表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of sys_user_role --- ---------------------------- -INSERT INTO `sys_user_role` VALUES (1, 1); -INSERT INTO `sys_user_role` VALUES (2, 100); -INSERT INTO `sys_user_role` VALUES (100, 100); -INSERT INTO `sys_user_role` VALUES (101, 101); - --- ---------------------------- --- Table structure for t_user_account_info --- ---------------------------- -DROP TABLE IF EXISTS `t_user_account_info`; -CREATE TABLE `t_user_account_info` ( - `id` int(0) NOT NULL AUTO_INCREMENT, - `sessionKey` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT 'sessionKey', - `access_token` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT 'accessToken', - `open_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, - `union_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL, - `nick_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '昵称', - `avatar` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '头像', - `phone` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '手机号', - `birthday` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '生日', - `status` int(0) NOT NULL DEFAULT 1 COMMENT '用户状态:0-冻结,1-正常', - `country` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '国家', - `province` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '省份', - `city` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '城市', - `address` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '地址', - `user_type` int(0) NOT NULL DEFAULT 0 COMMENT '用户类型:0-未授权用户,1-消费者,2-商家', - `admin_id` int(0) NULL DEFAULT NULL COMMENT '绑定的管理员编号', - `last_login_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `last_login_ip` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL, - `gmt_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `gmt_update` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0), - PRIMARY KEY (`id`) USING BTREE, - UNIQUE INDEX `open_id`(`open_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 200030 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci COMMENT = '小程序用户表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of t_user_account_info --- ---------------------------- -INSERT INTO `t_user_account_info` VALUES (200029, 'wd4/hPuBQ+ummo/NOv1Rsw==', 'ced50c3733424484becfa6a68e4066fc', 'oRHbg4mTdANmQwDhuQAD8vBbkNG0', NULL, '新注册用户', 'https://c-ssl.duitang.com/uploads/item/201912/27/20191227145714_rtHRc.thumb.1000_0.jpeg', NULL, NULL, 0, NULL, NULL, NULL, NULL, 0, NULL, '2021-08-26 17:02:10', '127.0.0.1', '2021-08-26 16:30:57', '2021-08-26 17:02:08'); - --- ---------------------------- --- Table structure for t_user_login_log --- ---------------------------- -DROP TABLE IF EXISTS `t_user_login_log`; -CREATE TABLE `t_user_login_log` ( - `id` int(0) NOT NULL AUTO_INCREMENT, - `user_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '用户类型', - `user_id` int(0) NOT NULL, - `code` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, - `open_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, - `ip` varchar(30) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT 'IP地址', - `gmt_time` timestamp(0) NULL DEFAULT CURRENT_TIMESTAMP(0), - `gmt_update` timestamp(0) NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0), - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1725 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci ROW_FORMAT = Dynamic; - --- ---------------------------- --- Records of t_user_login_log --- ---------------------------- -INSERT INTO `t_user_login_log` VALUES (1718, '未授权用户', 200029, '023mpv0w3w8VXW22mg2w34Vlyj3mpv01', 'oRHbg4mTdANmQwDhuQAD8vBbkNG0', '127.0.0.1', '2021-08-26 16:30:57', NULL); -INSERT INTO `t_user_login_log` VALUES (1719, '未授权用户', 200029, '083hBWkl269zD74Ioxol2Rqaaq0hBWkA', 'oRHbg4mTdANmQwDhuQAD8vBbkNG0', '127.0.0.1', '2021-08-26 16:56:12', NULL); -INSERT INTO `t_user_login_log` VALUES (1720, '未授权用户', 200029, '073d93000npdjM15qS100TtVyj3d930s', 'oRHbg4mTdANmQwDhuQAD8vBbkNG0', '127.0.0.1', '2021-08-26 16:59:18', NULL); -INSERT INTO `t_user_login_log` VALUES (1721, '未授权用户', 200029, '053NjS000cfoiM1siM300P1HhV1NjS0W', 'oRHbg4mTdANmQwDhuQAD8vBbkNG0', '127.0.0.1', '2021-08-26 16:59:42', NULL); -INSERT INTO `t_user_login_log` VALUES (1722, '未授权用户', 200029, '043nlS000U9niM1a6I0007YZCb3nlS0u', 'oRHbg4mTdANmQwDhuQAD8vBbkNG0', '127.0.0.1', '2021-08-26 17:00:07', NULL); -INSERT INTO `t_user_login_log` VALUES (1723, '未授权用户', 200029, '0039Zull2tOZC74R3Pnl2Hpg8l49Zul1', 'oRHbg4mTdANmQwDhuQAD8vBbkNG0', '127.0.0.1', '2021-08-26 17:00:51', NULL); -INSERT INTO `t_user_login_log` VALUES (1724, '未授权用户', 200029, '013pCmFa1E5TDB0fpIIa138qab2pCmFl', 'oRHbg4mTdANmQwDhuQAD8vBbkNG0', '127.0.0.1', '2021-08-26 17:02:08', NULL); - -SET FOREIGN_KEY_CHECKS = 1;