commit ee5c36469d5a2b565a5f9ea836c2c8e2ca2dd645 Author: walker-sheng Date: Thu Nov 19 10:05:24 2020 +0800 轨道交通项目迁出 diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..549e00a2a --- /dev/null +++ b/.gitignore @@ -0,0 +1,33 @@ +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/.mvn/wrapper/MavenWrapperDownloader.java b/.mvn/wrapper/MavenWrapperDownloader.java new file mode 100644 index 000000000..e76d1f324 --- /dev/null +++ b/.mvn/wrapper/MavenWrapperDownloader.java @@ -0,0 +1,117 @@ +/* + * 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/.mvn/wrapper/maven-wrapper.jar b/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 000000000..2cc7d4a55 Binary files /dev/null and b/.mvn/wrapper/maven-wrapper.jar differ diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 000000000..642d572ce --- /dev/null +++ b/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,2 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-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/mvnw b/mvnw new file mode 100644 index 000000000..a16b5431b --- /dev/null +++ b/mvnw @@ -0,0 +1,310 @@ +#!/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/mvnw.cmd b/mvnw.cmd new file mode 100644 index 000000000..c8d43372c --- /dev/null +++ b/mvnw.cmd @@ -0,0 +1,182 @@ +@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/pom.xml b/pom.xml new file mode 100644 index 000000000..a2b71cd3f --- /dev/null +++ b/pom.xml @@ -0,0 +1,112 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.3.5.RELEASE + + + club.joylink + rtss + 0.0.1-SNAPSHOT + rtss + Rail transit simulation system + + + 11 + 4.1.1 + + + + + org.springframework.boot + spring-boot-starter-mail + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-websocket + + + org.mybatis.spring.boot + mybatis-spring-boot-starter + 2.1.3 + + + com.github.pagehelper + pagehelper-spring-boot-starter + 1.3.0 + + + + + javax.validation + validation-api + + + + + org.springframework.boot + spring-boot-starter-aop + + + + + io.springfox + springfox-swagger2 + 3.0.0 + + + io.springfox + springfox-swagger-ui + 3.0.0 + + + + io.netty + netty-all + + + com.digitalpetri.modbus + modbus-codec + 1.1.1 + + + + mysql + mysql-connector-java + runtime + + + org.projectlombok + lombok + true + + + org.springframework.boot + spring-boot-starter-test + test + + + org.junit.vintage + junit-vintage-engine + + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/src/main/java/club/joylink/rtss/RtssApplication.java b/src/main/java/club/joylink/rtss/RtssApplication.java new file mode 100644 index 000000000..a0254e2b9 --- /dev/null +++ b/src/main/java/club/joylink/rtss/RtssApplication.java @@ -0,0 +1,15 @@ +package club.joylink.rtss; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.scheduling.annotation.EnableScheduling; + +@SpringBootApplication +@EnableScheduling +public class RtssApplication { + + public static void main(String[] args) { + SpringApplication.run(RtssApplication.class, args); + } + +} diff --git a/src/main/java/club/joylink/rtss/configuration/CrosConfiguration.java b/src/main/java/club/joylink/rtss/configuration/CrosConfiguration.java new file mode 100644 index 000000000..532f900f6 --- /dev/null +++ b/src/main/java/club/joylink/rtss/configuration/CrosConfiguration.java @@ -0,0 +1,28 @@ +package club.joylink.rtss.configuration; + +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; + +@Configuration +public class CrosConfiguration { + + private CorsConfiguration buildConfig() { + CorsConfiguration corsConfiguration = new CorsConfiguration(); + corsConfiguration.addAllowedOrigin("*"); // 1 + corsConfiguration.addAllowedHeader("*"); // 2 + corsConfiguration.addAllowedMethod("*"); // 3 + corsConfiguration.setAllowCredentials(true); + return corsConfiguration; + } + + @Bean + public CorsFilter corsFilter() { + UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); + source.registerCorsConfiguration("/**", buildConfig()); // 4 + return new CorsFilter(source); + } + +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/configuration/LocalDateConverter.java b/src/main/java/club/joylink/rtss/configuration/LocalDateConverter.java new file mode 100644 index 000000000..8c5cce8ae --- /dev/null +++ b/src/main/java/club/joylink/rtss/configuration/LocalDateConverter.java @@ -0,0 +1,23 @@ +package club.joylink.rtss.configuration; + +import lombok.extern.slf4j.Slf4j; +import org.springframework.core.convert.converter.Converter; +import org.springframework.util.StringUtils; + +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; + +@Slf4j +public class LocalDateConverter implements Converter { + + private DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); + + @Override + public LocalDate convert(String dateStr) { + if(StringUtils.hasText(dateStr)) { + return LocalDate.parse(dateStr, this.formatter); + } else { + return null; + } + } +} diff --git a/src/main/java/club/joylink/rtss/configuration/LocalDateTimeSerializerConfig.java b/src/main/java/club/joylink/rtss/configuration/LocalDateTimeSerializerConfig.java new file mode 100644 index 000000000..c39ce3f5e --- /dev/null +++ b/src/main/java/club/joylink/rtss/configuration/LocalDateTimeSerializerConfig.java @@ -0,0 +1,52 @@ +package club.joylink.rtss.configuration; + +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalTimeSerializer; +import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.LocalTime; +import java.time.format.DateTimeFormatter; + +@Configuration +public class LocalDateTimeSerializerConfig { + /** + * Date格式化字符串 + */ + private static final String DATE_FORMAT = "yyyy-MM-dd"; + /** + * DateTime格式化字符串 + */ + private static final String DATETIME_FORMAT = "yyyy-MM-dd HH:mm:ss"; + /** + * Time格式化字符串 + */ + private static final String TIME_FORMAT = "HH:mm:ss"; + + @Bean + public Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilderCustomizer() { + return builder -> { + builder.serializerByType(LocalDateTime.class, + new LocalDateTimeSerializer(DateTimeFormatter.ofPattern(DATETIME_FORMAT))); + builder.deserializerByType(LocalDateTime.class, + new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern(DATETIME_FORMAT))); + + builder.serializerByType(LocalDate.class, + new LocalDateSerializer(DateTimeFormatter.ofPattern(DATE_FORMAT))); + builder.deserializerByType(LocalDate.class, + new LocalDateDeserializer(DateTimeFormatter.ofPattern(DATE_FORMAT))); + + builder.serializerByType(LocalTime.class, + new LocalTimeSerializer(DateTimeFormatter.ofPattern(TIME_FORMAT))); + builder.deserializerByType(LocalTime.class, + new LocalTimeDeserializer(DateTimeFormatter.ofPattern(TIME_FORMAT))); + }; + } +} diff --git a/src/main/java/club/joylink/rtss/configuration/RestTemplateConfiguration.java b/src/main/java/club/joylink/rtss/configuration/RestTemplateConfiguration.java new file mode 100644 index 000000000..a04263b07 --- /dev/null +++ b/src/main/java/club/joylink/rtss/configuration/RestTemplateConfiguration.java @@ -0,0 +1,31 @@ +package club.joylink.rtss.configuration; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.http.client.ClientHttpRequestFactory; +import org.springframework.http.client.SimpleClientHttpRequestFactory; +import org.springframework.http.converter.StringHttpMessageConverter; +import org.springframework.web.client.RestTemplate; + +import java.nio.charset.Charset; + +@Configuration +public class RestTemplateConfiguration { + + @Bean + public RestTemplate restTemplate(ClientHttpRequestFactory factory){ + StringHttpMessageConverter m = new StringHttpMessageConverter(Charset.forName("UTF-8")); + RestTemplate restTemplate = new RestTemplate(factory); + restTemplate.getMessageConverters().add(0, m); + return restTemplate; + } + + @Bean + public ClientHttpRequestFactory simpleClientHttpRequestFactory(){ + SimpleClientHttpRequestFactory factory = new SimpleClientHttpRequestFactory(); + factory.setReadTimeout(5000);//单位为ms + factory.setConnectTimeout(5000);//单位为ms + return factory; + } + +} diff --git a/src/main/java/club/joylink/rtss/configuration/WebConfig.java b/src/main/java/club/joylink/rtss/configuration/WebConfig.java new file mode 100644 index 000000000..a865e5a77 --- /dev/null +++ b/src/main/java/club/joylink/rtss/configuration/WebConfig.java @@ -0,0 +1,60 @@ +package club.joylink.rtss.configuration; + +import club.joylink.rtss.controller.advice.AuthenticateInterceptor; +import club.joylink.rtss.controller.advice.LicenseInterceptor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Configuration; +import org.springframework.format.FormatterRegistry; +import org.springframework.web.servlet.config.annotation.InterceptorRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +import java.util.ArrayList; +import java.util.List; + +@Configuration +public class WebConfig implements WebMvcConfigurer { + + @Autowired + private AuthenticateInterceptor authenticateInterceptor; + + @Autowired + private LicenseInterceptor licenseInterceptor; + + @Override + public void addInterceptors(InterceptorRegistry registry) { + List licenseWhiteList = new ArrayList<>(); + licenseWhiteList.add("/api/license/validate"); + licenseWhiteList.add("/api/license/local"); + licenseWhiteList.add("/api/licensing/**"); + registry.addInterceptor(licenseInterceptor).excludePathPatterns(licenseWhiteList); + List whiteList = new ArrayList<>(); + whiteList.add("/swagger-ui.html"); + whiteList.add("/swagger-resources/**"); + whiteList.add("/webjars/springfox-swagger-ui/**"); + whiteList.add("/api/login/**"); + whiteList.add("/api/wxpat/**"); + whiteList.add("/api/sms/**"); + whiteList.add("/api/register/**"); + whiteList.add("/api/userinfo/**"); + whiteList.add("/api/wechatpay/receive"); + whiteList.add("/api/alipay/receive"); + whiteList.add("/api/applet/**"); + whiteList.add("/api/wxauth/**"); + whiteList.add("/api/distribute/permission"); + whiteList.add("/api/v1/jointTraining/permission"); + whiteList.add("/api/jointTraining/permission"); + whiteList.add("/api/user/bind/wm"); + // 运行图工具 + whiteList.add("/api/rpTools/**"); + whiteList.add("/api/license/validate"); + whiteList.add("/api/license/local"); + registry.addInterceptor(authenticateInterceptor).excludePathPatterns(whiteList); + } + + @Override + public void addFormatters(FormatterRegistry registry) { + registry.addConverter(new LocalDateConverter()); + WebMvcConfigurer.super.addFormatters(registry); + } + +} diff --git a/src/main/java/club/joylink/rtss/configuration/configProp/OtherConfig.java b/src/main/java/club/joylink/rtss/configuration/configProp/OtherConfig.java new file mode 100644 index 000000000..4c59e761c --- /dev/null +++ b/src/main/java/club/joylink/rtss/configuration/configProp/OtherConfig.java @@ -0,0 +1,18 @@ +package club.joylink.rtss.configuration.configProp; + +import lombok.Getter; +import lombok.Setter; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.stereotype.Component; + +@Component +@ConfigurationProperties(prefix="common") +@Getter +@Setter +public class OtherConfig { + + private String env; + + private String licenseSecretKey; + +} diff --git a/src/main/java/club/joylink/rtss/configuration/configProp/TencentCloudConfig.java b/src/main/java/club/joylink/rtss/configuration/configProp/TencentCloudConfig.java new file mode 100644 index 000000000..1468a2e7b --- /dev/null +++ b/src/main/java/club/joylink/rtss/configuration/configProp/TencentCloudConfig.java @@ -0,0 +1,40 @@ +package club.joylink.rtss.configuration.configProp; + +import lombok.Getter; +import lombok.Setter; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.stereotype.Component; + +@Component +@ConfigurationProperties(prefix="tencent-cloud") +@Getter +@Setter +public class TencentCloudConfig { + + private String domainUri; + + private String appId; + + private String appKey; + + private Boolean allowSend; + + /** + * 获取指定模板单发短信的url + * @return + */ + public String getSendsmsUrl() { + return new StringBuilder(this.domainUri) + .append("/sendsms?sdkappid=").append(this.appId).toString(); + } + + /** + * 获取指定模板群发短信的url + * @return + */ + public String sendMultiSmsUrl() { + return new StringBuilder(this.domainUri) + .append("/sendmultisms2?sdkappid=").append(this.appId).toString(); + } + +} diff --git a/src/main/java/club/joylink/rtss/configuration/configProp/WeChatConfig.java b/src/main/java/club/joylink/rtss/configuration/configProp/WeChatConfig.java new file mode 100644 index 000000000..d7d8e8e09 --- /dev/null +++ b/src/main/java/club/joylink/rtss/configuration/configProp/WeChatConfig.java @@ -0,0 +1,111 @@ +package club.joylink.rtss.configuration.configProp; + +import lombok.Getter; +import lombok.Setter; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.stereotype.Component; + +@Component +@ConfigurationProperties(prefix="wechat") +@Getter +@Setter +public class WeChatConfig { + + private String domainUri; + + private String appId; + + private String appSecret; + + private String wxApiUrl; + + private String wmBaseUrl; + + private String spAppId; + + private String spAppSecret; + + /** 微信模块基础url */ + private String wxModuleUrl; + + /** + * 微信小程序配置 + */ + private WeChatMiniProgramConfig mini; + + public String getWxApiUrl(String redirect, String state) { + return String.format(wxApiUrl, redirect, state); + } + + public String getWmLoginUrl(String state) { + return String.format(wmBaseUrl, "login", state); + } + + public String getWmBindUrl(Long userId) { + return String.format(wmBaseUrl, "bind", userId); + } + + public String getPermissionDistributeUrl(String state) { + return String.format(wmBaseUrl, "distribute", state); + } + + public String getWmJointRoomUrl(String state) { + return String.format(wmBaseUrl, "joint", state); + } + + public String getWmSimulationUrl(String state) { + return String.format(wmBaseUrl, "simulation", state); + } + + /** + * 获取页面access_token的url + * @return + */ + public String getPageAccessTokenUrl(String code) { + return new StringBuilder(this.domainUri) + .append("/sns/oauth2/access_token?appid=").append(this.appId) + .append("&secret=").append(this.appSecret) + .append("&code=").append(code) + .append("&grant_type=authorization_code").toString(); + } + + public String getJsAccessTokenUrl(String jsCode) { + return new StringBuilder(this.domainUri) + .append("/sns/oauth2/jscode2session?appid=").append(this.spAppId) + .append("&secret=").append(this.spAppSecret) + .append("&js_code=").append(jsCode) + .append("&grant_type=authorization_code").toString(); + } + + public String getUserInfoUrl(String access_token, String openid) { + return new StringBuilder(this.domainUri) + .append("/sns/userinfo?access_token=").append(access_token) + .append("&openid=").append(openid) + .append("&lang=zh_CN").toString(); + } + + public String getCode2SessionUrl(String wmCode) { + return new StringBuilder(this.domainUri) + .append("/sns/jscode2session?appid=").append(spAppId) + .append("&secret=").append(this.spAppSecret) + .append("&js_code=").append(wmCode) + .append("&grant_type=authorization_code").toString(); + } + + public String getWxModuleBatchGetUserInfoUrl() { + return this.wxModuleUrl + "/api/user/batchget"; + } + + /** + * 获取微信服务模块打标签url + * @return + */ + public String getWxApiTagUrl() { + return this.wxModuleUrl+"/api/user/tagging"; + } + + + public String getMsgSecCheckUrl() { + return this.wxModuleUrl + "/api/wm/msgSecCheck"; + } +} diff --git a/src/main/java/club/joylink/rtss/configuration/configProp/WeChatMiniProgramConfig.java b/src/main/java/club/joylink/rtss/configuration/configProp/WeChatMiniProgramConfig.java new file mode 100644 index 000000000..264e8ae81 --- /dev/null +++ b/src/main/java/club/joylink/rtss/configuration/configProp/WeChatMiniProgramConfig.java @@ -0,0 +1,16 @@ +package club.joylink.rtss.configuration.configProp; + +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter +public class WeChatMiniProgramConfig { + + private boolean accessTokenTaskOn; + + private String appId; + + private String appSecret; + +} diff --git a/src/main/java/club/joylink/rtss/constants/BusinessConsts.java b/src/main/java/club/joylink/rtss/constants/BusinessConsts.java new file mode 100644 index 000000000..2d05d7fab --- /dev/null +++ b/src/main/java/club/joylink/rtss/constants/BusinessConsts.java @@ -0,0 +1,631 @@ +package club.joylink.rtss.constants; + +public interface BusinessConsts { + + String Default_NationCode = "86"; + + /** + * 状态 1-启用/有效 + */ + String STATUS_USE = "1"; + + /** + * 状态 0-禁用/无效 + */ + String STATUS_NOT_USE = "0"; + + /** + * 验证码有效期: 单位 分钟 + */ + int VDCODE_TIMEOUT = 5; + + String MAIL_SUBJECT_VALIDATE_CODE = "【琏课堂】注册验证码"; + + String MAIL_CONTENT_VALIDATE_CODE = "【琏课堂】验证码为%s,有效期 %s 分钟,请在页面输入完成验证。"; + + String LOGIN_USER_KEY = "user"; + + /** + * 用户类型-实训用户 + */ + String ROLE_01 = "01"; + + /** + * 用户类型-地图生产者 + */ + String ROLE_02 = "02"; + + /** + * 用户类型-课程生产者 + */ + String ROLE_03 = "03"; + + /** + * 用户类型-系统管理员 + */ + String ROLE_04 = "04"; + + /** + * 用户类型-超级管理员 + */ + String ROLE_05 = "05"; + + /** + * 用户类型-销售人员 + */ + String ROLE_06 = "06"; + + /** + * 用户默认密码 + */ + String DEFAULT_PASSWORD = "123456"; + + /**贵州装备智造学院默认导入学生用户密码*/ + String GZB_DEFAULT_PASSWORD = "666666"; + + String SYSTEM_BIGSCREEN = "bigScreen"; + + String SYSTEM_PLAN = "plan"; + + String SYSTEM_LESSON = ""; + String EMAIL_FORMAT = "^[A-Za-z0-9\\u4e00-\\u9fa5_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$"; + String PHONE_FORMAT = "((\\+86|0086)?\\s*)((134[0-8]\\d{7})|(((13([0-3]|[5-9]))|(14[5-9])|15([0-3]|[5-9])|(16(2|[5-7]))|17([0-3]|[5-8])|18[0-9]|19(1|[8-9]))\\d{8})|(14(0|1|4)0\\d{7})|(1740([0-5]|[6-9]|[10-12])\\d{7}))"; + + /** + * 发布审核 + */ + interface ReleaseReview { + /** + * 未发布状态 + */ + String RELEASE_STATUS_01 = "0"; + /** + * 已发布待审核状态 + */ + String RELEASE_STATUS_02 = "1"; + /** + * 发布成功状态 + */ + String RELEASE_STATUS_03 = "2"; + /** + * 驳回状态 + */ + String RELEASE_STATUS_04 = "3"; + } + + /** + * 缓存前缀 + * @author sheng + */ + interface CachePrefix { + String Map = "Map_Detail_"; + String Map_3d = "Map_3d_"; + String Plan = "Plan_Detail_"; + String Map_Passenger_Flow = "Map_Passenger_Flow_"; + } + + /** + * webSocket订阅主题 + */ + interface WebSocketSubscribeTopic { + String Common = "/topic/message"; + /** 综合演练房间 */ + String Room = "/queue/room/%s"; + /** 仿真 */ + String Simulation = "/queue/simulation/%s"; + String Sandbox3D = "/queue/simulation/jl3d/%s"; + String TrainDrive3D = "/queue/simulation/drive/%s"; + String PassengerFlow = "/queue/simulation/passenger/%s"; + String AssistantSimulation = "/topic/simulation/assistant/%s"; + String WeiAngU3dSimulation = "/topic/simulation/wgu3d/%s"; + } + + + /** 设备类型 */ + interface DeviceType { + String Link = "01"; + String Switch = "02"; + String Section = "03"; + String Signal = "04"; + String StationControl = "05"; + String StationStand = "06"; + } + + /** 车站计数器类型 */ + interface CounterType { + /** 区故解 */ + String type01 = "01"; + /** 总人解 */ + String type02 = "02"; + } + + interface Permission { + + /** + * 权限类型 + * @author Jade + */ + interface Type { + /** 教学 */ + String Type01 = "01"; + /** 考试 */ + String Type02 = "02"; + /** 仿真 */ + String Type03 = "03"; + /** 大屏 */ + String Type04 = "04"; + /** 琏计划 */ + String Type05 = "05"; + /** 三维 */ + String Type06 = "06"; + } + + /** + * 试用时间单位 + */ + interface TimeUnit { + /** 年 */ + String TimeUnit01 = "01"; + /** 月 */ + String TimeUnit02 = "02"; + /** 日 */ + String TimeUnit03 = "03"; + /** 时 */ + String TimeUnit04 = "04"; + /** 分(默认) */ + String TimeUnit05 = "05"; + /** 秒 */ + String TimeUnit06 = "06"; + } + + /** + * 来源 + */ + interface Source { + /** 来自订单 */ + String Source01 = "01"; + /** 来自订单权限分发打包 */ + String Source02 = "02"; + /** 来自个人权限分发 */ + String Source03 = "03"; + /** 来自个人权限打包分发 */ + String Source04 = "04"; + /** 来自个人权限转赠 */ + String Source05 = "05"; + } + + } + + interface Order { + /** + * 订单类型 + * @author sheng + */ + interface Type { + /** 个人 */ + String Type01 = "01"; + /** 企业合同 */ + String Type02 = "02"; + /** 合约赠送 */ + String Type03 = "03"; + /** 内部分配 */ + String Type04 = "04"; + } + + /** + * 业务类型 + * @author sheng + */ + interface BizType { + /** 正常购买 */ + String Type01 = "01"; + /** 续费 */ + String Type02 = "02"; + /** 增加权限数量 */ + String Type03 = "03"; + /** 续费+增加权限数量 */ + String Type04 = "04"; + } + + /** + * 支付类型 + * @author sheng + */ + interface PayType { + /** 合同线下支付 */ + String Type01 = "01"; + /** 微信支付 */ + String Type02 = "02"; + /** 支付宝支付 */ + String Type03 = "03"; + } + + /** + * 支付状态 + * @author sheng + */ + interface PayStatus { + /** 待支付 */ + String Status01 = "01"; + /** 已支付 */ + String Status02 = "02"; + /** 取消 */ + String Status03 = "03"; + } + + /** + * 订单状态 + * @author sheng + */ + interface Status { + /** 未完成 */ + String Status01 = "01"; + /** 完成 */ + String Status02 = "02"; + /** 取消 */ + String Status03 = "03"; + } + + } + + interface Training { + + interface Status { + /** + * 有效 + */ + String Status01 = "01"; + + /** + * 无效 + */ + String Status02 = "02"; + } + + /** + * 模式 + * @author Jade + */ + interface Mode { + /** + * 测验模式 + */ + String Mode04 = "04"; + /** + * 考试 + */ + String Mode05 = "05"; + } + /** + * 实训状态类型 + * @author Jade + */ + interface StatusType { + /** 开始 */ + String Type01 = "01"; + /** 结束 */ + String Type02 = "02"; + } + + /** + * 实训生成类型 + */ + interface GenerateType { + /** 自动 */ + String GenerateType01 = "01"; + /** 人工 */ + String GenerateType02 = "02"; + } + + enum Type { + Section("区段实训"), Switch("道岔实训"), Signal("信号机实训"), Stand("站台实训"), Station("车站实训"), ControlConvertMenu("控制权实训"), TrainWindow("车次窗实训"), LimitControl("限速实训"), Driver("司机驾驶实训"), Train("列车实训"); + private String description; + Type(String description) { + this.description = description; + } + public String getDescription() { + return description; + } + } + } + + interface Exam { + /** + * 考试结果 + * @author Jade + */ + interface Result { + /** + * 未计算 + */ + String Result01 = "01"; + /** + * 通过 + */ + String Result02 = "02"; + /** + * 未通过 + */ + String Result03 = "03"; + /** + * 已放弃 + */ + String Result04 = "04"; + } + + /**考试试题作答结果/原因*/ + interface QuestionCause{ + String INCORRECT = "操作错误"; + String OVERTIME = "操作超时"; + String PERFECT = "操作完美"; + String CORRECT = "操作正确,但没有达到最优操作时间"; + + } + } + + /** + * 运行图 + */ + interface RunPlan { + /** + * 车站类型 + */ + interface StationType { + /** + * 下行 + */ + String Type01 = "01"; + /** + * 上行 + */ + String Type02 = "02"; + /** + * 特殊(始发站和终点站) + */ + String Type03 = "03"; + } + /** + * 运行方向类型 + */ + interface DirectionType { + /** + * 上行 + */ + String Type02 = "2"; + /** + * 下行 + */ + String Type01 = "1"; + } + } + + interface MapPrd { + interface PrdType { + /** + * 现地类型 + */ + String Type01 = "01"; + /** + * 行调类型 + */ + String Type02 = "02"; + /** + * 综合演练 + */ + String Type03 = "03"; + /** + * 司机模拟驾驶 + */ + String Type04 = "04"; + /** + * 派班工作站 + */ + String Type05 = "05"; + } + } + + + interface Lesson { + enum PrdInfo { + prdType01("【ATS现地工作站实操】" ,"该课程基于国内知名信号厂商的真实ATS系统,利用虚拟现实、人工智能等成熟的互联网技术,并结合一线运营人员的宝贵经验,实现了对现地工作站的原理级仿真。"), + prdType02("【ATS行调工作站实操】","该课程基于国内知名信号厂商的真实ATS系统,利用虚拟现实、人工智能等成熟的互联网技术,并结合一线运营人员的宝贵经验,实现了对行调工作站的原理级仿真。") ; + private String name; + private String remarks; + PrdInfo(String name, String remarks) { + this.name =name; + this.remarks =remarks; + } + + public String getName() { + return name; + } + + public String getRemarks() { + return remarks; + } + } + interface Version{ + String originalVersion = "0.0"; + } + } + + + interface Section { + interface SectionType { + /** + * 物理区段 + */ + String Type01 = "01"; + /** + * 逻辑区段 + */ + String Type02 = "02"; + /** + * 道岔物理区段 + */ + String Type03 = "03"; + + /** + * 道岔计轴区段 + */ + String Type04 = "04"; + } + } + + interface User { + interface Tag { + /** + * 注册用户 + */ + String Register = "100"; + /** + * 订阅者 + */ + String Subscriber = "101"; + /** + * 销售人员 + */ + String Seller = "102"; + /** + * 订阅者 & 销售人员 + */ + String Subscriber_Seller = "103"; + } + } + + interface Task { + /** + * 类型 + */ + interface Type { + /** 实训生成任务 */ + String Type01 = "01"; + } + + /** + * 状态 + */ + interface Status { + /** 未开始 */ + String Status01 = "01"; + /** 进行中 */ + String Status02 = "02"; + /** 已完成 */ + String Status03 = "03"; + /** 待执行 */ + String Status04 = "04"; + /** 已取消 */ + String Status05 = "05"; + } + } + + interface JointTraining { + /** + * 用户状态 + */ + interface UserState { + /** + * 扫码 + */ + String State01 = "01"; + /** + * 其他 + */ + String State02 = "02"; + /** + * 被踢出房间 + */ + String State03 = "03"; + } + /** + * 房间状态 + */ + interface RoomState { + /** + * 准备中 + */ + String State01 = "01"; + /** + * 仿真开始 + */ + String State02 = "02"; + /** + * 房间销毁 + */ + String State03 = "03"; + } + } + + /** + * 仿真会话 + */ + interface ConversationMessage { + /** + * 会话消息类型 + */ + interface Type { + /* 文字 **/ + String Type01 = "01"; + /* 语音 **/ + String Type02 = "02"; + } + } + + /** + * 线路常量 + */ + interface RealLine { + + interface Direction{ + String LEFT = "left"; + String RIGHT = "right"; + } + + } + + interface SystemNoticeType{ + String email ="01"; + String sms ="02"; + } + + /** + * 作答模式 + */ + interface AnswerMode { + /** + * 练习模式 + */ + String Mode01 = "01"; + /** + * 模拟考试模式 + */ + String Mode02 = "02"; + + /** + * 小程序题库模拟竞技 + */ + String Mode03 = "03"; + + /** + * 小程序错题库 + */ + String Mode04 = "04"; + } + + /** + * 理论题类型 + */ + enum TheoryType { + + /** 单选题*/ + select, + /** 多选题*/ + multi, + /**判断题*/ + judge, + /**填空题*/ + fill, + /**问答*/ + answer + } +} diff --git a/src/main/java/club/joylink/rtss/constants/Client.java b/src/main/java/club/joylink/rtss/constants/Client.java new file mode 100644 index 000000000..513daf573 --- /dev/null +++ b/src/main/java/club/joylink/rtss/constants/Client.java @@ -0,0 +1,48 @@ +package club.joylink.rtss.constants; + +import club.joylink.rtss.exception.BusinessExceptionAssertEnum; +import lombok.Getter; + +/** + * 客户端枚举 + */ +@Getter +public enum Client { + Joylink("1", "joylink", "实训平台"), + Design("2", "design", "设计平台"), + Assistant("4", "linkassistant", "琏课堂助手"), + WeiAngU3d("5", "unitywa5", "Unity3D"), + + Rate("6", "rate", "竞赛平台"), + Referee("7", "referee", "裁判平台"), + + ; + + private String id; + + private String secret; + + private String name; + + Client(String id, String secret, String name) { + this.id = id; + this.secret = secret; + this.name = name; + } + + /** + * 根据客户端id查询客户端对象 + * @param clientId + * @return + */ + public static Client getByIdAndSecret(String clientId, String secret) { + Client[] values = Client.values(); + for (Client value : values) { + if(value.getId().equals(clientId) + && value.getSecret().equals(secret)) { + return value; + } + } + throw BusinessExceptionAssertEnum.INVALID_CLIENT.exception("未找到id为[%s]的客户端"); + } +} diff --git a/src/main/java/club/joylink/rtss/constants/EmailSubject.java b/src/main/java/club/joylink/rtss/constants/EmailSubject.java new file mode 100644 index 000000000..51e71a3fa --- /dev/null +++ b/src/main/java/club/joylink/rtss/constants/EmailSubject.java @@ -0,0 +1,23 @@ +package club.joylink.rtss.constants; + +import lombok.Getter; + +@Getter +public enum EmailSubject { + + Valid_Code("【琏课堂】验证码", "【琏课堂】验证码为%s,有效期 %s 分钟,请在页面输入完成验证。"), + System_Notice("【玖琏科技】平台通知", "%s:%s"); + + private String subject; + + private String template; + + EmailSubject(String subject, String template) { + this.subject = subject; + this.template = template; + } + + public String buildContent(Object... params) { + return String.format(this.template, params); + } +} diff --git a/src/main/java/club/joylink/rtss/constants/MapPrdTypeEnum.java b/src/main/java/club/joylink/rtss/constants/MapPrdTypeEnum.java new file mode 100644 index 000000000..91c97a423 --- /dev/null +++ b/src/main/java/club/joylink/rtss/constants/MapPrdTypeEnum.java @@ -0,0 +1,33 @@ +package club.joylink.rtss.constants; + +import lombok.Getter; + +@Getter +public enum MapPrdTypeEnum { + LOCAL("01", "ATS现地工作站"), + CENTER("02", "ATS行调工作站"), + JOINT("03", "综合演练云平台"), + DRIVER("04", "司机模拟驾驶系统"), + SCHEDULING("05", "派班工作站"), + ISCS("06", "ISCS工作站"), + BIG_SCREEN("07", "大屏工作站"), + ; + + private String code; + + private String msg; + + MapPrdTypeEnum(String code, String msg) { + this.code = code; + this.msg = msg; + } + + public static MapPrdTypeEnum getMapPrdTypeEnumByCode(String code) { + for (MapPrdTypeEnum value : values()) { + if (value.getCode().equals(code)) { + return value; + } + } + return null; + } +} diff --git a/src/main/java/club/joylink/rtss/constants/MapStatus.java b/src/main/java/club/joylink/rtss/constants/MapStatus.java new file mode 100644 index 000000000..fc40267ab --- /dev/null +++ b/src/main/java/club/joylink/rtss/constants/MapStatus.java @@ -0,0 +1,20 @@ +package club.joylink.rtss.constants; + +import lombok.Getter; + +/** + * 地图状态 + */ +@Getter +public enum MapStatus { + Online("1"), + Offline("0"), + Delete("-1") + ; + + private String code; + + MapStatus(String code) { + this.code = code; + } +} diff --git a/src/main/java/club/joylink/rtss/constants/MapSystemType.java b/src/main/java/club/joylink/rtss/constants/MapSystemType.java new file mode 100644 index 000000000..f6e79da82 --- /dev/null +++ b/src/main/java/club/joylink/rtss/constants/MapSystemType.java @@ -0,0 +1,13 @@ +package club.joylink.rtss.constants; + +import lombok.Getter; + +@Getter +public enum MapSystemType { + + Lesson, + Exam, + Simulation, + Plan, + ; +} diff --git a/src/main/java/club/joylink/rtss/constants/PermissionDistributeSourceEnum.java b/src/main/java/club/joylink/rtss/constants/PermissionDistributeSourceEnum.java new file mode 100644 index 000000000..4f1b79bdf --- /dev/null +++ b/src/main/java/club/joylink/rtss/constants/PermissionDistributeSourceEnum.java @@ -0,0 +1,20 @@ +package club.joylink.rtss.constants; + +import lombok.Getter; + +@Getter +public enum PermissionDistributeSourceEnum { + FromUser("01", "来自用户"), + FromOrder("02","来自订单"), + Gift("03", "赠送") + ; + + private String code; + + private String info; + + PermissionDistributeSourceEnum(String code, String info) { + this.code = code; + this.info = info; + } +} diff --git a/src/main/java/club/joylink/rtss/constants/PermissionTypeEnum.java b/src/main/java/club/joylink/rtss/constants/PermissionTypeEnum.java new file mode 100644 index 000000000..6b8352ce4 --- /dev/null +++ b/src/main/java/club/joylink/rtss/constants/PermissionTypeEnum.java @@ -0,0 +1,34 @@ +package club.joylink.rtss.constants; + +import lombok.Getter; + +import java.util.Objects; + +@Getter +public enum PermissionTypeEnum { + + Lesson("01", "课程"), + Exam("02", "考试"), + Simulation("03", "仿真"), + Teaching_Package("04", "实训平台教学权限包"), + ; + + private String code; + + private String msg; + + PermissionTypeEnum(String code, String msg) { + this.code = code; + this.msg = msg; + } + + public static PermissionTypeEnum getPermissionTypeByCode(String code) { + for (PermissionTypeEnum value : PermissionTypeEnum.values()) { + if (Objects.equals(code, value.code)) { + return value; + } + } + throw new RuntimeException(String.format("code为[%s]的PermissionTypeEnum不存在", code)); + } + +} diff --git a/src/main/java/club/joylink/rtss/constants/Project.java b/src/main/java/club/joylink/rtss/constants/Project.java new file mode 100644 index 000000000..f4463b6c6 --- /dev/null +++ b/src/main/java/club/joylink/rtss/constants/Project.java @@ -0,0 +1,32 @@ +package club.joylink.rtss.constants; + +/** + * 项目 + */ +public enum Project { + /** 自己项目 */ + DEFAULT, + /** 西铁院定制项目 */ + XTY, + /** 南铁院定制项目 */ + NTY, + /** 西安地铁定制项目 */ + XADT, + /** 贵州装备职业学院项目 */ + GZB, + /** 哈尔滨项目 */ + HEB, + /** 行调竞赛实训系统 */ + DRTS, + /** 北京交通大学项目(客流量科研) */ + BJD, + ; + + public static boolean isDefault(Project project) { + return DEFAULT.equals(project); + } + + public static boolean isLoginWithCreateSimulation(Project project) { + return Project.DRTS.equals(project) || Project.BJD.equals(project); + } +} diff --git a/src/main/java/club/joylink/rtss/constants/ProjectDeviceType.java b/src/main/java/club/joylink/rtss/constants/ProjectDeviceType.java new file mode 100644 index 000000000..116dcd5eb --- /dev/null +++ b/src/main/java/club/joylink/rtss/constants/ProjectDeviceType.java @@ -0,0 +1,70 @@ +package club.joylink.rtss.constants; + +import lombok.Getter; + +import java.util.Arrays; +import java.util.List; + +/** + * 项目设备类型 + */ +@Getter +public enum ProjectDeviceType { + + /* -----------plc device start---------- */ + /** 道岔 */ + SWITCH, + /** 信号机 */ + SIGNAL, + /** 屏蔽门控制柜 */ + PSC, + /** 屏蔽门 */ + PSD, + /** 端头控制盒(屏蔽门控制盒) */ + PSL, + /** IBP盘 */ + IBP, + /** PLC网关 */ + PLC_GATEWAY, + /* -----------plc device end---------- */ + + /* -----------client device start---------- */ + /** 教员机(instructor machine) */ + IM, + /** 调度工作站(control workstation) */ + CW, + /** 现地工作站(local workstation) */ + LW, + /** 联锁工作站(interlock workstation) */ + ILW, + /** 虚拟综合后备盘(Integrated Back-Up Panel) */ + VR_IBP, + /** 大屏工作站(large screen workstation) */ + LSW, + /** 列车驾驶终端 */ + DRIVE, + /** 虚拟站台屏蔽门终端 */ + VR_PSD, + /** 现地综合监控 */ + ISCS_LW, + /** 中心综合监控 */ + ISCS_CW, + /** 车辆段终端 */ + DEPOT, + /** 虚拟CCTV */ + CCTV, + /** 虚拟电子沙盘 */ + SANDBOX, + /* -----------client device end---------- */ + ; + + public static List PlcDeviceList() { + return Arrays.asList(PLC_GATEWAY, + PSC, + PSD, + PSL, + IBP, + SWITCH, + SIGNAL); + } +} diff --git a/src/main/java/club/joylink/rtss/constants/RaceStatusEnum.java b/src/main/java/club/joylink/rtss/constants/RaceStatusEnum.java new file mode 100644 index 000000000..6ed02e125 --- /dev/null +++ b/src/main/java/club/joylink/rtss/constants/RaceStatusEnum.java @@ -0,0 +1,21 @@ +package club.joylink.rtss.constants; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +@Getter +@AllArgsConstructor +public enum RaceStatusEnum { + /** 尚未开始 */ + Not_Started(0), + /** 正在进行中 */ + In_Progress(1), + /** 已经结束了 */ + Over(2), + /** 暂停中 */ + Pause(3), + ; + + private int code; + +} diff --git a/src/main/java/club/joylink/rtss/constants/RaceUserStatusEnum.java b/src/main/java/club/joylink/rtss/constants/RaceUserStatusEnum.java new file mode 100644 index 000000000..97b260e63 --- /dev/null +++ b/src/main/java/club/joylink/rtss/constants/RaceUserStatusEnum.java @@ -0,0 +1,25 @@ +package club.joylink.rtss.constants; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +@Getter +@AllArgsConstructor +public enum RaceUserStatusEnum { + /** 尚未参赛 */ + Not_Yet_Entered(0), + /** 进入赛场 */ + Enter_The_Arena(1), + /** 理论赛场 */ + Theory_The_Arena(2), + /** 完成理论 */ + Finish_Theory_The_Arena(5), + /** 实操赛场 */ + Practical_The_Arena(3), + /** 完成实操赛场 */ + Finish_Practical_The_Arena(6), + /** 完成比赛 */ + Finish(4), + ; + private int code; +} diff --git a/src/main/java/club/joylink/rtss/constants/RealLineEnum.java b/src/main/java/club/joylink/rtss/constants/RealLineEnum.java new file mode 100644 index 000000000..c2423f6a9 --- /dev/null +++ b/src/main/java/club/joylink/rtss/constants/RealLineEnum.java @@ -0,0 +1,34 @@ +package club.joylink.rtss.constants; + +import lombok.Getter; + +/** + * 地图线路code + */ +@Getter +public enum RealLineEnum { + Whole("000", "全部线路"), + ChengDu_Line1("01", "成都一号线"), + FuZhou_Line1("02", "福州一号线"), + BeiJing_Line1("03", "北京一号线"), + ChengDu_Line3("04", "成都三号线"), + NingBo_Line1("06", "宁波一号线"), + HarBin_Line1("07", "哈尔滨一号线"), + Foshan_Tram("08", "佛山有轨电车"), + ; + + /** + * 数据字典皮肤风格编号 + */ + private String code; + + /** + * 数据字典皮肤风格名称 + */ + private String name; + + RealLineEnum(String code, String name) { + this.code = code; + this.name = name; + } +} diff --git a/src/main/java/club/joylink/rtss/constants/RoleEnum.java b/src/main/java/club/joylink/rtss/constants/RoleEnum.java new file mode 100644 index 000000000..14cd58743 --- /dev/null +++ b/src/main/java/club/joylink/rtss/constants/RoleEnum.java @@ -0,0 +1,19 @@ +package club.joylink.rtss.constants; + +import lombok.Getter; + +@Getter +public enum RoleEnum { + + User("01"), + LessonCreater("03"), + Admin("04"), + SuperAdmin("05"), + ; + + private String role; + + RoleEnum(String role) { + this.role = role; + } +} diff --git a/src/main/java/club/joylink/rtss/constants/SaleGoodsTypeEnum.java b/src/main/java/club/joylink/rtss/constants/SaleGoodsTypeEnum.java new file mode 100644 index 000000000..df413d7da --- /dev/null +++ b/src/main/java/club/joylink/rtss/constants/SaleGoodsTypeEnum.java @@ -0,0 +1,20 @@ +package club.joylink.rtss.constants; + +import lombok.Getter; + +@Getter +public enum SaleGoodsTypeEnum { + + Type_Invalid("0", "无效"), + + Type_Valid("1", "有效"); + + private String code; + + private String msg; + + SaleGoodsTypeEnum(String code, String msg) { + this.code = code; + this.msg = msg; + } +} diff --git a/src/main/java/club/joylink/rtss/constants/SaleOrderPayStatusEnum.java b/src/main/java/club/joylink/rtss/constants/SaleOrderPayStatusEnum.java new file mode 100644 index 000000000..d89a90736 --- /dev/null +++ b/src/main/java/club/joylink/rtss/constants/SaleOrderPayStatusEnum.java @@ -0,0 +1,20 @@ +package club.joylink.rtss.constants; + +import lombok.Getter; + +@Getter +public enum SaleOrderPayStatusEnum { + Unpaid("01", "待支付"), + Paid("02", "已支付"), + Cancel("03", "取消支付"), + No_Need("04", "无需支付"); + + private String code; + + private String msg; + + SaleOrderPayStatusEnum(String code, String msg) { + this.code = code; + this.msg = msg; + } +} diff --git a/src/main/java/club/joylink/rtss/constants/SaleOrderPayWaysEnum.java b/src/main/java/club/joylink/rtss/constants/SaleOrderPayWaysEnum.java new file mode 100644 index 000000000..9b833a12f --- /dev/null +++ b/src/main/java/club/joylink/rtss/constants/SaleOrderPayWaysEnum.java @@ -0,0 +1,16 @@ +package club.joylink.rtss.constants; + +public enum SaleOrderPayWaysEnum { + Offline("01", "线下"), + Alipay("02", "支付宝"), + Wechat("03", "微信"); + + private String code; + + private String msg; + + SaleOrderPayWaysEnum(String code, String msg) { + this.code = code; + this.msg = msg; + } +} diff --git a/src/main/java/club/joylink/rtss/constants/SaleOrderTypeEnum.java b/src/main/java/club/joylink/rtss/constants/SaleOrderTypeEnum.java new file mode 100644 index 000000000..bdac740af --- /dev/null +++ b/src/main/java/club/joylink/rtss/constants/SaleOrderTypeEnum.java @@ -0,0 +1,29 @@ +package club.joylink.rtss.constants; + +import lombok.Getter; + +@Getter +public enum SaleOrderTypeEnum { + Individual("01", "个人"), + Business_Contract("02", "企业合同"), + Contract_Gift("03", "合约赠送"), + Internal_Distribution("04", "内部分配"); + + private String code; + + private String msg; + + SaleOrderTypeEnum(String code, String msg) { + this.code = code; + this.msg = msg; + } + + public static SaleOrderTypeEnum getSaleOrderTypeByCode(String code) { + for (SaleOrderTypeEnum value : SaleOrderTypeEnum.values()) { + if (value.getCode().equals(code)) { + return value; + } + } + throw new RuntimeException(String.format("code为[%s]的SaleOrderTypeEnum不存在", code)); + } +} diff --git a/src/main/java/club/joylink/rtss/constants/SortDirection.java b/src/main/java/club/joylink/rtss/constants/SortDirection.java new file mode 100644 index 000000000..fe59deb9c --- /dev/null +++ b/src/main/java/club/joylink/rtss/constants/SortDirection.java @@ -0,0 +1,13 @@ +package club.joylink.rtss.constants; + +public enum SortDirection { + /** + * 正序 + */ + Asc, + + /** + * 逆序 + */ + Desc +} diff --git a/src/main/java/club/joylink/rtss/constants/StatusEnum.java b/src/main/java/club/joylink/rtss/constants/StatusEnum.java new file mode 100644 index 000000000..18ff7980a --- /dev/null +++ b/src/main/java/club/joylink/rtss/constants/StatusEnum.java @@ -0,0 +1,18 @@ +package club.joylink.rtss.constants; + +import lombok.Getter; + +@Getter +public enum StatusEnum { + Invalid("0", "无效"), + Valid("1", "有效"); + + private String code; + + private String msg; + + StatusEnum(String code, String msg) { + this.code = code; + this.msg = msg; + } +} diff --git a/src/main/java/club/joylink/rtss/constants/SystemEnv.java b/src/main/java/club/joylink/rtss/constants/SystemEnv.java new file mode 100644 index 000000000..bf93f8b58 --- /dev/null +++ b/src/main/java/club/joylink/rtss/constants/SystemEnv.java @@ -0,0 +1,74 @@ +package club.joylink.rtss.constants; + +import club.joylink.rtss.exception.BusinessExceptionAssertEnum; +import lombok.Getter; + +import java.util.Objects; + +@Getter +public enum SystemEnv { + Dev("1", "dev"), + Test("2", "test"), + Prd("3", "prd"), + + Local("9", "local"), + ; + + private String id; + + private String name; + + SystemEnv(String id, String name) { + this.id = id; + this.name = name; + } + + public static String getSystemEnvIdByName(String name) { + SystemEnv[] envs = SystemEnv.values(); + for (SystemEnv env : envs) { + if(Objects.equals(env.getName(), name)) { + return env.id; + } + } + throw BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.exception(String.format("没有对应系统环境[%s]", name)); + } + + public static boolean isPrdEnv(String name) { + SystemEnv[] envs = SystemEnv.values(); + for (SystemEnv env : envs) { + if(Objects.equals(env.getName(), name)) { + if(Prd.equals(env)) { + return true; + } + break; + } + } + return false; + } + + public static boolean isDevEnv(String name) { + SystemEnv[] envs = SystemEnv.values(); + for (SystemEnv env : envs) { + if(Objects.equals(env.getName(), name)) { + if(Dev.equals(env)) { + return true; + } + break; + } + } + return false; + } + + public static boolean isLocalEnv(String name) { + SystemEnv[] envs = SystemEnv.values(); + for (SystemEnv env : envs) { + if(Objects.equals(env.getName(), name)) { + if(Local.equals(env)) { + return true; + } + break; + } + } + return false; + } +} diff --git a/src/main/java/club/joylink/rtss/constants/TencentSMSTemplate.java b/src/main/java/club/joylink/rtss/constants/TencentSMSTemplate.java new file mode 100644 index 000000000..fe4ad2667 --- /dev/null +++ b/src/main/java/club/joylink/rtss/constants/TencentSMSTemplate.java @@ -0,0 +1,32 @@ +package club.joylink.rtss.constants; + +import lombok.Getter; + +/** + * 腾讯短信服务模板 + */ +@Getter +public enum TencentSMSTemplate { + + VerificationCode("玖琏科技", 123003, 2), + VerificationCode_International("JiuLian", 453984, 2), + OrderNotice("玖琏科技", 260120, 4), + SystemNotice("玖琏科技", 0000, 3), + ; + + private String sign; + + private int tplId; + + /** 参数个数 */ + private int paramsCount; + + TencentSMSTemplate(String sign, int tplId, int paramsCount) { + this.sign = sign; + this.tplId = tplId; + this.paramsCount = paramsCount; + } + + public boolean validateParamsCount(int size) { + return this.paramsCount == size; + }} diff --git a/src/main/java/club/joylink/rtss/constants/TreeNodeTypeEnum.java b/src/main/java/club/joylink/rtss/constants/TreeNodeTypeEnum.java new file mode 100644 index 000000000..b8d75e30e --- /dev/null +++ b/src/main/java/club/joylink/rtss/constants/TreeNodeTypeEnum.java @@ -0,0 +1,19 @@ +package club.joylink.rtss.constants; + +import lombok.Getter; + +@Getter +public enum TreeNodeTypeEnum { + Map, + Prd, + Lesson, + Chapter, + Exam, + Training, + MapSystem, + System, + Plan, + TrainingType, + OperateType, + ; +} diff --git a/src/main/java/club/joylink/rtss/constants/UserPermissionStatusEnum.java b/src/main/java/club/joylink/rtss/constants/UserPermissionStatusEnum.java new file mode 100644 index 000000000..abf7a5043 --- /dev/null +++ b/src/main/java/club/joylink/rtss/constants/UserPermissionStatusEnum.java @@ -0,0 +1,18 @@ +package club.joylink.rtss.constants; + +import lombok.Getter; + +@Getter +public enum UserPermissionStatusEnum { + Invalid("0", "无效"), + getInvalid("1", "有效"); + + private String code; + + private String msg; + + UserPermissionStatusEnum(String code, String msg) { + this.code = code; + this.msg = msg; + } +} diff --git a/src/main/java/club/joylink/rtss/constants/WxConstants.java b/src/main/java/club/joylink/rtss/constants/WxConstants.java new file mode 100644 index 000000000..0b9cfe395 --- /dev/null +++ b/src/main/java/club/joylink/rtss/constants/WxConstants.java @@ -0,0 +1,63 @@ +package club.joylink.rtss.constants; + +public interface WxConstants { + + String ACCESS_TOKEN = "access_token"; + + String EXPIRES_IN = "expires_in"; + + String ERRCODE = "errcode"; + + String ERRMSG = "errmsg"; + + /** + * 通过微信调用的接口 + * @author Jade + */ + public interface WxApi { + /** + * 用户登录 + */ + String LOGIN = "login"; + /** + * 分发权限获取 + */ + String DISTRIBUTE = "distribute"; + /** + * 联合演练 + */ + String JOINT = "joint"; + /** + * 仿真 + */ + String SIMULATION = "simulation"; + } + + /** + * 小程序二维码路径 + */ + interface WmQrcodePath { + /** + * 登陆二维码 + */ + String Login = "login"; + /** + * 登陆二维码 + */ + String Bind = "bind"; + /** + * 权限分发二维码 + */ + String PermissionDistribute = "distribute"; + /** + * 综合演练房间二维码 + */ + String Joint = "joint"; + + /** + * 仿真分发二维码 + */ + String Simulation = "simulation"; + } + +} diff --git a/src/main/java/club/joylink/rtss/controller/CompanyController.java b/src/main/java/club/joylink/rtss/controller/CompanyController.java new file mode 100644 index 000000000..9a9f74266 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/CompanyController.java @@ -0,0 +1,61 @@ +package club.joylink.rtss.controller; + +import club.joylink.rtss.services.ICompanyService; +import club.joylink.rtss.vo.client.CompanyQueryVO; +import club.joylink.rtss.vo.client.CompanyVO; +import club.joylink.rtss.vo.client.PageVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +@Api(tags = {"公司单位管理接口"}) +@RestController +@RequestMapping("/api/company") +public class CompanyController { + + @Autowired + private ICompanyService iCompanyService; + + @ApiOperation(value = "添加公司信息") + @PostMapping + public CompanyVO create(@RequestBody @Validated CompanyVO company) { + CompanyVO vo = this.iCompanyService.create(company); + return vo; + } + + @ApiOperation(value = "获取公司列表") + @GetMapping + public List queryAll() { + List list = this.iCompanyService.queryOrganizations(); + return list; + } + + @ApiOperation(value = "分页获取公司列表") + @GetMapping("paging") + public PageVO pagingQueryAll(CompanyQueryVO queryVO) { + PageVO list = this.iCompanyService.queryPageOrganizations(queryVO); + return list; + } + + @ApiOperation(value = "删除公司信息") + @DeleteMapping("{id}") + public void delete( @PathVariable Integer id) { + this.iCompanyService.deleteById(id); + } + + @ApiOperation(value = "查询公司信息") + @GetMapping("{id}") + public CompanyVO get( @PathVariable Integer id) { + return this.iCompanyService.getById(id); + } + + @ApiOperation(value = "更新公司信息") + @PutMapping("{id}") + public CompanyVO get(@PathVariable Integer id, @RequestBody @Validated CompanyVO company) { + return this.iCompanyService.update(id, company); + } +} diff --git a/src/main/java/club/joylink/rtss/controller/ExamController.java b/src/main/java/club/joylink/rtss/controller/ExamController.java new file mode 100644 index 000000000..a56ce074f --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/ExamController.java @@ -0,0 +1,112 @@ +package club.joylink.rtss.controller; + +import club.joylink.rtss.constants.RoleEnum; +import club.joylink.rtss.controller.advice.Role; +import club.joylink.rtss.services.IExamService; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.*; +import club.joylink.rtss.vo.client.validGroup.ExamDefinitionCheck; +import club.joylink.rtss.vo.client.validGroup.ExamDefinitionRulesCheck; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; + +@Api(tags = {"考试定义接口"}) +@RestController +@RequestMapping("api/exam") +public class ExamController { + @Autowired + private IExamService iExamService; + + @ApiOperation(value = "创建考试") + @PostMapping(path = "") + public void create(@RequestBody @Validated(value = {ExamDefinitionCheck.class, ExamDefinitionRulesCheck.class}) + ExamDefinitionVO examDefinitionVO, @RequestAttribute @ApiIgnore UserVO user) { + iExamService.create(examDefinitionVO, user); + } + + @ApiOperation(value = "贵装备创建考试") + @PostMapping(path = "/project/GZB") + public void createGZBExam(@RequestBody @Validated(value = {ExamDefinitionCheck.class, ExamDefinitionRulesCheck.class}) + ExamDefinitionVO examDefinitionVO, @RequestAttribute @ApiIgnore UserVO user) { + iExamService.createGZBExam(examDefinitionVO, user); + } + + @ApiOperation(value = "检查分数是否合理") + @GetMapping(path = "/checkScore") + public boolean checkScore(@Validated(value = ExamDefinitionRulesCheck.class) ExamDefinitionVO examDefinitionVO) { + return iExamService.checkScore(examDefinitionVO); + } + +// @ApiOperation(value = "查询课程下的章节信息") +// @GetMapping(path = "/{lessonId}/chapter") +// public CommonJsonResponse queryChapterInfo(@PathVariable(required = true) String lessonId) { +// return CommonJsonResponse.newSuccessResponse(iExamService.queryChapterInfo(lessonId)); +// } + + @ApiOperation(value = "查询课程所属产品下有实训的实训类型") + @GetMapping(path = "/{lessonId}/trainingTypes") + public List queryTrainingTypes(@PathVariable Long lessonId) { + return iExamService.queryTrainingTypes(lessonId); + } + + @ApiOperation(value = "查询试题信息及规则信息") + @GetMapping(path = "/{id}") + public ExamDefinitionVO queryExamInfo(@PathVariable Long id) { + return iExamService.queryExamInfo(id); + } + + @ApiOperation(value = "查询课程信息及课程下的试题列表信息") + @GetMapping(path = "/{lessonId}/list") + public ExamsLessonVO queryExamList(@PathVariable Long lessonId, @ApiIgnore @RequestAttribute UserVO user) { + return iExamService.queryExamList(lessonId, user); + } + + @ApiOperation(value = "查询试题列表信息") + @GetMapping(path = "/list") + public PageVO queryExamInfoList(ExamDefinitionQueryVO queryVO) { + return iExamService.queryExamInfoList(queryVO); + } + + @ApiOperation(value = "删除试题") + @DeleteMapping(path = "/{id}") + public void deleteExam(@PathVariable String id, @ApiIgnore @RequestAttribute UserVO user) { + iExamService.deleteExam(id, user); + } + +// @ApiOperation(value = "查询章节下允许创建的最多题目数量") +// @GetMapping(path = "/trainingNum/{lessonId}/{chapterId}") +// public CommonJsonResponse queryTrainingNum(@PathVariable(required = true) String lessonId, @PathVariable(required = true) String chapterId) { +// int trainingNum = iExamService.queryTrainingNum(lessonId, chapterId); +// return CommonJsonResponse.newSuccessResponse(trainingNum); +// } + + @ApiOperation(value = "根据课程和实训类型查询实训数量") + @GetMapping(path = "/trainingNum/{lessonId}/{trainingType}") + public Long queryTrainingNum(@PathVariable Long lessonId, @PathVariable String trainingType, String operateType) { + return iExamService.queryTrainingNum(lessonId, trainingType, operateType); + } + + @ApiOperation(value = "试题上线") + @PutMapping(value = "/{id}/onLine") + public void onLine(@PathVariable Long id, @RequestAttribute @ApiIgnore UserVO user) { + this.iExamService.onLine(id, user); + } + + @ApiOperation(value = "试题下线") + @PutMapping(value = "/{id}/offLine") + public void offLine(@PathVariable Long id, @RequestAttribute @ApiIgnore UserVO user) { + this.iExamService.offLine(id, user); + } + + @ApiOperation(value = "更新试题") + @PutMapping(path = "/{id}") + public void update(@PathVariable Long id, @RequestBody ExamDefinitionVO examDefinitionVO) { + this.iExamService.update(id, examDefinitionVO); + } +} diff --git a/src/main/java/club/joylink/rtss/controller/LearnController.java b/src/main/java/club/joylink/rtss/controller/LearnController.java new file mode 100644 index 000000000..5e746c7a8 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/LearnController.java @@ -0,0 +1,187 @@ +package club.joylink.rtss.controller; + +import club.joylink.rtss.constants.Project; +import club.joylink.rtss.services.ILearnService; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageQueryVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.learn.LearnCommentVO; +import club.joylink.rtss.vo.client.learn.LearnCreateVO; +import club.joylink.rtss.vo.client.learn.LearnPostVO; +import club.joylink.rtss.vo.client.post.LearnMessageCreateVO; +import club.joylink.rtss.vo.client.post.LearnMessagePagedQueryVO; +import club.joylink.rtss.vo.client.post.LearnMessageVO; +import club.joylink.rtss.vo.client.validGroup.LearnCommentCreateCheck; +import club.joylink.rtss.vo.client.validGroup.LearnPostCreateCheck; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; + +@Api(tags = { "学习吧接口" }) +@RestController +@RequestMapping(path = "/api/learn") +public class LearnController { + + @Autowired + private ILearnService iLearnService; + + @ApiOperation(value = "分页查询帖子列表") + @GetMapping(path = "/post") + public PageVO queryPagedPost(PageQueryVO queryVO) { + return iLearnService.queryPagedPost(queryVO); + } + + @ApiOperation("查询项目留言板") + @GetMapping("/{project}/post") + public LearnPostVO queryPost(@PathVariable Project project) { + return iLearnService.queryPost(project); + } + + @ApiOperation(value = "新建帖子") + @PostMapping(path = "/{mapId}/post") + public String createPost(@PathVariable Long mapId, + @RequestBody @Validated(value = LearnPostCreateCheck.class) LearnCreateVO postCreateVO, + @ApiIgnore @RequestAttribute UserVO user) { + return iLearnService.createPost(mapId, postCreateVO, user); + } + + @ApiOperation(value = "获取帖子信息") + @GetMapping(path = "/{postId}") + public LearnPostVO getPostInfo(@PathVariable Long postId) { + return iLearnService.getPostInfo(postId); + } + + @ApiOperation(value = "赞贴") + @PostMapping(path = "/post/{postId}/like") + public void likePost(@PathVariable Long postId, @ApiIgnore @RequestAttribute UserVO user) { + iLearnService.likePost(postId, user); + } + + @ApiOperation(value = "踩贴") + @PostMapping(path = "/post/{postId}/unlike") + public void unlikePost(@PathVariable Long postId, @ApiIgnore @RequestAttribute UserVO user) { + iLearnService.unlikePost(postId, user); + } + + @ApiOperation(value = "置顶-管理员操作") + @PutMapping(path = "/{postId}/top") + public void top(@PathVariable Long postId, @ApiIgnore @RequestAttribute UserVO user) { + iLearnService.top(postId, user); + } + + @ApiOperation(value = "删除帖子-管理员操作") + @DeleteMapping(path = "/{postId}") + public void deletePost(@PathVariable Long postId, @ApiIgnore @RequestAttribute UserVO user) { + iLearnService.deletePost(postId, user); + } + + //--------------------------------- 留言 --------------------------------- + + @ApiOperation("留言") + @PostMapping("/message/create") + public long createMessage(@RequestBody @Validated LearnMessageCreateVO messageCreateVO, @RequestAttribute UserVO user) { + return iLearnService.createMessage(messageCreateVO, user); + } + + @ApiOperation("分页查询留言") + @GetMapping("/{postId}/message/pagedQuery/postId") + public PageVO pagedQueryMessageByPostId(@PathVariable Long postId, LearnMessagePagedQueryVO queryVO) { + return iLearnService.pagedQueryMessageByPostId(postId, queryVO); + } + + @ApiOperation("根据项目分页查询留言") + @GetMapping("/{project}/message/pagedQuery/project") + public PageVO pagedQueryMessageByProject(@PathVariable Project project, LearnMessagePagedQueryVO queryVO) { + return iLearnService.pagedQueryMessageByProject(project, queryVO); + } + + @ApiOperation("删除留言(管理员)") + @DeleteMapping("/{messageId}/deleteMessage/admin") + public void adminDeleteMessage(@PathVariable Long messageId, @RequestAttribute UserVO user) { + iLearnService.adminDeleteMessage(messageId, user); + } + + @ApiOperation("删除留言(用户删自己的)") + @DeleteMapping("/{messageId}/deleteMessage/user") + public void userDeleteMessage(@PathVariable Long messageId, @RequestAttribute UserVO user) { + iLearnService.userDeleteMessage(messageId, user); + } + +// @ApiOperation("赞留言") +// @PutMapping("/{messageId}/like") +// public Integer likeMessage(@PathVariable Long messageId) { +// return iLearnService.likeMessage(messageId); +// } +// +// @ApiOperation("踩留言") +// @PutMapping("/{messageId}/unlike") +// public Integer unlikeMessage(@PathVariable Long messageId) { +// return iLearnService.unlikeMessage(messageId); +// } + + //----------------------------------------- 评论 ----------------------------------------- + + @ApiOperation(value = "分页查询留言评论列表") + @GetMapping(path = "/{messageId}/comment") + public PageVO queryPagedComment(@PathVariable Long messageId, PageQueryVO queryVO) { + return iLearnService.pagedQueryComment(messageId, queryVO); + } + + @ApiOperation(value = "查询留言回复列表") + @GetMapping(path = "/{messageId}/list") + public List queryCommentList(@PathVariable Long messageId) { + return iLearnService.queryCommentList(messageId); + } + + @ApiOperation(value = "评论") + @PostMapping(path = "/{messageId}/comment") + public void comment(@PathVariable Long messageId, + @RequestBody @Validated(value = LearnCommentCreateCheck.class) LearnCreateVO commentCreateVO, + @ApiIgnore @RequestAttribute UserVO user) { + iLearnService.addComment(messageId, commentCreateVO, user); + } + + @ApiOperation(value = "回复") + @PostMapping(path = "/{messageId}/{commentId}/comment") + public void comment(@PathVariable Long messageId, @PathVariable Long commentId, + @RequestBody @Validated(value = LearnCommentCreateCheck.class) LearnCreateVO postCreateVO, + @ApiIgnore @RequestAttribute UserVO user) { + iLearnService.addComment(messageId, commentId, postCreateVO, user); + } + + @ApiOperation(value = "赞回复") + @PostMapping(path = "/comment/{commentId}/like") + public void likeComment(@PathVariable Long commentId, @ApiIgnore @RequestAttribute UserVO user) { + iLearnService.likeComment(commentId, user); + } + + @ApiOperation(value = "踩回复") + @PostMapping(path = "/comment/{commentId}/unlike") + public void unlikeComment(@PathVariable Long commentId, @ApiIgnore @RequestAttribute UserVO user) { + iLearnService.unlikeComment(commentId, user); + } + + @ApiOperation(value = "取消置顶-管理员操作") + @PutMapping(path = "/{postId}/unTop") + public void unTop(@PathVariable Long postId, @ApiIgnore @RequestAttribute UserVO user) { + iLearnService.unTop(postId, user); + } + + @ApiOperation(value = "删除评论-管理员操作") + @DeleteMapping(path = "/{commentId}/deleteComment/admin") + public void adminDeleteComment(@PathVariable Long commentId, @ApiIgnore @RequestAttribute UserVO user) { + iLearnService.adminDeleteComment(commentId, user); + } + + @ApiOperation(value = "删除评论-用户操作") + @DeleteMapping(path = "/{commentId}/deleteComment/user") + public void userDeleteComment(@PathVariable Long commentId, @ApiIgnore @RequestAttribute UserVO user) { + iLearnService.userDeleteComment(commentId, user); + } + +} diff --git a/src/main/java/club/joylink/rtss/controller/LessonController.java b/src/main/java/club/joylink/rtss/controller/LessonController.java new file mode 100644 index 000000000..a2e15351e --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/LessonController.java @@ -0,0 +1,128 @@ +package club.joylink.rtss.controller; + +import club.joylink.rtss.constants.RoleEnum; +import club.joylink.rtss.controller.advice.Role; +import club.joylink.rtss.services.ILessonService; +import club.joylink.rtss.services.student.IClassStudentUserService; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.LessonQueryVO; +import club.joylink.rtss.vo.client.LessonTreeVO; +import club.joylink.rtss.vo.client.LessonVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.student.StudentClassVO; +import club.joylink.rtss.vo.client.validGroup.LessonUpdateNameAndRemarksCheck; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; + +@Api(tags = { "课程数据管理接口" }) +@RestController +@RequestMapping("/api/lesson") +public class LessonController { + + private ILessonService iLessonService; + + @Autowired + private IClassStudentUserService iClassStudentUserService; + + @Autowired + public LessonController(ILessonService iLessonService) { + this.iLessonService = iLessonService; + } + + @ApiOperation(value = "获取课程实训树") + @GetMapping(path = "/{id}/tree") + public LessonTreeVO getLessonTrainingTree(@PathVariable Long id, @RequestAttribute UserVO user) { + return this.iLessonService.getLessonTree(id, user); + } + + @ApiOperation(value = "获取课程详情") + @GetMapping(path="/{id}") + public LessonVO getLessonDetail(@PathVariable Long id, @RequestAttribute UserVO user) { + return this.iLessonService.getLessonDetail(id, user); + } + + @ApiOperation(value = "获取课程列表") + @GetMapping(path = "") + public List queryLessons(LessonQueryVO lessonQueryVO) { + return this.iLessonService.queryLessons(lessonQueryVO); + } + + @ApiOperation(value = "根据班级获取关联课程列表") + @GetMapping(path = "/class/{classId}") + public List queryLessons(@PathVariable Integer classId) { + return this.iClassStudentUserService.getLessonByClass(classId); + } + + @ApiOperation(value = "根据课程获取关联班级信息列表") + @GetMapping(path = "/{lessonId}/classes") + public List queryClassByLesson(@PathVariable Long lessonId) { + return this.iClassStudentUserService.getClassesByLesson(lessonId); + } + + @ApiOperation(value = "获取课程列表") + @GetMapping(path = "/listOfMap") + public List queryLessonsOfMap(Long mapId) { + return this.iLessonService.queryLessonsOfMap(mapId); + } + + @ApiOperation(value = "分页获取已发布的课程") + @GetMapping(path = "/publishedLesson") + public PageVO selectPagedPublishedLesson(LessonQueryVO queryVO) { + return iLessonService.selectPagedPublishedLesson(queryVO); + } + + @Role(RoleEnum.SuperAdmin) + @ApiOperation(value = "删除已发布的课程") + @DeleteMapping(path = "/publishedLesson/{lessonId}") + public void deletePublishedLesson(@PathVariable Long lessonId, @RequestAttribute UserVO user) { + iLessonService.deletePublishedLesson(lessonId, user); + } + + @Role(RoleEnum.LessonCreater) + @ApiOperation(value = "贵州装备教学实训删除正在使用的发布课程") + @DeleteMapping(path = "/usedLesson/{lessonId}") + public void deleteUsedLesson(@PathVariable Long lessonId, @RequestAttribute UserVO user) { + iLessonService.deleteUsedLesson(lessonId, user); + } + +// @ApiOperation(value = "根据产品编码获取课程数据") +// @GetMapping(path = "/{mapId}/{prdId}/list") +// public List getLessonListByPrd(@PathVariable Long mapId, @PathVariable Long prdId) { +// return this.iLessonService.getLessonListByMapAndPrd(mapId, prdId); +// } + + @ApiOperation(value = "发布课程上线") + @PutMapping(path = "/{id}/onLine") + @Role({RoleEnum.Admin,RoleEnum.SuperAdmin}) + public void onLine(@PathVariable Long id, @RequestAttribute UserVO user) { + this.iLessonService.onLine(id, user); + } + + @ApiOperation(value = "发布课程下线") + @PutMapping(path = "/{id}/offLine") + @Role({RoleEnum.Admin,RoleEnum.SuperAdmin}) + public void offLine(@PathVariable Long id, @RequestAttribute UserVO user) { + this.iLessonService.offLine(id, user); + } + + @ApiOperation(value = "更新课程名称和简介") + @PutMapping(path = "/{id}/nameAndRemarks") + @Role({RoleEnum.Admin,RoleEnum.SuperAdmin}) + public void updateNameAndRemarks(@PathVariable Long id, + @RequestBody @Validated(LessonUpdateNameAndRemarksCheck.class) LessonVO lessonVO, + @ApiIgnore @RequestAttribute UserVO user) { + this.iLessonService.updateNameAndRemarks(id, lessonVO.getName(), lessonVO.getRemarks(), user); + } + + @ApiOperation(value = "生成默认课程和考试功能") + @PostMapping(path = "/generating") + public void generateLessonAndExam(@ApiIgnore @RequestAttribute UserVO user, @RequestBody List mapIds) { + iLessonService.generateLessonAndExam(mapIds, user); + } +} diff --git a/src/main/java/club/joylink/rtss/controller/LessonDraftController.java b/src/main/java/club/joylink/rtss/controller/LessonDraftController.java new file mode 100644 index 000000000..4ef292b0a --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/LessonDraftController.java @@ -0,0 +1,104 @@ +package club.joylink.rtss.controller; + +import club.joylink.rtss.services.ILessonDraftService; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.*; +import club.joylink.rtss.vo.client.validGroup.DraftLessonCreateCheck; +import club.joylink.rtss.vo.client.validGroup.DraftLessonCreateFromCheck; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; + +@Api(tags = { "课程草稿数据管理接口" }) +@RestController +@RequestMapping("/api/lessonDraft") +public class LessonDraftController { + + @Autowired + private ILessonDraftService iLessonDraftService; + + @ApiOperation(value = "分页查询个人课程草稿") + @GetMapping(path = "/{mapId}/list") + public PageVO getLessonTree(@PathVariable Long mapId, PageQueryVO queryVO, @ApiIgnore @RequestAttribute UserVO user) { + return this.iLessonDraftService.queryPagedDraftLesson(mapId, queryVO, user); + } + + @ApiOperation(value = "获取课程树") + @GetMapping(path = "/{lessonId}/tree") + public List getLessonTree(@PathVariable Long lessonId, @ApiIgnore @RequestAttribute UserVO user) { + return this.iLessonDraftService.getLessonTree(lessonId, user); + } + + @ApiOperation(value = "获取课程基本信息") + @GetMapping(path="/{id}") + public LessonVO getLesson(@PathVariable Long id) { + return this.iLessonDraftService.getLesson(id); + } + + @ApiOperation(value = "创建课程信息") + @PostMapping(path = "") + public void createLesson(@RequestBody @Validated(value = DraftLessonCreateCheck.class) LessonVO lessonVo, @RequestAttribute UserVO user) { + this.iLessonDraftService.createLesson(lessonVo, user); + } + + @ApiOperation(value = "从发布课程创建") + @PostMapping(path = "/createForm") + public void createFrom(@RequestBody @Validated(value = DraftLessonCreateFromCheck.class) LessonVO lessonVo, @RequestAttribute UserVO user) { + this.iLessonDraftService.createFrom(lessonVo, user); + } + + @ApiOperation(value = "更新课程信息") + @PutMapping(path = "/{id}") + public void updateLesson(@PathVariable Long id, @RequestBody LessonVO lessonVo, @RequestAttribute UserVO user) { + this.iLessonDraftService.updateLesson(id, lessonVo, user); + } + + @ApiOperation(value = "删除课程") + @DeleteMapping(path="/{id}") + public void deleteLesson(@PathVariable Long id) { + this.iLessonDraftService.deleteLesson(id); + } + + @ApiOperation(value = "发布课程") + @PostMapping(path="/{id}/publish") + public void publishLesson(@PathVariable Long id, @RequestBody @Validated LessonPublishVO publishVO) { + this.iLessonDraftService.publishLesson(id, publishVO); + } + + @ApiOperation(value = "获取课程章节信息") + @GetMapping(path="/chapter/{id}") + public LessonChapterVO getChapter(@PathVariable Long id) { + return this.iLessonDraftService.getChapter(id); + } + + @ApiOperation(value = "创建课程章节") + @PostMapping(path="/{id}/chapter") + public void createChapter(@PathVariable Long id, @RequestBody @Validated LessonChapterVO chapterVo) { + chapterVo.setLessonId(id); + this.iLessonDraftService.createChapter(chapterVo); + } + + @ApiOperation(value = "更新课程章节信息") + @PutMapping(path="/chapter/{id}") + public void updateChapter(@PathVariable Long id, @RequestBody @Validated LessonChapterVO chapterVo) { + this.iLessonDraftService.updateChapter(id, chapterVo); + } + + @ApiOperation(value = "删除课程章节") + @DeleteMapping(path="/chapter/{id}") + public void updateChapter(@PathVariable Long id) { + this.iLessonDraftService.deleteChapter(id); + } + + @ApiOperation(value = "拖拽排序") + @PutMapping(path="/dragSort") + public void dragSort(@RequestBody DragSortReqVO sortReq) { + this.iLessonDraftService.dragSort(sortReq); + } + +} diff --git a/src/main/java/club/joylink/rtss/controller/LoginController.java b/src/main/java/club/joylink/rtss/controller/LoginController.java new file mode 100644 index 000000000..bb3cb8c36 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/LoginController.java @@ -0,0 +1,95 @@ +package club.joylink.rtss.controller; + +import club.joylink.rtss.constants.Project; +import club.joylink.rtss.services.IAuthenticateService; +import club.joylink.rtss.vo.LoginUserInfoVO; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.LoginStatusVO; +import club.joylink.rtss.vo.client.LoginUserVO; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.validation.constraints.NotBlank; + +@RestController +@RequestMapping("/api/login") +public class LoginController { + + @Autowired + private IAuthenticateService iAuthenticateService; + + @ApiOperation(value = "获取微信小程序登陆二维码") + @GetMapping(path = "/wmurl") + public LoginStatusVO getWmLoginUrl(@NotBlank String clientId, @NotBlank String secret, + Project project, @RequestParam(required = false) String deviceCode) { + return this.iAuthenticateService.getWmLoginUrl(clientId, secret, project, deviceCode); + } + + @ApiOperation(value = "用户微信小程序扫登陆二维码") + @GetMapping(path = "/scan/wmLoginUrl") + public UserVO scanWmLoginQrCode(String code, String state) { + return this.iAuthenticateService.scanWmLoginQrCode(code, state); + } + + @ApiOperation(value = "微信小程序确认登陆接口") + @PostMapping(path = "/wm") + public void wmConfirmLogin(String code, String state) { + this.iAuthenticateService.wmConfirmClientLogin(code, state); + } + + @PostMapping() + public String loginWithPwd(@RequestBody @Validated LoginUserVO loginUser) { + return iAuthenticateService.loginWithPwd(loginUser); + } + + @GetMapping("/preLogout") + public void preLogout(String token) { + this.iAuthenticateService.preLogout(token); + } + + @GetMapping(path="/logout") + public void logout(String token) { + this.iAuthenticateService.logout(token); + } + + @GetMapping(path="/checkStatus") + public LoginStatusVO checkStatus(@NotBlank String sessionId) { + return iAuthenticateService.checkStatus(sessionId); + } + + /** + * 获取用户信息 - 通过token + * @param token + * @return + */ + @GetMapping(path = "/getUserInfo") + public UserVO getUserInfo(String token) { + LoginUserInfoVO loginUserInfoVO = this.iAuthenticateService.getLoginUserInfoByToken(token); + return loginUserInfoVO.getUserVO(); + } + + /** + * 获取用户登录信息(包含登录的项目/客户端等) + * @param token + * @return + */ + @GetMapping("/loginUserInfo") + public LoginUserInfoVO getLoginUserInfo(String token) { + return this.iAuthenticateService.getLoginUserInfoByToken(token); + } + + @ApiOperation(value = "微信小程序code换取token") + @GetMapping(path = "/wm/token") + public String getTokenByWmCode(String code) { + return this.iAuthenticateService.getTokenByWmCode(code); + } + + @ApiOperation(value = "token是否过期") + @GetMapping(path = "/{token}/isExpired") + public boolean isTokenExpired(@PathVariable String token) { + return this.iAuthenticateService.isTokenExpired(token); + } + +} diff --git a/src/main/java/club/joylink/rtss/controller/Map3dModelController.java b/src/main/java/club/joylink/rtss/controller/Map3dModelController.java new file mode 100644 index 000000000..669c2b2ac --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/Map3dModelController.java @@ -0,0 +1,55 @@ +package club.joylink.rtss.controller; + +import club.joylink.rtss.services.IMap3dModelService; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.map.Map3dModelCreateVO; +import club.joylink.rtss.vo.client.map.Map3dModelUpdateVO; +import club.joylink.rtss.vo.client.map.Map3dModelVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +@Api(tags= {"地图3d模型数据管理接口"}) +@RestController +@RequestMapping("/api/map3dModel") +@Slf4j +public class Map3dModelController { + + @Autowired + private IMap3dModelService iMap3dModelService; + + @ApiOperation(value = "获取所有有效地图3d模型数据") + @GetMapping(path = "/all") + public List findAllModels() { + return this.iMap3dModelService.findAllModels(); + } + + @GetMapping("") + public List query(String resourceType) { + return this.iMap3dModelService.query(resourceType); + } + + @PutMapping("") + public void update(@Validated @RequestBody Map3dModelUpdateVO updateVO) { + this.iMap3dModelService.update(updateVO); + } + + @ApiOperation(value = "创建地图3d模型数据") + @PostMapping("") + public void create(@RequestBody @Validated Map3dModelCreateVO createVO, @RequestAttribute UserVO user) { + iMap3dModelService.create(createVO, user); + } + + @ApiOperation(value = "删除地图3d模型数据") + @DeleteMapping("/{id}/delete") + public void delete(@PathVariable Long id) { + iMap3dModelService.delete(id); + } + + +} diff --git a/src/main/java/club/joylink/rtss/controller/OperateController.java b/src/main/java/club/joylink/rtss/controller/OperateController.java new file mode 100644 index 000000000..363e0393a --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/OperateController.java @@ -0,0 +1,103 @@ +package club.joylink.rtss.controller; + +import club.joylink.rtss.services.IOperateService; +import club.joylink.rtss.vo.client.*; +import club.joylink.rtss.vo.client.validGroup.OperateBatchCreateCheck; +import club.joylink.rtss.vo.client.validGroup.OperateSignleCreateCheck; +import club.joylink.rtss.vo.client.validGroup.ValidList; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.validation.constraints.NotBlank; +import java.util.List; + +@Api(tags = { "操作管理接口" }) +@RestController +@RequestMapping(path = "/api/operate") +public class OperateController { + + private final IOperateService iOperateService; + + @Autowired + public OperateController(IOperateService iOperateService) { + this.iOperateService = iOperateService; + } + + @ApiOperation(value = "创建操作定义") + @PostMapping(path = "") + public void create(@RequestBody @Validated(value = {OperateSignleCreateCheck.class}) OperateDefinitionVO definitionVO) { + this.iOperateService.create(definitionVO); + } + + @ApiOperation(value = "分页查询操作定义") + @GetMapping(path = "") + public PageVO queryPagedOperateDefinition(OperateDefinitionQueryVO queryVO) { + return this.iOperateService.queryPagedOperateDefinition(queryVO); + } + + @ApiOperation(value = "修改操作定义") + @PutMapping(path = "/{id}") + public void updateDefinition(@PathVariable Long id, @RequestBody @Validated(value = {OperateSignleCreateCheck.class}) OperateDefinitionVO definitionVO) { + this.iOperateService.update(id, definitionVO); + } + + @ApiOperation(value = "删除操作定义") + @DeleteMapping(path = "/{id}") + public void deleteDefinition(@PathVariable Long id) { + this.iOperateService.delete(id); + } + + @ApiOperation(value = "创建操作步骤") + @PostMapping(path = "/{definitionId}/step") + public void createStep(@PathVariable Long definitionId, @RequestBody @Validated(value = {OperateSignleCreateCheck.class}) OperateStepVO stepVO) { + this.iOperateService.createStep(definitionId, stepVO); + } + + @ApiOperation(value = "分页查询操作步骤") + @GetMapping(path = "/{definitionId}/step") + public PageVO queryPagedOperateStep(@PathVariable Long definitionId, PageQueryVO queryVO) { + return this.iOperateService.queryPagedOperateStep(definitionId, queryVO); + } + + @ApiOperation(value = "修改操作步骤") + @PutMapping(path = "/step/{id}") + public void updateStep(@PathVariable Long id, @RequestBody @Validated(value = {OperateSignleCreateCheck.class}) OperateStepVO stepVO) { + this.iOperateService.updateStep(id, stepVO); + } + + @ApiOperation(value = "删除操作步骤") + @DeleteMapping(path = "/step/{id}") + public void deleteStep(@PathVariable Long id) { + this.iOperateService.deleteStep(id); + } + + @ApiOperation(value = "获取实训类型下的操作类型") + @GetMapping(path = "/type") + public List queryOperateType(Long mapId, String productType) { + return this.iOperateService.queryOperateTypes(mapId, productType); + } + + @ApiOperation(value = "生成操作") + @PostMapping(path = "/{mapId}/generate") + public void generate(@PathVariable Long mapId, + @RequestBody @Validated(value = {OperateBatchCreateCheck.class}) ValidList definitionVOList) { + this.iOperateService.generate(mapId, definitionVOList); + } + + @ApiOperation(value = "另存为") + @PostMapping(path = "/{mapId}/saveAs/{other}") + public void saveAs(@PathVariable @NotBlank Long mapId, + @PathVariable @NotBlank Long other) { + this.iOperateService.saveAs(mapId, other); + } + + @ApiOperation(value = "查询占位数据列表") + @GetMapping(path = "/placeholder") + public List queryPlaceholder(String trainingType) { + return this.iOperateService.queryPlaceholder(trainingType); + } + +} diff --git a/src/main/java/club/joylink/rtss/controller/OrganizationController.java b/src/main/java/club/joylink/rtss/controller/OrganizationController.java new file mode 100644 index 000000000..4e181d65f --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/OrganizationController.java @@ -0,0 +1,40 @@ +package club.joylink.rtss.controller; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +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.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import club.joylink.rtss.services.IOrganizationService; +import club.joylink.rtss.vo.client.OrganizationVO; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; + +@Api(tags = {"组织/企业管理接口"}) +@RestController +@RequestMapping("/api/organization") +public class OrganizationController { + + @Autowired + private IOrganizationService iOrganizationService; + + @ApiOperation(value = "获取组织/企业数据") + @GetMapping(path = "") + public List queryOrganization() { + List list = this.iOrganizationService.queryOrganization(); + return list; + } + + @ApiOperation(value = "添加组织/企业") + @PostMapping(path = "") + public OrganizationVO create(@RequestBody @Validated OrganizationVO organization) { + OrganizationVO org = this.iOrganizationService.create(organization); + return org; + } +} diff --git a/src/main/java/club/joylink/rtss/controller/ReleaseReviewController.java b/src/main/java/club/joylink/rtss/controller/ReleaseReviewController.java new file mode 100644 index 000000000..3dbc66ab6 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/ReleaseReviewController.java @@ -0,0 +1,115 @@ +package club.joylink.rtss.controller; + +import club.joylink.rtss.controller.advice.AuthenticateInterceptor; +import club.joylink.rtss.services.IReleaseReviewService; +import club.joylink.rtss.vo.LoginUserInfoVO; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.*; +import club.joylink.rtss.vo.client.runplan.RunPlanQueryVO; +import club.joylink.rtss.vo.client.runplan.RunPlanVO; +import club.joylink.rtss.vo.client.script.ScriptQueryVO; +import club.joylink.rtss.vo.client.script.ScriptVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; + +@Api(tags = { "发布审核接口" }) +@RestController +@RequestMapping("/api/review") +public class ReleaseReviewController { + + @Autowired + private IReleaseReviewService iReleaseReviewService; + + @ApiOperation(value = "分页获取待审核的草稿课程") + @GetMapping(path = "/query/lesson") + public PageVO queryPendingReviewLesson(ReleaseReviewQueryVO queryVO){ + return iReleaseReviewService.queryPendingReviewLesson(queryVO); + } + + @ApiOperation(value = "发布课程") + @PostMapping(path="/{id}/publishLesson") + public void publishLesson(@PathVariable Long id, @RequestBody @Validated LessonPublishVO publishVO) { + iReleaseReviewService.publishLesson(id, publishVO); + } + + @ApiOperation(value = "课程申请驳回") + @PostMapping(path = "/lesson/{id}") + public void rejectLesson(@PathVariable Long id, @RequestBody ReleaseReviewQueryVO queryVO){ + iReleaseReviewService.rejectLesson(id,queryVO.getExplanation()); + } + + @ApiOperation(value = "用户申请发布课程或者撤销课程申请") + @GetMapping(path = "/lesson/releaseOrCancel/{id}/{status}") + public void applicationForReleaseOrCancelLesson(@PathVariable Long id,@PathVariable String status){ + iReleaseReviewService.applicationForReleaseOrCancelLesson(id,status); + } + + @ApiOperation(value = "预览课程") + @GetMapping(path = "/previewLesson/{id}") + public List previewLesson(@PathVariable Long id){ + return iReleaseReviewService.previewLesson(id); + } + + //---------------------------------------- + @ApiOperation(value = "分页获取待审核的草稿剧本") + @GetMapping(path = "/query/script") + public PageVO queryPendingReviewScript(ScriptQueryVO queryVO){ + return iReleaseReviewService.queryPendingReviewScript(queryVO); + } + + @ApiOperation(value = "发布剧本") + @PostMapping(path="/{id}/publishScript") + public void publishScript(@PathVariable Long id, @ApiIgnore @RequestAttribute UserVO user){ + iReleaseReviewService.publishScript(id, user); + } + + @ApiOperation(value = "剧本申请驳回") + @PostMapping(path = "/script/{id}") + public void rejectScript(@PathVariable Long id, @RequestBody @Validated ReleaseReviewVO releaseReviewVO){ + iReleaseReviewService.rejectScript(id, releaseReviewVO); + } + + //------------------------------------ + @ApiOperation(value = "分页获取待审核的草稿运行图") + @GetMapping(path = "/query/runPlan") + public PageVO queryPendingReviewRunPlan(RunPlanQueryVO queryVO){ + return iReleaseReviewService.queryPendingReviewRunPlan(queryVO); + } + + @ApiOperation(value = "发布运行图") + @PostMapping(path = "/{planId}/publishRunPlan") + public List publishRunPlan(@PathVariable Long planId, @ApiIgnore @RequestAttribute UserVO user){ + return iReleaseReviewService.publishRunPlan(planId, user); + } + + @ApiOperation(value = "直接发布运行图") + @PostMapping(path = "/{planId}/directPublishRunPlan") + public List directPublishRunPlan(@PathVariable Long planId, String runPlanName, @ApiIgnore @RequestAttribute UserVO user){ + return iReleaseReviewService.directPublishRunPlan(planId, runPlanName, user); + } + + @ApiOperation(value = "运行图申请驳回") + @PostMapping(path = "/runPlan/{id}") + public void rejectRunPlan(@PathVariable Long id,@RequestBody ReleaseReviewQueryVO queryVO){ + iReleaseReviewService.rejectRunPlan(id,queryVO.getExplanation()); + } + + @ApiOperation(value = "用户申请发布运行图或者撤销运行图申请") + @GetMapping(path = "/runPlan/releaseOrCancel/{id}/{status}") + public void applicationForReleaseOrCancelRunPlan(@PathVariable Long id, @PathVariable String status){ + iReleaseReviewService.applicationForReleaseOrCancelRunPlan(id,status); + } + + @ApiOperation(value = "预览运行图") + @GetMapping(path = "/previewRunPlan/{planId}") + public String reviewRunPlan(@PathVariable Long planId,@ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) + LoginUserInfoVO loginUserInfoVO){ + return iReleaseReviewService.previewRunPlan(planId,loginUserInfoVO); + } +} diff --git a/src/main/java/club/joylink/rtss/controller/RunPlanDraftController.java b/src/main/java/club/joylink/rtss/controller/RunPlanDraftController.java new file mode 100644 index 000000000..6c1b02a8c --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/RunPlanDraftController.java @@ -0,0 +1,249 @@ +package club.joylink.rtss.controller; + +import club.joylink.rtss.constants.RoleEnum; +import club.joylink.rtss.controller.advice.AuthenticateInterceptor; +import club.joylink.rtss.controller.advice.Role; +import club.joylink.rtss.services.IRunPlanDraftService; +import club.joylink.rtss.vo.LoginUserInfoVO; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.map.MapRoutingSectionVO; +import club.joylink.rtss.vo.client.map.MapRoutingVO; +import club.joylink.rtss.vo.client.map.newmap.MapStationParkingTimeVO; +import club.joylink.rtss.vo.client.map.newmap.MapStationRunLevelVO; +import club.joylink.rtss.vo.client.runplan.*; +import club.joylink.rtss.runplan.newdraw.RunPlanInput; +import club.joylink.rtss.vo.client.validGroup.RunPlanCreateCheck; +import club.joylink.rtss.vo.client.validGroup.RunPlanNameCheck; +import club.joylink.rtss.vo.client.validGroup.ValidList; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.util.CollectionUtils; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; + +@Api(tags = {"运行计划草稿接口"}) +@RestController +@RequestMapping("/api/runPlan/draft") +public class RunPlanDraftController { + + @Autowired + private IRunPlanDraftService iRunPlanDraftService; + + @ApiOperation(value = "创建运行图草稿") + @PostMapping(path = "") + public String create(@RequestBody @Validated(value = RunPlanCreateCheck.class) RunPlanVO runPlanVO, + @ApiIgnore @RequestAttribute UserVO user) { + return iRunPlanDraftService.create(runPlanVO, user); + } + + @ApiOperation(value = "自动生成运行图车次数据") + @PostMapping(path = "/{id}") + public RunPlanEChartsDataVO create(@RequestBody @Validated RunPlanInput runPlanInput, @PathVariable Long id) { + return iRunPlanDraftService.createCommon(id,runPlanInput); + } + + @ApiOperation(value = "修改运行图名称") + @PutMapping(path = "/{id}") + public void updateName(@PathVariable Long id, @RequestBody @Validated(value = RunPlanNameCheck.class) RunPlanVO runPlanVO, + @ApiIgnore @RequestAttribute UserVO user) { + iRunPlanDraftService.updateName(id, runPlanVO.getName(), user); + } + + @ApiOperation(value = "从模板运行图创建") + @PostMapping(path = "/createFrom/{templateId}") + public String createFrom(@PathVariable Long templateId, @RequestBody @Validated(value = RunPlanNameCheck.class) RunPlanVO runPlanVO, + @ApiIgnore @RequestAttribute UserVO user) { + return iRunPlanDraftService.createFrom(templateId, runPlanVO.getName(), user); + } + + @ApiOperation(value = "根据mapId查询运行图纵坐标车站节点") + @GetMapping(path = "/station/{mapId}") + public List selectOrdinateByMapId(@PathVariable Long mapId) { + return iRunPlanDraftService.selectOrdinateByMapId(mapId); + } + + @ApiOperation(value = "查询运行图的数据绘制运行图") + @GetMapping(path = "/{planId}") + public RunPlanEChartsDataVO selectDiagramData(@PathVariable Long planId) { + return iRunPlanDraftService.selectDiagramData(planId); + } + + @ApiOperation(value = "删除运行图") + @DeleteMapping(path = "/{planId}") + public void deleteDiagramDraftData(@PathVariable Long planId, @RequestAttribute UserVO user) { + iRunPlanDraftService.deleteDiagramDraftData(planId, user); + } + + @ApiOperation(value = "运行图草稿发布") + @PostMapping(path = "/{planId}/publish") + public List publish(@PathVariable Long planId, @RequestAttribute UserVO user) { + List checkedList = this.dataCheck(planId); + if(CollectionUtils.isEmpty(checkedList)) { + iRunPlanDraftService.publish(planId, user); + } + return checkedList; + } + + @ApiOperation(value = "导入真实运行图") + @PostMapping(path = "/{mapId}/prdPlan") + public void importPrdPlan(@PathVariable Long mapId, + @RequestBody @Validated ValidList runPlanImportList, + @ApiIgnore @RequestAttribute UserVO user) { + this.iRunPlanDraftService.importRunPlan(mapId, runPlanImportList, user); + } + + @ApiOperation(value = "查询地图下个人运行图列表") + @GetMapping(path = "/{mapId}/list") + public List queryListByMapId(@PathVariable Long mapId, @RequestAttribute UserVO user) { + return this.iRunPlanDraftService.queryListByMapId(mapId, user); + } + + @ApiOperation(value = "获取站间运行时间") + @GetMapping(path = "/{mapId}/stationRunning") + public List getStationRunningDate(@PathVariable Long mapId, @ApiIgnore @RequestAttribute UserVO user) { + return this.iRunPlanDraftService.getStationRunningDate(mapId, user); + } + + @ApiOperation(value = "设置站间运行时间") + @PutMapping(path = "/{mapId}/stationRunning") + public void setStationRunningTime(@PathVariable Long mapId, + @RequestBody List runPlanLevelVOList, + @ApiIgnore @RequestAttribute UserVO user) { + this.iRunPlanDraftService.setStationRunningTime(mapId, runPlanLevelVOList, user); + } + + @ApiOperation(value = "获取地图原始站间运行等级") + @GetMapping(path = "/{mapId}/stationRunLevel") + public List getStationRunningLevels(@PathVariable Long mapId) { + return this.iRunPlanDraftService.getStationRunLevel(mapId); + } + + @ApiOperation(value = "获取地图原始车站停站时间") + @GetMapping(path = "/{mapId}/stationParkingTime") + public List getStationParkingTimes(@PathVariable Long mapId) { + return this.iRunPlanDraftService.getStationParkingTimeList(mapId); + } + + @ApiOperation(value = "查询运行图服务号是否存在") + @GetMapping(path = "/{planId}/{serviceNumber}/service") + public boolean ifServerExists(@PathVariable Long planId, @PathVariable String serviceNumber) { + return this.iRunPlanDraftService.ifServerExists(planId, serviceNumber); + } + + @ApiOperation(value = "查询交路列表") + @GetMapping(path = "/{planId}/routingList") + public List getRoutingList(@PathVariable Long planId) { + return this.iRunPlanDraftService.getRoutingList(planId); + } + + @ApiOperation(value = "根据车次号查询交路") + @GetMapping(path = "/{planId}/routing") + public Object queryRoutingBySDTNumber(@PathVariable Long planId, String SDTNumber) { + return this.iRunPlanDraftService.queryRoutingBySDTNumber(planId, SDTNumber); + } + + @ApiOperation(value = "根据交路查询交路区段列表") + @GetMapping(path = "/{planId}/{routingCode}/routingSectionList") + public List getRoutingSectionList(@PathVariable Long planId, @PathVariable String routingCode) { + return this.iRunPlanDraftService.getRoutingSectionList(planId, routingCode); + } + + @ApiOperation(value = "增加计划") + @PostMapping(path = "/{planId}/service") + public void addRunPlanService(@PathVariable Long planId, + @RequestBody @Validated RunPlanServiceConfigVO serviceConfig, + @ApiIgnore @RequestAttribute UserVO user) { + this.iRunPlanDraftService.addRunPlanService(planId, serviceConfig, user); + } + + @ApiOperation(value = "修改计划") + @PutMapping(path = "/{planId}/service/{serviceNumber}") + public void updateRunPlanService(@PathVariable Long planId, + @PathVariable String serviceNumber, + @RequestBody @Validated RunPlanServiceConfigVO serviceConfig, + @ApiIgnore @RequestAttribute UserVO user) { + this.iRunPlanDraftService.updateRunPlanService(planId, serviceNumber, serviceConfig, user); + } + + @ApiOperation(value = "删除计划") + @DeleteMapping(path = "/{planId}/service/{serviceNumber}") + public void deleteRunPlanService(@PathVariable Long planId, + @PathVariable String serviceNumber, + @ApiIgnore @RequestAttribute UserVO user) { + this.iRunPlanDraftService.deleteRunPlanService(planId, serviceNumber, user); + } + + @ApiOperation(value = "复制计划") + @PostMapping(path = "/{planId}/service/{serviceNumber}") + public void copyRunPlanService(@PathVariable Long planId, + @PathVariable String serviceNumber, + @RequestBody RunPlanServiceConfigVO serviceConfig, + @ApiIgnore @RequestAttribute UserVO user) { + this.iRunPlanDraftService.copyRunPlanService(planId, serviceNumber, serviceConfig, user); + } + + @ApiOperation(value = "修改计划号") + @PutMapping(path = "/{planId}/service/{serviceNumber}/serviceNumber") + public void updateRunPlanService(@PathVariable Long planId, @PathVariable String serviceNumber, String newServiceNumber) { + this.iRunPlanDraftService.updateRunPlanServiceNumber(planId, serviceNumber, newServiceNumber); + } + + @ApiOperation(value = "增加任务") + @PostMapping(path = "/{planId}/{serviceNumber}/trip") + public void addRunPlanTrip(@PathVariable Long planId, @PathVariable String serviceNumber, + @RequestBody @Validated RunPlanTripConfigVO tripConfig, + @ApiIgnore @RequestAttribute UserVO user) { + this.iRunPlanDraftService.addRunPlanTrip(planId, serviceNumber, tripConfig, user); + } + + @ApiOperation(value = "修改任务") + @PutMapping(path = "/{planId}/trip/{SDTNumber}") + public void updateRunPlanTrip(@PathVariable Long planId, @PathVariable String SDTNumber, + @RequestBody @Validated RunPlanTripConfigVO tripConfig, + @ApiIgnore @RequestAttribute UserVO user) { + this.iRunPlanDraftService.updateRunPlanTrip(planId, SDTNumber, tripConfig, user); + } + + @ApiOperation(value = "修改任务车次号") + @PutMapping(path = "/{planId}/trip/{SDTNumber}/tripNumber") + public void updateRunPlanTripNumber(@PathVariable Long planId, @PathVariable String SDTNumber,String tripNumber) { + this.iRunPlanDraftService.updateRunPlanTripNumber(planId, SDTNumber, tripNumber); + } + + @ApiOperation(value = "删除任务") + @DeleteMapping(path = "/{planId}/trip/{SDTNumber}") + public void deleteRunPlanTrip(@PathVariable Long planId, @PathVariable String SDTNumber, boolean deleteBefore, + @ApiIgnore @RequestAttribute UserVO user) { + this.iRunPlanDraftService.deleteRunPlanTrip(planId, SDTNumber, deleteBefore, user); + } + + //TODO + @ApiOperation(value = "有效性检查") + @GetMapping (path = "/{planId}/check") + public List dataCheck(@PathVariable Long planId) { + return this.iRunPlanDraftService.dataCheck(planId); + } + + //Temp use + @Role(RoleEnum.SuperAdmin) + @ApiOperation(value = "手动删除折返轨时刻数据") + @PutMapping(path = "/{planId}/removeTBTrackTripTime") + public void removeTBTrackTripTime(@PathVariable Long planId) { + this.iRunPlanDraftService.removeTBTrackTripTime(planId); + } + + @ApiOperation(value = "运行图仿真测试") + @GetMapping (path = "/{planId}/simulation") + public String simulationCheck(@PathVariable Long planId, @ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) + LoginUserInfoVO loginUserInfoVO) { + List checkedList = this.dataCheck(planId); + if(CollectionUtils.isEmpty(checkedList)) { + return this.iRunPlanDraftService.simulationCheck(planId, loginUserInfoVO); + } + return null; + } +} diff --git a/src/main/java/club/joylink/rtss/controller/RunPlanToolsController.java b/src/main/java/club/joylink/rtss/controller/RunPlanToolsController.java new file mode 100644 index 000000000..eaabf6634 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/RunPlanToolsController.java @@ -0,0 +1,172 @@ +package club.joylink.rtss.controller; + +import club.joylink.rtss.services.rpTools.RunPlanToolsService; +import club.joylink.rtss.vo.client.rpTools.AreaVO; +import club.joylink.rtss.vo.client.rpTools.MapStationVO; +import club.joylink.rtss.vo.client.rpTools.MapVO; +import club.joylink.rtss.vo.client.rpTools.RunPlanConfigVO; +import club.joylink.rtss.vo.client.rpTools.RunPlanDataVO; +import club.joylink.rtss.vo.client.rpTools.RunPlanGroupVO; +import club.joylink.rtss.vo.client.rpTools.TripAddVO; +import club.joylink.rtss.vo.client.rpTools.TripChangeVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +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 java.util.List; + +@Api(tags = "运行图工具接口") +@RestController +@RequestMapping(path = "/api/rpTools") +public class RunPlanToolsController { + + @Autowired + private RunPlanToolsService runPlanToolsService; + + @ApiOperation(value = "查询线路列表") + @GetMapping(path = "/map") + public List listMap() { + return runPlanToolsService.listMap(); + } + + @ApiOperation(value = "查询线路车站列表") + @GetMapping(path = "/{mapId}/station") + public List listMapStation(@PathVariable Long mapId) { + return runPlanToolsService.listMapStation(mapId); + } + + @ApiOperation(value = "更新线路车站") + @PutMapping(path = "/station/{stationId}") + public void updateStation(@PathVariable Long stationId, @RequestBody MapStationVO stationVO) { + runPlanToolsService.updateStation(stationId, stationVO); + } + + @ApiOperation(value = "查询运行图列表") + @GetMapping(path = "") + public List listRunPlan() { + return runPlanToolsService.listRunPlan(); + } + + @ApiOperation(value = "创建新运行图") + @PostMapping(path = "") + public Long create(@RequestBody @Validated RunPlanGroupVO groupVO) { + return runPlanToolsService.create(groupVO); + } + + @ApiOperation(value = "获取运行图数据") + @GetMapping(path = "/{planId}") + public RunPlanDataVO getRunPlanECharts(@PathVariable Long planId) { + return runPlanToolsService.getRunPlanECharts(planId); + } + + @ApiOperation(value = "获取运行图配置") + @GetMapping(path = "/{planId}/config") + public RunPlanConfigVO getRunPlanConfig(@PathVariable Long planId) { + return runPlanToolsService.getRunPlanConfig(planId); + } + + @ApiOperation(value = "修改运行图配置") + @PutMapping(path = "/{planId}/config") + public void setRunPlanConfig(@PathVariable Long planId, @RequestBody RunPlanConfigVO configVO) { + runPlanToolsService.setRunPlanConfig(planId, configVO); + } + + @ApiOperation(value = "编辑运行图") + @PutMapping(path = "/{planId}/edit") + public Boolean editPlan(@PathVariable Long planId) { + return runPlanToolsService.editPlan(planId); + } + + @ApiOperation(value = "结束编辑") + @PutMapping(path = "/{planId}/endEdit") + public void endEdit(@PathVariable Long planId) { + runPlanToolsService.endEdit(planId); + } + + @ApiOperation(value = "添加车次") + @PostMapping(path = "/{planId}/trip") + public void addTrip(@PathVariable Long planId, @RequestBody @Validated TripAddVO tripAddVO) { + runPlanToolsService.addTrip(planId, tripAddVO); + } + + @ApiOperation(value = "修改站间运行时间") + @PutMapping(path = "/{planId}/{tripNo}/running") + public void changeArrivalTime(@PathVariable Long planId, @PathVariable Integer tripNo, @RequestBody @Validated TripChangeVO tripChangeVO) { + runPlanToolsService.changeRunningTime(planId, tripNo, tripChangeVO); + } + + @ApiOperation(value = "修改停站时间") + @PutMapping(path = "/{planId}/{tripNo}/stop") + public void changeDepartureTime(@PathVariable Long planId, @PathVariable Integer tripNo, @RequestBody @Validated TripChangeVO tripChangeVO) { + runPlanToolsService.changeStopTime(planId, tripNo, tripChangeVO); + } + + @ApiOperation(value = "平移服务") + @PutMapping(path = "/{planId}/{serviceNo}/service") + public void changeServiceTime(@PathVariable Long planId, @PathVariable Integer serviceNo, @RequestBody TripChangeVO tripChangeVO) { + runPlanToolsService.changeServiceTime(planId, serviceNo, tripChangeVO); + } + + @ApiOperation(value = "修改折返时间") + @PutMapping(path = "/{planId}/{tripNo}/turnBack") + public void changeTurnBackTime(@PathVariable Long planId, @PathVariable Integer tripNo, @RequestBody TripChangeVO tripChangeVO) { + runPlanToolsService.changeTurnBackTime(planId, tripNo, tripChangeVO); + } + + @ApiOperation(value = "删除车次") + @DeleteMapping(path = "/{planId}/{tripNo}/trip") + public void deleteTrip(@PathVariable Long planId, @PathVariable Integer tripNo) { + runPlanToolsService.deleteTrip(planId, tripNo); + } + + @ApiOperation(value = "删除服务") + @DeleteMapping(path = "/{planId}/{serviceNo}/service") + public void deleteService(@PathVariable Long planId, @PathVariable Integer serviceNo) { + runPlanToolsService.deleteService(planId, serviceNo); + } + + @ApiOperation(value = "添加施工区域") + @PostMapping(path = "/{planId}/area") + public void addArea(@PathVariable Long planId, @RequestBody @Validated AreaVO areaVO) { + runPlanToolsService.addArea(planId, areaVO); + } + + @ApiOperation(value = "修改区域") + @PutMapping(path = "/{planId}/{areaNo}/area") + public void changeArea(@PathVariable Long planId, @PathVariable Integer areaNo, @RequestBody @Validated AreaVO areaVO) { + runPlanToolsService.changeArea(planId, areaNo, areaVO); + } + + @ApiOperation(value = "修改区域文字") + @PutMapping(path = "/{planId}/{areaNo}/text") + public void changeAreaText(@PathVariable Long planId, @PathVariable Integer areaNo, @RequestBody AreaVO areaVO) { + runPlanToolsService.changeAreaText(planId, areaNo, areaVO); + } + + @ApiOperation(value = "删除区域") + @DeleteMapping(path = "/{planId}/{areaNo}/area") + public void deleteArea(@PathVariable Long planId, @PathVariable Integer areaNo) { + runPlanToolsService.deleteArea(planId, areaNo); + } + + @ApiOperation(value = "清除数据") + @PutMapping(path = "/{planId}/clear") + public void clear(@PathVariable Long planId) { + runPlanToolsService.clear(planId); + } + + @ApiOperation(value = "删除运行图") + @DeleteMapping(path = "/{groupId}") + public void delete(@PathVariable Long groupId) { + runPlanToolsService.delete(groupId); + } +} diff --git a/src/main/java/club/joylink/rtss/controller/SchedulingPlanController.java b/src/main/java/club/joylink/rtss/controller/SchedulingPlanController.java new file mode 100644 index 000000000..04efe41df --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/SchedulingPlanController.java @@ -0,0 +1,92 @@ +package club.joylink.rtss.controller; + +import club.joylink.rtss.services.ISchedulingPlanService; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.scheduling.SchedulingCheckResult; +import club.joylink.rtss.vo.client.scheduling.SchedulingPlanVO; +import club.joylink.rtss.vo.client.scheduling.SchedulingTrainEditVO; +import club.joylink.rtss.vo.client.scheduling.TrainBaseInfoVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.validation.constraints.NotBlank; +import java.time.LocalDate; +import java.util.List; + +@Api(tags = { "派班计划接口" }) +@RestController +@RequestMapping(path = "/api/scheduling") +public class SchedulingPlanController { + + @Autowired + private ISchedulingPlanService iSchedulingPlanService; + + @ApiOperation(value = "创建派班计划仿真") + @PostMapping(path = "/simulation") + public String schedulingPlanSimulation(@RequestParam Long mapId, + @RequestParam String prdType, + @ApiIgnore @RequestAttribute UserVO user) { + return this.iSchedulingPlanService.schedulingPlanSimulation(mapId, prdType, user); + } + + @ApiOperation(value = "查询某天的派班计划") + @GetMapping(path = "/{group}/day") + public SchedulingPlanVO findSchedulingPlanOfDay(@PathVariable @NotBlank String group, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate day, + @ApiIgnore @RequestAttribute UserVO user) { + return this.iSchedulingPlanService.findSchedulingPlan(group, day, user); + } + + @ApiOperation(value = "生成某天的基础派班计划") + @PostMapping(path = "/{group}/generate") + public SchedulingPlanVO generateBaseSchedulingPlanOfDay(@PathVariable @NotBlank String group, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate day, + @ApiIgnore @RequestAttribute UserVO user) { + return this.iSchedulingPlanService.generateBaseSchedulingPlanOfDay(group, day, user); + } + + @ApiOperation(value = "获取所有列车") + @GetMapping(path = "/{group}/train/all") + public List getAllTrains(@PathVariable @NotBlank String group) { + return this.iSchedulingPlanService.getAllTrains(group); + } + + @ApiOperation(value = "检查派班计划冲突") + @PostMapping(path = "/{group}/check") + public SchedulingCheckResult checkConflict(@PathVariable @NotBlank String group, + @Validated @RequestBody List editVOList) { + return this.iSchedulingPlanService.checkConflict(group, editVOList); + } + + @ApiOperation(value = "保存派班计划数据") + @PostMapping(path = "/{group}/save") + public void saveSchedulingPlan(@PathVariable @NotBlank String group, + @Validated @RequestBody List editVOList) { + this.iSchedulingPlanService.saveSchedulingPlan(group, editVOList); + } + + @ApiOperation(value = "删除派班计划,并重新生成基础计划") + @DeleteMapping(path = "/{group}/rebuild") + public SchedulingPlanVO deleteAndRebuildSchedulingPlan(@PathVariable @NotBlank String group, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate day, + @ApiIgnore @RequestAttribute UserVO user) { + return this.iSchedulingPlanService.deleteAndRebuildSchedulingPlan(group, day, user); + } + + @ApiOperation(value = "生成地图通用派班计划") + @PostMapping(path = "/common/generate") + public void generateMapCommonSchedulingPlan(Long mapId, @ApiIgnore @RequestAttribute UserVO user) { + this.iSchedulingPlanService.generateMapCommonSchedulingPlan(mapId, user); + } + + @ApiOperation(value = "生成所有已发布地图的通用派班计划", hidden = true) + @PostMapping(path = "/common/generate/all") + public void generateCommonSchedulingPlan(@ApiIgnore @RequestAttribute UserVO user) { + this.iSchedulingPlanService.generateCommonSchedulingPlan(user); + } +} diff --git a/src/main/java/club/joylink/rtss/controller/ScriptController.java b/src/main/java/club/joylink/rtss/controller/ScriptController.java new file mode 100644 index 000000000..d99f68d3f --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/ScriptController.java @@ -0,0 +1,42 @@ +package club.joylink.rtss.controller; + +import club.joylink.rtss.services.IScriptService; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.script.ScriptQueryVO; +import club.joylink.rtss.vo.client.script.ScriptVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +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 javax.validation.constraints.NotNull; + +@Api(tags = { "仿真剧本接口" }) +@RestController +@RequestMapping(path = "/api/script") +public class ScriptController { + + @Autowired + private IScriptService iScriptService; + + @ApiOperation(value = "分页查询上线的剧本") + @GetMapping(path = "/paging/online") + public PageVO pagingQueryOnlineScript(ScriptQueryVO scriptQueryVO) { + return iScriptService.pagingQueryOnlineScript(scriptQueryVO); + } + + @ApiOperation(value = "通过id查询剧本详细信息") + @GetMapping(path = "/{id}/detail") + public ScriptVO getDetailInfoById(@PathVariable @NotNull Long id) { + return iScriptService.getDetailForClientById(id); + } + +// @ApiOperation(value = "分页查询已经发布的剧本") +// @GetMapping(path = "/paging/published") +// public PageVO queryPublishedScript(ScriptQueryVO queryVO){ +// return iScriptService.queryPublishedScript(queryVO); +// } +} diff --git a/src/main/java/club/joylink/rtss/controller/ScriptDraftController.java b/src/main/java/club/joylink/rtss/controller/ScriptDraftController.java new file mode 100644 index 000000000..1ed78bf1c --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/ScriptDraftController.java @@ -0,0 +1,83 @@ +package club.joylink.rtss.controller; + +import club.joylink.rtss.simulation.cbtc.script.ScriptUpdateVO; +import club.joylink.rtss.entity.ScriptDraftWithBLOBs; +import club.joylink.rtss.services.IScriptDraftService; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageQueryVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.script.ScriptNewVO; +import club.joylink.rtss.vo.client.script.ScriptVO; +import club.joylink.rtss.vo.client.validGroup.ScriptCreateCheck; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +@Api(tags = { "草稿剧本接口" }) +@RestController +@RequestMapping(path = "/api/script/draft") +public class ScriptDraftController { + + @Autowired + private IScriptDraftService iScriptDraftService; + + @ApiOperation(value = "分页查询地图下个人的剧本列表") + @GetMapping(path = "/{mapId}/list") + public PageVO listByMapIdOfUser(@PathVariable Long mapId, PageQueryVO queryVO, + @ApiIgnore @RequestAttribute UserVO user) { + return iScriptDraftService.queryPagedScript(mapId, user, queryVO); + } + + @ApiOperation(value = "创建剧本") + @PostMapping(path = "") + public String createScript(@RequestBody @Validated(value = ScriptCreateCheck.class) ScriptVO scriptVO, + @ApiIgnore @RequestAttribute UserVO user) { + return iScriptDraftService.createScript(scriptVO, user); + } + + @ApiOperation(value = "通过id查询剧本基础信息") + @GetMapping(path = "/{id}") + public ScriptNewVO getBasicInfoById(@PathVariable Long id) { + return iScriptDraftService.getBasicInfo(id); + } + + @ApiOperation(value = "修改剧本基本信息") + @PutMapping(path = "/{id}") + public void updateScriptBasicInfo(@PathVariable Long id, @RequestBody @Validated ScriptUpdateVO updateVO, + @ApiIgnore @RequestAttribute UserVO user) { + iScriptDraftService.updateScriptInfo(id, updateVO, user); + } + + @ApiOperation(value = "根据id删除剧本") + @DeleteMapping(path = "/{id}") + public void deleteScriptById(@PathVariable Long id, @ApiIgnore @RequestAttribute UserVO user) { + iScriptDraftService.deleteScript(id, user); + } + + @ApiOperation(value = "剧本发布") + @PutMapping(path = "/{id}/publish") + public void publish(@PathVariable Long id, @RequestBody String name, @RequestAttribute UserVO user){ + iScriptDraftService.publish(id, name, user); + } + + @ApiOperation(value = "剧本撤销发布") + @PutMapping(path = "/{id}/retract") + public void retract(@PathVariable Long id, @RequestAttribute UserVO user){ + iScriptDraftService.retract(id, user); + } + + @ApiOperation("导出剧本数据") + @GetMapping("/{id}/export") + public ScriptDraftWithBLOBs export(@PathVariable Long id) { + return iScriptDraftService.export(id); + } + + @ApiOperation("导入剧本数据") + @PostMapping("/{mapId}/import") + public void importFromJson(@PathVariable Long mapId, String name, @RequestBody ScriptDraftWithBLOBs scriptDraft, @RequestAttribute UserVO user) { + iScriptDraftService.importFromJson(mapId, name, scriptDraft, user); + } +} diff --git a/src/main/java/club/joylink/rtss/controller/SimulationManageOldController.java b/src/main/java/club/joylink/rtss/controller/SimulationManageOldController.java new file mode 100644 index 000000000..dc9ddf02c --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/SimulationManageOldController.java @@ -0,0 +1,40 @@ +package club.joylink.rtss.controller; + +import com.joylink.base.exception.BusinessException; +import com.joylink.base.exception.constant.ExceptionMapping; +import club.joylink.rtss.services.ISimulationService; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.SimulationVO; +import club.joylink.rtss.vo.client.simulation.SimulationPageQueryVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.validation.constraints.NotBlank; + +@Api(tags = { "仿真管理接口" }) +@RestController +@RequestMapping(path = "/api/simulation/manage") +public class SimulationManageOldController { + + @Autowired + private ISimulationService iSimulationService; + + @ApiOperation(value = "分页查询存在的仿真") + @GetMapping(path = "/page") + public PageVO pageQueryExistSimulations(SimulationPageQueryVO queryVO, @ApiIgnore @RequestAttribute UserVO user) { + if(!user.isAdmin()) return null; + return this.iSimulationService.pageQueryExistSimulations(queryVO); + } + + @ApiOperation(value = "结束仿真") + @DeleteMapping(path = "/{group}") + public void overSimulation(@PathVariable @NotBlank String group, @ApiIgnore @RequestAttribute UserVO user) { + if(!user.isSuperAdmin()) throw new BusinessException(ExceptionMapping.ROLE_OPERATION_REFUSE); + this.iSimulationService.adminForceClearSimulation(group); + } + +} diff --git a/src/main/java/club/joylink/rtss/controller/SimulationRecordController.java b/src/main/java/club/joylink/rtss/controller/SimulationRecordController.java new file mode 100644 index 000000000..04265bf61 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/SimulationRecordController.java @@ -0,0 +1,69 @@ +package club.joylink.rtss.controller; + +import club.joylink.rtss.services.ISimulationRecordService; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageQueryVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.SimulationRecordVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +@Api(tags = { "仿真记录管理接口" }) +@RestController +@RequestMapping(path = "/api/simulationRecord") +public class SimulationRecordController { + + @Autowired + private ISimulationRecordService iSimulationRecordService; + + @ApiOperation(value = "分页查询仿真记录") + @GetMapping(path = "") + public PageVO queryPagedRecord(PageQueryVO queryVO) { + return this.iSimulationRecordService.queryPagedRecord(queryVO); + } + + @ApiOperation(value = "回放") + @GetMapping(path = "/{id}/playBack") + public void playBack(@PathVariable Long id, @RequestAttribute @ApiIgnore UserVO user) { + this.iSimulationRecordService.playBack(id, user); + } + + @ApiOperation(value = "设置播放速度") + @PutMapping(path = "/{id}/playSpeed") + public void setPlaySpeed(@PathVariable Long id, float playSpeed, @RequestAttribute @ApiIgnore UserVO user) { + this.iSimulationRecordService.setPlaySpeed(id, playSpeed, user); + } + + @ApiOperation(value = "暂停") + @PutMapping(path = "/{id}/pause") + public void pause(@PathVariable Long id, @RequestAttribute @ApiIgnore UserVO user) { + this.iSimulationRecordService.pause(id, user); + } + + @ApiOperation(value = "播放") + @PutMapping(path = "/{id}/play") + public void play(@PathVariable Long id, @RequestAttribute @ApiIgnore UserVO user) { + this.iSimulationRecordService.play(id, user); + } + + @ApiOperation(value = "设置播放时间点") + @PutMapping(path = "/{id}/playTime") + public void setPlayTime(@PathVariable Long id, Long offsetSeconds, @RequestAttribute @ApiIgnore UserVO user) { + this.iSimulationRecordService.setPlayTime(id, offsetSeconds, user); + } + + @ApiOperation(value = "结束") + @PutMapping(path = "/{id}/over") + public void over(@PathVariable Long id, @RequestAttribute @ApiIgnore UserVO user) { + this.iSimulationRecordService.over(id, user); + } + + @ApiOperation(value = "删除记录") + @DeleteMapping(path = "/{id}") + public void delete(@PathVariable Long id, @RequestAttribute @ApiIgnore UserVO user) { + this.iSimulationRecordService.delete(id, user); + } +} diff --git a/src/main/java/club/joylink/rtss/controller/SysNoticeController.java b/src/main/java/club/joylink/rtss/controller/SysNoticeController.java new file mode 100644 index 000000000..83e110d2c --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/SysNoticeController.java @@ -0,0 +1,62 @@ +package club.joylink.rtss.controller; + +import club.joylink.rtss.constants.RoleEnum; +import club.joylink.rtss.controller.advice.Role; +import club.joylink.rtss.services.notice.ISystemNoticeService; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.notice.SysNoticePageQueryVO; +import club.joylink.rtss.vo.client.notice.SystemNoticeVO; +import club.joylink.rtss.vo.client.notice.UserSysnoticeUnreadVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; + +@Api(tags = {"系统通知接口"}) +@RestController +@RequestMapping(path = "api/v1/sysNotice") +public class SysNoticeController { + + @Autowired + private ISystemNoticeService systemNoticeService; + + @ApiOperation(value = "通知") + @PostMapping + @Role(RoleEnum.SuperAdmin) + public void notice(@ApiIgnore @RequestAttribute UserVO user, String noticeType, @RequestBody @Validated SystemNoticeVO sysNotice) { + sysNotice.setCreator(user.getId()); + systemNoticeService.notice(sysNotice, noticeType); + } + + @ApiOperation(value = "分页查询通知") + @GetMapping(path = "/paging") + public PageVO pagingQuery(SysNoticePageQueryVO pageQueryVO) { + return systemNoticeService.pagingQuerySysNotice(pageQueryVO); + } + + @ApiOperation(value = "删除通知") + @DeleteMapping + @Role(RoleEnum.SuperAdmin) + public void deleteSysNotice(@RequestBody List sysNoticeIds) { + systemNoticeService.deleteSysNotice(sysNoticeIds); + } + + @ApiOperation(value = "用户查询未读通知") + @GetMapping(path = "/unread") + public UserSysnoticeUnreadVO loadCompetitionPaper(@ApiIgnore @RequestAttribute UserVO user) { + + return systemNoticeService.getUserRelUnreadNotice(user); + } + + @ApiOperation(value = "用户设置已读未读") + @PutMapping(path = "/read") + public void getCompetitionPaper(@ApiIgnore @RequestAttribute UserVO user, @RequestBody List sysNoticeIds, @RequestParam(defaultValue = "true",required = false) boolean read) { + systemNoticeService.setUserSysNoticeReadStatus(user, sysNoticeIds, read); + } + +} diff --git a/src/main/java/club/joylink/rtss/controller/TaskController.java b/src/main/java/club/joylink/rtss/controller/TaskController.java new file mode 100644 index 000000000..46286204c --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/TaskController.java @@ -0,0 +1,48 @@ +package club.joylink.rtss.controller; + +import club.joylink.rtss.services.ITaskService; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.TaskListVO; +import club.joylink.rtss.vo.client.TaskQueryVO; +import club.joylink.rtss.vo.client.TaskVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +@Api(tags = { "任务接口" }) +@RestController +@RequestMapping(path = "/api/task") +public class TaskController { + + @Autowired + private ITaskService iTaskService; + + @ApiOperation(value = "分页查询任务数据") + @GetMapping(path = "") + public PageVO queryPagedTask(TaskQueryVO queryVO) { + return this.iTaskService.queryPagedTask(queryVO); + } + + @ApiOperation(value = "创建任务") + @PostMapping(path = "") + public void createTask(@RequestBody @Validated TaskVO taskVO, @ApiIgnore @RequestAttribute UserVO user) { + this.iTaskService.createTask(taskVO, user); + } + + @ApiOperation(value = "开始任务") + @PostMapping(path = "/{id}/execute") + public void start(@PathVariable Long id) { + this.iTaskService.execute(id); + } + + @ApiOperation(value = "取消任务") + @PostMapping(path = "/{id}/cancel") + public void cancel(@PathVariable Long id) { + this.iTaskService.cancel(id); + } + +} diff --git a/src/main/java/club/joylink/rtss/controller/UserController.java b/src/main/java/club/joylink/rtss/controller/UserController.java new file mode 100644 index 000000000..9d5112d02 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/UserController.java @@ -0,0 +1,145 @@ +package club.joylink.rtss.controller; + +import club.joylink.rtss.constants.RoleEnum; +import club.joylink.rtss.controller.advice.Role; +import club.joylink.rtss.services.ISysUserService; +import club.joylink.rtss.services.local.UserGenerateService; +import club.joylink.rtss.services.student.IClassStudentUserService; +import club.joylink.rtss.vo.UserQueryVO; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.UserConfigVO; +import club.joylink.rtss.vo.client.UserSubscribeVO; +import club.joylink.rtss.vo.client.map.MapVO; +import club.joylink.rtss.vo.client.student.ExportStudentInfo; +import club.joylink.rtss.vo.client.student.ImportStudentInfo; +import club.joylink.rtss.vo.client.student.StudentClassVO; +import club.joylink.rtss.vo.client.student.StudentInfoExportParam; +import club.joylink.rtss.vo.client.user.WeChatBindStatusVO; +import club.joylink.rtss.vo.user.UserGenerateConfigVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.validation.constraints.NotBlank; +import java.util.List; + +@Api(tags = { "用户配置接口" }) +@RestController +@RequestMapping("/api/user") +public class UserController { + + @Autowired + private ISysUserService iSysUserService; + + @Autowired + private UserGenerateService userGenerateService; + + @Autowired + private IClassStudentUserService iClassStudentUserService; + + @ApiOperation(value = "更新用户配置") + @PostMapping(path = "/config") + public void saveUserConfig(@RequestBody @Validated List userConfigVOList, @RequestAttribute @ApiIgnore UserVO user) { + this.iSysUserService.saveUserConfig(user.getId(), userConfigVOList); + } + + @ApiOperation(value = "获取用户配置") + @GetMapping(path = "/config") + public List getUserConfig(@RequestAttribute @ApiIgnore UserVO user) { + return this.iSysUserService.getUserConfig(user.getId()); + } + + @Role({RoleEnum.SuperAdmin}) + @ApiOperation(value = "生成线下环境用户") + @PostMapping(path = "/generate/offline") + public void generateOfflineUsers(@RequestBody @Validated UserGenerateConfigVO generateConfigVO, + @RequestAttribute @ApiIgnore UserVO user) { + this.userGenerateService.generateOfflineUser(generateConfigVO, user); + } + + @Role({RoleEnum.Admin, RoleEnum.SuperAdmin}) + @ApiOperation(value = "分页获取用户数据") + @GetMapping(path = "") + public PageVO queryPagedUser(UserQueryVO queryVO) { + return this.iSysUserService.queryPagedUser(queryVO); + } + + @Role(RoleEnum.SuperAdmin) + @ApiOperation(value = "修改用户角色") + @PutMapping(path = "/{id}/role") + public void updateUserRole(@PathVariable Long id, @RequestBody UserVO userVO, @RequestAttribute @ApiIgnore UserVO user) { + this.iSysUserService.updateUserRole(id, user.getId(), userVO); + } + + @Role(RoleEnum.SuperAdmin) + @ApiOperation(value = "修改用户单位") + @PutMapping(path = "/{id}/company") + public void updateUserCompany(@PathVariable Long id, @RequestBody UserVO userVO, @RequestAttribute @ApiIgnore UserVO user) { + this.iSysUserService.updateUserCompany(id, user.getId(), userVO); + } + + @Role(RoleEnum.SuperAdmin) + @ApiOperation(value = "管理员修改用户信息") + @PutMapping(path = "/{id}/info") + public void updateUserInfo(@PathVariable Long id, @RequestBody UserVO userVO, @RequestAttribute @ApiIgnore UserVO user) { + this.iSysUserService.updateUserInfo(id, user.getId(), userVO); + } + + @ApiOperation(value = "修改用户密码") + @PutMapping(path = "/{id}/password") + public void updateUserPassword(@PathVariable Long id, @RequestBody UserVO userVO, @RequestAttribute @ApiIgnore UserVO user) { + this.iSysUserService.updateUserPassword(id, userVO.getPassword()); + } + + @ApiOperation(value = "获取微信小程序绑定二维码") + @GetMapping(path = "/bind/wm/url") + public WeChatBindStatusVO getWeChatBindUrl(@RequestAttribute @ApiIgnore UserVO user) { + return this.iSysUserService.getWeChatBindUrl(user); + } + + @ApiOperation(value = "用户绑定微信小程序") + @PutMapping(path = "/bind/wm") + public void userBindWm(String code, Long userId) { + this.iSysUserService.userBindWm(code, userId); + } + + @ApiOperation(value = "微信小程用户绑定单位") + @PutMapping(path = "/bind/company") + public void userBindCompany(Long userId, Integer companyId) { + this.iSysUserService.userBindCompany(userId, companyId); + } + + @ApiOperation(value = "获取用户总数量") + @GetMapping(path = "/amount") + public int getUserAmount() { + return iSysUserService.getUserAmount(); + } + + @ApiOperation(value = "分页获取用户数据(模糊查询)") + @GetMapping(path = "/fuzzy") + public List fuzzyQueryPagedUser(@NotBlank(message = "参数不能为空") String fuzzyParam) { + return this.iSysUserService.fuzzyQueryPagedUser(fuzzyParam); + } + + @ApiOperation(value="贵州装备制造导入学生信息接口") + @PostMapping(path="/project/{projectCode}/import/student") + public void importStudents(@PathVariable String projectCode, @Validated @RequestBody ImportStudentInfo importStudentInfo, @RequestAttribute @ApiIgnore UserVO user){ + this.iClassStudentUserService.importStudentInfos(projectCode, importStudentInfo, user); + } + + @ApiOperation(value="贵州装备制造导出学生信息及成绩接口") + @PutMapping(path="/project/{projectCode}/export/student") + public List importStudents(@PathVariable String projectCode, @Validated @RequestBody StudentInfoExportParam infoExportParam){ + return this.iClassStudentUserService.studentInfoStatistics(infoExportParam); + } + + @ApiOperation(value="贵州装备制造查询对应的班级") + @GetMapping(path="/project/{projectCode}/classes") + public List getClasses(@PathVariable String projectCode){ + return this.iClassStudentUserService.getClassesByProjectCode(projectCode); + } +} diff --git a/src/main/java/club/joylink/rtss/controller/UserExamController.java b/src/main/java/club/joylink/rtss/controller/UserExamController.java new file mode 100644 index 000000000..05cea1f5e --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/UserExamController.java @@ -0,0 +1,71 @@ +package club.joylink.rtss.controller; + +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import club.joylink.rtss.services.IUserExamService; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import springfox.documentation.annotations.ApiIgnore; + +@Api(tags = { "用户考试接口" }) +@RestController +@RequestMapping("/api/userExam") +public class UserExamController { + + @Autowired + private IUserExamService iUserExamService; + + @ApiOperation(value = "生成用户考试实例") + @GetMapping(path = "/{examId}/generate") + public UserExamVO generateExamInstance(@PathVariable long examId, @ApiIgnore @RequestAttribute UserVO user) { + return this.iUserExamService.generateExamInstance(examId, user); + } + + @ApiOperation(value = "获取用户考试实例") + @GetMapping(path = "/{id}") + public UserExamVO getExamInstance(@PathVariable long id, @ApiIgnore @RequestAttribute UserVO user) { + return this.iUserExamService.getExamInstance(id, user); + } + + @ApiOperation(value = "完成考试题目") + @PutMapping(path = "/finish") + public void finish(@RequestBody @Validated UserExamQuestionsVO userExamQuestionsVO, + @ApiIgnore @RequestAttribute UserVO user) { + this.iUserExamService.finish(userExamQuestionsVO, user); + } + + @ApiOperation(value = "提交考试") + @PutMapping(path = "/{id}/submit") + public UserExamVO submit(@PathVariable long id, @ApiIgnore @RequestAttribute UserVO user) { + return this.iUserExamService.submit(id, user); + } + + @ApiOperation(value = "放弃考试") + @PutMapping(path = "/{id}/abandon") + public void abandon(@PathVariable long id, @ApiIgnore @RequestAttribute UserVO user) { + this.iUserExamService.abandon(id, user); + } + + @ApiOperation(value = "分页查询用户考试数据") + @GetMapping(path = "/list") + public PageVO queryPagedUserExam(UserExamQueryVO queryVO) { + return this.iUserExamService.queryPagedUserExam(queryVO); + } + + @ApiOperation(value = "修改用户考试数据") + @PutMapping(path = "/{id}") + public void updateUserExam(@PathVariable Long id, @RequestBody UserExamVO userExamVO, @ApiIgnore @RequestAttribute UserVO user) { + this.iUserExamService.updateUserExam(id, userExamVO, user); + } + + @ApiOperation(value = "删除用户考试数据") + @DeleteMapping(path = "/{id}") + public void queryPagedUserExam(@PathVariable Long id, @ApiIgnore @RequestAttribute UserVO user) { + this.iUserExamService.deleteUserExam(id, user); + } +} diff --git a/src/main/java/club/joylink/rtss/controller/UserInfoController.java b/src/main/java/club/joylink/rtss/controller/UserInfoController.java new file mode 100644 index 000000000..95318b47a --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/UserInfoController.java @@ -0,0 +1,104 @@ +package club.joylink.rtss.controller; + +import club.joylink.rtss.services.ISysUserService; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.user.MobileInfoVO; +import club.joylink.rtss.vo.client.user.UpdateEmailVO; +import club.joylink.rtss.vo.client.user.UpdateMobileVO; +import club.joylink.rtss.vo.client.user.UpdatePasswordVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +@Api(tags = { "用户信息接口" }) +@RestController +@RequestMapping("/api/userinfo") +public class UserInfoController { + + @Autowired + private ISysUserService iSysUserService; + + @ApiOperation(value = "根据姓名或电话号查询用户") + @GetMapping(path="/nameOrMobile") + public List queryUserByNameOrMobile(String query) { + List list = this.iSysUserService.queryUserByNameOrMobile(query); + return list; + } + + @ApiOperation(value = "根据用户id获取用户信息") + @GetMapping(path = "/{id}") + public UserVO getUserBaseInfoById(@PathVariable Long id) { + return this.iSysUserService.getUserBaseInfoById(id); + } + + @ApiOperation(value = "修改用户信息") + @PutMapping(path = "/{id}") + public void modify(@PathVariable Long id, @RequestBody UserVO userInfo, String vdcode) { + this.iSysUserService.modify(id, userInfo, vdcode); + } + + @ApiOperation(value = "微信关注事件") + @GetMapping(path = "/wxsubscribe") + public void wxSubscribe(@RequestParam String wxId) { + iSysUserService.wxSubscribeEventHandle(wxId); + } + + @ApiOperation(value = "批量修改用户的openId为unionId") + @PutMapping(path = "/batchchange/unionid") + public void batchChangeOpenId2UnionId() { + this.iSysUserService.batchChangeOpenId2UnionId(); + } + + @ApiOperation(value = "更新用户真实姓名") + @PutMapping(path = "/{id}/name") + public void updateName(@PathVariable Long id, String name) { + this.iSysUserService.updateUserName(id, name); + } + + @ApiOperation(value = "更新用户昵称") + @PutMapping(path = "/{id}/nickname") + public void updateNickname(@PathVariable Long id, String nickname) { + this.iSysUserService.updateNickname(id, nickname); + } + + @ApiOperation(value = "用户上传头像") + @PostMapping(path = "/{id}/avatar") + public void uploadAvatar(@PathVariable Long id, @RequestBody UserVO userVO) { + this.iSysUserService.updateAvatar(id, userVO.getAvatarPath()); + } + + @ApiOperation(value = "发送手机验证码") + @PostMapping(path = "/mobile/code") + public String sendMobileValidCode(@RequestBody MobileInfoVO mobileInfoVO) { + return this.iSysUserService.sendMobileValidCode(mobileInfoVO); + } + + @ApiOperation(value = "发送邮箱验证码") + @PostMapping(path = "/email/code") + public String sendEmailValidCode(String email) { + return this.iSysUserService.sendEmailValidCode(email); + } + + @ApiOperation(value = "更新用户手机号") + @PutMapping(path = "/{id}/mobile") + public void updateMobile(@PathVariable Long id, @RequestBody @Validated UpdateMobileVO updateMobileVO) { + this.iSysUserService.updateMobile(id, updateMobileVO); + } + + @ApiOperation(value = "更新用户邮箱") + @PutMapping(path = "/{id}/email") + public void updateEmail(@PathVariable Long id, @RequestBody @Validated UpdateEmailVO updateEmailVO) { + this.iSysUserService.updateEmail(id, updateEmailVO); + } + + @ApiOperation(value = "更新用户登陆密码") + @PutMapping(path = "/{id}/password") + public void updatePassword(@PathVariable Long id, @RequestBody @Validated UpdatePasswordVO updatePasswordVO) { + this.iSysUserService.updatePassword(id, updatePasswordVO); + } + +} diff --git a/src/main/java/club/joylink/rtss/controller/UserPermissionController.java b/src/main/java/club/joylink/rtss/controller/UserPermissionController.java new file mode 100644 index 000000000..8f3c6e80b --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/UserPermissionController.java @@ -0,0 +1,79 @@ +package club.joylink.rtss.controller; + +import club.joylink.rtss.services.IUserPermissionService; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.permission.DistributeSelectVO; +import club.joylink.rtss.vo.client.permission.PermissionQueryVO; +import club.joylink.rtss.vo.client.userPermission.UserPermissionVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; + +@Api(tags = { "用户权限管理" }) +@RestController +@RequestMapping("/api/userPermission") +public class UserPermissionController { + + @Autowired + private IUserPermissionService iUserPermissionService; + + @ApiOperation(value = "分页获取用户权限数据") + @GetMapping(path="") + public PageVO queryPagedPermission(PermissionQueryVO queryVO,@RequestAttribute @ApiIgnore UserVO user) { + return this.iUserPermissionService.queryPagedPermission(queryVO); + } + + @ApiOperation(value = "设置用户权限状态") + @PutMapping(path = "/{id}/status") + public void invalid(@PathVariable Long id) { + this.iUserPermissionService.setInvalid(id); + } + + @ApiOperation(value = "获取用户可以分发的权限") + @GetMapping(path="/getAvailableUserPermission") + public List findAvailablePermission(DistributeSelectVO distributeSelectVO, @RequestAttribute @ApiIgnore UserVO user) { + return this.iUserPermissionService.findUserPermissionVOListThatCanDistribute(distributeSelectVO,user); + } + + @ApiOperation(value = "分页获取个人权限数据") + @GetMapping(path = "/my") + public PageVO queryMyPermission(PermissionQueryVO queryVO, @RequestAttribute @ApiIgnore UserVO user) { + return this.iUserPermissionService.queryMyPermission(user, queryVO); + } + + @ApiOperation(value = "设置用户权限所有者") + @PutMapping(path = "/{id}/owner") + public void setPermissionOwner(@PathVariable Long id, @RequestBody UserVO owner, @RequestAttribute @ApiIgnore UserVO user) { + this.iUserPermissionService.setPermissionOwner(id, owner, user); + } + + @ApiOperation(value = "用户数据统计") + @GetMapping(path = "/statistic") + public PageVO userPermissionStatistic(PermissionQueryVO queryVO) { + return iUserPermissionService.userPermissionStatistic(queryVO); + } + + @ApiOperation(value = "用户权限转增归属") + @GetMapping(path = "/gotUserList") + public PageVO distributeTo(PermissionQueryVO queryVO) { + return iUserPermissionService.distributeTo(queryVO); + } + + @ApiOperation(value = "回收用户权限到权限分发中") + @PutMapping(path = "/{id}/back") + public void restorePermissionToDistribute(@PathVariable Long id) { + iUserPermissionService.restorePermissionToDistribute(id); + } + + @ApiOperation(value = "") + @GetMapping(path = "/personal") + public List queryPersonalUserPermission(@RequestAttribute @ApiIgnore UserVO user) { + return iUserPermissionService.queryPersonalUserPermission(user); + } + +} diff --git a/src/main/java/club/joylink/rtss/controller/UserUsageStatsController.java b/src/main/java/club/joylink/rtss/controller/UserUsageStatsController.java new file mode 100644 index 000000000..be80eb548 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/UserUsageStatsController.java @@ -0,0 +1,98 @@ +package club.joylink.rtss.controller; + +import club.joylink.rtss.services.IUserSimulationStatService; +import club.joylink.rtss.services.IUserUsageStatsService; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.UsageTotalStatsVO; +import club.joylink.rtss.vo.client.UserRankStatsVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; + +@Api(tags = { "用户使用数据统计接口" }) +@RestController +@RequestMapping(path = "/api/stats") +public class UserUsageStatsController { + + @Autowired + private IUserUsageStatsService iUserUsageStatsService; + + @Autowired + private IUserSimulationStatService iUserSimulationStatService; + + @ApiOperation(value = "课程列表") + @GetMapping(path = "/lesson/list") + public List queryLessonList(@RequestAttribute UserVO user) { + return this.iUserUsageStatsService.queryLessonList(user); + } + + @ApiOperation(value = "课程统计排名") + @GetMapping(path = "/lesson/{lessonId}/rank") + public List lessonRank(@PathVariable Long lessonId, @RequestAttribute UserVO user) { + return this.iUserUsageStatsService.lessonRank(lessonId, user); + } + + @ApiOperation(value = "个人课程实训数据统计") + @GetMapping(path = "/lesson/{lessonId}/stats") + public List lessonPersonalStats(@PathVariable Long lessonId, @RequestAttribute UserVO user) { + return this.iUserUsageStatsService.personalLessonStats(lessonId, user); + } + + @ApiOperation(value = "查询参与考试的课程列表") + @GetMapping(path = "/exam/lessonList") + public List queryExamLessonList(@ApiIgnore @RequestAttribute UserVO user) { + return this.iUserUsageStatsService.queryExamLessonList(user); + } + + @ApiOperation(value = "查询参与考试的试题列表") + @GetMapping(path = "/exam/{lessonId}/list") + public List queryExamList(@PathVariable Long lessonId, @ApiIgnore @RequestAttribute UserVO user) { + return this.iUserUsageStatsService.queryExamList(lessonId, user); + } + + @ApiOperation(value = "考试排名") + @GetMapping(path = "/exam/{examId}/rank") + public List examRank(@PathVariable long examId, @ApiIgnore @RequestAttribute UserVO user) { + return this.iUserUsageStatsService.examRank(examId, user); + } + + @ApiOperation(value = "个人考试数据统计") + @GetMapping(path = "/exam/{examId}/stats") + public List examPersonalStats(@PathVariable long examId, @ApiIgnore @RequestAttribute UserVO user) { + return this.iUserUsageStatsService.examPersonalStats(examId, user); + } + + @ApiOperation(value = "查询参与仿真的地图列表") + @GetMapping(path = "/simulation/mapList") + public List querySimulationMapList(@ApiIgnore @RequestAttribute UserVO user) { + return iUserSimulationStatService.querySimulationMapList(user); + } + + @ApiOperation(value = "查询参与仿真的产品列表") + @GetMapping(path = "/simulation/{mapId}/prdList") + public List querySimulationPrdList(@PathVariable Long mapId, @ApiIgnore @RequestAttribute UserVO user) { + return iUserSimulationStatService.querySimulationPrdList(mapId, user); + } + + @ApiOperation(value = "仿真时长排名") + @GetMapping(path = "/simulation/{mapId}/{prdType}/rank") + public List simulationRank(@PathVariable Long mapId, @PathVariable String prdType, @ApiIgnore @RequestAttribute UserVO user) { + return iUserSimulationStatService.simulationRank(mapId, prdType, user); + } + + @ApiOperation(value = "个人仿真数据统计") + @GetMapping(path = "/simulation/{mapId}/stats") + public List simulationPersonalStats(@PathVariable Long mapId, @ApiIgnore @RequestAttribute UserVO user) { + return iUserSimulationStatService.simulationPersonalStats(mapId, user); + } + + @ApiOperation(value = "统计各系统总时长") + @GetMapping(path = "/total") + public List totalSimulationDuration(boolean filter) { + return iUserUsageStatsService.totalDuration(filter); + } +} diff --git a/src/main/java/club/joylink/rtss/controller/VoiceCommandController.java b/src/main/java/club/joylink/rtss/controller/VoiceCommandController.java new file mode 100644 index 000000000..07de0ff7a --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/VoiceCommandController.java @@ -0,0 +1,33 @@ +package club.joylink.rtss.controller; + +import club.joylink.rtss.simulation.cbtc.command.VoiceCommandBO; +import club.joylink.rtss.services.IVoiceCommandService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +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.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +@Api(tags = "语音指令接口") +@RestController +@RequestMapping("/api/voiceCommand") +public class VoiceCommandController { + @Autowired + private IVoiceCommandService iVoiceCommandService; + + @ApiOperation("添加语音指令") + @PostMapping("") + public void create(VoiceCommandBO command) { + iVoiceCommandService.create(command); + } + + @ApiOperation("查询所有语音指令") + @GetMapping("") + public List getAll() { + return iVoiceCommandService.getAll(); + } +} diff --git a/src/main/java/club/joylink/rtss/controller/WxAuthenticateController.java b/src/main/java/club/joylink/rtss/controller/WxAuthenticateController.java new file mode 100644 index 000000000..bdd03d807 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/WxAuthenticateController.java @@ -0,0 +1,19 @@ +package club.joylink.rtss.controller; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/api/wxauth") +public class WxAuthenticateController { + +// @Autowired +// private IAuthenticateService iAuthenticateService; +// +// @ApiOperation(value = "根据微信小程序code获取用户信息") +// @GetMapping(path = "/micro") +// public UserVO getUserInfoByWMCode(String wmCode) { +// return this.iAuthenticateService.getUserInfoByWMCode(wmCode); +// } + +} diff --git a/src/main/java/club/joylink/rtss/controller/advice/AuthenticateInterceptor.java b/src/main/java/club/joylink/rtss/controller/advice/AuthenticateInterceptor.java new file mode 100644 index 000000000..5a8807425 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/advice/AuthenticateInterceptor.java @@ -0,0 +1,55 @@ +package club.joylink.rtss.controller.advice; + +import club.joylink.rtss.exception.BusinessExceptionAssertEnum; +import club.joylink.rtss.services.LoginSessionManager; +import club.joylink.rtss.vo.LoginUserInfoVO; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.springframework.util.StringUtils; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.servlet.HandlerInterceptor; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.Objects; + +/** + * 权限验证拦截器 + * @author sheng + * + */ +@Component +@Slf4j +public class AuthenticateInterceptor implements HandlerInterceptor { + + public static final String LOGIN_USER_KEY = "user"; + + public static final String LOGIN_INFO_KEY = "loginInfo"; + + @Autowired + private LoginSessionManager loginSessionManager; + + @Override + public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) + throws Exception { +// String host = request.getHeader("Host"); +// String forwardedHost = request.getHeader("X-Forwarded-Host"); +// String forwardedFor = request.getHeader("X-Forwarded-For"); +// log.debug(String.format("host:[%s], forwardedHost:[%s], forwardedFor:[%s]", host, forwardedHost, forwardedFor)); + String realIp = request.getHeader("X-Real-IP"); + log.debug(String.format("request[Method: '%s', RealIp: [%s], RemoteAddr: '%s', RequestURI: '%s']", + request.getMethod(), realIp, request.getRemoteAddr(), request.getRequestURI())); + // 登陆权限验证 + if(RequestMethod.OPTIONS.name().equals(request.getMethod())) return true; + String token = request.getHeader("X-Token"); + BusinessExceptionAssertEnum.NOT_LOGIN.assertTrue(StringUtils.hasText(token)); + LoginUserInfoVO loginUserInfoVO = null; + // token获取登陆用户 + loginUserInfoVO = this.loginSessionManager.getLoginInfoByToken(token); + request.setAttribute(LOGIN_USER_KEY, loginUserInfoVO.getUserVO()); + request.setAttribute(LOGIN_INFO_KEY, loginUserInfoVO); + return true; + } + +} diff --git a/src/main/java/club/joylink/rtss/controller/advice/CommonResponseBody.java b/src/main/java/club/joylink/rtss/controller/advice/CommonResponseBody.java new file mode 100644 index 000000000..973803477 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/advice/CommonResponseBody.java @@ -0,0 +1,82 @@ +package club.joylink.rtss.controller.advice; + +import club.joylink.rtss.exception.BusinessException; +import club.joylink.rtss.simulation.cbtc.exception.SimulationException; +import club.joylink.rtss.vo.CommonJsonResponse; +import club.joylink.rtss.vo.ResponseConsts; +import lombok.extern.slf4j.Slf4j; +import org.springframework.core.MethodParameter; +import org.springframework.http.MediaType; +import org.springframework.http.server.ServerHttpRequest; +import org.springframework.http.server.ServerHttpResponse; +import org.springframework.validation.ObjectError; +import org.springframework.web.bind.MethodArgumentNotValidException; +import org.springframework.web.bind.MissingServletRequestParameterException; +import org.springframework.web.bind.annotation.ControllerAdvice; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.servlet.mvc.method.annotation.ResponseBodyAdvice; + +import java.util.List; + +@ControllerAdvice +@Slf4j +public class CommonResponseBody implements ResponseBodyAdvice { + + @Override + public boolean supports(MethodParameter returnType, Class converterType) { + return returnType.getMethod() != null && !returnType.getMethod().getReturnType().getSimpleName().equals("CommonJsonResponse"); + } + + @Override + public Object beforeBodyWrite(Object body, MethodParameter returnType, MediaType selectedContentType, + Class selectedConverterType, ServerHttpRequest request, ServerHttpResponse response) { + if(body instanceof CommonJsonResponse) { + return body; + } + if(request.getURI().getPath().startsWith("/swagger")) { + return body; + } + if (request.getURI().getPath().equals("/api/userinfo/ifRegisted")) { + return body; + } + if (request.getURI().getPath().equals("/api/userinfo/identity")) { + return body; + } + CommonJsonResponse commonJsonResponse = CommonJsonResponse.newSuccessResponse(body); + if(returnType.getMethod().getReturnType().equals(String.class) || body instanceof String) { + return commonJsonResponse.toJSONString(); + } + return commonJsonResponse; + } + + @ExceptionHandler(Exception.class) + @ResponseBody + public CommonJsonResponse handleException(Exception e) { + if(e instanceof MethodArgumentNotValidException) { + // 参数验证异常处理 + MethodArgumentNotValidException validException = (MethodArgumentNotValidException) e; + List errorList = validException.getBindingResult().getAllErrors(); + StringBuffer sb = new StringBuffer(); + errorList.forEach(error -> + sb.append(error.getCodes()[0]).append(" : ").append(error.getDefaultMessage()).append("; ")); + log.error("【参数校验异常】{}", e); + return CommonJsonResponse.newErrorResponse(ResponseConsts.VALIDATE_ERROR.getCode(), sb.toString()); + } if(e instanceof BusinessException) { + club.joylink.rtss.exception.BusinessException be = (club.joylink.rtss.exception.BusinessException) e; + log.error("【业务异常】{}", e); + return CommonJsonResponse.newErrorResponse(be.getCode(), be.getVoMessage()); + } else if(e instanceof MissingServletRequestParameterException) { + log.error("【接口参数异常】", e); + return CommonJsonResponse.newErrorResponse(ResponseConsts.VALIDATE_ERROR.getCode(), "接口参数异常"); + } else if (e instanceof SimulationException) { + club.joylink.rtss.simulation.cbtc.exception.SimulationException simulationException = (club.joylink.rtss.simulation.cbtc.exception.SimulationException) e; + log.error("【仿真系统异常】{}", e); + return CommonJsonResponse.newErrorResponse(simulationException.getCode(), simulationException.getMessage()); + } + + log.error("【系统异常】{}", e); + return CommonJsonResponse.newErrorResponse(); + } + +} diff --git a/src/main/java/club/joylink/rtss/controller/advice/LicenseInterceptor.java b/src/main/java/club/joylink/rtss/controller/advice/LicenseInterceptor.java new file mode 100644 index 000000000..85d39fc0e --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/advice/LicenseInterceptor.java @@ -0,0 +1,36 @@ +package club.joylink.rtss.controller.advice; + +import club.joylink.rtss.configuration.configProp.OtherConfig; +import club.joylink.rtss.constants.SystemEnv; +import club.joylink.rtss.exception.BusinessExceptionAssertEnum; +import club.joylink.rtss.services.license.LicenseService; +import club.joylink.rtss.vo.license.LicenseVO; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.springframework.web.servlet.HandlerInterceptor; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +@Slf4j +@Component +public class LicenseInterceptor implements HandlerInterceptor { + + @Autowired + private OtherConfig otherConfig; + + @Autowired + private LicenseService licenseService; + + @Override + public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { + if (SystemEnv.isLocalEnv(otherConfig.getEnv())) { + log.debug(String.format("本地部署许可证验证")); + LicenseVO license = this.licenseService.getLicense(); + BusinessExceptionAssertEnum.LICENSE_EXPIRED.assertNotTrue(license.isExpire(), "本地license已过期"); + log.debug("本地许可证有效"); + } + return true; + } +} diff --git a/src/main/java/club/joylink/rtss/controller/advice/RequestInfo.java b/src/main/java/club/joylink/rtss/controller/advice/RequestInfo.java new file mode 100644 index 000000000..bde9fad52 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/advice/RequestInfo.java @@ -0,0 +1,58 @@ +package club.joylink.rtss.controller.advice; + +import java.io.Serializable; + +@SuppressWarnings("serial") +public class RequestInfo implements Serializable { + + private String url; + + private String methodType; + + private String ip; + + private String classMethod; + + private String args; + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public String getMethodType() { + return methodType; + } + + public void setMethodType(String methodType) { + this.methodType = methodType; + } + + public String getIp() { + return ip; + } + + public void setIp(String ip) { + this.ip = ip; + } + + public String getClassMethod() { + return classMethod; + } + + public void setClassMethod(String classMethod) { + this.classMethod = classMethod; + } + + public String getArgs() { + return args; + } + + public void setArgs(String args) { + this.args = args; + } + +} diff --git a/src/main/java/club/joylink/rtss/controller/advice/Role.java b/src/main/java/club/joylink/rtss/controller/advice/Role.java new file mode 100644 index 000000000..018832c42 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/advice/Role.java @@ -0,0 +1,15 @@ +package club.joylink.rtss.controller.advice; + +import club.joylink.rtss.constants.RoleEnum; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target(value = ElementType.METHOD) +@Retention(RetentionPolicy.RUNTIME) +public @interface Role { + + RoleEnum[] value(); +} diff --git a/src/main/java/club/joylink/rtss/controller/advice/RoleAspect.java b/src/main/java/club/joylink/rtss/controller/advice/RoleAspect.java new file mode 100644 index 000000000..f7ee36c72 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/advice/RoleAspect.java @@ -0,0 +1,50 @@ +package club.joylink.rtss.controller.advice; + +import club.joylink.rtss.constants.BusinessConsts; +import club.joylink.rtss.constants.RoleEnum; +import club.joylink.rtss.exception.BusinessExceptionAssertEnum; +import club.joylink.rtss.vo.UserVO; +import org.aspectj.lang.JoinPoint; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Before; +import org.aspectj.lang.reflect.MethodSignature; +import org.springframework.stereotype.Component; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; + +import java.lang.reflect.Method; +import java.util.Arrays; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +@Aspect +@Component +public class RoleAspect { + + @Before("execution(public * club.joylink.rtss.controller.*.*(..)) && @annotation(club.joylink.rtss.controller.advice.Role)") + public void doBefore(JoinPoint joinPoint) { + ServletRequestAttributes sra = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); + assert sra != null; + UserVO userVO = (UserVO) sra.getRequest().getAttribute(BusinessConsts.LOGIN_USER_KEY); + // 没有登录时 + if (Objects.isNull(userVO)) { + return; + } + MethodSignature signature = (MethodSignature) joinPoint.getSignature(); + Method method = signature.getMethod(); + Role roleAnnotation = method.getAnnotation(Role.class); + List roles = Arrays.stream(roleAnnotation.value()).map(RoleEnum::getRole).collect(Collectors.toList()); + // 判断用户角色和注解角色是否有交集 + boolean hasRole = false; + for (String role : roles) { + for (String userRole : userVO.getRoles()) { + if (role.equals(userRole)) { + hasRole = true; + break; + } + } + } + BusinessExceptionAssertEnum.INSUFFICIENT_PERMISSIONS.assertTrue(hasRole); + } +} diff --git a/src/main/java/club/joylink/rtss/controller/cache/CacheController.java b/src/main/java/club/joylink/rtss/controller/cache/CacheController.java new file mode 100644 index 000000000..4798f8d97 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/cache/CacheController.java @@ -0,0 +1,54 @@ +package club.joylink.rtss.controller.cache; + +import club.joylink.rtss.services.cache.ICacheService; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageQueryVO; +import club.joylink.rtss.vo.client.PageVO; +import lombok.AllArgsConstructor; +import lombok.Getter; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.util.StringUtils; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +@RestController +@RequestMapping(path = "/api/cache") +public class CacheController { + + @Autowired + private ICacheService iCacheService; + + @DeleteMapping(path = "/{key}") + public void remove(@PathVariable String key) { + this.iCacheService.remove(key); + } + + @GetMapping(path = "/heartBeat") + public boolean heartBeat(@ApiIgnore @RequestAttribute UserVO user) { + return true; + } + + @GetMapping(path = "/keys") + public PageVO getCacheKey(String key, PageQueryVO queryVO) { + Stream stream = iCacheService.getKeys().stream(); + if (StringUtils.hasText(key)) { + stream = stream.filter(k -> k.contains(key)); + } + List collect = stream.sorted().collect(Collectors.toList()); + List list = collect.stream().skip(queryVO.getPageSize() * (queryVO.getPageNum() - 1)) + .limit(queryVO.getPageSize()) + .map(CacheKey::new) + .collect(Collectors.toList()); + return new PageVO<>(queryVO.getPageNum(), queryVO.getPageSize(), collect.size(), list); + } + + @Getter + @AllArgsConstructor + class CacheKey{ + String key; + } +} diff --git a/src/main/java/club/joylink/rtss/controller/competition/CompetitionPracticalController.java b/src/main/java/club/joylink/rtss/controller/competition/CompetitionPracticalController.java new file mode 100644 index 000000000..e05729e1c --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/competition/CompetitionPracticalController.java @@ -0,0 +1,149 @@ +package club.joylink.rtss.controller.competition; + +import com.fasterxml.jackson.annotation.JsonView; +import club.joylink.rtss.simulation.cbtc.script.ScriptBO; +import club.joylink.rtss.controller.advice.AuthenticateInterceptor; +import club.joylink.rtss.entity.CompetitionWithBLOBs; +import club.joylink.rtss.services.completition.ICompetitionPracticalService; +import club.joylink.rtss.vo.LoginUserInfoVO; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.competition.CompetitionPagedQueryVO; +import club.joylink.rtss.vo.client.competition.CompetitionResult; +import club.joylink.rtss.vo.client.competition.CompetitionVO; +import club.joylink.rtss.vo.client.competition.OperationStatisticVO; +import club.joylink.rtss.vo.client.validGroup.competition.CompetitionUpdateCheck; +import club.joylink.rtss.vo.view.OperationStatisticAnswerView; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; + +/** + * 竞赛实操内容管理 + */ +@Api(tags = {"竞赛实操内容管理"}) +@RestController +@RequestMapping(path = "/api/v1/competitionPractical") +public class CompetitionPracticalController { + + @Autowired + private ICompetitionPracticalService iCompetitionPracticalService; + + @ApiOperation("分页查询竞赛场景信息") + @GetMapping("") + public PageVO pagedQueryCompetition(CompetitionPagedQueryVO queryVO) { + return iCompetitionPracticalService.pagedQueryCompetition(queryVO); + } + + @ApiOperation("查询竞赛场景信息列表") + @GetMapping("/list") + public List getCompetitionList() { + return iCompetitionPracticalService.getCompetitionList(); + } + + @ApiOperation("新增竞赛场景") + @PostMapping("") + public void createCompetition(@RequestBody @Validated CompetitionVO competitionVO) { + iCompetitionPracticalService.createCompetition(competitionVO); + } + + @ApiOperation("更新竞赛场景基础信息") + @PutMapping("") + public void updateCompetition(@RequestBody @Validated(CompetitionUpdateCheck.class) CompetitionVO competitionVO) { + iCompetitionPracticalService.updateCompetition(competitionVO); + } + + @ApiOperation("删除竞赛场景") + @DeleteMapping("/{id}") + public void deleteCompetition(@PathVariable Long id) { + iCompetitionPracticalService.deleteCompetition(id); + } + + @ApiOperation("获取场景详细信息") + @GetMapping("/detail/{id}") + public CompetitionVO getDetail(@PathVariable Long id) { + return iCompetitionPracticalService.getDetail(id); + } + + @ApiOperation("保存数据") + @PostMapping("/detail") + public void saveDetail(@RequestBody @Validated(value = CompetitionUpdateCheck.class) CompetitionVO competitionVO) { + iCompetitionPracticalService.saveDetail(competitionVO); + } + + @ApiOperation("导出") + @GetMapping("/{id}/export") + public CompetitionWithBLOBs export(@PathVariable Long id) { + return iCompetitionPracticalService.export(id); + } + + @ApiOperation("导入") + @PostMapping("/{scriptId}/import") + public void importFromJson(@PathVariable Long scriptId, String name, @RequestBody CompetitionWithBLOBs competition) { + iCompetitionPracticalService.importFromJson(scriptId, name, competition); + } + + /* ------------------------- 竞赛运行相关 ------------------------- */ + @ApiOperation("加载竞赛场景") + @PutMapping("/load/{group}/{id}") + public void loadCompetition(@PathVariable String group, @PathVariable Long id, + @ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) LoginUserInfoVO userInfo) { + iCompetitionPracticalService.loadCompetition(group, id, userInfo); + } + + @ApiOperation("小程序加载竞赛场景") + @PutMapping("/load/{id}") + public String createSimulationAndLoadCompetition(@PathVariable Long id, + @ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) LoginUserInfoVO userInfo) { + return iCompetitionPracticalService.createSimulationAndLoadCompetition(id, userInfo); + } + + @ApiOperation("开始竞赛实操") + @PutMapping("/start/{group}") + public void start(@PathVariable String group, String memberId, ScriptBO.Mode mode, + @ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) LoginUserInfoVO userInfo) { + iCompetitionPracticalService.start(group, memberId, mode, userInfo); + } + + @ApiOperation("获取运营统计数据") + @GetMapping("/detail/os/{group}") + @JsonView(OperationStatisticAnswerView.class) + public OperationStatisticVO getOperationStatistic(@PathVariable String group) { + return iCompetitionPracticalService.getOperationStatistic(group); + } + + @ApiOperation("提交运营统计答案") + @PutMapping("/detail/os/{group}") + public void submit(@PathVariable String group, @RequestBody OperationStatisticVO operationStatisticVO) { + iCompetitionPracticalService.submit(group, operationStatisticVO); + } + + @ApiOperation("结束竞赛实操") + @PutMapping("/finish/{group}") + public CompetitionResult finish(@PathVariable String group, @RequestBody OperationStatisticVO operationStatisticVO, @RequestAttribute UserVO user) { + return iCompetitionPracticalService.finish(group, operationStatisticVO, user); + } + + @ApiOperation("退出场景") + @PutMapping("/exit/{group}") + public void exit(@PathVariable String group, @RequestAttribute UserVO user) { + iCompetitionPracticalService.exit(group, user); + } + + @ApiOperation("完成操作类动作(小程序专用)") + @PutMapping("/{group}/finish/operation/{actionId}") + public void finishAction(@PathVariable String group, @PathVariable String actionId, @RequestAttribute UserVO user) { + iCompetitionPracticalService.finishOperationAction(group, actionId, user); + } + + @ApiOperation("语音播放完毕") + @PutMapping("/{group}/audio/over/{conversationMessageId}") + public void audioOver(@PathVariable String group, @PathVariable String conversationMessageId, @RequestAttribute UserVO user) { + iCompetitionPracticalService.audioOver(group, conversationMessageId, user); + } +} diff --git a/src/main/java/club/joylink/rtss/controller/competition/CompetitionUserLikesController.java b/src/main/java/club/joylink/rtss/controller/competition/CompetitionUserLikesController.java new file mode 100644 index 000000000..d196c96da --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/competition/CompetitionUserLikesController.java @@ -0,0 +1,37 @@ +package club.joylink.rtss.controller.competition; + + +import club.joylink.rtss.services.completition.CompetitionUserLikeManager; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.competition.CompetitionUserLikesVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.validation.constraints.PositiveOrZero; + + +@Api(tags = "竞赛用户点赞") +@RestController +@RequestMapping(path = "/api/v1/likes") +public class CompetitionUserLikesController { + + @Autowired + private CompetitionUserLikeManager likeManager; + + @ApiOperation(value = "获取各用户点赞数和已点赞用户") + @GetMapping(path = "/project/{projectCode}") + public CompetitionUserLikesVO getUserLikes(@PathVariable String projectCode, @ApiIgnore @RequestAttribute UserVO user) { + return likeManager.getUserLikes(user.getId(), projectCode); + } + + @ApiOperation(value = "点赞") + @PostMapping(path = "/project/{projectCode}") + public void like(@ApiIgnore @RequestAttribute UserVO user, @PathVariable String projectCode, @PositiveOrZero @RequestParam Long like) { + likeManager.like(projectCode, user.getId(), like); + } + +} + diff --git a/src/main/java/club/joylink/rtss/controller/competition/RaceQuestionsRuleController.java b/src/main/java/club/joylink/rtss/controller/competition/RaceQuestionsRuleController.java new file mode 100644 index 000000000..5bc3693f0 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/competition/RaceQuestionsRuleController.java @@ -0,0 +1,67 @@ +package club.joylink.rtss.controller.competition; + +import club.joylink.rtss.controller.advice.AuthenticateInterceptor; +import club.joylink.rtss.services.completition.IRaceQuestionsRuleService; +import club.joylink.rtss.vo.LoginUserInfoVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.competition.TheoryQuestionRuleQueryVO; +import club.joylink.rtss.vo.client.competition.TheoryQuestionsRuleVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; + +@Api(tags = {"出题规则"}) +@RestController +@RequestMapping("/api/questionsRule") +public class RaceQuestionsRuleController { + + @Autowired + private IRaceQuestionsRuleService iRaceQuestionsRuleService; + + @ApiOperation(value = "添加规则") + @PostMapping + public TheoryQuestionsRuleVO create(@RequestBody @Validated TheoryQuestionsRuleVO ruleVO, + @ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) LoginUserInfoVO loginUserInfoVO) { + ruleVO.setProjectCode(loginUserInfoVO.getProject().name()); + TheoryQuestionsRuleVO vo = this.iRaceQuestionsRuleService.create(ruleVO); + return vo; + } + + @ApiOperation(value = "获取规则列表") + @GetMapping + public List queryAll() { + List list = this.iRaceQuestionsRuleService.queryRules(); + return list; + } + + @ApiOperation(value = "分页获取规则列表") + @GetMapping("paging") + public PageVO pagingQueryRules(TheoryQuestionRuleQueryVO queryVO,@ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) LoginUserInfoVO loginInfo) { + queryVO.setProjectCode(loginInfo.getProject().name()); + PageVO list = this.iRaceQuestionsRuleService.pagingQueryRules(queryVO); + return list; + } + + @ApiOperation(value = "删除规则") + @DeleteMapping("{id}") + public void delete(@PathVariable Integer id) { + this.iRaceQuestionsRuleService.deleteById(id); + } + + @ApiOperation(value = "查询规则内容") + @GetMapping("{id}") + public TheoryQuestionsRuleVO get(@PathVariable Integer id) { + return this.iRaceQuestionsRuleService.getById(id); + } + + @ApiOperation(value = "更改规则内容") + @PutMapping("{id}") + public TheoryQuestionsRuleVO get(@PathVariable Integer id, @RequestBody @Validated TheoryQuestionsRuleVO ruleVO) { + return this.iRaceQuestionsRuleService.update(id, ruleVO); + } +} diff --git a/src/main/java/club/joylink/rtss/controller/competition/RaceTheoryController.java b/src/main/java/club/joylink/rtss/controller/competition/RaceTheoryController.java new file mode 100644 index 000000000..761c97fde --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/competition/RaceTheoryController.java @@ -0,0 +1,103 @@ +package club.joylink.rtss.controller.competition; + +import club.joylink.rtss.constants.RoleEnum; +import club.joylink.rtss.controller.advice.Role; +import club.joylink.rtss.services.completition.IRaceTheoryService; +import club.joylink.rtss.vo.LoginUserInfoVO; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.competition.ProjectTheoryAnswerVO; +import club.joylink.rtss.vo.client.question.QuestionVO; +import club.joylink.rtss.vo.client.race.RaceResultDetailVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; + +/**竞赛理论试题管理*/ +@Api(tags = {"竞赛理论试题管理"}) +@RestController +@RequestMapping(path = "api/v1/competitionTheory") +public class RaceTheoryController { + + @Autowired + private IRaceTheoryService iRaceTheoryService; + +// /**查询竞赛理论题 +// * @return*/ +// @ApiOperation(value = "查询本竞赛用的理论") +// @GetMapping(path = "/competition/{competitionId}") +// public TheoryQuestionVO getCompetitionTheory(@ApiIgnore @RequestAttribute UserVO user, @PathVariable Long competitionId) { +// +// return iRaceTheoryService.getCompetitionTheory(user.getId(), competitionId); +// } +// +// /**提交理论成绩*/ +// @ApiOperation(value = "提交理论") +// @PostMapping(path = "/submit") +// public void submitTheoryQuestion(@ApiIgnore @RequestAttribute UserVO user, @Validated @RequestBody CompetitionTheoryAnswerVO answerVO) { +// iRaceTheoryService.submitTheoryQuestion(user, answerVO); +// +// } +// +// /**参赛者查询理论题作答结果 +// * @return*/ +// @ApiOperation(value = "查询理论题作答结果") +// @GetMapping(path = "/result/competition/{competitionId}") +// public List getTheoryAnswerResult(@PathVariable Long competitionId, @ApiIgnore @RequestAttribute UserVO user) { +// return iRaceTheoryService.getTheoryAnswerResult(competitionId, user); +// } +// +// /**参赛者查询理论题作答详情 +// * @return*/ +// @ApiOperation(value = "查询当前人员理论题作答详情") +// @GetMapping(path = "/detail/competition/{competitionId}") +// public List getTheoryAnswerDetails(@PathVariable Long competitionId, @ApiIgnore @RequestAttribute UserVO user) { +// return iRaceTheoryService.getTheoryAnswerDetails(competitionId, user); +// } +// +// /**裁判查询理论题作答详情 +// * @return*/ +// @ApiOperation(value = "裁判查询参赛者理论题作答详情") +// @GetMapping(path = "/detail/competition/{competitionId}/raceUser/{raceUserId}") +// public List getContestantTheoryAnswerDetails(@PathVariable Long competitionId,@PathVariable Long raceUserId, @ApiIgnore @RequestAttribute UserVO user) { +// return iRaceTheoryService.getContestantTheoryAnswerDetails(competitionId, raceUserId); +// } + + //------------------------------------ 项目理论题部分---------------------------------------- + /**获取项目理论题*/ + @ApiOperation(value = "获取项目理论题") + @GetMapping(path = "/project/{projectCode}") + public List getProjectTheory(String mode, @PathVariable String projectCode, @RequestAttribute LoginUserInfoVO loginInfo, @ApiIgnore @RequestAttribute UserVO user) { + return iRaceTheoryService.getProjectTheory(mode, projectCode, user.getCompanyId(), user); + } + /**根据练习或者考试提交理论题、计算分数*/ + @ApiOperation(value = "提交试卷") + @PostMapping(path = "/project/{projectCode}/submit") + public List submitProjectTheory(@PathVariable String projectCode, @RequestBody ProjectTheoryAnswerVO theoryAnswers, @RequestAttribute LoginUserInfoVO loginInfo,@ApiIgnore @RequestAttribute UserVO user) { + return iRaceTheoryService.submitProjectTheory(user, projectCode, user.getCompanyId(), theoryAnswers); + } + + /**获取作答详情*/ + /**评分*/ + /**获取成绩*/ + + /**清除理论考试结果*/ + @ApiOperation(value = "清除理论考试结果") + @DeleteMapping(path = "/project/{projectCode}") + @Role(RoleEnum.SuperAdmin) + public void submitProjectTheory(@PathVariable String projectCode, @RequestParam(required = false) Integer companyId) { + iRaceTheoryService.deleteRaceTheoryResult(projectCode, companyId); + } + + /** + * 评分员获取考生理论考试结果详情 + */ + @ApiOperation(value = "评分员获取考生理论考试结果详情") + @GetMapping(path = "/project/{projectCode}/result/detail") + public List getTheoryAnswerDetails(@PathVariable String projectCode, @RequestParam(required = false) Integer companyId, Long id) { + return iRaceTheoryService.getTheoryResultDetails(projectCode, companyId, id); + } +} diff --git a/src/main/java/club/joylink/rtss/controller/competition/UserAnswerStatsController.java b/src/main/java/club/joylink/rtss/controller/competition/UserAnswerStatsController.java new file mode 100644 index 000000000..8e2635f0d --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/competition/UserAnswerStatsController.java @@ -0,0 +1,38 @@ +package club.joylink.rtss.controller.competition; + + +import club.joylink.rtss.services.completition.IRaceQuestionMocksStatsService; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.competition.UserQuestionStatsVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; + + +@Api(tags = "项目题库用户答题统计") +@RestController +@RequestMapping(path = "/api/question/mocksStatistics") +public class UserAnswerStatsController { + + @Autowired + private IRaceQuestionMocksStatsService statsService; + + @ApiOperation(value = "查询某用户小程序测试历史成绩") + @GetMapping(path = "/project/{projectCode}") + public List getQuestionProgress(Long userId,@PathVariable String projectCode, @ApiIgnore @RequestAttribute UserVO user) { + return statsService.getHistoryScores(userId,user, projectCode); + } + + @ApiOperation(value = "查询历史成绩排名") + @GetMapping(path = "ranking/project/{projectCode}") + public List getQuestionProgress(@PathVariable String projectCode) { + return statsService.getHistoryScoresRanking( projectCode); + } + + +} + diff --git a/src/main/java/club/joylink/rtss/controller/competition/UserQuestionProgressController.java b/src/main/java/club/joylink/rtss/controller/competition/UserQuestionProgressController.java new file mode 100644 index 000000000..1c1b61cc0 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/competition/UserQuestionProgressController.java @@ -0,0 +1,51 @@ +package club.joylink.rtss.controller.competition; + + +import club.joylink.rtss.services.completition.IUserQuestionProgressService; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.competition.RaceQuestionProgressVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.validation.constraints.PositiveOrZero; + + +@Api(tags = "项目题库用户答题进度接口") +@RestController +@RequestMapping(path = "/api/questionProgress") +public class UserQuestionProgressController { + + @Autowired + private IUserQuestionProgressService progressService; + + @ApiOperation(value = "获取用户答题进展") + @GetMapping(path = "/project/{projectCode}") + public RaceQuestionProgressVO getQuestionProgress(@PathVariable String projectCode, @ApiIgnore @RequestAttribute UserVO user) { + return progressService.getQuestionProgress(user.getId(), projectCode, user.getCompanyId()); + } + + @ApiOperation(value = "更新答题进度") + @PostMapping(path = "/project/{projectCode}") + public void addQuestionProgress(@ApiIgnore @RequestAttribute UserVO user, @PathVariable String projectCode, @PositiveOrZero @RequestParam Long index) { + progressService.addQuestionProgress(user.getId(), projectCode, user.getCompanyId(),index); + } + + /**添加错题*/ + @ApiOperation(value = "添加错题") + @PostMapping(path = "incorrect/project/{projectCode}") + public void addIncorrectQuestion(@ApiIgnore @RequestAttribute UserVO user, @PathVariable String projectCode, @PositiveOrZero @RequestParam Long id) { + progressService.addIncorrectQuestion(user.getId(), projectCode, user.getCompanyId(),id); + } + + /**删除错题*/ + @ApiOperation(value = "删除错题") + @DeleteMapping(path = "incorrect/project/{projectCode}") + public void deleteIncorrectQuestion(@ApiIgnore @RequestAttribute UserVO user, @PathVariable String projectCode, @PositiveOrZero @RequestParam Long id) { + progressService.deleteIncorrectQuestion(user.getId(), projectCode,user.getCompanyId(), id); + } + +} + diff --git a/src/main/java/club/joylink/rtss/controller/competition/question/QuestionBankController.java b/src/main/java/club/joylink/rtss/controller/competition/question/QuestionBankController.java new file mode 100644 index 000000000..c47ec019f --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/competition/question/QuestionBankController.java @@ -0,0 +1,101 @@ +package club.joylink.rtss.controller.competition.question; + + +import club.joylink.rtss.constants.Project; +import club.joylink.rtss.services.completition.question.IQuestionBankService; +import club.joylink.rtss.vo.LoginUserInfoVO; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.competition.TheoryQuestionCountVO; +import club.joylink.rtss.vo.client.question.QuestionOptionVO; +import club.joylink.rtss.vo.client.question.QuestionQueryVO; +import club.joylink.rtss.vo.client.question.QuestionVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; + + +@Api(tags = "题库管理接口") +@RestController +@RequestMapping(path = "/api/questionBank") +public class QuestionBankController { + + @Autowired + private IQuestionBankService iQuestionBankService; + + @ApiOperation(value = "分页查询题目") + @GetMapping(path = "/questions/paging") + public PageVO pagingQueryQuestions(@RequestAttribute LoginUserInfoVO loginInfo, QuestionQueryVO queryVO) { + queryVO.setProjectCode(loginInfo.getProject().name()); + return iQuestionBankService.pagingQueryQuestions(queryVO); + } + + @ApiOperation(value = "查询题目列表") + @GetMapping(path = "/questions") + public List queryQuestions(@RequestAttribute LoginUserInfoVO loginInfo,QuestionQueryVO queryVO) { + queryVO.setProjectCode(loginInfo.getProject().name()); + return iQuestionBankService.queryQuestions(queryVO); + } + + @ApiOperation(value = "获取题目信息") + @GetMapping(path = "/questions/{questionId}") + public QuestionVO getQuestion(@PathVariable Long questionId) { + return iQuestionBankService.getQuestion(questionId); + } + + @ApiOperation(value = "添加题目") + @PostMapping(path = "/questions") + public void addQuestion(@Validated @RequestBody QuestionVO questionVO,@RequestAttribute LoginUserInfoVO loginInfo, + @ApiIgnore @RequestAttribute UserVO user) { + questionVO.setProjectCode(loginInfo.getProject().name()); + iQuestionBankService.addQuestion(questionVO, user); + } + + @ApiOperation(value = "导入项目或单位试题库") + @PostMapping(path = "/questions/import") + public void importProjectQuestion(@Validated @RequestBody List questions,@RequestAttribute LoginUserInfoVO loginInfo, + @ApiIgnore @RequestAttribute UserVO user, @RequestParam(required = false, name = "id") Integer companyId) { + + iQuestionBankService.importProjectQuestion(questions, loginInfo.getProject().name(), companyId,user); + } + + @ApiOperation(value = "更新题目") + @PutMapping(path = "/questions/{questionId}") + public void updateQuestion(@PathVariable Long questionId, @RequestAttribute LoginUserInfoVO loginInfo,@RequestBody QuestionVO questionVO) { + questionVO.setProjectCode(loginInfo.getProject().name()); + iQuestionBankService.updateQuestion(questionId, questionVO); + } + + @ApiOperation(value = "删除题目") + @DeleteMapping(path = "/questions/{questionId}") + public void deleteQuestion(@PathVariable Long questionId) { + iQuestionBankService.deleteQuestion(questionId); + } + + @ApiOperation(value = "根据题目查询选项") + @GetMapping(path = "/questions/{questionId}/options") + public List getOptionsByQuestionId(@PathVariable Long questionId) { + return iQuestionBankService.getOptionsByQuestionId(questionId); + } + + @ApiOperation(value = "根据题型获取题目数量") + @GetMapping(path = "/number") + public Integer getNumberUnderKnowledgeAndType(@RequestAttribute LoginUserInfoVO loginInfo, String type, Integer companyId) { + + return iQuestionBankService.getNumberWithType(type, loginInfo.getProject().name(), companyId); + } + + @ApiOperation(value = "获取题型数量") + @GetMapping(path = "/type/number") + public List getNumberUnderKnowledgeAndType(@RequestAttribute LoginUserInfoVO loginInfo, @RequestParam(required = false) Integer companyId) { + + String projectCode = Project.isDefault(loginInfo.getProject()) ? null : loginInfo.getProject().name(); + return iQuestionBankService.countNumByType(projectCode, companyId); + } + +} diff --git a/src/main/java/club/joylink/rtss/controller/draft/DictionaryController.java b/src/main/java/club/joylink/rtss/controller/draft/DictionaryController.java new file mode 100644 index 000000000..a19c0ad61 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/draft/DictionaryController.java @@ -0,0 +1,116 @@ +package club.joylink.rtss.controller.draft; + +import java.util.List; + +import club.joylink.rtss.vo.client.*; +import org.springframework.beans.factory.annotation.Autowired; +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 club.joylink.rtss.services.ISysDictionaryService; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; + +@Api(value="数据字典controller", tags= {"数据字典管理接口"}) +@RestController +@RequestMapping("/api/dictionary") +public class DictionaryController { + + private final ISysDictionaryService iSysDictionaryService; + + @Autowired + public DictionaryController(ISysDictionaryService iSysDictionaryService) { + this.iSysDictionaryService = iSysDictionaryService; + } + + @ApiOperation(value="字典目录分页查询") + @GetMapping(path="/list") + public PageVO queryDic(DictionaryQueryVO queryVO) { + return this.iSysDictionaryService.queryPage(queryVO); + } + + @ApiOperation(value="创建字典目录") + @PostMapping(path="/create") + public void createDic(@RequestBody @Validated DictionaryVO dicVo) { + this.iSysDictionaryService.createDic(dicVo); + } + + @ApiOperation(value="校验字典目录编码是否已经存在") + @GetMapping(path="/checkExistByCode") + public boolean checkExistByCode(String code) { + return this.iSysDictionaryService.checkByCode(code); + } + + @ApiOperation(value="根据id获取对象") + @GetMapping(path="/{id}") + public DictionaryVO getData(@PathVariable Long id) { + return this.iSysDictionaryService.queryData(id); + } + + @ApiOperation(value="更新字典目录信息") + @PutMapping(path="/update/{id}") + public void updateDic(@PathVariable Long id, @RequestBody @Validated DictionaryVO dicVo) { + this.iSysDictionaryService.updateDic(id, dicVo); + } + + @ApiOperation(value="删除字典目录") + @DeleteMapping(path="/delete/{id}") + public void deleteDic(@PathVariable Long id) { + this.iSysDictionaryService.deleteDic(id); + } + + @ApiOperation(value="查询字典目录对应明细数据列表") + @GetMapping(path="/{id}/detail/list") + public PageVO queryDicDetail(@PathVariable(name="id") Long dicId, DictionaryDetailQueryVO queryVO) { + return this.iSysDictionaryService.queryDetailPage(dicId, queryVO); + } + + @ApiOperation(value="创建字典明细") + @PostMapping(path="/{id}/detail/create") + public void createDicDetail(@PathVariable(name="id") Long dicId, @RequestBody @Validated DictionaryDetailVO detailVo) { + detailVo.setDicId(dicId); + this.iSysDictionaryService.createDicDetail(detailVo); + } + + @ApiOperation(value="校验字典明细编码是否存在") + @GetMapping(path="/{id}/detail/checkExistByCode") + public boolean checkDetailExistByCode(@PathVariable(name="id") @ApiParam(name="id", value="字典目录id") Long dicId, + String code) { + return this.iSysDictionaryService.checkDetailByCode(dicId, code); + } + + @ApiOperation(value="根据id获取对象") + @GetMapping(path="/{id}/detail/{detailId}") + public DictionaryDetailVO getDetailData(@PathVariable(name="id") Long dicId, @PathVariable(name="detailId") Long id) { + return this.iSysDictionaryService.getDetailData(dicId, id); + } + + @ApiOperation(value="更新字典明细信息") + @PutMapping(path="/{id}/detail/update/{detailId}") + public void updateDicDetail(@PathVariable(name="id") Long dicId, @PathVariable(name="detailId") Long id, @RequestBody @Validated DictionaryDetailVO detailVo) { + detailVo.setDicId(dicId); + this.iSysDictionaryService.updateDicDetail(id, detailVo); + } + + @ApiOperation(value="删除字典明细") + @DeleteMapping(path="/{id}/detail/delete/{detailId}") + public void deleteDicDetail(@PathVariable(name="id") Long dicId, @PathVariable(name="detailId") Long id) { + this.iSysDictionaryService.deleteDicDetail(id); + } + + @ApiOperation(value="根据字典code获取字典明细列表") + @GetMapping(path="/getDetailListByCode") + public List getDicDetailListByCode(String code) { + return this.iSysDictionaryService.getDicDetailListByDicCode(code); + } + +} diff --git a/src/main/java/club/joylink/rtss/controller/draft/DraftIbpController.java b/src/main/java/club/joylink/rtss/controller/draft/DraftIbpController.java new file mode 100644 index 000000000..b724315d1 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/draft/DraftIbpController.java @@ -0,0 +1,76 @@ +package club.joylink.rtss.controller.draft; + +import club.joylink.rtss.services.draftData.DraftIbpService; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.ibp.IbpCopyVO; +import club.joylink.rtss.vo.client.ibp.IbpCreateVO; +import club.joylink.rtss.vo.client.ibp.IbpQueryVO; +import club.joylink.rtss.vo.client.ibp.IbpVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +@Api(value="草稿IBP盘接口") +@RestController +@RequestMapping("/api/draftIbp") +public class DraftIbpController { + + @Autowired + private DraftIbpService draftIbpService; + + @ApiOperation(value = "查询用户草稿IBP盘绘制数据列表") + @GetMapping("/list/user") + public PageVO queryUserDraftIbpList(IbpQueryVO queryVO, @ApiIgnore @RequestAttribute UserVO user) { + return this.draftIbpService.queryUserDraftIbpList(queryVO, user); + } + + @ApiOperation(value = "创建草稿IBP盘") + @PostMapping("") + public IbpVO createDraftIbp(@RequestBody @Validated IbpCreateVO ibpCreateVO, + @ApiIgnore @RequestAttribute UserVO user) { + return this.draftIbpService.create(ibpCreateVO, user); + } + + @ApiOperation(value = "根据id查询IBP数据") + @GetMapping("/{id}") + public IbpVO getIbp(@PathVariable Long id) { + return this.draftIbpService.getById(id); + } + + @ApiOperation(value = "更新草稿IBP盘基本信息") + @PutMapping("/{id}/basic") + public IbpVO updateDraftIbpBasicInfo(@PathVariable Long id, + @RequestBody @Validated IbpCreateVO ibpCreateVO, + @ApiIgnore @RequestAttribute UserVO user) { + return this.draftIbpService.updateBasicInfo(id, ibpCreateVO, user); + } + + @ApiOperation(value = "更新草稿IBP盘绘图数据") + @PutMapping("/{id}/data") + public void updateDraftIbpDrawData(@PathVariable Long id, @RequestBody String drawData) { + this.draftIbpService.updateDrawData(id, drawData); + } + + @ApiOperation(value = "发布IBP盘数据") + @PostMapping("/{id}/publish") + public void publish(@PathVariable Long id, @ApiIgnore @RequestAttribute UserVO user) { + this.draftIbpService.publish(id, user); + } + + @ApiOperation(value = "根据id删除草稿IBP盘数据") + @DeleteMapping("/{id}/delete") + public void delete(@PathVariable Long id) { + this.draftIbpService.delete(id); + } + + @ApiOperation("复制已有的IBP数据关联新的地图和车站") + @PostMapping("/copy") + public void copy(@Validated @RequestBody IbpCopyVO copyVO, @RequestAttribute UserVO user) { + this.draftIbpService.copyFromPublished(copyVO, user); + } + +} diff --git a/src/main/java/club/joylink/rtss/controller/draft/DraftMapController.java b/src/main/java/club/joylink/rtss/controller/draft/DraftMapController.java new file mode 100644 index 000000000..bba228360 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/draft/DraftMapController.java @@ -0,0 +1,602 @@ +package club.joylink.rtss.controller.draft; + +import club.joylink.rtss.vo.client.map.newmap.MapDestinationCodeDefinitionVO; +import club.joylink.rtss.services.IDraftMapService; +import club.joylink.rtss.services.draftData.DraftMapCiDataGenerator; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageQueryVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.TreeNode; +import club.joylink.rtss.vo.client.map.*; +import club.joylink.rtss.vo.client.map.newmap.*; +import club.joylink.rtss.vo.client.validGroup.DraftMapCreateCheck; +import club.joylink.rtss.vo.client.validGroup.DraftMapCreateFromCheck; +import club.joylink.rtss.vo.client.validGroup.DraftMapPublishCheck; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; +import java.util.Map; +import java.util.Objects; + +@Api(tags = {"地图草稿数据管理接口"}) +@RestController +@RequestMapping("/api/mapBuild") +@Slf4j +public class DraftMapController { + + @Autowired + private IDraftMapService iDraftMapService; + + @Autowired + private DraftMapCiDataGenerator draftMapCiDataGenerator; + + /*-------------- 地图,绘图相关操作 ------------------*/ + + @ApiOperation(value = "获取地图草稿数据列表") + @GetMapping(path = "/list") + public List list(Boolean drawWay, @ApiIgnore @RequestAttribute UserVO user) { + return iDraftMapService.list(drawWay, user); + } + + @ApiOperation(value = "根据草稿地图id查询数据") + @GetMapping(path = "/findById/{draftMapId}") + public DraftMapVO findById(@PathVariable Long draftMapId) { + return iDraftMapService.findById(draftMapId); + } + + @ApiOperation(value = "获取皮肤地图草稿树") + @GetMapping(path = "/tree") + public List tree(@ApiIgnore @RequestAttribute UserVO user) { + return iDraftMapService.tree(user); + } + + @ApiOperation(value = "新建地图草稿") + @PostMapping(path = "/create") + public String create(@RequestBody @Validated(value = DraftMapCreateCheck.class) DraftMapVO draftMapVo, + @ApiIgnore @RequestAttribute UserVO user) { + return iDraftMapService.create(draftMapVo, user); + } + + @ApiOperation(value = "修改地图草稿信息") + @PutMapping(path = "/{id}") + public void update(@PathVariable Long id, @RequestBody @Validated(value = DraftMapCreateCheck.class) DraftMapVO draftMapVo, + @ApiIgnore @RequestAttribute UserVO user) { + iDraftMapService.update(id, draftMapVo, user); + } + + @ApiOperation(value = "地图草稿另存为") + @PostMapping(path = "/{id}/saveAs") + public String saveAs(@PathVariable Long id, @RequestBody DraftMapVO vo) { + return iDraftMapService.saveAs(id, vo.getName()); + } + + @ApiOperation(value = "查询地图及对应数据") + @GetMapping(path = "/{id}/mapDataDetail") + public Object getMapShapeData(@PathVariable Long id) { + return iDraftMapService.getMapShapeData(id); + } + + /** + * 保存地图元素信息 + */ + @ApiOperation(value = "保存地图草稿对象数据") + @PostMapping(path = "/{id}/saveElements") + public void saveMapElsDetail(@PathVariable Long id, @RequestBody String shapeData) { + iDraftMapService.saveMapElsDetail(id, shapeData); + } + + @ApiOperation(value = "清除原联锁数据,生成新的联锁数据并保存") + @PostMapping(path = "/{id}/ci/generateAndSave") + public CiGenerateResultVO generateAndSaveCiData(@PathVariable Long id) { + return this.draftMapCiDataGenerator.generate(id); + } + + @ApiOperation(value = "草稿地图导出") + @GetMapping(path = "/{id}/export") + public MapVO export(@PathVariable Long id, @ApiIgnore @RequestAttribute UserVO user) { + return this.iDraftMapService.export(id); + } + + @ApiOperation(value = "地图数据导入") + @PostMapping(path = "/import") + public void importFrom(@RequestBody MapVO mapVO, @ApiIgnore @RequestAttribute UserVO user) { + iDraftMapService.importFrom(mapVO, user); + } + + @ApiOperation(value = "从发布的地图新建地图草稿") + @PostMapping(path = "/createFrom") + public void createFrom(@RequestBody @Validated(value = DraftMapCreateFromCheck.class) DraftMapVO draftMapVO, + @ApiIgnore @RequestAttribute UserVO user) { + iDraftMapService.createFrom(draftMapVO.getId(), draftMapVO.getName(), user); + } + + /** + * 删除地图草稿 + */ + @ApiOperation(value = "删除地图草稿") + @DeleteMapping(path = "/delete/{id}") + public void deleteMap(@PathVariable Long id, @RequestAttribute UserVO user) { + iDraftMapService.deleteMap(id, user); + } + + @ApiOperation(value = "数据校验") + @GetMapping(path = "/{id}/checkData") + public List checkData(@PathVariable Long id) { + return iDraftMapService.checkData(iDraftMapService.getMapData(id)); + } + + @ApiOperation(value = "发布") + @PostMapping(path = "/{id}/publish") + public List publish(@PathVariable Long id, @RequestBody @Validated(value = DraftMapPublishCheck.class) DraftMapVO draftMapVO, + @ApiIgnore @RequestAttribute UserVO user) { + MapDataVO mapData = iDraftMapService.getMapData(id); + List list = iDraftMapService.checkData(mapData); + if (Objects.nonNull(list) && list.isEmpty()) { + iDraftMapService.publish(id, draftMapVO, user, mapData); + } + return list; + } + + @ApiOperation(value = "发布地图3D数据") + @PostMapping(path = "/{id}/publish/3d") + public void publish3DData(@PathVariable Long id, + @RequestBody @Validated(value = DraftMapPublishCheck.class) DraftMapVO draftMapVO, + @ApiIgnore @RequestAttribute UserVO user) { + this.iDraftMapService.publish3DData(id, draftMapVO, user); + } + + /*-------------- 联动道岔 ------------------*/ + + @ApiOperation(value = "创建联动道岔关系") + @PostMapping(path = "/switchCoupled") + public void createSwitchCoupled(@RequestBody MapSwitchCoupledVO vo) { + iDraftMapService.createSwitchCoupled(vo); + } + + @ApiOperation(value = "查询地图的联动道岔关系列表") + @GetMapping(path = "/{mapId}/switchCoupled") + public PageVO selectSwitchCoupled(@PathVariable Long mapId, MapSwitchCoupledQueryVO queryVO) { + return iDraftMapService.selectSwitchCoupled(mapId, queryVO); + } + + @ApiOperation(value = "删除联动道岔关系") + @DeleteMapping(path = "/switchCoupled/{coupleId}") + public void delSwitchCoupledById(@PathVariable Long coupleId) { + iDraftMapService.delSwitchCoupled(coupleId); + } + + /*-------------- 信号机接近区段 ------------------*/ + + @ApiOperation(value = "创建信号机接近区段") + @PostMapping(path = "/approachSection") + public void createApproachSection(@RequestBody @Validated MapSignalApproachSectionVO approachSectionVO) { + this.iDraftMapService.createApproachSection(approachSectionVO); + } + + @ApiOperation(value = "分页查询信号机接近区段列表") + @GetMapping(path = "/{mapId}/approachSection/paging") + public PageVO queryPagedApproachSection( + @PathVariable Long mapId, + MapApproachSectionQueryVO queryVO) { + return this.iDraftMapService.queryPagedApproachSection(mapId, queryVO); + } + + @ApiOperation(value = "根据id查询信号机接近区段") + @GetMapping(path = "/approachSection/{id}") + public MapSignalApproachSectionVO getApproachSectionById(@PathVariable Long id) { + return this.iDraftMapService.getApproachSectionById(id); + } + + @ApiOperation(value = "更新信号机接近区段") + @PutMapping(path = "/approachSection/{id}") + public void updateApproachSection(@PathVariable Long id, @RequestBody @Validated MapSignalApproachSectionVO approachSectionVO) { + this.iDraftMapService.updateApproachSection(id, approachSectionVO); + } + + @ApiOperation(value = "删除信号机接近区段") + @DeleteMapping(path = "/approachSection/{id}") + public void deleteApproachSection(@PathVariable Long id) { + this.iDraftMapService.deleteApproachSection(id); + } + + /*-------------- 自动信号 ------------------*/ + + @ApiOperation(value = "创建自动信号") + @PostMapping(path = "/autoSignal") + public void createAutoSignal(@RequestBody @Validated MapAutoSignalVO autoSignalVO) { + iDraftMapService.createAutoSignal(autoSignalVO); + } + + @ApiOperation(value = "分页获取自动信号") + @GetMapping(path = "/{mapId}/autoSignal") + public PageVO queryPagedAutoSignal(@PathVariable Long mapId, MapAutoSignalQueryVO queryVO) { + return iDraftMapService.queryPagedAutoSignal(mapId, queryVO); + } + + @ApiOperation(value = "获取自动信号") + @GetMapping(path = "/autoSignal/{autoSignalId}") + public MapAutoSignalVO getAutoSignal(@PathVariable Long autoSignalId) { + return iDraftMapService.getAutoSignal(autoSignalId); + } + + @ApiOperation(value = "更新自动信号") + @PutMapping(path = "/autoSignal/{autoSignalId}") + public void updateAutoSignal(@PathVariable Long autoSignalId, @RequestBody @Validated MapAutoSignalVO autoSignalVO) { + iDraftMapService.updateAutoSignal(autoSignalId, autoSignalVO); + } + + @ApiOperation(value = "删除自动信号") + @DeleteMapping(path = "/autoSignal/{autoSignalId}") + public void deleteAutoSignal(@PathVariable Long autoSignalId) { + iDraftMapService.deleteAutoSignal(autoSignalId); + } + + /*!!!!!!!!!!!!!!!!!!!!!!! 新 自动信号 !!!!!!!!!!!!!!!!!!!!!!!!!!*/ + + @ApiOperation(value = "创建自动信号") + @PostMapping(path = "/autoSignalNew") + public void createAutoSignal(@RequestBody @Validated MapAutoSignalNewVO autoSignalVO) { + iDraftMapService.createAutoSignal(autoSignalVO); + } + + @ApiOperation(value = "分页获取自动信号") + @GetMapping(path = "/{mapId}/autoSignalNew") + public PageVO queryPagedAutoSignalNew(@PathVariable Long mapId, MapAutoSignalQueryVO queryVO) { + return iDraftMapService.queryPagedAutoSignalNew(mapId, queryVO); + } + + @ApiOperation(value = "获取自动信号") + @GetMapping(path = "/autoSignalNew/{autoSignalId}") + public MapAutoSignalNewVO getAutoSignalNew(@PathVariable Long autoSignalId) { + return iDraftMapService.getAutoSignalNew(autoSignalId); + } + + @ApiOperation(value = "更新自动信号") + @PutMapping(path = "/autoSignalNew/{autoSignalId}") + public void updateAutoSignal(@PathVariable Long autoSignalId, @RequestBody @Validated MapAutoSignalNewVO autoSignalVO) { + iDraftMapService.updateAutoSignal(autoSignalId, autoSignalVO); + } + + @ApiOperation(value = "删除自动信号") + @DeleteMapping(path = "/autoSignalNew/{autoSignalId}") + public void deleteAutoSignalNew(@PathVariable Long autoSignalId) { + iDraftMapService.deleteAutoSignal(autoSignalId); + } + + /*-------------- 进路 ------------------*/ + + @ApiOperation(value = "创建进路") + @PostMapping(path = "/route") + public void createRoute(@RequestBody @Validated MapRouteVO routeVO) { + iDraftMapService.createRoute(routeVO); + } + + @ApiOperation(value = "查询进路列表") + @GetMapping(path = "/{mapId}/route") + public PageVO queryPagedRoute(@PathVariable Long mapId, MapRouteQueryVO queryVO) { + return iDraftMapService.queryPagedRoute(mapId, queryVO); + } + + @ApiOperation(value = "查询进路数据明细") + @GetMapping(path = "/route/{routeId}") + public MapRouteVO getRouteDetail(@PathVariable Long routeId) { + return iDraftMapService.getRouteDetail(routeId); + } + + @ApiOperation(value = "更新进路数据") + @PutMapping(path = "/route/{routeId}") + public void updateRoute(@PathVariable Long routeId, @RequestBody @Validated MapRouteVO routeVO) { + iDraftMapService.updateRoute(routeId, routeVO); + } + + @ApiOperation(value = "删除进路") + @DeleteMapping(path = "/route/{routeId}") + public void deleteRoute(@PathVariable Long routeId) { + iDraftMapService.deleteRoute(routeId); + } + + + /*-------------- 新 进路 ------------------*/ + @ApiOperation(value = "创建进路") + @PostMapping(path = "/routeNew") + public void createRoute(@RequestBody @Validated MapRouteNewVO routeVO) { + iDraftMapService.createRoute(routeVO); + } + + @ApiOperation(value = "查询进路列表") + @GetMapping(path = "/{mapId}/routeNew") + public PageVO queryPagedRouteNew(@PathVariable Long mapId, MapRouteQueryVO queryVO) { + return iDraftMapService.queryPagedRouteNew(mapId, queryVO); + } + + @ApiOperation(value = "查询进路数据明细") + @GetMapping(path = "/routeNew/{routeId}") + public MapRouteNewVO getRouteDetailNew(@PathVariable Long routeId) { + return iDraftMapService.getRouteDetailNew(routeId); + } + + @ApiOperation(value = "更新进路数据") + @PutMapping(path = "/routeNew/{routeId}") + public void updateRoute(@PathVariable Long routeId, @RequestBody @Validated MapRouteNewVO routeVO) { + iDraftMapService.updateRoute(routeId, routeVO); + } + + @ApiOperation(value = "删除进路") + @DeleteMapping(path = "/routeNew/{routeId}") + public void deleteRouteNew(@PathVariable Long routeId) { + iDraftMapService.deleteRoute(routeId); + } + + /*-------------- 延续保护 ------------------*/ + + @ApiOperation(value = "创建延续保护") + @PostMapping(path = "/overlap") + public void createOverlap(@RequestBody @Validated MapOverlapVO mapOverlapVO) { + this.iDraftMapService.createOverlap(mapOverlapVO); + } + + @ApiOperation(value = "分页查询延续保护列表") + @GetMapping(path = "/{mapId}/overlap/paging") + public PageVO queryPagedOverlap( + @PathVariable Long mapId, + MapOverlapQueryVO queryVO) { + return this.iDraftMapService.queryPagedOverlap(mapId, queryVO); + } + + @ApiOperation(value = "根据id查询延续保护") + @GetMapping(path = "/overlap/{id}") + public MapOverlapVO getOverlapById(@PathVariable Long id) { + return this.iDraftMapService.getOverlapById(id); + } + + @ApiOperation(value = "更新延续保护") + @PutMapping(path = "/overlap/{id}") + public void updateOverlap(@PathVariable Long id, @RequestBody @Validated MapOverlapVO mapOverlapVO) { + this.iDraftMapService.updateOverlap(id, mapOverlapVO); + } + + @ApiOperation(value = "删除延续保护") + @DeleteMapping(path = "/overlap/{id}") + public void deleteOverlap(@PathVariable Long id) { + this.iDraftMapService.deleteOverlap(id); + } + + /*-------------- 自动折返 ------------------*/ + + @ApiOperation(value = "创建自动折返") + @PostMapping(path = "/autoReentry") + public void createAutoReentry(@RequestBody @Validated MapAutoReentryVO mapAutoReentryVO) { + this.iDraftMapService.createAutoReentry(mapAutoReentryVO); + } + + @ApiOperation(value = "分页查询自动折返列表") + @GetMapping(path = "/{mapId}/autoReentry/paging") + public PageVO queryPagedAutoReentry( + @PathVariable Long mapId, + MapAutoReentryQueryVO queryVO) { + return this.iDraftMapService.queryPagedAutoReentry(mapId, queryVO); + } + + @ApiOperation(value = "查询根据折返轨分组的自动折返列表") + @GetMapping(path = "/{mapId}/autoReentry/group/reentryTrack") + public Map> queryAutoReentrysGroupByReentryTrack( + @PathVariable Long mapId) { + return this.iDraftMapService.queryAutoReentrysGroupByReentryTrack(mapId); + } + + @ApiOperation(value = "根据id查询自动折返") + @GetMapping(path = "/autoReentry/{id}") + public MapAutoReentryVO getAutoReentryById(@PathVariable Long id) { + return this.iDraftMapService.getAutoReentryById(id); + } + + @ApiOperation(value = "更新自动折返") + @PutMapping(path = "/autoReentry/{id}") + public void updateAutoReentry(@PathVariable Long id, @RequestBody @Validated MapAutoReentryVO mapAutoReentryVO) { + this.iDraftMapService.updateAutoReentry(id, mapAutoReentryVO); + } + + @ApiOperation(value = "删除自动折返") + @DeleteMapping(path = "/autoReentry/{id}") + public void deleteAutoReentry(@PathVariable Long id) { + this.iDraftMapService.deleteAutoReentry(id); + } + + /*-------------- 路径单元 ------------------*/ + + @ApiOperation(value = "获取路径单元列表") + @GetMapping(path = "/{mapId}/routeUnit") + public PageVO getRouteUnitList(@PathVariable Long mapId, MapRouteUnitQueryVO queryVO) { + return iDraftMapService.getRouteUnitList(mapId, queryVO); + } + + @ApiOperation(value = "创建路径单元") + @PostMapping(path = "/routeUnit") + public void createRouteUnit(@RequestBody @Validated MapRouteUnitVO mapRouteUnitVO) { + iDraftMapService.createRouteUnit(mapRouteUnitVO); + } + + @ApiOperation(value = "获取路径单元") + @GetMapping(path = "/routeUnit/{routeUnitId}") + public MapRouteUnitVO getRouteUnit(@PathVariable Long routeUnitId) { + return iDraftMapService.getRouteUnit(routeUnitId); + } + + @ApiOperation(value = "更新路径单元") + @PutMapping(path = "/routeUnit/{routeUnitId}") + public void updateRouteUnit(@PathVariable Long routeUnitId, @RequestBody @Validated MapRouteUnitVO mapRouteUnitVO) { + iDraftMapService.updateRouteUnit(routeUnitId, mapRouteUnitVO); + } + + @ApiOperation(value = "删除路径单元") + @DeleteMapping(path = "/routeUnit/{routeUnitId}") + public void deleteRouteUnit(@PathVariable Long routeUnitId) { + iDraftMapService.deleteRouteUnit(routeUnitId); + } + + /*-------------- 交路 ------------------*/ + + @ApiOperation(value = "创建交路") + @PostMapping(path = "/routing") + public void createRouting(@RequestBody @Validated MapRoutingVO routingVO) { + iDraftMapService.createRouting(routingVO); + } + + @ApiOperation(value = "分页获取交路") + @GetMapping(path = "/{mapId}/routing") + public PageVO queryPagedRouting(@PathVariable Long mapId, PageQueryVO queryVO) { + return iDraftMapService.queryPagedRouting(mapId, queryVO); + } + + @ApiOperation(value = "获取交路") + @GetMapping(path = "/routing/{routingId}") + public MapRoutingVO getRouting(@PathVariable Long routingId) { + return iDraftMapService.getRouting(routingId); + } + + @ApiOperation(value = "更新交路") + @PutMapping(path = "/routing/{routingId}") + public void updateRouting(@PathVariable Long routingId, @RequestBody @Validated MapRoutingVO routingVO) { + iDraftMapService.updateRouting(routingId, routingVO); + } + + @ApiOperation(value = "删除交路") + @DeleteMapping(path = "/routing/{routingId}") + public void deleteRouting(@PathVariable Long routingId) { + iDraftMapService.deleteRouting(routingId); + } + + /*-------------- 新 交路 ------------------*/ + + @ApiOperation(value = "创建交路,可同时创建回路") + @PostMapping(path = "/routingData") + public void createRoutingData(@RequestBody @Validated MapRoutingDataVO routingVO) { + iDraftMapService.createRoutingData(routingVO); + } + + @ApiOperation(value = "生成交路区段数据") + @PutMapping(path = "/routingData/generate") + public MapRoutingDataVO generateRoutingData(@RequestBody @Validated MapRoutingDataVO routingVO) { + return iDraftMapService.generateRoutingData(routingVO); + } + + @ApiOperation(value = "分页获取交路") + @GetMapping(path = "/{mapId}/routingData") + public PageVO queryPagedRoutingData(@PathVariable Long mapId, MapRoutingDataQueryVO queryVO) { + return iDraftMapService.queryPagedRoutingData(mapId, queryVO); + } + + @ApiOperation(value = "获取交路详情") + @GetMapping(path = "/routingData/{routingId}") + public MapRoutingDataVO getRoutingData(@PathVariable Long routingId) { + return iDraftMapService.getRoutingData(routingId); + } + + @ApiOperation(value = "更新交路") + @PutMapping(path = "/routingData/{routingId}") + public void updateRoutingData(@PathVariable Long routingId, @RequestBody @Validated MapRoutingDataVO routingVO) { + iDraftMapService.updateRoutingData(routingId, routingVO); + } + + @ApiOperation(value = "删除交路") + @DeleteMapping(path = "/routingData/{routingId}") + public void deleteRoutingData(@PathVariable Long routingId) { + iDraftMapService.deleteRouting(routingId); + } + + /*-------------- 新 车站区段停站时间 ------------------*/ + + @ApiOperation(value = "创建车站区段停站时间") + @PostMapping(path = "/stationParkTime") + public void createStationParkTime(@RequestBody @Validated MapStationParkingTimeVO parkingTimeVO) { + iDraftMapService.createStationParkTime(parkingTimeVO); + } + + @ApiOperation(value = "分页车站区段停站时间") + @GetMapping(path = "/{mapId}/stationParkTime") + public PageVO queryPagedStationParkTime(@PathVariable Long mapId, MapParkTimeQueryVO queryVO) { + return iDraftMapService.queryPagedStationParkTime(mapId, queryVO); + } + + @ApiOperation(value = "获取车站区段停站时间") + @GetMapping(path = "/stationParkTime/{id}") + public MapStationParkingTimeVO getStationParkTime(@PathVariable Long id) { + return iDraftMapService.getStationParkTime(id); + } + + @ApiOperation(value = "更新车站区段停站时间") + @PutMapping(path = "/stationParkTime/{id}") + public void updateStationParkTime(@PathVariable Long id, @RequestBody @Validated MapStationParkingTimeVO parkingTimeVO) { + iDraftMapService.updateStationParkTime(id, parkingTimeVO); + } + + @ApiOperation(value = "删除车站区段停站时间") + @DeleteMapping(path = "/stationParkTime/{id}") + public void deleteStationParkTime(@PathVariable Long id) { + iDraftMapService.deleteStationParkTime(id); + } + + /*-------------- 3d ------------------*/ + + @ApiOperation(value = "创建地图3d数据") + @PostMapping(path = "/3dMapData") + public Map3dDataVO create3dMapData(@RequestBody @Validated Map3dDataVO mapData3D, @RequestAttribute UserVO user) { + return iDraftMapService.create3dMapData(mapData3D, user); + } + + @ApiOperation(value = "通过地图id获取地图3d数据") + @GetMapping(path = "/3dMapData/{mapId}") + public Map3dDataVO get3dMapDataByMapId(@PathVariable Long mapId) { + return iDraftMapService.find3dMapDataByMapId(mapId); + } + + @ApiOperation(value = "更新保存地图3d数据") + @PutMapping(path = "/3dMapData/{map3dId}") + public void update3dMapData(@PathVariable Long map3dId, @RequestBody @Validated Map3dDataVO mapData3D) { + iDraftMapService.update3dMapData(map3dId, mapData3D); + } + + /*-------------- 目的地码 ------------------*/ + + @ApiOperation(value = "保存目的地码") + @PostMapping("/{mapId}/destinationCodeDefinition") + public void saveOperationDefinitions(@PathVariable Long mapId, @RequestBody @Validated MapDestinationCodeDefinitionVO operationDefinitionVO) { + iDraftMapService.saveOperationDefinitions(mapId, operationDefinitionVO); + } + + @ApiOperation(value = "根据地图id和code获取目的地码") + @GetMapping("/{mapId}/{code}/destinationCodeDefinition") + public MapDestinationCodeDefinitionVO getOperationDefinitions(@PathVariable Long mapId, @PathVariable String code) { + return iDraftMapService.getOperationDefinitions(mapId, code); + } + + @ApiOperation("分页获取目的地码") + @GetMapping("/{mapId}/destinationCodeDefinition") + public PageVO queryPagedOperationDefinitions(@PathVariable Long mapId, MapDestinationCodeDefinitionQueryVO queryVO) { + return iDraftMapService.pagedQueryOperationDefinitions(mapId, queryVO); + } + + @ApiOperation("更新目的地码") + @PutMapping("/{mapId}/destinationCodeDefinition") + public void updateOperationDefinition(@PathVariable Long mapId, @RequestBody MapDestinationCodeDefinitionVO definitionVO) { + iDraftMapService.updateOperationDefinition(mapId, definitionVO); + } + + @ApiOperation("删除目的地码") + @DeleteMapping("/{mapId}/{code}/destinationCodeDefinition") + public void deleteOperationDefinition(@PathVariable Long mapId, @PathVariable String code){ + iDraftMapService.deleteOperationDefinition(mapId, code); + } + + @ApiOperation(value = "处理信号机显示方向") + @PutMapping(path = "/handle/signal/directionshow") + public void handleSignalDirectionShowType() { + this.iDraftMapService.handleSignalDirectionShowType(); + } +} diff --git a/src/main/java/club/joylink/rtss/controller/draft/DraftMapDataHandleController.java b/src/main/java/club/joylink/rtss/controller/draft/DraftMapDataHandleController.java new file mode 100644 index 000000000..b4e247be1 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/draft/DraftMapDataHandleController.java @@ -0,0 +1,40 @@ +package club.joylink.rtss.controller.draft; + +import club.joylink.rtss.services.draftData.DraftMapDataHandleService; +import io.swagger.annotations.Api; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@Slf4j +@Api(tags = {"草稿地图数据处理接口"}) +@RestController +@RequestMapping("/api/draftMap/handle") +public class DraftMapDataHandleController { + + @Autowired + private DraftMapDataHandleService draftMapDataHandleService; + + @PutMapping("/{mapId}/routeRelationDataLose") + public void handleRouteRelationDataLose(@PathVariable Long mapId) { + this.draftMapDataHandleService.handleRouteRelationDataLose(mapId); + } + + @PutMapping("/{mapId}/signalTypeAndInterlockArea") + public void handleSignalTypeAndInterlockArea(@PathVariable Long mapId) { + this.draftMapDataHandleService.handleSignalTypeAndInterlockArea(mapId); + } + + @PutMapping("/{mapId}/sectionRelStation") + public void handleSectionRelStation(@PathVariable Long mapId) { + this.draftMapDataHandleService.handleSectionRelStation(mapId); + } + + @PutMapping("/{mapId}/calculateSectionLen") + public void calculateSectionLen(@PathVariable Long mapId) { + this.draftMapDataHandleService.calculateSectionLen(mapId); + } +} diff --git a/src/main/java/club/joylink/rtss/controller/draft/DraftMapFlankProtectionController.java b/src/main/java/club/joylink/rtss/controller/draft/DraftMapFlankProtectionController.java new file mode 100644 index 000000000..479c18fc3 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/draft/DraftMapFlankProtectionController.java @@ -0,0 +1,58 @@ +package club.joylink.rtss.controller.draft; + +import club.joylink.rtss.services.draftData.DraftMapFlankProtectionService; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.map.newmap.MapRouteFlankProtectionNewVO; +import club.joylink.rtss.vo.client.map.newmap.MapRouteFlankProtectionQueryVO; +import club.joylink.rtss.vo.client.map.newmap.validate.RunLevelCreateCheck; +import club.joylink.rtss.vo.client.map.newmap.validate.RunLevelUpdateCheck; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +@Api(tags = {"草稿地图侧防管理接口"}) +@RestController +@RequestMapping("/api/draftMap/flankProtection") +@Slf4j +public class DraftMapFlankProtectionController { + + @Autowired + private DraftMapFlankProtectionService draftMapFlankProtectionService; + + @ApiOperation(value = "新建进路侧防") + @PostMapping(path = "") + public void create(@RequestBody @Validated MapRouteFlankProtectionNewVO flankProtectionNewVO) { + this.draftMapFlankProtectionService.create(flankProtectionNewVO); + } + + @ApiOperation(value = "查询进路侧防列表") + @GetMapping(path = "/{mapId}/paging") + public PageVO pagingQueryFlankProtection(@PathVariable Long mapId, + MapRouteFlankProtectionQueryVO queryVO) { + return this.draftMapFlankProtectionService.pagingQueryFlankProtections(mapId, queryVO); + } + + @ApiOperation(value = "查询进路侧防明细") + @GetMapping(path = "/{id}") + public MapRouteFlankProtectionNewVO getRouteDetailNew(@PathVariable Long id) { + return this.draftMapFlankProtectionService.getById(id); + } + + @ApiOperation(value = "更新进路侧防数据") + @PutMapping(path = "/{id}") + public void update(@PathVariable Long id, @RequestBody @Validated MapRouteFlankProtectionNewVO flankProtectionNewVO) { + this.draftMapFlankProtectionService.update(id, flankProtectionNewVO); + } + + @ApiOperation(value = "删除进路侧防") + @DeleteMapping(path = "/{id}") + public void delete(@PathVariable Long id) { + this.draftMapFlankProtectionService.delete(id); + } + +} diff --git a/src/main/java/club/joylink/rtss/controller/draft/DraftMapRunPlanController.java b/src/main/java/club/joylink/rtss/controller/draft/DraftMapRunPlanController.java new file mode 100644 index 000000000..6e5bb207d --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/draft/DraftMapRunPlanController.java @@ -0,0 +1,45 @@ +package club.joylink.rtss.controller.draft; + +import club.joylink.rtss.entity.DraftMapRunPlan; +import club.joylink.rtss.services.IDraftMapRunPlanService; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.runplan.RunPlanEChartsDataVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +@Api(tags = {"草稿地图运行计划接口"}) +@RestController +@RequestMapping("/api/draftMap/runPlan") +public class DraftMapRunPlanController { + + @Autowired + private IDraftMapRunPlanService iDraftMapRunPlanService; + + @ApiOperation(value = "根据草稿地图id查询草稿地图运行图") + @GetMapping("/findByDraftMapId/{draftMapId}") + public List findByDraftMapId(@PathVariable Long draftMapId){ + return iDraftMapRunPlanService.findByDraftMapId(draftMapId); + } + + @ApiOperation(value = "根据草稿运行图id查询数据绘制运行图") + @GetMapping("/selectDiagramData/{planId}") + public RunPlanEChartsDataVO selectDiagramData(@PathVariable Long planId){ + return iDraftMapRunPlanService.selectDiagramData(planId); + } + + @ApiOperation(value = "运行图仿真测试") + @GetMapping("/simulationCheck/{planId}") + public String simulationCheck(@PathVariable Long planId, @RequestAttribute UserVO user){ + return iDraftMapRunPlanService.simulationCheck(planId,user); + } + + @ApiOperation(value = "根据草稿地图id查询车站") + @GetMapping("/selectMapStation/{draftMapId}") + public List selectMapStation(@PathVariable Long draftMapId){ + return iDraftMapRunPlanService.selectMapStation(draftMapId); + } +} diff --git a/src/main/java/club/joylink/rtss/controller/draft/DraftMapStationRunLevelController.java b/src/main/java/club/joylink/rtss/controller/draft/DraftMapStationRunLevelController.java new file mode 100644 index 000000000..fa373ae2b --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/draft/DraftMapStationRunLevelController.java @@ -0,0 +1,73 @@ +package club.joylink.rtss.controller.draft; + +import club.joylink.rtss.services.draftData.DraftMapRunLevelService; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.map.newmap.MapRunLevelQueryVO; +import club.joylink.rtss.vo.client.map.newmap.MapStationRunLevelVO; +import club.joylink.rtss.vo.client.map.newmap.validate.RunLevelCreateCheck; +import club.joylink.rtss.vo.client.map.newmap.validate.RunLevelUpdateCheck; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +@Api(tags = {"草稿地图运行等级管理接口"}) +@RestController +@RequestMapping("/api/draftMap/runLevel") +@Slf4j +public class DraftMapStationRunLevelController { + + @Autowired + private DraftMapRunLevelService draftMapRunLevelService; + + @ApiOperation(value = "根据地图交路区段生成站间运行等级") + @PostMapping(path = "/generate/routing/{routingId}") + public void generate(@PathVariable Long routingId) { + this.draftMapRunLevelService.generate(routingId); + } + + @ApiOperation(value = "根据地图交路一键生成生成所有站间运行等级") + @PostMapping(path = "/generate/routing") + public void autoGenerate(Long mapId) { + this.draftMapRunLevelService.autoGenerate(mapId); + } + + @ApiOperation(value = "根据地图起始-终点车站站台区段生成站间运行等级") + @PostMapping(path = "/generate") + public MapStationRunLevelVO generate(@RequestBody @Validated MapStationRunLevelVO runLevelVO) { + return this.draftMapRunLevelService.generate(runLevelVO); + } + + @ApiOperation(value = "新建站间运行等级") + @PostMapping(path = "") + public void createRoute(@RequestBody @Validated(RunLevelCreateCheck.class) MapStationRunLevelVO runLevelVO) { + this.draftMapRunLevelService.create(runLevelVO); + } + + @ApiOperation(value = "查询站间运行等级列表") + @GetMapping(path = "/{mapId}/listAll") + public PageVO queryPagedRouteNew(@PathVariable Long mapId, MapRunLevelQueryVO queryVO) { + return this.draftMapRunLevelService.queryAllRunLevels(mapId, queryVO); + } + + @ApiOperation(value = "查询站间运行等级明细") + @GetMapping(path = "/{id}") + public MapStationRunLevelVO getRouteDetailNew(@PathVariable Long id) { + return this.draftMapRunLevelService.getById(id); + } + + @ApiOperation(value = "更新站间运行等级数据") + @PutMapping(path = "/{id}") + public void updateRoute(@PathVariable Long id, @RequestBody @Validated(RunLevelUpdateCheck.class) MapStationRunLevelVO runLevelVO) { + this.draftMapRunLevelService.update(id, runLevelVO); + } + + @ApiOperation(value = "删除站间运行等级") + @DeleteMapping(path = "/{id}") + public void deleteRouteNew(@PathVariable Long id) { + this.draftMapRunLevelService.delete(id); + } + +} diff --git a/src/main/java/club/joylink/rtss/controller/draft/DraftPlanController.java b/src/main/java/club/joylink/rtss/controller/draft/DraftPlanController.java new file mode 100644 index 000000000..20e46066f --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/draft/DraftPlanController.java @@ -0,0 +1,11 @@ +package club.joylink.rtss.controller.draft; + +import io.swagger.annotations.Api; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@Api(tags = {"发布地图用户运行计划接口"}) +@RestController +@RequestMapping("/api/plan") +public class DraftPlanController { +} diff --git a/src/main/java/club/joylink/rtss/controller/iscs/IscsController.java b/src/main/java/club/joylink/rtss/controller/iscs/IscsController.java new file mode 100644 index 000000000..2e5db796c --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/iscs/IscsController.java @@ -0,0 +1,37 @@ +package club.joylink.rtss.controller.iscs; + +import club.joylink.rtss.services.IIscsService; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.iscs.IscsVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +@Api(tags = {"iscs数据"}) +@RestController +@RequestMapping("/api/v1/iscs") +@Slf4j +public class IscsController { + + @Autowired + private IIscsService iscsService; + + /** + * 保存地图元素信息 + */ + @ApiOperation(value = "保存iscs数据") + @PostMapping(path = "saveElements") + public void saveIscsData(@RequestBody IscsVO iscsVO ,@ApiIgnore @RequestAttribute UserVO user) { + iscsService.saveIscsData(iscsVO); + } + + @ApiOperation(value = "根据条件获取iscs数据") + @GetMapping + public IscsVO getIscsDataBy(IscsVO iscsVO, @ApiIgnore @RequestAttribute UserVO user) { + return this.iscsService.getIscsDataBy(iscsVO); + } + +} diff --git a/src/main/java/club/joylink/rtss/controller/license/LicenseController.java b/src/main/java/club/joylink/rtss/controller/license/LicenseController.java new file mode 100644 index 000000000..92d75d7c0 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/license/LicenseController.java @@ -0,0 +1,64 @@ +package club.joylink.rtss.controller.license; + +import club.joylink.rtss.services.license.LicenseService; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.license.LicenseCreateCheck; +import club.joylink.rtss.vo.license.LicenseQueryVO; +import club.joylink.rtss.vo.license.LicenseVO; +import club.joylink.rtss.vo.license.LicenseValidateCheck; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.Objects; + +@Api(tags = {"许可证服务接口"}) +@RestController +@RequestMapping(path = "/api/license") +public class LicenseController { + + @Autowired + private LicenseService licenseService; + + @ApiOperation("创建新的license") + @PostMapping("") + public void createLicense(@RequestBody @Validated(LicenseCreateCheck.class) LicenseVO licenseVO) { + this.licenseService.createLicense(licenseVO); + } + + @ApiOperation("分页查询license数据列表") + @GetMapping("/pagingQuery") + public PageVO pagedQuery(LicenseQueryVO queryVO) { + return this.licenseService.pagedQuery(queryVO); + } + + @ApiOperation("设置失效(不可用)") + @PutMapping("/{id}/invalidating") + public void invalidating(@PathVariable Long id) { + this.licenseService.invalidating(id); + } + + @ApiOperation("本地部署第一次使用连接互联网访问joylink服务验证license") + @PostMapping("/validate") + public boolean validateLicense(@RequestBody @Validated(LicenseValidateCheck.class) LicenseVO licenseVO) { + return this.licenseService.validateLicense(licenseVO.getLicense()); + } + + @ApiOperation("连接互联网验证license成功后将license证书保存到本地部署服务器") + @PostMapping("/local") + public void saveLocalLicense(@RequestBody @Validated(LicenseValidateCheck.class) LicenseVO licenseVO) { + this.licenseService.saveLocalLicense(licenseVO.getLicense()); + } + + @ApiOperation("获取本地已经保存的license") + @GetMapping("/local") + public String getLocalLicense() { + LicenseVO license = this.licenseService.getLicense(); + if (Objects.nonNull(license)) { + return license.generateLicense(); + } + return ""; + } +} diff --git a/src/main/java/club/joylink/rtss/controller/om/PushMessageController.java b/src/main/java/club/joylink/rtss/controller/om/PushMessageController.java new file mode 100644 index 000000000..748a5da5a --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/om/PushMessageController.java @@ -0,0 +1,45 @@ +package club.joylink.rtss.controller.om; + +import club.joylink.rtss.services.LoginSessionManager; +import club.joylink.rtss.vo.client.WebSocketMessageType; +import club.joylink.rtss.vo.client.factory.SocketMessageFactory; +import club.joylink.rtss.vo.client.pushMessage.CommonMessageVO; +import club.joylink.rtss.websocket.StompMessageService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import javax.validation.Valid; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; + +@Api(value = "推送消息管理controller", tags = "推送消息管理接口") +@Slf4j +@RestController +@RequestMapping("/api/pushMessage") +public class PushMessageController { + + @Autowired + private StompMessageService stompMessageService; + + @Autowired + private LoginSessionManager loginSessionManager; + + @ApiOperation(value = "触发消息推送", httpMethod = "POST") + @RequestMapping(method = RequestMethod.POST) + public void pushMessage(@ApiParam(name = "传入对象", type = "json", value = "传入json格式", required = true) @Valid @RequestBody CommonMessageVO commonMessageVO) { + log.info("****触发消息推送********"); + List userIdList = this.loginSessionManager.getAllLoginUserIds(); + Set allSubscribers = userIdList.stream().map(id -> String.valueOf(id)).collect(Collectors.toSet()); + this.stompMessageService.sendToUser(allSubscribers, + SocketMessageFactory.buildBasic(WebSocketMessageType.BROADCAST, commonMessageVO)); + } + +} diff --git a/src/main/java/club/joylink/rtss/controller/permission/GoodsController.java b/src/main/java/club/joylink/rtss/controller/permission/GoodsController.java new file mode 100644 index 000000000..c845ab827 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/permission/GoodsController.java @@ -0,0 +1,111 @@ +package club.joylink.rtss.controller.permission; + +import club.joylink.rtss.services.IGoodsService; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.GoodsTryVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.goods.GoodsQueryVO; +import club.joylink.rtss.vo.client.goods.GoodsUpdateVO; +import club.joylink.rtss.vo.client.goods.GoodsVO; +import club.joylink.rtss.vo.client.permission.PermissionQueryVO; +import club.joylink.rtss.vo.client.permission.PermissionSelectVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.Map; + +@Api(tags = {"商品管理接口"}) +@RestController +@RequestMapping(path = "/api/goods") +public class GoodsController { + + @Autowired + private IGoodsService iGoodsService; + + @ApiOperation(value = "分页查询商品") + @GetMapping(path = "") + public PageVO queryPagedGoods(GoodsQueryVO queryVO) { + return iGoodsService.queryPagedGoods(queryVO); + } + + @ApiOperation(value = "查询指定权限的商品") + @GetMapping(path = "/detail") + public PageVO queryPagedGoodsByPermission(PermissionQueryVO queryVO) { + return iGoodsService.queryPagedGoodsByPermission(queryVO); + } + + @ApiOperation(value = "查询商品详情") + @GetMapping(path = "/{id}") + public GoodsVO selectById(@PathVariable long id) { + return iGoodsService.selectById(id); + } + + @ApiOperation(value = "获取有效商品列表") + @GetMapping(path = "/list") + public List selectValidGoodsList() { + return iGoodsService.selectValidGoodsList(); + } + +// @ApiOperation(value = "创建商品") +// @PostMapping(path = "") +// public GoodsVO createGoods(@RequestBody @Validated(value = {CreateGoodsCheck.class}) GoodsCreateVO createVO, @ApiIgnore @RequestAttribute UserVO user) { +// return iGoodsService.createGoods(createVO, user); +// } +// +// @ApiOperation(value = "批量创建商品") +// @PostMapping(path = "/create/list") +// public List createManyGoods(@RequestBody @Validated(value = {CreateGoodsCheck.class}) List createVOList, @ApiIgnore @RequestAttribute UserVO user) { +// return iGoodsService.createManyGoods(createVOList, user); +// } +// +// @ApiOperation(value = "通过关联权限创建权限包商品") +// @PostMapping(path = "/create/package") +// public GoodsVO createGoodsByRelPermissions(@RequestBody @Validated(value = {CreateGoodsByPermissionPackageCheck.class}) GoodsCreateVO createVO, @ApiIgnore @RequestAttribute UserVO user) { +// return iGoodsService.createGoodsByRelPermissions(createVO, user); +// } + + @ApiOperation(value = "更新商品") + @PutMapping(path = "/{id}") + public void updateGoods(@PathVariable Long id, @RequestBody GoodsUpdateVO updateVO, @RequestAttribute UserVO user) { + iGoodsService.updateGoods(id, updateVO, user); + } + +// @ApiOperation(value = "删除商品") +// @DeleteMapping(path = "/{id}") +// public void deleteGoods(@PathVariable long id) { +// iGoodsService.deleteGoods(id); +// } + + @ApiOperation(value = "更新试用时间") + @PutMapping(path = "/{id}/tryUse") + public void tryUse(@PathVariable Long id, @RequestBody Map map, @RequestAttribute UserVO user) { + this.iGoodsService.tryUse(id, map, user); + } + + @ApiOperation(value = "获取试用时长") + @GetMapping(path = "/tryUse") + public GoodsTryVO getTryUseTime(PermissionSelectVO permissionSelectVO, @RequestAttribute UserVO user) { + return this.iGoodsService.getTryUseTime(permissionSelectVO, user); + } + + @ApiOperation(value = "切换商品是否可用") + @PutMapping(path = "/{id}/status") + public void toggleGoodsStatus(@PathVariable long id) { + iGoodsService.toggleGoodsStatus(id); + } + + @ApiOperation(value = "根据权限id查询商品") + @GetMapping(path = "/permissionId") + public GoodsVO selectGoodsByPermissionId(Long permissionId) { + return iGoodsService.selectGoodsByPermissionId(permissionId); + } + + @ApiOperation(value = "根据权限ids查询权限包商品") + @GetMapping(path = "/permissionIds") + public GoodsVO findGoodsByPermissionIds(Long[] ids) { + return iGoodsService.findGoodsByPermissionIds(ids); + } +} diff --git a/src/main/java/club/joylink/rtss/controller/permission/OrderController.java b/src/main/java/club/joylink/rtss/controller/permission/OrderController.java new file mode 100644 index 000000000..bf348fa18 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/permission/OrderController.java @@ -0,0 +1,135 @@ +package club.joylink.rtss.controller.permission; + +import club.joylink.rtss.services.IOrderService; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.order.OrderCreateVO; +import club.joylink.rtss.vo.client.order.OrderDetailVO; +import club.joylink.rtss.vo.client.order.OrderVO; +import club.joylink.rtss.vo.client.permission.OrderQueryVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; + +@Api(tags = { "订单管理接口" }) +@RestController +@RequestMapping("/api/order") +public class OrderController { + @Autowired + private IOrderService iOrderService; + + @ApiOperation(value = "分页获取订单") + @GetMapping(path = "") + public PageVO queryPagedOrders(OrderQueryVO queryVO) { + return this.iOrderService.queryPagedOrders(queryVO); + } + + @ApiOperation(value = "分页获取订单(销售员)") + @GetMapping(path = "/seller") + public PageVO queryPagedOrders(OrderQueryVO queryVO, @RequestAttribute @ApiIgnore UserVO user) { + return this.iOrderService.queryPagedOrders(queryVO, user); + } + + @ApiOperation(value = "创建订单") + @PostMapping(path="") + public String createOrder(@RequestBody @Validated OrderCreateVO createVO, @RequestAttribute @ApiIgnore UserVO user) { + return this.iOrderService.createOrder(createVO, user); + } + + @ApiOperation(value = "获取订单详情") + @GetMapping(path = "/{id}") + public List getOrderDetail(@PathVariable Long id) { + return this.iOrderService.getOrderDetail(id); + } + + // -----------未完成接口------------ + + @ApiOperation(value = "订单支付") + @GetMapping(path = "/{id}/{payType}/pay") + public String pay(@PathVariable long id, @PathVariable String payType) { + return this.iOrderService.pay(id, payType); + } + + @ApiOperation(value = "订单提交") + @PostMapping(path = "/submit") + public OrderCreateVO submit(@RequestBody OrderCreateVO orderCreateVO, @RequestAttribute UserVO user) { + return this.iOrderService.submit(orderCreateVO, user); + } + + @ApiOperation(value = "计算订单总价") + @GetMapping(path = "/price") + public Float computeTotal(Long goodsId, Integer goodsAmount, Integer monthAmount) { + return this.iOrderService.compute(goodsId, goodsAmount, monthAmount); + } + + @ApiOperation(value = "订单取消支付") + @PutMapping(path = "/{id}/cancelPay") + public void cancelPay(@PathVariable Long id, @RequestAttribute UserVO user) { + this.iOrderService.cancelPay(id, user); + } + +/* + + @ApiOperation(value = "创建订单") + @PostMapping(path="") + public void createOrder(@RequestBody @Validated OrderCreateVO order, @RequestAttribute @ApiIgnore UserVO user) { + this.iOrderService.createOrder(order, user); + } + + + */ +/** + * 快速生成订单 + * @param order + * @param user + * @return 返回生成的订单id + *//* + + @PostMapping(path = "/quicklyGenerateOrder") + public String quicklyGenerateOrder(@RequestBody OrderJsonVO order,@RequestAttribute UserVO user){ + + return this.iOrderService.quicklyGenerateOrder(order,user); + } + + @ApiOperation(value = "计算订单总价") + @GetMapping(path = "/price") + public Float computeTotal(Long goodsId, Integer goodsAmount, Integer monthAmount) { + return this.iOrderService.compute(goodsId, goodsAmount, monthAmount); + } + + @ApiOperation(value = "订单提交") + @PostMapping(path = "/submit") + public OrderCreateVO submit(@RequestBody OrderCreateVO orderCreateVO, @RequestAttribute UserVO user) { + return this.iOrderService.submit(orderCreateVO, user); + } + + @ApiOperation(value = "订单支付") + @GetMapping(path = "/{id}/{payType}/pay") + public String pay(@PathVariable long id, @PathVariable String payType) { + return this.iOrderService.pay(id, payType); + } +// @ApiOperation(value = "订单支付完成,为用户生成权限,测试分发权限使用,先数据库修改订单状态") +// @GetMapping(path = "/{code}/{totalfee}/completePay") +// public SaleOrder completePay(@PathVariable String code,@PathVariable int totalfee) throws PayException { +// return this.iOrderService.completePay(code,totalfee,"03"); +// } + + @ApiOperation(value = "订单取消支付") + @PutMapping(path = "/{id}/cancelPay") + public void cancelPay(@PathVariable Long id, @RequestAttribute UserVO user) { + this.iOrderService.cancelPay(id, user); + } + + @ApiOperation(value = "查询订单") + @GetMapping(path = "/{id}") + public OrderCreateVO get(@PathVariable long id) { + return this.iOrderService.get(id); + } +*/ + +} diff --git a/src/main/java/club/joylink/rtss/controller/permission/PermissionController.java b/src/main/java/club/joylink/rtss/controller/permission/PermissionController.java new file mode 100644 index 000000000..57dd9b02d --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/permission/PermissionController.java @@ -0,0 +1,65 @@ +package club.joylink.rtss.controller.permission; + +import club.joylink.rtss.services.IPermissionService; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.permission.PermissionQueryVO; +import club.joylink.rtss.vo.client.permission.PermissionUpdateVO; +import club.joylink.rtss.vo.client.permission.PermissionVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +@Api(tags = {"权限管理接口"}) +@RestController +@RequestMapping("/api/permission") +public class PermissionController { + + @Autowired + private IPermissionService iPermissionService; + + @ApiOperation(value = "分页获取权限数据") + @GetMapping(path = "") + public PageVO queryPagedPermission(PermissionQueryVO queryVO) { + return iPermissionService.queryPagedPermission(queryVO); + } + + @ApiOperation(value = "查询权限详情") + @GetMapping(path = "/{id}") + public PermissionVO getDetailWithSub(@PathVariable Long id) { + return iPermissionService.getById(id); + } + + @ApiOperation(value = "查询包权限详情") + @GetMapping(path = "/{id}/package") + public PageVO getPackageDetail(@PathVariable Long id, PermissionQueryVO queryVO) { + return iPermissionService.getPackageDetail(id, queryVO); + } + +// @ApiOperation(value = "创建权限") +// @PostMapping(path = "") +// public String create(@RequestBody @Validated PermissionCreateVO createVO, @RequestAttribute @ApiIgnore UserVO user) { +// return iPermissionService.create(createVO, user); +// } + + @ApiOperation(value = "更新权限") + @PutMapping(path = "/{id}") + public void updatePermission(@PathVariable Long id, @RequestBody PermissionUpdateVO updateVO, + @RequestAttribute @ApiIgnore UserVO user) { + iPermissionService.updatePermission(id, updateVO, user); + } + + @ApiOperation(value = "一键生成权限") + @PostMapping(path = "/{mapId}/generate") + public void generatePermission(@PathVariable Long mapId, @RequestAttribute @ApiIgnore UserVO user) { + iPermissionService.generatePermission(mapId, user); + } + + @ApiOperation(value = "真·一键生成权限") + @PostMapping(path = "/realGenerate") + public void realGenerate(@RequestAttribute @ApiIgnore UserVO user) { + iPermissionService.realGenerate(user); + } +} diff --git a/src/main/java/club/joylink/rtss/controller/permission/PermissionDistributeController.java b/src/main/java/club/joylink/rtss/controller/permission/PermissionDistributeController.java new file mode 100644 index 000000000..79e7a8fe9 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/permission/PermissionDistributeController.java @@ -0,0 +1,239 @@ +package club.joylink.rtss.controller.permission; + +import club.joylink.rtss.services.IPermissionDistributeService; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.order.OrderCreateVO; +import club.joylink.rtss.vo.client.permission.DistributeSelectVO; +import club.joylink.rtss.vo.client.permissionDistribute.DistributeVO; +import club.joylink.rtss.vo.client.permissionDistribute.PermissionDistributeQueryVO; +import club.joylink.rtss.vo.client.userPermission.UserPermissionDistributeVO; +import club.joylink.rtss.vo.client.userPermission.UserPermissionVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; + +@Api(tags = {"权限分发管理接口"}) +@RestController +@RequestMapping("/api/distribute") +public class PermissionDistributeController { + + @Autowired + private IPermissionDistributeService permissionDistributeService; + + @ApiOperation(value = "分页查询权限分发数据") + @GetMapping(path = "") + public PageVO queryPagedDistribute(PermissionDistributeQueryVO queryVO) { + return this.permissionDistributeService.queryPagedDistribute(queryVO); + } + + @ApiOperation(value = "生成打包分发二维码") + @GetMapping(path = "/package/qrCode") + public String generateQrCode(Long id) { + return this.permissionDistributeService.generateQrCode(id); + } + + @ApiOperation(value = "权限分发立即失效") + @GetMapping(path = "/{id}/invalid") + public void immediateInvalid(@PathVariable Long id) { + permissionDistributeService.immediateInvalid(id); + } + + @ApiOperation(value = "从订单分发权限,获取权限分发二维码") + @GetMapping(path = "/{orderCode}/distribute") + public String givePermission(@PathVariable String orderCode, @RequestAttribute @ApiIgnore UserVO user) { + return permissionDistributeService.distributeFromOrder(orderCode, user); + } + + @ApiOperation(value = "权限获取") + @GetMapping(path = "/getPermission") + public void getPermission(Long state, @RequestAttribute @ApiIgnore UserVO user) { + this.permissionDistributeService.getUserPermission(state, user); + } + + @ApiOperation(value = "快速生成权限分发") + @PostMapping(path = "/createQuickly") + public String createQuickly(@RequestBody OrderCreateVO orderCreateVO, @RequestAttribute @ApiIgnore UserVO user) { + return permissionDistributeService.createQuickly(orderCreateVO, user); + } + + @ApiOperation(value = "微信小程序扫码获取权限") + @GetMapping(path = "/permission") + public List wmGetPermission(String code, Long id) { + return this.permissionDistributeService.wmGetPermission(code, id); + } + + @ApiOperation(value = "用户权限转增分发打包生成权限") + @PostMapping(path = "/packageUserPermission") + public String packageUserPermission(@RequestBody @Validated UserPermissionDistributeVO userPermissionAndAmountVO, @RequestAttribute @ApiIgnore UserVO user) { + return permissionDistributeService.distributeFromUserPermission(userPermissionAndAmountVO, user); + } + + @ApiOperation(value = "查询个人权限分发列表") + @GetMapping(path = "/personal") + public List queryPersonalDistributeList(@RequestAttribute @ApiIgnore UserVO user) { + return permissionDistributeService.queryPersonalDistributeList(user); + } + + @ApiOperation(value = "查询权限分发领取用户列表") + @GetMapping(path = "/{id}/users") + public List queryDistributeGetUsers(@PathVariable Long id, @RequestAttribute @ApiIgnore UserVO user) { + return permissionDistributeService.queryDistributeGetUsers(id, user); + } + + @ApiOperation(value = "回收权限分发到用户权限中") + @PutMapping(path = "/{id}/restore") + public void restore(@PathVariable Long id) { + this.permissionDistributeService.restoreDistributeToUserPermission(id); + } + + @ApiOperation(value = "查询权限分发包详情") + @GetMapping(path = "/package/{id}/detail") + public PageVO queryPackageDetail(@PathVariable Long id, + PermissionDistributeQueryVO queryVO) { + return permissionDistributeService.queryPackageDetail(id, queryVO); + } + + + /*------------------未实现接口-------------------*/ + @ApiOperation(value = "权限分发") + @PostMapping(path="/distribute") + public String distributePermission(@RequestBody @Validated DistributeSelectVO distributeSelectVO, + @RequestAttribute @ApiIgnore UserVO user) { + return permissionDistributeService.distributePermission(distributeSelectVO, user); + } + + @ApiOperation(value = "权限转赠") + @PostMapping(path="/transfer") + public String transferPermission(@RequestBody @Validated DistributeSelectVO distributeSelectVO, + @RequestAttribute @ApiIgnore UserVO user) { + return permissionDistributeService.transferPermission(distributeSelectVO, user); + } + + @ApiOperation(value = "处理旧数据是否包") + @PutMapping(path = "/package") + public void handleOldDataColumnPackage() { + this.permissionDistributeService.handleOldDataColumnPackage(); + } + +/* + + @ApiOperation(value = "处理旧数据是否包") + @PutMapping(path = "/package") + public void handleOldDataColumnPackage() { + this.permissionDistributeService.handleOldDataColumnPackage(); + } + + @ApiOperation(value = "从订单分发权限,获取二维码") + @PostMapping(path = "/{orderCode}/distribute") + public String givePermission(@PathVariable String orderCode, @RequestBody PermissionTransVO transVO, + @RequestAttribute @ApiIgnore UserVO user) { + return permissionDistributeService.getDistributeQrCodeFromOrder(orderCode, transVO.getDistribute(), user); + } + + @ApiOperation(value = "用户权限转增分发打包生成权限") + @PostMapping(path = "/packageUserPermission") + public String packageUserPermission(@RequestBody @Validated UserPermissionDistributeVO userPermissionAndAmountVO, @RequestAttribute @ApiIgnore UserVO user) { + + return permissionDistributeService.packageUserPermission(userPermissionAndAmountVO, user); + } + + @ApiOperation(value = "权限分发") + @PostMapping(path="/distribute") + public String distributePermission(@RequestBody @Validated DistributeParamVO distributeParamVO, + @RequestAttribute @ApiIgnore UserVO user) { + return permissionDistributeService.distributePermission(distributeParamVO, user); + } + + @ApiOperation(value = "权限转赠") + @PostMapping(path="/transfer") + public String transferPermission(@RequestBody @Validated DistributeParamVO distributeParamVO, + @RequestAttribute @ApiIgnore UserVO user) { + return permissionDistributeService.transferPermission(distributeParamVO, user); + } + + */ +/** + * 从权限分发主键获取权限 + * @param state + * @param user + * @return + *//* + + @ApiOperation(value = "权限获取") + @GetMapping(path = "/getPermission") + public List getPermission(Long state, @RequestAttribute @ApiIgnore UserVO user) { + return this.permissionDistributeService.getUserPermission(state, user); + } + + @ApiOperation(value = "微信小程序扫码获取权限") + @GetMapping(path = "/permission") + public List wmGetPermission(String wmCode, Long id) { + return this.permissionDistributeService.wmGetPermission(wmCode, id); + } + + @ApiOperation(value = "分页查询权限分发数据") + @GetMapping(path = "") + public PageVO queryPagedDistribute(PermissionDistributeQueryVO queryVO) { + return this.permissionDistributeService.queryPagedDistribute(queryVO); + } + + @ApiOperation(value = "权限回收") + @PutMapping(path = "/{id}/restore") + public void restore(@PathVariable Long id) { + this.permissionDistributeService.restoreDistributeToUserPermission(id); + } + + @ApiOperation(value = "权限分发打包详情") + @GetMapping(path = "/package/{id}/detail") + public PageVO getPackageDetail(@PathVariable Long id, PermissionDistributeQueryVO queryVO) { + return this.permissionDistributeService.getPackageDetail(id, queryVO); + } + + @ApiOperation(value = "生成打包分发二维码") + @GetMapping(path = "/package/qrCode") + public String generateQrCode(Long id) { + return this.permissionDistributeService.generateQrCode(id); + } + + + @ApiOperation(value = "获取权限分发详情") + @GetMapping(path = "/{id}") + public Object getDetail(@PathVariable Long id) { + return this.permissionDistributeService.getDetail(id); + } + + @ApiOperation(value = "查询个人权限分发列表") + @GetMapping(path = "/personal") + public List queryPersonalDistributeList(@RequestAttribute @ApiIgnore UserVO user) { + return permissionDistributeService.queryPersonalDistributeList(user); + } + + @ApiOperation(value = "查询权限分发领取用户列表") + @GetMapping(path = "/{id}/users") + public List queryDistributeGetUsers(@PathVariable Long id, @RequestAttribute @ApiIgnore UserVO user) { + return permissionDistributeService.queryDistributeGetUsers(id, user); + } + + + @ApiOperation(value = "回收用户权限到权限分发中") + @PutMapping(path = "/{id}/back") + public void restorePermissionToDistribute(@PathVariable Long id, + @RequestBody @Validated UserPermissionVO userPermissionVO, + @RequestAttribute @ApiIgnore UserVO user) { + permissionDistributeService.restorePermissionToDistribute(id, userPermissionVO, user); + } + + @ApiOperation(value = "权限分发立即失效") + @GetMapping(path = "/{id}/invalid") + public void immediateInvalid(@PathVariable String id) { + permissionDistributeService.immediateInvalid(id); + } + +*/ +} diff --git a/src/main/java/club/joylink/rtss/controller/project/DeviceController.java b/src/main/java/club/joylink/rtss/controller/project/DeviceController.java new file mode 100644 index 000000000..fe997f83b --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/project/DeviceController.java @@ -0,0 +1,184 @@ +package club.joylink.rtss.controller.project; + +import club.joylink.rtss.constants.ProjectDeviceType; +import club.joylink.rtss.controller.advice.AuthenticateInterceptor; +import club.joylink.rtss.services.project.DeviceService; +import club.joylink.rtss.vo.LoginUserInfoVO; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.project.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; + +@Api(tags = {"项目设备管理接口(新)"}) +@RestController +@RequestMapping(path = "/api/device") +public class DeviceController { + + @Autowired + private DeviceService deviceService; + + @ApiOperation(value = "分页查询项目设备") + @GetMapping("/paging") + public PageVO pagingQuery(ProjectDevicePageQueryVO queryVO, + @ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) + LoginUserInfoVO userLoginInfo) { + return this.deviceService.pagingQuery(queryVO, userLoginInfo); + } + + @ApiOperation(value = "项目设备编号是否已经存在") + @GetMapping("/exist/{code}") + public boolean isDeviceCodeExist(@PathVariable String code, + @ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) + LoginUserInfoVO userLoginInfo) { + return this.deviceService.isDeviceCodeExist(userLoginInfo.getProject(), code); + } + + @ApiOperation(value = "新建项目设备") + @PostMapping("") + public String create(@RequestBody @Validated ProjectDeviceVO deviceVO, + @ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) + LoginUserInfoVO userLoginInfo) { + return this.deviceService.create(deviceVO, userLoginInfo); + } + + @ApiOperation(value = "获取设备详情(包含配置信息)") + @GetMapping("/{id}") + public ProjectDeviceVO getDeviceDetailInfoById(@PathVariable Long id) { + return this.deviceService.getDeviceDetailInfoById(id); + } + + @ApiOperation(value = "添加/修改道岔设备网关映射配置") + @PutMapping("/{id}/config/plcgateway") + public void updatePlcGatewayConfig(@PathVariable Long id, @RequestBody @Validated PlcGatewayConfigVO configVO) { + this.deviceService.updatePlcGatewayConfig(id, configVO); + } + + @ApiOperation(value = "添加/修改道岔设备网关映射配置") + @PutMapping("/{id}/config/switch") + public void updateSwitchConfig(@PathVariable Long id, @RequestBody @Validated SwitchConfigVO configVO) { + this.deviceService.updateSwitchConfig(id, configVO); + } + + @ApiOperation(value = "添加/修改信号机设备网关映射配置") + @PutMapping("/{id}/config/signal") + public void updateSignalConfig(@PathVariable Long id, @RequestBody @Validated SignalConfigVO configVO) { + this.deviceService.updateSignalConfig(id, configVO); + } + + @ApiOperation(value = "添加/修改屏蔽门设备网关映射配置") + @PutMapping("/{id}/config/psc") + public void updatePscConfig(@PathVariable Long id, @RequestBody @Validated PscConfigVO configVO) { + this.deviceService.updatePscConfig(id, configVO); + } + + @ApiOperation(value = "添加/修改屏蔽门设备网关映射配置") + @PutMapping("/{id}/config/psd") + public void updatePsdConfig(@PathVariable Long id, @RequestBody @Validated PsdConfigVO configVO) { + this.deviceService.updatePsdConfig(id, configVO); + } + + @ApiOperation(value = "添加/修改屏蔽门设备网关映射配置") + @PutMapping("/{id}/config/psl") + public void updatePslConfig(@PathVariable Long id, @RequestBody @Validated PslConfigVO configVO) { + this.deviceService.updatePslConfig(id, configVO); + } + + @ApiOperation(value = "添加/修改屏蔽门设备网关映射配置") + @PutMapping("/{id}/config/ibp") + public void updateIbpConfig(@PathVariable Long id, @RequestBody @Validated IbpConfigVO configVO) { + this.deviceService.updateIbpConfig(id, configVO); + } + + @ApiOperation(value = "添加/修改虚拟IBP盘配置") + @PutMapping("/{id}/config/vribp") + public void updateVrIbpConfig(@PathVariable Long id, @RequestBody @Validated VrIbpConfigVO configVO) { + this.deviceService.updateVrIbpConfig(id, configVO); + } + + @ApiOperation(value = "添加/修改现地工作站配置") + @PutMapping("/{id}/config/lw") + public void updateLwConfig(@PathVariable Long id, @RequestBody @Validated LwConfigVO configVO) { + this.deviceService.updateLwConfig(id, configVO); + } + + @ApiOperation(value = "添加/修改大屏工作站配置") + @PutMapping("/{id}/config/lsw") + public void updateLswConfig(@PathVariable Long id, @RequestBody @Validated LswConfigVO configVO) { + this.deviceService.updateLswConfig(id, configVO); + } + + @ApiOperation(value = "添加/修改CCTV工作站配置") + @PutMapping("/{id}/config/cctv") + public void updateCctvConfig(@PathVariable Long id, @RequestBody @Validated RelationLoginConfigVO configVO) { + this.deviceService.updateCctvConfig(id, configVO); + } + + @ApiOperation(value = "添加/修改电子沙盘工作站配置") + @PutMapping("/{id}/config/sandbox") + public void updateSandboxConfig(@PathVariable Long id, @RequestBody @Validated RelationLoginConfigVO configVO) { + this.deviceService.updateSandboxConfig(id, configVO); + } + + @ApiOperation(value = "添加/修改虚拟屏蔽门工作站配置") + @PutMapping("/{id}/config/vrpsd") + public void updateVrpsdConfig(@PathVariable Long id, @RequestBody @Validated VrpsdConfigVO configVO) { + this.deviceService.updateVrpsdConfig(id, configVO); + } + + @ApiOperation(value = "添加/修改现地综合监控工作站配置") + @PutMapping("/{id}/config/iscslw") + public void updateIscsLwConfig(@PathVariable Long id, @RequestBody @Validated RelationLoginConfigVO configVO) { + this.deviceService.updateIscsLwConfig(id, configVO); + } + + @ApiOperation(value = "添加/修改中心综合监控工作站配置") + @PutMapping("/{id}/config/iscscw") + public void updateIscsCwConfig(@PathVariable Long id, @RequestBody @Validated RelationLoginConfigVO configVO) { + this.deviceService.updateIscsCwConfig(id, configVO); + } + + @ApiOperation(value = "添加/修改联锁工作站配置") + @PutMapping("/{id}/config/ilw") + public void updateIlwConfig(@PathVariable Long id, @RequestBody @Validated RelationLoginConfigVO configVO) { + this.deviceService.updateIlwConfig(id, configVO); + } + + @ApiOperation(value = "删除设备") + @DeleteMapping("/{id}") + public void delete(@PathVariable Long id) { + this.deviceService.delete(id); + } + + @ApiOperation(value = "查询某个类型的所有设备") + @GetMapping("/{type}/all") + public List queryByType(@PathVariable ProjectDeviceType type, + @ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) + LoginUserInfoVO userLoginInfo) { + return this.deviceService.queryByType(type, userLoginInfo.getProject()); + } + + // +// @ApiOperation(value = "查询项目下的所有设备") +// @GetMapping("/project") +// public List queryByProjectCode(String projectCode, String group) { +// return this.iProjectDeviceService.queryByProjectCode(projectCode, group); +// } + @PostMapping("/xty/addOrUpdate") + public void addOrUpdateXtyDeviceConfig(@ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_USER_KEY) + UserVO userVO) { + this.deviceService.addOrUpdateXtyDeviceConfig(userVO); + } + + @PostMapping("/gzb/addOrUpdate") + public void addOrUpdateGzbDeviceConfig(@ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_USER_KEY) + UserVO userVO) { + this.deviceService.addOrUpdateGzbDeviceConfig(userVO); + } +} diff --git a/src/main/java/club/joylink/rtss/controller/publish/CommandController.java b/src/main/java/club/joylink/rtss/controller/publish/CommandController.java new file mode 100644 index 000000000..6fbc0f0ef --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/publish/CommandController.java @@ -0,0 +1,70 @@ +package club.joylink.rtss.controller.publish; + +import club.joylink.rtss.services.ICommandService; +import club.joylink.rtss.vo.client.CommandCopyVO; +import club.joylink.rtss.vo.client.CommandDefinitionQueryVO; +import club.joylink.rtss.vo.client.CommandDefinitionVO; +import club.joylink.rtss.vo.client.PageVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.validation.Valid; +import javax.validation.constraints.NotBlank; +import java.util.List; + +@Api(tags = {"指令管理接口"}) +@RestController +@RequestMapping(path = "/api/cmd") +public class CommandController { + + @Autowired + private ICommandService iCommandService; + + @ApiOperation(value = "创建指令") + @RequestMapping(method = RequestMethod.POST) + public void createCommand(@Valid @RequestBody CommandDefinitionVO commandDefinitionVO) { + iCommandService.addDefinition(commandDefinitionVO); + } + + @ApiOperation(value = "修改指令") + @RequestMapping(method = RequestMethod.PUT) + public void updateCommand(@Valid @RequestBody CommandDefinitionVO commandDefinitionVO) { + iCommandService.updateDefinition(commandDefinitionVO); + } + + @ApiOperation(value = "code按条件分页查询指令,可根据线路过滤结果") + @RequestMapping(method = RequestMethod.GET) + public PageVO selectCommands(String lineCode, CommandDefinitionQueryVO commandDefinitionQueryVO) { + return iCommandService.queryPagedDefinitions(lineCode, commandDefinitionQueryVO); + + } + + @ApiOperation(value = "根据线路查询指令,可根据仿真角色过滤") + @RequestMapping(path="line/{lineCode}",method = RequestMethod.GET) + public List selectCommands(@NotBlank @PathVariable String lineCode,String prdType,String simulationRole) { + return iCommandService.queryDefinitions(lineCode,prdType, simulationRole); + + } + + @ApiOperation(value = "根据指令id查询信息") + @RequestMapping(path = "{id}",method = RequestMethod.GET) + public CommandDefinitionVO selectCommandById(@PathVariable Long id) { + return iCommandService.queryDefinitionById(id); + + } + + @ApiOperation(value = "根据id删除指令") + @RequestMapping(path = "{id}", method = RequestMethod.DELETE) + public void deleteCommand(@PathVariable Long id) { + iCommandService.deleteDefinition(id); + } + + @ApiOperation("复制指令") + @PostMapping("/copy") + public void copy(@RequestBody @Validated CommandCopyVO copyVO) { + iCommandService.copy(copyVO); + } +} diff --git a/src/main/java/club/joylink/rtss/controller/publish/IbpController.java b/src/main/java/club/joylink/rtss/controller/publish/IbpController.java new file mode 100644 index 000000000..b6fb1b938 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/publish/IbpController.java @@ -0,0 +1,42 @@ +package club.joylink.rtss.controller.publish; + +import club.joylink.rtss.services.publishData.IbpService; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.ibp.IbpQueryVO; +import club.joylink.rtss.vo.client.ibp.IbpVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +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; + +@Api(value="发布IBP盘数据接口") +@RestController +@RequestMapping("/api/ibp") +public class IbpController { + + @Autowired + private IbpService ibpService; + + @ApiOperation(value = "分页查询发布的IBP数据基本信息") + @GetMapping("/list") + public PageVO pagingQueryIbpList(IbpQueryVO queryVO) { + return this.ibpService.pagingQueryIbpList(queryVO); + } + + @ApiOperation(value = "根据id查询IBP数据") + @GetMapping("/{id}") + public IbpVO getIbp(@PathVariable Long id) { + return this.ibpService.getById(id); + } + + @ApiOperation(value = "根据线路编码和车站编码查询IBP数据") + @GetMapping("/query") + public IbpVO getBy(@Validated IbpQueryVO queryVO) { + return this.ibpService.getBy(queryVO); + } + +} diff --git a/src/main/java/club/joylink/rtss/controller/publish/MapController.java b/src/main/java/club/joylink/rtss/controller/publish/MapController.java new file mode 100644 index 000000000..3ffb59656 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/publish/MapController.java @@ -0,0 +1,273 @@ +package club.joylink.rtss.controller.publish; + +import club.joylink.rtss.constants.RoleEnum; +import club.joylink.rtss.controller.advice.AuthenticateInterceptor; +import club.joylink.rtss.controller.advice.Role; +import club.joylink.rtss.services.IMapService; +import club.joylink.rtss.services.IReleaseService; +import club.joylink.rtss.services.local.LocalDataService; +import club.joylink.rtss.vo.LoginUserInfoVO; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.*; +import club.joylink.rtss.vo.client.local.LocalDataVO; +import club.joylink.rtss.vo.client.map.*; +import club.joylink.rtss.vo.client.map.newmap.MapPSDVO; +import club.joylink.rtss.vo.client.map.newmap.MapStationNewVO; +import club.joylink.rtss.vo.client.map.newmap.MapStationStandNewVO; +import club.joylink.rtss.vo.client.validGroup.MapInfoSortCheck; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.util.List; + +@Api(tags = {"发布地图管理接口"}) +@RestController +@RequestMapping("/api/map") +public class MapController { + + @Autowired + private IMapService iMapService; + + @Autowired + private LocalDataService localDataService; + + @Autowired + private IReleaseService iReleaseService; + + @ApiOperation(value = "查询有地图的城市相关字典详情") + @GetMapping(path = "/city") + public List queryCityHasMap(String dicCode) { + return iMapService.queryCityHasMap(dicCode); + } + + @ApiOperation(value = "查询有地图的城市列表") + @GetMapping(path = "/exist") + public boolean checkNameExist(@NotBlank String name) { + return iMapService.checkNameExist(name); + } + + @ApiOperation(value = "根据地图id查询地图版本") + @GetMapping(path = "/{id}/version") + public String getMapVersionById(@PathVariable Long id) { + return this.iMapService.findMapVersion(id); + } + + //TODO New + @ApiOperation(value = "根据地图id查询地图明细") + @GetMapping(path = "/{id}/details") + public Object getMapDetailsById(@PathVariable Long id) { + MapVO mapVO = this.iMapService.getMapDetail(id); + if (mapVO.isDrawWay()) { + + return mapVO.getGraphDataNew(); + } + return mapVO.getGraphData(); + } + + @ApiOperation(value = "根据地图id查询地图数据") + @GetMapping(path = "/{id}/mapData") + public Object getMapDataById(@PathVariable Long id) { + MapVO mapVO = this.iMapService.getMapDetail(id); + return mapVO; + } + + @ApiOperation(value = "根据地图id查询3D数据") + @GetMapping(path = "/{id}/3dMapData") + public Map3dDataVO getMap3DDataById(@PathVariable Long id) { + return iMapService.findMap3dDataByMapId(id); + } + + @ApiOperation(value = "获取有屏蔽门的站台列表") + @GetMapping(path = "/{id}/stand/hasDoor") + public List getHasScreenDoorStand(@PathVariable @NotNull Long id) { + return this.iMapService.getHasScreenDoorStand(id); + } + + @ApiOperation(value = "查询列表") + @GetMapping(path = "/list") + public List list(MapVO mapVO) { + return this.iMapService.list(mapVO); + } + + @ApiOperation(value = "查询所有地图名称") + @GetMapping("/list/all/name") + public List queryAllMapName() { + return iMapService.queryAllMapName(); + } + + @ApiOperation(value = "查询用户所属项目所有上线的地图信息列表") + @GetMapping("/online/all") + public List list(@ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) + LoginUserInfoVO loginUserInfoVO) { + return this.iMapService.queryOnlineMapInfoListOfProject(loginUserInfoVO.getProject()); + } + + @ApiOperation(value = "查询上架地图列表") + @GetMapping(path = "/listOnline") + public List listOnline() { + return this.iMapService.listOnline(); + } + + @ApiOperation(value = "根据定制项目编号查询地图列表") + @GetMapping(path = "/project/{projectCode}/list") + public List listByProjectCode(@PathVariable String projectCode) { + return this.iMapService.listByProjectCode(projectCode); + } + + @ApiOperation(value = "查询基于指定真实线路的发布地图列表") + @GetMapping(path = "/{lineCode}/list") + public List getMapListBySkin(@PathVariable String lineCode) { + return this.iMapService.getMapListByLineCode(lineCode); + } + + @ApiOperation(value = "分页查询地图数据") + @GetMapping(path = "") + public PageVO queryPagedMaps(MapQueryVO queryVO) { + return this.iMapService.queryPagedMaps(queryVO); + } + + @ApiOperation(value = "分页查询地图版本数据") + @GetMapping(path = "/{id}/versions") + public PageVO queryPagedMapVersions(@PathVariable Long id, PageQueryVO queryVO) { + return iMapService.queryPagedMapVersions(id, queryVO); + } + + @Role(RoleEnum.SuperAdmin) + @ApiOperation(value = "删除地图数据") + @DeleteMapping(path = "/{id}") + public void delete(@PathVariable Long id, @RequestAttribute UserVO user) { + this.iMapService.deleteMap(id, user); + } + + @ApiOperation(value = "根据地图id获取地图信息") + @GetMapping(path = "/{id}") + public MapVO get(@PathVariable Long id) { + return this.iMapService.getMapInfoById(id); + } + + @ApiOperation(value = "发布地图数据导出") + @GetMapping(value = "/{id}/export") + public MapVO exportTo(@PathVariable Long id) { + return iMapService.export(id); + } + + @ApiOperation(value = "发布地图上线") + @PutMapping(value = "/{id}/onLine") + public void onLine(@PathVariable Long id, @RequestAttribute UserVO user) { + this.iMapService.onLine(id, user); + } + + @ApiOperation(value = "发布地图下线") + @PutMapping(value = "/{id}/offLine") + public void offLine(@PathVariable Long id, @RequestAttribute UserVO user) { + this.iMapService.offLine(id, user); + } + + @ApiOperation(value = "修改发布地图名称") + @PutMapping(path = "/{id}/updateName") + public void updateName(@PathVariable Long id, @RequestBody MapVO mapVO, @ApiIgnore @RequestAttribute UserVO user) { + this.iMapService.updateName(id, mapVO.getName(), user); + } + + @ApiOperation(value = "修改发布地图所属城市") + @PutMapping(path = "/{id}/city") + public void updateBelongCity(@PathVariable Long id, @RequestBody MapVO mapVO, @ApiIgnore @RequestAttribute UserVO user) { + this.iMapService.updateBelongCity(id, mapVO.getCityCode(), user); + } + + @Role({RoleEnum.Admin, RoleEnum.SuperAdmin}) + @ApiOperation(value = "修改地图基本信息") + @PutMapping(path = "/{id}/info") + public void updateBasicInfo(@PathVariable Long id, @RequestBody MapInfoUpdateVO updateVO, + @ApiIgnore @RequestAttribute UserVO user) { + this.iMapService.updateBasicInfo(id, updateVO, user); + } + + @ApiOperation(value = "设置发布地图所属项目") + @PutMapping(path = "/{id}/project") + public void updateBelongProject(@PathVariable Long id, @RequestBody MapVO mapVO, @ApiIgnore @RequestAttribute UserVO user) { + this.iMapService.updateBelongProject(id, mapVO.isProject(), mapVO.getProjectCode(), user); + } + + @ApiOperation(value = "复制地图线路数据(必选,地图数据(包括地图/运行图);可选,包括课程/考试/剧本等)") + @PostMapping(path = "/copy/{id}") + public void copyMapData(@PathVariable Long id, @RequestBody MapCopyOption copyOption, @ApiIgnore @RequestAttribute UserVO user) { + this.iMapService.copyMapData(id, copyOption, user); + } + + @ApiOperation(value = "校验地图名称是否已经存在(是否重复)") + @GetMapping(path = "/nameExist") + public boolean checkMapNameExist(@RequestParam String name) { + return this.iMapService.isMapNameExist(name); + } + + @ApiOperation(value = "检测地图仿真数据是否存在错误") + @GetMapping(path = "/{id}/simulationCheck") + public List doSimulationCheck(@PathVariable Long id, @ApiIgnore @RequestAttribute UserVO user) { + return this.iMapService.doSimulationCheck(id, user); + } + + @ApiOperation(value = "更新地图序号") + @PutMapping(path = "/sort") + public void updateOrderNumber(@Validated(value = MapInfoSortCheck.class) @RequestBody List updateVOS) { + iMapService.updateOrderNumber(updateVOS); + } + + @Role(RoleEnum.SuperAdmin) + @ApiOperation(value = "导出本地需要地图相关数据(本地部署地图数据)") + @PostMapping(path = "/local/export") + public LocalDataVO exportLocalMapData(@RequestBody List mapIdList, @ApiIgnore @RequestAttribute UserVO user) { + return this.localDataService.exportLocalMapData(mapIdList, user); + } + + @Role(RoleEnum.SuperAdmin) + @ApiOperation(value = "导入本地需要地图相关数据(本地部署地图数据)") + @PostMapping(path = "/local/import") + public void importLocalMapData(@RequestBody LocalDataVO localDataVO, @ApiIgnore @RequestAttribute UserVO user) { + this.localDataService.importLocalMapData(localDataVO, user); + } + + @ApiOperation(value = "获取地图下所有需要值班员的车站") + @GetMapping(path = "/{id}/station/needSupervisor") + public List getNeedSupervisorStations(@PathVariable Long id) { + return iMapService.getNeedSupervisorStations(id); + } + + @ApiOperation(value = "获取地图车站下所有有屏蔽门的站台") + @GetMapping("/{id}/station/{stationCode}/standWithPsd") + public List getStationHasPsdStands(@PathVariable Long id, + @PathVariable String stationCode) { + return this.iMapService.getStationHasPsdStands(id, stationCode); + } + + @ApiOperation(value = "获取地图站台关联的屏蔽门") + @GetMapping("/{id}/stand/{standCode}/psd") + public List getStandPsds(@PathVariable Long id, + @PathVariable String standCode) { + return this.iMapService.getStandPsds(id, standCode); + } + + @ApiOperation("导出地图相关数据") + @GetMapping("/{id}/export/new") + public ReleaseVO export(@PathVariable Long id, @Validated ReleaseConfigVO configs) { + return iReleaseService.exportAsJson(id, configs); + } + + @ApiOperation("导入地图相关数据") + @PutMapping("/{id}/import/new") + public void importFromJson(@PathVariable Long id, @RequestBody ReleaseVO json) { + iReleaseService.importFromJson(id, json); + } + + @ApiOperation("一键生成发布地图相关功能:目前生成权限及子系统") + @PostMapping("/{id}/function/generate") + public void generate(@PathVariable Long id, @ApiIgnore @RequestAttribute UserVO user) { + this.iMapService.generateMapFunction(id, user); + } +} diff --git a/src/main/java/club/joylink/rtss/controller/publish/MapSystemController.java b/src/main/java/club/joylink/rtss/controller/publish/MapSystemController.java new file mode 100644 index 000000000..f3a64fa5c --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/publish/MapSystemController.java @@ -0,0 +1,82 @@ +package club.joylink.rtss.controller.publish; + +import club.joylink.rtss.controller.advice.AuthenticateInterceptor; +import club.joylink.rtss.services.IMapSystemService; +import club.joylink.rtss.vo.LoginUserInfoVO; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.TreeNode; +import club.joylink.rtss.vo.client.sub.MapSystemDetailVO; +import club.joylink.rtss.vo.client.sub.MapSystemQueryVO; +import club.joylink.rtss.vo.client.sub.MapSystemVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +@Api(tags = {"地图系统接口"}) +@RestController +@RequestMapping("/api/mapSystem") +public class MapSystemController { + + @Autowired + private IMapSystemService iMapSystemService; + + @ApiOperation(value = "生成地图系统") + @PostMapping("/generate/{mapId}") + public void generateSystem(@PathVariable Long mapId) { + iMapSystemService.generateSystem(mapId); + } + + @ApiOperation(value = "分页查询地图系统") + @GetMapping("") + public PageVO generateSystem(MapSystemQueryVO queryVO) { + return iMapSystemService.queryPagedMapSystem(queryVO); + } + + @ApiOperation(value = "创建地图系统") + @PostMapping("") + public void createMapSystem(@RequestBody @Validated MapSystemVO mapSystemVO) { + iMapSystemService.createMapSystem(mapSystemVO); + } + + @ApiOperation(value = "更新地图系统") + @PutMapping("/{id}") + public void createMapSystem(@PathVariable Long id, @RequestBody MapSystemVO mapSystemVO) { + iMapSystemService.updateMapSystem(id, mapSystemVO); + } + + @ApiOperation(value = "根据城市code查询地图系统数据") + @GetMapping("/city/{cityCode}") + public List queryByCityCode(@PathVariable String cityCode) { + return iMapSystemService.queryByCityCode(cityCode); + } + + @ApiOperation(value = "根据定制项目编号查询地图系统数据") + @GetMapping("/project") + public List queryByProjectCode(@RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) + LoginUserInfoVO loginUserInfoVO) { + return iMapSystemService.queryByProjectCode(loginUserInfoVO.getProject()); + } + + @ApiOperation(value = "查询子系统信息") + @GetMapping("/{id}") + public MapSystemVO getMapSystemDetail(@PathVariable Long id) { + return iMapSystemService.getMapSystem(id); + } + + @ApiOperation(value = "查询子系统详情") + @GetMapping("/{id}/detail") + public MapSystemDetailVO getMapSystemDetail(@PathVariable Long id, @RequestAttribute UserVO user) { + return iMapSystemService.getMapSystemDetail(id, user); + } + + @ApiOperation(value = "删除地图系统") + @DeleteMapping("/{id}") + public void delete(@PathVariable Long id, @RequestAttribute UserVO user) { + iMapSystemService.delete(id, user); + } +} diff --git a/src/main/java/club/joylink/rtss/controller/publish/PassengerFlowDataController.java b/src/main/java/club/joylink/rtss/controller/publish/PassengerFlowDataController.java new file mode 100644 index 000000000..cf156ade0 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/publish/PassengerFlowDataController.java @@ -0,0 +1,34 @@ +package club.joylink.rtss.controller.publish; + +import club.joylink.rtss.services.publishData.MapPassengerFlowDataService; +import club.joylink.rtss.vo.UserVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +@Api(tags = { "驾驶操作接口" }) +@RestController +@RequestMapping("/map/{mapId}/passengerFlowData") +public class PassengerFlowDataController { + + @Autowired + private MapPassengerFlowDataService mapPassengerFlowDataService; + + @ApiOperation(value = "站台客流数据导入") + @PostMapping("/stand") + public void importStandData(@PathVariable Long mapId, @RequestBody String data, + @ApiIgnore @RequestAttribute UserVO user) { + this.mapPassengerFlowDataService.importStandData(mapId, data); + + } + + @ApiOperation(value = "车次客流数据导入") + @PostMapping("/trip") + public void importTripData(@PathVariable Long mapId, @RequestBody String data, + @ApiIgnore @RequestAttribute UserVO user) { + this.mapPassengerFlowDataService.importTripData(mapId, data); + + } +} diff --git a/src/main/java/club/joylink/rtss/controller/publish/RealLineController.java b/src/main/java/club/joylink/rtss/controller/publish/RealLineController.java new file mode 100644 index 000000000..9f301956c --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/publish/RealLineController.java @@ -0,0 +1,89 @@ +package club.joylink.rtss.controller.publish; + +import club.joylink.rtss.services.IRealLineService; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.map.RealLineConfigVO; +import club.joylink.rtss.vo.client.map.RealLineListVO; +import club.joylink.rtss.vo.client.map.RealLineQueryVO; +import club.joylink.rtss.vo.client.map.RealLineVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; + +@Api(tags = {"真实线路管理接口"}) +@RestController +@RequestMapping(path = "/api/realLine") +public class RealLineController { + + @Autowired + private IRealLineService iRealLineService; + + @ApiOperation(value = "添加真实线路") + @PostMapping(path = "") + public void create(@RequestBody @Validated RealLineVO skinVO, @RequestAttribute @ApiIgnore UserVO user) { + this.iRealLineService.create(skinVO, user); + } + + @ApiOperation(value = "获取真实线路列表") + @GetMapping(path = "/list") + public List queryList(RealLineQueryVO queryVO) { + return this.iRealLineService.queryList(queryVO); + } + + @ApiOperation(value = "分页查询真实线路") + @GetMapping(path = "") + public PageVO queryPagedSkin(RealLineQueryVO queryVO) { + return this.iRealLineService.queryPagedSkin(queryVO); + } + + @ApiOperation(value = "根据id查询真实线路") + @GetMapping(path = "/{id}") + public RealLineVO get(@PathVariable Long id) { + return this.iRealLineService.get(id); + } + + @ApiOperation(value = "修改真实线路") + @PutMapping(path = "/{id}") + public void get(@PathVariable Long id, @RequestBody @Validated RealLineVO skinVO, + @RequestAttribute @ApiIgnore UserVO user) { + this.iRealLineService.update(id, skinVO, user); + } + + @ApiOperation(value = "删除真实线路") + @DeleteMapping(path = "/{id}") + public void delete(@PathVariable Long id) { + this.iRealLineService.delete(id); + } + + @ApiOperation(value = "检查code是否存在") + @GetMapping(path = "/{code}/exist") + public boolean checkCodeExist(@PathVariable String code) { + return this.iRealLineService.checkCodeExist(code); + } + + @ApiOperation(value = "根据code修改真实线路") + @PutMapping(path = "/{code}/update") + public void get(@PathVariable String code, @RequestBody RealLineVO skinVO, + @RequestAttribute @ApiIgnore UserVO user) { + this.iRealLineService.updateByCode(code, skinVO, user); + } + + @ApiOperation(value = "保存线路配置") + @PostMapping(path = "/config/{id}") + public void saveLineConfig(@PathVariable Long id, @RequestBody @Validated RealLineConfigVO config) { + this.iRealLineService.saveLineConfig(id, config); + } + + @ApiOperation(value = "根据id查询线路配置") + @GetMapping(path = "/config/{id}") + public RealLineConfigVO getLineConfigById(@PathVariable Long id) { + return this.iRealLineService.getLineConfigById(id); + } + +} diff --git a/src/main/java/club/joylink/rtss/controller/publish/RunPlanDailyController.java b/src/main/java/club/joylink/rtss/controller/publish/RunPlanDailyController.java new file mode 100644 index 000000000..07298a172 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/publish/RunPlanDailyController.java @@ -0,0 +1,81 @@ +package club.joylink.rtss.controller.publish; + +import club.joylink.rtss.constants.RoleEnum; +import club.joylink.rtss.controller.advice.Role; +import club.joylink.rtss.services.IDailyRunPlanService; +import club.joylink.rtss.services.ILoadPlanService; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.runplan.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.validation.constraints.NotNull; + +@Api(tags = {"每日运行计划接口"}) +@RestController +@RequestMapping("/api/runPlan/daily") +public class RunPlanDailyController { + + @Autowired + private IDailyRunPlanService iDailyRunPlanService; + + @Autowired + private ILoadPlanService iLoadPlanService; + + @ApiOperation(value = "分页获取每日加载运行图") + @GetMapping(path = "") + public PageVO queryPagedRunPlan(RunPlanQueryVO queryVO) { + return this.iDailyRunPlanService.queryPagedRunPlan(queryVO); + } + + @ApiOperation(value = "删除每日加载运行图") + @DeleteMapping(path = "/{planId}") + @Role(RoleEnum.SuperAdmin) + public void deleteTemplatePlan(@PathVariable Long planId, @RequestAttribute UserVO user) { + this.iDailyRunPlanService.deletePlan(user, planId); + } + + @ApiOperation(value = "用户创建加载计划") + @PostMapping(path = "/runPlanLoad") + public void createRunPlanLoad(@RequestBody @Validated RunPlanLoadVO runPlanLoadVO, + @ApiIgnore @RequestAttribute UserVO user) { + this.iLoadPlanService.createLoadPlan(runPlanLoadVO, user); + } + + @ApiOperation(value = "分页查询加载计划") + @GetMapping(path = "/runPlanLoad") + public PageVO queryPagedRunPlanLoad(RunPlanLoadQueryVO queryVO) { + return this.iLoadPlanService.queryPagedLoadPlan(queryVO); + } + + @ApiOperation(value = "删除加载计划") + @DeleteMapping(path = "/runPlanLoad/{id}") + public void deleteRunPlanLoad(@PathVariable Long id, @ApiIgnore @RequestAttribute UserVO user) { + this.iLoadPlanService.deleteLoadPlan(id, user); + } + + @ApiOperation(value = "管理员创建通用加载计划") + @PostMapping(path = "/runPlanLoad/common") + public void createCommonRunPlanLoad(@RequestBody RunPlanLoadVO runPlanLoadVO, + @ApiIgnore @RequestAttribute UserVO user) { + this.iLoadPlanService.createCommonLoadPlan(runPlanLoadVO, user); + } + + @ApiOperation(value = "从加载计划创建每日计划") + @PostMapping(path = "/runPlanLoad/{id}/generate") + public void createDailyPlanFromLoadPlan(@PathVariable @NotNull Long id, + @ApiIgnore @RequestAttribute UserVO user) { + this.iLoadPlanService.createDailyPlanFromLoadPlan(id, user); + } + + @ApiOperation(value = "查询运行图的数据绘制运行图") + @GetMapping(path = "/{planId}") + public RunPlanEChartsDataVO selectDiagramData(@PathVariable Long planId) { + return this.iDailyRunPlanService.selectDiagramData(planId); + } +} diff --git a/src/main/java/club/joylink/rtss/controller/publish/RunPlanTemplateController.java b/src/main/java/club/joylink/rtss/controller/publish/RunPlanTemplateController.java new file mode 100644 index 000000000..ff0718824 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/publish/RunPlanTemplateController.java @@ -0,0 +1,79 @@ +package club.joylink.rtss.controller.publish; + +import club.joylink.rtss.services.IRunPlanTemplateService; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.runplan.RunPlanEChartsDataVO; +import club.joylink.rtss.vo.client.runplan.RunPlanQueryVO; +import club.joylink.rtss.vo.client.runplan.RunPlanVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.util.List; + +@Api(tags = {"运行计划模板接口"}) +@RestController +@RequestMapping("/api/runPlan/template") +public class RunPlanTemplateController { + + @Autowired + private IRunPlanTemplateService iRunPlanTemplateService; + + @ApiOperation(value = "分页获取运行图模板") + @GetMapping(path = "") + public PageVO queryPagedRunPlan(RunPlanQueryVO queryVO) { + return this.iRunPlanTemplateService.queryPagedRunPlan(queryVO); + } + + @ApiOperation(value = "查询所有模板运行图") + @GetMapping(path = "/all") + public List queryAll() { + return this.iRunPlanTemplateService.queryAll(); + } + + @ApiOperation(value = "查询地图下的模板运行图") + @GetMapping(path = "/{mapId}/list") + public List queryPlanOfMap(@PathVariable Long mapId) { + return this.iRunPlanTemplateService.queryPlanListByMapId(mapId); + } + + @ApiOperation(value = "模板运行图是否被其他数据使用") + @GetMapping(path = "/{planId}/exist") + public boolean isUsed(@PathVariable Long planId) { + return this.iRunPlanTemplateService.isUsed(planId); + } + + @ApiOperation(value = "删除运行图模板") + @DeleteMapping(path = "/{planId}") + public void deleteTemplatePlan(@PathVariable Long planId, @ApiIgnore @RequestAttribute UserVO user) { + this.iRunPlanTemplateService.deletePlan(planId, user); + } + + @ApiOperation(value = "复制运行图模板") + @PostMapping(path = "/{id}/copyAs/{mapId}") + public void copyAs(@PathVariable @NotNull Long id, + @PathVariable @NotBlank Long mapId, + String name, + @ApiIgnore @RequestAttribute UserVO user) { + this.iRunPlanTemplateService.copyAs(id, mapId, name, user); + } + + @ApiOperation(value = "使用此模板生成当日运行图") + @PostMapping(path = "/generate/{planId}") + public void generateDailyRunPlan(@PathVariable Long planId, + @RequestParam Long mapId, + @ApiIgnore @RequestAttribute UserVO user) { + this.iRunPlanTemplateService.generateDailyRunPlan(planId, mapId, user); + } + + @ApiOperation(value = "查询运行图的数据绘制运行图") + @GetMapping(path = "/{planId}") + public RunPlanEChartsDataVO selectDiagramData(@PathVariable Long planId) { + return iRunPlanTemplateService.selectDiagramData(planId); + } +} diff --git a/src/main/java/club/joylink/rtss/controller/race/RaceController.java b/src/main/java/club/joylink/rtss/controller/race/RaceController.java new file mode 100644 index 000000000..5aab03460 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/race/RaceController.java @@ -0,0 +1,80 @@ +package club.joylink.rtss.controller.race;//package club.joylink.rtss.controller.race; +// +//import club.joylink.rtss.services.race.IRaceService; +//import club.joylink.rtss.vo.UserVO; +//import club.joylink.rtss.vo.client.PageVO; +//import club.joylink.rtss.vo.client.race.*; +//import io.swagger.annotations.Api; +//import io.swagger.annotations.ApiOperation; +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.validation.annotation.Validated; +//import org.springframework.web.bind.annotation.*; +//import springfox.documentation.annotations.ApiIgnore; +// +//import java.util.List; +// +//@Api(tags = "竞赛信息相关接口") +//@RestController +//@RequestMapping("/api/race") +//public class RaceController { +// @Autowired +// private IRaceService iRaceService; +// +// @ApiOperation("创建竞赛") +// @PostMapping("") +// public void create(@RequestBody @Validated RaceCreateVO createVO, @RequestAttribute @ApiIgnore UserVO user) { +// iRaceService.create(createVO, user); +// } +// +// @ApiOperation("分页查询竞赛") +// @GetMapping("") +// public PageVO query(RaceQueryVO queryVO) { +// return iRaceService.query(queryVO); +// } +// +// @ApiOperation("根据id查询竞赛信息") +// @GetMapping("/{id}") +// public RaceVO getById(@PathVariable Long id) { +// return iRaceService.getById(id); +// } +// +// @ApiOperation("修改竞赛信息") +// @PutMapping("/{id}") +// public void update(@PathVariable Long id, @RequestBody RaceUpdateVO updateVO) { +// iRaceService.update(id, updateVO); +// } +// +// @ApiOperation("报名") +// @PostMapping("/{id}/signUp") +// public void signUp(@PathVariable Long id, @RequestBody @Validated RaceSignUpInfoVO signUpInfo, @RequestAttribute @ApiIgnore UserVO user) { +// iRaceService.signUp(id, signUpInfo, user); +// } +// +// @ApiOperation("查询竞赛报名人员列表") +// @GetMapping("/{raceId}/raceUser/list") +// public List queryRaceUser(@PathVariable Long raceId) { +// return iRaceService.getRaceContestant(raceId); +// } +// +// @ApiOperation("查询竞赛报名人员详情") +// @GetMapping("/{raceId}/raceUser") +// public RaceUserVO getRaceUser(@PathVariable Long raceId, @RequestAttribute @ApiIgnore UserVO user) { +// return iRaceService.getRaceUser(raceId, user); +// } +// +// @ApiOperation("分页查询竞赛报名人员") +// @GetMapping("/{raceId}/raceUser/page") +// public PageVO pagingQueryRaceUser(@PathVariable Long raceId, RaceUserQueryVO queryVO) { +// return iRaceService.pagingQueryRaceUser(raceId, queryVO); +// } +// +// @ApiOperation("查询用户是否已经报名该竞赛") +// @GetMapping("/{raceId}/isSignUp") +// public boolean isSignUp(@PathVariable Long raceId, @RequestAttribute @ApiIgnore UserVO user, boolean isLogin) { +// if (isLogin) { +// return iRaceService.isSignUpForLogin(raceId, user); +// } +// return iRaceService.isSignUp(raceId, user); +// } +// +//} diff --git a/src/main/java/club/joylink/rtss/controller/script/ScriptController2.java b/src/main/java/club/joylink/rtss/controller/script/ScriptController2.java new file mode 100644 index 000000000..c861807ff --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/script/ScriptController2.java @@ -0,0 +1,35 @@ +package club.joylink.rtss.controller.script; + +import club.joylink.rtss.services.script.IScriptService2; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.script.ScriptNewVO; +import club.joylink.rtss.vo.client.script.ScriptQueryVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +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 javax.validation.constraints.NotNull; + +@Api(tags = "新版剧本接口") +@RestController +@RequestMapping("/api/script/v1") +public class ScriptController2 { + @Autowired + private IScriptService2 iScriptService2; + + @ApiOperation(value = "分页查询上线的剧本") + @GetMapping(path = "/paging/online") + public PageVO pagingQueryOnlineScript(ScriptQueryVO scriptQueryVO) { + return iScriptService2.pagingQueryOnlineScript(scriptQueryVO); + } + + @ApiOperation(value = "通过id查询剧本详细信息") + @GetMapping(path = "/{id}/detail") + public ScriptNewVO getDetailInfoById(@PathVariable @NotNull Long id) { + return iScriptService2.getDetailForClientById(id); + } +} diff --git a/src/main/java/club/joylink/rtss/controller/simulation/DrivingOperationController.java b/src/main/java/club/joylink/rtss/controller/simulation/DrivingOperationController.java new file mode 100644 index 000000000..355a97d20 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/simulation/DrivingOperationController.java @@ -0,0 +1,44 @@ +package club.joylink.rtss.controller.simulation; + +import club.joylink.rtss.simulation.cbtc.GroupSimulationService; +import club.joylink.rtss.simulation.cbtc.Simulation; +import club.joylink.rtss.simulation.cbtc.constant.ControlGear; +import club.joylink.rtss.simulation.cbtc.constant.DriveMode; +import club.joylink.rtss.simulation.cbtc.data.vo.VirtualRealityTrainVO; +import club.joylink.rtss.simulation.cbtc.driving.DrivingService; +import club.joylink.rtss.vo.UserVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.validation.constraints.NotBlank; +import java.util.List; + +@Api(tags = { "驾驶操作接口" }) +@RestController +@RequestMapping("/simulation/driving") +public class DrivingOperationController { + + @Autowired + private GroupSimulationService groupSimulationService; + + @Autowired + private DrivingService drivingService; + + @ApiOperation(value = "获取在运行的列车列表") + @GetMapping(path = "/{group}/trainList") + public List getSimulationUsedTrainList(@PathVariable @NotBlank String group) { + Simulation simulation = this.groupSimulationService.getSimulationByGroup(group); + return this.drivingService.getOnlineTrainList(simulation); + } + + @ApiOperation(value = "绑定一辆列车") + @PostMapping("/{group}/bindTrain/{groupNumber}") + public void bindTrain(@PathVariable String group, @PathVariable String groupNumber, + @ApiIgnore @RequestAttribute UserVO user) { + Simulation simulation = this.groupSimulationService.getSimulationByGroup(group); + this.drivingService.bindTrain(simulation, user.getId(), groupNumber); + } +} diff --git a/src/main/java/club/joylink/rtss/controller/simulation/FaultRuleController.java b/src/main/java/club/joylink/rtss/controller/simulation/FaultRuleController.java new file mode 100644 index 000000000..00b0d8961 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/simulation/FaultRuleController.java @@ -0,0 +1,53 @@ +package club.joylink.rtss.controller.simulation;//package club.joylink.rtss.controller.simulation; +// +//import club.joylink.rtss.services.fault.IFaultRuleService; +//import club.joylink.rtss.vo.client.PageVO; +//import club.joylink.rtss.vo.client.fault.FaultRuleQueryVO; +//import club.joylink.rtss.vo.client.fault.FaultRuleVO; +//import io.swagger.annotations.Api; +//import io.swagger.annotations.ApiOperation; +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.web.bind.annotation.*; +// +//import javax.validation.Valid; +// +//@Api(tags = {"故障规则管理接口"}) +//@RestController +//@RequestMapping(path = "/api/v1/faultRule") +//public class FaultRuleController { +// +// @Autowired +// private IFaultRuleService faultRuleService; +// +// @ApiOperation(value = "创建故障规则") +// @RequestMapping(method = RequestMethod.POST) +// public void createFaultRule(@Valid @RequestBody FaultRuleVO faultRuleVO) { +// faultRuleService.addFaultRule(faultRuleVO); +// } +// +// @ApiOperation(value = "修改故障规则") +// @RequestMapping(method = RequestMethod.PUT) +// public void updateFaultRule(@Valid @RequestBody FaultRuleVO faultRuleVO) { +// faultRuleService.updateFaultRule(faultRuleVO); +// } +// +// @ApiOperation(value = "条件分页查询") +// @RequestMapping(path = "/page",method = RequestMethod.GET) +// public PageVO selectFaultRules(FaultRuleQueryVO faultRuleQueryVO) { +// return faultRuleService.getByPage(faultRuleQueryVO); +// +// } +// +// @ApiOperation(value = "根据指令id查询故障规则信息") +// @RequestMapping(path = "{id}",method = RequestMethod.GET) +// public FaultRuleVO selectFaultRuleById(@PathVariable Long id) { +// return faultRuleService.getBy(id); +// +// } +// +// @ApiOperation(value = "根据id删除故障规则") +// @RequestMapping(path = "{id}", method = RequestMethod.DELETE) +// public void deleteCommand(@PathVariable Long id) { +// faultRuleService.deleteFaultRule(id); +// } +//} diff --git a/src/main/java/club/joylink/rtss/controller/simulation/JointSimulationController.java b/src/main/java/club/joylink/rtss/controller/simulation/JointSimulationController.java new file mode 100644 index 000000000..187a3c3f2 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/simulation/JointSimulationController.java @@ -0,0 +1,73 @@ +package club.joylink.rtss.controller.simulation; + +import club.joylink.rtss.simulation.cbtc.GroupSimulationService; +import club.joylink.rtss.simulation.cbtc.data.vo.SimulationVO; +import club.joylink.rtss.controller.advice.AuthenticateInterceptor; +import club.joylink.rtss.vo.LoginUserInfoVO; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.simulationv1.MemberAddParamVO; +import club.joylink.rtss.vo.client.simulationv1.PlayRoleConfigVO; +import club.joylink.rtss.vo.client.simulationv1.SimulationMemberVO; +import club.joylink.rtss.vo.client.simulationv1.SimulationUserVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; + +@Api(tags = "联合多人仿真接口") +@RestController +@RequestMapping("/api/jointSimulation") +public class JointSimulationController { + + @Autowired + private GroupSimulationService groupSimulationService; + + @ApiOperation("生成综合仿真分享二维码") + @GetMapping("/{group}/qrCode") + public String generateQrCode(@PathVariable String group) { + return this.groupSimulationService.generateQrCode(group); + } + + @ApiOperation("获取权限成为仿真用户") + @PostMapping("/{group}/permission") + public SimulationVO getPermission(@PathVariable String group, + @ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_USER_KEY) + UserVO user) { + return this.groupSimulationService.getPermission(group, user); + } + + @ApiOperation("将指定用户踢出仿真") + @DeleteMapping("/{group}/kickOut") + public void kickOut(@PathVariable String group, + Long userId, + @ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_USER_KEY) + UserVO user) { + this.groupSimulationService.kickOut(group, userId, user); + } + + @ApiOperation("获取用户所在的综合演练仿真") + @GetMapping("/list/containUser") + public List queryJointSimulationByUser(@ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) + LoginUserInfoVO loginUserInfoVO) { + return this.groupSimulationService.queryJointSimulationByUser(loginUserInfoVO); + } + + @ApiOperation("分配用户(取消)扮演角色") + @PutMapping("/{group}/assignRoles") + public void assignRoles(@PathVariable String group, + @RequestBody @Validated List configVOList) { + this.groupSimulationService.assignRoles(group, configVOList); + } + + @ApiOperation("添加新仿真角色成员") + @PostMapping("/{group}/member") + public SimulationMemberVO addMember(@PathVariable String group, + @RequestBody @Validated MemberAddParamVO param) { + return this.groupSimulationService.addMember(group, param); + } + +} diff --git a/src/main/java/club/joylink/rtss/controller/simulation/JointTrainingV1Controller.java b/src/main/java/club/joylink/rtss/controller/simulation/JointTrainingV1Controller.java new file mode 100644 index 000000000..572c7d97f --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/simulation/JointTrainingV1Controller.java @@ -0,0 +1,186 @@ +package club.joylink.rtss.controller.simulation;//package club.joylink.rtss.controller.simulation; +// +//import club.joylink.rtss.services.IJointTrainingV1Service; +//import club.joylink.rtss.vo.UserVO; +//import club.joylink.rtss.vo.client.*; +//import club.joylink.rtss.vo.client.room.RoomSimulationRealDeviceVO; +//import io.swagger.annotations.Api; +//import io.swagger.annotations.ApiOperation; +//import org.springframework.beans.factory.annotation.Autowired; +//import org.springframework.validation.annotation.Validated; +//import org.springframework.web.bind.annotation.*; +//import org.springframework.web.multipart.MultipartFile; +//import springfox.documentation.annotations.ApiIgnore; +// +//import java.util.List; +// +//@Api(tags = { "新联合实训接口" }) +//@RestController +//@RequestMapping(path = "api/v1/jointTraining") +//public class JointTrainingV1Controller { +// +// @Autowired +// private IJointTrainingV1Service iJointTrainingService; +// +// @ApiOperation(value = "创建房间") +// @PostMapping(path = "/room") +// public String createRoom(@ApiIgnore @RequestAttribute UserVO user, +// @RequestBody @Validated JointTrainingRoomRequestVO requestVO) { +// return iJointTrainingService.createRoom(user, requestVO); +// } +// +// @ApiOperation(value = "查询房间") +// @GetMapping(path = "/room/{group}") +// public JointTrainingRoomNewVO selectRoom(@PathVariable String group) { +// return iJointTrainingService.selectRoom(group); +// } +// +// @ApiOperation(value = "查询创建的房间") +// @GetMapping(path = "/room") +// public List selectSelfRoom(@RequestParam long mapId, @ApiIgnore @RequestAttribute UserVO user) { +// return iJointTrainingService.findCreatedRoom(mapId, user); +// } +// +// @ApiOperation(value = "获取邀请房间列表") +// @GetMapping(path = "/room/list") +// public List getRoomList(@RequestParam(required = false) String projectCode,@ApiIgnore @RequestAttribute UserVO user) { +// return iJointTrainingService.getRoomListByProject(user.getId(),projectCode); +// } +// +// @ApiOperation(value = "加入房间") +// @PutMapping(path = "/room/join") +// public void join(@RequestParam String group, @ApiIgnore @RequestAttribute UserVO user) { +// iJointTrainingService.join(group, user.getId()); +// } +// +// @ApiOperation(value = "退出房间") +// @PutMapping(path = "/room/exit") +// public void exit(@RequestParam String group, @ApiIgnore @RequestAttribute UserVO user) { +// iJointTrainingService.exit(group, user.getId()); +// } +// +// @ApiOperation(value = "销毁房间") +// @DeleteMapping(path = "/room") +// public void destroy(@RequestParam String group, @ApiIgnore @RequestAttribute UserVO user) { +// iJointTrainingService.destroy(group,user); +// } +// +// @ApiOperation(value = "设置用户角色") +// @PutMapping(path = "/room/user/role") +// public void setUserRole(@RequestBody List jointTrainingUserVOList, +// @RequestParam String group, @ApiIgnore @RequestAttribute UserVO user) { +// iJointTrainingService.setUserRole(group, jointTrainingUserVOList, user); +// } +// +// @ApiOperation(value = "添加或更新真实设备和仿真对象连接") +// @PostMapping(path = "/room/realDevice") +// public void addOrUpdateRealDeviceConnection(@RequestParam String group, +// @RequestBody JointTrainingRoomDeviceVO roomDeviceVO) { +// this.iJointTrainingService.addOrUpdateRealDeviceConnection(group, roomDeviceVO); +// } +// +// @ApiOperation(value = "删除真实设备和仿真对象连接") +// @DeleteMapping(path = "/room/realDevice/{id}") +// public void deleteRealDeviceConnection(@RequestParam String group, @PathVariable Long id) { +// this.iJointTrainingService.deleteRealDeviceConnection(group, id); +// } +// +// @ApiOperation(value = "踢出用户") +// @PutMapping(path = "/room/user") +// public void deleteUser(@RequestParam Long userId, @ApiIgnore @RequestAttribute UserVO user, @RequestParam String group) { +// iJointTrainingService.deleteUser(group, userId); +// } +// +// @ApiOperation(value = "获取用户角色信息") +// @GetMapping(path = "/room/user/role") +// public JointTrainingUserNewVO selectUserRole(@RequestParam String group, @ApiIgnore @RequestAttribute UserVO user) { +// return iJointTrainingService.getUserInfoById(group, user.getId()); +// } +// +// @ApiOperation(value = "生成分发二维码") +// @PostMapping(path = "/qrCode") +// public String generateQrCode(String group, @ApiIgnore @RequestAttribute UserVO user) { +// return this.iJointTrainingService.generateQrCode(group); +// } +// +// @ApiOperation(value = "扫码领取仿真权限") +// @GetMapping(path = "/qrCode") +// public JointTrainingUserNewVO scanQrCode(String group, @ApiIgnore @RequestAttribute UserVO user) { +// return this.iJointTrainingService.scanQrCode(group, user); +// } +// +// @ApiOperation(value = "扫描综合演练房间二维码获取权限加入房间") +// @GetMapping(path = "/permission") +// public JointTrainingUserNewVO getPermission(String code, String group) { +// return this.iJointTrainingService.getPermission(code, group); +// } +// +// @ApiOperation(value = "获取房间里的用户列表") +// @GetMapping(path = "/room/{group}/user/list") +// public List selectUserList(@PathVariable String group) { +// return iJointTrainingService.selectUserList(group); +// } +// +// @ApiOperation(value = "获取房间真实设备连接关系列表(旧,西铁院项目用)") +// @GetMapping(path = "/room/{group}/devices") +// public List getRoomDeviceList(@PathVariable String group) { +// return iJointTrainingService.getRoomDeviceList(group); +// } +// +// @ApiOperation(value = "获取房间真实设备连接关系(新)") +// @GetMapping(path = "/room/{group}/realDevice/connect") +// public List getRoomRealDeviceList(@PathVariable String group) { +// return this.iJointTrainingService.getRoomRealDeviceList(group); +// } +// +// @ApiOperation(value = "连接真实设备(新)") +// @PutMapping(path = "/room/{group}/realDevice") +// public void updateRealDeviceConnect(@PathVariable String group, +// @RequestBody @Validated List deviceVOList) { +// this.iJointTrainingService.updateRealDeviceConnect(group, deviceVOList); +// } +// +// @ApiOperation(value = "通过文字聊天") +// @PostMapping(path = "/chatWithText") +// public void chatWithText(@RequestParam String group, +// @RequestBody ConversationMessageNewVO chatResponseVO, +// @ApiIgnore @RequestAttribute UserVO user) { +// this.iJointTrainingService.chatWithText(group, chatResponseVO.getMessage(), user); +// } +// +// @ApiOperation(value = "通过语音聊天") +// @PostMapping(path = "/chatWithAudio") +// public void chatWithAudio(@RequestParam String group, MultipartFile file, @ApiIgnore @RequestAttribute UserVO user) { +// this.iJointTrainingService.chatWithAudio(group, file, user); +// } +// +// @ApiOperation(value = "是否真实设备被其他仿真使用") +// @GetMapping(path = "/room/{group}/realDeviceUsed") +// public boolean isRealDeviceUsed(@PathVariable String group, String projectCode) { +// return this.iJointTrainingService.isRealDeviceUsed(group, projectCode); +// } +// +// @ApiOperation(value = "开始仿真") +// @PostMapping(path = "/room/simulation") +// public void startSimulation(String group, @ApiIgnore @RequestAttribute UserVO user) { +// iJointTrainingService.startSimulation(group, user); +// } +// +// @ApiOperation(value = "进入仿真") +// @PutMapping(path = "/room/simulation/user/entrance") +// public void userEntranceSimulation(@ApiIgnore @RequestAttribute UserVO user, @RequestParam String group) { +// iJointTrainingService.userEnterSimulation(user.getId(), group); +// } +// +// @ApiOperation(value = "结束仿真返回房间") +// @PutMapping(path = "/room/simulation/user/exit") +// public JointTrainingRoomNewVO userClosureSimulation(@ApiIgnore @RequestAttribute UserVO user, @RequestParam String group) { +// return iJointTrainingService.userExitSimulation(user.getId(), group); +// } +// +// @ApiOperation(value = "管理员结束所有人的仿真") +// @PutMapping(path = "/room/simulation/all") +// public JointTrainingRoomNewVO adminClosureSimulation(@RequestParam String group, @ApiIgnore @RequestAttribute UserVO user) { +// return iJointTrainingService.adminFinishSimulation(user, group); +// } +//} diff --git a/src/main/java/club/joylink/rtss/controller/simulation/SchedulingSimulationController.java b/src/main/java/club/joylink/rtss/controller/simulation/SchedulingSimulationController.java new file mode 100644 index 000000000..5fe535e21 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/simulation/SchedulingSimulationController.java @@ -0,0 +1,80 @@ +package club.joylink.rtss.controller.simulation; + +import club.joylink.rtss.controller.advice.AuthenticateInterceptor; +import club.joylink.rtss.services.simulation.SchedulingService; +import club.joylink.rtss.vo.LoginUserInfoVO; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.schedulingNew.SchedulingCheckResultNewVO; +import club.joylink.rtss.vo.client.schedulingNew.SchedulingPlanDetailVO; +import club.joylink.rtss.vo.client.schedulingNew.SchedulingPlanNewVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.validation.constraints.NotBlank; +import java.time.LocalDate; +import java.util.List; + +@Api(tags = { "新派班工作站仿真接口" }) +@RestController +@RequestMapping(path = "/api/v1/scheduling") +public class SchedulingSimulationController { + + @Autowired + private SchedulingService schedulingService; + + @GetMapping(path = "/{group}/current") + public SchedulingPlanNewVO getCurrentSchedulingPlan(@PathVariable String group) { + return this.schedulingService.queryCurrentSchedulingPlan(group); + } + + @ApiOperation(value = "查询某天的派班计划") + @GetMapping(path = "/{group}/day") + public SchedulingPlanNewVO findSchedulingPlanOfDay(@PathVariable @NotBlank String group, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate day, + @ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) + LoginUserInfoVO loginUserInfoVO) { + return this.schedulingService.queryAndLoadSchedulingPlanOfDay(group, day, loginUserInfoVO); + } + + @ApiOperation(value = "生成某天的基础派班计划") + @PostMapping(path = "/{group}/generate") + public SchedulingPlanNewVO generateBaseSchedulingPlanOfDay(@PathVariable @NotBlank String group, + @RequestParam @DateTimeFormat(pattern = "yyyy-MM-dd") LocalDate day, + @ApiIgnore @RequestAttribute UserVO user) { + return this.schedulingService.generateSchedulingPlanOfDay(group, day, user); + } + +// @ApiOperation(value = "检查派班计划冲突") +// @PostMapping(path = "/{group}/check") +// public SchedulingCheckResultNewVO checkConflict(@PathVariable @NotBlank String group, +// @Validated @RequestBody List editVOList) { +// return this.schedulingService.applyAndCheckConflict(group, editVOList); +// } + + @ApiOperation(value = "保存派班计划数据") + @PostMapping(path = "/{group}/save") + public SchedulingCheckResultNewVO saveSchedulingPlan(@PathVariable @NotBlank String group, + @Validated @RequestBody List editVOList, + @ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) + LoginUserInfoVO loginUserInfoVO) { + return this.schedulingService.save(group, editVOList, loginUserInfoVO); + } + + @ApiOperation(value = "生成地图通用派班计划") + @PostMapping(path = "/generate/common") + public void generateMapCommonSchedulingPlan(Long mapId, @ApiIgnore @RequestAttribute UserVO user) { + this.schedulingService.generateCommonSchedulingPlan(mapId, user); + } + + @ApiOperation(value = "所有地图生成通用派班计划", hidden = true) + @PostMapping(path = "/generate/common/all") + public void generateAllMapCommonSchedulingPlan(@ApiIgnore @RequestAttribute UserVO user) { + this.schedulingService.generateAllMapCommonSchedulingPlan(user); + } + +} diff --git a/src/main/java/club/joylink/rtss/controller/simulation/ScriptSimulationController.java b/src/main/java/club/joylink/rtss/controller/simulation/ScriptSimulationController.java new file mode 100644 index 000000000..efb6e8673 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/simulation/ScriptSimulationController.java @@ -0,0 +1,174 @@ +package club.joylink.rtss.controller.simulation; + +import club.joylink.rtss.simulation.cbtc.script.ScriptActionBO; +import club.joylink.rtss.simulation.cbtc.script.ScriptBO; +import club.joylink.rtss.controller.advice.AuthenticateInterceptor; +import club.joylink.rtss.services.simulation.IScriptSimulationService; +import club.joylink.rtss.vo.LoginUserInfoVO; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.script.MapLocationVO; +import club.joylink.rtss.vo.client.script.ScriptActionNewUpdateVO; +import club.joylink.rtss.vo.client.script.ScriptActionNewVO; +import club.joylink.rtss.vo.client.script.ScriptNewVO; +import club.joylink.rtss.vo.client.simulationv1.SimulationMemberVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.util.List; + +@Api(tags = {"剧本仿真接口"}) +@RestController +@RequestMapping("/api/scriptSimulation") +public class ScriptSimulationController { + + @Autowired + private IScriptSimulationService iScriptSimulationService; + + @ApiOperation(value = "开始剧本编制仿真") + @GetMapping("/{scriptId}/scriptWrite") + public String scriptWriteSimulation(@PathVariable @NotNull Long scriptId, + @ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) + LoginUserInfoVO userLoginInfo) { + return this.iScriptSimulationService.scriptWriteSimulation(scriptId, userLoginInfo); + } + + @ApiOperation(value = "获取仿真所有出演成员") + @GetMapping("/{group}/allPlayer") + public List getAllPlayer(@PathVariable String group) { + return iScriptSimulationService.getAllPlayer(group); + } + + @ApiOperation("获取剧本所有选取过的成员") + @GetMapping("/{group}/allSelectedMembers") + public List getAllSelectedMembers(@PathVariable String group) { + return iScriptSimulationService.getAllSelectedMembers(group); + } + + @ApiOperation(value = "获取剧本所有动作") + @GetMapping("/{group}/allAction") + public List getAllAction(@PathVariable @NotBlank String group) { + return iScriptSimulationService.getAllAction(group); + } + + @ApiOperation("修改剧本会话动作") + @PutMapping("/{group}/action/update") + public void updateAction(@PathVariable @NotBlank String group, @RequestBody @NotNull @Validated ScriptActionNewUpdateVO updateVO) { + iScriptSimulationService.updateAction(group, updateVO); + } + + @ApiOperation("删除剧本会话动作") + @DeleteMapping("/{group}/{actionId}/delete") + public void deleteAction(@PathVariable String group, @PathVariable String actionId) { + iScriptSimulationService.deleteAction(group, actionId); + } + +// @ApiOperation("查询触发条件") +// @GetMapping("/{group}/{actionId}/condition") +// public ScriptActionBO.Condition getCondition(@PathVariable String group, @PathVariable String actionId) { +// return iScriptSimulationService.getCondition(group, actionId); +// } + + @ApiOperation("更新触发条件") + @PutMapping("/{group}/{actionId}/updateCondition") + public void updateCondition(@PathVariable String group, @PathVariable String actionId, @RequestBody ScriptActionBO.Condition condition) { + iScriptSimulationService.updateCondition(group, actionId, condition); + } + + @ApiOperation(value = "更新位置") + @PutMapping("/{group}/mapLocation") + public void updateMapLocation(@PathVariable String group, @RequestBody MapLocationVO locationVO) { + iScriptSimulationService.updateMapLocation(group, locationVO); + } + + @ApiOperation(value = "保存背景") + @PutMapping("/{group}/saveScenes") + public void saveScenes(@PathVariable @NotBlank String group) { + iScriptSimulationService.saveBgScenes(group); + } + + @ApiOperation("开始替换背景") + @PutMapping("/{group}/replace/start") + public void replaceStart(@PathVariable String group) { + iScriptSimulationService.replaceStart(group); + } + + @ApiOperation("替换背景") + @PutMapping("/{group}/replace/confirm") + public void replaceBgScenes(@PathVariable String group) { + iScriptSimulationService.replaceBgScenes(group); + } + + @ApiOperation("背景替换取消") + @PutMapping("/{group}/replace/cancel") + public void replaceEnd(@PathVariable String group) { + iScriptSimulationService.replaceEnd(group); + } + + @ApiOperation(value = "重置剧本") + @PutMapping("/{group}/reset") + public void reset(@PathVariable @NotBlank String group, @ApiIgnore @RequestAttribute UserVO user) { + iScriptSimulationService.reset(group, user); + } + + @ApiOperation(value = "保存数据") + @PutMapping("/{group}/saveData") + public void saveData(@PathVariable String group) { + iScriptSimulationService.saveData(group); + } + + @ApiOperation("切换扮演的出演成员") + @PutMapping("/{group}/{memberId}/switch") + public void switchPlayer(@PathVariable String group, @PathVariable String memberId, @ApiIgnore @RequestAttribute UserVO user) { + iScriptSimulationService.switchPlayer(group, memberId, user); + } + + //----------- 剧本运行相关 ----------- + + @ApiOperation("加载已发布的剧本到仿真中") + @PutMapping("/{group}/load/script/{scriptId}") + public void loadScript(@PathVariable String group, @PathVariable Long scriptId) { + iScriptSimulationService.loadScript(group, scriptId); + } + + @ApiOperation(value = "预览剧本") + @GetMapping("/{scriptId}/preview") + public String preview(@PathVariable Long scriptId, @ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) LoginUserInfoVO loginUserInfoVO) { + return iScriptSimulationService.preview(scriptId, loginUserInfoVO); + } + + @ApiOperation("选择角色并开始剧本演出") + @PutMapping("/{group}/chooseMemberAndStart") + public void chooseMemberAndStartScript(@PathVariable String group, String memberId, ScriptBO.Mode mode, @RequestAttribute UserVO user) { + iScriptSimulationService.chooseMemberAndStartScript(group, memberId, mode, user); + } + + @ApiOperation("结束剧本演出") + @GetMapping("/{group}/finish") + public Integer finishScript(@PathVariable String group) { + return iScriptSimulationService.finishScript(group); + } + + @ApiOperation(value = "获取仿真中加载的剧本详情") + @GetMapping("/{group}/scriptDetail") + public ScriptNewVO getScriptDetail(@PathVariable String group) { + return iScriptSimulationService.getScriptDetail(group); + } + + @ApiOperation("重新预览剧本") + @PutMapping("/{group}/rePreview") + public void rePreview(@PathVariable String group, @RequestAttribute UserVO user) { + iScriptSimulationService.rePreview(group, user); + } + + @ApiOperation("托管驾驶") + @PutMapping("/{group}/trust") + public void trust(@PathVariable String group, @ApiIgnore @RequestAttribute UserVO user) { + iScriptSimulationService.trust(group, user); + } +} diff --git a/src/main/java/club/joylink/rtss/controller/simulation/SimulationConversationController.java b/src/main/java/club/joylink/rtss/controller/simulation/SimulationConversationController.java new file mode 100644 index 000000000..b398c4032 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/simulation/SimulationConversationController.java @@ -0,0 +1,90 @@ +package club.joylink.rtss.controller.simulation; + +import club.joylink.rtss.simulation.cbtc.conversation.CommunicationObject; +import club.joylink.rtss.simulation.cbtc.conversation.ConversationManagerService; +import club.joylink.rtss.simulation.cbtc.conversation.ConversationText; +import club.joylink.rtss.simulation.cbtc.data.vo.ConversationVO; +import club.joylink.rtss.controller.advice.AuthenticateInterceptor; +import club.joylink.rtss.vo.UserVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; + +@Api("仿真会话接口") +@RestController +@RequestMapping("/api/simulation/{group}/conversation") +public class SimulationConversationController { + + @Autowired + private ConversationManagerService conversationManagerService; + + @ApiOperation("根据会话id获取仿真会话") + @GetMapping("/{id}") + public ConversationVO getConversation(@PathVariable String group, + @PathVariable String id) { + return this.conversationManagerService.getConversationById(group, id); + } + + @ApiOperation("获取所有会话") + @GetMapping("/listAll") + public List getAllConversations(@PathVariable String group) { + return this.conversationManagerService.getAllConversations(group); + } + +// @ApiOperation("发起会话") +// @PostMapping("") +// public ConversationVO startConversation(@PathVariable String group, +// @RequestBody List memberIdList, +// @ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_USER_KEY) +// UserVO userVO) { +// return this.conversationManagerService.createConversation(group, userVO, memberIdList); +// } + + @ApiOperation("发起会话") + @PostMapping("") + public ConversationVO startConversation(@PathVariable String group, + @ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_USER_KEY) UserVO userVO, + CommunicationObject object, @RequestBody List memberIds) { + return this.conversationManagerService.createConversation(group, userVO, object, memberIds); + } + + @ApiOperation("成员接受仿真会话邀请") + @PostMapping("/{id}/connect") + public ConversationVO acceptConversationInvite(@PathVariable String group, + @PathVariable String id, + @ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_USER_KEY) + UserVO userVO) { + return this.conversationManagerService.connect2Conversation(group, userVO, id); + } + + @ApiOperation("结束会话") + @PutMapping("/{id}/over") + public void overConversation(@PathVariable String group, + @PathVariable String id, + @ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_USER_KEY) + UserVO userVO) { + this.conversationManagerService.exitConversation(group, id, userVO); + } + + @ApiOperation("发送会话消息(语音输入)") + @PostMapping("/{id}/chat") + public void chat(@PathVariable String group, + @PathVariable String id, + MultipartFile file, + @ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_USER_KEY) + UserVO userVO) { + this.conversationManagerService.chat(group, id, userVO, file); + } + + @ApiOperation("发送会话消息(文字输入)") + @PostMapping("/{id}/chat/text") + public void textChat(@PathVariable String group, @PathVariable String id, @RequestBody ConversationText text, @RequestAttribute UserVO user) { + this.conversationManagerService.textChat(group, id, text, user); + } + +} diff --git a/src/main/java/club/joylink/rtss/controller/simulation/SimulationManageController.java b/src/main/java/club/joylink/rtss/controller/simulation/SimulationManageController.java new file mode 100644 index 000000000..fba2182a8 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/simulation/SimulationManageController.java @@ -0,0 +1,40 @@ +package club.joylink.rtss.controller.simulation; + +import club.joylink.rtss.simulation.cbtc.data.vo.SimulationVO; +import club.joylink.rtss.services.simulation.SimulationManageService; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.simulationv1.ExistSimulationQueryVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +@Api(tags = { "仿真管理接口" }) +@RestController +@RequestMapping("/manage/simulation") +public class SimulationManageController { + + @Autowired + private SimulationManageService simulationManageService; + + @ApiOperation(value = "分页查询存在的仿真数据") + @GetMapping("/exists") + public PageVO pagingQueryExistSimulations(ExistSimulationQueryVO queryVO) { + return this.simulationManageService.pagingQueryExistSimulations(queryVO); + } + + @ApiOperation(value = "根据仿真group获取仿真基础信息") + @GetMapping("/{group}") + public SimulationVO getSimulationBasicInfo(@PathVariable String group) { + return this.simulationManageService.getSimulationBasicInfo(group); + } + + @ApiOperation(value = "销毁仿真") + @DeleteMapping("/{group}") + public void destroySimulation(@PathVariable String group, @ApiIgnore @RequestAttribute UserVO user) { + this.simulationManageService.destroySimulation(group, user); + } + +} diff --git a/src/main/java/club/joylink/rtss/controller/simulation/SimulationProcessRecordController.java b/src/main/java/club/joylink/rtss/controller/simulation/SimulationProcessRecordController.java new file mode 100644 index 000000000..7713e4dce --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/simulation/SimulationProcessRecordController.java @@ -0,0 +1,69 @@ +package club.joylink.rtss.controller.simulation; + +import club.joylink.rtss.services.record.ISimulationProcessRecordService; +import club.joylink.rtss.vo.UserVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestAttribute; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import springfox.documentation.annotations.ApiIgnore; + +@Api(tags = { "新仿真回放接口" }) +@RestController +@RequestMapping("api/v1/simulationRecord") +public class SimulationProcessRecordController { + + @Autowired + private ISimulationProcessRecordService recordService; + + @ApiOperation(value = "开启记录") + @GetMapping("/start") + public void startRecord(String group, @ApiIgnore @RequestAttribute UserVO user) { + this.recordService.startRecordSimulation(user,group); + } + + @ApiOperation(value = "关闭记录") + @GetMapping(path = "/stop") + public void stopRecordSimulation(String group, @ApiIgnore @RequestAttribute UserVO user) { + this.recordService.stopRecordSimulation(user, group); + } + + @ApiOperation(value = "回访准备") + @GetMapping(path = "/playback/ready") + public Long readyPlayback(String group, @ApiIgnore @RequestAttribute UserVO user) { + return this.recordService.readyPlayback(user, group); + } + + @ApiOperation(value = "开始播放") + @GetMapping(path = "/playback/startPlaying") + public void startPlaying(@ApiIgnore @RequestAttribute UserVO user) { + this.recordService.startPlaying(user); + } + + @ApiOperation(value = "设置倍速") + @GetMapping("/playback/setPlaySpeed") + public void setPlaySpeed(int level, @RequestAttribute UserVO user) { + this.recordService.setPlaySpeed(user, level); + } + + @ApiOperation(value = "暂停播放") + @GetMapping("/playback/pausePlaying") + public void pausePlaying(@RequestAttribute UserVO user) { + this.recordService.pausePlaying(user); + } + + @ApiOperation(value = "从暂停恢复播放") + @GetMapping("/playback/playing") + public void playing(@RequestAttribute UserVO user) { + this.recordService.playing(user); + } + + @ApiOperation(value = "结束回放") + @GetMapping("/playback/endPlaying") + public void endPlaying(@RequestAttribute UserVO user) { + this.recordService.endPlaying(user); + } +} diff --git a/src/main/java/club/joylink/rtss/controller/simulation/SimulationRealDeviceController.java b/src/main/java/club/joylink/rtss/controller/simulation/SimulationRealDeviceController.java new file mode 100644 index 000000000..f40018210 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/simulation/SimulationRealDeviceController.java @@ -0,0 +1,50 @@ +package club.joylink.rtss.controller.simulation; + +import club.joylink.rtss.simulation.cbtc.GroupSimulationService; +import club.joylink.rtss.simulation.cbtc.data.vo.RealDeviceVO; +import club.joylink.rtss.simulation.cbtc.data.vo.SimulationVO; +import club.joylink.rtss.controller.advice.AuthenticateInterceptor; +import club.joylink.rtss.vo.LoginUserInfoVO; +import club.joylink.rtss.vo.client.simulationv1.MemberAddParamVO; +import club.joylink.rtss.vo.client.simulationv1.PlayRoleConfigVO; +import club.joylink.rtss.vo.client.simulationv1.SimulationMemberVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; + +@Api(tags = "仿真真实设备接口") +@RestController +@RequestMapping("/api/simulation/{group}/realDevice") +public class SimulationRealDeviceController { + + @Autowired + private GroupSimulationService groupSimulationService; + + @ApiOperation("获取仿真全部真实设备") + @GetMapping("/list") + public List getAllRealDevices(@PathVariable String group) { + return this.groupSimulationService.getRealDeviceList(group); + } + + @ApiOperation("连接仿真设备和真实设备") + @PostMapping("/{id}/connect/{sdCode}") + public void connect(@PathVariable String group, + @ApiParam("项目设备id") @PathVariable Long id, + @ApiParam("仿真设备编码") @PathVariable String sdCode) { + this.groupSimulationService.connectDevice(group, sdCode, id); + } + + @ApiOperation("断开仿真设备和真实设备的连接") + @PutMapping("/{id}/disconnect") + public void disconnect(@PathVariable String group, + @ApiParam("项目设备id") @PathVariable Long id) { + this.groupSimulationService.disconnectDevice(group, id); + } + +} diff --git a/src/main/java/club/joylink/rtss/controller/simulation/SimulationV1Controller.java b/src/main/java/club/joylink/rtss/controller/simulation/SimulationV1Controller.java new file mode 100644 index 000000000..1364a2f2c --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/simulation/SimulationV1Controller.java @@ -0,0 +1,292 @@ +package club.joylink.rtss.controller.simulation; + +import com.joylink.base.exception.BusinessException; +import com.joylink.base.exception.constant.ExceptionMapping; +import club.joylink.rtss.simulation.cbtc.ATS.data.AtsAlarm; +import club.joylink.rtss.simulation.cbtc.GroupSimulationService; +import club.joylink.rtss.simulation.cbtc.Simulation; +import club.joylink.rtss.simulation.cbtc.command.CommandInitiateVO; +import club.joylink.rtss.simulation.cbtc.communication.vo.fault.DeviceFaultInfo; +import club.joylink.rtss.simulation.cbtc.data.status.IbpStatus; +import club.joylink.rtss.simulation.cbtc.data.vo.SimulationVO; +import club.joylink.rtss.simulation.cbtc.data.vr.VirtualRealityIbp; +import club.joylink.rtss.simulation.cbtc.member.SimulationMember; +import club.joylink.rtss.simulation.cbtc.script.ScriptBO; +import club.joylink.rtss.controller.advice.AuthenticateInterceptor; +import club.joylink.rtss.services.IVirtualRealityIbpService; +import club.joylink.rtss.vo.LoginUserInfoVO; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.fault.FaultRuleVO; +import club.joylink.rtss.vo.client.map.MapVO; +import club.joylink.rtss.vo.client.map.newmap.MapDestinationCodeDefinitionVO; +import club.joylink.rtss.vo.client.map.newmap.MapStationNewVO; +import club.joylink.rtss.vo.client.runplan.PlanTripNumberVO; +import club.joylink.rtss.vo.client.runplan.RunPlanEChartsDataVO; +import club.joylink.rtss.vo.client.simulationv1.RunAsPlanParam; +import club.joylink.rtss.vo.client.simulationv1.SimulationMemberVO; +import club.joylink.rtss.vo.client.simulationv1.SimulationUserVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.format.annotation.DateTimeFormat; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.time.LocalDateTime; +import java.time.LocalTime; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +@Api(tags = {"新仿真接口"}) +@RestController +@RequestMapping("/simulation") +public class SimulationV1Controller { + + @Autowired + private GroupSimulationService groupSimulationService; + + @Autowired + private IVirtualRealityIbpService iVirtualRealityIBPService; + + @ApiOperation(value = "根据产品类型创建仿真") + @GetMapping("") + public String simulation(Long mapId, String prdType, + @ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) + LoginUserInfoVO loginUserInfoVO) { + return this.groupSimulationService.simulation(mapId, prdType, loginUserInfoVO); + } + + @ApiOperation(value = "创建实训仿真") + @GetMapping(path = "/training/{trainingId}") + public String trainingSimulation(@PathVariable Long trainingId, + @ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) + LoginUserInfoVO loginUserInfoVO) { + return this.groupSimulationService.trainingSimulation(trainingId, loginUserInfoVO); + } + + @ApiOperation(value = "创建考试仿真") + @GetMapping(path = "/exam/{examId}") + public String examSimulate(@PathVariable Long examId, + @ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_INFO_KEY) + LoginUserInfoVO loginUserInfoVO) { + return this.groupSimulationService.examSimulation(examId, loginUserInfoVO); + } + + @ApiOperation(value = "获取客户端已经进入仿真的用户仿真所在group") + @GetMapping(path = "/running") + public List getRunningSimulationBySubscribeUser(@ApiIgnore @RequestAttribute UserVO user) { + return this.groupSimulationService.getUserRunningSimulationGroups(user); + } + + @ApiOperation(value = "根据仿真group获取仿真基础信息") + @GetMapping("/{group}") + public SimulationVO getSimulationBasicInfo(@PathVariable String group) { + return this.groupSimulationService.getSimulationBasicInfo(group); + } + + @ApiOperation(value = "获取用户在仿真中的用户信息") + @GetMapping("/{group}/simulationUser") + public SimulationUserVO getSimulationUserInfo(@PathVariable String group, + @ApiIgnore @RequestAttribute(name = AuthenticateInterceptor.LOGIN_USER_KEY) + UserVO userVO) { + return this.groupSimulationService.getSimulationUserInfo(group, userVO); + } + + @ApiOperation("获取所有仿真用户") + @GetMapping("/{group}/simulationUsers") + public List queryAllSimulationUsers(@PathVariable String group) { + return this.groupSimulationService.queryAllSimulationUsers(group); + } + + @ApiOperation(value = "根据仿真group获取仿真地图数据") + @GetMapping("/{group}/mapData") + public MapVO getSimulationMapData(@PathVariable String group) { + return this.groupSimulationService.getSimulationMapData(group); + } + + @ApiOperation(value = "根据group获取排序的车站列表(包含车辆段/停车场)") + @GetMapping("/{group}/stationWithDepot") + public List getSortedStationListWithDepot(@PathVariable String group) { + return this.groupSimulationService.getSortedStationListWithDepot(group); + } + + @ApiOperation(value = "加载指定运行计划到仿真中") + @PutMapping("/{group}/load/runPlan/{templateId}") + public void loadRunPlan(@PathVariable String group, @PathVariable Long templateId) { + this.groupSimulationService.loadRunPlan(group, templateId); + } + + @ApiOperation(value = "根据仿真group获取仿真运行图") + @GetMapping("/{group}/runPlan") + public RunPlanEChartsDataVO getSimulationRunPlan(@PathVariable String group) { + return this.groupSimulationService.getSimulationRunPlan(group); + } + + @ApiOperation(value = "获取仿真运行图车次号列表") + @GetMapping("/{group}/tripNumbers") + public List getSimulationRunPlanTripNumbers(@PathVariable String group) { + return this.groupSimulationService.getSimulationRunPlanTripNumbers(group); + } + + @ApiOperation(value = "根据车次号获取服务号") + @GetMapping("/{group}/serviceNumber") + public List getServiceNumberByTripNumber(@PathVariable String group, String tripNumber) { + return this.groupSimulationService.getServiceNumberByTripNumber(group, tripNumber); + } + + @ApiOperation(value = "根据车次号获取计划车次信息") + @GetMapping("/{group}/planTripInfo") + public PlanTripNumberVO getPlanTripByTripNumber(@PathVariable String group, String tripNumber) { + return this.groupSimulationService.getPlanTripByTripNumber(group, tripNumber); + } + + @ApiOperation(value = "根据服务号和车次号获取计划车次信息") + @GetMapping("/{group}/planTripInfoBySt") + public PlanTripNumberVO planTripInfoBySt(@PathVariable String group, String serviceNumber, String tripNumber) { + return this.groupSimulationService.planTripInfoByServiceAndTripNumber(group, serviceNumber, tripNumber); + } + + @ApiOperation(value = "仿真操作") + @PostMapping("/{group}/operate/{type}") + public Object operate(@PathVariable @NotBlank String group, @PathVariable @NotNull String type, + @RequestBody Map param, @ApiIgnore @RequestAttribute UserVO user) { + return this.groupSimulationService.operate(group, type, param, user); + } + + @ApiOperation("仿真指令") + @PostMapping("/{group}/command") + public void command(@PathVariable String group, @RequestBody @Validated CommandInitiateVO initiateVO, @ApiIgnore @RequestAttribute UserVO user) { + Simulation simulation = this.groupSimulationService.getSimulationByGroup(group); + SimulationMember member = simulation.getMemberByUserId(user.getId()); + this.groupSimulationService.command(simulation, initiateVO, member); + } + + @ApiOperation(value = "根据计划时间获取此时间点可以加载的最大列车数量") + @GetMapping("/{group}/loadTrainNumber") + public int getLoadTrainNumber(@PathVariable String group, + @DateTimeFormat(pattern = "HH:mm:ss") LocalTime time) { + if (Objects.isNull(time)) { + throw new BusinessException(ExceptionMapping.INTERFACE_PARAM_ERROR, + String.format("时间不能为空")); + } + return this.groupSimulationService.getGivenTimeCouldLoadedTrainNumber(group, time); + } + + @ApiOperation(value = "按计划行车") + @PostMapping("/{group}/ranAsPlan") + public void runAsPlan(@PathVariable String group, @RequestBody @Validated RunAsPlanParam param) { + this.groupSimulationService.runAsPlan(group, param); + } + + @ApiOperation(value = "退出计划") + @PostMapping("/{group}/planOver") + public void planOver(@PathVariable String group) { + this.groupSimulationService.planOver(group); + } + + @ApiOperation(value = "清除仿真") + @DeleteMapping("/{group}/clear") + public void clearSimulation(@PathVariable String group, @ApiIgnore @RequestAttribute UserVO user) { + this.groupSimulationService.clearSimulation(group, user); + } + + @ApiOperation(value = "加载剧本并扮演成员(已发布的剧本)") + @PutMapping(path = "/{group}/script/{scriptId}") + public void loadScriptAndPlayMember(@PathVariable String group, + @PathVariable Long scriptId, + String memberId, + ScriptBO.Mode mode, + @ApiIgnore @RequestAttribute UserVO user) { + this.groupSimulationService.loadScriptAndPlayMember(group, scriptId, memberId, mode, user); + } + + @ApiOperation(value = "退出剧本") + @PutMapping(path = "/{group}/exitScript") + public void exitScript(@PathVariable @NotBlank String group, @ApiIgnore @RequestAttribute UserVO user) { + this.groupSimulationService.exitScript(group, user); + } + + @ApiOperation(value = "获取所有仿真成员列表") + @GetMapping(path = "/{group}/members") + public List getSimulationMembers(@PathVariable @NotBlank String group) { + return this.groupSimulationService.getSimulationMembers(group); + } + + @ApiOperation(value = "仿真暂停") + @PutMapping(path = "/{group}/pause") + public void pause(@PathVariable String group) { + groupSimulationService.pauseSimulation(group); + } + + @ApiOperation(value = "仿真恢复运行") + @PutMapping(path = "/{group}/resume") + public void resume(@PathVariable String group) { + groupSimulationService.resumeSimulation(group); + } + + @ApiOperation(value = "获取仿真设备故障列表") + @GetMapping(path = "/{group}/deviceFaultInfos") + public List getSimulationDeviceFaultInfoList( + @PathVariable @NotBlank String group) { + return this.groupSimulationService.getSimulationDeviceFaultInfoList(group); + } + + @ApiOperation(value = "取消自动故障") + @PutMapping(path = "/{group}/faultMode/{id}") + public void setFaultMode(@PathVariable @NotBlank String group, @PathVariable(required = false) Integer id) { + if (Objects.isNull(id)) { + this.groupSimulationService.clearAllAutoFault(group); + return; + } + this.groupSimulationService.cancelAutoFault(group, id); + } + + @ApiOperation(value = "设置自动故障") + @PostMapping(path = "/{group}/faultMode") + public Integer setFaultMode(@PathVariable @NotBlank String group, @RequestBody FaultRuleVO ruleVO) { + return this.groupSimulationService.setFaultMode(group, ruleVO); + } + + @ApiOperation(value = "查询已设置所有的自动触发故障") + @GetMapping(path = "/{group}/faultMode/faultRule") + public Set getNotTriggerAutoFault(@PathVariable @NotBlank String group) { + return this.groupSimulationService.getTriggerAutoFaults(group); + } + + @ApiOperation(value = "查询所有目的地码") + @GetMapping("/{group}/destinationCode/list") + public List getAllDestinationCode(@PathVariable String group) { + return this.groupSimulationService.getAllDestinationCode(group); + } + + @ApiOperation("获取IBP盘状态") + @GetMapping("/{group}/{stationCode}/ibp/status") + public IbpStatus getIbpStatus(@PathVariable String group, @PathVariable String stationCode) { + return iVirtualRealityIBPService.getIbpStatus(group, stationCode); + } + + @ApiOperation("按下IBP盘按钮") + @PutMapping("/{group}/ibp/{button}") + public void pressIbpButton(@PathVariable String group, String stationCode, @PathVariable VirtualRealityIbp.Button button) { + iVirtualRealityIBPService.pressTheButton(group, stationCode, button); + } + + @ApiOperation("查询报警列表") + @GetMapping(path = "/{group}/alarm") + public List listAlarm(@PathVariable String group, String level, + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime startTime, + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime endTime) { + return groupSimulationService.listAlarm(group, level, startTime, endTime); + } + + @ApiOperation("仿真报警确认") + @PutMapping(path = "/{group}/alarm/confirm") + public void AlarmConfirm(@PathVariable String group, @RequestBody List codes, @ApiIgnore @RequestAttribute UserVO user) { + groupSimulationService.alarmConfirm(group, codes, user); + } +} diff --git a/src/main/java/club/joylink/rtss/controller/statistics/StatisticsController.java b/src/main/java/club/joylink/rtss/controller/statistics/StatisticsController.java new file mode 100644 index 000000000..26e8ff456 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/statistics/StatisticsController.java @@ -0,0 +1,49 @@ +package club.joylink.rtss.controller.statistics; + +import club.joylink.rtss.services.statistics.StatisticsService; +import club.joylink.rtss.vo.statistics.DailyLiveQuantityVO; +import club.joylink.rtss.vo.statistics.DailyLiveStatisticsQueryVO; +import club.joylink.rtss.vo.statistics.DailyLiveUserQuantityQueryVO; +import club.joylink.rtss.vo.statistics.UserQuantityQueryVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +@Api(tags = {"信息统计接口"}) +@RestController +@RequestMapping(path = "/api/statistics") +public class StatisticsController { + + @Autowired + private StatisticsService statisticsService; + + @ApiOperation("获取注册用户总数量") + @GetMapping("/userQuantity") + public Long getUserQuantity(UserQuantityQueryVO queryVO) { + return this.statisticsService.getUserQuantity(queryVO); + } + + @ApiOperation("获取指定日期日活用户数量") + @GetMapping("/dailyLiveUserQuantity") + public Long getDailyLiveUserQuantity(DailyLiveUserQuantityQueryVO queryVO) { + return this.statisticsService.getDailyLiveUserQuantity(queryVO); + } + + @ApiOperation("获取日用户总数统计列表") + @GetMapping("/dailyRegisterStatistics") + public List getDailyUserQuantityStatistics(DailyLiveStatisticsQueryVO queryVO) { + return this.statisticsService.getDailyUserQuantityStatistics(queryVO); + } + + @ApiOperation("获取日活用户统计列表") + @GetMapping("/dailyLiveStatistics") + public List getDailyLiveStatistics(DailyLiveStatisticsQueryVO queryVO) { + return this.statisticsService.getDailyLiveStatistics(queryVO); + } + +} diff --git a/src/main/java/club/joylink/rtss/controller/test/ModbusTestController.java b/src/main/java/club/joylink/rtss/controller/test/ModbusTestController.java new file mode 100644 index 000000000..3d5719708 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/test/ModbusTestController.java @@ -0,0 +1,44 @@ +package club.joylink.rtss.controller.test; + +import club.joylink.rtss.simulation.cbtc.device.real.modbustcp.ModbusTcpTestService; +import club.joylink.rtss.simulation.cbtc.device.real.modbustcp.PlcGatewayConnectManager; +import club.joylink.rtss.controller.advice.AuthenticateInterceptor; +import club.joylink.rtss.controller.advice.Role; +import club.joylink.rtss.vo.UserVO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestAttribute; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import springfox.documentation.annotations.ApiIgnore; + +import static club.joylink.rtss.constants.RoleEnum.SuperAdmin; + +@ApiIgnore +@RestController +@RequestMapping("/api/test/modbus") +public class ModbusTestController { + + @Autowired + private ModbusTcpTestService modbusTcpTestService; + + @Autowired + private PlcGatewayConnectManager plcGatewayConnectManager; + + /** + * 测试modbustcp写网关(使用功能码05:写单线圈) + * @param code + * @param addr + * @param val + * @param userVO + * @return + */ + @Role(SuperAdmin) + @PostMapping("/writeCoil") + public void modbusWriteSingleCoil(String code, + int addr, boolean val, + @RequestAttribute(name = AuthenticateInterceptor.LOGIN_USER_KEY)UserVO userVO) { + this.modbusTcpTestService.writeSingleCoil(this.plcGatewayConnectManager.getChannel(code), addr, val); + } + +} diff --git a/src/main/java/club/joylink/rtss/controller/training/TrainingV1Controller.java b/src/main/java/club/joylink/rtss/controller/training/TrainingV1Controller.java new file mode 100644 index 000000000..db61a0527 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/training/TrainingV1Controller.java @@ -0,0 +1,192 @@ +package club.joylink.rtss.controller.training; + +import club.joylink.rtss.constants.RoleEnum; +import club.joylink.rtss.controller.advice.Role; +import club.joylink.rtss.services.training.ITrainingV1Service; +import club.joylink.rtss.services.training.GenerateTask; +import club.joylink.rtss.services.training.data.GenerateConfig; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.UserTrainingListVO; +import club.joylink.rtss.vo.client.UserTrainingQueryVO; +import club.joylink.rtss.vo.client.UserTrainingVO; +import club.joylink.rtss.vo.client.training.TrainingNewVO; +import club.joylink.rtss.vo.client.training.TrainingQueryVO; +import club.joylink.rtss.vo.client.training.TrainingResultVO; +import club.joylink.rtss.vo.client.training.TrainingStepVO; +import club.joylink.rtss.vo.client.validGroup.DraftTrainingCreateCheck; +import club.joylink.rtss.vo.client.validGroup.DraftTrainingStepCheck; +import club.joylink.rtss.vo.client.validGroup.GenerateConfigDeleteCheck; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.validation.constraints.NotBlank; +import java.util.Set; + +@Api(tags = { "实训数据管理接口" }) +@RestController +@RequestMapping("/api/v1/training") +public class TrainingV1Controller { + + private final ITrainingV1Service iTrainingService; + + private final GenerateTask generateTask; + + @Autowired + public TrainingV1Controller(ITrainingV1Service iTrainingService, GenerateTask generateTask) { + this.iTrainingService = iTrainingService; + this.generateTask = generateTask; + } + + @ApiOperation(value = "创建实训基本信息") + @PostMapping(path = "") + public String createTraining( + @RequestBody @Validated(value = { DraftTrainingCreateCheck.class }) TrainingNewVO trainingVo, + @ApiIgnore @RequestAttribute UserVO user) { + return this.iTrainingService.createTraining(trainingVo, user); + } + + @ApiOperation(value = "获取实训基本信息") + @GetMapping(path="/{id}") + public TrainingNewVO getTraining(@PathVariable Long id) { + return this.iTrainingService.getTrainingById(id); + } + + @ApiOperation(value = "更新实训基本信息") + @PutMapping(path = "/{id}") + public void updateTraining(@PathVariable Long id, + @RequestBody @Validated(value = { DraftTrainingCreateCheck.class }) TrainingNewVO trainingVo, + @ApiIgnore @RequestAttribute UserVO user) { + this.iTrainingService.updateTraining(id, trainingVo, user); + } + + @ApiOperation(value = "获取实训明细") + @GetMapping(path = "/{id}/detail") + public TrainingNewVO getTrainingDetail(@PathVariable Long id, String group) { + return this.iTrainingService.getTrainingDetail(id, group); + } + + @ApiOperation(value = "保存实训明细") + @PostMapping(path = "/{id}/detailSave") + public void saveTrainingDetail(@PathVariable Long id, String group) { + this.iTrainingService.saveTrainingDetail(id, group); + } + + @ApiOperation(value = "保存实训步骤") + @PostMapping(path = "/{id}/stepsSave") + public void saveTrainingSteps(@PathVariable Long id, String group, + @RequestBody @Validated(value = { DraftTrainingStepCheck.class }) TrainingNewVO trainingVo) { + this.iTrainingService.saveTrainingSteps(id, group, trainingVo); + } + + @ApiOperation(value="实训开始") + @GetMapping(path="/{id}/start") + public TrainingNewVO trainingStart(@PathVariable Long id, String group, String mode) { + return this.iTrainingService.trainingStart(id, group, mode); + } + + /** + * 实训操作下一步 + * @param step 步骤 + */ + @ApiOperation(value="实训操作下一步") + @PostMapping(path="/{id}/nextStep") + public void nextStep(@PathVariable Long id, String group, @RequestBody TrainingStepVO step) { + this.iTrainingService.nextStep(id, group, step); + } + + @ApiOperation(value="实训结束") + @GetMapping(path="/{lessonId}/{id}/end") + public TrainingResultVO trainingEnd(@PathVariable Long lessonId, @PathVariable Long id, String group, + @NotBlank String mode, @NotBlank String usedTime, + @ApiIgnore @RequestAttribute UserVO user) { + return this.iTrainingService.trainingEnd(lessonId, id, group, mode, usedTime, user); + } + +// @ApiOperation(value = "清除实训数据") +// @DeleteMapping(path = "/{id}") +// public void clear(@PathVariable Long id) { +// this.iTrainingService.clear(id); +// } + +// @ApiOperation(value = "删除实训") +// @DeleteMapping(path = "/{trainingId}") +// public void delTraining(@PathVariable String trainingId, @RequestAttribute UserVO user) { +// iTrainingService.delTraining(trainingId, user); +// } + + @ApiOperation(value = "分页查询实训") + @GetMapping(path = "/pagedQuery") + public PageVO pagedListGenerateTraining(TrainingQueryVO queryVO) { + return this.iTrainingService.pagedQueryTrainings(queryVO); + } + +// @ApiOperation(value = "自动生成实训") +// @PostMapping(path = "/generate") +// public void generateTrainingTask(@RequestBody @Validated(GenerateConfigCheck.class) GenerateConfig config) { +// this.generateTask.execute(config); +// } + + @ApiOperation(value = "一键生成地图实训,生成中返回true") + @PostMapping(path = "/generate/{mapId}") + public boolean generateTrainings(@PathVariable Long mapId,boolean noCheck) { + Set runningMapIds = this.generateTask.getRunningmapIds(); + synchronized (runningMapIds){ + if(runningMapIds.contains(mapId)){ + return true; + } + if(noCheck){ + runningMapIds.add(mapId); + this.generateTask.generateTrainings(mapId); + return true; + } + return false; + } + + } + + @ApiOperation(value = "删除自动生成实训") + @DeleteMapping(path = "/generate") + public void deleteGenerateTraining(@Validated(GenerateConfigDeleteCheck.class) GenerateConfig config) { + this.generateTask.delete(config); + } + + @ApiOperation(value = "按操作类型批量更新自动生成实训的用时/说明") + @PutMapping(path = "/batchUpdateGenerate") + public void batchUpdateGenerateTraining(@RequestBody GenerateConfig config) { + this.generateTask.batchUpdateGenerateTraining(config); + } + + @ApiOperation(value = "分页查询用户实训数据") + @GetMapping(path = "/list") + public PageVO queryPagedUserTraining(UserTrainingQueryVO queryVO) { + return this.iTrainingService.queryPagedUserTraining(queryVO); + } + + @ApiOperation(value = "添加用户实训数据") + @PostMapping(path = "/userTraining") + public void updateUserTraining(@RequestBody @Validated UserTrainingVO userTrainingVO, + @ApiIgnore @RequestAttribute UserVO user) { + this.iTrainingService.addUserTraining(userTrainingVO, user); + } + + @ApiOperation(value = "更新用户实训数据") + @PutMapping(path = "/userTraining/{id}") + @Role({RoleEnum.SuperAdmin,RoleEnum.Admin}) + public void updateUserTraining(@PathVariable Long id, + @RequestBody UserTrainingVO userTrainingVO, + @ApiIgnore @RequestAttribute UserVO user) { + this.iTrainingService.updateUserTraining(id, userTrainingVO, user); + } + + @ApiOperation(value = "删除用户实训数据") + @DeleteMapping(path = "/userTraining/{id}") + @Role({RoleEnum.SuperAdmin,RoleEnum.Admin}) + public void deleteUserTraining(@PathVariable Long id, @ApiIgnore @RequestAttribute UserVO user) { + this.iTrainingService.deleteUserTraining(id, user); + } +} diff --git a/src/main/java/club/joylink/rtss/controller/wechat/WeChatMpAbilityController.java b/src/main/java/club/joylink/rtss/controller/wechat/WeChatMpAbilityController.java new file mode 100644 index 000000000..21ff20290 --- /dev/null +++ b/src/main/java/club/joylink/rtss/controller/wechat/WeChatMpAbilityController.java @@ -0,0 +1,39 @@ +package club.joylink.rtss.controller.wechat; + +import club.joylink.rtss.wechat.MiniProgramService; +import club.joylink.rtss.wechat.vo.WxError; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.io.IOException; + +@Api(tags = {"微信小程序功能接口"}) +@RestController +@RequestMapping(path = "/api/wechat/mp") +public class WeChatMpAbilityController { + + @Autowired + private MiniProgramService miniProgramService; + + @ApiOperation(value = "检查一段文本是否含有违法违规内容") + @PostMapping(path = "/msgSecCheck") + private WxError msgSecCheck(@RequestBody String content) { + return this.miniProgramService.msgSecCheck(content); + } + + @ApiOperation(value = "检查图片是否含有违法违规内容") + @PostMapping(path = "/imgSecCheck") + private WxError imgSecCheck(@RequestPart MultipartFile file) throws IOException { + return this.miniProgramService.imgSecCheck(file); + } + +// @ApiOperation(value = "检查图片是否含有违法违规内容(异步)") +// @PostMapping(path = "/imgSecCheckAsnc") +// private WxError imgSecCheckAsnc(@RequestBody String mediaUrl) { +// return this.miniProgramService.imgSecCheckAsnc(mediaUrl, CheckMediaType.IMG); +// } + +} diff --git a/src/main/java/club/joylink/rtss/dao/CommandDefinitionDAO.java b/src/main/java/club/joylink/rtss/dao/CommandDefinitionDAO.java new file mode 100644 index 000000000..3a240cedc --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/CommandDefinitionDAO.java @@ -0,0 +1,30 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.CommandDefinition; +import club.joylink.rtss.entity.CommandDefinitionExample; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * CommandDefinitionDAO继承基类 + */ +@Repository +public interface CommandDefinitionDAO extends MyBatisBaseDao { + + @Insert(value = "") + int batchInsertWithId(@Param("list") List commandDefinitionList); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/CompanyDAO.java b/src/main/java/club/joylink/rtss/dao/CompanyDAO.java new file mode 100644 index 000000000..b742e4303 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/CompanyDAO.java @@ -0,0 +1,12 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.Company; +import club.joylink.rtss.entity.CompanyExample; +import org.springframework.stereotype.Repository; + +/** + * CompanyDAO继承基类 + */ +@Repository +public interface CompanyDAO extends MyBatisBaseDao { +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/CompetitionDAO.java b/src/main/java/club/joylink/rtss/dao/CompetitionDAO.java new file mode 100644 index 000000000..c9d6d2723 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/CompetitionDAO.java @@ -0,0 +1,73 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.Competition; +import club.joylink.rtss.entity.CompetitionExample; +import club.joylink.rtss.entity.CompetitionWithBLOBs; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface CompetitionDAO { + long countByExample(CompetitionExample example); + + int deleteByExample(CompetitionExample example); + + int deleteByPrimaryKey(Long id); + + int insert(CompetitionWithBLOBs record); + + int insertSelective(CompetitionWithBLOBs record); + + List selectByExampleWithBLOBs(CompetitionExample example); + + List selectByExample(CompetitionExample example); + + CompetitionWithBLOBs selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") CompetitionWithBLOBs record, @Param("example") CompetitionExample example); + + int updateByExampleWithBLOBs(@Param("record") CompetitionWithBLOBs record, @Param("example") CompetitionExample example); + + int updateByExample(@Param("record") Competition record, @Param("example") CompetitionExample example); + + int updateByPrimaryKeySelective(CompetitionWithBLOBs record); + + int updateByPrimaryKeyWithBLOBs(CompetitionWithBLOBs record); + + int updateByPrimaryKey(Competition record); + + @Insert(value = "") + void batchInsert(List competitions); +} diff --git a/src/main/java/club/joylink/rtss/dao/CompetitionRecordDAO.java b/src/main/java/club/joylink/rtss/dao/CompetitionRecordDAO.java new file mode 100644 index 000000000..157096c57 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/CompetitionRecordDAO.java @@ -0,0 +1,12 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.CompetitionRecord; +import club.joylink.rtss.entity.CompetitionRecordExample; +import org.springframework.stereotype.Repository; + +/** + * CompetitionRecordDAO继承基类 + */ +@Repository +public interface CompetitionRecordDAO extends MyBatisBaseDao { +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/DraftIbpDAO.java b/src/main/java/club/joylink/rtss/dao/DraftIbpDAO.java new file mode 100644 index 000000000..7f4a1d2ba --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/DraftIbpDAO.java @@ -0,0 +1,41 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.DraftIbp; +import club.joylink.rtss.entity.DraftIbpExample; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Mapper +@Repository +public interface DraftIbpDAO { + long countByExample(DraftIbpExample example); + + int deleteByExample(DraftIbpExample example); + + int deleteByPrimaryKey(Long id); + + int insert(DraftIbp record); + + int insertSelective(DraftIbp record); + + List selectByExampleWithBLOBs(DraftIbpExample example); + + List selectByExample(DraftIbpExample example); + + DraftIbp selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") DraftIbp record, @Param("example") DraftIbpExample example); + + int updateByExampleWithBLOBs(@Param("record") DraftIbp record, @Param("example") DraftIbpExample example); + + int updateByExample(@Param("record") DraftIbp record, @Param("example") DraftIbpExample example); + + int updateByPrimaryKeySelective(DraftIbp record); + + int updateByPrimaryKeyWithBLOBs(DraftIbp record); + + int updateByPrimaryKey(DraftIbp record); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/DraftMap3dDataDAO.java b/src/main/java/club/joylink/rtss/dao/DraftMap3dDataDAO.java new file mode 100644 index 000000000..8105aa4f3 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/DraftMap3dDataDAO.java @@ -0,0 +1,40 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.DraftMap3dData; +import club.joylink.rtss.entity.DraftMap3dDataExample; +import club.joylink.rtss.entity.DraftMap3dDataWithBLOBs; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface DraftMap3dDataDAO { + long countByExample(DraftMap3dDataExample example); + + int deleteByExample(DraftMap3dDataExample example); + + int deleteByPrimaryKey(Long id); + + int insert(DraftMap3dDataWithBLOBs record); + + int insertSelective(DraftMap3dDataWithBLOBs record); + + List selectByExampleWithBLOBs(DraftMap3dDataExample example); + + List selectByExample(DraftMap3dDataExample example); + + DraftMap3dDataWithBLOBs selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") DraftMap3dDataWithBLOBs record, @Param("example") DraftMap3dDataExample example); + + int updateByExampleWithBLOBs(@Param("record") DraftMap3dDataWithBLOBs record, @Param("example") DraftMap3dDataExample example); + + int updateByExample(@Param("record") DraftMap3dData record, @Param("example") DraftMap3dDataExample example); + + int updateByPrimaryKeySelective(DraftMap3dDataWithBLOBs record); + + int updateByPrimaryKeyWithBLOBs(DraftMap3dDataWithBLOBs record); + + int updateByPrimaryKey(DraftMap3dData record); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/DraftMapAutoReentryDAO.java b/src/main/java/club/joylink/rtss/dao/DraftMapAutoReentryDAO.java new file mode 100644 index 000000000..db669ae92 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/DraftMapAutoReentryDAO.java @@ -0,0 +1,39 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.DraftMapAutoReentry; +import club.joylink.rtss.entity.DraftMapAutoReentryExample; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface DraftMapAutoReentryDAO { + long countByExample(DraftMapAutoReentryExample example); + + int deleteByExample(DraftMapAutoReentryExample example); + + int deleteByPrimaryKey(Long id); + + int insert(DraftMapAutoReentry record); + + int insertSelective(DraftMapAutoReentry record); + + List selectByExampleWithBLOBs(DraftMapAutoReentryExample example); + + List selectByExample(DraftMapAutoReentryExample example); + + DraftMapAutoReentry selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") DraftMapAutoReentry record, @Param("example") DraftMapAutoReentryExample example); + + int updateByExampleWithBLOBs(@Param("record") DraftMapAutoReentry record, @Param("example") DraftMapAutoReentryExample example); + + int updateByExample(@Param("record") DraftMapAutoReentry record, @Param("example") DraftMapAutoReentryExample example); + + int updateByPrimaryKeySelective(DraftMapAutoReentry record); + + int updateByPrimaryKeyWithBLOBs(DraftMapAutoReentry record); + + int updateByPrimaryKey(DraftMapAutoReentry record); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/DraftMapAutoSignalDAO.java b/src/main/java/club/joylink/rtss/dao/DraftMapAutoSignalDAO.java new file mode 100644 index 000000000..b1ea66d1e --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/DraftMapAutoSignalDAO.java @@ -0,0 +1,21 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.DraftMapAutoSignal; +import club.joylink.rtss.entity.DraftMapAutoSignalExample; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * DraftMapAutoSignalDAO继承基类 + */ +@Repository +public interface DraftMapAutoSignalDAO extends MyBatisBaseDao { + + List selectByExampleWithBLOBs(DraftMapAutoSignalExample draftMapExample); + + void updateByExampleWithBLOBs(@Param("record") DraftMapAutoSignal record, @Param("example") DraftMapAutoSignalExample example); + + void updateByPrimaryKeyWithBLOBs(DraftMapAutoSignal record); +} diff --git a/src/main/java/club/joylink/rtss/dao/DraftMapDAO.java b/src/main/java/club/joylink/rtss/dao/DraftMapDAO.java new file mode 100644 index 000000000..740b69655 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/DraftMapDAO.java @@ -0,0 +1,40 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.DraftMap; +import club.joylink.rtss.entity.DraftMapExample; +import club.joylink.rtss.entity.DraftMapWithBLOBs; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface DraftMapDAO { + long countByExample(DraftMapExample example); + + int deleteByExample(DraftMapExample example); + + int deleteByPrimaryKey(Long id); + + int insert(DraftMapWithBLOBs record); + + int insertSelective(DraftMapWithBLOBs record); + + List selectByExampleWithBLOBs(DraftMapExample example); + + List selectByExample(DraftMapExample example); + + DraftMapWithBLOBs selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") DraftMapWithBLOBs record, @Param("example") DraftMapExample example); + + int updateByExampleWithBLOBs(@Param("record") DraftMapWithBLOBs record, @Param("example") DraftMapExample example); + + int updateByExample(@Param("record") DraftMap record, @Param("example") DraftMapExample example); + + int updateByPrimaryKeySelective(DraftMapWithBLOBs record); + + int updateByPrimaryKeyWithBLOBs(DraftMapWithBLOBs record); + + int updateByPrimaryKey(DraftMap record); +} diff --git a/src/main/java/club/joylink/rtss/dao/DraftMapOverlapDAO.java b/src/main/java/club/joylink/rtss/dao/DraftMapOverlapDAO.java new file mode 100644 index 000000000..0cfeb778b --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/DraftMapOverlapDAO.java @@ -0,0 +1,39 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.DraftMapOverlap; +import club.joylink.rtss.entity.DraftMapOverlapExample; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface DraftMapOverlapDAO { + long countByExample(DraftMapOverlapExample example); + + int deleteByExample(DraftMapOverlapExample example); + + int deleteByPrimaryKey(Long id); + + int insert(DraftMapOverlap record); + + int insertSelective(DraftMapOverlap record); + + List selectByExampleWithBLOBs(DraftMapOverlapExample example); + + List selectByExample(DraftMapOverlapExample example); + + DraftMapOverlap selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") DraftMapOverlap record, @Param("example") DraftMapOverlapExample example); + + int updateByExampleWithBLOBs(@Param("record") DraftMapOverlap record, @Param("example") DraftMapOverlapExample example); + + int updateByExample(@Param("record") DraftMapOverlap record, @Param("example") DraftMapOverlapExample example); + + int updateByPrimaryKeySelective(DraftMapOverlap record); + + int updateByPrimaryKeyWithBLOBs(DraftMapOverlap record); + + int updateByPrimaryKey(DraftMapOverlap record); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/DraftMapParkingTimeDAO.java b/src/main/java/club/joylink/rtss/dao/DraftMapParkingTimeDAO.java new file mode 100644 index 000000000..98f8f0bde --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/DraftMapParkingTimeDAO.java @@ -0,0 +1,41 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.DraftMapParkingTime; +import club.joylink.rtss.entity.DraftMapParkingTimeExample; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Mapper +@Repository +public interface DraftMapParkingTimeDAO { + long countByExample(DraftMapParkingTimeExample example); + + int deleteByExample(DraftMapParkingTimeExample example); + + int deleteByPrimaryKey(Long id); + + int insert(DraftMapParkingTime record); + + int insertSelective(DraftMapParkingTime record); + + List selectByExampleWithBLOBs(DraftMapParkingTimeExample example); + + List selectByExample(DraftMapParkingTimeExample example); + + DraftMapParkingTime selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") DraftMapParkingTime record, @Param("example") DraftMapParkingTimeExample example); + + int updateByExampleWithBLOBs(@Param("record") DraftMapParkingTime record, @Param("example") DraftMapParkingTimeExample example); + + int updateByExample(@Param("record") DraftMapParkingTime record, @Param("example") DraftMapParkingTimeExample example); + + int updateByPrimaryKeySelective(DraftMapParkingTime record); + + int updateByPrimaryKeyWithBLOBs(DraftMapParkingTime record); + + int updateByPrimaryKey(DraftMapParkingTime record); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/DraftMapRouteDAO.java b/src/main/java/club/joylink/rtss/dao/DraftMapRouteDAO.java new file mode 100644 index 000000000..16eec5aad --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/DraftMapRouteDAO.java @@ -0,0 +1,21 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.DraftMapRoute; +import club.joylink.rtss.entity.DraftMapRouteExample; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * DraftMapRouteDAO继承基类 + */ +@Repository +public interface DraftMapRouteDAO extends MyBatisBaseDao { + + List selectByExampleWithBLOBs(DraftMapRouteExample example); + + void updateByExampleWithBLOBs(@Param("record") DraftMapRoute record, @Param("example") DraftMapRouteExample example); + + void updateByPrimaryKeyWithBLOBs(DraftMapRoute record); +} diff --git a/src/main/java/club/joylink/rtss/dao/DraftMapRouteFlankProtectionDAO.java b/src/main/java/club/joylink/rtss/dao/DraftMapRouteFlankProtectionDAO.java new file mode 100644 index 000000000..099b06247 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/DraftMapRouteFlankProtectionDAO.java @@ -0,0 +1,41 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.DraftMapRouteFlankProtection; +import club.joylink.rtss.entity.DraftMapRouteFlankProtectionExample; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Mapper +@Repository +public interface DraftMapRouteFlankProtectionDAO { + long countByExample(DraftMapRouteFlankProtectionExample example); + + int deleteByExample(DraftMapRouteFlankProtectionExample example); + + int deleteByPrimaryKey(Long id); + + int insert(DraftMapRouteFlankProtection record); + + int insertSelective(DraftMapRouteFlankProtection record); + + List selectByExampleWithBLOBs(DraftMapRouteFlankProtectionExample example); + + List selectByExample(DraftMapRouteFlankProtectionExample example); + + DraftMapRouteFlankProtection selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") DraftMapRouteFlankProtection record, @Param("example") DraftMapRouteFlankProtectionExample example); + + int updateByExampleWithBLOBs(@Param("record") DraftMapRouteFlankProtection record, @Param("example") DraftMapRouteFlankProtectionExample example); + + int updateByExample(@Param("record") DraftMapRouteFlankProtection record, @Param("example") DraftMapRouteFlankProtectionExample example); + + int updateByPrimaryKeySelective(DraftMapRouteFlankProtection record); + + int updateByPrimaryKeyWithBLOBs(DraftMapRouteFlankProtection record); + + int updateByPrimaryKey(DraftMapRouteFlankProtection record); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/DraftMapRouteUnitDAO.java b/src/main/java/club/joylink/rtss/dao/DraftMapRouteUnitDAO.java new file mode 100644 index 000000000..d4a695c0d --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/DraftMapRouteUnitDAO.java @@ -0,0 +1,21 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.DraftMapRouteUnit; +import club.joylink.rtss.entity.DraftMapRouteUnitExample; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * DraftMapRouteUnitDAO继承基类 + */ +@Repository +public interface DraftMapRouteUnitDAO extends MyBatisBaseDao { + + List selectByExampleWithBLOBs(DraftMapRouteUnitExample example); + + void updateByExampleWithBLOBs(@Param("record") DraftMapRouteUnit record, @Param("example") DraftMapRouteUnitExample example); + + void updateByPrimaryKeyWithBLOBs(DraftMapRouteUnit record); +} diff --git a/src/main/java/club/joylink/rtss/dao/DraftMapRoutingDAO.java b/src/main/java/club/joylink/rtss/dao/DraftMapRoutingDAO.java new file mode 100644 index 000000000..5c87d4d90 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/DraftMapRoutingDAO.java @@ -0,0 +1,21 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.DraftMapRouting; +import club.joylink.rtss.entity.DraftMapRoutingExample; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * DraftMapRoutingDAO继承基类 + */ +@Repository +public interface DraftMapRoutingDAO extends MyBatisBaseDao { + + List selectByExampleWithBLOBs(DraftMapRoutingExample draftMapExample); + + void updateByExampleWithBLOBs(@Param("record") DraftMapRouting record, @Param("example") DraftMapRoutingExample example); + + void updateByPrimaryKeyWithBLOBs(DraftMapRouting record); +} diff --git a/src/main/java/club/joylink/rtss/dao/DraftMapRunLevelDAO.java b/src/main/java/club/joylink/rtss/dao/DraftMapRunLevelDAO.java new file mode 100644 index 000000000..e13b4d402 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/DraftMapRunLevelDAO.java @@ -0,0 +1,41 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.DraftMapRunLevel; +import club.joylink.rtss.entity.DraftMapRunLevelExample; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Mapper +@Repository +public interface DraftMapRunLevelDAO { + long countByExample(DraftMapRunLevelExample example); + + int deleteByExample(DraftMapRunLevelExample example); + + int deleteByPrimaryKey(Long id); + + int insert(DraftMapRunLevel record); + + int insertSelective(DraftMapRunLevel record); + + List selectByExampleWithBLOBs(DraftMapRunLevelExample example); + + List selectByExample(DraftMapRunLevelExample example); + + DraftMapRunLevel selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") DraftMapRunLevel record, @Param("example") DraftMapRunLevelExample example); + + int updateByExampleWithBLOBs(@Param("record") DraftMapRunLevel record, @Param("example") DraftMapRunLevelExample example); + + int updateByExample(@Param("record") DraftMapRunLevel record, @Param("example") DraftMapRunLevelExample example); + + int updateByPrimaryKeySelective(DraftMapRunLevel record); + + int updateByPrimaryKeyWithBLOBs(DraftMapRunLevel record); + + int updateByPrimaryKey(DraftMapRunLevel record); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/DraftMapRunPlanDAO.java b/src/main/java/club/joylink/rtss/dao/DraftMapRunPlanDAO.java new file mode 100644 index 000000000..4c1126bb5 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/DraftMapRunPlanDAO.java @@ -0,0 +1,12 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.DraftMapRunPlan; +import club.joylink.rtss.entity.DraftMapRunPlanExample; +import org.springframework.stereotype.Repository; + +/** + * DraftMapRunPlanDAO继承基类 + */ +@Repository +public interface DraftMapRunPlanDAO extends MyBatisBaseDao { +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/DraftMapSignalApproachSectionDAO.java b/src/main/java/club/joylink/rtss/dao/DraftMapSignalApproachSectionDAO.java new file mode 100644 index 000000000..7db2f9da4 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/DraftMapSignalApproachSectionDAO.java @@ -0,0 +1,39 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.DraftMapSignalApproachSection; +import club.joylink.rtss.entity.DraftMapSignalApproachSectionExample; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface DraftMapSignalApproachSectionDAO { + long countByExample(DraftMapSignalApproachSectionExample example); + + int deleteByExample(DraftMapSignalApproachSectionExample example); + + int deleteByPrimaryKey(Long id); + + int insert(DraftMapSignalApproachSection record); + + int insertSelective(DraftMapSignalApproachSection record); + + List selectByExampleWithBLOBs(DraftMapSignalApproachSectionExample example); + + List selectByExample(DraftMapSignalApproachSectionExample example); + + DraftMapSignalApproachSection selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") DraftMapSignalApproachSection record, @Param("example") DraftMapSignalApproachSectionExample example); + + int updateByExampleWithBLOBs(@Param("record") DraftMapSignalApproachSection record, @Param("example") DraftMapSignalApproachSectionExample example); + + int updateByExample(@Param("record") DraftMapSignalApproachSection record, @Param("example") DraftMapSignalApproachSectionExample example); + + int updateByPrimaryKeySelective(DraftMapSignalApproachSection record); + + int updateByPrimaryKeyWithBLOBs(DraftMapSignalApproachSection record); + + int updateByPrimaryKey(DraftMapSignalApproachSection record); +} diff --git a/src/main/java/club/joylink/rtss/dao/DraftMapSwitchCoupledDAO.java b/src/main/java/club/joylink/rtss/dao/DraftMapSwitchCoupledDAO.java new file mode 100644 index 000000000..619a5bfd5 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/DraftMapSwitchCoupledDAO.java @@ -0,0 +1,12 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.DraftMapSwitchCoupled; +import club.joylink.rtss.entity.DraftMapSwitchCoupledExample; +import org.springframework.stereotype.Repository; + +/** + * DraftMapSwitchCoupledDAO继承基类 + */ +@Repository +public interface DraftMapSwitchCoupledDAO extends MyBatisBaseDao { +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/ExamDefinitionDAO.java b/src/main/java/club/joylink/rtss/dao/ExamDefinitionDAO.java new file mode 100644 index 000000000..fb4008a80 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/ExamDefinitionDAO.java @@ -0,0 +1,43 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.ExamDefinition; +import club.joylink.rtss.entity.ExamDefinitionExample; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * ExamDefinitionDAO继承基类 + */ +@Repository +public interface ExamDefinitionDAO extends MyBatisBaseDao { + @Select(value = "") + List selectByRulesNumAndFullPoint(@Param("rulesNum") int rulesNum, @Param("fullPoint") int fullPoint, @Param("lessonId") Long lessonId); + + @Insert(value = "") + int batchInsertWithId(@Param("list") List definitionList); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/ExamDefinitionRulesDAO.java b/src/main/java/club/joylink/rtss/dao/ExamDefinitionRulesDAO.java new file mode 100644 index 000000000..418afe14f --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/ExamDefinitionRulesDAO.java @@ -0,0 +1,27 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.ExamDefinitionRules; +import club.joylink.rtss.entity.ExamDefinitionRulesExample; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * ExamDefinitionRulesDAO继承基类 + */ +@Repository +public interface ExamDefinitionRulesDAO extends MyBatisBaseDao { + + @Insert(value = "") + int batchInsertWithId(@Param("list") List rulesList); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/FaultRuleDAO.java b/src/main/java/club/joylink/rtss/dao/FaultRuleDAO.java new file mode 100644 index 000000000..2d077d7b2 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/FaultRuleDAO.java @@ -0,0 +1,39 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.FaultRule; +import club.joylink.rtss.entity.FaultRuleExample; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface FaultRuleDAO { + long countByExample(FaultRuleExample example); + + int deleteByExample(FaultRuleExample example); + + int deleteByPrimaryKey(Long id); + + int insert(FaultRule record); + + int insertSelective(FaultRule record); + + List selectByExampleWithBLOBs(FaultRuleExample example); + + List selectByExample(FaultRuleExample example); + + FaultRule selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") FaultRule record, @Param("example") FaultRuleExample example); + + int updateByExampleWithBLOBs(@Param("record") FaultRule record, @Param("example") FaultRuleExample example); + + int updateByExample(@Param("record") FaultRule record, @Param("example") FaultRuleExample example); + + int updateByPrimaryKeySelective(FaultRule record); + + int updateByPrimaryKeyWithBLOBs(FaultRule record); + + int updateByPrimaryKey(FaultRule record); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/IbpDAO.java b/src/main/java/club/joylink/rtss/dao/IbpDAO.java new file mode 100644 index 000000000..1c4630851 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/IbpDAO.java @@ -0,0 +1,54 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.Ibp; +import club.joylink.rtss.entity.IbpExample; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Mapper +@Repository +public interface IbpDAO { + long countByExample(IbpExample example); + + int deleteByExample(IbpExample example); + + int deleteByPrimaryKey(Long id); + + int insert(Ibp record); + + int insertSelective(Ibp record); + + List selectByExampleWithBLOBs(IbpExample example); + + List selectByExample(IbpExample example); + + Ibp selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") Ibp record, @Param("example") IbpExample example); + + int updateByExampleWithBLOBs(@Param("record") Ibp record, @Param("example") IbpExample example); + + int updateByExample(@Param("record") Ibp record, @Param("example") IbpExample example); + + int updateByPrimaryKeySelective(Ibp record); + + int updateByPrimaryKeyWithBLOBs(Ibp record); + + int updateByPrimaryKey(Ibp record); + + @Insert(value = "") + int batchInsertWithId(@Param("list") List ibpList); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/IscsDAO.java b/src/main/java/club/joylink/rtss/dao/IscsDAO.java new file mode 100644 index 000000000..d85878ac8 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/IscsDAO.java @@ -0,0 +1,39 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.Iscs; +import club.joylink.rtss.entity.IscsExample; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface IscsDAO { + long countByExample(IscsExample example); + + int deleteByExample(IscsExample example); + + int deleteByPrimaryKey(Integer id); + + int insert(Iscs record); + + int insertSelective(Iscs record); + + List selectByExampleWithBLOBs(IscsExample example); + + List selectByExample(IscsExample example); + + Iscs selectByPrimaryKey(Integer id); + + int updateByExampleSelective(@Param("record") Iscs record, @Param("example") IscsExample example); + + int updateByExampleWithBLOBs(@Param("record") Iscs record, @Param("example") IscsExample example); + + int updateByExample(@Param("record") Iscs record, @Param("example") IscsExample example); + + int updateByPrimaryKeySelective(Iscs record); + + int updateByPrimaryKeyWithBLOBs(Iscs record); + + int updateByPrimaryKey(Iscs record); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/LearnCommentDAO.java b/src/main/java/club/joylink/rtss/dao/LearnCommentDAO.java new file mode 100644 index 000000000..d0c9fde71 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/LearnCommentDAO.java @@ -0,0 +1,12 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.LearnComment; +import club.joylink.rtss.entity.LearnCommentExample; +import org.springframework.stereotype.Repository; + +/** + * LearnCommentDAO继承基类 + */ +@Repository +public interface LearnCommentDAO extends MyBatisBaseDao { +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/LearnMessageDAO.java b/src/main/java/club/joylink/rtss/dao/LearnMessageDAO.java new file mode 100644 index 000000000..4621698f0 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/LearnMessageDAO.java @@ -0,0 +1,76 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.LearnMessage; +import club.joylink.rtss.entity.LearnMessageExample; +import club.joylink.rtss.entity.LearnMessageWithBLOBs; +import club.joylink.rtss.vo.client.post.LearnMessagePagedQueryVO; +import club.joylink.rtss.vo.client.post.LearnMessageVO; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface LearnMessageDAO { + long countByExample(LearnMessageExample example); + + int deleteByExample(LearnMessageExample example); + + int deleteByPrimaryKey(Long id); + + int insert(LearnMessageWithBLOBs record); + + int insertSelective(LearnMessageWithBLOBs record); + + List selectByExampleWithBLOBs(LearnMessageExample example); + + List selectByExample(LearnMessageExample example); + + LearnMessageWithBLOBs selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") LearnMessageWithBLOBs record, @Param("example") LearnMessageExample example); + + int updateByExampleWithBLOBs(@Param("record") LearnMessageWithBLOBs record, @Param("example") LearnMessageExample example); + + int updateByExample(@Param("record") LearnMessage record, @Param("example") LearnMessageExample example); + + int updateByPrimaryKeySelective(LearnMessageWithBLOBs record); + + int updateByPrimaryKeyWithBLOBs(LearnMessageWithBLOBs record); + + int updateByPrimaryKey(LearnMessage record); + + @Select("") + List select(Long postId, LearnMessagePagedQueryVO queryVO); +} diff --git a/src/main/java/club/joylink/rtss/dao/LearnPostDAO.java b/src/main/java/club/joylink/rtss/dao/LearnPostDAO.java new file mode 100644 index 000000000..09c482a8b --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/LearnPostDAO.java @@ -0,0 +1,12 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.LearnPost; +import club.joylink.rtss.entity.LearnPostExample; +import org.springframework.stereotype.Repository; + +/** + * LearnPostDAO继承基类 + */ +@Repository +public interface LearnPostDAO extends MyBatisBaseDao { +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/LicenseDAO.java b/src/main/java/club/joylink/rtss/dao/LicenseDAO.java new file mode 100644 index 000000000..e37f05bb1 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/LicenseDAO.java @@ -0,0 +1,14 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.License; +import club.joylink.rtss.entity.LicenseExample; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** + * LicenseDAO继承基类 + */ +@Mapper +@Repository +public interface LicenseDAO extends MyBatisBaseDao { +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/LsDraftLessonChapterDAO.java b/src/main/java/club/joylink/rtss/dao/LsDraftLessonChapterDAO.java new file mode 100644 index 000000000..997cd42d4 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/LsDraftLessonChapterDAO.java @@ -0,0 +1,19 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.LsDraftLessonChapter; +import club.joylink.rtss.entity.LsDraftLessonChapterExample; +import club.joylink.rtss.vo.client.LessonChapterVO; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * LsDraftLessonChapterDAO继承基类 + */ +@Repository +public interface LsDraftLessonChapterDAO extends MyBatisBaseDao { + + List selectChapterTrainingByLessonId(@Param("lessonId") Long lessonId); + +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/LsDraftLessonDAO.java b/src/main/java/club/joylink/rtss/dao/LsDraftLessonDAO.java new file mode 100644 index 000000000..5e7663e1a --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/LsDraftLessonDAO.java @@ -0,0 +1,21 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.LsDraftLesson; +import club.joylink.rtss.entity.LsDraftLessonExample; +import org.apache.ibatis.annotations.Update; +import org.springframework.stereotype.Repository; + +/** + * LsDraftLessonDAO继承基类 + */ +@Repository +public interface LsDraftLessonDAO extends MyBatisBaseDao { + + @Update("UPDATE " + + "ls_draft_lesson " + + "SET " + + "prd_type=#{prdType} " + + "WHERE " + + "prd_id=#{prdId}") + void fillPrdType(Long prdId, String prdType); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/LsDraftRelChapterTrainingDAO.java b/src/main/java/club/joylink/rtss/dao/LsDraftRelChapterTrainingDAO.java new file mode 100644 index 000000000..4a92b9d9b --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/LsDraftRelChapterTrainingDAO.java @@ -0,0 +1,12 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.LsDraftRelChapterTraining; +import club.joylink.rtss.entity.LsDraftRelChapterTrainingExample; +import org.springframework.stereotype.Repository; + +/** + * LsDraftRelChapterTrainingDAO继承基类 + */ +@Repository +public interface LsDraftRelChapterTrainingDAO extends MyBatisBaseDao { +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/LsLessonChapterDAO.java b/src/main/java/club/joylink/rtss/dao/LsLessonChapterDAO.java new file mode 100644 index 000000000..55cf6f6d5 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/LsLessonChapterDAO.java @@ -0,0 +1,45 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.LsLessonChapter; +import club.joylink.rtss.entity.LsLessonChapterExample; +import club.joylink.rtss.vo.client.training.TrainingVO; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * LsLessonChapterDAO继承基类 + */ +@Repository +public interface LsLessonChapterDAO extends MyBatisBaseDao { + @Select("SELECT " + + "t.id AS id, " + + "t.name AS name, " + + "t.remarks AS remarks, " + + "t.skin_code AS skinCode, " + + "t.prd_type AS prdType, " + + "t.type AS type, " + + "t.locate_device_code AS locateDeviceCode, " + + "rel.trial AS trial, " + + "rel.order_num AS orderNum " + + "FROM training t " + + "INNER JOIN ls_rel_chapter_training rel " + + "ON t.id = rel.training_id " + + "WHERE rel.chapter_id = #{ chapterId }") + @SuppressWarnings("unused") + List selectChapterTrainingByChapterId(Long chapterId); + + @Insert(value = "") + int batchInsertWithId(@Param("list") List chapterList); +} diff --git a/src/main/java/club/joylink/rtss/dao/LsLessonDAO.java b/src/main/java/club/joylink/rtss/dao/LsLessonDAO.java new file mode 100644 index 000000000..86ea51fb3 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/LsLessonDAO.java @@ -0,0 +1,39 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.LsLesson; +import club.joylink.rtss.entity.LsLessonExample; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Update; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * LsLessonDAO继承基类 + */ +@Repository +public interface LsLessonDAO extends MyBatisBaseDao { + + @Update("UPDATE " + + "ls_lesson " + + "SET " + + "prd_type=#{prdType} " + + "WHERE " + + "prd_id=#{prdId}") + void fillPrdType(Long prdId, String prdType); + + @Insert(value = "") + int batchInsertWithId(@Param("list") List lessonList); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/LsLessonVersionDAO.java b/src/main/java/club/joylink/rtss/dao/LsLessonVersionDAO.java new file mode 100644 index 000000000..8c4a5fcf5 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/LsLessonVersionDAO.java @@ -0,0 +1,27 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.LsLessonVersion; +import club.joylink.rtss.entity.LsLessonVersionExample; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * LsLessonVersionDAO继承基类 + */ +@Repository +public interface LsLessonVersionDAO extends MyBatisBaseDao { + + @Insert(value = "") + int batchInsertWithId(@Param("list") List versionList); +} diff --git a/src/main/java/club/joylink/rtss/dao/LsRelChapterTrainingDAO.java b/src/main/java/club/joylink/rtss/dao/LsRelChapterTrainingDAO.java new file mode 100644 index 000000000..c615acb79 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/LsRelChapterTrainingDAO.java @@ -0,0 +1,27 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.LsRelChapterTraining; +import club.joylink.rtss.entity.LsRelChapterTrainingExample; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * LsRelChapterTrainingDAO继承基类 + */ +@Repository +public interface LsRelChapterTrainingDAO extends MyBatisBaseDao { + + @Insert(value = "") + int batchInsertWithId(@Param("list") List relChapterTrainingList); +} diff --git a/src/main/java/club/joylink/rtss/dao/Map3dDataDAO.java b/src/main/java/club/joylink/rtss/dao/Map3dDataDAO.java new file mode 100644 index 000000000..ab442d172 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/Map3dDataDAO.java @@ -0,0 +1,58 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.Map3dData; +import club.joylink.rtss.entity.Map3dDataExample; +import club.joylink.rtss.entity.Map3dDataWithBLOBs; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Mapper +@Repository +public interface Map3dDataDAO { + long countByExample(Map3dDataExample example); + + int deleteByExample(Map3dDataExample example); + + int deleteByPrimaryKey(Long id); + + int insert(Map3dDataWithBLOBs record); + + int insertSelective(Map3dDataWithBLOBs record); + + List selectByExampleWithBLOBs(Map3dDataExample example); + + List selectByExample(Map3dDataExample example); + + Map3dDataWithBLOBs selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") Map3dDataWithBLOBs record, @Param("example") Map3dDataExample example); + + int updateByExampleWithBLOBs(@Param("record") Map3dDataWithBLOBs record, @Param("example") Map3dDataExample example); + + int updateByExample(@Param("record") Map3dData record, @Param("example") Map3dDataExample example); + + int updateByPrimaryKeySelective(Map3dDataWithBLOBs record); + + int updateByPrimaryKeyWithBLOBs(Map3dDataWithBLOBs record); + + int updateByPrimaryKey(Map3dData record); + + @Insert(value = "") + int batchInsertWithId(@Param("list") List map3dDataWithBLOBsList); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/Map3dModelDAO.java b/src/main/java/club/joylink/rtss/dao/Map3dModelDAO.java new file mode 100644 index 000000000..3c127c5e6 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/Map3dModelDAO.java @@ -0,0 +1,12 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.Map3dModel; +import club.joylink.rtss.entity.Map3dModelExample; +import org.springframework.stereotype.Repository; + +/** + * Map3dModelDAO继承基类 + */ +@Repository +public interface Map3dModelDAO extends MyBatisBaseDao { +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/MapDataDAO.java b/src/main/java/club/joylink/rtss/dao/MapDataDAO.java new file mode 100644 index 000000000..2412bd89e --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/MapDataDAO.java @@ -0,0 +1,51 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.MapData; +import club.joylink.rtss.entity.MapDataExample; +import club.joylink.rtss.entity.MapDataWithBLOBs; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface MapDataDAO extends MyBatisBaseDao { + long countByExample(MapDataExample example); + + int deleteByExample(MapDataExample example); + + int deleteByPrimaryKey(Long id); + + int insert(MapDataWithBLOBs record); + + int insertSelective(MapDataWithBLOBs record); + + List selectByExampleWithBLOBs(MapDataExample example); + + List selectByExample(MapDataExample example); + + MapDataWithBLOBs selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") MapDataWithBLOBs record, @Param("example") MapDataExample example); + + int updateByExampleWithBLOBs(@Param("record") MapDataWithBLOBs record, @Param("example") MapDataExample example); + + int updateByExample(@Param("record") MapData record, @Param("example") MapDataExample example); + + int updateByPrimaryKeySelective(MapDataWithBLOBs record); + + int updateByPrimaryKeyWithBLOBs(MapDataWithBLOBs record); + + int updateByPrimaryKey(MapData record); + + @Insert(value = "") + int batchInsertWithId(@Param("list") List mapDataList); +} diff --git a/src/main/java/club/joylink/rtss/dao/MapInfoDAO.java b/src/main/java/club/joylink/rtss/dao/MapInfoDAO.java new file mode 100644 index 000000000..fa550f669 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/MapInfoDAO.java @@ -0,0 +1,29 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.MapInfo; +import club.joylink.rtss.entity.MapInfoExample; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * MapInfoDAO继承基类 + */ +@Repository +public interface MapInfoDAO extends MyBatisBaseDao { + + @Insert(value = "") + int batchInsertWithId(@Param("list") List mapInfoList); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/MapPassengerFlowDAO.java b/src/main/java/club/joylink/rtss/dao/MapPassengerFlowDAO.java new file mode 100644 index 000000000..3a445d540 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/MapPassengerFlowDAO.java @@ -0,0 +1,42 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.MapPassengerFlow; +import club.joylink.rtss.entity.MapPassengerFlowExample; +import club.joylink.rtss.entity.MapPassengerFlowWithBLOBs; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Mapper +@Repository +public interface MapPassengerFlowDAO { + long countByExample(MapPassengerFlowExample example); + + int deleteByExample(MapPassengerFlowExample example); + + int deleteByPrimaryKey(Long id); + + int insert(MapPassengerFlowWithBLOBs record); + + int insertSelective(MapPassengerFlowWithBLOBs record); + + List selectByExampleWithBLOBs(MapPassengerFlowExample example); + + List selectByExample(MapPassengerFlowExample example); + + MapPassengerFlowWithBLOBs selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") MapPassengerFlowWithBLOBs record, @Param("example") MapPassengerFlowExample example); + + int updateByExampleWithBLOBs(@Param("record") MapPassengerFlowWithBLOBs record, @Param("example") MapPassengerFlowExample example); + + int updateByExample(@Param("record") MapPassengerFlow record, @Param("example") MapPassengerFlowExample example); + + int updateByPrimaryKeySelective(MapPassengerFlowWithBLOBs record); + + int updateByPrimaryKeyWithBLOBs(MapPassengerFlowWithBLOBs record); + + int updateByPrimaryKey(MapPassengerFlow record); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/MapSystemDAO.java b/src/main/java/club/joylink/rtss/dao/MapSystemDAO.java new file mode 100644 index 000000000..2727cc169 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/MapSystemDAO.java @@ -0,0 +1,45 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.MapSystem; +import club.joylink.rtss.entity.MapSystemExample; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Update; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * MapSystemDAO继承基类 + */ +@Repository +public interface MapSystemDAO extends MyBatisBaseDao { + + @Update("UPDATE " + + "map_system " + + "SET " + + "prd_type=#{prdType} " + + "WHERE " + + "prd_id=#{prdId}") + void fillPrdType(Long prdId, String prdType); + + @Update("UPDATE " + + "map_system " + + "SET " + + "status=#{status} " + + "WHERE " + + "prd_id=#{prdId}") + void fillStatus(Long prdId, String status); + + @Insert(value = "") + int batchInsertWithId(@Param("list") List mapSystemList); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/MapVersionDAO.java b/src/main/java/club/joylink/rtss/dao/MapVersionDAO.java new file mode 100644 index 000000000..038371190 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/MapVersionDAO.java @@ -0,0 +1,26 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.MapVersion; +import club.joylink.rtss.entity.MapVersionExample; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * MapVersionDAO继承基类 + */ +@Repository +public interface MapVersionDAO extends MyBatisBaseDao { + + @Insert(value = "") + int batchInsertWithId(@Param("list") List mapVersionList); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/MpMapPrdDAO.java b/src/main/java/club/joylink/rtss/dao/MpMapPrdDAO.java new file mode 100644 index 000000000..bbf69d804 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/MpMapPrdDAO.java @@ -0,0 +1,12 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.MpMapPrd; +import club.joylink.rtss.entity.MpMapPrdExample; +import org.springframework.stereotype.Repository; + +/** + * MpMapPrdDAO继承基类 + */ +@Repository +public interface MpMapPrdDAO extends MyBatisBaseDao { +} diff --git a/src/main/java/club/joylink/rtss/dao/MpStationRunningDAO.java b/src/main/java/club/joylink/rtss/dao/MpStationRunningDAO.java new file mode 100644 index 000000000..eee18f510 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/MpStationRunningDAO.java @@ -0,0 +1,12 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.MpStationRunning; +import club.joylink.rtss.entity.MpStationRunningExample; +import org.springframework.stereotype.Repository; + +/** + * MpStationRunningDAO继承基类 + */ +@Repository +public interface MpStationRunningDAO extends MyBatisBaseDao { +} diff --git a/src/main/java/club/joylink/rtss/dao/MyBatisBaseDao.java b/src/main/java/club/joylink/rtss/dao/MyBatisBaseDao.java new file mode 100644 index 000000000..99e41faf1 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/MyBatisBaseDao.java @@ -0,0 +1,36 @@ +package club.joylink.rtss.dao; + +import org.apache.ibatis.annotations.Param; + +import java.io.Serializable; +import java.util.List; + +/** + * DAO公共基类,由MybatisGenerator自动生成请勿修改 + * @param The Model Class 这里是泛型不是Model类 + * @param The Primary Key Class 如果是无主键,则可以用Model来跳过,如果是多主键则是Key类 + * @param The Example Class + */ +public interface MyBatisBaseDao { + long countByExample(E example); + + int deleteByExample(E example); + + int deleteByPrimaryKey(PK id); + + int insert(Model record); + + int insertSelective(Model record); + + List selectByExample(E example); + + Model selectByPrimaryKey(PK id); + + int updateByExampleSelective(@Param("record") Model record, @Param("example") E example); + + int updateByExample(@Param("record") Model record, @Param("example") E example); + + int updateByPrimaryKeySelective(Model record); + + int updateByPrimaryKey(Model record); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/OperateDefinitionDAO.java b/src/main/java/club/joylink/rtss/dao/OperateDefinitionDAO.java new file mode 100644 index 000000000..2e4e70930 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/OperateDefinitionDAO.java @@ -0,0 +1,41 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.OperateDefinition; +import club.joylink.rtss.entity.OperateDefinitionExample; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Mapper +@Repository +public interface OperateDefinitionDAO { + long countByExample(OperateDefinitionExample example); + + int deleteByExample(OperateDefinitionExample example); + + int deleteByPrimaryKey(Long id); + + int insert(OperateDefinition record); + + int insertSelective(OperateDefinition record); + + List selectByExampleWithBLOBs(OperateDefinitionExample example); + + List selectByExample(OperateDefinitionExample example); + + OperateDefinition selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") OperateDefinition record, @Param("example") OperateDefinitionExample example); + + int updateByExampleWithBLOBs(@Param("record") OperateDefinition record, @Param("example") OperateDefinitionExample example); + + int updateByExample(@Param("record") OperateDefinition record, @Param("example") OperateDefinitionExample example); + + int updateByPrimaryKeySelective(OperateDefinition record); + + int updateByPrimaryKeyWithBLOBs(OperateDefinition record); + + int updateByPrimaryKey(OperateDefinition record); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/OperatePlaceholderDAO.java b/src/main/java/club/joylink/rtss/dao/OperatePlaceholderDAO.java new file mode 100644 index 000000000..768b1050c --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/OperatePlaceholderDAO.java @@ -0,0 +1,12 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.OperatePlaceholder; +import club.joylink.rtss.entity.OperatePlaceholderExample; +import org.springframework.stereotype.Repository; + +/** + * OperatePlaceholderDAO继承基类 + */ +@Repository +public interface OperatePlaceholderDAO extends MyBatisBaseDao { +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/OperateStepDAO.java b/src/main/java/club/joylink/rtss/dao/OperateStepDAO.java new file mode 100644 index 000000000..dae4aa457 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/OperateStepDAO.java @@ -0,0 +1,12 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.OperateStep; +import club.joylink.rtss.entity.OperateStepExample; +import org.springframework.stereotype.Repository; + +/** + * OperateStepDAO继承基类 + */ +@Repository +public interface OperateStepDAO extends MyBatisBaseDao { +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/OrganizationDAO.java b/src/main/java/club/joylink/rtss/dao/OrganizationDAO.java new file mode 100644 index 000000000..0f42b88d3 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/OrganizationDAO.java @@ -0,0 +1,12 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.Organization; +import club.joylink.rtss.entity.OrganizationExample; +import org.springframework.stereotype.Repository; + +/** + * OrganizationDAO继承基类 + */ +@Repository +public interface OrganizationDAO extends MyBatisBaseDao { +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/PermissionDAO.java b/src/main/java/club/joylink/rtss/dao/PermissionDAO.java new file mode 100644 index 000000000..a1a4f4018 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/PermissionDAO.java @@ -0,0 +1,75 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.Permission; +import club.joylink.rtss.entity.PermissionExample; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.Options; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Update; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * PermissionDAO继承基类 + */ +@Repository +public interface PermissionDAO extends MyBatisBaseDao { + + @Update("UPDATE " + + "permission " + + "SET " + + "prd_type=#{prdType} " + + "WHERE " + + "prd_id=#{prdId}") + void fillPrdType(Long prdId, String prdType); + + @Insert("") + @Options(useGeneratedKeys = true, keyProperty = "id") + void batchInsert(List newPermissionList); + + @Insert(value = "") + int batchInsertWithId(@Param("list") List permissionList); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/PermissionDistributeDAO.java b/src/main/java/club/joylink/rtss/dao/PermissionDistributeDAO.java new file mode 100644 index 000000000..0e09f76fd --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/PermissionDistributeDAO.java @@ -0,0 +1,12 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.PermissionDistribute; +import club.joylink.rtss.entity.PermissionDistributeExample; +import org.springframework.stereotype.Repository; + +/** + * PermissionDistributeDAO继承基类 + */ +@Repository +public interface PermissionDistributeDAO extends MyBatisBaseDao { +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/PermissionDistributeRelDAO.java b/src/main/java/club/joylink/rtss/dao/PermissionDistributeRelDAO.java new file mode 100644 index 000000000..b6c4ea946 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/PermissionDistributeRelDAO.java @@ -0,0 +1,12 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.PermissionDistributeRel; +import club.joylink.rtss.entity.PermissionDistributeRelExample; +import org.springframework.stereotype.Repository; + +/** + * PermissionDistributeRelDAO继承基类 + */ +@Repository +public interface PermissionDistributeRelDAO extends MyBatisBaseDao { +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/PlanRoutingDAO.java b/src/main/java/club/joylink/rtss/dao/PlanRoutingDAO.java new file mode 100644 index 000000000..4e610190b --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/PlanRoutingDAO.java @@ -0,0 +1,41 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.PlanRouting; +import club.joylink.rtss.entity.PlanRoutingExample; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Mapper +@Repository +public interface PlanRoutingDAO { + long countByExample(PlanRoutingExample example); + + int deleteByExample(PlanRoutingExample example); + + int deleteByPrimaryKey(Long id); + + int insert(PlanRouting record); + + int insertSelective(PlanRouting record); + + List selectByExampleWithBLOBs(PlanRoutingExample example); + + List selectByExample(PlanRoutingExample example); + + PlanRouting selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") PlanRouting record, @Param("example") PlanRoutingExample example); + + int updateByExampleWithBLOBs(@Param("record") PlanRouting record, @Param("example") PlanRoutingExample example); + + int updateByExample(@Param("record") PlanRouting record, @Param("example") PlanRoutingExample example); + + int updateByPrimaryKeySelective(PlanRouting record); + + int updateByPrimaryKeyWithBLOBs(PlanRouting record); + + int updateByPrimaryKey(PlanRouting record); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/PlanStationRunLevelDAO.java b/src/main/java/club/joylink/rtss/dao/PlanStationRunLevelDAO.java new file mode 100644 index 000000000..56ee7a29f --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/PlanStationRunLevelDAO.java @@ -0,0 +1,41 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.PlanStationRunLevel; +import club.joylink.rtss.entity.PlanStationRunLevelExample; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Mapper +@Repository +public interface PlanStationRunLevelDAO { + long countByExample(PlanStationRunLevelExample example); + + int deleteByExample(PlanStationRunLevelExample example); + + int deleteByPrimaryKey(Long id); + + int insert(PlanStationRunLevel record); + + int insertSelective(PlanStationRunLevel record); + + List selectByExampleWithBLOBs(PlanStationRunLevelExample example); + + List selectByExample(PlanStationRunLevelExample example); + + PlanStationRunLevel selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") PlanStationRunLevel record, @Param("example") PlanStationRunLevelExample example); + + int updateByExampleWithBLOBs(@Param("record") PlanStationRunLevel record, @Param("example") PlanStationRunLevelExample example); + + int updateByExample(@Param("record") PlanStationRunLevel record, @Param("example") PlanStationRunLevelExample example); + + int updateByPrimaryKeySelective(PlanStationRunLevel record); + + int updateByPrimaryKeyWithBLOBs(PlanStationRunLevel record); + + int updateByPrimaryKey(PlanStationRunLevel record); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/PlanStationStopDAO.java b/src/main/java/club/joylink/rtss/dao/PlanStationStopDAO.java new file mode 100644 index 000000000..03ce68512 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/PlanStationStopDAO.java @@ -0,0 +1,41 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.PlanStationStop; +import club.joylink.rtss.entity.PlanStationStopExample; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Mapper +@Repository +public interface PlanStationStopDAO { + long countByExample(PlanStationStopExample example); + + int deleteByExample(PlanStationStopExample example); + + int deleteByPrimaryKey(Long id); + + int insert(PlanStationStop record); + + int insertSelective(PlanStationStop record); + + List selectByExampleWithBLOBs(PlanStationStopExample example); + + List selectByExample(PlanStationStopExample example); + + PlanStationStop selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") PlanStationStop record, @Param("example") PlanStationStopExample example); + + int updateByExampleWithBLOBs(@Param("record") PlanStationStop record, @Param("example") PlanStationStopExample example); + + int updateByExample(@Param("record") PlanStationStop record, @Param("example") PlanStationStopExample example); + + int updateByPrimaryKeySelective(PlanStationStop record); + + int updateByPrimaryKeyWithBLOBs(PlanStationStop record); + + int updateByPrimaryKey(PlanStationStop record); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/PlcConfigDAO.java b/src/main/java/club/joylink/rtss/dao/PlcConfigDAO.java new file mode 100644 index 000000000..c82049f2b --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/PlcConfigDAO.java @@ -0,0 +1,39 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.PlcConfig; +import club.joylink.rtss.entity.PlcConfigExample; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface PlcConfigDAO { + long countByExample(PlcConfigExample example); + + int deleteByExample(PlcConfigExample example); + + int deleteByPrimaryKey(Long id); + + int insert(PlcConfig record); + + int insertSelective(PlcConfig record); + + List selectByExampleWithBLOBs(PlcConfigExample example); + + List selectByExample(PlcConfigExample example); + + PlcConfig selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") PlcConfig record, @Param("example") PlcConfigExample example); + + int updateByExampleWithBLOBs(@Param("record") PlcConfig record, @Param("example") PlcConfigExample example); + + int updateByExample(@Param("record") PlcConfig record, @Param("example") PlcConfigExample example); + + int updateByPrimaryKeySelective(PlcConfig record); + + int updateByPrimaryKeyWithBLOBs(PlcConfig record); + + int updateByPrimaryKey(PlcConfig record); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/ProjectDeviceDAO.java b/src/main/java/club/joylink/rtss/dao/ProjectDeviceDAO.java new file mode 100644 index 000000000..585f6f932 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/ProjectDeviceDAO.java @@ -0,0 +1,52 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.ProjectDevice; +import club.joylink.rtss.entity.ProjectDeviceExample; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface ProjectDeviceDAO { + long countByExample(ProjectDeviceExample example); + + int deleteByExample(ProjectDeviceExample example); + + int deleteByPrimaryKey(Long id); + + int insert(ProjectDevice record); + + int insertSelective(ProjectDevice record); + + List selectByExampleWithBLOBs(ProjectDeviceExample example); + + List selectByExample(ProjectDeviceExample example); + + ProjectDevice selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") ProjectDevice record, @Param("example") ProjectDeviceExample example); + + int updateByExampleWithBLOBs(@Param("record") ProjectDevice record, @Param("example") ProjectDeviceExample example); + + int updateByExample(@Param("record") ProjectDevice record, @Param("example") ProjectDeviceExample example); + + int updateByPrimaryKeySelective(ProjectDevice record); + + int updateByPrimaryKeyWithBLOBs(ProjectDevice record); + + int updateByPrimaryKey(ProjectDevice record); + + @Insert(value = "") + void batchInsertWithId(@Param("list") List projectDeviceList); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/QuestDAO.java b/src/main/java/club/joylink/rtss/dao/QuestDAO.java new file mode 100644 index 000000000..9b05d1ce5 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/QuestDAO.java @@ -0,0 +1,18 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.Quest; +import club.joylink.rtss.entity.QuestExample; +import club.joylink.rtss.entity.QuestWithBLOBs; +import org.springframework.stereotype.Repository; + +/** + * QuestDAO继承基类 + */ +@Repository +public interface QuestDAO extends MyBatisBaseDao { + + QuestWithBLOBs selectByExampleWithBLOBs(QuestExample example); + + int updateByPrimaryKeyWithBLOBs(QuestWithBLOBs record); + +} diff --git a/src/main/java/club/joylink/rtss/dao/RaceDAO.java b/src/main/java/club/joylink/rtss/dao/RaceDAO.java new file mode 100644 index 000000000..600564874 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/RaceDAO.java @@ -0,0 +1,12 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.Race; +import club.joylink.rtss.entity.RaceExample; +import org.springframework.stereotype.Repository; + +/** + * RaceDAO继承基类 + */ +@Repository +public interface RaceDAO extends MyBatisBaseDao { +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/RaceQuestionDAO.java b/src/main/java/club/joylink/rtss/dao/RaceQuestionDAO.java new file mode 100644 index 000000000..28fdc3553 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/RaceQuestionDAO.java @@ -0,0 +1,20 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.RaceQuestion; +import club.joylink.rtss.entity.RaceQuestionExample; +import club.joylink.rtss.vo.client.competition.TheoryQuestionCountVO; +import club.joylink.rtss.vo.client.question.QuestionVO; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * RaceQuestionDAO继承基类 + */ +@Repository +public interface RaceQuestionDAO extends MyBatisBaseDao { + + List selectWithRef(@Param("topic") String topic, @Param("type") String type, @Param("projectCode") String projectCode, @Param("companyId") Integer companyId); + List countNumByType(@Param("projectCode") String projectCode, @Param("companyId") Integer companyId); +} diff --git a/src/main/java/club/joylink/rtss/dao/RaceQuestionMocksLikesDAO.java b/src/main/java/club/joylink/rtss/dao/RaceQuestionMocksLikesDAO.java new file mode 100644 index 000000000..4a89aca86 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/RaceQuestionMocksLikesDAO.java @@ -0,0 +1,51 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.RaceQuestionMocksLikes; +import club.joylink.rtss.entity.RaceQuestionMocksLikesExample; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface RaceQuestionMocksLikesDAO { + long countByExample(RaceQuestionMocksLikesExample example); + + int deleteByExample(RaceQuestionMocksLikesExample example); + + int deleteByPrimaryKey(Integer id); + + int insert(RaceQuestionMocksLikes record); + + int insertSelective(RaceQuestionMocksLikes record); + + List selectByExampleWithBLOBs(RaceQuestionMocksLikesExample example); + + List selectByExample(RaceQuestionMocksLikesExample example); + + RaceQuestionMocksLikes selectByPrimaryKey(Integer id); + + int updateByExampleSelective(@Param("record") RaceQuestionMocksLikes record, @Param("example") RaceQuestionMocksLikesExample example); + + int updateByExampleWithBLOBs(@Param("record") RaceQuestionMocksLikes record, @Param("example") RaceQuestionMocksLikesExample example); + + int updateByExample(@Param("record") RaceQuestionMocksLikes record, @Param("example") RaceQuestionMocksLikesExample example); + + int updateByPrimaryKeySelective(RaceQuestionMocksLikes record); + + int updateByPrimaryKeyWithBLOBs(RaceQuestionMocksLikes record); + + int updateByPrimaryKey(RaceQuestionMocksLikes record); + + @Insert("") + void batchInsertOrUpdate(@Param("list") List list); +} diff --git a/src/main/java/club/joylink/rtss/dao/RaceQuestionMocksStatsDAO.java b/src/main/java/club/joylink/rtss/dao/RaceQuestionMocksStatsDAO.java new file mode 100644 index 000000000..ea66eef8e --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/RaceQuestionMocksStatsDAO.java @@ -0,0 +1,31 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.RaceQuestionMocksStats; +import club.joylink.rtss.entity.RaceQuestionMocksStatsExample; +import club.joylink.rtss.vo.client.competition.UserQuestionStatsVO; +import org.apache.ibatis.annotations.Select; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * RaceQuestionMocksStatsDAO继承基类 + */ +@Repository +public interface RaceQuestionMocksStatsDAO extends MyBatisBaseDao { + + @Select("") + List queryHistoryScoresRanking(String projectCode); + +} diff --git a/src/main/java/club/joylink/rtss/dao/RaceQuestionOptionDAO.java b/src/main/java/club/joylink/rtss/dao/RaceQuestionOptionDAO.java new file mode 100644 index 000000000..1817db98f --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/RaceQuestionOptionDAO.java @@ -0,0 +1,29 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.RaceQuestionOption; +import club.joylink.rtss.entity.RaceQuestionOptionExample; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * RaceQuestionOptionDAO继承基类 + */ +@Repository +public interface RaceQuestionOptionDAO extends MyBatisBaseDao { + + @Insert("") + void batchInsertOrUpdate(@Param("list") List list); +} diff --git a/src/main/java/club/joylink/rtss/dao/RaceQuestionProgressDAO.java b/src/main/java/club/joylink/rtss/dao/RaceQuestionProgressDAO.java new file mode 100644 index 000000000..1b8a58fdc --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/RaceQuestionProgressDAO.java @@ -0,0 +1,29 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.RaceQuestionProgress; +import club.joylink.rtss.entity.RaceQuestionProgressExample; +import org.apache.ibatis.annotations.Insert; +import org.springframework.stereotype.Repository; + +/** + * RaceQuestionProgressDAO继承基类 + */ +@Repository +public interface RaceQuestionProgressDAO extends MyBatisBaseDao { + @Insert("") + void insertOrUpdateSelective(RaceQuestionProgress record); +} diff --git a/src/main/java/club/joylink/rtss/dao/RaceQuestionsRulesDAO.java b/src/main/java/club/joylink/rtss/dao/RaceQuestionsRulesDAO.java new file mode 100644 index 000000000..62a72fd2e --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/RaceQuestionsRulesDAO.java @@ -0,0 +1,12 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.RaceQuestionsRules; +import club.joylink.rtss.entity.RaceQuestionsRulesExample; +import org.springframework.stereotype.Repository; + +/** + * RaceQuestionsRulesDAO继承基类 + */ +@Repository +public interface RaceQuestionsRulesDAO extends MyBatisBaseDao { +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/RaceResultDAO.java b/src/main/java/club/joylink/rtss/dao/RaceResultDAO.java new file mode 100644 index 000000000..e4ec32f57 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/RaceResultDAO.java @@ -0,0 +1,38 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.RaceResult; +import club.joylink.rtss.entity.RaceResultExample; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.Options; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * RaceResultDAO继承基类 + */ +@Repository +public interface RaceResultDAO extends MyBatisBaseDao { + + + @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id") + @Insert(value = "") + int batchInsert(@Param("list") List list); +} diff --git a/src/main/java/club/joylink/rtss/dao/RaceTestPaperDAO.java b/src/main/java/club/joylink/rtss/dao/RaceTestPaperDAO.java new file mode 100644 index 000000000..764e17ecf --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/RaceTestPaperDAO.java @@ -0,0 +1,18 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.RaceTestPaper; +import club.joylink.rtss.entity.RaceTestPaperExample; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * RaceTestPaperDAO继承基类 + */ +@Repository +public interface RaceTestPaperDAO extends MyBatisBaseDao { + + void updateByPrimaryKeyWithBLOBs(RaceTestPaper raceTestPaper); + + List selectByExampleWithBLOBs(RaceTestPaperExample example); +} diff --git a/src/main/java/club/joylink/rtss/dao/RaceUserDAO.java b/src/main/java/club/joylink/rtss/dao/RaceUserDAO.java new file mode 100644 index 000000000..58c8f5f45 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/RaceUserDAO.java @@ -0,0 +1,12 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.RaceUser; +import club.joylink.rtss.entity.RaceUserExample; +import org.springframework.stereotype.Repository; + +/** + * RaceUserDAO继承基类 + */ +@Repository +public interface RaceUserDAO extends MyBatisBaseDao { +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/RealLineDAO.java b/src/main/java/club/joylink/rtss/dao/RealLineDAO.java new file mode 100644 index 000000000..d38061446 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/RealLineDAO.java @@ -0,0 +1,54 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.RealLine; +import club.joylink.rtss.entity.RealLineExample; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface RealLineDAO { + long countByExample(RealLineExample example); + + int deleteByExample(RealLineExample example); + + int deleteByPrimaryKey(Long id); + + int insert(RealLine record); + + int insertSelective(RealLine record); + + List selectByExampleWithBLOBs(RealLineExample example); + + List selectByExample(RealLineExample example); + + RealLine selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") RealLine record, @Param("example") RealLineExample example); + + int updateByExampleWithBLOBs(@Param("record") RealLine record, @Param("example") RealLineExample example); + + int updateByExample(@Param("record") RealLine record, @Param("example") RealLineExample example); + + int updateByPrimaryKeySelective(RealLine record); + + int updateByPrimaryKeyWithBLOBs(RealLine record); + + int updateByPrimaryKey(RealLine record); + + @Insert(value = "") + int batchInsertWithId(@Param("list") List realLineList); +} diff --git a/src/main/java/club/joylink/rtss/dao/RunPlanDailyDAO.java b/src/main/java/club/joylink/rtss/dao/RunPlanDailyDAO.java new file mode 100644 index 000000000..942973e5b --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/RunPlanDailyDAO.java @@ -0,0 +1,39 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.RunPlanDaily; +import club.joylink.rtss.entity.RunPlanDailyExample; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface RunPlanDailyDAO { + long countByExample(RunPlanDailyExample example); + + int deleteByExample(RunPlanDailyExample example); + + int deleteByPrimaryKey(Long id); + + int insert(RunPlanDaily record); + + int insertSelective(RunPlanDaily record); + + List selectByExampleWithBLOBs(RunPlanDailyExample example); + + List selectByExample(RunPlanDailyExample example); + + RunPlanDaily selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") RunPlanDaily record, @Param("example") RunPlanDailyExample example); + + int updateByExampleWithBLOBs(@Param("record") RunPlanDaily record, @Param("example") RunPlanDailyExample example); + + int updateByExample(@Param("record") RunPlanDaily record, @Param("example") RunPlanDailyExample example); + + int updateByPrimaryKeySelective(RunPlanDaily record); + + int updateByPrimaryKeyWithBLOBs(RunPlanDaily record); + + int updateByPrimaryKey(RunPlanDaily record); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/RunPlanDraftDAO.java b/src/main/java/club/joylink/rtss/dao/RunPlanDraftDAO.java new file mode 100644 index 000000000..bc6075e8a --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/RunPlanDraftDAO.java @@ -0,0 +1,39 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.RunPlanDraft; +import club.joylink.rtss.entity.RunPlanDraftExample; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface RunPlanDraftDAO extends MyBatisBaseDao { + long countByExample(RunPlanDraftExample example); + + int deleteByExample(RunPlanDraftExample example); + + int deleteByPrimaryKey(Long id); + + int insert(RunPlanDraft record); + + int insertSelective(RunPlanDraft record); + + List selectByExampleWithBLOBs(RunPlanDraftExample example); + + List selectByExample(RunPlanDraftExample example); + + RunPlanDraft selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") RunPlanDraft record, @Param("example") RunPlanDraftExample example); + + int updateByExampleWithBLOBs(@Param("record") RunPlanDraft record, @Param("example") RunPlanDraftExample example); + + int updateByExample(@Param("record") RunPlanDraft record, @Param("example") RunPlanDraftExample example); + + int updateByPrimaryKeySelective(RunPlanDraft record); + + int updateByPrimaryKeyWithBLOBs(RunPlanDraft record); + + int updateByPrimaryKey(RunPlanDraft record); +} diff --git a/src/main/java/club/joylink/rtss/dao/RunPlanLevelDAO.java b/src/main/java/club/joylink/rtss/dao/RunPlanLevelDAO.java new file mode 100644 index 000000000..17d952061 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/RunPlanLevelDAO.java @@ -0,0 +1,12 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.RunPlanLevel; +import club.joylink.rtss.entity.RunPlanLevelExample; +import org.springframework.stereotype.Repository; + +/** + * RunPlanLevelDAO继承基类 + */ +@Repository +public interface RunPlanLevelDAO extends MyBatisBaseDao { +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/RunPlanLoadDAO.java b/src/main/java/club/joylink/rtss/dao/RunPlanLoadDAO.java new file mode 100644 index 000000000..35bb48837 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/RunPlanLoadDAO.java @@ -0,0 +1,27 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.RunPlanLoad; +import club.joylink.rtss.entity.RunPlanLoadExample; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * RunPlanLoadDAO继承基类 + */ +@Repository +public interface RunPlanLoadDAO extends MyBatisBaseDao { + + @Insert(value = "") + int batchInsertWithId(@Param("list") List runPlanLoadList); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/RunPlanTemplateDAO.java b/src/main/java/club/joylink/rtss/dao/RunPlanTemplateDAO.java new file mode 100644 index 000000000..70a752692 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/RunPlanTemplateDAO.java @@ -0,0 +1,52 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.RunPlanTemplate; +import club.joylink.rtss.entity.RunPlanTemplateExample; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface RunPlanTemplateDAO extends MyBatisBaseDao { + long countByExample(RunPlanTemplateExample example); + + int deleteByExample(RunPlanTemplateExample example); + + int deleteByPrimaryKey(Long id); + + int insert(RunPlanTemplate record); + + int insertSelective(RunPlanTemplate record); + + List selectByExampleWithBLOBs(RunPlanTemplateExample example); + + List selectByExample(RunPlanTemplateExample example); + + RunPlanTemplate selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") RunPlanTemplate record, @Param("example") RunPlanTemplateExample example); + + int updateByExampleWithBLOBs(@Param("record") RunPlanTemplate record, @Param("example") RunPlanTemplateExample example); + + int updateByExample(@Param("record") RunPlanTemplate record, @Param("example") RunPlanTemplateExample example); + + int updateByPrimaryKeySelective(RunPlanTemplate record); + + int updateByPrimaryKeyWithBLOBs(RunPlanTemplate record); + + int updateByPrimaryKey(RunPlanTemplate record); + + @Insert(value = "") + int batchInsertWithId(@Param("list") List runPlanTemplateList); +} diff --git a/src/main/java/club/joylink/rtss/dao/RunPlanTemplateVersionDAO.java b/src/main/java/club/joylink/rtss/dao/RunPlanTemplateVersionDAO.java new file mode 100644 index 000000000..52e181e11 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/RunPlanTemplateVersionDAO.java @@ -0,0 +1,27 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.RunPlanTemplateVersion; +import club.joylink.rtss.entity.RunPlanTemplateVersionExample; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * RunPlanTemplateVersionDAO继承基类 + */ +@Repository +public interface RunPlanTemplateVersionDAO extends MyBatisBaseDao { + + @Insert(value = "") + int batchInsertWithId(@Param("list") List runPlanTemplateVersionList); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/RunPlanToolsConfigDAO.java b/src/main/java/club/joylink/rtss/dao/RunPlanToolsConfigDAO.java new file mode 100644 index 000000000..0c6378a1f --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/RunPlanToolsConfigDAO.java @@ -0,0 +1,14 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.RunPlanToolsConfig; +import club.joylink.rtss.entity.RunPlanToolsConfigExample; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** + * RunPlanToolsConfigDAO继承基类 + */ +@Mapper +@Repository +public interface RunPlanToolsConfigDAO extends MyBatisBaseDao { +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/RunPlanToolsDAO.java b/src/main/java/club/joylink/rtss/dao/RunPlanToolsDAO.java new file mode 100644 index 000000000..7d1de5dcc --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/RunPlanToolsDAO.java @@ -0,0 +1,23 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.RunPlanTools; +import club.joylink.rtss.entity.RunPlanToolsExample; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * RunPlanToolsDAO继承基类 + */ +@Mapper +@Repository +public interface RunPlanToolsDAO extends MyBatisBaseDao { + + List selectByExampleWithBLOBs(RunPlanToolsExample example); + + int updateByExampleWithBLOBs(@Param("record") RunPlanTools record, @Param("example") RunPlanToolsExample example); + + int updateByPrimaryKeyWithBLOBs(RunPlanTools record); +} diff --git a/src/main/java/club/joylink/rtss/dao/RunPlanToolsGroupDAO.java b/src/main/java/club/joylink/rtss/dao/RunPlanToolsGroupDAO.java new file mode 100644 index 000000000..88c15cf8b --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/RunPlanToolsGroupDAO.java @@ -0,0 +1,14 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.RunPlanToolsGroup; +import club.joylink.rtss.entity.RunPlanToolsGroupExample; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** + * RunPlanToolsGroupDAO继承基类 + */ +@Mapper +@Repository +public interface RunPlanToolsGroupDAO extends MyBatisBaseDao { +} diff --git a/src/main/java/club/joylink/rtss/dao/RunPlanToolsMapDAO.java b/src/main/java/club/joylink/rtss/dao/RunPlanToolsMapDAO.java new file mode 100644 index 000000000..861bc3511 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/RunPlanToolsMapDAO.java @@ -0,0 +1,14 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.RunPlanToolsMap; +import club.joylink.rtss.entity.RunPlanToolsMapExample; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** + * RunPlanToolsMapDAO继承基类 + */ +@Mapper +@Repository +public interface RunPlanToolsMapDAO extends MyBatisBaseDao { +} diff --git a/src/main/java/club/joylink/rtss/dao/RunPlanToolsStationDAO.java b/src/main/java/club/joylink/rtss/dao/RunPlanToolsStationDAO.java new file mode 100644 index 000000000..7130fb596 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/RunPlanToolsStationDAO.java @@ -0,0 +1,14 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.RunPlanToolsStation; +import club.joylink.rtss.entity.RunPlanToolsStationExample; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** + * RunPlanToolsStationDAO继承基类 + */ +@Mapper +@Repository +public interface RunPlanToolsStationDAO extends MyBatisBaseDao { +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/SaleGoodsDAO.java b/src/main/java/club/joylink/rtss/dao/SaleGoodsDAO.java new file mode 100644 index 000000000..ec7f111a9 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/SaleGoodsDAO.java @@ -0,0 +1,12 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.SaleGoods; +import club.joylink.rtss.entity.SaleGoodsExample; +import org.springframework.stereotype.Repository; + +/** + * SaleGoodsDAO继承基类 + */ +@Repository +public interface SaleGoodsDAO extends MyBatisBaseDao { +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/SaleOrderDAO.java b/src/main/java/club/joylink/rtss/dao/SaleOrderDAO.java new file mode 100644 index 000000000..3bc7761cd --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/SaleOrderDAO.java @@ -0,0 +1,12 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.SaleOrder; +import club.joylink.rtss.entity.SaleOrderExample; +import org.springframework.stereotype.Repository; + +/** + * SaleOrderDAO继承基类 + */ +@Repository +public interface SaleOrderDAO extends MyBatisBaseDao { +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/SaleOrderDetailDAO.java b/src/main/java/club/joylink/rtss/dao/SaleOrderDetailDAO.java new file mode 100644 index 000000000..99f2655b9 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/SaleOrderDetailDAO.java @@ -0,0 +1,12 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.SaleOrderDetail; +import club.joylink.rtss.entity.SaleOrderDetailExample; +import org.springframework.stereotype.Repository; + +/** + * SaleOrderDetailDAO继承基类 + */ +@Repository +public interface SaleOrderDetailDAO extends MyBatisBaseDao { +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/SaleOrderDetailMapper.java b/src/main/java/club/joylink/rtss/dao/SaleOrderDetailMapper.java new file mode 100644 index 000000000..c3e6c9b3b --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/SaleOrderDetailMapper.java @@ -0,0 +1,22 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.SaleOrderDetail; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface SaleOrderDetailMapper { + int deleteByPrimaryKey(Long id); + + int insert(SaleOrderDetail record); + + SaleOrderDetail selectByPrimaryKey(Long id); + + List selectAll(); + + int updateByPrimaryKey(SaleOrderDetail record); + + List selectByOrderId(long orderId); + int batchInsertOrderDetail(List list); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/SaleOrderSerialNumDAO.java b/src/main/java/club/joylink/rtss/dao/SaleOrderSerialNumDAO.java new file mode 100644 index 000000000..337570a3a --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/SaleOrderSerialNumDAO.java @@ -0,0 +1,12 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.SaleOrderSerialNum; +import club.joylink.rtss.entity.SaleOrderSerialNumExample; +import org.springframework.stereotype.Repository; + +/** + * SaleOrderSerialNumDAO继承基类 + */ +@Repository +public interface SaleOrderSerialNumDAO extends MyBatisBaseDao { +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/SchedulingPlanDAO.java b/src/main/java/club/joylink/rtss/dao/SchedulingPlanDAO.java new file mode 100644 index 000000000..a317ad41a --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/SchedulingPlanDAO.java @@ -0,0 +1,52 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.SchedulingPlan; +import club.joylink.rtss.entity.SchedulingPlanExample; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface SchedulingPlanDAO { + long countByExample(SchedulingPlanExample example); + + int deleteByExample(SchedulingPlanExample example); + + int deleteByPrimaryKey(Long id); + + int insert(SchedulingPlan record); + + int insertSelective(SchedulingPlan record); + + List selectByExampleWithBLOBs(SchedulingPlanExample example); + + List selectByExample(SchedulingPlanExample example); + + SchedulingPlan selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") SchedulingPlan record, @Param("example") SchedulingPlanExample example); + + int updateByExampleWithBLOBs(@Param("record") SchedulingPlan record, @Param("example") SchedulingPlanExample example); + + int updateByExample(@Param("record") SchedulingPlan record, @Param("example") SchedulingPlanExample example); + + int updateByPrimaryKeySelective(SchedulingPlan record); + + int updateByPrimaryKeyWithBLOBs(SchedulingPlan record); + + int updateByPrimaryKey(SchedulingPlan record); + + @Insert(value = "") + int batchInsertWithId(@Param("list") List schedulingPlanList); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/ScriptDAO.java b/src/main/java/club/joylink/rtss/dao/ScriptDAO.java new file mode 100644 index 000000000..5ea2da934 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/ScriptDAO.java @@ -0,0 +1,71 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.Script; +import club.joylink.rtss.entity.ScriptExample; +import club.joylink.rtss.entity.ScriptWithBLOBs; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface ScriptDAO { + long countByExample(ScriptExample example); + + int deleteByExample(ScriptExample example); + + int deleteByPrimaryKey(Long id); + + int insert(ScriptWithBLOBs record); + + int insertSelective(ScriptWithBLOBs record); + + List selectByExampleWithBLOBs(ScriptExample example); + + List") + int batchInsertWithId(@Param("list") List scriptWithBLOBsList); +} diff --git a/src/main/java/club/joylink/rtss/dao/ScriptDraftDAO.java b/src/main/java/club/joylink/rtss/dao/ScriptDraftDAO.java new file mode 100644 index 000000000..80d763f3c --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/ScriptDraftDAO.java @@ -0,0 +1,71 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.ScriptDraft; +import club.joylink.rtss.entity.ScriptDraftExample; +import club.joylink.rtss.entity.ScriptDraftWithBLOBs; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface ScriptDraftDAO { + long countByExample(ScriptDraftExample example); + + int deleteByExample(ScriptDraftExample example); + + int deleteByPrimaryKey(Long id); + + int insert(ScriptDraftWithBLOBs record); + + int insertSelective(ScriptDraftWithBLOBs record); + + List selectByExampleWithBLOBs(ScriptDraftExample example); + + List selectByExample(ScriptDraftExample example); + + ScriptDraftWithBLOBs selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") ScriptDraftWithBLOBs record, @Param("example") ScriptDraftExample example); + + int updateByExampleWithBLOBs(@Param("record") ScriptDraftWithBLOBs record, @Param("example") ScriptDraftExample example); + + int updateByExample(@Param("record") ScriptDraft record, @Param("example") ScriptDraftExample example); + + int updateByPrimaryKeySelective(ScriptDraftWithBLOBs record); + + int updateByPrimaryKeyWithBLOBs(ScriptDraftWithBLOBs record); + + int updateByPrimaryKey(ScriptDraft record); + + @Insert(value = "") + void batchInsert(List scriptDrafts); +} diff --git a/src/main/java/club/joylink/rtss/dao/SimulationConversationMapper.java b/src/main/java/club/joylink/rtss/dao/SimulationConversationMapper.java new file mode 100644 index 000000000..c1bab825a --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/SimulationConversationMapper.java @@ -0,0 +1,33 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.SimulationConversation; +import club.joylink.rtss.entity.SimulationConversationExample; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface SimulationConversationMapper { + long countByExample(SimulationConversationExample example); + + int deleteByExample(SimulationConversationExample example); + + int deleteByPrimaryKey(Long id); + + int insert(SimulationConversation record); + + int insertSelective(SimulationConversation record); + + List selectByExample(SimulationConversationExample example); + + SimulationConversation selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") SimulationConversation record, @Param("example") SimulationConversationExample example); + + int updateByExample(@Param("record") SimulationConversation record, @Param("example") SimulationConversationExample example); + + int updateByPrimaryKeySelective(SimulationConversation record); + + int updateByPrimaryKey(SimulationConversation record); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/SimulationConversationMemberMapper.java b/src/main/java/club/joylink/rtss/dao/SimulationConversationMemberMapper.java new file mode 100644 index 000000000..0e90cc53d --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/SimulationConversationMemberMapper.java @@ -0,0 +1,33 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.SimulationConversationMember; +import club.joylink.rtss.entity.SimulationConversationMemberExample; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface SimulationConversationMemberMapper { + long countByExample(SimulationConversationMemberExample example); + + int deleteByExample(SimulationConversationMemberExample example); + + int deleteByPrimaryKey(Long id); + + int insert(SimulationConversationMember record); + + int insertSelective(SimulationConversationMember record); + + List selectByExample(SimulationConversationMemberExample example); + + SimulationConversationMember selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") SimulationConversationMember record, @Param("example") SimulationConversationMemberExample example); + + int updateByExample(@Param("record") SimulationConversationMember record, @Param("example") SimulationConversationMemberExample example); + + int updateByPrimaryKeySelective(SimulationConversationMember record); + + int updateByPrimaryKey(SimulationConversationMember record); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/SimulationConversationMessageMapper.java b/src/main/java/club/joylink/rtss/dao/SimulationConversationMessageMapper.java new file mode 100644 index 000000000..abe484b01 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/SimulationConversationMessageMapper.java @@ -0,0 +1,33 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.SimulationConversationMessage; +import club.joylink.rtss.entity.SimulationConversationMessageExample; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface SimulationConversationMessageMapper { + long countByExample(SimulationConversationMessageExample example); + + int deleteByExample(SimulationConversationMessageExample example); + + int deleteByPrimaryKey(Long id); + + int insert(SimulationConversationMessage record); + + int insertSelective(SimulationConversationMessage record); + + List selectByExample(SimulationConversationMessageExample example); + + SimulationConversationMessage selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") SimulationConversationMessage record, @Param("example") SimulationConversationMessageExample example); + + int updateByExample(@Param("record") SimulationConversationMessage record, @Param("example") SimulationConversationMessageExample example); + + int updateByPrimaryKeySelective(SimulationConversationMessage record); + + int updateByPrimaryKey(SimulationConversationMessage record); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/SimulationFrameMapper.java b/src/main/java/club/joylink/rtss/dao/SimulationFrameMapper.java new file mode 100644 index 000000000..be8ebfcfb --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/SimulationFrameMapper.java @@ -0,0 +1,53 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.SimulationFrame; +import club.joylink.rtss.entity.SimulationFrameExample; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface SimulationFrameMapper { + long countByExample(SimulationFrameExample example); + + int deleteByExample(SimulationFrameExample example); + + int deleteByPrimaryKey(Long id); + + int insert(SimulationFrame record); + + int insertSelective(SimulationFrame record); + + List selectByExampleWithBLOBs(SimulationFrameExample example); + + List selectByExample(SimulationFrameExample example); + + SimulationFrame selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") SimulationFrame record, @Param("example") SimulationFrameExample example); + + int updateByExampleWithBLOBs(@Param("record") SimulationFrame record, @Param("example") SimulationFrameExample example); + + int updateByExample(@Param("record") SimulationFrame record, @Param("example") SimulationFrameExample example); + + int updateByPrimaryKeySelective(SimulationFrame record); + + int updateByPrimaryKeyWithBLOBs(SimulationFrame record); + + int updateByPrimaryKey(SimulationFrame record); + + @Insert("") + void batchInsert(List list); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/SimulationProcessRecordDAO.java b/src/main/java/club/joylink/rtss/dao/SimulationProcessRecordDAO.java new file mode 100644 index 000000000..59fa81188 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/SimulationProcessRecordDAO.java @@ -0,0 +1,15 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.SimulationProcessRecord; +import club.joylink.rtss.entity.SimulationProcessRecordExample; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * SimulationProcessRecordDAO继承基类 + */ +@Repository +public interface SimulationProcessRecordDAO extends MyBatisBaseDao { + List selectByExampleWithBLOBs(SimulationProcessRecordExample example); +} diff --git a/src/main/java/club/joylink/rtss/dao/SimulationRecordDAO.java b/src/main/java/club/joylink/rtss/dao/SimulationRecordDAO.java new file mode 100644 index 000000000..2ac23298f --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/SimulationRecordDAO.java @@ -0,0 +1,12 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.SimulationRecord; +import club.joylink.rtss.entity.SimulationRecordExample; +import org.springframework.stereotype.Repository; + +/** + * SimulationRecordDAO继承基类 + */ +@Repository +public interface SimulationRecordDAO extends MyBatisBaseDao { +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/SimulationRoomDAO.java b/src/main/java/club/joylink/rtss/dao/SimulationRoomDAO.java new file mode 100644 index 000000000..9b304be4f --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/SimulationRoomDAO.java @@ -0,0 +1,21 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.SimulationRoom; +import club.joylink.rtss.entity.SimulationRoomExample; +import org.apache.ibatis.annotations.Update; +import org.springframework.stereotype.Repository; + +/** + * SimulationRoomDAO继承基类 + */ +@Repository +public interface SimulationRoomDAO extends MyBatisBaseDao { + + @Update("UPDATE " + + "simulation_room " + + "SET " + + "prd_type=#{prdType} " + + "WHERE " + + "map_prd_id=#{prdId}") + void fillPrdType(Long prdId, String prdType); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/SimulationRoomDeviceDAO.java b/src/main/java/club/joylink/rtss/dao/SimulationRoomDeviceDAO.java new file mode 100644 index 000000000..c2617874d --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/SimulationRoomDeviceDAO.java @@ -0,0 +1,12 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.SimulationRoomDevice; +import club.joylink.rtss.entity.SimulationRoomDeviceExample; +import org.springframework.stereotype.Repository; + +/** + * SimulationRoomDeviceDAO继承基类 + */ +@Repository +public interface SimulationRoomDeviceDAO extends MyBatisBaseDao { +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/SimulationRoomMemberDAO.java b/src/main/java/club/joylink/rtss/dao/SimulationRoomMemberDAO.java new file mode 100644 index 000000000..c2ee282b3 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/SimulationRoomMemberDAO.java @@ -0,0 +1,12 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.SimulationRoomMember; +import club.joylink.rtss.entity.SimulationRoomMemberExample; +import org.springframework.stereotype.Repository; + +/** + * SimulationRoomMemberDAO继承基类 + */ +@Repository +public interface SimulationRoomMemberDAO extends MyBatisBaseDao { +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/SimulationRoomRealDeviceDAO.java b/src/main/java/club/joylink/rtss/dao/SimulationRoomRealDeviceDAO.java new file mode 100644 index 000000000..f9ad8c7ca --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/SimulationRoomRealDeviceDAO.java @@ -0,0 +1,12 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.SimulationRoomRealDevice; +import club.joylink.rtss.entity.SimulationRoomRealDeviceExample; +import org.springframework.stereotype.Repository; + +/** + * SimulationRoomRealDeviceDAO继承基类 + */ +@Repository +public interface SimulationRoomRealDeviceDAO extends MyBatisBaseDao { +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/SimulationRunAsPlanMapper.java b/src/main/java/club/joylink/rtss/dao/SimulationRunAsPlanMapper.java new file mode 100644 index 000000000..336b4d9e6 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/SimulationRunAsPlanMapper.java @@ -0,0 +1,33 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.SimulationRunAsPlan; +import club.joylink.rtss.entity.SimulationRunAsPlanExample; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface SimulationRunAsPlanMapper { + long countByExample(SimulationRunAsPlanExample example); + + int deleteByExample(SimulationRunAsPlanExample example); + + int deleteByPrimaryKey(Long id); + + int insert(SimulationRunAsPlan record); + + int insertSelective(SimulationRunAsPlan record); + + List selectByExample(SimulationRunAsPlanExample example); + + SimulationRunAsPlan selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") SimulationRunAsPlan record, @Param("example") SimulationRunAsPlanExample example); + + int updateByExample(@Param("record") SimulationRunAsPlan record, @Param("example") SimulationRunAsPlanExample example); + + int updateByPrimaryKeySelective(SimulationRunAsPlan record); + + int updateByPrimaryKey(SimulationRunAsPlan record); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/StudentClassDAO.java b/src/main/java/club/joylink/rtss/dao/StudentClassDAO.java new file mode 100644 index 000000000..e574815b1 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/StudentClassDAO.java @@ -0,0 +1,39 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.StudentClass; +import club.joylink.rtss.entity.StudentClassExample; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * StudentClassDAO继承基类 + */ +@Repository +public interface StudentClassDAO extends MyBatisBaseDao { + + /** + * 查询课程关联的班级信息列表 + */ + @Select("") + List getClasses(@Param("lessonId") Long lessonId); + + /** + * 查询试卷关联的班级信息列表 + */ + @Select("") + List getClassesByExamId(@Param("examId") Long examId); + +} diff --git a/src/main/java/club/joylink/rtss/dao/StudentRelExamClassDAO.java b/src/main/java/club/joylink/rtss/dao/StudentRelExamClassDAO.java new file mode 100644 index 000000000..18f95e98e --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/StudentRelExamClassDAO.java @@ -0,0 +1,12 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.StudentRelExamClass; +import club.joylink.rtss.entity.StudentRelExamClassExample; +import org.springframework.stereotype.Repository; + +/** + * StudentRelExamClassDAO继承基类 + */ +@Repository +public interface StudentRelExamClassDAO extends MyBatisBaseDao { +} diff --git a/src/main/java/club/joylink/rtss/dao/StudentRelIdClassDAO.java b/src/main/java/club/joylink/rtss/dao/StudentRelIdClassDAO.java new file mode 100644 index 000000000..624cf929c --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/StudentRelIdClassDAO.java @@ -0,0 +1,12 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.StudentRelIdClass; +import club.joylink.rtss.entity.StudentRelIdClassExample; +import org.springframework.stereotype.Repository; + +/** + * StudentRelIdClassDAO继承基类 + */ +@Repository +public interface StudentRelIdClassDAO extends MyBatisBaseDao { +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/StudentRelLessonClassDAO.java b/src/main/java/club/joylink/rtss/dao/StudentRelLessonClassDAO.java new file mode 100644 index 000000000..d8d4114b3 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/StudentRelLessonClassDAO.java @@ -0,0 +1,26 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.StudentRelLessonClass; +import club.joylink.rtss.entity.StudentRelLessonClassExample; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * StudentRelLessonClassDAO继承基类 + */ +@Repository +public interface StudentRelLessonClassDAO extends MyBatisBaseDao { + + /**查询课程关联的班级列表*/ + @Select("") + List getClassNames(@Param("lessonId") Long lessonId); +} diff --git a/src/main/java/club/joylink/rtss/dao/SysDictionaryDetailMapper.java b/src/main/java/club/joylink/rtss/dao/SysDictionaryDetailMapper.java new file mode 100644 index 000000000..f569c078f --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/SysDictionaryDetailMapper.java @@ -0,0 +1,45 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.SysDictionaryDetail; +import club.joylink.rtss.entity.SysDictionaryDetailExample; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface SysDictionaryDetailMapper { + long countByExample(SysDictionaryDetailExample example); + + int deleteByExample(SysDictionaryDetailExample example); + + int deleteByPrimaryKey(Long id); + + int insert(SysDictionaryDetail record); + + int insertSelective(SysDictionaryDetail record); + + List selectByExample(SysDictionaryDetailExample example); + + SysDictionaryDetail selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") SysDictionaryDetail record, @Param("example") SysDictionaryDetailExample example); + + int updateByExample(@Param("record") SysDictionaryDetail record, @Param("example") SysDictionaryDetailExample example); + + int updateByPrimaryKeySelective(SysDictionaryDetail record); + + int updateByPrimaryKey(SysDictionaryDetail record); + + @Insert(value = "") + int batchInsertWithId(@Param("list") List dictionaryDetailList); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/SysDictionaryMapper.java b/src/main/java/club/joylink/rtss/dao/SysDictionaryMapper.java new file mode 100644 index 000000000..a50e68e1c --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/SysDictionaryMapper.java @@ -0,0 +1,45 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.SysDictionary; +import club.joylink.rtss.entity.SysDictionaryExample; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface SysDictionaryMapper { + long countByExample(SysDictionaryExample example); + + int deleteByExample(SysDictionaryExample example); + + int deleteByPrimaryKey(Long id); + + int insert(SysDictionary record); + + int insertSelective(SysDictionary record); + + List selectByExample(SysDictionaryExample example); + + SysDictionary selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") SysDictionary record, @Param("example") SysDictionaryExample example); + + int updateByExample(@Param("record") SysDictionary record, @Param("example") SysDictionaryExample example); + + int updateByPrimaryKeySelective(SysDictionary record); + + int updateByPrimaryKey(SysDictionary record); + + @Insert(value = "") + int batchInsertWithId(@Param("list") List dictionaryList); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/SysNoticeDAO.java b/src/main/java/club/joylink/rtss/dao/SysNoticeDAO.java new file mode 100644 index 000000000..af86e1533 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/SysNoticeDAO.java @@ -0,0 +1,16 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.SysNotice; +import club.joylink.rtss.entity.SysNoticeExample; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * SysNoticeDAO继承基类 + */ +@Repository +public interface SysNoticeDAO extends MyBatisBaseDao { + + List selectByExampleWithBLOBs(SysNoticeExample example); +} diff --git a/src/main/java/club/joylink/rtss/dao/SysUserDAO.java b/src/main/java/club/joylink/rtss/dao/SysUserDAO.java new file mode 100644 index 000000000..edb8e68eb --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/SysUserDAO.java @@ -0,0 +1,47 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.SysUser; +import club.joylink.rtss.entity.SysUserExample; +import club.joylink.rtss.vo.statistics.DailyLiveQuantityVO; +import org.apache.ibatis.annotations.*; +import org.springframework.stereotype.Repository; + +import java.time.LocalDate; +import java.util.List; + +/** + * SysUserDAO继承基类 + */ +@Mapper +@Repository +public interface SysUserDAO extends MyBatisBaseDao { + + @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id") + @Insert(value = "") + int batchInsert(@Param("list") List userList); + + @Select("") + List statisticsDailyRegister(@Param("beginDate") LocalDate beginDate, @Param("endDate") LocalDate endDate); +} diff --git a/src/main/java/club/joylink/rtss/dao/SysUserLoginDAO.java b/src/main/java/club/joylink/rtss/dao/SysUserLoginDAO.java new file mode 100644 index 000000000..d87721662 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/SysUserLoginDAO.java @@ -0,0 +1,43 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.SysUserLogin; +import club.joylink.rtss.entity.SysUserLoginExample; +import club.joylink.rtss.vo.statistics.DailyLiveQuantityVO; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.springframework.stereotype.Repository; + +import java.time.LocalDate; +import java.util.List; + +/** + * SysUserLoginDAO继承基类 + */ +@Repository +public interface SysUserLoginDAO extends MyBatisBaseDao { + + /**查询用户通过当前客户端*在此日期范围内登陆的天数*/ + + @Select("") + Integer loginDays(@Param("userId") Long userId, @Param("client") String client, @Param("beginDate") LocalDate beginDate, @Param("endDate") LocalDate endDate); + + @Select("") + long countDailyLiveUsers(@Param("day") LocalDate day); + + @Select("") + List statisticsDailyLive(@Param("beginDate") LocalDate beginDate, @Param("endDate") LocalDate endDate); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/SysUserMapper.java b/src/main/java/club/joylink/rtss/dao/SysUserMapper.java new file mode 100644 index 000000000..dd5a85843 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/SysUserMapper.java @@ -0,0 +1,33 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.SysUser; +import club.joylink.rtss.entity.SysUserExample; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface SysUserMapper { + long countByExample(SysUserExample example); + + int deleteByExample(SysUserExample example); + + int deleteByPrimaryKey(Long id); + + int insert(SysUser record); + + int insertSelective(SysUser record); + + List selectByExample(SysUserExample example); + + SysUser selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") SysUser record, @Param("example") SysUserExample example); + + int updateByExample(@Param("record") SysUser record, @Param("example") SysUserExample example); + + int updateByPrimaryKeySelective(SysUser record); + + int updateByPrimaryKey(SysUser record); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/TaskMapper.java b/src/main/java/club/joylink/rtss/dao/TaskMapper.java new file mode 100644 index 000000000..312ff9a83 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/TaskMapper.java @@ -0,0 +1,33 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.Task; +import club.joylink.rtss.entity.TaskExample; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface TaskMapper { + long countByExample(TaskExample example); + + int deleteByExample(TaskExample example); + + int deleteByPrimaryKey(Long id); + + int insert(Task record); + + int insertSelective(Task record); + + List selectByExample(TaskExample example); + + Task selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") Task record, @Param("example") TaskExample example); + + int updateByExample(@Param("record") Task record, @Param("example") TaskExample example); + + int updateByPrimaryKeySelective(Task record); + + int updateByPrimaryKey(Task record); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/TrainingDAO.java b/src/main/java/club/joylink/rtss/dao/TrainingDAO.java new file mode 100644 index 000000000..a290df295 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/TrainingDAO.java @@ -0,0 +1,148 @@ +package club.joylink.rtss.dao; + +import com.github.pagehelper.Page; +import club.joylink.rtss.entity.Training; +import club.joylink.rtss.entity.TrainingExample; +import club.joylink.rtss.entity.TrainingWithBLOBs; +import club.joylink.rtss.vo.client.UserTrainingListVO; +import club.joylink.rtss.vo.client.UserTrainingQueryVO; +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.apache.ibatis.annotations.Update; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * TrainingDAO继承基类 + */ +@Repository +public interface TrainingDAO extends MyBatisBaseDao { + long countByExample(TrainingExample example); + + int deleteByExample(TrainingExample example); + + int deleteByPrimaryKey(Long id); + + int insert(TrainingWithBLOBs record); + + int insertSelective(TrainingWithBLOBs record); + + List selectByExampleWithBLOBs(TrainingExample example); + + List selectByExample(TrainingExample example); + + TrainingWithBLOBs selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") TrainingWithBLOBs record, @Param("example") TrainingExample example); + + int updateByExampleWithBLOBs(@Param("record") TrainingWithBLOBs record, @Param("example") TrainingExample example); + + int updateByExample(@Param("record") Training record, @Param("example") TrainingExample example); + + int updateByPrimaryKeySelective(TrainingWithBLOBs record); + + int updateByPrimaryKeyWithBLOBs(TrainingWithBLOBs record); + + int updateByPrimaryKey(Training record); + + @Select(value = "") + Page queryPagedUserTraining(UserTrainingQueryVO queryVO); + + @Select(value = "") + List selectIdsByExample(TrainingExample example); + + @Insert(value = "") + int batchInsert(@Param("list") List trainings); + + @Insert(value = "") + int batchInsertWithId(@Param("list") List trainings); + + @Update("UPDATE " + + "training " + + "SET " + + "prd_type=#{prdType} " + + "WHERE " + + "prd_id=#{prdId}") + void fillPrdType(Long prdId, String prdType); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/UserConfigMapper.java b/src/main/java/club/joylink/rtss/dao/UserConfigMapper.java new file mode 100644 index 000000000..4c909a16e --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/UserConfigMapper.java @@ -0,0 +1,33 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.UserConfig; +import club.joylink.rtss.entity.UserConfigExample; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface UserConfigMapper { + long countByExample(UserConfigExample example); + + int deleteByExample(UserConfigExample example); + + int deleteByPrimaryKey(Long id); + + int insert(UserConfig record); + + int insertSelective(UserConfig record); + + List selectByExample(UserConfigExample example); + + UserConfig selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") UserConfig record, @Param("example") UserConfigExample example); + + int updateByExample(@Param("record") UserConfig record, @Param("example") UserConfigExample example); + + int updateByPrimaryKeySelective(UserConfig record); + + int updateByPrimaryKey(UserConfig record); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/UserExamMapper.java b/src/main/java/club/joylink/rtss/dao/UserExamMapper.java new file mode 100644 index 000000000..14a33b1e6 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/UserExamMapper.java @@ -0,0 +1,111 @@ +package club.joylink.rtss.dao; + +import com.github.pagehelper.Page; +import club.joylink.rtss.entity.UserExam; +import club.joylink.rtss.entity.UserExamExample; +import club.joylink.rtss.vo.client.UserExamListVO; +import club.joylink.rtss.vo.client.UserExamQueryVO; +import club.joylink.rtss.vo.client.UserRankStatsVO; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.springframework.stereotype.Repository; + +import java.time.LocalDate; +import java.util.List; + +@Repository +public interface UserExamMapper { + long countByExample(UserExamExample example); + + int deleteByExample(UserExamExample example); + + int deleteByPrimaryKey(Long id); + + int insert(UserExam record); + + int insertSelective(UserExam record); + + List selectByExample(UserExamExample example); + + UserExam selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") UserExam record, @Param("example") UserExamExample example); + + int updateByExample(@Param("record") UserExam record, @Param("example") UserExamExample example); + + int updateByPrimaryKeySelective(UserExam record); + + int updateByPrimaryKey(UserExam record); + + @Select("") + Page queryPagedUserExam(UserExamQueryVO queryVO); + + @Select("") + List queryExamLessonList(Long userId); + + @Select("") + List queryExamList(@Param("lessonId") Long lessonId, @Param("userId") Long userId); + + @Select("") + List selectRankByExamId(Long examId); + + /**查询用户某个考试最大的得分*/ + @Select("") + Integer getMaxScoreBy(@Param("userId") Long userId, @Param("examId") Long examId, @Param("beginDate") LocalDate beginDate, @Param("endDate") LocalDate endDate); +} diff --git a/src/main/java/club/joylink/rtss/dao/UserExamQuestionsMapper.java b/src/main/java/club/joylink/rtss/dao/UserExamQuestionsMapper.java new file mode 100644 index 000000000..3c4727ada --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/UserExamQuestionsMapper.java @@ -0,0 +1,69 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.UserExamQuestions; +import club.joylink.rtss.entity.UserExamQuestionsExample; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface UserExamQuestionsMapper { + long countByExample(UserExamQuestionsExample example); + + int deleteByExample(UserExamQuestionsExample example); + + int deleteByPrimaryKey(Long id); + + int insert(UserExamQuestions record); + + int insertSelective(UserExamQuestions record); + + List selectByExample(UserExamQuestionsExample example); + + UserExamQuestions selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") UserExamQuestions record, @Param("example") UserExamQuestionsExample example); + + int updateByExample(@Param("record") UserExamQuestions record, @Param("example") UserExamQuestionsExample example); + + int updateByPrimaryKeySelective(UserExamQuestions record); + + int updateByPrimaryKey(UserExamQuestions record); + + @Select(value = "") + List selectUserExamIdsByExample(UserExamQuestionsExample example); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/UserGoodsTryRecordMapper.java b/src/main/java/club/joylink/rtss/dao/UserGoodsTryRecordMapper.java new file mode 100644 index 000000000..b73782d18 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/UserGoodsTryRecordMapper.java @@ -0,0 +1,33 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.UserGoodsTryRecord; +import club.joylink.rtss.entity.UserGoodsTryRecordExample; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface UserGoodsTryRecordMapper { + long countByExample(UserGoodsTryRecordExample example); + + int deleteByExample(UserGoodsTryRecordExample example); + + int deleteByPrimaryKey(Long id); + + int insert(UserGoodsTryRecord record); + + int insertSelective(UserGoodsTryRecord record); + + List selectByExample(UserGoodsTryRecordExample example); + + UserGoodsTryRecord selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") UserGoodsTryRecord record, @Param("example") UserGoodsTryRecordExample example); + + int updateByExample(@Param("record") UserGoodsTryRecord record, @Param("example") UserGoodsTryRecordExample example); + + int updateByPrimaryKeySelective(UserGoodsTryRecord record); + + int updateByPrimaryKey(UserGoodsTryRecord record); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/UserPermissionDAO.java b/src/main/java/club/joylink/rtss/dao/UserPermissionDAO.java new file mode 100644 index 000000000..5969fa595 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/UserPermissionDAO.java @@ -0,0 +1,79 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.UserPermission; +import club.joylink.rtss.entity.UserPermissionExample; +import club.joylink.rtss.vo.client.permission.PermissionQueryVO; +import club.joylink.rtss.vo.client.userPermission.UserPermissionVO; +import org.apache.ibatis.annotations.Select; +import org.apache.ibatis.annotations.Update; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * UserPermissionDAO继承基类 + */ +@Repository +public interface UserPermissionDAO extends MyBatisBaseDao { + + @Select("") + List selectUserPermissionVOOrderByUserName(PermissionQueryVO queryVO, List relDistributeIds); + + @Update("UPDATE " + + "user_permission " + + "SET " + + "status = 0 " + + "WHERE " + + "distribute_id = #{distributeId}") + void updateInvalidByDistributeId(Long distributeId); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/UserPermissionProcessingDAO.java b/src/main/java/club/joylink/rtss/dao/UserPermissionProcessingDAO.java new file mode 100644 index 000000000..725e57b89 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/UserPermissionProcessingDAO.java @@ -0,0 +1,12 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.UserPermissionProcessing; +import club.joylink.rtss.entity.UserPermissionProcessingExample; +import org.springframework.stereotype.Repository; + +/** + * UserPermissionProcessingDAO继承基类 + */ +@Repository +public interface UserPermissionProcessingDAO extends MyBatisBaseDao { +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/UserSimulationStatsDAO.java b/src/main/java/club/joylink/rtss/dao/UserSimulationStatsDAO.java new file mode 100644 index 000000000..b48006746 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/UserSimulationStatsDAO.java @@ -0,0 +1,111 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.UserSimulationStats; +import club.joylink.rtss.entity.UserSimulationStatsExample; +import club.joylink.rtss.vo.client.UserRankStatsVO; +import club.joylink.rtss.vo.client.UserSimulationStatsListVO; +import club.joylink.rtss.vo.client.UserSimulationStatsQueryVO; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.apache.ibatis.annotations.Update; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * UserSimulationStatsDAO继承基类 + */ +@Repository +public interface UserSimulationStatsDAO extends MyBatisBaseDao { + + @Select("") + List queryPagedStats(@Param("queryVO") UserSimulationStatsQueryVO queryVO, List typeList); + + @Select("") + List querySimulationMapList(Long userId); + + @Select("") + List querySimulationPrdList(@Param("mapId") Long mapId, @Param("userId") Long userId); + + @Select("") + List simulationRank(Long mapId, String prdType); + + @Select("") + List simulationPersonalStats(@Param("mapId") Long mapId, @Param("userId") Long userId); + + @Update("UPDATE " + + "user_simulation_stats " + + "set " + + "prd_type=#{prdType} " + + "where " + + "map_prd_id=#{prdId} ") + void fillPrdType(Long prdId, String prdType); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/UserSubscribeMapper.java b/src/main/java/club/joylink/rtss/dao/UserSubscribeMapper.java new file mode 100644 index 000000000..29a44a802 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/UserSubscribeMapper.java @@ -0,0 +1,33 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.UserSubscribe; +import club.joylink.rtss.entity.UserSubscribeExample; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface UserSubscribeMapper { + long countByExample(UserSubscribeExample example); + + int deleteByExample(UserSubscribeExample example); + + int deleteByPrimaryKey(Long id); + + int insert(UserSubscribe record); + + int insertSelective(UserSubscribe record); + + List selectByExample(UserSubscribeExample example); + + UserSubscribe selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") UserSubscribe record, @Param("example") UserSubscribeExample example); + + int updateByExample(@Param("record") UserSubscribe record, @Param("example") UserSubscribeExample example); + + int updateByPrimaryKeySelective(UserSubscribe record); + + int updateByPrimaryKey(UserSubscribe record); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/dao/UserSysnoticeUnreadDAO.java b/src/main/java/club/joylink/rtss/dao/UserSysnoticeUnreadDAO.java new file mode 100644 index 000000000..76b27e964 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/UserSysnoticeUnreadDAO.java @@ -0,0 +1,20 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.UserSysnoticeUnread; +import club.joylink.rtss.entity.UserSysnoticeUnreadExample; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + * UserSysnoticeUnreadDAO继承基类 + */ +@Repository +public interface UserSysnoticeUnreadDAO extends MyBatisBaseDao { + + List selectByExampleWithBLOBs(UserSysnoticeUnreadExample example); + + + void updateByExampleWithBLOBs(@Param("record") UserSysnoticeUnread record, @Param("example") UserSysnoticeUnreadExample example); +} diff --git a/src/main/java/club/joylink/rtss/dao/UserTrainingStatsMapper.java b/src/main/java/club/joylink/rtss/dao/UserTrainingStatsMapper.java new file mode 100644 index 000000000..1a56a3197 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/UserTrainingStatsMapper.java @@ -0,0 +1,88 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.UserTrainingStats; +import club.joylink.rtss.entity.UserTrainingStatsExample; +import club.joylink.rtss.vo.client.UserRankStatsVO; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.springframework.stereotype.Repository; + +import java.time.LocalDate; +import java.util.List; + +@Repository +public interface UserTrainingStatsMapper { + long countByExample(UserTrainingStatsExample example); + + int deleteByExample(UserTrainingStatsExample example); + + int deleteByPrimaryKey(Long id); + + int insert(UserTrainingStats record); + + int insertSelective(UserTrainingStats record); + + List selectByExample(UserTrainingStatsExample example); + + UserTrainingStats selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") UserTrainingStats record, @Param("example") UserTrainingStatsExample example); + + int updateByExample(@Param("record") UserTrainingStats record, @Param("example") UserTrainingStatsExample example); + + int updateByPrimaryKeySelective(UserTrainingStats record); + + int updateByPrimaryKey(UserTrainingStats record); + + @Select("") + List queryLessonList(Long userId); + + @Select("") + List selectRankByLessonId(Long lessonId); + + @Select("") + List selectStatsByLessonId(@Param("lessonId") Long lessonId, @Param("userId") Long userId); + + /**查询用户的某个课程某模式下的通过的唯一实训的真实数据量*/ + @Select("") + Integer countBy(@Param("userId") Long userId, @Param("lessonId") Long lessonId, @Param("fake") int fake, @Param("mode") String mode, @Param("passed") int passed, @Param("beginDate") LocalDate beginDate, @Param("endDate") LocalDate endDate); +} diff --git a/src/main/java/club/joylink/rtss/dao/VoiceCommandDAO.java b/src/main/java/club/joylink/rtss/dao/VoiceCommandDAO.java new file mode 100644 index 000000000..734f32d46 --- /dev/null +++ b/src/main/java/club/joylink/rtss/dao/VoiceCommandDAO.java @@ -0,0 +1,40 @@ +package club.joylink.rtss.dao; + +import club.joylink.rtss.entity.VoiceCommand; +import club.joylink.rtss.entity.VoiceCommandExample; +import club.joylink.rtss.entity.VoiceCommandWithBLOBs; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface VoiceCommandDAO { + long countByExample(VoiceCommandExample example); + + int deleteByExample(VoiceCommandExample example); + + int deleteByPrimaryKey(Long id); + + int insert(VoiceCommandWithBLOBs record); + + int insertSelective(VoiceCommandWithBLOBs record); + + List selectByExampleWithBLOBs(VoiceCommandExample example); + + List selectByExample(VoiceCommandExample example); + + VoiceCommandWithBLOBs selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") VoiceCommandWithBLOBs record, @Param("example") VoiceCommandExample example); + + int updateByExampleWithBLOBs(@Param("record") VoiceCommandWithBLOBs record, @Param("example") VoiceCommandExample example); + + int updateByExample(@Param("record") VoiceCommand record, @Param("example") VoiceCommandExample example); + + int updateByPrimaryKeySelective(VoiceCommandWithBLOBs record); + + int updateByPrimaryKeyWithBLOBs(VoiceCommandWithBLOBs record); + + int updateByPrimaryKey(VoiceCommand record); +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/CommandDefinition.java b/src/main/java/club/joylink/rtss/entity/CommandDefinition.java new file mode 100644 index 000000000..d842fa20d --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/CommandDefinition.java @@ -0,0 +1,178 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * command_definition + * @author + */ +public class CommandDefinition implements Serializable { + private Long id; + + /** + * 线路编号 + */ + private String lineCode; + + /** + * 产品类型 + */ + private String prdType; + + /** + * 仿真角色 + */ + private String simulationRole; + + /** + * 控制模式 + */ + private String controlMode; + + /** + * 操作对象 + */ + private String operateObject; + + /** + * 操作 + */ + private String operate; + + private String conditions; + + private String params; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getLineCode() { + return lineCode; + } + + public void setLineCode(String lineCode) { + this.lineCode = lineCode; + } + + public String getPrdType() { + return prdType; + } + + public void setPrdType(String prdType) { + this.prdType = prdType; + } + + public String getSimulationRole() { + return simulationRole; + } + + public void setSimulationRole(String simulationRole) { + this.simulationRole = simulationRole; + } + + public String getControlMode() { + return controlMode; + } + + public void setControlMode(String controlMode) { + this.controlMode = controlMode; + } + + public String getOperateObject() { + return operateObject; + } + + public void setOperateObject(String operateObject) { + this.operateObject = operateObject; + } + + public String getOperate() { + return operate; + } + + public void setOperate(String operate) { + this.operate = operate; + } + + public String getConditions() { + return conditions; + } + + public void setConditions(String conditions) { + this.conditions = conditions; + } + + public String getParams() { + return params; + } + + public void setParams(String params) { + this.params = params; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + CommandDefinition other = (CommandDefinition) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getLineCode() == null ? other.getLineCode() == null : this.getLineCode().equals(other.getLineCode())) + && (this.getPrdType() == null ? other.getPrdType() == null : this.getPrdType().equals(other.getPrdType())) + && (this.getSimulationRole() == null ? other.getSimulationRole() == null : this.getSimulationRole().equals(other.getSimulationRole())) + && (this.getControlMode() == null ? other.getControlMode() == null : this.getControlMode().equals(other.getControlMode())) + && (this.getOperateObject() == null ? other.getOperateObject() == null : this.getOperateObject().equals(other.getOperateObject())) + && (this.getOperate() == null ? other.getOperate() == null : this.getOperate().equals(other.getOperate())) + && (this.getConditions() == null ? other.getConditions() == null : this.getConditions().equals(other.getConditions())) + && (this.getParams() == null ? other.getParams() == null : this.getParams().equals(other.getParams())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getLineCode() == null) ? 0 : getLineCode().hashCode()); + result = prime * result + ((getPrdType() == null) ? 0 : getPrdType().hashCode()); + result = prime * result + ((getSimulationRole() == null) ? 0 : getSimulationRole().hashCode()); + result = prime * result + ((getControlMode() == null) ? 0 : getControlMode().hashCode()); + result = prime * result + ((getOperateObject() == null) ? 0 : getOperateObject().hashCode()); + result = prime * result + ((getOperate() == null) ? 0 : getOperate().hashCode()); + result = prime * result + ((getConditions() == null) ? 0 : getConditions().hashCode()); + result = prime * result + ((getParams() == null) ? 0 : getParams().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", lineCode=").append(lineCode); + sb.append(", prdType=").append(prdType); + sb.append(", simulationRole=").append(simulationRole); + sb.append(", controlMode=").append(controlMode); + sb.append(", operateObject=").append(operateObject); + sb.append(", operate=").append(operate); + sb.append(", conditions=").append(conditions); + sb.append(", params=").append(params); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/CommandDefinitionExample.java b/src/main/java/club/joylink/rtss/entity/CommandDefinitionExample.java new file mode 100644 index 000000000..ab49d8558 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/CommandDefinitionExample.java @@ -0,0 +1,842 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class CommandDefinitionExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public CommandDefinitionExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andLineCodeIsNull() { + addCriterion("line_code is null"); + return (Criteria) this; + } + + public Criteria andLineCodeIsNotNull() { + addCriterion("line_code is not null"); + return (Criteria) this; + } + + public Criteria andLineCodeEqualTo(String value) { + addCriterion("line_code =", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeNotEqualTo(String value) { + addCriterion("line_code <>", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeGreaterThan(String value) { + addCriterion("line_code >", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeGreaterThanOrEqualTo(String value) { + addCriterion("line_code >=", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeLessThan(String value) { + addCriterion("line_code <", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeLessThanOrEqualTo(String value) { + addCriterion("line_code <=", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeLike(String value) { + addCriterion("line_code like", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeNotLike(String value) { + addCriterion("line_code not like", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeIn(List values) { + addCriterion("line_code in", values, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeNotIn(List values) { + addCriterion("line_code not in", values, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeBetween(String value1, String value2) { + addCriterion("line_code between", value1, value2, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeNotBetween(String value1, String value2) { + addCriterion("line_code not between", value1, value2, "lineCode"); + return (Criteria) this; + } + + public Criteria andPrdTypeIsNull() { + addCriterion("prd_type is null"); + return (Criteria) this; + } + + public Criteria andPrdTypeIsNotNull() { + addCriterion("prd_type is not null"); + return (Criteria) this; + } + + public Criteria andPrdTypeEqualTo(String value) { + addCriterion("prd_type =", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotEqualTo(String value) { + addCriterion("prd_type <>", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeGreaterThan(String value) { + addCriterion("prd_type >", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeGreaterThanOrEqualTo(String value) { + addCriterion("prd_type >=", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeLessThan(String value) { + addCriterion("prd_type <", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeLessThanOrEqualTo(String value) { + addCriterion("prd_type <=", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeLike(String value) { + addCriterion("prd_type like", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotLike(String value) { + addCriterion("prd_type not like", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeIn(List values) { + addCriterion("prd_type in", values, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotIn(List values) { + addCriterion("prd_type not in", values, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeBetween(String value1, String value2) { + addCriterion("prd_type between", value1, value2, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotBetween(String value1, String value2) { + addCriterion("prd_type not between", value1, value2, "prdType"); + return (Criteria) this; + } + + public Criteria andSimulationRoleIsNull() { + addCriterion("simulation_role is null"); + return (Criteria) this; + } + + public Criteria andSimulationRoleIsNotNull() { + addCriterion("simulation_role is not null"); + return (Criteria) this; + } + + public Criteria andSimulationRoleEqualTo(String value) { + addCriterion("simulation_role =", value, "simulationRole"); + return (Criteria) this; + } + + public Criteria andSimulationRoleNotEqualTo(String value) { + addCriterion("simulation_role <>", value, "simulationRole"); + return (Criteria) this; + } + + public Criteria andSimulationRoleGreaterThan(String value) { + addCriterion("simulation_role >", value, "simulationRole"); + return (Criteria) this; + } + + public Criteria andSimulationRoleGreaterThanOrEqualTo(String value) { + addCriterion("simulation_role >=", value, "simulationRole"); + return (Criteria) this; + } + + public Criteria andSimulationRoleLessThan(String value) { + addCriterion("simulation_role <", value, "simulationRole"); + return (Criteria) this; + } + + public Criteria andSimulationRoleLessThanOrEqualTo(String value) { + addCriterion("simulation_role <=", value, "simulationRole"); + return (Criteria) this; + } + + public Criteria andSimulationRoleLike(String value) { + addCriterion("simulation_role like", value, "simulationRole"); + return (Criteria) this; + } + + public Criteria andSimulationRoleNotLike(String value) { + addCriterion("simulation_role not like", value, "simulationRole"); + return (Criteria) this; + } + + public Criteria andSimulationRoleIn(List values) { + addCriterion("simulation_role in", values, "simulationRole"); + return (Criteria) this; + } + + public Criteria andSimulationRoleNotIn(List values) { + addCriterion("simulation_role not in", values, "simulationRole"); + return (Criteria) this; + } + + public Criteria andSimulationRoleBetween(String value1, String value2) { + addCriterion("simulation_role between", value1, value2, "simulationRole"); + return (Criteria) this; + } + + public Criteria andSimulationRoleNotBetween(String value1, String value2) { + addCriterion("simulation_role not between", value1, value2, "simulationRole"); + return (Criteria) this; + } + + public Criteria andControlModeIsNull() { + addCriterion("control_mode is null"); + return (Criteria) this; + } + + public Criteria andControlModeIsNotNull() { + addCriterion("control_mode is not null"); + return (Criteria) this; + } + + public Criteria andControlModeEqualTo(String value) { + addCriterion("control_mode =", value, "controlMode"); + return (Criteria) this; + } + + public Criteria andControlModeNotEqualTo(String value) { + addCriterion("control_mode <>", value, "controlMode"); + return (Criteria) this; + } + + public Criteria andControlModeGreaterThan(String value) { + addCriterion("control_mode >", value, "controlMode"); + return (Criteria) this; + } + + public Criteria andControlModeGreaterThanOrEqualTo(String value) { + addCriterion("control_mode >=", value, "controlMode"); + return (Criteria) this; + } + + public Criteria andControlModeLessThan(String value) { + addCriterion("control_mode <", value, "controlMode"); + return (Criteria) this; + } + + public Criteria andControlModeLessThanOrEqualTo(String value) { + addCriterion("control_mode <=", value, "controlMode"); + return (Criteria) this; + } + + public Criteria andControlModeLike(String value) { + addCriterion("control_mode like", value, "controlMode"); + return (Criteria) this; + } + + public Criteria andControlModeNotLike(String value) { + addCriterion("control_mode not like", value, "controlMode"); + return (Criteria) this; + } + + public Criteria andControlModeIn(List values) { + addCriterion("control_mode in", values, "controlMode"); + return (Criteria) this; + } + + public Criteria andControlModeNotIn(List values) { + addCriterion("control_mode not in", values, "controlMode"); + return (Criteria) this; + } + + public Criteria andControlModeBetween(String value1, String value2) { + addCriterion("control_mode between", value1, value2, "controlMode"); + return (Criteria) this; + } + + public Criteria andControlModeNotBetween(String value1, String value2) { + addCriterion("control_mode not between", value1, value2, "controlMode"); + return (Criteria) this; + } + + public Criteria andOperateObjectIsNull() { + addCriterion("operate_object is null"); + return (Criteria) this; + } + + public Criteria andOperateObjectIsNotNull() { + addCriterion("operate_object is not null"); + return (Criteria) this; + } + + public Criteria andOperateObjectEqualTo(String value) { + addCriterion("operate_object =", value, "operateObject"); + return (Criteria) this; + } + + public Criteria andOperateObjectNotEqualTo(String value) { + addCriterion("operate_object <>", value, "operateObject"); + return (Criteria) this; + } + + public Criteria andOperateObjectGreaterThan(String value) { + addCriterion("operate_object >", value, "operateObject"); + return (Criteria) this; + } + + public Criteria andOperateObjectGreaterThanOrEqualTo(String value) { + addCriterion("operate_object >=", value, "operateObject"); + return (Criteria) this; + } + + public Criteria andOperateObjectLessThan(String value) { + addCriterion("operate_object <", value, "operateObject"); + return (Criteria) this; + } + + public Criteria andOperateObjectLessThanOrEqualTo(String value) { + addCriterion("operate_object <=", value, "operateObject"); + return (Criteria) this; + } + + public Criteria andOperateObjectLike(String value) { + addCriterion("operate_object like", value, "operateObject"); + return (Criteria) this; + } + + public Criteria andOperateObjectNotLike(String value) { + addCriterion("operate_object not like", value, "operateObject"); + return (Criteria) this; + } + + public Criteria andOperateObjectIn(List values) { + addCriterion("operate_object in", values, "operateObject"); + return (Criteria) this; + } + + public Criteria andOperateObjectNotIn(List values) { + addCriterion("operate_object not in", values, "operateObject"); + return (Criteria) this; + } + + public Criteria andOperateObjectBetween(String value1, String value2) { + addCriterion("operate_object between", value1, value2, "operateObject"); + return (Criteria) this; + } + + public Criteria andOperateObjectNotBetween(String value1, String value2) { + addCriterion("operate_object not between", value1, value2, "operateObject"); + return (Criteria) this; + } + + public Criteria andOperateIsNull() { + addCriterion("operate is null"); + return (Criteria) this; + } + + public Criteria andOperateIsNotNull() { + addCriterion("operate is not null"); + return (Criteria) this; + } + + public Criteria andOperateEqualTo(String value) { + addCriterion("operate =", value, "operate"); + return (Criteria) this; + } + + public Criteria andOperateNotEqualTo(String value) { + addCriterion("operate <>", value, "operate"); + return (Criteria) this; + } + + public Criteria andOperateGreaterThan(String value) { + addCriterion("operate >", value, "operate"); + return (Criteria) this; + } + + public Criteria andOperateGreaterThanOrEqualTo(String value) { + addCriterion("operate >=", value, "operate"); + return (Criteria) this; + } + + public Criteria andOperateLessThan(String value) { + addCriterion("operate <", value, "operate"); + return (Criteria) this; + } + + public Criteria andOperateLessThanOrEqualTo(String value) { + addCriterion("operate <=", value, "operate"); + return (Criteria) this; + } + + public Criteria andOperateLike(String value) { + addCriterion("operate like", value, "operate"); + return (Criteria) this; + } + + public Criteria andOperateNotLike(String value) { + addCriterion("operate not like", value, "operate"); + return (Criteria) this; + } + + public Criteria andOperateIn(List values) { + addCriterion("operate in", values, "operate"); + return (Criteria) this; + } + + public Criteria andOperateNotIn(List values) { + addCriterion("operate not in", values, "operate"); + return (Criteria) this; + } + + public Criteria andOperateBetween(String value1, String value2) { + addCriterion("operate between", value1, value2, "operate"); + return (Criteria) this; + } + + public Criteria andOperateNotBetween(String value1, String value2) { + addCriterion("operate not between", value1, value2, "operate"); + return (Criteria) this; + } + + public Criteria andConditionsIsNull() { + addCriterion("conditions is null"); + return (Criteria) this; + } + + public Criteria andConditionsIsNotNull() { + addCriterion("conditions is not null"); + return (Criteria) this; + } + + public Criteria andConditionsEqualTo(String value) { + addCriterion("conditions =", value, "conditions"); + return (Criteria) this; + } + + public Criteria andConditionsNotEqualTo(String value) { + addCriterion("conditions <>", value, "conditions"); + return (Criteria) this; + } + + public Criteria andConditionsGreaterThan(String value) { + addCriterion("conditions >", value, "conditions"); + return (Criteria) this; + } + + public Criteria andConditionsGreaterThanOrEqualTo(String value) { + addCriterion("conditions >=", value, "conditions"); + return (Criteria) this; + } + + public Criteria andConditionsLessThan(String value) { + addCriterion("conditions <", value, "conditions"); + return (Criteria) this; + } + + public Criteria andConditionsLessThanOrEqualTo(String value) { + addCriterion("conditions <=", value, "conditions"); + return (Criteria) this; + } + + public Criteria andConditionsLike(String value) { + addCriterion("conditions like", value, "conditions"); + return (Criteria) this; + } + + public Criteria andConditionsNotLike(String value) { + addCriterion("conditions not like", value, "conditions"); + return (Criteria) this; + } + + public Criteria andConditionsIn(List values) { + addCriterion("conditions in", values, "conditions"); + return (Criteria) this; + } + + public Criteria andConditionsNotIn(List values) { + addCriterion("conditions not in", values, "conditions"); + return (Criteria) this; + } + + public Criteria andConditionsBetween(String value1, String value2) { + addCriterion("conditions between", value1, value2, "conditions"); + return (Criteria) this; + } + + public Criteria andConditionsNotBetween(String value1, String value2) { + addCriterion("conditions not between", value1, value2, "conditions"); + return (Criteria) this; + } + + public Criteria andParamsIsNull() { + addCriterion("params is null"); + return (Criteria) this; + } + + public Criteria andParamsIsNotNull() { + addCriterion("params is not null"); + return (Criteria) this; + } + + public Criteria andParamsEqualTo(String value) { + addCriterion("params =", value, "params"); + return (Criteria) this; + } + + public Criteria andParamsNotEqualTo(String value) { + addCriterion("params <>", value, "params"); + return (Criteria) this; + } + + public Criteria andParamsGreaterThan(String value) { + addCriterion("params >", value, "params"); + return (Criteria) this; + } + + public Criteria andParamsGreaterThanOrEqualTo(String value) { + addCriterion("params >=", value, "params"); + return (Criteria) this; + } + + public Criteria andParamsLessThan(String value) { + addCriterion("params <", value, "params"); + return (Criteria) this; + } + + public Criteria andParamsLessThanOrEqualTo(String value) { + addCriterion("params <=", value, "params"); + return (Criteria) this; + } + + public Criteria andParamsLike(String value) { + addCriterion("params like", value, "params"); + return (Criteria) this; + } + + public Criteria andParamsNotLike(String value) { + addCriterion("params not like", value, "params"); + return (Criteria) this; + } + + public Criteria andParamsIn(List values) { + addCriterion("params in", values, "params"); + return (Criteria) this; + } + + public Criteria andParamsNotIn(List values) { + addCriterion("params not in", values, "params"); + return (Criteria) this; + } + + public Criteria andParamsBetween(String value1, String value2) { + addCriterion("params between", value1, value2, "params"); + return (Criteria) this; + } + + public Criteria andParamsNotBetween(String value1, String value2) { + addCriterion("params not between", value1, value2, "params"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/Company.java b/src/main/java/club/joylink/rtss/entity/Company.java new file mode 100644 index 000000000..78bbddacd --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/Company.java @@ -0,0 +1,104 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * company + * @author + */ +public class Company implements Serializable { + private Integer id; + + /** + * 公司名称 + */ + private String name; + + /** + * 公司地址 + */ + private String address; + + /** + * 联系方式 + */ + private String phone; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + Company other = (Company) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress())) + && (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode()); + result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", name=").append(name); + sb.append(", address=").append(address); + sb.append(", phone=").append(phone); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/CompanyExample.java b/src/main/java/club/joylink/rtss/entity/CompanyExample.java new file mode 100644 index 000000000..419973023 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/CompanyExample.java @@ -0,0 +1,492 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class CompanyExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public CompanyExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Integer value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Integer value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Integer value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Integer value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Integer value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Integer value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Integer value1, Integer value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Integer value1, Integer value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andAddressIsNull() { + addCriterion("address is null"); + return (Criteria) this; + } + + public Criteria andAddressIsNotNull() { + addCriterion("address is not null"); + return (Criteria) this; + } + + public Criteria andAddressEqualTo(String value) { + addCriterion("address =", value, "address"); + return (Criteria) this; + } + + public Criteria andAddressNotEqualTo(String value) { + addCriterion("address <>", value, "address"); + return (Criteria) this; + } + + public Criteria andAddressGreaterThan(String value) { + addCriterion("address >", value, "address"); + return (Criteria) this; + } + + public Criteria andAddressGreaterThanOrEqualTo(String value) { + addCriterion("address >=", value, "address"); + return (Criteria) this; + } + + public Criteria andAddressLessThan(String value) { + addCriterion("address <", value, "address"); + return (Criteria) this; + } + + public Criteria andAddressLessThanOrEqualTo(String value) { + addCriterion("address <=", value, "address"); + return (Criteria) this; + } + + public Criteria andAddressLike(String value) { + addCriterion("address like", value, "address"); + return (Criteria) this; + } + + public Criteria andAddressNotLike(String value) { + addCriterion("address not like", value, "address"); + return (Criteria) this; + } + + public Criteria andAddressIn(List values) { + addCriterion("address in", values, "address"); + return (Criteria) this; + } + + public Criteria andAddressNotIn(List values) { + addCriterion("address not in", values, "address"); + return (Criteria) this; + } + + public Criteria andAddressBetween(String value1, String value2) { + addCriterion("address between", value1, value2, "address"); + return (Criteria) this; + } + + public Criteria andAddressNotBetween(String value1, String value2) { + addCriterion("address not between", value1, value2, "address"); + return (Criteria) this; + } + + public Criteria andPhoneIsNull() { + addCriterion("phone is null"); + return (Criteria) this; + } + + public Criteria andPhoneIsNotNull() { + addCriterion("phone is not null"); + return (Criteria) this; + } + + public Criteria andPhoneEqualTo(String value) { + addCriterion("phone =", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotEqualTo(String value) { + addCriterion("phone <>", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneGreaterThan(String value) { + addCriterion("phone >", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneGreaterThanOrEqualTo(String value) { + addCriterion("phone >=", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneLessThan(String value) { + addCriterion("phone <", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneLessThanOrEqualTo(String value) { + addCriterion("phone <=", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneLike(String value) { + addCriterion("phone like", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotLike(String value) { + addCriterion("phone not like", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneIn(List values) { + addCriterion("phone in", values, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotIn(List values) { + addCriterion("phone not in", values, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneBetween(String value1, String value2) { + addCriterion("phone between", value1, value2, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotBetween(String value1, String value2) { + addCriterion("phone not between", value1, value2, "phone"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/Competition.java b/src/main/java/club/joylink/rtss/entity/Competition.java new file mode 100644 index 000000000..0b731f983 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/Competition.java @@ -0,0 +1,152 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * competition + * @author + */ +public class Competition implements Serializable { + private Long id; + + /** + * 名称 + */ + private String name; + + /** + * 是否主场景 + */ + private Boolean main; + + /** + * 场景描述 + */ + private String description; + + /** + * 处置流程 + */ + private String disposalProcesses; + + /** + * 运营指标部分分数 + */ + private Float operationScore; + + /** + * 关联的剧本 + */ + private Long scriptId; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Boolean getMain() { + return main; + } + + public void setMain(Boolean main) { + this.main = main; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getDisposalProcesses() { + return disposalProcesses; + } + + public void setDisposalProcesses(String disposalProcesses) { + this.disposalProcesses = disposalProcesses; + } + + public Float getOperationScore() { + return operationScore; + } + + public void setOperationScore(Float operationScore) { + this.operationScore = operationScore; + } + + public Long getScriptId() { + return scriptId; + } + + public void setScriptId(Long scriptId) { + this.scriptId = scriptId; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + Competition other = (Competition) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getMain() == null ? other.getMain() == null : this.getMain().equals(other.getMain())) + && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription())) + && (this.getDisposalProcesses() == null ? other.getDisposalProcesses() == null : this.getDisposalProcesses().equals(other.getDisposalProcesses())) + && (this.getOperationScore() == null ? other.getOperationScore() == null : this.getOperationScore().equals(other.getOperationScore())) + && (this.getScriptId() == null ? other.getScriptId() == null : this.getScriptId().equals(other.getScriptId())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getMain() == null) ? 0 : getMain().hashCode()); + result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode()); + result = prime * result + ((getDisposalProcesses() == null) ? 0 : getDisposalProcesses().hashCode()); + result = prime * result + ((getOperationScore() == null) ? 0 : getOperationScore().hashCode()); + result = prime * result + ((getScriptId() == null) ? 0 : getScriptId().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", name=").append(name); + sb.append(", main=").append(main); + sb.append(", description=").append(description); + sb.append(", disposalProcesses=").append(disposalProcesses); + sb.append(", operationScore=").append(operationScore); + sb.append(", scriptId=").append(scriptId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/CompetitionExample.java b/src/main/java/club/joylink/rtss/entity/CompetitionExample.java new file mode 100644 index 000000000..b1691ede6 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/CompetitionExample.java @@ -0,0 +1,672 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class CompetitionExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public CompetitionExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andMainIsNull() { + addCriterion("main is null"); + return (Criteria) this; + } + + public Criteria andMainIsNotNull() { + addCriterion("main is not null"); + return (Criteria) this; + } + + public Criteria andMainEqualTo(Boolean value) { + addCriterion("main =", value, "main"); + return (Criteria) this; + } + + public Criteria andMainNotEqualTo(Boolean value) { + addCriterion("main <>", value, "main"); + return (Criteria) this; + } + + public Criteria andMainGreaterThan(Boolean value) { + addCriterion("main >", value, "main"); + return (Criteria) this; + } + + public Criteria andMainGreaterThanOrEqualTo(Boolean value) { + addCriterion("main >=", value, "main"); + return (Criteria) this; + } + + public Criteria andMainLessThan(Boolean value) { + addCriterion("main <", value, "main"); + return (Criteria) this; + } + + public Criteria andMainLessThanOrEqualTo(Boolean value) { + addCriterion("main <=", value, "main"); + return (Criteria) this; + } + + public Criteria andMainIn(List values) { + addCriterion("main in", values, "main"); + return (Criteria) this; + } + + public Criteria andMainNotIn(List values) { + addCriterion("main not in", values, "main"); + return (Criteria) this; + } + + public Criteria andMainBetween(Boolean value1, Boolean value2) { + addCriterion("main between", value1, value2, "main"); + return (Criteria) this; + } + + public Criteria andMainNotBetween(Boolean value1, Boolean value2) { + addCriterion("main not between", value1, value2, "main"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDisposalProcessesIsNull() { + addCriterion("disposal_processes is null"); + return (Criteria) this; + } + + public Criteria andDisposalProcessesIsNotNull() { + addCriterion("disposal_processes is not null"); + return (Criteria) this; + } + + public Criteria andDisposalProcessesEqualTo(String value) { + addCriterion("disposal_processes =", value, "disposalProcesses"); + return (Criteria) this; + } + + public Criteria andDisposalProcessesNotEqualTo(String value) { + addCriterion("disposal_processes <>", value, "disposalProcesses"); + return (Criteria) this; + } + + public Criteria andDisposalProcessesGreaterThan(String value) { + addCriterion("disposal_processes >", value, "disposalProcesses"); + return (Criteria) this; + } + + public Criteria andDisposalProcessesGreaterThanOrEqualTo(String value) { + addCriterion("disposal_processes >=", value, "disposalProcesses"); + return (Criteria) this; + } + + public Criteria andDisposalProcessesLessThan(String value) { + addCriterion("disposal_processes <", value, "disposalProcesses"); + return (Criteria) this; + } + + public Criteria andDisposalProcessesLessThanOrEqualTo(String value) { + addCriterion("disposal_processes <=", value, "disposalProcesses"); + return (Criteria) this; + } + + public Criteria andDisposalProcessesLike(String value) { + addCriterion("disposal_processes like", value, "disposalProcesses"); + return (Criteria) this; + } + + public Criteria andDisposalProcessesNotLike(String value) { + addCriterion("disposal_processes not like", value, "disposalProcesses"); + return (Criteria) this; + } + + public Criteria andDisposalProcessesIn(List values) { + addCriterion("disposal_processes in", values, "disposalProcesses"); + return (Criteria) this; + } + + public Criteria andDisposalProcessesNotIn(List values) { + addCriterion("disposal_processes not in", values, "disposalProcesses"); + return (Criteria) this; + } + + public Criteria andDisposalProcessesBetween(String value1, String value2) { + addCriterion("disposal_processes between", value1, value2, "disposalProcesses"); + return (Criteria) this; + } + + public Criteria andDisposalProcessesNotBetween(String value1, String value2) { + addCriterion("disposal_processes not between", value1, value2, "disposalProcesses"); + return (Criteria) this; + } + + public Criteria andOperationScoreIsNull() { + addCriterion("operation_score is null"); + return (Criteria) this; + } + + public Criteria andOperationScoreIsNotNull() { + addCriterion("operation_score is not null"); + return (Criteria) this; + } + + public Criteria andOperationScoreEqualTo(Float value) { + addCriterion("operation_score =", value, "operationScore"); + return (Criteria) this; + } + + public Criteria andOperationScoreNotEqualTo(Float value) { + addCriterion("operation_score <>", value, "operationScore"); + return (Criteria) this; + } + + public Criteria andOperationScoreGreaterThan(Float value) { + addCriterion("operation_score >", value, "operationScore"); + return (Criteria) this; + } + + public Criteria andOperationScoreGreaterThanOrEqualTo(Float value) { + addCriterion("operation_score >=", value, "operationScore"); + return (Criteria) this; + } + + public Criteria andOperationScoreLessThan(Float value) { + addCriterion("operation_score <", value, "operationScore"); + return (Criteria) this; + } + + public Criteria andOperationScoreLessThanOrEqualTo(Float value) { + addCriterion("operation_score <=", value, "operationScore"); + return (Criteria) this; + } + + public Criteria andOperationScoreIn(List values) { + addCriterion("operation_score in", values, "operationScore"); + return (Criteria) this; + } + + public Criteria andOperationScoreNotIn(List values) { + addCriterion("operation_score not in", values, "operationScore"); + return (Criteria) this; + } + + public Criteria andOperationScoreBetween(Float value1, Float value2) { + addCriterion("operation_score between", value1, value2, "operationScore"); + return (Criteria) this; + } + + public Criteria andOperationScoreNotBetween(Float value1, Float value2) { + addCriterion("operation_score not between", value1, value2, "operationScore"); + return (Criteria) this; + } + + public Criteria andScriptIdIsNull() { + addCriterion("script_id is null"); + return (Criteria) this; + } + + public Criteria andScriptIdIsNotNull() { + addCriterion("script_id is not null"); + return (Criteria) this; + } + + public Criteria andScriptIdEqualTo(Long value) { + addCriterion("script_id =", value, "scriptId"); + return (Criteria) this; + } + + public Criteria andScriptIdNotEqualTo(Long value) { + addCriterion("script_id <>", value, "scriptId"); + return (Criteria) this; + } + + public Criteria andScriptIdGreaterThan(Long value) { + addCriterion("script_id >", value, "scriptId"); + return (Criteria) this; + } + + public Criteria andScriptIdGreaterThanOrEqualTo(Long value) { + addCriterion("script_id >=", value, "scriptId"); + return (Criteria) this; + } + + public Criteria andScriptIdLessThan(Long value) { + addCriterion("script_id <", value, "scriptId"); + return (Criteria) this; + } + + public Criteria andScriptIdLessThanOrEqualTo(Long value) { + addCriterion("script_id <=", value, "scriptId"); + return (Criteria) this; + } + + public Criteria andScriptIdIn(List values) { + addCriterion("script_id in", values, "scriptId"); + return (Criteria) this; + } + + public Criteria andScriptIdNotIn(List values) { + addCriterion("script_id not in", values, "scriptId"); + return (Criteria) this; + } + + public Criteria andScriptIdBetween(Long value1, Long value2) { + addCriterion("script_id between", value1, value2, "scriptId"); + return (Criteria) this; + } + + public Criteria andScriptIdNotBetween(Long value1, Long value2) { + addCriterion("script_id not between", value1, value2, "scriptId"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/CompetitionRecord.java b/src/main/java/club/joylink/rtss/entity/CompetitionRecord.java new file mode 100644 index 000000000..fae8d619a --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/CompetitionRecord.java @@ -0,0 +1,115 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * competition_record + * @author + */ +public class CompetitionRecord implements Serializable { + private Long id; + + private Long userId; + + private Long competitionId; + + /** + * 总得分 + */ + private Float score; + + /** + * 测验时间 + */ + private LocalDateTime dateTime; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public Long getCompetitionId() { + return competitionId; + } + + public void setCompetitionId(Long competitionId) { + this.competitionId = competitionId; + } + + public Float getScore() { + return score; + } + + public void setScore(Float score) { + this.score = score; + } + + public LocalDateTime getDateTime() { + return dateTime; + } + + public void setDateTime(LocalDateTime dateTime) { + this.dateTime = dateTime; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + CompetitionRecord other = (CompetitionRecord) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) + && (this.getCompetitionId() == null ? other.getCompetitionId() == null : this.getCompetitionId().equals(other.getCompetitionId())) + && (this.getScore() == null ? other.getScore() == null : this.getScore().equals(other.getScore())) + && (this.getDateTime() == null ? other.getDateTime() == null : this.getDateTime().equals(other.getDateTime())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); + result = prime * result + ((getCompetitionId() == null) ? 0 : getCompetitionId().hashCode()); + result = prime * result + ((getScore() == null) ? 0 : getScore().hashCode()); + result = prime * result + ((getDateTime() == null) ? 0 : getDateTime().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", userId=").append(userId); + sb.append(", competitionId=").append(competitionId); + sb.append(", score=").append(score); + sb.append(", dateTime=").append(dateTime); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/CompetitionRecordExample.java b/src/main/java/club/joylink/rtss/entity/CompetitionRecordExample.java new file mode 100644 index 000000000..0854457f8 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/CompetitionRecordExample.java @@ -0,0 +1,523 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class CompetitionRecordExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public CompetitionRecordExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andCompetitionIdIsNull() { + addCriterion("competition_id is null"); + return (Criteria) this; + } + + public Criteria andCompetitionIdIsNotNull() { + addCriterion("competition_id is not null"); + return (Criteria) this; + } + + public Criteria andCompetitionIdEqualTo(Long value) { + addCriterion("competition_id =", value, "competitionId"); + return (Criteria) this; + } + + public Criteria andCompetitionIdNotEqualTo(Long value) { + addCriterion("competition_id <>", value, "competitionId"); + return (Criteria) this; + } + + public Criteria andCompetitionIdGreaterThan(Long value) { + addCriterion("competition_id >", value, "competitionId"); + return (Criteria) this; + } + + public Criteria andCompetitionIdGreaterThanOrEqualTo(Long value) { + addCriterion("competition_id >=", value, "competitionId"); + return (Criteria) this; + } + + public Criteria andCompetitionIdLessThan(Long value) { + addCriterion("competition_id <", value, "competitionId"); + return (Criteria) this; + } + + public Criteria andCompetitionIdLessThanOrEqualTo(Long value) { + addCriterion("competition_id <=", value, "competitionId"); + return (Criteria) this; + } + + public Criteria andCompetitionIdIn(List values) { + addCriterion("competition_id in", values, "competitionId"); + return (Criteria) this; + } + + public Criteria andCompetitionIdNotIn(List values) { + addCriterion("competition_id not in", values, "competitionId"); + return (Criteria) this; + } + + public Criteria andCompetitionIdBetween(Long value1, Long value2) { + addCriterion("competition_id between", value1, value2, "competitionId"); + return (Criteria) this; + } + + public Criteria andCompetitionIdNotBetween(Long value1, Long value2) { + addCriterion("competition_id not between", value1, value2, "competitionId"); + return (Criteria) this; + } + + public Criteria andScoreIsNull() { + addCriterion("score is null"); + return (Criteria) this; + } + + public Criteria andScoreIsNotNull() { + addCriterion("score is not null"); + return (Criteria) this; + } + + public Criteria andScoreEqualTo(Float value) { + addCriterion("score =", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotEqualTo(Float value) { + addCriterion("score <>", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreGreaterThan(Float value) { + addCriterion("score >", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreGreaterThanOrEqualTo(Float value) { + addCriterion("score >=", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreLessThan(Float value) { + addCriterion("score <", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreLessThanOrEqualTo(Float value) { + addCriterion("score <=", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreIn(List values) { + addCriterion("score in", values, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotIn(List values) { + addCriterion("score not in", values, "score"); + return (Criteria) this; + } + + public Criteria andScoreBetween(Float value1, Float value2) { + addCriterion("score between", value1, value2, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotBetween(Float value1, Float value2) { + addCriterion("score not between", value1, value2, "score"); + return (Criteria) this; + } + + public Criteria andDateTimeIsNull() { + addCriterion("date_time is null"); + return (Criteria) this; + } + + public Criteria andDateTimeIsNotNull() { + addCriterion("date_time is not null"); + return (Criteria) this; + } + + public Criteria andDateTimeEqualTo(LocalDateTime value) { + addCriterion("date_time =", value, "dateTime"); + return (Criteria) this; + } + + public Criteria andDateTimeNotEqualTo(LocalDateTime value) { + addCriterion("date_time <>", value, "dateTime"); + return (Criteria) this; + } + + public Criteria andDateTimeGreaterThan(LocalDateTime value) { + addCriterion("date_time >", value, "dateTime"); + return (Criteria) this; + } + + public Criteria andDateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("date_time >=", value, "dateTime"); + return (Criteria) this; + } + + public Criteria andDateTimeLessThan(LocalDateTime value) { + addCriterion("date_time <", value, "dateTime"); + return (Criteria) this; + } + + public Criteria andDateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("date_time <=", value, "dateTime"); + return (Criteria) this; + } + + public Criteria andDateTimeIn(List values) { + addCriterion("date_time in", values, "dateTime"); + return (Criteria) this; + } + + public Criteria andDateTimeNotIn(List values) { + addCriterion("date_time not in", values, "dateTime"); + return (Criteria) this; + } + + public Criteria andDateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("date_time between", value1, value2, "dateTime"); + return (Criteria) this; + } + + public Criteria andDateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("date_time not between", value1, value2, "dateTime"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/CompetitionWithBLOBs.java b/src/main/java/club/joylink/rtss/entity/CompetitionWithBLOBs.java new file mode 100644 index 000000000..c51163887 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/CompetitionWithBLOBs.java @@ -0,0 +1,121 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * competition + * @author + */ +public class CompetitionWithBLOBs extends Competition implements Serializable { + /** + * 步骤定义 + */ + private String stepsJson; + + /** + * 指令评判规则 + */ + private String commandEvaluationRulesJson; + + /** + * 运营统计 + */ + private String operationStatisticsJson; + + /** + * 运营指标 + */ + private String operationIndexJson; + + private static final long serialVersionUID = 1L; + + public String getStepsJson() { + return stepsJson; + } + + public void setStepsJson(String stepsJson) { + this.stepsJson = stepsJson; + } + + public String getCommandEvaluationRulesJson() { + return commandEvaluationRulesJson; + } + + public void setCommandEvaluationRulesJson(String commandEvaluationRulesJson) { + this.commandEvaluationRulesJson = commandEvaluationRulesJson; + } + + public String getOperationStatisticsJson() { + return operationStatisticsJson; + } + + public void setOperationStatisticsJson(String operationStatisticsJson) { + this.operationStatisticsJson = operationStatisticsJson; + } + + public String getOperationIndexJson() { + return operationIndexJson; + } + + public void setOperationIndexJson(String operationIndexJson) { + this.operationIndexJson = operationIndexJson; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + CompetitionWithBLOBs other = (CompetitionWithBLOBs) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getMain() == null ? other.getMain() == null : this.getMain().equals(other.getMain())) + && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription())) + && (this.getDisposalProcesses() == null ? other.getDisposalProcesses() == null : this.getDisposalProcesses().equals(other.getDisposalProcesses())) + && (this.getOperationScore() == null ? other.getOperationScore() == null : this.getOperationScore().equals(other.getOperationScore())) + && (this.getScriptId() == null ? other.getScriptId() == null : this.getScriptId().equals(other.getScriptId())) + && (this.getStepsJson() == null ? other.getStepsJson() == null : this.getStepsJson().equals(other.getStepsJson())) + && (this.getCommandEvaluationRulesJson() == null ? other.getCommandEvaluationRulesJson() == null : this.getCommandEvaluationRulesJson().equals(other.getCommandEvaluationRulesJson())) + && (this.getOperationStatisticsJson() == null ? other.getOperationStatisticsJson() == null : this.getOperationStatisticsJson().equals(other.getOperationStatisticsJson())) + && (this.getOperationIndexJson() == null ? other.getOperationIndexJson() == null : this.getOperationIndexJson().equals(other.getOperationIndexJson())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getMain() == null) ? 0 : getMain().hashCode()); + result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode()); + result = prime * result + ((getDisposalProcesses() == null) ? 0 : getDisposalProcesses().hashCode()); + result = prime * result + ((getOperationScore() == null) ? 0 : getOperationScore().hashCode()); + result = prime * result + ((getScriptId() == null) ? 0 : getScriptId().hashCode()); + result = prime * result + ((getStepsJson() == null) ? 0 : getStepsJson().hashCode()); + result = prime * result + ((getCommandEvaluationRulesJson() == null) ? 0 : getCommandEvaluationRulesJson().hashCode()); + result = prime * result + ((getOperationStatisticsJson() == null) ? 0 : getOperationStatisticsJson().hashCode()); + result = prime * result + ((getOperationIndexJson() == null) ? 0 : getOperationIndexJson().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", stepsJson=").append(stepsJson); + sb.append(", commandEvaluationRulesJson=").append(commandEvaluationRulesJson); + sb.append(", operationStatisticsJson=").append(operationStatisticsJson); + sb.append(", operationIndexJson=").append(operationIndexJson); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/DraftIbp.java b/src/main/java/club/joylink/rtss/entity/DraftIbp.java new file mode 100644 index 000000000..b344b75a3 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/DraftIbp.java @@ -0,0 +1,42 @@ +package club.joylink.rtss.entity; + +import lombok.Data; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * @author + * IBP盘草稿图数据 + */ +@Data +public class DraftIbp implements Serializable { + private Long id; + + /** + * 所属地图ID + */ + private Long mapId; + + /** + * 车站编号 + */ + private String stationCode; + + /** + * 创建人 + */ + private Long creatorId; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + /** + * 绘图数据 + */ + private String data; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/DraftIbpExample.java b/src/main/java/club/joylink/rtss/entity/DraftIbpExample.java new file mode 100644 index 000000000..6f3e3fada --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/DraftIbpExample.java @@ -0,0 +1,533 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class DraftIbpExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public DraftIbpExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andStationCodeIsNull() { + addCriterion("station_code is null"); + return (Criteria) this; + } + + public Criteria andStationCodeIsNotNull() { + addCriterion("station_code is not null"); + return (Criteria) this; + } + + public Criteria andStationCodeEqualTo(String value) { + addCriterion("station_code =", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeNotEqualTo(String value) { + addCriterion("station_code <>", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeGreaterThan(String value) { + addCriterion("station_code >", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeGreaterThanOrEqualTo(String value) { + addCriterion("station_code >=", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeLessThan(String value) { + addCriterion("station_code <", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeLessThanOrEqualTo(String value) { + addCriterion("station_code <=", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeLike(String value) { + addCriterion("station_code like", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeNotLike(String value) { + addCriterion("station_code not like", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeIn(List values) { + addCriterion("station_code in", values, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeNotIn(List values) { + addCriterion("station_code not in", values, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeBetween(String value1, String value2) { + addCriterion("station_code between", value1, value2, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeNotBetween(String value1, String value2) { + addCriterion("station_code not between", value1, value2, "stationCode"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNull() { + addCriterion("creator_id is null"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNotNull() { + addCriterion("creator_id is not null"); + return (Criteria) this; + } + + public Criteria andCreatorIdEqualTo(Long value) { + addCriterion("creator_id =", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotEqualTo(Long value) { + addCriterion("creator_id <>", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThan(Long value) { + addCriterion("creator_id >", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) { + addCriterion("creator_id >=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThan(Long value) { + addCriterion("creator_id <", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThanOrEqualTo(Long value) { + addCriterion("creator_id <=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdIn(List values) { + addCriterion("creator_id in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotIn(List values) { + addCriterion("creator_id not in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdBetween(Long value1, Long value2) { + addCriterion("creator_id between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotBetween(Long value1, Long value2) { + addCriterion("creator_id not between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(LocalDateTime value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(LocalDateTime value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(LocalDateTime value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(LocalDateTime value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/DraftMap.java b/src/main/java/club/joylink/rtss/entity/DraftMap.java new file mode 100644 index 000000000..651ea39d4 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/DraftMap.java @@ -0,0 +1,137 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * draft_map + * @author + */ +public class DraftMap implements Serializable { + private Long id; + + /** + * 地图名称 + */ + private String name; + + /** + * 最后更新时间 + */ + private LocalDateTime updateTime; + + /** + * 作者id + */ + private Long authorId; + + /** + * 线路编码 + */ + private String lineCode; + + /** + * 图形绘制方式:0:旧;1:新方式 + */ + private Boolean drawWay; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public LocalDateTime getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(LocalDateTime updateTime) { + this.updateTime = updateTime; + } + + public Long getAuthorId() { + return authorId; + } + + public void setAuthorId(Long authorId) { + this.authorId = authorId; + } + + public String getLineCode() { + return lineCode; + } + + public void setLineCode(String lineCode) { + this.lineCode = lineCode; + } + + public Boolean getDrawWay() { + return drawWay; + } + + public void setDrawWay(Boolean drawWay) { + this.drawWay = drawWay; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + DraftMap other = (DraftMap) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) + && (this.getAuthorId() == null ? other.getAuthorId() == null : this.getAuthorId().equals(other.getAuthorId())) + && (this.getLineCode() == null ? other.getLineCode() == null : this.getLineCode().equals(other.getLineCode())) + && (this.getDrawWay() == null ? other.getDrawWay() == null : this.getDrawWay().equals(other.getDrawWay())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + result = prime * result + ((getAuthorId() == null) ? 0 : getAuthorId().hashCode()); + result = prime * result + ((getLineCode() == null) ? 0 : getLineCode().hashCode()); + result = prime * result + ((getDrawWay() == null) ? 0 : getDrawWay().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", name=").append(name); + sb.append(", updateTime=").append(updateTime); + sb.append(", authorId=").append(authorId); + sb.append(", lineCode=").append(lineCode); + sb.append(", drawWay=").append(drawWay); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/DraftMap3dData.java b/src/main/java/club/joylink/rtss/entity/DraftMap3dData.java new file mode 100644 index 000000000..6bbae60e3 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/DraftMap3dData.java @@ -0,0 +1,121 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * draft_map_3d_data + * @author + */ +public class DraftMap3dData implements Serializable { + private Long id; + + /** + * 地图ID + */ + private Long mapId; + + /** + * 创建人id + */ + private Long creatorId; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + /** + * 更新时间 + */ + private LocalDateTime updateTime; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getMapId() { + return mapId; + } + + public void setMapId(Long mapId) { + this.mapId = mapId; + } + + public Long getCreatorId() { + return creatorId; + } + + public void setCreatorId(Long creatorId) { + this.creatorId = creatorId; + } + + public LocalDateTime getCreateTime() { + return createTime; + } + + public void setCreateTime(LocalDateTime createTime) { + this.createTime = createTime; + } + + public LocalDateTime getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(LocalDateTime updateTime) { + this.updateTime = updateTime; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + DraftMap3dData other = (DraftMap3dData) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", mapId=").append(mapId); + sb.append(", creatorId=").append(creatorId); + sb.append(", createTime=").append(createTime); + sb.append(", updateTime=").append(updateTime); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/DraftMap3dDataExample.java b/src/main/java/club/joylink/rtss/entity/DraftMap3dDataExample.java new file mode 100644 index 000000000..4fc9bc7b4 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/DraftMap3dDataExample.java @@ -0,0 +1,523 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class DraftMap3dDataExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public DraftMap3dDataExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNull() { + addCriterion("creator_id is null"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNotNull() { + addCriterion("creator_id is not null"); + return (Criteria) this; + } + + public Criteria andCreatorIdEqualTo(Long value) { + addCriterion("creator_id =", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotEqualTo(Long value) { + addCriterion("creator_id <>", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThan(Long value) { + addCriterion("creator_id >", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) { + addCriterion("creator_id >=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThan(Long value) { + addCriterion("creator_id <", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThanOrEqualTo(Long value) { + addCriterion("creator_id <=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdIn(List values) { + addCriterion("creator_id in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotIn(List values) { + addCriterion("creator_id not in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdBetween(Long value1, Long value2) { + addCriterion("creator_id between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotBetween(Long value1, Long value2) { + addCriterion("creator_id not between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(LocalDateTime value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(LocalDateTime value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(LocalDateTime value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(LocalDateTime value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(LocalDateTime value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(LocalDateTime value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(LocalDateTime value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(LocalDateTime value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/DraftMap3dDataWithBLOBs.java b/src/main/java/club/joylink/rtss/entity/DraftMap3dDataWithBLOBs.java new file mode 100644 index 000000000..2742dd9d0 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/DraftMap3dDataWithBLOBs.java @@ -0,0 +1,149 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * draft_map_3d_data + * @author + */ +public class DraftMap3dDataWithBLOBs extends DraftMap3dData implements Serializable { + /** + * 加载的资源数据 + */ + private String assets; + + /** + * 区段数据 + */ + private String sections; + + /** + * 道岔数据 + */ + private String switchs; + + /** + * 信号机数据 + */ + private String signals; + + /** + * 站台数据 + */ + private String stands; + + /** + * 列车数据 + */ + private String trains; + + private static final long serialVersionUID = 1L; + + public String getAssets() { + return assets; + } + + public void setAssets(String assets) { + this.assets = assets; + } + + public String getSections() { + return sections; + } + + public void setSections(String sections) { + this.sections = sections; + } + + public String getSwitchs() { + return switchs; + } + + public void setSwitchs(String switchs) { + this.switchs = switchs; + } + + public String getSignals() { + return signals; + } + + public void setSignals(String signals) { + this.signals = signals; + } + + public String getStands() { + return stands; + } + + public void setStands(String stands) { + this.stands = stands; + } + + public String getTrains() { + return trains; + } + + public void setTrains(String trains) { + this.trains = trains; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + DraftMap3dDataWithBLOBs other = (DraftMap3dDataWithBLOBs) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) + && (this.getAssets() == null ? other.getAssets() == null : this.getAssets().equals(other.getAssets())) + && (this.getSections() == null ? other.getSections() == null : this.getSections().equals(other.getSections())) + && (this.getSwitchs() == null ? other.getSwitchs() == null : this.getSwitchs().equals(other.getSwitchs())) + && (this.getSignals() == null ? other.getSignals() == null : this.getSignals().equals(other.getSignals())) + && (this.getStands() == null ? other.getStands() == null : this.getStands().equals(other.getStands())) + && (this.getTrains() == null ? other.getTrains() == null : this.getTrains().equals(other.getTrains())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + result = prime * result + ((getAssets() == null) ? 0 : getAssets().hashCode()); + result = prime * result + ((getSections() == null) ? 0 : getSections().hashCode()); + result = prime * result + ((getSwitchs() == null) ? 0 : getSwitchs().hashCode()); + result = prime * result + ((getSignals() == null) ? 0 : getSignals().hashCode()); + result = prime * result + ((getStands() == null) ? 0 : getStands().hashCode()); + result = prime * result + ((getTrains() == null) ? 0 : getTrains().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", assets=").append(assets); + sb.append(", sections=").append(sections); + sb.append(", switchs=").append(switchs); + sb.append(", signals=").append(signals); + sb.append(", stands=").append(stands); + sb.append(", trains=").append(trains); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/DraftMapAutoReentry.java b/src/main/java/club/joylink/rtss/entity/DraftMapAutoReentry.java new file mode 100644 index 000000000..edb0bc78a --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/DraftMapAutoReentry.java @@ -0,0 +1,120 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * draft_map_auto_reentry + * @author + */ +public class DraftMapAutoReentry implements Serializable { + private Long id; + + /** + * 自动折返唯一编号 + */ + private String code; + + /** + * 名称 + */ + private String name; + + /** + * 所属地图ID + */ + private Long mapId; + + /** + * 关联数据 + */ + private String relData; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Long getMapId() { + return mapId; + } + + public void setMapId(Long mapId) { + this.mapId = mapId; + } + + public String getRelData() { + return relData; + } + + public void setRelData(String relData) { + this.relData = relData; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + DraftMapAutoReentry other = (DraftMapAutoReentry) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getRelData() == null ? other.getRelData() == null : this.getRelData().equals(other.getRelData())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getRelData() == null) ? 0 : getRelData().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", code=").append(code); + sb.append(", name=").append(name); + sb.append(", mapId=").append(mapId); + sb.append(", relData=").append(relData); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/DraftMapAutoReentryExample.java b/src/main/java/club/joylink/rtss/entity/DraftMapAutoReentryExample.java new file mode 100644 index 000000000..ce104d08c --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/DraftMapAutoReentryExample.java @@ -0,0 +1,482 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class DraftMapAutoReentryExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public DraftMapAutoReentryExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCodeIsNull() { + addCriterion("code is null"); + return (Criteria) this; + } + + public Criteria andCodeIsNotNull() { + addCriterion("code is not null"); + return (Criteria) this; + } + + public Criteria andCodeEqualTo(String value) { + addCriterion("code =", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotEqualTo(String value) { + addCriterion("code <>", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThan(String value) { + addCriterion("code >", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThanOrEqualTo(String value) { + addCriterion("code >=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThan(String value) { + addCriterion("code <", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThanOrEqualTo(String value) { + addCriterion("code <=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLike(String value) { + addCriterion("code like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotLike(String value) { + addCriterion("code not like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeIn(List values) { + addCriterion("code in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotIn(List values) { + addCriterion("code not in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeBetween(String value1, String value2) { + addCriterion("code between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotBetween(String value1, String value2) { + addCriterion("code not between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/DraftMapAutoSignal.java b/src/main/java/club/joylink/rtss/entity/DraftMapAutoSignal.java new file mode 100644 index 000000000..97630feb7 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/DraftMapAutoSignal.java @@ -0,0 +1,111 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * draft_map_auto_signal + * @author + */ +public class DraftMapAutoSignal implements Serializable { + private Long id; + + private Long mapId; + + private String code; + + private String signalCode; + + /** + * 关联数据 + */ + private String relData; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getMapId() { + return mapId; + } + + public void setMapId(Long mapId) { + this.mapId = mapId; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getSignalCode() { + return signalCode; + } + + public void setSignalCode(String signalCode) { + this.signalCode = signalCode; + } + + public String getRelData() { + return relData; + } + + public void setRelData(String relData) { + this.relData = relData; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + DraftMapAutoSignal other = (DraftMapAutoSignal) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode())) + && (this.getSignalCode() == null ? other.getSignalCode() == null : this.getSignalCode().equals(other.getSignalCode())) + && (this.getRelData() == null ? other.getRelData() == null : this.getRelData().equals(other.getRelData())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode()); + result = prime * result + ((getSignalCode() == null) ? 0 : getSignalCode().hashCode()); + result = prime * result + ((getRelData() == null) ? 0 : getRelData().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", mapId=").append(mapId); + sb.append(", code=").append(code); + sb.append(", signalCode=").append(signalCode); + sb.append(", relData=").append(relData); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/DraftMapAutoSignalExample.java b/src/main/java/club/joylink/rtss/entity/DraftMapAutoSignalExample.java new file mode 100644 index 000000000..fc625e98f --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/DraftMapAutoSignalExample.java @@ -0,0 +1,482 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class DraftMapAutoSignalExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public DraftMapAutoSignalExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andCodeIsNull() { + addCriterion("code is null"); + return (Criteria) this; + } + + public Criteria andCodeIsNotNull() { + addCriterion("code is not null"); + return (Criteria) this; + } + + public Criteria andCodeEqualTo(String value) { + addCriterion("code =", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotEqualTo(String value) { + addCriterion("code <>", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThan(String value) { + addCriterion("code >", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThanOrEqualTo(String value) { + addCriterion("code >=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThan(String value) { + addCriterion("code <", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThanOrEqualTo(String value) { + addCriterion("code <=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLike(String value) { + addCriterion("code like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotLike(String value) { + addCriterion("code not like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeIn(List values) { + addCriterion("code in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotIn(List values) { + addCriterion("code not in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeBetween(String value1, String value2) { + addCriterion("code between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotBetween(String value1, String value2) { + addCriterion("code not between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andSignalCodeIsNull() { + addCriterion("signal_code is null"); + return (Criteria) this; + } + + public Criteria andSignalCodeIsNotNull() { + addCriterion("signal_code is not null"); + return (Criteria) this; + } + + public Criteria andSignalCodeEqualTo(String value) { + addCriterion("signal_code =", value, "signalCode"); + return (Criteria) this; + } + + public Criteria andSignalCodeNotEqualTo(String value) { + addCriterion("signal_code <>", value, "signalCode"); + return (Criteria) this; + } + + public Criteria andSignalCodeGreaterThan(String value) { + addCriterion("signal_code >", value, "signalCode"); + return (Criteria) this; + } + + public Criteria andSignalCodeGreaterThanOrEqualTo(String value) { + addCriterion("signal_code >=", value, "signalCode"); + return (Criteria) this; + } + + public Criteria andSignalCodeLessThan(String value) { + addCriterion("signal_code <", value, "signalCode"); + return (Criteria) this; + } + + public Criteria andSignalCodeLessThanOrEqualTo(String value) { + addCriterion("signal_code <=", value, "signalCode"); + return (Criteria) this; + } + + public Criteria andSignalCodeLike(String value) { + addCriterion("signal_code like", value, "signalCode"); + return (Criteria) this; + } + + public Criteria andSignalCodeNotLike(String value) { + addCriterion("signal_code not like", value, "signalCode"); + return (Criteria) this; + } + + public Criteria andSignalCodeIn(List values) { + addCriterion("signal_code in", values, "signalCode"); + return (Criteria) this; + } + + public Criteria andSignalCodeNotIn(List values) { + addCriterion("signal_code not in", values, "signalCode"); + return (Criteria) this; + } + + public Criteria andSignalCodeBetween(String value1, String value2) { + addCriterion("signal_code between", value1, value2, "signalCode"); + return (Criteria) this; + } + + public Criteria andSignalCodeNotBetween(String value1, String value2) { + addCriterion("signal_code not between", value1, value2, "signalCode"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/DraftMapExample.java b/src/main/java/club/joylink/rtss/entity/DraftMapExample.java new file mode 100644 index 000000000..71b94fc75 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/DraftMapExample.java @@ -0,0 +1,603 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class DraftMapExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public DraftMapExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(LocalDateTime value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(LocalDateTime value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(LocalDateTime value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(LocalDateTime value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andAuthorIdIsNull() { + addCriterion("author_id is null"); + return (Criteria) this; + } + + public Criteria andAuthorIdIsNotNull() { + addCriterion("author_id is not null"); + return (Criteria) this; + } + + public Criteria andAuthorIdEqualTo(Long value) { + addCriterion("author_id =", value, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdNotEqualTo(Long value) { + addCriterion("author_id <>", value, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdGreaterThan(Long value) { + addCriterion("author_id >", value, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdGreaterThanOrEqualTo(Long value) { + addCriterion("author_id >=", value, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdLessThan(Long value) { + addCriterion("author_id <", value, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdLessThanOrEqualTo(Long value) { + addCriterion("author_id <=", value, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdIn(List values) { + addCriterion("author_id in", values, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdNotIn(List values) { + addCriterion("author_id not in", values, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdBetween(Long value1, Long value2) { + addCriterion("author_id between", value1, value2, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdNotBetween(Long value1, Long value2) { + addCriterion("author_id not between", value1, value2, "authorId"); + return (Criteria) this; + } + + public Criteria andLineCodeIsNull() { + addCriterion("line_code is null"); + return (Criteria) this; + } + + public Criteria andLineCodeIsNotNull() { + addCriterion("line_code is not null"); + return (Criteria) this; + } + + public Criteria andLineCodeEqualTo(String value) { + addCriterion("line_code =", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeNotEqualTo(String value) { + addCriterion("line_code <>", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeGreaterThan(String value) { + addCriterion("line_code >", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeGreaterThanOrEqualTo(String value) { + addCriterion("line_code >=", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeLessThan(String value) { + addCriterion("line_code <", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeLessThanOrEqualTo(String value) { + addCriterion("line_code <=", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeLike(String value) { + addCriterion("line_code like", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeNotLike(String value) { + addCriterion("line_code not like", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeIn(List values) { + addCriterion("line_code in", values, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeNotIn(List values) { + addCriterion("line_code not in", values, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeBetween(String value1, String value2) { + addCriterion("line_code between", value1, value2, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeNotBetween(String value1, String value2) { + addCriterion("line_code not between", value1, value2, "lineCode"); + return (Criteria) this; + } + + public Criteria andDrawWayIsNull() { + addCriterion("draw_way is null"); + return (Criteria) this; + } + + public Criteria andDrawWayIsNotNull() { + addCriterion("draw_way is not null"); + return (Criteria) this; + } + + public Criteria andDrawWayEqualTo(Boolean value) { + addCriterion("draw_way =", value, "drawWay"); + return (Criteria) this; + } + + public Criteria andDrawWayNotEqualTo(Boolean value) { + addCriterion("draw_way <>", value, "drawWay"); + return (Criteria) this; + } + + public Criteria andDrawWayGreaterThan(Boolean value) { + addCriterion("draw_way >", value, "drawWay"); + return (Criteria) this; + } + + public Criteria andDrawWayGreaterThanOrEqualTo(Boolean value) { + addCriterion("draw_way >=", value, "drawWay"); + return (Criteria) this; + } + + public Criteria andDrawWayLessThan(Boolean value) { + addCriterion("draw_way <", value, "drawWay"); + return (Criteria) this; + } + + public Criteria andDrawWayLessThanOrEqualTo(Boolean value) { + addCriterion("draw_way <=", value, "drawWay"); + return (Criteria) this; + } + + public Criteria andDrawWayIn(List values) { + addCriterion("draw_way in", values, "drawWay"); + return (Criteria) this; + } + + public Criteria andDrawWayNotIn(List values) { + addCriterion("draw_way not in", values, "drawWay"); + return (Criteria) this; + } + + public Criteria andDrawWayBetween(Boolean value1, Boolean value2) { + addCriterion("draw_way between", value1, value2, "drawWay"); + return (Criteria) this; + } + + public Criteria andDrawWayNotBetween(Boolean value1, Boolean value2) { + addCriterion("draw_way not between", value1, value2, "drawWay"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/DraftMapOverlap.java b/src/main/java/club/joylink/rtss/entity/DraftMapOverlap.java new file mode 100644 index 000000000..e5a7c01b0 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/DraftMapOverlap.java @@ -0,0 +1,36 @@ +package club.joylink.rtss.entity; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author + * 延续保护对象 + */ +@Data +public class DraftMapOverlap implements Serializable { + private Long id; + + /** + * 延续保护唯一编码 + */ + private String code; + + /** + * 延续保护名称 + */ + private String name; + + /** + * 所属地图id + */ + private Long mapId; + + /** + * 关联数据 + */ + private String relData; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/DraftMapOverlapExample.java b/src/main/java/club/joylink/rtss/entity/DraftMapOverlapExample.java new file mode 100644 index 000000000..f72a37a4d --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/DraftMapOverlapExample.java @@ -0,0 +1,482 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class DraftMapOverlapExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public DraftMapOverlapExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCodeIsNull() { + addCriterion("code is null"); + return (Criteria) this; + } + + public Criteria andCodeIsNotNull() { + addCriterion("code is not null"); + return (Criteria) this; + } + + public Criteria andCodeEqualTo(String value) { + addCriterion("code =", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotEqualTo(String value) { + addCriterion("code <>", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThan(String value) { + addCriterion("code >", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThanOrEqualTo(String value) { + addCriterion("code >=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThan(String value) { + addCriterion("code <", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThanOrEqualTo(String value) { + addCriterion("code <=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLike(String value) { + addCriterion("code like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotLike(String value) { + addCriterion("code not like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeIn(List values) { + addCriterion("code in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotIn(List values) { + addCriterion("code not in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeBetween(String value1, String value2) { + addCriterion("code between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotBetween(String value1, String value2) { + addCriterion("code not between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/DraftMapParkingTime.java b/src/main/java/club/joylink/rtss/entity/DraftMapParkingTime.java new file mode 100644 index 000000000..6907a2e68 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/DraftMapParkingTime.java @@ -0,0 +1,31 @@ +package club.joylink.rtss.entity; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author + * 草稿车站停站时间 + */ +@Data +public class DraftMapParkingTime implements Serializable { + private Long id; + + /** + * 所属地图id + */ + private Long mapId; + + /** + * 车站code + */ + private String stationCode; + + /** + * 此车站下站台区段停站时间 + */ + private String sectionParkingTime; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/DraftMapParkingTimeExample.java b/src/main/java/club/joylink/rtss/entity/DraftMapParkingTimeExample.java new file mode 100644 index 000000000..32dffd3a2 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/DraftMapParkingTimeExample.java @@ -0,0 +1,412 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class DraftMapParkingTimeExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public DraftMapParkingTimeExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andStationCodeIsNull() { + addCriterion("station_code is null"); + return (Criteria) this; + } + + public Criteria andStationCodeIsNotNull() { + addCriterion("station_code is not null"); + return (Criteria) this; + } + + public Criteria andStationCodeEqualTo(String value) { + addCriterion("station_code =", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeNotEqualTo(String value) { + addCriterion("station_code <>", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeGreaterThan(String value) { + addCriterion("station_code >", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeGreaterThanOrEqualTo(String value) { + addCriterion("station_code >=", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeLessThan(String value) { + addCriterion("station_code <", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeLessThanOrEqualTo(String value) { + addCriterion("station_code <=", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeLike(String value) { + addCriterion("station_code like", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeNotLike(String value) { + addCriterion("station_code not like", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeIn(List values) { + addCriterion("station_code in", values, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeNotIn(List values) { + addCriterion("station_code not in", values, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeBetween(String value1, String value2) { + addCriterion("station_code between", value1, value2, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeNotBetween(String value1, String value2) { + addCriterion("station_code not between", value1, value2, "stationCode"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/DraftMapRoute.java b/src/main/java/club/joylink/rtss/entity/DraftMapRoute.java new file mode 100644 index 000000000..d3927d8ca --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/DraftMapRoute.java @@ -0,0 +1,184 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * draft_map_route + * @author + */ +public class DraftMapRoute implements Serializable { + private Long id; + + /** + * 所属地图ID + */ + private Long mapId; + + /** + * 名称 + */ + private String name; + + /** + * 进路唯一编号 + */ + private String code; + + /** + * 所属车站 编号 + */ + private String stationCode; + + /** + * 始端信号机 编号 + */ + private String startSignalCode; + + /** + * 终端信号机 编号 + */ + private String endSignalCode; + + /** + * 接近区段 编号 + */ + private String nearSectionCode; + + /** + * 关联数据 + */ + private String relData; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getMapId() { + return mapId; + } + + public void setMapId(Long mapId) { + this.mapId = mapId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getStationCode() { + return stationCode; + } + + public void setStationCode(String stationCode) { + this.stationCode = stationCode; + } + + public String getStartSignalCode() { + return startSignalCode; + } + + public void setStartSignalCode(String startSignalCode) { + this.startSignalCode = startSignalCode; + } + + public String getEndSignalCode() { + return endSignalCode; + } + + public void setEndSignalCode(String endSignalCode) { + this.endSignalCode = endSignalCode; + } + + public String getNearSectionCode() { + return nearSectionCode; + } + + public void setNearSectionCode(String nearSectionCode) { + this.nearSectionCode = nearSectionCode; + } + + public String getRelData() { + return relData; + } + + public void setRelData(String relData) { + this.relData = relData; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + DraftMapRoute other = (DraftMapRoute) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode())) + && (this.getStationCode() == null ? other.getStationCode() == null : this.getStationCode().equals(other.getStationCode())) + && (this.getStartSignalCode() == null ? other.getStartSignalCode() == null : this.getStartSignalCode().equals(other.getStartSignalCode())) + && (this.getEndSignalCode() == null ? other.getEndSignalCode() == null : this.getEndSignalCode().equals(other.getEndSignalCode())) + && (this.getNearSectionCode() == null ? other.getNearSectionCode() == null : this.getNearSectionCode().equals(other.getNearSectionCode())) + && (this.getRelData() == null ? other.getRelData() == null : this.getRelData().equals(other.getRelData())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode()); + result = prime * result + ((getStationCode() == null) ? 0 : getStationCode().hashCode()); + result = prime * result + ((getStartSignalCode() == null) ? 0 : getStartSignalCode().hashCode()); + result = prime * result + ((getEndSignalCode() == null) ? 0 : getEndSignalCode().hashCode()); + result = prime * result + ((getNearSectionCode() == null) ? 0 : getNearSectionCode().hashCode()); + result = prime * result + ((getRelData() == null) ? 0 : getRelData().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", mapId=").append(mapId); + sb.append(", name=").append(name); + sb.append(", code=").append(code); + sb.append(", stationCode=").append(stationCode); + sb.append(", startSignalCode=").append(startSignalCode); + sb.append(", endSignalCode=").append(endSignalCode); + sb.append(", nearSectionCode=").append(nearSectionCode); + sb.append(", relData=").append(relData); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/DraftMapRouteExample.java b/src/main/java/club/joylink/rtss/entity/DraftMapRouteExample.java new file mode 100644 index 000000000..bc415d2f4 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/DraftMapRouteExample.java @@ -0,0 +1,762 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class DraftMapRouteExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public DraftMapRouteExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andCodeIsNull() { + addCriterion("code is null"); + return (Criteria) this; + } + + public Criteria andCodeIsNotNull() { + addCriterion("code is not null"); + return (Criteria) this; + } + + public Criteria andCodeEqualTo(String value) { + addCriterion("code =", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotEqualTo(String value) { + addCriterion("code <>", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThan(String value) { + addCriterion("code >", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThanOrEqualTo(String value) { + addCriterion("code >=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThan(String value) { + addCriterion("code <", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThanOrEqualTo(String value) { + addCriterion("code <=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLike(String value) { + addCriterion("code like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotLike(String value) { + addCriterion("code not like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeIn(List values) { + addCriterion("code in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotIn(List values) { + addCriterion("code not in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeBetween(String value1, String value2) { + addCriterion("code between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotBetween(String value1, String value2) { + addCriterion("code not between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andStationCodeIsNull() { + addCriterion("station_code is null"); + return (Criteria) this; + } + + public Criteria andStationCodeIsNotNull() { + addCriterion("station_code is not null"); + return (Criteria) this; + } + + public Criteria andStationCodeEqualTo(String value) { + addCriterion("station_code =", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeNotEqualTo(String value) { + addCriterion("station_code <>", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeGreaterThan(String value) { + addCriterion("station_code >", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeGreaterThanOrEqualTo(String value) { + addCriterion("station_code >=", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeLessThan(String value) { + addCriterion("station_code <", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeLessThanOrEqualTo(String value) { + addCriterion("station_code <=", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeLike(String value) { + addCriterion("station_code like", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeNotLike(String value) { + addCriterion("station_code not like", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeIn(List values) { + addCriterion("station_code in", values, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeNotIn(List values) { + addCriterion("station_code not in", values, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeBetween(String value1, String value2) { + addCriterion("station_code between", value1, value2, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeNotBetween(String value1, String value2) { + addCriterion("station_code not between", value1, value2, "stationCode"); + return (Criteria) this; + } + + public Criteria andStartSignalCodeIsNull() { + addCriterion("start_signal_code is null"); + return (Criteria) this; + } + + public Criteria andStartSignalCodeIsNotNull() { + addCriterion("start_signal_code is not null"); + return (Criteria) this; + } + + public Criteria andStartSignalCodeEqualTo(String value) { + addCriterion("start_signal_code =", value, "startSignalCode"); + return (Criteria) this; + } + + public Criteria andStartSignalCodeNotEqualTo(String value) { + addCriterion("start_signal_code <>", value, "startSignalCode"); + return (Criteria) this; + } + + public Criteria andStartSignalCodeGreaterThan(String value) { + addCriterion("start_signal_code >", value, "startSignalCode"); + return (Criteria) this; + } + + public Criteria andStartSignalCodeGreaterThanOrEqualTo(String value) { + addCriterion("start_signal_code >=", value, "startSignalCode"); + return (Criteria) this; + } + + public Criteria andStartSignalCodeLessThan(String value) { + addCriterion("start_signal_code <", value, "startSignalCode"); + return (Criteria) this; + } + + public Criteria andStartSignalCodeLessThanOrEqualTo(String value) { + addCriterion("start_signal_code <=", value, "startSignalCode"); + return (Criteria) this; + } + + public Criteria andStartSignalCodeLike(String value) { + addCriterion("start_signal_code like", value, "startSignalCode"); + return (Criteria) this; + } + + public Criteria andStartSignalCodeNotLike(String value) { + addCriterion("start_signal_code not like", value, "startSignalCode"); + return (Criteria) this; + } + + public Criteria andStartSignalCodeIn(List values) { + addCriterion("start_signal_code in", values, "startSignalCode"); + return (Criteria) this; + } + + public Criteria andStartSignalCodeNotIn(List values) { + addCriterion("start_signal_code not in", values, "startSignalCode"); + return (Criteria) this; + } + + public Criteria andStartSignalCodeBetween(String value1, String value2) { + addCriterion("start_signal_code between", value1, value2, "startSignalCode"); + return (Criteria) this; + } + + public Criteria andStartSignalCodeNotBetween(String value1, String value2) { + addCriterion("start_signal_code not between", value1, value2, "startSignalCode"); + return (Criteria) this; + } + + public Criteria andEndSignalCodeIsNull() { + addCriterion("end_signal_code is null"); + return (Criteria) this; + } + + public Criteria andEndSignalCodeIsNotNull() { + addCriterion("end_signal_code is not null"); + return (Criteria) this; + } + + public Criteria andEndSignalCodeEqualTo(String value) { + addCriterion("end_signal_code =", value, "endSignalCode"); + return (Criteria) this; + } + + public Criteria andEndSignalCodeNotEqualTo(String value) { + addCriterion("end_signal_code <>", value, "endSignalCode"); + return (Criteria) this; + } + + public Criteria andEndSignalCodeGreaterThan(String value) { + addCriterion("end_signal_code >", value, "endSignalCode"); + return (Criteria) this; + } + + public Criteria andEndSignalCodeGreaterThanOrEqualTo(String value) { + addCriterion("end_signal_code >=", value, "endSignalCode"); + return (Criteria) this; + } + + public Criteria andEndSignalCodeLessThan(String value) { + addCriterion("end_signal_code <", value, "endSignalCode"); + return (Criteria) this; + } + + public Criteria andEndSignalCodeLessThanOrEqualTo(String value) { + addCriterion("end_signal_code <=", value, "endSignalCode"); + return (Criteria) this; + } + + public Criteria andEndSignalCodeLike(String value) { + addCriterion("end_signal_code like", value, "endSignalCode"); + return (Criteria) this; + } + + public Criteria andEndSignalCodeNotLike(String value) { + addCriterion("end_signal_code not like", value, "endSignalCode"); + return (Criteria) this; + } + + public Criteria andEndSignalCodeIn(List values) { + addCriterion("end_signal_code in", values, "endSignalCode"); + return (Criteria) this; + } + + public Criteria andEndSignalCodeNotIn(List values) { + addCriterion("end_signal_code not in", values, "endSignalCode"); + return (Criteria) this; + } + + public Criteria andEndSignalCodeBetween(String value1, String value2) { + addCriterion("end_signal_code between", value1, value2, "endSignalCode"); + return (Criteria) this; + } + + public Criteria andEndSignalCodeNotBetween(String value1, String value2) { + addCriterion("end_signal_code not between", value1, value2, "endSignalCode"); + return (Criteria) this; + } + + public Criteria andNearSectionCodeIsNull() { + addCriterion("near_section_code is null"); + return (Criteria) this; + } + + public Criteria andNearSectionCodeIsNotNull() { + addCriterion("near_section_code is not null"); + return (Criteria) this; + } + + public Criteria andNearSectionCodeEqualTo(String value) { + addCriterion("near_section_code =", value, "nearSectionCode"); + return (Criteria) this; + } + + public Criteria andNearSectionCodeNotEqualTo(String value) { + addCriterion("near_section_code <>", value, "nearSectionCode"); + return (Criteria) this; + } + + public Criteria andNearSectionCodeGreaterThan(String value) { + addCriterion("near_section_code >", value, "nearSectionCode"); + return (Criteria) this; + } + + public Criteria andNearSectionCodeGreaterThanOrEqualTo(String value) { + addCriterion("near_section_code >=", value, "nearSectionCode"); + return (Criteria) this; + } + + public Criteria andNearSectionCodeLessThan(String value) { + addCriterion("near_section_code <", value, "nearSectionCode"); + return (Criteria) this; + } + + public Criteria andNearSectionCodeLessThanOrEqualTo(String value) { + addCriterion("near_section_code <=", value, "nearSectionCode"); + return (Criteria) this; + } + + public Criteria andNearSectionCodeLike(String value) { + addCriterion("near_section_code like", value, "nearSectionCode"); + return (Criteria) this; + } + + public Criteria andNearSectionCodeNotLike(String value) { + addCriterion("near_section_code not like", value, "nearSectionCode"); + return (Criteria) this; + } + + public Criteria andNearSectionCodeIn(List values) { + addCriterion("near_section_code in", values, "nearSectionCode"); + return (Criteria) this; + } + + public Criteria andNearSectionCodeNotIn(List values) { + addCriterion("near_section_code not in", values, "nearSectionCode"); + return (Criteria) this; + } + + public Criteria andNearSectionCodeBetween(String value1, String value2) { + addCriterion("near_section_code between", value1, value2, "nearSectionCode"); + return (Criteria) this; + } + + public Criteria andNearSectionCodeNotBetween(String value1, String value2) { + addCriterion("near_section_code not between", value1, value2, "nearSectionCode"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/DraftMapRouteFlankProtection.java b/src/main/java/club/joylink/rtss/entity/DraftMapRouteFlankProtection.java new file mode 100644 index 000000000..fd6503f6b --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/DraftMapRouteFlankProtection.java @@ -0,0 +1,46 @@ +package club.joylink.rtss.entity; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author + * + */ +@Data +public class DraftMapRouteFlankProtection implements Serializable { + private Long id; + + /** + * 所属草稿地图id + */ + private Long mapId; + + /** + * 唯一编码 + */ + private String code; + + /** + * 所属联锁站唯一编码 + */ + private String stationCode; + + /** + * 编号 + */ + private String number; + + /** + * 名称 + */ + private String name; + + /** + * 详细数据 + */ + private String detailData; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/DraftMapRouteFlankProtectionExample.java b/src/main/java/club/joylink/rtss/entity/DraftMapRouteFlankProtectionExample.java new file mode 100644 index 000000000..2adaf1fa8 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/DraftMapRouteFlankProtectionExample.java @@ -0,0 +1,622 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class DraftMapRouteFlankProtectionExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public DraftMapRouteFlankProtectionExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andCodeIsNull() { + addCriterion("code is null"); + return (Criteria) this; + } + + public Criteria andCodeIsNotNull() { + addCriterion("code is not null"); + return (Criteria) this; + } + + public Criteria andCodeEqualTo(String value) { + addCriterion("code =", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotEqualTo(String value) { + addCriterion("code <>", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThan(String value) { + addCriterion("code >", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThanOrEqualTo(String value) { + addCriterion("code >=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThan(String value) { + addCriterion("code <", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThanOrEqualTo(String value) { + addCriterion("code <=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLike(String value) { + addCriterion("code like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotLike(String value) { + addCriterion("code not like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeIn(List values) { + addCriterion("code in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotIn(List values) { + addCriterion("code not in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeBetween(String value1, String value2) { + addCriterion("code between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotBetween(String value1, String value2) { + addCriterion("code not between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andStationCodeIsNull() { + addCriterion("station_code is null"); + return (Criteria) this; + } + + public Criteria andStationCodeIsNotNull() { + addCriterion("station_code is not null"); + return (Criteria) this; + } + + public Criteria andStationCodeEqualTo(String value) { + addCriterion("station_code =", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeNotEqualTo(String value) { + addCriterion("station_code <>", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeGreaterThan(String value) { + addCriterion("station_code >", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeGreaterThanOrEqualTo(String value) { + addCriterion("station_code >=", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeLessThan(String value) { + addCriterion("station_code <", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeLessThanOrEqualTo(String value) { + addCriterion("station_code <=", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeLike(String value) { + addCriterion("station_code like", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeNotLike(String value) { + addCriterion("station_code not like", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeIn(List values) { + addCriterion("station_code in", values, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeNotIn(List values) { + addCriterion("station_code not in", values, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeBetween(String value1, String value2) { + addCriterion("station_code between", value1, value2, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeNotBetween(String value1, String value2) { + addCriterion("station_code not between", value1, value2, "stationCode"); + return (Criteria) this; + } + + public Criteria andNumberIsNull() { + addCriterion("`number` is null"); + return (Criteria) this; + } + + public Criteria andNumberIsNotNull() { + addCriterion("`number` is not null"); + return (Criteria) this; + } + + public Criteria andNumberEqualTo(String value) { + addCriterion("`number` =", value, "number"); + return (Criteria) this; + } + + public Criteria andNumberNotEqualTo(String value) { + addCriterion("`number` <>", value, "number"); + return (Criteria) this; + } + + public Criteria andNumberGreaterThan(String value) { + addCriterion("`number` >", value, "number"); + return (Criteria) this; + } + + public Criteria andNumberGreaterThanOrEqualTo(String value) { + addCriterion("`number` >=", value, "number"); + return (Criteria) this; + } + + public Criteria andNumberLessThan(String value) { + addCriterion("`number` <", value, "number"); + return (Criteria) this; + } + + public Criteria andNumberLessThanOrEqualTo(String value) { + addCriterion("`number` <=", value, "number"); + return (Criteria) this; + } + + public Criteria andNumberLike(String value) { + addCriterion("`number` like", value, "number"); + return (Criteria) this; + } + + public Criteria andNumberNotLike(String value) { + addCriterion("`number` not like", value, "number"); + return (Criteria) this; + } + + public Criteria andNumberIn(List values) { + addCriterion("`number` in", values, "number"); + return (Criteria) this; + } + + public Criteria andNumberNotIn(List values) { + addCriterion("`number` not in", values, "number"); + return (Criteria) this; + } + + public Criteria andNumberBetween(String value1, String value2) { + addCriterion("`number` between", value1, value2, "number"); + return (Criteria) this; + } + + public Criteria andNumberNotBetween(String value1, String value2) { + addCriterion("`number` not between", value1, value2, "number"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/DraftMapRouteUnit.java b/src/main/java/club/joylink/rtss/entity/DraftMapRouteUnit.java new file mode 100644 index 000000000..5bf9eb035 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/DraftMapRouteUnit.java @@ -0,0 +1,124 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * draft_map_route_unit + * @author + */ +public class DraftMapRouteUnit implements Serializable { + private Long id; + + private Long mapId; + + private String code; + + private String startSectionCode; + + private String endSectionCode; + + /** + * 关联数据 + */ + private String relData; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getMapId() { + return mapId; + } + + public void setMapId(Long mapId) { + this.mapId = mapId; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getStartSectionCode() { + return startSectionCode; + } + + public void setStartSectionCode(String startSectionCode) { + this.startSectionCode = startSectionCode; + } + + public String getEndSectionCode() { + return endSectionCode; + } + + public void setEndSectionCode(String endSectionCode) { + this.endSectionCode = endSectionCode; + } + + public String getRelData() { + return relData; + } + + public void setRelData(String relData) { + this.relData = relData; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + DraftMapRouteUnit other = (DraftMapRouteUnit) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode())) + && (this.getStartSectionCode() == null ? other.getStartSectionCode() == null : this.getStartSectionCode().equals(other.getStartSectionCode())) + && (this.getEndSectionCode() == null ? other.getEndSectionCode() == null : this.getEndSectionCode().equals(other.getEndSectionCode())) + && (this.getRelData() == null ? other.getRelData() == null : this.getRelData().equals(other.getRelData())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode()); + result = prime * result + ((getStartSectionCode() == null) ? 0 : getStartSectionCode().hashCode()); + result = prime * result + ((getEndSectionCode() == null) ? 0 : getEndSectionCode().hashCode()); + result = prime * result + ((getRelData() == null) ? 0 : getRelData().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", mapId=").append(mapId); + sb.append(", code=").append(code); + sb.append(", startSectionCode=").append(startSectionCode); + sb.append(", endSectionCode=").append(endSectionCode); + sb.append(", relData=").append(relData); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/DraftMapRouteUnitExample.java b/src/main/java/club/joylink/rtss/entity/DraftMapRouteUnitExample.java new file mode 100644 index 000000000..02781269d --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/DraftMapRouteUnitExample.java @@ -0,0 +1,552 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class DraftMapRouteUnitExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public DraftMapRouteUnitExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andCodeIsNull() { + addCriterion("code is null"); + return (Criteria) this; + } + + public Criteria andCodeIsNotNull() { + addCriterion("code is not null"); + return (Criteria) this; + } + + public Criteria andCodeEqualTo(String value) { + addCriterion("code =", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotEqualTo(String value) { + addCriterion("code <>", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThan(String value) { + addCriterion("code >", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThanOrEqualTo(String value) { + addCriterion("code >=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThan(String value) { + addCriterion("code <", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThanOrEqualTo(String value) { + addCriterion("code <=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLike(String value) { + addCriterion("code like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotLike(String value) { + addCriterion("code not like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeIn(List values) { + addCriterion("code in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotIn(List values) { + addCriterion("code not in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeBetween(String value1, String value2) { + addCriterion("code between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotBetween(String value1, String value2) { + addCriterion("code not between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeIsNull() { + addCriterion("start_section_code is null"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeIsNotNull() { + addCriterion("start_section_code is not null"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeEqualTo(String value) { + addCriterion("start_section_code =", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeNotEqualTo(String value) { + addCriterion("start_section_code <>", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeGreaterThan(String value) { + addCriterion("start_section_code >", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeGreaterThanOrEqualTo(String value) { + addCriterion("start_section_code >=", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeLessThan(String value) { + addCriterion("start_section_code <", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeLessThanOrEqualTo(String value) { + addCriterion("start_section_code <=", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeLike(String value) { + addCriterion("start_section_code like", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeNotLike(String value) { + addCriterion("start_section_code not like", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeIn(List values) { + addCriterion("start_section_code in", values, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeNotIn(List values) { + addCriterion("start_section_code not in", values, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeBetween(String value1, String value2) { + addCriterion("start_section_code between", value1, value2, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeNotBetween(String value1, String value2) { + addCriterion("start_section_code not between", value1, value2, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeIsNull() { + addCriterion("end_section_code is null"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeIsNotNull() { + addCriterion("end_section_code is not null"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeEqualTo(String value) { + addCriterion("end_section_code =", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeNotEqualTo(String value) { + addCriterion("end_section_code <>", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeGreaterThan(String value) { + addCriterion("end_section_code >", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeGreaterThanOrEqualTo(String value) { + addCriterion("end_section_code >=", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeLessThan(String value) { + addCriterion("end_section_code <", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeLessThanOrEqualTo(String value) { + addCriterion("end_section_code <=", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeLike(String value) { + addCriterion("end_section_code like", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeNotLike(String value) { + addCriterion("end_section_code not like", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeIn(List values) { + addCriterion("end_section_code in", values, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeNotIn(List values) { + addCriterion("end_section_code not in", values, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeBetween(String value1, String value2) { + addCriterion("end_section_code between", value1, value2, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeNotBetween(String value1, String value2) { + addCriterion("end_section_code not between", value1, value2, "endSectionCode"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/DraftMapRouting.java b/src/main/java/club/joylink/rtss/entity/DraftMapRouting.java new file mode 100644 index 000000000..026f0e42b --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/DraftMapRouting.java @@ -0,0 +1,248 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * draft_map_routing + * @author + */ +public class DraftMapRouting implements Serializable { + private Long id; + + /** + * 地图ID + */ + private Long mapId; + + /** + * 名称 + */ + private String name; + + /** + * 编号 + */ + private String code; + + /** + * 起始车站 + */ + private String startStationCode; + + /** + * 起始站台 + */ + private String startSectionCode; + + /** + * 终点车站 + */ + private String endStationCode; + + /** + * 终点站台 + */ + private String endSectionCode; + + /** + * 方向 + */ + private String directionCode; + + /** + * 左右行方向 + */ + private Boolean right; + + /** + * 目的地码 + */ + private String destinationCode; + + /** + * 描述 + */ + private String remarks; + + /** + * 关联数据 + */ + private String relData; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getMapId() { + return mapId; + } + + public void setMapId(Long mapId) { + this.mapId = mapId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getStartStationCode() { + return startStationCode; + } + + public void setStartStationCode(String startStationCode) { + this.startStationCode = startStationCode; + } + + public String getStartSectionCode() { + return startSectionCode; + } + + public void setStartSectionCode(String startSectionCode) { + this.startSectionCode = startSectionCode; + } + + public String getEndStationCode() { + return endStationCode; + } + + public void setEndStationCode(String endStationCode) { + this.endStationCode = endStationCode; + } + + public String getEndSectionCode() { + return endSectionCode; + } + + public void setEndSectionCode(String endSectionCode) { + this.endSectionCode = endSectionCode; + } + + public String getDirectionCode() { + return directionCode; + } + + public void setDirectionCode(String directionCode) { + this.directionCode = directionCode; + } + + public Boolean getRight() { + return right; + } + + public void setRight(Boolean right) { + this.right = right; + } + + public String getDestinationCode() { + return destinationCode; + } + + public void setDestinationCode(String destinationCode) { + this.destinationCode = destinationCode; + } + + public String getRemarks() { + return remarks; + } + + public void setRemarks(String remarks) { + this.remarks = remarks; + } + + public String getRelData() { + return relData; + } + + public void setRelData(String relData) { + this.relData = relData; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + DraftMapRouting other = (DraftMapRouting) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode())) + && (this.getStartStationCode() == null ? other.getStartStationCode() == null : this.getStartStationCode().equals(other.getStartStationCode())) + && (this.getStartSectionCode() == null ? other.getStartSectionCode() == null : this.getStartSectionCode().equals(other.getStartSectionCode())) + && (this.getEndStationCode() == null ? other.getEndStationCode() == null : this.getEndStationCode().equals(other.getEndStationCode())) + && (this.getEndSectionCode() == null ? other.getEndSectionCode() == null : this.getEndSectionCode().equals(other.getEndSectionCode())) + && (this.getDirectionCode() == null ? other.getDirectionCode() == null : this.getDirectionCode().equals(other.getDirectionCode())) + && (this.getRight() == null ? other.getRight() == null : this.getRight().equals(other.getRight())) + && (this.getDestinationCode() == null ? other.getDestinationCode() == null : this.getDestinationCode().equals(other.getDestinationCode())) + && (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks())) + && (this.getRelData() == null ? other.getRelData() == null : this.getRelData().equals(other.getRelData())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode()); + result = prime * result + ((getStartStationCode() == null) ? 0 : getStartStationCode().hashCode()); + result = prime * result + ((getStartSectionCode() == null) ? 0 : getStartSectionCode().hashCode()); + result = prime * result + ((getEndStationCode() == null) ? 0 : getEndStationCode().hashCode()); + result = prime * result + ((getEndSectionCode() == null) ? 0 : getEndSectionCode().hashCode()); + result = prime * result + ((getDirectionCode() == null) ? 0 : getDirectionCode().hashCode()); + result = prime * result + ((getRight() == null) ? 0 : getRight().hashCode()); + result = prime * result + ((getDestinationCode() == null) ? 0 : getDestinationCode().hashCode()); + result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode()); + result = prime * result + ((getRelData() == null) ? 0 : getRelData().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", mapId=").append(mapId); + sb.append(", name=").append(name); + sb.append(", code=").append(code); + sb.append(", startStationCode=").append(startStationCode); + sb.append(", startSectionCode=").append(startSectionCode); + sb.append(", endStationCode=").append(endStationCode); + sb.append(", endSectionCode=").append(endSectionCode); + sb.append(", directionCode=").append(directionCode); + sb.append(", right=").append(right); + sb.append(", destinationCode=").append(destinationCode); + sb.append(", remarks=").append(remarks); + sb.append(", relData=").append(relData); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} diff --git a/src/main/java/club/joylink/rtss/entity/DraftMapRoutingExample.java b/src/main/java/club/joylink/rtss/entity/DraftMapRoutingExample.java new file mode 100644 index 000000000..f87ff5700 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/DraftMapRoutingExample.java @@ -0,0 +1,1032 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class DraftMapRoutingExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public DraftMapRoutingExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andCodeIsNull() { + addCriterion("code is null"); + return (Criteria) this; + } + + public Criteria andCodeIsNotNull() { + addCriterion("code is not null"); + return (Criteria) this; + } + + public Criteria andCodeEqualTo(String value) { + addCriterion("code =", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotEqualTo(String value) { + addCriterion("code <>", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThan(String value) { + addCriterion("code >", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThanOrEqualTo(String value) { + addCriterion("code >=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThan(String value) { + addCriterion("code <", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThanOrEqualTo(String value) { + addCriterion("code <=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLike(String value) { + addCriterion("code like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotLike(String value) { + addCriterion("code not like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeIn(List values) { + addCriterion("code in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotIn(List values) { + addCriterion("code not in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeBetween(String value1, String value2) { + addCriterion("code between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotBetween(String value1, String value2) { + addCriterion("code not between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andStartStationCodeIsNull() { + addCriterion("start_station_code is null"); + return (Criteria) this; + } + + public Criteria andStartStationCodeIsNotNull() { + addCriterion("start_station_code is not null"); + return (Criteria) this; + } + + public Criteria andStartStationCodeEqualTo(String value) { + addCriterion("start_station_code =", value, "startStationCode"); + return (Criteria) this; + } + + public Criteria andStartStationCodeNotEqualTo(String value) { + addCriterion("start_station_code <>", value, "startStationCode"); + return (Criteria) this; + } + + public Criteria andStartStationCodeGreaterThan(String value) { + addCriterion("start_station_code >", value, "startStationCode"); + return (Criteria) this; + } + + public Criteria andStartStationCodeGreaterThanOrEqualTo(String value) { + addCriterion("start_station_code >=", value, "startStationCode"); + return (Criteria) this; + } + + public Criteria andStartStationCodeLessThan(String value) { + addCriterion("start_station_code <", value, "startStationCode"); + return (Criteria) this; + } + + public Criteria andStartStationCodeLessThanOrEqualTo(String value) { + addCriterion("start_station_code <=", value, "startStationCode"); + return (Criteria) this; + } + + public Criteria andStartStationCodeLike(String value) { + addCriterion("start_station_code like", value, "startStationCode"); + return (Criteria) this; + } + + public Criteria andStartStationCodeNotLike(String value) { + addCriterion("start_station_code not like", value, "startStationCode"); + return (Criteria) this; + } + + public Criteria andStartStationCodeIn(List values) { + addCriterion("start_station_code in", values, "startStationCode"); + return (Criteria) this; + } + + public Criteria andStartStationCodeNotIn(List values) { + addCriterion("start_station_code not in", values, "startStationCode"); + return (Criteria) this; + } + + public Criteria andStartStationCodeBetween(String value1, String value2) { + addCriterion("start_station_code between", value1, value2, "startStationCode"); + return (Criteria) this; + } + + public Criteria andStartStationCodeNotBetween(String value1, String value2) { + addCriterion("start_station_code not between", value1, value2, "startStationCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeIsNull() { + addCriterion("start_section_code is null"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeIsNotNull() { + addCriterion("start_section_code is not null"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeEqualTo(String value) { + addCriterion("start_section_code =", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeNotEqualTo(String value) { + addCriterion("start_section_code <>", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeGreaterThan(String value) { + addCriterion("start_section_code >", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeGreaterThanOrEqualTo(String value) { + addCriterion("start_section_code >=", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeLessThan(String value) { + addCriterion("start_section_code <", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeLessThanOrEqualTo(String value) { + addCriterion("start_section_code <=", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeLike(String value) { + addCriterion("start_section_code like", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeNotLike(String value) { + addCriterion("start_section_code not like", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeIn(List values) { + addCriterion("start_section_code in", values, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeNotIn(List values) { + addCriterion("start_section_code not in", values, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeBetween(String value1, String value2) { + addCriterion("start_section_code between", value1, value2, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeNotBetween(String value1, String value2) { + addCriterion("start_section_code not between", value1, value2, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andEndStationCodeIsNull() { + addCriterion("end_station_code is null"); + return (Criteria) this; + } + + public Criteria andEndStationCodeIsNotNull() { + addCriterion("end_station_code is not null"); + return (Criteria) this; + } + + public Criteria andEndStationCodeEqualTo(String value) { + addCriterion("end_station_code =", value, "endStationCode"); + return (Criteria) this; + } + + public Criteria andEndStationCodeNotEqualTo(String value) { + addCriterion("end_station_code <>", value, "endStationCode"); + return (Criteria) this; + } + + public Criteria andEndStationCodeGreaterThan(String value) { + addCriterion("end_station_code >", value, "endStationCode"); + return (Criteria) this; + } + + public Criteria andEndStationCodeGreaterThanOrEqualTo(String value) { + addCriterion("end_station_code >=", value, "endStationCode"); + return (Criteria) this; + } + + public Criteria andEndStationCodeLessThan(String value) { + addCriterion("end_station_code <", value, "endStationCode"); + return (Criteria) this; + } + + public Criteria andEndStationCodeLessThanOrEqualTo(String value) { + addCriterion("end_station_code <=", value, "endStationCode"); + return (Criteria) this; + } + + public Criteria andEndStationCodeLike(String value) { + addCriterion("end_station_code like", value, "endStationCode"); + return (Criteria) this; + } + + public Criteria andEndStationCodeNotLike(String value) { + addCriterion("end_station_code not like", value, "endStationCode"); + return (Criteria) this; + } + + public Criteria andEndStationCodeIn(List values) { + addCriterion("end_station_code in", values, "endStationCode"); + return (Criteria) this; + } + + public Criteria andEndStationCodeNotIn(List values) { + addCriterion("end_station_code not in", values, "endStationCode"); + return (Criteria) this; + } + + public Criteria andEndStationCodeBetween(String value1, String value2) { + addCriterion("end_station_code between", value1, value2, "endStationCode"); + return (Criteria) this; + } + + public Criteria andEndStationCodeNotBetween(String value1, String value2) { + addCriterion("end_station_code not between", value1, value2, "endStationCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeIsNull() { + addCriterion("end_section_code is null"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeIsNotNull() { + addCriterion("end_section_code is not null"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeEqualTo(String value) { + addCriterion("end_section_code =", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeNotEqualTo(String value) { + addCriterion("end_section_code <>", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeGreaterThan(String value) { + addCriterion("end_section_code >", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeGreaterThanOrEqualTo(String value) { + addCriterion("end_section_code >=", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeLessThan(String value) { + addCriterion("end_section_code <", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeLessThanOrEqualTo(String value) { + addCriterion("end_section_code <=", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeLike(String value) { + addCriterion("end_section_code like", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeNotLike(String value) { + addCriterion("end_section_code not like", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeIn(List values) { + addCriterion("end_section_code in", values, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeNotIn(List values) { + addCriterion("end_section_code not in", values, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeBetween(String value1, String value2) { + addCriterion("end_section_code between", value1, value2, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeNotBetween(String value1, String value2) { + addCriterion("end_section_code not between", value1, value2, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andDirectionCodeIsNull() { + addCriterion("direction_code is null"); + return (Criteria) this; + } + + public Criteria andDirectionCodeIsNotNull() { + addCriterion("direction_code is not null"); + return (Criteria) this; + } + + public Criteria andDirectionCodeEqualTo(String value) { + addCriterion("direction_code =", value, "directionCode"); + return (Criteria) this; + } + + public Criteria andDirectionCodeNotEqualTo(String value) { + addCriterion("direction_code <>", value, "directionCode"); + return (Criteria) this; + } + + public Criteria andDirectionCodeGreaterThan(String value) { + addCriterion("direction_code >", value, "directionCode"); + return (Criteria) this; + } + + public Criteria andDirectionCodeGreaterThanOrEqualTo(String value) { + addCriterion("direction_code >=", value, "directionCode"); + return (Criteria) this; + } + + public Criteria andDirectionCodeLessThan(String value) { + addCriterion("direction_code <", value, "directionCode"); + return (Criteria) this; + } + + public Criteria andDirectionCodeLessThanOrEqualTo(String value) { + addCriterion("direction_code <=", value, "directionCode"); + return (Criteria) this; + } + + public Criteria andDirectionCodeLike(String value) { + addCriterion("direction_code like", value, "directionCode"); + return (Criteria) this; + } + + public Criteria andDirectionCodeNotLike(String value) { + addCriterion("direction_code not like", value, "directionCode"); + return (Criteria) this; + } + + public Criteria andDirectionCodeIn(List values) { + addCriterion("direction_code in", values, "directionCode"); + return (Criteria) this; + } + + public Criteria andDirectionCodeNotIn(List values) { + addCriterion("direction_code not in", values, "directionCode"); + return (Criteria) this; + } + + public Criteria andDirectionCodeBetween(String value1, String value2) { + addCriterion("direction_code between", value1, value2, "directionCode"); + return (Criteria) this; + } + + public Criteria andDirectionCodeNotBetween(String value1, String value2) { + addCriterion("direction_code not between", value1, value2, "directionCode"); + return (Criteria) this; + } + + public Criteria andRightIsNull() { + addCriterion("`right` is null"); + return (Criteria) this; + } + + public Criteria andRightIsNotNull() { + addCriterion("`right` is not null"); + return (Criteria) this; + } + + public Criteria andRightEqualTo(Boolean value) { + addCriterion("`right` =", value, "right"); + return (Criteria) this; + } + + public Criteria andRightNotEqualTo(Boolean value) { + addCriterion("`right` <>", value, "right"); + return (Criteria) this; + } + + public Criteria andRightGreaterThan(Boolean value) { + addCriterion("`right` >", value, "right"); + return (Criteria) this; + } + + public Criteria andRightGreaterThanOrEqualTo(Boolean value) { + addCriterion("`right` >=", value, "right"); + return (Criteria) this; + } + + public Criteria andRightLessThan(Boolean value) { + addCriterion("`right` <", value, "right"); + return (Criteria) this; + } + + public Criteria andRightLessThanOrEqualTo(Boolean value) { + addCriterion("`right` <=", value, "right"); + return (Criteria) this; + } + + public Criteria andRightIn(List values) { + addCriterion("`right` in", values, "right"); + return (Criteria) this; + } + + public Criteria andRightNotIn(List values) { + addCriterion("`right` not in", values, "right"); + return (Criteria) this; + } + + public Criteria andRightBetween(Boolean value1, Boolean value2) { + addCriterion("`right` between", value1, value2, "right"); + return (Criteria) this; + } + + public Criteria andRightNotBetween(Boolean value1, Boolean value2) { + addCriterion("`right` not between", value1, value2, "right"); + return (Criteria) this; + } + + public Criteria andDestinationCodeIsNull() { + addCriterion("destination_code is null"); + return (Criteria) this; + } + + public Criteria andDestinationCodeIsNotNull() { + addCriterion("destination_code is not null"); + return (Criteria) this; + } + + public Criteria andDestinationCodeEqualTo(String value) { + addCriterion("destination_code =", value, "destinationCode"); + return (Criteria) this; + } + + public Criteria andDestinationCodeNotEqualTo(String value) { + addCriterion("destination_code <>", value, "destinationCode"); + return (Criteria) this; + } + + public Criteria andDestinationCodeGreaterThan(String value) { + addCriterion("destination_code >", value, "destinationCode"); + return (Criteria) this; + } + + public Criteria andDestinationCodeGreaterThanOrEqualTo(String value) { + addCriterion("destination_code >=", value, "destinationCode"); + return (Criteria) this; + } + + public Criteria andDestinationCodeLessThan(String value) { + addCriterion("destination_code <", value, "destinationCode"); + return (Criteria) this; + } + + public Criteria andDestinationCodeLessThanOrEqualTo(String value) { + addCriterion("destination_code <=", value, "destinationCode"); + return (Criteria) this; + } + + public Criteria andDestinationCodeLike(String value) { + addCriterion("destination_code like", value, "destinationCode"); + return (Criteria) this; + } + + public Criteria andDestinationCodeNotLike(String value) { + addCriterion("destination_code not like", value, "destinationCode"); + return (Criteria) this; + } + + public Criteria andDestinationCodeIn(List values) { + addCriterion("destination_code in", values, "destinationCode"); + return (Criteria) this; + } + + public Criteria andDestinationCodeNotIn(List values) { + addCriterion("destination_code not in", values, "destinationCode"); + return (Criteria) this; + } + + public Criteria andDestinationCodeBetween(String value1, String value2) { + addCriterion("destination_code between", value1, value2, "destinationCode"); + return (Criteria) this; + } + + public Criteria andDestinationCodeNotBetween(String value1, String value2) { + addCriterion("destination_code not between", value1, value2, "destinationCode"); + return (Criteria) this; + } + + public Criteria andRemarksIsNull() { + addCriterion("remarks is null"); + return (Criteria) this; + } + + public Criteria andRemarksIsNotNull() { + addCriterion("remarks is not null"); + return (Criteria) this; + } + + public Criteria andRemarksEqualTo(String value) { + addCriterion("remarks =", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotEqualTo(String value) { + addCriterion("remarks <>", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksGreaterThan(String value) { + addCriterion("remarks >", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksGreaterThanOrEqualTo(String value) { + addCriterion("remarks >=", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLessThan(String value) { + addCriterion("remarks <", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLessThanOrEqualTo(String value) { + addCriterion("remarks <=", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLike(String value) { + addCriterion("remarks like", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotLike(String value) { + addCriterion("remarks not like", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksIn(List values) { + addCriterion("remarks in", values, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotIn(List values) { + addCriterion("remarks not in", values, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksBetween(String value1, String value2) { + addCriterion("remarks between", value1, value2, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotBetween(String value1, String value2) { + addCriterion("remarks not between", value1, value2, "remarks"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} diff --git a/src/main/java/club/joylink/rtss/entity/DraftMapRunLevel.java b/src/main/java/club/joylink/rtss/entity/DraftMapRunLevel.java new file mode 100644 index 000000000..2cb31de7d --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/DraftMapRunLevel.java @@ -0,0 +1,36 @@ +package club.joylink.rtss.entity; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author + * 草稿站间距离和运行等级表 + */ +@Data +public class DraftMapRunLevel implements Serializable { + private Long id; + + /** + * 所属地图id + */ + private Long mapId; + + /** + * 起始区段code + */ + private String startSectionCode; + + /** + * 终点区段code + */ + private String endSectionCode; + + /** + * 站间运行等级数据 + */ + private String runLevelData; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/DraftMapRunLevelExample.java b/src/main/java/club/joylink/rtss/entity/DraftMapRunLevelExample.java new file mode 100644 index 000000000..bb311ae8b --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/DraftMapRunLevelExample.java @@ -0,0 +1,482 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class DraftMapRunLevelExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public DraftMapRunLevelExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeIsNull() { + addCriterion("start_section_code is null"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeIsNotNull() { + addCriterion("start_section_code is not null"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeEqualTo(String value) { + addCriterion("start_section_code =", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeNotEqualTo(String value) { + addCriterion("start_section_code <>", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeGreaterThan(String value) { + addCriterion("start_section_code >", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeGreaterThanOrEqualTo(String value) { + addCriterion("start_section_code >=", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeLessThan(String value) { + addCriterion("start_section_code <", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeLessThanOrEqualTo(String value) { + addCriterion("start_section_code <=", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeLike(String value) { + addCriterion("start_section_code like", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeNotLike(String value) { + addCriterion("start_section_code not like", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeIn(List values) { + addCriterion("start_section_code in", values, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeNotIn(List values) { + addCriterion("start_section_code not in", values, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeBetween(String value1, String value2) { + addCriterion("start_section_code between", value1, value2, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeNotBetween(String value1, String value2) { + addCriterion("start_section_code not between", value1, value2, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeIsNull() { + addCriterion("end_section_code is null"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeIsNotNull() { + addCriterion("end_section_code is not null"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeEqualTo(String value) { + addCriterion("end_section_code =", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeNotEqualTo(String value) { + addCriterion("end_section_code <>", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeGreaterThan(String value) { + addCriterion("end_section_code >", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeGreaterThanOrEqualTo(String value) { + addCriterion("end_section_code >=", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeLessThan(String value) { + addCriterion("end_section_code <", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeLessThanOrEqualTo(String value) { + addCriterion("end_section_code <=", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeLike(String value) { + addCriterion("end_section_code like", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeNotLike(String value) { + addCriterion("end_section_code not like", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeIn(List values) { + addCriterion("end_section_code in", values, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeNotIn(List values) { + addCriterion("end_section_code not in", values, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeBetween(String value1, String value2) { + addCriterion("end_section_code between", value1, value2, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeNotBetween(String value1, String value2) { + addCriterion("end_section_code not between", value1, value2, "endSectionCode"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/DraftMapRunPlan.java b/src/main/java/club/joylink/rtss/entity/DraftMapRunPlan.java new file mode 100644 index 000000000..e686a65b1 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/DraftMapRunPlan.java @@ -0,0 +1,121 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * draft_map_run_plan + * @author + */ +public class DraftMapRunPlan implements Serializable { + private Long id; + + /** + * 草稿地图id + */ + private Long mapId; + + /** + * 名称 + */ + private String name; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + /** + * 计划数据 + */ + private String trips; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getMapId() { + return mapId; + } + + public void setMapId(Long mapId) { + this.mapId = mapId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public LocalDateTime getCreateTime() { + return createTime; + } + + public void setCreateTime(LocalDateTime createTime) { + this.createTime = createTime; + } + + public String getTrips() { + return trips; + } + + public void setTrips(String trips) { + this.trips = trips; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + DraftMapRunPlan other = (DraftMapRunPlan) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getTrips() == null ? other.getTrips() == null : this.getTrips().equals(other.getTrips())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getTrips() == null) ? 0 : getTrips().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", mapId=").append(mapId); + sb.append(", name=").append(name); + sb.append(", createTime=").append(createTime); + sb.append(", trips=").append(trips); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/DraftMapRunPlanExample.java b/src/main/java/club/joylink/rtss/entity/DraftMapRunPlanExample.java new file mode 100644 index 000000000..55cab88b8 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/DraftMapRunPlanExample.java @@ -0,0 +1,473 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class DraftMapRunPlanExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public DraftMapRunPlanExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(LocalDateTime value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(LocalDateTime value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(LocalDateTime value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(LocalDateTime value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/DraftMapSignalApproachSection.java b/src/main/java/club/joylink/rtss/entity/DraftMapSignalApproachSection.java new file mode 100644 index 000000000..27e52d630 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/DraftMapSignalApproachSection.java @@ -0,0 +1,104 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * draft_map_signal_approach_section + * @author + */ +public class DraftMapSignalApproachSection implements Serializable { + private Long id; + + /** + * 所属地图id + */ + private Long mapId; + + /** + * 信号机唯一编号 + */ + private String signalCode; + + /** + * 关联数据 + */ + private String relData; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getMapId() { + return mapId; + } + + public void setMapId(Long mapId) { + this.mapId = mapId; + } + + public String getSignalCode() { + return signalCode; + } + + public void setSignalCode(String signalCode) { + this.signalCode = signalCode; + } + + public String getRelData() { + return relData; + } + + public void setRelData(String relData) { + this.relData = relData; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + DraftMapSignalApproachSection other = (DraftMapSignalApproachSection) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getSignalCode() == null ? other.getSignalCode() == null : this.getSignalCode().equals(other.getSignalCode())) + && (this.getRelData() == null ? other.getRelData() == null : this.getRelData().equals(other.getRelData())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getSignalCode() == null) ? 0 : getSignalCode().hashCode()); + result = prime * result + ((getRelData() == null) ? 0 : getRelData().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", mapId=").append(mapId); + sb.append(", signalCode=").append(signalCode); + sb.append(", relData=").append(relData); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/DraftMapSignalApproachSectionExample.java b/src/main/java/club/joylink/rtss/entity/DraftMapSignalApproachSectionExample.java new file mode 100644 index 000000000..9a0525a7e --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/DraftMapSignalApproachSectionExample.java @@ -0,0 +1,412 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class DraftMapSignalApproachSectionExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public DraftMapSignalApproachSectionExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andSignalCodeIsNull() { + addCriterion("signal_code is null"); + return (Criteria) this; + } + + public Criteria andSignalCodeIsNotNull() { + addCriterion("signal_code is not null"); + return (Criteria) this; + } + + public Criteria andSignalCodeEqualTo(String value) { + addCriterion("signal_code =", value, "signalCode"); + return (Criteria) this; + } + + public Criteria andSignalCodeNotEqualTo(String value) { + addCriterion("signal_code <>", value, "signalCode"); + return (Criteria) this; + } + + public Criteria andSignalCodeGreaterThan(String value) { + addCriterion("signal_code >", value, "signalCode"); + return (Criteria) this; + } + + public Criteria andSignalCodeGreaterThanOrEqualTo(String value) { + addCriterion("signal_code >=", value, "signalCode"); + return (Criteria) this; + } + + public Criteria andSignalCodeLessThan(String value) { + addCriterion("signal_code <", value, "signalCode"); + return (Criteria) this; + } + + public Criteria andSignalCodeLessThanOrEqualTo(String value) { + addCriterion("signal_code <=", value, "signalCode"); + return (Criteria) this; + } + + public Criteria andSignalCodeLike(String value) { + addCriterion("signal_code like", value, "signalCode"); + return (Criteria) this; + } + + public Criteria andSignalCodeNotLike(String value) { + addCriterion("signal_code not like", value, "signalCode"); + return (Criteria) this; + } + + public Criteria andSignalCodeIn(List values) { + addCriterion("signal_code in", values, "signalCode"); + return (Criteria) this; + } + + public Criteria andSignalCodeNotIn(List values) { + addCriterion("signal_code not in", values, "signalCode"); + return (Criteria) this; + } + + public Criteria andSignalCodeBetween(String value1, String value2) { + addCriterion("signal_code between", value1, value2, "signalCode"); + return (Criteria) this; + } + + public Criteria andSignalCodeNotBetween(String value1, String value2) { + addCriterion("signal_code not between", value1, value2, "signalCode"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/DraftMapSwitchCoupled.java b/src/main/java/club/joylink/rtss/entity/DraftMapSwitchCoupled.java new file mode 100644 index 000000000..a0e1f5f57 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/DraftMapSwitchCoupled.java @@ -0,0 +1,104 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * draft_map_switch_coupled + * @author + */ +public class DraftMapSwitchCoupled implements Serializable { + private Long id; + + /** + * 地图ID + */ + private Long mapId; + + /** + * 道岔一 编码 + */ + private String switchaCode; + + /** + * 道岔二 编码 + */ + private String switchbCode; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getMapId() { + return mapId; + } + + public void setMapId(Long mapId) { + this.mapId = mapId; + } + + public String getSwitchaCode() { + return switchaCode; + } + + public void setSwitchaCode(String switchaCode) { + this.switchaCode = switchaCode; + } + + public String getSwitchbCode() { + return switchbCode; + } + + public void setSwitchbCode(String switchbCode) { + this.switchbCode = switchbCode; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + DraftMapSwitchCoupled other = (DraftMapSwitchCoupled) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getSwitchaCode() == null ? other.getSwitchaCode() == null : this.getSwitchaCode().equals(other.getSwitchaCode())) + && (this.getSwitchbCode() == null ? other.getSwitchbCode() == null : this.getSwitchbCode().equals(other.getSwitchbCode())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getSwitchaCode() == null) ? 0 : getSwitchaCode().hashCode()); + result = prime * result + ((getSwitchbCode() == null) ? 0 : getSwitchbCode().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", mapId=").append(mapId); + sb.append(", switchaCode=").append(switchaCode); + sb.append(", switchbCode=").append(switchbCode); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/DraftMapSwitchCoupledExample.java b/src/main/java/club/joylink/rtss/entity/DraftMapSwitchCoupledExample.java new file mode 100644 index 000000000..4b3644ddd --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/DraftMapSwitchCoupledExample.java @@ -0,0 +1,482 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class DraftMapSwitchCoupledExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public DraftMapSwitchCoupledExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andSwitchaCodeIsNull() { + addCriterion("switcha_code is null"); + return (Criteria) this; + } + + public Criteria andSwitchaCodeIsNotNull() { + addCriterion("switcha_code is not null"); + return (Criteria) this; + } + + public Criteria andSwitchaCodeEqualTo(String value) { + addCriterion("switcha_code =", value, "switchaCode"); + return (Criteria) this; + } + + public Criteria andSwitchaCodeNotEqualTo(String value) { + addCriterion("switcha_code <>", value, "switchaCode"); + return (Criteria) this; + } + + public Criteria andSwitchaCodeGreaterThan(String value) { + addCriterion("switcha_code >", value, "switchaCode"); + return (Criteria) this; + } + + public Criteria andSwitchaCodeGreaterThanOrEqualTo(String value) { + addCriterion("switcha_code >=", value, "switchaCode"); + return (Criteria) this; + } + + public Criteria andSwitchaCodeLessThan(String value) { + addCriterion("switcha_code <", value, "switchaCode"); + return (Criteria) this; + } + + public Criteria andSwitchaCodeLessThanOrEqualTo(String value) { + addCriterion("switcha_code <=", value, "switchaCode"); + return (Criteria) this; + } + + public Criteria andSwitchaCodeLike(String value) { + addCriterion("switcha_code like", value, "switchaCode"); + return (Criteria) this; + } + + public Criteria andSwitchaCodeNotLike(String value) { + addCriterion("switcha_code not like", value, "switchaCode"); + return (Criteria) this; + } + + public Criteria andSwitchaCodeIn(List values) { + addCriterion("switcha_code in", values, "switchaCode"); + return (Criteria) this; + } + + public Criteria andSwitchaCodeNotIn(List values) { + addCriterion("switcha_code not in", values, "switchaCode"); + return (Criteria) this; + } + + public Criteria andSwitchaCodeBetween(String value1, String value2) { + addCriterion("switcha_code between", value1, value2, "switchaCode"); + return (Criteria) this; + } + + public Criteria andSwitchaCodeNotBetween(String value1, String value2) { + addCriterion("switcha_code not between", value1, value2, "switchaCode"); + return (Criteria) this; + } + + public Criteria andSwitchbCodeIsNull() { + addCriterion("switchb_code is null"); + return (Criteria) this; + } + + public Criteria andSwitchbCodeIsNotNull() { + addCriterion("switchb_code is not null"); + return (Criteria) this; + } + + public Criteria andSwitchbCodeEqualTo(String value) { + addCriterion("switchb_code =", value, "switchbCode"); + return (Criteria) this; + } + + public Criteria andSwitchbCodeNotEqualTo(String value) { + addCriterion("switchb_code <>", value, "switchbCode"); + return (Criteria) this; + } + + public Criteria andSwitchbCodeGreaterThan(String value) { + addCriterion("switchb_code >", value, "switchbCode"); + return (Criteria) this; + } + + public Criteria andSwitchbCodeGreaterThanOrEqualTo(String value) { + addCriterion("switchb_code >=", value, "switchbCode"); + return (Criteria) this; + } + + public Criteria andSwitchbCodeLessThan(String value) { + addCriterion("switchb_code <", value, "switchbCode"); + return (Criteria) this; + } + + public Criteria andSwitchbCodeLessThanOrEqualTo(String value) { + addCriterion("switchb_code <=", value, "switchbCode"); + return (Criteria) this; + } + + public Criteria andSwitchbCodeLike(String value) { + addCriterion("switchb_code like", value, "switchbCode"); + return (Criteria) this; + } + + public Criteria andSwitchbCodeNotLike(String value) { + addCriterion("switchb_code not like", value, "switchbCode"); + return (Criteria) this; + } + + public Criteria andSwitchbCodeIn(List values) { + addCriterion("switchb_code in", values, "switchbCode"); + return (Criteria) this; + } + + public Criteria andSwitchbCodeNotIn(List values) { + addCriterion("switchb_code not in", values, "switchbCode"); + return (Criteria) this; + } + + public Criteria andSwitchbCodeBetween(String value1, String value2) { + addCriterion("switchb_code between", value1, value2, "switchbCode"); + return (Criteria) this; + } + + public Criteria andSwitchbCodeNotBetween(String value1, String value2) { + addCriterion("switchb_code not between", value1, value2, "switchbCode"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/DraftMapWithBLOBs.java b/src/main/java/club/joylink/rtss/entity/DraftMapWithBLOBs.java new file mode 100644 index 000000000..90bd0caa0 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/DraftMapWithBLOBs.java @@ -0,0 +1,87 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * draft_map + * @author + */ +public class DraftMapWithBLOBs extends DraftMap implements Serializable { + /** + * 图形数据 + */ + private String graphData; + + /** + * 逻辑数据 + */ + private String logicData; + + private static final long serialVersionUID = 1L; + + public String getGraphData() { + return graphData; + } + + public void setGraphData(String graphData) { + this.graphData = graphData; + } + + public String getLogicData() { + return logicData; + } + + public void setLogicData(String logicData) { + this.logicData = logicData; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + DraftMapWithBLOBs other = (DraftMapWithBLOBs) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) + && (this.getAuthorId() == null ? other.getAuthorId() == null : this.getAuthorId().equals(other.getAuthorId())) + && (this.getLineCode() == null ? other.getLineCode() == null : this.getLineCode().equals(other.getLineCode())) + && (this.getDrawWay() == null ? other.getDrawWay() == null : this.getDrawWay().equals(other.getDrawWay())) + && (this.getGraphData() == null ? other.getGraphData() == null : this.getGraphData().equals(other.getGraphData())) + && (this.getLogicData() == null ? other.getLogicData() == null : this.getLogicData().equals(other.getLogicData())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + result = prime * result + ((getAuthorId() == null) ? 0 : getAuthorId().hashCode()); + result = prime * result + ((getLineCode() == null) ? 0 : getLineCode().hashCode()); + result = prime * result + ((getDrawWay() == null) ? 0 : getDrawWay().hashCode()); + result = prime * result + ((getGraphData() == null) ? 0 : getGraphData().hashCode()); + result = prime * result + ((getLogicData() == null) ? 0 : getLogicData().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", graphData=").append(graphData); + sb.append(", logicData=").append(logicData); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/ExamDefinition.java b/src/main/java/club/joylink/rtss/entity/ExamDefinition.java new file mode 100644 index 000000000..f044c5acd --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/ExamDefinition.java @@ -0,0 +1,265 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * exam_definition + * @author + */ +public class ExamDefinition implements Serializable { + private Long id; + + /** + * 所属课程ID + */ + private Long lessonId; + + /** + * 考试名称 + */ + private String name; + + /** + * 考试类型:数据字典值 + */ + private String type; + + /** + * 考试时长:单位s + */ + private Integer duration; + + /** + * 考试开始时间 + */ + private LocalDateTime startTime; + + /** + * 考试结束时间 + */ + private LocalDateTime endTime; + + /** + * 满分 + */ + private Integer fullPoint; + + /** + * 及格分 + */ + private Integer passingPoint; + + /** + * 创建人ID + */ + private Long creatorId; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + /** + * 考试说明 + */ + private String remarks; + + /** + * 状态:0-无效,1-有效 + */ + private String status; + + /** + * 是否试用:true:可以试用;false:不可以试用 + */ + private Boolean trial; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getLessonId() { + return lessonId; + } + + public void setLessonId(Long lessonId) { + this.lessonId = lessonId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Integer getDuration() { + return duration; + } + + public void setDuration(Integer duration) { + this.duration = duration; + } + + public LocalDateTime getStartTime() { + return startTime; + } + + public void setStartTime(LocalDateTime startTime) { + this.startTime = startTime; + } + + public LocalDateTime getEndTime() { + return endTime; + } + + public void setEndTime(LocalDateTime endTime) { + this.endTime = endTime; + } + + public Integer getFullPoint() { + return fullPoint; + } + + public void setFullPoint(Integer fullPoint) { + this.fullPoint = fullPoint; + } + + public Integer getPassingPoint() { + return passingPoint; + } + + public void setPassingPoint(Integer passingPoint) { + this.passingPoint = passingPoint; + } + + public Long getCreatorId() { + return creatorId; + } + + public void setCreatorId(Long creatorId) { + this.creatorId = creatorId; + } + + public LocalDateTime getCreateTime() { + return createTime; + } + + public void setCreateTime(LocalDateTime createTime) { + this.createTime = createTime; + } + + public String getRemarks() { + return remarks; + } + + public void setRemarks(String remarks) { + this.remarks = remarks; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public Boolean getTrial() { + return trial; + } + + public void setTrial(Boolean trial) { + this.trial = trial; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + ExamDefinition other = (ExamDefinition) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getLessonId() == null ? other.getLessonId() == null : this.getLessonId().equals(other.getLessonId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) + && (this.getDuration() == null ? other.getDuration() == null : this.getDuration().equals(other.getDuration())) + && (this.getStartTime() == null ? other.getStartTime() == null : this.getStartTime().equals(other.getStartTime())) + && (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime())) + && (this.getFullPoint() == null ? other.getFullPoint() == null : this.getFullPoint().equals(other.getFullPoint())) + && (this.getPassingPoint() == null ? other.getPassingPoint() == null : this.getPassingPoint().equals(other.getPassingPoint())) + && (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getTrial() == null ? other.getTrial() == null : this.getTrial().equals(other.getTrial())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getLessonId() == null) ? 0 : getLessonId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); + result = prime * result + ((getDuration() == null) ? 0 : getDuration().hashCode()); + result = prime * result + ((getStartTime() == null) ? 0 : getStartTime().hashCode()); + result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode()); + result = prime * result + ((getFullPoint() == null) ? 0 : getFullPoint().hashCode()); + result = prime * result + ((getPassingPoint() == null) ? 0 : getPassingPoint().hashCode()); + result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getTrial() == null) ? 0 : getTrial().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", lessonId=").append(lessonId); + sb.append(", name=").append(name); + sb.append(", type=").append(type); + sb.append(", duration=").append(duration); + sb.append(", startTime=").append(startTime); + sb.append(", endTime=").append(endTime); + sb.append(", fullPoint=").append(fullPoint); + sb.append(", passingPoint=").append(passingPoint); + sb.append(", creatorId=").append(creatorId); + sb.append(", createTime=").append(createTime); + sb.append(", remarks=").append(remarks); + sb.append(", status=").append(status); + sb.append(", trial=").append(trial); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/ExamDefinitionExample.java b/src/main/java/club/joylink/rtss/entity/ExamDefinitionExample.java new file mode 100644 index 000000000..a92e32b56 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/ExamDefinitionExample.java @@ -0,0 +1,1103 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class ExamDefinitionExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public ExamDefinitionExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andLessonIdIsNull() { + addCriterion("lesson_id is null"); + return (Criteria) this; + } + + public Criteria andLessonIdIsNotNull() { + addCriterion("lesson_id is not null"); + return (Criteria) this; + } + + public Criteria andLessonIdEqualTo(Long value) { + addCriterion("lesson_id =", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdNotEqualTo(Long value) { + addCriterion("lesson_id <>", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdGreaterThan(Long value) { + addCriterion("lesson_id >", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdGreaterThanOrEqualTo(Long value) { + addCriterion("lesson_id >=", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdLessThan(Long value) { + addCriterion("lesson_id <", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdLessThanOrEqualTo(Long value) { + addCriterion("lesson_id <=", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdIn(List values) { + addCriterion("lesson_id in", values, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdNotIn(List values) { + addCriterion("lesson_id not in", values, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdBetween(Long value1, Long value2) { + addCriterion("lesson_id between", value1, value2, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdNotBetween(Long value1, Long value2) { + addCriterion("lesson_id not between", value1, value2, "lessonId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("`type` is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("`type` is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(String value) { + addCriterion("`type` =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(String value) { + addCriterion("`type` <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(String value) { + addCriterion("`type` >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(String value) { + addCriterion("`type` >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(String value) { + addCriterion("`type` <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(String value) { + addCriterion("`type` <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLike(String value) { + addCriterion("`type` like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotLike(String value) { + addCriterion("`type` not like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("`type` in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("`type` not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(String value1, String value2) { + addCriterion("`type` between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(String value1, String value2) { + addCriterion("`type` not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andDurationIsNull() { + addCriterion("duration is null"); + return (Criteria) this; + } + + public Criteria andDurationIsNotNull() { + addCriterion("duration is not null"); + return (Criteria) this; + } + + public Criteria andDurationEqualTo(Integer value) { + addCriterion("duration =", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationNotEqualTo(Integer value) { + addCriterion("duration <>", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationGreaterThan(Integer value) { + addCriterion("duration >", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationGreaterThanOrEqualTo(Integer value) { + addCriterion("duration >=", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationLessThan(Integer value) { + addCriterion("duration <", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationLessThanOrEqualTo(Integer value) { + addCriterion("duration <=", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationIn(List values) { + addCriterion("duration in", values, "duration"); + return (Criteria) this; + } + + public Criteria andDurationNotIn(List values) { + addCriterion("duration not in", values, "duration"); + return (Criteria) this; + } + + public Criteria andDurationBetween(Integer value1, Integer value2) { + addCriterion("duration between", value1, value2, "duration"); + return (Criteria) this; + } + + public Criteria andDurationNotBetween(Integer value1, Integer value2) { + addCriterion("duration not between", value1, value2, "duration"); + return (Criteria) this; + } + + public Criteria andStartTimeIsNull() { + addCriterion("start_time is null"); + return (Criteria) this; + } + + public Criteria andStartTimeIsNotNull() { + addCriterion("start_time is not null"); + return (Criteria) this; + } + + public Criteria andStartTimeEqualTo(LocalDateTime value) { + addCriterion("start_time =", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotEqualTo(LocalDateTime value) { + addCriterion("start_time <>", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeGreaterThan(LocalDateTime value) { + addCriterion("start_time >", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("start_time >=", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeLessThan(LocalDateTime value) { + addCriterion("start_time <", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("start_time <=", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeIn(List values) { + addCriterion("start_time in", values, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotIn(List values) { + addCriterion("start_time not in", values, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("start_time between", value1, value2, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("start_time not between", value1, value2, "startTime"); + return (Criteria) this; + } + + public Criteria andEndTimeIsNull() { + addCriterion("end_time is null"); + return (Criteria) this; + } + + public Criteria andEndTimeIsNotNull() { + addCriterion("end_time is not null"); + return (Criteria) this; + } + + public Criteria andEndTimeEqualTo(LocalDateTime value) { + addCriterion("end_time =", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeNotEqualTo(LocalDateTime value) { + addCriterion("end_time <>", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeGreaterThan(LocalDateTime value) { + addCriterion("end_time >", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("end_time >=", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeLessThan(LocalDateTime value) { + addCriterion("end_time <", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("end_time <=", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeIn(List values) { + addCriterion("end_time in", values, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeNotIn(List values) { + addCriterion("end_time not in", values, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("end_time between", value1, value2, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("end_time not between", value1, value2, "endTime"); + return (Criteria) this; + } + + public Criteria andFullPointIsNull() { + addCriterion("full_point is null"); + return (Criteria) this; + } + + public Criteria andFullPointIsNotNull() { + addCriterion("full_point is not null"); + return (Criteria) this; + } + + public Criteria andFullPointEqualTo(Integer value) { + addCriterion("full_point =", value, "fullPoint"); + return (Criteria) this; + } + + public Criteria andFullPointNotEqualTo(Integer value) { + addCriterion("full_point <>", value, "fullPoint"); + return (Criteria) this; + } + + public Criteria andFullPointGreaterThan(Integer value) { + addCriterion("full_point >", value, "fullPoint"); + return (Criteria) this; + } + + public Criteria andFullPointGreaterThanOrEqualTo(Integer value) { + addCriterion("full_point >=", value, "fullPoint"); + return (Criteria) this; + } + + public Criteria andFullPointLessThan(Integer value) { + addCriterion("full_point <", value, "fullPoint"); + return (Criteria) this; + } + + public Criteria andFullPointLessThanOrEqualTo(Integer value) { + addCriterion("full_point <=", value, "fullPoint"); + return (Criteria) this; + } + + public Criteria andFullPointIn(List values) { + addCriterion("full_point in", values, "fullPoint"); + return (Criteria) this; + } + + public Criteria andFullPointNotIn(List values) { + addCriterion("full_point not in", values, "fullPoint"); + return (Criteria) this; + } + + public Criteria andFullPointBetween(Integer value1, Integer value2) { + addCriterion("full_point between", value1, value2, "fullPoint"); + return (Criteria) this; + } + + public Criteria andFullPointNotBetween(Integer value1, Integer value2) { + addCriterion("full_point not between", value1, value2, "fullPoint"); + return (Criteria) this; + } + + public Criteria andPassingPointIsNull() { + addCriterion("passing_point is null"); + return (Criteria) this; + } + + public Criteria andPassingPointIsNotNull() { + addCriterion("passing_point is not null"); + return (Criteria) this; + } + + public Criteria andPassingPointEqualTo(Integer value) { + addCriterion("passing_point =", value, "passingPoint"); + return (Criteria) this; + } + + public Criteria andPassingPointNotEqualTo(Integer value) { + addCriterion("passing_point <>", value, "passingPoint"); + return (Criteria) this; + } + + public Criteria andPassingPointGreaterThan(Integer value) { + addCriterion("passing_point >", value, "passingPoint"); + return (Criteria) this; + } + + public Criteria andPassingPointGreaterThanOrEqualTo(Integer value) { + addCriterion("passing_point >=", value, "passingPoint"); + return (Criteria) this; + } + + public Criteria andPassingPointLessThan(Integer value) { + addCriterion("passing_point <", value, "passingPoint"); + return (Criteria) this; + } + + public Criteria andPassingPointLessThanOrEqualTo(Integer value) { + addCriterion("passing_point <=", value, "passingPoint"); + return (Criteria) this; + } + + public Criteria andPassingPointIn(List values) { + addCriterion("passing_point in", values, "passingPoint"); + return (Criteria) this; + } + + public Criteria andPassingPointNotIn(List values) { + addCriterion("passing_point not in", values, "passingPoint"); + return (Criteria) this; + } + + public Criteria andPassingPointBetween(Integer value1, Integer value2) { + addCriterion("passing_point between", value1, value2, "passingPoint"); + return (Criteria) this; + } + + public Criteria andPassingPointNotBetween(Integer value1, Integer value2) { + addCriterion("passing_point not between", value1, value2, "passingPoint"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNull() { + addCriterion("creator_id is null"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNotNull() { + addCriterion("creator_id is not null"); + return (Criteria) this; + } + + public Criteria andCreatorIdEqualTo(Long value) { + addCriterion("creator_id =", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotEqualTo(Long value) { + addCriterion("creator_id <>", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThan(Long value) { + addCriterion("creator_id >", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) { + addCriterion("creator_id >=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThan(Long value) { + addCriterion("creator_id <", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThanOrEqualTo(Long value) { + addCriterion("creator_id <=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdIn(List values) { + addCriterion("creator_id in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotIn(List values) { + addCriterion("creator_id not in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdBetween(Long value1, Long value2) { + addCriterion("creator_id between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotBetween(Long value1, Long value2) { + addCriterion("creator_id not between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(LocalDateTime value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(LocalDateTime value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(LocalDateTime value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(LocalDateTime value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andRemarksIsNull() { + addCriterion("remarks is null"); + return (Criteria) this; + } + + public Criteria andRemarksIsNotNull() { + addCriterion("remarks is not null"); + return (Criteria) this; + } + + public Criteria andRemarksEqualTo(String value) { + addCriterion("remarks =", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotEqualTo(String value) { + addCriterion("remarks <>", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksGreaterThan(String value) { + addCriterion("remarks >", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksGreaterThanOrEqualTo(String value) { + addCriterion("remarks >=", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLessThan(String value) { + addCriterion("remarks <", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLessThanOrEqualTo(String value) { + addCriterion("remarks <=", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLike(String value) { + addCriterion("remarks like", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotLike(String value) { + addCriterion("remarks not like", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksIn(List values) { + addCriterion("remarks in", values, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotIn(List values) { + addCriterion("remarks not in", values, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksBetween(String value1, String value2) { + addCriterion("remarks between", value1, value2, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotBetween(String value1, String value2) { + addCriterion("remarks not between", value1, value2, "remarks"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andTrialIsNull() { + addCriterion("trial is null"); + return (Criteria) this; + } + + public Criteria andTrialIsNotNull() { + addCriterion("trial is not null"); + return (Criteria) this; + } + + public Criteria andTrialEqualTo(Boolean value) { + addCriterion("trial =", value, "trial"); + return (Criteria) this; + } + + public Criteria andTrialNotEqualTo(Boolean value) { + addCriterion("trial <>", value, "trial"); + return (Criteria) this; + } + + public Criteria andTrialGreaterThan(Boolean value) { + addCriterion("trial >", value, "trial"); + return (Criteria) this; + } + + public Criteria andTrialGreaterThanOrEqualTo(Boolean value) { + addCriterion("trial >=", value, "trial"); + return (Criteria) this; + } + + public Criteria andTrialLessThan(Boolean value) { + addCriterion("trial <", value, "trial"); + return (Criteria) this; + } + + public Criteria andTrialLessThanOrEqualTo(Boolean value) { + addCriterion("trial <=", value, "trial"); + return (Criteria) this; + } + + public Criteria andTrialIn(List values) { + addCriterion("trial in", values, "trial"); + return (Criteria) this; + } + + public Criteria andTrialNotIn(List values) { + addCriterion("trial not in", values, "trial"); + return (Criteria) this; + } + + public Criteria andTrialBetween(Boolean value1, Boolean value2) { + addCriterion("trial between", value1, value2, "trial"); + return (Criteria) this; + } + + public Criteria andTrialNotBetween(Boolean value1, Boolean value2) { + addCriterion("trial not between", value1, value2, "trial"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/ExamDefinitionRules.java b/src/main/java/club/joylink/rtss/entity/ExamDefinitionRules.java new file mode 100644 index 000000000..84cfcdd30 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/ExamDefinitionRules.java @@ -0,0 +1,136 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * exam_definition_rules + * @author + */ +public class ExamDefinitionRules implements Serializable { + private Long id; + + /** + * 考试定义ID + */ + private Long examId; + + /** + * 实训类型 + */ + private String trainingType; + + /** + * 题目数量 + */ + private Integer num; + + /** + * 每题分数 + */ + private Integer point; + + /** + * 操作类型 + */ + private String operateType; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getExamId() { + return examId; + } + + public void setExamId(Long examId) { + this.examId = examId; + } + + public String getTrainingType() { + return trainingType; + } + + public void setTrainingType(String trainingType) { + this.trainingType = trainingType; + } + + public Integer getNum() { + return num; + } + + public void setNum(Integer num) { + this.num = num; + } + + public Integer getPoint() { + return point; + } + + public void setPoint(Integer point) { + this.point = point; + } + + public String getOperateType() { + return operateType; + } + + public void setOperateType(String operateType) { + this.operateType = operateType; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + ExamDefinitionRules other = (ExamDefinitionRules) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getExamId() == null ? other.getExamId() == null : this.getExamId().equals(other.getExamId())) + && (this.getTrainingType() == null ? other.getTrainingType() == null : this.getTrainingType().equals(other.getTrainingType())) + && (this.getNum() == null ? other.getNum() == null : this.getNum().equals(other.getNum())) + && (this.getPoint() == null ? other.getPoint() == null : this.getPoint().equals(other.getPoint())) + && (this.getOperateType() == null ? other.getOperateType() == null : this.getOperateType().equals(other.getOperateType())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getExamId() == null) ? 0 : getExamId().hashCode()); + result = prime * result + ((getTrainingType() == null) ? 0 : getTrainingType().hashCode()); + result = prime * result + ((getNum() == null) ? 0 : getNum().hashCode()); + result = prime * result + ((getPoint() == null) ? 0 : getPoint().hashCode()); + result = prime * result + ((getOperateType() == null) ? 0 : getOperateType().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", examId=").append(examId); + sb.append(", trainingType=").append(trainingType); + sb.append(", num=").append(num); + sb.append(", point=").append(point); + sb.append(", operateType=").append(operateType); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/ExamDefinitionRulesExample.java b/src/main/java/club/joylink/rtss/entity/ExamDefinitionRulesExample.java new file mode 100644 index 000000000..0d2bc4320 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/ExamDefinitionRulesExample.java @@ -0,0 +1,602 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class ExamDefinitionRulesExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public ExamDefinitionRulesExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andExamIdIsNull() { + addCriterion("exam_id is null"); + return (Criteria) this; + } + + public Criteria andExamIdIsNotNull() { + addCriterion("exam_id is not null"); + return (Criteria) this; + } + + public Criteria andExamIdEqualTo(Long value) { + addCriterion("exam_id =", value, "examId"); + return (Criteria) this; + } + + public Criteria andExamIdNotEqualTo(Long value) { + addCriterion("exam_id <>", value, "examId"); + return (Criteria) this; + } + + public Criteria andExamIdGreaterThan(Long value) { + addCriterion("exam_id >", value, "examId"); + return (Criteria) this; + } + + public Criteria andExamIdGreaterThanOrEqualTo(Long value) { + addCriterion("exam_id >=", value, "examId"); + return (Criteria) this; + } + + public Criteria andExamIdLessThan(Long value) { + addCriterion("exam_id <", value, "examId"); + return (Criteria) this; + } + + public Criteria andExamIdLessThanOrEqualTo(Long value) { + addCriterion("exam_id <=", value, "examId"); + return (Criteria) this; + } + + public Criteria andExamIdIn(List values) { + addCriterion("exam_id in", values, "examId"); + return (Criteria) this; + } + + public Criteria andExamIdNotIn(List values) { + addCriterion("exam_id not in", values, "examId"); + return (Criteria) this; + } + + public Criteria andExamIdBetween(Long value1, Long value2) { + addCriterion("exam_id between", value1, value2, "examId"); + return (Criteria) this; + } + + public Criteria andExamIdNotBetween(Long value1, Long value2) { + addCriterion("exam_id not between", value1, value2, "examId"); + return (Criteria) this; + } + + public Criteria andTrainingTypeIsNull() { + addCriterion("training_type is null"); + return (Criteria) this; + } + + public Criteria andTrainingTypeIsNotNull() { + addCriterion("training_type is not null"); + return (Criteria) this; + } + + public Criteria andTrainingTypeEqualTo(String value) { + addCriterion("training_type =", value, "trainingType"); + return (Criteria) this; + } + + public Criteria andTrainingTypeNotEqualTo(String value) { + addCriterion("training_type <>", value, "trainingType"); + return (Criteria) this; + } + + public Criteria andTrainingTypeGreaterThan(String value) { + addCriterion("training_type >", value, "trainingType"); + return (Criteria) this; + } + + public Criteria andTrainingTypeGreaterThanOrEqualTo(String value) { + addCriterion("training_type >=", value, "trainingType"); + return (Criteria) this; + } + + public Criteria andTrainingTypeLessThan(String value) { + addCriterion("training_type <", value, "trainingType"); + return (Criteria) this; + } + + public Criteria andTrainingTypeLessThanOrEqualTo(String value) { + addCriterion("training_type <=", value, "trainingType"); + return (Criteria) this; + } + + public Criteria andTrainingTypeLike(String value) { + addCriterion("training_type like", value, "trainingType"); + return (Criteria) this; + } + + public Criteria andTrainingTypeNotLike(String value) { + addCriterion("training_type not like", value, "trainingType"); + return (Criteria) this; + } + + public Criteria andTrainingTypeIn(List values) { + addCriterion("training_type in", values, "trainingType"); + return (Criteria) this; + } + + public Criteria andTrainingTypeNotIn(List values) { + addCriterion("training_type not in", values, "trainingType"); + return (Criteria) this; + } + + public Criteria andTrainingTypeBetween(String value1, String value2) { + addCriterion("training_type between", value1, value2, "trainingType"); + return (Criteria) this; + } + + public Criteria andTrainingTypeNotBetween(String value1, String value2) { + addCriterion("training_type not between", value1, value2, "trainingType"); + return (Criteria) this; + } + + public Criteria andNumIsNull() { + addCriterion("num is null"); + return (Criteria) this; + } + + public Criteria andNumIsNotNull() { + addCriterion("num is not null"); + return (Criteria) this; + } + + public Criteria andNumEqualTo(Integer value) { + addCriterion("num =", value, "num"); + return (Criteria) this; + } + + public Criteria andNumNotEqualTo(Integer value) { + addCriterion("num <>", value, "num"); + return (Criteria) this; + } + + public Criteria andNumGreaterThan(Integer value) { + addCriterion("num >", value, "num"); + return (Criteria) this; + } + + public Criteria andNumGreaterThanOrEqualTo(Integer value) { + addCriterion("num >=", value, "num"); + return (Criteria) this; + } + + public Criteria andNumLessThan(Integer value) { + addCriterion("num <", value, "num"); + return (Criteria) this; + } + + public Criteria andNumLessThanOrEqualTo(Integer value) { + addCriterion("num <=", value, "num"); + return (Criteria) this; + } + + public Criteria andNumIn(List values) { + addCriterion("num in", values, "num"); + return (Criteria) this; + } + + public Criteria andNumNotIn(List values) { + addCriterion("num not in", values, "num"); + return (Criteria) this; + } + + public Criteria andNumBetween(Integer value1, Integer value2) { + addCriterion("num between", value1, value2, "num"); + return (Criteria) this; + } + + public Criteria andNumNotBetween(Integer value1, Integer value2) { + addCriterion("num not between", value1, value2, "num"); + return (Criteria) this; + } + + public Criteria andPointIsNull() { + addCriterion("point is null"); + return (Criteria) this; + } + + public Criteria andPointIsNotNull() { + addCriterion("point is not null"); + return (Criteria) this; + } + + public Criteria andPointEqualTo(Integer value) { + addCriterion("point =", value, "point"); + return (Criteria) this; + } + + public Criteria andPointNotEqualTo(Integer value) { + addCriterion("point <>", value, "point"); + return (Criteria) this; + } + + public Criteria andPointGreaterThan(Integer value) { + addCriterion("point >", value, "point"); + return (Criteria) this; + } + + public Criteria andPointGreaterThanOrEqualTo(Integer value) { + addCriterion("point >=", value, "point"); + return (Criteria) this; + } + + public Criteria andPointLessThan(Integer value) { + addCriterion("point <", value, "point"); + return (Criteria) this; + } + + public Criteria andPointLessThanOrEqualTo(Integer value) { + addCriterion("point <=", value, "point"); + return (Criteria) this; + } + + public Criteria andPointIn(List values) { + addCriterion("point in", values, "point"); + return (Criteria) this; + } + + public Criteria andPointNotIn(List values) { + addCriterion("point not in", values, "point"); + return (Criteria) this; + } + + public Criteria andPointBetween(Integer value1, Integer value2) { + addCriterion("point between", value1, value2, "point"); + return (Criteria) this; + } + + public Criteria andPointNotBetween(Integer value1, Integer value2) { + addCriterion("point not between", value1, value2, "point"); + return (Criteria) this; + } + + public Criteria andOperateTypeIsNull() { + addCriterion("operate_type is null"); + return (Criteria) this; + } + + public Criteria andOperateTypeIsNotNull() { + addCriterion("operate_type is not null"); + return (Criteria) this; + } + + public Criteria andOperateTypeEqualTo(String value) { + addCriterion("operate_type =", value, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeNotEqualTo(String value) { + addCriterion("operate_type <>", value, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeGreaterThan(String value) { + addCriterion("operate_type >", value, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeGreaterThanOrEqualTo(String value) { + addCriterion("operate_type >=", value, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeLessThan(String value) { + addCriterion("operate_type <", value, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeLessThanOrEqualTo(String value) { + addCriterion("operate_type <=", value, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeLike(String value) { + addCriterion("operate_type like", value, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeNotLike(String value) { + addCriterion("operate_type not like", value, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeIn(List values) { + addCriterion("operate_type in", values, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeNotIn(List values) { + addCriterion("operate_type not in", values, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeBetween(String value1, String value2) { + addCriterion("operate_type between", value1, value2, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeNotBetween(String value1, String value2) { + addCriterion("operate_type not between", value1, value2, "operateType"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/FaultRule.java b/src/main/java/club/joylink/rtss/entity/FaultRule.java new file mode 100644 index 000000000..d0b899e01 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/FaultRule.java @@ -0,0 +1,136 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * fault_rule + * @author + */ +public class FaultRule implements Serializable { + private Long id; + + /** + * 线路编号 + */ + private String lineCode; + + /** + * 设备类型 + */ + private String deviceType; + + /** + * 设备编码 + */ + private String deviceCode; + + /** + * 故障类型 + */ + private String faultType; + + /** + * 触发条件 + */ + private String triggerCondition; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getLineCode() { + return lineCode; + } + + public void setLineCode(String lineCode) { + this.lineCode = lineCode; + } + + public String getDeviceType() { + return deviceType; + } + + public void setDeviceType(String deviceType) { + this.deviceType = deviceType; + } + + public String getDeviceCode() { + return deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + public String getFaultType() { + return faultType; + } + + public void setFaultType(String faultType) { + this.faultType = faultType; + } + + public String getTriggerCondition() { + return triggerCondition; + } + + public void setTriggerCondition(String triggerCondition) { + this.triggerCondition = triggerCondition; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + FaultRule other = (FaultRule) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getLineCode() == null ? other.getLineCode() == null : this.getLineCode().equals(other.getLineCode())) + && (this.getDeviceType() == null ? other.getDeviceType() == null : this.getDeviceType().equals(other.getDeviceType())) + && (this.getDeviceCode() == null ? other.getDeviceCode() == null : this.getDeviceCode().equals(other.getDeviceCode())) + && (this.getFaultType() == null ? other.getFaultType() == null : this.getFaultType().equals(other.getFaultType())) + && (this.getTriggerCondition() == null ? other.getTriggerCondition() == null : this.getTriggerCondition().equals(other.getTriggerCondition())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getLineCode() == null) ? 0 : getLineCode().hashCode()); + result = prime * result + ((getDeviceType() == null) ? 0 : getDeviceType().hashCode()); + result = prime * result + ((getDeviceCode() == null) ? 0 : getDeviceCode().hashCode()); + result = prime * result + ((getFaultType() == null) ? 0 : getFaultType().hashCode()); + result = prime * result + ((getTriggerCondition() == null) ? 0 : getTriggerCondition().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", lineCode=").append(lineCode); + sb.append(", deviceType=").append(deviceType); + sb.append(", deviceCode=").append(deviceCode); + sb.append(", faultType=").append(faultType); + sb.append(", triggerCondition=").append(triggerCondition); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/FaultRuleExample.java b/src/main/java/club/joylink/rtss/entity/FaultRuleExample.java new file mode 100644 index 000000000..6f40c9ba5 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/FaultRuleExample.java @@ -0,0 +1,562 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class FaultRuleExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public FaultRuleExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andLineCodeIsNull() { + addCriterion("line_code is null"); + return (Criteria) this; + } + + public Criteria andLineCodeIsNotNull() { + addCriterion("line_code is not null"); + return (Criteria) this; + } + + public Criteria andLineCodeEqualTo(String value) { + addCriterion("line_code =", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeNotEqualTo(String value) { + addCriterion("line_code <>", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeGreaterThan(String value) { + addCriterion("line_code >", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeGreaterThanOrEqualTo(String value) { + addCriterion("line_code >=", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeLessThan(String value) { + addCriterion("line_code <", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeLessThanOrEqualTo(String value) { + addCriterion("line_code <=", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeLike(String value) { + addCriterion("line_code like", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeNotLike(String value) { + addCriterion("line_code not like", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeIn(List values) { + addCriterion("line_code in", values, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeNotIn(List values) { + addCriterion("line_code not in", values, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeBetween(String value1, String value2) { + addCriterion("line_code between", value1, value2, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeNotBetween(String value1, String value2) { + addCriterion("line_code not between", value1, value2, "lineCode"); + return (Criteria) this; + } + + public Criteria andDeviceTypeIsNull() { + addCriterion("device_type is null"); + return (Criteria) this; + } + + public Criteria andDeviceTypeIsNotNull() { + addCriterion("device_type is not null"); + return (Criteria) this; + } + + public Criteria andDeviceTypeEqualTo(String value) { + addCriterion("device_type =", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeNotEqualTo(String value) { + addCriterion("device_type <>", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeGreaterThan(String value) { + addCriterion("device_type >", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeGreaterThanOrEqualTo(String value) { + addCriterion("device_type >=", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeLessThan(String value) { + addCriterion("device_type <", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeLessThanOrEqualTo(String value) { + addCriterion("device_type <=", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeLike(String value) { + addCriterion("device_type like", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeNotLike(String value) { + addCriterion("device_type not like", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeIn(List values) { + addCriterion("device_type in", values, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeNotIn(List values) { + addCriterion("device_type not in", values, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeBetween(String value1, String value2) { + addCriterion("device_type between", value1, value2, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeNotBetween(String value1, String value2) { + addCriterion("device_type not between", value1, value2, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceCodeIsNull() { + addCriterion("device_code is null"); + return (Criteria) this; + } + + public Criteria andDeviceCodeIsNotNull() { + addCriterion("device_code is not null"); + return (Criteria) this; + } + + public Criteria andDeviceCodeEqualTo(String value) { + addCriterion("device_code =", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeNotEqualTo(String value) { + addCriterion("device_code <>", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeGreaterThan(String value) { + addCriterion("device_code >", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeGreaterThanOrEqualTo(String value) { + addCriterion("device_code >=", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeLessThan(String value) { + addCriterion("device_code <", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeLessThanOrEqualTo(String value) { + addCriterion("device_code <=", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeLike(String value) { + addCriterion("device_code like", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeNotLike(String value) { + addCriterion("device_code not like", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeIn(List values) { + addCriterion("device_code in", values, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeNotIn(List values) { + addCriterion("device_code not in", values, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeBetween(String value1, String value2) { + addCriterion("device_code between", value1, value2, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeNotBetween(String value1, String value2) { + addCriterion("device_code not between", value1, value2, "deviceCode"); + return (Criteria) this; + } + + public Criteria andFaultTypeIsNull() { + addCriterion("fault_type is null"); + return (Criteria) this; + } + + public Criteria andFaultTypeIsNotNull() { + addCriterion("fault_type is not null"); + return (Criteria) this; + } + + public Criteria andFaultTypeEqualTo(String value) { + addCriterion("fault_type =", value, "faultType"); + return (Criteria) this; + } + + public Criteria andFaultTypeNotEqualTo(String value) { + addCriterion("fault_type <>", value, "faultType"); + return (Criteria) this; + } + + public Criteria andFaultTypeGreaterThan(String value) { + addCriterion("fault_type >", value, "faultType"); + return (Criteria) this; + } + + public Criteria andFaultTypeGreaterThanOrEqualTo(String value) { + addCriterion("fault_type >=", value, "faultType"); + return (Criteria) this; + } + + public Criteria andFaultTypeLessThan(String value) { + addCriterion("fault_type <", value, "faultType"); + return (Criteria) this; + } + + public Criteria andFaultTypeLessThanOrEqualTo(String value) { + addCriterion("fault_type <=", value, "faultType"); + return (Criteria) this; + } + + public Criteria andFaultTypeLike(String value) { + addCriterion("fault_type like", value, "faultType"); + return (Criteria) this; + } + + public Criteria andFaultTypeNotLike(String value) { + addCriterion("fault_type not like", value, "faultType"); + return (Criteria) this; + } + + public Criteria andFaultTypeIn(List values) { + addCriterion("fault_type in", values, "faultType"); + return (Criteria) this; + } + + public Criteria andFaultTypeNotIn(List values) { + addCriterion("fault_type not in", values, "faultType"); + return (Criteria) this; + } + + public Criteria andFaultTypeBetween(String value1, String value2) { + addCriterion("fault_type between", value1, value2, "faultType"); + return (Criteria) this; + } + + public Criteria andFaultTypeNotBetween(String value1, String value2) { + addCriterion("fault_type not between", value1, value2, "faultType"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/Ibp.java b/src/main/java/club/joylink/rtss/entity/Ibp.java new file mode 100644 index 000000000..09f144fc2 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/Ibp.java @@ -0,0 +1,52 @@ +package club.joylink.rtss.entity; + +import lombok.Data; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * @author + * 发布的IBP数据 + */ +@Data +public class Ibp implements Serializable { + private Long id; + + /** + * 所属地图id + */ + private Long mapId; + + /** + * 车站编号 + */ + private String stationCode; + + /** + * 创建用户id + */ + private Long creatorId; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + /** + * 更新用户id + */ + private Long updateUserId; + + /** + * 更新时间 + */ + private LocalDateTime updateTime; + + /** + * 绘图数据 + */ + private String data; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/IbpExample.java b/src/main/java/club/joylink/rtss/entity/IbpExample.java new file mode 100644 index 000000000..0b9bca272 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/IbpExample.java @@ -0,0 +1,653 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class IbpExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public IbpExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andStationCodeIsNull() { + addCriterion("station_code is null"); + return (Criteria) this; + } + + public Criteria andStationCodeIsNotNull() { + addCriterion("station_code is not null"); + return (Criteria) this; + } + + public Criteria andStationCodeEqualTo(String value) { + addCriterion("station_code =", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeNotEqualTo(String value) { + addCriterion("station_code <>", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeGreaterThan(String value) { + addCriterion("station_code >", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeGreaterThanOrEqualTo(String value) { + addCriterion("station_code >=", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeLessThan(String value) { + addCriterion("station_code <", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeLessThanOrEqualTo(String value) { + addCriterion("station_code <=", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeLike(String value) { + addCriterion("station_code like", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeNotLike(String value) { + addCriterion("station_code not like", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeIn(List values) { + addCriterion("station_code in", values, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeNotIn(List values) { + addCriterion("station_code not in", values, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeBetween(String value1, String value2) { + addCriterion("station_code between", value1, value2, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeNotBetween(String value1, String value2) { + addCriterion("station_code not between", value1, value2, "stationCode"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNull() { + addCriterion("creator_id is null"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNotNull() { + addCriterion("creator_id is not null"); + return (Criteria) this; + } + + public Criteria andCreatorIdEqualTo(Long value) { + addCriterion("creator_id =", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotEqualTo(Long value) { + addCriterion("creator_id <>", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThan(Long value) { + addCriterion("creator_id >", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) { + addCriterion("creator_id >=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThan(Long value) { + addCriterion("creator_id <", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThanOrEqualTo(Long value) { + addCriterion("creator_id <=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdIn(List values) { + addCriterion("creator_id in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotIn(List values) { + addCriterion("creator_id not in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdBetween(Long value1, Long value2) { + addCriterion("creator_id between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotBetween(Long value1, Long value2) { + addCriterion("creator_id not between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(LocalDateTime value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(LocalDateTime value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(LocalDateTime value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(LocalDateTime value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdIsNull() { + addCriterion("update_user_id is null"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdIsNotNull() { + addCriterion("update_user_id is not null"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdEqualTo(Long value) { + addCriterion("update_user_id =", value, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdNotEqualTo(Long value) { + addCriterion("update_user_id <>", value, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdGreaterThan(Long value) { + addCriterion("update_user_id >", value, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("update_user_id >=", value, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdLessThan(Long value) { + addCriterion("update_user_id <", value, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdLessThanOrEqualTo(Long value) { + addCriterion("update_user_id <=", value, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdIn(List values) { + addCriterion("update_user_id in", values, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdNotIn(List values) { + addCriterion("update_user_id not in", values, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdBetween(Long value1, Long value2) { + addCriterion("update_user_id between", value1, value2, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdNotBetween(Long value1, Long value2) { + addCriterion("update_user_id not between", value1, value2, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(LocalDateTime value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(LocalDateTime value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(LocalDateTime value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(LocalDateTime value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/Iscs.java b/src/main/java/club/joylink/rtss/entity/Iscs.java new file mode 100644 index 000000000..87492af41 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/Iscs.java @@ -0,0 +1,137 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * iscs + * @author + */ +public class Iscs implements Serializable { + private Integer id; + + /** + * 线路code + */ + private String lineCode; + + private String stationCode; + + private String totalSystem; + + private String system; + + private String userInterface; + + private String graphData; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getLineCode() { + return lineCode; + } + + public void setLineCode(String lineCode) { + this.lineCode = lineCode; + } + + public String getStationCode() { + return stationCode; + } + + public void setStationCode(String stationCode) { + this.stationCode = stationCode; + } + + public String getTotalSystem() { + return totalSystem; + } + + public void setTotalSystem(String totalSystem) { + this.totalSystem = totalSystem; + } + + public String getSystem() { + return system; + } + + public void setSystem(String system) { + this.system = system; + } + + public String getUserInterface() { + return userInterface; + } + + public void setUserInterface(String userInterface) { + this.userInterface = userInterface; + } + + public String getGraphData() { + return graphData; + } + + public void setGraphData(String graphData) { + this.graphData = graphData; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + Iscs other = (Iscs) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getLineCode() == null ? other.getLineCode() == null : this.getLineCode().equals(other.getLineCode())) + && (this.getStationCode() == null ? other.getStationCode() == null : this.getStationCode().equals(other.getStationCode())) + && (this.getTotalSystem() == null ? other.getTotalSystem() == null : this.getTotalSystem().equals(other.getTotalSystem())) + && (this.getSystem() == null ? other.getSystem() == null : this.getSystem().equals(other.getSystem())) + && (this.getUserInterface() == null ? other.getUserInterface() == null : this.getUserInterface().equals(other.getUserInterface())) + && (this.getGraphData() == null ? other.getGraphData() == null : this.getGraphData().equals(other.getGraphData())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getLineCode() == null) ? 0 : getLineCode().hashCode()); + result = prime * result + ((getStationCode() == null) ? 0 : getStationCode().hashCode()); + result = prime * result + ((getTotalSystem() == null) ? 0 : getTotalSystem().hashCode()); + result = prime * result + ((getSystem() == null) ? 0 : getSystem().hashCode()); + result = prime * result + ((getUserInterface() == null) ? 0 : getUserInterface().hashCode()); + result = prime * result + ((getGraphData() == null) ? 0 : getGraphData().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", lineCode=").append(lineCode); + sb.append(", stationCode=").append(stationCode); + sb.append(", totalSystem=").append(totalSystem); + sb.append(", system=").append(system); + sb.append(", userInterface=").append(userInterface); + sb.append(", graphData=").append(graphData); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/IscsExample.java b/src/main/java/club/joylink/rtss/entity/IscsExample.java new file mode 100644 index 000000000..1ea1cd636 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/IscsExample.java @@ -0,0 +1,632 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class IscsExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public IscsExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Integer value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Integer value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Integer value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Integer value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Integer value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Integer value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Integer value1, Integer value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Integer value1, Integer value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andLineCodeIsNull() { + addCriterion("line_code is null"); + return (Criteria) this; + } + + public Criteria andLineCodeIsNotNull() { + addCriterion("line_code is not null"); + return (Criteria) this; + } + + public Criteria andLineCodeEqualTo(String value) { + addCriterion("line_code =", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeNotEqualTo(String value) { + addCriterion("line_code <>", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeGreaterThan(String value) { + addCriterion("line_code >", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeGreaterThanOrEqualTo(String value) { + addCriterion("line_code >=", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeLessThan(String value) { + addCriterion("line_code <", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeLessThanOrEqualTo(String value) { + addCriterion("line_code <=", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeLike(String value) { + addCriterion("line_code like", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeNotLike(String value) { + addCriterion("line_code not like", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeIn(List values) { + addCriterion("line_code in", values, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeNotIn(List values) { + addCriterion("line_code not in", values, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeBetween(String value1, String value2) { + addCriterion("line_code between", value1, value2, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeNotBetween(String value1, String value2) { + addCriterion("line_code not between", value1, value2, "lineCode"); + return (Criteria) this; + } + + public Criteria andStationCodeIsNull() { + addCriterion("station_code is null"); + return (Criteria) this; + } + + public Criteria andStationCodeIsNotNull() { + addCriterion("station_code is not null"); + return (Criteria) this; + } + + public Criteria andStationCodeEqualTo(String value) { + addCriterion("station_code =", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeNotEqualTo(String value) { + addCriterion("station_code <>", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeGreaterThan(String value) { + addCriterion("station_code >", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeGreaterThanOrEqualTo(String value) { + addCriterion("station_code >=", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeLessThan(String value) { + addCriterion("station_code <", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeLessThanOrEqualTo(String value) { + addCriterion("station_code <=", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeLike(String value) { + addCriterion("station_code like", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeNotLike(String value) { + addCriterion("station_code not like", value, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeIn(List values) { + addCriterion("station_code in", values, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeNotIn(List values) { + addCriterion("station_code not in", values, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeBetween(String value1, String value2) { + addCriterion("station_code between", value1, value2, "stationCode"); + return (Criteria) this; + } + + public Criteria andStationCodeNotBetween(String value1, String value2) { + addCriterion("station_code not between", value1, value2, "stationCode"); + return (Criteria) this; + } + + public Criteria andTotalSystemIsNull() { + addCriterion("total_system is null"); + return (Criteria) this; + } + + public Criteria andTotalSystemIsNotNull() { + addCriterion("total_system is not null"); + return (Criteria) this; + } + + public Criteria andTotalSystemEqualTo(String value) { + addCriterion("total_system =", value, "totalSystem"); + return (Criteria) this; + } + + public Criteria andTotalSystemNotEqualTo(String value) { + addCriterion("total_system <>", value, "totalSystem"); + return (Criteria) this; + } + + public Criteria andTotalSystemGreaterThan(String value) { + addCriterion("total_system >", value, "totalSystem"); + return (Criteria) this; + } + + public Criteria andTotalSystemGreaterThanOrEqualTo(String value) { + addCriterion("total_system >=", value, "totalSystem"); + return (Criteria) this; + } + + public Criteria andTotalSystemLessThan(String value) { + addCriterion("total_system <", value, "totalSystem"); + return (Criteria) this; + } + + public Criteria andTotalSystemLessThanOrEqualTo(String value) { + addCriterion("total_system <=", value, "totalSystem"); + return (Criteria) this; + } + + public Criteria andTotalSystemLike(String value) { + addCriterion("total_system like", value, "totalSystem"); + return (Criteria) this; + } + + public Criteria andTotalSystemNotLike(String value) { + addCriterion("total_system not like", value, "totalSystem"); + return (Criteria) this; + } + + public Criteria andTotalSystemIn(List values) { + addCriterion("total_system in", values, "totalSystem"); + return (Criteria) this; + } + + public Criteria andTotalSystemNotIn(List values) { + addCriterion("total_system not in", values, "totalSystem"); + return (Criteria) this; + } + + public Criteria andTotalSystemBetween(String value1, String value2) { + addCriterion("total_system between", value1, value2, "totalSystem"); + return (Criteria) this; + } + + public Criteria andTotalSystemNotBetween(String value1, String value2) { + addCriterion("total_system not between", value1, value2, "totalSystem"); + return (Criteria) this; + } + + public Criteria andSystemIsNull() { + addCriterion("`system` is null"); + return (Criteria) this; + } + + public Criteria andSystemIsNotNull() { + addCriterion("`system` is not null"); + return (Criteria) this; + } + + public Criteria andSystemEqualTo(String value) { + addCriterion("`system` =", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemNotEqualTo(String value) { + addCriterion("`system` <>", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemGreaterThan(String value) { + addCriterion("`system` >", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemGreaterThanOrEqualTo(String value) { + addCriterion("`system` >=", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemLessThan(String value) { + addCriterion("`system` <", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemLessThanOrEqualTo(String value) { + addCriterion("`system` <=", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemLike(String value) { + addCriterion("`system` like", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemNotLike(String value) { + addCriterion("`system` not like", value, "system"); + return (Criteria) this; + } + + public Criteria andSystemIn(List values) { + addCriterion("`system` in", values, "system"); + return (Criteria) this; + } + + public Criteria andSystemNotIn(List values) { + addCriterion("`system` not in", values, "system"); + return (Criteria) this; + } + + public Criteria andSystemBetween(String value1, String value2) { + addCriterion("`system` between", value1, value2, "system"); + return (Criteria) this; + } + + public Criteria andSystemNotBetween(String value1, String value2) { + addCriterion("`system` not between", value1, value2, "system"); + return (Criteria) this; + } + + public Criteria andUserInterfaceIsNull() { + addCriterion("user_interface is null"); + return (Criteria) this; + } + + public Criteria andUserInterfaceIsNotNull() { + addCriterion("user_interface is not null"); + return (Criteria) this; + } + + public Criteria andUserInterfaceEqualTo(String value) { + addCriterion("user_interface =", value, "userInterface"); + return (Criteria) this; + } + + public Criteria andUserInterfaceNotEqualTo(String value) { + addCriterion("user_interface <>", value, "userInterface"); + return (Criteria) this; + } + + public Criteria andUserInterfaceGreaterThan(String value) { + addCriterion("user_interface >", value, "userInterface"); + return (Criteria) this; + } + + public Criteria andUserInterfaceGreaterThanOrEqualTo(String value) { + addCriterion("user_interface >=", value, "userInterface"); + return (Criteria) this; + } + + public Criteria andUserInterfaceLessThan(String value) { + addCriterion("user_interface <", value, "userInterface"); + return (Criteria) this; + } + + public Criteria andUserInterfaceLessThanOrEqualTo(String value) { + addCriterion("user_interface <=", value, "userInterface"); + return (Criteria) this; + } + + public Criteria andUserInterfaceLike(String value) { + addCriterion("user_interface like", value, "userInterface"); + return (Criteria) this; + } + + public Criteria andUserInterfaceNotLike(String value) { + addCriterion("user_interface not like", value, "userInterface"); + return (Criteria) this; + } + + public Criteria andUserInterfaceIn(List values) { + addCriterion("user_interface in", values, "userInterface"); + return (Criteria) this; + } + + public Criteria andUserInterfaceNotIn(List values) { + addCriterion("user_interface not in", values, "userInterface"); + return (Criteria) this; + } + + public Criteria andUserInterfaceBetween(String value1, String value2) { + addCriterion("user_interface between", value1, value2, "userInterface"); + return (Criteria) this; + } + + public Criteria andUserInterfaceNotBetween(String value1, String value2) { + addCriterion("user_interface not between", value1, value2, "userInterface"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/LearnComment.java b/src/main/java/club/joylink/rtss/entity/LearnComment.java new file mode 100644 index 000000000..f953ab9f0 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/LearnComment.java @@ -0,0 +1,185 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * learn_comment + * @author + */ +public class LearnComment implements Serializable { + private Long id; + + /** + * 留言id + */ + private Long messageId; + + /** + * 回复内容 + */ + private String content; + + /** + * 创建者 + */ + private Long creatorId; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + /** + * 回复根引用 + */ + private Long rootId; + + /** + * 回复父级引用 + */ + private Long parentId; + + /** + * 赞 + */ + private Integer like; + + /** + * 踩 + */ + private Integer unlike; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getMessageId() { + return messageId; + } + + public void setMessageId(Long messageId) { + this.messageId = messageId; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public Long getCreatorId() { + return creatorId; + } + + public void setCreatorId(Long creatorId) { + this.creatorId = creatorId; + } + + public LocalDateTime getCreateTime() { + return createTime; + } + + public void setCreateTime(LocalDateTime createTime) { + this.createTime = createTime; + } + + public Long getRootId() { + return rootId; + } + + public void setRootId(Long rootId) { + this.rootId = rootId; + } + + public Long getParentId() { + return parentId; + } + + public void setParentId(Long parentId) { + this.parentId = parentId; + } + + public Integer getLike() { + return like; + } + + public void setLike(Integer like) { + this.like = like; + } + + public Integer getUnlike() { + return unlike; + } + + public void setUnlike(Integer unlike) { + this.unlike = unlike; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + LearnComment other = (LearnComment) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMessageId() == null ? other.getMessageId() == null : this.getMessageId().equals(other.getMessageId())) + && (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent())) + && (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getRootId() == null ? other.getRootId() == null : this.getRootId().equals(other.getRootId())) + && (this.getParentId() == null ? other.getParentId() == null : this.getParentId().equals(other.getParentId())) + && (this.getLike() == null ? other.getLike() == null : this.getLike().equals(other.getLike())) + && (this.getUnlike() == null ? other.getUnlike() == null : this.getUnlike().equals(other.getUnlike())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getMessageId() == null) ? 0 : getMessageId().hashCode()); + result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode()); + result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getRootId() == null) ? 0 : getRootId().hashCode()); + result = prime * result + ((getParentId() == null) ? 0 : getParentId().hashCode()); + result = prime * result + ((getLike() == null) ? 0 : getLike().hashCode()); + result = prime * result + ((getUnlike() == null) ? 0 : getUnlike().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", messageId=").append(messageId); + sb.append(", content=").append(content); + sb.append(", creatorId=").append(creatorId); + sb.append(", createTime=").append(createTime); + sb.append(", rootId=").append(rootId); + sb.append(", parentId=").append(parentId); + sb.append(", like=").append(like); + sb.append(", unlike=").append(unlike); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/LearnCommentExample.java b/src/main/java/club/joylink/rtss/entity/LearnCommentExample.java new file mode 100644 index 000000000..3f0e01c7f --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/LearnCommentExample.java @@ -0,0 +1,773 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class LearnCommentExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public LearnCommentExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMessageIdIsNull() { + addCriterion("message_id is null"); + return (Criteria) this; + } + + public Criteria andMessageIdIsNotNull() { + addCriterion("message_id is not null"); + return (Criteria) this; + } + + public Criteria andMessageIdEqualTo(Long value) { + addCriterion("message_id =", value, "messageId"); + return (Criteria) this; + } + + public Criteria andMessageIdNotEqualTo(Long value) { + addCriterion("message_id <>", value, "messageId"); + return (Criteria) this; + } + + public Criteria andMessageIdGreaterThan(Long value) { + addCriterion("message_id >", value, "messageId"); + return (Criteria) this; + } + + public Criteria andMessageIdGreaterThanOrEqualTo(Long value) { + addCriterion("message_id >=", value, "messageId"); + return (Criteria) this; + } + + public Criteria andMessageIdLessThan(Long value) { + addCriterion("message_id <", value, "messageId"); + return (Criteria) this; + } + + public Criteria andMessageIdLessThanOrEqualTo(Long value) { + addCriterion("message_id <=", value, "messageId"); + return (Criteria) this; + } + + public Criteria andMessageIdIn(List values) { + addCriterion("message_id in", values, "messageId"); + return (Criteria) this; + } + + public Criteria andMessageIdNotIn(List values) { + addCriterion("message_id not in", values, "messageId"); + return (Criteria) this; + } + + public Criteria andMessageIdBetween(Long value1, Long value2) { + addCriterion("message_id between", value1, value2, "messageId"); + return (Criteria) this; + } + + public Criteria andMessageIdNotBetween(Long value1, Long value2) { + addCriterion("message_id not between", value1, value2, "messageId"); + return (Criteria) this; + } + + public Criteria andContentIsNull() { + addCriterion("content is null"); + return (Criteria) this; + } + + public Criteria andContentIsNotNull() { + addCriterion("content is not null"); + return (Criteria) this; + } + + public Criteria andContentEqualTo(String value) { + addCriterion("content =", value, "content"); + return (Criteria) this; + } + + public Criteria andContentNotEqualTo(String value) { + addCriterion("content <>", value, "content"); + return (Criteria) this; + } + + public Criteria andContentGreaterThan(String value) { + addCriterion("content >", value, "content"); + return (Criteria) this; + } + + public Criteria andContentGreaterThanOrEqualTo(String value) { + addCriterion("content >=", value, "content"); + return (Criteria) this; + } + + public Criteria andContentLessThan(String value) { + addCriterion("content <", value, "content"); + return (Criteria) this; + } + + public Criteria andContentLessThanOrEqualTo(String value) { + addCriterion("content <=", value, "content"); + return (Criteria) this; + } + + public Criteria andContentLike(String value) { + addCriterion("content like", value, "content"); + return (Criteria) this; + } + + public Criteria andContentNotLike(String value) { + addCriterion("content not like", value, "content"); + return (Criteria) this; + } + + public Criteria andContentIn(List values) { + addCriterion("content in", values, "content"); + return (Criteria) this; + } + + public Criteria andContentNotIn(List values) { + addCriterion("content not in", values, "content"); + return (Criteria) this; + } + + public Criteria andContentBetween(String value1, String value2) { + addCriterion("content between", value1, value2, "content"); + return (Criteria) this; + } + + public Criteria andContentNotBetween(String value1, String value2) { + addCriterion("content not between", value1, value2, "content"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNull() { + addCriterion("creator_id is null"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNotNull() { + addCriterion("creator_id is not null"); + return (Criteria) this; + } + + public Criteria andCreatorIdEqualTo(Long value) { + addCriterion("creator_id =", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotEqualTo(Long value) { + addCriterion("creator_id <>", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThan(Long value) { + addCriterion("creator_id >", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) { + addCriterion("creator_id >=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThan(Long value) { + addCriterion("creator_id <", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThanOrEqualTo(Long value) { + addCriterion("creator_id <=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdIn(List values) { + addCriterion("creator_id in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotIn(List values) { + addCriterion("creator_id not in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdBetween(Long value1, Long value2) { + addCriterion("creator_id between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotBetween(Long value1, Long value2) { + addCriterion("creator_id not between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(LocalDateTime value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(LocalDateTime value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(LocalDateTime value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(LocalDateTime value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andRootIdIsNull() { + addCriterion("root_id is null"); + return (Criteria) this; + } + + public Criteria andRootIdIsNotNull() { + addCriterion("root_id is not null"); + return (Criteria) this; + } + + public Criteria andRootIdEqualTo(Long value) { + addCriterion("root_id =", value, "rootId"); + return (Criteria) this; + } + + public Criteria andRootIdNotEqualTo(Long value) { + addCriterion("root_id <>", value, "rootId"); + return (Criteria) this; + } + + public Criteria andRootIdGreaterThan(Long value) { + addCriterion("root_id >", value, "rootId"); + return (Criteria) this; + } + + public Criteria andRootIdGreaterThanOrEqualTo(Long value) { + addCriterion("root_id >=", value, "rootId"); + return (Criteria) this; + } + + public Criteria andRootIdLessThan(Long value) { + addCriterion("root_id <", value, "rootId"); + return (Criteria) this; + } + + public Criteria andRootIdLessThanOrEqualTo(Long value) { + addCriterion("root_id <=", value, "rootId"); + return (Criteria) this; + } + + public Criteria andRootIdIn(List values) { + addCriterion("root_id in", values, "rootId"); + return (Criteria) this; + } + + public Criteria andRootIdNotIn(List values) { + addCriterion("root_id not in", values, "rootId"); + return (Criteria) this; + } + + public Criteria andRootIdBetween(Long value1, Long value2) { + addCriterion("root_id between", value1, value2, "rootId"); + return (Criteria) this; + } + + public Criteria andRootIdNotBetween(Long value1, Long value2) { + addCriterion("root_id not between", value1, value2, "rootId"); + return (Criteria) this; + } + + public Criteria andParentIdIsNull() { + addCriterion("parent_id is null"); + return (Criteria) this; + } + + public Criteria andParentIdIsNotNull() { + addCriterion("parent_id is not null"); + return (Criteria) this; + } + + public Criteria andParentIdEqualTo(Long value) { + addCriterion("parent_id =", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotEqualTo(Long value) { + addCriterion("parent_id <>", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThan(Long value) { + addCriterion("parent_id >", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThanOrEqualTo(Long value) { + addCriterion("parent_id >=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThan(Long value) { + addCriterion("parent_id <", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThanOrEqualTo(Long value) { + addCriterion("parent_id <=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdIn(List values) { + addCriterion("parent_id in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotIn(List values) { + addCriterion("parent_id not in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdBetween(Long value1, Long value2) { + addCriterion("parent_id between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotBetween(Long value1, Long value2) { + addCriterion("parent_id not between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andLikeIsNull() { + addCriterion("`like` is null"); + return (Criteria) this; + } + + public Criteria andLikeIsNotNull() { + addCriterion("`like` is not null"); + return (Criteria) this; + } + + public Criteria andLikeEqualTo(Integer value) { + addCriterion("`like` =", value, "like"); + return (Criteria) this; + } + + public Criteria andLikeNotEqualTo(Integer value) { + addCriterion("`like` <>", value, "like"); + return (Criteria) this; + } + + public Criteria andLikeGreaterThan(Integer value) { + addCriterion("`like` >", value, "like"); + return (Criteria) this; + } + + public Criteria andLikeGreaterThanOrEqualTo(Integer value) { + addCriterion("`like` >=", value, "like"); + return (Criteria) this; + } + + public Criteria andLikeLessThan(Integer value) { + addCriterion("`like` <", value, "like"); + return (Criteria) this; + } + + public Criteria andLikeLessThanOrEqualTo(Integer value) { + addCriterion("`like` <=", value, "like"); + return (Criteria) this; + } + + public Criteria andLikeIn(List values) { + addCriterion("`like` in", values, "like"); + return (Criteria) this; + } + + public Criteria andLikeNotIn(List values) { + addCriterion("`like` not in", values, "like"); + return (Criteria) this; + } + + public Criteria andLikeBetween(Integer value1, Integer value2) { + addCriterion("`like` between", value1, value2, "like"); + return (Criteria) this; + } + + public Criteria andLikeNotBetween(Integer value1, Integer value2) { + addCriterion("`like` not between", value1, value2, "like"); + return (Criteria) this; + } + + public Criteria andUnlikeIsNull() { + addCriterion("unlike is null"); + return (Criteria) this; + } + + public Criteria andUnlikeIsNotNull() { + addCriterion("unlike is not null"); + return (Criteria) this; + } + + public Criteria andUnlikeEqualTo(Integer value) { + addCriterion("unlike =", value, "unlike"); + return (Criteria) this; + } + + public Criteria andUnlikeNotEqualTo(Integer value) { + addCriterion("unlike <>", value, "unlike"); + return (Criteria) this; + } + + public Criteria andUnlikeGreaterThan(Integer value) { + addCriterion("unlike >", value, "unlike"); + return (Criteria) this; + } + + public Criteria andUnlikeGreaterThanOrEqualTo(Integer value) { + addCriterion("unlike >=", value, "unlike"); + return (Criteria) this; + } + + public Criteria andUnlikeLessThan(Integer value) { + addCriterion("unlike <", value, "unlike"); + return (Criteria) this; + } + + public Criteria andUnlikeLessThanOrEqualTo(Integer value) { + addCriterion("unlike <=", value, "unlike"); + return (Criteria) this; + } + + public Criteria andUnlikeIn(List values) { + addCriterion("unlike in", values, "unlike"); + return (Criteria) this; + } + + public Criteria andUnlikeNotIn(List values) { + addCriterion("unlike not in", values, "unlike"); + return (Criteria) this; + } + + public Criteria andUnlikeBetween(Integer value1, Integer value2) { + addCriterion("unlike between", value1, value2, "unlike"); + return (Criteria) this; + } + + public Criteria andUnlikeNotBetween(Integer value1, Integer value2) { + addCriterion("unlike not between", value1, value2, "unlike"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/LearnMessage.java b/src/main/java/club/joylink/rtss/entity/LearnMessage.java new file mode 100644 index 000000000..6c013eebe --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/LearnMessage.java @@ -0,0 +1,153 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * learn_message + * @author + */ +public class LearnMessage implements Serializable { + private Long id; + + /** + * 所属帖子的id + */ + private Long postId; + + /** + * 留言文字内容 + */ + private String content; + + /** + * 留言带的图片的地址 + */ + private String pictureUrls; + + /** + * 留言者 + */ + private Long creatorId; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + /** + * 是否置顶 + */ + private Boolean topping; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getPostId() { + return postId; + } + + public void setPostId(Long postId) { + this.postId = postId; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public String getPictureUrls() { + return pictureUrls; + } + + public void setPictureUrls(String pictureUrls) { + this.pictureUrls = pictureUrls; + } + + public Long getCreatorId() { + return creatorId; + } + + public void setCreatorId(Long creatorId) { + this.creatorId = creatorId; + } + + public LocalDateTime getCreateTime() { + return createTime; + } + + public void setCreateTime(LocalDateTime createTime) { + this.createTime = createTime; + } + + public Boolean getTopping() { + return topping; + } + + public void setTopping(Boolean topping) { + this.topping = topping; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + LearnMessage other = (LearnMessage) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getPostId() == null ? other.getPostId() == null : this.getPostId().equals(other.getPostId())) + && (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent())) + && (this.getPictureUrls() == null ? other.getPictureUrls() == null : this.getPictureUrls().equals(other.getPictureUrls())) + && (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getTopping() == null ? other.getTopping() == null : this.getTopping().equals(other.getTopping())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getPostId() == null) ? 0 : getPostId().hashCode()); + result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode()); + result = prime * result + ((getPictureUrls() == null) ? 0 : getPictureUrls().hashCode()); + result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getTopping() == null) ? 0 : getTopping().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", postId=").append(postId); + sb.append(", content=").append(content); + sb.append(", pictureUrls=").append(pictureUrls); + sb.append(", creatorId=").append(creatorId); + sb.append(", createTime=").append(createTime); + sb.append(", topping=").append(topping); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/LearnMessageExample.java b/src/main/java/club/joylink/rtss/entity/LearnMessageExample.java new file mode 100644 index 000000000..cfe97efd7 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/LearnMessageExample.java @@ -0,0 +1,663 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class LearnMessageExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public LearnMessageExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andPostIdIsNull() { + addCriterion("post_id is null"); + return (Criteria) this; + } + + public Criteria andPostIdIsNotNull() { + addCriterion("post_id is not null"); + return (Criteria) this; + } + + public Criteria andPostIdEqualTo(Long value) { + addCriterion("post_id =", value, "postId"); + return (Criteria) this; + } + + public Criteria andPostIdNotEqualTo(Long value) { + addCriterion("post_id <>", value, "postId"); + return (Criteria) this; + } + + public Criteria andPostIdGreaterThan(Long value) { + addCriterion("post_id >", value, "postId"); + return (Criteria) this; + } + + public Criteria andPostIdGreaterThanOrEqualTo(Long value) { + addCriterion("post_id >=", value, "postId"); + return (Criteria) this; + } + + public Criteria andPostIdLessThan(Long value) { + addCriterion("post_id <", value, "postId"); + return (Criteria) this; + } + + public Criteria andPostIdLessThanOrEqualTo(Long value) { + addCriterion("post_id <=", value, "postId"); + return (Criteria) this; + } + + public Criteria andPostIdIn(List values) { + addCriterion("post_id in", values, "postId"); + return (Criteria) this; + } + + public Criteria andPostIdNotIn(List values) { + addCriterion("post_id not in", values, "postId"); + return (Criteria) this; + } + + public Criteria andPostIdBetween(Long value1, Long value2) { + addCriterion("post_id between", value1, value2, "postId"); + return (Criteria) this; + } + + public Criteria andPostIdNotBetween(Long value1, Long value2) { + addCriterion("post_id not between", value1, value2, "postId"); + return (Criteria) this; + } + + public Criteria andContentIsNull() { + addCriterion("content is null"); + return (Criteria) this; + } + + public Criteria andContentIsNotNull() { + addCriterion("content is not null"); + return (Criteria) this; + } + + public Criteria andContentEqualTo(String value) { + addCriterion("content =", value, "content"); + return (Criteria) this; + } + + public Criteria andContentNotEqualTo(String value) { + addCriterion("content <>", value, "content"); + return (Criteria) this; + } + + public Criteria andContentGreaterThan(String value) { + addCriterion("content >", value, "content"); + return (Criteria) this; + } + + public Criteria andContentGreaterThanOrEqualTo(String value) { + addCriterion("content >=", value, "content"); + return (Criteria) this; + } + + public Criteria andContentLessThan(String value) { + addCriterion("content <", value, "content"); + return (Criteria) this; + } + + public Criteria andContentLessThanOrEqualTo(String value) { + addCriterion("content <=", value, "content"); + return (Criteria) this; + } + + public Criteria andContentLike(String value) { + addCriterion("content like", value, "content"); + return (Criteria) this; + } + + public Criteria andContentNotLike(String value) { + addCriterion("content not like", value, "content"); + return (Criteria) this; + } + + public Criteria andContentIn(List values) { + addCriterion("content in", values, "content"); + return (Criteria) this; + } + + public Criteria andContentNotIn(List values) { + addCriterion("content not in", values, "content"); + return (Criteria) this; + } + + public Criteria andContentBetween(String value1, String value2) { + addCriterion("content between", value1, value2, "content"); + return (Criteria) this; + } + + public Criteria andContentNotBetween(String value1, String value2) { + addCriterion("content not between", value1, value2, "content"); + return (Criteria) this; + } + + public Criteria andPictureUrlsIsNull() { + addCriterion("picture_urls is null"); + return (Criteria) this; + } + + public Criteria andPictureUrlsIsNotNull() { + addCriterion("picture_urls is not null"); + return (Criteria) this; + } + + public Criteria andPictureUrlsEqualTo(String value) { + addCriterion("picture_urls =", value, "pictureUrls"); + return (Criteria) this; + } + + public Criteria andPictureUrlsNotEqualTo(String value) { + addCriterion("picture_urls <>", value, "pictureUrls"); + return (Criteria) this; + } + + public Criteria andPictureUrlsGreaterThan(String value) { + addCriterion("picture_urls >", value, "pictureUrls"); + return (Criteria) this; + } + + public Criteria andPictureUrlsGreaterThanOrEqualTo(String value) { + addCriterion("picture_urls >=", value, "pictureUrls"); + return (Criteria) this; + } + + public Criteria andPictureUrlsLessThan(String value) { + addCriterion("picture_urls <", value, "pictureUrls"); + return (Criteria) this; + } + + public Criteria andPictureUrlsLessThanOrEqualTo(String value) { + addCriterion("picture_urls <=", value, "pictureUrls"); + return (Criteria) this; + } + + public Criteria andPictureUrlsLike(String value) { + addCriterion("picture_urls like", value, "pictureUrls"); + return (Criteria) this; + } + + public Criteria andPictureUrlsNotLike(String value) { + addCriterion("picture_urls not like", value, "pictureUrls"); + return (Criteria) this; + } + + public Criteria andPictureUrlsIn(List values) { + addCriterion("picture_urls in", values, "pictureUrls"); + return (Criteria) this; + } + + public Criteria andPictureUrlsNotIn(List values) { + addCriterion("picture_urls not in", values, "pictureUrls"); + return (Criteria) this; + } + + public Criteria andPictureUrlsBetween(String value1, String value2) { + addCriterion("picture_urls between", value1, value2, "pictureUrls"); + return (Criteria) this; + } + + public Criteria andPictureUrlsNotBetween(String value1, String value2) { + addCriterion("picture_urls not between", value1, value2, "pictureUrls"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNull() { + addCriterion("creator_id is null"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNotNull() { + addCriterion("creator_id is not null"); + return (Criteria) this; + } + + public Criteria andCreatorIdEqualTo(Long value) { + addCriterion("creator_id =", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotEqualTo(Long value) { + addCriterion("creator_id <>", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThan(Long value) { + addCriterion("creator_id >", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) { + addCriterion("creator_id >=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThan(Long value) { + addCriterion("creator_id <", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThanOrEqualTo(Long value) { + addCriterion("creator_id <=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdIn(List values) { + addCriterion("creator_id in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotIn(List values) { + addCriterion("creator_id not in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdBetween(Long value1, Long value2) { + addCriterion("creator_id between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotBetween(Long value1, Long value2) { + addCriterion("creator_id not between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(LocalDateTime value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(LocalDateTime value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(LocalDateTime value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(LocalDateTime value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andToppingIsNull() { + addCriterion("topping is null"); + return (Criteria) this; + } + + public Criteria andToppingIsNotNull() { + addCriterion("topping is not null"); + return (Criteria) this; + } + + public Criteria andToppingEqualTo(Boolean value) { + addCriterion("topping =", value, "topping"); + return (Criteria) this; + } + + public Criteria andToppingNotEqualTo(Boolean value) { + addCriterion("topping <>", value, "topping"); + return (Criteria) this; + } + + public Criteria andToppingGreaterThan(Boolean value) { + addCriterion("topping >", value, "topping"); + return (Criteria) this; + } + + public Criteria andToppingGreaterThanOrEqualTo(Boolean value) { + addCriterion("topping >=", value, "topping"); + return (Criteria) this; + } + + public Criteria andToppingLessThan(Boolean value) { + addCriterion("topping <", value, "topping"); + return (Criteria) this; + } + + public Criteria andToppingLessThanOrEqualTo(Boolean value) { + addCriterion("topping <=", value, "topping"); + return (Criteria) this; + } + + public Criteria andToppingIn(List values) { + addCriterion("topping in", values, "topping"); + return (Criteria) this; + } + + public Criteria andToppingNotIn(List values) { + addCriterion("topping not in", values, "topping"); + return (Criteria) this; + } + + public Criteria andToppingBetween(Boolean value1, Boolean value2) { + addCriterion("topping between", value1, value2, "topping"); + return (Criteria) this; + } + + public Criteria andToppingNotBetween(Boolean value1, Boolean value2) { + addCriterion("topping not between", value1, value2, "topping"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/LearnMessageWithBLOBs.java b/src/main/java/club/joylink/rtss/entity/LearnMessageWithBLOBs.java new file mode 100644 index 000000000..5238d8f27 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/LearnMessageWithBLOBs.java @@ -0,0 +1,89 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * learn_message + * @author + */ +public class LearnMessageWithBLOBs extends LearnMessage implements Serializable { + /** + * 点赞的用户id + */ + private String like; + + /** + * 点踩的用户id + */ + private String unlike; + + private static final long serialVersionUID = 1L; + + public String getLike() { + return like; + } + + public void setLike(String like) { + this.like = like; + } + + public String getUnlike() { + return unlike; + } + + public void setUnlike(String unlike) { + this.unlike = unlike; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + LearnMessageWithBLOBs other = (LearnMessageWithBLOBs) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getPostId() == null ? other.getPostId() == null : this.getPostId().equals(other.getPostId())) + && (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent())) + && (this.getPictureUrls() == null ? other.getPictureUrls() == null : this.getPictureUrls().equals(other.getPictureUrls())) + && (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getTopping() == null ? other.getTopping() == null : this.getTopping().equals(other.getTopping())) + && (this.getLike() == null ? other.getLike() == null : this.getLike().equals(other.getLike())) + && (this.getUnlike() == null ? other.getUnlike() == null : this.getUnlike().equals(other.getUnlike())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getPostId() == null) ? 0 : getPostId().hashCode()); + result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode()); + result = prime * result + ((getPictureUrls() == null) ? 0 : getPictureUrls().hashCode()); + result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getTopping() == null) ? 0 : getTopping().hashCode()); + result = prime * result + ((getLike() == null) ? 0 : getLike().hashCode()); + result = prime * result + ((getUnlike() == null) ? 0 : getUnlike().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", like=").append(like); + sb.append(", unlike=").append(unlike); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/LearnPost.java b/src/main/java/club/joylink/rtss/entity/LearnPost.java new file mode 100644 index 000000000..e99dea4c2 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/LearnPost.java @@ -0,0 +1,169 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * learn_post + * @author + */ +public class LearnPost implements Serializable { + private Long id; + + /** + * 归属项目 + */ + private String project; + + /** + * 标题 + */ + private String title; + + /** + * 创建者 + */ + private Long creatorId; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + /** + * 是否置顶 + */ + private Boolean topping; + + /** + * 赞 + */ + private Integer like; + + /** + * 踩 + */ + private Integer unlike; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getProject() { + return project; + } + + public void setProject(String project) { + this.project = project; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public Long getCreatorId() { + return creatorId; + } + + public void setCreatorId(Long creatorId) { + this.creatorId = creatorId; + } + + public LocalDateTime getCreateTime() { + return createTime; + } + + public void setCreateTime(LocalDateTime createTime) { + this.createTime = createTime; + } + + public Boolean getTopping() { + return topping; + } + + public void setTopping(Boolean topping) { + this.topping = topping; + } + + public Integer getLike() { + return like; + } + + public void setLike(Integer like) { + this.like = like; + } + + public Integer getUnlike() { + return unlike; + } + + public void setUnlike(Integer unlike) { + this.unlike = unlike; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + LearnPost other = (LearnPost) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getProject() == null ? other.getProject() == null : this.getProject().equals(other.getProject())) + && (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle())) + && (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getTopping() == null ? other.getTopping() == null : this.getTopping().equals(other.getTopping())) + && (this.getLike() == null ? other.getLike() == null : this.getLike().equals(other.getLike())) + && (this.getUnlike() == null ? other.getUnlike() == null : this.getUnlike().equals(other.getUnlike())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getProject() == null) ? 0 : getProject().hashCode()); + result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode()); + result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getTopping() == null) ? 0 : getTopping().hashCode()); + result = prime * result + ((getLike() == null) ? 0 : getLike().hashCode()); + result = prime * result + ((getUnlike() == null) ? 0 : getUnlike().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", project=").append(project); + sb.append(", title=").append(title); + sb.append(", creatorId=").append(creatorId); + sb.append(", createTime=").append(createTime); + sb.append(", topping=").append(topping); + sb.append(", like=").append(like); + sb.append(", unlike=").append(unlike); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/LearnPostExample.java b/src/main/java/club/joylink/rtss/entity/LearnPostExample.java new file mode 100644 index 000000000..9a9bcecb6 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/LearnPostExample.java @@ -0,0 +1,723 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class LearnPostExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public LearnPostExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andProjectIsNull() { + addCriterion("project is null"); + return (Criteria) this; + } + + public Criteria andProjectIsNotNull() { + addCriterion("project is not null"); + return (Criteria) this; + } + + public Criteria andProjectEqualTo(String value) { + addCriterion("project =", value, "project"); + return (Criteria) this; + } + + public Criteria andProjectNotEqualTo(String value) { + addCriterion("project <>", value, "project"); + return (Criteria) this; + } + + public Criteria andProjectGreaterThan(String value) { + addCriterion("project >", value, "project"); + return (Criteria) this; + } + + public Criteria andProjectGreaterThanOrEqualTo(String value) { + addCriterion("project >=", value, "project"); + return (Criteria) this; + } + + public Criteria andProjectLessThan(String value) { + addCriterion("project <", value, "project"); + return (Criteria) this; + } + + public Criteria andProjectLessThanOrEqualTo(String value) { + addCriterion("project <=", value, "project"); + return (Criteria) this; + } + + public Criteria andProjectLike(String value) { + addCriterion("project like", value, "project"); + return (Criteria) this; + } + + public Criteria andProjectNotLike(String value) { + addCriterion("project not like", value, "project"); + return (Criteria) this; + } + + public Criteria andProjectIn(List values) { + addCriterion("project in", values, "project"); + return (Criteria) this; + } + + public Criteria andProjectNotIn(List values) { + addCriterion("project not in", values, "project"); + return (Criteria) this; + } + + public Criteria andProjectBetween(String value1, String value2) { + addCriterion("project between", value1, value2, "project"); + return (Criteria) this; + } + + public Criteria andProjectNotBetween(String value1, String value2) { + addCriterion("project not between", value1, value2, "project"); + return (Criteria) this; + } + + public Criteria andTitleIsNull() { + addCriterion("title is null"); + return (Criteria) this; + } + + public Criteria andTitleIsNotNull() { + addCriterion("title is not null"); + return (Criteria) this; + } + + public Criteria andTitleEqualTo(String value) { + addCriterion("title =", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotEqualTo(String value) { + addCriterion("title <>", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleGreaterThan(String value) { + addCriterion("title >", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleGreaterThanOrEqualTo(String value) { + addCriterion("title >=", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleLessThan(String value) { + addCriterion("title <", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleLessThanOrEqualTo(String value) { + addCriterion("title <=", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleLike(String value) { + addCriterion("title like", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotLike(String value) { + addCriterion("title not like", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleIn(List values) { + addCriterion("title in", values, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotIn(List values) { + addCriterion("title not in", values, "title"); + return (Criteria) this; + } + + public Criteria andTitleBetween(String value1, String value2) { + addCriterion("title between", value1, value2, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotBetween(String value1, String value2) { + addCriterion("title not between", value1, value2, "title"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNull() { + addCriterion("creator_id is null"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNotNull() { + addCriterion("creator_id is not null"); + return (Criteria) this; + } + + public Criteria andCreatorIdEqualTo(Long value) { + addCriterion("creator_id =", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotEqualTo(Long value) { + addCriterion("creator_id <>", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThan(Long value) { + addCriterion("creator_id >", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) { + addCriterion("creator_id >=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThan(Long value) { + addCriterion("creator_id <", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThanOrEqualTo(Long value) { + addCriterion("creator_id <=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdIn(List values) { + addCriterion("creator_id in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotIn(List values) { + addCriterion("creator_id not in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdBetween(Long value1, Long value2) { + addCriterion("creator_id between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotBetween(Long value1, Long value2) { + addCriterion("creator_id not between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(LocalDateTime value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(LocalDateTime value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(LocalDateTime value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(LocalDateTime value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andToppingIsNull() { + addCriterion("topping is null"); + return (Criteria) this; + } + + public Criteria andToppingIsNotNull() { + addCriterion("topping is not null"); + return (Criteria) this; + } + + public Criteria andToppingEqualTo(Boolean value) { + addCriterion("topping =", value, "topping"); + return (Criteria) this; + } + + public Criteria andToppingNotEqualTo(Boolean value) { + addCriterion("topping <>", value, "topping"); + return (Criteria) this; + } + + public Criteria andToppingGreaterThan(Boolean value) { + addCriterion("topping >", value, "topping"); + return (Criteria) this; + } + + public Criteria andToppingGreaterThanOrEqualTo(Boolean value) { + addCriterion("topping >=", value, "topping"); + return (Criteria) this; + } + + public Criteria andToppingLessThan(Boolean value) { + addCriterion("topping <", value, "topping"); + return (Criteria) this; + } + + public Criteria andToppingLessThanOrEqualTo(Boolean value) { + addCriterion("topping <=", value, "topping"); + return (Criteria) this; + } + + public Criteria andToppingIn(List values) { + addCriterion("topping in", values, "topping"); + return (Criteria) this; + } + + public Criteria andToppingNotIn(List values) { + addCriterion("topping not in", values, "topping"); + return (Criteria) this; + } + + public Criteria andToppingBetween(Boolean value1, Boolean value2) { + addCriterion("topping between", value1, value2, "topping"); + return (Criteria) this; + } + + public Criteria andToppingNotBetween(Boolean value1, Boolean value2) { + addCriterion("topping not between", value1, value2, "topping"); + return (Criteria) this; + } + + public Criteria andLikeIsNull() { + addCriterion("`like` is null"); + return (Criteria) this; + } + + public Criteria andLikeIsNotNull() { + addCriterion("`like` is not null"); + return (Criteria) this; + } + + public Criteria andLikeEqualTo(Integer value) { + addCriterion("`like` =", value, "like"); + return (Criteria) this; + } + + public Criteria andLikeNotEqualTo(Integer value) { + addCriterion("`like` <>", value, "like"); + return (Criteria) this; + } + + public Criteria andLikeGreaterThan(Integer value) { + addCriterion("`like` >", value, "like"); + return (Criteria) this; + } + + public Criteria andLikeGreaterThanOrEqualTo(Integer value) { + addCriterion("`like` >=", value, "like"); + return (Criteria) this; + } + + public Criteria andLikeLessThan(Integer value) { + addCriterion("`like` <", value, "like"); + return (Criteria) this; + } + + public Criteria andLikeLessThanOrEqualTo(Integer value) { + addCriterion("`like` <=", value, "like"); + return (Criteria) this; + } + + public Criteria andLikeIn(List values) { + addCriterion("`like` in", values, "like"); + return (Criteria) this; + } + + public Criteria andLikeNotIn(List values) { + addCriterion("`like` not in", values, "like"); + return (Criteria) this; + } + + public Criteria andLikeBetween(Integer value1, Integer value2) { + addCriterion("`like` between", value1, value2, "like"); + return (Criteria) this; + } + + public Criteria andLikeNotBetween(Integer value1, Integer value2) { + addCriterion("`like` not between", value1, value2, "like"); + return (Criteria) this; + } + + public Criteria andUnlikeIsNull() { + addCriterion("unlike is null"); + return (Criteria) this; + } + + public Criteria andUnlikeIsNotNull() { + addCriterion("unlike is not null"); + return (Criteria) this; + } + + public Criteria andUnlikeEqualTo(Integer value) { + addCriterion("unlike =", value, "unlike"); + return (Criteria) this; + } + + public Criteria andUnlikeNotEqualTo(Integer value) { + addCriterion("unlike <>", value, "unlike"); + return (Criteria) this; + } + + public Criteria andUnlikeGreaterThan(Integer value) { + addCriterion("unlike >", value, "unlike"); + return (Criteria) this; + } + + public Criteria andUnlikeGreaterThanOrEqualTo(Integer value) { + addCriterion("unlike >=", value, "unlike"); + return (Criteria) this; + } + + public Criteria andUnlikeLessThan(Integer value) { + addCriterion("unlike <", value, "unlike"); + return (Criteria) this; + } + + public Criteria andUnlikeLessThanOrEqualTo(Integer value) { + addCriterion("unlike <=", value, "unlike"); + return (Criteria) this; + } + + public Criteria andUnlikeIn(List values) { + addCriterion("unlike in", values, "unlike"); + return (Criteria) this; + } + + public Criteria andUnlikeNotIn(List values) { + addCriterion("unlike not in", values, "unlike"); + return (Criteria) this; + } + + public Criteria andUnlikeBetween(Integer value1, Integer value2) { + addCriterion("unlike between", value1, value2, "unlike"); + return (Criteria) this; + } + + public Criteria andUnlikeNotBetween(Integer value1, Integer value2) { + addCriterion("unlike not between", value1, value2, "unlike"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/License.java b/src/main/java/club/joylink/rtss/entity/License.java new file mode 100644 index 000000000..97413a2d6 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/License.java @@ -0,0 +1,42 @@ +package club.joylink.rtss.entity; + +import lombok.Data; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * @author + * 授权许可 + */ +@Data +public class License implements Serializable { + private Long id; + + /** + * 企业/公司名称 + */ + private String name; + + /** + * 结束时间 + */ + private LocalDateTime overTime; + + /** + * 密钥 + */ + private String secretKey; + + /** + * 许可证 + */ + private String license; + + /** + * 是否可用 + */ + private Boolean available; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/LicenseExample.java b/src/main/java/club/joylink/rtss/entity/LicenseExample.java new file mode 100644 index 000000000..714f3a1f8 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/LicenseExample.java @@ -0,0 +1,613 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class LicenseExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public LicenseExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andOverTimeIsNull() { + addCriterion("over_time is null"); + return (Criteria) this; + } + + public Criteria andOverTimeIsNotNull() { + addCriterion("over_time is not null"); + return (Criteria) this; + } + + public Criteria andOverTimeEqualTo(LocalDateTime value) { + addCriterion("over_time =", value, "overTime"); + return (Criteria) this; + } + + public Criteria andOverTimeNotEqualTo(LocalDateTime value) { + addCriterion("over_time <>", value, "overTime"); + return (Criteria) this; + } + + public Criteria andOverTimeGreaterThan(LocalDateTime value) { + addCriterion("over_time >", value, "overTime"); + return (Criteria) this; + } + + public Criteria andOverTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("over_time >=", value, "overTime"); + return (Criteria) this; + } + + public Criteria andOverTimeLessThan(LocalDateTime value) { + addCriterion("over_time <", value, "overTime"); + return (Criteria) this; + } + + public Criteria andOverTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("over_time <=", value, "overTime"); + return (Criteria) this; + } + + public Criteria andOverTimeIn(List values) { + addCriterion("over_time in", values, "overTime"); + return (Criteria) this; + } + + public Criteria andOverTimeNotIn(List values) { + addCriterion("over_time not in", values, "overTime"); + return (Criteria) this; + } + + public Criteria andOverTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("over_time between", value1, value2, "overTime"); + return (Criteria) this; + } + + public Criteria andOverTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("over_time not between", value1, value2, "overTime"); + return (Criteria) this; + } + + public Criteria andSecretKeyIsNull() { + addCriterion("secret_key is null"); + return (Criteria) this; + } + + public Criteria andSecretKeyIsNotNull() { + addCriterion("secret_key is not null"); + return (Criteria) this; + } + + public Criteria andSecretKeyEqualTo(String value) { + addCriterion("secret_key =", value, "secretKey"); + return (Criteria) this; + } + + public Criteria andSecretKeyNotEqualTo(String value) { + addCriterion("secret_key <>", value, "secretKey"); + return (Criteria) this; + } + + public Criteria andSecretKeyGreaterThan(String value) { + addCriterion("secret_key >", value, "secretKey"); + return (Criteria) this; + } + + public Criteria andSecretKeyGreaterThanOrEqualTo(String value) { + addCriterion("secret_key >=", value, "secretKey"); + return (Criteria) this; + } + + public Criteria andSecretKeyLessThan(String value) { + addCriterion("secret_key <", value, "secretKey"); + return (Criteria) this; + } + + public Criteria andSecretKeyLessThanOrEqualTo(String value) { + addCriterion("secret_key <=", value, "secretKey"); + return (Criteria) this; + } + + public Criteria andSecretKeyLike(String value) { + addCriterion("secret_key like", value, "secretKey"); + return (Criteria) this; + } + + public Criteria andSecretKeyNotLike(String value) { + addCriterion("secret_key not like", value, "secretKey"); + return (Criteria) this; + } + + public Criteria andSecretKeyIn(List values) { + addCriterion("secret_key in", values, "secretKey"); + return (Criteria) this; + } + + public Criteria andSecretKeyNotIn(List values) { + addCriterion("secret_key not in", values, "secretKey"); + return (Criteria) this; + } + + public Criteria andSecretKeyBetween(String value1, String value2) { + addCriterion("secret_key between", value1, value2, "secretKey"); + return (Criteria) this; + } + + public Criteria andSecretKeyNotBetween(String value1, String value2) { + addCriterion("secret_key not between", value1, value2, "secretKey"); + return (Criteria) this; + } + + public Criteria andLicenseIsNull() { + addCriterion("license is null"); + return (Criteria) this; + } + + public Criteria andLicenseIsNotNull() { + addCriterion("license is not null"); + return (Criteria) this; + } + + public Criteria andLicenseEqualTo(String value) { + addCriterion("license =", value, "license"); + return (Criteria) this; + } + + public Criteria andLicenseNotEqualTo(String value) { + addCriterion("license <>", value, "license"); + return (Criteria) this; + } + + public Criteria andLicenseGreaterThan(String value) { + addCriterion("license >", value, "license"); + return (Criteria) this; + } + + public Criteria andLicenseGreaterThanOrEqualTo(String value) { + addCriterion("license >=", value, "license"); + return (Criteria) this; + } + + public Criteria andLicenseLessThan(String value) { + addCriterion("license <", value, "license"); + return (Criteria) this; + } + + public Criteria andLicenseLessThanOrEqualTo(String value) { + addCriterion("license <=", value, "license"); + return (Criteria) this; + } + + public Criteria andLicenseLike(String value) { + addCriterion("license like", value, "license"); + return (Criteria) this; + } + + public Criteria andLicenseNotLike(String value) { + addCriterion("license not like", value, "license"); + return (Criteria) this; + } + + public Criteria andLicenseIn(List values) { + addCriterion("license in", values, "license"); + return (Criteria) this; + } + + public Criteria andLicenseNotIn(List values) { + addCriterion("license not in", values, "license"); + return (Criteria) this; + } + + public Criteria andLicenseBetween(String value1, String value2) { + addCriterion("license between", value1, value2, "license"); + return (Criteria) this; + } + + public Criteria andLicenseNotBetween(String value1, String value2) { + addCriterion("license not between", value1, value2, "license"); + return (Criteria) this; + } + + public Criteria andAvailableIsNull() { + addCriterion("available is null"); + return (Criteria) this; + } + + public Criteria andAvailableIsNotNull() { + addCriterion("available is not null"); + return (Criteria) this; + } + + public Criteria andAvailableEqualTo(Boolean value) { + addCriterion("available =", value, "available"); + return (Criteria) this; + } + + public Criteria andAvailableNotEqualTo(Boolean value) { + addCriterion("available <>", value, "available"); + return (Criteria) this; + } + + public Criteria andAvailableGreaterThan(Boolean value) { + addCriterion("available >", value, "available"); + return (Criteria) this; + } + + public Criteria andAvailableGreaterThanOrEqualTo(Boolean value) { + addCriterion("available >=", value, "available"); + return (Criteria) this; + } + + public Criteria andAvailableLessThan(Boolean value) { + addCriterion("available <", value, "available"); + return (Criteria) this; + } + + public Criteria andAvailableLessThanOrEqualTo(Boolean value) { + addCriterion("available <=", value, "available"); + return (Criteria) this; + } + + public Criteria andAvailableIn(List values) { + addCriterion("available in", values, "available"); + return (Criteria) this; + } + + public Criteria andAvailableNotIn(List values) { + addCriterion("available not in", values, "available"); + return (Criteria) this; + } + + public Criteria andAvailableBetween(Boolean value1, Boolean value2) { + addCriterion("available between", value1, value2, "available"); + return (Criteria) this; + } + + public Criteria andAvailableNotBetween(Boolean value1, Boolean value2) { + addCriterion("available not between", value1, value2, "available"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/LsDraftLesson.java b/src/main/java/club/joylink/rtss/entity/LsDraftLesson.java new file mode 100644 index 000000000..8c4aef8b5 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/LsDraftLesson.java @@ -0,0 +1,198 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * ls_draft_lesson + * @author + */ +public class LsDraftLesson implements Serializable { + private Long id; + + /** + * 地图id + */ + private Long mapId; + + /** + * 产品类型 + */ + private String prdType; + + /** + * 课程名称 + */ + private String name; + + /** + * 课程简介 + */ + private String remarks; + + /** + * 作者ID + */ + private Long authorId; + + private LocalDateTime updateTime; + + /** + * 生产者ID + */ + private Long creatorId; + + /** + * 状态 + */ + private String status; + + /** + * 驳回说明 + */ + private String explanation; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getMapId() { + return mapId; + } + + public void setMapId(Long mapId) { + this.mapId = mapId; + } + + public String getPrdType() { + return prdType; + } + + public void setPrdType(String prdType) { + this.prdType = prdType; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getRemarks() { + return remarks; + } + + public void setRemarks(String remarks) { + this.remarks = remarks; + } + + public Long getAuthorId() { + return authorId; + } + + public void setAuthorId(Long authorId) { + this.authorId = authorId; + } + + public LocalDateTime getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(LocalDateTime updateTime) { + this.updateTime = updateTime; + } + + public Long getCreatorId() { + return creatorId; + } + + public void setCreatorId(Long creatorId) { + this.creatorId = creatorId; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getExplanation() { + return explanation; + } + + public void setExplanation(String explanation) { + this.explanation = explanation; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + LsDraftLesson other = (LsDraftLesson) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getPrdType() == null ? other.getPrdType() == null : this.getPrdType().equals(other.getPrdType())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks())) + && (this.getAuthorId() == null ? other.getAuthorId() == null : this.getAuthorId().equals(other.getAuthorId())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) + && (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getExplanation() == null ? other.getExplanation() == null : this.getExplanation().equals(other.getExplanation())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getPrdType() == null) ? 0 : getPrdType().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode()); + result = prime * result + ((getAuthorId() == null) ? 0 : getAuthorId().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getExplanation() == null) ? 0 : getExplanation().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", mapId=").append(mapId); + sb.append(", prdType=").append(prdType); + sb.append(", name=").append(name); + sb.append(", remarks=").append(remarks); + sb.append(", authorId=").append(authorId); + sb.append(", updateTime=").append(updateTime); + sb.append(", creatorId=").append(creatorId); + sb.append(", status=").append(status); + sb.append(", explanation=").append(explanation); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/LsDraftLessonChapter.java b/src/main/java/club/joylink/rtss/entity/LsDraftLessonChapter.java new file mode 100644 index 000000000..268e3ee79 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/LsDraftLessonChapter.java @@ -0,0 +1,136 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * ls_draft_lesson_chapter + * @author + */ +public class LsDraftLessonChapter implements Serializable { + private Long id; + + /** + * 所属课程ID + */ + private Long lessonId; + + /** + * 章节名称 + */ + private String name; + + /** + * 章节说明 + */ + private String remarks; + + /** + * 父章节ID + */ + private Long parentId; + + /** + * 排序 + */ + private Integer orderNum; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getLessonId() { + return lessonId; + } + + public void setLessonId(Long lessonId) { + this.lessonId = lessonId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getRemarks() { + return remarks; + } + + public void setRemarks(String remarks) { + this.remarks = remarks; + } + + 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; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + LsDraftLessonChapter other = (LsDraftLessonChapter) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getLessonId() == null ? other.getLessonId() == null : this.getLessonId().equals(other.getLessonId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks())) + && (this.getParentId() == null ? other.getParentId() == null : this.getParentId().equals(other.getParentId())) + && (this.getOrderNum() == null ? other.getOrderNum() == null : this.getOrderNum().equals(other.getOrderNum())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getLessonId() == null) ? 0 : getLessonId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode()); + result = prime * result + ((getParentId() == null) ? 0 : getParentId().hashCode()); + result = prime * result + ((getOrderNum() == null) ? 0 : getOrderNum().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", lessonId=").append(lessonId); + sb.append(", name=").append(name); + sb.append(", remarks=").append(remarks); + sb.append(", parentId=").append(parentId); + sb.append(", orderNum=").append(orderNum); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/LsDraftLessonChapterExample.java b/src/main/java/club/joylink/rtss/entity/LsDraftLessonChapterExample.java new file mode 100644 index 000000000..e73b6fd87 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/LsDraftLessonChapterExample.java @@ -0,0 +1,602 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class LsDraftLessonChapterExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public LsDraftLessonChapterExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andLessonIdIsNull() { + addCriterion("lesson_id is null"); + return (Criteria) this; + } + + public Criteria andLessonIdIsNotNull() { + addCriterion("lesson_id is not null"); + return (Criteria) this; + } + + public Criteria andLessonIdEqualTo(Long value) { + addCriterion("lesson_id =", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdNotEqualTo(Long value) { + addCriterion("lesson_id <>", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdGreaterThan(Long value) { + addCriterion("lesson_id >", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdGreaterThanOrEqualTo(Long value) { + addCriterion("lesson_id >=", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdLessThan(Long value) { + addCriterion("lesson_id <", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdLessThanOrEqualTo(Long value) { + addCriterion("lesson_id <=", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdIn(List values) { + addCriterion("lesson_id in", values, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdNotIn(List values) { + addCriterion("lesson_id not in", values, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdBetween(Long value1, Long value2) { + addCriterion("lesson_id between", value1, value2, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdNotBetween(Long value1, Long value2) { + addCriterion("lesson_id not between", value1, value2, "lessonId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andRemarksIsNull() { + addCriterion("remarks is null"); + return (Criteria) this; + } + + public Criteria andRemarksIsNotNull() { + addCriterion("remarks is not null"); + return (Criteria) this; + } + + public Criteria andRemarksEqualTo(String value) { + addCriterion("remarks =", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotEqualTo(String value) { + addCriterion("remarks <>", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksGreaterThan(String value) { + addCriterion("remarks >", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksGreaterThanOrEqualTo(String value) { + addCriterion("remarks >=", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLessThan(String value) { + addCriterion("remarks <", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLessThanOrEqualTo(String value) { + addCriterion("remarks <=", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLike(String value) { + addCriterion("remarks like", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotLike(String value) { + addCriterion("remarks not like", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksIn(List values) { + addCriterion("remarks in", values, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotIn(List values) { + addCriterion("remarks not in", values, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksBetween(String value1, String value2) { + addCriterion("remarks between", value1, value2, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotBetween(String value1, String value2) { + addCriterion("remarks not between", value1, value2, "remarks"); + return (Criteria) this; + } + + public Criteria andParentIdIsNull() { + addCriterion("parent_id is null"); + return (Criteria) this; + } + + public Criteria andParentIdIsNotNull() { + addCriterion("parent_id is not null"); + return (Criteria) this; + } + + public Criteria andParentIdEqualTo(Long value) { + addCriterion("parent_id =", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotEqualTo(Long value) { + addCriterion("parent_id <>", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThan(Long value) { + addCriterion("parent_id >", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThanOrEqualTo(Long value) { + addCriterion("parent_id >=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThan(Long value) { + addCriterion("parent_id <", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThanOrEqualTo(Long value) { + addCriterion("parent_id <=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdIn(List values) { + addCriterion("parent_id in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotIn(List values) { + addCriterion("parent_id not in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdBetween(Long value1, Long value2) { + addCriterion("parent_id between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotBetween(Long value1, Long value2) { + addCriterion("parent_id not between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andOrderNumIsNull() { + addCriterion("order_num is null"); + return (Criteria) this; + } + + public Criteria andOrderNumIsNotNull() { + addCriterion("order_num is not null"); + return (Criteria) this; + } + + public Criteria andOrderNumEqualTo(Integer value) { + addCriterion("order_num =", value, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumNotEqualTo(Integer value) { + addCriterion("order_num <>", value, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumGreaterThan(Integer value) { + addCriterion("order_num >", value, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumGreaterThanOrEqualTo(Integer value) { + addCriterion("order_num >=", value, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumLessThan(Integer value) { + addCriterion("order_num <", value, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumLessThanOrEqualTo(Integer value) { + addCriterion("order_num <=", value, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumIn(List values) { + addCriterion("order_num in", values, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumNotIn(List values) { + addCriterion("order_num not in", values, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumBetween(Integer value1, Integer value2) { + addCriterion("order_num between", value1, value2, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumNotBetween(Integer value1, Integer value2) { + addCriterion("order_num not between", value1, value2, "orderNum"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/LsDraftLessonExample.java b/src/main/java/club/joylink/rtss/entity/LsDraftLessonExample.java new file mode 100644 index 000000000..63b2bc299 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/LsDraftLessonExample.java @@ -0,0 +1,873 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class LsDraftLessonExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public LsDraftLessonExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andPrdTypeIsNull() { + addCriterion("prd_type is null"); + return (Criteria) this; + } + + public Criteria andPrdTypeIsNotNull() { + addCriterion("prd_type is not null"); + return (Criteria) this; + } + + public Criteria andPrdTypeEqualTo(String value) { + addCriterion("prd_type =", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotEqualTo(String value) { + addCriterion("prd_type <>", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeGreaterThan(String value) { + addCriterion("prd_type >", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeGreaterThanOrEqualTo(String value) { + addCriterion("prd_type >=", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeLessThan(String value) { + addCriterion("prd_type <", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeLessThanOrEqualTo(String value) { + addCriterion("prd_type <=", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeLike(String value) { + addCriterion("prd_type like", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotLike(String value) { + addCriterion("prd_type not like", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeIn(List values) { + addCriterion("prd_type in", values, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotIn(List values) { + addCriterion("prd_type not in", values, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeBetween(String value1, String value2) { + addCriterion("prd_type between", value1, value2, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotBetween(String value1, String value2) { + addCriterion("prd_type not between", value1, value2, "prdType"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andRemarksIsNull() { + addCriterion("remarks is null"); + return (Criteria) this; + } + + public Criteria andRemarksIsNotNull() { + addCriterion("remarks is not null"); + return (Criteria) this; + } + + public Criteria andRemarksEqualTo(String value) { + addCriterion("remarks =", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotEqualTo(String value) { + addCriterion("remarks <>", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksGreaterThan(String value) { + addCriterion("remarks >", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksGreaterThanOrEqualTo(String value) { + addCriterion("remarks >=", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLessThan(String value) { + addCriterion("remarks <", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLessThanOrEqualTo(String value) { + addCriterion("remarks <=", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLike(String value) { + addCriterion("remarks like", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotLike(String value) { + addCriterion("remarks not like", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksIn(List values) { + addCriterion("remarks in", values, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotIn(List values) { + addCriterion("remarks not in", values, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksBetween(String value1, String value2) { + addCriterion("remarks between", value1, value2, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotBetween(String value1, String value2) { + addCriterion("remarks not between", value1, value2, "remarks"); + return (Criteria) this; + } + + public Criteria andAuthorIdIsNull() { + addCriterion("author_id is null"); + return (Criteria) this; + } + + public Criteria andAuthorIdIsNotNull() { + addCriterion("author_id is not null"); + return (Criteria) this; + } + + public Criteria andAuthorIdEqualTo(Long value) { + addCriterion("author_id =", value, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdNotEqualTo(Long value) { + addCriterion("author_id <>", value, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdGreaterThan(Long value) { + addCriterion("author_id >", value, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdGreaterThanOrEqualTo(Long value) { + addCriterion("author_id >=", value, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdLessThan(Long value) { + addCriterion("author_id <", value, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdLessThanOrEqualTo(Long value) { + addCriterion("author_id <=", value, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdIn(List values) { + addCriterion("author_id in", values, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdNotIn(List values) { + addCriterion("author_id not in", values, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdBetween(Long value1, Long value2) { + addCriterion("author_id between", value1, value2, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdNotBetween(Long value1, Long value2) { + addCriterion("author_id not between", value1, value2, "authorId"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(LocalDateTime value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(LocalDateTime value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(LocalDateTime value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(LocalDateTime value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNull() { + addCriterion("creator_id is null"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNotNull() { + addCriterion("creator_id is not null"); + return (Criteria) this; + } + + public Criteria andCreatorIdEqualTo(Long value) { + addCriterion("creator_id =", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotEqualTo(Long value) { + addCriterion("creator_id <>", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThan(Long value) { + addCriterion("creator_id >", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) { + addCriterion("creator_id >=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThan(Long value) { + addCriterion("creator_id <", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThanOrEqualTo(Long value) { + addCriterion("creator_id <=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdIn(List values) { + addCriterion("creator_id in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotIn(List values) { + addCriterion("creator_id not in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdBetween(Long value1, Long value2) { + addCriterion("creator_id between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotBetween(Long value1, Long value2) { + addCriterion("creator_id not between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andExplanationIsNull() { + addCriterion("explanation is null"); + return (Criteria) this; + } + + public Criteria andExplanationIsNotNull() { + addCriterion("explanation is not null"); + return (Criteria) this; + } + + public Criteria andExplanationEqualTo(String value) { + addCriterion("explanation =", value, "explanation"); + return (Criteria) this; + } + + public Criteria andExplanationNotEqualTo(String value) { + addCriterion("explanation <>", value, "explanation"); + return (Criteria) this; + } + + public Criteria andExplanationGreaterThan(String value) { + addCriterion("explanation >", value, "explanation"); + return (Criteria) this; + } + + public Criteria andExplanationGreaterThanOrEqualTo(String value) { + addCriterion("explanation >=", value, "explanation"); + return (Criteria) this; + } + + public Criteria andExplanationLessThan(String value) { + addCriterion("explanation <", value, "explanation"); + return (Criteria) this; + } + + public Criteria andExplanationLessThanOrEqualTo(String value) { + addCriterion("explanation <=", value, "explanation"); + return (Criteria) this; + } + + public Criteria andExplanationLike(String value) { + addCriterion("explanation like", value, "explanation"); + return (Criteria) this; + } + + public Criteria andExplanationNotLike(String value) { + addCriterion("explanation not like", value, "explanation"); + return (Criteria) this; + } + + public Criteria andExplanationIn(List values) { + addCriterion("explanation in", values, "explanation"); + return (Criteria) this; + } + + public Criteria andExplanationNotIn(List values) { + addCriterion("explanation not in", values, "explanation"); + return (Criteria) this; + } + + public Criteria andExplanationBetween(String value1, String value2) { + addCriterion("explanation between", value1, value2, "explanation"); + return (Criteria) this; + } + + public Criteria andExplanationNotBetween(String value1, String value2) { + addCriterion("explanation not between", value1, value2, "explanation"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/LsDraftRelChapterTraining.java b/src/main/java/club/joylink/rtss/entity/LsDraftRelChapterTraining.java new file mode 100644 index 000000000..25f62e124 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/LsDraftRelChapterTraining.java @@ -0,0 +1,136 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * ls_draft_rel_chapter_training + * @author + */ +public class LsDraftRelChapterTraining implements Serializable { + private Long id; + + /** + * 所属课程ID + */ + private Long lessonId; + + /** + * 课程章节ID + */ + private Long chapterId; + + /** + * 实训ID + */ + private Long trainingId; + + /** + * 顺序 + */ + private Integer orderNum; + + /** + * 是否可以试用 + */ + private Boolean trial; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getLessonId() { + return lessonId; + } + + public void setLessonId(Long lessonId) { + this.lessonId = lessonId; + } + + public Long getChapterId() { + return chapterId; + } + + public void setChapterId(Long chapterId) { + this.chapterId = chapterId; + } + + public Long getTrainingId() { + return trainingId; + } + + public void setTrainingId(Long trainingId) { + this.trainingId = trainingId; + } + + public Integer getOrderNum() { + return orderNum; + } + + public void setOrderNum(Integer orderNum) { + this.orderNum = orderNum; + } + + public Boolean getTrial() { + return trial; + } + + public void setTrial(Boolean trial) { + this.trial = trial; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + LsDraftRelChapterTraining other = (LsDraftRelChapterTraining) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getLessonId() == null ? other.getLessonId() == null : this.getLessonId().equals(other.getLessonId())) + && (this.getChapterId() == null ? other.getChapterId() == null : this.getChapterId().equals(other.getChapterId())) + && (this.getTrainingId() == null ? other.getTrainingId() == null : this.getTrainingId().equals(other.getTrainingId())) + && (this.getOrderNum() == null ? other.getOrderNum() == null : this.getOrderNum().equals(other.getOrderNum())) + && (this.getTrial() == null ? other.getTrial() == null : this.getTrial().equals(other.getTrial())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getLessonId() == null) ? 0 : getLessonId().hashCode()); + result = prime * result + ((getChapterId() == null) ? 0 : getChapterId().hashCode()); + result = prime * result + ((getTrainingId() == null) ? 0 : getTrainingId().hashCode()); + result = prime * result + ((getOrderNum() == null) ? 0 : getOrderNum().hashCode()); + result = prime * result + ((getTrial() == null) ? 0 : getTrial().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", lessonId=").append(lessonId); + sb.append(", chapterId=").append(chapterId); + sb.append(", trainingId=").append(trainingId); + sb.append(", orderNum=").append(orderNum); + sb.append(", trial=").append(trial); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/LsDraftRelChapterTrainingExample.java b/src/main/java/club/joylink/rtss/entity/LsDraftRelChapterTrainingExample.java new file mode 100644 index 000000000..102cc843c --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/LsDraftRelChapterTrainingExample.java @@ -0,0 +1,582 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class LsDraftRelChapterTrainingExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public LsDraftRelChapterTrainingExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andLessonIdIsNull() { + addCriterion("lesson_id is null"); + return (Criteria) this; + } + + public Criteria andLessonIdIsNotNull() { + addCriterion("lesson_id is not null"); + return (Criteria) this; + } + + public Criteria andLessonIdEqualTo(Long value) { + addCriterion("lesson_id =", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdNotEqualTo(Long value) { + addCriterion("lesson_id <>", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdGreaterThan(Long value) { + addCriterion("lesson_id >", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdGreaterThanOrEqualTo(Long value) { + addCriterion("lesson_id >=", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdLessThan(Long value) { + addCriterion("lesson_id <", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdLessThanOrEqualTo(Long value) { + addCriterion("lesson_id <=", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdIn(List values) { + addCriterion("lesson_id in", values, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdNotIn(List values) { + addCriterion("lesson_id not in", values, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdBetween(Long value1, Long value2) { + addCriterion("lesson_id between", value1, value2, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdNotBetween(Long value1, Long value2) { + addCriterion("lesson_id not between", value1, value2, "lessonId"); + return (Criteria) this; + } + + public Criteria andChapterIdIsNull() { + addCriterion("chapter_id is null"); + return (Criteria) this; + } + + public Criteria andChapterIdIsNotNull() { + addCriterion("chapter_id is not null"); + return (Criteria) this; + } + + public Criteria andChapterIdEqualTo(Long value) { + addCriterion("chapter_id =", value, "chapterId"); + return (Criteria) this; + } + + public Criteria andChapterIdNotEqualTo(Long value) { + addCriterion("chapter_id <>", value, "chapterId"); + return (Criteria) this; + } + + public Criteria andChapterIdGreaterThan(Long value) { + addCriterion("chapter_id >", value, "chapterId"); + return (Criteria) this; + } + + public Criteria andChapterIdGreaterThanOrEqualTo(Long value) { + addCriterion("chapter_id >=", value, "chapterId"); + return (Criteria) this; + } + + public Criteria andChapterIdLessThan(Long value) { + addCriterion("chapter_id <", value, "chapterId"); + return (Criteria) this; + } + + public Criteria andChapterIdLessThanOrEqualTo(Long value) { + addCriterion("chapter_id <=", value, "chapterId"); + return (Criteria) this; + } + + public Criteria andChapterIdIn(List values) { + addCriterion("chapter_id in", values, "chapterId"); + return (Criteria) this; + } + + public Criteria andChapterIdNotIn(List values) { + addCriterion("chapter_id not in", values, "chapterId"); + return (Criteria) this; + } + + public Criteria andChapterIdBetween(Long value1, Long value2) { + addCriterion("chapter_id between", value1, value2, "chapterId"); + return (Criteria) this; + } + + public Criteria andChapterIdNotBetween(Long value1, Long value2) { + addCriterion("chapter_id not between", value1, value2, "chapterId"); + return (Criteria) this; + } + + public Criteria andTrainingIdIsNull() { + addCriterion("training_id is null"); + return (Criteria) this; + } + + public Criteria andTrainingIdIsNotNull() { + addCriterion("training_id is not null"); + return (Criteria) this; + } + + public Criteria andTrainingIdEqualTo(Long value) { + addCriterion("training_id =", value, "trainingId"); + return (Criteria) this; + } + + public Criteria andTrainingIdNotEqualTo(Long value) { + addCriterion("training_id <>", value, "trainingId"); + return (Criteria) this; + } + + public Criteria andTrainingIdGreaterThan(Long value) { + addCriterion("training_id >", value, "trainingId"); + return (Criteria) this; + } + + public Criteria andTrainingIdGreaterThanOrEqualTo(Long value) { + addCriterion("training_id >=", value, "trainingId"); + return (Criteria) this; + } + + public Criteria andTrainingIdLessThan(Long value) { + addCriterion("training_id <", value, "trainingId"); + return (Criteria) this; + } + + public Criteria andTrainingIdLessThanOrEqualTo(Long value) { + addCriterion("training_id <=", value, "trainingId"); + return (Criteria) this; + } + + public Criteria andTrainingIdIn(List values) { + addCriterion("training_id in", values, "trainingId"); + return (Criteria) this; + } + + public Criteria andTrainingIdNotIn(List values) { + addCriterion("training_id not in", values, "trainingId"); + return (Criteria) this; + } + + public Criteria andTrainingIdBetween(Long value1, Long value2) { + addCriterion("training_id between", value1, value2, "trainingId"); + return (Criteria) this; + } + + public Criteria andTrainingIdNotBetween(Long value1, Long value2) { + addCriterion("training_id not between", value1, value2, "trainingId"); + return (Criteria) this; + } + + public Criteria andOrderNumIsNull() { + addCriterion("order_num is null"); + return (Criteria) this; + } + + public Criteria andOrderNumIsNotNull() { + addCriterion("order_num is not null"); + return (Criteria) this; + } + + public Criteria andOrderNumEqualTo(Integer value) { + addCriterion("order_num =", value, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumNotEqualTo(Integer value) { + addCriterion("order_num <>", value, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumGreaterThan(Integer value) { + addCriterion("order_num >", value, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumGreaterThanOrEqualTo(Integer value) { + addCriterion("order_num >=", value, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumLessThan(Integer value) { + addCriterion("order_num <", value, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumLessThanOrEqualTo(Integer value) { + addCriterion("order_num <=", value, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumIn(List values) { + addCriterion("order_num in", values, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumNotIn(List values) { + addCriterion("order_num not in", values, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumBetween(Integer value1, Integer value2) { + addCriterion("order_num between", value1, value2, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumNotBetween(Integer value1, Integer value2) { + addCriterion("order_num not between", value1, value2, "orderNum"); + return (Criteria) this; + } + + public Criteria andTrialIsNull() { + addCriterion("trial is null"); + return (Criteria) this; + } + + public Criteria andTrialIsNotNull() { + addCriterion("trial is not null"); + return (Criteria) this; + } + + public Criteria andTrialEqualTo(Boolean value) { + addCriterion("trial =", value, "trial"); + return (Criteria) this; + } + + public Criteria andTrialNotEqualTo(Boolean value) { + addCriterion("trial <>", value, "trial"); + return (Criteria) this; + } + + public Criteria andTrialGreaterThan(Boolean value) { + addCriterion("trial >", value, "trial"); + return (Criteria) this; + } + + public Criteria andTrialGreaterThanOrEqualTo(Boolean value) { + addCriterion("trial >=", value, "trial"); + return (Criteria) this; + } + + public Criteria andTrialLessThan(Boolean value) { + addCriterion("trial <", value, "trial"); + return (Criteria) this; + } + + public Criteria andTrialLessThanOrEqualTo(Boolean value) { + addCriterion("trial <=", value, "trial"); + return (Criteria) this; + } + + public Criteria andTrialIn(List values) { + addCriterion("trial in", values, "trial"); + return (Criteria) this; + } + + public Criteria andTrialNotIn(List values) { + addCriterion("trial not in", values, "trial"); + return (Criteria) this; + } + + public Criteria andTrialBetween(Boolean value1, Boolean value2) { + addCriterion("trial between", value1, value2, "trial"); + return (Criteria) this; + } + + public Criteria andTrialNotBetween(Boolean value1, Boolean value2) { + addCriterion("trial not between", value1, value2, "trial"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/LsLesson.java b/src/main/java/club/joylink/rtss/entity/LsLesson.java new file mode 100644 index 000000000..be43b0524 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/LsLesson.java @@ -0,0 +1,201 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * ls_lesson + * @author + */ +public class LsLesson implements Serializable { + private Long id; + + /** + * 地图id + */ + private Long mapId; + + /** + * 产品类型 + */ + private String prdType; + + /** + * 课程名称 + */ + private String name; + + /** + * 课程简介 + */ + private String remarks; + + /** + * 作者ID + */ + private Long authorId; + + /** + * 更新时间 + */ + private LocalDateTime updateTime; + + /** + * 生产者ID + */ + private Long creatorId; + + /** + * 所属城市编号:数据字典值 + */ + private String cityCode; + + /** + * 状态:上线/下线 + */ + private String status; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getMapId() { + return mapId; + } + + public void setMapId(Long mapId) { + this.mapId = mapId; + } + + public String getPrdType() { + return prdType; + } + + public void setPrdType(String prdType) { + this.prdType = prdType; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getRemarks() { + return remarks; + } + + public void setRemarks(String remarks) { + this.remarks = remarks; + } + + public Long getAuthorId() { + return authorId; + } + + public void setAuthorId(Long authorId) { + this.authorId = authorId; + } + + public LocalDateTime getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(LocalDateTime updateTime) { + this.updateTime = updateTime; + } + + public Long getCreatorId() { + return creatorId; + } + + public void setCreatorId(Long creatorId) { + this.creatorId = creatorId; + } + + public String getCityCode() { + return cityCode; + } + + public void setCityCode(String cityCode) { + this.cityCode = cityCode; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + LsLesson other = (LsLesson) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getPrdType() == null ? other.getPrdType() == null : this.getPrdType().equals(other.getPrdType())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks())) + && (this.getAuthorId() == null ? other.getAuthorId() == null : this.getAuthorId().equals(other.getAuthorId())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) + && (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId())) + && (this.getCityCode() == null ? other.getCityCode() == null : this.getCityCode().equals(other.getCityCode())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getPrdType() == null) ? 0 : getPrdType().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode()); + result = prime * result + ((getAuthorId() == null) ? 0 : getAuthorId().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode()); + result = prime * result + ((getCityCode() == null) ? 0 : getCityCode().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", mapId=").append(mapId); + sb.append(", prdType=").append(prdType); + sb.append(", name=").append(name); + sb.append(", remarks=").append(remarks); + sb.append(", authorId=").append(authorId); + sb.append(", updateTime=").append(updateTime); + sb.append(", creatorId=").append(creatorId); + sb.append(", cityCode=").append(cityCode); + sb.append(", status=").append(status); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/LsLessonChapter.java b/src/main/java/club/joylink/rtss/entity/LsLessonChapter.java new file mode 100644 index 000000000..f106a36c9 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/LsLessonChapter.java @@ -0,0 +1,136 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * ls_lesson_chapter + * @author + */ +public class LsLessonChapter implements Serializable { + private Long id; + + /** + * 课程id + */ + private Long lessonId; + + /** + * 章节名称 + */ + private String name; + + /** + * 章节说明 + */ + private String remarks; + + /** + * 父章节ID + */ + private Long parentId; + + /** + * 排序 + */ + private Integer orderNum; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getLessonId() { + return lessonId; + } + + public void setLessonId(Long lessonId) { + this.lessonId = lessonId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getRemarks() { + return remarks; + } + + public void setRemarks(String remarks) { + this.remarks = remarks; + } + + 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; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + LsLessonChapter other = (LsLessonChapter) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getLessonId() == null ? other.getLessonId() == null : this.getLessonId().equals(other.getLessonId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks())) + && (this.getParentId() == null ? other.getParentId() == null : this.getParentId().equals(other.getParentId())) + && (this.getOrderNum() == null ? other.getOrderNum() == null : this.getOrderNum().equals(other.getOrderNum())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getLessonId() == null) ? 0 : getLessonId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode()); + result = prime * result + ((getParentId() == null) ? 0 : getParentId().hashCode()); + result = prime * result + ((getOrderNum() == null) ? 0 : getOrderNum().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", lessonId=").append(lessonId); + sb.append(", name=").append(name); + sb.append(", remarks=").append(remarks); + sb.append(", parentId=").append(parentId); + sb.append(", orderNum=").append(orderNum); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/LsLessonChapterExample.java b/src/main/java/club/joylink/rtss/entity/LsLessonChapterExample.java new file mode 100644 index 000000000..cc5f81d32 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/LsLessonChapterExample.java @@ -0,0 +1,602 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class LsLessonChapterExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public LsLessonChapterExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andLessonIdIsNull() { + addCriterion("lesson_id is null"); + return (Criteria) this; + } + + public Criteria andLessonIdIsNotNull() { + addCriterion("lesson_id is not null"); + return (Criteria) this; + } + + public Criteria andLessonIdEqualTo(Long value) { + addCriterion("lesson_id =", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdNotEqualTo(Long value) { + addCriterion("lesson_id <>", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdGreaterThan(Long value) { + addCriterion("lesson_id >", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdGreaterThanOrEqualTo(Long value) { + addCriterion("lesson_id >=", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdLessThan(Long value) { + addCriterion("lesson_id <", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdLessThanOrEqualTo(Long value) { + addCriterion("lesson_id <=", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdIn(List values) { + addCriterion("lesson_id in", values, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdNotIn(List values) { + addCriterion("lesson_id not in", values, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdBetween(Long value1, Long value2) { + addCriterion("lesson_id between", value1, value2, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdNotBetween(Long value1, Long value2) { + addCriterion("lesson_id not between", value1, value2, "lessonId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andRemarksIsNull() { + addCriterion("remarks is null"); + return (Criteria) this; + } + + public Criteria andRemarksIsNotNull() { + addCriterion("remarks is not null"); + return (Criteria) this; + } + + public Criteria andRemarksEqualTo(String value) { + addCriterion("remarks =", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotEqualTo(String value) { + addCriterion("remarks <>", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksGreaterThan(String value) { + addCriterion("remarks >", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksGreaterThanOrEqualTo(String value) { + addCriterion("remarks >=", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLessThan(String value) { + addCriterion("remarks <", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLessThanOrEqualTo(String value) { + addCriterion("remarks <=", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLike(String value) { + addCriterion("remarks like", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotLike(String value) { + addCriterion("remarks not like", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksIn(List values) { + addCriterion("remarks in", values, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotIn(List values) { + addCriterion("remarks not in", values, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksBetween(String value1, String value2) { + addCriterion("remarks between", value1, value2, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotBetween(String value1, String value2) { + addCriterion("remarks not between", value1, value2, "remarks"); + return (Criteria) this; + } + + public Criteria andParentIdIsNull() { + addCriterion("parent_id is null"); + return (Criteria) this; + } + + public Criteria andParentIdIsNotNull() { + addCriterion("parent_id is not null"); + return (Criteria) this; + } + + public Criteria andParentIdEqualTo(Long value) { + addCriterion("parent_id =", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotEqualTo(Long value) { + addCriterion("parent_id <>", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThan(Long value) { + addCriterion("parent_id >", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThanOrEqualTo(Long value) { + addCriterion("parent_id >=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThan(Long value) { + addCriterion("parent_id <", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThanOrEqualTo(Long value) { + addCriterion("parent_id <=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdIn(List values) { + addCriterion("parent_id in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotIn(List values) { + addCriterion("parent_id not in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdBetween(Long value1, Long value2) { + addCriterion("parent_id between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotBetween(Long value1, Long value2) { + addCriterion("parent_id not between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andOrderNumIsNull() { + addCriterion("order_num is null"); + return (Criteria) this; + } + + public Criteria andOrderNumIsNotNull() { + addCriterion("order_num is not null"); + return (Criteria) this; + } + + public Criteria andOrderNumEqualTo(Integer value) { + addCriterion("order_num =", value, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumNotEqualTo(Integer value) { + addCriterion("order_num <>", value, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumGreaterThan(Integer value) { + addCriterion("order_num >", value, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumGreaterThanOrEqualTo(Integer value) { + addCriterion("order_num >=", value, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumLessThan(Integer value) { + addCriterion("order_num <", value, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumLessThanOrEqualTo(Integer value) { + addCriterion("order_num <=", value, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumIn(List values) { + addCriterion("order_num in", values, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumNotIn(List values) { + addCriterion("order_num not in", values, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumBetween(Integer value1, Integer value2) { + addCriterion("order_num between", value1, value2, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumNotBetween(Integer value1, Integer value2) { + addCriterion("order_num not between", value1, value2, "orderNum"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/LsLessonExample.java b/src/main/java/club/joylink/rtss/entity/LsLessonExample.java new file mode 100644 index 000000000..52ac5ae3b --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/LsLessonExample.java @@ -0,0 +1,873 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class LsLessonExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public LsLessonExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andPrdTypeIsNull() { + addCriterion("prd_type is null"); + return (Criteria) this; + } + + public Criteria andPrdTypeIsNotNull() { + addCriterion("prd_type is not null"); + return (Criteria) this; + } + + public Criteria andPrdTypeEqualTo(String value) { + addCriterion("prd_type =", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotEqualTo(String value) { + addCriterion("prd_type <>", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeGreaterThan(String value) { + addCriterion("prd_type >", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeGreaterThanOrEqualTo(String value) { + addCriterion("prd_type >=", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeLessThan(String value) { + addCriterion("prd_type <", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeLessThanOrEqualTo(String value) { + addCriterion("prd_type <=", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeLike(String value) { + addCriterion("prd_type like", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotLike(String value) { + addCriterion("prd_type not like", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeIn(List values) { + addCriterion("prd_type in", values, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotIn(List values) { + addCriterion("prd_type not in", values, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeBetween(String value1, String value2) { + addCriterion("prd_type between", value1, value2, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotBetween(String value1, String value2) { + addCriterion("prd_type not between", value1, value2, "prdType"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andRemarksIsNull() { + addCriterion("remarks is null"); + return (Criteria) this; + } + + public Criteria andRemarksIsNotNull() { + addCriterion("remarks is not null"); + return (Criteria) this; + } + + public Criteria andRemarksEqualTo(String value) { + addCriterion("remarks =", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotEqualTo(String value) { + addCriterion("remarks <>", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksGreaterThan(String value) { + addCriterion("remarks >", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksGreaterThanOrEqualTo(String value) { + addCriterion("remarks >=", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLessThan(String value) { + addCriterion("remarks <", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLessThanOrEqualTo(String value) { + addCriterion("remarks <=", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLike(String value) { + addCriterion("remarks like", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotLike(String value) { + addCriterion("remarks not like", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksIn(List values) { + addCriterion("remarks in", values, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotIn(List values) { + addCriterion("remarks not in", values, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksBetween(String value1, String value2) { + addCriterion("remarks between", value1, value2, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotBetween(String value1, String value2) { + addCriterion("remarks not between", value1, value2, "remarks"); + return (Criteria) this; + } + + public Criteria andAuthorIdIsNull() { + addCriterion("author_id is null"); + return (Criteria) this; + } + + public Criteria andAuthorIdIsNotNull() { + addCriterion("author_id is not null"); + return (Criteria) this; + } + + public Criteria andAuthorIdEqualTo(Long value) { + addCriterion("author_id =", value, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdNotEqualTo(Long value) { + addCriterion("author_id <>", value, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdGreaterThan(Long value) { + addCriterion("author_id >", value, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdGreaterThanOrEqualTo(Long value) { + addCriterion("author_id >=", value, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdLessThan(Long value) { + addCriterion("author_id <", value, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdLessThanOrEqualTo(Long value) { + addCriterion("author_id <=", value, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdIn(List values) { + addCriterion("author_id in", values, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdNotIn(List values) { + addCriterion("author_id not in", values, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdBetween(Long value1, Long value2) { + addCriterion("author_id between", value1, value2, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdNotBetween(Long value1, Long value2) { + addCriterion("author_id not between", value1, value2, "authorId"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(LocalDateTime value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(LocalDateTime value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(LocalDateTime value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(LocalDateTime value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNull() { + addCriterion("creator_id is null"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNotNull() { + addCriterion("creator_id is not null"); + return (Criteria) this; + } + + public Criteria andCreatorIdEqualTo(Long value) { + addCriterion("creator_id =", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotEqualTo(Long value) { + addCriterion("creator_id <>", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThan(Long value) { + addCriterion("creator_id >", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) { + addCriterion("creator_id >=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThan(Long value) { + addCriterion("creator_id <", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThanOrEqualTo(Long value) { + addCriterion("creator_id <=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdIn(List values) { + addCriterion("creator_id in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotIn(List values) { + addCriterion("creator_id not in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdBetween(Long value1, Long value2) { + addCriterion("creator_id between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotBetween(Long value1, Long value2) { + addCriterion("creator_id not between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCityCodeIsNull() { + addCriterion("city_code is null"); + return (Criteria) this; + } + + public Criteria andCityCodeIsNotNull() { + addCriterion("city_code is not null"); + return (Criteria) this; + } + + public Criteria andCityCodeEqualTo(String value) { + addCriterion("city_code =", value, "cityCode"); + return (Criteria) this; + } + + public Criteria andCityCodeNotEqualTo(String value) { + addCriterion("city_code <>", value, "cityCode"); + return (Criteria) this; + } + + public Criteria andCityCodeGreaterThan(String value) { + addCriterion("city_code >", value, "cityCode"); + return (Criteria) this; + } + + public Criteria andCityCodeGreaterThanOrEqualTo(String value) { + addCriterion("city_code >=", value, "cityCode"); + return (Criteria) this; + } + + public Criteria andCityCodeLessThan(String value) { + addCriterion("city_code <", value, "cityCode"); + return (Criteria) this; + } + + public Criteria andCityCodeLessThanOrEqualTo(String value) { + addCriterion("city_code <=", value, "cityCode"); + return (Criteria) this; + } + + public Criteria andCityCodeLike(String value) { + addCriterion("city_code like", value, "cityCode"); + return (Criteria) this; + } + + public Criteria andCityCodeNotLike(String value) { + addCriterion("city_code not like", value, "cityCode"); + return (Criteria) this; + } + + public Criteria andCityCodeIn(List values) { + addCriterion("city_code in", values, "cityCode"); + return (Criteria) this; + } + + public Criteria andCityCodeNotIn(List values) { + addCriterion("city_code not in", values, "cityCode"); + return (Criteria) this; + } + + public Criteria andCityCodeBetween(String value1, String value2) { + addCriterion("city_code between", value1, value2, "cityCode"); + return (Criteria) this; + } + + public Criteria andCityCodeNotBetween(String value1, String value2) { + addCriterion("city_code not between", value1, value2, "cityCode"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/LsLessonVersion.java b/src/main/java/club/joylink/rtss/entity/LsLessonVersion.java new file mode 100644 index 000000000..28beb478f --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/LsLessonVersion.java @@ -0,0 +1,121 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * ls_lesson_version + * @author + */ +public class LsLessonVersion implements Serializable { + private Long id; + + /** + * 所属课程编码 + */ + private Long lessonId; + + /** + * 版本号 + */ + private String version; + + /** + * 创建者ID + */ + private Long creatorId; + + /** + * 更新时间 + */ + private LocalDateTime updateTime; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getLessonId() { + return lessonId; + } + + public void setLessonId(Long lessonId) { + this.lessonId = lessonId; + } + + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + public Long getCreatorId() { + return creatorId; + } + + public void setCreatorId(Long creatorId) { + this.creatorId = creatorId; + } + + public LocalDateTime getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(LocalDateTime updateTime) { + this.updateTime = updateTime; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + LsLessonVersion other = (LsLessonVersion) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getLessonId() == null ? other.getLessonId() == null : this.getLessonId().equals(other.getLessonId())) + && (this.getVersion() == null ? other.getVersion() == null : this.getVersion().equals(other.getVersion())) + && (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getLessonId() == null) ? 0 : getLessonId().hashCode()); + result = prime * result + ((getVersion() == null) ? 0 : getVersion().hashCode()); + result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", lessonId=").append(lessonId); + sb.append(", version=").append(version); + sb.append(", creatorId=").append(creatorId); + sb.append(", updateTime=").append(updateTime); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/LsLessonVersionExample.java b/src/main/java/club/joylink/rtss/entity/LsLessonVersionExample.java new file mode 100644 index 000000000..df19fc93f --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/LsLessonVersionExample.java @@ -0,0 +1,533 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class LsLessonVersionExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public LsLessonVersionExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andLessonIdIsNull() { + addCriterion("lesson_id is null"); + return (Criteria) this; + } + + public Criteria andLessonIdIsNotNull() { + addCriterion("lesson_id is not null"); + return (Criteria) this; + } + + public Criteria andLessonIdEqualTo(Long value) { + addCriterion("lesson_id =", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdNotEqualTo(Long value) { + addCriterion("lesson_id <>", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdGreaterThan(Long value) { + addCriterion("lesson_id >", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdGreaterThanOrEqualTo(Long value) { + addCriterion("lesson_id >=", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdLessThan(Long value) { + addCriterion("lesson_id <", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdLessThanOrEqualTo(Long value) { + addCriterion("lesson_id <=", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdIn(List values) { + addCriterion("lesson_id in", values, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdNotIn(List values) { + addCriterion("lesson_id not in", values, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdBetween(Long value1, Long value2) { + addCriterion("lesson_id between", value1, value2, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdNotBetween(Long value1, Long value2) { + addCriterion("lesson_id not between", value1, value2, "lessonId"); + return (Criteria) this; + } + + public Criteria andVersionIsNull() { + addCriterion("version is null"); + return (Criteria) this; + } + + public Criteria andVersionIsNotNull() { + addCriterion("version is not null"); + return (Criteria) this; + } + + public Criteria andVersionEqualTo(String value) { + addCriterion("version =", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionNotEqualTo(String value) { + addCriterion("version <>", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionGreaterThan(String value) { + addCriterion("version >", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionGreaterThanOrEqualTo(String value) { + addCriterion("version >=", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionLessThan(String value) { + addCriterion("version <", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionLessThanOrEqualTo(String value) { + addCriterion("version <=", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionLike(String value) { + addCriterion("version like", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionNotLike(String value) { + addCriterion("version not like", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionIn(List values) { + addCriterion("version in", values, "version"); + return (Criteria) this; + } + + public Criteria andVersionNotIn(List values) { + addCriterion("version not in", values, "version"); + return (Criteria) this; + } + + public Criteria andVersionBetween(String value1, String value2) { + addCriterion("version between", value1, value2, "version"); + return (Criteria) this; + } + + public Criteria andVersionNotBetween(String value1, String value2) { + addCriterion("version not between", value1, value2, "version"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNull() { + addCriterion("creator_id is null"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNotNull() { + addCriterion("creator_id is not null"); + return (Criteria) this; + } + + public Criteria andCreatorIdEqualTo(Long value) { + addCriterion("creator_id =", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotEqualTo(Long value) { + addCriterion("creator_id <>", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThan(Long value) { + addCriterion("creator_id >", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) { + addCriterion("creator_id >=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThan(Long value) { + addCriterion("creator_id <", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThanOrEqualTo(Long value) { + addCriterion("creator_id <=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdIn(List values) { + addCriterion("creator_id in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotIn(List values) { + addCriterion("creator_id not in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdBetween(Long value1, Long value2) { + addCriterion("creator_id between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotBetween(Long value1, Long value2) { + addCriterion("creator_id not between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(LocalDateTime value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(LocalDateTime value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(LocalDateTime value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(LocalDateTime value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/LsRelChapterTraining.java b/src/main/java/club/joylink/rtss/entity/LsRelChapterTraining.java new file mode 100644 index 000000000..0d798a21a --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/LsRelChapterTraining.java @@ -0,0 +1,136 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * ls_rel_chapter_training + * @author + */ +public class LsRelChapterTraining implements Serializable { + private Long id; + + /** + * 课程id + */ + private Long lessonId; + + /** + * 课程章节ID + */ + private Long chapterId; + + /** + * 实训ID + */ + private Long trainingId; + + /** + * 顺序 + */ + private Integer orderNum; + + /** + * 是否可以试用 + */ + private Boolean trial; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getLessonId() { + return lessonId; + } + + public void setLessonId(Long lessonId) { + this.lessonId = lessonId; + } + + public Long getChapterId() { + return chapterId; + } + + public void setChapterId(Long chapterId) { + this.chapterId = chapterId; + } + + public Long getTrainingId() { + return trainingId; + } + + public void setTrainingId(Long trainingId) { + this.trainingId = trainingId; + } + + public Integer getOrderNum() { + return orderNum; + } + + public void setOrderNum(Integer orderNum) { + this.orderNum = orderNum; + } + + public Boolean getTrial() { + return trial; + } + + public void setTrial(Boolean trial) { + this.trial = trial; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + LsRelChapterTraining other = (LsRelChapterTraining) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getLessonId() == null ? other.getLessonId() == null : this.getLessonId().equals(other.getLessonId())) + && (this.getChapterId() == null ? other.getChapterId() == null : this.getChapterId().equals(other.getChapterId())) + && (this.getTrainingId() == null ? other.getTrainingId() == null : this.getTrainingId().equals(other.getTrainingId())) + && (this.getOrderNum() == null ? other.getOrderNum() == null : this.getOrderNum().equals(other.getOrderNum())) + && (this.getTrial() == null ? other.getTrial() == null : this.getTrial().equals(other.getTrial())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getLessonId() == null) ? 0 : getLessonId().hashCode()); + result = prime * result + ((getChapterId() == null) ? 0 : getChapterId().hashCode()); + result = prime * result + ((getTrainingId() == null) ? 0 : getTrainingId().hashCode()); + result = prime * result + ((getOrderNum() == null) ? 0 : getOrderNum().hashCode()); + result = prime * result + ((getTrial() == null) ? 0 : getTrial().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", lessonId=").append(lessonId); + sb.append(", chapterId=").append(chapterId); + sb.append(", trainingId=").append(trainingId); + sb.append(", orderNum=").append(orderNum); + sb.append(", trial=").append(trial); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/LsRelChapterTrainingExample.java b/src/main/java/club/joylink/rtss/entity/LsRelChapterTrainingExample.java new file mode 100644 index 000000000..ae73dc2ad --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/LsRelChapterTrainingExample.java @@ -0,0 +1,582 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class LsRelChapterTrainingExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public LsRelChapterTrainingExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andLessonIdIsNull() { + addCriterion("lesson_id is null"); + return (Criteria) this; + } + + public Criteria andLessonIdIsNotNull() { + addCriterion("lesson_id is not null"); + return (Criteria) this; + } + + public Criteria andLessonIdEqualTo(Long value) { + addCriterion("lesson_id =", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdNotEqualTo(Long value) { + addCriterion("lesson_id <>", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdGreaterThan(Long value) { + addCriterion("lesson_id >", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdGreaterThanOrEqualTo(Long value) { + addCriterion("lesson_id >=", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdLessThan(Long value) { + addCriterion("lesson_id <", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdLessThanOrEqualTo(Long value) { + addCriterion("lesson_id <=", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdIn(List values) { + addCriterion("lesson_id in", values, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdNotIn(List values) { + addCriterion("lesson_id not in", values, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdBetween(Long value1, Long value2) { + addCriterion("lesson_id between", value1, value2, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdNotBetween(Long value1, Long value2) { + addCriterion("lesson_id not between", value1, value2, "lessonId"); + return (Criteria) this; + } + + public Criteria andChapterIdIsNull() { + addCriterion("chapter_id is null"); + return (Criteria) this; + } + + public Criteria andChapterIdIsNotNull() { + addCriterion("chapter_id is not null"); + return (Criteria) this; + } + + public Criteria andChapterIdEqualTo(Long value) { + addCriterion("chapter_id =", value, "chapterId"); + return (Criteria) this; + } + + public Criteria andChapterIdNotEqualTo(Long value) { + addCriterion("chapter_id <>", value, "chapterId"); + return (Criteria) this; + } + + public Criteria andChapterIdGreaterThan(Long value) { + addCriterion("chapter_id >", value, "chapterId"); + return (Criteria) this; + } + + public Criteria andChapterIdGreaterThanOrEqualTo(Long value) { + addCriterion("chapter_id >=", value, "chapterId"); + return (Criteria) this; + } + + public Criteria andChapterIdLessThan(Long value) { + addCriterion("chapter_id <", value, "chapterId"); + return (Criteria) this; + } + + public Criteria andChapterIdLessThanOrEqualTo(Long value) { + addCriterion("chapter_id <=", value, "chapterId"); + return (Criteria) this; + } + + public Criteria andChapterIdIn(List values) { + addCriterion("chapter_id in", values, "chapterId"); + return (Criteria) this; + } + + public Criteria andChapterIdNotIn(List values) { + addCriterion("chapter_id not in", values, "chapterId"); + return (Criteria) this; + } + + public Criteria andChapterIdBetween(Long value1, Long value2) { + addCriterion("chapter_id between", value1, value2, "chapterId"); + return (Criteria) this; + } + + public Criteria andChapterIdNotBetween(Long value1, Long value2) { + addCriterion("chapter_id not between", value1, value2, "chapterId"); + return (Criteria) this; + } + + public Criteria andTrainingIdIsNull() { + addCriterion("training_id is null"); + return (Criteria) this; + } + + public Criteria andTrainingIdIsNotNull() { + addCriterion("training_id is not null"); + return (Criteria) this; + } + + public Criteria andTrainingIdEqualTo(Long value) { + addCriterion("training_id =", value, "trainingId"); + return (Criteria) this; + } + + public Criteria andTrainingIdNotEqualTo(Long value) { + addCriterion("training_id <>", value, "trainingId"); + return (Criteria) this; + } + + public Criteria andTrainingIdGreaterThan(Long value) { + addCriterion("training_id >", value, "trainingId"); + return (Criteria) this; + } + + public Criteria andTrainingIdGreaterThanOrEqualTo(Long value) { + addCriterion("training_id >=", value, "trainingId"); + return (Criteria) this; + } + + public Criteria andTrainingIdLessThan(Long value) { + addCriterion("training_id <", value, "trainingId"); + return (Criteria) this; + } + + public Criteria andTrainingIdLessThanOrEqualTo(Long value) { + addCriterion("training_id <=", value, "trainingId"); + return (Criteria) this; + } + + public Criteria andTrainingIdIn(List values) { + addCriterion("training_id in", values, "trainingId"); + return (Criteria) this; + } + + public Criteria andTrainingIdNotIn(List values) { + addCriterion("training_id not in", values, "trainingId"); + return (Criteria) this; + } + + public Criteria andTrainingIdBetween(Long value1, Long value2) { + addCriterion("training_id between", value1, value2, "trainingId"); + return (Criteria) this; + } + + public Criteria andTrainingIdNotBetween(Long value1, Long value2) { + addCriterion("training_id not between", value1, value2, "trainingId"); + return (Criteria) this; + } + + public Criteria andOrderNumIsNull() { + addCriterion("order_num is null"); + return (Criteria) this; + } + + public Criteria andOrderNumIsNotNull() { + addCriterion("order_num is not null"); + return (Criteria) this; + } + + public Criteria andOrderNumEqualTo(Integer value) { + addCriterion("order_num =", value, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumNotEqualTo(Integer value) { + addCriterion("order_num <>", value, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumGreaterThan(Integer value) { + addCriterion("order_num >", value, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumGreaterThanOrEqualTo(Integer value) { + addCriterion("order_num >=", value, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumLessThan(Integer value) { + addCriterion("order_num <", value, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumLessThanOrEqualTo(Integer value) { + addCriterion("order_num <=", value, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumIn(List values) { + addCriterion("order_num in", values, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumNotIn(List values) { + addCriterion("order_num not in", values, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumBetween(Integer value1, Integer value2) { + addCriterion("order_num between", value1, value2, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumNotBetween(Integer value1, Integer value2) { + addCriterion("order_num not between", value1, value2, "orderNum"); + return (Criteria) this; + } + + public Criteria andTrialIsNull() { + addCriterion("trial is null"); + return (Criteria) this; + } + + public Criteria andTrialIsNotNull() { + addCriterion("trial is not null"); + return (Criteria) this; + } + + public Criteria andTrialEqualTo(Boolean value) { + addCriterion("trial =", value, "trial"); + return (Criteria) this; + } + + public Criteria andTrialNotEqualTo(Boolean value) { + addCriterion("trial <>", value, "trial"); + return (Criteria) this; + } + + public Criteria andTrialGreaterThan(Boolean value) { + addCriterion("trial >", value, "trial"); + return (Criteria) this; + } + + public Criteria andTrialGreaterThanOrEqualTo(Boolean value) { + addCriterion("trial >=", value, "trial"); + return (Criteria) this; + } + + public Criteria andTrialLessThan(Boolean value) { + addCriterion("trial <", value, "trial"); + return (Criteria) this; + } + + public Criteria andTrialLessThanOrEqualTo(Boolean value) { + addCriterion("trial <=", value, "trial"); + return (Criteria) this; + } + + public Criteria andTrialIn(List values) { + addCriterion("trial in", values, "trial"); + return (Criteria) this; + } + + public Criteria andTrialNotIn(List values) { + addCriterion("trial not in", values, "trial"); + return (Criteria) this; + } + + public Criteria andTrialBetween(Boolean value1, Boolean value2) { + addCriterion("trial between", value1, value2, "trial"); + return (Criteria) this; + } + + public Criteria andTrialNotBetween(Boolean value1, Boolean value2) { + addCriterion("trial not between", value1, value2, "trial"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/Map3dData.java b/src/main/java/club/joylink/rtss/entity/Map3dData.java new file mode 100644 index 000000000..0bdfa4212 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/Map3dData.java @@ -0,0 +1,42 @@ +package club.joylink.rtss.entity; + +import lombok.Data; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * @author + * + */ +@Data +public class Map3dData implements Serializable { + private Long id; + + /** + * 地图id + */ + private Long mapId; + + /** + * 创建人id + */ + private Long creatorId; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + /** + * 更新用户id + */ + private Long updateUserId; + + /** + * 更新时间 + */ + private LocalDateTime updateTime; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/Map3dDataExample.java b/src/main/java/club/joylink/rtss/entity/Map3dDataExample.java new file mode 100644 index 000000000..fb830cb92 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/Map3dDataExample.java @@ -0,0 +1,583 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class Map3dDataExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public Map3dDataExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNull() { + addCriterion("creator_id is null"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNotNull() { + addCriterion("creator_id is not null"); + return (Criteria) this; + } + + public Criteria andCreatorIdEqualTo(Long value) { + addCriterion("creator_id =", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotEqualTo(Long value) { + addCriterion("creator_id <>", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThan(Long value) { + addCriterion("creator_id >", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) { + addCriterion("creator_id >=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThan(Long value) { + addCriterion("creator_id <", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThanOrEqualTo(Long value) { + addCriterion("creator_id <=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdIn(List values) { + addCriterion("creator_id in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotIn(List values) { + addCriterion("creator_id not in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdBetween(Long value1, Long value2) { + addCriterion("creator_id between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotBetween(Long value1, Long value2) { + addCriterion("creator_id not between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(LocalDateTime value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(LocalDateTime value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(LocalDateTime value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(LocalDateTime value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdIsNull() { + addCriterion("update_user_id is null"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdIsNotNull() { + addCriterion("update_user_id is not null"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdEqualTo(Long value) { + addCriterion("update_user_id =", value, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdNotEqualTo(Long value) { + addCriterion("update_user_id <>", value, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdGreaterThan(Long value) { + addCriterion("update_user_id >", value, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("update_user_id >=", value, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdLessThan(Long value) { + addCriterion("update_user_id <", value, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdLessThanOrEqualTo(Long value) { + addCriterion("update_user_id <=", value, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdIn(List values) { + addCriterion("update_user_id in", values, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdNotIn(List values) { + addCriterion("update_user_id not in", values, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdBetween(Long value1, Long value2) { + addCriterion("update_user_id between", value1, value2, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdNotBetween(Long value1, Long value2) { + addCriterion("update_user_id not between", value1, value2, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(LocalDateTime value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(LocalDateTime value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(LocalDateTime value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(LocalDateTime value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/Map3dDataWithBLOBs.java b/src/main/java/club/joylink/rtss/entity/Map3dDataWithBLOBs.java new file mode 100644 index 000000000..f4783ec52 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/Map3dDataWithBLOBs.java @@ -0,0 +1,44 @@ +package club.joylink.rtss.entity; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author + * + */ +@Data +public class Map3dDataWithBLOBs extends Map3dData implements Serializable { + /** + * 加载的资源数据 + */ + private String assets; + + /** + * 区段数据 + */ + private String sections; + + /** + * 道岔数据 + */ + private String switchs; + + /** + * 信号机数据 + */ + private String signals; + + /** + * 站台数据 + */ + private String stands; + + /** + * 列车数据 + */ + private String trains; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/Map3dModel.java b/src/main/java/club/joylink/rtss/entity/Map3dModel.java new file mode 100644 index 000000000..030d6a6b3 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/Map3dModel.java @@ -0,0 +1,249 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * map_3d_model + * @author + */ +public class Map3dModel implements Serializable { + private Long id; + + /** + * 名称 + */ + private String name; + + /** + * 资源地址 + */ + private String url; + + /** + * 批量上传的文件的包名 + */ + private String packageName; + + /** + * 文件类型 + */ + private String fileType; + + /** + * 资源类型 + */ + private String resourceType; + + /** + * 设备类型 + */ + private String deviceType; + + /** + * 所属线路 + */ + private String line; + + /** + * 备注 + */ + private String remarks; + + /** + * 上传者id + */ + private Long uploaderId; + + /** + * 上传时间 + */ + private LocalDateTime uploadTime; + + /** + * 更新时间 + */ + private LocalDateTime updateTime; + + /** + * 有效无效 + */ + private String status; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public String getPackageName() { + return packageName; + } + + public void setPackageName(String packageName) { + this.packageName = packageName; + } + + public String getFileType() { + return fileType; + } + + public void setFileType(String fileType) { + this.fileType = fileType; + } + + public String getResourceType() { + return resourceType; + } + + public void setResourceType(String resourceType) { + this.resourceType = resourceType; + } + + public String getDeviceType() { + return deviceType; + } + + public void setDeviceType(String deviceType) { + this.deviceType = deviceType; + } + + public String getLine() { + return line; + } + + public void setLine(String line) { + this.line = line; + } + + public String getRemarks() { + return remarks; + } + + public void setRemarks(String remarks) { + this.remarks = remarks; + } + + public Long getUploaderId() { + return uploaderId; + } + + public void setUploaderId(Long uploaderId) { + this.uploaderId = uploaderId; + } + + public LocalDateTime getUploadTime() { + return uploadTime; + } + + public void setUploadTime(LocalDateTime uploadTime) { + this.uploadTime = uploadTime; + } + + public LocalDateTime getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(LocalDateTime updateTime) { + this.updateTime = updateTime; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + Map3dModel other = (Map3dModel) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getUrl() == null ? other.getUrl() == null : this.getUrl().equals(other.getUrl())) + && (this.getPackageName() == null ? other.getPackageName() == null : this.getPackageName().equals(other.getPackageName())) + && (this.getFileType() == null ? other.getFileType() == null : this.getFileType().equals(other.getFileType())) + && (this.getResourceType() == null ? other.getResourceType() == null : this.getResourceType().equals(other.getResourceType())) + && (this.getDeviceType() == null ? other.getDeviceType() == null : this.getDeviceType().equals(other.getDeviceType())) + && (this.getLine() == null ? other.getLine() == null : this.getLine().equals(other.getLine())) + && (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks())) + && (this.getUploaderId() == null ? other.getUploaderId() == null : this.getUploaderId().equals(other.getUploaderId())) + && (this.getUploadTime() == null ? other.getUploadTime() == null : this.getUploadTime().equals(other.getUploadTime())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getUrl() == null) ? 0 : getUrl().hashCode()); + result = prime * result + ((getPackageName() == null) ? 0 : getPackageName().hashCode()); + result = prime * result + ((getFileType() == null) ? 0 : getFileType().hashCode()); + result = prime * result + ((getResourceType() == null) ? 0 : getResourceType().hashCode()); + result = prime * result + ((getDeviceType() == null) ? 0 : getDeviceType().hashCode()); + result = prime * result + ((getLine() == null) ? 0 : getLine().hashCode()); + result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode()); + result = prime * result + ((getUploaderId() == null) ? 0 : getUploaderId().hashCode()); + result = prime * result + ((getUploadTime() == null) ? 0 : getUploadTime().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", name=").append(name); + sb.append(", url=").append(url); + sb.append(", packageName=").append(packageName); + sb.append(", fileType=").append(fileType); + sb.append(", resourceType=").append(resourceType); + sb.append(", deviceType=").append(deviceType); + sb.append(", line=").append(line); + sb.append(", remarks=").append(remarks); + sb.append(", uploaderId=").append(uploaderId); + sb.append(", uploadTime=").append(uploadTime); + sb.append(", updateTime=").append(updateTime); + sb.append(", status=").append(status); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/Map3dModelExample.java b/src/main/java/club/joylink/rtss/entity/Map3dModelExample.java new file mode 100644 index 000000000..9747fdecc --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/Map3dModelExample.java @@ -0,0 +1,1093 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class Map3dModelExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public Map3dModelExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andUrlIsNull() { + addCriterion("url is null"); + return (Criteria) this; + } + + public Criteria andUrlIsNotNull() { + addCriterion("url is not null"); + return (Criteria) this; + } + + public Criteria andUrlEqualTo(String value) { + addCriterion("url =", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlNotEqualTo(String value) { + addCriterion("url <>", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlGreaterThan(String value) { + addCriterion("url >", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlGreaterThanOrEqualTo(String value) { + addCriterion("url >=", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlLessThan(String value) { + addCriterion("url <", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlLessThanOrEqualTo(String value) { + addCriterion("url <=", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlLike(String value) { + addCriterion("url like", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlNotLike(String value) { + addCriterion("url not like", value, "url"); + return (Criteria) this; + } + + public Criteria andUrlIn(List values) { + addCriterion("url in", values, "url"); + return (Criteria) this; + } + + public Criteria andUrlNotIn(List values) { + addCriterion("url not in", values, "url"); + return (Criteria) this; + } + + public Criteria andUrlBetween(String value1, String value2) { + addCriterion("url between", value1, value2, "url"); + return (Criteria) this; + } + + public Criteria andUrlNotBetween(String value1, String value2) { + addCriterion("url not between", value1, value2, "url"); + return (Criteria) this; + } + + public Criteria andPackageNameIsNull() { + addCriterion("package_name is null"); + return (Criteria) this; + } + + public Criteria andPackageNameIsNotNull() { + addCriterion("package_name is not null"); + return (Criteria) this; + } + + public Criteria andPackageNameEqualTo(String value) { + addCriterion("package_name =", value, "packageName"); + return (Criteria) this; + } + + public Criteria andPackageNameNotEqualTo(String value) { + addCriterion("package_name <>", value, "packageName"); + return (Criteria) this; + } + + public Criteria andPackageNameGreaterThan(String value) { + addCriterion("package_name >", value, "packageName"); + return (Criteria) this; + } + + public Criteria andPackageNameGreaterThanOrEqualTo(String value) { + addCriterion("package_name >=", value, "packageName"); + return (Criteria) this; + } + + public Criteria andPackageNameLessThan(String value) { + addCriterion("package_name <", value, "packageName"); + return (Criteria) this; + } + + public Criteria andPackageNameLessThanOrEqualTo(String value) { + addCriterion("package_name <=", value, "packageName"); + return (Criteria) this; + } + + public Criteria andPackageNameLike(String value) { + addCriterion("package_name like", value, "packageName"); + return (Criteria) this; + } + + public Criteria andPackageNameNotLike(String value) { + addCriterion("package_name not like", value, "packageName"); + return (Criteria) this; + } + + public Criteria andPackageNameIn(List values) { + addCriterion("package_name in", values, "packageName"); + return (Criteria) this; + } + + public Criteria andPackageNameNotIn(List values) { + addCriterion("package_name not in", values, "packageName"); + return (Criteria) this; + } + + public Criteria andPackageNameBetween(String value1, String value2) { + addCriterion("package_name between", value1, value2, "packageName"); + return (Criteria) this; + } + + public Criteria andPackageNameNotBetween(String value1, String value2) { + addCriterion("package_name not between", value1, value2, "packageName"); + return (Criteria) this; + } + + public Criteria andFileTypeIsNull() { + addCriterion("file_type is null"); + return (Criteria) this; + } + + public Criteria andFileTypeIsNotNull() { + addCriterion("file_type is not null"); + return (Criteria) this; + } + + public Criteria andFileTypeEqualTo(String value) { + addCriterion("file_type =", value, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeNotEqualTo(String value) { + addCriterion("file_type <>", value, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeGreaterThan(String value) { + addCriterion("file_type >", value, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeGreaterThanOrEqualTo(String value) { + addCriterion("file_type >=", value, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeLessThan(String value) { + addCriterion("file_type <", value, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeLessThanOrEqualTo(String value) { + addCriterion("file_type <=", value, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeLike(String value) { + addCriterion("file_type like", value, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeNotLike(String value) { + addCriterion("file_type not like", value, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeIn(List values) { + addCriterion("file_type in", values, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeNotIn(List values) { + addCriterion("file_type not in", values, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeBetween(String value1, String value2) { + addCriterion("file_type between", value1, value2, "fileType"); + return (Criteria) this; + } + + public Criteria andFileTypeNotBetween(String value1, String value2) { + addCriterion("file_type not between", value1, value2, "fileType"); + return (Criteria) this; + } + + public Criteria andResourceTypeIsNull() { + addCriterion("resource_type is null"); + return (Criteria) this; + } + + public Criteria andResourceTypeIsNotNull() { + addCriterion("resource_type is not null"); + return (Criteria) this; + } + + public Criteria andResourceTypeEqualTo(String value) { + addCriterion("resource_type =", value, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeNotEqualTo(String value) { + addCriterion("resource_type <>", value, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeGreaterThan(String value) { + addCriterion("resource_type >", value, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeGreaterThanOrEqualTo(String value) { + addCriterion("resource_type >=", value, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeLessThan(String value) { + addCriterion("resource_type <", value, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeLessThanOrEqualTo(String value) { + addCriterion("resource_type <=", value, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeLike(String value) { + addCriterion("resource_type like", value, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeNotLike(String value) { + addCriterion("resource_type not like", value, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeIn(List values) { + addCriterion("resource_type in", values, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeNotIn(List values) { + addCriterion("resource_type not in", values, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeBetween(String value1, String value2) { + addCriterion("resource_type between", value1, value2, "resourceType"); + return (Criteria) this; + } + + public Criteria andResourceTypeNotBetween(String value1, String value2) { + addCriterion("resource_type not between", value1, value2, "resourceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeIsNull() { + addCriterion("device_type is null"); + return (Criteria) this; + } + + public Criteria andDeviceTypeIsNotNull() { + addCriterion("device_type is not null"); + return (Criteria) this; + } + + public Criteria andDeviceTypeEqualTo(String value) { + addCriterion("device_type =", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeNotEqualTo(String value) { + addCriterion("device_type <>", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeGreaterThan(String value) { + addCriterion("device_type >", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeGreaterThanOrEqualTo(String value) { + addCriterion("device_type >=", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeLessThan(String value) { + addCriterion("device_type <", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeLessThanOrEqualTo(String value) { + addCriterion("device_type <=", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeLike(String value) { + addCriterion("device_type like", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeNotLike(String value) { + addCriterion("device_type not like", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeIn(List values) { + addCriterion("device_type in", values, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeNotIn(List values) { + addCriterion("device_type not in", values, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeBetween(String value1, String value2) { + addCriterion("device_type between", value1, value2, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeNotBetween(String value1, String value2) { + addCriterion("device_type not between", value1, value2, "deviceType"); + return (Criteria) this; + } + + public Criteria andLineIsNull() { + addCriterion("line is null"); + return (Criteria) this; + } + + public Criteria andLineIsNotNull() { + addCriterion("line is not null"); + return (Criteria) this; + } + + public Criteria andLineEqualTo(String value) { + addCriterion("line =", value, "line"); + return (Criteria) this; + } + + public Criteria andLineNotEqualTo(String value) { + addCriterion("line <>", value, "line"); + return (Criteria) this; + } + + public Criteria andLineGreaterThan(String value) { + addCriterion("line >", value, "line"); + return (Criteria) this; + } + + public Criteria andLineGreaterThanOrEqualTo(String value) { + addCriterion("line >=", value, "line"); + return (Criteria) this; + } + + public Criteria andLineLessThan(String value) { + addCriterion("line <", value, "line"); + return (Criteria) this; + } + + public Criteria andLineLessThanOrEqualTo(String value) { + addCriterion("line <=", value, "line"); + return (Criteria) this; + } + + public Criteria andLineLike(String value) { + addCriterion("line like", value, "line"); + return (Criteria) this; + } + + public Criteria andLineNotLike(String value) { + addCriterion("line not like", value, "line"); + return (Criteria) this; + } + + public Criteria andLineIn(List values) { + addCriterion("line in", values, "line"); + return (Criteria) this; + } + + public Criteria andLineNotIn(List values) { + addCriterion("line not in", values, "line"); + return (Criteria) this; + } + + public Criteria andLineBetween(String value1, String value2) { + addCriterion("line between", value1, value2, "line"); + return (Criteria) this; + } + + public Criteria andLineNotBetween(String value1, String value2) { + addCriterion("line not between", value1, value2, "line"); + return (Criteria) this; + } + + public Criteria andRemarksIsNull() { + addCriterion("remarks is null"); + return (Criteria) this; + } + + public Criteria andRemarksIsNotNull() { + addCriterion("remarks is not null"); + return (Criteria) this; + } + + public Criteria andRemarksEqualTo(String value) { + addCriterion("remarks =", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotEqualTo(String value) { + addCriterion("remarks <>", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksGreaterThan(String value) { + addCriterion("remarks >", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksGreaterThanOrEqualTo(String value) { + addCriterion("remarks >=", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLessThan(String value) { + addCriterion("remarks <", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLessThanOrEqualTo(String value) { + addCriterion("remarks <=", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLike(String value) { + addCriterion("remarks like", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotLike(String value) { + addCriterion("remarks not like", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksIn(List values) { + addCriterion("remarks in", values, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotIn(List values) { + addCriterion("remarks not in", values, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksBetween(String value1, String value2) { + addCriterion("remarks between", value1, value2, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotBetween(String value1, String value2) { + addCriterion("remarks not between", value1, value2, "remarks"); + return (Criteria) this; + } + + public Criteria andUploaderIdIsNull() { + addCriterion("uploader_id is null"); + return (Criteria) this; + } + + public Criteria andUploaderIdIsNotNull() { + addCriterion("uploader_id is not null"); + return (Criteria) this; + } + + public Criteria andUploaderIdEqualTo(Long value) { + addCriterion("uploader_id =", value, "uploaderId"); + return (Criteria) this; + } + + public Criteria andUploaderIdNotEqualTo(Long value) { + addCriterion("uploader_id <>", value, "uploaderId"); + return (Criteria) this; + } + + public Criteria andUploaderIdGreaterThan(Long value) { + addCriterion("uploader_id >", value, "uploaderId"); + return (Criteria) this; + } + + public Criteria andUploaderIdGreaterThanOrEqualTo(Long value) { + addCriterion("uploader_id >=", value, "uploaderId"); + return (Criteria) this; + } + + public Criteria andUploaderIdLessThan(Long value) { + addCriterion("uploader_id <", value, "uploaderId"); + return (Criteria) this; + } + + public Criteria andUploaderIdLessThanOrEqualTo(Long value) { + addCriterion("uploader_id <=", value, "uploaderId"); + return (Criteria) this; + } + + public Criteria andUploaderIdIn(List values) { + addCriterion("uploader_id in", values, "uploaderId"); + return (Criteria) this; + } + + public Criteria andUploaderIdNotIn(List values) { + addCriterion("uploader_id not in", values, "uploaderId"); + return (Criteria) this; + } + + public Criteria andUploaderIdBetween(Long value1, Long value2) { + addCriterion("uploader_id between", value1, value2, "uploaderId"); + return (Criteria) this; + } + + public Criteria andUploaderIdNotBetween(Long value1, Long value2) { + addCriterion("uploader_id not between", value1, value2, "uploaderId"); + return (Criteria) this; + } + + public Criteria andUploadTimeIsNull() { + addCriterion("upload_time is null"); + return (Criteria) this; + } + + public Criteria andUploadTimeIsNotNull() { + addCriterion("upload_time is not null"); + return (Criteria) this; + } + + public Criteria andUploadTimeEqualTo(LocalDateTime value) { + addCriterion("upload_time =", value, "uploadTime"); + return (Criteria) this; + } + + public Criteria andUploadTimeNotEqualTo(LocalDateTime value) { + addCriterion("upload_time <>", value, "uploadTime"); + return (Criteria) this; + } + + public Criteria andUploadTimeGreaterThan(LocalDateTime value) { + addCriterion("upload_time >", value, "uploadTime"); + return (Criteria) this; + } + + public Criteria andUploadTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("upload_time >=", value, "uploadTime"); + return (Criteria) this; + } + + public Criteria andUploadTimeLessThan(LocalDateTime value) { + addCriterion("upload_time <", value, "uploadTime"); + return (Criteria) this; + } + + public Criteria andUploadTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("upload_time <=", value, "uploadTime"); + return (Criteria) this; + } + + public Criteria andUploadTimeIn(List values) { + addCriterion("upload_time in", values, "uploadTime"); + return (Criteria) this; + } + + public Criteria andUploadTimeNotIn(List values) { + addCriterion("upload_time not in", values, "uploadTime"); + return (Criteria) this; + } + + public Criteria andUploadTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("upload_time between", value1, value2, "uploadTime"); + return (Criteria) this; + } + + public Criteria andUploadTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("upload_time not between", value1, value2, "uploadTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(LocalDateTime value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(LocalDateTime value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(LocalDateTime value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(LocalDateTime value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/MapData.java b/src/main/java/club/joylink/rtss/entity/MapData.java new file mode 100644 index 000000000..08533a583 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/MapData.java @@ -0,0 +1,72 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * map_data + * @author + */ +public class MapData implements Serializable { + private Long id; + + /** + * 地图id + */ + private Long mapId; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getMapId() { + return mapId; + } + + public void setMapId(Long mapId) { + this.mapId = mapId; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + MapData other = (MapData) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", mapId=").append(mapId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/MapDataExample.java b/src/main/java/club/joylink/rtss/entity/MapDataExample.java new file mode 100644 index 000000000..cfb3eeb2d --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/MapDataExample.java @@ -0,0 +1,342 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class MapDataExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public MapDataExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/MapDataWithBLOBs.java b/src/main/java/club/joylink/rtss/entity/MapDataWithBLOBs.java new file mode 100644 index 000000000..60e4129d6 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/MapDataWithBLOBs.java @@ -0,0 +1,79 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * map_data + * @author + */ +public class MapDataWithBLOBs extends MapData implements Serializable { + /** + * 图形数据 + */ + private String graphData; + + /** + * 逻辑数据 + */ + private String logicData; + + private static final long serialVersionUID = 1L; + + public String getGraphData() { + return graphData; + } + + public void setGraphData(String graphData) { + this.graphData = graphData; + } + + public String getLogicData() { + return logicData; + } + + public void setLogicData(String logicData) { + this.logicData = logicData; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + MapDataWithBLOBs other = (MapDataWithBLOBs) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getGraphData() == null ? other.getGraphData() == null : this.getGraphData().equals(other.getGraphData())) + && (this.getLogicData() == null ? other.getLogicData() == null : this.getLogicData().equals(other.getLogicData())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getGraphData() == null) ? 0 : getGraphData().hashCode()); + result = prime * result + ((getLogicData() == null) ? 0 : getLogicData().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", graphData=").append(graphData); + sb.append(", logicData=").append(logicData); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/MapInfo.java b/src/main/java/club/joylink/rtss/entity/MapInfo.java new file mode 100644 index 000000000..1c4527871 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/MapInfo.java @@ -0,0 +1,184 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * map_info + * @author + */ +public class MapInfo implements Serializable { + private Long id; + + /** + * 地图名称 + */ + private String name; + + /** + * 线路编码 + */ + private String lineCode; + + /** + * 所属城市编号:数据字典值 + */ + private String cityCode; + + /** + * 状态:上线/下线 + */ + private String status; + + /** + * 是否项目线路 + */ + private Boolean project; + + /** + * 所属项目唯一编号 + */ + private String projectCode; + + /** + * 绘制方式-0原有;1新 + */ + private Boolean drawWay; + + /** + * 序号 + */ + private Integer orderNumber; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getLineCode() { + return lineCode; + } + + public void setLineCode(String lineCode) { + this.lineCode = lineCode; + } + + public String getCityCode() { + return cityCode; + } + + public void setCityCode(String cityCode) { + this.cityCode = cityCode; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public Boolean getProject() { + return project; + } + + public void setProject(Boolean project) { + this.project = project; + } + + public String getProjectCode() { + return projectCode; + } + + public void setProjectCode(String projectCode) { + this.projectCode = projectCode; + } + + public Boolean getDrawWay() { + return drawWay; + } + + public void setDrawWay(Boolean drawWay) { + this.drawWay = drawWay; + } + + public Integer getOrderNumber() { + return orderNumber; + } + + public void setOrderNumber(Integer orderNumber) { + this.orderNumber = orderNumber; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + MapInfo other = (MapInfo) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getLineCode() == null ? other.getLineCode() == null : this.getLineCode().equals(other.getLineCode())) + && (this.getCityCode() == null ? other.getCityCode() == null : this.getCityCode().equals(other.getCityCode())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getProject() == null ? other.getProject() == null : this.getProject().equals(other.getProject())) + && (this.getProjectCode() == null ? other.getProjectCode() == null : this.getProjectCode().equals(other.getProjectCode())) + && (this.getDrawWay() == null ? other.getDrawWay() == null : this.getDrawWay().equals(other.getDrawWay())) + && (this.getOrderNumber() == null ? other.getOrderNumber() == null : this.getOrderNumber().equals(other.getOrderNumber())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getLineCode() == null) ? 0 : getLineCode().hashCode()); + result = prime * result + ((getCityCode() == null) ? 0 : getCityCode().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getProject() == null) ? 0 : getProject().hashCode()); + result = prime * result + ((getProjectCode() == null) ? 0 : getProjectCode().hashCode()); + result = prime * result + ((getDrawWay() == null) ? 0 : getDrawWay().hashCode()); + result = prime * result + ((getOrderNumber() == null) ? 0 : getOrderNumber().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", name=").append(name); + sb.append(", lineCode=").append(lineCode); + sb.append(", cityCode=").append(cityCode); + sb.append(", status=").append(status); + sb.append(", project=").append(project); + sb.append(", projectCode=").append(projectCode); + sb.append(", drawWay=").append(drawWay); + sb.append(", orderNumber=").append(orderNumber); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/MapInfoExample.java b/src/main/java/club/joylink/rtss/entity/MapInfoExample.java new file mode 100644 index 000000000..cf4fe9167 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/MapInfoExample.java @@ -0,0 +1,812 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class MapInfoExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public MapInfoExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andLineCodeIsNull() { + addCriterion("line_code is null"); + return (Criteria) this; + } + + public Criteria andLineCodeIsNotNull() { + addCriterion("line_code is not null"); + return (Criteria) this; + } + + public Criteria andLineCodeEqualTo(String value) { + addCriterion("line_code =", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeNotEqualTo(String value) { + addCriterion("line_code <>", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeGreaterThan(String value) { + addCriterion("line_code >", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeGreaterThanOrEqualTo(String value) { + addCriterion("line_code >=", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeLessThan(String value) { + addCriterion("line_code <", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeLessThanOrEqualTo(String value) { + addCriterion("line_code <=", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeLike(String value) { + addCriterion("line_code like", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeNotLike(String value) { + addCriterion("line_code not like", value, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeIn(List values) { + addCriterion("line_code in", values, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeNotIn(List values) { + addCriterion("line_code not in", values, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeBetween(String value1, String value2) { + addCriterion("line_code between", value1, value2, "lineCode"); + return (Criteria) this; + } + + public Criteria andLineCodeNotBetween(String value1, String value2) { + addCriterion("line_code not between", value1, value2, "lineCode"); + return (Criteria) this; + } + + public Criteria andCityCodeIsNull() { + addCriterion("city_code is null"); + return (Criteria) this; + } + + public Criteria andCityCodeIsNotNull() { + addCriterion("city_code is not null"); + return (Criteria) this; + } + + public Criteria andCityCodeEqualTo(String value) { + addCriterion("city_code =", value, "cityCode"); + return (Criteria) this; + } + + public Criteria andCityCodeNotEqualTo(String value) { + addCriterion("city_code <>", value, "cityCode"); + return (Criteria) this; + } + + public Criteria andCityCodeGreaterThan(String value) { + addCriterion("city_code >", value, "cityCode"); + return (Criteria) this; + } + + public Criteria andCityCodeGreaterThanOrEqualTo(String value) { + addCriterion("city_code >=", value, "cityCode"); + return (Criteria) this; + } + + public Criteria andCityCodeLessThan(String value) { + addCriterion("city_code <", value, "cityCode"); + return (Criteria) this; + } + + public Criteria andCityCodeLessThanOrEqualTo(String value) { + addCriterion("city_code <=", value, "cityCode"); + return (Criteria) this; + } + + public Criteria andCityCodeLike(String value) { + addCriterion("city_code like", value, "cityCode"); + return (Criteria) this; + } + + public Criteria andCityCodeNotLike(String value) { + addCriterion("city_code not like", value, "cityCode"); + return (Criteria) this; + } + + public Criteria andCityCodeIn(List values) { + addCriterion("city_code in", values, "cityCode"); + return (Criteria) this; + } + + public Criteria andCityCodeNotIn(List values) { + addCriterion("city_code not in", values, "cityCode"); + return (Criteria) this; + } + + public Criteria andCityCodeBetween(String value1, String value2) { + addCriterion("city_code between", value1, value2, "cityCode"); + return (Criteria) this; + } + + public Criteria andCityCodeNotBetween(String value1, String value2) { + addCriterion("city_code not between", value1, value2, "cityCode"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andProjectIsNull() { + addCriterion("project is null"); + return (Criteria) this; + } + + public Criteria andProjectIsNotNull() { + addCriterion("project is not null"); + return (Criteria) this; + } + + public Criteria andProjectEqualTo(Boolean value) { + addCriterion("project =", value, "project"); + return (Criteria) this; + } + + public Criteria andProjectNotEqualTo(Boolean value) { + addCriterion("project <>", value, "project"); + return (Criteria) this; + } + + public Criteria andProjectGreaterThan(Boolean value) { + addCriterion("project >", value, "project"); + return (Criteria) this; + } + + public Criteria andProjectGreaterThanOrEqualTo(Boolean value) { + addCriterion("project >=", value, "project"); + return (Criteria) this; + } + + public Criteria andProjectLessThan(Boolean value) { + addCriterion("project <", value, "project"); + return (Criteria) this; + } + + public Criteria andProjectLessThanOrEqualTo(Boolean value) { + addCriterion("project <=", value, "project"); + return (Criteria) this; + } + + public Criteria andProjectIn(List values) { + addCriterion("project in", values, "project"); + return (Criteria) this; + } + + public Criteria andProjectNotIn(List values) { + addCriterion("project not in", values, "project"); + return (Criteria) this; + } + + public Criteria andProjectBetween(Boolean value1, Boolean value2) { + addCriterion("project between", value1, value2, "project"); + return (Criteria) this; + } + + public Criteria andProjectNotBetween(Boolean value1, Boolean value2) { + addCriterion("project not between", value1, value2, "project"); + return (Criteria) this; + } + + public Criteria andProjectCodeIsNull() { + addCriterion("project_code is null"); + return (Criteria) this; + } + + public Criteria andProjectCodeIsNotNull() { + addCriterion("project_code is not null"); + return (Criteria) this; + } + + public Criteria andProjectCodeEqualTo(String value) { + addCriterion("project_code =", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeNotEqualTo(String value) { + addCriterion("project_code <>", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeGreaterThan(String value) { + addCriterion("project_code >", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeGreaterThanOrEqualTo(String value) { + addCriterion("project_code >=", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeLessThan(String value) { + addCriterion("project_code <", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeLessThanOrEqualTo(String value) { + addCriterion("project_code <=", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeLike(String value) { + addCriterion("project_code like", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeNotLike(String value) { + addCriterion("project_code not like", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeIn(List values) { + addCriterion("project_code in", values, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeNotIn(List values) { + addCriterion("project_code not in", values, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeBetween(String value1, String value2) { + addCriterion("project_code between", value1, value2, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeNotBetween(String value1, String value2) { + addCriterion("project_code not between", value1, value2, "projectCode"); + return (Criteria) this; + } + + public Criteria andDrawWayIsNull() { + addCriterion("draw_way is null"); + return (Criteria) this; + } + + public Criteria andDrawWayIsNotNull() { + addCriterion("draw_way is not null"); + return (Criteria) this; + } + + public Criteria andDrawWayEqualTo(Boolean value) { + addCriterion("draw_way =", value, "drawWay"); + return (Criteria) this; + } + + public Criteria andDrawWayNotEqualTo(Boolean value) { + addCriterion("draw_way <>", value, "drawWay"); + return (Criteria) this; + } + + public Criteria andDrawWayGreaterThan(Boolean value) { + addCriterion("draw_way >", value, "drawWay"); + return (Criteria) this; + } + + public Criteria andDrawWayGreaterThanOrEqualTo(Boolean value) { + addCriterion("draw_way >=", value, "drawWay"); + return (Criteria) this; + } + + public Criteria andDrawWayLessThan(Boolean value) { + addCriterion("draw_way <", value, "drawWay"); + return (Criteria) this; + } + + public Criteria andDrawWayLessThanOrEqualTo(Boolean value) { + addCriterion("draw_way <=", value, "drawWay"); + return (Criteria) this; + } + + public Criteria andDrawWayIn(List values) { + addCriterion("draw_way in", values, "drawWay"); + return (Criteria) this; + } + + public Criteria andDrawWayNotIn(List values) { + addCriterion("draw_way not in", values, "drawWay"); + return (Criteria) this; + } + + public Criteria andDrawWayBetween(Boolean value1, Boolean value2) { + addCriterion("draw_way between", value1, value2, "drawWay"); + return (Criteria) this; + } + + public Criteria andDrawWayNotBetween(Boolean value1, Boolean value2) { + addCriterion("draw_way not between", value1, value2, "drawWay"); + return (Criteria) this; + } + + public Criteria andOrderNumberIsNull() { + addCriterion("order_number is null"); + return (Criteria) this; + } + + public Criteria andOrderNumberIsNotNull() { + addCriterion("order_number is not null"); + return (Criteria) this; + } + + public Criteria andOrderNumberEqualTo(Integer value) { + addCriterion("order_number =", value, "orderNumber"); + return (Criteria) this; + } + + public Criteria andOrderNumberNotEqualTo(Integer value) { + addCriterion("order_number <>", value, "orderNumber"); + return (Criteria) this; + } + + public Criteria andOrderNumberGreaterThan(Integer value) { + addCriterion("order_number >", value, "orderNumber"); + return (Criteria) this; + } + + public Criteria andOrderNumberGreaterThanOrEqualTo(Integer value) { + addCriterion("order_number >=", value, "orderNumber"); + return (Criteria) this; + } + + public Criteria andOrderNumberLessThan(Integer value) { + addCriterion("order_number <", value, "orderNumber"); + return (Criteria) this; + } + + public Criteria andOrderNumberLessThanOrEqualTo(Integer value) { + addCriterion("order_number <=", value, "orderNumber"); + return (Criteria) this; + } + + public Criteria andOrderNumberIn(List values) { + addCriterion("order_number in", values, "orderNumber"); + return (Criteria) this; + } + + public Criteria andOrderNumberNotIn(List values) { + addCriterion("order_number not in", values, "orderNumber"); + return (Criteria) this; + } + + public Criteria andOrderNumberBetween(Integer value1, Integer value2) { + addCriterion("order_number between", value1, value2, "orderNumber"); + return (Criteria) this; + } + + public Criteria andOrderNumberNotBetween(Integer value1, Integer value2) { + addCriterion("order_number not between", value1, value2, "orderNumber"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/MapPassengerFlow.java b/src/main/java/club/joylink/rtss/entity/MapPassengerFlow.java new file mode 100644 index 000000000..e35934ba7 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/MapPassengerFlow.java @@ -0,0 +1,21 @@ +package club.joylink.rtss.entity; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author + * + */ +@Data +public class MapPassengerFlow implements Serializable { + private Long id; + + /** + * 地图id + */ + private Long mapId; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/MapPassengerFlowExample.java b/src/main/java/club/joylink/rtss/entity/MapPassengerFlowExample.java new file mode 100644 index 000000000..3a706b020 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/MapPassengerFlowExample.java @@ -0,0 +1,342 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class MapPassengerFlowExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public MapPassengerFlowExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/MapPassengerFlowWithBLOBs.java b/src/main/java/club/joylink/rtss/entity/MapPassengerFlowWithBLOBs.java new file mode 100644 index 000000000..ca21aa171 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/MapPassengerFlowWithBLOBs.java @@ -0,0 +1,24 @@ +package club.joylink.rtss.entity; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author + * + */ +@Data +public class MapPassengerFlowWithBLOBs extends MapPassengerFlow implements Serializable { + /** + * 站台客流数据 + */ + private String standPf; + + /** + * 车次客流数据 + */ + private String tripPf; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/MapSystem.java b/src/main/java/club/joylink/rtss/entity/MapSystem.java new file mode 100644 index 000000000..6122fd162 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/MapSystem.java @@ -0,0 +1,152 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * map_system + * @author + */ +public class MapSystem implements Serializable { + private Long id; + + /** + * 地图系统名称 + */ + private String name; + + /** + * 系统类型:课程/考试/仿真 + */ + private String type; + + /** + * 所属发布地图id + */ + private Long mapId; + + /** + * 产品类型 + */ + private String prdType; + + /** + * 定制化 + */ + private String customized; + + /** + * 状态 + */ + private String status; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Long getMapId() { + return mapId; + } + + public void setMapId(Long mapId) { + this.mapId = mapId; + } + + public String getPrdType() { + return prdType; + } + + public void setPrdType(String prdType) { + this.prdType = prdType; + } + + public String getCustomized() { + return customized; + } + + public void setCustomized(String customized) { + this.customized = customized; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + MapSystem other = (MapSystem) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getPrdType() == null ? other.getPrdType() == null : this.getPrdType().equals(other.getPrdType())) + && (this.getCustomized() == null ? other.getCustomized() == null : this.getCustomized().equals(other.getCustomized())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getPrdType() == null) ? 0 : getPrdType().hashCode()); + result = prime * result + ((getCustomized() == null) ? 0 : getCustomized().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", name=").append(name); + sb.append(", type=").append(type); + sb.append(", mapId=").append(mapId); + sb.append(", prdType=").append(prdType); + sb.append(", customized=").append(customized); + sb.append(", status=").append(status); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/MapSystemExample.java b/src/main/java/club/joylink/rtss/entity/MapSystemExample.java new file mode 100644 index 000000000..3c855132e --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/MapSystemExample.java @@ -0,0 +1,692 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class MapSystemExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public MapSystemExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("`type` is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("`type` is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(String value) { + addCriterion("`type` =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(String value) { + addCriterion("`type` <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(String value) { + addCriterion("`type` >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(String value) { + addCriterion("`type` >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(String value) { + addCriterion("`type` <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(String value) { + addCriterion("`type` <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLike(String value) { + addCriterion("`type` like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotLike(String value) { + addCriterion("`type` not like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("`type` in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("`type` not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(String value1, String value2) { + addCriterion("`type` between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(String value1, String value2) { + addCriterion("`type` not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andPrdTypeIsNull() { + addCriterion("prd_type is null"); + return (Criteria) this; + } + + public Criteria andPrdTypeIsNotNull() { + addCriterion("prd_type is not null"); + return (Criteria) this; + } + + public Criteria andPrdTypeEqualTo(String value) { + addCriterion("prd_type =", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotEqualTo(String value) { + addCriterion("prd_type <>", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeGreaterThan(String value) { + addCriterion("prd_type >", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeGreaterThanOrEqualTo(String value) { + addCriterion("prd_type >=", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeLessThan(String value) { + addCriterion("prd_type <", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeLessThanOrEqualTo(String value) { + addCriterion("prd_type <=", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeLike(String value) { + addCriterion("prd_type like", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotLike(String value) { + addCriterion("prd_type not like", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeIn(List values) { + addCriterion("prd_type in", values, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotIn(List values) { + addCriterion("prd_type not in", values, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeBetween(String value1, String value2) { + addCriterion("prd_type between", value1, value2, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotBetween(String value1, String value2) { + addCriterion("prd_type not between", value1, value2, "prdType"); + return (Criteria) this; + } + + public Criteria andCustomizedIsNull() { + addCriterion("customized is null"); + return (Criteria) this; + } + + public Criteria andCustomizedIsNotNull() { + addCriterion("customized is not null"); + return (Criteria) this; + } + + public Criteria andCustomizedEqualTo(String value) { + addCriterion("customized =", value, "customized"); + return (Criteria) this; + } + + public Criteria andCustomizedNotEqualTo(String value) { + addCriterion("customized <>", value, "customized"); + return (Criteria) this; + } + + public Criteria andCustomizedGreaterThan(String value) { + addCriterion("customized >", value, "customized"); + return (Criteria) this; + } + + public Criteria andCustomizedGreaterThanOrEqualTo(String value) { + addCriterion("customized >=", value, "customized"); + return (Criteria) this; + } + + public Criteria andCustomizedLessThan(String value) { + addCriterion("customized <", value, "customized"); + return (Criteria) this; + } + + public Criteria andCustomizedLessThanOrEqualTo(String value) { + addCriterion("customized <=", value, "customized"); + return (Criteria) this; + } + + public Criteria andCustomizedLike(String value) { + addCriterion("customized like", value, "customized"); + return (Criteria) this; + } + + public Criteria andCustomizedNotLike(String value) { + addCriterion("customized not like", value, "customized"); + return (Criteria) this; + } + + public Criteria andCustomizedIn(List values) { + addCriterion("customized in", values, "customized"); + return (Criteria) this; + } + + public Criteria andCustomizedNotIn(List values) { + addCriterion("customized not in", values, "customized"); + return (Criteria) this; + } + + public Criteria andCustomizedBetween(String value1, String value2) { + addCriterion("customized between", value1, value2, "customized"); + return (Criteria) this; + } + + public Criteria andCustomizedNotBetween(String value1, String value2) { + addCriterion("customized not between", value1, value2, "customized"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/MapVersion.java b/src/main/java/club/joylink/rtss/entity/MapVersion.java new file mode 100644 index 000000000..792780bdb --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/MapVersion.java @@ -0,0 +1,121 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * map_version + * @author + */ +public class MapVersion implements Serializable { + private Long id; + + /** + * 版本号 + */ + private String version; + + /** + * 更新时间 + */ + private LocalDateTime updateTime; + + /** + * 作者ID + */ + private Long authorId; + + /** + * 地图id + */ + private Long mapId; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + public LocalDateTime getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(LocalDateTime updateTime) { + this.updateTime = updateTime; + } + + public Long getAuthorId() { + return authorId; + } + + public void setAuthorId(Long authorId) { + this.authorId = authorId; + } + + public Long getMapId() { + return mapId; + } + + public void setMapId(Long mapId) { + this.mapId = mapId; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + MapVersion other = (MapVersion) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getVersion() == null ? other.getVersion() == null : this.getVersion().equals(other.getVersion())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) + && (this.getAuthorId() == null ? other.getAuthorId() == null : this.getAuthorId().equals(other.getAuthorId())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getVersion() == null) ? 0 : getVersion().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + result = prime * result + ((getAuthorId() == null) ? 0 : getAuthorId().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", version=").append(version); + sb.append(", updateTime=").append(updateTime); + sb.append(", authorId=").append(authorId); + sb.append(", mapId=").append(mapId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/MapVersionExample.java b/src/main/java/club/joylink/rtss/entity/MapVersionExample.java new file mode 100644 index 000000000..9c0a5a964 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/MapVersionExample.java @@ -0,0 +1,533 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class MapVersionExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public MapVersionExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andVersionIsNull() { + addCriterion("version is null"); + return (Criteria) this; + } + + public Criteria andVersionIsNotNull() { + addCriterion("version is not null"); + return (Criteria) this; + } + + public Criteria andVersionEqualTo(String value) { + addCriterion("version =", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionNotEqualTo(String value) { + addCriterion("version <>", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionGreaterThan(String value) { + addCriterion("version >", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionGreaterThanOrEqualTo(String value) { + addCriterion("version >=", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionLessThan(String value) { + addCriterion("version <", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionLessThanOrEqualTo(String value) { + addCriterion("version <=", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionLike(String value) { + addCriterion("version like", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionNotLike(String value) { + addCriterion("version not like", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionIn(List values) { + addCriterion("version in", values, "version"); + return (Criteria) this; + } + + public Criteria andVersionNotIn(List values) { + addCriterion("version not in", values, "version"); + return (Criteria) this; + } + + public Criteria andVersionBetween(String value1, String value2) { + addCriterion("version between", value1, value2, "version"); + return (Criteria) this; + } + + public Criteria andVersionNotBetween(String value1, String value2) { + addCriterion("version not between", value1, value2, "version"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(LocalDateTime value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(LocalDateTime value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(LocalDateTime value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(LocalDateTime value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andAuthorIdIsNull() { + addCriterion("author_id is null"); + return (Criteria) this; + } + + public Criteria andAuthorIdIsNotNull() { + addCriterion("author_id is not null"); + return (Criteria) this; + } + + public Criteria andAuthorIdEqualTo(Long value) { + addCriterion("author_id =", value, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdNotEqualTo(Long value) { + addCriterion("author_id <>", value, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdGreaterThan(Long value) { + addCriterion("author_id >", value, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdGreaterThanOrEqualTo(Long value) { + addCriterion("author_id >=", value, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdLessThan(Long value) { + addCriterion("author_id <", value, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdLessThanOrEqualTo(Long value) { + addCriterion("author_id <=", value, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdIn(List values) { + addCriterion("author_id in", values, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdNotIn(List values) { + addCriterion("author_id not in", values, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdBetween(Long value1, Long value2) { + addCriterion("author_id between", value1, value2, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdNotBetween(Long value1, Long value2) { + addCriterion("author_id not between", value1, value2, "authorId"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/MpMapPrd.java b/src/main/java/club/joylink/rtss/entity/MpMapPrd.java new file mode 100644 index 000000000..794b8decc --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/MpMapPrd.java @@ -0,0 +1,152 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * mp_map_prd + * @author + */ +public class MpMapPrd implements Serializable { + private Long id; + + /** + * 地图id + */ + private Long mapId; + + /** + * 产品类型 + */ + private String prdType; + + /** + * 产品名称 + */ + private String name; + + /** + * 实训类型 + */ + private String trainTypes; + + /** + * 产品简介 + */ + private String remarks; + + /** + * 状态:上线/下线 + */ + private String status; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getMapId() { + return mapId; + } + + public void setMapId(Long mapId) { + this.mapId = mapId; + } + + public String getPrdType() { + return prdType; + } + + public void setPrdType(String prdType) { + this.prdType = prdType; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getTrainTypes() { + return trainTypes; + } + + public void setTrainTypes(String trainTypes) { + this.trainTypes = trainTypes; + } + + public String getRemarks() { + return remarks; + } + + public void setRemarks(String remarks) { + this.remarks = remarks; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + MpMapPrd other = (MpMapPrd) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getPrdType() == null ? other.getPrdType() == null : this.getPrdType().equals(other.getPrdType())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getTrainTypes() == null ? other.getTrainTypes() == null : this.getTrainTypes().equals(other.getTrainTypes())) + && (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getPrdType() == null) ? 0 : getPrdType().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getTrainTypes() == null) ? 0 : getTrainTypes().hashCode()); + result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", mapId=").append(mapId); + sb.append(", prdType=").append(prdType); + sb.append(", name=").append(name); + sb.append(", trainTypes=").append(trainTypes); + sb.append(", remarks=").append(remarks); + sb.append(", status=").append(status); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/MpMapPrdExample.java b/src/main/java/club/joylink/rtss/entity/MpMapPrdExample.java new file mode 100644 index 000000000..6027854a8 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/MpMapPrdExample.java @@ -0,0 +1,692 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class MpMapPrdExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public MpMapPrdExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andPrdTypeIsNull() { + addCriterion("prd_type is null"); + return (Criteria) this; + } + + public Criteria andPrdTypeIsNotNull() { + addCriterion("prd_type is not null"); + return (Criteria) this; + } + + public Criteria andPrdTypeEqualTo(String value) { + addCriterion("prd_type =", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotEqualTo(String value) { + addCriterion("prd_type <>", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeGreaterThan(String value) { + addCriterion("prd_type >", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeGreaterThanOrEqualTo(String value) { + addCriterion("prd_type >=", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeLessThan(String value) { + addCriterion("prd_type <", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeLessThanOrEqualTo(String value) { + addCriterion("prd_type <=", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeLike(String value) { + addCriterion("prd_type like", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotLike(String value) { + addCriterion("prd_type not like", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeIn(List values) { + addCriterion("prd_type in", values, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotIn(List values) { + addCriterion("prd_type not in", values, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeBetween(String value1, String value2) { + addCriterion("prd_type between", value1, value2, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotBetween(String value1, String value2) { + addCriterion("prd_type not between", value1, value2, "prdType"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andTrainTypesIsNull() { + addCriterion("train_types is null"); + return (Criteria) this; + } + + public Criteria andTrainTypesIsNotNull() { + addCriterion("train_types is not null"); + return (Criteria) this; + } + + public Criteria andTrainTypesEqualTo(String value) { + addCriterion("train_types =", value, "trainTypes"); + return (Criteria) this; + } + + public Criteria andTrainTypesNotEqualTo(String value) { + addCriterion("train_types <>", value, "trainTypes"); + return (Criteria) this; + } + + public Criteria andTrainTypesGreaterThan(String value) { + addCriterion("train_types >", value, "trainTypes"); + return (Criteria) this; + } + + public Criteria andTrainTypesGreaterThanOrEqualTo(String value) { + addCriterion("train_types >=", value, "trainTypes"); + return (Criteria) this; + } + + public Criteria andTrainTypesLessThan(String value) { + addCriterion("train_types <", value, "trainTypes"); + return (Criteria) this; + } + + public Criteria andTrainTypesLessThanOrEqualTo(String value) { + addCriterion("train_types <=", value, "trainTypes"); + return (Criteria) this; + } + + public Criteria andTrainTypesLike(String value) { + addCriterion("train_types like", value, "trainTypes"); + return (Criteria) this; + } + + public Criteria andTrainTypesNotLike(String value) { + addCriterion("train_types not like", value, "trainTypes"); + return (Criteria) this; + } + + public Criteria andTrainTypesIn(List values) { + addCriterion("train_types in", values, "trainTypes"); + return (Criteria) this; + } + + public Criteria andTrainTypesNotIn(List values) { + addCriterion("train_types not in", values, "trainTypes"); + return (Criteria) this; + } + + public Criteria andTrainTypesBetween(String value1, String value2) { + addCriterion("train_types between", value1, value2, "trainTypes"); + return (Criteria) this; + } + + public Criteria andTrainTypesNotBetween(String value1, String value2) { + addCriterion("train_types not between", value1, value2, "trainTypes"); + return (Criteria) this; + } + + public Criteria andRemarksIsNull() { + addCriterion("remarks is null"); + return (Criteria) this; + } + + public Criteria andRemarksIsNotNull() { + addCriterion("remarks is not null"); + return (Criteria) this; + } + + public Criteria andRemarksEqualTo(String value) { + addCriterion("remarks =", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotEqualTo(String value) { + addCriterion("remarks <>", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksGreaterThan(String value) { + addCriterion("remarks >", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksGreaterThanOrEqualTo(String value) { + addCriterion("remarks >=", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLessThan(String value) { + addCriterion("remarks <", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLessThanOrEqualTo(String value) { + addCriterion("remarks <=", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLike(String value) { + addCriterion("remarks like", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotLike(String value) { + addCriterion("remarks not like", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksIn(List values) { + addCriterion("remarks in", values, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotIn(List values) { + addCriterion("remarks not in", values, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksBetween(String value1, String value2) { + addCriterion("remarks between", value1, value2, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotBetween(String value1, String value2) { + addCriterion("remarks not between", value1, value2, "remarks"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/MpStationRunning.java b/src/main/java/club/joylink/rtss/entity/MpStationRunning.java new file mode 100644 index 000000000..8aebb9955 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/MpStationRunning.java @@ -0,0 +1,168 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * mp_station_running + * @author + */ +public class MpStationRunning implements Serializable { + private Long id; + + /** + * 地图id + */ + private Long mapId; + + /** + * 起始车站 + */ + private String startStationCode; + + /** + * 起始站台 + */ + private String startSectionCode; + + /** + * 终点车站 + */ + private String endStationCode; + + /** + * 终点站台 + */ + private String endSectionCode; + + /** + * 方向 + */ + private String directionCode; + + /** + * 距离(厘米) + */ + private Integer distance; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getMapId() { + return mapId; + } + + public void setMapId(Long mapId) { + this.mapId = mapId; + } + + public String getStartStationCode() { + return startStationCode; + } + + public void setStartStationCode(String startStationCode) { + this.startStationCode = startStationCode; + } + + public String getStartSectionCode() { + return startSectionCode; + } + + public void setStartSectionCode(String startSectionCode) { + this.startSectionCode = startSectionCode; + } + + public String getEndStationCode() { + return endStationCode; + } + + public void setEndStationCode(String endStationCode) { + this.endStationCode = endStationCode; + } + + public String getEndSectionCode() { + return endSectionCode; + } + + public void setEndSectionCode(String endSectionCode) { + this.endSectionCode = endSectionCode; + } + + public String getDirectionCode() { + return directionCode; + } + + public void setDirectionCode(String directionCode) { + this.directionCode = directionCode; + } + + public Integer getDistance() { + return distance; + } + + public void setDistance(Integer distance) { + this.distance = distance; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + MpStationRunning other = (MpStationRunning) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getStartStationCode() == null ? other.getStartStationCode() == null : this.getStartStationCode().equals(other.getStartStationCode())) + && (this.getStartSectionCode() == null ? other.getStartSectionCode() == null : this.getStartSectionCode().equals(other.getStartSectionCode())) + && (this.getEndStationCode() == null ? other.getEndStationCode() == null : this.getEndStationCode().equals(other.getEndStationCode())) + && (this.getEndSectionCode() == null ? other.getEndSectionCode() == null : this.getEndSectionCode().equals(other.getEndSectionCode())) + && (this.getDirectionCode() == null ? other.getDirectionCode() == null : this.getDirectionCode().equals(other.getDirectionCode())) + && (this.getDistance() == null ? other.getDistance() == null : this.getDistance().equals(other.getDistance())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getStartStationCode() == null) ? 0 : getStartStationCode().hashCode()); + result = prime * result + ((getStartSectionCode() == null) ? 0 : getStartSectionCode().hashCode()); + result = prime * result + ((getEndStationCode() == null) ? 0 : getEndStationCode().hashCode()); + result = prime * result + ((getEndSectionCode() == null) ? 0 : getEndSectionCode().hashCode()); + result = prime * result + ((getDirectionCode() == null) ? 0 : getDirectionCode().hashCode()); + result = prime * result + ((getDistance() == null) ? 0 : getDistance().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", mapId=").append(mapId); + sb.append(", startStationCode=").append(startStationCode); + sb.append(", startSectionCode=").append(startSectionCode); + sb.append(", endStationCode=").append(endStationCode); + sb.append(", endSectionCode=").append(endSectionCode); + sb.append(", directionCode=").append(directionCode); + sb.append(", distance=").append(distance); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/MpStationRunningExample.java b/src/main/java/club/joylink/rtss/entity/MpStationRunningExample.java new file mode 100644 index 000000000..a4b5bbd1b --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/MpStationRunningExample.java @@ -0,0 +1,752 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class MpStationRunningExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public MpStationRunningExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andStartStationCodeIsNull() { + addCriterion("start_station_code is null"); + return (Criteria) this; + } + + public Criteria andStartStationCodeIsNotNull() { + addCriterion("start_station_code is not null"); + return (Criteria) this; + } + + public Criteria andStartStationCodeEqualTo(String value) { + addCriterion("start_station_code =", value, "startStationCode"); + return (Criteria) this; + } + + public Criteria andStartStationCodeNotEqualTo(String value) { + addCriterion("start_station_code <>", value, "startStationCode"); + return (Criteria) this; + } + + public Criteria andStartStationCodeGreaterThan(String value) { + addCriterion("start_station_code >", value, "startStationCode"); + return (Criteria) this; + } + + public Criteria andStartStationCodeGreaterThanOrEqualTo(String value) { + addCriterion("start_station_code >=", value, "startStationCode"); + return (Criteria) this; + } + + public Criteria andStartStationCodeLessThan(String value) { + addCriterion("start_station_code <", value, "startStationCode"); + return (Criteria) this; + } + + public Criteria andStartStationCodeLessThanOrEqualTo(String value) { + addCriterion("start_station_code <=", value, "startStationCode"); + return (Criteria) this; + } + + public Criteria andStartStationCodeLike(String value) { + addCriterion("start_station_code like", value, "startStationCode"); + return (Criteria) this; + } + + public Criteria andStartStationCodeNotLike(String value) { + addCriterion("start_station_code not like", value, "startStationCode"); + return (Criteria) this; + } + + public Criteria andStartStationCodeIn(List values) { + addCriterion("start_station_code in", values, "startStationCode"); + return (Criteria) this; + } + + public Criteria andStartStationCodeNotIn(List values) { + addCriterion("start_station_code not in", values, "startStationCode"); + return (Criteria) this; + } + + public Criteria andStartStationCodeBetween(String value1, String value2) { + addCriterion("start_station_code between", value1, value2, "startStationCode"); + return (Criteria) this; + } + + public Criteria andStartStationCodeNotBetween(String value1, String value2) { + addCriterion("start_station_code not between", value1, value2, "startStationCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeIsNull() { + addCriterion("start_section_code is null"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeIsNotNull() { + addCriterion("start_section_code is not null"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeEqualTo(String value) { + addCriterion("start_section_code =", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeNotEqualTo(String value) { + addCriterion("start_section_code <>", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeGreaterThan(String value) { + addCriterion("start_section_code >", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeGreaterThanOrEqualTo(String value) { + addCriterion("start_section_code >=", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeLessThan(String value) { + addCriterion("start_section_code <", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeLessThanOrEqualTo(String value) { + addCriterion("start_section_code <=", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeLike(String value) { + addCriterion("start_section_code like", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeNotLike(String value) { + addCriterion("start_section_code not like", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeIn(List values) { + addCriterion("start_section_code in", values, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeNotIn(List values) { + addCriterion("start_section_code not in", values, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeBetween(String value1, String value2) { + addCriterion("start_section_code between", value1, value2, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeNotBetween(String value1, String value2) { + addCriterion("start_section_code not between", value1, value2, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andEndStationCodeIsNull() { + addCriterion("end_station_code is null"); + return (Criteria) this; + } + + public Criteria andEndStationCodeIsNotNull() { + addCriterion("end_station_code is not null"); + return (Criteria) this; + } + + public Criteria andEndStationCodeEqualTo(String value) { + addCriterion("end_station_code =", value, "endStationCode"); + return (Criteria) this; + } + + public Criteria andEndStationCodeNotEqualTo(String value) { + addCriterion("end_station_code <>", value, "endStationCode"); + return (Criteria) this; + } + + public Criteria andEndStationCodeGreaterThan(String value) { + addCriterion("end_station_code >", value, "endStationCode"); + return (Criteria) this; + } + + public Criteria andEndStationCodeGreaterThanOrEqualTo(String value) { + addCriterion("end_station_code >=", value, "endStationCode"); + return (Criteria) this; + } + + public Criteria andEndStationCodeLessThan(String value) { + addCriterion("end_station_code <", value, "endStationCode"); + return (Criteria) this; + } + + public Criteria andEndStationCodeLessThanOrEqualTo(String value) { + addCriterion("end_station_code <=", value, "endStationCode"); + return (Criteria) this; + } + + public Criteria andEndStationCodeLike(String value) { + addCriterion("end_station_code like", value, "endStationCode"); + return (Criteria) this; + } + + public Criteria andEndStationCodeNotLike(String value) { + addCriterion("end_station_code not like", value, "endStationCode"); + return (Criteria) this; + } + + public Criteria andEndStationCodeIn(List values) { + addCriterion("end_station_code in", values, "endStationCode"); + return (Criteria) this; + } + + public Criteria andEndStationCodeNotIn(List values) { + addCriterion("end_station_code not in", values, "endStationCode"); + return (Criteria) this; + } + + public Criteria andEndStationCodeBetween(String value1, String value2) { + addCriterion("end_station_code between", value1, value2, "endStationCode"); + return (Criteria) this; + } + + public Criteria andEndStationCodeNotBetween(String value1, String value2) { + addCriterion("end_station_code not between", value1, value2, "endStationCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeIsNull() { + addCriterion("end_section_code is null"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeIsNotNull() { + addCriterion("end_section_code is not null"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeEqualTo(String value) { + addCriterion("end_section_code =", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeNotEqualTo(String value) { + addCriterion("end_section_code <>", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeGreaterThan(String value) { + addCriterion("end_section_code >", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeGreaterThanOrEqualTo(String value) { + addCriterion("end_section_code >=", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeLessThan(String value) { + addCriterion("end_section_code <", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeLessThanOrEqualTo(String value) { + addCriterion("end_section_code <=", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeLike(String value) { + addCriterion("end_section_code like", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeNotLike(String value) { + addCriterion("end_section_code not like", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeIn(List values) { + addCriterion("end_section_code in", values, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeNotIn(List values) { + addCriterion("end_section_code not in", values, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeBetween(String value1, String value2) { + addCriterion("end_section_code between", value1, value2, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeNotBetween(String value1, String value2) { + addCriterion("end_section_code not between", value1, value2, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andDirectionCodeIsNull() { + addCriterion("direction_code is null"); + return (Criteria) this; + } + + public Criteria andDirectionCodeIsNotNull() { + addCriterion("direction_code is not null"); + return (Criteria) this; + } + + public Criteria andDirectionCodeEqualTo(String value) { + addCriterion("direction_code =", value, "directionCode"); + return (Criteria) this; + } + + public Criteria andDirectionCodeNotEqualTo(String value) { + addCriterion("direction_code <>", value, "directionCode"); + return (Criteria) this; + } + + public Criteria andDirectionCodeGreaterThan(String value) { + addCriterion("direction_code >", value, "directionCode"); + return (Criteria) this; + } + + public Criteria andDirectionCodeGreaterThanOrEqualTo(String value) { + addCriterion("direction_code >=", value, "directionCode"); + return (Criteria) this; + } + + public Criteria andDirectionCodeLessThan(String value) { + addCriterion("direction_code <", value, "directionCode"); + return (Criteria) this; + } + + public Criteria andDirectionCodeLessThanOrEqualTo(String value) { + addCriterion("direction_code <=", value, "directionCode"); + return (Criteria) this; + } + + public Criteria andDirectionCodeLike(String value) { + addCriterion("direction_code like", value, "directionCode"); + return (Criteria) this; + } + + public Criteria andDirectionCodeNotLike(String value) { + addCriterion("direction_code not like", value, "directionCode"); + return (Criteria) this; + } + + public Criteria andDirectionCodeIn(List values) { + addCriterion("direction_code in", values, "directionCode"); + return (Criteria) this; + } + + public Criteria andDirectionCodeNotIn(List values) { + addCriterion("direction_code not in", values, "directionCode"); + return (Criteria) this; + } + + public Criteria andDirectionCodeBetween(String value1, String value2) { + addCriterion("direction_code between", value1, value2, "directionCode"); + return (Criteria) this; + } + + public Criteria andDirectionCodeNotBetween(String value1, String value2) { + addCriterion("direction_code not between", value1, value2, "directionCode"); + return (Criteria) this; + } + + public Criteria andDistanceIsNull() { + addCriterion("distance is null"); + return (Criteria) this; + } + + public Criteria andDistanceIsNotNull() { + addCriterion("distance is not null"); + return (Criteria) this; + } + + public Criteria andDistanceEqualTo(Integer value) { + addCriterion("distance =", value, "distance"); + return (Criteria) this; + } + + public Criteria andDistanceNotEqualTo(Integer value) { + addCriterion("distance <>", value, "distance"); + return (Criteria) this; + } + + public Criteria andDistanceGreaterThan(Integer value) { + addCriterion("distance >", value, "distance"); + return (Criteria) this; + } + + public Criteria andDistanceGreaterThanOrEqualTo(Integer value) { + addCriterion("distance >=", value, "distance"); + return (Criteria) this; + } + + public Criteria andDistanceLessThan(Integer value) { + addCriterion("distance <", value, "distance"); + return (Criteria) this; + } + + public Criteria andDistanceLessThanOrEqualTo(Integer value) { + addCriterion("distance <=", value, "distance"); + return (Criteria) this; + } + + public Criteria andDistanceIn(List values) { + addCriterion("distance in", values, "distance"); + return (Criteria) this; + } + + public Criteria andDistanceNotIn(List values) { + addCriterion("distance not in", values, "distance"); + return (Criteria) this; + } + + public Criteria andDistanceBetween(Integer value1, Integer value2) { + addCriterion("distance between", value1, value2, "distance"); + return (Criteria) this; + } + + public Criteria andDistanceNotBetween(Integer value1, Integer value2) { + addCriterion("distance not between", value1, value2, "distance"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/OperateDefinition.java b/src/main/java/club/joylink/rtss/entity/OperateDefinition.java new file mode 100644 index 000000000..ecbe03f69 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/OperateDefinition.java @@ -0,0 +1,58 @@ +package club.joylink.rtss.entity; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author + * 操作定义表 + */ +@Data +public class OperateDefinition implements Serializable { + private Long id; + + /** + * 地图id + */ + private Long mapId; + + /** + * 实训类型 + */ + private String trainingType; + + /** + * 操作类型 + */ + private String operateType; + + /** + * 实训名称 + */ + private String trainingName; + + /** + * 实训描述 + */ + private String trainingRemark; + + /** + * 最小用时 + */ + private Integer minDuration; + + /** + * 最大用时 + */ + private Integer maxDuration; + + private String productTypes; + + /** + * 操作配置 + */ + private String config; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/OperateDefinitionExample.java b/src/main/java/club/joylink/rtss/entity/OperateDefinitionExample.java new file mode 100644 index 000000000..c2098dab8 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/OperateDefinitionExample.java @@ -0,0 +1,812 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class OperateDefinitionExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public OperateDefinitionExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andTrainingTypeIsNull() { + addCriterion("training_type is null"); + return (Criteria) this; + } + + public Criteria andTrainingTypeIsNotNull() { + addCriterion("training_type is not null"); + return (Criteria) this; + } + + public Criteria andTrainingTypeEqualTo(String value) { + addCriterion("training_type =", value, "trainingType"); + return (Criteria) this; + } + + public Criteria andTrainingTypeNotEqualTo(String value) { + addCriterion("training_type <>", value, "trainingType"); + return (Criteria) this; + } + + public Criteria andTrainingTypeGreaterThan(String value) { + addCriterion("training_type >", value, "trainingType"); + return (Criteria) this; + } + + public Criteria andTrainingTypeGreaterThanOrEqualTo(String value) { + addCriterion("training_type >=", value, "trainingType"); + return (Criteria) this; + } + + public Criteria andTrainingTypeLessThan(String value) { + addCriterion("training_type <", value, "trainingType"); + return (Criteria) this; + } + + public Criteria andTrainingTypeLessThanOrEqualTo(String value) { + addCriterion("training_type <=", value, "trainingType"); + return (Criteria) this; + } + + public Criteria andTrainingTypeLike(String value) { + addCriterion("training_type like", value, "trainingType"); + return (Criteria) this; + } + + public Criteria andTrainingTypeNotLike(String value) { + addCriterion("training_type not like", value, "trainingType"); + return (Criteria) this; + } + + public Criteria andTrainingTypeIn(List values) { + addCriterion("training_type in", values, "trainingType"); + return (Criteria) this; + } + + public Criteria andTrainingTypeNotIn(List values) { + addCriterion("training_type not in", values, "trainingType"); + return (Criteria) this; + } + + public Criteria andTrainingTypeBetween(String value1, String value2) { + addCriterion("training_type between", value1, value2, "trainingType"); + return (Criteria) this; + } + + public Criteria andTrainingTypeNotBetween(String value1, String value2) { + addCriterion("training_type not between", value1, value2, "trainingType"); + return (Criteria) this; + } + + public Criteria andOperateTypeIsNull() { + addCriterion("operate_type is null"); + return (Criteria) this; + } + + public Criteria andOperateTypeIsNotNull() { + addCriterion("operate_type is not null"); + return (Criteria) this; + } + + public Criteria andOperateTypeEqualTo(String value) { + addCriterion("operate_type =", value, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeNotEqualTo(String value) { + addCriterion("operate_type <>", value, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeGreaterThan(String value) { + addCriterion("operate_type >", value, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeGreaterThanOrEqualTo(String value) { + addCriterion("operate_type >=", value, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeLessThan(String value) { + addCriterion("operate_type <", value, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeLessThanOrEqualTo(String value) { + addCriterion("operate_type <=", value, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeLike(String value) { + addCriterion("operate_type like", value, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeNotLike(String value) { + addCriterion("operate_type not like", value, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeIn(List values) { + addCriterion("operate_type in", values, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeNotIn(List values) { + addCriterion("operate_type not in", values, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeBetween(String value1, String value2) { + addCriterion("operate_type between", value1, value2, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeNotBetween(String value1, String value2) { + addCriterion("operate_type not between", value1, value2, "operateType"); + return (Criteria) this; + } + + public Criteria andTrainingNameIsNull() { + addCriterion("training_name is null"); + return (Criteria) this; + } + + public Criteria andTrainingNameIsNotNull() { + addCriterion("training_name is not null"); + return (Criteria) this; + } + + public Criteria andTrainingNameEqualTo(String value) { + addCriterion("training_name =", value, "trainingName"); + return (Criteria) this; + } + + public Criteria andTrainingNameNotEqualTo(String value) { + addCriterion("training_name <>", value, "trainingName"); + return (Criteria) this; + } + + public Criteria andTrainingNameGreaterThan(String value) { + addCriterion("training_name >", value, "trainingName"); + return (Criteria) this; + } + + public Criteria andTrainingNameGreaterThanOrEqualTo(String value) { + addCriterion("training_name >=", value, "trainingName"); + return (Criteria) this; + } + + public Criteria andTrainingNameLessThan(String value) { + addCriterion("training_name <", value, "trainingName"); + return (Criteria) this; + } + + public Criteria andTrainingNameLessThanOrEqualTo(String value) { + addCriterion("training_name <=", value, "trainingName"); + return (Criteria) this; + } + + public Criteria andTrainingNameLike(String value) { + addCriterion("training_name like", value, "trainingName"); + return (Criteria) this; + } + + public Criteria andTrainingNameNotLike(String value) { + addCriterion("training_name not like", value, "trainingName"); + return (Criteria) this; + } + + public Criteria andTrainingNameIn(List values) { + addCriterion("training_name in", values, "trainingName"); + return (Criteria) this; + } + + public Criteria andTrainingNameNotIn(List values) { + addCriterion("training_name not in", values, "trainingName"); + return (Criteria) this; + } + + public Criteria andTrainingNameBetween(String value1, String value2) { + addCriterion("training_name between", value1, value2, "trainingName"); + return (Criteria) this; + } + + public Criteria andTrainingNameNotBetween(String value1, String value2) { + addCriterion("training_name not between", value1, value2, "trainingName"); + return (Criteria) this; + } + + public Criteria andTrainingRemarkIsNull() { + addCriterion("training_remark is null"); + return (Criteria) this; + } + + public Criteria andTrainingRemarkIsNotNull() { + addCriterion("training_remark is not null"); + return (Criteria) this; + } + + public Criteria andTrainingRemarkEqualTo(String value) { + addCriterion("training_remark =", value, "trainingRemark"); + return (Criteria) this; + } + + public Criteria andTrainingRemarkNotEqualTo(String value) { + addCriterion("training_remark <>", value, "trainingRemark"); + return (Criteria) this; + } + + public Criteria andTrainingRemarkGreaterThan(String value) { + addCriterion("training_remark >", value, "trainingRemark"); + return (Criteria) this; + } + + public Criteria andTrainingRemarkGreaterThanOrEqualTo(String value) { + addCriterion("training_remark >=", value, "trainingRemark"); + return (Criteria) this; + } + + public Criteria andTrainingRemarkLessThan(String value) { + addCriterion("training_remark <", value, "trainingRemark"); + return (Criteria) this; + } + + public Criteria andTrainingRemarkLessThanOrEqualTo(String value) { + addCriterion("training_remark <=", value, "trainingRemark"); + return (Criteria) this; + } + + public Criteria andTrainingRemarkLike(String value) { + addCriterion("training_remark like", value, "trainingRemark"); + return (Criteria) this; + } + + public Criteria andTrainingRemarkNotLike(String value) { + addCriterion("training_remark not like", value, "trainingRemark"); + return (Criteria) this; + } + + public Criteria andTrainingRemarkIn(List values) { + addCriterion("training_remark in", values, "trainingRemark"); + return (Criteria) this; + } + + public Criteria andTrainingRemarkNotIn(List values) { + addCriterion("training_remark not in", values, "trainingRemark"); + return (Criteria) this; + } + + public Criteria andTrainingRemarkBetween(String value1, String value2) { + addCriterion("training_remark between", value1, value2, "trainingRemark"); + return (Criteria) this; + } + + public Criteria andTrainingRemarkNotBetween(String value1, String value2) { + addCriterion("training_remark not between", value1, value2, "trainingRemark"); + return (Criteria) this; + } + + public Criteria andMinDurationIsNull() { + addCriterion("min_duration is null"); + return (Criteria) this; + } + + public Criteria andMinDurationIsNotNull() { + addCriterion("min_duration is not null"); + return (Criteria) this; + } + + public Criteria andMinDurationEqualTo(Integer value) { + addCriterion("min_duration =", value, "minDuration"); + return (Criteria) this; + } + + public Criteria andMinDurationNotEqualTo(Integer value) { + addCriterion("min_duration <>", value, "minDuration"); + return (Criteria) this; + } + + public Criteria andMinDurationGreaterThan(Integer value) { + addCriterion("min_duration >", value, "minDuration"); + return (Criteria) this; + } + + public Criteria andMinDurationGreaterThanOrEqualTo(Integer value) { + addCriterion("min_duration >=", value, "minDuration"); + return (Criteria) this; + } + + public Criteria andMinDurationLessThan(Integer value) { + addCriterion("min_duration <", value, "minDuration"); + return (Criteria) this; + } + + public Criteria andMinDurationLessThanOrEqualTo(Integer value) { + addCriterion("min_duration <=", value, "minDuration"); + return (Criteria) this; + } + + public Criteria andMinDurationIn(List values) { + addCriterion("min_duration in", values, "minDuration"); + return (Criteria) this; + } + + public Criteria andMinDurationNotIn(List values) { + addCriterion("min_duration not in", values, "minDuration"); + return (Criteria) this; + } + + public Criteria andMinDurationBetween(Integer value1, Integer value2) { + addCriterion("min_duration between", value1, value2, "minDuration"); + return (Criteria) this; + } + + public Criteria andMinDurationNotBetween(Integer value1, Integer value2) { + addCriterion("min_duration not between", value1, value2, "minDuration"); + return (Criteria) this; + } + + public Criteria andMaxDurationIsNull() { + addCriterion("max_duration is null"); + return (Criteria) this; + } + + public Criteria andMaxDurationIsNotNull() { + addCriterion("max_duration is not null"); + return (Criteria) this; + } + + public Criteria andMaxDurationEqualTo(Integer value) { + addCriterion("max_duration =", value, "maxDuration"); + return (Criteria) this; + } + + public Criteria andMaxDurationNotEqualTo(Integer value) { + addCriterion("max_duration <>", value, "maxDuration"); + return (Criteria) this; + } + + public Criteria andMaxDurationGreaterThan(Integer value) { + addCriterion("max_duration >", value, "maxDuration"); + return (Criteria) this; + } + + public Criteria andMaxDurationGreaterThanOrEqualTo(Integer value) { + addCriterion("max_duration >=", value, "maxDuration"); + return (Criteria) this; + } + + public Criteria andMaxDurationLessThan(Integer value) { + addCriterion("max_duration <", value, "maxDuration"); + return (Criteria) this; + } + + public Criteria andMaxDurationLessThanOrEqualTo(Integer value) { + addCriterion("max_duration <=", value, "maxDuration"); + return (Criteria) this; + } + + public Criteria andMaxDurationIn(List values) { + addCriterion("max_duration in", values, "maxDuration"); + return (Criteria) this; + } + + public Criteria andMaxDurationNotIn(List values) { + addCriterion("max_duration not in", values, "maxDuration"); + return (Criteria) this; + } + + public Criteria andMaxDurationBetween(Integer value1, Integer value2) { + addCriterion("max_duration between", value1, value2, "maxDuration"); + return (Criteria) this; + } + + public Criteria andMaxDurationNotBetween(Integer value1, Integer value2) { + addCriterion("max_duration not between", value1, value2, "maxDuration"); + return (Criteria) this; + } + + public Criteria andProductTypesIsNull() { + addCriterion("product_types is null"); + return (Criteria) this; + } + + public Criteria andProductTypesIsNotNull() { + addCriterion("product_types is not null"); + return (Criteria) this; + } + + public Criteria andProductTypesEqualTo(String value) { + addCriterion("product_types =", value, "productTypes"); + return (Criteria) this; + } + + public Criteria andProductTypesNotEqualTo(String value) { + addCriterion("product_types <>", value, "productTypes"); + return (Criteria) this; + } + + public Criteria andProductTypesGreaterThan(String value) { + addCriterion("product_types >", value, "productTypes"); + return (Criteria) this; + } + + public Criteria andProductTypesGreaterThanOrEqualTo(String value) { + addCriterion("product_types >=", value, "productTypes"); + return (Criteria) this; + } + + public Criteria andProductTypesLessThan(String value) { + addCriterion("product_types <", value, "productTypes"); + return (Criteria) this; + } + + public Criteria andProductTypesLessThanOrEqualTo(String value) { + addCriterion("product_types <=", value, "productTypes"); + return (Criteria) this; + } + + public Criteria andProductTypesLike(String value) { + addCriterion("product_types like", value, "productTypes"); + return (Criteria) this; + } + + public Criteria andProductTypesNotLike(String value) { + addCriterion("product_types not like", value, "productTypes"); + return (Criteria) this; + } + + public Criteria andProductTypesIn(List values) { + addCriterion("product_types in", values, "productTypes"); + return (Criteria) this; + } + + public Criteria andProductTypesNotIn(List values) { + addCriterion("product_types not in", values, "productTypes"); + return (Criteria) this; + } + + public Criteria andProductTypesBetween(String value1, String value2) { + addCriterion("product_types between", value1, value2, "productTypes"); + return (Criteria) this; + } + + public Criteria andProductTypesNotBetween(String value1, String value2) { + addCriterion("product_types not between", value1, value2, "productTypes"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/OperatePlaceholder.java b/src/main/java/club/joylink/rtss/entity/OperatePlaceholder.java new file mode 100644 index 000000000..f1c5d13ad --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/OperatePlaceholder.java @@ -0,0 +1,152 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * operate_placeholder + * @author + */ +public class OperatePlaceholder implements Serializable { + private Long id; + + /** + * 占位符编号 + */ + private Long code; + + /** + * 实训类型 + */ + private String trainingType; + + /** + * 类型 + */ + private String type; + + /** + * 名称 + */ + private String name; + + /** + * 值 + */ + private String val; + + /** + * 对应新地图数据的值 + */ + private String valNew; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getCode() { + return code; + } + + public void setCode(Long code) { + this.code = code; + } + + public String getTrainingType() { + return trainingType; + } + + public void setTrainingType(String trainingType) { + this.trainingType = trainingType; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getVal() { + return val; + } + + public void setVal(String val) { + this.val = val; + } + + public String getValNew() { + return valNew; + } + + public void setValNew(String valNew) { + this.valNew = valNew; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + OperatePlaceholder other = (OperatePlaceholder) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode())) + && (this.getTrainingType() == null ? other.getTrainingType() == null : this.getTrainingType().equals(other.getTrainingType())) + && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getVal() == null ? other.getVal() == null : this.getVal().equals(other.getVal())) + && (this.getValNew() == null ? other.getValNew() == null : this.getValNew().equals(other.getValNew())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode()); + result = prime * result + ((getTrainingType() == null) ? 0 : getTrainingType().hashCode()); + result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getVal() == null) ? 0 : getVal().hashCode()); + result = prime * result + ((getValNew() == null) ? 0 : getValNew().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", code=").append(code); + sb.append(", trainingType=").append(trainingType); + sb.append(", type=").append(type); + sb.append(", name=").append(name); + sb.append(", val=").append(val); + sb.append(", valNew=").append(valNew); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/OperatePlaceholderExample.java b/src/main/java/club/joylink/rtss/entity/OperatePlaceholderExample.java new file mode 100644 index 000000000..3e368a37c --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/OperatePlaceholderExample.java @@ -0,0 +1,692 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class OperatePlaceholderExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public OperatePlaceholderExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCodeIsNull() { + addCriterion("code is null"); + return (Criteria) this; + } + + public Criteria andCodeIsNotNull() { + addCriterion("code is not null"); + return (Criteria) this; + } + + public Criteria andCodeEqualTo(Long value) { + addCriterion("code =", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotEqualTo(Long value) { + addCriterion("code <>", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThan(Long value) { + addCriterion("code >", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThanOrEqualTo(Long value) { + addCriterion("code >=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThan(Long value) { + addCriterion("code <", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThanOrEqualTo(Long value) { + addCriterion("code <=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeIn(List values) { + addCriterion("code in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotIn(List values) { + addCriterion("code not in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeBetween(Long value1, Long value2) { + addCriterion("code between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotBetween(Long value1, Long value2) { + addCriterion("code not between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andTrainingTypeIsNull() { + addCriterion("training_type is null"); + return (Criteria) this; + } + + public Criteria andTrainingTypeIsNotNull() { + addCriterion("training_type is not null"); + return (Criteria) this; + } + + public Criteria andTrainingTypeEqualTo(String value) { + addCriterion("training_type =", value, "trainingType"); + return (Criteria) this; + } + + public Criteria andTrainingTypeNotEqualTo(String value) { + addCriterion("training_type <>", value, "trainingType"); + return (Criteria) this; + } + + public Criteria andTrainingTypeGreaterThan(String value) { + addCriterion("training_type >", value, "trainingType"); + return (Criteria) this; + } + + public Criteria andTrainingTypeGreaterThanOrEqualTo(String value) { + addCriterion("training_type >=", value, "trainingType"); + return (Criteria) this; + } + + public Criteria andTrainingTypeLessThan(String value) { + addCriterion("training_type <", value, "trainingType"); + return (Criteria) this; + } + + public Criteria andTrainingTypeLessThanOrEqualTo(String value) { + addCriterion("training_type <=", value, "trainingType"); + return (Criteria) this; + } + + public Criteria andTrainingTypeLike(String value) { + addCriterion("training_type like", value, "trainingType"); + return (Criteria) this; + } + + public Criteria andTrainingTypeNotLike(String value) { + addCriterion("training_type not like", value, "trainingType"); + return (Criteria) this; + } + + public Criteria andTrainingTypeIn(List values) { + addCriterion("training_type in", values, "trainingType"); + return (Criteria) this; + } + + public Criteria andTrainingTypeNotIn(List values) { + addCriterion("training_type not in", values, "trainingType"); + return (Criteria) this; + } + + public Criteria andTrainingTypeBetween(String value1, String value2) { + addCriterion("training_type between", value1, value2, "trainingType"); + return (Criteria) this; + } + + public Criteria andTrainingTypeNotBetween(String value1, String value2) { + addCriterion("training_type not between", value1, value2, "trainingType"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("`type` is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("`type` is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(String value) { + addCriterion("`type` =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(String value) { + addCriterion("`type` <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(String value) { + addCriterion("`type` >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(String value) { + addCriterion("`type` >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(String value) { + addCriterion("`type` <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(String value) { + addCriterion("`type` <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLike(String value) { + addCriterion("`type` like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotLike(String value) { + addCriterion("`type` not like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("`type` in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("`type` not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(String value1, String value2) { + addCriterion("`type` between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(String value1, String value2) { + addCriterion("`type` not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andValIsNull() { + addCriterion("val is null"); + return (Criteria) this; + } + + public Criteria andValIsNotNull() { + addCriterion("val is not null"); + return (Criteria) this; + } + + public Criteria andValEqualTo(String value) { + addCriterion("val =", value, "val"); + return (Criteria) this; + } + + public Criteria andValNotEqualTo(String value) { + addCriterion("val <>", value, "val"); + return (Criteria) this; + } + + public Criteria andValGreaterThan(String value) { + addCriterion("val >", value, "val"); + return (Criteria) this; + } + + public Criteria andValGreaterThanOrEqualTo(String value) { + addCriterion("val >=", value, "val"); + return (Criteria) this; + } + + public Criteria andValLessThan(String value) { + addCriterion("val <", value, "val"); + return (Criteria) this; + } + + public Criteria andValLessThanOrEqualTo(String value) { + addCriterion("val <=", value, "val"); + return (Criteria) this; + } + + public Criteria andValLike(String value) { + addCriterion("val like", value, "val"); + return (Criteria) this; + } + + public Criteria andValNotLike(String value) { + addCriterion("val not like", value, "val"); + return (Criteria) this; + } + + public Criteria andValIn(List values) { + addCriterion("val in", values, "val"); + return (Criteria) this; + } + + public Criteria andValNotIn(List values) { + addCriterion("val not in", values, "val"); + return (Criteria) this; + } + + public Criteria andValBetween(String value1, String value2) { + addCriterion("val between", value1, value2, "val"); + return (Criteria) this; + } + + public Criteria andValNotBetween(String value1, String value2) { + addCriterion("val not between", value1, value2, "val"); + return (Criteria) this; + } + + public Criteria andValNewIsNull() { + addCriterion("val_new is null"); + return (Criteria) this; + } + + public Criteria andValNewIsNotNull() { + addCriterion("val_new is not null"); + return (Criteria) this; + } + + public Criteria andValNewEqualTo(String value) { + addCriterion("val_new =", value, "valNew"); + return (Criteria) this; + } + + public Criteria andValNewNotEqualTo(String value) { + addCriterion("val_new <>", value, "valNew"); + return (Criteria) this; + } + + public Criteria andValNewGreaterThan(String value) { + addCriterion("val_new >", value, "valNew"); + return (Criteria) this; + } + + public Criteria andValNewGreaterThanOrEqualTo(String value) { + addCriterion("val_new >=", value, "valNew"); + return (Criteria) this; + } + + public Criteria andValNewLessThan(String value) { + addCriterion("val_new <", value, "valNew"); + return (Criteria) this; + } + + public Criteria andValNewLessThanOrEqualTo(String value) { + addCriterion("val_new <=", value, "valNew"); + return (Criteria) this; + } + + public Criteria andValNewLike(String value) { + addCriterion("val_new like", value, "valNew"); + return (Criteria) this; + } + + public Criteria andValNewNotLike(String value) { + addCriterion("val_new not like", value, "valNew"); + return (Criteria) this; + } + + public Criteria andValNewIn(List values) { + addCriterion("val_new in", values, "valNew"); + return (Criteria) this; + } + + public Criteria andValNewNotIn(List values) { + addCriterion("val_new not in", values, "valNew"); + return (Criteria) this; + } + + public Criteria andValNewBetween(String value1, String value2) { + addCriterion("val_new between", value1, value2, "valNew"); + return (Criteria) this; + } + + public Criteria andValNewNotBetween(String value1, String value2) { + addCriterion("val_new not between", value1, value2, "valNew"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/OperateStep.java b/src/main/java/club/joylink/rtss/entity/OperateStep.java new file mode 100644 index 000000000..864bf284d --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/OperateStep.java @@ -0,0 +1,184 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * operate_step + * @author + */ +public class OperateStep implements Serializable { + private Long id; + + /** + * 操作定义id + */ + private Long definitionId; + + /** + * 步骤序号 + */ + private Integer orderNum; + + /** + * 步骤操作码 + */ + private String operateCode; + + /** + * 步骤提示信息 + */ + private String tip; + + /** + * 设备类型 + */ + private String deviceType; + + /** + * 设备子元素 + */ + private String subType; + + /** + * 步骤返回值 + */ + private String val; + + /** + * 所需code类型 + */ + private String codeType; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getDefinitionId() { + return definitionId; + } + + public void setDefinitionId(Long definitionId) { + this.definitionId = definitionId; + } + + public Integer getOrderNum() { + return orderNum; + } + + public void setOrderNum(Integer orderNum) { + this.orderNum = orderNum; + } + + public String getOperateCode() { + return operateCode; + } + + public void setOperateCode(String operateCode) { + this.operateCode = operateCode; + } + + public String getTip() { + return tip; + } + + public void setTip(String tip) { + this.tip = tip; + } + + public String getDeviceType() { + return deviceType; + } + + public void setDeviceType(String deviceType) { + this.deviceType = deviceType; + } + + public String getSubType() { + return subType; + } + + public void setSubType(String subType) { + this.subType = subType; + } + + public String getVal() { + return val; + } + + public void setVal(String val) { + this.val = val; + } + + public String getCodeType() { + return codeType; + } + + public void setCodeType(String codeType) { + this.codeType = codeType; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + OperateStep other = (OperateStep) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getDefinitionId() == null ? other.getDefinitionId() == null : this.getDefinitionId().equals(other.getDefinitionId())) + && (this.getOrderNum() == null ? other.getOrderNum() == null : this.getOrderNum().equals(other.getOrderNum())) + && (this.getOperateCode() == null ? other.getOperateCode() == null : this.getOperateCode().equals(other.getOperateCode())) + && (this.getTip() == null ? other.getTip() == null : this.getTip().equals(other.getTip())) + && (this.getDeviceType() == null ? other.getDeviceType() == null : this.getDeviceType().equals(other.getDeviceType())) + && (this.getSubType() == null ? other.getSubType() == null : this.getSubType().equals(other.getSubType())) + && (this.getVal() == null ? other.getVal() == null : this.getVal().equals(other.getVal())) + && (this.getCodeType() == null ? other.getCodeType() == null : this.getCodeType().equals(other.getCodeType())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getDefinitionId() == null) ? 0 : getDefinitionId().hashCode()); + result = prime * result + ((getOrderNum() == null) ? 0 : getOrderNum().hashCode()); + result = prime * result + ((getOperateCode() == null) ? 0 : getOperateCode().hashCode()); + result = prime * result + ((getTip() == null) ? 0 : getTip().hashCode()); + result = prime * result + ((getDeviceType() == null) ? 0 : getDeviceType().hashCode()); + result = prime * result + ((getSubType() == null) ? 0 : getSubType().hashCode()); + result = prime * result + ((getVal() == null) ? 0 : getVal().hashCode()); + result = prime * result + ((getCodeType() == null) ? 0 : getCodeType().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", definitionId=").append(definitionId); + sb.append(", orderNum=").append(orderNum); + sb.append(", operateCode=").append(operateCode); + sb.append(", tip=").append(tip); + sb.append(", deviceType=").append(deviceType); + sb.append(", subType=").append(subType); + sb.append(", val=").append(val); + sb.append(", codeType=").append(codeType); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/OperateStepExample.java b/src/main/java/club/joylink/rtss/entity/OperateStepExample.java new file mode 100644 index 000000000..2df6c621f --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/OperateStepExample.java @@ -0,0 +1,822 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class OperateStepExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public OperateStepExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andDefinitionIdIsNull() { + addCriterion("definition_id is null"); + return (Criteria) this; + } + + public Criteria andDefinitionIdIsNotNull() { + addCriterion("definition_id is not null"); + return (Criteria) this; + } + + public Criteria andDefinitionIdEqualTo(Long value) { + addCriterion("definition_id =", value, "definitionId"); + return (Criteria) this; + } + + public Criteria andDefinitionIdNotEqualTo(Long value) { + addCriterion("definition_id <>", value, "definitionId"); + return (Criteria) this; + } + + public Criteria andDefinitionIdGreaterThan(Long value) { + addCriterion("definition_id >", value, "definitionId"); + return (Criteria) this; + } + + public Criteria andDefinitionIdGreaterThanOrEqualTo(Long value) { + addCriterion("definition_id >=", value, "definitionId"); + return (Criteria) this; + } + + public Criteria andDefinitionIdLessThan(Long value) { + addCriterion("definition_id <", value, "definitionId"); + return (Criteria) this; + } + + public Criteria andDefinitionIdLessThanOrEqualTo(Long value) { + addCriterion("definition_id <=", value, "definitionId"); + return (Criteria) this; + } + + public Criteria andDefinitionIdIn(List values) { + addCriterion("definition_id in", values, "definitionId"); + return (Criteria) this; + } + + public Criteria andDefinitionIdNotIn(List values) { + addCriterion("definition_id not in", values, "definitionId"); + return (Criteria) this; + } + + public Criteria andDefinitionIdBetween(Long value1, Long value2) { + addCriterion("definition_id between", value1, value2, "definitionId"); + return (Criteria) this; + } + + public Criteria andDefinitionIdNotBetween(Long value1, Long value2) { + addCriterion("definition_id not between", value1, value2, "definitionId"); + return (Criteria) this; + } + + public Criteria andOrderNumIsNull() { + addCriterion("order_num is null"); + return (Criteria) this; + } + + public Criteria andOrderNumIsNotNull() { + addCriterion("order_num is not null"); + return (Criteria) this; + } + + public Criteria andOrderNumEqualTo(Integer value) { + addCriterion("order_num =", value, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumNotEqualTo(Integer value) { + addCriterion("order_num <>", value, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumGreaterThan(Integer value) { + addCriterion("order_num >", value, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumGreaterThanOrEqualTo(Integer value) { + addCriterion("order_num >=", value, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumLessThan(Integer value) { + addCriterion("order_num <", value, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumLessThanOrEqualTo(Integer value) { + addCriterion("order_num <=", value, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumIn(List values) { + addCriterion("order_num in", values, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumNotIn(List values) { + addCriterion("order_num not in", values, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumBetween(Integer value1, Integer value2) { + addCriterion("order_num between", value1, value2, "orderNum"); + return (Criteria) this; + } + + public Criteria andOrderNumNotBetween(Integer value1, Integer value2) { + addCriterion("order_num not between", value1, value2, "orderNum"); + return (Criteria) this; + } + + public Criteria andOperateCodeIsNull() { + addCriterion("operate_code is null"); + return (Criteria) this; + } + + public Criteria andOperateCodeIsNotNull() { + addCriterion("operate_code is not null"); + return (Criteria) this; + } + + public Criteria andOperateCodeEqualTo(String value) { + addCriterion("operate_code =", value, "operateCode"); + return (Criteria) this; + } + + public Criteria andOperateCodeNotEqualTo(String value) { + addCriterion("operate_code <>", value, "operateCode"); + return (Criteria) this; + } + + public Criteria andOperateCodeGreaterThan(String value) { + addCriterion("operate_code >", value, "operateCode"); + return (Criteria) this; + } + + public Criteria andOperateCodeGreaterThanOrEqualTo(String value) { + addCriterion("operate_code >=", value, "operateCode"); + return (Criteria) this; + } + + public Criteria andOperateCodeLessThan(String value) { + addCriterion("operate_code <", value, "operateCode"); + return (Criteria) this; + } + + public Criteria andOperateCodeLessThanOrEqualTo(String value) { + addCriterion("operate_code <=", value, "operateCode"); + return (Criteria) this; + } + + public Criteria andOperateCodeLike(String value) { + addCriterion("operate_code like", value, "operateCode"); + return (Criteria) this; + } + + public Criteria andOperateCodeNotLike(String value) { + addCriterion("operate_code not like", value, "operateCode"); + return (Criteria) this; + } + + public Criteria andOperateCodeIn(List values) { + addCriterion("operate_code in", values, "operateCode"); + return (Criteria) this; + } + + public Criteria andOperateCodeNotIn(List values) { + addCriterion("operate_code not in", values, "operateCode"); + return (Criteria) this; + } + + public Criteria andOperateCodeBetween(String value1, String value2) { + addCriterion("operate_code between", value1, value2, "operateCode"); + return (Criteria) this; + } + + public Criteria andOperateCodeNotBetween(String value1, String value2) { + addCriterion("operate_code not between", value1, value2, "operateCode"); + return (Criteria) this; + } + + public Criteria andTipIsNull() { + addCriterion("tip is null"); + return (Criteria) this; + } + + public Criteria andTipIsNotNull() { + addCriterion("tip is not null"); + return (Criteria) this; + } + + public Criteria andTipEqualTo(String value) { + addCriterion("tip =", value, "tip"); + return (Criteria) this; + } + + public Criteria andTipNotEqualTo(String value) { + addCriterion("tip <>", value, "tip"); + return (Criteria) this; + } + + public Criteria andTipGreaterThan(String value) { + addCriterion("tip >", value, "tip"); + return (Criteria) this; + } + + public Criteria andTipGreaterThanOrEqualTo(String value) { + addCriterion("tip >=", value, "tip"); + return (Criteria) this; + } + + public Criteria andTipLessThan(String value) { + addCriterion("tip <", value, "tip"); + return (Criteria) this; + } + + public Criteria andTipLessThanOrEqualTo(String value) { + addCriterion("tip <=", value, "tip"); + return (Criteria) this; + } + + public Criteria andTipLike(String value) { + addCriterion("tip like", value, "tip"); + return (Criteria) this; + } + + public Criteria andTipNotLike(String value) { + addCriterion("tip not like", value, "tip"); + return (Criteria) this; + } + + public Criteria andTipIn(List values) { + addCriterion("tip in", values, "tip"); + return (Criteria) this; + } + + public Criteria andTipNotIn(List values) { + addCriterion("tip not in", values, "tip"); + return (Criteria) this; + } + + public Criteria andTipBetween(String value1, String value2) { + addCriterion("tip between", value1, value2, "tip"); + return (Criteria) this; + } + + public Criteria andTipNotBetween(String value1, String value2) { + addCriterion("tip not between", value1, value2, "tip"); + return (Criteria) this; + } + + public Criteria andDeviceTypeIsNull() { + addCriterion("device_type is null"); + return (Criteria) this; + } + + public Criteria andDeviceTypeIsNotNull() { + addCriterion("device_type is not null"); + return (Criteria) this; + } + + public Criteria andDeviceTypeEqualTo(String value) { + addCriterion("device_type =", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeNotEqualTo(String value) { + addCriterion("device_type <>", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeGreaterThan(String value) { + addCriterion("device_type >", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeGreaterThanOrEqualTo(String value) { + addCriterion("device_type >=", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeLessThan(String value) { + addCriterion("device_type <", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeLessThanOrEqualTo(String value) { + addCriterion("device_type <=", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeLike(String value) { + addCriterion("device_type like", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeNotLike(String value) { + addCriterion("device_type not like", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeIn(List values) { + addCriterion("device_type in", values, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeNotIn(List values) { + addCriterion("device_type not in", values, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeBetween(String value1, String value2) { + addCriterion("device_type between", value1, value2, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeNotBetween(String value1, String value2) { + addCriterion("device_type not between", value1, value2, "deviceType"); + return (Criteria) this; + } + + public Criteria andSubTypeIsNull() { + addCriterion("sub_type is null"); + return (Criteria) this; + } + + public Criteria andSubTypeIsNotNull() { + addCriterion("sub_type is not null"); + return (Criteria) this; + } + + public Criteria andSubTypeEqualTo(String value) { + addCriterion("sub_type =", value, "subType"); + return (Criteria) this; + } + + public Criteria andSubTypeNotEqualTo(String value) { + addCriterion("sub_type <>", value, "subType"); + return (Criteria) this; + } + + public Criteria andSubTypeGreaterThan(String value) { + addCriterion("sub_type >", value, "subType"); + return (Criteria) this; + } + + public Criteria andSubTypeGreaterThanOrEqualTo(String value) { + addCriterion("sub_type >=", value, "subType"); + return (Criteria) this; + } + + public Criteria andSubTypeLessThan(String value) { + addCriterion("sub_type <", value, "subType"); + return (Criteria) this; + } + + public Criteria andSubTypeLessThanOrEqualTo(String value) { + addCriterion("sub_type <=", value, "subType"); + return (Criteria) this; + } + + public Criteria andSubTypeLike(String value) { + addCriterion("sub_type like", value, "subType"); + return (Criteria) this; + } + + public Criteria andSubTypeNotLike(String value) { + addCriterion("sub_type not like", value, "subType"); + return (Criteria) this; + } + + public Criteria andSubTypeIn(List values) { + addCriterion("sub_type in", values, "subType"); + return (Criteria) this; + } + + public Criteria andSubTypeNotIn(List values) { + addCriterion("sub_type not in", values, "subType"); + return (Criteria) this; + } + + public Criteria andSubTypeBetween(String value1, String value2) { + addCriterion("sub_type between", value1, value2, "subType"); + return (Criteria) this; + } + + public Criteria andSubTypeNotBetween(String value1, String value2) { + addCriterion("sub_type not between", value1, value2, "subType"); + return (Criteria) this; + } + + public Criteria andValIsNull() { + addCriterion("val is null"); + return (Criteria) this; + } + + public Criteria andValIsNotNull() { + addCriterion("val is not null"); + return (Criteria) this; + } + + public Criteria andValEqualTo(String value) { + addCriterion("val =", value, "val"); + return (Criteria) this; + } + + public Criteria andValNotEqualTo(String value) { + addCriterion("val <>", value, "val"); + return (Criteria) this; + } + + public Criteria andValGreaterThan(String value) { + addCriterion("val >", value, "val"); + return (Criteria) this; + } + + public Criteria andValGreaterThanOrEqualTo(String value) { + addCriterion("val >=", value, "val"); + return (Criteria) this; + } + + public Criteria andValLessThan(String value) { + addCriterion("val <", value, "val"); + return (Criteria) this; + } + + public Criteria andValLessThanOrEqualTo(String value) { + addCriterion("val <=", value, "val"); + return (Criteria) this; + } + + public Criteria andValLike(String value) { + addCriterion("val like", value, "val"); + return (Criteria) this; + } + + public Criteria andValNotLike(String value) { + addCriterion("val not like", value, "val"); + return (Criteria) this; + } + + public Criteria andValIn(List values) { + addCriterion("val in", values, "val"); + return (Criteria) this; + } + + public Criteria andValNotIn(List values) { + addCriterion("val not in", values, "val"); + return (Criteria) this; + } + + public Criteria andValBetween(String value1, String value2) { + addCriterion("val between", value1, value2, "val"); + return (Criteria) this; + } + + public Criteria andValNotBetween(String value1, String value2) { + addCriterion("val not between", value1, value2, "val"); + return (Criteria) this; + } + + public Criteria andCodeTypeIsNull() { + addCriterion("code_Type is null"); + return (Criteria) this; + } + + public Criteria andCodeTypeIsNotNull() { + addCriterion("code_Type is not null"); + return (Criteria) this; + } + + public Criteria andCodeTypeEqualTo(String value) { + addCriterion("code_Type =", value, "codeType"); + return (Criteria) this; + } + + public Criteria andCodeTypeNotEqualTo(String value) { + addCriterion("code_Type <>", value, "codeType"); + return (Criteria) this; + } + + public Criteria andCodeTypeGreaterThan(String value) { + addCriterion("code_Type >", value, "codeType"); + return (Criteria) this; + } + + public Criteria andCodeTypeGreaterThanOrEqualTo(String value) { + addCriterion("code_Type >=", value, "codeType"); + return (Criteria) this; + } + + public Criteria andCodeTypeLessThan(String value) { + addCriterion("code_Type <", value, "codeType"); + return (Criteria) this; + } + + public Criteria andCodeTypeLessThanOrEqualTo(String value) { + addCriterion("code_Type <=", value, "codeType"); + return (Criteria) this; + } + + public Criteria andCodeTypeLike(String value) { + addCriterion("code_Type like", value, "codeType"); + return (Criteria) this; + } + + public Criteria andCodeTypeNotLike(String value) { + addCriterion("code_Type not like", value, "codeType"); + return (Criteria) this; + } + + public Criteria andCodeTypeIn(List values) { + addCriterion("code_Type in", values, "codeType"); + return (Criteria) this; + } + + public Criteria andCodeTypeNotIn(List values) { + addCriterion("code_Type not in", values, "codeType"); + return (Criteria) this; + } + + public Criteria andCodeTypeBetween(String value1, String value2) { + addCriterion("code_Type between", value1, value2, "codeType"); + return (Criteria) this; + } + + public Criteria andCodeTypeNotBetween(String value1, String value2) { + addCriterion("code_Type not between", value1, value2, "codeType"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/Organization.java b/src/main/java/club/joylink/rtss/entity/Organization.java new file mode 100644 index 000000000..80bcad8bf --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/Organization.java @@ -0,0 +1,72 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * organization + * @author + */ +public class Organization implements Serializable { + private Long id; + + /** + * 组织/企业名称 + */ + private String name; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + Organization other = (Organization) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", name=").append(name); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/OrganizationExample.java b/src/main/java/club/joylink/rtss/entity/OrganizationExample.java new file mode 100644 index 000000000..b395bc8c8 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/OrganizationExample.java @@ -0,0 +1,352 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class OrganizationExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public OrganizationExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/Permission.java b/src/main/java/club/joylink/rtss/entity/Permission.java new file mode 100644 index 000000000..95a47896c --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/Permission.java @@ -0,0 +1,243 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * permission + * @author + */ +public class Permission implements Serializable { + private Long id; + + /** + * 权限名称 + */ + private String name; + + private Boolean isPackage; + + private String relPermissions; + + /** + * 权限类型 + */ + private String type; + + /** + * 地图id + */ + private Long mapId; + + /** + * 产品类型 + */ + private String prdType; + + /** + * 课程id + */ + private Long lessonId; + + /** + * 创建者 + */ + private Long creatorId; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + /** + * 更新者 + */ + private Long updateUserId; + + /** + * 更新时间 + */ + private LocalDateTime updateTime; + + /** + * 描述 + */ + private String remarks; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Boolean getIsPackage() { + return isPackage; + } + + public void setIsPackage(Boolean isPackage) { + this.isPackage = isPackage; + } + + public String getRelPermissions() { + return relPermissions; + } + + public void setRelPermissions(String relPermissions) { + this.relPermissions = relPermissions; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Long getMapId() { + return mapId; + } + + public void setMapId(Long mapId) { + this.mapId = mapId; + } + + public String getPrdType() { + return prdType; + } + + public void setPrdType(String prdType) { + this.prdType = prdType; + } + + public Long getLessonId() { + return lessonId; + } + + public void setLessonId(Long lessonId) { + this.lessonId = lessonId; + } + + public Long getCreatorId() { + return creatorId; + } + + public void setCreatorId(Long creatorId) { + this.creatorId = creatorId; + } + + public LocalDateTime getCreateTime() { + return createTime; + } + + public void setCreateTime(LocalDateTime createTime) { + this.createTime = createTime; + } + + public Long getUpdateUserId() { + return updateUserId; + } + + public void setUpdateUserId(Long updateUserId) { + this.updateUserId = updateUserId; + } + + public LocalDateTime getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(LocalDateTime updateTime) { + this.updateTime = updateTime; + } + + public String getRemarks() { + return remarks; + } + + public void setRemarks(String remarks) { + this.remarks = remarks; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + Permission other = (Permission) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getIsPackage() == null ? other.getIsPackage() == null : this.getIsPackage().equals(other.getIsPackage())) + && (this.getRelPermissions() == null ? other.getRelPermissions() == null : this.getRelPermissions().equals(other.getRelPermissions())) + && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getPrdType() == null ? other.getPrdType() == null : this.getPrdType().equals(other.getPrdType())) + && (this.getLessonId() == null ? other.getLessonId() == null : this.getLessonId().equals(other.getLessonId())) + && (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getUpdateUserId() == null ? other.getUpdateUserId() == null : this.getUpdateUserId().equals(other.getUpdateUserId())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) + && (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getIsPackage() == null) ? 0 : getIsPackage().hashCode()); + result = prime * result + ((getRelPermissions() == null) ? 0 : getRelPermissions().hashCode()); + result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getPrdType() == null) ? 0 : getPrdType().hashCode()); + result = prime * result + ((getLessonId() == null) ? 0 : getLessonId().hashCode()); + result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getUpdateUserId() == null) ? 0 : getUpdateUserId().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", name=").append(name); + sb.append(", isPackage=").append(isPackage); + sb.append(", relPermissions=").append(relPermissions); + sb.append(", type=").append(type); + sb.append(", mapId=").append(mapId); + sb.append(", prdType=").append(prdType); + sb.append(", lessonId=").append(lessonId); + sb.append(", creatorId=").append(creatorId); + sb.append(", createTime=").append(createTime); + sb.append(", updateUserId=").append(updateUserId); + sb.append(", updateTime=").append(updateTime); + sb.append(", remarks=").append(remarks); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/PermissionDistribute.java b/src/main/java/club/joylink/rtss/entity/PermissionDistribute.java new file mode 100644 index 000000000..9dbf0047a --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/PermissionDistribute.java @@ -0,0 +1,329 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * permission_distribute + * @author + */ +public class PermissionDistribute implements Serializable { + private Long id; + + /** + * 权限类型 + */ + private Long permissionId; + + /** + * 订单编号 + */ + private String orderCode; + + /** + * 组织/企业ID + */ + private Long organizationId; + + /** + * 用户id + */ + private Long userId; + + /** + * 权限分发总数 + */ + private Integer amount; + + /** + * 权限分发剩余数量 + */ + private Integer remains; + + /** + * 是否永久:true/false + */ + private Boolean forever; + + /** + * 开始时间 + */ + private LocalDateTime startTime; + + /** + * 结束时间 + */ + private LocalDateTime endTime; + + /** + * 状态:0-无效,1-有效 + */ + private String status; + + /** + * 权限是否可以转赠 + */ + private Boolean canDistribute; + + /** + * 是否分发包 + */ + private Boolean isPackage; + + /** + * 父级ID + */ + private Long parentId; + + /** + * 来源(数据字典) + */ + private String source; + + /** + * 分发包为专用分发时是否只能获取一个权限 + */ + private Boolean onlyGetOne; + + /** + * 来自哪个用户权限 + */ + private Long fromUserPermissionId; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getPermissionId() { + return permissionId; + } + + public void setPermissionId(Long permissionId) { + this.permissionId = permissionId; + } + + public String getOrderCode() { + return orderCode; + } + + public void setOrderCode(String orderCode) { + this.orderCode = orderCode; + } + + public Long getOrganizationId() { + return organizationId; + } + + public void setOrganizationId(Long organizationId) { + this.organizationId = organizationId; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public Integer getAmount() { + return amount; + } + + public void setAmount(Integer amount) { + this.amount = amount; + } + + public Integer getRemains() { + return remains; + } + + public void setRemains(Integer remains) { + this.remains = remains; + } + + public Boolean getForever() { + return forever; + } + + public void setForever(Boolean forever) { + this.forever = forever; + } + + public LocalDateTime getStartTime() { + return startTime; + } + + public void setStartTime(LocalDateTime startTime) { + this.startTime = startTime; + } + + public LocalDateTime getEndTime() { + return endTime; + } + + public void setEndTime(LocalDateTime endTime) { + this.endTime = endTime; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public Boolean getCanDistribute() { + return canDistribute; + } + + public void setCanDistribute(Boolean canDistribute) { + this.canDistribute = canDistribute; + } + + public Boolean getIsPackage() { + return isPackage; + } + + public void setIsPackage(Boolean isPackage) { + this.isPackage = isPackage; + } + + public Long getParentId() { + return parentId; + } + + public void setParentId(Long parentId) { + this.parentId = parentId; + } + + public String getSource() { + return source; + } + + public void setSource(String source) { + this.source = source; + } + + public Boolean getOnlyGetOne() { + return onlyGetOne; + } + + public void setOnlyGetOne(Boolean onlyGetOne) { + this.onlyGetOne = onlyGetOne; + } + + public Long getFromUserPermissionId() { + return fromUserPermissionId; + } + + public void setFromUserPermissionId(Long fromUserPermissionId) { + this.fromUserPermissionId = fromUserPermissionId; + } + + public LocalDateTime getCreateTime() { + return createTime; + } + + public void setCreateTime(LocalDateTime createTime) { + this.createTime = createTime; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + PermissionDistribute other = (PermissionDistribute) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getPermissionId() == null ? other.getPermissionId() == null : this.getPermissionId().equals(other.getPermissionId())) + && (this.getOrderCode() == null ? other.getOrderCode() == null : this.getOrderCode().equals(other.getOrderCode())) + && (this.getOrganizationId() == null ? other.getOrganizationId() == null : this.getOrganizationId().equals(other.getOrganizationId())) + && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) + && (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount())) + && (this.getRemains() == null ? other.getRemains() == null : this.getRemains().equals(other.getRemains())) + && (this.getForever() == null ? other.getForever() == null : this.getForever().equals(other.getForever())) + && (this.getStartTime() == null ? other.getStartTime() == null : this.getStartTime().equals(other.getStartTime())) + && (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getCanDistribute() == null ? other.getCanDistribute() == null : this.getCanDistribute().equals(other.getCanDistribute())) + && (this.getIsPackage() == null ? other.getIsPackage() == null : this.getIsPackage().equals(other.getIsPackage())) + && (this.getParentId() == null ? other.getParentId() == null : this.getParentId().equals(other.getParentId())) + && (this.getSource() == null ? other.getSource() == null : this.getSource().equals(other.getSource())) + && (this.getOnlyGetOne() == null ? other.getOnlyGetOne() == null : this.getOnlyGetOne().equals(other.getOnlyGetOne())) + && (this.getFromUserPermissionId() == null ? other.getFromUserPermissionId() == null : this.getFromUserPermissionId().equals(other.getFromUserPermissionId())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getPermissionId() == null) ? 0 : getPermissionId().hashCode()); + result = prime * result + ((getOrderCode() == null) ? 0 : getOrderCode().hashCode()); + result = prime * result + ((getOrganizationId() == null) ? 0 : getOrganizationId().hashCode()); + result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); + result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode()); + result = prime * result + ((getRemains() == null) ? 0 : getRemains().hashCode()); + result = prime * result + ((getForever() == null) ? 0 : getForever().hashCode()); + result = prime * result + ((getStartTime() == null) ? 0 : getStartTime().hashCode()); + result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getCanDistribute() == null) ? 0 : getCanDistribute().hashCode()); + result = prime * result + ((getIsPackage() == null) ? 0 : getIsPackage().hashCode()); + result = prime * result + ((getParentId() == null) ? 0 : getParentId().hashCode()); + result = prime * result + ((getSource() == null) ? 0 : getSource().hashCode()); + result = prime * result + ((getOnlyGetOne() == null) ? 0 : getOnlyGetOne().hashCode()); + result = prime * result + ((getFromUserPermissionId() == null) ? 0 : getFromUserPermissionId().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", permissionId=").append(permissionId); + sb.append(", orderCode=").append(orderCode); + sb.append(", organizationId=").append(organizationId); + sb.append(", userId=").append(userId); + sb.append(", amount=").append(amount); + sb.append(", remains=").append(remains); + sb.append(", forever=").append(forever); + sb.append(", startTime=").append(startTime); + sb.append(", endTime=").append(endTime); + sb.append(", status=").append(status); + sb.append(", canDistribute=").append(canDistribute); + sb.append(", isPackage=").append(isPackage); + sb.append(", parentId=").append(parentId); + sb.append(", source=").append(source); + sb.append(", onlyGetOne=").append(onlyGetOne); + sb.append(", fromUserPermissionId=").append(fromUserPermissionId); + sb.append(", createTime=").append(createTime); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/PermissionDistributeExample.java b/src/main/java/club/joylink/rtss/entity/PermissionDistributeExample.java new file mode 100644 index 000000000..17affe706 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/PermissionDistributeExample.java @@ -0,0 +1,1333 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class PermissionDistributeExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public PermissionDistributeExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andPermissionIdIsNull() { + addCriterion("permission_id is null"); + return (Criteria) this; + } + + public Criteria andPermissionIdIsNotNull() { + addCriterion("permission_id is not null"); + return (Criteria) this; + } + + public Criteria andPermissionIdEqualTo(Long value) { + addCriterion("permission_id =", value, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdNotEqualTo(Long value) { + addCriterion("permission_id <>", value, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdGreaterThan(Long value) { + addCriterion("permission_id >", value, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdGreaterThanOrEqualTo(Long value) { + addCriterion("permission_id >=", value, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdLessThan(Long value) { + addCriterion("permission_id <", value, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdLessThanOrEqualTo(Long value) { + addCriterion("permission_id <=", value, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdIn(List values) { + addCriterion("permission_id in", values, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdNotIn(List values) { + addCriterion("permission_id not in", values, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdBetween(Long value1, Long value2) { + addCriterion("permission_id between", value1, value2, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdNotBetween(Long value1, Long value2) { + addCriterion("permission_id not between", value1, value2, "permissionId"); + return (Criteria) this; + } + + public Criteria andOrderCodeIsNull() { + addCriterion("order_code is null"); + return (Criteria) this; + } + + public Criteria andOrderCodeIsNotNull() { + addCriterion("order_code is not null"); + return (Criteria) this; + } + + public Criteria andOrderCodeEqualTo(String value) { + addCriterion("order_code =", value, "orderCode"); + return (Criteria) this; + } + + public Criteria andOrderCodeNotEqualTo(String value) { + addCriterion("order_code <>", value, "orderCode"); + return (Criteria) this; + } + + public Criteria andOrderCodeGreaterThan(String value) { + addCriterion("order_code >", value, "orderCode"); + return (Criteria) this; + } + + public Criteria andOrderCodeGreaterThanOrEqualTo(String value) { + addCriterion("order_code >=", value, "orderCode"); + return (Criteria) this; + } + + public Criteria andOrderCodeLessThan(String value) { + addCriterion("order_code <", value, "orderCode"); + return (Criteria) this; + } + + public Criteria andOrderCodeLessThanOrEqualTo(String value) { + addCriterion("order_code <=", value, "orderCode"); + return (Criteria) this; + } + + public Criteria andOrderCodeLike(String value) { + addCriterion("order_code like", value, "orderCode"); + return (Criteria) this; + } + + public Criteria andOrderCodeNotLike(String value) { + addCriterion("order_code not like", value, "orderCode"); + return (Criteria) this; + } + + public Criteria andOrderCodeIn(List values) { + addCriterion("order_code in", values, "orderCode"); + return (Criteria) this; + } + + public Criteria andOrderCodeNotIn(List values) { + addCriterion("order_code not in", values, "orderCode"); + return (Criteria) this; + } + + public Criteria andOrderCodeBetween(String value1, String value2) { + addCriterion("order_code between", value1, value2, "orderCode"); + return (Criteria) this; + } + + public Criteria andOrderCodeNotBetween(String value1, String value2) { + addCriterion("order_code not between", value1, value2, "orderCode"); + return (Criteria) this; + } + + public Criteria andOrganizationIdIsNull() { + addCriterion("organization_id is null"); + return (Criteria) this; + } + + public Criteria andOrganizationIdIsNotNull() { + addCriterion("organization_id is not null"); + return (Criteria) this; + } + + public Criteria andOrganizationIdEqualTo(Long value) { + addCriterion("organization_id =", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdNotEqualTo(Long value) { + addCriterion("organization_id <>", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdGreaterThan(Long value) { + addCriterion("organization_id >", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdGreaterThanOrEqualTo(Long value) { + addCriterion("organization_id >=", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdLessThan(Long value) { + addCriterion("organization_id <", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdLessThanOrEqualTo(Long value) { + addCriterion("organization_id <=", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdIn(List values) { + addCriterion("organization_id in", values, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdNotIn(List values) { + addCriterion("organization_id not in", values, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdBetween(Long value1, Long value2) { + addCriterion("organization_id between", value1, value2, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdNotBetween(Long value1, Long value2) { + addCriterion("organization_id not between", value1, value2, "organizationId"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andAmountIsNull() { + addCriterion("amount is null"); + return (Criteria) this; + } + + public Criteria andAmountIsNotNull() { + addCriterion("amount is not null"); + return (Criteria) this; + } + + public Criteria andAmountEqualTo(Integer value) { + addCriterion("amount =", value, "amount"); + return (Criteria) this; + } + + public Criteria andAmountNotEqualTo(Integer value) { + addCriterion("amount <>", value, "amount"); + return (Criteria) this; + } + + public Criteria andAmountGreaterThan(Integer value) { + addCriterion("amount >", value, "amount"); + return (Criteria) this; + } + + public Criteria andAmountGreaterThanOrEqualTo(Integer value) { + addCriterion("amount >=", value, "amount"); + return (Criteria) this; + } + + public Criteria andAmountLessThan(Integer value) { + addCriterion("amount <", value, "amount"); + return (Criteria) this; + } + + public Criteria andAmountLessThanOrEqualTo(Integer value) { + addCriterion("amount <=", value, "amount"); + return (Criteria) this; + } + + public Criteria andAmountIn(List values) { + addCriterion("amount in", values, "amount"); + return (Criteria) this; + } + + public Criteria andAmountNotIn(List values) { + addCriterion("amount not in", values, "amount"); + return (Criteria) this; + } + + public Criteria andAmountBetween(Integer value1, Integer value2) { + addCriterion("amount between", value1, value2, "amount"); + return (Criteria) this; + } + + public Criteria andAmountNotBetween(Integer value1, Integer value2) { + addCriterion("amount not between", value1, value2, "amount"); + return (Criteria) this; + } + + public Criteria andRemainsIsNull() { + addCriterion("remains is null"); + return (Criteria) this; + } + + public Criteria andRemainsIsNotNull() { + addCriterion("remains is not null"); + return (Criteria) this; + } + + public Criteria andRemainsEqualTo(Integer value) { + addCriterion("remains =", value, "remains"); + return (Criteria) this; + } + + public Criteria andRemainsNotEqualTo(Integer value) { + addCriterion("remains <>", value, "remains"); + return (Criteria) this; + } + + public Criteria andRemainsGreaterThan(Integer value) { + addCriterion("remains >", value, "remains"); + return (Criteria) this; + } + + public Criteria andRemainsGreaterThanOrEqualTo(Integer value) { + addCriterion("remains >=", value, "remains"); + return (Criteria) this; + } + + public Criteria andRemainsLessThan(Integer value) { + addCriterion("remains <", value, "remains"); + return (Criteria) this; + } + + public Criteria andRemainsLessThanOrEqualTo(Integer value) { + addCriterion("remains <=", value, "remains"); + return (Criteria) this; + } + + public Criteria andRemainsIn(List values) { + addCriterion("remains in", values, "remains"); + return (Criteria) this; + } + + public Criteria andRemainsNotIn(List values) { + addCriterion("remains not in", values, "remains"); + return (Criteria) this; + } + + public Criteria andRemainsBetween(Integer value1, Integer value2) { + addCriterion("remains between", value1, value2, "remains"); + return (Criteria) this; + } + + public Criteria andRemainsNotBetween(Integer value1, Integer value2) { + addCriterion("remains not between", value1, value2, "remains"); + return (Criteria) this; + } + + public Criteria andForeverIsNull() { + addCriterion("forever is null"); + return (Criteria) this; + } + + public Criteria andForeverIsNotNull() { + addCriterion("forever is not null"); + return (Criteria) this; + } + + public Criteria andForeverEqualTo(Boolean value) { + addCriterion("forever =", value, "forever"); + return (Criteria) this; + } + + public Criteria andForeverNotEqualTo(Boolean value) { + addCriterion("forever <>", value, "forever"); + return (Criteria) this; + } + + public Criteria andForeverGreaterThan(Boolean value) { + addCriterion("forever >", value, "forever"); + return (Criteria) this; + } + + public Criteria andForeverGreaterThanOrEqualTo(Boolean value) { + addCriterion("forever >=", value, "forever"); + return (Criteria) this; + } + + public Criteria andForeverLessThan(Boolean value) { + addCriterion("forever <", value, "forever"); + return (Criteria) this; + } + + public Criteria andForeverLessThanOrEqualTo(Boolean value) { + addCriterion("forever <=", value, "forever"); + return (Criteria) this; + } + + public Criteria andForeverIn(List values) { + addCriterion("forever in", values, "forever"); + return (Criteria) this; + } + + public Criteria andForeverNotIn(List values) { + addCriterion("forever not in", values, "forever"); + return (Criteria) this; + } + + public Criteria andForeverBetween(Boolean value1, Boolean value2) { + addCriterion("forever between", value1, value2, "forever"); + return (Criteria) this; + } + + public Criteria andForeverNotBetween(Boolean value1, Boolean value2) { + addCriterion("forever not between", value1, value2, "forever"); + return (Criteria) this; + } + + public Criteria andStartTimeIsNull() { + addCriterion("start_time is null"); + return (Criteria) this; + } + + public Criteria andStartTimeIsNotNull() { + addCriterion("start_time is not null"); + return (Criteria) this; + } + + public Criteria andStartTimeEqualTo(LocalDateTime value) { + addCriterion("start_time =", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotEqualTo(LocalDateTime value) { + addCriterion("start_time <>", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeGreaterThan(LocalDateTime value) { + addCriterion("start_time >", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("start_time >=", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeLessThan(LocalDateTime value) { + addCriterion("start_time <", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("start_time <=", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeIn(List values) { + addCriterion("start_time in", values, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotIn(List values) { + addCriterion("start_time not in", values, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("start_time between", value1, value2, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("start_time not between", value1, value2, "startTime"); + return (Criteria) this; + } + + public Criteria andEndTimeIsNull() { + addCriterion("end_time is null"); + return (Criteria) this; + } + + public Criteria andEndTimeIsNotNull() { + addCriterion("end_time is not null"); + return (Criteria) this; + } + + public Criteria andEndTimeEqualTo(LocalDateTime value) { + addCriterion("end_time =", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeNotEqualTo(LocalDateTime value) { + addCriterion("end_time <>", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeGreaterThan(LocalDateTime value) { + addCriterion("end_time >", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("end_time >=", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeLessThan(LocalDateTime value) { + addCriterion("end_time <", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("end_time <=", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeIn(List values) { + addCriterion("end_time in", values, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeNotIn(List values) { + addCriterion("end_time not in", values, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("end_time between", value1, value2, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("end_time not between", value1, value2, "endTime"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andCanDistributeIsNull() { + addCriterion("can_distribute is null"); + return (Criteria) this; + } + + public Criteria andCanDistributeIsNotNull() { + addCriterion("can_distribute is not null"); + return (Criteria) this; + } + + public Criteria andCanDistributeEqualTo(Boolean value) { + addCriterion("can_distribute =", value, "canDistribute"); + return (Criteria) this; + } + + public Criteria andCanDistributeNotEqualTo(Boolean value) { + addCriterion("can_distribute <>", value, "canDistribute"); + return (Criteria) this; + } + + public Criteria andCanDistributeGreaterThan(Boolean value) { + addCriterion("can_distribute >", value, "canDistribute"); + return (Criteria) this; + } + + public Criteria andCanDistributeGreaterThanOrEqualTo(Boolean value) { + addCriterion("can_distribute >=", value, "canDistribute"); + return (Criteria) this; + } + + public Criteria andCanDistributeLessThan(Boolean value) { + addCriterion("can_distribute <", value, "canDistribute"); + return (Criteria) this; + } + + public Criteria andCanDistributeLessThanOrEqualTo(Boolean value) { + addCriterion("can_distribute <=", value, "canDistribute"); + return (Criteria) this; + } + + public Criteria andCanDistributeIn(List values) { + addCriterion("can_distribute in", values, "canDistribute"); + return (Criteria) this; + } + + public Criteria andCanDistributeNotIn(List values) { + addCriterion("can_distribute not in", values, "canDistribute"); + return (Criteria) this; + } + + public Criteria andCanDistributeBetween(Boolean value1, Boolean value2) { + addCriterion("can_distribute between", value1, value2, "canDistribute"); + return (Criteria) this; + } + + public Criteria andCanDistributeNotBetween(Boolean value1, Boolean value2) { + addCriterion("can_distribute not between", value1, value2, "canDistribute"); + return (Criteria) this; + } + + public Criteria andIsPackageIsNull() { + addCriterion("is_package is null"); + return (Criteria) this; + } + + public Criteria andIsPackageIsNotNull() { + addCriterion("is_package is not null"); + return (Criteria) this; + } + + public Criteria andIsPackageEqualTo(Boolean value) { + addCriterion("is_package =", value, "isPackage"); + return (Criteria) this; + } + + public Criteria andIsPackageNotEqualTo(Boolean value) { + addCriterion("is_package <>", value, "isPackage"); + return (Criteria) this; + } + + public Criteria andIsPackageGreaterThan(Boolean value) { + addCriterion("is_package >", value, "isPackage"); + return (Criteria) this; + } + + public Criteria andIsPackageGreaterThanOrEqualTo(Boolean value) { + addCriterion("is_package >=", value, "isPackage"); + return (Criteria) this; + } + + public Criteria andIsPackageLessThan(Boolean value) { + addCriterion("is_package <", value, "isPackage"); + return (Criteria) this; + } + + public Criteria andIsPackageLessThanOrEqualTo(Boolean value) { + addCriterion("is_package <=", value, "isPackage"); + return (Criteria) this; + } + + public Criteria andIsPackageIn(List values) { + addCriterion("is_package in", values, "isPackage"); + return (Criteria) this; + } + + public Criteria andIsPackageNotIn(List values) { + addCriterion("is_package not in", values, "isPackage"); + return (Criteria) this; + } + + public Criteria andIsPackageBetween(Boolean value1, Boolean value2) { + addCriterion("is_package between", value1, value2, "isPackage"); + return (Criteria) this; + } + + public Criteria andIsPackageNotBetween(Boolean value1, Boolean value2) { + addCriterion("is_package not between", value1, value2, "isPackage"); + return (Criteria) this; + } + + public Criteria andParentIdIsNull() { + addCriterion("parent_id is null"); + return (Criteria) this; + } + + public Criteria andParentIdIsNotNull() { + addCriterion("parent_id is not null"); + return (Criteria) this; + } + + public Criteria andParentIdEqualTo(Long value) { + addCriterion("parent_id =", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotEqualTo(Long value) { + addCriterion("parent_id <>", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThan(Long value) { + addCriterion("parent_id >", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThanOrEqualTo(Long value) { + addCriterion("parent_id >=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThan(Long value) { + addCriterion("parent_id <", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThanOrEqualTo(Long value) { + addCriterion("parent_id <=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdIn(List values) { + addCriterion("parent_id in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotIn(List values) { + addCriterion("parent_id not in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdBetween(Long value1, Long value2) { + addCriterion("parent_id between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotBetween(Long value1, Long value2) { + addCriterion("parent_id not between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andSourceIsNull() { + addCriterion("`source` is null"); + return (Criteria) this; + } + + public Criteria andSourceIsNotNull() { + addCriterion("`source` is not null"); + return (Criteria) this; + } + + public Criteria andSourceEqualTo(String value) { + addCriterion("`source` =", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceNotEqualTo(String value) { + addCriterion("`source` <>", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceGreaterThan(String value) { + addCriterion("`source` >", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceGreaterThanOrEqualTo(String value) { + addCriterion("`source` >=", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceLessThan(String value) { + addCriterion("`source` <", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceLessThanOrEqualTo(String value) { + addCriterion("`source` <=", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceLike(String value) { + addCriterion("`source` like", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceNotLike(String value) { + addCriterion("`source` not like", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceIn(List values) { + addCriterion("`source` in", values, "source"); + return (Criteria) this; + } + + public Criteria andSourceNotIn(List values) { + addCriterion("`source` not in", values, "source"); + return (Criteria) this; + } + + public Criteria andSourceBetween(String value1, String value2) { + addCriterion("`source` between", value1, value2, "source"); + return (Criteria) this; + } + + public Criteria andSourceNotBetween(String value1, String value2) { + addCriterion("`source` not between", value1, value2, "source"); + return (Criteria) this; + } + + public Criteria andOnlyGetOneIsNull() { + addCriterion("only_get_one is null"); + return (Criteria) this; + } + + public Criteria andOnlyGetOneIsNotNull() { + addCriterion("only_get_one is not null"); + return (Criteria) this; + } + + public Criteria andOnlyGetOneEqualTo(Boolean value) { + addCriterion("only_get_one =", value, "onlyGetOne"); + return (Criteria) this; + } + + public Criteria andOnlyGetOneNotEqualTo(Boolean value) { + addCriterion("only_get_one <>", value, "onlyGetOne"); + return (Criteria) this; + } + + public Criteria andOnlyGetOneGreaterThan(Boolean value) { + addCriterion("only_get_one >", value, "onlyGetOne"); + return (Criteria) this; + } + + public Criteria andOnlyGetOneGreaterThanOrEqualTo(Boolean value) { + addCriterion("only_get_one >=", value, "onlyGetOne"); + return (Criteria) this; + } + + public Criteria andOnlyGetOneLessThan(Boolean value) { + addCriterion("only_get_one <", value, "onlyGetOne"); + return (Criteria) this; + } + + public Criteria andOnlyGetOneLessThanOrEqualTo(Boolean value) { + addCriterion("only_get_one <=", value, "onlyGetOne"); + return (Criteria) this; + } + + public Criteria andOnlyGetOneIn(List values) { + addCriterion("only_get_one in", values, "onlyGetOne"); + return (Criteria) this; + } + + public Criteria andOnlyGetOneNotIn(List values) { + addCriterion("only_get_one not in", values, "onlyGetOne"); + return (Criteria) this; + } + + public Criteria andOnlyGetOneBetween(Boolean value1, Boolean value2) { + addCriterion("only_get_one between", value1, value2, "onlyGetOne"); + return (Criteria) this; + } + + public Criteria andOnlyGetOneNotBetween(Boolean value1, Boolean value2) { + addCriterion("only_get_one not between", value1, value2, "onlyGetOne"); + return (Criteria) this; + } + + public Criteria andFromUserPermissionIdIsNull() { + addCriterion("from_user_permission_id is null"); + return (Criteria) this; + } + + public Criteria andFromUserPermissionIdIsNotNull() { + addCriterion("from_user_permission_id is not null"); + return (Criteria) this; + } + + public Criteria andFromUserPermissionIdEqualTo(Long value) { + addCriterion("from_user_permission_id =", value, "fromUserPermissionId"); + return (Criteria) this; + } + + public Criteria andFromUserPermissionIdNotEqualTo(Long value) { + addCriterion("from_user_permission_id <>", value, "fromUserPermissionId"); + return (Criteria) this; + } + + public Criteria andFromUserPermissionIdGreaterThan(Long value) { + addCriterion("from_user_permission_id >", value, "fromUserPermissionId"); + return (Criteria) this; + } + + public Criteria andFromUserPermissionIdGreaterThanOrEqualTo(Long value) { + addCriterion("from_user_permission_id >=", value, "fromUserPermissionId"); + return (Criteria) this; + } + + public Criteria andFromUserPermissionIdLessThan(Long value) { + addCriterion("from_user_permission_id <", value, "fromUserPermissionId"); + return (Criteria) this; + } + + public Criteria andFromUserPermissionIdLessThanOrEqualTo(Long value) { + addCriterion("from_user_permission_id <=", value, "fromUserPermissionId"); + return (Criteria) this; + } + + public Criteria andFromUserPermissionIdIn(List values) { + addCriterion("from_user_permission_id in", values, "fromUserPermissionId"); + return (Criteria) this; + } + + public Criteria andFromUserPermissionIdNotIn(List values) { + addCriterion("from_user_permission_id not in", values, "fromUserPermissionId"); + return (Criteria) this; + } + + public Criteria andFromUserPermissionIdBetween(Long value1, Long value2) { + addCriterion("from_user_permission_id between", value1, value2, "fromUserPermissionId"); + return (Criteria) this; + } + + public Criteria andFromUserPermissionIdNotBetween(Long value1, Long value2) { + addCriterion("from_user_permission_id not between", value1, value2, "fromUserPermissionId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(LocalDateTime value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(LocalDateTime value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(LocalDateTime value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(LocalDateTime value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/PermissionDistributeRel.java b/src/main/java/club/joylink/rtss/entity/PermissionDistributeRel.java new file mode 100644 index 000000000..12fb9aa11 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/PermissionDistributeRel.java @@ -0,0 +1,120 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * permission_distribute_rel + * @author + */ +public class PermissionDistributeRel implements Serializable { + private Long id; + + /** + * 权限分发id + */ + private Long distributeId; + + /** + * 权限id + */ + private Long userPermissionId; + + /** + * 使用的数量 + */ + private Integer amount; + + /** + * 使用剩余数量 + */ + private Integer remains; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getDistributeId() { + return distributeId; + } + + public void setDistributeId(Long distributeId) { + this.distributeId = distributeId; + } + + public Long getUserPermissionId() { + return userPermissionId; + } + + public void setUserPermissionId(Long userPermissionId) { + this.userPermissionId = userPermissionId; + } + + public Integer getAmount() { + return amount; + } + + public void setAmount(Integer amount) { + this.amount = amount; + } + + public Integer getRemains() { + return remains; + } + + public void setRemains(Integer remains) { + this.remains = remains; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + PermissionDistributeRel other = (PermissionDistributeRel) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getDistributeId() == null ? other.getDistributeId() == null : this.getDistributeId().equals(other.getDistributeId())) + && (this.getUserPermissionId() == null ? other.getUserPermissionId() == null : this.getUserPermissionId().equals(other.getUserPermissionId())) + && (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount())) + && (this.getRemains() == null ? other.getRemains() == null : this.getRemains().equals(other.getRemains())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getDistributeId() == null) ? 0 : getDistributeId().hashCode()); + result = prime * result + ((getUserPermissionId() == null) ? 0 : getUserPermissionId().hashCode()); + result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode()); + result = prime * result + ((getRemains() == null) ? 0 : getRemains().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", distributeId=").append(distributeId); + sb.append(", userPermissionId=").append(userPermissionId); + sb.append(", goodsAmount=").append(amount); + sb.append(", remains=").append(remains); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/PermissionDistributeRelExample.java b/src/main/java/club/joylink/rtss/entity/PermissionDistributeRelExample.java new file mode 100644 index 000000000..cd0d766dc --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/PermissionDistributeRelExample.java @@ -0,0 +1,522 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class PermissionDistributeRelExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public PermissionDistributeRelExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andDistributeIdIsNull() { + addCriterion("distribute_id is null"); + return (Criteria) this; + } + + public Criteria andDistributeIdIsNotNull() { + addCriterion("distribute_id is not null"); + return (Criteria) this; + } + + public Criteria andDistributeIdEqualTo(Long value) { + addCriterion("distribute_id =", value, "distributeId"); + return (Criteria) this; + } + + public Criteria andDistributeIdNotEqualTo(Long value) { + addCriterion("distribute_id <>", value, "distributeId"); + return (Criteria) this; + } + + public Criteria andDistributeIdGreaterThan(Long value) { + addCriterion("distribute_id >", value, "distributeId"); + return (Criteria) this; + } + + public Criteria andDistributeIdGreaterThanOrEqualTo(Long value) { + addCriterion("distribute_id >=", value, "distributeId"); + return (Criteria) this; + } + + public Criteria andDistributeIdLessThan(Long value) { + addCriterion("distribute_id <", value, "distributeId"); + return (Criteria) this; + } + + public Criteria andDistributeIdLessThanOrEqualTo(Long value) { + addCriterion("distribute_id <=", value, "distributeId"); + return (Criteria) this; + } + + public Criteria andDistributeIdIn(List values) { + addCriterion("distribute_id in", values, "distributeId"); + return (Criteria) this; + } + + public Criteria andDistributeIdNotIn(List values) { + addCriterion("distribute_id not in", values, "distributeId"); + return (Criteria) this; + } + + public Criteria andDistributeIdBetween(Long value1, Long value2) { + addCriterion("distribute_id between", value1, value2, "distributeId"); + return (Criteria) this; + } + + public Criteria andDistributeIdNotBetween(Long value1, Long value2) { + addCriterion("distribute_id not between", value1, value2, "distributeId"); + return (Criteria) this; + } + + public Criteria andUserPermissionIdIsNull() { + addCriterion("user_permission_id is null"); + return (Criteria) this; + } + + public Criteria andUserPermissionIdIsNotNull() { + addCriterion("user_permission_id is not null"); + return (Criteria) this; + } + + public Criteria andUserPermissionIdEqualTo(Long value) { + addCriterion("user_permission_id =", value, "userPermissionId"); + return (Criteria) this; + } + + public Criteria andUserPermissionIdNotEqualTo(Long value) { + addCriterion("user_permission_id <>", value, "userPermissionId"); + return (Criteria) this; + } + + public Criteria andUserPermissionIdGreaterThan(Long value) { + addCriterion("user_permission_id >", value, "userPermissionId"); + return (Criteria) this; + } + + public Criteria andUserPermissionIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_permission_id >=", value, "userPermissionId"); + return (Criteria) this; + } + + public Criteria andUserPermissionIdLessThan(Long value) { + addCriterion("user_permission_id <", value, "userPermissionId"); + return (Criteria) this; + } + + public Criteria andUserPermissionIdLessThanOrEqualTo(Long value) { + addCriterion("user_permission_id <=", value, "userPermissionId"); + return (Criteria) this; + } + + public Criteria andUserPermissionIdIn(List values) { + addCriterion("user_permission_id in", values, "userPermissionId"); + return (Criteria) this; + } + + public Criteria andUserPermissionIdNotIn(List values) { + addCriterion("user_permission_id not in", values, "userPermissionId"); + return (Criteria) this; + } + + public Criteria andUserPermissionIdBetween(Long value1, Long value2) { + addCriterion("user_permission_id between", value1, value2, "userPermissionId"); + return (Criteria) this; + } + + public Criteria andUserPermissionIdNotBetween(Long value1, Long value2) { + addCriterion("user_permission_id not between", value1, value2, "userPermissionId"); + return (Criteria) this; + } + + public Criteria andAmountIsNull() { + addCriterion("goodsAmount is null"); + return (Criteria) this; + } + + public Criteria andAmountIsNotNull() { + addCriterion("goodsAmount is not null"); + return (Criteria) this; + } + + public Criteria andAmountEqualTo(Integer value) { + addCriterion("goodsAmount =", value, "goodsAmount"); + return (Criteria) this; + } + + public Criteria andAmountNotEqualTo(Integer value) { + addCriterion("goodsAmount <>", value, "goodsAmount"); + return (Criteria) this; + } + + public Criteria andAmountGreaterThan(Integer value) { + addCriterion("goodsAmount >", value, "goodsAmount"); + return (Criteria) this; + } + + public Criteria andAmountGreaterThanOrEqualTo(Integer value) { + addCriterion("goodsAmount >=", value, "goodsAmount"); + return (Criteria) this; + } + + public Criteria andAmountLessThan(Integer value) { + addCriterion("goodsAmount <", value, "goodsAmount"); + return (Criteria) this; + } + + public Criteria andAmountLessThanOrEqualTo(Integer value) { + addCriterion("goodsAmount <=", value, "goodsAmount"); + return (Criteria) this; + } + + public Criteria andAmountIn(List values) { + addCriterion("goodsAmount in", values, "goodsAmount"); + return (Criteria) this; + } + + public Criteria andAmountNotIn(List values) { + addCriterion("goodsAmount not in", values, "goodsAmount"); + return (Criteria) this; + } + + public Criteria andAmountBetween(Integer value1, Integer value2) { + addCriterion("goodsAmount between", value1, value2, "goodsAmount"); + return (Criteria) this; + } + + public Criteria andAmountNotBetween(Integer value1, Integer value2) { + addCriterion("goodsAmount not between", value1, value2, "goodsAmount"); + return (Criteria) this; + } + + public Criteria andRemainsIsNull() { + addCriterion("remains is null"); + return (Criteria) this; + } + + public Criteria andRemainsIsNotNull() { + addCriterion("remains is not null"); + return (Criteria) this; + } + + public Criteria andRemainsEqualTo(Integer value) { + addCriterion("remains =", value, "remains"); + return (Criteria) this; + } + + public Criteria andRemainsNotEqualTo(Integer value) { + addCriterion("remains <>", value, "remains"); + return (Criteria) this; + } + + public Criteria andRemainsGreaterThan(Integer value) { + addCriterion("remains >", value, "remains"); + return (Criteria) this; + } + + public Criteria andRemainsGreaterThanOrEqualTo(Integer value) { + addCriterion("remains >=", value, "remains"); + return (Criteria) this; + } + + public Criteria andRemainsLessThan(Integer value) { + addCriterion("remains <", value, "remains"); + return (Criteria) this; + } + + public Criteria andRemainsLessThanOrEqualTo(Integer value) { + addCriterion("remains <=", value, "remains"); + return (Criteria) this; + } + + public Criteria andRemainsIn(List values) { + addCriterion("remains in", values, "remains"); + return (Criteria) this; + } + + public Criteria andRemainsNotIn(List values) { + addCriterion("remains not in", values, "remains"); + return (Criteria) this; + } + + public Criteria andRemainsBetween(Integer value1, Integer value2) { + addCriterion("remains between", value1, value2, "remains"); + return (Criteria) this; + } + + public Criteria andRemainsNotBetween(Integer value1, Integer value2) { + addCriterion("remains not between", value1, value2, "remains"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/PermissionExample.java b/src/main/java/club/joylink/rtss/entity/PermissionExample.java new file mode 100644 index 000000000..974e8a6ed --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/PermissionExample.java @@ -0,0 +1,1053 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class PermissionExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public PermissionExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andIsPackageIsNull() { + addCriterion("is_package is null"); + return (Criteria) this; + } + + public Criteria andIsPackageIsNotNull() { + addCriterion("is_package is not null"); + return (Criteria) this; + } + + public Criteria andIsPackageEqualTo(Boolean value) { + addCriterion("is_package =", value, "isPackage"); + return (Criteria) this; + } + + public Criteria andIsPackageNotEqualTo(Boolean value) { + addCriterion("is_package <>", value, "isPackage"); + return (Criteria) this; + } + + public Criteria andIsPackageGreaterThan(Boolean value) { + addCriterion("is_package >", value, "isPackage"); + return (Criteria) this; + } + + public Criteria andIsPackageGreaterThanOrEqualTo(Boolean value) { + addCriterion("is_package >=", value, "isPackage"); + return (Criteria) this; + } + + public Criteria andIsPackageLessThan(Boolean value) { + addCriterion("is_package <", value, "isPackage"); + return (Criteria) this; + } + + public Criteria andIsPackageLessThanOrEqualTo(Boolean value) { + addCriterion("is_package <=", value, "isPackage"); + return (Criteria) this; + } + + public Criteria andIsPackageIn(List values) { + addCriterion("is_package in", values, "isPackage"); + return (Criteria) this; + } + + public Criteria andIsPackageNotIn(List values) { + addCriterion("is_package not in", values, "isPackage"); + return (Criteria) this; + } + + public Criteria andIsPackageBetween(Boolean value1, Boolean value2) { + addCriterion("is_package between", value1, value2, "isPackage"); + return (Criteria) this; + } + + public Criteria andIsPackageNotBetween(Boolean value1, Boolean value2) { + addCriterion("is_package not between", value1, value2, "isPackage"); + return (Criteria) this; + } + + public Criteria andRelPermissionsIsNull() { + addCriterion("rel_permissions is null"); + return (Criteria) this; + } + + public Criteria andRelPermissionsIsNotNull() { + addCriterion("rel_permissions is not null"); + return (Criteria) this; + } + + public Criteria andRelPermissionsEqualTo(String value) { + addCriterion("rel_permissions =", value, "relPermissions"); + return (Criteria) this; + } + + public Criteria andRelPermissionsNotEqualTo(String value) { + addCriterion("rel_permissions <>", value, "relPermissions"); + return (Criteria) this; + } + + public Criteria andRelPermissionsGreaterThan(String value) { + addCriterion("rel_permissions >", value, "relPermissions"); + return (Criteria) this; + } + + public Criteria andRelPermissionsGreaterThanOrEqualTo(String value) { + addCriterion("rel_permissions >=", value, "relPermissions"); + return (Criteria) this; + } + + public Criteria andRelPermissionsLessThan(String value) { + addCriterion("rel_permissions <", value, "relPermissions"); + return (Criteria) this; + } + + public Criteria andRelPermissionsLessThanOrEqualTo(String value) { + addCriterion("rel_permissions <=", value, "relPermissions"); + return (Criteria) this; + } + + public Criteria andRelPermissionsLike(String value) { + addCriterion("rel_permissions like", value, "relPermissions"); + return (Criteria) this; + } + + public Criteria andRelPermissionsNotLike(String value) { + addCriterion("rel_permissions not like", value, "relPermissions"); + return (Criteria) this; + } + + public Criteria andRelPermissionsIn(List values) { + addCriterion("rel_permissions in", values, "relPermissions"); + return (Criteria) this; + } + + public Criteria andRelPermissionsNotIn(List values) { + addCriterion("rel_permissions not in", values, "relPermissions"); + return (Criteria) this; + } + + public Criteria andRelPermissionsBetween(String value1, String value2) { + addCriterion("rel_permissions between", value1, value2, "relPermissions"); + return (Criteria) this; + } + + public Criteria andRelPermissionsNotBetween(String value1, String value2) { + addCriterion("rel_permissions not between", value1, value2, "relPermissions"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("`type` is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("`type` is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(String value) { + addCriterion("`type` =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(String value) { + addCriterion("`type` <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(String value) { + addCriterion("`type` >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(String value) { + addCriterion("`type` >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(String value) { + addCriterion("`type` <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(String value) { + addCriterion("`type` <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLike(String value) { + addCriterion("`type` like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotLike(String value) { + addCriterion("`type` not like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("`type` in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("`type` not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(String value1, String value2) { + addCriterion("`type` between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(String value1, String value2) { + addCriterion("`type` not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andPrdTypeIsNull() { + addCriterion("prd_type is null"); + return (Criteria) this; + } + + public Criteria andPrdTypeIsNotNull() { + addCriterion("prd_type is not null"); + return (Criteria) this; + } + + public Criteria andPrdTypeEqualTo(String value) { + addCriterion("prd_type =", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotEqualTo(String value) { + addCriterion("prd_type <>", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeGreaterThan(String value) { + addCriterion("prd_type >", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeGreaterThanOrEqualTo(String value) { + addCriterion("prd_type >=", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeLessThan(String value) { + addCriterion("prd_type <", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeLessThanOrEqualTo(String value) { + addCriterion("prd_type <=", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeLike(String value) { + addCriterion("prd_type like", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotLike(String value) { + addCriterion("prd_type not like", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeIn(List values) { + addCriterion("prd_type in", values, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotIn(List values) { + addCriterion("prd_type not in", values, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeBetween(String value1, String value2) { + addCriterion("prd_type between", value1, value2, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotBetween(String value1, String value2) { + addCriterion("prd_type not between", value1, value2, "prdType"); + return (Criteria) this; + } + + public Criteria andLessonIdIsNull() { + addCriterion("lesson_id is null"); + return (Criteria) this; + } + + public Criteria andLessonIdIsNotNull() { + addCriterion("lesson_id is not null"); + return (Criteria) this; + } + + public Criteria andLessonIdEqualTo(Long value) { + addCriterion("lesson_id =", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdNotEqualTo(Long value) { + addCriterion("lesson_id <>", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdGreaterThan(Long value) { + addCriterion("lesson_id >", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdGreaterThanOrEqualTo(Long value) { + addCriterion("lesson_id >=", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdLessThan(Long value) { + addCriterion("lesson_id <", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdLessThanOrEqualTo(Long value) { + addCriterion("lesson_id <=", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdIn(List values) { + addCriterion("lesson_id in", values, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdNotIn(List values) { + addCriterion("lesson_id not in", values, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdBetween(Long value1, Long value2) { + addCriterion("lesson_id between", value1, value2, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdNotBetween(Long value1, Long value2) { + addCriterion("lesson_id not between", value1, value2, "lessonId"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNull() { + addCriterion("creator_id is null"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNotNull() { + addCriterion("creator_id is not null"); + return (Criteria) this; + } + + public Criteria andCreatorIdEqualTo(Long value) { + addCriterion("creator_id =", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotEqualTo(Long value) { + addCriterion("creator_id <>", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThan(Long value) { + addCriterion("creator_id >", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) { + addCriterion("creator_id >=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThan(Long value) { + addCriterion("creator_id <", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThanOrEqualTo(Long value) { + addCriterion("creator_id <=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdIn(List values) { + addCriterion("creator_id in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotIn(List values) { + addCriterion("creator_id not in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdBetween(Long value1, Long value2) { + addCriterion("creator_id between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotBetween(Long value1, Long value2) { + addCriterion("creator_id not between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(LocalDateTime value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(LocalDateTime value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(LocalDateTime value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(LocalDateTime value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdIsNull() { + addCriterion("update_user_id is null"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdIsNotNull() { + addCriterion("update_user_id is not null"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdEqualTo(Long value) { + addCriterion("update_user_id =", value, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdNotEqualTo(Long value) { + addCriterion("update_user_id <>", value, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdGreaterThan(Long value) { + addCriterion("update_user_id >", value, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("update_user_id >=", value, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdLessThan(Long value) { + addCriterion("update_user_id <", value, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdLessThanOrEqualTo(Long value) { + addCriterion("update_user_id <=", value, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdIn(List values) { + addCriterion("update_user_id in", values, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdNotIn(List values) { + addCriterion("update_user_id not in", values, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdBetween(Long value1, Long value2) { + addCriterion("update_user_id between", value1, value2, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdNotBetween(Long value1, Long value2) { + addCriterion("update_user_id not between", value1, value2, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(LocalDateTime value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(LocalDateTime value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(LocalDateTime value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(LocalDateTime value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andRemarksIsNull() { + addCriterion("remarks is null"); + return (Criteria) this; + } + + public Criteria andRemarksIsNotNull() { + addCriterion("remarks is not null"); + return (Criteria) this; + } + + public Criteria andRemarksEqualTo(String value) { + addCriterion("remarks =", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotEqualTo(String value) { + addCriterion("remarks <>", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksGreaterThan(String value) { + addCriterion("remarks >", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksGreaterThanOrEqualTo(String value) { + addCriterion("remarks >=", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLessThan(String value) { + addCriterion("remarks <", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLessThanOrEqualTo(String value) { + addCriterion("remarks <=", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLike(String value) { + addCriterion("remarks like", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotLike(String value) { + addCriterion("remarks not like", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksIn(List values) { + addCriterion("remarks in", values, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotIn(List values) { + addCriterion("remarks not in", values, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksBetween(String value1, String value2) { + addCriterion("remarks between", value1, value2, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotBetween(String value1, String value2) { + addCriterion("remarks not between", value1, value2, "remarks"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/PlanRouting.java b/src/main/java/club/joylink/rtss/entity/PlanRouting.java new file mode 100644 index 000000000..72f7774da --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/PlanRouting.java @@ -0,0 +1,72 @@ +package club.joylink.rtss.entity; + +import lombok.Data; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * @author + * 用户交路数据表 + */ +@Data +public class PlanRouting implements Serializable { + private Long id; + + /** + * 所属发布地图id + */ + private Long mapId; + + /** + * 交路名称 + */ + private String name; + + /** + * 起始车站code + */ + private String startStationCode; + + /** + * 起始站台轨区段code + */ + private String startSectionCode; + + /** + * 终到车站code + */ + private String endStationCode; + + /** + * 终到站台轨区段code + */ + private String endSectionCode; + + /** + * 描述 + */ + private String description; + + /** + * 用户id + */ + private Long userId; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + /** + * 更新时间 + */ + private LocalDateTime updateTime; + + /** + * 途经的所有站台轨区段列表(json格式保存) + */ + private String viaSections; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/PlanRoutingExample.java b/src/main/java/club/joylink/rtss/entity/PlanRoutingExample.java new file mode 100644 index 000000000..1344886d0 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/PlanRoutingExample.java @@ -0,0 +1,943 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class PlanRoutingExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public PlanRoutingExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andStartStationCodeIsNull() { + addCriterion("start_station_code is null"); + return (Criteria) this; + } + + public Criteria andStartStationCodeIsNotNull() { + addCriterion("start_station_code is not null"); + return (Criteria) this; + } + + public Criteria andStartStationCodeEqualTo(String value) { + addCriterion("start_station_code =", value, "startStationCode"); + return (Criteria) this; + } + + public Criteria andStartStationCodeNotEqualTo(String value) { + addCriterion("start_station_code <>", value, "startStationCode"); + return (Criteria) this; + } + + public Criteria andStartStationCodeGreaterThan(String value) { + addCriterion("start_station_code >", value, "startStationCode"); + return (Criteria) this; + } + + public Criteria andStartStationCodeGreaterThanOrEqualTo(String value) { + addCriterion("start_station_code >=", value, "startStationCode"); + return (Criteria) this; + } + + public Criteria andStartStationCodeLessThan(String value) { + addCriterion("start_station_code <", value, "startStationCode"); + return (Criteria) this; + } + + public Criteria andStartStationCodeLessThanOrEqualTo(String value) { + addCriterion("start_station_code <=", value, "startStationCode"); + return (Criteria) this; + } + + public Criteria andStartStationCodeLike(String value) { + addCriterion("start_station_code like", value, "startStationCode"); + return (Criteria) this; + } + + public Criteria andStartStationCodeNotLike(String value) { + addCriterion("start_station_code not like", value, "startStationCode"); + return (Criteria) this; + } + + public Criteria andStartStationCodeIn(List values) { + addCriterion("start_station_code in", values, "startStationCode"); + return (Criteria) this; + } + + public Criteria andStartStationCodeNotIn(List values) { + addCriterion("start_station_code not in", values, "startStationCode"); + return (Criteria) this; + } + + public Criteria andStartStationCodeBetween(String value1, String value2) { + addCriterion("start_station_code between", value1, value2, "startStationCode"); + return (Criteria) this; + } + + public Criteria andStartStationCodeNotBetween(String value1, String value2) { + addCriterion("start_station_code not between", value1, value2, "startStationCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeIsNull() { + addCriterion("start_section_code is null"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeIsNotNull() { + addCriterion("start_section_code is not null"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeEqualTo(String value) { + addCriterion("start_section_code =", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeNotEqualTo(String value) { + addCriterion("start_section_code <>", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeGreaterThan(String value) { + addCriterion("start_section_code >", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeGreaterThanOrEqualTo(String value) { + addCriterion("start_section_code >=", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeLessThan(String value) { + addCriterion("start_section_code <", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeLessThanOrEqualTo(String value) { + addCriterion("start_section_code <=", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeLike(String value) { + addCriterion("start_section_code like", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeNotLike(String value) { + addCriterion("start_section_code not like", value, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeIn(List values) { + addCriterion("start_section_code in", values, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeNotIn(List values) { + addCriterion("start_section_code not in", values, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeBetween(String value1, String value2) { + addCriterion("start_section_code between", value1, value2, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andStartSectionCodeNotBetween(String value1, String value2) { + addCriterion("start_section_code not between", value1, value2, "startSectionCode"); + return (Criteria) this; + } + + public Criteria andEndStationCodeIsNull() { + addCriterion("end_station_code is null"); + return (Criteria) this; + } + + public Criteria andEndStationCodeIsNotNull() { + addCriterion("end_station_code is not null"); + return (Criteria) this; + } + + public Criteria andEndStationCodeEqualTo(String value) { + addCriterion("end_station_code =", value, "endStationCode"); + return (Criteria) this; + } + + public Criteria andEndStationCodeNotEqualTo(String value) { + addCriterion("end_station_code <>", value, "endStationCode"); + return (Criteria) this; + } + + public Criteria andEndStationCodeGreaterThan(String value) { + addCriterion("end_station_code >", value, "endStationCode"); + return (Criteria) this; + } + + public Criteria andEndStationCodeGreaterThanOrEqualTo(String value) { + addCriterion("end_station_code >=", value, "endStationCode"); + return (Criteria) this; + } + + public Criteria andEndStationCodeLessThan(String value) { + addCriterion("end_station_code <", value, "endStationCode"); + return (Criteria) this; + } + + public Criteria andEndStationCodeLessThanOrEqualTo(String value) { + addCriterion("end_station_code <=", value, "endStationCode"); + return (Criteria) this; + } + + public Criteria andEndStationCodeLike(String value) { + addCriterion("end_station_code like", value, "endStationCode"); + return (Criteria) this; + } + + public Criteria andEndStationCodeNotLike(String value) { + addCriterion("end_station_code not like", value, "endStationCode"); + return (Criteria) this; + } + + public Criteria andEndStationCodeIn(List values) { + addCriterion("end_station_code in", values, "endStationCode"); + return (Criteria) this; + } + + public Criteria andEndStationCodeNotIn(List values) { + addCriterion("end_station_code not in", values, "endStationCode"); + return (Criteria) this; + } + + public Criteria andEndStationCodeBetween(String value1, String value2) { + addCriterion("end_station_code between", value1, value2, "endStationCode"); + return (Criteria) this; + } + + public Criteria andEndStationCodeNotBetween(String value1, String value2) { + addCriterion("end_station_code not between", value1, value2, "endStationCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeIsNull() { + addCriterion("end_section_code is null"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeIsNotNull() { + addCriterion("end_section_code is not null"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeEqualTo(String value) { + addCriterion("end_section_code =", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeNotEqualTo(String value) { + addCriterion("end_section_code <>", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeGreaterThan(String value) { + addCriterion("end_section_code >", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeGreaterThanOrEqualTo(String value) { + addCriterion("end_section_code >=", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeLessThan(String value) { + addCriterion("end_section_code <", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeLessThanOrEqualTo(String value) { + addCriterion("end_section_code <=", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeLike(String value) { + addCriterion("end_section_code like", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeNotLike(String value) { + addCriterion("end_section_code not like", value, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeIn(List values) { + addCriterion("end_section_code in", values, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeNotIn(List values) { + addCriterion("end_section_code not in", values, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeBetween(String value1, String value2) { + addCriterion("end_section_code between", value1, value2, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andEndSectionCodeNotBetween(String value1, String value2) { + addCriterion("end_section_code not between", value1, value2, "endSectionCode"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(LocalDateTime value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(LocalDateTime value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(LocalDateTime value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(LocalDateTime value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(LocalDateTime value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(LocalDateTime value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(LocalDateTime value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(LocalDateTime value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/PlanStationRunLevel.java b/src/main/java/club/joylink/rtss/entity/PlanStationRunLevel.java new file mode 100644 index 000000000..507c25ee9 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/PlanStationRunLevel.java @@ -0,0 +1,42 @@ +package club.joylink.rtss.entity; + +import lombok.Data; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * @author + * 用户站间距离和运行时间(运行等级)表 + */ +@Data +public class PlanStationRunLevel implements Serializable { + private Long id; + + /** + * 所属发布地图id + */ + private Long mapId; + + /** + * 用户id + */ + private Long userId; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + /** + * 更新时间 + */ + private LocalDateTime updateTime; + + /** + * 站间距离和站间运行时间数据(json格式) + */ + private String jsonData; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/PlanStationRunLevelExample.java b/src/main/java/club/joylink/rtss/entity/PlanStationRunLevelExample.java new file mode 100644 index 000000000..78c949cf3 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/PlanStationRunLevelExample.java @@ -0,0 +1,523 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class PlanStationRunLevelExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public PlanStationRunLevelExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(LocalDateTime value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(LocalDateTime value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(LocalDateTime value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(LocalDateTime value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(LocalDateTime value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(LocalDateTime value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(LocalDateTime value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(LocalDateTime value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/PlanStationStop.java b/src/main/java/club/joylink/rtss/entity/PlanStationStop.java new file mode 100644 index 000000000..df5de1d5e --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/PlanStationStop.java @@ -0,0 +1,42 @@ +package club.joylink.rtss.entity; + +import lombok.Data; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * @author + * 用户车站停站时间参数数据 + */ +@Data +public class PlanStationStop implements Serializable { + private Long id; + + /** + * 所属地图id + */ + private Long mapId; + + /** + * 所属用户id + */ + private Long userId; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + /** + * 更新时间 + */ + private LocalDateTime updateTime; + + /** + * 停站时间数据(json格式) + */ + private String jsonData; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/PlanStationStopExample.java b/src/main/java/club/joylink/rtss/entity/PlanStationStopExample.java new file mode 100644 index 000000000..c04749b09 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/PlanStationStopExample.java @@ -0,0 +1,523 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class PlanStationStopExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public PlanStationStopExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(LocalDateTime value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(LocalDateTime value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(LocalDateTime value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(LocalDateTime value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(LocalDateTime value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(LocalDateTime value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(LocalDateTime value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(LocalDateTime value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/PlcConfig.java b/src/main/java/club/joylink/rtss/entity/PlcConfig.java new file mode 100644 index 000000000..87de31cce --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/PlcConfig.java @@ -0,0 +1,120 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * plc_config + * @author + */ +public class PlcConfig implements Serializable { + private Long id; + + /** + * plc网关id + */ + private String gatewayId; + + /** + * 所属group + */ + private String group; + + /** + * plc网关名称 + */ + private String gatewayName; + + /** + * plc控制器配置 + */ + private String plcConfig; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getGatewayId() { + return gatewayId; + } + + public void setGatewayId(String gatewayId) { + this.gatewayId = gatewayId; + } + + public String getGroup() { + return group; + } + + public void setGroup(String group) { + this.group = group; + } + + public String getGatewayName() { + return gatewayName; + } + + public void setGatewayName(String gatewayName) { + this.gatewayName = gatewayName; + } + + public String getPlcConfig() { + return plcConfig; + } + + public void setPlcConfig(String plcConfig) { + this.plcConfig = plcConfig; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + PlcConfig other = (PlcConfig) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getGatewayId() == null ? other.getGatewayId() == null : this.getGatewayId().equals(other.getGatewayId())) + && (this.getGroup() == null ? other.getGroup() == null : this.getGroup().equals(other.getGroup())) + && (this.getGatewayName() == null ? other.getGatewayName() == null : this.getGatewayName().equals(other.getGatewayName())) + && (this.getPlcConfig() == null ? other.getPlcConfig() == null : this.getPlcConfig().equals(other.getPlcConfig())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getGatewayId() == null) ? 0 : getGatewayId().hashCode()); + result = prime * result + ((getGroup() == null) ? 0 : getGroup().hashCode()); + result = prime * result + ((getGatewayName() == null) ? 0 : getGatewayName().hashCode()); + result = prime * result + ((getPlcConfig() == null) ? 0 : getPlcConfig().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", gatewayId=").append(gatewayId); + sb.append(", group=").append(group); + sb.append(", gatewayName=").append(gatewayName); + sb.append(", plcConfig=").append(plcConfig); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/PlcConfigExample.java b/src/main/java/club/joylink/rtss/entity/PlcConfigExample.java new file mode 100644 index 000000000..dfb546967 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/PlcConfigExample.java @@ -0,0 +1,492 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class PlcConfigExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public PlcConfigExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andGatewayIdIsNull() { + addCriterion("gateway_id is null"); + return (Criteria) this; + } + + public Criteria andGatewayIdIsNotNull() { + addCriterion("gateway_id is not null"); + return (Criteria) this; + } + + public Criteria andGatewayIdEqualTo(String value) { + addCriterion("gateway_id =", value, "gatewayId"); + return (Criteria) this; + } + + public Criteria andGatewayIdNotEqualTo(String value) { + addCriterion("gateway_id <>", value, "gatewayId"); + return (Criteria) this; + } + + public Criteria andGatewayIdGreaterThan(String value) { + addCriterion("gateway_id >", value, "gatewayId"); + return (Criteria) this; + } + + public Criteria andGatewayIdGreaterThanOrEqualTo(String value) { + addCriterion("gateway_id >=", value, "gatewayId"); + return (Criteria) this; + } + + public Criteria andGatewayIdLessThan(String value) { + addCriterion("gateway_id <", value, "gatewayId"); + return (Criteria) this; + } + + public Criteria andGatewayIdLessThanOrEqualTo(String value) { + addCriterion("gateway_id <=", value, "gatewayId"); + return (Criteria) this; + } + + public Criteria andGatewayIdLike(String value) { + addCriterion("gateway_id like", value, "gatewayId"); + return (Criteria) this; + } + + public Criteria andGatewayIdNotLike(String value) { + addCriterion("gateway_id not like", value, "gatewayId"); + return (Criteria) this; + } + + public Criteria andGatewayIdIn(List values) { + addCriterion("gateway_id in", values, "gatewayId"); + return (Criteria) this; + } + + public Criteria andGatewayIdNotIn(List values) { + addCriterion("gateway_id not in", values, "gatewayId"); + return (Criteria) this; + } + + public Criteria andGatewayIdBetween(String value1, String value2) { + addCriterion("gateway_id between", value1, value2, "gatewayId"); + return (Criteria) this; + } + + public Criteria andGatewayIdNotBetween(String value1, String value2) { + addCriterion("gateway_id not between", value1, value2, "gatewayId"); + return (Criteria) this; + } + + public Criteria andGroupIsNull() { + addCriterion("`group` is null"); + return (Criteria) this; + } + + public Criteria andGroupIsNotNull() { + addCriterion("`group` is not null"); + return (Criteria) this; + } + + public Criteria andGroupEqualTo(String value) { + addCriterion("`group` =", value, "group"); + return (Criteria) this; + } + + public Criteria andGroupNotEqualTo(String value) { + addCriterion("`group` <>", value, "group"); + return (Criteria) this; + } + + public Criteria andGroupGreaterThan(String value) { + addCriterion("`group` >", value, "group"); + return (Criteria) this; + } + + public Criteria andGroupGreaterThanOrEqualTo(String value) { + addCriterion("`group` >=", value, "group"); + return (Criteria) this; + } + + public Criteria andGroupLessThan(String value) { + addCriterion("`group` <", value, "group"); + return (Criteria) this; + } + + public Criteria andGroupLessThanOrEqualTo(String value) { + addCriterion("`group` <=", value, "group"); + return (Criteria) this; + } + + public Criteria andGroupLike(String value) { + addCriterion("`group` like", value, "group"); + return (Criteria) this; + } + + public Criteria andGroupNotLike(String value) { + addCriterion("`group` not like", value, "group"); + return (Criteria) this; + } + + public Criteria andGroupIn(List values) { + addCriterion("`group` in", values, "group"); + return (Criteria) this; + } + + public Criteria andGroupNotIn(List values) { + addCriterion("`group` not in", values, "group"); + return (Criteria) this; + } + + public Criteria andGroupBetween(String value1, String value2) { + addCriterion("`group` between", value1, value2, "group"); + return (Criteria) this; + } + + public Criteria andGroupNotBetween(String value1, String value2) { + addCriterion("`group` not between", value1, value2, "group"); + return (Criteria) this; + } + + public Criteria andGatewayNameIsNull() { + addCriterion("gateway_name is null"); + return (Criteria) this; + } + + public Criteria andGatewayNameIsNotNull() { + addCriterion("gateway_name is not null"); + return (Criteria) this; + } + + public Criteria andGatewayNameEqualTo(String value) { + addCriterion("gateway_name =", value, "gatewayName"); + return (Criteria) this; + } + + public Criteria andGatewayNameNotEqualTo(String value) { + addCriterion("gateway_name <>", value, "gatewayName"); + return (Criteria) this; + } + + public Criteria andGatewayNameGreaterThan(String value) { + addCriterion("gateway_name >", value, "gatewayName"); + return (Criteria) this; + } + + public Criteria andGatewayNameGreaterThanOrEqualTo(String value) { + addCriterion("gateway_name >=", value, "gatewayName"); + return (Criteria) this; + } + + public Criteria andGatewayNameLessThan(String value) { + addCriterion("gateway_name <", value, "gatewayName"); + return (Criteria) this; + } + + public Criteria andGatewayNameLessThanOrEqualTo(String value) { + addCriterion("gateway_name <=", value, "gatewayName"); + return (Criteria) this; + } + + public Criteria andGatewayNameLike(String value) { + addCriterion("gateway_name like", value, "gatewayName"); + return (Criteria) this; + } + + public Criteria andGatewayNameNotLike(String value) { + addCriterion("gateway_name not like", value, "gatewayName"); + return (Criteria) this; + } + + public Criteria andGatewayNameIn(List values) { + addCriterion("gateway_name in", values, "gatewayName"); + return (Criteria) this; + } + + public Criteria andGatewayNameNotIn(List values) { + addCriterion("gateway_name not in", values, "gatewayName"); + return (Criteria) this; + } + + public Criteria andGatewayNameBetween(String value1, String value2) { + addCriterion("gateway_name between", value1, value2, "gatewayName"); + return (Criteria) this; + } + + public Criteria andGatewayNameNotBetween(String value1, String value2) { + addCriterion("gateway_name not between", value1, value2, "gatewayName"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/ProjectDevice.java b/src/main/java/club/joylink/rtss/entity/ProjectDevice.java new file mode 100644 index 000000000..e70a27efa --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/ProjectDevice.java @@ -0,0 +1,153 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * project_device + * @author + */ +public class ProjectDevice implements Serializable { + private Long id; + + /** + * 所属项目编码 + */ + private String projectCode; + + /** + * 设备编号(或名称),一个项目下唯一 + */ + private String code; + + /** + * 设备类型 + */ + private String type; + + /** + * 创建人 + */ + private Long creator; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + /** + * 设备网关映射配置 + */ + private String config; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getProjectCode() { + return projectCode; + } + + public void setProjectCode(String projectCode) { + this.projectCode = projectCode; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Long getCreator() { + return creator; + } + + public void setCreator(Long creator) { + this.creator = creator; + } + + public LocalDateTime getCreateTime() { + return createTime; + } + + public void setCreateTime(LocalDateTime createTime) { + this.createTime = createTime; + } + + public String getConfig() { + return config; + } + + public void setConfig(String config) { + this.config = config; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + ProjectDevice other = (ProjectDevice) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getProjectCode() == null ? other.getProjectCode() == null : this.getProjectCode().equals(other.getProjectCode())) + && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode())) + && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) + && (this.getCreator() == null ? other.getCreator() == null : this.getCreator().equals(other.getCreator())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getConfig() == null ? other.getConfig() == null : this.getConfig().equals(other.getConfig())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getProjectCode() == null) ? 0 : getProjectCode().hashCode()); + result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode()); + result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); + result = prime * result + ((getCreator() == null) ? 0 : getCreator().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getConfig() == null) ? 0 : getConfig().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", projectCode=").append(projectCode); + sb.append(", code=").append(code); + sb.append(", type=").append(type); + sb.append(", creator=").append(creator); + sb.append(", createTime=").append(createTime); + sb.append(", config=").append(config); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/ProjectDeviceExample.java b/src/main/java/club/joylink/rtss/entity/ProjectDeviceExample.java new file mode 100644 index 000000000..41b0e1d31 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/ProjectDeviceExample.java @@ -0,0 +1,613 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class ProjectDeviceExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public ProjectDeviceExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andProjectCodeIsNull() { + addCriterion("project_code is null"); + return (Criteria) this; + } + + public Criteria andProjectCodeIsNotNull() { + addCriterion("project_code is not null"); + return (Criteria) this; + } + + public Criteria andProjectCodeEqualTo(String value) { + addCriterion("project_code =", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeNotEqualTo(String value) { + addCriterion("project_code <>", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeGreaterThan(String value) { + addCriterion("project_code >", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeGreaterThanOrEqualTo(String value) { + addCriterion("project_code >=", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeLessThan(String value) { + addCriterion("project_code <", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeLessThanOrEqualTo(String value) { + addCriterion("project_code <=", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeLike(String value) { + addCriterion("project_code like", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeNotLike(String value) { + addCriterion("project_code not like", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeIn(List values) { + addCriterion("project_code in", values, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeNotIn(List values) { + addCriterion("project_code not in", values, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeBetween(String value1, String value2) { + addCriterion("project_code between", value1, value2, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeNotBetween(String value1, String value2) { + addCriterion("project_code not between", value1, value2, "projectCode"); + return (Criteria) this; + } + + public Criteria andCodeIsNull() { + addCriterion("code is null"); + return (Criteria) this; + } + + public Criteria andCodeIsNotNull() { + addCriterion("code is not null"); + return (Criteria) this; + } + + public Criteria andCodeEqualTo(String value) { + addCriterion("code =", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotEqualTo(String value) { + addCriterion("code <>", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThan(String value) { + addCriterion("code >", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThanOrEqualTo(String value) { + addCriterion("code >=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThan(String value) { + addCriterion("code <", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThanOrEqualTo(String value) { + addCriterion("code <=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLike(String value) { + addCriterion("code like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotLike(String value) { + addCriterion("code not like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeIn(List values) { + addCriterion("code in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotIn(List values) { + addCriterion("code not in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeBetween(String value1, String value2) { + addCriterion("code between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotBetween(String value1, String value2) { + addCriterion("code not between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("`type` is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("`type` is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(String value) { + addCriterion("`type` =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(String value) { + addCriterion("`type` <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(String value) { + addCriterion("`type` >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(String value) { + addCriterion("`type` >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(String value) { + addCriterion("`type` <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(String value) { + addCriterion("`type` <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLike(String value) { + addCriterion("`type` like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotLike(String value) { + addCriterion("`type` not like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("`type` in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("`type` not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(String value1, String value2) { + addCriterion("`type` between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(String value1, String value2) { + addCriterion("`type` not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andCreatorIsNull() { + addCriterion("creator is null"); + return (Criteria) this; + } + + public Criteria andCreatorIsNotNull() { + addCriterion("creator is not null"); + return (Criteria) this; + } + + public Criteria andCreatorEqualTo(Long value) { + addCriterion("creator =", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorNotEqualTo(Long value) { + addCriterion("creator <>", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorGreaterThan(Long value) { + addCriterion("creator >", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorGreaterThanOrEqualTo(Long value) { + addCriterion("creator >=", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorLessThan(Long value) { + addCriterion("creator <", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorLessThanOrEqualTo(Long value) { + addCriterion("creator <=", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorIn(List values) { + addCriterion("creator in", values, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorNotIn(List values) { + addCriterion("creator not in", values, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorBetween(Long value1, Long value2) { + addCriterion("creator between", value1, value2, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorNotBetween(Long value1, Long value2) { + addCriterion("creator not between", value1, value2, "creator"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(LocalDateTime value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(LocalDateTime value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(LocalDateTime value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(LocalDateTime value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/Quest.java b/src/main/java/club/joylink/rtss/entity/Quest.java new file mode 100644 index 000000000..877b1f75c --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/Quest.java @@ -0,0 +1,169 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * quest + * @author + */ +public class Quest implements Serializable { + private Long id; + + /** + * 所属地图id + */ + private Long mapId; + + /** + * 名称 + */ + private String name; + + /** + * 任务描述 + */ + private String description; + + /** + * 地图定位位置json + */ + private String mapLocation; + + /** + * 状态 + */ + private String status; + + /** + * 创建人id + */ + private Long creatorId; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getMapId() { + return mapId; + } + + public void setMapId(Long mapId) { + this.mapId = mapId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getMapLocation() { + return mapLocation; + } + + public void setMapLocation(String mapLocation) { + this.mapLocation = mapLocation; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public Long getCreatorId() { + return creatorId; + } + + public void setCreatorId(Long creatorId) { + this.creatorId = creatorId; + } + + public LocalDateTime getCreateTime() { + return createTime; + } + + public void setCreateTime(LocalDateTime createTime) { + this.createTime = createTime; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + Quest other = (Quest) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription())) + && (this.getMapLocation() == null ? other.getMapLocation() == null : this.getMapLocation().equals(other.getMapLocation())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode()); + result = prime * result + ((getMapLocation() == null) ? 0 : getMapLocation().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", mapId=").append(mapId); + sb.append(", name=").append(name); + sb.append(", description=").append(description); + sb.append(", mapLocation=").append(mapLocation); + sb.append(", status=").append(status); + sb.append(", creatorId=").append(creatorId); + sb.append(", createTime=").append(createTime); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/QuestExample.java b/src/main/java/club/joylink/rtss/entity/QuestExample.java new file mode 100644 index 000000000..a17ff8d8e --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/QuestExample.java @@ -0,0 +1,743 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class QuestExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public QuestExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andMapLocationIsNull() { + addCriterion("map_location is null"); + return (Criteria) this; + } + + public Criteria andMapLocationIsNotNull() { + addCriterion("map_location is not null"); + return (Criteria) this; + } + + public Criteria andMapLocationEqualTo(String value) { + addCriterion("map_location =", value, "mapLocation"); + return (Criteria) this; + } + + public Criteria andMapLocationNotEqualTo(String value) { + addCriterion("map_location <>", value, "mapLocation"); + return (Criteria) this; + } + + public Criteria andMapLocationGreaterThan(String value) { + addCriterion("map_location >", value, "mapLocation"); + return (Criteria) this; + } + + public Criteria andMapLocationGreaterThanOrEqualTo(String value) { + addCriterion("map_location >=", value, "mapLocation"); + return (Criteria) this; + } + + public Criteria andMapLocationLessThan(String value) { + addCriterion("map_location <", value, "mapLocation"); + return (Criteria) this; + } + + public Criteria andMapLocationLessThanOrEqualTo(String value) { + addCriterion("map_location <=", value, "mapLocation"); + return (Criteria) this; + } + + public Criteria andMapLocationLike(String value) { + addCriterion("map_location like", value, "mapLocation"); + return (Criteria) this; + } + + public Criteria andMapLocationNotLike(String value) { + addCriterion("map_location not like", value, "mapLocation"); + return (Criteria) this; + } + + public Criteria andMapLocationIn(List values) { + addCriterion("map_location in", values, "mapLocation"); + return (Criteria) this; + } + + public Criteria andMapLocationNotIn(List values) { + addCriterion("map_location not in", values, "mapLocation"); + return (Criteria) this; + } + + public Criteria andMapLocationBetween(String value1, String value2) { + addCriterion("map_location between", value1, value2, "mapLocation"); + return (Criteria) this; + } + + public Criteria andMapLocationNotBetween(String value1, String value2) { + addCriterion("map_location not between", value1, value2, "mapLocation"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNull() { + addCriterion("creator_id is null"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNotNull() { + addCriterion("creator_id is not null"); + return (Criteria) this; + } + + public Criteria andCreatorIdEqualTo(Long value) { + addCriterion("creator_id =", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotEqualTo(Long value) { + addCriterion("creator_id <>", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThan(Long value) { + addCriterion("creator_id >", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) { + addCriterion("creator_id >=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThan(Long value) { + addCriterion("creator_id <", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThanOrEqualTo(Long value) { + addCriterion("creator_id <=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdIn(List values) { + addCriterion("creator_id in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotIn(List values) { + addCriterion("creator_id not in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdBetween(Long value1, Long value2) { + addCriterion("creator_id between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotBetween(Long value1, Long value2) { + addCriterion("creator_id not between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(LocalDateTime value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(LocalDateTime value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(LocalDateTime value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(LocalDateTime value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/QuestWithBLOBs.java b/src/main/java/club/joylink/rtss/entity/QuestWithBLOBs.java new file mode 100644 index 000000000..63aee0236 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/QuestWithBLOBs.java @@ -0,0 +1,123 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * quest + * @author + */ +public class QuestWithBLOBs extends Quest implements Serializable { + /** + * 背景场景 + */ + private String bgScenes; + + /** + * 角色行为动作json + */ + private String membersJson; + + /** + * 目标json + */ + private String targetsJson; + + /** + * 剧本json数据 + */ + private String scriptJson; + + private static final long serialVersionUID = 1L; + + public String getBgScenes() { + return bgScenes; + } + + public void setBgScenes(String bgScenes) { + this.bgScenes = bgScenes; + } + + public String getMembersJson() { + return membersJson; + } + + public void setMembersJson(String membersJson) { + this.membersJson = membersJson; + } + + public String getTargetsJson() { + return targetsJson; + } + + public void setTargetsJson(String targetsJson) { + this.targetsJson = targetsJson; + } + + public String getScriptJson() { + return scriptJson; + } + + public void setScriptJson(String scriptJson) { + this.scriptJson = scriptJson; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + QuestWithBLOBs other = (QuestWithBLOBs) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription())) + && (this.getMapLocation() == null ? other.getMapLocation() == null : this.getMapLocation().equals(other.getMapLocation())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getBgScenes() == null ? other.getBgScenes() == null : this.getBgScenes().equals(other.getBgScenes())) + && (this.getMembersJson() == null ? other.getMembersJson() == null : this.getMembersJson().equals(other.getMembersJson())) + && (this.getTargetsJson() == null ? other.getTargetsJson() == null : this.getTargetsJson().equals(other.getTargetsJson())) + && (this.getScriptJson() == null ? other.getScriptJson() == null : this.getScriptJson().equals(other.getScriptJson())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode()); + result = prime * result + ((getMapLocation() == null) ? 0 : getMapLocation().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getBgScenes() == null) ? 0 : getBgScenes().hashCode()); + result = prime * result + ((getMembersJson() == null) ? 0 : getMembersJson().hashCode()); + result = prime * result + ((getTargetsJson() == null) ? 0 : getTargetsJson().hashCode()); + result = prime * result + ((getScriptJson() == null) ? 0 : getScriptJson().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", bgScenes=").append(bgScenes); + sb.append(", membersJson=").append(membersJson); + sb.append(", targetsJson=").append(targetsJson); + sb.append(", scriptJson=").append(scriptJson); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/Race.java b/src/main/java/club/joylink/rtss/entity/Race.java new file mode 100644 index 000000000..8beca3c3b --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/Race.java @@ -0,0 +1,186 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * race + * @author + */ +public class Race implements Serializable { + private Long id; + + /** + * 竞赛名称 + */ + private String name; + + /** + * 竞赛使用的地图 + */ + private Long mapId; + + /** + * 开始日期 + */ + private LocalDate startDate; + + /** + * 结束日期 + */ + private LocalDate endDate; + + /** + * 可选角色 + */ + private String optionalRoles; + + /** + * 创建者的id + */ + private Long creatorId; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + /** + * 赛事状态 + */ + private Integer status; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Long getMapId() { + return mapId; + } + + public void setMapId(Long mapId) { + this.mapId = mapId; + } + + public LocalDate getStartDate() { + return startDate; + } + + public void setStartDate(LocalDate startDate) { + this.startDate = startDate; + } + + public LocalDate getEndDate() { + return endDate; + } + + public void setEndDate(LocalDate endDate) { + this.endDate = endDate; + } + + public String getOptionalRoles() { + return optionalRoles; + } + + public void setOptionalRoles(String optionalRoles) { + this.optionalRoles = optionalRoles; + } + + public Long getCreatorId() { + return creatorId; + } + + public void setCreatorId(Long creatorId) { + this.creatorId = creatorId; + } + + public LocalDateTime getCreateTime() { + return createTime; + } + + public void setCreateTime(LocalDateTime createTime) { + this.createTime = createTime; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + Race other = (Race) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getStartDate() == null ? other.getStartDate() == null : this.getStartDate().equals(other.getStartDate())) + && (this.getEndDate() == null ? other.getEndDate() == null : this.getEndDate().equals(other.getEndDate())) + && (this.getOptionalRoles() == null ? other.getOptionalRoles() == null : this.getOptionalRoles().equals(other.getOptionalRoles())) + && (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getStartDate() == null) ? 0 : getStartDate().hashCode()); + result = prime * result + ((getEndDate() == null) ? 0 : getEndDate().hashCode()); + result = prime * result + ((getOptionalRoles() == null) ? 0 : getOptionalRoles().hashCode()); + result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", name=").append(name); + sb.append(", mapId=").append(mapId); + sb.append(", startDate=").append(startDate); + sb.append(", endDate=").append(endDate); + sb.append(", optionalRoles=").append(optionalRoles); + sb.append(", creatorId=").append(creatorId); + sb.append(", createTime=").append(createTime); + sb.append(", status=").append(status); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/RaceExample.java b/src/main/java/club/joylink/rtss/entity/RaceExample.java new file mode 100644 index 000000000..91015f233 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RaceExample.java @@ -0,0 +1,784 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class RaceExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public RaceExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andStartDateIsNull() { + addCriterion("start_date is null"); + return (Criteria) this; + } + + public Criteria andStartDateIsNotNull() { + addCriterion("start_date is not null"); + return (Criteria) this; + } + + public Criteria andStartDateEqualTo(LocalDate value) { + addCriterion("start_date =", value, "startDate"); + return (Criteria) this; + } + + public Criteria andStartDateNotEqualTo(LocalDate value) { + addCriterion("start_date <>", value, "startDate"); + return (Criteria) this; + } + + public Criteria andStartDateGreaterThan(LocalDate value) { + addCriterion("start_date >", value, "startDate"); + return (Criteria) this; + } + + public Criteria andStartDateGreaterThanOrEqualTo(LocalDate value) { + addCriterion("start_date >=", value, "startDate"); + return (Criteria) this; + } + + public Criteria andStartDateLessThan(LocalDate value) { + addCriterion("start_date <", value, "startDate"); + return (Criteria) this; + } + + public Criteria andStartDateLessThanOrEqualTo(LocalDate value) { + addCriterion("start_date <=", value, "startDate"); + return (Criteria) this; + } + + public Criteria andStartDateIn(List values) { + addCriterion("start_date in", values, "startDate"); + return (Criteria) this; + } + + public Criteria andStartDateNotIn(List values) { + addCriterion("start_date not in", values, "startDate"); + return (Criteria) this; + } + + public Criteria andStartDateBetween(LocalDate value1, LocalDate value2) { + addCriterion("start_date between", value1, value2, "startDate"); + return (Criteria) this; + } + + public Criteria andStartDateNotBetween(LocalDate value1, LocalDate value2) { + addCriterion("start_date not between", value1, value2, "startDate"); + return (Criteria) this; + } + + public Criteria andEndDateIsNull() { + addCriterion("end_date is null"); + return (Criteria) this; + } + + public Criteria andEndDateIsNotNull() { + addCriterion("end_date is not null"); + return (Criteria) this; + } + + public Criteria andEndDateEqualTo(LocalDate value) { + addCriterion("end_date =", value, "endDate"); + return (Criteria) this; + } + + public Criteria andEndDateNotEqualTo(LocalDate value) { + addCriterion("end_date <>", value, "endDate"); + return (Criteria) this; + } + + public Criteria andEndDateGreaterThan(LocalDate value) { + addCriterion("end_date >", value, "endDate"); + return (Criteria) this; + } + + public Criteria andEndDateGreaterThanOrEqualTo(LocalDate value) { + addCriterion("end_date >=", value, "endDate"); + return (Criteria) this; + } + + public Criteria andEndDateLessThan(LocalDate value) { + addCriterion("end_date <", value, "endDate"); + return (Criteria) this; + } + + public Criteria andEndDateLessThanOrEqualTo(LocalDate value) { + addCriterion("end_date <=", value, "endDate"); + return (Criteria) this; + } + + public Criteria andEndDateIn(List values) { + addCriterion("end_date in", values, "endDate"); + return (Criteria) this; + } + + public Criteria andEndDateNotIn(List values) { + addCriterion("end_date not in", values, "endDate"); + return (Criteria) this; + } + + public Criteria andEndDateBetween(LocalDate value1, LocalDate value2) { + addCriterion("end_date between", value1, value2, "endDate"); + return (Criteria) this; + } + + public Criteria andEndDateNotBetween(LocalDate value1, LocalDate value2) { + addCriterion("end_date not between", value1, value2, "endDate"); + return (Criteria) this; + } + + public Criteria andOptionalRolesIsNull() { + addCriterion("optional_roles is null"); + return (Criteria) this; + } + + public Criteria andOptionalRolesIsNotNull() { + addCriterion("optional_roles is not null"); + return (Criteria) this; + } + + public Criteria andOptionalRolesEqualTo(String value) { + addCriterion("optional_roles =", value, "optionalRoles"); + return (Criteria) this; + } + + public Criteria andOptionalRolesNotEqualTo(String value) { + addCriterion("optional_roles <>", value, "optionalRoles"); + return (Criteria) this; + } + + public Criteria andOptionalRolesGreaterThan(String value) { + addCriterion("optional_roles >", value, "optionalRoles"); + return (Criteria) this; + } + + public Criteria andOptionalRolesGreaterThanOrEqualTo(String value) { + addCriterion("optional_roles >=", value, "optionalRoles"); + return (Criteria) this; + } + + public Criteria andOptionalRolesLessThan(String value) { + addCriterion("optional_roles <", value, "optionalRoles"); + return (Criteria) this; + } + + public Criteria andOptionalRolesLessThanOrEqualTo(String value) { + addCriterion("optional_roles <=", value, "optionalRoles"); + return (Criteria) this; + } + + public Criteria andOptionalRolesLike(String value) { + addCriterion("optional_roles like", value, "optionalRoles"); + return (Criteria) this; + } + + public Criteria andOptionalRolesNotLike(String value) { + addCriterion("optional_roles not like", value, "optionalRoles"); + return (Criteria) this; + } + + public Criteria andOptionalRolesIn(List values) { + addCriterion("optional_roles in", values, "optionalRoles"); + return (Criteria) this; + } + + public Criteria andOptionalRolesNotIn(List values) { + addCriterion("optional_roles not in", values, "optionalRoles"); + return (Criteria) this; + } + + public Criteria andOptionalRolesBetween(String value1, String value2) { + addCriterion("optional_roles between", value1, value2, "optionalRoles"); + return (Criteria) this; + } + + public Criteria andOptionalRolesNotBetween(String value1, String value2) { + addCriterion("optional_roles not between", value1, value2, "optionalRoles"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNull() { + addCriterion("creator_id is null"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNotNull() { + addCriterion("creator_id is not null"); + return (Criteria) this; + } + + public Criteria andCreatorIdEqualTo(Long value) { + addCriterion("creator_id =", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotEqualTo(Long value) { + addCriterion("creator_id <>", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThan(Long value) { + addCriterion("creator_id >", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) { + addCriterion("creator_id >=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThan(Long value) { + addCriterion("creator_id <", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThanOrEqualTo(Long value) { + addCriterion("creator_id <=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdIn(List values) { + addCriterion("creator_id in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotIn(List values) { + addCriterion("creator_id not in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdBetween(Long value1, Long value2) { + addCriterion("creator_id between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotBetween(Long value1, Long value2) { + addCriterion("creator_id not between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(LocalDateTime value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(LocalDateTime value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(LocalDateTime value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(LocalDateTime value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(Integer value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(Integer value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(Integer value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(Integer value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(Integer value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(Integer value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(Integer value1, Integer value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(Integer value1, Integer value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/RaceQuestion.java b/src/main/java/club/joylink/rtss/entity/RaceQuestion.java new file mode 100644 index 000000000..bbc0d4a96 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RaceQuestion.java @@ -0,0 +1,153 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * race_question + * @author + */ +public class RaceQuestion implements Serializable { + private Long id; + + /** + * 题目 + */ + private String topic; + + /** + * 类型 + */ + private String type; + + /** + * 创建用户 + */ + private Long createUserId; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + /** + * 项目所属题目 + */ + private String projectCode; + + /** + * 公司题库 + */ + private Integer companyId; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getTopic() { + return topic; + } + + public void setTopic(String topic) { + this.topic = topic; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Long getCreateUserId() { + return createUserId; + } + + public void setCreateUserId(Long createUserId) { + this.createUserId = createUserId; + } + + public LocalDateTime getCreateTime() { + return createTime; + } + + public void setCreateTime(LocalDateTime createTime) { + this.createTime = createTime; + } + + public String getProjectCode() { + return projectCode; + } + + public void setProjectCode(String projectCode) { + this.projectCode = projectCode; + } + + public Integer getCompanyId() { + return companyId; + } + + public void setCompanyId(Integer companyId) { + this.companyId = companyId; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + RaceQuestion other = (RaceQuestion) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getTopic() == null ? other.getTopic() == null : this.getTopic().equals(other.getTopic())) + && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) + && (this.getCreateUserId() == null ? other.getCreateUserId() == null : this.getCreateUserId().equals(other.getCreateUserId())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getProjectCode() == null ? other.getProjectCode() == null : this.getProjectCode().equals(other.getProjectCode())) + && (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getTopic() == null) ? 0 : getTopic().hashCode()); + result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); + result = prime * result + ((getCreateUserId() == null) ? 0 : getCreateUserId().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getProjectCode() == null) ? 0 : getProjectCode().hashCode()); + result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", topic=").append(topic); + sb.append(", type=").append(type); + sb.append(", createUserId=").append(createUserId); + sb.append(", createTime=").append(createTime); + sb.append(", projectCode=").append(projectCode); + sb.append(", companyId=").append(companyId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/RaceQuestionExample.java b/src/main/java/club/joylink/rtss/entity/RaceQuestionExample.java new file mode 100644 index 000000000..e6cfb1249 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RaceQuestionExample.java @@ -0,0 +1,673 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class RaceQuestionExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public RaceQuestionExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andTopicIsNull() { + addCriterion("topic is null"); + return (Criteria) this; + } + + public Criteria andTopicIsNotNull() { + addCriterion("topic is not null"); + return (Criteria) this; + } + + public Criteria andTopicEqualTo(String value) { + addCriterion("topic =", value, "topic"); + return (Criteria) this; + } + + public Criteria andTopicNotEqualTo(String value) { + addCriterion("topic <>", value, "topic"); + return (Criteria) this; + } + + public Criteria andTopicGreaterThan(String value) { + addCriterion("topic >", value, "topic"); + return (Criteria) this; + } + + public Criteria andTopicGreaterThanOrEqualTo(String value) { + addCriterion("topic >=", value, "topic"); + return (Criteria) this; + } + + public Criteria andTopicLessThan(String value) { + addCriterion("topic <", value, "topic"); + return (Criteria) this; + } + + public Criteria andTopicLessThanOrEqualTo(String value) { + addCriterion("topic <=", value, "topic"); + return (Criteria) this; + } + + public Criteria andTopicLike(String value) { + addCriterion("topic like", value, "topic"); + return (Criteria) this; + } + + public Criteria andTopicNotLike(String value) { + addCriterion("topic not like", value, "topic"); + return (Criteria) this; + } + + public Criteria andTopicIn(List values) { + addCriterion("topic in", values, "topic"); + return (Criteria) this; + } + + public Criteria andTopicNotIn(List values) { + addCriterion("topic not in", values, "topic"); + return (Criteria) this; + } + + public Criteria andTopicBetween(String value1, String value2) { + addCriterion("topic between", value1, value2, "topic"); + return (Criteria) this; + } + + public Criteria andTopicNotBetween(String value1, String value2) { + addCriterion("topic not between", value1, value2, "topic"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("`type` is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("`type` is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(String value) { + addCriterion("`type` =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(String value) { + addCriterion("`type` <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(String value) { + addCriterion("`type` >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(String value) { + addCriterion("`type` >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(String value) { + addCriterion("`type` <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(String value) { + addCriterion("`type` <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLike(String value) { + addCriterion("`type` like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotLike(String value) { + addCriterion("`type` not like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("`type` in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("`type` not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(String value1, String value2) { + addCriterion("`type` between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(String value1, String value2) { + addCriterion("`type` not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIsNull() { + addCriterion("create_user_id is null"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIsNotNull() { + addCriterion("create_user_id is not null"); + return (Criteria) this; + } + + public Criteria andCreateUserIdEqualTo(Long value) { + addCriterion("create_user_id =", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotEqualTo(Long value) { + addCriterion("create_user_id <>", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdGreaterThan(Long value) { + addCriterion("create_user_id >", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("create_user_id >=", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLessThan(Long value) { + addCriterion("create_user_id <", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdLessThanOrEqualTo(Long value) { + addCriterion("create_user_id <=", value, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdIn(List values) { + addCriterion("create_user_id in", values, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotIn(List values) { + addCriterion("create_user_id not in", values, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdBetween(Long value1, Long value2) { + addCriterion("create_user_id between", value1, value2, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateUserIdNotBetween(Long value1, Long value2) { + addCriterion("create_user_id not between", value1, value2, "createUserId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(LocalDateTime value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(LocalDateTime value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(LocalDateTime value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(LocalDateTime value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andProjectCodeIsNull() { + addCriterion("project_code is null"); + return (Criteria) this; + } + + public Criteria andProjectCodeIsNotNull() { + addCriterion("project_code is not null"); + return (Criteria) this; + } + + public Criteria andProjectCodeEqualTo(String value) { + addCriterion("project_code =", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeNotEqualTo(String value) { + addCriterion("project_code <>", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeGreaterThan(String value) { + addCriterion("project_code >", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeGreaterThanOrEqualTo(String value) { + addCriterion("project_code >=", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeLessThan(String value) { + addCriterion("project_code <", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeLessThanOrEqualTo(String value) { + addCriterion("project_code <=", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeLike(String value) { + addCriterion("project_code like", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeNotLike(String value) { + addCriterion("project_code not like", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeIn(List values) { + addCriterion("project_code in", values, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeNotIn(List values) { + addCriterion("project_code not in", values, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeBetween(String value1, String value2) { + addCriterion("project_code between", value1, value2, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeNotBetween(String value1, String value2) { + addCriterion("project_code not between", value1, value2, "projectCode"); + return (Criteria) this; + } + + public Criteria andCompanyIdIsNull() { + addCriterion("company_id is null"); + return (Criteria) this; + } + + public Criteria andCompanyIdIsNotNull() { + addCriterion("company_id is not null"); + return (Criteria) this; + } + + public Criteria andCompanyIdEqualTo(Integer value) { + addCriterion("company_id =", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotEqualTo(Integer value) { + addCriterion("company_id <>", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThan(Integer value) { + addCriterion("company_id >", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThanOrEqualTo(Integer value) { + addCriterion("company_id >=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThan(Integer value) { + addCriterion("company_id <", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThanOrEqualTo(Integer value) { + addCriterion("company_id <=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdIn(List values) { + addCriterion("company_id in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotIn(List values) { + addCriterion("company_id not in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdBetween(Integer value1, Integer value2) { + addCriterion("company_id between", value1, value2, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotBetween(Integer value1, Integer value2) { + addCriterion("company_id not between", value1, value2, "companyId"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/RaceQuestionMocksLikes.java b/src/main/java/club/joylink/rtss/entity/RaceQuestionMocksLikes.java new file mode 100644 index 000000000..032266e5b --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RaceQuestionMocksLikes.java @@ -0,0 +1,95 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * race_question_mocks_likes + * @author + */ +public class RaceQuestionMocksLikes implements Serializable { + private Integer id; + + private Long userId; + + private String projectCode; + + private String likesUser; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public String getProjectCode() { + return projectCode; + } + + public void setProjectCode(String projectCode) { + this.projectCode = projectCode; + } + + public String getLikesUser() { + return likesUser; + } + + public void setLikesUser(String likesUser) { + this.likesUser = likesUser; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + RaceQuestionMocksLikes other = (RaceQuestionMocksLikes) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) + && (this.getProjectCode() == null ? other.getProjectCode() == null : this.getProjectCode().equals(other.getProjectCode())) + && (this.getLikesUser() == null ? other.getLikesUser() == null : this.getLikesUser().equals(other.getLikesUser())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); + result = prime * result + ((getProjectCode() == null) ? 0 : getProjectCode().hashCode()); + result = prime * result + ((getLikesUser() == null) ? 0 : getLikesUser().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", userId=").append(userId); + sb.append(", projectCode=").append(projectCode); + sb.append(", likesUser=").append(likesUser); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/RaceQuestionMocksLikesExample.java b/src/main/java/club/joylink/rtss/entity/RaceQuestionMocksLikesExample.java new file mode 100644 index 000000000..5b42d6e65 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RaceQuestionMocksLikesExample.java @@ -0,0 +1,412 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class RaceQuestionMocksLikesExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public RaceQuestionMocksLikesExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Integer value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Integer value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Integer value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Integer value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Integer value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Integer value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Integer value1, Integer value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Integer value1, Integer value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andProjectCodeIsNull() { + addCriterion("project_code is null"); + return (Criteria) this; + } + + public Criteria andProjectCodeIsNotNull() { + addCriterion("project_code is not null"); + return (Criteria) this; + } + + public Criteria andProjectCodeEqualTo(String value) { + addCriterion("project_code =", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeNotEqualTo(String value) { + addCriterion("project_code <>", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeGreaterThan(String value) { + addCriterion("project_code >", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeGreaterThanOrEqualTo(String value) { + addCriterion("project_code >=", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeLessThan(String value) { + addCriterion("project_code <", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeLessThanOrEqualTo(String value) { + addCriterion("project_code <=", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeLike(String value) { + addCriterion("project_code like", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeNotLike(String value) { + addCriterion("project_code not like", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeIn(List values) { + addCriterion("project_code in", values, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeNotIn(List values) { + addCriterion("project_code not in", values, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeBetween(String value1, String value2) { + addCriterion("project_code between", value1, value2, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeNotBetween(String value1, String value2) { + addCriterion("project_code not between", value1, value2, "projectCode"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/RaceQuestionMocksStats.java b/src/main/java/club/joylink/rtss/entity/RaceQuestionMocksStats.java new file mode 100644 index 000000000..45bbcdee5 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RaceQuestionMocksStats.java @@ -0,0 +1,123 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDateTime; + +/** + * race_question_mocks_stats + * @author + */ +public class RaceQuestionMocksStats implements Serializable { + private Long id; + + private Long userId; + + private Float score; + + private BigDecimal accuracy; + + private String projectCode; + + private LocalDateTime mockTime; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public Float getScore() { + return score; + } + + public void setScore(Float score) { + this.score = score; + } + + public BigDecimal getAccuracy() { + return accuracy; + } + + public void setAccuracy(BigDecimal accuracy) { + this.accuracy = accuracy; + } + + public String getProjectCode() { + return projectCode; + } + + public void setProjectCode(String projectCode) { + this.projectCode = projectCode; + } + + public LocalDateTime getMockTime() { + return mockTime; + } + + public void setMockTime(LocalDateTime mockTime) { + this.mockTime = mockTime; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + RaceQuestionMocksStats other = (RaceQuestionMocksStats) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) + && (this.getScore() == null ? other.getScore() == null : this.getScore().equals(other.getScore())) + && (this.getAccuracy() == null ? other.getAccuracy() == null : this.getAccuracy().equals(other.getAccuracy())) + && (this.getProjectCode() == null ? other.getProjectCode() == null : this.getProjectCode().equals(other.getProjectCode())) + && (this.getMockTime() == null ? other.getMockTime() == null : this.getMockTime().equals(other.getMockTime())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); + result = prime * result + ((getScore() == null) ? 0 : getScore().hashCode()); + result = prime * result + ((getAccuracy() == null) ? 0 : getAccuracy().hashCode()); + result = prime * result + ((getProjectCode() == null) ? 0 : getProjectCode().hashCode()); + result = prime * result + ((getMockTime() == null) ? 0 : getMockTime().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", userId=").append(userId); + sb.append(", score=").append(score); + sb.append(", accuracy=").append(accuracy); + sb.append(", projectCode=").append(projectCode); + sb.append(", mockTime=").append(mockTime); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/RaceQuestionMocksStatsExample.java b/src/main/java/club/joylink/rtss/entity/RaceQuestionMocksStatsExample.java new file mode 100644 index 000000000..0e55b56e8 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RaceQuestionMocksStatsExample.java @@ -0,0 +1,594 @@ +package club.joylink.rtss.entity; + +import java.math.BigDecimal; +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class RaceQuestionMocksStatsExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public RaceQuestionMocksStatsExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andScoreIsNull() { + addCriterion("score is null"); + return (Criteria) this; + } + + public Criteria andScoreIsNotNull() { + addCriterion("score is not null"); + return (Criteria) this; + } + + public Criteria andScoreEqualTo(Float value) { + addCriterion("score =", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotEqualTo(Float value) { + addCriterion("score <>", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreGreaterThan(Float value) { + addCriterion("score >", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreGreaterThanOrEqualTo(Float value) { + addCriterion("score >=", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreLessThan(Float value) { + addCriterion("score <", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreLessThanOrEqualTo(Float value) { + addCriterion("score <=", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreIn(List values) { + addCriterion("score in", values, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotIn(List values) { + addCriterion("score not in", values, "score"); + return (Criteria) this; + } + + public Criteria andScoreBetween(Float value1, Float value2) { + addCriterion("score between", value1, value2, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotBetween(Float value1, Float value2) { + addCriterion("score not between", value1, value2, "score"); + return (Criteria) this; + } + + public Criteria andAccuracyIsNull() { + addCriterion("accuracy is null"); + return (Criteria) this; + } + + public Criteria andAccuracyIsNotNull() { + addCriterion("accuracy is not null"); + return (Criteria) this; + } + + public Criteria andAccuracyEqualTo(BigDecimal value) { + addCriterion("accuracy =", value, "accuracy"); + return (Criteria) this; + } + + public Criteria andAccuracyNotEqualTo(BigDecimal value) { + addCriterion("accuracy <>", value, "accuracy"); + return (Criteria) this; + } + + public Criteria andAccuracyGreaterThan(BigDecimal value) { + addCriterion("accuracy >", value, "accuracy"); + return (Criteria) this; + } + + public Criteria andAccuracyGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("accuracy >=", value, "accuracy"); + return (Criteria) this; + } + + public Criteria andAccuracyLessThan(BigDecimal value) { + addCriterion("accuracy <", value, "accuracy"); + return (Criteria) this; + } + + public Criteria andAccuracyLessThanOrEqualTo(BigDecimal value) { + addCriterion("accuracy <=", value, "accuracy"); + return (Criteria) this; + } + + public Criteria andAccuracyIn(List values) { + addCriterion("accuracy in", values, "accuracy"); + return (Criteria) this; + } + + public Criteria andAccuracyNotIn(List values) { + addCriterion("accuracy not in", values, "accuracy"); + return (Criteria) this; + } + + public Criteria andAccuracyBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("accuracy between", value1, value2, "accuracy"); + return (Criteria) this; + } + + public Criteria andAccuracyNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("accuracy not between", value1, value2, "accuracy"); + return (Criteria) this; + } + + public Criteria andProjectCodeIsNull() { + addCriterion("project_code is null"); + return (Criteria) this; + } + + public Criteria andProjectCodeIsNotNull() { + addCriterion("project_code is not null"); + return (Criteria) this; + } + + public Criteria andProjectCodeEqualTo(String value) { + addCriterion("project_code =", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeNotEqualTo(String value) { + addCriterion("project_code <>", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeGreaterThan(String value) { + addCriterion("project_code >", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeGreaterThanOrEqualTo(String value) { + addCriterion("project_code >=", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeLessThan(String value) { + addCriterion("project_code <", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeLessThanOrEqualTo(String value) { + addCriterion("project_code <=", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeLike(String value) { + addCriterion("project_code like", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeNotLike(String value) { + addCriterion("project_code not like", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeIn(List values) { + addCriterion("project_code in", values, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeNotIn(List values) { + addCriterion("project_code not in", values, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeBetween(String value1, String value2) { + addCriterion("project_code between", value1, value2, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeNotBetween(String value1, String value2) { + addCriterion("project_code not between", value1, value2, "projectCode"); + return (Criteria) this; + } + + public Criteria andMockTimeIsNull() { + addCriterion("mock_time is null"); + return (Criteria) this; + } + + public Criteria andMockTimeIsNotNull() { + addCriterion("mock_time is not null"); + return (Criteria) this; + } + + public Criteria andMockTimeEqualTo(LocalDateTime value) { + addCriterion("mock_time =", value, "mockTime"); + return (Criteria) this; + } + + public Criteria andMockTimeNotEqualTo(LocalDateTime value) { + addCriterion("mock_time <>", value, "mockTime"); + return (Criteria) this; + } + + public Criteria andMockTimeGreaterThan(LocalDateTime value) { + addCriterion("mock_time >", value, "mockTime"); + return (Criteria) this; + } + + public Criteria andMockTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("mock_time >=", value, "mockTime"); + return (Criteria) this; + } + + public Criteria andMockTimeLessThan(LocalDateTime value) { + addCriterion("mock_time <", value, "mockTime"); + return (Criteria) this; + } + + public Criteria andMockTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("mock_time <=", value, "mockTime"); + return (Criteria) this; + } + + public Criteria andMockTimeIn(List values) { + addCriterion("mock_time in", values, "mockTime"); + return (Criteria) this; + } + + public Criteria andMockTimeNotIn(List values) { + addCriterion("mock_time not in", values, "mockTime"); + return (Criteria) this; + } + + public Criteria andMockTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("mock_time between", value1, value2, "mockTime"); + return (Criteria) this; + } + + public Criteria andMockTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("mock_time not between", value1, value2, "mockTime"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/RaceQuestionOption.java b/src/main/java/club/joylink/rtss/entity/RaceQuestionOption.java new file mode 100644 index 000000000..b2ca9a6da --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RaceQuestionOption.java @@ -0,0 +1,117 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * race_question_option + * @author + */ +public class RaceQuestionOption implements Serializable { + private Long id; + + private Long questionId; + + /** + * 选项内容 + */ + private String content; + + /** + * 正确的 + */ + private Boolean correct; + + /** + * 答题选项序号 + */ + private Byte order; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getQuestionId() { + return questionId; + } + + public void setQuestionId(Long questionId) { + this.questionId = questionId; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public Boolean getCorrect() { + return correct; + } + + public void setCorrect(Boolean correct) { + this.correct = correct; + } + + public Byte getOrder() { + return order; + } + + public void setOrder(Byte order) { + this.order = order; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + RaceQuestionOption other = (RaceQuestionOption) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getQuestionId() == null ? other.getQuestionId() == null : this.getQuestionId().equals(other.getQuestionId())) + && (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent())) + && (this.getCorrect() == null ? other.getCorrect() == null : this.getCorrect().equals(other.getCorrect())) + && (this.getOrder() == null ? other.getOrder() == null : this.getOrder().equals(other.getOrder())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getQuestionId() == null) ? 0 : getQuestionId().hashCode()); + result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode()); + result = prime * result + ((getCorrect() == null) ? 0 : getCorrect().hashCode()); + result = prime * result + ((getOrder() == null) ? 0 : getOrder().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", questionId=").append(questionId); + sb.append(", content=").append(content); + sb.append(", correct=").append(correct); + sb.append(", order=").append(order); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/RaceQuestionOptionExample.java b/src/main/java/club/joylink/rtss/entity/RaceQuestionOptionExample.java new file mode 100644 index 000000000..0e5899f72 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RaceQuestionOptionExample.java @@ -0,0 +1,532 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class RaceQuestionOptionExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public RaceQuestionOptionExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andQuestionIdIsNull() { + addCriterion("question_id is null"); + return (Criteria) this; + } + + public Criteria andQuestionIdIsNotNull() { + addCriterion("question_id is not null"); + return (Criteria) this; + } + + public Criteria andQuestionIdEqualTo(Long value) { + addCriterion("question_id =", value, "questionId"); + return (Criteria) this; + } + + public Criteria andQuestionIdNotEqualTo(Long value) { + addCriterion("question_id <>", value, "questionId"); + return (Criteria) this; + } + + public Criteria andQuestionIdGreaterThan(Long value) { + addCriterion("question_id >", value, "questionId"); + return (Criteria) this; + } + + public Criteria andQuestionIdGreaterThanOrEqualTo(Long value) { + addCriterion("question_id >=", value, "questionId"); + return (Criteria) this; + } + + public Criteria andQuestionIdLessThan(Long value) { + addCriterion("question_id <", value, "questionId"); + return (Criteria) this; + } + + public Criteria andQuestionIdLessThanOrEqualTo(Long value) { + addCriterion("question_id <=", value, "questionId"); + return (Criteria) this; + } + + public Criteria andQuestionIdIn(List values) { + addCriterion("question_id in", values, "questionId"); + return (Criteria) this; + } + + public Criteria andQuestionIdNotIn(List values) { + addCriterion("question_id not in", values, "questionId"); + return (Criteria) this; + } + + public Criteria andQuestionIdBetween(Long value1, Long value2) { + addCriterion("question_id between", value1, value2, "questionId"); + return (Criteria) this; + } + + public Criteria andQuestionIdNotBetween(Long value1, Long value2) { + addCriterion("question_id not between", value1, value2, "questionId"); + return (Criteria) this; + } + + public Criteria andContentIsNull() { + addCriterion("content is null"); + return (Criteria) this; + } + + public Criteria andContentIsNotNull() { + addCriterion("content is not null"); + return (Criteria) this; + } + + public Criteria andContentEqualTo(String value) { + addCriterion("content =", value, "content"); + return (Criteria) this; + } + + public Criteria andContentNotEqualTo(String value) { + addCriterion("content <>", value, "content"); + return (Criteria) this; + } + + public Criteria andContentGreaterThan(String value) { + addCriterion("content >", value, "content"); + return (Criteria) this; + } + + public Criteria andContentGreaterThanOrEqualTo(String value) { + addCriterion("content >=", value, "content"); + return (Criteria) this; + } + + public Criteria andContentLessThan(String value) { + addCriterion("content <", value, "content"); + return (Criteria) this; + } + + public Criteria andContentLessThanOrEqualTo(String value) { + addCriterion("content <=", value, "content"); + return (Criteria) this; + } + + public Criteria andContentLike(String value) { + addCriterion("content like", value, "content"); + return (Criteria) this; + } + + public Criteria andContentNotLike(String value) { + addCriterion("content not like", value, "content"); + return (Criteria) this; + } + + public Criteria andContentIn(List values) { + addCriterion("content in", values, "content"); + return (Criteria) this; + } + + public Criteria andContentNotIn(List values) { + addCriterion("content not in", values, "content"); + return (Criteria) this; + } + + public Criteria andContentBetween(String value1, String value2) { + addCriterion("content between", value1, value2, "content"); + return (Criteria) this; + } + + public Criteria andContentNotBetween(String value1, String value2) { + addCriterion("content not between", value1, value2, "content"); + return (Criteria) this; + } + + public Criteria andCorrectIsNull() { + addCriterion("correct is null"); + return (Criteria) this; + } + + public Criteria andCorrectIsNotNull() { + addCriterion("correct is not null"); + return (Criteria) this; + } + + public Criteria andCorrectEqualTo(Boolean value) { + addCriterion("correct =", value, "correct"); + return (Criteria) this; + } + + public Criteria andCorrectNotEqualTo(Boolean value) { + addCriterion("correct <>", value, "correct"); + return (Criteria) this; + } + + public Criteria andCorrectGreaterThan(Boolean value) { + addCriterion("correct >", value, "correct"); + return (Criteria) this; + } + + public Criteria andCorrectGreaterThanOrEqualTo(Boolean value) { + addCriterion("correct >=", value, "correct"); + return (Criteria) this; + } + + public Criteria andCorrectLessThan(Boolean value) { + addCriterion("correct <", value, "correct"); + return (Criteria) this; + } + + public Criteria andCorrectLessThanOrEqualTo(Boolean value) { + addCriterion("correct <=", value, "correct"); + return (Criteria) this; + } + + public Criteria andCorrectIn(List values) { + addCriterion("correct in", values, "correct"); + return (Criteria) this; + } + + public Criteria andCorrectNotIn(List values) { + addCriterion("correct not in", values, "correct"); + return (Criteria) this; + } + + public Criteria andCorrectBetween(Boolean value1, Boolean value2) { + addCriterion("correct between", value1, value2, "correct"); + return (Criteria) this; + } + + public Criteria andCorrectNotBetween(Boolean value1, Boolean value2) { + addCriterion("correct not between", value1, value2, "correct"); + return (Criteria) this; + } + + public Criteria andOrderIsNull() { + addCriterion("`order` is null"); + return (Criteria) this; + } + + public Criteria andOrderIsNotNull() { + addCriterion("`order` is not null"); + return (Criteria) this; + } + + public Criteria andOrderEqualTo(Byte value) { + addCriterion("`order` =", value, "order"); + return (Criteria) this; + } + + public Criteria andOrderNotEqualTo(Byte value) { + addCriterion("`order` <>", value, "order"); + return (Criteria) this; + } + + public Criteria andOrderGreaterThan(Byte value) { + addCriterion("`order` >", value, "order"); + return (Criteria) this; + } + + public Criteria andOrderGreaterThanOrEqualTo(Byte value) { + addCriterion("`order` >=", value, "order"); + return (Criteria) this; + } + + public Criteria andOrderLessThan(Byte value) { + addCriterion("`order` <", value, "order"); + return (Criteria) this; + } + + public Criteria andOrderLessThanOrEqualTo(Byte value) { + addCriterion("`order` <=", value, "order"); + return (Criteria) this; + } + + public Criteria andOrderIn(List values) { + addCriterion("`order` in", values, "order"); + return (Criteria) this; + } + + public Criteria andOrderNotIn(List values) { + addCriterion("`order` not in", values, "order"); + return (Criteria) this; + } + + public Criteria andOrderBetween(Byte value1, Byte value2) { + addCriterion("`order` between", value1, value2, "order"); + return (Criteria) this; + } + + public Criteria andOrderNotBetween(Byte value1, Byte value2) { + addCriterion("`order` not between", value1, value2, "order"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/RaceQuestionProgress.java b/src/main/java/club/joylink/rtss/entity/RaceQuestionProgress.java new file mode 100644 index 000000000..b1b09f6b8 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RaceQuestionProgress.java @@ -0,0 +1,121 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * race_question_progress + * @author + */ +public class RaceQuestionProgress implements Serializable { + private Long id; + + private Long userId; + + private Long questionIndex; + + private String projectCode; + + private String incorrect; + + private Integer companyId; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public Long getQuestionIndex() { + return questionIndex; + } + + public void setQuestionIndex(Long questionIndex) { + this.questionIndex = questionIndex; + } + + public String getProjectCode() { + return projectCode; + } + + public void setProjectCode(String projectCode) { + this.projectCode = projectCode; + } + + public String getIncorrect() { + return incorrect; + } + + public void setIncorrect(String incorrect) { + this.incorrect = incorrect; + } + + public Integer getCompanyId() { + return companyId; + } + + public void setCompanyId(Integer companyId) { + this.companyId = companyId; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + RaceQuestionProgress other = (RaceQuestionProgress) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) + && (this.getQuestionIndex() == null ? other.getQuestionIndex() == null : this.getQuestionIndex().equals(other.getQuestionIndex())) + && (this.getProjectCode() == null ? other.getProjectCode() == null : this.getProjectCode().equals(other.getProjectCode())) + && (this.getIncorrect() == null ? other.getIncorrect() == null : this.getIncorrect().equals(other.getIncorrect())) + && (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); + result = prime * result + ((getQuestionIndex() == null) ? 0 : getQuestionIndex().hashCode()); + result = prime * result + ((getProjectCode() == null) ? 0 : getProjectCode().hashCode()); + result = prime * result + ((getIncorrect() == null) ? 0 : getIncorrect().hashCode()); + result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", userId=").append(userId); + sb.append(", questionIndex=").append(questionIndex); + sb.append(", projectCode=").append(projectCode); + sb.append(", incorrect=").append(incorrect); + sb.append(", companyId=").append(companyId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/RaceQuestionProgressExample.java b/src/main/java/club/joylink/rtss/entity/RaceQuestionProgressExample.java new file mode 100644 index 000000000..dc74f8782 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RaceQuestionProgressExample.java @@ -0,0 +1,602 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class RaceQuestionProgressExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public RaceQuestionProgressExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andQuestionIndexIsNull() { + addCriterion("question_index is null"); + return (Criteria) this; + } + + public Criteria andQuestionIndexIsNotNull() { + addCriterion("question_index is not null"); + return (Criteria) this; + } + + public Criteria andQuestionIndexEqualTo(Long value) { + addCriterion("question_index =", value, "questionIndex"); + return (Criteria) this; + } + + public Criteria andQuestionIndexNotEqualTo(Long value) { + addCriterion("question_index <>", value, "questionIndex"); + return (Criteria) this; + } + + public Criteria andQuestionIndexGreaterThan(Long value) { + addCriterion("question_index >", value, "questionIndex"); + return (Criteria) this; + } + + public Criteria andQuestionIndexGreaterThanOrEqualTo(Long value) { + addCriterion("question_index >=", value, "questionIndex"); + return (Criteria) this; + } + + public Criteria andQuestionIndexLessThan(Long value) { + addCriterion("question_index <", value, "questionIndex"); + return (Criteria) this; + } + + public Criteria andQuestionIndexLessThanOrEqualTo(Long value) { + addCriterion("question_index <=", value, "questionIndex"); + return (Criteria) this; + } + + public Criteria andQuestionIndexIn(List values) { + addCriterion("question_index in", values, "questionIndex"); + return (Criteria) this; + } + + public Criteria andQuestionIndexNotIn(List values) { + addCriterion("question_index not in", values, "questionIndex"); + return (Criteria) this; + } + + public Criteria andQuestionIndexBetween(Long value1, Long value2) { + addCriterion("question_index between", value1, value2, "questionIndex"); + return (Criteria) this; + } + + public Criteria andQuestionIndexNotBetween(Long value1, Long value2) { + addCriterion("question_index not between", value1, value2, "questionIndex"); + return (Criteria) this; + } + + public Criteria andProjectCodeIsNull() { + addCriterion("project_code is null"); + return (Criteria) this; + } + + public Criteria andProjectCodeIsNotNull() { + addCriterion("project_code is not null"); + return (Criteria) this; + } + + public Criteria andProjectCodeEqualTo(String value) { + addCriterion("project_code =", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeNotEqualTo(String value) { + addCriterion("project_code <>", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeGreaterThan(String value) { + addCriterion("project_code >", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeGreaterThanOrEqualTo(String value) { + addCriterion("project_code >=", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeLessThan(String value) { + addCriterion("project_code <", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeLessThanOrEqualTo(String value) { + addCriterion("project_code <=", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeLike(String value) { + addCriterion("project_code like", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeNotLike(String value) { + addCriterion("project_code not like", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeIn(List values) { + addCriterion("project_code in", values, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeNotIn(List values) { + addCriterion("project_code not in", values, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeBetween(String value1, String value2) { + addCriterion("project_code between", value1, value2, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeNotBetween(String value1, String value2) { + addCriterion("project_code not between", value1, value2, "projectCode"); + return (Criteria) this; + } + + public Criteria andIncorrectIsNull() { + addCriterion("incorrect is null"); + return (Criteria) this; + } + + public Criteria andIncorrectIsNotNull() { + addCriterion("incorrect is not null"); + return (Criteria) this; + } + + public Criteria andIncorrectEqualTo(String value) { + addCriterion("incorrect =", value, "incorrect"); + return (Criteria) this; + } + + public Criteria andIncorrectNotEqualTo(String value) { + addCriterion("incorrect <>", value, "incorrect"); + return (Criteria) this; + } + + public Criteria andIncorrectGreaterThan(String value) { + addCriterion("incorrect >", value, "incorrect"); + return (Criteria) this; + } + + public Criteria andIncorrectGreaterThanOrEqualTo(String value) { + addCriterion("incorrect >=", value, "incorrect"); + return (Criteria) this; + } + + public Criteria andIncorrectLessThan(String value) { + addCriterion("incorrect <", value, "incorrect"); + return (Criteria) this; + } + + public Criteria andIncorrectLessThanOrEqualTo(String value) { + addCriterion("incorrect <=", value, "incorrect"); + return (Criteria) this; + } + + public Criteria andIncorrectLike(String value) { + addCriterion("incorrect like", value, "incorrect"); + return (Criteria) this; + } + + public Criteria andIncorrectNotLike(String value) { + addCriterion("incorrect not like", value, "incorrect"); + return (Criteria) this; + } + + public Criteria andIncorrectIn(List values) { + addCriterion("incorrect in", values, "incorrect"); + return (Criteria) this; + } + + public Criteria andIncorrectNotIn(List values) { + addCriterion("incorrect not in", values, "incorrect"); + return (Criteria) this; + } + + public Criteria andIncorrectBetween(String value1, String value2) { + addCriterion("incorrect between", value1, value2, "incorrect"); + return (Criteria) this; + } + + public Criteria andIncorrectNotBetween(String value1, String value2) { + addCriterion("incorrect not between", value1, value2, "incorrect"); + return (Criteria) this; + } + + public Criteria andCompanyIdIsNull() { + addCriterion("company_id is null"); + return (Criteria) this; + } + + public Criteria andCompanyIdIsNotNull() { + addCriterion("company_id is not null"); + return (Criteria) this; + } + + public Criteria andCompanyIdEqualTo(Integer value) { + addCriterion("company_id =", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotEqualTo(Integer value) { + addCriterion("company_id <>", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThan(Integer value) { + addCriterion("company_id >", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThanOrEqualTo(Integer value) { + addCriterion("company_id >=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThan(Integer value) { + addCriterion("company_id <", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThanOrEqualTo(Integer value) { + addCriterion("company_id <=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdIn(List values) { + addCriterion("company_id in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotIn(List values) { + addCriterion("company_id not in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdBetween(Integer value1, Integer value2) { + addCriterion("company_id between", value1, value2, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotBetween(Integer value1, Integer value2) { + addCriterion("company_id not between", value1, value2, "companyId"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/RaceQuestionsRules.java b/src/main/java/club/joylink/rtss/entity/RaceQuestionsRules.java new file mode 100644 index 000000000..5538ad957 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RaceQuestionsRules.java @@ -0,0 +1,95 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * race_questions_rules + * @author + */ +public class RaceQuestionsRules implements Serializable { + private Integer id; + + private String projectCode; + + private Integer companyId; + + private String rules; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getProjectCode() { + return projectCode; + } + + public void setProjectCode(String projectCode) { + this.projectCode = projectCode; + } + + public Integer getCompanyId() { + return companyId; + } + + public void setCompanyId(Integer companyId) { + this.companyId = companyId; + } + + public String getRules() { + return rules; + } + + public void setRules(String rules) { + this.rules = rules; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + RaceQuestionsRules other = (RaceQuestionsRules) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getProjectCode() == null ? other.getProjectCode() == null : this.getProjectCode().equals(other.getProjectCode())) + && (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId())) + && (this.getRules() == null ? other.getRules() == null : this.getRules().equals(other.getRules())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getProjectCode() == null) ? 0 : getProjectCode().hashCode()); + result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode()); + result = prime * result + ((getRules() == null) ? 0 : getRules().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", projectCode=").append(projectCode); + sb.append(", companyId=").append(companyId); + sb.append(", rules=").append(rules); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/RaceQuestionsRulesExample.java b/src/main/java/club/joylink/rtss/entity/RaceQuestionsRulesExample.java new file mode 100644 index 000000000..7c3a1cb5e --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RaceQuestionsRulesExample.java @@ -0,0 +1,482 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class RaceQuestionsRulesExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public RaceQuestionsRulesExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Integer value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Integer value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Integer value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Integer value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Integer value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Integer value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Integer value1, Integer value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Integer value1, Integer value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andProjectCodeIsNull() { + addCriterion("project_code is null"); + return (Criteria) this; + } + + public Criteria andProjectCodeIsNotNull() { + addCriterion("project_code is not null"); + return (Criteria) this; + } + + public Criteria andProjectCodeEqualTo(String value) { + addCriterion("project_code =", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeNotEqualTo(String value) { + addCriterion("project_code <>", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeGreaterThan(String value) { + addCriterion("project_code >", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeGreaterThanOrEqualTo(String value) { + addCriterion("project_code >=", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeLessThan(String value) { + addCriterion("project_code <", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeLessThanOrEqualTo(String value) { + addCriterion("project_code <=", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeLike(String value) { + addCriterion("project_code like", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeNotLike(String value) { + addCriterion("project_code not like", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeIn(List values) { + addCriterion("project_code in", values, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeNotIn(List values) { + addCriterion("project_code not in", values, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeBetween(String value1, String value2) { + addCriterion("project_code between", value1, value2, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeNotBetween(String value1, String value2) { + addCriterion("project_code not between", value1, value2, "projectCode"); + return (Criteria) this; + } + + public Criteria andCompanyIdIsNull() { + addCriterion("company_id is null"); + return (Criteria) this; + } + + public Criteria andCompanyIdIsNotNull() { + addCriterion("company_id is not null"); + return (Criteria) this; + } + + public Criteria andCompanyIdEqualTo(Integer value) { + addCriterion("company_id =", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotEqualTo(Integer value) { + addCriterion("company_id <>", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThan(Integer value) { + addCriterion("company_id >", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThanOrEqualTo(Integer value) { + addCriterion("company_id >=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThan(Integer value) { + addCriterion("company_id <", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThanOrEqualTo(Integer value) { + addCriterion("company_id <=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdIn(List values) { + addCriterion("company_id in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotIn(List values) { + addCriterion("company_id not in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdBetween(Integer value1, Integer value2) { + addCriterion("company_id between", value1, value2, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotBetween(Integer value1, Integer value2) { + addCriterion("company_id not between", value1, value2, "companyId"); + return (Criteria) this; + } + + public Criteria andRulesIsNull() { + addCriterion("rules is null"); + return (Criteria) this; + } + + public Criteria andRulesIsNotNull() { + addCriterion("rules is not null"); + return (Criteria) this; + } + + public Criteria andRulesEqualTo(String value) { + addCriterion("rules =", value, "rules"); + return (Criteria) this; + } + + public Criteria andRulesNotEqualTo(String value) { + addCriterion("rules <>", value, "rules"); + return (Criteria) this; + } + + public Criteria andRulesGreaterThan(String value) { + addCriterion("rules >", value, "rules"); + return (Criteria) this; + } + + public Criteria andRulesGreaterThanOrEqualTo(String value) { + addCriterion("rules >=", value, "rules"); + return (Criteria) this; + } + + public Criteria andRulesLessThan(String value) { + addCriterion("rules <", value, "rules"); + return (Criteria) this; + } + + public Criteria andRulesLessThanOrEqualTo(String value) { + addCriterion("rules <=", value, "rules"); + return (Criteria) this; + } + + public Criteria andRulesLike(String value) { + addCriterion("rules like", value, "rules"); + return (Criteria) this; + } + + public Criteria andRulesNotLike(String value) { + addCriterion("rules not like", value, "rules"); + return (Criteria) this; + } + + public Criteria andRulesIn(List values) { + addCriterion("rules in", values, "rules"); + return (Criteria) this; + } + + public Criteria andRulesNotIn(List values) { + addCriterion("rules not in", values, "rules"); + return (Criteria) this; + } + + public Criteria andRulesBetween(String value1, String value2) { + addCriterion("rules between", value1, value2, "rules"); + return (Criteria) this; + } + + public Criteria andRulesNotBetween(String value1, String value2) { + addCriterion("rules not between", value1, value2, "rules"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/RaceResult.java b/src/main/java/club/joylink/rtss/entity/RaceResult.java new file mode 100644 index 000000000..e1eb57893 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RaceResult.java @@ -0,0 +1,248 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * race_result + * @author + */ +public class RaceResult implements Serializable { + private Long id; + + /** + * 用户竞赛id + */ + private Long userRaceId; + + /** + * 题目id + */ + private Long questionId; + + /** + * 题目选项id + */ + private String questionOptionId; + + /** + * 竞赛题目 + */ + private String questionTopic; + + /** + * 作答内容 + */ + private String answerContent; + + /** + * 是否正确 + */ + private Boolean correct; + + /** + * 得分 + */ + private Float score; + + /** + * 题目分值 + */ + private Float totalScore; + + /** + * 备注信息 + */ + private String remarks; + + /** + * 用户id + */ + private Long userId; + + /** + * 项目code + */ + private String projectCode; + + /** + * 公司id + */ + private Integer companyId; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getUserRaceId() { + return userRaceId; + } + + public void setUserRaceId(Long userRaceId) { + this.userRaceId = userRaceId; + } + + public Long getQuestionId() { + return questionId; + } + + public void setQuestionId(Long questionId) { + this.questionId = questionId; + } + + public String getQuestionOptionId() { + return questionOptionId; + } + + public void setQuestionOptionId(String questionOptionId) { + this.questionOptionId = questionOptionId; + } + + public String getQuestionTopic() { + return questionTopic; + } + + public void setQuestionTopic(String questionTopic) { + this.questionTopic = questionTopic; + } + + public String getAnswerContent() { + return answerContent; + } + + public void setAnswerContent(String answerContent) { + this.answerContent = answerContent; + } + + public Boolean getCorrect() { + return correct; + } + + public void setCorrect(Boolean correct) { + this.correct = correct; + } + + public Float getScore() { + return score; + } + + public void setScore(Float score) { + this.score = score; + } + + public Float getTotalScore() { + return totalScore; + } + + public void setTotalScore(Float totalScore) { + this.totalScore = totalScore; + } + + public String getRemarks() { + return remarks; + } + + public void setRemarks(String remarks) { + this.remarks = remarks; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public String getProjectCode() { + return projectCode; + } + + public void setProjectCode(String projectCode) { + this.projectCode = projectCode; + } + + public Integer getCompanyId() { + return companyId; + } + + public void setCompanyId(Integer companyId) { + this.companyId = companyId; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + RaceResult other = (RaceResult) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getUserRaceId() == null ? other.getUserRaceId() == null : this.getUserRaceId().equals(other.getUserRaceId())) + && (this.getQuestionId() == null ? other.getQuestionId() == null : this.getQuestionId().equals(other.getQuestionId())) + && (this.getQuestionOptionId() == null ? other.getQuestionOptionId() == null : this.getQuestionOptionId().equals(other.getQuestionOptionId())) + && (this.getQuestionTopic() == null ? other.getQuestionTopic() == null : this.getQuestionTopic().equals(other.getQuestionTopic())) + && (this.getAnswerContent() == null ? other.getAnswerContent() == null : this.getAnswerContent().equals(other.getAnswerContent())) + && (this.getCorrect() == null ? other.getCorrect() == null : this.getCorrect().equals(other.getCorrect())) + && (this.getScore() == null ? other.getScore() == null : this.getScore().equals(other.getScore())) + && (this.getTotalScore() == null ? other.getTotalScore() == null : this.getTotalScore().equals(other.getTotalScore())) + && (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks())) + && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) + && (this.getProjectCode() == null ? other.getProjectCode() == null : this.getProjectCode().equals(other.getProjectCode())) + && (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getUserRaceId() == null) ? 0 : getUserRaceId().hashCode()); + result = prime * result + ((getQuestionId() == null) ? 0 : getQuestionId().hashCode()); + result = prime * result + ((getQuestionOptionId() == null) ? 0 : getQuestionOptionId().hashCode()); + result = prime * result + ((getQuestionTopic() == null) ? 0 : getQuestionTopic().hashCode()); + result = prime * result + ((getAnswerContent() == null) ? 0 : getAnswerContent().hashCode()); + result = prime * result + ((getCorrect() == null) ? 0 : getCorrect().hashCode()); + result = prime * result + ((getScore() == null) ? 0 : getScore().hashCode()); + result = prime * result + ((getTotalScore() == null) ? 0 : getTotalScore().hashCode()); + result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode()); + result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); + result = prime * result + ((getProjectCode() == null) ? 0 : getProjectCode().hashCode()); + result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", userRaceId=").append(userRaceId); + sb.append(", questionId=").append(questionId); + sb.append(", questionOptionId=").append(questionOptionId); + sb.append(", questionTopic=").append(questionTopic); + sb.append(", answerContent=").append(answerContent); + sb.append(", correct=").append(correct); + sb.append(", score=").append(score); + sb.append(", totalScore=").append(totalScore); + sb.append(", remarks=").append(remarks); + sb.append(", userId=").append(userId); + sb.append(", projectCode=").append(projectCode); + sb.append(", companyId=").append(companyId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/RaceResultExample.java b/src/main/java/club/joylink/rtss/entity/RaceResultExample.java new file mode 100644 index 000000000..8e36bc562 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RaceResultExample.java @@ -0,0 +1,1052 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class RaceResultExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public RaceResultExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andUserRaceIdIsNull() { + addCriterion("user_race_id is null"); + return (Criteria) this; + } + + public Criteria andUserRaceIdIsNotNull() { + addCriterion("user_race_id is not null"); + return (Criteria) this; + } + + public Criteria andUserRaceIdEqualTo(Long value) { + addCriterion("user_race_id =", value, "userRaceId"); + return (Criteria) this; + } + + public Criteria andUserRaceIdNotEqualTo(Long value) { + addCriterion("user_race_id <>", value, "userRaceId"); + return (Criteria) this; + } + + public Criteria andUserRaceIdGreaterThan(Long value) { + addCriterion("user_race_id >", value, "userRaceId"); + return (Criteria) this; + } + + public Criteria andUserRaceIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_race_id >=", value, "userRaceId"); + return (Criteria) this; + } + + public Criteria andUserRaceIdLessThan(Long value) { + addCriterion("user_race_id <", value, "userRaceId"); + return (Criteria) this; + } + + public Criteria andUserRaceIdLessThanOrEqualTo(Long value) { + addCriterion("user_race_id <=", value, "userRaceId"); + return (Criteria) this; + } + + public Criteria andUserRaceIdIn(List values) { + addCriterion("user_race_id in", values, "userRaceId"); + return (Criteria) this; + } + + public Criteria andUserRaceIdNotIn(List values) { + addCriterion("user_race_id not in", values, "userRaceId"); + return (Criteria) this; + } + + public Criteria andUserRaceIdBetween(Long value1, Long value2) { + addCriterion("user_race_id between", value1, value2, "userRaceId"); + return (Criteria) this; + } + + public Criteria andUserRaceIdNotBetween(Long value1, Long value2) { + addCriterion("user_race_id not between", value1, value2, "userRaceId"); + return (Criteria) this; + } + + public Criteria andQuestionIdIsNull() { + addCriterion("question_id is null"); + return (Criteria) this; + } + + public Criteria andQuestionIdIsNotNull() { + addCriterion("question_id is not null"); + return (Criteria) this; + } + + public Criteria andQuestionIdEqualTo(Long value) { + addCriterion("question_id =", value, "questionId"); + return (Criteria) this; + } + + public Criteria andQuestionIdNotEqualTo(Long value) { + addCriterion("question_id <>", value, "questionId"); + return (Criteria) this; + } + + public Criteria andQuestionIdGreaterThan(Long value) { + addCriterion("question_id >", value, "questionId"); + return (Criteria) this; + } + + public Criteria andQuestionIdGreaterThanOrEqualTo(Long value) { + addCriterion("question_id >=", value, "questionId"); + return (Criteria) this; + } + + public Criteria andQuestionIdLessThan(Long value) { + addCriterion("question_id <", value, "questionId"); + return (Criteria) this; + } + + public Criteria andQuestionIdLessThanOrEqualTo(Long value) { + addCriterion("question_id <=", value, "questionId"); + return (Criteria) this; + } + + public Criteria andQuestionIdIn(List values) { + addCriterion("question_id in", values, "questionId"); + return (Criteria) this; + } + + public Criteria andQuestionIdNotIn(List values) { + addCriterion("question_id not in", values, "questionId"); + return (Criteria) this; + } + + public Criteria andQuestionIdBetween(Long value1, Long value2) { + addCriterion("question_id between", value1, value2, "questionId"); + return (Criteria) this; + } + + public Criteria andQuestionIdNotBetween(Long value1, Long value2) { + addCriterion("question_id not between", value1, value2, "questionId"); + return (Criteria) this; + } + + public Criteria andQuestionOptionIdIsNull() { + addCriterion("question_option_id is null"); + return (Criteria) this; + } + + public Criteria andQuestionOptionIdIsNotNull() { + addCriterion("question_option_id is not null"); + return (Criteria) this; + } + + public Criteria andQuestionOptionIdEqualTo(String value) { + addCriterion("question_option_id =", value, "questionOptionId"); + return (Criteria) this; + } + + public Criteria andQuestionOptionIdNotEqualTo(String value) { + addCriterion("question_option_id <>", value, "questionOptionId"); + return (Criteria) this; + } + + public Criteria andQuestionOptionIdGreaterThan(String value) { + addCriterion("question_option_id >", value, "questionOptionId"); + return (Criteria) this; + } + + public Criteria andQuestionOptionIdGreaterThanOrEqualTo(String value) { + addCriterion("question_option_id >=", value, "questionOptionId"); + return (Criteria) this; + } + + public Criteria andQuestionOptionIdLessThan(String value) { + addCriterion("question_option_id <", value, "questionOptionId"); + return (Criteria) this; + } + + public Criteria andQuestionOptionIdLessThanOrEqualTo(String value) { + addCriterion("question_option_id <=", value, "questionOptionId"); + return (Criteria) this; + } + + public Criteria andQuestionOptionIdLike(String value) { + addCriterion("question_option_id like", value, "questionOptionId"); + return (Criteria) this; + } + + public Criteria andQuestionOptionIdNotLike(String value) { + addCriterion("question_option_id not like", value, "questionOptionId"); + return (Criteria) this; + } + + public Criteria andQuestionOptionIdIn(List values) { + addCriterion("question_option_id in", values, "questionOptionId"); + return (Criteria) this; + } + + public Criteria andQuestionOptionIdNotIn(List values) { + addCriterion("question_option_id not in", values, "questionOptionId"); + return (Criteria) this; + } + + public Criteria andQuestionOptionIdBetween(String value1, String value2) { + addCriterion("question_option_id between", value1, value2, "questionOptionId"); + return (Criteria) this; + } + + public Criteria andQuestionOptionIdNotBetween(String value1, String value2) { + addCriterion("question_option_id not between", value1, value2, "questionOptionId"); + return (Criteria) this; + } + + public Criteria andQuestionTopicIsNull() { + addCriterion("question_topic is null"); + return (Criteria) this; + } + + public Criteria andQuestionTopicIsNotNull() { + addCriterion("question_topic is not null"); + return (Criteria) this; + } + + public Criteria andQuestionTopicEqualTo(String value) { + addCriterion("question_topic =", value, "questionTopic"); + return (Criteria) this; + } + + public Criteria andQuestionTopicNotEqualTo(String value) { + addCriterion("question_topic <>", value, "questionTopic"); + return (Criteria) this; + } + + public Criteria andQuestionTopicGreaterThan(String value) { + addCriterion("question_topic >", value, "questionTopic"); + return (Criteria) this; + } + + public Criteria andQuestionTopicGreaterThanOrEqualTo(String value) { + addCriterion("question_topic >=", value, "questionTopic"); + return (Criteria) this; + } + + public Criteria andQuestionTopicLessThan(String value) { + addCriterion("question_topic <", value, "questionTopic"); + return (Criteria) this; + } + + public Criteria andQuestionTopicLessThanOrEqualTo(String value) { + addCriterion("question_topic <=", value, "questionTopic"); + return (Criteria) this; + } + + public Criteria andQuestionTopicLike(String value) { + addCriterion("question_topic like", value, "questionTopic"); + return (Criteria) this; + } + + public Criteria andQuestionTopicNotLike(String value) { + addCriterion("question_topic not like", value, "questionTopic"); + return (Criteria) this; + } + + public Criteria andQuestionTopicIn(List values) { + addCriterion("question_topic in", values, "questionTopic"); + return (Criteria) this; + } + + public Criteria andQuestionTopicNotIn(List values) { + addCriterion("question_topic not in", values, "questionTopic"); + return (Criteria) this; + } + + public Criteria andQuestionTopicBetween(String value1, String value2) { + addCriterion("question_topic between", value1, value2, "questionTopic"); + return (Criteria) this; + } + + public Criteria andQuestionTopicNotBetween(String value1, String value2) { + addCriterion("question_topic not between", value1, value2, "questionTopic"); + return (Criteria) this; + } + + public Criteria andAnswerContentIsNull() { + addCriterion("answer_content is null"); + return (Criteria) this; + } + + public Criteria andAnswerContentIsNotNull() { + addCriterion("answer_content is not null"); + return (Criteria) this; + } + + public Criteria andAnswerContentEqualTo(String value) { + addCriterion("answer_content =", value, "answerContent"); + return (Criteria) this; + } + + public Criteria andAnswerContentNotEqualTo(String value) { + addCriterion("answer_content <>", value, "answerContent"); + return (Criteria) this; + } + + public Criteria andAnswerContentGreaterThan(String value) { + addCriterion("answer_content >", value, "answerContent"); + return (Criteria) this; + } + + public Criteria andAnswerContentGreaterThanOrEqualTo(String value) { + addCriterion("answer_content >=", value, "answerContent"); + return (Criteria) this; + } + + public Criteria andAnswerContentLessThan(String value) { + addCriterion("answer_content <", value, "answerContent"); + return (Criteria) this; + } + + public Criteria andAnswerContentLessThanOrEqualTo(String value) { + addCriterion("answer_content <=", value, "answerContent"); + return (Criteria) this; + } + + public Criteria andAnswerContentLike(String value) { + addCriterion("answer_content like", value, "answerContent"); + return (Criteria) this; + } + + public Criteria andAnswerContentNotLike(String value) { + addCriterion("answer_content not like", value, "answerContent"); + return (Criteria) this; + } + + public Criteria andAnswerContentIn(List values) { + addCriterion("answer_content in", values, "answerContent"); + return (Criteria) this; + } + + public Criteria andAnswerContentNotIn(List values) { + addCriterion("answer_content not in", values, "answerContent"); + return (Criteria) this; + } + + public Criteria andAnswerContentBetween(String value1, String value2) { + addCriterion("answer_content between", value1, value2, "answerContent"); + return (Criteria) this; + } + + public Criteria andAnswerContentNotBetween(String value1, String value2) { + addCriterion("answer_content not between", value1, value2, "answerContent"); + return (Criteria) this; + } + + public Criteria andCorrectIsNull() { + addCriterion("correct is null"); + return (Criteria) this; + } + + public Criteria andCorrectIsNotNull() { + addCriterion("correct is not null"); + return (Criteria) this; + } + + public Criteria andCorrectEqualTo(Boolean value) { + addCriterion("correct =", value, "correct"); + return (Criteria) this; + } + + public Criteria andCorrectNotEqualTo(Boolean value) { + addCriterion("correct <>", value, "correct"); + return (Criteria) this; + } + + public Criteria andCorrectGreaterThan(Boolean value) { + addCriterion("correct >", value, "correct"); + return (Criteria) this; + } + + public Criteria andCorrectGreaterThanOrEqualTo(Boolean value) { + addCriterion("correct >=", value, "correct"); + return (Criteria) this; + } + + public Criteria andCorrectLessThan(Boolean value) { + addCriterion("correct <", value, "correct"); + return (Criteria) this; + } + + public Criteria andCorrectLessThanOrEqualTo(Boolean value) { + addCriterion("correct <=", value, "correct"); + return (Criteria) this; + } + + public Criteria andCorrectIn(List values) { + addCriterion("correct in", values, "correct"); + return (Criteria) this; + } + + public Criteria andCorrectNotIn(List values) { + addCriterion("correct not in", values, "correct"); + return (Criteria) this; + } + + public Criteria andCorrectBetween(Boolean value1, Boolean value2) { + addCriterion("correct between", value1, value2, "correct"); + return (Criteria) this; + } + + public Criteria andCorrectNotBetween(Boolean value1, Boolean value2) { + addCriterion("correct not between", value1, value2, "correct"); + return (Criteria) this; + } + + public Criteria andScoreIsNull() { + addCriterion("score is null"); + return (Criteria) this; + } + + public Criteria andScoreIsNotNull() { + addCriterion("score is not null"); + return (Criteria) this; + } + + public Criteria andScoreEqualTo(Float value) { + addCriterion("score =", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotEqualTo(Float value) { + addCriterion("score <>", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreGreaterThan(Float value) { + addCriterion("score >", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreGreaterThanOrEqualTo(Float value) { + addCriterion("score >=", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreLessThan(Float value) { + addCriterion("score <", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreLessThanOrEqualTo(Float value) { + addCriterion("score <=", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreIn(List values) { + addCriterion("score in", values, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotIn(List values) { + addCriterion("score not in", values, "score"); + return (Criteria) this; + } + + public Criteria andScoreBetween(Float value1, Float value2) { + addCriterion("score between", value1, value2, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotBetween(Float value1, Float value2) { + addCriterion("score not between", value1, value2, "score"); + return (Criteria) this; + } + + public Criteria andTotalScoreIsNull() { + addCriterion("total_score is null"); + return (Criteria) this; + } + + public Criteria andTotalScoreIsNotNull() { + addCriterion("total_score is not null"); + return (Criteria) this; + } + + public Criteria andTotalScoreEqualTo(Float value) { + addCriterion("total_score =", value, "totalScore"); + return (Criteria) this; + } + + public Criteria andTotalScoreNotEqualTo(Float value) { + addCriterion("total_score <>", value, "totalScore"); + return (Criteria) this; + } + + public Criteria andTotalScoreGreaterThan(Float value) { + addCriterion("total_score >", value, "totalScore"); + return (Criteria) this; + } + + public Criteria andTotalScoreGreaterThanOrEqualTo(Float value) { + addCriterion("total_score >=", value, "totalScore"); + return (Criteria) this; + } + + public Criteria andTotalScoreLessThan(Float value) { + addCriterion("total_score <", value, "totalScore"); + return (Criteria) this; + } + + public Criteria andTotalScoreLessThanOrEqualTo(Float value) { + addCriterion("total_score <=", value, "totalScore"); + return (Criteria) this; + } + + public Criteria andTotalScoreIn(List values) { + addCriterion("total_score in", values, "totalScore"); + return (Criteria) this; + } + + public Criteria andTotalScoreNotIn(List values) { + addCriterion("total_score not in", values, "totalScore"); + return (Criteria) this; + } + + public Criteria andTotalScoreBetween(Float value1, Float value2) { + addCriterion("total_score between", value1, value2, "totalScore"); + return (Criteria) this; + } + + public Criteria andTotalScoreNotBetween(Float value1, Float value2) { + addCriterion("total_score not between", value1, value2, "totalScore"); + return (Criteria) this; + } + + public Criteria andRemarksIsNull() { + addCriterion("remarks is null"); + return (Criteria) this; + } + + public Criteria andRemarksIsNotNull() { + addCriterion("remarks is not null"); + return (Criteria) this; + } + + public Criteria andRemarksEqualTo(String value) { + addCriterion("remarks =", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotEqualTo(String value) { + addCriterion("remarks <>", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksGreaterThan(String value) { + addCriterion("remarks >", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksGreaterThanOrEqualTo(String value) { + addCriterion("remarks >=", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLessThan(String value) { + addCriterion("remarks <", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLessThanOrEqualTo(String value) { + addCriterion("remarks <=", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLike(String value) { + addCriterion("remarks like", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotLike(String value) { + addCriterion("remarks not like", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksIn(List values) { + addCriterion("remarks in", values, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotIn(List values) { + addCriterion("remarks not in", values, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksBetween(String value1, String value2) { + addCriterion("remarks between", value1, value2, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotBetween(String value1, String value2) { + addCriterion("remarks not between", value1, value2, "remarks"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andProjectCodeIsNull() { + addCriterion("project_code is null"); + return (Criteria) this; + } + + public Criteria andProjectCodeIsNotNull() { + addCriterion("project_code is not null"); + return (Criteria) this; + } + + public Criteria andProjectCodeEqualTo(String value) { + addCriterion("project_code =", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeNotEqualTo(String value) { + addCriterion("project_code <>", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeGreaterThan(String value) { + addCriterion("project_code >", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeGreaterThanOrEqualTo(String value) { + addCriterion("project_code >=", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeLessThan(String value) { + addCriterion("project_code <", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeLessThanOrEqualTo(String value) { + addCriterion("project_code <=", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeLike(String value) { + addCriterion("project_code like", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeNotLike(String value) { + addCriterion("project_code not like", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeIn(List values) { + addCriterion("project_code in", values, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeNotIn(List values) { + addCriterion("project_code not in", values, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeBetween(String value1, String value2) { + addCriterion("project_code between", value1, value2, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeNotBetween(String value1, String value2) { + addCriterion("project_code not between", value1, value2, "projectCode"); + return (Criteria) this; + } + + public Criteria andCompanyIdIsNull() { + addCriterion("company_id is null"); + return (Criteria) this; + } + + public Criteria andCompanyIdIsNotNull() { + addCriterion("company_id is not null"); + return (Criteria) this; + } + + public Criteria andCompanyIdEqualTo(Integer value) { + addCriterion("company_id =", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotEqualTo(Integer value) { + addCriterion("company_id <>", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThan(Integer value) { + addCriterion("company_id >", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThanOrEqualTo(Integer value) { + addCriterion("company_id >=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThan(Integer value) { + addCriterion("company_id <", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThanOrEqualTo(Integer value) { + addCriterion("company_id <=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdIn(List values) { + addCriterion("company_id in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotIn(List values) { + addCriterion("company_id not in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdBetween(Integer value1, Integer value2) { + addCriterion("company_id between", value1, value2, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotBetween(Integer value1, Integer value2) { + addCriterion("company_id not between", value1, value2, "companyId"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/RaceTestPaper.java b/src/main/java/club/joylink/rtss/entity/RaceTestPaper.java new file mode 100644 index 000000000..0e87ff1f8 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RaceTestPaper.java @@ -0,0 +1,88 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * race_test_paper + * @author + */ +public class RaceTestPaper implements Serializable { + private Integer id; + + /** + * 竞赛id + */ + private Long raceId; + + /** + * 参赛试卷 + */ + private String testPaper; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Long getRaceId() { + return raceId; + } + + public void setRaceId(Long raceId) { + this.raceId = raceId; + } + + public String getTestPaper() { + return testPaper; + } + + public void setTestPaper(String testPaper) { + this.testPaper = testPaper; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + RaceTestPaper other = (RaceTestPaper) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getRaceId() == null ? other.getRaceId() == null : this.getRaceId().equals(other.getRaceId())) + && (this.getTestPaper() == null ? other.getTestPaper() == null : this.getTestPaper().equals(other.getTestPaper())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getRaceId() == null) ? 0 : getRaceId().hashCode()); + result = prime * result + ((getTestPaper() == null) ? 0 : getTestPaper().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", raceId=").append(raceId); + sb.append(", testPaper=").append(testPaper); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/RaceTestPaperExample.java b/src/main/java/club/joylink/rtss/entity/RaceTestPaperExample.java new file mode 100644 index 000000000..7db0faeed --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RaceTestPaperExample.java @@ -0,0 +1,342 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class RaceTestPaperExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public RaceTestPaperExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Integer value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Integer value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Integer value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Integer value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Integer value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Integer value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Integer value1, Integer value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Integer value1, Integer value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andRaceIdIsNull() { + addCriterion("race_id is null"); + return (Criteria) this; + } + + public Criteria andRaceIdIsNotNull() { + addCriterion("race_id is not null"); + return (Criteria) this; + } + + public Criteria andRaceIdEqualTo(Long value) { + addCriterion("race_id =", value, "raceId"); + return (Criteria) this; + } + + public Criteria andRaceIdNotEqualTo(Long value) { + addCriterion("race_id <>", value, "raceId"); + return (Criteria) this; + } + + public Criteria andRaceIdGreaterThan(Long value) { + addCriterion("race_id >", value, "raceId"); + return (Criteria) this; + } + + public Criteria andRaceIdGreaterThanOrEqualTo(Long value) { + addCriterion("race_id >=", value, "raceId"); + return (Criteria) this; + } + + public Criteria andRaceIdLessThan(Long value) { + addCriterion("race_id <", value, "raceId"); + return (Criteria) this; + } + + public Criteria andRaceIdLessThanOrEqualTo(Long value) { + addCriterion("race_id <=", value, "raceId"); + return (Criteria) this; + } + + public Criteria andRaceIdIn(List values) { + addCriterion("race_id in", values, "raceId"); + return (Criteria) this; + } + + public Criteria andRaceIdNotIn(List values) { + addCriterion("race_id not in", values, "raceId"); + return (Criteria) this; + } + + public Criteria andRaceIdBetween(Long value1, Long value2) { + addCriterion("race_id between", value1, value2, "raceId"); + return (Criteria) this; + } + + public Criteria andRaceIdNotBetween(Long value1, Long value2) { + addCriterion("race_id not between", value1, value2, "raceId"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/RaceUser.java b/src/main/java/club/joylink/rtss/entity/RaceUser.java new file mode 100644 index 000000000..178bcd761 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RaceUser.java @@ -0,0 +1,265 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * race_user + * @author + */ +public class RaceUser implements Serializable { + private Long id; + + /** + * 赛事id + */ + private Long raceId; + + /** + * 用户id + */ + private Long userId; + + /** + * 身份证号 + */ + private String idNumber; + + /** + * 姓名 + */ + private String name; + + /** + * 手机号 + */ + private String mobile; + + /** + * 所属组织/企业/学校 + */ + private String organization; + + /** + * 所属部门 + */ + private String department; + + /** + * 职位 + */ + private String position; + + /** + * 用户在本次比赛扮演的角色 + */ + private String role; + + /** + * 报名时间 + */ + private LocalDateTime time; + + /** + * 未参赛/参赛/完成比赛 + */ + private Integer status; + + /** + * 理论竞赛分数 + */ + private Float theoryScore; + + /** + * 实操分数 + */ + private Float practiceScore; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getRaceId() { + return raceId; + } + + public void setRaceId(Long raceId) { + this.raceId = raceId; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public String getIdNumber() { + return idNumber; + } + + public void setIdNumber(String idNumber) { + this.idNumber = idNumber; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getMobile() { + return mobile; + } + + public void setMobile(String mobile) { + this.mobile = mobile; + } + + public String getOrganization() { + return organization; + } + + public void setOrganization(String organization) { + this.organization = organization; + } + + public String getDepartment() { + return department; + } + + public void setDepartment(String department) { + this.department = department; + } + + public String getPosition() { + return position; + } + + public void setPosition(String position) { + this.position = position; + } + + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + + public LocalDateTime getTime() { + return time; + } + + public void setTime(LocalDateTime time) { + this.time = time; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Float getTheoryScore() { + return theoryScore; + } + + public void setTheoryScore(Float theoryScore) { + this.theoryScore = theoryScore; + } + + public Float getPracticeScore() { + return practiceScore; + } + + public void setPracticeScore(Float practiceScore) { + this.practiceScore = practiceScore; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + RaceUser other = (RaceUser) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getRaceId() == null ? other.getRaceId() == null : this.getRaceId().equals(other.getRaceId())) + && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) + && (this.getIdNumber() == null ? other.getIdNumber() == null : this.getIdNumber().equals(other.getIdNumber())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getMobile() == null ? other.getMobile() == null : this.getMobile().equals(other.getMobile())) + && (this.getOrganization() == null ? other.getOrganization() == null : this.getOrganization().equals(other.getOrganization())) + && (this.getDepartment() == null ? other.getDepartment() == null : this.getDepartment().equals(other.getDepartment())) + && (this.getPosition() == null ? other.getPosition() == null : this.getPosition().equals(other.getPosition())) + && (this.getRole() == null ? other.getRole() == null : this.getRole().equals(other.getRole())) + && (this.getTime() == null ? other.getTime() == null : this.getTime().equals(other.getTime())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getTheoryScore() == null ? other.getTheoryScore() == null : this.getTheoryScore().equals(other.getTheoryScore())) + && (this.getPracticeScore() == null ? other.getPracticeScore() == null : this.getPracticeScore().equals(other.getPracticeScore())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getRaceId() == null) ? 0 : getRaceId().hashCode()); + result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); + result = prime * result + ((getIdNumber() == null) ? 0 : getIdNumber().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getMobile() == null) ? 0 : getMobile().hashCode()); + result = prime * result + ((getOrganization() == null) ? 0 : getOrganization().hashCode()); + result = prime * result + ((getDepartment() == null) ? 0 : getDepartment().hashCode()); + result = prime * result + ((getPosition() == null) ? 0 : getPosition().hashCode()); + result = prime * result + ((getRole() == null) ? 0 : getRole().hashCode()); + result = prime * result + ((getTime() == null) ? 0 : getTime().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getTheoryScore() == null) ? 0 : getTheoryScore().hashCode()); + result = prime * result + ((getPracticeScore() == null) ? 0 : getPracticeScore().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", raceId=").append(raceId); + sb.append(", userId=").append(userId); + sb.append(", idNumber=").append(idNumber); + sb.append(", name=").append(name); + sb.append(", mobile=").append(mobile); + sb.append(", organization=").append(organization); + sb.append(", department=").append(department); + sb.append(", position=").append(position); + sb.append(", role=").append(role); + sb.append(", time=").append(time); + sb.append(", status=").append(status); + sb.append(", theoryScore=").append(theoryScore); + sb.append(", practiceScore=").append(practiceScore); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/RaceUserExample.java b/src/main/java/club/joylink/rtss/entity/RaceUserExample.java new file mode 100644 index 000000000..de3a76e14 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RaceUserExample.java @@ -0,0 +1,1133 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class RaceUserExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public RaceUserExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andRaceIdIsNull() { + addCriterion("race_id is null"); + return (Criteria) this; + } + + public Criteria andRaceIdIsNotNull() { + addCriterion("race_id is not null"); + return (Criteria) this; + } + + public Criteria andRaceIdEqualTo(Long value) { + addCriterion("race_id =", value, "raceId"); + return (Criteria) this; + } + + public Criteria andRaceIdNotEqualTo(Long value) { + addCriterion("race_id <>", value, "raceId"); + return (Criteria) this; + } + + public Criteria andRaceIdGreaterThan(Long value) { + addCriterion("race_id >", value, "raceId"); + return (Criteria) this; + } + + public Criteria andRaceIdGreaterThanOrEqualTo(Long value) { + addCriterion("race_id >=", value, "raceId"); + return (Criteria) this; + } + + public Criteria andRaceIdLessThan(Long value) { + addCriterion("race_id <", value, "raceId"); + return (Criteria) this; + } + + public Criteria andRaceIdLessThanOrEqualTo(Long value) { + addCriterion("race_id <=", value, "raceId"); + return (Criteria) this; + } + + public Criteria andRaceIdIn(List values) { + addCriterion("race_id in", values, "raceId"); + return (Criteria) this; + } + + public Criteria andRaceIdNotIn(List values) { + addCriterion("race_id not in", values, "raceId"); + return (Criteria) this; + } + + public Criteria andRaceIdBetween(Long value1, Long value2) { + addCriterion("race_id between", value1, value2, "raceId"); + return (Criteria) this; + } + + public Criteria andRaceIdNotBetween(Long value1, Long value2) { + addCriterion("race_id not between", value1, value2, "raceId"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andIdNumberIsNull() { + addCriterion("id_number is null"); + return (Criteria) this; + } + + public Criteria andIdNumberIsNotNull() { + addCriterion("id_number is not null"); + return (Criteria) this; + } + + public Criteria andIdNumberEqualTo(String value) { + addCriterion("id_number =", value, "idNumber"); + return (Criteria) this; + } + + public Criteria andIdNumberNotEqualTo(String value) { + addCriterion("id_number <>", value, "idNumber"); + return (Criteria) this; + } + + public Criteria andIdNumberGreaterThan(String value) { + addCriterion("id_number >", value, "idNumber"); + return (Criteria) this; + } + + public Criteria andIdNumberGreaterThanOrEqualTo(String value) { + addCriterion("id_number >=", value, "idNumber"); + return (Criteria) this; + } + + public Criteria andIdNumberLessThan(String value) { + addCriterion("id_number <", value, "idNumber"); + return (Criteria) this; + } + + public Criteria andIdNumberLessThanOrEqualTo(String value) { + addCriterion("id_number <=", value, "idNumber"); + return (Criteria) this; + } + + public Criteria andIdNumberLike(String value) { + addCriterion("id_number like", value, "idNumber"); + return (Criteria) this; + } + + public Criteria andIdNumberNotLike(String value) { + addCriterion("id_number not like", value, "idNumber"); + return (Criteria) this; + } + + public Criteria andIdNumberIn(List values) { + addCriterion("id_number in", values, "idNumber"); + return (Criteria) this; + } + + public Criteria andIdNumberNotIn(List values) { + addCriterion("id_number not in", values, "idNumber"); + return (Criteria) this; + } + + public Criteria andIdNumberBetween(String value1, String value2) { + addCriterion("id_number between", value1, value2, "idNumber"); + return (Criteria) this; + } + + public Criteria andIdNumberNotBetween(String value1, String value2) { + addCriterion("id_number not between", value1, value2, "idNumber"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andMobileIsNull() { + addCriterion("mobile is null"); + return (Criteria) this; + } + + public Criteria andMobileIsNotNull() { + addCriterion("mobile is not null"); + return (Criteria) this; + } + + public Criteria andMobileEqualTo(String value) { + addCriterion("mobile =", value, "mobile"); + return (Criteria) this; + } + + public Criteria andMobileNotEqualTo(String value) { + addCriterion("mobile <>", value, "mobile"); + return (Criteria) this; + } + + public Criteria andMobileGreaterThan(String value) { + addCriterion("mobile >", value, "mobile"); + return (Criteria) this; + } + + public Criteria andMobileGreaterThanOrEqualTo(String value) { + addCriterion("mobile >=", value, "mobile"); + return (Criteria) this; + } + + public Criteria andMobileLessThan(String value) { + addCriterion("mobile <", value, "mobile"); + return (Criteria) this; + } + + public Criteria andMobileLessThanOrEqualTo(String value) { + addCriterion("mobile <=", value, "mobile"); + return (Criteria) this; + } + + public Criteria andMobileLike(String value) { + addCriterion("mobile like", value, "mobile"); + return (Criteria) this; + } + + public Criteria andMobileNotLike(String value) { + addCriterion("mobile not like", value, "mobile"); + return (Criteria) this; + } + + public Criteria andMobileIn(List values) { + addCriterion("mobile in", values, "mobile"); + return (Criteria) this; + } + + public Criteria andMobileNotIn(List values) { + addCriterion("mobile not in", values, "mobile"); + return (Criteria) this; + } + + public Criteria andMobileBetween(String value1, String value2) { + addCriterion("mobile between", value1, value2, "mobile"); + return (Criteria) this; + } + + public Criteria andMobileNotBetween(String value1, String value2) { + addCriterion("mobile not between", value1, value2, "mobile"); + return (Criteria) this; + } + + public Criteria andOrganizationIsNull() { + addCriterion("organization is null"); + return (Criteria) this; + } + + public Criteria andOrganizationIsNotNull() { + addCriterion("organization is not null"); + return (Criteria) this; + } + + public Criteria andOrganizationEqualTo(String value) { + addCriterion("organization =", value, "organization"); + return (Criteria) this; + } + + public Criteria andOrganizationNotEqualTo(String value) { + addCriterion("organization <>", value, "organization"); + return (Criteria) this; + } + + public Criteria andOrganizationGreaterThan(String value) { + addCriterion("organization >", value, "organization"); + return (Criteria) this; + } + + public Criteria andOrganizationGreaterThanOrEqualTo(String value) { + addCriterion("organization >=", value, "organization"); + return (Criteria) this; + } + + public Criteria andOrganizationLessThan(String value) { + addCriterion("organization <", value, "organization"); + return (Criteria) this; + } + + public Criteria andOrganizationLessThanOrEqualTo(String value) { + addCriterion("organization <=", value, "organization"); + return (Criteria) this; + } + + public Criteria andOrganizationLike(String value) { + addCriterion("organization like", value, "organization"); + return (Criteria) this; + } + + public Criteria andOrganizationNotLike(String value) { + addCriterion("organization not like", value, "organization"); + return (Criteria) this; + } + + public Criteria andOrganizationIn(List values) { + addCriterion("organization in", values, "organization"); + return (Criteria) this; + } + + public Criteria andOrganizationNotIn(List values) { + addCriterion("organization not in", values, "organization"); + return (Criteria) this; + } + + public Criteria andOrganizationBetween(String value1, String value2) { + addCriterion("organization between", value1, value2, "organization"); + return (Criteria) this; + } + + public Criteria andOrganizationNotBetween(String value1, String value2) { + addCriterion("organization not between", value1, value2, "organization"); + return (Criteria) this; + } + + public Criteria andDepartmentIsNull() { + addCriterion("department is null"); + return (Criteria) this; + } + + public Criteria andDepartmentIsNotNull() { + addCriterion("department is not null"); + return (Criteria) this; + } + + public Criteria andDepartmentEqualTo(String value) { + addCriterion("department =", value, "department"); + return (Criteria) this; + } + + public Criteria andDepartmentNotEqualTo(String value) { + addCriterion("department <>", value, "department"); + return (Criteria) this; + } + + public Criteria andDepartmentGreaterThan(String value) { + addCriterion("department >", value, "department"); + return (Criteria) this; + } + + public Criteria andDepartmentGreaterThanOrEqualTo(String value) { + addCriterion("department >=", value, "department"); + return (Criteria) this; + } + + public Criteria andDepartmentLessThan(String value) { + addCriterion("department <", value, "department"); + return (Criteria) this; + } + + public Criteria andDepartmentLessThanOrEqualTo(String value) { + addCriterion("department <=", value, "department"); + return (Criteria) this; + } + + public Criteria andDepartmentLike(String value) { + addCriterion("department like", value, "department"); + return (Criteria) this; + } + + public Criteria andDepartmentNotLike(String value) { + addCriterion("department not like", value, "department"); + return (Criteria) this; + } + + public Criteria andDepartmentIn(List values) { + addCriterion("department in", values, "department"); + return (Criteria) this; + } + + public Criteria andDepartmentNotIn(List values) { + addCriterion("department not in", values, "department"); + return (Criteria) this; + } + + public Criteria andDepartmentBetween(String value1, String value2) { + addCriterion("department between", value1, value2, "department"); + return (Criteria) this; + } + + public Criteria andDepartmentNotBetween(String value1, String value2) { + addCriterion("department not between", value1, value2, "department"); + return (Criteria) this; + } + + public Criteria andPositionIsNull() { + addCriterion("`position` is null"); + return (Criteria) this; + } + + public Criteria andPositionIsNotNull() { + addCriterion("`position` is not null"); + return (Criteria) this; + } + + public Criteria andPositionEqualTo(String value) { + addCriterion("`position` =", value, "position"); + return (Criteria) this; + } + + public Criteria andPositionNotEqualTo(String value) { + addCriterion("`position` <>", value, "position"); + return (Criteria) this; + } + + public Criteria andPositionGreaterThan(String value) { + addCriterion("`position` >", value, "position"); + return (Criteria) this; + } + + public Criteria andPositionGreaterThanOrEqualTo(String value) { + addCriterion("`position` >=", value, "position"); + return (Criteria) this; + } + + public Criteria andPositionLessThan(String value) { + addCriterion("`position` <", value, "position"); + return (Criteria) this; + } + + public Criteria andPositionLessThanOrEqualTo(String value) { + addCriterion("`position` <=", value, "position"); + return (Criteria) this; + } + + public Criteria andPositionLike(String value) { + addCriterion("`position` like", value, "position"); + return (Criteria) this; + } + + public Criteria andPositionNotLike(String value) { + addCriterion("`position` not like", value, "position"); + return (Criteria) this; + } + + public Criteria andPositionIn(List values) { + addCriterion("`position` in", values, "position"); + return (Criteria) this; + } + + public Criteria andPositionNotIn(List values) { + addCriterion("`position` not in", values, "position"); + return (Criteria) this; + } + + public Criteria andPositionBetween(String value1, String value2) { + addCriterion("`position` between", value1, value2, "position"); + return (Criteria) this; + } + + public Criteria andPositionNotBetween(String value1, String value2) { + addCriterion("`position` not between", value1, value2, "position"); + return (Criteria) this; + } + + public Criteria andRoleIsNull() { + addCriterion("`role` is null"); + return (Criteria) this; + } + + public Criteria andRoleIsNotNull() { + addCriterion("`role` is not null"); + return (Criteria) this; + } + + public Criteria andRoleEqualTo(String value) { + addCriterion("`role` =", value, "role"); + return (Criteria) this; + } + + public Criteria andRoleNotEqualTo(String value) { + addCriterion("`role` <>", value, "role"); + return (Criteria) this; + } + + public Criteria andRoleGreaterThan(String value) { + addCriterion("`role` >", value, "role"); + return (Criteria) this; + } + + public Criteria andRoleGreaterThanOrEqualTo(String value) { + addCriterion("`role` >=", value, "role"); + return (Criteria) this; + } + + public Criteria andRoleLessThan(String value) { + addCriterion("`role` <", value, "role"); + return (Criteria) this; + } + + public Criteria andRoleLessThanOrEqualTo(String value) { + addCriterion("`role` <=", value, "role"); + return (Criteria) this; + } + + public Criteria andRoleLike(String value) { + addCriterion("`role` like", value, "role"); + return (Criteria) this; + } + + public Criteria andRoleNotLike(String value) { + addCriterion("`role` not like", value, "role"); + return (Criteria) this; + } + + public Criteria andRoleIn(List values) { + addCriterion("`role` in", values, "role"); + return (Criteria) this; + } + + public Criteria andRoleNotIn(List values) { + addCriterion("`role` not in", values, "role"); + return (Criteria) this; + } + + public Criteria andRoleBetween(String value1, String value2) { + addCriterion("`role` between", value1, value2, "role"); + return (Criteria) this; + } + + public Criteria andRoleNotBetween(String value1, String value2) { + addCriterion("`role` not between", value1, value2, "role"); + return (Criteria) this; + } + + public Criteria andTimeIsNull() { + addCriterion("`time` is null"); + return (Criteria) this; + } + + public Criteria andTimeIsNotNull() { + addCriterion("`time` is not null"); + return (Criteria) this; + } + + public Criteria andTimeEqualTo(LocalDateTime value) { + addCriterion("`time` =", value, "time"); + return (Criteria) this; + } + + public Criteria andTimeNotEqualTo(LocalDateTime value) { + addCriterion("`time` <>", value, "time"); + return (Criteria) this; + } + + public Criteria andTimeGreaterThan(LocalDateTime value) { + addCriterion("`time` >", value, "time"); + return (Criteria) this; + } + + public Criteria andTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("`time` >=", value, "time"); + return (Criteria) this; + } + + public Criteria andTimeLessThan(LocalDateTime value) { + addCriterion("`time` <", value, "time"); + return (Criteria) this; + } + + public Criteria andTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("`time` <=", value, "time"); + return (Criteria) this; + } + + public Criteria andTimeIn(List values) { + addCriterion("`time` in", values, "time"); + return (Criteria) this; + } + + public Criteria andTimeNotIn(List values) { + addCriterion("`time` not in", values, "time"); + return (Criteria) this; + } + + public Criteria andTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("`time` between", value1, value2, "time"); + return (Criteria) this; + } + + public Criteria andTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("`time` not between", value1, value2, "time"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(Integer value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(Integer value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(Integer value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(Integer value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(Integer value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(Integer value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(Integer value1, Integer value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(Integer value1, Integer value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andTheoryScoreIsNull() { + addCriterion("theory_score is null"); + return (Criteria) this; + } + + public Criteria andTheoryScoreIsNotNull() { + addCriterion("theory_score is not null"); + return (Criteria) this; + } + + public Criteria andTheoryScoreEqualTo(Float value) { + addCriterion("theory_score =", value, "theoryScore"); + return (Criteria) this; + } + + public Criteria andTheoryScoreNotEqualTo(Float value) { + addCriterion("theory_score <>", value, "theoryScore"); + return (Criteria) this; + } + + public Criteria andTheoryScoreGreaterThan(Float value) { + addCriterion("theory_score >", value, "theoryScore"); + return (Criteria) this; + } + + public Criteria andTheoryScoreGreaterThanOrEqualTo(Float value) { + addCriterion("theory_score >=", value, "theoryScore"); + return (Criteria) this; + } + + public Criteria andTheoryScoreLessThan(Float value) { + addCriterion("theory_score <", value, "theoryScore"); + return (Criteria) this; + } + + public Criteria andTheoryScoreLessThanOrEqualTo(Float value) { + addCriterion("theory_score <=", value, "theoryScore"); + return (Criteria) this; + } + + public Criteria andTheoryScoreIn(List values) { + addCriterion("theory_score in", values, "theoryScore"); + return (Criteria) this; + } + + public Criteria andTheoryScoreNotIn(List values) { + addCriterion("theory_score not in", values, "theoryScore"); + return (Criteria) this; + } + + public Criteria andTheoryScoreBetween(Float value1, Float value2) { + addCriterion("theory_score between", value1, value2, "theoryScore"); + return (Criteria) this; + } + + public Criteria andTheoryScoreNotBetween(Float value1, Float value2) { + addCriterion("theory_score not between", value1, value2, "theoryScore"); + return (Criteria) this; + } + + public Criteria andPracticeScoreIsNull() { + addCriterion("practice_score is null"); + return (Criteria) this; + } + + public Criteria andPracticeScoreIsNotNull() { + addCriterion("practice_score is not null"); + return (Criteria) this; + } + + public Criteria andPracticeScoreEqualTo(Float value) { + addCriterion("practice_score =", value, "practiceScore"); + return (Criteria) this; + } + + public Criteria andPracticeScoreNotEqualTo(Float value) { + addCriterion("practice_score <>", value, "practiceScore"); + return (Criteria) this; + } + + public Criteria andPracticeScoreGreaterThan(Float value) { + addCriterion("practice_score >", value, "practiceScore"); + return (Criteria) this; + } + + public Criteria andPracticeScoreGreaterThanOrEqualTo(Float value) { + addCriterion("practice_score >=", value, "practiceScore"); + return (Criteria) this; + } + + public Criteria andPracticeScoreLessThan(Float value) { + addCriterion("practice_score <", value, "practiceScore"); + return (Criteria) this; + } + + public Criteria andPracticeScoreLessThanOrEqualTo(Float value) { + addCriterion("practice_score <=", value, "practiceScore"); + return (Criteria) this; + } + + public Criteria andPracticeScoreIn(List values) { + addCriterion("practice_score in", values, "practiceScore"); + return (Criteria) this; + } + + public Criteria andPracticeScoreNotIn(List values) { + addCriterion("practice_score not in", values, "practiceScore"); + return (Criteria) this; + } + + public Criteria andPracticeScoreBetween(Float value1, Float value2) { + addCriterion("practice_score between", value1, value2, "practiceScore"); + return (Criteria) this; + } + + public Criteria andPracticeScoreNotBetween(Float value1, Float value2) { + addCriterion("practice_score not between", value1, value2, "practiceScore"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/RealLine.java b/src/main/java/club/joylink/rtss/entity/RealLine.java new file mode 100644 index 000000000..5f948b88e --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RealLine.java @@ -0,0 +1,201 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * real_line + * @author + */ +public class RealLine implements Serializable { + private Long id; + + /** + * 皮肤编码 + */ + private String code; + + /** + * 皮肤名称 + */ + private String name; + + /** + * 原点坐标 + */ + private String origin; + + /** + * 缩放比例: >=1/8并且<=8,默认为1 + */ + private String scaling; + + /** + * 创建者ID + */ + private Long creatorId; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + /** + * 更新者ID + */ + private Long updaterId; + + /** + * 更新时间 + */ + private LocalDateTime updateTime; + + /** + * 配置项 + */ + private String configData; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getOrigin() { + return origin; + } + + public void setOrigin(String origin) { + this.origin = origin; + } + + public String getScaling() { + return scaling; + } + + public void setScaling(String scaling) { + this.scaling = scaling; + } + + public Long getCreatorId() { + return creatorId; + } + + public void setCreatorId(Long creatorId) { + this.creatorId = creatorId; + } + + public LocalDateTime getCreateTime() { + return createTime; + } + + public void setCreateTime(LocalDateTime createTime) { + this.createTime = createTime; + } + + public Long getUpdaterId() { + return updaterId; + } + + public void setUpdaterId(Long updaterId) { + this.updaterId = updaterId; + } + + public LocalDateTime getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(LocalDateTime updateTime) { + this.updateTime = updateTime; + } + + public String getConfigData() { + return configData; + } + + public void setConfigData(String configData) { + this.configData = configData; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + RealLine other = (RealLine) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getOrigin() == null ? other.getOrigin() == null : this.getOrigin().equals(other.getOrigin())) + && (this.getScaling() == null ? other.getScaling() == null : this.getScaling().equals(other.getScaling())) + && (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getUpdaterId() == null ? other.getUpdaterId() == null : this.getUpdaterId().equals(other.getUpdaterId())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) + && (this.getConfigData() == null ? other.getConfigData() == null : this.getConfigData().equals(other.getConfigData())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getOrigin() == null) ? 0 : getOrigin().hashCode()); + result = prime * result + ((getScaling() == null) ? 0 : getScaling().hashCode()); + result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getUpdaterId() == null) ? 0 : getUpdaterId().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + result = prime * result + ((getConfigData() == null) ? 0 : getConfigData().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", code=").append(code); + sb.append(", name=").append(name); + sb.append(", origin=").append(origin); + sb.append(", scaling=").append(scaling); + sb.append(", creatorId=").append(creatorId); + sb.append(", createTime=").append(createTime); + sb.append(", updaterId=").append(updaterId); + sb.append(", updateTime=").append(updateTime); + sb.append(", configData=").append(configData); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/RealLineExample.java b/src/main/java/club/joylink/rtss/entity/RealLineExample.java new file mode 100644 index 000000000..ad2e100a5 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RealLineExample.java @@ -0,0 +1,803 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class RealLineExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public RealLineExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCodeIsNull() { + addCriterion("code is null"); + return (Criteria) this; + } + + public Criteria andCodeIsNotNull() { + addCriterion("code is not null"); + return (Criteria) this; + } + + public Criteria andCodeEqualTo(String value) { + addCriterion("code =", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotEqualTo(String value) { + addCriterion("code <>", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThan(String value) { + addCriterion("code >", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThanOrEqualTo(String value) { + addCriterion("code >=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThan(String value) { + addCriterion("code <", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThanOrEqualTo(String value) { + addCriterion("code <=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLike(String value) { + addCriterion("code like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotLike(String value) { + addCriterion("code not like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeIn(List values) { + addCriterion("code in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotIn(List values) { + addCriterion("code not in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeBetween(String value1, String value2) { + addCriterion("code between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotBetween(String value1, String value2) { + addCriterion("code not between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andOriginIsNull() { + addCriterion("origin is null"); + return (Criteria) this; + } + + public Criteria andOriginIsNotNull() { + addCriterion("origin is not null"); + return (Criteria) this; + } + + public Criteria andOriginEqualTo(String value) { + addCriterion("origin =", value, "origin"); + return (Criteria) this; + } + + public Criteria andOriginNotEqualTo(String value) { + addCriterion("origin <>", value, "origin"); + return (Criteria) this; + } + + public Criteria andOriginGreaterThan(String value) { + addCriterion("origin >", value, "origin"); + return (Criteria) this; + } + + public Criteria andOriginGreaterThanOrEqualTo(String value) { + addCriterion("origin >=", value, "origin"); + return (Criteria) this; + } + + public Criteria andOriginLessThan(String value) { + addCriterion("origin <", value, "origin"); + return (Criteria) this; + } + + public Criteria andOriginLessThanOrEqualTo(String value) { + addCriterion("origin <=", value, "origin"); + return (Criteria) this; + } + + public Criteria andOriginLike(String value) { + addCriterion("origin like", value, "origin"); + return (Criteria) this; + } + + public Criteria andOriginNotLike(String value) { + addCriterion("origin not like", value, "origin"); + return (Criteria) this; + } + + public Criteria andOriginIn(List values) { + addCriterion("origin in", values, "origin"); + return (Criteria) this; + } + + public Criteria andOriginNotIn(List values) { + addCriterion("origin not in", values, "origin"); + return (Criteria) this; + } + + public Criteria andOriginBetween(String value1, String value2) { + addCriterion("origin between", value1, value2, "origin"); + return (Criteria) this; + } + + public Criteria andOriginNotBetween(String value1, String value2) { + addCriterion("origin not between", value1, value2, "origin"); + return (Criteria) this; + } + + public Criteria andScalingIsNull() { + addCriterion("scaling is null"); + return (Criteria) this; + } + + public Criteria andScalingIsNotNull() { + addCriterion("scaling is not null"); + return (Criteria) this; + } + + public Criteria andScalingEqualTo(String value) { + addCriterion("scaling =", value, "scaling"); + return (Criteria) this; + } + + public Criteria andScalingNotEqualTo(String value) { + addCriterion("scaling <>", value, "scaling"); + return (Criteria) this; + } + + public Criteria andScalingGreaterThan(String value) { + addCriterion("scaling >", value, "scaling"); + return (Criteria) this; + } + + public Criteria andScalingGreaterThanOrEqualTo(String value) { + addCriterion("scaling >=", value, "scaling"); + return (Criteria) this; + } + + public Criteria andScalingLessThan(String value) { + addCriterion("scaling <", value, "scaling"); + return (Criteria) this; + } + + public Criteria andScalingLessThanOrEqualTo(String value) { + addCriterion("scaling <=", value, "scaling"); + return (Criteria) this; + } + + public Criteria andScalingLike(String value) { + addCriterion("scaling like", value, "scaling"); + return (Criteria) this; + } + + public Criteria andScalingNotLike(String value) { + addCriterion("scaling not like", value, "scaling"); + return (Criteria) this; + } + + public Criteria andScalingIn(List values) { + addCriterion("scaling in", values, "scaling"); + return (Criteria) this; + } + + public Criteria andScalingNotIn(List values) { + addCriterion("scaling not in", values, "scaling"); + return (Criteria) this; + } + + public Criteria andScalingBetween(String value1, String value2) { + addCriterion("scaling between", value1, value2, "scaling"); + return (Criteria) this; + } + + public Criteria andScalingNotBetween(String value1, String value2) { + addCriterion("scaling not between", value1, value2, "scaling"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNull() { + addCriterion("creator_id is null"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNotNull() { + addCriterion("creator_id is not null"); + return (Criteria) this; + } + + public Criteria andCreatorIdEqualTo(Long value) { + addCriterion("creator_id =", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotEqualTo(Long value) { + addCriterion("creator_id <>", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThan(Long value) { + addCriterion("creator_id >", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) { + addCriterion("creator_id >=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThan(Long value) { + addCriterion("creator_id <", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThanOrEqualTo(Long value) { + addCriterion("creator_id <=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdIn(List values) { + addCriterion("creator_id in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotIn(List values) { + addCriterion("creator_id not in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdBetween(Long value1, Long value2) { + addCriterion("creator_id between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotBetween(Long value1, Long value2) { + addCriterion("creator_id not between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(LocalDateTime value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(LocalDateTime value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(LocalDateTime value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(LocalDateTime value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdaterIdIsNull() { + addCriterion("updater_id is null"); + return (Criteria) this; + } + + public Criteria andUpdaterIdIsNotNull() { + addCriterion("updater_id is not null"); + return (Criteria) this; + } + + public Criteria andUpdaterIdEqualTo(Long value) { + addCriterion("updater_id =", value, "updaterId"); + return (Criteria) this; + } + + public Criteria andUpdaterIdNotEqualTo(Long value) { + addCriterion("updater_id <>", value, "updaterId"); + return (Criteria) this; + } + + public Criteria andUpdaterIdGreaterThan(Long value) { + addCriterion("updater_id >", value, "updaterId"); + return (Criteria) this; + } + + public Criteria andUpdaterIdGreaterThanOrEqualTo(Long value) { + addCriterion("updater_id >=", value, "updaterId"); + return (Criteria) this; + } + + public Criteria andUpdaterIdLessThan(Long value) { + addCriterion("updater_id <", value, "updaterId"); + return (Criteria) this; + } + + public Criteria andUpdaterIdLessThanOrEqualTo(Long value) { + addCriterion("updater_id <=", value, "updaterId"); + return (Criteria) this; + } + + public Criteria andUpdaterIdIn(List values) { + addCriterion("updater_id in", values, "updaterId"); + return (Criteria) this; + } + + public Criteria andUpdaterIdNotIn(List values) { + addCriterion("updater_id not in", values, "updaterId"); + return (Criteria) this; + } + + public Criteria andUpdaterIdBetween(Long value1, Long value2) { + addCriterion("updater_id between", value1, value2, "updaterId"); + return (Criteria) this; + } + + public Criteria andUpdaterIdNotBetween(Long value1, Long value2) { + addCriterion("updater_id not between", value1, value2, "updaterId"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(LocalDateTime value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(LocalDateTime value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(LocalDateTime value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(LocalDateTime value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/RunPlanDaily.java b/src/main/java/club/joylink/rtss/entity/RunPlanDaily.java new file mode 100644 index 000000000..348a80d37 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RunPlanDaily.java @@ -0,0 +1,183 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * run_plan_daily + * @author + */ +public class RunPlanDaily implements Serializable { + private Long id; + + /** + * 地图id + */ + private Long mapId; + + /** + * 运行图名称 + */ + private String name; + + /** + * 创建者ID + */ + private Long creatorId; + + private Long templateId; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + /** + * 被修改过 + */ + private Boolean modified; + + /** + * 运行日期 + */ + private LocalDate runDate; + + /** + * 车次 + */ + private String trips; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getMapId() { + return mapId; + } + + public void setMapId(Long mapId) { + this.mapId = mapId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Long getCreatorId() { + return creatorId; + } + + public void setCreatorId(Long creatorId) { + this.creatorId = creatorId; + } + + public Long getTemplateId() { + return templateId; + } + + public void setTemplateId(Long templateId) { + this.templateId = templateId; + } + + public LocalDateTime getCreateTime() { + return createTime; + } + + public void setCreateTime(LocalDateTime createTime) { + this.createTime = createTime; + } + + public Boolean getModified() { + return modified; + } + + public void setModified(Boolean modified) { + this.modified = modified; + } + + public LocalDate getRunDate() { + return runDate; + } + + public void setRunDate(LocalDate runDate) { + this.runDate = runDate; + } + + public String getTrips() { + return trips; + } + + public void setTrips(String trips) { + this.trips = trips; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + RunPlanDaily other = (RunPlanDaily) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId())) + && (this.getTemplateId() == null ? other.getTemplateId() == null : this.getTemplateId().equals(other.getTemplateId())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getModified() == null ? other.getModified() == null : this.getModified().equals(other.getModified())) + && (this.getRunDate() == null ? other.getRunDate() == null : this.getRunDate().equals(other.getRunDate())) + && (this.getTrips() == null ? other.getTrips() == null : this.getTrips().equals(other.getTrips())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode()); + result = prime * result + ((getTemplateId() == null) ? 0 : getTemplateId().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getModified() == null) ? 0 : getModified().hashCode()); + result = prime * result + ((getRunDate() == null) ? 0 : getRunDate().hashCode()); + result = prime * result + ((getTrips() == null) ? 0 : getTrips().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", mapId=").append(mapId); + sb.append(", name=").append(name); + sb.append(", creatorId=").append(creatorId); + sb.append(", templateId=").append(templateId); + sb.append(", createTime=").append(createTime); + sb.append(", modified=").append(modified); + sb.append(", runDate=").append(runDate); + sb.append(", trips=").append(trips); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/RunPlanDailyExample.java b/src/main/java/club/joylink/rtss/entity/RunPlanDailyExample.java new file mode 100644 index 000000000..d3546eac2 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RunPlanDailyExample.java @@ -0,0 +1,714 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class RunPlanDailyExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public RunPlanDailyExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNull() { + addCriterion("creator_id is null"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNotNull() { + addCriterion("creator_id is not null"); + return (Criteria) this; + } + + public Criteria andCreatorIdEqualTo(Long value) { + addCriterion("creator_id =", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotEqualTo(Long value) { + addCriterion("creator_id <>", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThan(Long value) { + addCriterion("creator_id >", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) { + addCriterion("creator_id >=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThan(Long value) { + addCriterion("creator_id <", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThanOrEqualTo(Long value) { + addCriterion("creator_id <=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdIn(List values) { + addCriterion("creator_id in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotIn(List values) { + addCriterion("creator_id not in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdBetween(Long value1, Long value2) { + addCriterion("creator_id between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotBetween(Long value1, Long value2) { + addCriterion("creator_id not between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andTemplateIdIsNull() { + addCriterion("template_id is null"); + return (Criteria) this; + } + + public Criteria andTemplateIdIsNotNull() { + addCriterion("template_id is not null"); + return (Criteria) this; + } + + public Criteria andTemplateIdEqualTo(Long value) { + addCriterion("template_id =", value, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdNotEqualTo(Long value) { + addCriterion("template_id <>", value, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdGreaterThan(Long value) { + addCriterion("template_id >", value, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdGreaterThanOrEqualTo(Long value) { + addCriterion("template_id >=", value, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdLessThan(Long value) { + addCriterion("template_id <", value, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdLessThanOrEqualTo(Long value) { + addCriterion("template_id <=", value, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdIn(List values) { + addCriterion("template_id in", values, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdNotIn(List values) { + addCriterion("template_id not in", values, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdBetween(Long value1, Long value2) { + addCriterion("template_id between", value1, value2, "templateId"); + return (Criteria) this; + } + + public Criteria andTemplateIdNotBetween(Long value1, Long value2) { + addCriterion("template_id not between", value1, value2, "templateId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(LocalDateTime value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(LocalDateTime value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(LocalDateTime value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(LocalDateTime value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andModifiedIsNull() { + addCriterion("modified is null"); + return (Criteria) this; + } + + public Criteria andModifiedIsNotNull() { + addCriterion("modified is not null"); + return (Criteria) this; + } + + public Criteria andModifiedEqualTo(Boolean value) { + addCriterion("modified =", value, "modified"); + return (Criteria) this; + } + + public Criteria andModifiedNotEqualTo(Boolean value) { + addCriterion("modified <>", value, "modified"); + return (Criteria) this; + } + + public Criteria andModifiedGreaterThan(Boolean value) { + addCriterion("modified >", value, "modified"); + return (Criteria) this; + } + + public Criteria andModifiedGreaterThanOrEqualTo(Boolean value) { + addCriterion("modified >=", value, "modified"); + return (Criteria) this; + } + + public Criteria andModifiedLessThan(Boolean value) { + addCriterion("modified <", value, "modified"); + return (Criteria) this; + } + + public Criteria andModifiedLessThanOrEqualTo(Boolean value) { + addCriterion("modified <=", value, "modified"); + return (Criteria) this; + } + + public Criteria andModifiedIn(List values) { + addCriterion("modified in", values, "modified"); + return (Criteria) this; + } + + public Criteria andModifiedNotIn(List values) { + addCriterion("modified not in", values, "modified"); + return (Criteria) this; + } + + public Criteria andModifiedBetween(Boolean value1, Boolean value2) { + addCriterion("modified between", value1, value2, "modified"); + return (Criteria) this; + } + + public Criteria andModifiedNotBetween(Boolean value1, Boolean value2) { + addCriterion("modified not between", value1, value2, "modified"); + return (Criteria) this; + } + + public Criteria andRunDateIsNull() { + addCriterion("run_date is null"); + return (Criteria) this; + } + + public Criteria andRunDateIsNotNull() { + addCriterion("run_date is not null"); + return (Criteria) this; + } + + public Criteria andRunDateEqualTo(LocalDate value) { + addCriterion("run_date =", value, "runDate"); + return (Criteria) this; + } + + public Criteria andRunDateNotEqualTo(LocalDate value) { + addCriterion("run_date <>", value, "runDate"); + return (Criteria) this; + } + + public Criteria andRunDateGreaterThan(LocalDate value) { + addCriterion("run_date >", value, "runDate"); + return (Criteria) this; + } + + public Criteria andRunDateGreaterThanOrEqualTo(LocalDate value) { + addCriterion("run_date >=", value, "runDate"); + return (Criteria) this; + } + + public Criteria andRunDateLessThan(LocalDate value) { + addCriterion("run_date <", value, "runDate"); + return (Criteria) this; + } + + public Criteria andRunDateLessThanOrEqualTo(LocalDate value) { + addCriterion("run_date <=", value, "runDate"); + return (Criteria) this; + } + + public Criteria andRunDateIn(List values) { + addCriterion("run_date in", values, "runDate"); + return (Criteria) this; + } + + public Criteria andRunDateNotIn(List values) { + addCriterion("run_date not in", values, "runDate"); + return (Criteria) this; + } + + public Criteria andRunDateBetween(LocalDate value1, LocalDate value2) { + addCriterion("run_date between", value1, value2, "runDate"); + return (Criteria) this; + } + + public Criteria andRunDateNotBetween(LocalDate value1, LocalDate value2) { + addCriterion("run_date not between", value1, value2, "runDate"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/RunPlanDraft.java b/src/main/java/club/joylink/rtss/entity/RunPlanDraft.java new file mode 100644 index 000000000..2569d950e --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RunPlanDraft.java @@ -0,0 +1,169 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * run_plan_draft + * @author + */ +public class RunPlanDraft implements Serializable { + private Long id; + + /** + * 地图id + */ + private Long mapId; + + /** + * 运行图名称 + */ + private String name; + + /** + * 创建人ID + */ + private Long creatorId; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + /** + * 状态 + */ + private String status; + + /** + * 审核驳回原因 + */ + private String explanation; + + /** + * 车次 + */ + private String trips; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getMapId() { + return mapId; + } + + public void setMapId(Long mapId) { + this.mapId = mapId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Long getCreatorId() { + return creatorId; + } + + public void setCreatorId(Long creatorId) { + this.creatorId = creatorId; + } + + public LocalDateTime getCreateTime() { + return createTime; + } + + public void setCreateTime(LocalDateTime createTime) { + this.createTime = createTime; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getExplanation() { + return explanation; + } + + public void setExplanation(String explanation) { + this.explanation = explanation; + } + + public String getTrips() { + return trips; + } + + public void setTrips(String trips) { + this.trips = trips; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + RunPlanDraft other = (RunPlanDraft) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getExplanation() == null ? other.getExplanation() == null : this.getExplanation().equals(other.getExplanation())) + && (this.getTrips() == null ? other.getTrips() == null : this.getTrips().equals(other.getTrips())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getExplanation() == null) ? 0 : getExplanation().hashCode()); + result = prime * result + ((getTrips() == null) ? 0 : getTrips().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", mapId=").append(mapId); + sb.append(", name=").append(name); + sb.append(", creatorId=").append(creatorId); + sb.append(", createTime=").append(createTime); + sb.append(", status=").append(status); + sb.append(", explanation=").append(explanation); + sb.append(", trips=").append(trips); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/RunPlanDraftExample.java b/src/main/java/club/joylink/rtss/entity/RunPlanDraftExample.java new file mode 100644 index 000000000..8742356b7 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RunPlanDraftExample.java @@ -0,0 +1,673 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class RunPlanDraftExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public RunPlanDraftExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNull() { + addCriterion("creator_id is null"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNotNull() { + addCriterion("creator_id is not null"); + return (Criteria) this; + } + + public Criteria andCreatorIdEqualTo(Long value) { + addCriterion("creator_id =", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotEqualTo(Long value) { + addCriterion("creator_id <>", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThan(Long value) { + addCriterion("creator_id >", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) { + addCriterion("creator_id >=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThan(Long value) { + addCriterion("creator_id <", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThanOrEqualTo(Long value) { + addCriterion("creator_id <=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdIn(List values) { + addCriterion("creator_id in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotIn(List values) { + addCriterion("creator_id not in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdBetween(Long value1, Long value2) { + addCriterion("creator_id between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotBetween(Long value1, Long value2) { + addCriterion("creator_id not between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(LocalDateTime value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(LocalDateTime value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(LocalDateTime value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(LocalDateTime value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andExplanationIsNull() { + addCriterion("explanation is null"); + return (Criteria) this; + } + + public Criteria andExplanationIsNotNull() { + addCriterion("explanation is not null"); + return (Criteria) this; + } + + public Criteria andExplanationEqualTo(String value) { + addCriterion("explanation =", value, "explanation"); + return (Criteria) this; + } + + public Criteria andExplanationNotEqualTo(String value) { + addCriterion("explanation <>", value, "explanation"); + return (Criteria) this; + } + + public Criteria andExplanationGreaterThan(String value) { + addCriterion("explanation >", value, "explanation"); + return (Criteria) this; + } + + public Criteria andExplanationGreaterThanOrEqualTo(String value) { + addCriterion("explanation >=", value, "explanation"); + return (Criteria) this; + } + + public Criteria andExplanationLessThan(String value) { + addCriterion("explanation <", value, "explanation"); + return (Criteria) this; + } + + public Criteria andExplanationLessThanOrEqualTo(String value) { + addCriterion("explanation <=", value, "explanation"); + return (Criteria) this; + } + + public Criteria andExplanationLike(String value) { + addCriterion("explanation like", value, "explanation"); + return (Criteria) this; + } + + public Criteria andExplanationNotLike(String value) { + addCriterion("explanation not like", value, "explanation"); + return (Criteria) this; + } + + public Criteria andExplanationIn(List values) { + addCriterion("explanation in", values, "explanation"); + return (Criteria) this; + } + + public Criteria andExplanationNotIn(List values) { + addCriterion("explanation not in", values, "explanation"); + return (Criteria) this; + } + + public Criteria andExplanationBetween(String value1, String value2) { + addCriterion("explanation between", value1, value2, "explanation"); + return (Criteria) this; + } + + public Criteria andExplanationNotBetween(String value1, String value2) { + addCriterion("explanation not between", value1, value2, "explanation"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/RunPlanLevel.java b/src/main/java/club/joylink/rtss/entity/RunPlanLevel.java new file mode 100644 index 000000000..a477cbec1 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RunPlanLevel.java @@ -0,0 +1,168 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * run_plan_level + * @author + */ +public class RunPlanLevel implements Serializable { + private Long id; + + /** + * 站间运行ID + */ + private Long stationRunningId; + + /** + * 用户ID + */ + private Long userId; + + /** + * 等级一运行时间 + */ + private Integer level1; + + /** + * 等级二运行时间 + */ + private Integer level2; + + /** + * 等级三运行时间 + */ + private Integer level3; + + /** + * 等级四运行时间 + */ + private Integer level4; + + /** + * 等级五运行时间 + */ + private Integer level5; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getStationRunningId() { + return stationRunningId; + } + + public void setStationRunningId(Long stationRunningId) { + this.stationRunningId = stationRunningId; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public Integer getLevel1() { + return level1; + } + + public void setLevel1(Integer level1) { + this.level1 = level1; + } + + public Integer getLevel2() { + return level2; + } + + public void setLevel2(Integer level2) { + this.level2 = level2; + } + + public Integer getLevel3() { + return level3; + } + + public void setLevel3(Integer level3) { + this.level3 = level3; + } + + public Integer getLevel4() { + return level4; + } + + public void setLevel4(Integer level4) { + this.level4 = level4; + } + + public Integer getLevel5() { + return level5; + } + + public void setLevel5(Integer level5) { + this.level5 = level5; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + RunPlanLevel other = (RunPlanLevel) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getStationRunningId() == null ? other.getStationRunningId() == null : this.getStationRunningId().equals(other.getStationRunningId())) + && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) + && (this.getLevel1() == null ? other.getLevel1() == null : this.getLevel1().equals(other.getLevel1())) + && (this.getLevel2() == null ? other.getLevel2() == null : this.getLevel2().equals(other.getLevel2())) + && (this.getLevel3() == null ? other.getLevel3() == null : this.getLevel3().equals(other.getLevel3())) + && (this.getLevel4() == null ? other.getLevel4() == null : this.getLevel4().equals(other.getLevel4())) + && (this.getLevel5() == null ? other.getLevel5() == null : this.getLevel5().equals(other.getLevel5())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getStationRunningId() == null) ? 0 : getStationRunningId().hashCode()); + result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); + result = prime * result + ((getLevel1() == null) ? 0 : getLevel1().hashCode()); + result = prime * result + ((getLevel2() == null) ? 0 : getLevel2().hashCode()); + result = prime * result + ((getLevel3() == null) ? 0 : getLevel3().hashCode()); + result = prime * result + ((getLevel4() == null) ? 0 : getLevel4().hashCode()); + result = prime * result + ((getLevel5() == null) ? 0 : getLevel5().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", stationRunningId=").append(stationRunningId); + sb.append(", userId=").append(userId); + sb.append(", level1=").append(level1); + sb.append(", level2=").append(level2); + sb.append(", level3=").append(level3); + sb.append(", level4=").append(level4); + sb.append(", level5=").append(level5); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/RunPlanLevelExample.java b/src/main/java/club/joylink/rtss/entity/RunPlanLevelExample.java new file mode 100644 index 000000000..3ab99ef86 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RunPlanLevelExample.java @@ -0,0 +1,702 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class RunPlanLevelExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public RunPlanLevelExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andStationRunningIdIsNull() { + addCriterion("station_running_id is null"); + return (Criteria) this; + } + + public Criteria andStationRunningIdIsNotNull() { + addCriterion("station_running_id is not null"); + return (Criteria) this; + } + + public Criteria andStationRunningIdEqualTo(Long value) { + addCriterion("station_running_id =", value, "stationRunningId"); + return (Criteria) this; + } + + public Criteria andStationRunningIdNotEqualTo(Long value) { + addCriterion("station_running_id <>", value, "stationRunningId"); + return (Criteria) this; + } + + public Criteria andStationRunningIdGreaterThan(Long value) { + addCriterion("station_running_id >", value, "stationRunningId"); + return (Criteria) this; + } + + public Criteria andStationRunningIdGreaterThanOrEqualTo(Long value) { + addCriterion("station_running_id >=", value, "stationRunningId"); + return (Criteria) this; + } + + public Criteria andStationRunningIdLessThan(Long value) { + addCriterion("station_running_id <", value, "stationRunningId"); + return (Criteria) this; + } + + public Criteria andStationRunningIdLessThanOrEqualTo(Long value) { + addCriterion("station_running_id <=", value, "stationRunningId"); + return (Criteria) this; + } + + public Criteria andStationRunningIdIn(List values) { + addCriterion("station_running_id in", values, "stationRunningId"); + return (Criteria) this; + } + + public Criteria andStationRunningIdNotIn(List values) { + addCriterion("station_running_id not in", values, "stationRunningId"); + return (Criteria) this; + } + + public Criteria andStationRunningIdBetween(Long value1, Long value2) { + addCriterion("station_running_id between", value1, value2, "stationRunningId"); + return (Criteria) this; + } + + public Criteria andStationRunningIdNotBetween(Long value1, Long value2) { + addCriterion("station_running_id not between", value1, value2, "stationRunningId"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andLevel1IsNull() { + addCriterion("level1 is null"); + return (Criteria) this; + } + + public Criteria andLevel1IsNotNull() { + addCriterion("level1 is not null"); + return (Criteria) this; + } + + public Criteria andLevel1EqualTo(Integer value) { + addCriterion("level1 =", value, "level1"); + return (Criteria) this; + } + + public Criteria andLevel1NotEqualTo(Integer value) { + addCriterion("level1 <>", value, "level1"); + return (Criteria) this; + } + + public Criteria andLevel1GreaterThan(Integer value) { + addCriterion("level1 >", value, "level1"); + return (Criteria) this; + } + + public Criteria andLevel1GreaterThanOrEqualTo(Integer value) { + addCriterion("level1 >=", value, "level1"); + return (Criteria) this; + } + + public Criteria andLevel1LessThan(Integer value) { + addCriterion("level1 <", value, "level1"); + return (Criteria) this; + } + + public Criteria andLevel1LessThanOrEqualTo(Integer value) { + addCriterion("level1 <=", value, "level1"); + return (Criteria) this; + } + + public Criteria andLevel1In(List values) { + addCriterion("level1 in", values, "level1"); + return (Criteria) this; + } + + public Criteria andLevel1NotIn(List values) { + addCriterion("level1 not in", values, "level1"); + return (Criteria) this; + } + + public Criteria andLevel1Between(Integer value1, Integer value2) { + addCriterion("level1 between", value1, value2, "level1"); + return (Criteria) this; + } + + public Criteria andLevel1NotBetween(Integer value1, Integer value2) { + addCriterion("level1 not between", value1, value2, "level1"); + return (Criteria) this; + } + + public Criteria andLevel2IsNull() { + addCriterion("level2 is null"); + return (Criteria) this; + } + + public Criteria andLevel2IsNotNull() { + addCriterion("level2 is not null"); + return (Criteria) this; + } + + public Criteria andLevel2EqualTo(Integer value) { + addCriterion("level2 =", value, "level2"); + return (Criteria) this; + } + + public Criteria andLevel2NotEqualTo(Integer value) { + addCriterion("level2 <>", value, "level2"); + return (Criteria) this; + } + + public Criteria andLevel2GreaterThan(Integer value) { + addCriterion("level2 >", value, "level2"); + return (Criteria) this; + } + + public Criteria andLevel2GreaterThanOrEqualTo(Integer value) { + addCriterion("level2 >=", value, "level2"); + return (Criteria) this; + } + + public Criteria andLevel2LessThan(Integer value) { + addCriterion("level2 <", value, "level2"); + return (Criteria) this; + } + + public Criteria andLevel2LessThanOrEqualTo(Integer value) { + addCriterion("level2 <=", value, "level2"); + return (Criteria) this; + } + + public Criteria andLevel2In(List values) { + addCriterion("level2 in", values, "level2"); + return (Criteria) this; + } + + public Criteria andLevel2NotIn(List values) { + addCriterion("level2 not in", values, "level2"); + return (Criteria) this; + } + + public Criteria andLevel2Between(Integer value1, Integer value2) { + addCriterion("level2 between", value1, value2, "level2"); + return (Criteria) this; + } + + public Criteria andLevel2NotBetween(Integer value1, Integer value2) { + addCriterion("level2 not between", value1, value2, "level2"); + return (Criteria) this; + } + + public Criteria andLevel3IsNull() { + addCriterion("level3 is null"); + return (Criteria) this; + } + + public Criteria andLevel3IsNotNull() { + addCriterion("level3 is not null"); + return (Criteria) this; + } + + public Criteria andLevel3EqualTo(Integer value) { + addCriterion("level3 =", value, "level3"); + return (Criteria) this; + } + + public Criteria andLevel3NotEqualTo(Integer value) { + addCriterion("level3 <>", value, "level3"); + return (Criteria) this; + } + + public Criteria andLevel3GreaterThan(Integer value) { + addCriterion("level3 >", value, "level3"); + return (Criteria) this; + } + + public Criteria andLevel3GreaterThanOrEqualTo(Integer value) { + addCriterion("level3 >=", value, "level3"); + return (Criteria) this; + } + + public Criteria andLevel3LessThan(Integer value) { + addCriterion("level3 <", value, "level3"); + return (Criteria) this; + } + + public Criteria andLevel3LessThanOrEqualTo(Integer value) { + addCriterion("level3 <=", value, "level3"); + return (Criteria) this; + } + + public Criteria andLevel3In(List values) { + addCriterion("level3 in", values, "level3"); + return (Criteria) this; + } + + public Criteria andLevel3NotIn(List values) { + addCriterion("level3 not in", values, "level3"); + return (Criteria) this; + } + + public Criteria andLevel3Between(Integer value1, Integer value2) { + addCriterion("level3 between", value1, value2, "level3"); + return (Criteria) this; + } + + public Criteria andLevel3NotBetween(Integer value1, Integer value2) { + addCriterion("level3 not between", value1, value2, "level3"); + return (Criteria) this; + } + + public Criteria andLevel4IsNull() { + addCriterion("level4 is null"); + return (Criteria) this; + } + + public Criteria andLevel4IsNotNull() { + addCriterion("level4 is not null"); + return (Criteria) this; + } + + public Criteria andLevel4EqualTo(Integer value) { + addCriterion("level4 =", value, "level4"); + return (Criteria) this; + } + + public Criteria andLevel4NotEqualTo(Integer value) { + addCriterion("level4 <>", value, "level4"); + return (Criteria) this; + } + + public Criteria andLevel4GreaterThan(Integer value) { + addCriterion("level4 >", value, "level4"); + return (Criteria) this; + } + + public Criteria andLevel4GreaterThanOrEqualTo(Integer value) { + addCriterion("level4 >=", value, "level4"); + return (Criteria) this; + } + + public Criteria andLevel4LessThan(Integer value) { + addCriterion("level4 <", value, "level4"); + return (Criteria) this; + } + + public Criteria andLevel4LessThanOrEqualTo(Integer value) { + addCriterion("level4 <=", value, "level4"); + return (Criteria) this; + } + + public Criteria andLevel4In(List values) { + addCriterion("level4 in", values, "level4"); + return (Criteria) this; + } + + public Criteria andLevel4NotIn(List values) { + addCriterion("level4 not in", values, "level4"); + return (Criteria) this; + } + + public Criteria andLevel4Between(Integer value1, Integer value2) { + addCriterion("level4 between", value1, value2, "level4"); + return (Criteria) this; + } + + public Criteria andLevel4NotBetween(Integer value1, Integer value2) { + addCriterion("level4 not between", value1, value2, "level4"); + return (Criteria) this; + } + + public Criteria andLevel5IsNull() { + addCriterion("level5 is null"); + return (Criteria) this; + } + + public Criteria andLevel5IsNotNull() { + addCriterion("level5 is not null"); + return (Criteria) this; + } + + public Criteria andLevel5EqualTo(Integer value) { + addCriterion("level5 =", value, "level5"); + return (Criteria) this; + } + + public Criteria andLevel5NotEqualTo(Integer value) { + addCriterion("level5 <>", value, "level5"); + return (Criteria) this; + } + + public Criteria andLevel5GreaterThan(Integer value) { + addCriterion("level5 >", value, "level5"); + return (Criteria) this; + } + + public Criteria andLevel5GreaterThanOrEqualTo(Integer value) { + addCriterion("level5 >=", value, "level5"); + return (Criteria) this; + } + + public Criteria andLevel5LessThan(Integer value) { + addCriterion("level5 <", value, "level5"); + return (Criteria) this; + } + + public Criteria andLevel5LessThanOrEqualTo(Integer value) { + addCriterion("level5 <=", value, "level5"); + return (Criteria) this; + } + + public Criteria andLevel5In(List values) { + addCriterion("level5 in", values, "level5"); + return (Criteria) this; + } + + public Criteria andLevel5NotIn(List values) { + addCriterion("level5 not in", values, "level5"); + return (Criteria) this; + } + + public Criteria andLevel5Between(Integer value1, Integer value2) { + addCriterion("level5 between", value1, value2, "level5"); + return (Criteria) this; + } + + public Criteria andLevel5NotBetween(Integer value1, Integer value2) { + addCriterion("level5 not between", value1, value2, "level5"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/RunPlanLoad.java b/src/main/java/club/joylink/rtss/entity/RunPlanLoad.java new file mode 100644 index 000000000..f2956bcbd --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RunPlanLoad.java @@ -0,0 +1,137 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDate; + +/** + * run_plan_load + * @author + */ +public class RunPlanLoad implements Serializable { + private Long id; + + /** + * 地图ID + */ + private Long mapId; + + /** + * 模板运行图ID + */ + private Long templatePlanId; + + /** + * 加载日期 + */ + private LocalDate loadTime; + + /** + * 用户ID + */ + private Long userId; + + /** + * 创建者ID + */ + private Long creatorId; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getMapId() { + return mapId; + } + + public void setMapId(Long mapId) { + this.mapId = mapId; + } + + public Long getTemplatePlanId() { + return templatePlanId; + } + + public void setTemplatePlanId(Long templatePlanId) { + this.templatePlanId = templatePlanId; + } + + public LocalDate getLoadTime() { + return loadTime; + } + + public void setLoadTime(LocalDate loadTime) { + this.loadTime = loadTime; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public Long getCreatorId() { + return creatorId; + } + + public void setCreatorId(Long creatorId) { + this.creatorId = creatorId; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + RunPlanLoad other = (RunPlanLoad) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getTemplatePlanId() == null ? other.getTemplatePlanId() == null : this.getTemplatePlanId().equals(other.getTemplatePlanId())) + && (this.getLoadTime() == null ? other.getLoadTime() == null : this.getLoadTime().equals(other.getLoadTime())) + && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) + && (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getTemplatePlanId() == null) ? 0 : getTemplatePlanId().hashCode()); + result = prime * result + ((getLoadTime() == null) ? 0 : getLoadTime().hashCode()); + result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); + result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", mapId=").append(mapId); + sb.append(", templatePlanId=").append(templatePlanId); + sb.append(", loadTime=").append(loadTime); + sb.append(", userId=").append(userId); + sb.append(", creatorId=").append(creatorId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/RunPlanLoadExample.java b/src/main/java/club/joylink/rtss/entity/RunPlanLoadExample.java new file mode 100644 index 000000000..c72a449ab --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RunPlanLoadExample.java @@ -0,0 +1,583 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.List; + +public class RunPlanLoadExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public RunPlanLoadExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andTemplatePlanIdIsNull() { + addCriterion("template_plan_id is null"); + return (Criteria) this; + } + + public Criteria andTemplatePlanIdIsNotNull() { + addCriterion("template_plan_id is not null"); + return (Criteria) this; + } + + public Criteria andTemplatePlanIdEqualTo(Long value) { + addCriterion("template_plan_id =", value, "templatePlanId"); + return (Criteria) this; + } + + public Criteria andTemplatePlanIdNotEqualTo(Long value) { + addCriterion("template_plan_id <>", value, "templatePlanId"); + return (Criteria) this; + } + + public Criteria andTemplatePlanIdGreaterThan(Long value) { + addCriterion("template_plan_id >", value, "templatePlanId"); + return (Criteria) this; + } + + public Criteria andTemplatePlanIdGreaterThanOrEqualTo(Long value) { + addCriterion("template_plan_id >=", value, "templatePlanId"); + return (Criteria) this; + } + + public Criteria andTemplatePlanIdLessThan(Long value) { + addCriterion("template_plan_id <", value, "templatePlanId"); + return (Criteria) this; + } + + public Criteria andTemplatePlanIdLessThanOrEqualTo(Long value) { + addCriterion("template_plan_id <=", value, "templatePlanId"); + return (Criteria) this; + } + + public Criteria andTemplatePlanIdIn(List values) { + addCriterion("template_plan_id in", values, "templatePlanId"); + return (Criteria) this; + } + + public Criteria andTemplatePlanIdNotIn(List values) { + addCriterion("template_plan_id not in", values, "templatePlanId"); + return (Criteria) this; + } + + public Criteria andTemplatePlanIdBetween(Long value1, Long value2) { + addCriterion("template_plan_id between", value1, value2, "templatePlanId"); + return (Criteria) this; + } + + public Criteria andTemplatePlanIdNotBetween(Long value1, Long value2) { + addCriterion("template_plan_id not between", value1, value2, "templatePlanId"); + return (Criteria) this; + } + + public Criteria andLoadTimeIsNull() { + addCriterion("load_time is null"); + return (Criteria) this; + } + + public Criteria andLoadTimeIsNotNull() { + addCriterion("load_time is not null"); + return (Criteria) this; + } + + public Criteria andLoadTimeEqualTo(LocalDate value) { + addCriterion("load_time =", value, "loadTime"); + return (Criteria) this; + } + + public Criteria andLoadTimeNotEqualTo(LocalDate value) { + addCriterion("load_time <>", value, "loadTime"); + return (Criteria) this; + } + + public Criteria andLoadTimeGreaterThan(LocalDate value) { + addCriterion("load_time >", value, "loadTime"); + return (Criteria) this; + } + + public Criteria andLoadTimeGreaterThanOrEqualTo(LocalDate value) { + addCriterion("load_time >=", value, "loadTime"); + return (Criteria) this; + } + + public Criteria andLoadTimeLessThan(LocalDate value) { + addCriterion("load_time <", value, "loadTime"); + return (Criteria) this; + } + + public Criteria andLoadTimeLessThanOrEqualTo(LocalDate value) { + addCriterion("load_time <=", value, "loadTime"); + return (Criteria) this; + } + + public Criteria andLoadTimeIn(List values) { + addCriterion("load_time in", values, "loadTime"); + return (Criteria) this; + } + + public Criteria andLoadTimeNotIn(List values) { + addCriterion("load_time not in", values, "loadTime"); + return (Criteria) this; + } + + public Criteria andLoadTimeBetween(LocalDate value1, LocalDate value2) { + addCriterion("load_time between", value1, value2, "loadTime"); + return (Criteria) this; + } + + public Criteria andLoadTimeNotBetween(LocalDate value1, LocalDate value2) { + addCriterion("load_time not between", value1, value2, "loadTime"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNull() { + addCriterion("creator_id is null"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNotNull() { + addCriterion("creator_id is not null"); + return (Criteria) this; + } + + public Criteria andCreatorIdEqualTo(Long value) { + addCriterion("creator_id =", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotEqualTo(Long value) { + addCriterion("creator_id <>", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThan(Long value) { + addCriterion("creator_id >", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) { + addCriterion("creator_id >=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThan(Long value) { + addCriterion("creator_id <", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThanOrEqualTo(Long value) { + addCriterion("creator_id <=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdIn(List values) { + addCriterion("creator_id in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotIn(List values) { + addCriterion("creator_id not in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdBetween(Long value1, Long value2) { + addCriterion("creator_id between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotBetween(Long value1, Long value2) { + addCriterion("creator_id not between", value1, value2, "creatorId"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/RunPlanTemplate.java b/src/main/java/club/joylink/rtss/entity/RunPlanTemplate.java new file mode 100644 index 000000000..7da02b8b4 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RunPlanTemplate.java @@ -0,0 +1,155 @@ +package club.joylink.rtss.entity; + +import club.joylink.rtss.constants.MapStatus; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * run_plan_template + * @author + */ +public class RunPlanTemplate implements Serializable { + private Long id; + + /** + * 地图id + */ + private Long mapId; + + /** + * 运行图名称 + */ + private String name; + + /** + * 创建人ID + */ + private Long creatorId; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + /** + * 状态 + */ + private String status= MapStatus.Online.getCode(); + + /** + * 车次 + */ + private String trips; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getMapId() { + return mapId; + } + + public void setMapId(Long mapId) { + this.mapId = mapId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Long getCreatorId() { + return creatorId; + } + + public void setCreatorId(Long creatorId) { + this.creatorId = creatorId; + } + + public LocalDateTime getCreateTime() { + return createTime; + } + + public void setCreateTime(LocalDateTime createTime) { + this.createTime = createTime; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getTrips() { + return trips; + } + + public void setTrips(String trips) { + this.trips = trips; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + RunPlanTemplate other = (RunPlanTemplate) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getTrips() == null ? other.getTrips() == null : this.getTrips().equals(other.getTrips())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getTrips() == null) ? 0 : getTrips().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", mapId=").append(mapId); + sb.append(", name=").append(name); + sb.append(", creatorId=").append(creatorId); + sb.append(", createTime=").append(createTime); + sb.append(", status=").append(status); + sb.append(", trips=").append(trips); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} diff --git a/src/main/java/club/joylink/rtss/entity/RunPlanTemplateExample.java b/src/main/java/club/joylink/rtss/entity/RunPlanTemplateExample.java new file mode 100644 index 000000000..d75d0d460 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RunPlanTemplateExample.java @@ -0,0 +1,603 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class RunPlanTemplateExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public RunPlanTemplateExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNull() { + addCriterion("creator_id is null"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNotNull() { + addCriterion("creator_id is not null"); + return (Criteria) this; + } + + public Criteria andCreatorIdEqualTo(Long value) { + addCriterion("creator_id =", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotEqualTo(Long value) { + addCriterion("creator_id <>", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThan(Long value) { + addCriterion("creator_id >", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) { + addCriterion("creator_id >=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThan(Long value) { + addCriterion("creator_id <", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThanOrEqualTo(Long value) { + addCriterion("creator_id <=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdIn(List values) { + addCriterion("creator_id in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotIn(List values) { + addCriterion("creator_id not in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdBetween(Long value1, Long value2) { + addCriterion("creator_id between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotBetween(Long value1, Long value2) { + addCriterion("creator_id not between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(LocalDateTime value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(LocalDateTime value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(LocalDateTime value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(LocalDateTime value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/RunPlanTemplateVersion.java b/src/main/java/club/joylink/rtss/entity/RunPlanTemplateVersion.java new file mode 100644 index 000000000..d1498dfb4 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RunPlanTemplateVersion.java @@ -0,0 +1,121 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * run_plan_template_version + * @author + */ +public class RunPlanTemplateVersion implements Serializable { + private Long id; + + /** + * 运行图id + */ + private Long planId; + + /** + * 版本号 + */ + private String version; + + /** + * 创建者ID + */ + private Long creatorId; + + /** + * 更新时间 + */ + private LocalDateTime updateTime; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getPlanId() { + return planId; + } + + public void setPlanId(Long planId) { + this.planId = planId; + } + + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + public Long getCreatorId() { + return creatorId; + } + + public void setCreatorId(Long creatorId) { + this.creatorId = creatorId; + } + + public LocalDateTime getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(LocalDateTime updateTime) { + this.updateTime = updateTime; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + RunPlanTemplateVersion other = (RunPlanTemplateVersion) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getPlanId() == null ? other.getPlanId() == null : this.getPlanId().equals(other.getPlanId())) + && (this.getVersion() == null ? other.getVersion() == null : this.getVersion().equals(other.getVersion())) + && (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getPlanId() == null) ? 0 : getPlanId().hashCode()); + result = prime * result + ((getVersion() == null) ? 0 : getVersion().hashCode()); + result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", planId=").append(planId); + sb.append(", version=").append(version); + sb.append(", creatorId=").append(creatorId); + sb.append(", updateTime=").append(updateTime); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/RunPlanTemplateVersionExample.java b/src/main/java/club/joylink/rtss/entity/RunPlanTemplateVersionExample.java new file mode 100644 index 000000000..c005cb67a --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RunPlanTemplateVersionExample.java @@ -0,0 +1,533 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class RunPlanTemplateVersionExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public RunPlanTemplateVersionExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andPlanIdIsNull() { + addCriterion("plan_id is null"); + return (Criteria) this; + } + + public Criteria andPlanIdIsNotNull() { + addCriterion("plan_id is not null"); + return (Criteria) this; + } + + public Criteria andPlanIdEqualTo(Long value) { + addCriterion("plan_id =", value, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdNotEqualTo(Long value) { + addCriterion("plan_id <>", value, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdGreaterThan(Long value) { + addCriterion("plan_id >", value, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdGreaterThanOrEqualTo(Long value) { + addCriterion("plan_id >=", value, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdLessThan(Long value) { + addCriterion("plan_id <", value, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdLessThanOrEqualTo(Long value) { + addCriterion("plan_id <=", value, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdIn(List values) { + addCriterion("plan_id in", values, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdNotIn(List values) { + addCriterion("plan_id not in", values, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdBetween(Long value1, Long value2) { + addCriterion("plan_id between", value1, value2, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdNotBetween(Long value1, Long value2) { + addCriterion("plan_id not between", value1, value2, "planId"); + return (Criteria) this; + } + + public Criteria andVersionIsNull() { + addCriterion("version is null"); + return (Criteria) this; + } + + public Criteria andVersionIsNotNull() { + addCriterion("version is not null"); + return (Criteria) this; + } + + public Criteria andVersionEqualTo(String value) { + addCriterion("version =", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionNotEqualTo(String value) { + addCriterion("version <>", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionGreaterThan(String value) { + addCriterion("version >", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionGreaterThanOrEqualTo(String value) { + addCriterion("version >=", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionLessThan(String value) { + addCriterion("version <", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionLessThanOrEqualTo(String value) { + addCriterion("version <=", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionLike(String value) { + addCriterion("version like", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionNotLike(String value) { + addCriterion("version not like", value, "version"); + return (Criteria) this; + } + + public Criteria andVersionIn(List values) { + addCriterion("version in", values, "version"); + return (Criteria) this; + } + + public Criteria andVersionNotIn(List values) { + addCriterion("version not in", values, "version"); + return (Criteria) this; + } + + public Criteria andVersionBetween(String value1, String value2) { + addCriterion("version between", value1, value2, "version"); + return (Criteria) this; + } + + public Criteria andVersionNotBetween(String value1, String value2) { + addCriterion("version not between", value1, value2, "version"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNull() { + addCriterion("creator_id is null"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNotNull() { + addCriterion("creator_id is not null"); + return (Criteria) this; + } + + public Criteria andCreatorIdEqualTo(Long value) { + addCriterion("creator_id =", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotEqualTo(Long value) { + addCriterion("creator_id <>", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThan(Long value) { + addCriterion("creator_id >", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) { + addCriterion("creator_id >=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThan(Long value) { + addCriterion("creator_id <", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThanOrEqualTo(Long value) { + addCriterion("creator_id <=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdIn(List values) { + addCriterion("creator_id in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotIn(List values) { + addCriterion("creator_id not in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdBetween(Long value1, Long value2) { + addCriterion("creator_id between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotBetween(Long value1, Long value2) { + addCriterion("creator_id not between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(LocalDateTime value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(LocalDateTime value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(LocalDateTime value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(LocalDateTime value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/RunPlanTools.java b/src/main/java/club/joylink/rtss/entity/RunPlanTools.java new file mode 100644 index 000000000..34af79399 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RunPlanTools.java @@ -0,0 +1,24 @@ +package club.joylink.rtss.entity; + +import lombok.Data; + +import java.io.Serializable; + +/** + * run_plan_tools + * @author + */ +@Data +public class RunPlanTools implements Serializable { + private Long id; + + private Long groupId; + + private Long mapId; + + private String trip; + + private String area; + + private static final long serialVersionUID = 1L; +} diff --git a/src/main/java/club/joylink/rtss/entity/RunPlanToolsConfig.java b/src/main/java/club/joylink/rtss/entity/RunPlanToolsConfig.java new file mode 100644 index 000000000..39c9cbe4d --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RunPlanToolsConfig.java @@ -0,0 +1,30 @@ +package club.joylink.rtss.entity; + +import lombok.Data; + +import java.io.Serializable; + +/** + * run_plan_tools_config + * @author + */ +@Data +public class RunPlanToolsConfig implements Serializable { + private Long id; + + private Long planId; + + private Float averageSpeed; + + private Float maxSpeed; + + private Integer minStopTime; + + private Integer stopTime; + + private Integer minIntervalTime; + + private Integer turnBackTime; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/RunPlanToolsConfigExample.java b/src/main/java/club/joylink/rtss/entity/RunPlanToolsConfigExample.java new file mode 100644 index 000000000..c991ad49f --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RunPlanToolsConfigExample.java @@ -0,0 +1,702 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class RunPlanToolsConfigExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public RunPlanToolsConfigExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andPlanIdIsNull() { + addCriterion("plan_id is null"); + return (Criteria) this; + } + + public Criteria andPlanIdIsNotNull() { + addCriterion("plan_id is not null"); + return (Criteria) this; + } + + public Criteria andPlanIdEqualTo(Long value) { + addCriterion("plan_id =", value, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdNotEqualTo(Long value) { + addCriterion("plan_id <>", value, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdGreaterThan(Long value) { + addCriterion("plan_id >", value, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdGreaterThanOrEqualTo(Long value) { + addCriterion("plan_id >=", value, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdLessThan(Long value) { + addCriterion("plan_id <", value, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdLessThanOrEqualTo(Long value) { + addCriterion("plan_id <=", value, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdIn(List values) { + addCriterion("plan_id in", values, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdNotIn(List values) { + addCriterion("plan_id not in", values, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdBetween(Long value1, Long value2) { + addCriterion("plan_id between", value1, value2, "planId"); + return (Criteria) this; + } + + public Criteria andPlanIdNotBetween(Long value1, Long value2) { + addCriterion("plan_id not between", value1, value2, "planId"); + return (Criteria) this; + } + + public Criteria andAverageSpeedIsNull() { + addCriterion("average_speed is null"); + return (Criteria) this; + } + + public Criteria andAverageSpeedIsNotNull() { + addCriterion("average_speed is not null"); + return (Criteria) this; + } + + public Criteria andAverageSpeedEqualTo(Float value) { + addCriterion("average_speed =", value, "averageSpeed"); + return (Criteria) this; + } + + public Criteria andAverageSpeedNotEqualTo(Float value) { + addCriterion("average_speed <>", value, "averageSpeed"); + return (Criteria) this; + } + + public Criteria andAverageSpeedGreaterThan(Float value) { + addCriterion("average_speed >", value, "averageSpeed"); + return (Criteria) this; + } + + public Criteria andAverageSpeedGreaterThanOrEqualTo(Float value) { + addCriterion("average_speed >=", value, "averageSpeed"); + return (Criteria) this; + } + + public Criteria andAverageSpeedLessThan(Float value) { + addCriterion("average_speed <", value, "averageSpeed"); + return (Criteria) this; + } + + public Criteria andAverageSpeedLessThanOrEqualTo(Float value) { + addCriterion("average_speed <=", value, "averageSpeed"); + return (Criteria) this; + } + + public Criteria andAverageSpeedIn(List values) { + addCriterion("average_speed in", values, "averageSpeed"); + return (Criteria) this; + } + + public Criteria andAverageSpeedNotIn(List values) { + addCriterion("average_speed not in", values, "averageSpeed"); + return (Criteria) this; + } + + public Criteria andAverageSpeedBetween(Float value1, Float value2) { + addCriterion("average_speed between", value1, value2, "averageSpeed"); + return (Criteria) this; + } + + public Criteria andAverageSpeedNotBetween(Float value1, Float value2) { + addCriterion("average_speed not between", value1, value2, "averageSpeed"); + return (Criteria) this; + } + + public Criteria andMaxSpeedIsNull() { + addCriterion("max_speed is null"); + return (Criteria) this; + } + + public Criteria andMaxSpeedIsNotNull() { + addCriterion("max_speed is not null"); + return (Criteria) this; + } + + public Criteria andMaxSpeedEqualTo(Float value) { + addCriterion("max_speed =", value, "maxSpeed"); + return (Criteria) this; + } + + public Criteria andMaxSpeedNotEqualTo(Float value) { + addCriterion("max_speed <>", value, "maxSpeed"); + return (Criteria) this; + } + + public Criteria andMaxSpeedGreaterThan(Float value) { + addCriterion("max_speed >", value, "maxSpeed"); + return (Criteria) this; + } + + public Criteria andMaxSpeedGreaterThanOrEqualTo(Float value) { + addCriterion("max_speed >=", value, "maxSpeed"); + return (Criteria) this; + } + + public Criteria andMaxSpeedLessThan(Float value) { + addCriterion("max_speed <", value, "maxSpeed"); + return (Criteria) this; + } + + public Criteria andMaxSpeedLessThanOrEqualTo(Float value) { + addCriterion("max_speed <=", value, "maxSpeed"); + return (Criteria) this; + } + + public Criteria andMaxSpeedIn(List values) { + addCriterion("max_speed in", values, "maxSpeed"); + return (Criteria) this; + } + + public Criteria andMaxSpeedNotIn(List values) { + addCriterion("max_speed not in", values, "maxSpeed"); + return (Criteria) this; + } + + public Criteria andMaxSpeedBetween(Float value1, Float value2) { + addCriterion("max_speed between", value1, value2, "maxSpeed"); + return (Criteria) this; + } + + public Criteria andMaxSpeedNotBetween(Float value1, Float value2) { + addCriterion("max_speed not between", value1, value2, "maxSpeed"); + return (Criteria) this; + } + + public Criteria andMinStopTimeIsNull() { + addCriterion("min_stop_time is null"); + return (Criteria) this; + } + + public Criteria andMinStopTimeIsNotNull() { + addCriterion("min_stop_time is not null"); + return (Criteria) this; + } + + public Criteria andMinStopTimeEqualTo(Integer value) { + addCriterion("min_stop_time =", value, "minStopTime"); + return (Criteria) this; + } + + public Criteria andMinStopTimeNotEqualTo(Integer value) { + addCriterion("min_stop_time <>", value, "minStopTime"); + return (Criteria) this; + } + + public Criteria andMinStopTimeGreaterThan(Integer value) { + addCriterion("min_stop_time >", value, "minStopTime"); + return (Criteria) this; + } + + public Criteria andMinStopTimeGreaterThanOrEqualTo(Integer value) { + addCriterion("min_stop_time >=", value, "minStopTime"); + return (Criteria) this; + } + + public Criteria andMinStopTimeLessThan(Integer value) { + addCriterion("min_stop_time <", value, "minStopTime"); + return (Criteria) this; + } + + public Criteria andMinStopTimeLessThanOrEqualTo(Integer value) { + addCriterion("min_stop_time <=", value, "minStopTime"); + return (Criteria) this; + } + + public Criteria andMinStopTimeIn(List values) { + addCriterion("min_stop_time in", values, "minStopTime"); + return (Criteria) this; + } + + public Criteria andMinStopTimeNotIn(List values) { + addCriterion("min_stop_time not in", values, "minStopTime"); + return (Criteria) this; + } + + public Criteria andMinStopTimeBetween(Integer value1, Integer value2) { + addCriterion("min_stop_time between", value1, value2, "minStopTime"); + return (Criteria) this; + } + + public Criteria andMinStopTimeNotBetween(Integer value1, Integer value2) { + addCriterion("min_stop_time not between", value1, value2, "minStopTime"); + return (Criteria) this; + } + + public Criteria andStopTimeIsNull() { + addCriterion("stop_time is null"); + return (Criteria) this; + } + + public Criteria andStopTimeIsNotNull() { + addCriterion("stop_time is not null"); + return (Criteria) this; + } + + public Criteria andStopTimeEqualTo(Integer value) { + addCriterion("stop_time =", value, "stopTime"); + return (Criteria) this; + } + + public Criteria andStopTimeNotEqualTo(Integer value) { + addCriterion("stop_time <>", value, "stopTime"); + return (Criteria) this; + } + + public Criteria andStopTimeGreaterThan(Integer value) { + addCriterion("stop_time >", value, "stopTime"); + return (Criteria) this; + } + + public Criteria andStopTimeGreaterThanOrEqualTo(Integer value) { + addCriterion("stop_time >=", value, "stopTime"); + return (Criteria) this; + } + + public Criteria andStopTimeLessThan(Integer value) { + addCriterion("stop_time <", value, "stopTime"); + return (Criteria) this; + } + + public Criteria andStopTimeLessThanOrEqualTo(Integer value) { + addCriterion("stop_time <=", value, "stopTime"); + return (Criteria) this; + } + + public Criteria andStopTimeIn(List values) { + addCriterion("stop_time in", values, "stopTime"); + return (Criteria) this; + } + + public Criteria andStopTimeNotIn(List values) { + addCriterion("stop_time not in", values, "stopTime"); + return (Criteria) this; + } + + public Criteria andStopTimeBetween(Integer value1, Integer value2) { + addCriterion("stop_time between", value1, value2, "stopTime"); + return (Criteria) this; + } + + public Criteria andStopTimeNotBetween(Integer value1, Integer value2) { + addCriterion("stop_time not between", value1, value2, "stopTime"); + return (Criteria) this; + } + + public Criteria andMinIntervalTimeIsNull() { + addCriterion("min_interval_time is null"); + return (Criteria) this; + } + + public Criteria andMinIntervalTimeIsNotNull() { + addCriterion("min_interval_time is not null"); + return (Criteria) this; + } + + public Criteria andMinIntervalTimeEqualTo(Integer value) { + addCriterion("min_interval_time =", value, "minIntervalTime"); + return (Criteria) this; + } + + public Criteria andMinIntervalTimeNotEqualTo(Integer value) { + addCriterion("min_interval_time <>", value, "minIntervalTime"); + return (Criteria) this; + } + + public Criteria andMinIntervalTimeGreaterThan(Integer value) { + addCriterion("min_interval_time >", value, "minIntervalTime"); + return (Criteria) this; + } + + public Criteria andMinIntervalTimeGreaterThanOrEqualTo(Integer value) { + addCriterion("min_interval_time >=", value, "minIntervalTime"); + return (Criteria) this; + } + + public Criteria andMinIntervalTimeLessThan(Integer value) { + addCriterion("min_interval_time <", value, "minIntervalTime"); + return (Criteria) this; + } + + public Criteria andMinIntervalTimeLessThanOrEqualTo(Integer value) { + addCriterion("min_interval_time <=", value, "minIntervalTime"); + return (Criteria) this; + } + + public Criteria andMinIntervalTimeIn(List values) { + addCriterion("min_interval_time in", values, "minIntervalTime"); + return (Criteria) this; + } + + public Criteria andMinIntervalTimeNotIn(List values) { + addCriterion("min_interval_time not in", values, "minIntervalTime"); + return (Criteria) this; + } + + public Criteria andMinIntervalTimeBetween(Integer value1, Integer value2) { + addCriterion("min_interval_time between", value1, value2, "minIntervalTime"); + return (Criteria) this; + } + + public Criteria andMinIntervalTimeNotBetween(Integer value1, Integer value2) { + addCriterion("min_interval_time not between", value1, value2, "minIntervalTime"); + return (Criteria) this; + } + + public Criteria andTurnBackTimeIsNull() { + addCriterion("turn_back_time is null"); + return (Criteria) this; + } + + public Criteria andTurnBackTimeIsNotNull() { + addCriterion("turn_back_time is not null"); + return (Criteria) this; + } + + public Criteria andTurnBackTimeEqualTo(Integer value) { + addCriterion("turn_back_time =", value, "turnBackTime"); + return (Criteria) this; + } + + public Criteria andTurnBackTimeNotEqualTo(Integer value) { + addCriterion("turn_back_time <>", value, "turnBackTime"); + return (Criteria) this; + } + + public Criteria andTurnBackTimeGreaterThan(Integer value) { + addCriterion("turn_back_time >", value, "turnBackTime"); + return (Criteria) this; + } + + public Criteria andTurnBackTimeGreaterThanOrEqualTo(Integer value) { + addCriterion("turn_back_time >=", value, "turnBackTime"); + return (Criteria) this; + } + + public Criteria andTurnBackTimeLessThan(Integer value) { + addCriterion("turn_back_time <", value, "turnBackTime"); + return (Criteria) this; + } + + public Criteria andTurnBackTimeLessThanOrEqualTo(Integer value) { + addCriterion("turn_back_time <=", value, "turnBackTime"); + return (Criteria) this; + } + + public Criteria andTurnBackTimeIn(List values) { + addCriterion("turn_back_time in", values, "turnBackTime"); + return (Criteria) this; + } + + public Criteria andTurnBackTimeNotIn(List values) { + addCriterion("turn_back_time not in", values, "turnBackTime"); + return (Criteria) this; + } + + public Criteria andTurnBackTimeBetween(Integer value1, Integer value2) { + addCriterion("turn_back_time between", value1, value2, "turnBackTime"); + return (Criteria) this; + } + + public Criteria andTurnBackTimeNotBetween(Integer value1, Integer value2) { + addCriterion("turn_back_time not between", value1, value2, "turnBackTime"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/RunPlanToolsExample.java b/src/main/java/club/joylink/rtss/entity/RunPlanToolsExample.java new file mode 100644 index 000000000..72f832d11 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RunPlanToolsExample.java @@ -0,0 +1,402 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class RunPlanToolsExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public RunPlanToolsExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andGroupIdIsNull() { + addCriterion("group_id is null"); + return (Criteria) this; + } + + public Criteria andGroupIdIsNotNull() { + addCriterion("group_id is not null"); + return (Criteria) this; + } + + public Criteria andGroupIdEqualTo(Long value) { + addCriterion("group_id =", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdNotEqualTo(Long value) { + addCriterion("group_id <>", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdGreaterThan(Long value) { + addCriterion("group_id >", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdGreaterThanOrEqualTo(Long value) { + addCriterion("group_id >=", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdLessThan(Long value) { + addCriterion("group_id <", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdLessThanOrEqualTo(Long value) { + addCriterion("group_id <=", value, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdIn(List values) { + addCriterion("group_id in", values, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdNotIn(List values) { + addCriterion("group_id not in", values, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdBetween(Long value1, Long value2) { + addCriterion("group_id between", value1, value2, "groupId"); + return (Criteria) this; + } + + public Criteria andGroupIdNotBetween(Long value1, Long value2) { + addCriterion("group_id not between", value1, value2, "groupId"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} diff --git a/src/main/java/club/joylink/rtss/entity/RunPlanToolsGroup.java b/src/main/java/club/joylink/rtss/entity/RunPlanToolsGroup.java new file mode 100644 index 000000000..303a13e88 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RunPlanToolsGroup.java @@ -0,0 +1,20 @@ +package club.joylink.rtss.entity; + +import lombok.Data; + +import java.io.Serializable; + +/** + * run_plan_tools_group + * @author + */ +@Data +public class RunPlanToolsGroup implements Serializable { + private Long id; + + private String name; + + private String maps; + + private static final long serialVersionUID = 1L; +} diff --git a/src/main/java/club/joylink/rtss/entity/RunPlanToolsGroupExample.java b/src/main/java/club/joylink/rtss/entity/RunPlanToolsGroupExample.java new file mode 100644 index 000000000..67621ab1d --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RunPlanToolsGroupExample.java @@ -0,0 +1,422 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class RunPlanToolsGroupExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public RunPlanToolsGroupExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andMapsIsNull() { + addCriterion("maps is null"); + return (Criteria) this; + } + + public Criteria andMapsIsNotNull() { + addCriterion("maps is not null"); + return (Criteria) this; + } + + public Criteria andMapsEqualTo(String value) { + addCriterion("maps =", value, "maps"); + return (Criteria) this; + } + + public Criteria andMapsNotEqualTo(String value) { + addCriterion("maps <>", value, "maps"); + return (Criteria) this; + } + + public Criteria andMapsGreaterThan(String value) { + addCriterion("maps >", value, "maps"); + return (Criteria) this; + } + + public Criteria andMapsGreaterThanOrEqualTo(String value) { + addCriterion("maps >=", value, "maps"); + return (Criteria) this; + } + + public Criteria andMapsLessThan(String value) { + addCriterion("maps <", value, "maps"); + return (Criteria) this; + } + + public Criteria andMapsLessThanOrEqualTo(String value) { + addCriterion("maps <=", value, "maps"); + return (Criteria) this; + } + + public Criteria andMapsLike(String value) { + addCriterion("maps like", value, "maps"); + return (Criteria) this; + } + + public Criteria andMapsNotLike(String value) { + addCriterion("maps not like", value, "maps"); + return (Criteria) this; + } + + public Criteria andMapsIn(List values) { + addCriterion("maps in", values, "maps"); + return (Criteria) this; + } + + public Criteria andMapsNotIn(List values) { + addCriterion("maps not in", values, "maps"); + return (Criteria) this; + } + + public Criteria andMapsBetween(String value1, String value2) { + addCriterion("maps between", value1, value2, "maps"); + return (Criteria) this; + } + + public Criteria andMapsNotBetween(String value1, String value2) { + addCriterion("maps not between", value1, value2, "maps"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} diff --git a/src/main/java/club/joylink/rtss/entity/RunPlanToolsMap.java b/src/main/java/club/joylink/rtss/entity/RunPlanToolsMap.java new file mode 100644 index 000000000..021635e0e --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RunPlanToolsMap.java @@ -0,0 +1,18 @@ +package club.joylink.rtss.entity; + +import lombok.Data; + +import java.io.Serializable; + +/** + * run_plan_tools_map + * @author + */ +@Data +public class RunPlanToolsMap implements Serializable { + private Long id; + + private String name; + + private static final long serialVersionUID = 1L; +} diff --git a/src/main/java/club/joylink/rtss/entity/RunPlanToolsMapExample.java b/src/main/java/club/joylink/rtss/entity/RunPlanToolsMapExample.java new file mode 100644 index 000000000..80ba52ec3 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RunPlanToolsMapExample.java @@ -0,0 +1,352 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class RunPlanToolsMapExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public RunPlanToolsMapExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} diff --git a/src/main/java/club/joylink/rtss/entity/RunPlanToolsStation.java b/src/main/java/club/joylink/rtss/entity/RunPlanToolsStation.java new file mode 100644 index 000000000..d7d76f989 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RunPlanToolsStation.java @@ -0,0 +1,28 @@ +package club.joylink.rtss.entity; + +import lombok.Data; + +import java.io.Serializable; + +/** + * run_plan_tools_station + * @author + */ +@Data +public class RunPlanToolsStation implements Serializable { + private Long id; + + private Long mapId; + + private String name; + + private Integer kmRange; + + private Boolean transferable; + + private Integer upReception; + + private Integer downReception; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/RunPlanToolsStationExample.java b/src/main/java/club/joylink/rtss/entity/RunPlanToolsStationExample.java new file mode 100644 index 000000000..f77ccae82 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/RunPlanToolsStationExample.java @@ -0,0 +1,652 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class RunPlanToolsStationExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public RunPlanToolsStationExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andKmRangeIsNull() { + addCriterion("km_range is null"); + return (Criteria) this; + } + + public Criteria andKmRangeIsNotNull() { + addCriterion("km_range is not null"); + return (Criteria) this; + } + + public Criteria andKmRangeEqualTo(Integer value) { + addCriterion("km_range =", value, "kmRange"); + return (Criteria) this; + } + + public Criteria andKmRangeNotEqualTo(Integer value) { + addCriterion("km_range <>", value, "kmRange"); + return (Criteria) this; + } + + public Criteria andKmRangeGreaterThan(Integer value) { + addCriterion("km_range >", value, "kmRange"); + return (Criteria) this; + } + + public Criteria andKmRangeGreaterThanOrEqualTo(Integer value) { + addCriterion("km_range >=", value, "kmRange"); + return (Criteria) this; + } + + public Criteria andKmRangeLessThan(Integer value) { + addCriterion("km_range <", value, "kmRange"); + return (Criteria) this; + } + + public Criteria andKmRangeLessThanOrEqualTo(Integer value) { + addCriterion("km_range <=", value, "kmRange"); + return (Criteria) this; + } + + public Criteria andKmRangeIn(List values) { + addCriterion("km_range in", values, "kmRange"); + return (Criteria) this; + } + + public Criteria andKmRangeNotIn(List values) { + addCriterion("km_range not in", values, "kmRange"); + return (Criteria) this; + } + + public Criteria andKmRangeBetween(Integer value1, Integer value2) { + addCriterion("km_range between", value1, value2, "kmRange"); + return (Criteria) this; + } + + public Criteria andKmRangeNotBetween(Integer value1, Integer value2) { + addCriterion("km_range not between", value1, value2, "kmRange"); + return (Criteria) this; + } + + public Criteria andTransferableIsNull() { + addCriterion("transferable is null"); + return (Criteria) this; + } + + public Criteria andTransferableIsNotNull() { + addCriterion("transferable is not null"); + return (Criteria) this; + } + + public Criteria andTransferableEqualTo(Boolean value) { + addCriterion("transferable =", value, "transferable"); + return (Criteria) this; + } + + public Criteria andTransferableNotEqualTo(Boolean value) { + addCriterion("transferable <>", value, "transferable"); + return (Criteria) this; + } + + public Criteria andTransferableGreaterThan(Boolean value) { + addCriterion("transferable >", value, "transferable"); + return (Criteria) this; + } + + public Criteria andTransferableGreaterThanOrEqualTo(Boolean value) { + addCriterion("transferable >=", value, "transferable"); + return (Criteria) this; + } + + public Criteria andTransferableLessThan(Boolean value) { + addCriterion("transferable <", value, "transferable"); + return (Criteria) this; + } + + public Criteria andTransferableLessThanOrEqualTo(Boolean value) { + addCriterion("transferable <=", value, "transferable"); + return (Criteria) this; + } + + public Criteria andTransferableIn(List values) { + addCriterion("transferable in", values, "transferable"); + return (Criteria) this; + } + + public Criteria andTransferableNotIn(List values) { + addCriterion("transferable not in", values, "transferable"); + return (Criteria) this; + } + + public Criteria andTransferableBetween(Boolean value1, Boolean value2) { + addCriterion("transferable between", value1, value2, "transferable"); + return (Criteria) this; + } + + public Criteria andTransferableNotBetween(Boolean value1, Boolean value2) { + addCriterion("transferable not between", value1, value2, "transferable"); + return (Criteria) this; + } + + public Criteria andUpReceptionIsNull() { + addCriterion("up_reception is null"); + return (Criteria) this; + } + + public Criteria andUpReceptionIsNotNull() { + addCriterion("up_reception is not null"); + return (Criteria) this; + } + + public Criteria andUpReceptionEqualTo(Integer value) { + addCriterion("up_reception =", value, "upReception"); + return (Criteria) this; + } + + public Criteria andUpReceptionNotEqualTo(Integer value) { + addCriterion("up_reception <>", value, "upReception"); + return (Criteria) this; + } + + public Criteria andUpReceptionGreaterThan(Integer value) { + addCriterion("up_reception >", value, "upReception"); + return (Criteria) this; + } + + public Criteria andUpReceptionGreaterThanOrEqualTo(Integer value) { + addCriterion("up_reception >=", value, "upReception"); + return (Criteria) this; + } + + public Criteria andUpReceptionLessThan(Integer value) { + addCriterion("up_reception <", value, "upReception"); + return (Criteria) this; + } + + public Criteria andUpReceptionLessThanOrEqualTo(Integer value) { + addCriterion("up_reception <=", value, "upReception"); + return (Criteria) this; + } + + public Criteria andUpReceptionIn(List values) { + addCriterion("up_reception in", values, "upReception"); + return (Criteria) this; + } + + public Criteria andUpReceptionNotIn(List values) { + addCriterion("up_reception not in", values, "upReception"); + return (Criteria) this; + } + + public Criteria andUpReceptionBetween(Integer value1, Integer value2) { + addCriterion("up_reception between", value1, value2, "upReception"); + return (Criteria) this; + } + + public Criteria andUpReceptionNotBetween(Integer value1, Integer value2) { + addCriterion("up_reception not between", value1, value2, "upReception"); + return (Criteria) this; + } + + public Criteria andDownReceptionIsNull() { + addCriterion("down_reception is null"); + return (Criteria) this; + } + + public Criteria andDownReceptionIsNotNull() { + addCriterion("down_reception is not null"); + return (Criteria) this; + } + + public Criteria andDownReceptionEqualTo(Integer value) { + addCriterion("down_reception =", value, "downReception"); + return (Criteria) this; + } + + public Criteria andDownReceptionNotEqualTo(Integer value) { + addCriterion("down_reception <>", value, "downReception"); + return (Criteria) this; + } + + public Criteria andDownReceptionGreaterThan(Integer value) { + addCriterion("down_reception >", value, "downReception"); + return (Criteria) this; + } + + public Criteria andDownReceptionGreaterThanOrEqualTo(Integer value) { + addCriterion("down_reception >=", value, "downReception"); + return (Criteria) this; + } + + public Criteria andDownReceptionLessThan(Integer value) { + addCriterion("down_reception <", value, "downReception"); + return (Criteria) this; + } + + public Criteria andDownReceptionLessThanOrEqualTo(Integer value) { + addCriterion("down_reception <=", value, "downReception"); + return (Criteria) this; + } + + public Criteria andDownReceptionIn(List values) { + addCriterion("down_reception in", values, "downReception"); + return (Criteria) this; + } + + public Criteria andDownReceptionNotIn(List values) { + addCriterion("down_reception not in", values, "downReception"); + return (Criteria) this; + } + + public Criteria andDownReceptionBetween(Integer value1, Integer value2) { + addCriterion("down_reception between", value1, value2, "downReception"); + return (Criteria) this; + } + + public Criteria andDownReceptionNotBetween(Integer value1, Integer value2) { + addCriterion("down_reception not between", value1, value2, "downReception"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SaleGoods.java b/src/main/java/club/joylink/rtss/entity/SaleGoods.java new file mode 100644 index 000000000..10371f783 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SaleGoods.java @@ -0,0 +1,246 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * sale_goods + * @author + */ +public class SaleGoods implements Serializable { + private Long id; + + /** + * 名称 + */ + private String name; + + private Long permissionId; + + /** + * 价格 + */ + private Long price; + + /** + * 状态 + */ + private String status = "1"; + + /** + * 描述 + */ + private String remarks; + + /** + * 是否可以试用:true/false + */ + private Boolean tryUse; + + /** + * 试用时长:0表示永久 + */ + private Integer tryUseTime; + + /** + * 试用时间单位 + */ + private String tryUseTimeUnit; + + /** + * 创建者id + */ + private Long creatorId; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + /** + * 更新人id + */ + private Long updateUserId; + + /** + * 更新时间 + */ + private LocalDateTime updateTime; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Long getPermissionId() { + return permissionId; + } + + public void setPermissionId(Long permissionId) { + this.permissionId = permissionId; + } + + public Long getPrice() { + return price; + } + + public void setPrice(Long price) { + this.price = price; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getRemarks() { + return remarks; + } + + public void setRemarks(String remarks) { + this.remarks = remarks; + } + + public Boolean getTryUse() { + return tryUse; + } + + public void setTryUse(Boolean tryUse) { + this.tryUse = tryUse; + } + + public Integer getTryUseTime() { + return tryUseTime; + } + + public void setTryUseTime(Integer tryUseTime) { + this.tryUseTime = tryUseTime; + } + + public String getTryUseTimeUnit() { + return tryUseTimeUnit; + } + + public void setTryUseTimeUnit(String tryUseTimeUnit) { + this.tryUseTimeUnit = tryUseTimeUnit; + } + + public Long getCreatorId() { + return creatorId; + } + + public void setCreatorId(Long creatorId) { + this.creatorId = creatorId; + } + + public LocalDateTime getCreateTime() { + return createTime; + } + + public void setCreateTime(LocalDateTime createTime) { + this.createTime = createTime; + } + + public Long getUpdateUserId() { + return updateUserId; + } + + public void setUpdateUserId(Long updateUserId) { + this.updateUserId = updateUserId; + } + + public LocalDateTime getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(LocalDateTime updateTime) { + this.updateTime = updateTime; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + SaleGoods other = (SaleGoods) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getPermissionId() == null ? other.getPermissionId() == null : this.getPermissionId().equals(other.getPermissionId())) + && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks())) + && (this.getTryUse() == null ? other.getTryUse() == null : this.getTryUse().equals(other.getTryUse())) + && (this.getTryUseTime() == null ? other.getTryUseTime() == null : this.getTryUseTime().equals(other.getTryUseTime())) + && (this.getTryUseTimeUnit() == null ? other.getTryUseTimeUnit() == null : this.getTryUseTimeUnit().equals(other.getTryUseTimeUnit())) + && (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getUpdateUserId() == null ? other.getUpdateUserId() == null : this.getUpdateUserId().equals(other.getUpdateUserId())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getPermissionId() == null) ? 0 : getPermissionId().hashCode()); + result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode()); + result = prime * result + ((getTryUse() == null) ? 0 : getTryUse().hashCode()); + result = prime * result + ((getTryUseTime() == null) ? 0 : getTryUseTime().hashCode()); + result = prime * result + ((getTryUseTimeUnit() == null) ? 0 : getTryUseTimeUnit().hashCode()); + result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getUpdateUserId() == null) ? 0 : getUpdateUserId().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", name=").append(name); + sb.append(", permissionId=").append(permissionId); + sb.append(", price=").append(price); + sb.append(", status=").append(status); + sb.append(", remarks=").append(remarks); + sb.append(", tryUse=").append(tryUse); + sb.append(", tryUseTime=").append(tryUseTime); + sb.append(", tryUseTimeUnit=").append(tryUseTimeUnit); + sb.append(", creatorId=").append(creatorId); + sb.append(", createTime=").append(createTime); + sb.append(", updateUserId=").append(updateUserId); + sb.append(", updateTime=").append(updateTime); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SaleGoodsExample.java b/src/main/java/club/joylink/rtss/entity/SaleGoodsExample.java new file mode 100644 index 000000000..ceb7ccc69 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SaleGoodsExample.java @@ -0,0 +1,1043 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class SaleGoodsExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public SaleGoodsExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andPermissionIdIsNull() { + addCriterion("permission_id is null"); + return (Criteria) this; + } + + public Criteria andPermissionIdIsNotNull() { + addCriterion("permission_id is not null"); + return (Criteria) this; + } + + public Criteria andPermissionIdEqualTo(Long value) { + addCriterion("permission_id =", value, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdNotEqualTo(Long value) { + addCriterion("permission_id <>", value, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdGreaterThan(Long value) { + addCriterion("permission_id >", value, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdGreaterThanOrEqualTo(Long value) { + addCriterion("permission_id >=", value, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdLessThan(Long value) { + addCriterion("permission_id <", value, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdLessThanOrEqualTo(Long value) { + addCriterion("permission_id <=", value, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdIn(List values) { + addCriterion("permission_id in", values, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdNotIn(List values) { + addCriterion("permission_id not in", values, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdBetween(Long value1, Long value2) { + addCriterion("permission_id between", value1, value2, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdNotBetween(Long value1, Long value2) { + addCriterion("permission_id not between", value1, value2, "permissionId"); + return (Criteria) this; + } + + public Criteria andPriceIsNull() { + addCriterion("price is null"); + return (Criteria) this; + } + + public Criteria andPriceIsNotNull() { + addCriterion("price is not null"); + return (Criteria) this; + } + + public Criteria andPriceEqualTo(Long value) { + addCriterion("price =", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceNotEqualTo(Long value) { + addCriterion("price <>", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceGreaterThan(Long value) { + addCriterion("price >", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceGreaterThanOrEqualTo(Long value) { + addCriterion("price >=", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceLessThan(Long value) { + addCriterion("price <", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceLessThanOrEqualTo(Long value) { + addCriterion("price <=", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceIn(List values) { + addCriterion("price in", values, "price"); + return (Criteria) this; + } + + public Criteria andPriceNotIn(List values) { + addCriterion("price not in", values, "price"); + return (Criteria) this; + } + + public Criteria andPriceBetween(Long value1, Long value2) { + addCriterion("price between", value1, value2, "price"); + return (Criteria) this; + } + + public Criteria andPriceNotBetween(Long value1, Long value2) { + addCriterion("price not between", value1, value2, "price"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andRemarksIsNull() { + addCriterion("remarks is null"); + return (Criteria) this; + } + + public Criteria andRemarksIsNotNull() { + addCriterion("remarks is not null"); + return (Criteria) this; + } + + public Criteria andRemarksEqualTo(String value) { + addCriterion("remarks =", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotEqualTo(String value) { + addCriterion("remarks <>", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksGreaterThan(String value) { + addCriterion("remarks >", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksGreaterThanOrEqualTo(String value) { + addCriterion("remarks >=", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLessThan(String value) { + addCriterion("remarks <", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLessThanOrEqualTo(String value) { + addCriterion("remarks <=", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLike(String value) { + addCriterion("remarks like", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotLike(String value) { + addCriterion("remarks not like", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksIn(List values) { + addCriterion("remarks in", values, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotIn(List values) { + addCriterion("remarks not in", values, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksBetween(String value1, String value2) { + addCriterion("remarks between", value1, value2, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotBetween(String value1, String value2) { + addCriterion("remarks not between", value1, value2, "remarks"); + return (Criteria) this; + } + + public Criteria andTryUseIsNull() { + addCriterion("try_use is null"); + return (Criteria) this; + } + + public Criteria andTryUseIsNotNull() { + addCriterion("try_use is not null"); + return (Criteria) this; + } + + public Criteria andTryUseEqualTo(Boolean value) { + addCriterion("try_use =", value, "tryUse"); + return (Criteria) this; + } + + public Criteria andTryUseNotEqualTo(Boolean value) { + addCriterion("try_use <>", value, "tryUse"); + return (Criteria) this; + } + + public Criteria andTryUseGreaterThan(Boolean value) { + addCriterion("try_use >", value, "tryUse"); + return (Criteria) this; + } + + public Criteria andTryUseGreaterThanOrEqualTo(Boolean value) { + addCriterion("try_use >=", value, "tryUse"); + return (Criteria) this; + } + + public Criteria andTryUseLessThan(Boolean value) { + addCriterion("try_use <", value, "tryUse"); + return (Criteria) this; + } + + public Criteria andTryUseLessThanOrEqualTo(Boolean value) { + addCriterion("try_use <=", value, "tryUse"); + return (Criteria) this; + } + + public Criteria andTryUseIn(List values) { + addCriterion("try_use in", values, "tryUse"); + return (Criteria) this; + } + + public Criteria andTryUseNotIn(List values) { + addCriterion("try_use not in", values, "tryUse"); + return (Criteria) this; + } + + public Criteria andTryUseBetween(Boolean value1, Boolean value2) { + addCriterion("try_use between", value1, value2, "tryUse"); + return (Criteria) this; + } + + public Criteria andTryUseNotBetween(Boolean value1, Boolean value2) { + addCriterion("try_use not between", value1, value2, "tryUse"); + return (Criteria) this; + } + + public Criteria andTryUseTimeIsNull() { + addCriterion("try_use_time is null"); + return (Criteria) this; + } + + public Criteria andTryUseTimeIsNotNull() { + addCriterion("try_use_time is not null"); + return (Criteria) this; + } + + public Criteria andTryUseTimeEqualTo(Integer value) { + addCriterion("try_use_time =", value, "tryUseTime"); + return (Criteria) this; + } + + public Criteria andTryUseTimeNotEqualTo(Integer value) { + addCriterion("try_use_time <>", value, "tryUseTime"); + return (Criteria) this; + } + + public Criteria andTryUseTimeGreaterThan(Integer value) { + addCriterion("try_use_time >", value, "tryUseTime"); + return (Criteria) this; + } + + public Criteria andTryUseTimeGreaterThanOrEqualTo(Integer value) { + addCriterion("try_use_time >=", value, "tryUseTime"); + return (Criteria) this; + } + + public Criteria andTryUseTimeLessThan(Integer value) { + addCriterion("try_use_time <", value, "tryUseTime"); + return (Criteria) this; + } + + public Criteria andTryUseTimeLessThanOrEqualTo(Integer value) { + addCriterion("try_use_time <=", value, "tryUseTime"); + return (Criteria) this; + } + + public Criteria andTryUseTimeIn(List values) { + addCriterion("try_use_time in", values, "tryUseTime"); + return (Criteria) this; + } + + public Criteria andTryUseTimeNotIn(List values) { + addCriterion("try_use_time not in", values, "tryUseTime"); + return (Criteria) this; + } + + public Criteria andTryUseTimeBetween(Integer value1, Integer value2) { + addCriterion("try_use_time between", value1, value2, "tryUseTime"); + return (Criteria) this; + } + + public Criteria andTryUseTimeNotBetween(Integer value1, Integer value2) { + addCriterion("try_use_time not between", value1, value2, "tryUseTime"); + return (Criteria) this; + } + + public Criteria andTryUseTimeUnitIsNull() { + addCriterion("try_use_time_unit is null"); + return (Criteria) this; + } + + public Criteria andTryUseTimeUnitIsNotNull() { + addCriterion("try_use_time_unit is not null"); + return (Criteria) this; + } + + public Criteria andTryUseTimeUnitEqualTo(String value) { + addCriterion("try_use_time_unit =", value, "tryUseTimeUnit"); + return (Criteria) this; + } + + public Criteria andTryUseTimeUnitNotEqualTo(String value) { + addCriterion("try_use_time_unit <>", value, "tryUseTimeUnit"); + return (Criteria) this; + } + + public Criteria andTryUseTimeUnitGreaterThan(String value) { + addCriterion("try_use_time_unit >", value, "tryUseTimeUnit"); + return (Criteria) this; + } + + public Criteria andTryUseTimeUnitGreaterThanOrEqualTo(String value) { + addCriterion("try_use_time_unit >=", value, "tryUseTimeUnit"); + return (Criteria) this; + } + + public Criteria andTryUseTimeUnitLessThan(String value) { + addCriterion("try_use_time_unit <", value, "tryUseTimeUnit"); + return (Criteria) this; + } + + public Criteria andTryUseTimeUnitLessThanOrEqualTo(String value) { + addCriterion("try_use_time_unit <=", value, "tryUseTimeUnit"); + return (Criteria) this; + } + + public Criteria andTryUseTimeUnitLike(String value) { + addCriterion("try_use_time_unit like", value, "tryUseTimeUnit"); + return (Criteria) this; + } + + public Criteria andTryUseTimeUnitNotLike(String value) { + addCriterion("try_use_time_unit not like", value, "tryUseTimeUnit"); + return (Criteria) this; + } + + public Criteria andTryUseTimeUnitIn(List values) { + addCriterion("try_use_time_unit in", values, "tryUseTimeUnit"); + return (Criteria) this; + } + + public Criteria andTryUseTimeUnitNotIn(List values) { + addCriterion("try_use_time_unit not in", values, "tryUseTimeUnit"); + return (Criteria) this; + } + + public Criteria andTryUseTimeUnitBetween(String value1, String value2) { + addCriterion("try_use_time_unit between", value1, value2, "tryUseTimeUnit"); + return (Criteria) this; + } + + public Criteria andTryUseTimeUnitNotBetween(String value1, String value2) { + addCriterion("try_use_time_unit not between", value1, value2, "tryUseTimeUnit"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNull() { + addCriterion("creator_id is null"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNotNull() { + addCriterion("creator_id is not null"); + return (Criteria) this; + } + + public Criteria andCreatorIdEqualTo(Long value) { + addCriterion("creator_id =", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotEqualTo(Long value) { + addCriterion("creator_id <>", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThan(Long value) { + addCriterion("creator_id >", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) { + addCriterion("creator_id >=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThan(Long value) { + addCriterion("creator_id <", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThanOrEqualTo(Long value) { + addCriterion("creator_id <=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdIn(List values) { + addCriterion("creator_id in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotIn(List values) { + addCriterion("creator_id not in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdBetween(Long value1, Long value2) { + addCriterion("creator_id between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotBetween(Long value1, Long value2) { + addCriterion("creator_id not between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(LocalDateTime value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(LocalDateTime value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(LocalDateTime value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(LocalDateTime value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdIsNull() { + addCriterion("update_user_id is null"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdIsNotNull() { + addCriterion("update_user_id is not null"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdEqualTo(Long value) { + addCriterion("update_user_id =", value, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdNotEqualTo(Long value) { + addCriterion("update_user_id <>", value, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdGreaterThan(Long value) { + addCriterion("update_user_id >", value, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("update_user_id >=", value, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdLessThan(Long value) { + addCriterion("update_user_id <", value, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdLessThanOrEqualTo(Long value) { + addCriterion("update_user_id <=", value, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdIn(List values) { + addCriterion("update_user_id in", values, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdNotIn(List values) { + addCriterion("update_user_id not in", values, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdBetween(Long value1, Long value2) { + addCriterion("update_user_id between", value1, value2, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdNotBetween(Long value1, Long value2) { + addCriterion("update_user_id not between", value1, value2, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(LocalDateTime value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(LocalDateTime value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(LocalDateTime value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(LocalDateTime value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SaleOrder.java b/src/main/java/club/joylink/rtss/entity/SaleOrder.java new file mode 100644 index 000000000..08d340a70 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SaleOrder.java @@ -0,0 +1,278 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * sale_order + * @author + */ +public class SaleOrder implements Serializable { + private Long id; + + /** + * 编号 + */ + private String code; + + /** + * 组织/企业id + */ + private Long organizationId; + + /** + * 商品价格 + */ + private Long price; + + /** + * 支付方式:线下/微信/支付宝 + */ + private String payWays; + + /** + * 支付状态 + */ + private String payStatus; + + /** + * 订单状态 + */ + private String status; + + /** + * 合同编号 + */ + private String contractNo; + + /** + * 订单类型(个人/企业合同/合约赠送/内部分配等) + */ + private String orderType; + + /** + * 创建人id + */ + private Long creatorId; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + /** + * 更新人id + */ + private Long updateUserId; + + private LocalDateTime updateTime; + + /** + * 二维码是否已经生成过 + */ + private Boolean qrCodeGenerated; + + /** + * 销售员id + */ + private Long sellerId; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public Long getOrganizationId() { + return organizationId; + } + + public void setOrganizationId(Long organizationId) { + this.organizationId = organizationId; + } + + public Long getPrice() { + return price; + } + + public void setPrice(Long price) { + this.price = price; + } + + public String getPayWays() { + return payWays; + } + + public void setPayWays(String payWays) { + this.payWays = payWays; + } + + public String getPayStatus() { + return payStatus; + } + + public void setPayStatus(String payStatus) { + this.payStatus = payStatus; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getContractNo() { + return contractNo; + } + + public void setContractNo(String contractNo) { + this.contractNo = contractNo; + } + + public String getOrderType() { + return orderType; + } + + public void setOrderType(String orderType) { + this.orderType = orderType; + } + + public Long getCreatorId() { + return creatorId; + } + + public void setCreatorId(Long creatorId) { + this.creatorId = creatorId; + } + + public LocalDateTime getCreateTime() { + return createTime; + } + + public void setCreateTime(LocalDateTime createTime) { + this.createTime = createTime; + } + + public Long getUpdateUserId() { + return updateUserId; + } + + public void setUpdateUserId(Long updateUserId) { + this.updateUserId = updateUserId; + } + + public LocalDateTime getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(LocalDateTime updateTime) { + this.updateTime = updateTime; + } + + public Boolean getQrCodeGenerated() { + return qrCodeGenerated; + } + + public void setQrCodeGenerated(Boolean qrCodeGenerated) { + this.qrCodeGenerated = qrCodeGenerated; + } + + public Long getSellerId() { + return sellerId; + } + + public void setSellerId(Long sellerId) { + this.sellerId = sellerId; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + SaleOrder other = (SaleOrder) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode())) + && (this.getOrganizationId() == null ? other.getOrganizationId() == null : this.getOrganizationId().equals(other.getOrganizationId())) + && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice())) + && (this.getPayWays() == null ? other.getPayWays() == null : this.getPayWays().equals(other.getPayWays())) + && (this.getPayStatus() == null ? other.getPayStatus() == null : this.getPayStatus().equals(other.getPayStatus())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getContractNo() == null ? other.getContractNo() == null : this.getContractNo().equals(other.getContractNo())) + && (this.getOrderType() == null ? other.getOrderType() == null : this.getOrderType().equals(other.getOrderType())) + && (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getUpdateUserId() == null ? other.getUpdateUserId() == null : this.getUpdateUserId().equals(other.getUpdateUserId())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) + && (this.getQrCodeGenerated() == null ? other.getQrCodeGenerated() == null : this.getQrCodeGenerated().equals(other.getQrCodeGenerated())) + && (this.getSellerId() == null ? other.getSellerId() == null : this.getSellerId().equals(other.getSellerId())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode()); + result = prime * result + ((getOrganizationId() == null) ? 0 : getOrganizationId().hashCode()); + result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode()); + result = prime * result + ((getPayWays() == null) ? 0 : getPayWays().hashCode()); + result = prime * result + ((getPayStatus() == null) ? 0 : getPayStatus().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getContractNo() == null) ? 0 : getContractNo().hashCode()); + result = prime * result + ((getOrderType() == null) ? 0 : getOrderType().hashCode()); + result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getUpdateUserId() == null) ? 0 : getUpdateUserId().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + result = prime * result + ((getQrCodeGenerated() == null) ? 0 : getQrCodeGenerated().hashCode()); + result = prime * result + ((getSellerId() == null) ? 0 : getSellerId().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", code=").append(code); + sb.append(", organizationId=").append(organizationId); + sb.append(", price=").append(price); + sb.append(", payWays=").append(payWays); + sb.append(", payStatus=").append(payStatus); + sb.append(", status=").append(status); + sb.append(", contractNo=").append(contractNo); + sb.append(", orderType=").append(orderType); + sb.append(", creatorId=").append(creatorId); + sb.append(", createTime=").append(createTime); + sb.append(", updateUserId=").append(updateUserId); + sb.append(", updateTime=").append(updateTime); + sb.append(", qrCodeGenerated=").append(qrCodeGenerated); + sb.append(", sellerId=").append(sellerId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SaleOrderDetail.java b/src/main/java/club/joylink/rtss/entity/SaleOrderDetail.java new file mode 100644 index 000000000..189c50397 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SaleOrderDetail.java @@ -0,0 +1,169 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * sale_order_detail + * @author + */ +public class SaleOrderDetail implements Serializable { + /** + * 订单明细 + */ + private Long id; + + /** + * 订单主键 + */ + private Long orderId; + + /** + * 商品id + */ + private Long goodsId; + + /** + * 权限个数 + */ + private Integer goodsAmount; + + private LocalDateTime startTime; + + /** + * 是否永久 + */ + private Boolean forever; + + /** + * 权限月数 + */ + private Integer monthAmount; + + /** + * 购买时单价 + */ + private Long price; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getOrderId() { + return orderId; + } + + public void setOrderId(Long orderId) { + this.orderId = orderId; + } + + public Long getGoodsId() { + return goodsId; + } + + public void setGoodsId(Long goodsId) { + this.goodsId = goodsId; + } + + public Integer getGoodsAmount() { + return goodsAmount; + } + + public void setGoodsAmount(Integer goodsAmount) { + this.goodsAmount = goodsAmount; + } + + public LocalDateTime getStartTime() { + return startTime; + } + + public void setStartTime(LocalDateTime startTime) { + this.startTime = startTime; + } + + public Boolean getForever() { + return forever; + } + + public void setForever(Boolean forever) { + this.forever = forever; + } + + public Integer getMonthAmount() { + return monthAmount; + } + + public void setMonthAmount(Integer monthAmount) { + this.monthAmount = monthAmount; + } + + public Long getPrice() { + return price; + } + + public void setPrice(Long price) { + this.price = price; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + SaleOrderDetail other = (SaleOrderDetail) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId())) + && (this.getGoodsId() == null ? other.getGoodsId() == null : this.getGoodsId().equals(other.getGoodsId())) + && (this.getGoodsAmount() == null ? other.getGoodsAmount() == null : this.getGoodsAmount().equals(other.getGoodsAmount())) + && (this.getStartTime() == null ? other.getStartTime() == null : this.getStartTime().equals(other.getStartTime())) + && (this.getForever() == null ? other.getForever() == null : this.getForever().equals(other.getForever())) + && (this.getMonthAmount() == null ? other.getMonthAmount() == null : this.getMonthAmount().equals(other.getMonthAmount())) + && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode()); + result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode()); + result = prime * result + ((getGoodsAmount() == null) ? 0 : getGoodsAmount().hashCode()); + result = prime * result + ((getStartTime() == null) ? 0 : getStartTime().hashCode()); + result = prime * result + ((getForever() == null) ? 0 : getForever().hashCode()); + result = prime * result + ((getMonthAmount() == null) ? 0 : getMonthAmount().hashCode()); + result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", orderId=").append(orderId); + sb.append(", goodsId=").append(goodsId); + sb.append(", goodsAmount=").append(goodsAmount); + sb.append(", startTime=").append(startTime); + sb.append(", forever=").append(forever); + sb.append(", monthAmount=").append(monthAmount); + sb.append(", price=").append(price); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SaleOrderDetailExample.java b/src/main/java/club/joylink/rtss/entity/SaleOrderDetailExample.java new file mode 100644 index 000000000..a80e13b2f --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SaleOrderDetailExample.java @@ -0,0 +1,703 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class SaleOrderDetailExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public SaleOrderDetailExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andOrderIdIsNull() { + addCriterion("order_id is null"); + return (Criteria) this; + } + + public Criteria andOrderIdIsNotNull() { + addCriterion("order_id is not null"); + return (Criteria) this; + } + + public Criteria andOrderIdEqualTo(Long value) { + addCriterion("order_id =", value, "orderId"); + return (Criteria) this; + } + + public Criteria andOrderIdNotEqualTo(Long value) { + addCriterion("order_id <>", value, "orderId"); + return (Criteria) this; + } + + public Criteria andOrderIdGreaterThan(Long value) { + addCriterion("order_id >", value, "orderId"); + return (Criteria) this; + } + + public Criteria andOrderIdGreaterThanOrEqualTo(Long value) { + addCriterion("order_id >=", value, "orderId"); + return (Criteria) this; + } + + public Criteria andOrderIdLessThan(Long value) { + addCriterion("order_id <", value, "orderId"); + return (Criteria) this; + } + + public Criteria andOrderIdLessThanOrEqualTo(Long value) { + addCriterion("order_id <=", value, "orderId"); + return (Criteria) this; + } + + public Criteria andOrderIdIn(List values) { + addCriterion("order_id in", values, "orderId"); + return (Criteria) this; + } + + public Criteria andOrderIdNotIn(List values) { + addCriterion("order_id not in", values, "orderId"); + return (Criteria) this; + } + + public Criteria andOrderIdBetween(Long value1, Long value2) { + addCriterion("order_id between", value1, value2, "orderId"); + return (Criteria) this; + } + + public Criteria andOrderIdNotBetween(Long value1, Long value2) { + addCriterion("order_id not between", value1, value2, "orderId"); + return (Criteria) this; + } + + public Criteria andGoodsIdIsNull() { + addCriterion("goods_id is null"); + return (Criteria) this; + } + + public Criteria andGoodsIdIsNotNull() { + addCriterion("goods_id is not null"); + return (Criteria) this; + } + + public Criteria andGoodsIdEqualTo(Long value) { + addCriterion("goods_id =", value, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdNotEqualTo(Long value) { + addCriterion("goods_id <>", value, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdGreaterThan(Long value) { + addCriterion("goods_id >", value, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdGreaterThanOrEqualTo(Long value) { + addCriterion("goods_id >=", value, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdLessThan(Long value) { + addCriterion("goods_id <", value, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdLessThanOrEqualTo(Long value) { + addCriterion("goods_id <=", value, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdIn(List values) { + addCriterion("goods_id in", values, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdNotIn(List values) { + addCriterion("goods_id not in", values, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdBetween(Long value1, Long value2) { + addCriterion("goods_id between", value1, value2, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdNotBetween(Long value1, Long value2) { + addCriterion("goods_id not between", value1, value2, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsAmountIsNull() { + addCriterion("goods_amount is null"); + return (Criteria) this; + } + + public Criteria andGoodsAmountIsNotNull() { + addCriterion("goods_amount is not null"); + return (Criteria) this; + } + + public Criteria andGoodsAmountEqualTo(Integer value) { + addCriterion("goods_amount =", value, "goodsAmount"); + return (Criteria) this; + } + + public Criteria andGoodsAmountNotEqualTo(Integer value) { + addCriterion("goods_amount <>", value, "goodsAmount"); + return (Criteria) this; + } + + public Criteria andGoodsAmountGreaterThan(Integer value) { + addCriterion("goods_amount >", value, "goodsAmount"); + return (Criteria) this; + } + + public Criteria andGoodsAmountGreaterThanOrEqualTo(Integer value) { + addCriterion("goods_amount >=", value, "goodsAmount"); + return (Criteria) this; + } + + public Criteria andGoodsAmountLessThan(Integer value) { + addCriterion("goods_amount <", value, "goodsAmount"); + return (Criteria) this; + } + + public Criteria andGoodsAmountLessThanOrEqualTo(Integer value) { + addCriterion("goods_amount <=", value, "goodsAmount"); + return (Criteria) this; + } + + public Criteria andGoodsAmountIn(List values) { + addCriterion("goods_amount in", values, "goodsAmount"); + return (Criteria) this; + } + + public Criteria andGoodsAmountNotIn(List values) { + addCriterion("goods_amount not in", values, "goodsAmount"); + return (Criteria) this; + } + + public Criteria andGoodsAmountBetween(Integer value1, Integer value2) { + addCriterion("goods_amount between", value1, value2, "goodsAmount"); + return (Criteria) this; + } + + public Criteria andGoodsAmountNotBetween(Integer value1, Integer value2) { + addCriterion("goods_amount not between", value1, value2, "goodsAmount"); + return (Criteria) this; + } + + public Criteria andStartTimeIsNull() { + addCriterion("start_time is null"); + return (Criteria) this; + } + + public Criteria andStartTimeIsNotNull() { + addCriterion("start_time is not null"); + return (Criteria) this; + } + + public Criteria andStartTimeEqualTo(LocalDateTime value) { + addCriterion("start_time =", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotEqualTo(LocalDateTime value) { + addCriterion("start_time <>", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeGreaterThan(LocalDateTime value) { + addCriterion("start_time >", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("start_time >=", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeLessThan(LocalDateTime value) { + addCriterion("start_time <", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("start_time <=", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeIn(List values) { + addCriterion("start_time in", values, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotIn(List values) { + addCriterion("start_time not in", values, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("start_time between", value1, value2, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("start_time not between", value1, value2, "startTime"); + return (Criteria) this; + } + + public Criteria andForeverIsNull() { + addCriterion("forever is null"); + return (Criteria) this; + } + + public Criteria andForeverIsNotNull() { + addCriterion("forever is not null"); + return (Criteria) this; + } + + public Criteria andForeverEqualTo(Boolean value) { + addCriterion("forever =", value, "forever"); + return (Criteria) this; + } + + public Criteria andForeverNotEqualTo(Boolean value) { + addCriterion("forever <>", value, "forever"); + return (Criteria) this; + } + + public Criteria andForeverGreaterThan(Boolean value) { + addCriterion("forever >", value, "forever"); + return (Criteria) this; + } + + public Criteria andForeverGreaterThanOrEqualTo(Boolean value) { + addCriterion("forever >=", value, "forever"); + return (Criteria) this; + } + + public Criteria andForeverLessThan(Boolean value) { + addCriterion("forever <", value, "forever"); + return (Criteria) this; + } + + public Criteria andForeverLessThanOrEqualTo(Boolean value) { + addCriterion("forever <=", value, "forever"); + return (Criteria) this; + } + + public Criteria andForeverIn(List values) { + addCriterion("forever in", values, "forever"); + return (Criteria) this; + } + + public Criteria andForeverNotIn(List values) { + addCriterion("forever not in", values, "forever"); + return (Criteria) this; + } + + public Criteria andForeverBetween(Boolean value1, Boolean value2) { + addCriterion("forever between", value1, value2, "forever"); + return (Criteria) this; + } + + public Criteria andForeverNotBetween(Boolean value1, Boolean value2) { + addCriterion("forever not between", value1, value2, "forever"); + return (Criteria) this; + } + + public Criteria andMonthAmountIsNull() { + addCriterion("month_amount is null"); + return (Criteria) this; + } + + public Criteria andMonthAmountIsNotNull() { + addCriterion("month_amount is not null"); + return (Criteria) this; + } + + public Criteria andMonthAmountEqualTo(Integer value) { + addCriterion("month_amount =", value, "monthAmount"); + return (Criteria) this; + } + + public Criteria andMonthAmountNotEqualTo(Integer value) { + addCriterion("month_amount <>", value, "monthAmount"); + return (Criteria) this; + } + + public Criteria andMonthAmountGreaterThan(Integer value) { + addCriterion("month_amount >", value, "monthAmount"); + return (Criteria) this; + } + + public Criteria andMonthAmountGreaterThanOrEqualTo(Integer value) { + addCriterion("month_amount >=", value, "monthAmount"); + return (Criteria) this; + } + + public Criteria andMonthAmountLessThan(Integer value) { + addCriterion("month_amount <", value, "monthAmount"); + return (Criteria) this; + } + + public Criteria andMonthAmountLessThanOrEqualTo(Integer value) { + addCriterion("month_amount <=", value, "monthAmount"); + return (Criteria) this; + } + + public Criteria andMonthAmountIn(List values) { + addCriterion("month_amount in", values, "monthAmount"); + return (Criteria) this; + } + + public Criteria andMonthAmountNotIn(List values) { + addCriterion("month_amount not in", values, "monthAmount"); + return (Criteria) this; + } + + public Criteria andMonthAmountBetween(Integer value1, Integer value2) { + addCriterion("month_amount between", value1, value2, "monthAmount"); + return (Criteria) this; + } + + public Criteria andMonthAmountNotBetween(Integer value1, Integer value2) { + addCriterion("month_amount not between", value1, value2, "monthAmount"); + return (Criteria) this; + } + + public Criteria andPriceIsNull() { + addCriterion("price is null"); + return (Criteria) this; + } + + public Criteria andPriceIsNotNull() { + addCriterion("price is not null"); + return (Criteria) this; + } + + public Criteria andPriceEqualTo(Long value) { + addCriterion("price =", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceNotEqualTo(Long value) { + addCriterion("price <>", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceGreaterThan(Long value) { + addCriterion("price >", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceGreaterThanOrEqualTo(Long value) { + addCriterion("price >=", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceLessThan(Long value) { + addCriterion("price <", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceLessThanOrEqualTo(Long value) { + addCriterion("price <=", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceIn(List values) { + addCriterion("price in", values, "price"); + return (Criteria) this; + } + + public Criteria andPriceNotIn(List values) { + addCriterion("price not in", values, "price"); + return (Criteria) this; + } + + public Criteria andPriceBetween(Long value1, Long value2) { + addCriterion("price between", value1, value2, "price"); + return (Criteria) this; + } + + public Criteria andPriceNotBetween(Long value1, Long value2) { + addCriterion("price not between", value1, value2, "price"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SaleOrderExample.java b/src/main/java/club/joylink/rtss/entity/SaleOrderExample.java new file mode 100644 index 000000000..030e688d2 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SaleOrderExample.java @@ -0,0 +1,1183 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class SaleOrderExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public SaleOrderExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCodeIsNull() { + addCriterion("code is null"); + return (Criteria) this; + } + + public Criteria andCodeIsNotNull() { + addCriterion("code is not null"); + return (Criteria) this; + } + + public Criteria andCodeEqualTo(String value) { + addCriterion("code =", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotEqualTo(String value) { + addCriterion("code <>", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThan(String value) { + addCriterion("code >", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThanOrEqualTo(String value) { + addCriterion("code >=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThan(String value) { + addCriterion("code <", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThanOrEqualTo(String value) { + addCriterion("code <=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLike(String value) { + addCriterion("code like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotLike(String value) { + addCriterion("code not like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeIn(List values) { + addCriterion("code in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotIn(List values) { + addCriterion("code not in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeBetween(String value1, String value2) { + addCriterion("code between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotBetween(String value1, String value2) { + addCriterion("code not between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andOrganizationIdIsNull() { + addCriterion("organization_id is null"); + return (Criteria) this; + } + + public Criteria andOrganizationIdIsNotNull() { + addCriterion("organization_id is not null"); + return (Criteria) this; + } + + public Criteria andOrganizationIdEqualTo(Long value) { + addCriterion("organization_id =", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdNotEqualTo(Long value) { + addCriterion("organization_id <>", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdGreaterThan(Long value) { + addCriterion("organization_id >", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdGreaterThanOrEqualTo(Long value) { + addCriterion("organization_id >=", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdLessThan(Long value) { + addCriterion("organization_id <", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdLessThanOrEqualTo(Long value) { + addCriterion("organization_id <=", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdIn(List values) { + addCriterion("organization_id in", values, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdNotIn(List values) { + addCriterion("organization_id not in", values, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdBetween(Long value1, Long value2) { + addCriterion("organization_id between", value1, value2, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdNotBetween(Long value1, Long value2) { + addCriterion("organization_id not between", value1, value2, "organizationId"); + return (Criteria) this; + } + + public Criteria andPriceIsNull() { + addCriterion("price is null"); + return (Criteria) this; + } + + public Criteria andPriceIsNotNull() { + addCriterion("price is not null"); + return (Criteria) this; + } + + public Criteria andPriceEqualTo(Long value) { + addCriterion("price =", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceNotEqualTo(Long value) { + addCriterion("price <>", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceGreaterThan(Long value) { + addCriterion("price >", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceGreaterThanOrEqualTo(Long value) { + addCriterion("price >=", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceLessThan(Long value) { + addCriterion("price <", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceLessThanOrEqualTo(Long value) { + addCriterion("price <=", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceIn(List values) { + addCriterion("price in", values, "price"); + return (Criteria) this; + } + + public Criteria andPriceNotIn(List values) { + addCriterion("price not in", values, "price"); + return (Criteria) this; + } + + public Criteria andPriceBetween(Long value1, Long value2) { + addCriterion("price between", value1, value2, "price"); + return (Criteria) this; + } + + public Criteria andPriceNotBetween(Long value1, Long value2) { + addCriterion("price not between", value1, value2, "price"); + return (Criteria) this; + } + + public Criteria andPayWaysIsNull() { + addCriterion("pay_ways is null"); + return (Criteria) this; + } + + public Criteria andPayWaysIsNotNull() { + addCriterion("pay_ways is not null"); + return (Criteria) this; + } + + public Criteria andPayWaysEqualTo(String value) { + addCriterion("pay_ways =", value, "payWays"); + return (Criteria) this; + } + + public Criteria andPayWaysNotEqualTo(String value) { + addCriterion("pay_ways <>", value, "payWays"); + return (Criteria) this; + } + + public Criteria andPayWaysGreaterThan(String value) { + addCriterion("pay_ways >", value, "payWays"); + return (Criteria) this; + } + + public Criteria andPayWaysGreaterThanOrEqualTo(String value) { + addCriterion("pay_ways >=", value, "payWays"); + return (Criteria) this; + } + + public Criteria andPayWaysLessThan(String value) { + addCriterion("pay_ways <", value, "payWays"); + return (Criteria) this; + } + + public Criteria andPayWaysLessThanOrEqualTo(String value) { + addCriterion("pay_ways <=", value, "payWays"); + return (Criteria) this; + } + + public Criteria andPayWaysLike(String value) { + addCriterion("pay_ways like", value, "payWays"); + return (Criteria) this; + } + + public Criteria andPayWaysNotLike(String value) { + addCriterion("pay_ways not like", value, "payWays"); + return (Criteria) this; + } + + public Criteria andPayWaysIn(List values) { + addCriterion("pay_ways in", values, "payWays"); + return (Criteria) this; + } + + public Criteria andPayWaysNotIn(List values) { + addCriterion("pay_ways not in", values, "payWays"); + return (Criteria) this; + } + + public Criteria andPayWaysBetween(String value1, String value2) { + addCriterion("pay_ways between", value1, value2, "payWays"); + return (Criteria) this; + } + + public Criteria andPayWaysNotBetween(String value1, String value2) { + addCriterion("pay_ways not between", value1, value2, "payWays"); + return (Criteria) this; + } + + public Criteria andPayStatusIsNull() { + addCriterion("pay_status is null"); + return (Criteria) this; + } + + public Criteria andPayStatusIsNotNull() { + addCriterion("pay_status is not null"); + return (Criteria) this; + } + + public Criteria andPayStatusEqualTo(String value) { + addCriterion("pay_status =", value, "payStatus"); + return (Criteria) this; + } + + public Criteria andPayStatusNotEqualTo(String value) { + addCriterion("pay_status <>", value, "payStatus"); + return (Criteria) this; + } + + public Criteria andPayStatusGreaterThan(String value) { + addCriterion("pay_status >", value, "payStatus"); + return (Criteria) this; + } + + public Criteria andPayStatusGreaterThanOrEqualTo(String value) { + addCriterion("pay_status >=", value, "payStatus"); + return (Criteria) this; + } + + public Criteria andPayStatusLessThan(String value) { + addCriterion("pay_status <", value, "payStatus"); + return (Criteria) this; + } + + public Criteria andPayStatusLessThanOrEqualTo(String value) { + addCriterion("pay_status <=", value, "payStatus"); + return (Criteria) this; + } + + public Criteria andPayStatusLike(String value) { + addCriterion("pay_status like", value, "payStatus"); + return (Criteria) this; + } + + public Criteria andPayStatusNotLike(String value) { + addCriterion("pay_status not like", value, "payStatus"); + return (Criteria) this; + } + + public Criteria andPayStatusIn(List values) { + addCriterion("pay_status in", values, "payStatus"); + return (Criteria) this; + } + + public Criteria andPayStatusNotIn(List values) { + addCriterion("pay_status not in", values, "payStatus"); + return (Criteria) this; + } + + public Criteria andPayStatusBetween(String value1, String value2) { + addCriterion("pay_status between", value1, value2, "payStatus"); + return (Criteria) this; + } + + public Criteria andPayStatusNotBetween(String value1, String value2) { + addCriterion("pay_status not between", value1, value2, "payStatus"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andContractNoIsNull() { + addCriterion("contract_no is null"); + return (Criteria) this; + } + + public Criteria andContractNoIsNotNull() { + addCriterion("contract_no is not null"); + return (Criteria) this; + } + + public Criteria andContractNoEqualTo(String value) { + addCriterion("contract_no =", value, "contractNo"); + return (Criteria) this; + } + + public Criteria andContractNoNotEqualTo(String value) { + addCriterion("contract_no <>", value, "contractNo"); + return (Criteria) this; + } + + public Criteria andContractNoGreaterThan(String value) { + addCriterion("contract_no >", value, "contractNo"); + return (Criteria) this; + } + + public Criteria andContractNoGreaterThanOrEqualTo(String value) { + addCriterion("contract_no >=", value, "contractNo"); + return (Criteria) this; + } + + public Criteria andContractNoLessThan(String value) { + addCriterion("contract_no <", value, "contractNo"); + return (Criteria) this; + } + + public Criteria andContractNoLessThanOrEqualTo(String value) { + addCriterion("contract_no <=", value, "contractNo"); + return (Criteria) this; + } + + public Criteria andContractNoLike(String value) { + addCriterion("contract_no like", value, "contractNo"); + return (Criteria) this; + } + + public Criteria andContractNoNotLike(String value) { + addCriterion("contract_no not like", value, "contractNo"); + return (Criteria) this; + } + + public Criteria andContractNoIn(List values) { + addCriterion("contract_no in", values, "contractNo"); + return (Criteria) this; + } + + public Criteria andContractNoNotIn(List values) { + addCriterion("contract_no not in", values, "contractNo"); + return (Criteria) this; + } + + public Criteria andContractNoBetween(String value1, String value2) { + addCriterion("contract_no between", value1, value2, "contractNo"); + return (Criteria) this; + } + + public Criteria andContractNoNotBetween(String value1, String value2) { + addCriterion("contract_no not between", value1, value2, "contractNo"); + return (Criteria) this; + } + + public Criteria andOrderTypeIsNull() { + addCriterion("order_type is null"); + return (Criteria) this; + } + + public Criteria andOrderTypeIsNotNull() { + addCriterion("order_type is not null"); + return (Criteria) this; + } + + public Criteria andOrderTypeEqualTo(String value) { + addCriterion("order_type =", value, "orderType"); + return (Criteria) this; + } + + public Criteria andOrderTypeNotEqualTo(String value) { + addCriterion("order_type <>", value, "orderType"); + return (Criteria) this; + } + + public Criteria andOrderTypeGreaterThan(String value) { + addCriterion("order_type >", value, "orderType"); + return (Criteria) this; + } + + public Criteria andOrderTypeGreaterThanOrEqualTo(String value) { + addCriterion("order_type >=", value, "orderType"); + return (Criteria) this; + } + + public Criteria andOrderTypeLessThan(String value) { + addCriterion("order_type <", value, "orderType"); + return (Criteria) this; + } + + public Criteria andOrderTypeLessThanOrEqualTo(String value) { + addCriterion("order_type <=", value, "orderType"); + return (Criteria) this; + } + + public Criteria andOrderTypeLike(String value) { + addCriterion("order_type like", value, "orderType"); + return (Criteria) this; + } + + public Criteria andOrderTypeNotLike(String value) { + addCriterion("order_type not like", value, "orderType"); + return (Criteria) this; + } + + public Criteria andOrderTypeIn(List values) { + addCriterion("order_type in", values, "orderType"); + return (Criteria) this; + } + + public Criteria andOrderTypeNotIn(List values) { + addCriterion("order_type not in", values, "orderType"); + return (Criteria) this; + } + + public Criteria andOrderTypeBetween(String value1, String value2) { + addCriterion("order_type between", value1, value2, "orderType"); + return (Criteria) this; + } + + public Criteria andOrderTypeNotBetween(String value1, String value2) { + addCriterion("order_type not between", value1, value2, "orderType"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNull() { + addCriterion("creator_id is null"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNotNull() { + addCriterion("creator_id is not null"); + return (Criteria) this; + } + + public Criteria andCreatorIdEqualTo(Long value) { + addCriterion("creator_id =", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotEqualTo(Long value) { + addCriterion("creator_id <>", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThan(Long value) { + addCriterion("creator_id >", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) { + addCriterion("creator_id >=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThan(Long value) { + addCriterion("creator_id <", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThanOrEqualTo(Long value) { + addCriterion("creator_id <=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdIn(List values) { + addCriterion("creator_id in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotIn(List values) { + addCriterion("creator_id not in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdBetween(Long value1, Long value2) { + addCriterion("creator_id between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotBetween(Long value1, Long value2) { + addCriterion("creator_id not between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(LocalDateTime value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(LocalDateTime value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(LocalDateTime value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(LocalDateTime value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdIsNull() { + addCriterion("update_user_id is null"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdIsNotNull() { + addCriterion("update_user_id is not null"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdEqualTo(Long value) { + addCriterion("update_user_id =", value, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdNotEqualTo(Long value) { + addCriterion("update_user_id <>", value, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdGreaterThan(Long value) { + addCriterion("update_user_id >", value, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("update_user_id >=", value, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdLessThan(Long value) { + addCriterion("update_user_id <", value, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdLessThanOrEqualTo(Long value) { + addCriterion("update_user_id <=", value, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdIn(List values) { + addCriterion("update_user_id in", values, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdNotIn(List values) { + addCriterion("update_user_id not in", values, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdBetween(Long value1, Long value2) { + addCriterion("update_user_id between", value1, value2, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdNotBetween(Long value1, Long value2) { + addCriterion("update_user_id not between", value1, value2, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(LocalDateTime value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(LocalDateTime value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(LocalDateTime value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(LocalDateTime value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andQrCodeGeneratedIsNull() { + addCriterion("qr_code_generated is null"); + return (Criteria) this; + } + + public Criteria andQrCodeGeneratedIsNotNull() { + addCriterion("qr_code_generated is not null"); + return (Criteria) this; + } + + public Criteria andQrCodeGeneratedEqualTo(Boolean value) { + addCriterion("qr_code_generated =", value, "qrCodeGenerated"); + return (Criteria) this; + } + + public Criteria andQrCodeGeneratedNotEqualTo(Boolean value) { + addCriterion("qr_code_generated <>", value, "qrCodeGenerated"); + return (Criteria) this; + } + + public Criteria andQrCodeGeneratedGreaterThan(Boolean value) { + addCriterion("qr_code_generated >", value, "qrCodeGenerated"); + return (Criteria) this; + } + + public Criteria andQrCodeGeneratedGreaterThanOrEqualTo(Boolean value) { + addCriterion("qr_code_generated >=", value, "qrCodeGenerated"); + return (Criteria) this; + } + + public Criteria andQrCodeGeneratedLessThan(Boolean value) { + addCriterion("qr_code_generated <", value, "qrCodeGenerated"); + return (Criteria) this; + } + + public Criteria andQrCodeGeneratedLessThanOrEqualTo(Boolean value) { + addCriterion("qr_code_generated <=", value, "qrCodeGenerated"); + return (Criteria) this; + } + + public Criteria andQrCodeGeneratedIn(List values) { + addCriterion("qr_code_generated in", values, "qrCodeGenerated"); + return (Criteria) this; + } + + public Criteria andQrCodeGeneratedNotIn(List values) { + addCriterion("qr_code_generated not in", values, "qrCodeGenerated"); + return (Criteria) this; + } + + public Criteria andQrCodeGeneratedBetween(Boolean value1, Boolean value2) { + addCriterion("qr_code_generated between", value1, value2, "qrCodeGenerated"); + return (Criteria) this; + } + + public Criteria andQrCodeGeneratedNotBetween(Boolean value1, Boolean value2) { + addCriterion("qr_code_generated not between", value1, value2, "qrCodeGenerated"); + return (Criteria) this; + } + + public Criteria andSellerIdIsNull() { + addCriterion("seller_id is null"); + return (Criteria) this; + } + + public Criteria andSellerIdIsNotNull() { + addCriterion("seller_id is not null"); + return (Criteria) this; + } + + public Criteria andSellerIdEqualTo(Long value) { + addCriterion("seller_id =", value, "sellerId"); + return (Criteria) this; + } + + public Criteria andSellerIdNotEqualTo(Long value) { + addCriterion("seller_id <>", value, "sellerId"); + return (Criteria) this; + } + + public Criteria andSellerIdGreaterThan(Long value) { + addCriterion("seller_id >", value, "sellerId"); + return (Criteria) this; + } + + public Criteria andSellerIdGreaterThanOrEqualTo(Long value) { + addCriterion("seller_id >=", value, "sellerId"); + return (Criteria) this; + } + + public Criteria andSellerIdLessThan(Long value) { + addCriterion("seller_id <", value, "sellerId"); + return (Criteria) this; + } + + public Criteria andSellerIdLessThanOrEqualTo(Long value) { + addCriterion("seller_id <=", value, "sellerId"); + return (Criteria) this; + } + + public Criteria andSellerIdIn(List values) { + addCriterion("seller_id in", values, "sellerId"); + return (Criteria) this; + } + + public Criteria andSellerIdNotIn(List values) { + addCriterion("seller_id not in", values, "sellerId"); + return (Criteria) this; + } + + public Criteria andSellerIdBetween(Long value1, Long value2) { + addCriterion("seller_id between", value1, value2, "sellerId"); + return (Criteria) this; + } + + public Criteria andSellerIdNotBetween(Long value1, Long value2) { + addCriterion("seller_id not between", value1, value2, "sellerId"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SaleOrderSerialNum.java b/src/main/java/club/joylink/rtss/entity/SaleOrderSerialNum.java new file mode 100644 index 000000000..ae90721ea --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SaleOrderSerialNum.java @@ -0,0 +1,89 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDate; + +/** + * sale_order_serial_num + * @author + */ +public class SaleOrderSerialNum implements Serializable { + private Long id; + + /** + * 日期 + */ + private LocalDate date; + + /** + * 序列号 + */ + private Integer no; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public LocalDate getDate() { + return date; + } + + public void setDate(LocalDate date) { + this.date = date; + } + + public Integer getNo() { + return no; + } + + public void setNo(Integer no) { + this.no = no; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + SaleOrderSerialNum other = (SaleOrderSerialNum) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getDate() == null ? other.getDate() == null : this.getDate().equals(other.getDate())) + && (this.getNo() == null ? other.getNo() == null : this.getNo().equals(other.getNo())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getDate() == null) ? 0 : getDate().hashCode()); + result = prime * result + ((getNo() == null) ? 0 : getNo().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", date=").append(date); + sb.append(", no=").append(no); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SaleOrderSerialNumExample.java b/src/main/java/club/joylink/rtss/entity/SaleOrderSerialNumExample.java new file mode 100644 index 000000000..c0f6631a6 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SaleOrderSerialNumExample.java @@ -0,0 +1,403 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDate; +import java.util.ArrayList; +import java.util.List; + +public class SaleOrderSerialNumExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public SaleOrderSerialNumExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andDateIsNull() { + addCriterion("`date` is null"); + return (Criteria) this; + } + + public Criteria andDateIsNotNull() { + addCriterion("`date` is not null"); + return (Criteria) this; + } + + public Criteria andDateEqualTo(LocalDate value) { + addCriterion("`date` =", value, "date"); + return (Criteria) this; + } + + public Criteria andDateNotEqualTo(LocalDate value) { + addCriterion("`date` <>", value, "date"); + return (Criteria) this; + } + + public Criteria andDateGreaterThan(LocalDate value) { + addCriterion("`date` >", value, "date"); + return (Criteria) this; + } + + public Criteria andDateGreaterThanOrEqualTo(LocalDate value) { + addCriterion("`date` >=", value, "date"); + return (Criteria) this; + } + + public Criteria andDateLessThan(LocalDate value) { + addCriterion("`date` <", value, "date"); + return (Criteria) this; + } + + public Criteria andDateLessThanOrEqualTo(LocalDate value) { + addCriterion("`date` <=", value, "date"); + return (Criteria) this; + } + + public Criteria andDateIn(List values) { + addCriterion("`date` in", values, "date"); + return (Criteria) this; + } + + public Criteria andDateNotIn(List values) { + addCriterion("`date` not in", values, "date"); + return (Criteria) this; + } + + public Criteria andDateBetween(LocalDate value1, LocalDate value2) { + addCriterion("`date` between", value1, value2, "date"); + return (Criteria) this; + } + + public Criteria andDateNotBetween(LocalDate value1, LocalDate value2) { + addCriterion("`date` not between", value1, value2, "date"); + return (Criteria) this; + } + + public Criteria andNoIsNull() { + addCriterion("`no` is null"); + return (Criteria) this; + } + + public Criteria andNoIsNotNull() { + addCriterion("`no` is not null"); + return (Criteria) this; + } + + public Criteria andNoEqualTo(Integer value) { + addCriterion("`no` =", value, "no"); + return (Criteria) this; + } + + public Criteria andNoNotEqualTo(Integer value) { + addCriterion("`no` <>", value, "no"); + return (Criteria) this; + } + + public Criteria andNoGreaterThan(Integer value) { + addCriterion("`no` >", value, "no"); + return (Criteria) this; + } + + public Criteria andNoGreaterThanOrEqualTo(Integer value) { + addCriterion("`no` >=", value, "no"); + return (Criteria) this; + } + + public Criteria andNoLessThan(Integer value) { + addCriterion("`no` <", value, "no"); + return (Criteria) this; + } + + public Criteria andNoLessThanOrEqualTo(Integer value) { + addCriterion("`no` <=", value, "no"); + return (Criteria) this; + } + + public Criteria andNoIn(List values) { + addCriterion("`no` in", values, "no"); + return (Criteria) this; + } + + public Criteria andNoNotIn(List values) { + addCriterion("`no` not in", values, "no"); + return (Criteria) this; + } + + public Criteria andNoBetween(Integer value1, Integer value2) { + addCriterion("`no` between", value1, value2, "no"); + return (Criteria) this; + } + + public Criteria andNoNotBetween(Integer value1, Integer value2) { + addCriterion("`no` not between", value1, value2, "no"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SchedulingPlan.java b/src/main/java/club/joylink/rtss/entity/SchedulingPlan.java new file mode 100644 index 000000000..b78d70dee --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SchedulingPlan.java @@ -0,0 +1,154 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDate; +import java.time.LocalDateTime; + +/** + * scheduling_plan + * @author + */ +public class SchedulingPlan implements Serializable { + private Long id; + + /** + * 所属地图id + */ + private Long mapId; + + /** + * 计划日期 + */ + private LocalDate planDate; + + /** + * 关联的每日运行图id + */ + private Long runPlanId; + + /** + * 所属用户id + */ + private Long userId; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + /** + * 计划详细数据 + */ + private String plansJson; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getMapId() { + return mapId; + } + + public void setMapId(Long mapId) { + this.mapId = mapId; + } + + public LocalDate getPlanDate() { + return planDate; + } + + public void setPlanDate(LocalDate planDate) { + this.planDate = planDate; + } + + public Long getRunPlanId() { + return runPlanId; + } + + public void setRunPlanId(Long runPlanId) { + this.runPlanId = runPlanId; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public LocalDateTime getCreateTime() { + return createTime; + } + + public void setCreateTime(LocalDateTime createTime) { + this.createTime = createTime; + } + + public String getPlansJson() { + return plansJson; + } + + public void setPlansJson(String plansJson) { + this.plansJson = plansJson; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + SchedulingPlan other = (SchedulingPlan) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getPlanDate() == null ? other.getPlanDate() == null : this.getPlanDate().equals(other.getPlanDate())) + && (this.getRunPlanId() == null ? other.getRunPlanId() == null : this.getRunPlanId().equals(other.getRunPlanId())) + && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getPlansJson() == null ? other.getPlansJson() == null : this.getPlansJson().equals(other.getPlansJson())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getPlanDate() == null) ? 0 : getPlanDate().hashCode()); + result = prime * result + ((getRunPlanId() == null) ? 0 : getRunPlanId().hashCode()); + result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getPlansJson() == null) ? 0 : getPlansJson().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", mapId=").append(mapId); + sb.append(", planDate=").append(planDate); + sb.append(", runPlanId=").append(runPlanId); + sb.append(", userId=").append(userId); + sb.append(", createTime=").append(createTime); + sb.append(", plansJson=").append(plansJson); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SchedulingPlanExample.java b/src/main/java/club/joylink/rtss/entity/SchedulingPlanExample.java new file mode 100644 index 000000000..a85049598 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SchedulingPlanExample.java @@ -0,0 +1,584 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class SchedulingPlanExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public SchedulingPlanExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andPlanDateIsNull() { + addCriterion("plan_date is null"); + return (Criteria) this; + } + + public Criteria andPlanDateIsNotNull() { + addCriterion("plan_date is not null"); + return (Criteria) this; + } + + public Criteria andPlanDateEqualTo(LocalDate value) { + addCriterion("plan_date =", value, "planDate"); + return (Criteria) this; + } + + public Criteria andPlanDateNotEqualTo(LocalDate value) { + addCriterion("plan_date <>", value, "planDate"); + return (Criteria) this; + } + + public Criteria andPlanDateGreaterThan(LocalDate value) { + addCriterion("plan_date >", value, "planDate"); + return (Criteria) this; + } + + public Criteria andPlanDateGreaterThanOrEqualTo(LocalDate value) { + addCriterion("plan_date >=", value, "planDate"); + return (Criteria) this; + } + + public Criteria andPlanDateLessThan(LocalDate value) { + addCriterion("plan_date <", value, "planDate"); + return (Criteria) this; + } + + public Criteria andPlanDateLessThanOrEqualTo(LocalDate value) { + addCriterion("plan_date <=", value, "planDate"); + return (Criteria) this; + } + + public Criteria andPlanDateIn(List values) { + addCriterion("plan_date in", values, "planDate"); + return (Criteria) this; + } + + public Criteria andPlanDateNotIn(List values) { + addCriterion("plan_date not in", values, "planDate"); + return (Criteria) this; + } + + public Criteria andPlanDateBetween(LocalDate value1, LocalDate value2) { + addCriterion("plan_date between", value1, value2, "planDate"); + return (Criteria) this; + } + + public Criteria andPlanDateNotBetween(LocalDate value1, LocalDate value2) { + addCriterion("plan_date not between", value1, value2, "planDate"); + return (Criteria) this; + } + + public Criteria andRunPlanIdIsNull() { + addCriterion("run_plan_id is null"); + return (Criteria) this; + } + + public Criteria andRunPlanIdIsNotNull() { + addCriterion("run_plan_id is not null"); + return (Criteria) this; + } + + public Criteria andRunPlanIdEqualTo(Long value) { + addCriterion("run_plan_id =", value, "runPlanId"); + return (Criteria) this; + } + + public Criteria andRunPlanIdNotEqualTo(Long value) { + addCriterion("run_plan_id <>", value, "runPlanId"); + return (Criteria) this; + } + + public Criteria andRunPlanIdGreaterThan(Long value) { + addCriterion("run_plan_id >", value, "runPlanId"); + return (Criteria) this; + } + + public Criteria andRunPlanIdGreaterThanOrEqualTo(Long value) { + addCriterion("run_plan_id >=", value, "runPlanId"); + return (Criteria) this; + } + + public Criteria andRunPlanIdLessThan(Long value) { + addCriterion("run_plan_id <", value, "runPlanId"); + return (Criteria) this; + } + + public Criteria andRunPlanIdLessThanOrEqualTo(Long value) { + addCriterion("run_plan_id <=", value, "runPlanId"); + return (Criteria) this; + } + + public Criteria andRunPlanIdIn(List values) { + addCriterion("run_plan_id in", values, "runPlanId"); + return (Criteria) this; + } + + public Criteria andRunPlanIdNotIn(List values) { + addCriterion("run_plan_id not in", values, "runPlanId"); + return (Criteria) this; + } + + public Criteria andRunPlanIdBetween(Long value1, Long value2) { + addCriterion("run_plan_id between", value1, value2, "runPlanId"); + return (Criteria) this; + } + + public Criteria andRunPlanIdNotBetween(Long value1, Long value2) { + addCriterion("run_plan_id not between", value1, value2, "runPlanId"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(LocalDateTime value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(LocalDateTime value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(LocalDateTime value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(LocalDateTime value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/Script.java b/src/main/java/club/joylink/rtss/entity/Script.java new file mode 100644 index 000000000..beed97a98 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/Script.java @@ -0,0 +1,233 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * script + * @author + */ +public class Script implements Serializable { + private Long id; + + /** + * 所属地图id + */ + private Long mapId; + + /** + * 剧本名称 + */ + private String name; + + /** + * 语言类型 + */ + private String lang; + + /** + * 剧本描述 + */ + private String description; + + /** + * 地图定位数据 + */ + private String mapLocationJson; + + /** + * 剧本演出时长小于等于该时长即为满分,单位s + */ + private Integer fullMarksDuration; + + /** + * 及格分时长 + */ + private Integer passingGradeDuration; + + /** + * 零分时长 + */ + private Integer zeroDuration; + + /** + * 状态 + */ + private String status; + + /** + * 创建人id + */ + private Long creatorId; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getMapId() { + return mapId; + } + + public void setMapId(Long mapId) { + this.mapId = mapId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getLang() { + return lang; + } + + public void setLang(String lang) { + this.lang = lang; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getMapLocationJson() { + return mapLocationJson; + } + + public void setMapLocationJson(String mapLocationJson) { + this.mapLocationJson = mapLocationJson; + } + + public Integer getFullMarksDuration() { + return fullMarksDuration; + } + + public void setFullMarksDuration(Integer fullMarksDuration) { + this.fullMarksDuration = fullMarksDuration; + } + + public Integer getPassingGradeDuration() { + return passingGradeDuration; + } + + public void setPassingGradeDuration(Integer passingGradeDuration) { + this.passingGradeDuration = passingGradeDuration; + } + + public Integer getZeroDuration() { + return zeroDuration; + } + + public void setZeroDuration(Integer zeroDuration) { + this.zeroDuration = zeroDuration; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public Long getCreatorId() { + return creatorId; + } + + public void setCreatorId(Long creatorId) { + this.creatorId = creatorId; + } + + public LocalDateTime getCreateTime() { + return createTime; + } + + public void setCreateTime(LocalDateTime createTime) { + this.createTime = createTime; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + Script other = (Script) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getLang() == null ? other.getLang() == null : this.getLang().equals(other.getLang())) + && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription())) + && (this.getMapLocationJson() == null ? other.getMapLocationJson() == null : this.getMapLocationJson().equals(other.getMapLocationJson())) + && (this.getFullMarksDuration() == null ? other.getFullMarksDuration() == null : this.getFullMarksDuration().equals(other.getFullMarksDuration())) + && (this.getPassingGradeDuration() == null ? other.getPassingGradeDuration() == null : this.getPassingGradeDuration().equals(other.getPassingGradeDuration())) + && (this.getZeroDuration() == null ? other.getZeroDuration() == null : this.getZeroDuration().equals(other.getZeroDuration())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getLang() == null) ? 0 : getLang().hashCode()); + result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode()); + result = prime * result + ((getMapLocationJson() == null) ? 0 : getMapLocationJson().hashCode()); + result = prime * result + ((getFullMarksDuration() == null) ? 0 : getFullMarksDuration().hashCode()); + result = prime * result + ((getPassingGradeDuration() == null) ? 0 : getPassingGradeDuration().hashCode()); + result = prime * result + ((getZeroDuration() == null) ? 0 : getZeroDuration().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", mapId=").append(mapId); + sb.append(", name=").append(name); + sb.append(", lang=").append(lang); + sb.append(", description=").append(description); + sb.append(", mapLocationJson=").append(mapLocationJson); + sb.append(", fullMarksDuration=").append(fullMarksDuration); + sb.append(", passingGradeDuration=").append(passingGradeDuration); + sb.append(", zeroDuration=").append(zeroDuration); + sb.append(", status=").append(status); + sb.append(", creatorId=").append(creatorId); + sb.append(", createTime=").append(createTime); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/ScriptDraft.java b/src/main/java/club/joylink/rtss/entity/ScriptDraft.java new file mode 100644 index 000000000..d2f6c15c8 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/ScriptDraft.java @@ -0,0 +1,249 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * script_draft + * @author + */ +public class ScriptDraft implements Serializable { + private Long id; + + /** + * 所属地图id + */ + private Long mapId; + + /** + * 剧本名称 + */ + private String name; + + /** + * 语言类型 + */ + private String lang; + + /** + * 剧本描述 + */ + private String description; + + /** + * 地图定位数据 + */ + private String mapLocationJson; + + /** + * 剧本演出时长小于等于该时长即为满分,单位s + */ + private Integer fullMarksDuration; + + /** + * 及格分时长 + */ + private Integer passingGradeDuration; + + /** + * 零分时长 + */ + private Integer zeroDuration; + + /** + * 状态 + */ + private String status; + + /** + * 驳回说明 + */ + private String explanation; + + /** + * 创建人id + */ + private Long creatorId; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getMapId() { + return mapId; + } + + public void setMapId(Long mapId) { + this.mapId = mapId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getLang() { + return lang; + } + + public void setLang(String lang) { + this.lang = lang; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getMapLocationJson() { + return mapLocationJson; + } + + public void setMapLocationJson(String mapLocationJson) { + this.mapLocationJson = mapLocationJson; + } + + public Integer getFullMarksDuration() { + return fullMarksDuration; + } + + public void setFullMarksDuration(Integer fullMarksDuration) { + this.fullMarksDuration = fullMarksDuration; + } + + public Integer getPassingGradeDuration() { + return passingGradeDuration; + } + + public void setPassingGradeDuration(Integer passingGradeDuration) { + this.passingGradeDuration = passingGradeDuration; + } + + public Integer getZeroDuration() { + return zeroDuration; + } + + public void setZeroDuration(Integer zeroDuration) { + this.zeroDuration = zeroDuration; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getExplanation() { + return explanation; + } + + public void setExplanation(String explanation) { + this.explanation = explanation; + } + + public Long getCreatorId() { + return creatorId; + } + + public void setCreatorId(Long creatorId) { + this.creatorId = creatorId; + } + + public LocalDateTime getCreateTime() { + return createTime; + } + + public void setCreateTime(LocalDateTime createTime) { + this.createTime = createTime; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + ScriptDraft other = (ScriptDraft) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getLang() == null ? other.getLang() == null : this.getLang().equals(other.getLang())) + && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription())) + && (this.getMapLocationJson() == null ? other.getMapLocationJson() == null : this.getMapLocationJson().equals(other.getMapLocationJson())) + && (this.getFullMarksDuration() == null ? other.getFullMarksDuration() == null : this.getFullMarksDuration().equals(other.getFullMarksDuration())) + && (this.getPassingGradeDuration() == null ? other.getPassingGradeDuration() == null : this.getPassingGradeDuration().equals(other.getPassingGradeDuration())) + && (this.getZeroDuration() == null ? other.getZeroDuration() == null : this.getZeroDuration().equals(other.getZeroDuration())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getExplanation() == null ? other.getExplanation() == null : this.getExplanation().equals(other.getExplanation())) + && (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getLang() == null) ? 0 : getLang().hashCode()); + result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode()); + result = prime * result + ((getMapLocationJson() == null) ? 0 : getMapLocationJson().hashCode()); + result = prime * result + ((getFullMarksDuration() == null) ? 0 : getFullMarksDuration().hashCode()); + result = prime * result + ((getPassingGradeDuration() == null) ? 0 : getPassingGradeDuration().hashCode()); + result = prime * result + ((getZeroDuration() == null) ? 0 : getZeroDuration().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getExplanation() == null) ? 0 : getExplanation().hashCode()); + result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", mapId=").append(mapId); + sb.append(", name=").append(name); + sb.append(", lang=").append(lang); + sb.append(", description=").append(description); + sb.append(", mapLocationJson=").append(mapLocationJson); + sb.append(", fullMarksDuration=").append(fullMarksDuration); + sb.append(", passingGradeDuration=").append(passingGradeDuration); + sb.append(", zeroDuration=").append(zeroDuration); + sb.append(", status=").append(status); + sb.append(", explanation=").append(explanation); + sb.append(", creatorId=").append(creatorId); + sb.append(", createTime=").append(createTime); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/ScriptDraftExample.java b/src/main/java/club/joylink/rtss/entity/ScriptDraftExample.java new file mode 100644 index 000000000..a4d9827af --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/ScriptDraftExample.java @@ -0,0 +1,1063 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class ScriptDraftExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public ScriptDraftExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andLangIsNull() { + addCriterion("lang is null"); + return (Criteria) this; + } + + public Criteria andLangIsNotNull() { + addCriterion("lang is not null"); + return (Criteria) this; + } + + public Criteria andLangEqualTo(String value) { + addCriterion("lang =", value, "lang"); + return (Criteria) this; + } + + public Criteria andLangNotEqualTo(String value) { + addCriterion("lang <>", value, "lang"); + return (Criteria) this; + } + + public Criteria andLangGreaterThan(String value) { + addCriterion("lang >", value, "lang"); + return (Criteria) this; + } + + public Criteria andLangGreaterThanOrEqualTo(String value) { + addCriterion("lang >=", value, "lang"); + return (Criteria) this; + } + + public Criteria andLangLessThan(String value) { + addCriterion("lang <", value, "lang"); + return (Criteria) this; + } + + public Criteria andLangLessThanOrEqualTo(String value) { + addCriterion("lang <=", value, "lang"); + return (Criteria) this; + } + + public Criteria andLangLike(String value) { + addCriterion("lang like", value, "lang"); + return (Criteria) this; + } + + public Criteria andLangNotLike(String value) { + addCriterion("lang not like", value, "lang"); + return (Criteria) this; + } + + public Criteria andLangIn(List values) { + addCriterion("lang in", values, "lang"); + return (Criteria) this; + } + + public Criteria andLangNotIn(List values) { + addCriterion("lang not in", values, "lang"); + return (Criteria) this; + } + + public Criteria andLangBetween(String value1, String value2) { + addCriterion("lang between", value1, value2, "lang"); + return (Criteria) this; + } + + public Criteria andLangNotBetween(String value1, String value2) { + addCriterion("lang not between", value1, value2, "lang"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andMapLocationJsonIsNull() { + addCriterion("map_location_json is null"); + return (Criteria) this; + } + + public Criteria andMapLocationJsonIsNotNull() { + addCriterion("map_location_json is not null"); + return (Criteria) this; + } + + public Criteria andMapLocationJsonEqualTo(String value) { + addCriterion("map_location_json =", value, "mapLocationJson"); + return (Criteria) this; + } + + public Criteria andMapLocationJsonNotEqualTo(String value) { + addCriterion("map_location_json <>", value, "mapLocationJson"); + return (Criteria) this; + } + + public Criteria andMapLocationJsonGreaterThan(String value) { + addCriterion("map_location_json >", value, "mapLocationJson"); + return (Criteria) this; + } + + public Criteria andMapLocationJsonGreaterThanOrEqualTo(String value) { + addCriterion("map_location_json >=", value, "mapLocationJson"); + return (Criteria) this; + } + + public Criteria andMapLocationJsonLessThan(String value) { + addCriterion("map_location_json <", value, "mapLocationJson"); + return (Criteria) this; + } + + public Criteria andMapLocationJsonLessThanOrEqualTo(String value) { + addCriterion("map_location_json <=", value, "mapLocationJson"); + return (Criteria) this; + } + + public Criteria andMapLocationJsonLike(String value) { + addCriterion("map_location_json like", value, "mapLocationJson"); + return (Criteria) this; + } + + public Criteria andMapLocationJsonNotLike(String value) { + addCriterion("map_location_json not like", value, "mapLocationJson"); + return (Criteria) this; + } + + public Criteria andMapLocationJsonIn(List values) { + addCriterion("map_location_json in", values, "mapLocationJson"); + return (Criteria) this; + } + + public Criteria andMapLocationJsonNotIn(List values) { + addCriterion("map_location_json not in", values, "mapLocationJson"); + return (Criteria) this; + } + + public Criteria andMapLocationJsonBetween(String value1, String value2) { + addCriterion("map_location_json between", value1, value2, "mapLocationJson"); + return (Criteria) this; + } + + public Criteria andMapLocationJsonNotBetween(String value1, String value2) { + addCriterion("map_location_json not between", value1, value2, "mapLocationJson"); + return (Criteria) this; + } + + public Criteria andFullMarksDurationIsNull() { + addCriterion("full_marks_duration is null"); + return (Criteria) this; + } + + public Criteria andFullMarksDurationIsNotNull() { + addCriterion("full_marks_duration is not null"); + return (Criteria) this; + } + + public Criteria andFullMarksDurationEqualTo(Integer value) { + addCriterion("full_marks_duration =", value, "fullMarksDuration"); + return (Criteria) this; + } + + public Criteria andFullMarksDurationNotEqualTo(Integer value) { + addCriterion("full_marks_duration <>", value, "fullMarksDuration"); + return (Criteria) this; + } + + public Criteria andFullMarksDurationGreaterThan(Integer value) { + addCriterion("full_marks_duration >", value, "fullMarksDuration"); + return (Criteria) this; + } + + public Criteria andFullMarksDurationGreaterThanOrEqualTo(Integer value) { + addCriterion("full_marks_duration >=", value, "fullMarksDuration"); + return (Criteria) this; + } + + public Criteria andFullMarksDurationLessThan(Integer value) { + addCriterion("full_marks_duration <", value, "fullMarksDuration"); + return (Criteria) this; + } + + public Criteria andFullMarksDurationLessThanOrEqualTo(Integer value) { + addCriterion("full_marks_duration <=", value, "fullMarksDuration"); + return (Criteria) this; + } + + public Criteria andFullMarksDurationIn(List values) { + addCriterion("full_marks_duration in", values, "fullMarksDuration"); + return (Criteria) this; + } + + public Criteria andFullMarksDurationNotIn(List values) { + addCriterion("full_marks_duration not in", values, "fullMarksDuration"); + return (Criteria) this; + } + + public Criteria andFullMarksDurationBetween(Integer value1, Integer value2) { + addCriterion("full_marks_duration between", value1, value2, "fullMarksDuration"); + return (Criteria) this; + } + + public Criteria andFullMarksDurationNotBetween(Integer value1, Integer value2) { + addCriterion("full_marks_duration not between", value1, value2, "fullMarksDuration"); + return (Criteria) this; + } + + public Criteria andPassingGradeDurationIsNull() { + addCriterion("passing_grade_duration is null"); + return (Criteria) this; + } + + public Criteria andPassingGradeDurationIsNotNull() { + addCriterion("passing_grade_duration is not null"); + return (Criteria) this; + } + + public Criteria andPassingGradeDurationEqualTo(Integer value) { + addCriterion("passing_grade_duration =", value, "passingGradeDuration"); + return (Criteria) this; + } + + public Criteria andPassingGradeDurationNotEqualTo(Integer value) { + addCriterion("passing_grade_duration <>", value, "passingGradeDuration"); + return (Criteria) this; + } + + public Criteria andPassingGradeDurationGreaterThan(Integer value) { + addCriterion("passing_grade_duration >", value, "passingGradeDuration"); + return (Criteria) this; + } + + public Criteria andPassingGradeDurationGreaterThanOrEqualTo(Integer value) { + addCriterion("passing_grade_duration >=", value, "passingGradeDuration"); + return (Criteria) this; + } + + public Criteria andPassingGradeDurationLessThan(Integer value) { + addCriterion("passing_grade_duration <", value, "passingGradeDuration"); + return (Criteria) this; + } + + public Criteria andPassingGradeDurationLessThanOrEqualTo(Integer value) { + addCriterion("passing_grade_duration <=", value, "passingGradeDuration"); + return (Criteria) this; + } + + public Criteria andPassingGradeDurationIn(List values) { + addCriterion("passing_grade_duration in", values, "passingGradeDuration"); + return (Criteria) this; + } + + public Criteria andPassingGradeDurationNotIn(List values) { + addCriterion("passing_grade_duration not in", values, "passingGradeDuration"); + return (Criteria) this; + } + + public Criteria andPassingGradeDurationBetween(Integer value1, Integer value2) { + addCriterion("passing_grade_duration between", value1, value2, "passingGradeDuration"); + return (Criteria) this; + } + + public Criteria andPassingGradeDurationNotBetween(Integer value1, Integer value2) { + addCriterion("passing_grade_duration not between", value1, value2, "passingGradeDuration"); + return (Criteria) this; + } + + public Criteria andZeroDurationIsNull() { + addCriterion("zero_duration is null"); + return (Criteria) this; + } + + public Criteria andZeroDurationIsNotNull() { + addCriterion("zero_duration is not null"); + return (Criteria) this; + } + + public Criteria andZeroDurationEqualTo(Integer value) { + addCriterion("zero_duration =", value, "zeroDuration"); + return (Criteria) this; + } + + public Criteria andZeroDurationNotEqualTo(Integer value) { + addCriterion("zero_duration <>", value, "zeroDuration"); + return (Criteria) this; + } + + public Criteria andZeroDurationGreaterThan(Integer value) { + addCriterion("zero_duration >", value, "zeroDuration"); + return (Criteria) this; + } + + public Criteria andZeroDurationGreaterThanOrEqualTo(Integer value) { + addCriterion("zero_duration >=", value, "zeroDuration"); + return (Criteria) this; + } + + public Criteria andZeroDurationLessThan(Integer value) { + addCriterion("zero_duration <", value, "zeroDuration"); + return (Criteria) this; + } + + public Criteria andZeroDurationLessThanOrEqualTo(Integer value) { + addCriterion("zero_duration <=", value, "zeroDuration"); + return (Criteria) this; + } + + public Criteria andZeroDurationIn(List values) { + addCriterion("zero_duration in", values, "zeroDuration"); + return (Criteria) this; + } + + public Criteria andZeroDurationNotIn(List values) { + addCriterion("zero_duration not in", values, "zeroDuration"); + return (Criteria) this; + } + + public Criteria andZeroDurationBetween(Integer value1, Integer value2) { + addCriterion("zero_duration between", value1, value2, "zeroDuration"); + return (Criteria) this; + } + + public Criteria andZeroDurationNotBetween(Integer value1, Integer value2) { + addCriterion("zero_duration not between", value1, value2, "zeroDuration"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andExplanationIsNull() { + addCriterion("explanation is null"); + return (Criteria) this; + } + + public Criteria andExplanationIsNotNull() { + addCriterion("explanation is not null"); + return (Criteria) this; + } + + public Criteria andExplanationEqualTo(String value) { + addCriterion("explanation =", value, "explanation"); + return (Criteria) this; + } + + public Criteria andExplanationNotEqualTo(String value) { + addCriterion("explanation <>", value, "explanation"); + return (Criteria) this; + } + + public Criteria andExplanationGreaterThan(String value) { + addCriterion("explanation >", value, "explanation"); + return (Criteria) this; + } + + public Criteria andExplanationGreaterThanOrEqualTo(String value) { + addCriterion("explanation >=", value, "explanation"); + return (Criteria) this; + } + + public Criteria andExplanationLessThan(String value) { + addCriterion("explanation <", value, "explanation"); + return (Criteria) this; + } + + public Criteria andExplanationLessThanOrEqualTo(String value) { + addCriterion("explanation <=", value, "explanation"); + return (Criteria) this; + } + + public Criteria andExplanationLike(String value) { + addCriterion("explanation like", value, "explanation"); + return (Criteria) this; + } + + public Criteria andExplanationNotLike(String value) { + addCriterion("explanation not like", value, "explanation"); + return (Criteria) this; + } + + public Criteria andExplanationIn(List values) { + addCriterion("explanation in", values, "explanation"); + return (Criteria) this; + } + + public Criteria andExplanationNotIn(List values) { + addCriterion("explanation not in", values, "explanation"); + return (Criteria) this; + } + + public Criteria andExplanationBetween(String value1, String value2) { + addCriterion("explanation between", value1, value2, "explanation"); + return (Criteria) this; + } + + public Criteria andExplanationNotBetween(String value1, String value2) { + addCriterion("explanation not between", value1, value2, "explanation"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNull() { + addCriterion("creator_id is null"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNotNull() { + addCriterion("creator_id is not null"); + return (Criteria) this; + } + + public Criteria andCreatorIdEqualTo(Long value) { + addCriterion("creator_id =", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotEqualTo(Long value) { + addCriterion("creator_id <>", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThan(Long value) { + addCriterion("creator_id >", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) { + addCriterion("creator_id >=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThan(Long value) { + addCriterion("creator_id <", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThanOrEqualTo(Long value) { + addCriterion("creator_id <=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdIn(List values) { + addCriterion("creator_id in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotIn(List values) { + addCriterion("creator_id not in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdBetween(Long value1, Long value2) { + addCriterion("creator_id between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotBetween(Long value1, Long value2) { + addCriterion("creator_id not between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(LocalDateTime value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(LocalDateTime value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(LocalDateTime value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(LocalDateTime value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/ScriptDraftWithBLOBs.java b/src/main/java/club/joylink/rtss/entity/ScriptDraftWithBLOBs.java new file mode 100644 index 000000000..a1ee187aa --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/ScriptDraftWithBLOBs.java @@ -0,0 +1,149 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * script_draft + * @author + */ +public class ScriptDraftWithBLOBs extends ScriptDraft implements Serializable { + /** + * 剧本场景json数据 + */ + private String bgScenesJson; + + /** + * 剧本最终场景json数据 + */ + private String finalScenesJson; + + /** + * 角色json数据 + */ + private String membersJson; + + /** + * 演员json数据 + */ + private String playersJson; + + /** + * 剧本动作json数据 + */ + private String actionsJson; + + private static final long serialVersionUID = 1L; + + public String getBgScenesJson() { + return bgScenesJson; + } + + public void setBgScenesJson(String bgScenesJson) { + this.bgScenesJson = bgScenesJson; + } + + public String getFinalScenesJson() { + return finalScenesJson; + } + + public void setFinalScenesJson(String finalScenesJson) { + this.finalScenesJson = finalScenesJson; + } + + public String getMembersJson() { + return membersJson; + } + + public void setMembersJson(String membersJson) { + this.membersJson = membersJson; + } + + public String getPlayersJson() { + return playersJson; + } + + public void setPlayersJson(String playersJson) { + this.playersJson = playersJson; + } + + public String getActionsJson() { + return actionsJson; + } + + public void setActionsJson(String actionsJson) { + this.actionsJson = actionsJson; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + ScriptDraftWithBLOBs other = (ScriptDraftWithBLOBs) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getLang() == null ? other.getLang() == null : this.getLang().equals(other.getLang())) + && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription())) + && (this.getMapLocationJson() == null ? other.getMapLocationJson() == null : this.getMapLocationJson().equals(other.getMapLocationJson())) + && (this.getFullMarksDuration() == null ? other.getFullMarksDuration() == null : this.getFullMarksDuration().equals(other.getFullMarksDuration())) + && (this.getPassingGradeDuration() == null ? other.getPassingGradeDuration() == null : this.getPassingGradeDuration().equals(other.getPassingGradeDuration())) + && (this.getZeroDuration() == null ? other.getZeroDuration() == null : this.getZeroDuration().equals(other.getZeroDuration())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getExplanation() == null ? other.getExplanation() == null : this.getExplanation().equals(other.getExplanation())) + && (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getBgScenesJson() == null ? other.getBgScenesJson() == null : this.getBgScenesJson().equals(other.getBgScenesJson())) + && (this.getFinalScenesJson() == null ? other.getFinalScenesJson() == null : this.getFinalScenesJson().equals(other.getFinalScenesJson())) + && (this.getMembersJson() == null ? other.getMembersJson() == null : this.getMembersJson().equals(other.getMembersJson())) + && (this.getPlayersJson() == null ? other.getPlayersJson() == null : this.getPlayersJson().equals(other.getPlayersJson())) + && (this.getActionsJson() == null ? other.getActionsJson() == null : this.getActionsJson().equals(other.getActionsJson())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getLang() == null) ? 0 : getLang().hashCode()); + result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode()); + result = prime * result + ((getMapLocationJson() == null) ? 0 : getMapLocationJson().hashCode()); + result = prime * result + ((getFullMarksDuration() == null) ? 0 : getFullMarksDuration().hashCode()); + result = prime * result + ((getPassingGradeDuration() == null) ? 0 : getPassingGradeDuration().hashCode()); + result = prime * result + ((getZeroDuration() == null) ? 0 : getZeroDuration().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getExplanation() == null) ? 0 : getExplanation().hashCode()); + result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getBgScenesJson() == null) ? 0 : getBgScenesJson().hashCode()); + result = prime * result + ((getFinalScenesJson() == null) ? 0 : getFinalScenesJson().hashCode()); + result = prime * result + ((getMembersJson() == null) ? 0 : getMembersJson().hashCode()); + result = prime * result + ((getPlayersJson() == null) ? 0 : getPlayersJson().hashCode()); + result = prime * result + ((getActionsJson() == null) ? 0 : getActionsJson().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", bgScenesJson=").append(bgScenesJson); + sb.append(", finalScenesJson=").append(finalScenesJson); + sb.append(", membersJson=").append(membersJson); + sb.append(", playersJson=").append(playersJson); + sb.append(", actionsJson=").append(actionsJson); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/ScriptExample.java b/src/main/java/club/joylink/rtss/entity/ScriptExample.java new file mode 100644 index 000000000..763b12ad3 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/ScriptExample.java @@ -0,0 +1,993 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class ScriptExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public ScriptExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andLangIsNull() { + addCriterion("lang is null"); + return (Criteria) this; + } + + public Criteria andLangIsNotNull() { + addCriterion("lang is not null"); + return (Criteria) this; + } + + public Criteria andLangEqualTo(String value) { + addCriterion("lang =", value, "lang"); + return (Criteria) this; + } + + public Criteria andLangNotEqualTo(String value) { + addCriterion("lang <>", value, "lang"); + return (Criteria) this; + } + + public Criteria andLangGreaterThan(String value) { + addCriterion("lang >", value, "lang"); + return (Criteria) this; + } + + public Criteria andLangGreaterThanOrEqualTo(String value) { + addCriterion("lang >=", value, "lang"); + return (Criteria) this; + } + + public Criteria andLangLessThan(String value) { + addCriterion("lang <", value, "lang"); + return (Criteria) this; + } + + public Criteria andLangLessThanOrEqualTo(String value) { + addCriterion("lang <=", value, "lang"); + return (Criteria) this; + } + + public Criteria andLangLike(String value) { + addCriterion("lang like", value, "lang"); + return (Criteria) this; + } + + public Criteria andLangNotLike(String value) { + addCriterion("lang not like", value, "lang"); + return (Criteria) this; + } + + public Criteria andLangIn(List values) { + addCriterion("lang in", values, "lang"); + return (Criteria) this; + } + + public Criteria andLangNotIn(List values) { + addCriterion("lang not in", values, "lang"); + return (Criteria) this; + } + + public Criteria andLangBetween(String value1, String value2) { + addCriterion("lang between", value1, value2, "lang"); + return (Criteria) this; + } + + public Criteria andLangNotBetween(String value1, String value2) { + addCriterion("lang not between", value1, value2, "lang"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andMapLocationJsonIsNull() { + addCriterion("map_location_json is null"); + return (Criteria) this; + } + + public Criteria andMapLocationJsonIsNotNull() { + addCriterion("map_location_json is not null"); + return (Criteria) this; + } + + public Criteria andMapLocationJsonEqualTo(String value) { + addCriterion("map_location_json =", value, "mapLocationJson"); + return (Criteria) this; + } + + public Criteria andMapLocationJsonNotEqualTo(String value) { + addCriterion("map_location_json <>", value, "mapLocationJson"); + return (Criteria) this; + } + + public Criteria andMapLocationJsonGreaterThan(String value) { + addCriterion("map_location_json >", value, "mapLocationJson"); + return (Criteria) this; + } + + public Criteria andMapLocationJsonGreaterThanOrEqualTo(String value) { + addCriterion("map_location_json >=", value, "mapLocationJson"); + return (Criteria) this; + } + + public Criteria andMapLocationJsonLessThan(String value) { + addCriterion("map_location_json <", value, "mapLocationJson"); + return (Criteria) this; + } + + public Criteria andMapLocationJsonLessThanOrEqualTo(String value) { + addCriterion("map_location_json <=", value, "mapLocationJson"); + return (Criteria) this; + } + + public Criteria andMapLocationJsonLike(String value) { + addCriterion("map_location_json like", value, "mapLocationJson"); + return (Criteria) this; + } + + public Criteria andMapLocationJsonNotLike(String value) { + addCriterion("map_location_json not like", value, "mapLocationJson"); + return (Criteria) this; + } + + public Criteria andMapLocationJsonIn(List values) { + addCriterion("map_location_json in", values, "mapLocationJson"); + return (Criteria) this; + } + + public Criteria andMapLocationJsonNotIn(List values) { + addCriterion("map_location_json not in", values, "mapLocationJson"); + return (Criteria) this; + } + + public Criteria andMapLocationJsonBetween(String value1, String value2) { + addCriterion("map_location_json between", value1, value2, "mapLocationJson"); + return (Criteria) this; + } + + public Criteria andMapLocationJsonNotBetween(String value1, String value2) { + addCriterion("map_location_json not between", value1, value2, "mapLocationJson"); + return (Criteria) this; + } + + public Criteria andFullMarksDurationIsNull() { + addCriterion("full_marks_duration is null"); + return (Criteria) this; + } + + public Criteria andFullMarksDurationIsNotNull() { + addCriterion("full_marks_duration is not null"); + return (Criteria) this; + } + + public Criteria andFullMarksDurationEqualTo(Integer value) { + addCriterion("full_marks_duration =", value, "fullMarksDuration"); + return (Criteria) this; + } + + public Criteria andFullMarksDurationNotEqualTo(Integer value) { + addCriterion("full_marks_duration <>", value, "fullMarksDuration"); + return (Criteria) this; + } + + public Criteria andFullMarksDurationGreaterThan(Integer value) { + addCriterion("full_marks_duration >", value, "fullMarksDuration"); + return (Criteria) this; + } + + public Criteria andFullMarksDurationGreaterThanOrEqualTo(Integer value) { + addCriterion("full_marks_duration >=", value, "fullMarksDuration"); + return (Criteria) this; + } + + public Criteria andFullMarksDurationLessThan(Integer value) { + addCriterion("full_marks_duration <", value, "fullMarksDuration"); + return (Criteria) this; + } + + public Criteria andFullMarksDurationLessThanOrEqualTo(Integer value) { + addCriterion("full_marks_duration <=", value, "fullMarksDuration"); + return (Criteria) this; + } + + public Criteria andFullMarksDurationIn(List values) { + addCriterion("full_marks_duration in", values, "fullMarksDuration"); + return (Criteria) this; + } + + public Criteria andFullMarksDurationNotIn(List values) { + addCriterion("full_marks_duration not in", values, "fullMarksDuration"); + return (Criteria) this; + } + + public Criteria andFullMarksDurationBetween(Integer value1, Integer value2) { + addCriterion("full_marks_duration between", value1, value2, "fullMarksDuration"); + return (Criteria) this; + } + + public Criteria andFullMarksDurationNotBetween(Integer value1, Integer value2) { + addCriterion("full_marks_duration not between", value1, value2, "fullMarksDuration"); + return (Criteria) this; + } + + public Criteria andPassingGradeDurationIsNull() { + addCriterion("passing_grade_duration is null"); + return (Criteria) this; + } + + public Criteria andPassingGradeDurationIsNotNull() { + addCriterion("passing_grade_duration is not null"); + return (Criteria) this; + } + + public Criteria andPassingGradeDurationEqualTo(Integer value) { + addCriterion("passing_grade_duration =", value, "passingGradeDuration"); + return (Criteria) this; + } + + public Criteria andPassingGradeDurationNotEqualTo(Integer value) { + addCriterion("passing_grade_duration <>", value, "passingGradeDuration"); + return (Criteria) this; + } + + public Criteria andPassingGradeDurationGreaterThan(Integer value) { + addCriterion("passing_grade_duration >", value, "passingGradeDuration"); + return (Criteria) this; + } + + public Criteria andPassingGradeDurationGreaterThanOrEqualTo(Integer value) { + addCriterion("passing_grade_duration >=", value, "passingGradeDuration"); + return (Criteria) this; + } + + public Criteria andPassingGradeDurationLessThan(Integer value) { + addCriterion("passing_grade_duration <", value, "passingGradeDuration"); + return (Criteria) this; + } + + public Criteria andPassingGradeDurationLessThanOrEqualTo(Integer value) { + addCriterion("passing_grade_duration <=", value, "passingGradeDuration"); + return (Criteria) this; + } + + public Criteria andPassingGradeDurationIn(List values) { + addCriterion("passing_grade_duration in", values, "passingGradeDuration"); + return (Criteria) this; + } + + public Criteria andPassingGradeDurationNotIn(List values) { + addCriterion("passing_grade_duration not in", values, "passingGradeDuration"); + return (Criteria) this; + } + + public Criteria andPassingGradeDurationBetween(Integer value1, Integer value2) { + addCriterion("passing_grade_duration between", value1, value2, "passingGradeDuration"); + return (Criteria) this; + } + + public Criteria andPassingGradeDurationNotBetween(Integer value1, Integer value2) { + addCriterion("passing_grade_duration not between", value1, value2, "passingGradeDuration"); + return (Criteria) this; + } + + public Criteria andZeroDurationIsNull() { + addCriterion("zero_duration is null"); + return (Criteria) this; + } + + public Criteria andZeroDurationIsNotNull() { + addCriterion("zero_duration is not null"); + return (Criteria) this; + } + + public Criteria andZeroDurationEqualTo(Integer value) { + addCriterion("zero_duration =", value, "zeroDuration"); + return (Criteria) this; + } + + public Criteria andZeroDurationNotEqualTo(Integer value) { + addCriterion("zero_duration <>", value, "zeroDuration"); + return (Criteria) this; + } + + public Criteria andZeroDurationGreaterThan(Integer value) { + addCriterion("zero_duration >", value, "zeroDuration"); + return (Criteria) this; + } + + public Criteria andZeroDurationGreaterThanOrEqualTo(Integer value) { + addCriterion("zero_duration >=", value, "zeroDuration"); + return (Criteria) this; + } + + public Criteria andZeroDurationLessThan(Integer value) { + addCriterion("zero_duration <", value, "zeroDuration"); + return (Criteria) this; + } + + public Criteria andZeroDurationLessThanOrEqualTo(Integer value) { + addCriterion("zero_duration <=", value, "zeroDuration"); + return (Criteria) this; + } + + public Criteria andZeroDurationIn(List values) { + addCriterion("zero_duration in", values, "zeroDuration"); + return (Criteria) this; + } + + public Criteria andZeroDurationNotIn(List values) { + addCriterion("zero_duration not in", values, "zeroDuration"); + return (Criteria) this; + } + + public Criteria andZeroDurationBetween(Integer value1, Integer value2) { + addCriterion("zero_duration between", value1, value2, "zeroDuration"); + return (Criteria) this; + } + + public Criteria andZeroDurationNotBetween(Integer value1, Integer value2) { + addCriterion("zero_duration not between", value1, value2, "zeroDuration"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNull() { + addCriterion("creator_id is null"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNotNull() { + addCriterion("creator_id is not null"); + return (Criteria) this; + } + + public Criteria andCreatorIdEqualTo(Long value) { + addCriterion("creator_id =", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotEqualTo(Long value) { + addCriterion("creator_id <>", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThan(Long value) { + addCriterion("creator_id >", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) { + addCriterion("creator_id >=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThan(Long value) { + addCriterion("creator_id <", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThanOrEqualTo(Long value) { + addCriterion("creator_id <=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdIn(List values) { + addCriterion("creator_id in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotIn(List values) { + addCriterion("creator_id not in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdBetween(Long value1, Long value2) { + addCriterion("creator_id between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotBetween(Long value1, Long value2) { + addCriterion("creator_id not between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(LocalDateTime value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(LocalDateTime value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(LocalDateTime value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(LocalDateTime value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/ScriptWithBLOBs.java b/src/main/java/club/joylink/rtss/entity/ScriptWithBLOBs.java new file mode 100644 index 000000000..f9b979a28 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/ScriptWithBLOBs.java @@ -0,0 +1,147 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * script + * @author + */ +public class ScriptWithBLOBs extends Script implements Serializable { + /** + * 剧本场景json数据 + */ + private String bgScenesJson; + + /** + * 剧本最终场景json数据 + */ + private String finalScenesJson; + + /** + * 角色json数据 + */ + private String membersJson; + + /** + * 演员json数据 + */ + private String playersJson; + + /** + * 剧本动作json数据 + */ + private String actionsJson; + + private static final long serialVersionUID = 1L; + + public String getBgScenesJson() { + return bgScenesJson; + } + + public void setBgScenesJson(String bgScenesJson) { + this.bgScenesJson = bgScenesJson; + } + + public String getFinalScenesJson() { + return finalScenesJson; + } + + public void setFinalScenesJson(String finalScenesJson) { + this.finalScenesJson = finalScenesJson; + } + + public String getMembersJson() { + return membersJson; + } + + public void setMembersJson(String membersJson) { + this.membersJson = membersJson; + } + + public String getPlayersJson() { + return playersJson; + } + + public void setPlayersJson(String playersJson) { + this.playersJson = playersJson; + } + + public String getActionsJson() { + return actionsJson; + } + + public void setActionsJson(String actionsJson) { + this.actionsJson = actionsJson; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + ScriptWithBLOBs other = (ScriptWithBLOBs) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getLang() == null ? other.getLang() == null : this.getLang().equals(other.getLang())) + && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription())) + && (this.getMapLocationJson() == null ? other.getMapLocationJson() == null : this.getMapLocationJson().equals(other.getMapLocationJson())) + && (this.getFullMarksDuration() == null ? other.getFullMarksDuration() == null : this.getFullMarksDuration().equals(other.getFullMarksDuration())) + && (this.getPassingGradeDuration() == null ? other.getPassingGradeDuration() == null : this.getPassingGradeDuration().equals(other.getPassingGradeDuration())) + && (this.getZeroDuration() == null ? other.getZeroDuration() == null : this.getZeroDuration().equals(other.getZeroDuration())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getBgScenesJson() == null ? other.getBgScenesJson() == null : this.getBgScenesJson().equals(other.getBgScenesJson())) + && (this.getFinalScenesJson() == null ? other.getFinalScenesJson() == null : this.getFinalScenesJson().equals(other.getFinalScenesJson())) + && (this.getMembersJson() == null ? other.getMembersJson() == null : this.getMembersJson().equals(other.getMembersJson())) + && (this.getPlayersJson() == null ? other.getPlayersJson() == null : this.getPlayersJson().equals(other.getPlayersJson())) + && (this.getActionsJson() == null ? other.getActionsJson() == null : this.getActionsJson().equals(other.getActionsJson())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getLang() == null) ? 0 : getLang().hashCode()); + result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode()); + result = prime * result + ((getMapLocationJson() == null) ? 0 : getMapLocationJson().hashCode()); + result = prime * result + ((getFullMarksDuration() == null) ? 0 : getFullMarksDuration().hashCode()); + result = prime * result + ((getPassingGradeDuration() == null) ? 0 : getPassingGradeDuration().hashCode()); + result = prime * result + ((getZeroDuration() == null) ? 0 : getZeroDuration().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getBgScenesJson() == null) ? 0 : getBgScenesJson().hashCode()); + result = prime * result + ((getFinalScenesJson() == null) ? 0 : getFinalScenesJson().hashCode()); + result = prime * result + ((getMembersJson() == null) ? 0 : getMembersJson().hashCode()); + result = prime * result + ((getPlayersJson() == null) ? 0 : getPlayersJson().hashCode()); + result = prime * result + ((getActionsJson() == null) ? 0 : getActionsJson().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", bgScenesJson=").append(bgScenesJson); + sb.append(", finalScenesJson=").append(finalScenesJson); + sb.append(", membersJson=").append(membersJson); + sb.append(", playersJson=").append(playersJson); + sb.append(", actionsJson=").append(actionsJson); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SimulationConversation.java b/src/main/java/club/joylink/rtss/entity/SimulationConversation.java new file mode 100644 index 000000000..964a48f84 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SimulationConversation.java @@ -0,0 +1,85 @@ +package club.joylink.rtss.entity; + +import lombok.Getter; +import lombok.Setter; + +import java.io.Serializable; + +/** + * simulation_conversation + * @author + */ +@Getter +@Setter +public class SimulationConversation implements Serializable { + private Long id; + + /** + * 仿真记录id + */ + private Long recordId; + + /** + * 会话名称 + */ + private String name; + + /** + * 创建人id + */ + private Long creatorId; + + /** + * 是否群聊 + */ + private Boolean isGroup; + + private static final long serialVersionUID = 1L; + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + SimulationConversation other = (SimulationConversation) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getRecordId() == null ? other.getRecordId() == null : this.getRecordId().equals(other.getRecordId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId())) + && (this.getIsGroup() == null ? other.getIsGroup() == null : this.getIsGroup().equals(other.getIsGroup())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getRecordId() == null) ? 0 : getRecordId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode()); + result = prime * result + ((getIsGroup() == null) ? 0 : getIsGroup().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", recordId=").append(recordId); + sb.append(", name=").append(name); + sb.append(", creatorId=").append(creatorId); + sb.append(", isGroup=").append(isGroup); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SimulationConversationExample.java b/src/main/java/club/joylink/rtss/entity/SimulationConversationExample.java new file mode 100644 index 000000000..53bf699f9 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SimulationConversationExample.java @@ -0,0 +1,532 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class SimulationConversationExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Integer offset; + + public SimulationConversationExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Integer offset) { + this.offset = offset; + } + + public Integer getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andRecordIdIsNull() { + addCriterion("record_id is null"); + return (Criteria) this; + } + + public Criteria andRecordIdIsNotNull() { + addCriterion("record_id is not null"); + return (Criteria) this; + } + + public Criteria andRecordIdEqualTo(Long value) { + addCriterion("record_id =", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdNotEqualTo(Long value) { + addCriterion("record_id <>", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdGreaterThan(Long value) { + addCriterion("record_id >", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdGreaterThanOrEqualTo(Long value) { + addCriterion("record_id >=", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdLessThan(Long value) { + addCriterion("record_id <", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdLessThanOrEqualTo(Long value) { + addCriterion("record_id <=", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdIn(List values) { + addCriterion("record_id in", values, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdNotIn(List values) { + addCriterion("record_id not in", values, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdBetween(Long value1, Long value2) { + addCriterion("record_id between", value1, value2, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdNotBetween(Long value1, Long value2) { + addCriterion("record_id not between", value1, value2, "recordId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNull() { + addCriterion("creator_id is null"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNotNull() { + addCriterion("creator_id is not null"); + return (Criteria) this; + } + + public Criteria andCreatorIdEqualTo(Long value) { + addCriterion("creator_id =", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotEqualTo(Long value) { + addCriterion("creator_id <>", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThan(Long value) { + addCriterion("creator_id >", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) { + addCriterion("creator_id >=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThan(Long value) { + addCriterion("creator_id <", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThanOrEqualTo(Long value) { + addCriterion("creator_id <=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdIn(List values) { + addCriterion("creator_id in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotIn(List values) { + addCriterion("creator_id not in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdBetween(Long value1, Long value2) { + addCriterion("creator_id between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotBetween(Long value1, Long value2) { + addCriterion("creator_id not between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andIsGroupIsNull() { + addCriterion("is_group is null"); + return (Criteria) this; + } + + public Criteria andIsGroupIsNotNull() { + addCriterion("is_group is not null"); + return (Criteria) this; + } + + public Criteria andIsGroupEqualTo(Boolean value) { + addCriterion("is_group =", value, "isGroup"); + return (Criteria) this; + } + + public Criteria andIsGroupNotEqualTo(Boolean value) { + addCriterion("is_group <>", value, "isGroup"); + return (Criteria) this; + } + + public Criteria andIsGroupGreaterThan(Boolean value) { + addCriterion("is_group >", value, "isGroup"); + return (Criteria) this; + } + + public Criteria andIsGroupGreaterThanOrEqualTo(Boolean value) { + addCriterion("is_group >=", value, "isGroup"); + return (Criteria) this; + } + + public Criteria andIsGroupLessThan(Boolean value) { + addCriterion("is_group <", value, "isGroup"); + return (Criteria) this; + } + + public Criteria andIsGroupLessThanOrEqualTo(Boolean value) { + addCriterion("is_group <=", value, "isGroup"); + return (Criteria) this; + } + + public Criteria andIsGroupIn(List values) { + addCriterion("is_group in", values, "isGroup"); + return (Criteria) this; + } + + public Criteria andIsGroupNotIn(List values) { + addCriterion("is_group not in", values, "isGroup"); + return (Criteria) this; + } + + public Criteria andIsGroupBetween(Boolean value1, Boolean value2) { + addCriterion("is_group between", value1, value2, "isGroup"); + return (Criteria) this; + } + + public Criteria andIsGroupNotBetween(Boolean value1, Boolean value2) { + addCriterion("is_group not between", value1, value2, "isGroup"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SimulationConversationMember.java b/src/main/java/club/joylink/rtss/entity/SimulationConversationMember.java new file mode 100644 index 000000000..08450f08e --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SimulationConversationMember.java @@ -0,0 +1,184 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * simulation_conversation_member + * @author + */ +public class SimulationConversationMember implements Serializable { + private Long id; + + /** + * 会话id + */ + private Long conversationId; + + /** + * 成员角色(行调/车站值班员/列车司机等) + */ + private String role; + + /** + * 用户id + */ + private Long userId; + + /** + * 名称 + */ + private String name; + + /** + * 昵称 + */ + private String nickName; + + /** + * 设备类型 + */ + private String deviceType; + + /** + * 设备编号 + */ + private String deviceCode; + + /** + * 头像地址 + */ + private String avatarUrl; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getConversationId() { + return conversationId; + } + + public void setConversationId(Long conversationId) { + this.conversationId = conversationId; + } + + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getNickName() { + return nickName; + } + + public void setNickName(String nickName) { + this.nickName = nickName; + } + + public String getDeviceType() { + return deviceType; + } + + public void setDeviceType(String deviceType) { + this.deviceType = deviceType; + } + + public String getDeviceCode() { + return deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + public String getAvatarUrl() { + return avatarUrl; + } + + public void setAvatarUrl(String avatarUrl) { + this.avatarUrl = avatarUrl; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + SimulationConversationMember other = (SimulationConversationMember) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getConversationId() == null ? other.getConversationId() == null : this.getConversationId().equals(other.getConversationId())) + && (this.getRole() == null ? other.getRole() == null : this.getRole().equals(other.getRole())) + && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getNickName() == null ? other.getNickName() == null : this.getNickName().equals(other.getNickName())) + && (this.getDeviceType() == null ? other.getDeviceType() == null : this.getDeviceType().equals(other.getDeviceType())) + && (this.getDeviceCode() == null ? other.getDeviceCode() == null : this.getDeviceCode().equals(other.getDeviceCode())) + && (this.getAvatarUrl() == null ? other.getAvatarUrl() == null : this.getAvatarUrl().equals(other.getAvatarUrl())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getConversationId() == null) ? 0 : getConversationId().hashCode()); + result = prime * result + ((getRole() == null) ? 0 : getRole().hashCode()); + result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getNickName() == null) ? 0 : getNickName().hashCode()); + result = prime * result + ((getDeviceType() == null) ? 0 : getDeviceType().hashCode()); + result = prime * result + ((getDeviceCode() == null) ? 0 : getDeviceCode().hashCode()); + result = prime * result + ((getAvatarUrl() == null) ? 0 : getAvatarUrl().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", conversationId=").append(conversationId); + sb.append(", role=").append(role); + sb.append(", userId=").append(userId); + sb.append(", name=").append(name); + sb.append(", nickName=").append(nickName); + sb.append(", deviceType=").append(deviceType); + sb.append(", deviceCode=").append(deviceCode); + sb.append(", avatarUrl=").append(avatarUrl); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SimulationConversationMemberExample.java b/src/main/java/club/joylink/rtss/entity/SimulationConversationMemberExample.java new file mode 100644 index 000000000..c6a53bbc9 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SimulationConversationMemberExample.java @@ -0,0 +1,822 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class SimulationConversationMemberExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Integer offset; + + public SimulationConversationMemberExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Integer offset) { + this.offset = offset; + } + + public Integer getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andConversationIdIsNull() { + addCriterion("conversation_id is null"); + return (Criteria) this; + } + + public Criteria andConversationIdIsNotNull() { + addCriterion("conversation_id is not null"); + return (Criteria) this; + } + + public Criteria andConversationIdEqualTo(Long value) { + addCriterion("conversation_id =", value, "conversationId"); + return (Criteria) this; + } + + public Criteria andConversationIdNotEqualTo(Long value) { + addCriterion("conversation_id <>", value, "conversationId"); + return (Criteria) this; + } + + public Criteria andConversationIdGreaterThan(Long value) { + addCriterion("conversation_id >", value, "conversationId"); + return (Criteria) this; + } + + public Criteria andConversationIdGreaterThanOrEqualTo(Long value) { + addCriterion("conversation_id >=", value, "conversationId"); + return (Criteria) this; + } + + public Criteria andConversationIdLessThan(Long value) { + addCriterion("conversation_id <", value, "conversationId"); + return (Criteria) this; + } + + public Criteria andConversationIdLessThanOrEqualTo(Long value) { + addCriterion("conversation_id <=", value, "conversationId"); + return (Criteria) this; + } + + public Criteria andConversationIdIn(List values) { + addCriterion("conversation_id in", values, "conversationId"); + return (Criteria) this; + } + + public Criteria andConversationIdNotIn(List values) { + addCriterion("conversation_id not in", values, "conversationId"); + return (Criteria) this; + } + + public Criteria andConversationIdBetween(Long value1, Long value2) { + addCriterion("conversation_id between", value1, value2, "conversationId"); + return (Criteria) this; + } + + public Criteria andConversationIdNotBetween(Long value1, Long value2) { + addCriterion("conversation_id not between", value1, value2, "conversationId"); + return (Criteria) this; + } + + public Criteria andRoleIsNull() { + addCriterion("role is null"); + return (Criteria) this; + } + + public Criteria andRoleIsNotNull() { + addCriterion("role is not null"); + return (Criteria) this; + } + + public Criteria andRoleEqualTo(String value) { + addCriterion("role =", value, "role"); + return (Criteria) this; + } + + public Criteria andRoleNotEqualTo(String value) { + addCriterion("role <>", value, "role"); + return (Criteria) this; + } + + public Criteria andRoleGreaterThan(String value) { + addCriterion("role >", value, "role"); + return (Criteria) this; + } + + public Criteria andRoleGreaterThanOrEqualTo(String value) { + addCriterion("role >=", value, "role"); + return (Criteria) this; + } + + public Criteria andRoleLessThan(String value) { + addCriterion("role <", value, "role"); + return (Criteria) this; + } + + public Criteria andRoleLessThanOrEqualTo(String value) { + addCriterion("role <=", value, "role"); + return (Criteria) this; + } + + public Criteria andRoleLike(String value) { + addCriterion("role like", value, "role"); + return (Criteria) this; + } + + public Criteria andRoleNotLike(String value) { + addCriterion("role not like", value, "role"); + return (Criteria) this; + } + + public Criteria andRoleIn(List values) { + addCriterion("role in", values, "role"); + return (Criteria) this; + } + + public Criteria andRoleNotIn(List values) { + addCriterion("role not in", values, "role"); + return (Criteria) this; + } + + public Criteria andRoleBetween(String value1, String value2) { + addCriterion("role between", value1, value2, "role"); + return (Criteria) this; + } + + public Criteria andRoleNotBetween(String value1, String value2) { + addCriterion("role not between", value1, value2, "role"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNickNameIsNull() { + addCriterion("nick_name is null"); + return (Criteria) this; + } + + public Criteria andNickNameIsNotNull() { + addCriterion("nick_name is not null"); + return (Criteria) this; + } + + public Criteria andNickNameEqualTo(String value) { + addCriterion("nick_name =", value, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameNotEqualTo(String value) { + addCriterion("nick_name <>", value, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameGreaterThan(String value) { + addCriterion("nick_name >", value, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameGreaterThanOrEqualTo(String value) { + addCriterion("nick_name >=", value, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameLessThan(String value) { + addCriterion("nick_name <", value, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameLessThanOrEqualTo(String value) { + addCriterion("nick_name <=", value, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameLike(String value) { + addCriterion("nick_name like", value, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameNotLike(String value) { + addCriterion("nick_name not like", value, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameIn(List values) { + addCriterion("nick_name in", values, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameNotIn(List values) { + addCriterion("nick_name not in", values, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameBetween(String value1, String value2) { + addCriterion("nick_name between", value1, value2, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameNotBetween(String value1, String value2) { + addCriterion("nick_name not between", value1, value2, "nickName"); + return (Criteria) this; + } + + public Criteria andDeviceTypeIsNull() { + addCriterion("device_type is null"); + return (Criteria) this; + } + + public Criteria andDeviceTypeIsNotNull() { + addCriterion("device_type is not null"); + return (Criteria) this; + } + + public Criteria andDeviceTypeEqualTo(String value) { + addCriterion("device_type =", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeNotEqualTo(String value) { + addCriterion("device_type <>", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeGreaterThan(String value) { + addCriterion("device_type >", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeGreaterThanOrEqualTo(String value) { + addCriterion("device_type >=", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeLessThan(String value) { + addCriterion("device_type <", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeLessThanOrEqualTo(String value) { + addCriterion("device_type <=", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeLike(String value) { + addCriterion("device_type like", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeNotLike(String value) { + addCriterion("device_type not like", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeIn(List values) { + addCriterion("device_type in", values, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeNotIn(List values) { + addCriterion("device_type not in", values, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeBetween(String value1, String value2) { + addCriterion("device_type between", value1, value2, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeNotBetween(String value1, String value2) { + addCriterion("device_type not between", value1, value2, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceCodeIsNull() { + addCriterion("device_code is null"); + return (Criteria) this; + } + + public Criteria andDeviceCodeIsNotNull() { + addCriterion("device_code is not null"); + return (Criteria) this; + } + + public Criteria andDeviceCodeEqualTo(String value) { + addCriterion("device_code =", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeNotEqualTo(String value) { + addCriterion("device_code <>", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeGreaterThan(String value) { + addCriterion("device_code >", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeGreaterThanOrEqualTo(String value) { + addCriterion("device_code >=", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeLessThan(String value) { + addCriterion("device_code <", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeLessThanOrEqualTo(String value) { + addCriterion("device_code <=", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeLike(String value) { + addCriterion("device_code like", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeNotLike(String value) { + addCriterion("device_code not like", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeIn(List values) { + addCriterion("device_code in", values, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeNotIn(List values) { + addCriterion("device_code not in", values, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeBetween(String value1, String value2) { + addCriterion("device_code between", value1, value2, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeNotBetween(String value1, String value2) { + addCriterion("device_code not between", value1, value2, "deviceCode"); + return (Criteria) this; + } + + public Criteria andAvatarUrlIsNull() { + addCriterion("avatar_url is null"); + return (Criteria) this; + } + + public Criteria andAvatarUrlIsNotNull() { + addCriterion("avatar_url is not null"); + return (Criteria) this; + } + + public Criteria andAvatarUrlEqualTo(String value) { + addCriterion("avatar_url =", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlNotEqualTo(String value) { + addCriterion("avatar_url <>", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlGreaterThan(String value) { + addCriterion("avatar_url >", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlGreaterThanOrEqualTo(String value) { + addCriterion("avatar_url >=", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlLessThan(String value) { + addCriterion("avatar_url <", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlLessThanOrEqualTo(String value) { + addCriterion("avatar_url <=", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlLike(String value) { + addCriterion("avatar_url like", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlNotLike(String value) { + addCriterion("avatar_url not like", value, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlIn(List values) { + addCriterion("avatar_url in", values, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlNotIn(List values) { + addCriterion("avatar_url not in", values, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlBetween(String value1, String value2) { + addCriterion("avatar_url between", value1, value2, "avatarUrl"); + return (Criteria) this; + } + + public Criteria andAvatarUrlNotBetween(String value1, String value2) { + addCriterion("avatar_url not between", value1, value2, "avatarUrl"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SimulationConversationMessage.java b/src/main/java/club/joylink/rtss/entity/SimulationConversationMessage.java new file mode 100644 index 000000000..3bc6819da --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SimulationConversationMessage.java @@ -0,0 +1,166 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * simulation_conversation_message + * @author + */ +public class SimulationConversationMessage implements Serializable { + private Long id; + + /** + * 会话id + */ + private Long conversationId; + + /** + * 成员id + */ + private Long memberId; + + private Long targetMemberId; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + /** + * 消息类型 + */ + private String type; + + /** + * 文本内容 + */ + private String content; + + /** + * 文件路径 + */ + private String fileUrl; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getConversationId() { + return conversationId; + } + + public void setConversationId(Long conversationId) { + this.conversationId = conversationId; + } + + public Long getMemberId() { + return memberId; + } + + public void setMemberId(Long memberId) { + this.memberId = memberId; + } + + public Long getTargetMemberId() { + return targetMemberId; + } + + public void setTargetMemberId(Long targetMemberId) { + this.targetMemberId = targetMemberId; + } + + public LocalDateTime getCreateTime() { + return createTime; + } + + public void setCreateTime(LocalDateTime createTime) { + this.createTime = createTime; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public String getFileUrl() { + return fileUrl; + } + + public void setFileUrl(String fileUrl) { + this.fileUrl = fileUrl; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + SimulationConversationMessage other = (SimulationConversationMessage) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getConversationId() == null ? other.getConversationId() == null : this.getConversationId().equals(other.getConversationId())) + && (this.getMemberId() == null ? other.getMemberId() == null : this.getMemberId().equals(other.getMemberId())) + && (this.getTargetMemberId() == null ? other.getTargetMemberId() == null : this.getTargetMemberId().equals(other.getTargetMemberId())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) + && (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent())) + && (this.getFileUrl() == null ? other.getFileUrl() == null : this.getFileUrl().equals(other.getFileUrl())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getConversationId() == null) ? 0 : getConversationId().hashCode()); + result = prime * result + ((getMemberId() == null) ? 0 : getMemberId().hashCode()); + result = prime * result + ((getTargetMemberId() == null) ? 0 : getTargetMemberId().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); + result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode()); + result = prime * result + ((getFileUrl() == null) ? 0 : getFileUrl().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", conversationId=").append(conversationId); + sb.append(", memberId=").append(memberId); + sb.append(", targetMemberId=").append(targetMemberId); + sb.append(", createTime=").append(createTime); + sb.append(", type=").append(type); + sb.append(", content=").append(content); + sb.append(", fileUrl=").append(fileUrl); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SimulationConversationMessageExample.java b/src/main/java/club/joylink/rtss/entity/SimulationConversationMessageExample.java new file mode 100644 index 000000000..2eb66b892 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SimulationConversationMessageExample.java @@ -0,0 +1,733 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class SimulationConversationMessageExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Integer offset; + + public SimulationConversationMessageExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Integer offset) { + this.offset = offset; + } + + public Integer getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andConversationIdIsNull() { + addCriterion("conversation_id is null"); + return (Criteria) this; + } + + public Criteria andConversationIdIsNotNull() { + addCriterion("conversation_id is not null"); + return (Criteria) this; + } + + public Criteria andConversationIdEqualTo(Long value) { + addCriterion("conversation_id =", value, "conversationId"); + return (Criteria) this; + } + + public Criteria andConversationIdNotEqualTo(Long value) { + addCriterion("conversation_id <>", value, "conversationId"); + return (Criteria) this; + } + + public Criteria andConversationIdGreaterThan(Long value) { + addCriterion("conversation_id >", value, "conversationId"); + return (Criteria) this; + } + + public Criteria andConversationIdGreaterThanOrEqualTo(Long value) { + addCriterion("conversation_id >=", value, "conversationId"); + return (Criteria) this; + } + + public Criteria andConversationIdLessThan(Long value) { + addCriterion("conversation_id <", value, "conversationId"); + return (Criteria) this; + } + + public Criteria andConversationIdLessThanOrEqualTo(Long value) { + addCriterion("conversation_id <=", value, "conversationId"); + return (Criteria) this; + } + + public Criteria andConversationIdIn(List values) { + addCriterion("conversation_id in", values, "conversationId"); + return (Criteria) this; + } + + public Criteria andConversationIdNotIn(List values) { + addCriterion("conversation_id not in", values, "conversationId"); + return (Criteria) this; + } + + public Criteria andConversationIdBetween(Long value1, Long value2) { + addCriterion("conversation_id between", value1, value2, "conversationId"); + return (Criteria) this; + } + + public Criteria andConversationIdNotBetween(Long value1, Long value2) { + addCriterion("conversation_id not between", value1, value2, "conversationId"); + return (Criteria) this; + } + + public Criteria andMemberIdIsNull() { + addCriterion("member_id is null"); + return (Criteria) this; + } + + public Criteria andMemberIdIsNotNull() { + addCriterion("member_id is not null"); + return (Criteria) this; + } + + public Criteria andMemberIdEqualTo(Long value) { + addCriterion("member_id =", value, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdNotEqualTo(Long value) { + addCriterion("member_id <>", value, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdGreaterThan(Long value) { + addCriterion("member_id >", value, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdGreaterThanOrEqualTo(Long value) { + addCriterion("member_id >=", value, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdLessThan(Long value) { + addCriterion("member_id <", value, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdLessThanOrEqualTo(Long value) { + addCriterion("member_id <=", value, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdIn(List values) { + addCriterion("member_id in", values, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdNotIn(List values) { + addCriterion("member_id not in", values, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdBetween(Long value1, Long value2) { + addCriterion("member_id between", value1, value2, "memberId"); + return (Criteria) this; + } + + public Criteria andMemberIdNotBetween(Long value1, Long value2) { + addCriterion("member_id not between", value1, value2, "memberId"); + return (Criteria) this; + } + + public Criteria andTargetMemberIdIsNull() { + addCriterion("target_member_id is null"); + return (Criteria) this; + } + + public Criteria andTargetMemberIdIsNotNull() { + addCriterion("target_member_id is not null"); + return (Criteria) this; + } + + public Criteria andTargetMemberIdEqualTo(Long value) { + addCriterion("target_member_id =", value, "targetMemberId"); + return (Criteria) this; + } + + public Criteria andTargetMemberIdNotEqualTo(Long value) { + addCriterion("target_member_id <>", value, "targetMemberId"); + return (Criteria) this; + } + + public Criteria andTargetMemberIdGreaterThan(Long value) { + addCriterion("target_member_id >", value, "targetMemberId"); + return (Criteria) this; + } + + public Criteria andTargetMemberIdGreaterThanOrEqualTo(Long value) { + addCriterion("target_member_id >=", value, "targetMemberId"); + return (Criteria) this; + } + + public Criteria andTargetMemberIdLessThan(Long value) { + addCriterion("target_member_id <", value, "targetMemberId"); + return (Criteria) this; + } + + public Criteria andTargetMemberIdLessThanOrEqualTo(Long value) { + addCriterion("target_member_id <=", value, "targetMemberId"); + return (Criteria) this; + } + + public Criteria andTargetMemberIdIn(List values) { + addCriterion("target_member_id in", values, "targetMemberId"); + return (Criteria) this; + } + + public Criteria andTargetMemberIdNotIn(List values) { + addCriterion("target_member_id not in", values, "targetMemberId"); + return (Criteria) this; + } + + public Criteria andTargetMemberIdBetween(Long value1, Long value2) { + addCriterion("target_member_id between", value1, value2, "targetMemberId"); + return (Criteria) this; + } + + public Criteria andTargetMemberIdNotBetween(Long value1, Long value2) { + addCriterion("target_member_id not between", value1, value2, "targetMemberId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("type is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("type is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(String value) { + addCriterion("type =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(String value) { + addCriterion("type <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(String value) { + addCriterion("type >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(String value) { + addCriterion("type >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(String value) { + addCriterion("type <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(String value) { + addCriterion("type <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLike(String value) { + addCriterion("type like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotLike(String value) { + addCriterion("type not like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("type in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("type not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(String value1, String value2) { + addCriterion("type between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(String value1, String value2) { + addCriterion("type not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andContentIsNull() { + addCriterion("content is null"); + return (Criteria) this; + } + + public Criteria andContentIsNotNull() { + addCriterion("content is not null"); + return (Criteria) this; + } + + public Criteria andContentEqualTo(String value) { + addCriterion("content =", value, "content"); + return (Criteria) this; + } + + public Criteria andContentNotEqualTo(String value) { + addCriterion("content <>", value, "content"); + return (Criteria) this; + } + + public Criteria andContentGreaterThan(String value) { + addCriterion("content >", value, "content"); + return (Criteria) this; + } + + public Criteria andContentGreaterThanOrEqualTo(String value) { + addCriterion("content >=", value, "content"); + return (Criteria) this; + } + + public Criteria andContentLessThan(String value) { + addCriterion("content <", value, "content"); + return (Criteria) this; + } + + public Criteria andContentLessThanOrEqualTo(String value) { + addCriterion("content <=", value, "content"); + return (Criteria) this; + } + + public Criteria andContentLike(String value) { + addCriterion("content like", value, "content"); + return (Criteria) this; + } + + public Criteria andContentNotLike(String value) { + addCriterion("content not like", value, "content"); + return (Criteria) this; + } + + public Criteria andContentIn(List values) { + addCriterion("content in", values, "content"); + return (Criteria) this; + } + + public Criteria andContentNotIn(List values) { + addCriterion("content not in", values, "content"); + return (Criteria) this; + } + + public Criteria andContentBetween(String value1, String value2) { + addCriterion("content between", value1, value2, "content"); + return (Criteria) this; + } + + public Criteria andContentNotBetween(String value1, String value2) { + addCriterion("content not between", value1, value2, "content"); + return (Criteria) this; + } + + public Criteria andFileUrlIsNull() { + addCriterion("file_url is null"); + return (Criteria) this; + } + + public Criteria andFileUrlIsNotNull() { + addCriterion("file_url is not null"); + return (Criteria) this; + } + + public Criteria andFileUrlEqualTo(String value) { + addCriterion("file_url =", value, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlNotEqualTo(String value) { + addCriterion("file_url <>", value, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlGreaterThan(String value) { + addCriterion("file_url >", value, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlGreaterThanOrEqualTo(String value) { + addCriterion("file_url >=", value, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlLessThan(String value) { + addCriterion("file_url <", value, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlLessThanOrEqualTo(String value) { + addCriterion("file_url <=", value, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlLike(String value) { + addCriterion("file_url like", value, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlNotLike(String value) { + addCriterion("file_url not like", value, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlIn(List values) { + addCriterion("file_url in", values, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlNotIn(List values) { + addCriterion("file_url not in", values, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlBetween(String value1, String value2) { + addCriterion("file_url between", value1, value2, "fileUrl"); + return (Criteria) this; + } + + public Criteria andFileUrlNotBetween(String value1, String value2) { + addCriterion("file_url not between", value1, value2, "fileUrl"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SimulationFrame.java b/src/main/java/club/joylink/rtss/entity/SimulationFrame.java new file mode 100644 index 000000000..2ef82f3a7 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SimulationFrame.java @@ -0,0 +1,105 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * simulation_frame + * @author + */ +public class SimulationFrame implements Serializable { + private Long id; + + /** + * 仿真记录id + */ + private Long recordId; + + /** + * 帧的记录时间 + */ + private LocalDateTime time; + + /** + * 此帧数据 + */ + private String data; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getRecordId() { + return recordId; + } + + public void setRecordId(Long recordId) { + this.recordId = recordId; + } + + public LocalDateTime getTime() { + return time; + } + + public void setTime(LocalDateTime time) { + this.time = time; + } + + public String getData() { + return data; + } + + public void setData(String data) { + this.data = data; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + SimulationFrame other = (SimulationFrame) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getRecordId() == null ? other.getRecordId() == null : this.getRecordId().equals(other.getRecordId())) + && (this.getTime() == null ? other.getTime() == null : this.getTime().equals(other.getTime())) + && (this.getData() == null ? other.getData() == null : this.getData().equals(other.getData())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getRecordId() == null) ? 0 : getRecordId().hashCode()); + result = prime * result + ((getTime() == null) ? 0 : getTime().hashCode()); + result = prime * result + ((getData() == null) ? 0 : getData().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", recordId=").append(recordId); + sb.append(", time=").append(time); + sb.append(", data=").append(data); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SimulationFrameExample.java b/src/main/java/club/joylink/rtss/entity/SimulationFrameExample.java new file mode 100644 index 000000000..32ad9d481 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SimulationFrameExample.java @@ -0,0 +1,403 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class SimulationFrameExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Integer offset; + + public SimulationFrameExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Integer offset) { + this.offset = offset; + } + + public Integer getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andRecordIdIsNull() { + addCriterion("record_id is null"); + return (Criteria) this; + } + + public Criteria andRecordIdIsNotNull() { + addCriterion("record_id is not null"); + return (Criteria) this; + } + + public Criteria andRecordIdEqualTo(Long value) { + addCriterion("record_id =", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdNotEqualTo(Long value) { + addCriterion("record_id <>", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdGreaterThan(Long value) { + addCriterion("record_id >", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdGreaterThanOrEqualTo(Long value) { + addCriterion("record_id >=", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdLessThan(Long value) { + addCriterion("record_id <", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdLessThanOrEqualTo(Long value) { + addCriterion("record_id <=", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdIn(List values) { + addCriterion("record_id in", values, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdNotIn(List values) { + addCriterion("record_id not in", values, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdBetween(Long value1, Long value2) { + addCriterion("record_id between", value1, value2, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdNotBetween(Long value1, Long value2) { + addCriterion("record_id not between", value1, value2, "recordId"); + return (Criteria) this; + } + + public Criteria andTimeIsNull() { + addCriterion("time is null"); + return (Criteria) this; + } + + public Criteria andTimeIsNotNull() { + addCriterion("time is not null"); + return (Criteria) this; + } + + public Criteria andTimeEqualTo(Date value) { + addCriterion("time =", value, "time"); + return (Criteria) this; + } + + public Criteria andTimeNotEqualTo(Date value) { + addCriterion("time <>", value, "time"); + return (Criteria) this; + } + + public Criteria andTimeGreaterThan(Date value) { + addCriterion("time >", value, "time"); + return (Criteria) this; + } + + public Criteria andTimeGreaterThanOrEqualTo(Date value) { + addCriterion("time >=", value, "time"); + return (Criteria) this; + } + + public Criteria andTimeLessThan(Date value) { + addCriterion("time <", value, "time"); + return (Criteria) this; + } + + public Criteria andTimeLessThanOrEqualTo(Date value) { + addCriterion("time <=", value, "time"); + return (Criteria) this; + } + + public Criteria andTimeIn(List values) { + addCriterion("time in", values, "time"); + return (Criteria) this; + } + + public Criteria andTimeNotIn(List values) { + addCriterion("time not in", values, "time"); + return (Criteria) this; + } + + public Criteria andTimeBetween(Date value1, Date value2) { + addCriterion("time between", value1, value2, "time"); + return (Criteria) this; + } + + public Criteria andTimeNotBetween(Date value1, Date value2) { + addCriterion("time not between", value1, value2, "time"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SimulationProcessRecord.java b/src/main/java/club/joylink/rtss/entity/SimulationProcessRecord.java new file mode 100644 index 000000000..afd5bd7ff --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SimulationProcessRecord.java @@ -0,0 +1,109 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * simulation_process_record + * @author + */ +public class SimulationProcessRecord implements Serializable { + private Long id; + + private String simulationGroup; + + private Long mapId; + + private LocalDateTime dateTime; + + private String socketMessage; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getSimulationGroup() { + return simulationGroup; + } + + public void setSimulationGroup(String simulationGroup) { + this.simulationGroup = simulationGroup; + } + + public Long getMapId() { + return mapId; + } + + public void setMapId(Long mapId) { + this.mapId = mapId; + } + + public LocalDateTime getDateTime() { + return dateTime; + } + + public void setDateTime(LocalDateTime dateTime) { + this.dateTime = dateTime; + } + + public String getSocketMessage() { + return socketMessage; + } + + public void setSocketMessage(String socketMessage) { + this.socketMessage = socketMessage; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + SimulationProcessRecord other = (SimulationProcessRecord) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getSimulationGroup() == null ? other.getSimulationGroup() == null : this.getSimulationGroup().equals(other.getSimulationGroup())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getDateTime() == null ? other.getDateTime() == null : this.getDateTime().equals(other.getDateTime())) + && (this.getSocketMessage() == null ? other.getSocketMessage() == null : this.getSocketMessage().equals(other.getSocketMessage())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getSimulationGroup() == null) ? 0 : getSimulationGroup().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getDateTime() == null) ? 0 : getDateTime().hashCode()); + result = prime * result + ((getSocketMessage() == null) ? 0 : getSocketMessage().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", simulationGroup=").append(simulationGroup); + sb.append(", mapId=").append(mapId); + sb.append(", dateTime=").append(dateTime); + sb.append(", socketMessage=").append(socketMessage); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SimulationProcessRecordExample.java b/src/main/java/club/joylink/rtss/entity/SimulationProcessRecordExample.java new file mode 100644 index 000000000..0999255ec --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SimulationProcessRecordExample.java @@ -0,0 +1,473 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class SimulationProcessRecordExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public SimulationProcessRecordExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andSimulationGroupIsNull() { + addCriterion("simulation_group is null"); + return (Criteria) this; + } + + public Criteria andSimulationGroupIsNotNull() { + addCriterion("simulation_group is not null"); + return (Criteria) this; + } + + public Criteria andSimulationGroupEqualTo(String value) { + addCriterion("simulation_group =", value, "simulationGroup"); + return (Criteria) this; + } + + public Criteria andSimulationGroupNotEqualTo(String value) { + addCriterion("simulation_group <>", value, "simulationGroup"); + return (Criteria) this; + } + + public Criteria andSimulationGroupGreaterThan(String value) { + addCriterion("simulation_group >", value, "simulationGroup"); + return (Criteria) this; + } + + public Criteria andSimulationGroupGreaterThanOrEqualTo(String value) { + addCriterion("simulation_group >=", value, "simulationGroup"); + return (Criteria) this; + } + + public Criteria andSimulationGroupLessThan(String value) { + addCriterion("simulation_group <", value, "simulationGroup"); + return (Criteria) this; + } + + public Criteria andSimulationGroupLessThanOrEqualTo(String value) { + addCriterion("simulation_group <=", value, "simulationGroup"); + return (Criteria) this; + } + + public Criteria andSimulationGroupLike(String value) { + addCriterion("simulation_group like", value, "simulationGroup"); + return (Criteria) this; + } + + public Criteria andSimulationGroupNotLike(String value) { + addCriterion("simulation_group not like", value, "simulationGroup"); + return (Criteria) this; + } + + public Criteria andSimulationGroupIn(List values) { + addCriterion("simulation_group in", values, "simulationGroup"); + return (Criteria) this; + } + + public Criteria andSimulationGroupNotIn(List values) { + addCriterion("simulation_group not in", values, "simulationGroup"); + return (Criteria) this; + } + + public Criteria andSimulationGroupBetween(String value1, String value2) { + addCriterion("simulation_group between", value1, value2, "simulationGroup"); + return (Criteria) this; + } + + public Criteria andSimulationGroupNotBetween(String value1, String value2) { + addCriterion("simulation_group not between", value1, value2, "simulationGroup"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andDateTimeIsNull() { + addCriterion("date_time is null"); + return (Criteria) this; + } + + public Criteria andDateTimeIsNotNull() { + addCriterion("date_time is not null"); + return (Criteria) this; + } + + public Criteria andDateTimeEqualTo(LocalDateTime value) { + addCriterion("date_time =", value, "dateTime"); + return (Criteria) this; + } + + public Criteria andDateTimeNotEqualTo(LocalDateTime value) { + addCriterion("date_time <>", value, "dateTime"); + return (Criteria) this; + } + + public Criteria andDateTimeGreaterThan(LocalDateTime value) { + addCriterion("date_time >", value, "dateTime"); + return (Criteria) this; + } + + public Criteria andDateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("date_time >=", value, "dateTime"); + return (Criteria) this; + } + + public Criteria andDateTimeLessThan(LocalDateTime value) { + addCriterion("date_time <", value, "dateTime"); + return (Criteria) this; + } + + public Criteria andDateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("date_time <=", value, "dateTime"); + return (Criteria) this; + } + + public Criteria andDateTimeIn(List values) { + addCriterion("date_time in", values, "dateTime"); + return (Criteria) this; + } + + public Criteria andDateTimeNotIn(List values) { + addCriterion("date_time not in", values, "dateTime"); + return (Criteria) this; + } + + public Criteria andDateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("date_time between", value1, value2, "dateTime"); + return (Criteria) this; + } + + public Criteria andDateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("date_time not between", value1, value2, "dateTime"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SimulationRecord.java b/src/main/java/club/joylink/rtss/entity/SimulationRecord.java new file mode 100644 index 000000000..ddf185dd4 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SimulationRecord.java @@ -0,0 +1,169 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * simulation_record + * @author + */ +public class SimulationRecord implements Serializable { + private Long id; + + /** + * 地图id + */ + private Long mapId; + + /** + * 地图名称 + */ + private String mapName; + + /** + * 产品类型 + */ + private String prdType; + + /** + * 创建用户id + */ + private Long creatorId; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + /** + * 销毁时间 + */ + private LocalDateTime destroyTime; + + /** + * 状态 + */ + private String status; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getMapId() { + return mapId; + } + + public void setMapId(Long mapId) { + this.mapId = mapId; + } + + public String getMapName() { + return mapName; + } + + public void setMapName(String mapName) { + this.mapName = mapName; + } + + public String getPrdType() { + return prdType; + } + + public void setPrdType(String prdType) { + this.prdType = prdType; + } + + public Long getCreatorId() { + return creatorId; + } + + public void setCreatorId(Long creatorId) { + this.creatorId = creatorId; + } + + public LocalDateTime getCreateTime() { + return createTime; + } + + public void setCreateTime(LocalDateTime createTime) { + this.createTime = createTime; + } + + public LocalDateTime getDestroyTime() { + return destroyTime; + } + + public void setDestroyTime(LocalDateTime destroyTime) { + this.destroyTime = destroyTime; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + SimulationRecord other = (SimulationRecord) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getMapName() == null ? other.getMapName() == null : this.getMapName().equals(other.getMapName())) + && (this.getPrdType() == null ? other.getPrdType() == null : this.getPrdType().equals(other.getPrdType())) + && (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getDestroyTime() == null ? other.getDestroyTime() == null : this.getDestroyTime().equals(other.getDestroyTime())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getMapName() == null) ? 0 : getMapName().hashCode()); + result = prime * result + ((getPrdType() == null) ? 0 : getPrdType().hashCode()); + result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getDestroyTime() == null) ? 0 : getDestroyTime().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", mapId=").append(mapId); + sb.append(", mapName=").append(mapName); + sb.append(", prdType=").append(prdType); + sb.append(", creatorId=").append(creatorId); + sb.append(", createTime=").append(createTime); + sb.append(", destroyTime=").append(destroyTime); + sb.append(", status=").append(status); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SimulationRecordExample.java b/src/main/java/club/joylink/rtss/entity/SimulationRecordExample.java new file mode 100644 index 000000000..dd42418f0 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SimulationRecordExample.java @@ -0,0 +1,733 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class SimulationRecordExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public SimulationRecordExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapNameIsNull() { + addCriterion("map_name is null"); + return (Criteria) this; + } + + public Criteria andMapNameIsNotNull() { + addCriterion("map_name is not null"); + return (Criteria) this; + } + + public Criteria andMapNameEqualTo(String value) { + addCriterion("map_name =", value, "mapName"); + return (Criteria) this; + } + + public Criteria andMapNameNotEqualTo(String value) { + addCriterion("map_name <>", value, "mapName"); + return (Criteria) this; + } + + public Criteria andMapNameGreaterThan(String value) { + addCriterion("map_name >", value, "mapName"); + return (Criteria) this; + } + + public Criteria andMapNameGreaterThanOrEqualTo(String value) { + addCriterion("map_name >=", value, "mapName"); + return (Criteria) this; + } + + public Criteria andMapNameLessThan(String value) { + addCriterion("map_name <", value, "mapName"); + return (Criteria) this; + } + + public Criteria andMapNameLessThanOrEqualTo(String value) { + addCriterion("map_name <=", value, "mapName"); + return (Criteria) this; + } + + public Criteria andMapNameLike(String value) { + addCriterion("map_name like", value, "mapName"); + return (Criteria) this; + } + + public Criteria andMapNameNotLike(String value) { + addCriterion("map_name not like", value, "mapName"); + return (Criteria) this; + } + + public Criteria andMapNameIn(List values) { + addCriterion("map_name in", values, "mapName"); + return (Criteria) this; + } + + public Criteria andMapNameNotIn(List values) { + addCriterion("map_name not in", values, "mapName"); + return (Criteria) this; + } + + public Criteria andMapNameBetween(String value1, String value2) { + addCriterion("map_name between", value1, value2, "mapName"); + return (Criteria) this; + } + + public Criteria andMapNameNotBetween(String value1, String value2) { + addCriterion("map_name not between", value1, value2, "mapName"); + return (Criteria) this; + } + + public Criteria andPrdTypeIsNull() { + addCriterion("prd_type is null"); + return (Criteria) this; + } + + public Criteria andPrdTypeIsNotNull() { + addCriterion("prd_type is not null"); + return (Criteria) this; + } + + public Criteria andPrdTypeEqualTo(String value) { + addCriterion("prd_type =", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotEqualTo(String value) { + addCriterion("prd_type <>", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeGreaterThan(String value) { + addCriterion("prd_type >", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeGreaterThanOrEqualTo(String value) { + addCriterion("prd_type >=", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeLessThan(String value) { + addCriterion("prd_type <", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeLessThanOrEqualTo(String value) { + addCriterion("prd_type <=", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeLike(String value) { + addCriterion("prd_type like", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotLike(String value) { + addCriterion("prd_type not like", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeIn(List values) { + addCriterion("prd_type in", values, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotIn(List values) { + addCriterion("prd_type not in", values, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeBetween(String value1, String value2) { + addCriterion("prd_type between", value1, value2, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotBetween(String value1, String value2) { + addCriterion("prd_type not between", value1, value2, "prdType"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNull() { + addCriterion("creator_id is null"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNotNull() { + addCriterion("creator_id is not null"); + return (Criteria) this; + } + + public Criteria andCreatorIdEqualTo(Long value) { + addCriterion("creator_id =", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotEqualTo(Long value) { + addCriterion("creator_id <>", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThan(Long value) { + addCriterion("creator_id >", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) { + addCriterion("creator_id >=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThan(Long value) { + addCriterion("creator_id <", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThanOrEqualTo(Long value) { + addCriterion("creator_id <=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdIn(List values) { + addCriterion("creator_id in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotIn(List values) { + addCriterion("creator_id not in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdBetween(Long value1, Long value2) { + addCriterion("creator_id between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotBetween(Long value1, Long value2) { + addCriterion("creator_id not between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(LocalDateTime value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(LocalDateTime value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(LocalDateTime value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(LocalDateTime value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andDestroyTimeIsNull() { + addCriterion("destroy_time is null"); + return (Criteria) this; + } + + public Criteria andDestroyTimeIsNotNull() { + addCriterion("destroy_time is not null"); + return (Criteria) this; + } + + public Criteria andDestroyTimeEqualTo(LocalDateTime value) { + addCriterion("destroy_time =", value, "destroyTime"); + return (Criteria) this; + } + + public Criteria andDestroyTimeNotEqualTo(LocalDateTime value) { + addCriterion("destroy_time <>", value, "destroyTime"); + return (Criteria) this; + } + + public Criteria andDestroyTimeGreaterThan(LocalDateTime value) { + addCriterion("destroy_time >", value, "destroyTime"); + return (Criteria) this; + } + + public Criteria andDestroyTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("destroy_time >=", value, "destroyTime"); + return (Criteria) this; + } + + public Criteria andDestroyTimeLessThan(LocalDateTime value) { + addCriterion("destroy_time <", value, "destroyTime"); + return (Criteria) this; + } + + public Criteria andDestroyTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("destroy_time <=", value, "destroyTime"); + return (Criteria) this; + } + + public Criteria andDestroyTimeIn(List values) { + addCriterion("destroy_time in", values, "destroyTime"); + return (Criteria) this; + } + + public Criteria andDestroyTimeNotIn(List values) { + addCriterion("destroy_time not in", values, "destroyTime"); + return (Criteria) this; + } + + public Criteria andDestroyTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("destroy_time between", value1, value2, "destroyTime"); + return (Criteria) this; + } + + public Criteria andDestroyTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("destroy_time not between", value1, value2, "destroyTime"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SimulationRoom.java b/src/main/java/club/joylink/rtss/entity/SimulationRoom.java new file mode 100644 index 000000000..78a98485f --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SimulationRoom.java @@ -0,0 +1,217 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * simulation_room + * @author + */ +public class SimulationRoom implements Serializable { + private Long id; + + /** + * 地图id + */ + private Long mapId; + + /** + * 产品类型 + */ + private String prdType; + + /** + * 综合演练房间编码 + */ + private String code; + + /** + * 名称 + */ + private String name; + + /** + * 可分配角色的权限数量 + */ + private Integer rolePermitAmount; + + /** + * 观众权限数量 + */ + private Integer audiencePermitAmount; + + /** + * 创建人id + */ + private Long creatorId; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + /** + * 销毁时间 + */ + private LocalDateTime destroyTime; + + /** + * 状态 + */ + private String status; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getMapId() { + return mapId; + } + + public void setMapId(Long mapId) { + this.mapId = mapId; + } + + public String getPrdType() { + return prdType; + } + + public void setPrdType(String prdType) { + this.prdType = prdType; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Integer getRolePermitAmount() { + return rolePermitAmount; + } + + public void setRolePermitAmount(Integer rolePermitAmount) { + this.rolePermitAmount = rolePermitAmount; + } + + public Integer getAudiencePermitAmount() { + return audiencePermitAmount; + } + + public void setAudiencePermitAmount(Integer audiencePermitAmount) { + this.audiencePermitAmount = audiencePermitAmount; + } + + public Long getCreatorId() { + return creatorId; + } + + public void setCreatorId(Long creatorId) { + this.creatorId = creatorId; + } + + public LocalDateTime getCreateTime() { + return createTime; + } + + public void setCreateTime(LocalDateTime createTime) { + this.createTime = createTime; + } + + public LocalDateTime getDestroyTime() { + return destroyTime; + } + + public void setDestroyTime(LocalDateTime destroyTime) { + this.destroyTime = destroyTime; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + SimulationRoom other = (SimulationRoom) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getPrdType() == null ? other.getPrdType() == null : this.getPrdType().equals(other.getPrdType())) + && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getRolePermitAmount() == null ? other.getRolePermitAmount() == null : this.getRolePermitAmount().equals(other.getRolePermitAmount())) + && (this.getAudiencePermitAmount() == null ? other.getAudiencePermitAmount() == null : this.getAudiencePermitAmount().equals(other.getAudiencePermitAmount())) + && (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getDestroyTime() == null ? other.getDestroyTime() == null : this.getDestroyTime().equals(other.getDestroyTime())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getPrdType() == null) ? 0 : getPrdType().hashCode()); + result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getRolePermitAmount() == null) ? 0 : getRolePermitAmount().hashCode()); + result = prime * result + ((getAudiencePermitAmount() == null) ? 0 : getAudiencePermitAmount().hashCode()); + result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getDestroyTime() == null) ? 0 : getDestroyTime().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", mapId=").append(mapId); + sb.append(", prdType=").append(prdType); + sb.append(", code=").append(code); + sb.append(", name=").append(name); + sb.append(", rolePermitAmount=").append(rolePermitAmount); + sb.append(", audiencePermitAmount=").append(audiencePermitAmount); + sb.append(", creatorId=").append(creatorId); + sb.append(", createTime=").append(createTime); + sb.append(", destroyTime=").append(destroyTime); + sb.append(", status=").append(status); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SimulationRoomDevice.java b/src/main/java/club/joylink/rtss/entity/SimulationRoomDevice.java new file mode 100644 index 000000000..cae5f32b3 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SimulationRoomDevice.java @@ -0,0 +1,120 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * simulation_room_device + * @author + */ +public class SimulationRoomDevice implements Serializable { + private Long id; + + /** + * 房间id + */ + private Long roomId; + + /** + * 设备类型 + */ + private String deviceType; + + /** + * 关联的设备编码 + */ + private String deviceCode; + + /** + * 状态 + */ + private String status; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getRoomId() { + return roomId; + } + + public void setRoomId(Long roomId) { + this.roomId = roomId; + } + + public String getDeviceType() { + return deviceType; + } + + public void setDeviceType(String deviceType) { + this.deviceType = deviceType; + } + + public String getDeviceCode() { + return deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + SimulationRoomDevice other = (SimulationRoomDevice) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getRoomId() == null ? other.getRoomId() == null : this.getRoomId().equals(other.getRoomId())) + && (this.getDeviceType() == null ? other.getDeviceType() == null : this.getDeviceType().equals(other.getDeviceType())) + && (this.getDeviceCode() == null ? other.getDeviceCode() == null : this.getDeviceCode().equals(other.getDeviceCode())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getRoomId() == null) ? 0 : getRoomId().hashCode()); + result = prime * result + ((getDeviceType() == null) ? 0 : getDeviceType().hashCode()); + result = prime * result + ((getDeviceCode() == null) ? 0 : getDeviceCode().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", roomId=").append(roomId); + sb.append(", deviceType=").append(deviceType); + sb.append(", deviceCode=").append(deviceCode); + sb.append(", status=").append(status); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SimulationRoomDeviceExample.java b/src/main/java/club/joylink/rtss/entity/SimulationRoomDeviceExample.java new file mode 100644 index 000000000..ecad6786d --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SimulationRoomDeviceExample.java @@ -0,0 +1,552 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class SimulationRoomDeviceExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public SimulationRoomDeviceExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andRoomIdIsNull() { + addCriterion("room_id is null"); + return (Criteria) this; + } + + public Criteria andRoomIdIsNotNull() { + addCriterion("room_id is not null"); + return (Criteria) this; + } + + public Criteria andRoomIdEqualTo(Long value) { + addCriterion("room_id =", value, "roomId"); + return (Criteria) this; + } + + public Criteria andRoomIdNotEqualTo(Long value) { + addCriterion("room_id <>", value, "roomId"); + return (Criteria) this; + } + + public Criteria andRoomIdGreaterThan(Long value) { + addCriterion("room_id >", value, "roomId"); + return (Criteria) this; + } + + public Criteria andRoomIdGreaterThanOrEqualTo(Long value) { + addCriterion("room_id >=", value, "roomId"); + return (Criteria) this; + } + + public Criteria andRoomIdLessThan(Long value) { + addCriterion("room_id <", value, "roomId"); + return (Criteria) this; + } + + public Criteria andRoomIdLessThanOrEqualTo(Long value) { + addCriterion("room_id <=", value, "roomId"); + return (Criteria) this; + } + + public Criteria andRoomIdIn(List values) { + addCriterion("room_id in", values, "roomId"); + return (Criteria) this; + } + + public Criteria andRoomIdNotIn(List values) { + addCriterion("room_id not in", values, "roomId"); + return (Criteria) this; + } + + public Criteria andRoomIdBetween(Long value1, Long value2) { + addCriterion("room_id between", value1, value2, "roomId"); + return (Criteria) this; + } + + public Criteria andRoomIdNotBetween(Long value1, Long value2) { + addCriterion("room_id not between", value1, value2, "roomId"); + return (Criteria) this; + } + + public Criteria andDeviceTypeIsNull() { + addCriterion("device_type is null"); + return (Criteria) this; + } + + public Criteria andDeviceTypeIsNotNull() { + addCriterion("device_type is not null"); + return (Criteria) this; + } + + public Criteria andDeviceTypeEqualTo(String value) { + addCriterion("device_type =", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeNotEqualTo(String value) { + addCriterion("device_type <>", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeGreaterThan(String value) { + addCriterion("device_type >", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeGreaterThanOrEqualTo(String value) { + addCriterion("device_type >=", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeLessThan(String value) { + addCriterion("device_type <", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeLessThanOrEqualTo(String value) { + addCriterion("device_type <=", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeLike(String value) { + addCriterion("device_type like", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeNotLike(String value) { + addCriterion("device_type not like", value, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeIn(List values) { + addCriterion("device_type in", values, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeNotIn(List values) { + addCriterion("device_type not in", values, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeBetween(String value1, String value2) { + addCriterion("device_type between", value1, value2, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceTypeNotBetween(String value1, String value2) { + addCriterion("device_type not between", value1, value2, "deviceType"); + return (Criteria) this; + } + + public Criteria andDeviceCodeIsNull() { + addCriterion("device_code is null"); + return (Criteria) this; + } + + public Criteria andDeviceCodeIsNotNull() { + addCriterion("device_code is not null"); + return (Criteria) this; + } + + public Criteria andDeviceCodeEqualTo(String value) { + addCriterion("device_code =", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeNotEqualTo(String value) { + addCriterion("device_code <>", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeGreaterThan(String value) { + addCriterion("device_code >", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeGreaterThanOrEqualTo(String value) { + addCriterion("device_code >=", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeLessThan(String value) { + addCriterion("device_code <", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeLessThanOrEqualTo(String value) { + addCriterion("device_code <=", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeLike(String value) { + addCriterion("device_code like", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeNotLike(String value) { + addCriterion("device_code not like", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeIn(List values) { + addCriterion("device_code in", values, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeNotIn(List values) { + addCriterion("device_code not in", values, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeBetween(String value1, String value2) { + addCriterion("device_code between", value1, value2, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeNotBetween(String value1, String value2) { + addCriterion("device_code not between", value1, value2, "deviceCode"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SimulationRoomExample.java b/src/main/java/club/joylink/rtss/entity/SimulationRoomExample.java new file mode 100644 index 000000000..03893684f --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SimulationRoomExample.java @@ -0,0 +1,923 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class SimulationRoomExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public SimulationRoomExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andPrdTypeIsNull() { + addCriterion("prd_type is null"); + return (Criteria) this; + } + + public Criteria andPrdTypeIsNotNull() { + addCriterion("prd_type is not null"); + return (Criteria) this; + } + + public Criteria andPrdTypeEqualTo(String value) { + addCriterion("prd_type =", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotEqualTo(String value) { + addCriterion("prd_type <>", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeGreaterThan(String value) { + addCriterion("prd_type >", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeGreaterThanOrEqualTo(String value) { + addCriterion("prd_type >=", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeLessThan(String value) { + addCriterion("prd_type <", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeLessThanOrEqualTo(String value) { + addCriterion("prd_type <=", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeLike(String value) { + addCriterion("prd_type like", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotLike(String value) { + addCriterion("prd_type not like", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeIn(List values) { + addCriterion("prd_type in", values, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotIn(List values) { + addCriterion("prd_type not in", values, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeBetween(String value1, String value2) { + addCriterion("prd_type between", value1, value2, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotBetween(String value1, String value2) { + addCriterion("prd_type not between", value1, value2, "prdType"); + return (Criteria) this; + } + + public Criteria andCodeIsNull() { + addCriterion("code is null"); + return (Criteria) this; + } + + public Criteria andCodeIsNotNull() { + addCriterion("code is not null"); + return (Criteria) this; + } + + public Criteria andCodeEqualTo(String value) { + addCriterion("code =", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotEqualTo(String value) { + addCriterion("code <>", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThan(String value) { + addCriterion("code >", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThanOrEqualTo(String value) { + addCriterion("code >=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThan(String value) { + addCriterion("code <", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThanOrEqualTo(String value) { + addCriterion("code <=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLike(String value) { + addCriterion("code like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotLike(String value) { + addCriterion("code not like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeIn(List values) { + addCriterion("code in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotIn(List values) { + addCriterion("code not in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeBetween(String value1, String value2) { + addCriterion("code between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotBetween(String value1, String value2) { + addCriterion("code not between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andRolePermitAmountIsNull() { + addCriterion("role_permit_amount is null"); + return (Criteria) this; + } + + public Criteria andRolePermitAmountIsNotNull() { + addCriterion("role_permit_amount is not null"); + return (Criteria) this; + } + + public Criteria andRolePermitAmountEqualTo(Integer value) { + addCriterion("role_permit_amount =", value, "rolePermitAmount"); + return (Criteria) this; + } + + public Criteria andRolePermitAmountNotEqualTo(Integer value) { + addCriterion("role_permit_amount <>", value, "rolePermitAmount"); + return (Criteria) this; + } + + public Criteria andRolePermitAmountGreaterThan(Integer value) { + addCriterion("role_permit_amount >", value, "rolePermitAmount"); + return (Criteria) this; + } + + public Criteria andRolePermitAmountGreaterThanOrEqualTo(Integer value) { + addCriterion("role_permit_amount >=", value, "rolePermitAmount"); + return (Criteria) this; + } + + public Criteria andRolePermitAmountLessThan(Integer value) { + addCriterion("role_permit_amount <", value, "rolePermitAmount"); + return (Criteria) this; + } + + public Criteria andRolePermitAmountLessThanOrEqualTo(Integer value) { + addCriterion("role_permit_amount <=", value, "rolePermitAmount"); + return (Criteria) this; + } + + public Criteria andRolePermitAmountIn(List values) { + addCriterion("role_permit_amount in", values, "rolePermitAmount"); + return (Criteria) this; + } + + public Criteria andRolePermitAmountNotIn(List values) { + addCriterion("role_permit_amount not in", values, "rolePermitAmount"); + return (Criteria) this; + } + + public Criteria andRolePermitAmountBetween(Integer value1, Integer value2) { + addCriterion("role_permit_amount between", value1, value2, "rolePermitAmount"); + return (Criteria) this; + } + + public Criteria andRolePermitAmountNotBetween(Integer value1, Integer value2) { + addCriterion("role_permit_amount not between", value1, value2, "rolePermitAmount"); + return (Criteria) this; + } + + public Criteria andAudiencePermitAmountIsNull() { + addCriterion("audience_permit_amount is null"); + return (Criteria) this; + } + + public Criteria andAudiencePermitAmountIsNotNull() { + addCriterion("audience_permit_amount is not null"); + return (Criteria) this; + } + + public Criteria andAudiencePermitAmountEqualTo(Integer value) { + addCriterion("audience_permit_amount =", value, "audiencePermitAmount"); + return (Criteria) this; + } + + public Criteria andAudiencePermitAmountNotEqualTo(Integer value) { + addCriterion("audience_permit_amount <>", value, "audiencePermitAmount"); + return (Criteria) this; + } + + public Criteria andAudiencePermitAmountGreaterThan(Integer value) { + addCriterion("audience_permit_amount >", value, "audiencePermitAmount"); + return (Criteria) this; + } + + public Criteria andAudiencePermitAmountGreaterThanOrEqualTo(Integer value) { + addCriterion("audience_permit_amount >=", value, "audiencePermitAmount"); + return (Criteria) this; + } + + public Criteria andAudiencePermitAmountLessThan(Integer value) { + addCriterion("audience_permit_amount <", value, "audiencePermitAmount"); + return (Criteria) this; + } + + public Criteria andAudiencePermitAmountLessThanOrEqualTo(Integer value) { + addCriterion("audience_permit_amount <=", value, "audiencePermitAmount"); + return (Criteria) this; + } + + public Criteria andAudiencePermitAmountIn(List values) { + addCriterion("audience_permit_amount in", values, "audiencePermitAmount"); + return (Criteria) this; + } + + public Criteria andAudiencePermitAmountNotIn(List values) { + addCriterion("audience_permit_amount not in", values, "audiencePermitAmount"); + return (Criteria) this; + } + + public Criteria andAudiencePermitAmountBetween(Integer value1, Integer value2) { + addCriterion("audience_permit_amount between", value1, value2, "audiencePermitAmount"); + return (Criteria) this; + } + + public Criteria andAudiencePermitAmountNotBetween(Integer value1, Integer value2) { + addCriterion("audience_permit_amount not between", value1, value2, "audiencePermitAmount"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNull() { + addCriterion("creator_id is null"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNotNull() { + addCriterion("creator_id is not null"); + return (Criteria) this; + } + + public Criteria andCreatorIdEqualTo(Long value) { + addCriterion("creator_id =", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotEqualTo(Long value) { + addCriterion("creator_id <>", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThan(Long value) { + addCriterion("creator_id >", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) { + addCriterion("creator_id >=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThan(Long value) { + addCriterion("creator_id <", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThanOrEqualTo(Long value) { + addCriterion("creator_id <=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdIn(List values) { + addCriterion("creator_id in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotIn(List values) { + addCriterion("creator_id not in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdBetween(Long value1, Long value2) { + addCriterion("creator_id between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotBetween(Long value1, Long value2) { + addCriterion("creator_id not between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(LocalDateTime value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(LocalDateTime value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(LocalDateTime value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(LocalDateTime value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andDestroyTimeIsNull() { + addCriterion("destroy_time is null"); + return (Criteria) this; + } + + public Criteria andDestroyTimeIsNotNull() { + addCriterion("destroy_time is not null"); + return (Criteria) this; + } + + public Criteria andDestroyTimeEqualTo(LocalDateTime value) { + addCriterion("destroy_time =", value, "destroyTime"); + return (Criteria) this; + } + + public Criteria andDestroyTimeNotEqualTo(LocalDateTime value) { + addCriterion("destroy_time <>", value, "destroyTime"); + return (Criteria) this; + } + + public Criteria andDestroyTimeGreaterThan(LocalDateTime value) { + addCriterion("destroy_time >", value, "destroyTime"); + return (Criteria) this; + } + + public Criteria andDestroyTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("destroy_time >=", value, "destroyTime"); + return (Criteria) this; + } + + public Criteria andDestroyTimeLessThan(LocalDateTime value) { + addCriterion("destroy_time <", value, "destroyTime"); + return (Criteria) this; + } + + public Criteria andDestroyTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("destroy_time <=", value, "destroyTime"); + return (Criteria) this; + } + + public Criteria andDestroyTimeIn(List values) { + addCriterion("destroy_time in", values, "destroyTime"); + return (Criteria) this; + } + + public Criteria andDestroyTimeNotIn(List values) { + addCriterion("destroy_time not in", values, "destroyTime"); + return (Criteria) this; + } + + public Criteria andDestroyTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("destroy_time between", value1, value2, "destroyTime"); + return (Criteria) this; + } + + public Criteria andDestroyTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("destroy_time not between", value1, value2, "destroyTime"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SimulationRoomMember.java b/src/main/java/club/joylink/rtss/entity/SimulationRoomMember.java new file mode 100644 index 000000000..905589e8b --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SimulationRoomMember.java @@ -0,0 +1,200 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * simulation_room_member + * @author + */ +public class SimulationRoomMember implements Serializable { + private Long id; + + /** + * 综合演练室id + */ + private Long roomId; + + /** + * 用户id + */ + private Long userId; + + /** + * 用户昵称 + */ + private String nickName; + + /** + * 用户仿真角色 + */ + private String role; + + /** + * 设备编号 + */ + private String deviceCode; + + /** + * IBP盘角色选择显示的部分 + */ + private String ibpPart; + + /** + * 状态:在线/不在线(在房间/不在房间) + */ + private String status; + + /** + * 是否在房间 + */ + private Boolean inRoom; + + /** + * 是否在仿真 + */ + private Boolean inSimulation; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getRoomId() { + return roomId; + } + + public void setRoomId(Long roomId) { + this.roomId = roomId; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public String getNickName() { + return nickName; + } + + public void setNickName(String nickName) { + this.nickName = nickName; + } + + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + + public String getDeviceCode() { + return deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + public String getIbpPart() { + return ibpPart; + } + + public void setIbpPart(String ibpPart) { + this.ibpPart = ibpPart; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public Boolean getInRoom() { + return inRoom; + } + + public void setInRoom(Boolean inRoom) { + this.inRoom = inRoom; + } + + public Boolean getInSimulation() { + return inSimulation; + } + + public void setInSimulation(Boolean inSimulation) { + this.inSimulation = inSimulation; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + SimulationRoomMember other = (SimulationRoomMember) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getRoomId() == null ? other.getRoomId() == null : this.getRoomId().equals(other.getRoomId())) + && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) + && (this.getNickName() == null ? other.getNickName() == null : this.getNickName().equals(other.getNickName())) + && (this.getRole() == null ? other.getRole() == null : this.getRole().equals(other.getRole())) + && (this.getDeviceCode() == null ? other.getDeviceCode() == null : this.getDeviceCode().equals(other.getDeviceCode())) + && (this.getIbpPart() == null ? other.getIbpPart() == null : this.getIbpPart().equals(other.getIbpPart())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getInRoom() == null ? other.getInRoom() == null : this.getInRoom().equals(other.getInRoom())) + && (this.getInSimulation() == null ? other.getInSimulation() == null : this.getInSimulation().equals(other.getInSimulation())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getRoomId() == null) ? 0 : getRoomId().hashCode()); + result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); + result = prime * result + ((getNickName() == null) ? 0 : getNickName().hashCode()); + result = prime * result + ((getRole() == null) ? 0 : getRole().hashCode()); + result = prime * result + ((getDeviceCode() == null) ? 0 : getDeviceCode().hashCode()); + result = prime * result + ((getIbpPart() == null) ? 0 : getIbpPart().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getInRoom() == null) ? 0 : getInRoom().hashCode()); + result = prime * result + ((getInSimulation() == null) ? 0 : getInSimulation().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", roomId=").append(roomId); + sb.append(", userId=").append(userId); + sb.append(", nickName=").append(nickName); + sb.append(", role=").append(role); + sb.append(", deviceCode=").append(deviceCode); + sb.append(", ibpPart=").append(ibpPart); + sb.append(", status=").append(status); + sb.append(", inRoom=").append(inRoom); + sb.append(", inSimulation=").append(inSimulation); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SimulationRoomMemberExample.java b/src/main/java/club/joylink/rtss/entity/SimulationRoomMemberExample.java new file mode 100644 index 000000000..f57409de4 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SimulationRoomMemberExample.java @@ -0,0 +1,872 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class SimulationRoomMemberExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public SimulationRoomMemberExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andRoomIdIsNull() { + addCriterion("room_id is null"); + return (Criteria) this; + } + + public Criteria andRoomIdIsNotNull() { + addCriterion("room_id is not null"); + return (Criteria) this; + } + + public Criteria andRoomIdEqualTo(Long value) { + addCriterion("room_id =", value, "roomId"); + return (Criteria) this; + } + + public Criteria andRoomIdNotEqualTo(Long value) { + addCriterion("room_id <>", value, "roomId"); + return (Criteria) this; + } + + public Criteria andRoomIdGreaterThan(Long value) { + addCriterion("room_id >", value, "roomId"); + return (Criteria) this; + } + + public Criteria andRoomIdGreaterThanOrEqualTo(Long value) { + addCriterion("room_id >=", value, "roomId"); + return (Criteria) this; + } + + public Criteria andRoomIdLessThan(Long value) { + addCriterion("room_id <", value, "roomId"); + return (Criteria) this; + } + + public Criteria andRoomIdLessThanOrEqualTo(Long value) { + addCriterion("room_id <=", value, "roomId"); + return (Criteria) this; + } + + public Criteria andRoomIdIn(List values) { + addCriterion("room_id in", values, "roomId"); + return (Criteria) this; + } + + public Criteria andRoomIdNotIn(List values) { + addCriterion("room_id not in", values, "roomId"); + return (Criteria) this; + } + + public Criteria andRoomIdBetween(Long value1, Long value2) { + addCriterion("room_id between", value1, value2, "roomId"); + return (Criteria) this; + } + + public Criteria andRoomIdNotBetween(Long value1, Long value2) { + addCriterion("room_id not between", value1, value2, "roomId"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andNickNameIsNull() { + addCriterion("nick_name is null"); + return (Criteria) this; + } + + public Criteria andNickNameIsNotNull() { + addCriterion("nick_name is not null"); + return (Criteria) this; + } + + public Criteria andNickNameEqualTo(String value) { + addCriterion("nick_name =", value, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameNotEqualTo(String value) { + addCriterion("nick_name <>", value, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameGreaterThan(String value) { + addCriterion("nick_name >", value, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameGreaterThanOrEqualTo(String value) { + addCriterion("nick_name >=", value, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameLessThan(String value) { + addCriterion("nick_name <", value, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameLessThanOrEqualTo(String value) { + addCriterion("nick_name <=", value, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameLike(String value) { + addCriterion("nick_name like", value, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameNotLike(String value) { + addCriterion("nick_name not like", value, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameIn(List values) { + addCriterion("nick_name in", values, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameNotIn(List values) { + addCriterion("nick_name not in", values, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameBetween(String value1, String value2) { + addCriterion("nick_name between", value1, value2, "nickName"); + return (Criteria) this; + } + + public Criteria andNickNameNotBetween(String value1, String value2) { + addCriterion("nick_name not between", value1, value2, "nickName"); + return (Criteria) this; + } + + public Criteria andRoleIsNull() { + addCriterion("`role` is null"); + return (Criteria) this; + } + + public Criteria andRoleIsNotNull() { + addCriterion("`role` is not null"); + return (Criteria) this; + } + + public Criteria andRoleEqualTo(String value) { + addCriterion("`role` =", value, "role"); + return (Criteria) this; + } + + public Criteria andRoleNotEqualTo(String value) { + addCriterion("`role` <>", value, "role"); + return (Criteria) this; + } + + public Criteria andRoleGreaterThan(String value) { + addCriterion("`role` >", value, "role"); + return (Criteria) this; + } + + public Criteria andRoleGreaterThanOrEqualTo(String value) { + addCriterion("`role` >=", value, "role"); + return (Criteria) this; + } + + public Criteria andRoleLessThan(String value) { + addCriterion("`role` <", value, "role"); + return (Criteria) this; + } + + public Criteria andRoleLessThanOrEqualTo(String value) { + addCriterion("`role` <=", value, "role"); + return (Criteria) this; + } + + public Criteria andRoleLike(String value) { + addCriterion("`role` like", value, "role"); + return (Criteria) this; + } + + public Criteria andRoleNotLike(String value) { + addCriterion("`role` not like", value, "role"); + return (Criteria) this; + } + + public Criteria andRoleIn(List values) { + addCriterion("`role` in", values, "role"); + return (Criteria) this; + } + + public Criteria andRoleNotIn(List values) { + addCriterion("`role` not in", values, "role"); + return (Criteria) this; + } + + public Criteria andRoleBetween(String value1, String value2) { + addCriterion("`role` between", value1, value2, "role"); + return (Criteria) this; + } + + public Criteria andRoleNotBetween(String value1, String value2) { + addCriterion("`role` not between", value1, value2, "role"); + return (Criteria) this; + } + + public Criteria andDeviceCodeIsNull() { + addCriterion("device_code is null"); + return (Criteria) this; + } + + public Criteria andDeviceCodeIsNotNull() { + addCriterion("device_code is not null"); + return (Criteria) this; + } + + public Criteria andDeviceCodeEqualTo(String value) { + addCriterion("device_code =", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeNotEqualTo(String value) { + addCriterion("device_code <>", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeGreaterThan(String value) { + addCriterion("device_code >", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeGreaterThanOrEqualTo(String value) { + addCriterion("device_code >=", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeLessThan(String value) { + addCriterion("device_code <", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeLessThanOrEqualTo(String value) { + addCriterion("device_code <=", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeLike(String value) { + addCriterion("device_code like", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeNotLike(String value) { + addCriterion("device_code not like", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeIn(List values) { + addCriterion("device_code in", values, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeNotIn(List values) { + addCriterion("device_code not in", values, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeBetween(String value1, String value2) { + addCriterion("device_code between", value1, value2, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeNotBetween(String value1, String value2) { + addCriterion("device_code not between", value1, value2, "deviceCode"); + return (Criteria) this; + } + + public Criteria andIbpPartIsNull() { + addCriterion("ibp_part is null"); + return (Criteria) this; + } + + public Criteria andIbpPartIsNotNull() { + addCriterion("ibp_part is not null"); + return (Criteria) this; + } + + public Criteria andIbpPartEqualTo(String value) { + addCriterion("ibp_part =", value, "ibpPart"); + return (Criteria) this; + } + + public Criteria andIbpPartNotEqualTo(String value) { + addCriterion("ibp_part <>", value, "ibpPart"); + return (Criteria) this; + } + + public Criteria andIbpPartGreaterThan(String value) { + addCriterion("ibp_part >", value, "ibpPart"); + return (Criteria) this; + } + + public Criteria andIbpPartGreaterThanOrEqualTo(String value) { + addCriterion("ibp_part >=", value, "ibpPart"); + return (Criteria) this; + } + + public Criteria andIbpPartLessThan(String value) { + addCriterion("ibp_part <", value, "ibpPart"); + return (Criteria) this; + } + + public Criteria andIbpPartLessThanOrEqualTo(String value) { + addCriterion("ibp_part <=", value, "ibpPart"); + return (Criteria) this; + } + + public Criteria andIbpPartLike(String value) { + addCriterion("ibp_part like", value, "ibpPart"); + return (Criteria) this; + } + + public Criteria andIbpPartNotLike(String value) { + addCriterion("ibp_part not like", value, "ibpPart"); + return (Criteria) this; + } + + public Criteria andIbpPartIn(List values) { + addCriterion("ibp_part in", values, "ibpPart"); + return (Criteria) this; + } + + public Criteria andIbpPartNotIn(List values) { + addCriterion("ibp_part not in", values, "ibpPart"); + return (Criteria) this; + } + + public Criteria andIbpPartBetween(String value1, String value2) { + addCriterion("ibp_part between", value1, value2, "ibpPart"); + return (Criteria) this; + } + + public Criteria andIbpPartNotBetween(String value1, String value2) { + addCriterion("ibp_part not between", value1, value2, "ibpPart"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andInRoomIsNull() { + addCriterion("in_room is null"); + return (Criteria) this; + } + + public Criteria andInRoomIsNotNull() { + addCriterion("in_room is not null"); + return (Criteria) this; + } + + public Criteria andInRoomEqualTo(Boolean value) { + addCriterion("in_room =", value, "inRoom"); + return (Criteria) this; + } + + public Criteria andInRoomNotEqualTo(Boolean value) { + addCriterion("in_room <>", value, "inRoom"); + return (Criteria) this; + } + + public Criteria andInRoomGreaterThan(Boolean value) { + addCriterion("in_room >", value, "inRoom"); + return (Criteria) this; + } + + public Criteria andInRoomGreaterThanOrEqualTo(Boolean value) { + addCriterion("in_room >=", value, "inRoom"); + return (Criteria) this; + } + + public Criteria andInRoomLessThan(Boolean value) { + addCriterion("in_room <", value, "inRoom"); + return (Criteria) this; + } + + public Criteria andInRoomLessThanOrEqualTo(Boolean value) { + addCriterion("in_room <=", value, "inRoom"); + return (Criteria) this; + } + + public Criteria andInRoomIn(List values) { + addCriterion("in_room in", values, "inRoom"); + return (Criteria) this; + } + + public Criteria andInRoomNotIn(List values) { + addCriterion("in_room not in", values, "inRoom"); + return (Criteria) this; + } + + public Criteria andInRoomBetween(Boolean value1, Boolean value2) { + addCriterion("in_room between", value1, value2, "inRoom"); + return (Criteria) this; + } + + public Criteria andInRoomNotBetween(Boolean value1, Boolean value2) { + addCriterion("in_room not between", value1, value2, "inRoom"); + return (Criteria) this; + } + + public Criteria andInSimulationIsNull() { + addCriterion("in_simulation is null"); + return (Criteria) this; + } + + public Criteria andInSimulationIsNotNull() { + addCriterion("in_simulation is not null"); + return (Criteria) this; + } + + public Criteria andInSimulationEqualTo(Boolean value) { + addCriterion("in_simulation =", value, "inSimulation"); + return (Criteria) this; + } + + public Criteria andInSimulationNotEqualTo(Boolean value) { + addCriterion("in_simulation <>", value, "inSimulation"); + return (Criteria) this; + } + + public Criteria andInSimulationGreaterThan(Boolean value) { + addCriterion("in_simulation >", value, "inSimulation"); + return (Criteria) this; + } + + public Criteria andInSimulationGreaterThanOrEqualTo(Boolean value) { + addCriterion("in_simulation >=", value, "inSimulation"); + return (Criteria) this; + } + + public Criteria andInSimulationLessThan(Boolean value) { + addCriterion("in_simulation <", value, "inSimulation"); + return (Criteria) this; + } + + public Criteria andInSimulationLessThanOrEqualTo(Boolean value) { + addCriterion("in_simulation <=", value, "inSimulation"); + return (Criteria) this; + } + + public Criteria andInSimulationIn(List values) { + addCriterion("in_simulation in", values, "inSimulation"); + return (Criteria) this; + } + + public Criteria andInSimulationNotIn(List values) { + addCriterion("in_simulation not in", values, "inSimulation"); + return (Criteria) this; + } + + public Criteria andInSimulationBetween(Boolean value1, Boolean value2) { + addCriterion("in_simulation between", value1, value2, "inSimulation"); + return (Criteria) this; + } + + public Criteria andInSimulationNotBetween(Boolean value1, Boolean value2) { + addCriterion("in_simulation not between", value1, value2, "inSimulation"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SimulationRoomRealDevice.java b/src/main/java/club/joylink/rtss/entity/SimulationRoomRealDevice.java new file mode 100644 index 000000000..84d611cd8 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SimulationRoomRealDevice.java @@ -0,0 +1,104 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * simulation_room_real_device + * @author + */ +public class SimulationRoomRealDevice implements Serializable { + private Long id; + + /** + * 房间id + */ + private Long roomId; + + /** + * 项目真实设备id + */ + private Long projectDeviceId; + + /** + * 关联设备编码 + */ + private String deviceCode; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getRoomId() { + return roomId; + } + + public void setRoomId(Long roomId) { + this.roomId = roomId; + } + + public Long getProjectDeviceId() { + return projectDeviceId; + } + + public void setProjectDeviceId(Long projectDeviceId) { + this.projectDeviceId = projectDeviceId; + } + + public String getDeviceCode() { + return deviceCode; + } + + public void setDeviceCode(String deviceCode) { + this.deviceCode = deviceCode; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + SimulationRoomRealDevice other = (SimulationRoomRealDevice) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getRoomId() == null ? other.getRoomId() == null : this.getRoomId().equals(other.getRoomId())) + && (this.getProjectDeviceId() == null ? other.getProjectDeviceId() == null : this.getProjectDeviceId().equals(other.getProjectDeviceId())) + && (this.getDeviceCode() == null ? other.getDeviceCode() == null : this.getDeviceCode().equals(other.getDeviceCode())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getRoomId() == null) ? 0 : getRoomId().hashCode()); + result = prime * result + ((getProjectDeviceId() == null) ? 0 : getProjectDeviceId().hashCode()); + result = prime * result + ((getDeviceCode() == null) ? 0 : getDeviceCode().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", roomId=").append(roomId); + sb.append(", projectDeviceId=").append(projectDeviceId); + sb.append(", deviceCode=").append(deviceCode); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SimulationRoomRealDeviceExample.java b/src/main/java/club/joylink/rtss/entity/SimulationRoomRealDeviceExample.java new file mode 100644 index 000000000..9da79819b --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SimulationRoomRealDeviceExample.java @@ -0,0 +1,472 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class SimulationRoomRealDeviceExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public SimulationRoomRealDeviceExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andRoomIdIsNull() { + addCriterion("room_id is null"); + return (Criteria) this; + } + + public Criteria andRoomIdIsNotNull() { + addCriterion("room_id is not null"); + return (Criteria) this; + } + + public Criteria andRoomIdEqualTo(Long value) { + addCriterion("room_id =", value, "roomId"); + return (Criteria) this; + } + + public Criteria andRoomIdNotEqualTo(Long value) { + addCriterion("room_id <>", value, "roomId"); + return (Criteria) this; + } + + public Criteria andRoomIdGreaterThan(Long value) { + addCriterion("room_id >", value, "roomId"); + return (Criteria) this; + } + + public Criteria andRoomIdGreaterThanOrEqualTo(Long value) { + addCriterion("room_id >=", value, "roomId"); + return (Criteria) this; + } + + public Criteria andRoomIdLessThan(Long value) { + addCriterion("room_id <", value, "roomId"); + return (Criteria) this; + } + + public Criteria andRoomIdLessThanOrEqualTo(Long value) { + addCriterion("room_id <=", value, "roomId"); + return (Criteria) this; + } + + public Criteria andRoomIdIn(List values) { + addCriterion("room_id in", values, "roomId"); + return (Criteria) this; + } + + public Criteria andRoomIdNotIn(List values) { + addCriterion("room_id not in", values, "roomId"); + return (Criteria) this; + } + + public Criteria andRoomIdBetween(Long value1, Long value2) { + addCriterion("room_id between", value1, value2, "roomId"); + return (Criteria) this; + } + + public Criteria andRoomIdNotBetween(Long value1, Long value2) { + addCriterion("room_id not between", value1, value2, "roomId"); + return (Criteria) this; + } + + public Criteria andProjectDeviceIdIsNull() { + addCriterion("project_device_id is null"); + return (Criteria) this; + } + + public Criteria andProjectDeviceIdIsNotNull() { + addCriterion("project_device_id is not null"); + return (Criteria) this; + } + + public Criteria andProjectDeviceIdEqualTo(Long value) { + addCriterion("project_device_id =", value, "projectDeviceId"); + return (Criteria) this; + } + + public Criteria andProjectDeviceIdNotEqualTo(Long value) { + addCriterion("project_device_id <>", value, "projectDeviceId"); + return (Criteria) this; + } + + public Criteria andProjectDeviceIdGreaterThan(Long value) { + addCriterion("project_device_id >", value, "projectDeviceId"); + return (Criteria) this; + } + + public Criteria andProjectDeviceIdGreaterThanOrEqualTo(Long value) { + addCriterion("project_device_id >=", value, "projectDeviceId"); + return (Criteria) this; + } + + public Criteria andProjectDeviceIdLessThan(Long value) { + addCriterion("project_device_id <", value, "projectDeviceId"); + return (Criteria) this; + } + + public Criteria andProjectDeviceIdLessThanOrEqualTo(Long value) { + addCriterion("project_device_id <=", value, "projectDeviceId"); + return (Criteria) this; + } + + public Criteria andProjectDeviceIdIn(List values) { + addCriterion("project_device_id in", values, "projectDeviceId"); + return (Criteria) this; + } + + public Criteria andProjectDeviceIdNotIn(List values) { + addCriterion("project_device_id not in", values, "projectDeviceId"); + return (Criteria) this; + } + + public Criteria andProjectDeviceIdBetween(Long value1, Long value2) { + addCriterion("project_device_id between", value1, value2, "projectDeviceId"); + return (Criteria) this; + } + + public Criteria andProjectDeviceIdNotBetween(Long value1, Long value2) { + addCriterion("project_device_id not between", value1, value2, "projectDeviceId"); + return (Criteria) this; + } + + public Criteria andDeviceCodeIsNull() { + addCriterion("device_code is null"); + return (Criteria) this; + } + + public Criteria andDeviceCodeIsNotNull() { + addCriterion("device_code is not null"); + return (Criteria) this; + } + + public Criteria andDeviceCodeEqualTo(String value) { + addCriterion("device_code =", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeNotEqualTo(String value) { + addCriterion("device_code <>", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeGreaterThan(String value) { + addCriterion("device_code >", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeGreaterThanOrEqualTo(String value) { + addCriterion("device_code >=", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeLessThan(String value) { + addCriterion("device_code <", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeLessThanOrEqualTo(String value) { + addCriterion("device_code <=", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeLike(String value) { + addCriterion("device_code like", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeNotLike(String value) { + addCriterion("device_code not like", value, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeIn(List values) { + addCriterion("device_code in", values, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeNotIn(List values) { + addCriterion("device_code not in", values, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeBetween(String value1, String value2) { + addCriterion("device_code between", value1, value2, "deviceCode"); + return (Criteria) this; + } + + public Criteria andDeviceCodeNotBetween(String value1, String value2) { + addCriterion("device_code not between", value1, value2, "deviceCode"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SimulationRunAsPlan.java b/src/main/java/club/joylink/rtss/entity/SimulationRunAsPlan.java new file mode 100644 index 000000000..4b33909d7 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SimulationRunAsPlan.java @@ -0,0 +1,137 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * simulation_run_as_plan + * @author + */ +public class SimulationRunAsPlan implements Serializable { + private Long id; + + /** + * 仿真记录id + */ + private Long recordId; + + /** + * 开始时间 + */ + private LocalDateTime startTime; + + /** + * 结束时间 + */ + private LocalDateTime endTime; + + /** + * 使用的每日运行图id + */ + private Long runPlanDailyId; + + /** + * 仿真时刻 + */ + private LocalDateTime systemTime; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getRecordId() { + return recordId; + } + + public void setRecordId(Long recordId) { + this.recordId = recordId; + } + + public LocalDateTime getStartTime() { + return startTime; + } + + public void setStartTime(LocalDateTime startTime) { + this.startTime = startTime; + } + + public LocalDateTime getEndTime() { + return endTime; + } + + public void setEndTime(LocalDateTime endTime) { + this.endTime = endTime; + } + + public Long getRunPlanDailyId() { + return runPlanDailyId; + } + + public void setRunPlanDailyId(Long runPlanDailyId) { + this.runPlanDailyId = runPlanDailyId; + } + + public LocalDateTime getSystemTime() { + return systemTime; + } + + public void setSystemTime(LocalDateTime systemTime) { + this.systemTime = systemTime; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + SimulationRunAsPlan other = (SimulationRunAsPlan) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getRecordId() == null ? other.getRecordId() == null : this.getRecordId().equals(other.getRecordId())) + && (this.getStartTime() == null ? other.getStartTime() == null : this.getStartTime().equals(other.getStartTime())) + && (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime())) + && (this.getRunPlanDailyId() == null ? other.getRunPlanDailyId() == null : this.getRunPlanDailyId().equals(other.getRunPlanDailyId())) + && (this.getSystemTime() == null ? other.getSystemTime() == null : this.getSystemTime().equals(other.getSystemTime())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getRecordId() == null) ? 0 : getRecordId().hashCode()); + result = prime * result + ((getStartTime() == null) ? 0 : getStartTime().hashCode()); + result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode()); + result = prime * result + ((getRunPlanDailyId() == null) ? 0 : getRunPlanDailyId().hashCode()); + result = prime * result + ((getSystemTime() == null) ? 0 : getSystemTime().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", recordId=").append(recordId); + sb.append(", startTime=").append(startTime); + sb.append(", endTime=").append(endTime); + sb.append(", runPlanDailyId=").append(runPlanDailyId); + sb.append(", systemTime=").append(systemTime); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SimulationRunAsPlanExample.java b/src/main/java/club/joylink/rtss/entity/SimulationRunAsPlanExample.java new file mode 100644 index 000000000..6744c3960 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SimulationRunAsPlanExample.java @@ -0,0 +1,583 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class SimulationRunAsPlanExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Integer offset; + + public SimulationRunAsPlanExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Integer offset) { + this.offset = offset; + } + + public Integer getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andRecordIdIsNull() { + addCriterion("record_id is null"); + return (Criteria) this; + } + + public Criteria andRecordIdIsNotNull() { + addCriterion("record_id is not null"); + return (Criteria) this; + } + + public Criteria andRecordIdEqualTo(Long value) { + addCriterion("record_id =", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdNotEqualTo(Long value) { + addCriterion("record_id <>", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdGreaterThan(Long value) { + addCriterion("record_id >", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdGreaterThanOrEqualTo(Long value) { + addCriterion("record_id >=", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdLessThan(Long value) { + addCriterion("record_id <", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdLessThanOrEqualTo(Long value) { + addCriterion("record_id <=", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdIn(List values) { + addCriterion("record_id in", values, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdNotIn(List values) { + addCriterion("record_id not in", values, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdBetween(Long value1, Long value2) { + addCriterion("record_id between", value1, value2, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdNotBetween(Long value1, Long value2) { + addCriterion("record_id not between", value1, value2, "recordId"); + return (Criteria) this; + } + + public Criteria andStartTimeIsNull() { + addCriterion("start_time is null"); + return (Criteria) this; + } + + public Criteria andStartTimeIsNotNull() { + addCriterion("start_time is not null"); + return (Criteria) this; + } + + public Criteria andStartTimeEqualTo(Date value) { + addCriterion("start_time =", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotEqualTo(Date value) { + addCriterion("start_time <>", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeGreaterThan(Date value) { + addCriterion("start_time >", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeGreaterThanOrEqualTo(Date value) { + addCriterion("start_time >=", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeLessThan(Date value) { + addCriterion("start_time <", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeLessThanOrEqualTo(Date value) { + addCriterion("start_time <=", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeIn(List values) { + addCriterion("start_time in", values, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotIn(List values) { + addCriterion("start_time not in", values, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeBetween(Date value1, Date value2) { + addCriterion("start_time between", value1, value2, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotBetween(Date value1, Date value2) { + addCriterion("start_time not between", value1, value2, "startTime"); + return (Criteria) this; + } + + public Criteria andEndTimeIsNull() { + addCriterion("end_time is null"); + return (Criteria) this; + } + + public Criteria andEndTimeIsNotNull() { + addCriterion("end_time is not null"); + return (Criteria) this; + } + + public Criteria andEndTimeEqualTo(Date value) { + addCriterion("end_time =", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeNotEqualTo(Date value) { + addCriterion("end_time <>", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeGreaterThan(Date value) { + addCriterion("end_time >", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeGreaterThanOrEqualTo(Date value) { + addCriterion("end_time >=", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeLessThan(Date value) { + addCriterion("end_time <", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeLessThanOrEqualTo(Date value) { + addCriterion("end_time <=", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeIn(List values) { + addCriterion("end_time in", values, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeNotIn(List values) { + addCriterion("end_time not in", values, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeBetween(Date value1, Date value2) { + addCriterion("end_time between", value1, value2, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeNotBetween(Date value1, Date value2) { + addCriterion("end_time not between", value1, value2, "endTime"); + return (Criteria) this; + } + + public Criteria andRunPlanDailyIdIsNull() { + addCriterion("run_plan_daily_id is null"); + return (Criteria) this; + } + + public Criteria andRunPlanDailyIdIsNotNull() { + addCriterion("run_plan_daily_id is not null"); + return (Criteria) this; + } + + public Criteria andRunPlanDailyIdEqualTo(Long value) { + addCriterion("run_plan_daily_id =", value, "runPlanDailyId"); + return (Criteria) this; + } + + public Criteria andRunPlanDailyIdNotEqualTo(Long value) { + addCriterion("run_plan_daily_id <>", value, "runPlanDailyId"); + return (Criteria) this; + } + + public Criteria andRunPlanDailyIdGreaterThan(Long value) { + addCriterion("run_plan_daily_id >", value, "runPlanDailyId"); + return (Criteria) this; + } + + public Criteria andRunPlanDailyIdGreaterThanOrEqualTo(Long value) { + addCriterion("run_plan_daily_id >=", value, "runPlanDailyId"); + return (Criteria) this; + } + + public Criteria andRunPlanDailyIdLessThan(Long value) { + addCriterion("run_plan_daily_id <", value, "runPlanDailyId"); + return (Criteria) this; + } + + public Criteria andRunPlanDailyIdLessThanOrEqualTo(Long value) { + addCriterion("run_plan_daily_id <=", value, "runPlanDailyId"); + return (Criteria) this; + } + + public Criteria andRunPlanDailyIdIn(List values) { + addCriterion("run_plan_daily_id in", values, "runPlanDailyId"); + return (Criteria) this; + } + + public Criteria andRunPlanDailyIdNotIn(List values) { + addCriterion("run_plan_daily_id not in", values, "runPlanDailyId"); + return (Criteria) this; + } + + public Criteria andRunPlanDailyIdBetween(Long value1, Long value2) { + addCriterion("run_plan_daily_id between", value1, value2, "runPlanDailyId"); + return (Criteria) this; + } + + public Criteria andRunPlanDailyIdNotBetween(Long value1, Long value2) { + addCriterion("run_plan_daily_id not between", value1, value2, "runPlanDailyId"); + return (Criteria) this; + } + + public Criteria andSystemTimeIsNull() { + addCriterion("system_time is null"); + return (Criteria) this; + } + + public Criteria andSystemTimeIsNotNull() { + addCriterion("system_time is not null"); + return (Criteria) this; + } + + public Criteria andSystemTimeEqualTo(Date value) { + addCriterion("system_time =", value, "systemTime"); + return (Criteria) this; + } + + public Criteria andSystemTimeNotEqualTo(Date value) { + addCriterion("system_time <>", value, "systemTime"); + return (Criteria) this; + } + + public Criteria andSystemTimeGreaterThan(Date value) { + addCriterion("system_time >", value, "systemTime"); + return (Criteria) this; + } + + public Criteria andSystemTimeGreaterThanOrEqualTo(Date value) { + addCriterion("system_time >=", value, "systemTime"); + return (Criteria) this; + } + + public Criteria andSystemTimeLessThan(Date value) { + addCriterion("system_time <", value, "systemTime"); + return (Criteria) this; + } + + public Criteria andSystemTimeLessThanOrEqualTo(Date value) { + addCriterion("system_time <=", value, "systemTime"); + return (Criteria) this; + } + + public Criteria andSystemTimeIn(List values) { + addCriterion("system_time in", values, "systemTime"); + return (Criteria) this; + } + + public Criteria andSystemTimeNotIn(List values) { + addCriterion("system_time not in", values, "systemTime"); + return (Criteria) this; + } + + public Criteria andSystemTimeBetween(Date value1, Date value2) { + addCriterion("system_time between", value1, value2, "systemTime"); + return (Criteria) this; + } + + public Criteria andSystemTimeNotBetween(Date value1, Date value2) { + addCriterion("system_time not between", value1, value2, "systemTime"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/StudentClass.java b/src/main/java/club/joylink/rtss/entity/StudentClass.java new file mode 100644 index 000000000..8090a78fd --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/StudentClass.java @@ -0,0 +1,107 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * student_class + * @author + */ +public class StudentClass implements Serializable { + /** + * 班级表id + */ + private Integer id; + + /** + * 班级名 + */ + private String name; + + /** + * 归属项目 + */ + private String projectCode; + + /** + * 创建者id + */ + private Long creatorId; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getProjectCode() { + return projectCode; + } + + public void setProjectCode(String projectCode) { + this.projectCode = projectCode; + } + + public Long getCreatorId() { + return creatorId; + } + + public void setCreatorId(Long creatorId) { + this.creatorId = creatorId; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + StudentClass other = (StudentClass) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getProjectCode() == null ? other.getProjectCode() == null : this.getProjectCode().equals(other.getProjectCode())) + && (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getProjectCode() == null) ? 0 : getProjectCode().hashCode()); + result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", name=").append(name); + sb.append(", projectCode=").append(projectCode); + sb.append(", creatorId=").append(creatorId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/StudentClassExample.java b/src/main/java/club/joylink/rtss/entity/StudentClassExample.java new file mode 100644 index 000000000..3ea9ebbef --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/StudentClassExample.java @@ -0,0 +1,482 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class StudentClassExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public StudentClassExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Integer value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Integer value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Integer value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Integer value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Integer value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Integer value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Integer value1, Integer value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Integer value1, Integer value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andProjectCodeIsNull() { + addCriterion("project_code is null"); + return (Criteria) this; + } + + public Criteria andProjectCodeIsNotNull() { + addCriterion("project_code is not null"); + return (Criteria) this; + } + + public Criteria andProjectCodeEqualTo(String value) { + addCriterion("project_code =", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeNotEqualTo(String value) { + addCriterion("project_code <>", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeGreaterThan(String value) { + addCriterion("project_code >", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeGreaterThanOrEqualTo(String value) { + addCriterion("project_code >=", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeLessThan(String value) { + addCriterion("project_code <", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeLessThanOrEqualTo(String value) { + addCriterion("project_code <=", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeLike(String value) { + addCriterion("project_code like", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeNotLike(String value) { + addCriterion("project_code not like", value, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeIn(List values) { + addCriterion("project_code in", values, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeNotIn(List values) { + addCriterion("project_code not in", values, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeBetween(String value1, String value2) { + addCriterion("project_code between", value1, value2, "projectCode"); + return (Criteria) this; + } + + public Criteria andProjectCodeNotBetween(String value1, String value2) { + addCriterion("project_code not between", value1, value2, "projectCode"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNull() { + addCriterion("creator_id is null"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNotNull() { + addCriterion("creator_id is not null"); + return (Criteria) this; + } + + public Criteria andCreatorIdEqualTo(Long value) { + addCriterion("creator_id =", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotEqualTo(Long value) { + addCriterion("creator_id <>", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThan(Long value) { + addCriterion("creator_id >", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) { + addCriterion("creator_id >=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThan(Long value) { + addCriterion("creator_id <", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThanOrEqualTo(Long value) { + addCriterion("creator_id <=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdIn(List values) { + addCriterion("creator_id in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotIn(List values) { + addCriterion("creator_id not in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdBetween(Long value1, Long value2) { + addCriterion("creator_id between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotBetween(Long value1, Long value2) { + addCriterion("creator_id not between", value1, value2, "creatorId"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/StudentRelExamClass.java b/src/main/java/club/joylink/rtss/entity/StudentRelExamClass.java new file mode 100644 index 000000000..86a64ccbc --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/StudentRelExamClass.java @@ -0,0 +1,69 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * student_rel_exam_class + * @author + */ +public class StudentRelExamClass implements Serializable { + private Long examId; + + private Integer classId; + + private static final long serialVersionUID = 1L; + + public Long getExamId() { + return examId; + } + + public void setExamId(Long examId) { + this.examId = examId; + } + + public Integer getClassId() { + return classId; + } + + public void setClassId(Integer classId) { + this.classId = classId; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + StudentRelExamClass other = (StudentRelExamClass) that; + return (this.getExamId() == null ? other.getExamId() == null : this.getExamId().equals(other.getExamId())) + && (this.getClassId() == null ? other.getClassId() == null : this.getClassId().equals(other.getClassId())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getExamId() == null) ? 0 : getExamId().hashCode()); + result = prime * result + ((getClassId() == null) ? 0 : getClassId().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", examId=").append(examId); + sb.append(", classId=").append(classId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/StudentRelExamClassExample.java b/src/main/java/club/joylink/rtss/entity/StudentRelExamClassExample.java new file mode 100644 index 000000000..b5c1ea5f5 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/StudentRelExamClassExample.java @@ -0,0 +1,342 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class StudentRelExamClassExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public StudentRelExamClassExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andExamIdIsNull() { + addCriterion("exam_id is null"); + return (Criteria) this; + } + + public Criteria andExamIdIsNotNull() { + addCriterion("exam_id is not null"); + return (Criteria) this; + } + + public Criteria andExamIdEqualTo(Long value) { + addCriterion("exam_id =", value, "examId"); + return (Criteria) this; + } + + public Criteria andExamIdNotEqualTo(Long value) { + addCriterion("exam_id <>", value, "examId"); + return (Criteria) this; + } + + public Criteria andExamIdGreaterThan(Long value) { + addCriterion("exam_id >", value, "examId"); + return (Criteria) this; + } + + public Criteria andExamIdGreaterThanOrEqualTo(Long value) { + addCriterion("exam_id >=", value, "examId"); + return (Criteria) this; + } + + public Criteria andExamIdLessThan(Long value) { + addCriterion("exam_id <", value, "examId"); + return (Criteria) this; + } + + public Criteria andExamIdLessThanOrEqualTo(Long value) { + addCriterion("exam_id <=", value, "examId"); + return (Criteria) this; + } + + public Criteria andExamIdIn(List values) { + addCriterion("exam_id in", values, "examId"); + return (Criteria) this; + } + + public Criteria andExamIdNotIn(List values) { + addCriterion("exam_id not in", values, "examId"); + return (Criteria) this; + } + + public Criteria andExamIdBetween(Long value1, Long value2) { + addCriterion("exam_id between", value1, value2, "examId"); + return (Criteria) this; + } + + public Criteria andExamIdNotBetween(Long value1, Long value2) { + addCriterion("exam_id not between", value1, value2, "examId"); + return (Criteria) this; + } + + public Criteria andClassIdIsNull() { + addCriterion("class_id is null"); + return (Criteria) this; + } + + public Criteria andClassIdIsNotNull() { + addCriterion("class_id is not null"); + return (Criteria) this; + } + + public Criteria andClassIdEqualTo(Integer value) { + addCriterion("class_id =", value, "classId"); + return (Criteria) this; + } + + public Criteria andClassIdNotEqualTo(Integer value) { + addCriterion("class_id <>", value, "classId"); + return (Criteria) this; + } + + public Criteria andClassIdGreaterThan(Integer value) { + addCriterion("class_id >", value, "classId"); + return (Criteria) this; + } + + public Criteria andClassIdGreaterThanOrEqualTo(Integer value) { + addCriterion("class_id >=", value, "classId"); + return (Criteria) this; + } + + public Criteria andClassIdLessThan(Integer value) { + addCriterion("class_id <", value, "classId"); + return (Criteria) this; + } + + public Criteria andClassIdLessThanOrEqualTo(Integer value) { + addCriterion("class_id <=", value, "classId"); + return (Criteria) this; + } + + public Criteria andClassIdIn(List values) { + addCriterion("class_id in", values, "classId"); + return (Criteria) this; + } + + public Criteria andClassIdNotIn(List values) { + addCriterion("class_id not in", values, "classId"); + return (Criteria) this; + } + + public Criteria andClassIdBetween(Integer value1, Integer value2) { + addCriterion("class_id between", value1, value2, "classId"); + return (Criteria) this; + } + + public Criteria andClassIdNotBetween(Integer value1, Integer value2) { + addCriterion("class_id not between", value1, value2, "classId"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/StudentRelIdClass.java b/src/main/java/club/joylink/rtss/entity/StudentRelIdClass.java new file mode 100644 index 000000000..264d04e02 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/StudentRelIdClass.java @@ -0,0 +1,75 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * student_rel_id_class + * @author + */ +public class StudentRelIdClass implements Serializable { + /** + * 班级id + */ + private Integer classId; + + /** + * 学生用户id + */ + private Long studentUserId; + + private static final long serialVersionUID = 1L; + + public Integer getClassId() { + return classId; + } + + public void setClassId(Integer classId) { + this.classId = classId; + } + + public Long getStudentUserId() { + return studentUserId; + } + + public void setStudentUserId(Long studentUserId) { + this.studentUserId = studentUserId; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + StudentRelIdClass other = (StudentRelIdClass) that; + return (this.getClassId() == null ? other.getClassId() == null : this.getClassId().equals(other.getClassId())) + && (this.getStudentUserId() == null ? other.getStudentUserId() == null : this.getStudentUserId().equals(other.getStudentUserId())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getClassId() == null) ? 0 : getClassId().hashCode()); + result = prime * result + ((getStudentUserId() == null) ? 0 : getStudentUserId().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", classId=").append(classId); + sb.append(", studentUserId=").append(studentUserId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/StudentRelIdClassExample.java b/src/main/java/club/joylink/rtss/entity/StudentRelIdClassExample.java new file mode 100644 index 000000000..a9aab3e77 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/StudentRelIdClassExample.java @@ -0,0 +1,342 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class StudentRelIdClassExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public StudentRelIdClassExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andClassIdIsNull() { + addCriterion("class_id is null"); + return (Criteria) this; + } + + public Criteria andClassIdIsNotNull() { + addCriterion("class_id is not null"); + return (Criteria) this; + } + + public Criteria andClassIdEqualTo(Integer value) { + addCriterion("class_id =", value, "classId"); + return (Criteria) this; + } + + public Criteria andClassIdNotEqualTo(Integer value) { + addCriterion("class_id <>", value, "classId"); + return (Criteria) this; + } + + public Criteria andClassIdGreaterThan(Integer value) { + addCriterion("class_id >", value, "classId"); + return (Criteria) this; + } + + public Criteria andClassIdGreaterThanOrEqualTo(Integer value) { + addCriterion("class_id >=", value, "classId"); + return (Criteria) this; + } + + public Criteria andClassIdLessThan(Integer value) { + addCriterion("class_id <", value, "classId"); + return (Criteria) this; + } + + public Criteria andClassIdLessThanOrEqualTo(Integer value) { + addCriterion("class_id <=", value, "classId"); + return (Criteria) this; + } + + public Criteria andClassIdIn(List values) { + addCriterion("class_id in", values, "classId"); + return (Criteria) this; + } + + public Criteria andClassIdNotIn(List values) { + addCriterion("class_id not in", values, "classId"); + return (Criteria) this; + } + + public Criteria andClassIdBetween(Integer value1, Integer value2) { + addCriterion("class_id between", value1, value2, "classId"); + return (Criteria) this; + } + + public Criteria andClassIdNotBetween(Integer value1, Integer value2) { + addCriterion("class_id not between", value1, value2, "classId"); + return (Criteria) this; + } + + public Criteria andStudentUserIdIsNull() { + addCriterion("student_user_id is null"); + return (Criteria) this; + } + + public Criteria andStudentUserIdIsNotNull() { + addCriterion("student_user_id is not null"); + return (Criteria) this; + } + + public Criteria andStudentUserIdEqualTo(Long value) { + addCriterion("student_user_id =", value, "studentUserId"); + return (Criteria) this; + } + + public Criteria andStudentUserIdNotEqualTo(Long value) { + addCriterion("student_user_id <>", value, "studentUserId"); + return (Criteria) this; + } + + public Criteria andStudentUserIdGreaterThan(Long value) { + addCriterion("student_user_id >", value, "studentUserId"); + return (Criteria) this; + } + + public Criteria andStudentUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("student_user_id >=", value, "studentUserId"); + return (Criteria) this; + } + + public Criteria andStudentUserIdLessThan(Long value) { + addCriterion("student_user_id <", value, "studentUserId"); + return (Criteria) this; + } + + public Criteria andStudentUserIdLessThanOrEqualTo(Long value) { + addCriterion("student_user_id <=", value, "studentUserId"); + return (Criteria) this; + } + + public Criteria andStudentUserIdIn(List values) { + addCriterion("student_user_id in", values, "studentUserId"); + return (Criteria) this; + } + + public Criteria andStudentUserIdNotIn(List values) { + addCriterion("student_user_id not in", values, "studentUserId"); + return (Criteria) this; + } + + public Criteria andStudentUserIdBetween(Long value1, Long value2) { + addCriterion("student_user_id between", value1, value2, "studentUserId"); + return (Criteria) this; + } + + public Criteria andStudentUserIdNotBetween(Long value1, Long value2) { + addCriterion("student_user_id not between", value1, value2, "studentUserId"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/StudentRelLessonClass.java b/src/main/java/club/joylink/rtss/entity/StudentRelLessonClass.java new file mode 100644 index 000000000..05db17752 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/StudentRelLessonClass.java @@ -0,0 +1,75 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * student_rel_lesson_class + * @author + */ +public class StudentRelLessonClass implements Serializable { + /** + * 课程id + */ + private Long lessonId; + + /** + * 班级id + */ + private Integer classId; + + private static final long serialVersionUID = 1L; + + public Long getLessonId() { + return lessonId; + } + + public void setLessonId(Long lessonId) { + this.lessonId = lessonId; + } + + public Integer getClassId() { + return classId; + } + + public void setClassId(Integer classId) { + this.classId = classId; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + StudentRelLessonClass other = (StudentRelLessonClass) that; + return (this.getLessonId() == null ? other.getLessonId() == null : this.getLessonId().equals(other.getLessonId())) + && (this.getClassId() == null ? other.getClassId() == null : this.getClassId().equals(other.getClassId())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getLessonId() == null) ? 0 : getLessonId().hashCode()); + result = prime * result + ((getClassId() == null) ? 0 : getClassId().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", lessonId=").append(lessonId); + sb.append(", classId=").append(classId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/StudentRelLessonClassExample.java b/src/main/java/club/joylink/rtss/entity/StudentRelLessonClassExample.java new file mode 100644 index 000000000..d8c0a7154 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/StudentRelLessonClassExample.java @@ -0,0 +1,342 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class StudentRelLessonClassExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public StudentRelLessonClassExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andLessonIdIsNull() { + addCriterion("lesson_id is null"); + return (Criteria) this; + } + + public Criteria andLessonIdIsNotNull() { + addCriterion("lesson_id is not null"); + return (Criteria) this; + } + + public Criteria andLessonIdEqualTo(Long value) { + addCriterion("lesson_id =", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdNotEqualTo(Long value) { + addCriterion("lesson_id <>", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdGreaterThan(Long value) { + addCriterion("lesson_id >", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdGreaterThanOrEqualTo(Long value) { + addCriterion("lesson_id >=", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdLessThan(Long value) { + addCriterion("lesson_id <", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdLessThanOrEqualTo(Long value) { + addCriterion("lesson_id <=", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdIn(List values) { + addCriterion("lesson_id in", values, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdNotIn(List values) { + addCriterion("lesson_id not in", values, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdBetween(Long value1, Long value2) { + addCriterion("lesson_id between", value1, value2, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdNotBetween(Long value1, Long value2) { + addCriterion("lesson_id not between", value1, value2, "lessonId"); + return (Criteria) this; + } + + public Criteria andClassIdIsNull() { + addCriterion("class_id is null"); + return (Criteria) this; + } + + public Criteria andClassIdIsNotNull() { + addCriterion("class_id is not null"); + return (Criteria) this; + } + + public Criteria andClassIdEqualTo(Integer value) { + addCriterion("class_id =", value, "classId"); + return (Criteria) this; + } + + public Criteria andClassIdNotEqualTo(Integer value) { + addCriterion("class_id <>", value, "classId"); + return (Criteria) this; + } + + public Criteria andClassIdGreaterThan(Integer value) { + addCriterion("class_id >", value, "classId"); + return (Criteria) this; + } + + public Criteria andClassIdGreaterThanOrEqualTo(Integer value) { + addCriterion("class_id >=", value, "classId"); + return (Criteria) this; + } + + public Criteria andClassIdLessThan(Integer value) { + addCriterion("class_id <", value, "classId"); + return (Criteria) this; + } + + public Criteria andClassIdLessThanOrEqualTo(Integer value) { + addCriterion("class_id <=", value, "classId"); + return (Criteria) this; + } + + public Criteria andClassIdIn(List values) { + addCriterion("class_id in", values, "classId"); + return (Criteria) this; + } + + public Criteria andClassIdNotIn(List values) { + addCriterion("class_id not in", values, "classId"); + return (Criteria) this; + } + + public Criteria andClassIdBetween(Integer value1, Integer value2) { + addCriterion("class_id between", value1, value2, "classId"); + return (Criteria) this; + } + + public Criteria andClassIdNotBetween(Integer value1, Integer value2) { + addCriterion("class_id not between", value1, value2, "classId"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SysDictionary.java b/src/main/java/club/joylink/rtss/entity/SysDictionary.java new file mode 100644 index 000000000..ebaab753b --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SysDictionary.java @@ -0,0 +1,132 @@ +package club.joylink.rtss.entity; + +import club.joylink.rtss.vo.client.DictionaryVO; + +import java.io.Serializable; + +/** + * sys_dictionary + * @author + */ +public class SysDictionary implements Serializable { + private Long id; + + /** + * 编号 + */ + private String code; + + /** + * 名称 + */ + private String name; + + /** + * 状态:0-禁用,1-启用 + */ + private String status; + + /** + * 备注说明 + */ + private String remarks; + + private static final long serialVersionUID = 1L; + + public SysDictionary() {} + + public SysDictionary(DictionaryVO dicVo) { + this.id = dicVo.getId() != null ? Long.valueOf(dicVo.getId()):null; + this.code = dicVo.getCode(); + this.name = dicVo.getName(); + this.status = dicVo.getStatus(); + this.remarks = dicVo.getRemarks(); + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getRemarks() { + return remarks; + } + + public void setRemarks(String remarks) { + this.remarks = remarks; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + SysDictionary other = (SysDictionary) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", code=").append(code); + sb.append(", name=").append(name); + sb.append(", status=").append(status); + sb.append(", remarks=").append(remarks); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SysDictionaryDetail.java b/src/main/java/club/joylink/rtss/entity/SysDictionaryDetail.java new file mode 100644 index 000000000..500fdb75d --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SysDictionaryDetail.java @@ -0,0 +1,149 @@ +package club.joylink.rtss.entity; + +import club.joylink.rtss.vo.client.DictionaryDetailVO; + +import java.io.Serializable; + +/** + * sys_dictionary_detail + * @author + */ +public class SysDictionaryDetail implements Serializable { + private Long id; + + /** + * 编码 + */ + private String code; + + /** + * 名称 + */ + private String name; + + /** + * 状态:0-禁用,1-启用 + */ + private String status; + + /** + * 字典id + */ + private Long dicId; + + /** + * 备注说明 + */ + private String remarks; + + private static final long serialVersionUID = 1L; + + public SysDictionaryDetail() {} + + public SysDictionaryDetail(DictionaryDetailVO detailVo) { + this.id = detailVo.getId() != null ? Long.valueOf(detailVo.getId()) : null; + this.dicId = detailVo.getDicId(); + this.code = detailVo.getCode(); + this.name = detailVo.getName(); + this.status = detailVo.getStatus(); + this.remarks = detailVo.getRemarks(); + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public Long getDicId() { + return dicId; + } + + public void setDicId(Long dicId) { + this.dicId = dicId; + } + + public String getRemarks() { + return remarks; + } + + public void setRemarks(String remarks) { + this.remarks = remarks; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + SysDictionaryDetail other = (SysDictionaryDetail) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getDicId() == null ? other.getDicId() == null : this.getDicId().equals(other.getDicId())) + && (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getDicId() == null) ? 0 : getDicId().hashCode()); + result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", code=").append(code); + sb.append(", name=").append(name); + sb.append(", status=").append(status); + sb.append(", dicId=").append(dicId); + sb.append(", remarks=").append(remarks); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SysDictionaryDetailExample.java b/src/main/java/club/joylink/rtss/entity/SysDictionaryDetailExample.java new file mode 100644 index 000000000..a45b395fd --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SysDictionaryDetailExample.java @@ -0,0 +1,622 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class SysDictionaryDetailExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Integer offset; + + public SysDictionaryDetailExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Integer offset) { + this.offset = offset; + } + + public Integer getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCodeIsNull() { + addCriterion("code is null"); + return (Criteria) this; + } + + public Criteria andCodeIsNotNull() { + addCriterion("code is not null"); + return (Criteria) this; + } + + public Criteria andCodeEqualTo(String value) { + addCriterion("code =", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotEqualTo(String value) { + addCriterion("code <>", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThan(String value) { + addCriterion("code >", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThanOrEqualTo(String value) { + addCriterion("code >=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThan(String value) { + addCriterion("code <", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThanOrEqualTo(String value) { + addCriterion("code <=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLike(String value) { + addCriterion("code like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotLike(String value) { + addCriterion("code not like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeIn(List values) { + addCriterion("code in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotIn(List values) { + addCriterion("code not in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeBetween(String value1, String value2) { + addCriterion("code between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotBetween(String value1, String value2) { + addCriterion("code not between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("status is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("status is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("status =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("status <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("status >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("status >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("status <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("status <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("status like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("status not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("status in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("status not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("status between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("status not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andDicIdIsNull() { + addCriterion("dic_id is null"); + return (Criteria) this; + } + + public Criteria andDicIdIsNotNull() { + addCriterion("dic_id is not null"); + return (Criteria) this; + } + + public Criteria andDicIdEqualTo(Long value) { + addCriterion("dic_id =", value, "dicId"); + return (Criteria) this; + } + + public Criteria andDicIdNotEqualTo(Long value) { + addCriterion("dic_id <>", value, "dicId"); + return (Criteria) this; + } + + public Criteria andDicIdGreaterThan(Long value) { + addCriterion("dic_id >", value, "dicId"); + return (Criteria) this; + } + + public Criteria andDicIdGreaterThanOrEqualTo(Long value) { + addCriterion("dic_id >=", value, "dicId"); + return (Criteria) this; + } + + public Criteria andDicIdLessThan(Long value) { + addCriterion("dic_id <", value, "dicId"); + return (Criteria) this; + } + + public Criteria andDicIdLessThanOrEqualTo(Long value) { + addCriterion("dic_id <=", value, "dicId"); + return (Criteria) this; + } + + public Criteria andDicIdIn(List values) { + addCriterion("dic_id in", values, "dicId"); + return (Criteria) this; + } + + public Criteria andDicIdNotIn(List values) { + addCriterion("dic_id not in", values, "dicId"); + return (Criteria) this; + } + + public Criteria andDicIdBetween(Long value1, Long value2) { + addCriterion("dic_id between", value1, value2, "dicId"); + return (Criteria) this; + } + + public Criteria andDicIdNotBetween(Long value1, Long value2) { + addCriterion("dic_id not between", value1, value2, "dicId"); + return (Criteria) this; + } + + public Criteria andRemarksIsNull() { + addCriterion("remarks is null"); + return (Criteria) this; + } + + public Criteria andRemarksIsNotNull() { + addCriterion("remarks is not null"); + return (Criteria) this; + } + + public Criteria andRemarksEqualTo(String value) { + addCriterion("remarks =", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotEqualTo(String value) { + addCriterion("remarks <>", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksGreaterThan(String value) { + addCriterion("remarks >", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksGreaterThanOrEqualTo(String value) { + addCriterion("remarks >=", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLessThan(String value) { + addCriterion("remarks <", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLessThanOrEqualTo(String value) { + addCriterion("remarks <=", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLike(String value) { + addCriterion("remarks like", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotLike(String value) { + addCriterion("remarks not like", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksIn(List values) { + addCriterion("remarks in", values, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotIn(List values) { + addCriterion("remarks not in", values, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksBetween(String value1, String value2) { + addCriterion("remarks between", value1, value2, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotBetween(String value1, String value2) { + addCriterion("remarks not between", value1, value2, "remarks"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SysDictionaryExample.java b/src/main/java/club/joylink/rtss/entity/SysDictionaryExample.java new file mode 100644 index 000000000..87e6368e5 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SysDictionaryExample.java @@ -0,0 +1,562 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class SysDictionaryExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Integer offset; + + public SysDictionaryExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Integer offset) { + this.offset = offset; + } + + public Integer getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCodeIsNull() { + addCriterion("code is null"); + return (Criteria) this; + } + + public Criteria andCodeIsNotNull() { + addCriterion("code is not null"); + return (Criteria) this; + } + + public Criteria andCodeEqualTo(String value) { + addCriterion("code =", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotEqualTo(String value) { + addCriterion("code <>", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThan(String value) { + addCriterion("code >", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThanOrEqualTo(String value) { + addCriterion("code >=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThan(String value) { + addCriterion("code <", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThanOrEqualTo(String value) { + addCriterion("code <=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLike(String value) { + addCriterion("code like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotLike(String value) { + addCriterion("code not like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeIn(List values) { + addCriterion("code in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotIn(List values) { + addCriterion("code not in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeBetween(String value1, String value2) { + addCriterion("code between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotBetween(String value1, String value2) { + addCriterion("code not between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("status is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("status is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("status =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("status <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("status >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("status >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("status <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("status <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("status like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("status not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("status in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("status not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("status between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("status not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andRemarksIsNull() { + addCriterion("remarks is null"); + return (Criteria) this; + } + + public Criteria andRemarksIsNotNull() { + addCriterion("remarks is not null"); + return (Criteria) this; + } + + public Criteria andRemarksEqualTo(String value) { + addCriterion("remarks =", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotEqualTo(String value) { + addCriterion("remarks <>", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksGreaterThan(String value) { + addCriterion("remarks >", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksGreaterThanOrEqualTo(String value) { + addCriterion("remarks >=", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLessThan(String value) { + addCriterion("remarks <", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLessThanOrEqualTo(String value) { + addCriterion("remarks <=", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLike(String value) { + addCriterion("remarks like", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotLike(String value) { + addCriterion("remarks not like", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksIn(List values) { + addCriterion("remarks in", values, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotIn(List values) { + addCriterion("remarks not in", values, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksBetween(String value1, String value2) { + addCriterion("remarks between", value1, value2, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotBetween(String value1, String value2) { + addCriterion("remarks not between", value1, value2, "remarks"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SysNotice.java b/src/main/java/club/joylink/rtss/entity/SysNotice.java new file mode 100644 index 000000000..6ea949c4e --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SysNotice.java @@ -0,0 +1,137 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * sys_notice + * @author + */ +public class SysNotice implements Serializable { + private Long id; + + /** + * 系统通知类型 + */ + private String dicType; + + /** + * 通知主题 + */ + private String subject; + + /** + * 系统用户id + */ + private Long creator; + + /** + * 通知时间 + */ + private LocalDateTime createTime; + + /** + * 通知详情 + */ + private String content; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getDicType() { + return dicType; + } + + public void setDicType(String dicType) { + this.dicType = dicType; + } + + public String getSubject() { + return subject; + } + + public void setSubject(String subject) { + this.subject = subject; + } + + public Long getCreator() { + return creator; + } + + public void setCreator(Long creator) { + this.creator = creator; + } + + public LocalDateTime getCreateTime() { + return createTime; + } + + public void setCreateTime(LocalDateTime createTime) { + this.createTime = createTime; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + SysNotice other = (SysNotice) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getDicType() == null ? other.getDicType() == null : this.getDicType().equals(other.getDicType())) + && (this.getSubject() == null ? other.getSubject() == null : this.getSubject().equals(other.getSubject())) + && (this.getCreator() == null ? other.getCreator() == null : this.getCreator().equals(other.getCreator())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getDicType() == null) ? 0 : getDicType().hashCode()); + result = prime * result + ((getSubject() == null) ? 0 : getSubject().hashCode()); + result = prime * result + ((getCreator() == null) ? 0 : getCreator().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", dicType=").append(dicType); + sb.append(", subject=").append(subject); + sb.append(", creator=").append(creator); + sb.append(", createTime=").append(createTime); + sb.append(", content=").append(content); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SysNoticeExample.java b/src/main/java/club/joylink/rtss/entity/SysNoticeExample.java new file mode 100644 index 000000000..7fcbe1260 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SysNoticeExample.java @@ -0,0 +1,543 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class SysNoticeExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public SysNoticeExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andDicTypeIsNull() { + addCriterion("dic_type is null"); + return (Criteria) this; + } + + public Criteria andDicTypeIsNotNull() { + addCriterion("dic_type is not null"); + return (Criteria) this; + } + + public Criteria andDicTypeEqualTo(String value) { + addCriterion("dic_type =", value, "dicType"); + return (Criteria) this; + } + + public Criteria andDicTypeNotEqualTo(String value) { + addCriterion("dic_type <>", value, "dicType"); + return (Criteria) this; + } + + public Criteria andDicTypeGreaterThan(String value) { + addCriterion("dic_type >", value, "dicType"); + return (Criteria) this; + } + + public Criteria andDicTypeGreaterThanOrEqualTo(String value) { + addCriterion("dic_type >=", value, "dicType"); + return (Criteria) this; + } + + public Criteria andDicTypeLessThan(String value) { + addCriterion("dic_type <", value, "dicType"); + return (Criteria) this; + } + + public Criteria andDicTypeLessThanOrEqualTo(String value) { + addCriterion("dic_type <=", value, "dicType"); + return (Criteria) this; + } + + public Criteria andDicTypeLike(String value) { + addCriterion("dic_type like", value, "dicType"); + return (Criteria) this; + } + + public Criteria andDicTypeNotLike(String value) { + addCriterion("dic_type not like", value, "dicType"); + return (Criteria) this; + } + + public Criteria andDicTypeIn(List values) { + addCriterion("dic_type in", values, "dicType"); + return (Criteria) this; + } + + public Criteria andDicTypeNotIn(List values) { + addCriterion("dic_type not in", values, "dicType"); + return (Criteria) this; + } + + public Criteria andDicTypeBetween(String value1, String value2) { + addCriterion("dic_type between", value1, value2, "dicType"); + return (Criteria) this; + } + + public Criteria andDicTypeNotBetween(String value1, String value2) { + addCriterion("dic_type not between", value1, value2, "dicType"); + return (Criteria) this; + } + + public Criteria andSubjectIsNull() { + addCriterion("subject is null"); + return (Criteria) this; + } + + public Criteria andSubjectIsNotNull() { + addCriterion("subject is not null"); + return (Criteria) this; + } + + public Criteria andSubjectEqualTo(String value) { + addCriterion("subject =", value, "subject"); + return (Criteria) this; + } + + public Criteria andSubjectNotEqualTo(String value) { + addCriterion("subject <>", value, "subject"); + return (Criteria) this; + } + + public Criteria andSubjectGreaterThan(String value) { + addCriterion("subject >", value, "subject"); + return (Criteria) this; + } + + public Criteria andSubjectGreaterThanOrEqualTo(String value) { + addCriterion("subject >=", value, "subject"); + return (Criteria) this; + } + + public Criteria andSubjectLessThan(String value) { + addCriterion("subject <", value, "subject"); + return (Criteria) this; + } + + public Criteria andSubjectLessThanOrEqualTo(String value) { + addCriterion("subject <=", value, "subject"); + return (Criteria) this; + } + + public Criteria andSubjectLike(String value) { + addCriterion("subject like", value, "subject"); + return (Criteria) this; + } + + public Criteria andSubjectNotLike(String value) { + addCriterion("subject not like", value, "subject"); + return (Criteria) this; + } + + public Criteria andSubjectIn(List values) { + addCriterion("subject in", values, "subject"); + return (Criteria) this; + } + + public Criteria andSubjectNotIn(List values) { + addCriterion("subject not in", values, "subject"); + return (Criteria) this; + } + + public Criteria andSubjectBetween(String value1, String value2) { + addCriterion("subject between", value1, value2, "subject"); + return (Criteria) this; + } + + public Criteria andSubjectNotBetween(String value1, String value2) { + addCriterion("subject not between", value1, value2, "subject"); + return (Criteria) this; + } + + public Criteria andCreatorIsNull() { + addCriterion("creator is null"); + return (Criteria) this; + } + + public Criteria andCreatorIsNotNull() { + addCriterion("creator is not null"); + return (Criteria) this; + } + + public Criteria andCreatorEqualTo(Long value) { + addCriterion("creator =", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorNotEqualTo(Long value) { + addCriterion("creator <>", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorGreaterThan(Long value) { + addCriterion("creator >", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorGreaterThanOrEqualTo(Long value) { + addCriterion("creator >=", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorLessThan(Long value) { + addCriterion("creator <", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorLessThanOrEqualTo(Long value) { + addCriterion("creator <=", value, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorIn(List values) { + addCriterion("creator in", values, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorNotIn(List values) { + addCriterion("creator not in", values, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorBetween(Long value1, Long value2) { + addCriterion("creator between", value1, value2, "creator"); + return (Criteria) this; + } + + public Criteria andCreatorNotBetween(Long value1, Long value2) { + addCriterion("creator not between", value1, value2, "creator"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(LocalDateTime value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(LocalDateTime value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(LocalDateTime value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(LocalDateTime value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SysUser.java b/src/main/java/club/joylink/rtss/entity/SysUser.java new file mode 100644 index 000000000..d7810a135 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SysUser.java @@ -0,0 +1,345 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * sys_user + * @author + */ +public class SysUser implements Serializable { + private Long id; + + /** + * 登录账户名(线下登录账户名) + */ + private String account; + + /** + * 真实姓名 + */ + private String name; + + /** + * 昵称 + */ + private String nickname; + + /** + * 头像文件资源路径 + */ + private String avatarPath; + + /** + * 密码 + */ + private String password; + + /** + * 手机号 + */ + private String mobile; + + /** + * 国家码 + */ + private String nationcode; + + /** + * email邮箱 + */ + private String email; + + /** + * 微信openId + */ + private String wxId; + + /** + * union ID + */ + private String wxUnionId; + + /** + * 微信小程序openId + */ + private String wmOpenId; + + /** + * 状态:1-可用 + */ + private String status; + + /** + * 角色 + */ + private String roles; + + /** + * 是否线下(本地化部署/项目)用户 + */ + private Boolean offline; + + /** + * 创建时间 + */ + private LocalDateTime createTime; + + /** + * 更新用户id + */ + private Long updateUserId; + + /** + * 更新时间 + */ + private LocalDateTime updateTime; + + /** + * 单位 + */ + private Integer companyId; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getAccount() { + return account; + } + + public void setAccount(String account) { + this.account = account; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getNickname() { + return nickname; + } + + public void setNickname(String nickname) { + this.nickname = nickname; + } + + public String getAvatarPath() { + return avatarPath; + } + + public void setAvatarPath(String avatarPath) { + this.avatarPath = avatarPath; + } + + 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; + } + + public String getNationcode() { + return nationcode; + } + + public void setNationcode(String nationcode) { + this.nationcode = nationcode; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public String getWxId() { + return wxId; + } + + public void setWxId(String wxId) { + this.wxId = wxId; + } + + public String getWxUnionId() { + return wxUnionId; + } + + public void setWxUnionId(String wxUnionId) { + this.wxUnionId = wxUnionId; + } + + public String getWmOpenId() { + return wmOpenId; + } + + public void setWmOpenId(String wmOpenId) { + this.wmOpenId = wmOpenId; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getRoles() { + return roles; + } + + public void setRoles(String roles) { + this.roles = roles; + } + + public Boolean getOffline() { + return offline; + } + + public void setOffline(Boolean offline) { + this.offline = offline; + } + + public LocalDateTime getCreateTime() { + return createTime; + } + + public void setCreateTime(LocalDateTime createTime) { + this.createTime = createTime; + } + + public Long getUpdateUserId() { + return updateUserId; + } + + public void setUpdateUserId(Long updateUserId) { + this.updateUserId = updateUserId; + } + + public LocalDateTime getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(LocalDateTime updateTime) { + this.updateTime = updateTime; + } + + public Integer getCompanyId() { + return companyId; + } + + public void setCompanyId(Integer companyId) { + this.companyId = companyId; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + SysUser other = (SysUser) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getAccount() == null ? other.getAccount() == null : this.getAccount().equals(other.getAccount())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getNickname() == null ? other.getNickname() == null : this.getNickname().equals(other.getNickname())) + && (this.getAvatarPath() == null ? other.getAvatarPath() == null : this.getAvatarPath().equals(other.getAvatarPath())) + && (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword())) + && (this.getMobile() == null ? other.getMobile() == null : this.getMobile().equals(other.getMobile())) + && (this.getNationcode() == null ? other.getNationcode() == null : this.getNationcode().equals(other.getNationcode())) + && (this.getEmail() == null ? other.getEmail() == null : this.getEmail().equals(other.getEmail())) + && (this.getWxId() == null ? other.getWxId() == null : this.getWxId().equals(other.getWxId())) + && (this.getWxUnionId() == null ? other.getWxUnionId() == null : this.getWxUnionId().equals(other.getWxUnionId())) + && (this.getWmOpenId() == null ? other.getWmOpenId() == null : this.getWmOpenId().equals(other.getWmOpenId())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getRoles() == null ? other.getRoles() == null : this.getRoles().equals(other.getRoles())) + && (this.getOffline() == null ? other.getOffline() == null : this.getOffline().equals(other.getOffline())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getUpdateUserId() == null ? other.getUpdateUserId() == null : this.getUpdateUserId().equals(other.getUpdateUserId())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) + && (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getAccount() == null) ? 0 : getAccount().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getNickname() == null) ? 0 : getNickname().hashCode()); + result = prime * result + ((getAvatarPath() == null) ? 0 : getAvatarPath().hashCode()); + result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode()); + result = prime * result + ((getMobile() == null) ? 0 : getMobile().hashCode()); + result = prime * result + ((getNationcode() == null) ? 0 : getNationcode().hashCode()); + result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode()); + result = prime * result + ((getWxId() == null) ? 0 : getWxId().hashCode()); + result = prime * result + ((getWxUnionId() == null) ? 0 : getWxUnionId().hashCode()); + result = prime * result + ((getWmOpenId() == null) ? 0 : getWmOpenId().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getRoles() == null) ? 0 : getRoles().hashCode()); + result = prime * result + ((getOffline() == null) ? 0 : getOffline().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getUpdateUserId() == null) ? 0 : getUpdateUserId().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", account=").append(account); + sb.append(", name=").append(name); + sb.append(", nickname=").append(nickname); + sb.append(", avatarPath=").append(avatarPath); + sb.append(", password=").append(password); + sb.append(", mobile=").append(mobile); + sb.append(", nationcode=").append(nationcode); + sb.append(", email=").append(email); + sb.append(", wxId=").append(wxId); + sb.append(", wxUnionId=").append(wxUnionId); + sb.append(", wmOpenId=").append(wmOpenId); + sb.append(", status=").append(status); + sb.append(", roles=").append(roles); + sb.append(", offline=").append(offline); + sb.append(", createTime=").append(createTime); + sb.append(", updateUserId=").append(updateUserId); + sb.append(", updateTime=").append(updateTime); + sb.append(", companyId=").append(companyId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SysUserExample.java b/src/main/java/club/joylink/rtss/entity/SysUserExample.java new file mode 100644 index 000000000..bc604f897 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SysUserExample.java @@ -0,0 +1,1493 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class SysUserExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public SysUserExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andAccountIsNull() { + addCriterion("account is null"); + return (Criteria) this; + } + + public Criteria andAccountIsNotNull() { + addCriterion("account is not null"); + return (Criteria) this; + } + + public Criteria andAccountEqualTo(String value) { + addCriterion("account =", value, "account"); + return (Criteria) this; + } + + public Criteria andAccountNotEqualTo(String value) { + addCriterion("account <>", value, "account"); + return (Criteria) this; + } + + public Criteria andAccountGreaterThan(String value) { + addCriterion("account >", value, "account"); + return (Criteria) this; + } + + public Criteria andAccountGreaterThanOrEqualTo(String value) { + addCriterion("account >=", value, "account"); + return (Criteria) this; + } + + public Criteria andAccountLessThan(String value) { + addCriterion("account <", value, "account"); + return (Criteria) this; + } + + public Criteria andAccountLessThanOrEqualTo(String value) { + addCriterion("account <=", value, "account"); + return (Criteria) this; + } + + public Criteria andAccountLike(String value) { + addCriterion("account like", value, "account"); + return (Criteria) this; + } + + public Criteria andAccountNotLike(String value) { + addCriterion("account not like", value, "account"); + return (Criteria) this; + } + + public Criteria andAccountIn(List values) { + addCriterion("account in", values, "account"); + return (Criteria) this; + } + + public Criteria andAccountNotIn(List values) { + addCriterion("account not in", values, "account"); + return (Criteria) this; + } + + public Criteria andAccountBetween(String value1, String value2) { + addCriterion("account between", value1, value2, "account"); + return (Criteria) this; + } + + public Criteria andAccountNotBetween(String value1, String value2) { + addCriterion("account not between", value1, value2, "account"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNicknameIsNull() { + addCriterion("nickname is null"); + return (Criteria) this; + } + + public Criteria andNicknameIsNotNull() { + addCriterion("nickname is not null"); + return (Criteria) this; + } + + public Criteria andNicknameEqualTo(String value) { + addCriterion("nickname =", value, "nickname"); + return (Criteria) this; + } + + public Criteria andNicknameNotEqualTo(String value) { + addCriterion("nickname <>", value, "nickname"); + return (Criteria) this; + } + + public Criteria andNicknameGreaterThan(String value) { + addCriterion("nickname >", value, "nickname"); + return (Criteria) this; + } + + public Criteria andNicknameGreaterThanOrEqualTo(String value) { + addCriterion("nickname >=", value, "nickname"); + return (Criteria) this; + } + + public Criteria andNicknameLessThan(String value) { + addCriterion("nickname <", value, "nickname"); + return (Criteria) this; + } + + public Criteria andNicknameLessThanOrEqualTo(String value) { + addCriterion("nickname <=", value, "nickname"); + return (Criteria) this; + } + + public Criteria andNicknameLike(String value) { + addCriterion("nickname like", value, "nickname"); + return (Criteria) this; + } + + public Criteria andNicknameNotLike(String value) { + addCriterion("nickname not like", value, "nickname"); + return (Criteria) this; + } + + public Criteria andNicknameIn(List values) { + addCriterion("nickname in", values, "nickname"); + return (Criteria) this; + } + + public Criteria andNicknameNotIn(List values) { + addCriterion("nickname not in", values, "nickname"); + return (Criteria) this; + } + + public Criteria andNicknameBetween(String value1, String value2) { + addCriterion("nickname between", value1, value2, "nickname"); + return (Criteria) this; + } + + public Criteria andNicknameNotBetween(String value1, String value2) { + addCriterion("nickname not between", value1, value2, "nickname"); + return (Criteria) this; + } + + public Criteria andAvatarPathIsNull() { + addCriterion("avatar_path is null"); + return (Criteria) this; + } + + public Criteria andAvatarPathIsNotNull() { + addCriterion("avatar_path is not null"); + return (Criteria) this; + } + + public Criteria andAvatarPathEqualTo(String value) { + addCriterion("avatar_path =", value, "avatarPath"); + return (Criteria) this; + } + + public Criteria andAvatarPathNotEqualTo(String value) { + addCriterion("avatar_path <>", value, "avatarPath"); + return (Criteria) this; + } + + public Criteria andAvatarPathGreaterThan(String value) { + addCriterion("avatar_path >", value, "avatarPath"); + return (Criteria) this; + } + + public Criteria andAvatarPathGreaterThanOrEqualTo(String value) { + addCriterion("avatar_path >=", value, "avatarPath"); + return (Criteria) this; + } + + public Criteria andAvatarPathLessThan(String value) { + addCriterion("avatar_path <", value, "avatarPath"); + return (Criteria) this; + } + + public Criteria andAvatarPathLessThanOrEqualTo(String value) { + addCriterion("avatar_path <=", value, "avatarPath"); + return (Criteria) this; + } + + public Criteria andAvatarPathLike(String value) { + addCriterion("avatar_path like", value, "avatarPath"); + return (Criteria) this; + } + + public Criteria andAvatarPathNotLike(String value) { + addCriterion("avatar_path not like", value, "avatarPath"); + return (Criteria) this; + } + + public Criteria andAvatarPathIn(List values) { + addCriterion("avatar_path in", values, "avatarPath"); + return (Criteria) this; + } + + public Criteria andAvatarPathNotIn(List values) { + addCriterion("avatar_path not in", values, "avatarPath"); + return (Criteria) this; + } + + public Criteria andAvatarPathBetween(String value1, String value2) { + addCriterion("avatar_path between", value1, value2, "avatarPath"); + return (Criteria) this; + } + + public Criteria andAvatarPathNotBetween(String value1, String value2) { + addCriterion("avatar_path not between", value1, value2, "avatarPath"); + return (Criteria) this; + } + + public Criteria andPasswordIsNull() { + addCriterion("`password` is null"); + return (Criteria) this; + } + + public Criteria andPasswordIsNotNull() { + addCriterion("`password` is not null"); + return (Criteria) this; + } + + public Criteria andPasswordEqualTo(String value) { + addCriterion("`password` =", value, "password"); + return (Criteria) this; + } + + public Criteria andPasswordNotEqualTo(String value) { + addCriterion("`password` <>", value, "password"); + return (Criteria) this; + } + + public Criteria andPasswordGreaterThan(String value) { + addCriterion("`password` >", value, "password"); + return (Criteria) this; + } + + public Criteria andPasswordGreaterThanOrEqualTo(String value) { + addCriterion("`password` >=", value, "password"); + return (Criteria) this; + } + + public Criteria andPasswordLessThan(String value) { + addCriterion("`password` <", value, "password"); + return (Criteria) this; + } + + public Criteria andPasswordLessThanOrEqualTo(String value) { + addCriterion("`password` <=", value, "password"); + return (Criteria) this; + } + + public Criteria andPasswordLike(String value) { + addCriterion("`password` like", value, "password"); + return (Criteria) this; + } + + public Criteria andPasswordNotLike(String value) { + addCriterion("`password` not like", value, "password"); + return (Criteria) this; + } + + public Criteria andPasswordIn(List values) { + addCriterion("`password` in", values, "password"); + return (Criteria) this; + } + + public Criteria andPasswordNotIn(List values) { + addCriterion("`password` not in", values, "password"); + return (Criteria) this; + } + + public Criteria andPasswordBetween(String value1, String value2) { + addCriterion("`password` between", value1, value2, "password"); + return (Criteria) this; + } + + public Criteria andPasswordNotBetween(String value1, String value2) { + addCriterion("`password` not between", value1, value2, "password"); + return (Criteria) this; + } + + public Criteria andMobileIsNull() { + addCriterion("mobile is null"); + return (Criteria) this; + } + + public Criteria andMobileIsNotNull() { + addCriterion("mobile is not null"); + return (Criteria) this; + } + + public Criteria andMobileEqualTo(String value) { + addCriterion("mobile =", value, "mobile"); + return (Criteria) this; + } + + public Criteria andMobileNotEqualTo(String value) { + addCriterion("mobile <>", value, "mobile"); + return (Criteria) this; + } + + public Criteria andMobileGreaterThan(String value) { + addCriterion("mobile >", value, "mobile"); + return (Criteria) this; + } + + public Criteria andMobileGreaterThanOrEqualTo(String value) { + addCriterion("mobile >=", value, "mobile"); + return (Criteria) this; + } + + public Criteria andMobileLessThan(String value) { + addCriterion("mobile <", value, "mobile"); + return (Criteria) this; + } + + public Criteria andMobileLessThanOrEqualTo(String value) { + addCriterion("mobile <=", value, "mobile"); + return (Criteria) this; + } + + public Criteria andMobileLike(String value) { + addCriterion("mobile like", value, "mobile"); + return (Criteria) this; + } + + public Criteria andMobileNotLike(String value) { + addCriterion("mobile not like", value, "mobile"); + return (Criteria) this; + } + + public Criteria andMobileIn(List values) { + addCriterion("mobile in", values, "mobile"); + return (Criteria) this; + } + + public Criteria andMobileNotIn(List values) { + addCriterion("mobile not in", values, "mobile"); + return (Criteria) this; + } + + public Criteria andMobileBetween(String value1, String value2) { + addCriterion("mobile between", value1, value2, "mobile"); + return (Criteria) this; + } + + public Criteria andMobileNotBetween(String value1, String value2) { + addCriterion("mobile not between", value1, value2, "mobile"); + return (Criteria) this; + } + + public Criteria andNationcodeIsNull() { + addCriterion("nationcode is null"); + return (Criteria) this; + } + + public Criteria andNationcodeIsNotNull() { + addCriterion("nationcode is not null"); + return (Criteria) this; + } + + public Criteria andNationcodeEqualTo(String value) { + addCriterion("nationcode =", value, "nationcode"); + return (Criteria) this; + } + + public Criteria andNationcodeNotEqualTo(String value) { + addCriterion("nationcode <>", value, "nationcode"); + return (Criteria) this; + } + + public Criteria andNationcodeGreaterThan(String value) { + addCriterion("nationcode >", value, "nationcode"); + return (Criteria) this; + } + + public Criteria andNationcodeGreaterThanOrEqualTo(String value) { + addCriterion("nationcode >=", value, "nationcode"); + return (Criteria) this; + } + + public Criteria andNationcodeLessThan(String value) { + addCriterion("nationcode <", value, "nationcode"); + return (Criteria) this; + } + + public Criteria andNationcodeLessThanOrEqualTo(String value) { + addCriterion("nationcode <=", value, "nationcode"); + return (Criteria) this; + } + + public Criteria andNationcodeLike(String value) { + addCriterion("nationcode like", value, "nationcode"); + return (Criteria) this; + } + + public Criteria andNationcodeNotLike(String value) { + addCriterion("nationcode not like", value, "nationcode"); + return (Criteria) this; + } + + public Criteria andNationcodeIn(List values) { + addCriterion("nationcode in", values, "nationcode"); + return (Criteria) this; + } + + public Criteria andNationcodeNotIn(List values) { + addCriterion("nationcode not in", values, "nationcode"); + return (Criteria) this; + } + + public Criteria andNationcodeBetween(String value1, String value2) { + addCriterion("nationcode between", value1, value2, "nationcode"); + return (Criteria) this; + } + + public Criteria andNationcodeNotBetween(String value1, String value2) { + addCriterion("nationcode not between", value1, value2, "nationcode"); + return (Criteria) this; + } + + public Criteria andEmailIsNull() { + addCriterion("email is null"); + return (Criteria) this; + } + + public Criteria andEmailIsNotNull() { + addCriterion("email is not null"); + return (Criteria) this; + } + + public Criteria andEmailEqualTo(String value) { + addCriterion("email =", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailNotEqualTo(String value) { + addCriterion("email <>", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailGreaterThan(String value) { + addCriterion("email >", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailGreaterThanOrEqualTo(String value) { + addCriterion("email >=", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailLessThan(String value) { + addCriterion("email <", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailLessThanOrEqualTo(String value) { + addCriterion("email <=", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailLike(String value) { + addCriterion("email like", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailNotLike(String value) { + addCriterion("email not like", value, "email"); + return (Criteria) this; + } + + public Criteria andEmailIn(List values) { + addCriterion("email in", values, "email"); + return (Criteria) this; + } + + public Criteria andEmailNotIn(List values) { + addCriterion("email not in", values, "email"); + return (Criteria) this; + } + + public Criteria andEmailBetween(String value1, String value2) { + addCriterion("email between", value1, value2, "email"); + return (Criteria) this; + } + + public Criteria andEmailNotBetween(String value1, String value2) { + addCriterion("email not between", value1, value2, "email"); + return (Criteria) this; + } + + public Criteria andWxIdIsNull() { + addCriterion("wx_id is null"); + return (Criteria) this; + } + + public Criteria andWxIdIsNotNull() { + addCriterion("wx_id is not null"); + return (Criteria) this; + } + + public Criteria andWxIdEqualTo(String value) { + addCriterion("wx_id =", value, "wxId"); + return (Criteria) this; + } + + public Criteria andWxIdNotEqualTo(String value) { + addCriterion("wx_id <>", value, "wxId"); + return (Criteria) this; + } + + public Criteria andWxIdGreaterThan(String value) { + addCriterion("wx_id >", value, "wxId"); + return (Criteria) this; + } + + public Criteria andWxIdGreaterThanOrEqualTo(String value) { + addCriterion("wx_id >=", value, "wxId"); + return (Criteria) this; + } + + public Criteria andWxIdLessThan(String value) { + addCriterion("wx_id <", value, "wxId"); + return (Criteria) this; + } + + public Criteria andWxIdLessThanOrEqualTo(String value) { + addCriterion("wx_id <=", value, "wxId"); + return (Criteria) this; + } + + public Criteria andWxIdLike(String value) { + addCriterion("wx_id like", value, "wxId"); + return (Criteria) this; + } + + public Criteria andWxIdNotLike(String value) { + addCriterion("wx_id not like", value, "wxId"); + return (Criteria) this; + } + + public Criteria andWxIdIn(List values) { + addCriterion("wx_id in", values, "wxId"); + return (Criteria) this; + } + + public Criteria andWxIdNotIn(List values) { + addCriterion("wx_id not in", values, "wxId"); + return (Criteria) this; + } + + public Criteria andWxIdBetween(String value1, String value2) { + addCriterion("wx_id between", value1, value2, "wxId"); + return (Criteria) this; + } + + public Criteria andWxIdNotBetween(String value1, String value2) { + addCriterion("wx_id not between", value1, value2, "wxId"); + return (Criteria) this; + } + + public Criteria andWxUnionIdIsNull() { + addCriterion("wx_union_id is null"); + return (Criteria) this; + } + + public Criteria andWxUnionIdIsNotNull() { + addCriterion("wx_union_id is not null"); + return (Criteria) this; + } + + public Criteria andWxUnionIdEqualTo(String value) { + addCriterion("wx_union_id =", value, "wxUnionId"); + return (Criteria) this; + } + + public Criteria andWxUnionIdNotEqualTo(String value) { + addCriterion("wx_union_id <>", value, "wxUnionId"); + return (Criteria) this; + } + + public Criteria andWxUnionIdGreaterThan(String value) { + addCriterion("wx_union_id >", value, "wxUnionId"); + return (Criteria) this; + } + + public Criteria andWxUnionIdGreaterThanOrEqualTo(String value) { + addCriterion("wx_union_id >=", value, "wxUnionId"); + return (Criteria) this; + } + + public Criteria andWxUnionIdLessThan(String value) { + addCriterion("wx_union_id <", value, "wxUnionId"); + return (Criteria) this; + } + + public Criteria andWxUnionIdLessThanOrEqualTo(String value) { + addCriterion("wx_union_id <=", value, "wxUnionId"); + return (Criteria) this; + } + + public Criteria andWxUnionIdLike(String value) { + addCriterion("wx_union_id like", value, "wxUnionId"); + return (Criteria) this; + } + + public Criteria andWxUnionIdNotLike(String value) { + addCriterion("wx_union_id not like", value, "wxUnionId"); + return (Criteria) this; + } + + public Criteria andWxUnionIdIn(List values) { + addCriterion("wx_union_id in", values, "wxUnionId"); + return (Criteria) this; + } + + public Criteria andWxUnionIdNotIn(List values) { + addCriterion("wx_union_id not in", values, "wxUnionId"); + return (Criteria) this; + } + + public Criteria andWxUnionIdBetween(String value1, String value2) { + addCriterion("wx_union_id between", value1, value2, "wxUnionId"); + return (Criteria) this; + } + + public Criteria andWxUnionIdNotBetween(String value1, String value2) { + addCriterion("wx_union_id not between", value1, value2, "wxUnionId"); + return (Criteria) this; + } + + public Criteria andWmOpenIdIsNull() { + addCriterion("wm_open_id is null"); + return (Criteria) this; + } + + public Criteria andWmOpenIdIsNotNull() { + addCriterion("wm_open_id is not null"); + return (Criteria) this; + } + + public Criteria andWmOpenIdEqualTo(String value) { + addCriterion("wm_open_id =", value, "wmOpenId"); + return (Criteria) this; + } + + public Criteria andWmOpenIdNotEqualTo(String value) { + addCriterion("wm_open_id <>", value, "wmOpenId"); + return (Criteria) this; + } + + public Criteria andWmOpenIdGreaterThan(String value) { + addCriterion("wm_open_id >", value, "wmOpenId"); + return (Criteria) this; + } + + public Criteria andWmOpenIdGreaterThanOrEqualTo(String value) { + addCriterion("wm_open_id >=", value, "wmOpenId"); + return (Criteria) this; + } + + public Criteria andWmOpenIdLessThan(String value) { + addCriterion("wm_open_id <", value, "wmOpenId"); + return (Criteria) this; + } + + public Criteria andWmOpenIdLessThanOrEqualTo(String value) { + addCriterion("wm_open_id <=", value, "wmOpenId"); + return (Criteria) this; + } + + public Criteria andWmOpenIdLike(String value) { + addCriterion("wm_open_id like", value, "wmOpenId"); + return (Criteria) this; + } + + public Criteria andWmOpenIdNotLike(String value) { + addCriterion("wm_open_id not like", value, "wmOpenId"); + return (Criteria) this; + } + + public Criteria andWmOpenIdIn(List values) { + addCriterion("wm_open_id in", values, "wmOpenId"); + return (Criteria) this; + } + + public Criteria andWmOpenIdNotIn(List values) { + addCriterion("wm_open_id not in", values, "wmOpenId"); + return (Criteria) this; + } + + public Criteria andWmOpenIdBetween(String value1, String value2) { + addCriterion("wm_open_id between", value1, value2, "wmOpenId"); + return (Criteria) this; + } + + public Criteria andWmOpenIdNotBetween(String value1, String value2) { + addCriterion("wm_open_id not between", value1, value2, "wmOpenId"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andRolesIsNull() { + addCriterion("roles is null"); + return (Criteria) this; + } + + public Criteria andRolesIsNotNull() { + addCriterion("roles is not null"); + return (Criteria) this; + } + + public Criteria andRolesEqualTo(String value) { + addCriterion("roles =", value, "roles"); + return (Criteria) this; + } + + public Criteria andRolesNotEqualTo(String value) { + addCriterion("roles <>", value, "roles"); + return (Criteria) this; + } + + public Criteria andRolesGreaterThan(String value) { + addCriterion("roles >", value, "roles"); + return (Criteria) this; + } + + public Criteria andRolesGreaterThanOrEqualTo(String value) { + addCriterion("roles >=", value, "roles"); + return (Criteria) this; + } + + public Criteria andRolesLessThan(String value) { + addCriterion("roles <", value, "roles"); + return (Criteria) this; + } + + public Criteria andRolesLessThanOrEqualTo(String value) { + addCriterion("roles <=", value, "roles"); + return (Criteria) this; + } + + public Criteria andRolesLike(String value) { + addCriterion("roles like", value, "roles"); + return (Criteria) this; + } + + public Criteria andRolesNotLike(String value) { + addCriterion("roles not like", value, "roles"); + return (Criteria) this; + } + + public Criteria andRolesIn(List values) { + addCriterion("roles in", values, "roles"); + return (Criteria) this; + } + + public Criteria andRolesNotIn(List values) { + addCriterion("roles not in", values, "roles"); + return (Criteria) this; + } + + public Criteria andRolesBetween(String value1, String value2) { + addCriterion("roles between", value1, value2, "roles"); + return (Criteria) this; + } + + public Criteria andRolesNotBetween(String value1, String value2) { + addCriterion("roles not between", value1, value2, "roles"); + return (Criteria) this; + } + + public Criteria andOfflineIsNull() { + addCriterion("`offline` is null"); + return (Criteria) this; + } + + public Criteria andOfflineIsNotNull() { + addCriterion("`offline` is not null"); + return (Criteria) this; + } + + public Criteria andOfflineEqualTo(Boolean value) { + addCriterion("`offline` =", value, "offline"); + return (Criteria) this; + } + + public Criteria andOfflineNotEqualTo(Boolean value) { + addCriterion("`offline` <>", value, "offline"); + return (Criteria) this; + } + + public Criteria andOfflineGreaterThan(Boolean value) { + addCriterion("`offline` >", value, "offline"); + return (Criteria) this; + } + + public Criteria andOfflineGreaterThanOrEqualTo(Boolean value) { + addCriterion("`offline` >=", value, "offline"); + return (Criteria) this; + } + + public Criteria andOfflineLessThan(Boolean value) { + addCriterion("`offline` <", value, "offline"); + return (Criteria) this; + } + + public Criteria andOfflineLessThanOrEqualTo(Boolean value) { + addCriterion("`offline` <=", value, "offline"); + return (Criteria) this; + } + + public Criteria andOfflineIn(List values) { + addCriterion("`offline` in", values, "offline"); + return (Criteria) this; + } + + public Criteria andOfflineNotIn(List values) { + addCriterion("`offline` not in", values, "offline"); + return (Criteria) this; + } + + public Criteria andOfflineBetween(Boolean value1, Boolean value2) { + addCriterion("`offline` between", value1, value2, "offline"); + return (Criteria) this; + } + + public Criteria andOfflineNotBetween(Boolean value1, Boolean value2) { + addCriterion("`offline` not between", value1, value2, "offline"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(LocalDateTime value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(LocalDateTime value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(LocalDateTime value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(LocalDateTime value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdIsNull() { + addCriterion("update_user_id is null"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdIsNotNull() { + addCriterion("update_user_id is not null"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdEqualTo(Long value) { + addCriterion("update_user_id =", value, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdNotEqualTo(Long value) { + addCriterion("update_user_id <>", value, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdGreaterThan(Long value) { + addCriterion("update_user_id >", value, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("update_user_id >=", value, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdLessThan(Long value) { + addCriterion("update_user_id <", value, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdLessThanOrEqualTo(Long value) { + addCriterion("update_user_id <=", value, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdIn(List values) { + addCriterion("update_user_id in", values, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdNotIn(List values) { + addCriterion("update_user_id not in", values, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdBetween(Long value1, Long value2) { + addCriterion("update_user_id between", value1, value2, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateUserIdNotBetween(Long value1, Long value2) { + addCriterion("update_user_id not between", value1, value2, "updateUserId"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(LocalDateTime value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(LocalDateTime value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(LocalDateTime value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(LocalDateTime value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andCompanyIdIsNull() { + addCriterion("company_id is null"); + return (Criteria) this; + } + + public Criteria andCompanyIdIsNotNull() { + addCriterion("company_id is not null"); + return (Criteria) this; + } + + public Criteria andCompanyIdEqualTo(Integer value) { + addCriterion("company_id =", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotEqualTo(Integer value) { + addCriterion("company_id <>", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThan(Integer value) { + addCriterion("company_id >", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThanOrEqualTo(Integer value) { + addCriterion("company_id >=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThan(Integer value) { + addCriterion("company_id <", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThanOrEqualTo(Integer value) { + addCriterion("company_id <=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdIn(List values) { + addCriterion("company_id in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotIn(List values) { + addCriterion("company_id not in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdBetween(Integer value1, Integer value2) { + addCriterion("company_id between", value1, value2, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotBetween(Integer value1, Integer value2) { + addCriterion("company_id not between", value1, value2, "companyId"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SysUserLogin.java b/src/main/java/club/joylink/rtss/entity/SysUserLogin.java new file mode 100644 index 000000000..d2cc9f334 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SysUserLogin.java @@ -0,0 +1,42 @@ +package club.joylink.rtss.entity; + +import lombok.Data; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * @author + * 用户登陆信息表 + */ +@Data +public class SysUserLogin implements Serializable { + private Long id; + + /** + * 用户ID + */ + private Long userId; + + /** + * 登陆的客户端 + */ + private String client; + + /** + * 登陆用户ip + */ + private String project; + + /** + * 客户端信息 + */ + private String device; + + /** + * 登陆时间 + */ + private LocalDateTime loginTime; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/SysUserLoginExample.java b/src/main/java/club/joylink/rtss/entity/SysUserLoginExample.java new file mode 100644 index 000000000..3d91b139e --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/SysUserLoginExample.java @@ -0,0 +1,613 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class SysUserLoginExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public SysUserLoginExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andClientIsNull() { + addCriterion("client is null"); + return (Criteria) this; + } + + public Criteria andClientIsNotNull() { + addCriterion("client is not null"); + return (Criteria) this; + } + + public Criteria andClientEqualTo(String value) { + addCriterion("client =", value, "client"); + return (Criteria) this; + } + + public Criteria andClientNotEqualTo(String value) { + addCriterion("client <>", value, "client"); + return (Criteria) this; + } + + public Criteria andClientGreaterThan(String value) { + addCriterion("client >", value, "client"); + return (Criteria) this; + } + + public Criteria andClientGreaterThanOrEqualTo(String value) { + addCriterion("client >=", value, "client"); + return (Criteria) this; + } + + public Criteria andClientLessThan(String value) { + addCriterion("client <", value, "client"); + return (Criteria) this; + } + + public Criteria andClientLessThanOrEqualTo(String value) { + addCriterion("client <=", value, "client"); + return (Criteria) this; + } + + public Criteria andClientLike(String value) { + addCriterion("client like", value, "client"); + return (Criteria) this; + } + + public Criteria andClientNotLike(String value) { + addCriterion("client not like", value, "client"); + return (Criteria) this; + } + + public Criteria andClientIn(List values) { + addCriterion("client in", values, "client"); + return (Criteria) this; + } + + public Criteria andClientNotIn(List values) { + addCriterion("client not in", values, "client"); + return (Criteria) this; + } + + public Criteria andClientBetween(String value1, String value2) { + addCriterion("client between", value1, value2, "client"); + return (Criteria) this; + } + + public Criteria andClientNotBetween(String value1, String value2) { + addCriterion("client not between", value1, value2, "client"); + return (Criteria) this; + } + + public Criteria andProjectIsNull() { + addCriterion("project is null"); + return (Criteria) this; + } + + public Criteria andProjectIsNotNull() { + addCriterion("project is not null"); + return (Criteria) this; + } + + public Criteria andProjectEqualTo(String value) { + addCriterion("project =", value, "project"); + return (Criteria) this; + } + + public Criteria andProjectNotEqualTo(String value) { + addCriterion("project <>", value, "project"); + return (Criteria) this; + } + + public Criteria andProjectGreaterThan(String value) { + addCriterion("project >", value, "project"); + return (Criteria) this; + } + + public Criteria andProjectGreaterThanOrEqualTo(String value) { + addCriterion("project >=", value, "project"); + return (Criteria) this; + } + + public Criteria andProjectLessThan(String value) { + addCriterion("project <", value, "project"); + return (Criteria) this; + } + + public Criteria andProjectLessThanOrEqualTo(String value) { + addCriterion("project <=", value, "project"); + return (Criteria) this; + } + + public Criteria andProjectLike(String value) { + addCriterion("project like", value, "project"); + return (Criteria) this; + } + + public Criteria andProjectNotLike(String value) { + addCriterion("project not like", value, "project"); + return (Criteria) this; + } + + public Criteria andProjectIn(List values) { + addCriterion("project in", values, "project"); + return (Criteria) this; + } + + public Criteria andProjectNotIn(List values) { + addCriterion("project not in", values, "project"); + return (Criteria) this; + } + + public Criteria andProjectBetween(String value1, String value2) { + addCriterion("project between", value1, value2, "project"); + return (Criteria) this; + } + + public Criteria andProjectNotBetween(String value1, String value2) { + addCriterion("project not between", value1, value2, "project"); + return (Criteria) this; + } + + public Criteria andDeviceIsNull() { + addCriterion("device is null"); + return (Criteria) this; + } + + public Criteria andDeviceIsNotNull() { + addCriterion("device is not null"); + return (Criteria) this; + } + + public Criteria andDeviceEqualTo(String value) { + addCriterion("device =", value, "device"); + return (Criteria) this; + } + + public Criteria andDeviceNotEqualTo(String value) { + addCriterion("device <>", value, "device"); + return (Criteria) this; + } + + public Criteria andDeviceGreaterThan(String value) { + addCriterion("device >", value, "device"); + return (Criteria) this; + } + + public Criteria andDeviceGreaterThanOrEqualTo(String value) { + addCriterion("device >=", value, "device"); + return (Criteria) this; + } + + public Criteria andDeviceLessThan(String value) { + addCriterion("device <", value, "device"); + return (Criteria) this; + } + + public Criteria andDeviceLessThanOrEqualTo(String value) { + addCriterion("device <=", value, "device"); + return (Criteria) this; + } + + public Criteria andDeviceLike(String value) { + addCriterion("device like", value, "device"); + return (Criteria) this; + } + + public Criteria andDeviceNotLike(String value) { + addCriterion("device not like", value, "device"); + return (Criteria) this; + } + + public Criteria andDeviceIn(List values) { + addCriterion("device in", values, "device"); + return (Criteria) this; + } + + public Criteria andDeviceNotIn(List values) { + addCriterion("device not in", values, "device"); + return (Criteria) this; + } + + public Criteria andDeviceBetween(String value1, String value2) { + addCriterion("device between", value1, value2, "device"); + return (Criteria) this; + } + + public Criteria andDeviceNotBetween(String value1, String value2) { + addCriterion("device not between", value1, value2, "device"); + return (Criteria) this; + } + + public Criteria andLoginTimeIsNull() { + addCriterion("login_time is null"); + return (Criteria) this; + } + + public Criteria andLoginTimeIsNotNull() { + addCriterion("login_time is not null"); + return (Criteria) this; + } + + public Criteria andLoginTimeEqualTo(LocalDateTime value) { + addCriterion("login_time =", value, "loginTime"); + return (Criteria) this; + } + + public Criteria andLoginTimeNotEqualTo(LocalDateTime value) { + addCriterion("login_time <>", value, "loginTime"); + return (Criteria) this; + } + + public Criteria andLoginTimeGreaterThan(LocalDateTime value) { + addCriterion("login_time >", value, "loginTime"); + return (Criteria) this; + } + + public Criteria andLoginTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("login_time >=", value, "loginTime"); + return (Criteria) this; + } + + public Criteria andLoginTimeLessThan(LocalDateTime value) { + addCriterion("login_time <", value, "loginTime"); + return (Criteria) this; + } + + public Criteria andLoginTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("login_time <=", value, "loginTime"); + return (Criteria) this; + } + + public Criteria andLoginTimeIn(List values) { + addCriterion("login_time in", values, "loginTime"); + return (Criteria) this; + } + + public Criteria andLoginTimeNotIn(List values) { + addCriterion("login_time not in", values, "loginTime"); + return (Criteria) this; + } + + public Criteria andLoginTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("login_time between", value1, value2, "loginTime"); + return (Criteria) this; + } + + public Criteria andLoginTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("login_time not between", value1, value2, "loginTime"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/Task.java b/src/main/java/club/joylink/rtss/entity/Task.java new file mode 100644 index 000000000..8df75966d --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/Task.java @@ -0,0 +1,174 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.util.Date; + +/** + * task + * @author + */ +public class Task implements Serializable { + private Long id; + + private String name; + + private String type; + + private String status; + + private String result; + + private Long creatorId; + + private Date createTime; + + private Date finishTime; + + private Date startTime; + + private String parameter; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getResult() { + return result; + } + + public void setResult(String result) { + this.result = result; + } + + public Long getCreatorId() { + return creatorId; + } + + public void setCreatorId(Long creatorId) { + this.creatorId = creatorId; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getFinishTime() { + return finishTime; + } + + public void setFinishTime(Date finishTime) { + this.finishTime = finishTime; + } + + public Date getStartTime() { + return startTime; + } + + public void setStartTime(Date startTime) { + this.startTime = startTime; + } + + public String getParameter() { + return parameter; + } + + public void setParameter(String parameter) { + this.parameter = parameter; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + Task other = (Task) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getResult() == null ? other.getResult() == null : this.getResult().equals(other.getResult())) + && (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getFinishTime() == null ? other.getFinishTime() == null : this.getFinishTime().equals(other.getFinishTime())) + && (this.getStartTime() == null ? other.getStartTime() == null : this.getStartTime().equals(other.getStartTime())) + && (this.getParameter() == null ? other.getParameter() == null : this.getParameter().equals(other.getParameter())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getResult() == null) ? 0 : getResult().hashCode()); + result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getFinishTime() == null) ? 0 : getFinishTime().hashCode()); + result = prime * result + ((getStartTime() == null) ? 0 : getStartTime().hashCode()); + result = prime * result + ((getParameter() == null) ? 0 : getParameter().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", name=").append(name); + sb.append(", type=").append(type); + sb.append(", status=").append(status); + sb.append(", result=").append(result); + sb.append(", creatorId=").append(creatorId); + sb.append(", createTime=").append(createTime); + sb.append(", finishTime=").append(finishTime); + sb.append(", startTime=").append(startTime); + sb.append(", parameter=").append(parameter); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/TaskExample.java b/src/main/java/club/joylink/rtss/entity/TaskExample.java new file mode 100644 index 000000000..67300ed28 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/TaskExample.java @@ -0,0 +1,873 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class TaskExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Integer offset; + + public TaskExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Integer offset) { + this.offset = offset; + } + + public Integer getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("type is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("type is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(String value) { + addCriterion("type =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(String value) { + addCriterion("type <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(String value) { + addCriterion("type >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(String value) { + addCriterion("type >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(String value) { + addCriterion("type <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(String value) { + addCriterion("type <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLike(String value) { + addCriterion("type like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotLike(String value) { + addCriterion("type not like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("type in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("type not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(String value1, String value2) { + addCriterion("type between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(String value1, String value2) { + addCriterion("type not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("status is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("status is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("status =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("status <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("status >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("status >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("status <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("status <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("status like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("status not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("status in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("status not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("status between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("status not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andResultIsNull() { + addCriterion("result is null"); + return (Criteria) this; + } + + public Criteria andResultIsNotNull() { + addCriterion("result is not null"); + return (Criteria) this; + } + + public Criteria andResultEqualTo(String value) { + addCriterion("result =", value, "result"); + return (Criteria) this; + } + + public Criteria andResultNotEqualTo(String value) { + addCriterion("result <>", value, "result"); + return (Criteria) this; + } + + public Criteria andResultGreaterThan(String value) { + addCriterion("result >", value, "result"); + return (Criteria) this; + } + + public Criteria andResultGreaterThanOrEqualTo(String value) { + addCriterion("result >=", value, "result"); + return (Criteria) this; + } + + public Criteria andResultLessThan(String value) { + addCriterion("result <", value, "result"); + return (Criteria) this; + } + + public Criteria andResultLessThanOrEqualTo(String value) { + addCriterion("result <=", value, "result"); + return (Criteria) this; + } + + public Criteria andResultLike(String value) { + addCriterion("result like", value, "result"); + return (Criteria) this; + } + + public Criteria andResultNotLike(String value) { + addCriterion("result not like", value, "result"); + return (Criteria) this; + } + + public Criteria andResultIn(List values) { + addCriterion("result in", values, "result"); + return (Criteria) this; + } + + public Criteria andResultNotIn(List values) { + addCriterion("result not in", values, "result"); + return (Criteria) this; + } + + public Criteria andResultBetween(String value1, String value2) { + addCriterion("result between", value1, value2, "result"); + return (Criteria) this; + } + + public Criteria andResultNotBetween(String value1, String value2) { + addCriterion("result not between", value1, value2, "result"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNull() { + addCriterion("creator_id is null"); + return (Criteria) this; + } + + public Criteria andCreatorIdIsNotNull() { + addCriterion("creator_id is not null"); + return (Criteria) this; + } + + public Criteria andCreatorIdEqualTo(Long value) { + addCriterion("creator_id =", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotEqualTo(Long value) { + addCriterion("creator_id <>", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThan(Long value) { + addCriterion("creator_id >", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdGreaterThanOrEqualTo(Long value) { + addCriterion("creator_id >=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThan(Long value) { + addCriterion("creator_id <", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdLessThanOrEqualTo(Long value) { + addCriterion("creator_id <=", value, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdIn(List values) { + addCriterion("creator_id in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotIn(List values) { + addCriterion("creator_id not in", values, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdBetween(Long value1, Long value2) { + addCriterion("creator_id between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreatorIdNotBetween(Long value1, Long value2) { + addCriterion("creator_id not between", value1, value2, "creatorId"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeIsNull() { + addCriterion("finish_time is null"); + return (Criteria) this; + } + + public Criteria andFinishTimeIsNotNull() { + addCriterion("finish_time is not null"); + return (Criteria) this; + } + + public Criteria andFinishTimeEqualTo(Date value) { + addCriterion("finish_time =", value, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeNotEqualTo(Date value) { + addCriterion("finish_time <>", value, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeGreaterThan(Date value) { + addCriterion("finish_time >", value, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeGreaterThanOrEqualTo(Date value) { + addCriterion("finish_time >=", value, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeLessThan(Date value) { + addCriterion("finish_time <", value, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeLessThanOrEqualTo(Date value) { + addCriterion("finish_time <=", value, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeIn(List values) { + addCriterion("finish_time in", values, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeNotIn(List values) { + addCriterion("finish_time not in", values, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeBetween(Date value1, Date value2) { + addCriterion("finish_time between", value1, value2, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeNotBetween(Date value1, Date value2) { + addCriterion("finish_time not between", value1, value2, "finishTime"); + return (Criteria) this; + } + + public Criteria andStartTimeIsNull() { + addCriterion("start_time is null"); + return (Criteria) this; + } + + public Criteria andStartTimeIsNotNull() { + addCriterion("start_time is not null"); + return (Criteria) this; + } + + public Criteria andStartTimeEqualTo(Date value) { + addCriterion("start_time =", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotEqualTo(Date value) { + addCriterion("start_time <>", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeGreaterThan(Date value) { + addCriterion("start_time >", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeGreaterThanOrEqualTo(Date value) { + addCriterion("start_time >=", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeLessThan(Date value) { + addCriterion("start_time <", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeLessThanOrEqualTo(Date value) { + addCriterion("start_time <=", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeIn(List values) { + addCriterion("start_time in", values, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotIn(List values) { + addCriterion("start_time not in", values, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeBetween(Date value1, Date value2) { + addCriterion("start_time between", value1, value2, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotBetween(Date value1, Date value2) { + addCriterion("start_time not between", value1, value2, "startTime"); + return (Criteria) this; + } + + public Criteria andParameterIsNull() { + addCriterion("parameter is null"); + return (Criteria) this; + } + + public Criteria andParameterIsNotNull() { + addCriterion("parameter is not null"); + return (Criteria) this; + } + + public Criteria andParameterEqualTo(String value) { + addCriterion("parameter =", value, "parameter"); + return (Criteria) this; + } + + public Criteria andParameterNotEqualTo(String value) { + addCriterion("parameter <>", value, "parameter"); + return (Criteria) this; + } + + public Criteria andParameterGreaterThan(String value) { + addCriterion("parameter >", value, "parameter"); + return (Criteria) this; + } + + public Criteria andParameterGreaterThanOrEqualTo(String value) { + addCriterion("parameter >=", value, "parameter"); + return (Criteria) this; + } + + public Criteria andParameterLessThan(String value) { + addCriterion("parameter <", value, "parameter"); + return (Criteria) this; + } + + public Criteria andParameterLessThanOrEqualTo(String value) { + addCriterion("parameter <=", value, "parameter"); + return (Criteria) this; + } + + public Criteria andParameterLike(String value) { + addCriterion("parameter like", value, "parameter"); + return (Criteria) this; + } + + public Criteria andParameterNotLike(String value) { + addCriterion("parameter not like", value, "parameter"); + return (Criteria) this; + } + + public Criteria andParameterIn(List values) { + addCriterion("parameter in", values, "parameter"); + return (Criteria) this; + } + + public Criteria andParameterNotIn(List values) { + addCriterion("parameter not in", values, "parameter"); + return (Criteria) this; + } + + public Criteria andParameterBetween(String value1, String value2) { + addCriterion("parameter between", value1, value2, "parameter"); + return (Criteria) this; + } + + public Criteria andParameterNotBetween(String value1, String value2) { + addCriterion("parameter not between", value1, value2, "parameter"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/Training.java b/src/main/java/club/joylink/rtss/entity/Training.java new file mode 100644 index 000000000..ffb14b4dd --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/Training.java @@ -0,0 +1,249 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * training + * @author + */ +public class Training implements Serializable { + private Long id; + + /** + * 地图id + */ + private Long mapId; + + /** + * 产品类型 + */ + private String prdType; + + /** + * 实训名称 + */ + private String name; + + /** + * 实训说明 + */ + private String remarks; + + /** + * 实训类型 + */ + private String type; + + /** + * 操作类型:数据字典 + */ + private String operateType; + + /** + * 定位设备编号 + */ + private String locateDeviceCode; + + /** + * 最小用时:单位s + */ + private Integer minDuration; + + /** + * 最大用时:单位s + */ + private Integer maxDuration; + + /** + * 生产者ID + */ + private Long authorId; + + /** + * 更新时间 + */ + private LocalDateTime updateTime; + + /** + * 状态:0-无效,1-有效 + */ + private String status; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getMapId() { + return mapId; + } + + public void setMapId(Long mapId) { + this.mapId = mapId; + } + + public String getPrdType() { + return prdType; + } + + public void setPrdType(String prdType) { + this.prdType = prdType; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getRemarks() { + return remarks; + } + + public void setRemarks(String remarks) { + this.remarks = remarks; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public String getOperateType() { + return operateType; + } + + public void setOperateType(String operateType) { + this.operateType = operateType; + } + + public String getLocateDeviceCode() { + return locateDeviceCode; + } + + public void setLocateDeviceCode(String locateDeviceCode) { + this.locateDeviceCode = locateDeviceCode; + } + + public Integer getMinDuration() { + return minDuration; + } + + public void setMinDuration(Integer minDuration) { + this.minDuration = minDuration; + } + + public Integer getMaxDuration() { + return maxDuration; + } + + public void setMaxDuration(Integer maxDuration) { + this.maxDuration = maxDuration; + } + + public Long getAuthorId() { + return authorId; + } + + public void setAuthorId(Long authorId) { + this.authorId = authorId; + } + + public LocalDateTime getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(LocalDateTime updateTime) { + this.updateTime = updateTime; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + Training other = (Training) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getPrdType() == null ? other.getPrdType() == null : this.getPrdType().equals(other.getPrdType())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks())) + && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) + && (this.getOperateType() == null ? other.getOperateType() == null : this.getOperateType().equals(other.getOperateType())) + && (this.getLocateDeviceCode() == null ? other.getLocateDeviceCode() == null : this.getLocateDeviceCode().equals(other.getLocateDeviceCode())) + && (this.getMinDuration() == null ? other.getMinDuration() == null : this.getMinDuration().equals(other.getMinDuration())) + && (this.getMaxDuration() == null ? other.getMaxDuration() == null : this.getMaxDuration().equals(other.getMaxDuration())) + && (this.getAuthorId() == null ? other.getAuthorId() == null : this.getAuthorId().equals(other.getAuthorId())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getPrdType() == null) ? 0 : getPrdType().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode()); + result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); + result = prime * result + ((getOperateType() == null) ? 0 : getOperateType().hashCode()); + result = prime * result + ((getLocateDeviceCode() == null) ? 0 : getLocateDeviceCode().hashCode()); + result = prime * result + ((getMinDuration() == null) ? 0 : getMinDuration().hashCode()); + result = prime * result + ((getMaxDuration() == null) ? 0 : getMaxDuration().hashCode()); + result = prime * result + ((getAuthorId() == null) ? 0 : getAuthorId().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", mapId=").append(mapId); + sb.append(", prdType=").append(prdType); + sb.append(", name=").append(name); + sb.append(", remarks=").append(remarks); + sb.append(", type=").append(type); + sb.append(", operateType=").append(operateType); + sb.append(", locateDeviceCode=").append(locateDeviceCode); + sb.append(", minDuration=").append(minDuration); + sb.append(", maxDuration=").append(maxDuration); + sb.append(", authorId=").append(authorId); + sb.append(", updateTime=").append(updateTime); + sb.append(", status=").append(status); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/TrainingExample.java b/src/main/java/club/joylink/rtss/entity/TrainingExample.java new file mode 100644 index 000000000..ea8537636 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/TrainingExample.java @@ -0,0 +1,1073 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class TrainingExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public TrainingExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andPrdTypeIsNull() { + addCriterion("prd_type is null"); + return (Criteria) this; + } + + public Criteria andPrdTypeIsNotNull() { + addCriterion("prd_type is not null"); + return (Criteria) this; + } + + public Criteria andPrdTypeEqualTo(String value) { + addCriterion("prd_type =", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotEqualTo(String value) { + addCriterion("prd_type <>", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeGreaterThan(String value) { + addCriterion("prd_type >", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeGreaterThanOrEqualTo(String value) { + addCriterion("prd_type >=", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeLessThan(String value) { + addCriterion("prd_type <", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeLessThanOrEqualTo(String value) { + addCriterion("prd_type <=", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeLike(String value) { + addCriterion("prd_type like", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotLike(String value) { + addCriterion("prd_type not like", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeIn(List values) { + addCriterion("prd_type in", values, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotIn(List values) { + addCriterion("prd_type not in", values, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeBetween(String value1, String value2) { + addCriterion("prd_type between", value1, value2, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotBetween(String value1, String value2) { + addCriterion("prd_type not between", value1, value2, "prdType"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andRemarksIsNull() { + addCriterion("remarks is null"); + return (Criteria) this; + } + + public Criteria andRemarksIsNotNull() { + addCriterion("remarks is not null"); + return (Criteria) this; + } + + public Criteria andRemarksEqualTo(String value) { + addCriterion("remarks =", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotEqualTo(String value) { + addCriterion("remarks <>", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksGreaterThan(String value) { + addCriterion("remarks >", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksGreaterThanOrEqualTo(String value) { + addCriterion("remarks >=", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLessThan(String value) { + addCriterion("remarks <", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLessThanOrEqualTo(String value) { + addCriterion("remarks <=", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksLike(String value) { + addCriterion("remarks like", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotLike(String value) { + addCriterion("remarks not like", value, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksIn(List values) { + addCriterion("remarks in", values, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotIn(List values) { + addCriterion("remarks not in", values, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksBetween(String value1, String value2) { + addCriterion("remarks between", value1, value2, "remarks"); + return (Criteria) this; + } + + public Criteria andRemarksNotBetween(String value1, String value2) { + addCriterion("remarks not between", value1, value2, "remarks"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("`type` is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("`type` is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(String value) { + addCriterion("`type` =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(String value) { + addCriterion("`type` <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(String value) { + addCriterion("`type` >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(String value) { + addCriterion("`type` >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(String value) { + addCriterion("`type` <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(String value) { + addCriterion("`type` <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLike(String value) { + addCriterion("`type` like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotLike(String value) { + addCriterion("`type` not like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("`type` in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("`type` not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(String value1, String value2) { + addCriterion("`type` between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(String value1, String value2) { + addCriterion("`type` not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andOperateTypeIsNull() { + addCriterion("operate_type is null"); + return (Criteria) this; + } + + public Criteria andOperateTypeIsNotNull() { + addCriterion("operate_type is not null"); + return (Criteria) this; + } + + public Criteria andOperateTypeEqualTo(String value) { + addCriterion("operate_type =", value, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeNotEqualTo(String value) { + addCriterion("operate_type <>", value, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeGreaterThan(String value) { + addCriterion("operate_type >", value, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeGreaterThanOrEqualTo(String value) { + addCriterion("operate_type >=", value, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeLessThan(String value) { + addCriterion("operate_type <", value, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeLessThanOrEqualTo(String value) { + addCriterion("operate_type <=", value, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeLike(String value) { + addCriterion("operate_type like", value, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeNotLike(String value) { + addCriterion("operate_type not like", value, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeIn(List values) { + addCriterion("operate_type in", values, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeNotIn(List values) { + addCriterion("operate_type not in", values, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeBetween(String value1, String value2) { + addCriterion("operate_type between", value1, value2, "operateType"); + return (Criteria) this; + } + + public Criteria andOperateTypeNotBetween(String value1, String value2) { + addCriterion("operate_type not between", value1, value2, "operateType"); + return (Criteria) this; + } + + public Criteria andLocateDeviceCodeIsNull() { + addCriterion("locate_device_code is null"); + return (Criteria) this; + } + + public Criteria andLocateDeviceCodeIsNotNull() { + addCriterion("locate_device_code is not null"); + return (Criteria) this; + } + + public Criteria andLocateDeviceCodeEqualTo(String value) { + addCriterion("locate_device_code =", value, "locateDeviceCode"); + return (Criteria) this; + } + + public Criteria andLocateDeviceCodeNotEqualTo(String value) { + addCriterion("locate_device_code <>", value, "locateDeviceCode"); + return (Criteria) this; + } + + public Criteria andLocateDeviceCodeGreaterThan(String value) { + addCriterion("locate_device_code >", value, "locateDeviceCode"); + return (Criteria) this; + } + + public Criteria andLocateDeviceCodeGreaterThanOrEqualTo(String value) { + addCriterion("locate_device_code >=", value, "locateDeviceCode"); + return (Criteria) this; + } + + public Criteria andLocateDeviceCodeLessThan(String value) { + addCriterion("locate_device_code <", value, "locateDeviceCode"); + return (Criteria) this; + } + + public Criteria andLocateDeviceCodeLessThanOrEqualTo(String value) { + addCriterion("locate_device_code <=", value, "locateDeviceCode"); + return (Criteria) this; + } + + public Criteria andLocateDeviceCodeLike(String value) { + addCriterion("locate_device_code like", value, "locateDeviceCode"); + return (Criteria) this; + } + + public Criteria andLocateDeviceCodeNotLike(String value) { + addCriterion("locate_device_code not like", value, "locateDeviceCode"); + return (Criteria) this; + } + + public Criteria andLocateDeviceCodeIn(List values) { + addCriterion("locate_device_code in", values, "locateDeviceCode"); + return (Criteria) this; + } + + public Criteria andLocateDeviceCodeNotIn(List values) { + addCriterion("locate_device_code not in", values, "locateDeviceCode"); + return (Criteria) this; + } + + public Criteria andLocateDeviceCodeBetween(String value1, String value2) { + addCriterion("locate_device_code between", value1, value2, "locateDeviceCode"); + return (Criteria) this; + } + + public Criteria andLocateDeviceCodeNotBetween(String value1, String value2) { + addCriterion("locate_device_code not between", value1, value2, "locateDeviceCode"); + return (Criteria) this; + } + + public Criteria andMinDurationIsNull() { + addCriterion("min_duration is null"); + return (Criteria) this; + } + + public Criteria andMinDurationIsNotNull() { + addCriterion("min_duration is not null"); + return (Criteria) this; + } + + public Criteria andMinDurationEqualTo(Integer value) { + addCriterion("min_duration =", value, "minDuration"); + return (Criteria) this; + } + + public Criteria andMinDurationNotEqualTo(Integer value) { + addCriterion("min_duration <>", value, "minDuration"); + return (Criteria) this; + } + + public Criteria andMinDurationGreaterThan(Integer value) { + addCriterion("min_duration >", value, "minDuration"); + return (Criteria) this; + } + + public Criteria andMinDurationGreaterThanOrEqualTo(Integer value) { + addCriterion("min_duration >=", value, "minDuration"); + return (Criteria) this; + } + + public Criteria andMinDurationLessThan(Integer value) { + addCriterion("min_duration <", value, "minDuration"); + return (Criteria) this; + } + + public Criteria andMinDurationLessThanOrEqualTo(Integer value) { + addCriterion("min_duration <=", value, "minDuration"); + return (Criteria) this; + } + + public Criteria andMinDurationIn(List values) { + addCriterion("min_duration in", values, "minDuration"); + return (Criteria) this; + } + + public Criteria andMinDurationNotIn(List values) { + addCriterion("min_duration not in", values, "minDuration"); + return (Criteria) this; + } + + public Criteria andMinDurationBetween(Integer value1, Integer value2) { + addCriterion("min_duration between", value1, value2, "minDuration"); + return (Criteria) this; + } + + public Criteria andMinDurationNotBetween(Integer value1, Integer value2) { + addCriterion("min_duration not between", value1, value2, "minDuration"); + return (Criteria) this; + } + + public Criteria andMaxDurationIsNull() { + addCriterion("max_duration is null"); + return (Criteria) this; + } + + public Criteria andMaxDurationIsNotNull() { + addCriterion("max_duration is not null"); + return (Criteria) this; + } + + public Criteria andMaxDurationEqualTo(Integer value) { + addCriterion("max_duration =", value, "maxDuration"); + return (Criteria) this; + } + + public Criteria andMaxDurationNotEqualTo(Integer value) { + addCriterion("max_duration <>", value, "maxDuration"); + return (Criteria) this; + } + + public Criteria andMaxDurationGreaterThan(Integer value) { + addCriterion("max_duration >", value, "maxDuration"); + return (Criteria) this; + } + + public Criteria andMaxDurationGreaterThanOrEqualTo(Integer value) { + addCriterion("max_duration >=", value, "maxDuration"); + return (Criteria) this; + } + + public Criteria andMaxDurationLessThan(Integer value) { + addCriterion("max_duration <", value, "maxDuration"); + return (Criteria) this; + } + + public Criteria andMaxDurationLessThanOrEqualTo(Integer value) { + addCriterion("max_duration <=", value, "maxDuration"); + return (Criteria) this; + } + + public Criteria andMaxDurationIn(List values) { + addCriterion("max_duration in", values, "maxDuration"); + return (Criteria) this; + } + + public Criteria andMaxDurationNotIn(List values) { + addCriterion("max_duration not in", values, "maxDuration"); + return (Criteria) this; + } + + public Criteria andMaxDurationBetween(Integer value1, Integer value2) { + addCriterion("max_duration between", value1, value2, "maxDuration"); + return (Criteria) this; + } + + public Criteria andMaxDurationNotBetween(Integer value1, Integer value2) { + addCriterion("max_duration not between", value1, value2, "maxDuration"); + return (Criteria) this; + } + + public Criteria andAuthorIdIsNull() { + addCriterion("author_id is null"); + return (Criteria) this; + } + + public Criteria andAuthorIdIsNotNull() { + addCriterion("author_id is not null"); + return (Criteria) this; + } + + public Criteria andAuthorIdEqualTo(Long value) { + addCriterion("author_id =", value, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdNotEqualTo(Long value) { + addCriterion("author_id <>", value, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdGreaterThan(Long value) { + addCriterion("author_id >", value, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdGreaterThanOrEqualTo(Long value) { + addCriterion("author_id >=", value, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdLessThan(Long value) { + addCriterion("author_id <", value, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdLessThanOrEqualTo(Long value) { + addCriterion("author_id <=", value, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdIn(List values) { + addCriterion("author_id in", values, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdNotIn(List values) { + addCriterion("author_id not in", values, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdBetween(Long value1, Long value2) { + addCriterion("author_id between", value1, value2, "authorId"); + return (Criteria) this; + } + + public Criteria andAuthorIdNotBetween(Long value1, Long value2) { + addCriterion("author_id not between", value1, value2, "authorId"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(LocalDateTime value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(LocalDateTime value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(LocalDateTime value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(LocalDateTime value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/TrainingWithBLOBs.java b/src/main/java/club/joylink/rtss/entity/TrainingWithBLOBs.java new file mode 100644 index 000000000..028d3382e --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/TrainingWithBLOBs.java @@ -0,0 +1,101 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * training + * @author + */ +public class TrainingWithBLOBs extends Training implements Serializable { + /** + * 步骤 + */ + private String steps; + + /** + * 背景 + */ + private String scenes; + + private static final long serialVersionUID = 1L; + + public String getSteps() { + return steps; + } + + public void setSteps(String steps) { + this.steps = steps; + } + + public String getScenes() { + return scenes; + } + + public void setScenes(String scenes) { + this.scenes = scenes; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + TrainingWithBLOBs other = (TrainingWithBLOBs) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getPrdType() == null ? other.getPrdType() == null : this.getPrdType().equals(other.getPrdType())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks())) + && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) + && (this.getOperateType() == null ? other.getOperateType() == null : this.getOperateType().equals(other.getOperateType())) + && (this.getLocateDeviceCode() == null ? other.getLocateDeviceCode() == null : this.getLocateDeviceCode().equals(other.getLocateDeviceCode())) + && (this.getMinDuration() == null ? other.getMinDuration() == null : this.getMinDuration().equals(other.getMinDuration())) + && (this.getMaxDuration() == null ? other.getMaxDuration() == null : this.getMaxDuration().equals(other.getMaxDuration())) + && (this.getAuthorId() == null ? other.getAuthorId() == null : this.getAuthorId().equals(other.getAuthorId())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getSteps() == null ? other.getSteps() == null : this.getSteps().equals(other.getSteps())) + && (this.getScenes() == null ? other.getScenes() == null : this.getScenes().equals(other.getScenes())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getPrdType() == null) ? 0 : getPrdType().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode()); + result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); + result = prime * result + ((getOperateType() == null) ? 0 : getOperateType().hashCode()); + result = prime * result + ((getLocateDeviceCode() == null) ? 0 : getLocateDeviceCode().hashCode()); + result = prime * result + ((getMinDuration() == null) ? 0 : getMinDuration().hashCode()); + result = prime * result + ((getMaxDuration() == null) ? 0 : getMaxDuration().hashCode()); + result = prime * result + ((getAuthorId() == null) ? 0 : getAuthorId().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getSteps() == null) ? 0 : getSteps().hashCode()); + result = prime * result + ((getScenes() == null) ? 0 : getScenes().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", steps=").append(steps); + sb.append(", scenes=").append(scenes); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/UserConfig.java b/src/main/java/club/joylink/rtss/entity/UserConfig.java new file mode 100644 index 000000000..07dcf308d --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/UserConfig.java @@ -0,0 +1,125 @@ +package club.joylink.rtss.entity; + +import club.joylink.rtss.vo.client.UserConfigVO; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + +/** + * user_config + * @author + */ +public class UserConfig implements Serializable { + private Long id; + + /** + * 用户ID + */ + private Long userId; + + /** + * 配置项编号:数据字典值 + */ + private String code; + + /** + * 配置项值 + */ + private String val; + + private static final long serialVersionUID = 1L; + + public UserConfig() {} + + public UserConfig(UserConfigVO userConfigVO) { + this.code = userConfigVO.getCode(); + this.val = userConfigVO.getVal(); + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getVal() { + return val; + } + + public void setVal(String val) { + this.val = val; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + UserConfig other = (UserConfig) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) + && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode())) + && (this.getVal() == null ? other.getVal() == null : this.getVal().equals(other.getVal())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); + result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode()); + result = prime * result + ((getVal() == null) ? 0 : getVal().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", userId=").append(userId); + sb.append(", code=").append(code); + sb.append(", param=").append(val); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } + + public static List convertToVOList(List userConfigList) { + List userConfigVOList = new ArrayList<>(); + userConfigList.forEach(userConfig -> { + UserConfigVO userConfigVO = new UserConfigVO(userConfig); + userConfigVOList.add(userConfigVO); + }); + return userConfigVOList; + } + +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/UserConfigExample.java b/src/main/java/club/joylink/rtss/entity/UserConfigExample.java new file mode 100644 index 000000000..8a3152ff9 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/UserConfigExample.java @@ -0,0 +1,482 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class UserConfigExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Integer offset; + + public UserConfigExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Integer offset) { + this.offset = offset; + } + + public Integer getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andCodeIsNull() { + addCriterion("code is null"); + return (Criteria) this; + } + + public Criteria andCodeIsNotNull() { + addCriterion("code is not null"); + return (Criteria) this; + } + + public Criteria andCodeEqualTo(String value) { + addCriterion("code =", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotEqualTo(String value) { + addCriterion("code <>", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThan(String value) { + addCriterion("code >", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeGreaterThanOrEqualTo(String value) { + addCriterion("code >=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThan(String value) { + addCriterion("code <", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLessThanOrEqualTo(String value) { + addCriterion("code <=", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeLike(String value) { + addCriterion("code like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotLike(String value) { + addCriterion("code not like", value, "code"); + return (Criteria) this; + } + + public Criteria andCodeIn(List values) { + addCriterion("code in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotIn(List values) { + addCriterion("code not in", values, "code"); + return (Criteria) this; + } + + public Criteria andCodeBetween(String value1, String value2) { + addCriterion("code between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andCodeNotBetween(String value1, String value2) { + addCriterion("code not between", value1, value2, "code"); + return (Criteria) this; + } + + public Criteria andValIsNull() { + addCriterion("param is null"); + return (Criteria) this; + } + + public Criteria andValIsNotNull() { + addCriterion("param is not null"); + return (Criteria) this; + } + + public Criteria andValEqualTo(String value) { + addCriterion("param =", value, "param"); + return (Criteria) this; + } + + public Criteria andValNotEqualTo(String value) { + addCriterion("param <>", value, "param"); + return (Criteria) this; + } + + public Criteria andValGreaterThan(String value) { + addCriterion("param >", value, "param"); + return (Criteria) this; + } + + public Criteria andValGreaterThanOrEqualTo(String value) { + addCriterion("param >=", value, "param"); + return (Criteria) this; + } + + public Criteria andValLessThan(String value) { + addCriterion("param <", value, "param"); + return (Criteria) this; + } + + public Criteria andValLessThanOrEqualTo(String value) { + addCriterion("param <=", value, "param"); + return (Criteria) this; + } + + public Criteria andValLike(String value) { + addCriterion("param like", value, "param"); + return (Criteria) this; + } + + public Criteria andValNotLike(String value) { + addCriterion("param not like", value, "param"); + return (Criteria) this; + } + + public Criteria andValIn(List values) { + addCriterion("param in", values, "param"); + return (Criteria) this; + } + + public Criteria andValNotIn(List values) { + addCriterion("param not in", values, "param"); + return (Criteria) this; + } + + public Criteria andValBetween(String value1, String value2) { + addCriterion("param between", value1, value2, "param"); + return (Criteria) this; + } + + public Criteria andValNotBetween(String value1, String value2) { + addCriterion("param not between", value1, value2, "param"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/UserExam.java b/src/main/java/club/joylink/rtss/entity/UserExam.java new file mode 100644 index 000000000..fdd68e3b5 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/UserExam.java @@ -0,0 +1,185 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.util.Date; + +/** + * user_exam + * @author + */ +public class UserExam implements Serializable { + private Long id; + + /** + * 用户ID + */ + private Long userId; + + /** + * 考试ID + */ + private Long examId; + + /** + * 考试名称(冗余) + */ + private String examName; + + /** + * 用户得分 + */ + private Float score; + + /** + * 开始时间 + */ + private Date startTime; + + /** + * 结束时间 + */ + private Date endTime; + + /** + * 用时 + */ + private Integer usedTime; + + /** + * 考试结果 + */ + private String result; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public Long getExamId() { + return examId; + } + + public void setExamId(Long examId) { + this.examId = examId; + } + + public String getExamName() { + return examName; + } + + public void setExamName(String examName) { + this.examName = examName; + } + + public Float getScore() { + return score; + } + + public void setScore(Float score) { + this.score = score; + } + + public Date getStartTime() { + return startTime; + } + + public void setStartTime(Date startTime) { + this.startTime = startTime; + } + + public Date getEndTime() { + return endTime; + } + + public void setEndTime(Date endTime) { + this.endTime = endTime; + } + + public Integer getUsedTime() { + return usedTime; + } + + public void setUsedTime(Integer usedTime) { + this.usedTime = usedTime; + } + + public String getResult() { + return result; + } + + public void setResult(String result) { + this.result = result; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + UserExam other = (UserExam) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) + && (this.getExamId() == null ? other.getExamId() == null : this.getExamId().equals(other.getExamId())) + && (this.getExamName() == null ? other.getExamName() == null : this.getExamName().equals(other.getExamName())) + && (this.getScore() == null ? other.getScore() == null : this.getScore().equals(other.getScore())) + && (this.getStartTime() == null ? other.getStartTime() == null : this.getStartTime().equals(other.getStartTime())) + && (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime())) + && (this.getUsedTime() == null ? other.getUsedTime() == null : this.getUsedTime().equals(other.getUsedTime())) + && (this.getResult() == null ? other.getResult() == null : this.getResult().equals(other.getResult())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); + result = prime * result + ((getExamId() == null) ? 0 : getExamId().hashCode()); + result = prime * result + ((getExamName() == null) ? 0 : getExamName().hashCode()); + result = prime * result + ((getScore() == null) ? 0 : getScore().hashCode()); + result = prime * result + ((getStartTime() == null) ? 0 : getStartTime().hashCode()); + result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode()); + result = prime * result + ((getUsedTime() == null) ? 0 : getUsedTime().hashCode()); + result = prime * result + ((getResult() == null) ? 0 : getResult().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", userId=").append(userId); + sb.append(", examId=").append(examId); + sb.append(", examName=").append(examName); + sb.append(", score=").append(score); + sb.append(", startTime=").append(startTime); + sb.append(", endTime=").append(endTime); + sb.append(", usedTime=").append(usedTime); + sb.append(", result=").append(result); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/UserExamExample.java b/src/main/java/club/joylink/rtss/entity/UserExamExample.java new file mode 100644 index 000000000..e65f73f67 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/UserExamExample.java @@ -0,0 +1,783 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class UserExamExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Integer offset; + + public UserExamExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Integer offset) { + this.offset = offset; + } + + public Integer getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andExamIdIsNull() { + addCriterion("exam_id is null"); + return (Criteria) this; + } + + public Criteria andExamIdIsNotNull() { + addCriterion("exam_id is not null"); + return (Criteria) this; + } + + public Criteria andExamIdEqualTo(Long value) { + addCriterion("exam_id =", value, "examId"); + return (Criteria) this; + } + + public Criteria andExamIdNotEqualTo(Long value) { + addCriterion("exam_id <>", value, "examId"); + return (Criteria) this; + } + + public Criteria andExamIdGreaterThan(Long value) { + addCriterion("exam_id >", value, "examId"); + return (Criteria) this; + } + + public Criteria andExamIdGreaterThanOrEqualTo(Long value) { + addCriterion("exam_id >=", value, "examId"); + return (Criteria) this; + } + + public Criteria andExamIdLessThan(Long value) { + addCriterion("exam_id <", value, "examId"); + return (Criteria) this; + } + + public Criteria andExamIdLessThanOrEqualTo(Long value) { + addCriterion("exam_id <=", value, "examId"); + return (Criteria) this; + } + + public Criteria andExamIdIn(List values) { + addCriterion("exam_id in", values, "examId"); + return (Criteria) this; + } + + public Criteria andExamIdNotIn(List values) { + addCriterion("exam_id not in", values, "examId"); + return (Criteria) this; + } + + public Criteria andExamIdBetween(Long value1, Long value2) { + addCriterion("exam_id between", value1, value2, "examId"); + return (Criteria) this; + } + + public Criteria andExamIdNotBetween(Long value1, Long value2) { + addCriterion("exam_id not between", value1, value2, "examId"); + return (Criteria) this; + } + + public Criteria andExamNameIsNull() { + addCriterion("exam_name is null"); + return (Criteria) this; + } + + public Criteria andExamNameIsNotNull() { + addCriterion("exam_name is not null"); + return (Criteria) this; + } + + public Criteria andExamNameEqualTo(String value) { + addCriterion("exam_name =", value, "examName"); + return (Criteria) this; + } + + public Criteria andExamNameNotEqualTo(String value) { + addCriterion("exam_name <>", value, "examName"); + return (Criteria) this; + } + + public Criteria andExamNameGreaterThan(String value) { + addCriterion("exam_name >", value, "examName"); + return (Criteria) this; + } + + public Criteria andExamNameGreaterThanOrEqualTo(String value) { + addCriterion("exam_name >=", value, "examName"); + return (Criteria) this; + } + + public Criteria andExamNameLessThan(String value) { + addCriterion("exam_name <", value, "examName"); + return (Criteria) this; + } + + public Criteria andExamNameLessThanOrEqualTo(String value) { + addCriterion("exam_name <=", value, "examName"); + return (Criteria) this; + } + + public Criteria andExamNameLike(String value) { + addCriterion("exam_name like", value, "examName"); + return (Criteria) this; + } + + public Criteria andExamNameNotLike(String value) { + addCriterion("exam_name not like", value, "examName"); + return (Criteria) this; + } + + public Criteria andExamNameIn(List values) { + addCriterion("exam_name in", values, "examName"); + return (Criteria) this; + } + + public Criteria andExamNameNotIn(List values) { + addCriterion("exam_name not in", values, "examName"); + return (Criteria) this; + } + + public Criteria andExamNameBetween(String value1, String value2) { + addCriterion("exam_name between", value1, value2, "examName"); + return (Criteria) this; + } + + public Criteria andExamNameNotBetween(String value1, String value2) { + addCriterion("exam_name not between", value1, value2, "examName"); + return (Criteria) this; + } + + public Criteria andScoreIsNull() { + addCriterion("score is null"); + return (Criteria) this; + } + + public Criteria andScoreIsNotNull() { + addCriterion("score is not null"); + return (Criteria) this; + } + + public Criteria andScoreEqualTo(Float value) { + addCriterion("score =", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotEqualTo(Float value) { + addCriterion("score <>", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreGreaterThan(Float value) { + addCriterion("score >", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreGreaterThanOrEqualTo(Float value) { + addCriterion("score >=", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreLessThan(Float value) { + addCriterion("score <", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreLessThanOrEqualTo(Float value) { + addCriterion("score <=", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreIn(List values) { + addCriterion("score in", values, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotIn(List values) { + addCriterion("score not in", values, "score"); + return (Criteria) this; + } + + public Criteria andScoreBetween(Float value1, Float value2) { + addCriterion("score between", value1, value2, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotBetween(Float value1, Float value2) { + addCriterion("score not between", value1, value2, "score"); + return (Criteria) this; + } + + public Criteria andStartTimeIsNull() { + addCriterion("start_time is null"); + return (Criteria) this; + } + + public Criteria andStartTimeIsNotNull() { + addCriterion("start_time is not null"); + return (Criteria) this; + } + + public Criteria andStartTimeEqualTo(Date value) { + addCriterion("start_time =", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotEqualTo(Date value) { + addCriterion("start_time <>", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeGreaterThan(Date value) { + addCriterion("start_time >", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeGreaterThanOrEqualTo(Date value) { + addCriterion("start_time >=", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeLessThan(Date value) { + addCriterion("start_time <", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeLessThanOrEqualTo(Date value) { + addCriterion("start_time <=", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeIn(List values) { + addCriterion("start_time in", values, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotIn(List values) { + addCriterion("start_time not in", values, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeBetween(Date value1, Date value2) { + addCriterion("start_time between", value1, value2, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotBetween(Date value1, Date value2) { + addCriterion("start_time not between", value1, value2, "startTime"); + return (Criteria) this; + } + + public Criteria andEndTimeIsNull() { + addCriterion("end_time is null"); + return (Criteria) this; + } + + public Criteria andEndTimeIsNotNull() { + addCriterion("end_time is not null"); + return (Criteria) this; + } + + public Criteria andEndTimeEqualTo(Date value) { + addCriterion("end_time =", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeNotEqualTo(Date value) { + addCriterion("end_time <>", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeGreaterThan(Date value) { + addCriterion("end_time >", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeGreaterThanOrEqualTo(Date value) { + addCriterion("end_time >=", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeLessThan(Date value) { + addCriterion("end_time <", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeLessThanOrEqualTo(Date value) { + addCriterion("end_time <=", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeIn(List values) { + addCriterion("end_time in", values, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeNotIn(List values) { + addCriterion("end_time not in", values, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeBetween(Date value1, Date value2) { + addCriterion("end_time between", value1, value2, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeNotBetween(Date value1, Date value2) { + addCriterion("end_time not between", value1, value2, "endTime"); + return (Criteria) this; + } + + public Criteria andUsedTimeIsNull() { + addCriterion("used_time is null"); + return (Criteria) this; + } + + public Criteria andUsedTimeIsNotNull() { + addCriterion("used_time is not null"); + return (Criteria) this; + } + + public Criteria andUsedTimeEqualTo(Integer value) { + addCriterion("used_time =", value, "usedTime"); + return (Criteria) this; + } + + public Criteria andUsedTimeNotEqualTo(Integer value) { + addCriterion("used_time <>", value, "usedTime"); + return (Criteria) this; + } + + public Criteria andUsedTimeGreaterThan(Integer value) { + addCriterion("used_time >", value, "usedTime"); + return (Criteria) this; + } + + public Criteria andUsedTimeGreaterThanOrEqualTo(Integer value) { + addCriterion("used_time >=", value, "usedTime"); + return (Criteria) this; + } + + public Criteria andUsedTimeLessThan(Integer value) { + addCriterion("used_time <", value, "usedTime"); + return (Criteria) this; + } + + public Criteria andUsedTimeLessThanOrEqualTo(Integer value) { + addCriterion("used_time <=", value, "usedTime"); + return (Criteria) this; + } + + public Criteria andUsedTimeIn(List values) { + addCriterion("used_time in", values, "usedTime"); + return (Criteria) this; + } + + public Criteria andUsedTimeNotIn(List values) { + addCriterion("used_time not in", values, "usedTime"); + return (Criteria) this; + } + + public Criteria andUsedTimeBetween(Integer value1, Integer value2) { + addCriterion("used_time between", value1, value2, "usedTime"); + return (Criteria) this; + } + + public Criteria andUsedTimeNotBetween(Integer value1, Integer value2) { + addCriterion("used_time not between", value1, value2, "usedTime"); + return (Criteria) this; + } + + public Criteria andResultIsNull() { + addCriterion("result is null"); + return (Criteria) this; + } + + public Criteria andResultIsNotNull() { + addCriterion("result is not null"); + return (Criteria) this; + } + + public Criteria andResultEqualTo(String value) { + addCriterion("result =", value, "result"); + return (Criteria) this; + } + + public Criteria andResultNotEqualTo(String value) { + addCriterion("result <>", value, "result"); + return (Criteria) this; + } + + public Criteria andResultGreaterThan(String value) { + addCriterion("result >", value, "result"); + return (Criteria) this; + } + + public Criteria andResultGreaterThanOrEqualTo(String value) { + addCriterion("result >=", value, "result"); + return (Criteria) this; + } + + public Criteria andResultLessThan(String value) { + addCriterion("result <", value, "result"); + return (Criteria) this; + } + + public Criteria andResultLessThanOrEqualTo(String value) { + addCriterion("result <=", value, "result"); + return (Criteria) this; + } + + public Criteria andResultLike(String value) { + addCriterion("result like", value, "result"); + return (Criteria) this; + } + + public Criteria andResultNotLike(String value) { + addCriterion("result not like", value, "result"); + return (Criteria) this; + } + + public Criteria andResultIn(List values) { + addCriterion("result in", values, "result"); + return (Criteria) this; + } + + public Criteria andResultNotIn(List values) { + addCriterion("result not in", values, "result"); + return (Criteria) this; + } + + public Criteria andResultBetween(String value1, String value2) { + addCriterion("result between", value1, value2, "result"); + return (Criteria) this; + } + + public Criteria andResultNotBetween(String value1, String value2) { + addCriterion("result not between", value1, value2, "result"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/UserExamQuestions.java b/src/main/java/club/joylink/rtss/entity/UserExamQuestions.java new file mode 100644 index 000000000..7594ad379 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/UserExamQuestions.java @@ -0,0 +1,168 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * user_exam_questions + * @author + */ +public class UserExamQuestions implements Serializable { + private Long id; + + /** + * 用户考试ID + */ + private Long userExamId; + + /** + * 规则ID + */ + private Long rulesId; + + /** + * 实训ID + */ + private Long trainingId; + + /** + * 总分 + */ + private Integer point; + + /** + * 得分 + */ + private Float score; + + /** + * 使用时间:单位s + */ + private Integer usedTime; + + /** + * 试题结果或原因 + */ + private String cause; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getUserExamId() { + return userExamId; + } + + public void setUserExamId(Long userExamId) { + this.userExamId = userExamId; + } + + public Long getRulesId() { + return rulesId; + } + + public void setRulesId(Long rulesId) { + this.rulesId = rulesId; + } + + public Long getTrainingId() { + return trainingId; + } + + public void setTrainingId(Long trainingId) { + this.trainingId = trainingId; + } + + public Integer getPoint() { + return point; + } + + public void setPoint(Integer point) { + this.point = point; + } + + public Float getScore() { + return score; + } + + public void setScore(Float score) { + this.score = score; + } + + public Integer getUsedTime() { + return usedTime; + } + + public void setUsedTime(Integer usedTime) { + this.usedTime = usedTime; + } + + public String getCause() { + return cause; + } + + public void setCause(String cause) { + this.cause = cause; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + UserExamQuestions other = (UserExamQuestions) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getUserExamId() == null ? other.getUserExamId() == null : this.getUserExamId().equals(other.getUserExamId())) + && (this.getRulesId() == null ? other.getRulesId() == null : this.getRulesId().equals(other.getRulesId())) + && (this.getTrainingId() == null ? other.getTrainingId() == null : this.getTrainingId().equals(other.getTrainingId())) + && (this.getPoint() == null ? other.getPoint() == null : this.getPoint().equals(other.getPoint())) + && (this.getScore() == null ? other.getScore() == null : this.getScore().equals(other.getScore())) + && (this.getUsedTime() == null ? other.getUsedTime() == null : this.getUsedTime().equals(other.getUsedTime())) + && (this.getCause() == null ? other.getCause() == null : this.getCause().equals(other.getCause())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getUserExamId() == null) ? 0 : getUserExamId().hashCode()); + result = prime * result + ((getRulesId() == null) ? 0 : getRulesId().hashCode()); + result = prime * result + ((getTrainingId() == null) ? 0 : getTrainingId().hashCode()); + result = prime * result + ((getPoint() == null) ? 0 : getPoint().hashCode()); + result = prime * result + ((getScore() == null) ? 0 : getScore().hashCode()); + result = prime * result + ((getUsedTime() == null) ? 0 : getUsedTime().hashCode()); + result = prime * result + ((getCause() == null) ? 0 : getCause().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", userExamId=").append(userExamId); + sb.append(", rulesId=").append(rulesId); + sb.append(", trainingId=").append(trainingId); + sb.append(", point=").append(point); + sb.append(", score=").append(score); + sb.append(", usedTime=").append(usedTime); + sb.append(", cause=").append(cause); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/UserExamQuestionsExample.java b/src/main/java/club/joylink/rtss/entity/UserExamQuestionsExample.java new file mode 100644 index 000000000..fe52b8c4b --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/UserExamQuestionsExample.java @@ -0,0 +1,712 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class UserExamQuestionsExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Integer offset; + + public UserExamQuestionsExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Integer offset) { + this.offset = offset; + } + + public Integer getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andUserExamIdIsNull() { + addCriterion("user_exam_id is null"); + return (Criteria) this; + } + + public Criteria andUserExamIdIsNotNull() { + addCriterion("user_exam_id is not null"); + return (Criteria) this; + } + + public Criteria andUserExamIdEqualTo(Long value) { + addCriterion("user_exam_id =", value, "userExamId"); + return (Criteria) this; + } + + public Criteria andUserExamIdNotEqualTo(Long value) { + addCriterion("user_exam_id <>", value, "userExamId"); + return (Criteria) this; + } + + public Criteria andUserExamIdGreaterThan(Long value) { + addCriterion("user_exam_id >", value, "userExamId"); + return (Criteria) this; + } + + public Criteria andUserExamIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_exam_id >=", value, "userExamId"); + return (Criteria) this; + } + + public Criteria andUserExamIdLessThan(Long value) { + addCriterion("user_exam_id <", value, "userExamId"); + return (Criteria) this; + } + + public Criteria andUserExamIdLessThanOrEqualTo(Long value) { + addCriterion("user_exam_id <=", value, "userExamId"); + return (Criteria) this; + } + + public Criteria andUserExamIdIn(List values) { + addCriterion("user_exam_id in", values, "userExamId"); + return (Criteria) this; + } + + public Criteria andUserExamIdNotIn(List values) { + addCriterion("user_exam_id not in", values, "userExamId"); + return (Criteria) this; + } + + public Criteria andUserExamIdBetween(Long value1, Long value2) { + addCriterion("user_exam_id between", value1, value2, "userExamId"); + return (Criteria) this; + } + + public Criteria andUserExamIdNotBetween(Long value1, Long value2) { + addCriterion("user_exam_id not between", value1, value2, "userExamId"); + return (Criteria) this; + } + + public Criteria andRulesIdIsNull() { + addCriterion("rules_id is null"); + return (Criteria) this; + } + + public Criteria andRulesIdIsNotNull() { + addCriterion("rules_id is not null"); + return (Criteria) this; + } + + public Criteria andRulesIdEqualTo(Long value) { + addCriterion("rules_id =", value, "rulesId"); + return (Criteria) this; + } + + public Criteria andRulesIdNotEqualTo(Long value) { + addCriterion("rules_id <>", value, "rulesId"); + return (Criteria) this; + } + + public Criteria andRulesIdGreaterThan(Long value) { + addCriterion("rules_id >", value, "rulesId"); + return (Criteria) this; + } + + public Criteria andRulesIdGreaterThanOrEqualTo(Long value) { + addCriterion("rules_id >=", value, "rulesId"); + return (Criteria) this; + } + + public Criteria andRulesIdLessThan(Long value) { + addCriterion("rules_id <", value, "rulesId"); + return (Criteria) this; + } + + public Criteria andRulesIdLessThanOrEqualTo(Long value) { + addCriterion("rules_id <=", value, "rulesId"); + return (Criteria) this; + } + + public Criteria andRulesIdIn(List values) { + addCriterion("rules_id in", values, "rulesId"); + return (Criteria) this; + } + + public Criteria andRulesIdNotIn(List values) { + addCriterion("rules_id not in", values, "rulesId"); + return (Criteria) this; + } + + public Criteria andRulesIdBetween(Long value1, Long value2) { + addCriterion("rules_id between", value1, value2, "rulesId"); + return (Criteria) this; + } + + public Criteria andRulesIdNotBetween(Long value1, Long value2) { + addCriterion("rules_id not between", value1, value2, "rulesId"); + return (Criteria) this; + } + + public Criteria andTrainingIdIsNull() { + addCriterion("training_id is null"); + return (Criteria) this; + } + + public Criteria andTrainingIdIsNotNull() { + addCriterion("training_id is not null"); + return (Criteria) this; + } + + public Criteria andTrainingIdEqualTo(Long value) { + addCriterion("training_id =", value, "trainingId"); + return (Criteria) this; + } + + public Criteria andTrainingIdNotEqualTo(Long value) { + addCriterion("training_id <>", value, "trainingId"); + return (Criteria) this; + } + + public Criteria andTrainingIdGreaterThan(Long value) { + addCriterion("training_id >", value, "trainingId"); + return (Criteria) this; + } + + public Criteria andTrainingIdGreaterThanOrEqualTo(Long value) { + addCriterion("training_id >=", value, "trainingId"); + return (Criteria) this; + } + + public Criteria andTrainingIdLessThan(Long value) { + addCriterion("training_id <", value, "trainingId"); + return (Criteria) this; + } + + public Criteria andTrainingIdLessThanOrEqualTo(Long value) { + addCriterion("training_id <=", value, "trainingId"); + return (Criteria) this; + } + + public Criteria andTrainingIdIn(List values) { + addCriterion("training_id in", values, "trainingId"); + return (Criteria) this; + } + + public Criteria andTrainingIdNotIn(List values) { + addCriterion("training_id not in", values, "trainingId"); + return (Criteria) this; + } + + public Criteria andTrainingIdBetween(Long value1, Long value2) { + addCriterion("training_id between", value1, value2, "trainingId"); + return (Criteria) this; + } + + public Criteria andTrainingIdNotBetween(Long value1, Long value2) { + addCriterion("training_id not between", value1, value2, "trainingId"); + return (Criteria) this; + } + + public Criteria andPointIsNull() { + addCriterion("point is null"); + return (Criteria) this; + } + + public Criteria andPointIsNotNull() { + addCriterion("point is not null"); + return (Criteria) this; + } + + public Criteria andPointEqualTo(Integer value) { + addCriterion("point =", value, "point"); + return (Criteria) this; + } + + public Criteria andPointNotEqualTo(Integer value) { + addCriterion("point <>", value, "point"); + return (Criteria) this; + } + + public Criteria andPointGreaterThan(Integer value) { + addCriterion("point >", value, "point"); + return (Criteria) this; + } + + public Criteria andPointGreaterThanOrEqualTo(Integer value) { + addCriterion("point >=", value, "point"); + return (Criteria) this; + } + + public Criteria andPointLessThan(Integer value) { + addCriterion("point <", value, "point"); + return (Criteria) this; + } + + public Criteria andPointLessThanOrEqualTo(Integer value) { + addCriterion("point <=", value, "point"); + return (Criteria) this; + } + + public Criteria andPointIn(List values) { + addCriterion("point in", values, "point"); + return (Criteria) this; + } + + public Criteria andPointNotIn(List values) { + addCriterion("point not in", values, "point"); + return (Criteria) this; + } + + public Criteria andPointBetween(Integer value1, Integer value2) { + addCriterion("point between", value1, value2, "point"); + return (Criteria) this; + } + + public Criteria andPointNotBetween(Integer value1, Integer value2) { + addCriterion("point not between", value1, value2, "point"); + return (Criteria) this; + } + + public Criteria andScoreIsNull() { + addCriterion("score is null"); + return (Criteria) this; + } + + public Criteria andScoreIsNotNull() { + addCriterion("score is not null"); + return (Criteria) this; + } + + public Criteria andScoreEqualTo(Float value) { + addCriterion("score =", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotEqualTo(Float value) { + addCriterion("score <>", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreGreaterThan(Float value) { + addCriterion("score >", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreGreaterThanOrEqualTo(Float value) { + addCriterion("score >=", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreLessThan(Float value) { + addCriterion("score <", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreLessThanOrEqualTo(Float value) { + addCriterion("score <=", value, "score"); + return (Criteria) this; + } + + public Criteria andScoreIn(List values) { + addCriterion("score in", values, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotIn(List values) { + addCriterion("score not in", values, "score"); + return (Criteria) this; + } + + public Criteria andScoreBetween(Float value1, Float value2) { + addCriterion("score between", value1, value2, "score"); + return (Criteria) this; + } + + public Criteria andScoreNotBetween(Float value1, Float value2) { + addCriterion("score not between", value1, value2, "score"); + return (Criteria) this; + } + + public Criteria andUsedTimeIsNull() { + addCriterion("used_time is null"); + return (Criteria) this; + } + + public Criteria andUsedTimeIsNotNull() { + addCriterion("used_time is not null"); + return (Criteria) this; + } + + public Criteria andUsedTimeEqualTo(Integer value) { + addCriterion("used_time =", value, "usedTime"); + return (Criteria) this; + } + + public Criteria andUsedTimeNotEqualTo(Integer value) { + addCriterion("used_time <>", value, "usedTime"); + return (Criteria) this; + } + + public Criteria andUsedTimeGreaterThan(Integer value) { + addCriterion("used_time >", value, "usedTime"); + return (Criteria) this; + } + + public Criteria andUsedTimeGreaterThanOrEqualTo(Integer value) { + addCriterion("used_time >=", value, "usedTime"); + return (Criteria) this; + } + + public Criteria andUsedTimeLessThan(Integer value) { + addCriterion("used_time <", value, "usedTime"); + return (Criteria) this; + } + + public Criteria andUsedTimeLessThanOrEqualTo(Integer value) { + addCriterion("used_time <=", value, "usedTime"); + return (Criteria) this; + } + + public Criteria andUsedTimeIn(List values) { + addCriterion("used_time in", values, "usedTime"); + return (Criteria) this; + } + + public Criteria andUsedTimeNotIn(List values) { + addCriterion("used_time not in", values, "usedTime"); + return (Criteria) this; + } + + public Criteria andUsedTimeBetween(Integer value1, Integer value2) { + addCriterion("used_time between", value1, value2, "usedTime"); + return (Criteria) this; + } + + public Criteria andUsedTimeNotBetween(Integer value1, Integer value2) { + addCriterion("used_time not between", value1, value2, "usedTime"); + return (Criteria) this; + } + + public Criteria andCauseIsNull() { + addCriterion("cause is null"); + return (Criteria) this; + } + + public Criteria andCauseIsNotNull() { + addCriterion("cause is not null"); + return (Criteria) this; + } + + public Criteria andCauseEqualTo(String value) { + addCriterion("cause =", value, "cause"); + return (Criteria) this; + } + + public Criteria andCauseNotEqualTo(String value) { + addCriterion("cause <>", value, "cause"); + return (Criteria) this; + } + + public Criteria andCauseGreaterThan(String value) { + addCriterion("cause >", value, "cause"); + return (Criteria) this; + } + + public Criteria andCauseGreaterThanOrEqualTo(String value) { + addCriterion("cause >=", value, "cause"); + return (Criteria) this; + } + + public Criteria andCauseLessThan(String value) { + addCriterion("cause <", value, "cause"); + return (Criteria) this; + } + + public Criteria andCauseLessThanOrEqualTo(String value) { + addCriterion("cause <=", value, "cause"); + return (Criteria) this; + } + + public Criteria andCauseLike(String value) { + addCriterion("cause like", value, "cause"); + return (Criteria) this; + } + + public Criteria andCauseNotLike(String value) { + addCriterion("cause not like", value, "cause"); + return (Criteria) this; + } + + public Criteria andCauseIn(List values) { + addCriterion("cause in", values, "cause"); + return (Criteria) this; + } + + public Criteria andCauseNotIn(List values) { + addCriterion("cause not in", values, "cause"); + return (Criteria) this; + } + + public Criteria andCauseBetween(String value1, String value2) { + addCriterion("cause between", value1, value2, "cause"); + return (Criteria) this; + } + + public Criteria andCauseNotBetween(String value1, String value2) { + addCriterion("cause not between", value1, value2, "cause"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/UserGoodsTryRecord.java b/src/main/java/club/joylink/rtss/entity/UserGoodsTryRecord.java new file mode 100644 index 000000000..da695380c --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/UserGoodsTryRecord.java @@ -0,0 +1,134 @@ +package club.joylink.rtss.entity; + +import club.joylink.rtss.constants.BusinessConsts; + +import java.io.Serializable; + +/** + * user_goods_try_record + */ +public class UserGoodsTryRecord implements Serializable { + private Long id; + + /** + * 用户id + */ + private Long userId; + + /** + * 商品id + */ + private Long goodsId; + + /** + * 已试用时间 + */ + private Long tryTime; + + private static final long serialVersionUID = 1L; + + public UserGoodsTryRecord() { + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public Long getGoodsId() { + return goodsId; + } + + public void setGoodsId(Long goodsId) { + this.goodsId = goodsId; + } + + public Long getTryTime() { + return tryTime; + } + + public void setTryTime(Long tryTime) { + this.tryTime = tryTime; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + UserGoodsTryRecord other = (UserGoodsTryRecord) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) + && (this.getGoodsId() == null ? other.getGoodsId() == null : this.getGoodsId().equals(other.getGoodsId())) + && (this.getTryTime() == null ? other.getTryTime() == null : this.getTryTime().equals(other.getTryTime())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); + result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode()); + result = prime * result + ((getTryTime() == null) ? 0 : getTryTime().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", userId=").append(userId); + sb.append(", goodsId=").append(goodsId); + sb.append(", tryTime=").append(tryTime); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } + + public static Long tryUserTotalTime(SaleGoods saleGoods) { + // 设置试用时长 + long tryTime = 0; + switch(saleGoods.getTryUseTimeUnit()) { + case BusinessConsts.Permission.TimeUnit.TimeUnit01: + tryTime = saleGoods.getTryUseTime() * 60 * 60 * 24 * 30 * 365; + break; + case BusinessConsts.Permission.TimeUnit.TimeUnit02: + tryTime = saleGoods.getTryUseTime() * 60 * 60 * 24 * 30; + break; + case BusinessConsts.Permission.TimeUnit.TimeUnit03: + tryTime = saleGoods.getTryUseTime() * 60 * 60 * 24; + break; + case BusinessConsts.Permission.TimeUnit.TimeUnit04: + tryTime = saleGoods.getTryUseTime() * 60 * 60; + break; + case BusinessConsts.Permission.TimeUnit.TimeUnit05: + tryTime = saleGoods.getTryUseTime() * 60; + break; + case BusinessConsts.Permission.TimeUnit.TimeUnit06: + tryTime = saleGoods.getTryUseTime(); + break; + } + return tryTime; + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/UserGoodsTryRecordExample.java b/src/main/java/club/joylink/rtss/entity/UserGoodsTryRecordExample.java new file mode 100644 index 000000000..88a25fd62 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/UserGoodsTryRecordExample.java @@ -0,0 +1,462 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class UserGoodsTryRecordExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Integer offset; + + public UserGoodsTryRecordExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Integer offset) { + this.offset = offset; + } + + public Integer getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andGoodsIdIsNull() { + addCriterion("goods_id is null"); + return (Criteria) this; + } + + public Criteria andGoodsIdIsNotNull() { + addCriterion("goods_id is not null"); + return (Criteria) this; + } + + public Criteria andGoodsIdEqualTo(Long value) { + addCriterion("goods_id =", value, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdNotEqualTo(Long value) { + addCriterion("goods_id <>", value, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdGreaterThan(Long value) { + addCriterion("goods_id >", value, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdGreaterThanOrEqualTo(Long value) { + addCriterion("goods_id >=", value, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdLessThan(Long value) { + addCriterion("goods_id <", value, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdLessThanOrEqualTo(Long value) { + addCriterion("goods_id <=", value, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdIn(List values) { + addCriterion("goods_id in", values, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdNotIn(List values) { + addCriterion("goods_id not in", values, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdBetween(Long value1, Long value2) { + addCriterion("goods_id between", value1, value2, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdNotBetween(Long value1, Long value2) { + addCriterion("goods_id not between", value1, value2, "goodsId"); + return (Criteria) this; + } + + public Criteria andTryTimeIsNull() { + addCriterion("try_time is null"); + return (Criteria) this; + } + + public Criteria andTryTimeIsNotNull() { + addCriterion("try_time is not null"); + return (Criteria) this; + } + + public Criteria andTryTimeEqualTo(Long value) { + addCriterion("try_time =", value, "tryTime"); + return (Criteria) this; + } + + public Criteria andTryTimeNotEqualTo(Long value) { + addCriterion("try_time <>", value, "tryTime"); + return (Criteria) this; + } + + public Criteria andTryTimeGreaterThan(Long value) { + addCriterion("try_time >", value, "tryTime"); + return (Criteria) this; + } + + public Criteria andTryTimeGreaterThanOrEqualTo(Long value) { + addCriterion("try_time >=", value, "tryTime"); + return (Criteria) this; + } + + public Criteria andTryTimeLessThan(Long value) { + addCriterion("try_time <", value, "tryTime"); + return (Criteria) this; + } + + public Criteria andTryTimeLessThanOrEqualTo(Long value) { + addCriterion("try_time <=", value, "tryTime"); + return (Criteria) this; + } + + public Criteria andTryTimeIn(List values) { + addCriterion("try_time in", values, "tryTime"); + return (Criteria) this; + } + + public Criteria andTryTimeNotIn(List values) { + addCriterion("try_time not in", values, "tryTime"); + return (Criteria) this; + } + + public Criteria andTryTimeBetween(Long value1, Long value2) { + addCriterion("try_time between", value1, value2, "tryTime"); + return (Criteria) this; + } + + public Criteria andTryTimeNotBetween(Long value1, Long value2) { + addCriterion("try_time not between", value1, value2, "tryTime"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/UserPermission.java b/src/main/java/club/joylink/rtss/entity/UserPermission.java new file mode 100644 index 000000000..b1c13d74d --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/UserPermission.java @@ -0,0 +1,230 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * user_permission + * @author + */ +public class UserPermission implements Serializable { + private Long id; + + private Long permissionId; + + /** + * 用户id + */ + private Long userId; + + /** + * 状态:0-无效,1-有效 + */ + private String status; + + /** + * 总数量 + */ + private Integer amount; + + /** + * 剩余数量 + */ + private Integer remains; + + /** + * 是否永久:true/false + */ + private Boolean forever; + + /** + * 开始时间 + */ + private LocalDateTime startTime; + + /** + * 结束时间 + */ + private LocalDateTime endTime; + + /** + * 权限分发id + */ + private Long distributeId; + + /** + * 权限能否转赠 + */ + private Boolean canDistribute; + + /** + * 权限所有者ID + */ + private Long ownerId; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getPermissionId() { + return permissionId; + } + + public void setPermissionId(Long permissionId) { + this.permissionId = permissionId; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public Integer getAmount() { + return amount; + } + + public void setAmount(Integer amount) { + this.amount = amount; + } + + public Integer getRemains() { + return remains; + } + + public void setRemains(Integer remains) { + this.remains = remains; + } + + public Boolean getForever() { + return forever; + } + + public void setForever(Boolean forever) { + this.forever = forever; + } + + public LocalDateTime getStartTime() { + return startTime; + } + + public void setStartTime(LocalDateTime startTime) { + this.startTime = startTime; + } + + public LocalDateTime getEndTime() { + return endTime; + } + + public void setEndTime(LocalDateTime endTime) { + this.endTime = endTime; + } + + public Long getDistributeId() { + return distributeId; + } + + public void setDistributeId(Long distributeId) { + this.distributeId = distributeId; + } + + public Boolean getCanDistribute() { + return canDistribute; + } + + public void setCanDistribute(Boolean canDistribute) { + this.canDistribute = canDistribute; + } + + public Long getOwnerId() { + return ownerId; + } + + public void setOwnerId(Long ownerId) { + this.ownerId = ownerId; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + UserPermission other = (UserPermission) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getPermissionId() == null ? other.getPermissionId() == null : this.getPermissionId().equals(other.getPermissionId())) + && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount())) + && (this.getRemains() == null ? other.getRemains() == null : this.getRemains().equals(other.getRemains())) + && (this.getForever() == null ? other.getForever() == null : this.getForever().equals(other.getForever())) + && (this.getStartTime() == null ? other.getStartTime() == null : this.getStartTime().equals(other.getStartTime())) + && (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime())) + && (this.getDistributeId() == null ? other.getDistributeId() == null : this.getDistributeId().equals(other.getDistributeId())) + && (this.getCanDistribute() == null ? other.getCanDistribute() == null : this.getCanDistribute().equals(other.getCanDistribute())) + && (this.getOwnerId() == null ? other.getOwnerId() == null : this.getOwnerId().equals(other.getOwnerId())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getPermissionId() == null) ? 0 : getPermissionId().hashCode()); + result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode()); + result = prime * result + ((getRemains() == null) ? 0 : getRemains().hashCode()); + result = prime * result + ((getForever() == null) ? 0 : getForever().hashCode()); + result = prime * result + ((getStartTime() == null) ? 0 : getStartTime().hashCode()); + result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode()); + result = prime * result + ((getDistributeId() == null) ? 0 : getDistributeId().hashCode()); + result = prime * result + ((getCanDistribute() == null) ? 0 : getCanDistribute().hashCode()); + result = prime * result + ((getOwnerId() == null) ? 0 : getOwnerId().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", permissionId=").append(permissionId); + sb.append(", userId=").append(userId); + sb.append(", status=").append(status); + sb.append(", goodsAmount=").append(amount); + sb.append(", remains=").append(remains); + sb.append(", forever=").append(forever); + sb.append(", startTime=").append(startTime); + sb.append(", endTime=").append(endTime); + sb.append(", distributeId=").append(distributeId); + sb.append(", distribute=").append(canDistribute); + sb.append(", ownerId=").append(ownerId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/UserPermissionExample.java b/src/main/java/club/joylink/rtss/entity/UserPermissionExample.java new file mode 100644 index 000000000..f503f1996 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/UserPermissionExample.java @@ -0,0 +1,953 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class UserPermissionExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public UserPermissionExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andPermissionIdIsNull() { + addCriterion("permission_id is null"); + return (Criteria) this; + } + + public Criteria andPermissionIdIsNotNull() { + addCriterion("permission_id is not null"); + return (Criteria) this; + } + + public Criteria andPermissionIdEqualTo(Long value) { + addCriterion("permission_id =", value, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdNotEqualTo(Long value) { + addCriterion("permission_id <>", value, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdGreaterThan(Long value) { + addCriterion("permission_id >", value, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdGreaterThanOrEqualTo(Long value) { + addCriterion("permission_id >=", value, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdLessThan(Long value) { + addCriterion("permission_id <", value, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdLessThanOrEqualTo(Long value) { + addCriterion("permission_id <=", value, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdIn(List values) { + addCriterion("permission_id in", values, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdNotIn(List values) { + addCriterion("permission_id not in", values, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdBetween(Long value1, Long value2) { + addCriterion("permission_id between", value1, value2, "permissionId"); + return (Criteria) this; + } + + public Criteria andPermissionIdNotBetween(Long value1, Long value2) { + addCriterion("permission_id not between", value1, value2, "permissionId"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("`status` like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("`status` not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andAmountIsNull() { + addCriterion("goodsAmount is null"); + return (Criteria) this; + } + + public Criteria andAmountIsNotNull() { + addCriterion("goodsAmount is not null"); + return (Criteria) this; + } + + public Criteria andAmountEqualTo(Integer value) { + addCriterion("goodsAmount =", value, "goodsAmount"); + return (Criteria) this; + } + + public Criteria andAmountNotEqualTo(Integer value) { + addCriterion("goodsAmount <>", value, "goodsAmount"); + return (Criteria) this; + } + + public Criteria andAmountGreaterThan(Integer value) { + addCriterion("goodsAmount >", value, "goodsAmount"); + return (Criteria) this; + } + + public Criteria andAmountGreaterThanOrEqualTo(Integer value) { + addCriterion("goodsAmount >=", value, "goodsAmount"); + return (Criteria) this; + } + + public Criteria andAmountLessThan(Integer value) { + addCriterion("goodsAmount <", value, "goodsAmount"); + return (Criteria) this; + } + + public Criteria andAmountLessThanOrEqualTo(Integer value) { + addCriterion("goodsAmount <=", value, "goodsAmount"); + return (Criteria) this; + } + + public Criteria andAmountIn(List values) { + addCriterion("goodsAmount in", values, "goodsAmount"); + return (Criteria) this; + } + + public Criteria andAmountNotIn(List values) { + addCriterion("goodsAmount not in", values, "goodsAmount"); + return (Criteria) this; + } + + public Criteria andAmountBetween(Integer value1, Integer value2) { + addCriterion("goodsAmount between", value1, value2, "goodsAmount"); + return (Criteria) this; + } + + public Criteria andAmountNotBetween(Integer value1, Integer value2) { + addCriterion("goodsAmount not between", value1, value2, "goodsAmount"); + return (Criteria) this; + } + + public Criteria andRemainsIsNull() { + addCriterion("remains is null"); + return (Criteria) this; + } + + public Criteria andRemainsIsNotNull() { + addCriterion("remains is not null"); + return (Criteria) this; + } + + public Criteria andRemainsEqualTo(Integer value) { + addCriterion("remains =", value, "remains"); + return (Criteria) this; + } + + public Criteria andRemainsNotEqualTo(Integer value) { + addCriterion("remains <>", value, "remains"); + return (Criteria) this; + } + + public Criteria andRemainsGreaterThan(Integer value) { + addCriterion("remains >", value, "remains"); + return (Criteria) this; + } + + public Criteria andRemainsGreaterThanOrEqualTo(Integer value) { + addCriterion("remains >=", value, "remains"); + return (Criteria) this; + } + + public Criteria andRemainsLessThan(Integer value) { + addCriterion("remains <", value, "remains"); + return (Criteria) this; + } + + public Criteria andRemainsLessThanOrEqualTo(Integer value) { + addCriterion("remains <=", value, "remains"); + return (Criteria) this; + } + + public Criteria andRemainsIn(List values) { + addCriterion("remains in", values, "remains"); + return (Criteria) this; + } + + public Criteria andRemainsNotIn(List values) { + addCriterion("remains not in", values, "remains"); + return (Criteria) this; + } + + public Criteria andRemainsBetween(Integer value1, Integer value2) { + addCriterion("remains between", value1, value2, "remains"); + return (Criteria) this; + } + + public Criteria andRemainsNotBetween(Integer value1, Integer value2) { + addCriterion("remains not between", value1, value2, "remains"); + return (Criteria) this; + } + + public Criteria andForeverIsNull() { + addCriterion("forever is null"); + return (Criteria) this; + } + + public Criteria andForeverIsNotNull() { + addCriterion("forever is not null"); + return (Criteria) this; + } + + public Criteria andForeverEqualTo(Boolean value) { + addCriterion("forever =", value, "forever"); + return (Criteria) this; + } + + public Criteria andForeverNotEqualTo(Boolean value) { + addCriterion("forever <>", value, "forever"); + return (Criteria) this; + } + + public Criteria andForeverGreaterThan(Boolean value) { + addCriterion("forever >", value, "forever"); + return (Criteria) this; + } + + public Criteria andForeverGreaterThanOrEqualTo(Boolean value) { + addCriterion("forever >=", value, "forever"); + return (Criteria) this; + } + + public Criteria andForeverLessThan(Boolean value) { + addCriterion("forever <", value, "forever"); + return (Criteria) this; + } + + public Criteria andForeverLessThanOrEqualTo(Boolean value) { + addCriterion("forever <=", value, "forever"); + return (Criteria) this; + } + + public Criteria andForeverIn(List values) { + addCriterion("forever in", values, "forever"); + return (Criteria) this; + } + + public Criteria andForeverNotIn(List values) { + addCriterion("forever not in", values, "forever"); + return (Criteria) this; + } + + public Criteria andForeverBetween(Boolean value1, Boolean value2) { + addCriterion("forever between", value1, value2, "forever"); + return (Criteria) this; + } + + public Criteria andForeverNotBetween(Boolean value1, Boolean value2) { + addCriterion("forever not between", value1, value2, "forever"); + return (Criteria) this; + } + + public Criteria andStartTimeIsNull() { + addCriterion("start_time is null"); + return (Criteria) this; + } + + public Criteria andStartTimeIsNotNull() { + addCriterion("start_time is not null"); + return (Criteria) this; + } + + public Criteria andStartTimeEqualTo(LocalDateTime value) { + addCriterion("start_time =", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotEqualTo(LocalDateTime value) { + addCriterion("start_time <>", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeGreaterThan(LocalDateTime value) { + addCriterion("start_time >", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("start_time >=", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeLessThan(LocalDateTime value) { + addCriterion("start_time <", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("start_time <=", value, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeIn(List values) { + addCriterion("start_time in", values, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotIn(List values) { + addCriterion("start_time not in", values, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("start_time between", value1, value2, "startTime"); + return (Criteria) this; + } + + public Criteria andStartTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("start_time not between", value1, value2, "startTime"); + return (Criteria) this; + } + + public Criteria andEndTimeIsNull() { + addCriterion("end_time is null"); + return (Criteria) this; + } + + public Criteria andEndTimeIsNotNull() { + addCriterion("end_time is not null"); + return (Criteria) this; + } + + public Criteria andEndTimeEqualTo(LocalDateTime value) { + addCriterion("end_time =", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeNotEqualTo(LocalDateTime value) { + addCriterion("end_time <>", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeGreaterThan(LocalDateTime value) { + addCriterion("end_time >", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("end_time >=", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeLessThan(LocalDateTime value) { + addCriterion("end_time <", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("end_time <=", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeIn(List values) { + addCriterion("end_time in", values, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeNotIn(List values) { + addCriterion("end_time not in", values, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("end_time between", value1, value2, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("end_time not between", value1, value2, "endTime"); + return (Criteria) this; + } + + public Criteria andDistributeIdIsNull() { + addCriterion("distribute_id is null"); + return (Criteria) this; + } + + public Criteria andDistributeIdIsNotNull() { + addCriterion("distribute_id is not null"); + return (Criteria) this; + } + + public Criteria andDistributeIdEqualTo(Long value) { + addCriterion("distribute_id =", value, "distributeId"); + return (Criteria) this; + } + + public Criteria andDistributeIdNotEqualTo(Long value) { + addCriterion("distribute_id <>", value, "distributeId"); + return (Criteria) this; + } + + public Criteria andDistributeIdGreaterThan(Long value) { + addCriterion("distribute_id >", value, "distributeId"); + return (Criteria) this; + } + + public Criteria andDistributeIdGreaterThanOrEqualTo(Long value) { + addCriterion("distribute_id >=", value, "distributeId"); + return (Criteria) this; + } + + public Criteria andDistributeIdLessThan(Long value) { + addCriterion("distribute_id <", value, "distributeId"); + return (Criteria) this; + } + + public Criteria andDistributeIdLessThanOrEqualTo(Long value) { + addCriterion("distribute_id <=", value, "distributeId"); + return (Criteria) this; + } + + public Criteria andDistributeIdIn(List values) { + addCriterion("distribute_id in", values, "distributeId"); + return (Criteria) this; + } + + public Criteria andDistributeIdNotIn(List values) { + addCriterion("distribute_id not in", values, "distributeId"); + return (Criteria) this; + } + + public Criteria andDistributeIdBetween(Long value1, Long value2) { + addCriterion("distribute_id between", value1, value2, "distributeId"); + return (Criteria) this; + } + + public Criteria andDistributeIdNotBetween(Long value1, Long value2) { + addCriterion("distribute_id not between", value1, value2, "distributeId"); + return (Criteria) this; + } + + public Criteria andCanDistributeIsNull() { + addCriterion("can_distribute is null"); + return (Criteria) this; + } + + public Criteria andCanDistributeIsNotNull() { + addCriterion("can_distribute is not null"); + return (Criteria) this; + } + + public Criteria andCanDistributeEqualTo(Boolean value) { + addCriterion("can_distribute =", value, "distribute"); + return (Criteria) this; + } + + public Criteria andCanDistributeNotEqualTo(Boolean value) { + addCriterion("can_distribute <>", value, "distribute"); + return (Criteria) this; + } + + public Criteria andCanDistributeGreaterThan(Boolean value) { + addCriterion("can_distribute >", value, "distribute"); + return (Criteria) this; + } + + public Criteria andCanDistributeGreaterThanOrEqualTo(Boolean value) { + addCriterion("can_distribute >=", value, "distribute"); + return (Criteria) this; + } + + public Criteria andCanDistributeLessThan(Boolean value) { + addCriterion("can_distribute <", value, "distribute"); + return (Criteria) this; + } + + public Criteria andCanDistributeLessThanOrEqualTo(Boolean value) { + addCriterion("can_distribute <=", value, "distribute"); + return (Criteria) this; + } + + public Criteria andCanDistributeIn(List values) { + addCriterion("can_distribute in", values, "distribute"); + return (Criteria) this; + } + + public Criteria andCanDistributeNotIn(List values) { + addCriterion("can_distribute not in", values, "distribute"); + return (Criteria) this; + } + + public Criteria andCanDistributeBetween(Boolean value1, Boolean value2) { + addCriterion("can_distribute between", value1, value2, "distribute"); + return (Criteria) this; + } + + public Criteria andCanDistributeNotBetween(Boolean value1, Boolean value2) { + addCriterion("can_distribute not between", value1, value2, "distribute"); + return (Criteria) this; + } + + public Criteria andOwnerIdIsNull() { + addCriterion("owner_id is null"); + return (Criteria) this; + } + + public Criteria andOwnerIdIsNotNull() { + addCriterion("owner_id is not null"); + return (Criteria) this; + } + + public Criteria andOwnerIdEqualTo(Long value) { + addCriterion("owner_id =", value, "ownerId"); + return (Criteria) this; + } + + public Criteria andOwnerIdNotEqualTo(Long value) { + addCriterion("owner_id <>", value, "ownerId"); + return (Criteria) this; + } + + public Criteria andOwnerIdGreaterThan(Long value) { + addCriterion("owner_id >", value, "ownerId"); + return (Criteria) this; + } + + public Criteria andOwnerIdGreaterThanOrEqualTo(Long value) { + addCriterion("owner_id >=", value, "ownerId"); + return (Criteria) this; + } + + public Criteria andOwnerIdLessThan(Long value) { + addCriterion("owner_id <", value, "ownerId"); + return (Criteria) this; + } + + public Criteria andOwnerIdLessThanOrEqualTo(Long value) { + addCriterion("owner_id <=", value, "ownerId"); + return (Criteria) this; + } + + public Criteria andOwnerIdIn(List values) { + addCriterion("owner_id in", values, "ownerId"); + return (Criteria) this; + } + + public Criteria andOwnerIdNotIn(List values) { + addCriterion("owner_id not in", values, "ownerId"); + return (Criteria) this; + } + + public Criteria andOwnerIdBetween(Long value1, Long value2) { + addCriterion("owner_id between", value1, value2, "ownerId"); + return (Criteria) this; + } + + public Criteria andOwnerIdNotBetween(Long value1, Long value2) { + addCriterion("owner_id not between", value1, value2, "ownerId"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/UserPermissionProcessing.java b/src/main/java/club/joylink/rtss/entity/UserPermissionProcessing.java new file mode 100644 index 000000000..8f89ce72f --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/UserPermissionProcessing.java @@ -0,0 +1,187 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * user_permission_processing + * @author + */ +public class UserPermissionProcessing implements Serializable { + private Long id; + + private Long organizationId; + + private String organizationName; + + private Long userId; + + private String userName; + + private Long mapId; + + private String mapName; + + private Integer jointAmount; + + private Integer universalAmount; + + private Boolean canDistribute; + + private LocalDateTime endTime; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getOrganizationId() { + return organizationId; + } + + public void setOrganizationId(Long organizationId) { + this.organizationId = organizationId; + } + + public String getOrganizationName() { + return organizationName; + } + + public void setOrganizationName(String organizationName) { + this.organizationName = organizationName; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public Long getMapId() { + return mapId; + } + + public void setMapId(Long mapId) { + this.mapId = mapId; + } + + public String getMapName() { + return mapName; + } + + public void setMapName(String mapName) { + this.mapName = mapName; + } + + public Integer getJointAmount() { + return jointAmount; + } + + public void setJointAmount(Integer jointAmount) { + this.jointAmount = jointAmount; + } + + public Integer getUniversalAmount() { + return universalAmount; + } + + public void setUniversalAmount(Integer universalAmount) { + this.universalAmount = universalAmount; + } + + public Boolean getCanDistribute() { + return canDistribute; + } + + public void setCanDistribute(Boolean canDistribute) { + this.canDistribute = canDistribute; + } + + public LocalDateTime getEndTime() { + return endTime; + } + + public void setEndTime(LocalDateTime endTime) { + this.endTime = endTime; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + UserPermissionProcessing other = (UserPermissionProcessing) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getOrganizationId() == null ? other.getOrganizationId() == null : this.getOrganizationId().equals(other.getOrganizationId())) + && (this.getOrganizationName() == null ? other.getOrganizationName() == null : this.getOrganizationName().equals(other.getOrganizationName())) + && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) + && (this.getUserName() == null ? other.getUserName() == null : this.getUserName().equals(other.getUserName())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getMapName() == null ? other.getMapName() == null : this.getMapName().equals(other.getMapName())) + && (this.getJointAmount() == null ? other.getJointAmount() == null : this.getJointAmount().equals(other.getJointAmount())) + && (this.getUniversalAmount() == null ? other.getUniversalAmount() == null : this.getUniversalAmount().equals(other.getUniversalAmount())) + && (this.getCanDistribute() == null ? other.getCanDistribute() == null : this.getCanDistribute().equals(other.getCanDistribute())) + && (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getOrganizationId() == null) ? 0 : getOrganizationId().hashCode()); + result = prime * result + ((getOrganizationName() == null) ? 0 : getOrganizationName().hashCode()); + result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); + result = prime * result + ((getUserName() == null) ? 0 : getUserName().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getMapName() == null) ? 0 : getMapName().hashCode()); + result = prime * result + ((getJointAmount() == null) ? 0 : getJointAmount().hashCode()); + result = prime * result + ((getUniversalAmount() == null) ? 0 : getUniversalAmount().hashCode()); + result = prime * result + ((getCanDistribute() == null) ? 0 : getCanDistribute().hashCode()); + result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", organizationId=").append(organizationId); + sb.append(", organizationName=").append(organizationName); + sb.append(", userId=").append(userId); + sb.append(", userName=").append(userName); + sb.append(", mapId=").append(mapId); + sb.append(", mapName=").append(mapName); + sb.append(", jointAmount=").append(jointAmount); + sb.append(", universalAmount=").append(universalAmount); + sb.append(", canDistribute=").append(canDistribute); + sb.append(", endTime=").append(endTime); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/UserPermissionProcessingExample.java b/src/main/java/club/joylink/rtss/entity/UserPermissionProcessingExample.java new file mode 100644 index 000000000..d81d3b687 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/UserPermissionProcessingExample.java @@ -0,0 +1,913 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class UserPermissionProcessingExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public UserPermissionProcessingExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andOrganizationIdIsNull() { + addCriterion("organization_id is null"); + return (Criteria) this; + } + + public Criteria andOrganizationIdIsNotNull() { + addCriterion("organization_id is not null"); + return (Criteria) this; + } + + public Criteria andOrganizationIdEqualTo(Long value) { + addCriterion("organization_id =", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdNotEqualTo(Long value) { + addCriterion("organization_id <>", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdGreaterThan(Long value) { + addCriterion("organization_id >", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdGreaterThanOrEqualTo(Long value) { + addCriterion("organization_id >=", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdLessThan(Long value) { + addCriterion("organization_id <", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdLessThanOrEqualTo(Long value) { + addCriterion("organization_id <=", value, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdIn(List values) { + addCriterion("organization_id in", values, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdNotIn(List values) { + addCriterion("organization_id not in", values, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdBetween(Long value1, Long value2) { + addCriterion("organization_id between", value1, value2, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationIdNotBetween(Long value1, Long value2) { + addCriterion("organization_id not between", value1, value2, "organizationId"); + return (Criteria) this; + } + + public Criteria andOrganizationNameIsNull() { + addCriterion("organization_name is null"); + return (Criteria) this; + } + + public Criteria andOrganizationNameIsNotNull() { + addCriterion("organization_name is not null"); + return (Criteria) this; + } + + public Criteria andOrganizationNameEqualTo(String value) { + addCriterion("organization_name =", value, "organizationName"); + return (Criteria) this; + } + + public Criteria andOrganizationNameNotEqualTo(String value) { + addCriterion("organization_name <>", value, "organizationName"); + return (Criteria) this; + } + + public Criteria andOrganizationNameGreaterThan(String value) { + addCriterion("organization_name >", value, "organizationName"); + return (Criteria) this; + } + + public Criteria andOrganizationNameGreaterThanOrEqualTo(String value) { + addCriterion("organization_name >=", value, "organizationName"); + return (Criteria) this; + } + + public Criteria andOrganizationNameLessThan(String value) { + addCriterion("organization_name <", value, "organizationName"); + return (Criteria) this; + } + + public Criteria andOrganizationNameLessThanOrEqualTo(String value) { + addCriterion("organization_name <=", value, "organizationName"); + return (Criteria) this; + } + + public Criteria andOrganizationNameLike(String value) { + addCriterion("organization_name like", value, "organizationName"); + return (Criteria) this; + } + + public Criteria andOrganizationNameNotLike(String value) { + addCriterion("organization_name not like", value, "organizationName"); + return (Criteria) this; + } + + public Criteria andOrganizationNameIn(List values) { + addCriterion("organization_name in", values, "organizationName"); + return (Criteria) this; + } + + public Criteria andOrganizationNameNotIn(List values) { + addCriterion("organization_name not in", values, "organizationName"); + return (Criteria) this; + } + + public Criteria andOrganizationNameBetween(String value1, String value2) { + addCriterion("organization_name between", value1, value2, "organizationName"); + return (Criteria) this; + } + + public Criteria andOrganizationNameNotBetween(String value1, String value2) { + addCriterion("organization_name not between", value1, value2, "organizationName"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserNameIsNull() { + addCriterion("user_name is null"); + return (Criteria) this; + } + + public Criteria andUserNameIsNotNull() { + addCriterion("user_name is not null"); + return (Criteria) this; + } + + public Criteria andUserNameEqualTo(String value) { + addCriterion("user_name =", value, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameNotEqualTo(String value) { + addCriterion("user_name <>", value, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameGreaterThan(String value) { + addCriterion("user_name >", value, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameGreaterThanOrEqualTo(String value) { + addCriterion("user_name >=", value, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameLessThan(String value) { + addCriterion("user_name <", value, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameLessThanOrEqualTo(String value) { + addCriterion("user_name <=", value, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameLike(String value) { + addCriterion("user_name like", value, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameNotLike(String value) { + addCriterion("user_name not like", value, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameIn(List values) { + addCriterion("user_name in", values, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameNotIn(List values) { + addCriterion("user_name not in", values, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameBetween(String value1, String value2) { + addCriterion("user_name between", value1, value2, "userName"); + return (Criteria) this; + } + + public Criteria andUserNameNotBetween(String value1, String value2) { + addCriterion("user_name not between", value1, value2, "userName"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapNameIsNull() { + addCriterion("map_name is null"); + return (Criteria) this; + } + + public Criteria andMapNameIsNotNull() { + addCriterion("map_name is not null"); + return (Criteria) this; + } + + public Criteria andMapNameEqualTo(String value) { + addCriterion("map_name =", value, "mapName"); + return (Criteria) this; + } + + public Criteria andMapNameNotEqualTo(String value) { + addCriterion("map_name <>", value, "mapName"); + return (Criteria) this; + } + + public Criteria andMapNameGreaterThan(String value) { + addCriterion("map_name >", value, "mapName"); + return (Criteria) this; + } + + public Criteria andMapNameGreaterThanOrEqualTo(String value) { + addCriterion("map_name >=", value, "mapName"); + return (Criteria) this; + } + + public Criteria andMapNameLessThan(String value) { + addCriterion("map_name <", value, "mapName"); + return (Criteria) this; + } + + public Criteria andMapNameLessThanOrEqualTo(String value) { + addCriterion("map_name <=", value, "mapName"); + return (Criteria) this; + } + + public Criteria andMapNameLike(String value) { + addCriterion("map_name like", value, "mapName"); + return (Criteria) this; + } + + public Criteria andMapNameNotLike(String value) { + addCriterion("map_name not like", value, "mapName"); + return (Criteria) this; + } + + public Criteria andMapNameIn(List values) { + addCriterion("map_name in", values, "mapName"); + return (Criteria) this; + } + + public Criteria andMapNameNotIn(List values) { + addCriterion("map_name not in", values, "mapName"); + return (Criteria) this; + } + + public Criteria andMapNameBetween(String value1, String value2) { + addCriterion("map_name between", value1, value2, "mapName"); + return (Criteria) this; + } + + public Criteria andMapNameNotBetween(String value1, String value2) { + addCriterion("map_name not between", value1, value2, "mapName"); + return (Criteria) this; + } + + public Criteria andJointAmountIsNull() { + addCriterion("joint_amount is null"); + return (Criteria) this; + } + + public Criteria andJointAmountIsNotNull() { + addCriterion("joint_amount is not null"); + return (Criteria) this; + } + + public Criteria andJointAmountEqualTo(Integer value) { + addCriterion("joint_amount =", value, "jointAmount"); + return (Criteria) this; + } + + public Criteria andJointAmountNotEqualTo(Integer value) { + addCriterion("joint_amount <>", value, "jointAmount"); + return (Criteria) this; + } + + public Criteria andJointAmountGreaterThan(Integer value) { + addCriterion("joint_amount >", value, "jointAmount"); + return (Criteria) this; + } + + public Criteria andJointAmountGreaterThanOrEqualTo(Integer value) { + addCriterion("joint_amount >=", value, "jointAmount"); + return (Criteria) this; + } + + public Criteria andJointAmountLessThan(Integer value) { + addCriterion("joint_amount <", value, "jointAmount"); + return (Criteria) this; + } + + public Criteria andJointAmountLessThanOrEqualTo(Integer value) { + addCriterion("joint_amount <=", value, "jointAmount"); + return (Criteria) this; + } + + public Criteria andJointAmountIn(List values) { + addCriterion("joint_amount in", values, "jointAmount"); + return (Criteria) this; + } + + public Criteria andJointAmountNotIn(List values) { + addCriterion("joint_amount not in", values, "jointAmount"); + return (Criteria) this; + } + + public Criteria andJointAmountBetween(Integer value1, Integer value2) { + addCriterion("joint_amount between", value1, value2, "jointAmount"); + return (Criteria) this; + } + + public Criteria andJointAmountNotBetween(Integer value1, Integer value2) { + addCriterion("joint_amount not between", value1, value2, "jointAmount"); + return (Criteria) this; + } + + public Criteria andUniversalAmountIsNull() { + addCriterion("universal_amount is null"); + return (Criteria) this; + } + + public Criteria andUniversalAmountIsNotNull() { + addCriterion("universal_amount is not null"); + return (Criteria) this; + } + + public Criteria andUniversalAmountEqualTo(Integer value) { + addCriterion("universal_amount =", value, "universalAmount"); + return (Criteria) this; + } + + public Criteria andUniversalAmountNotEqualTo(Integer value) { + addCriterion("universal_amount <>", value, "universalAmount"); + return (Criteria) this; + } + + public Criteria andUniversalAmountGreaterThan(Integer value) { + addCriterion("universal_amount >", value, "universalAmount"); + return (Criteria) this; + } + + public Criteria andUniversalAmountGreaterThanOrEqualTo(Integer value) { + addCriterion("universal_amount >=", value, "universalAmount"); + return (Criteria) this; + } + + public Criteria andUniversalAmountLessThan(Integer value) { + addCriterion("universal_amount <", value, "universalAmount"); + return (Criteria) this; + } + + public Criteria andUniversalAmountLessThanOrEqualTo(Integer value) { + addCriterion("universal_amount <=", value, "universalAmount"); + return (Criteria) this; + } + + public Criteria andUniversalAmountIn(List values) { + addCriterion("universal_amount in", values, "universalAmount"); + return (Criteria) this; + } + + public Criteria andUniversalAmountNotIn(List values) { + addCriterion("universal_amount not in", values, "universalAmount"); + return (Criteria) this; + } + + public Criteria andUniversalAmountBetween(Integer value1, Integer value2) { + addCriterion("universal_amount between", value1, value2, "universalAmount"); + return (Criteria) this; + } + + public Criteria andUniversalAmountNotBetween(Integer value1, Integer value2) { + addCriterion("universal_amount not between", value1, value2, "universalAmount"); + return (Criteria) this; + } + + public Criteria andCanDistributeIsNull() { + addCriterion("can_distribute is null"); + return (Criteria) this; + } + + public Criteria andCanDistributeIsNotNull() { + addCriterion("can_distribute is not null"); + return (Criteria) this; + } + + public Criteria andCanDistributeEqualTo(Boolean value) { + addCriterion("can_distribute =", value, "canDistribute"); + return (Criteria) this; + } + + public Criteria andCanDistributeNotEqualTo(Boolean value) { + addCriterion("can_distribute <>", value, "canDistribute"); + return (Criteria) this; + } + + public Criteria andCanDistributeGreaterThan(Boolean value) { + addCriterion("can_distribute >", value, "canDistribute"); + return (Criteria) this; + } + + public Criteria andCanDistributeGreaterThanOrEqualTo(Boolean value) { + addCriterion("can_distribute >=", value, "canDistribute"); + return (Criteria) this; + } + + public Criteria andCanDistributeLessThan(Boolean value) { + addCriterion("can_distribute <", value, "canDistribute"); + return (Criteria) this; + } + + public Criteria andCanDistributeLessThanOrEqualTo(Boolean value) { + addCriterion("can_distribute <=", value, "canDistribute"); + return (Criteria) this; + } + + public Criteria andCanDistributeIn(List values) { + addCriterion("can_distribute in", values, "canDistribute"); + return (Criteria) this; + } + + public Criteria andCanDistributeNotIn(List values) { + addCriterion("can_distribute not in", values, "canDistribute"); + return (Criteria) this; + } + + public Criteria andCanDistributeBetween(Boolean value1, Boolean value2) { + addCriterion("can_distribute between", value1, value2, "canDistribute"); + return (Criteria) this; + } + + public Criteria andCanDistributeNotBetween(Boolean value1, Boolean value2) { + addCriterion("can_distribute not between", value1, value2, "canDistribute"); + return (Criteria) this; + } + + public Criteria andEndTimeIsNull() { + addCriterion("end_time is null"); + return (Criteria) this; + } + + public Criteria andEndTimeIsNotNull() { + addCriterion("end_time is not null"); + return (Criteria) this; + } + + public Criteria andEndTimeEqualTo(LocalDateTime value) { + addCriterion("end_time =", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeNotEqualTo(LocalDateTime value) { + addCriterion("end_time <>", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeGreaterThan(LocalDateTime value) { + addCriterion("end_time >", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("end_time >=", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeLessThan(LocalDateTime value) { + addCriterion("end_time <", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("end_time <=", value, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeIn(List values) { + addCriterion("end_time in", values, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeNotIn(List values) { + addCriterion("end_time not in", values, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("end_time between", value1, value2, "endTime"); + return (Criteria) this; + } + + public Criteria andEndTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("end_time not between", value1, value2, "endTime"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/UserSimulationStats.java b/src/main/java/club/joylink/rtss/entity/UserSimulationStats.java new file mode 100644 index 000000000..e6862073a --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/UserSimulationStats.java @@ -0,0 +1,152 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * user_simulation_stats + * @author + */ +public class UserSimulationStats implements Serializable { + private Long id; + + /** + * 用户ID + */ + private Long userId; + + /** + * 地图ID + */ + private Long mapId; + + /** + * 产品类型 + */ + private String prdType; + + /** + * 用时 + */ + private Integer duration; + + /** + * 用户角色 + */ + private String role; + + /** + * 假数据 + */ + private Boolean fake; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public Long getMapId() { + return mapId; + } + + public void setMapId(Long mapId) { + this.mapId = mapId; + } + + public String getPrdType() { + return prdType; + } + + public void setPrdType(String prdType) { + this.prdType = prdType; + } + + public Integer getDuration() { + return duration; + } + + public void setDuration(Integer duration) { + this.duration = duration; + } + + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + + public Boolean getFake() { + return fake; + } + + public void setFake(Boolean fake) { + this.fake = fake; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + UserSimulationStats other = (UserSimulationStats) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getPrdType() == null ? other.getPrdType() == null : this.getPrdType().equals(other.getPrdType())) + && (this.getDuration() == null ? other.getDuration() == null : this.getDuration().equals(other.getDuration())) + && (this.getRole() == null ? other.getRole() == null : this.getRole().equals(other.getRole())) + && (this.getFake() == null ? other.getFake() == null : this.getFake().equals(other.getFake())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getPrdType() == null) ? 0 : getPrdType().hashCode()); + result = prime * result + ((getDuration() == null) ? 0 : getDuration().hashCode()); + result = prime * result + ((getRole() == null) ? 0 : getRole().hashCode()); + result = prime * result + ((getFake() == null) ? 0 : getFake().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", userId=").append(userId); + sb.append(", mapId=").append(mapId); + sb.append(", prdType=").append(prdType); + sb.append(", duration=").append(duration); + sb.append(", role=").append(role); + sb.append(", fake=").append(fake); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/UserSimulationStatsExample.java b/src/main/java/club/joylink/rtss/entity/UserSimulationStatsExample.java new file mode 100644 index 000000000..0ff1e5ba3 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/UserSimulationStatsExample.java @@ -0,0 +1,662 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class UserSimulationStatsExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public UserSimulationStatsExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andPrdTypeIsNull() { + addCriterion("prd_type is null"); + return (Criteria) this; + } + + public Criteria andPrdTypeIsNotNull() { + addCriterion("prd_type is not null"); + return (Criteria) this; + } + + public Criteria andPrdTypeEqualTo(String value) { + addCriterion("prd_type =", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotEqualTo(String value) { + addCriterion("prd_type <>", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeGreaterThan(String value) { + addCriterion("prd_type >", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeGreaterThanOrEqualTo(String value) { + addCriterion("prd_type >=", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeLessThan(String value) { + addCriterion("prd_type <", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeLessThanOrEqualTo(String value) { + addCriterion("prd_type <=", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeLike(String value) { + addCriterion("prd_type like", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotLike(String value) { + addCriterion("prd_type not like", value, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeIn(List values) { + addCriterion("prd_type in", values, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotIn(List values) { + addCriterion("prd_type not in", values, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeBetween(String value1, String value2) { + addCriterion("prd_type between", value1, value2, "prdType"); + return (Criteria) this; + } + + public Criteria andPrdTypeNotBetween(String value1, String value2) { + addCriterion("prd_type not between", value1, value2, "prdType"); + return (Criteria) this; + } + + public Criteria andDurationIsNull() { + addCriterion("duration is null"); + return (Criteria) this; + } + + public Criteria andDurationIsNotNull() { + addCriterion("duration is not null"); + return (Criteria) this; + } + + public Criteria andDurationEqualTo(Integer value) { + addCriterion("duration =", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationNotEqualTo(Integer value) { + addCriterion("duration <>", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationGreaterThan(Integer value) { + addCriterion("duration >", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationGreaterThanOrEqualTo(Integer value) { + addCriterion("duration >=", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationLessThan(Integer value) { + addCriterion("duration <", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationLessThanOrEqualTo(Integer value) { + addCriterion("duration <=", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationIn(List values) { + addCriterion("duration in", values, "duration"); + return (Criteria) this; + } + + public Criteria andDurationNotIn(List values) { + addCriterion("duration not in", values, "duration"); + return (Criteria) this; + } + + public Criteria andDurationBetween(Integer value1, Integer value2) { + addCriterion("duration between", value1, value2, "duration"); + return (Criteria) this; + } + + public Criteria andDurationNotBetween(Integer value1, Integer value2) { + addCriterion("duration not between", value1, value2, "duration"); + return (Criteria) this; + } + + public Criteria andRoleIsNull() { + addCriterion("`role` is null"); + return (Criteria) this; + } + + public Criteria andRoleIsNotNull() { + addCriterion("`role` is not null"); + return (Criteria) this; + } + + public Criteria andRoleEqualTo(String value) { + addCriterion("`role` =", value, "role"); + return (Criteria) this; + } + + public Criteria andRoleNotEqualTo(String value) { + addCriterion("`role` <>", value, "role"); + return (Criteria) this; + } + + public Criteria andRoleGreaterThan(String value) { + addCriterion("`role` >", value, "role"); + return (Criteria) this; + } + + public Criteria andRoleGreaterThanOrEqualTo(String value) { + addCriterion("`role` >=", value, "role"); + return (Criteria) this; + } + + public Criteria andRoleLessThan(String value) { + addCriterion("`role` <", value, "role"); + return (Criteria) this; + } + + public Criteria andRoleLessThanOrEqualTo(String value) { + addCriterion("`role` <=", value, "role"); + return (Criteria) this; + } + + public Criteria andRoleLike(String value) { + addCriterion("`role` like", value, "role"); + return (Criteria) this; + } + + public Criteria andRoleNotLike(String value) { + addCriterion("`role` not like", value, "role"); + return (Criteria) this; + } + + public Criteria andRoleIn(List values) { + addCriterion("`role` in", values, "role"); + return (Criteria) this; + } + + public Criteria andRoleNotIn(List values) { + addCriterion("`role` not in", values, "role"); + return (Criteria) this; + } + + public Criteria andRoleBetween(String value1, String value2) { + addCriterion("`role` between", value1, value2, "role"); + return (Criteria) this; + } + + public Criteria andRoleNotBetween(String value1, String value2) { + addCriterion("`role` not between", value1, value2, "role"); + return (Criteria) this; + } + + public Criteria andFakeIsNull() { + addCriterion("fake is null"); + return (Criteria) this; + } + + public Criteria andFakeIsNotNull() { + addCriterion("fake is not null"); + return (Criteria) this; + } + + public Criteria andFakeEqualTo(Boolean value) { + addCriterion("fake =", value, "fake"); + return (Criteria) this; + } + + public Criteria andFakeNotEqualTo(Boolean value) { + addCriterion("fake <>", value, "fake"); + return (Criteria) this; + } + + public Criteria andFakeGreaterThan(Boolean value) { + addCriterion("fake >", value, "fake"); + return (Criteria) this; + } + + public Criteria andFakeGreaterThanOrEqualTo(Boolean value) { + addCriterion("fake >=", value, "fake"); + return (Criteria) this; + } + + public Criteria andFakeLessThan(Boolean value) { + addCriterion("fake <", value, "fake"); + return (Criteria) this; + } + + public Criteria andFakeLessThanOrEqualTo(Boolean value) { + addCriterion("fake <=", value, "fake"); + return (Criteria) this; + } + + public Criteria andFakeIn(List values) { + addCriterion("fake in", values, "fake"); + return (Criteria) this; + } + + public Criteria andFakeNotIn(List values) { + addCriterion("fake not in", values, "fake"); + return (Criteria) this; + } + + public Criteria andFakeBetween(Boolean value1, Boolean value2) { + addCriterion("fake between", value1, value2, "fake"); + return (Criteria) this; + } + + public Criteria andFakeNotBetween(Boolean value1, Boolean value2) { + addCriterion("fake not between", value1, value2, "fake"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/UserSubscribe.java b/src/main/java/club/joylink/rtss/entity/UserSubscribe.java new file mode 100644 index 000000000..b621e7ee1 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/UserSubscribe.java @@ -0,0 +1,104 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * user_subscribe + * @author + */ +public class UserSubscribe implements Serializable { + private Long id; + + /** + * 用户id + */ + private Long userId; + + /** + * 地图id + */ + private Long mapId; + + /** + * 地图名称 + */ + private String mapName; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public Long getMapId() { + return mapId; + } + + public void setMapId(Long mapId) { + this.mapId = mapId; + } + + public String getMapName() { + return mapName; + } + + public void setMapName(String mapName) { + this.mapName = mapName; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + UserSubscribe other = (UserSubscribe) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getMapName() == null ? other.getMapName() == null : this.getMapName().equals(other.getMapName())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getMapName() == null) ? 0 : getMapName().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", userId=").append(userId); + sb.append(", mapId=").append(mapId); + sb.append(", mapName=").append(mapName); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/UserSubscribeExample.java b/src/main/java/club/joylink/rtss/entity/UserSubscribeExample.java new file mode 100644 index 000000000..ed4e2b23f --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/UserSubscribeExample.java @@ -0,0 +1,472 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class UserSubscribeExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Integer offset; + + public UserSubscribeExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Integer offset) { + this.offset = offset; + } + + public Integer getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapNameIsNull() { + addCriterion("map_name is null"); + return (Criteria) this; + } + + public Criteria andMapNameIsNotNull() { + addCriterion("map_name is not null"); + return (Criteria) this; + } + + public Criteria andMapNameEqualTo(String value) { + addCriterion("map_name =", value, "mapName"); + return (Criteria) this; + } + + public Criteria andMapNameNotEqualTo(String value) { + addCriterion("map_name <>", value, "mapName"); + return (Criteria) this; + } + + public Criteria andMapNameGreaterThan(String value) { + addCriterion("map_name >", value, "mapName"); + return (Criteria) this; + } + + public Criteria andMapNameGreaterThanOrEqualTo(String value) { + addCriterion("map_name >=", value, "mapName"); + return (Criteria) this; + } + + public Criteria andMapNameLessThan(String value) { + addCriterion("map_name <", value, "mapName"); + return (Criteria) this; + } + + public Criteria andMapNameLessThanOrEqualTo(String value) { + addCriterion("map_name <=", value, "mapName"); + return (Criteria) this; + } + + public Criteria andMapNameLike(String value) { + addCriterion("map_name like", value, "mapName"); + return (Criteria) this; + } + + public Criteria andMapNameNotLike(String value) { + addCriterion("map_name not like", value, "mapName"); + return (Criteria) this; + } + + public Criteria andMapNameIn(List values) { + addCriterion("map_name in", values, "mapName"); + return (Criteria) this; + } + + public Criteria andMapNameNotIn(List values) { + addCriterion("map_name not in", values, "mapName"); + return (Criteria) this; + } + + public Criteria andMapNameBetween(String value1, String value2) { + addCriterion("map_name between", value1, value2, "mapName"); + return (Criteria) this; + } + + public Criteria andMapNameNotBetween(String value1, String value2) { + addCriterion("map_name not between", value1, value2, "mapName"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/UserSysnoticeUnread.java b/src/main/java/club/joylink/rtss/entity/UserSysnoticeUnread.java new file mode 100644 index 000000000..1cba7a137 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/UserSysnoticeUnread.java @@ -0,0 +1,75 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * user_sysnotice_unread + * @author + */ +public class UserSysnoticeUnread implements Serializable { + /** + * 系统用户id + */ + private Long userId; + + /** + * 未读通知列表(json array数组) + */ + private String unreadNotice; + + private static final long serialVersionUID = 1L; + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public String getUnreadNotice() { + return unreadNotice; + } + + public void setUnreadNotice(String unreadNotice) { + this.unreadNotice = unreadNotice; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + UserSysnoticeUnread other = (UserSysnoticeUnread) that; + return (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) + && (this.getUnreadNotice() == null ? other.getUnreadNotice() == null : this.getUnreadNotice().equals(other.getUnreadNotice())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); + result = prime * result + ((getUnreadNotice() == null) ? 0 : getUnreadNotice().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", userId=").append(userId); + sb.append(", unreadNotice=").append(unreadNotice); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/UserSysnoticeUnreadExample.java b/src/main/java/club/joylink/rtss/entity/UserSysnoticeUnreadExample.java new file mode 100644 index 000000000..02c904d7d --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/UserSysnoticeUnreadExample.java @@ -0,0 +1,282 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class UserSysnoticeUnreadExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public UserSysnoticeUnreadExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/UserTrainingStats.java b/src/main/java/club/joylink/rtss/entity/UserTrainingStats.java new file mode 100644 index 000000000..fc6a18a74 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/UserTrainingStats.java @@ -0,0 +1,185 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * user_training_stats + * @author + */ +public class UserTrainingStats implements Serializable { + private Long id; + + /** + * 用户id + */ + private Long userId; + + /** + * 课程id + */ + private Long lessonId; + + /** + * 实训id + */ + private Long trainingId; + + /** + * 用时 + */ + private Integer duration; + + /** + * 完成的日期时间 + */ + private LocalDateTime finishTime; + + /** + * 实训参与模式 + */ + private String mode; + + /** + * 实训通过 + */ + private Boolean passed; + + /** + * 假数据 + */ + private Boolean fake; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public Long getLessonId() { + return lessonId; + } + + public void setLessonId(Long lessonId) { + this.lessonId = lessonId; + } + + public Long getTrainingId() { + return trainingId; + } + + public void setTrainingId(Long trainingId) { + this.trainingId = trainingId; + } + + public Integer getDuration() { + return duration; + } + + public void setDuration(Integer duration) { + this.duration = duration; + } + + public LocalDateTime getFinishTime() { + return finishTime; + } + + public void setFinishTime(LocalDateTime finishTime) { + this.finishTime = finishTime; + } + + public String getMode() { + return mode; + } + + public void setMode(String mode) { + this.mode = mode; + } + + public Boolean getPassed() { + return passed; + } + + public void setPassed(Boolean passed) { + this.passed = passed; + } + + public Boolean getFake() { + return fake; + } + + public void setFake(Boolean fake) { + this.fake = fake; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + UserTrainingStats other = (UserTrainingStats) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) + && (this.getLessonId() == null ? other.getLessonId() == null : this.getLessonId().equals(other.getLessonId())) + && (this.getTrainingId() == null ? other.getTrainingId() == null : this.getTrainingId().equals(other.getTrainingId())) + && (this.getDuration() == null ? other.getDuration() == null : this.getDuration().equals(other.getDuration())) + && (this.getFinishTime() == null ? other.getFinishTime() == null : this.getFinishTime().equals(other.getFinishTime())) + && (this.getMode() == null ? other.getMode() == null : this.getMode().equals(other.getMode())) + && (this.getPassed() == null ? other.getPassed() == null : this.getPassed().equals(other.getPassed())) + && (this.getFake() == null ? other.getFake() == null : this.getFake().equals(other.getFake())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); + result = prime * result + ((getLessonId() == null) ? 0 : getLessonId().hashCode()); + result = prime * result + ((getTrainingId() == null) ? 0 : getTrainingId().hashCode()); + result = prime * result + ((getDuration() == null) ? 0 : getDuration().hashCode()); + result = prime * result + ((getFinishTime() == null) ? 0 : getFinishTime().hashCode()); + result = prime * result + ((getMode() == null) ? 0 : getMode().hashCode()); + result = prime * result + ((getPassed() == null) ? 0 : getPassed().hashCode()); + result = prime * result + ((getFake() == null) ? 0 : getFake().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", userId=").append(userId); + sb.append(", lessonId=").append(lessonId); + sb.append(", trainingId=").append(trainingId); + sb.append(", duration=").append(duration); + sb.append(", finishTime=").append(finishTime); + sb.append(", mode=").append(mode); + sb.append(", passed=").append(passed); + sb.append(", fake=").append(fake); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/UserTrainingStatsExample.java b/src/main/java/club/joylink/rtss/entity/UserTrainingStatsExample.java new file mode 100644 index 000000000..6fa624dd9 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/UserTrainingStatsExample.java @@ -0,0 +1,773 @@ +package club.joylink.rtss.entity; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +public class UserTrainingStatsExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public UserTrainingStatsExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andLessonIdIsNull() { + addCriterion("lesson_id is null"); + return (Criteria) this; + } + + public Criteria andLessonIdIsNotNull() { + addCriterion("lesson_id is not null"); + return (Criteria) this; + } + + public Criteria andLessonIdEqualTo(Long value) { + addCriterion("lesson_id =", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdNotEqualTo(Long value) { + addCriterion("lesson_id <>", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdGreaterThan(Long value) { + addCriterion("lesson_id >", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdGreaterThanOrEqualTo(Long value) { + addCriterion("lesson_id >=", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdLessThan(Long value) { + addCriterion("lesson_id <", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdLessThanOrEqualTo(Long value) { + addCriterion("lesson_id <=", value, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdIn(List values) { + addCriterion("lesson_id in", values, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdNotIn(List values) { + addCriterion("lesson_id not in", values, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdBetween(Long value1, Long value2) { + addCriterion("lesson_id between", value1, value2, "lessonId"); + return (Criteria) this; + } + + public Criteria andLessonIdNotBetween(Long value1, Long value2) { + addCriterion("lesson_id not between", value1, value2, "lessonId"); + return (Criteria) this; + } + + public Criteria andTrainingIdIsNull() { + addCriterion("training_id is null"); + return (Criteria) this; + } + + public Criteria andTrainingIdIsNotNull() { + addCriterion("training_id is not null"); + return (Criteria) this; + } + + public Criteria andTrainingIdEqualTo(Long value) { + addCriterion("training_id =", value, "trainingId"); + return (Criteria) this; + } + + public Criteria andTrainingIdNotEqualTo(Long value) { + addCriterion("training_id <>", value, "trainingId"); + return (Criteria) this; + } + + public Criteria andTrainingIdGreaterThan(Long value) { + addCriterion("training_id >", value, "trainingId"); + return (Criteria) this; + } + + public Criteria andTrainingIdGreaterThanOrEqualTo(Long value) { + addCriterion("training_id >=", value, "trainingId"); + return (Criteria) this; + } + + public Criteria andTrainingIdLessThan(Long value) { + addCriterion("training_id <", value, "trainingId"); + return (Criteria) this; + } + + public Criteria andTrainingIdLessThanOrEqualTo(Long value) { + addCriterion("training_id <=", value, "trainingId"); + return (Criteria) this; + } + + public Criteria andTrainingIdIn(List values) { + addCriterion("training_id in", values, "trainingId"); + return (Criteria) this; + } + + public Criteria andTrainingIdNotIn(List values) { + addCriterion("training_id not in", values, "trainingId"); + return (Criteria) this; + } + + public Criteria andTrainingIdBetween(Long value1, Long value2) { + addCriterion("training_id between", value1, value2, "trainingId"); + return (Criteria) this; + } + + public Criteria andTrainingIdNotBetween(Long value1, Long value2) { + addCriterion("training_id not between", value1, value2, "trainingId"); + return (Criteria) this; + } + + public Criteria andDurationIsNull() { + addCriterion("duration is null"); + return (Criteria) this; + } + + public Criteria andDurationIsNotNull() { + addCriterion("duration is not null"); + return (Criteria) this; + } + + public Criteria andDurationEqualTo(Integer value) { + addCriterion("duration =", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationNotEqualTo(Integer value) { + addCriterion("duration <>", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationGreaterThan(Integer value) { + addCriterion("duration >", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationGreaterThanOrEqualTo(Integer value) { + addCriterion("duration >=", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationLessThan(Integer value) { + addCriterion("duration <", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationLessThanOrEqualTo(Integer value) { + addCriterion("duration <=", value, "duration"); + return (Criteria) this; + } + + public Criteria andDurationIn(List values) { + addCriterion("duration in", values, "duration"); + return (Criteria) this; + } + + public Criteria andDurationNotIn(List values) { + addCriterion("duration not in", values, "duration"); + return (Criteria) this; + } + + public Criteria andDurationBetween(Integer value1, Integer value2) { + addCriterion("duration between", value1, value2, "duration"); + return (Criteria) this; + } + + public Criteria andDurationNotBetween(Integer value1, Integer value2) { + addCriterion("duration not between", value1, value2, "duration"); + return (Criteria) this; + } + + public Criteria andFinishTimeIsNull() { + addCriterion("finish_time is null"); + return (Criteria) this; + } + + public Criteria andFinishTimeIsNotNull() { + addCriterion("finish_time is not null"); + return (Criteria) this; + } + + public Criteria andFinishTimeEqualTo(LocalDateTime value) { + addCriterion("finish_time =", value, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeNotEqualTo(LocalDateTime value) { + addCriterion("finish_time <>", value, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeGreaterThan(LocalDateTime value) { + addCriterion("finish_time >", value, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeGreaterThanOrEqualTo(LocalDateTime value) { + addCriterion("finish_time >=", value, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeLessThan(LocalDateTime value) { + addCriterion("finish_time <", value, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeLessThanOrEqualTo(LocalDateTime value) { + addCriterion("finish_time <=", value, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeIn(List values) { + addCriterion("finish_time in", values, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeNotIn(List values) { + addCriterion("finish_time not in", values, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("finish_time between", value1, value2, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { + addCriterion("finish_time not between", value1, value2, "finishTime"); + return (Criteria) this; + } + + public Criteria andModeIsNull() { + addCriterion("`mode` is null"); + return (Criteria) this; + } + + public Criteria andModeIsNotNull() { + addCriterion("`mode` is not null"); + return (Criteria) this; + } + + public Criteria andModeEqualTo(String value) { + addCriterion("`mode` =", value, "mode"); + return (Criteria) this; + } + + public Criteria andModeNotEqualTo(String value) { + addCriterion("`mode` <>", value, "mode"); + return (Criteria) this; + } + + public Criteria andModeGreaterThan(String value) { + addCriterion("`mode` >", value, "mode"); + return (Criteria) this; + } + + public Criteria andModeGreaterThanOrEqualTo(String value) { + addCriterion("`mode` >=", value, "mode"); + return (Criteria) this; + } + + public Criteria andModeLessThan(String value) { + addCriterion("`mode` <", value, "mode"); + return (Criteria) this; + } + + public Criteria andModeLessThanOrEqualTo(String value) { + addCriterion("`mode` <=", value, "mode"); + return (Criteria) this; + } + + public Criteria andModeLike(String value) { + addCriterion("`mode` like", value, "mode"); + return (Criteria) this; + } + + public Criteria andModeNotLike(String value) { + addCriterion("`mode` not like", value, "mode"); + return (Criteria) this; + } + + public Criteria andModeIn(List values) { + addCriterion("`mode` in", values, "mode"); + return (Criteria) this; + } + + public Criteria andModeNotIn(List values) { + addCriterion("`mode` not in", values, "mode"); + return (Criteria) this; + } + + public Criteria andModeBetween(String value1, String value2) { + addCriterion("`mode` between", value1, value2, "mode"); + return (Criteria) this; + } + + public Criteria andModeNotBetween(String value1, String value2) { + addCriterion("`mode` not between", value1, value2, "mode"); + return (Criteria) this; + } + + public Criteria andPassedIsNull() { + addCriterion("passed is null"); + return (Criteria) this; + } + + public Criteria andPassedIsNotNull() { + addCriterion("passed is not null"); + return (Criteria) this; + } + + public Criteria andPassedEqualTo(Boolean value) { + addCriterion("passed =", value, "passed"); + return (Criteria) this; + } + + public Criteria andPassedNotEqualTo(Boolean value) { + addCriterion("passed <>", value, "passed"); + return (Criteria) this; + } + + public Criteria andPassedGreaterThan(Boolean value) { + addCriterion("passed >", value, "passed"); + return (Criteria) this; + } + + public Criteria andPassedGreaterThanOrEqualTo(Boolean value) { + addCriterion("passed >=", value, "passed"); + return (Criteria) this; + } + + public Criteria andPassedLessThan(Boolean value) { + addCriterion("passed <", value, "passed"); + return (Criteria) this; + } + + public Criteria andPassedLessThanOrEqualTo(Boolean value) { + addCriterion("passed <=", value, "passed"); + return (Criteria) this; + } + + public Criteria andPassedIn(List values) { + addCriterion("passed in", values, "passed"); + return (Criteria) this; + } + + public Criteria andPassedNotIn(List values) { + addCriterion("passed not in", values, "passed"); + return (Criteria) this; + } + + public Criteria andPassedBetween(Boolean value1, Boolean value2) { + addCriterion("passed between", value1, value2, "passed"); + return (Criteria) this; + } + + public Criteria andPassedNotBetween(Boolean value1, Boolean value2) { + addCriterion("passed not between", value1, value2, "passed"); + return (Criteria) this; + } + + public Criteria andFakeIsNull() { + addCriterion("fake is null"); + return (Criteria) this; + } + + public Criteria andFakeIsNotNull() { + addCriterion("fake is not null"); + return (Criteria) this; + } + + public Criteria andFakeEqualTo(Boolean value) { + addCriterion("fake =", value, "fake"); + return (Criteria) this; + } + + public Criteria andFakeNotEqualTo(Boolean value) { + addCriterion("fake <>", value, "fake"); + return (Criteria) this; + } + + public Criteria andFakeGreaterThan(Boolean value) { + addCriterion("fake >", value, "fake"); + return (Criteria) this; + } + + public Criteria andFakeGreaterThanOrEqualTo(Boolean value) { + addCriterion("fake >=", value, "fake"); + return (Criteria) this; + } + + public Criteria andFakeLessThan(Boolean value) { + addCriterion("fake <", value, "fake"); + return (Criteria) this; + } + + public Criteria andFakeLessThanOrEqualTo(Boolean value) { + addCriterion("fake <=", value, "fake"); + return (Criteria) this; + } + + public Criteria andFakeIn(List values) { + addCriterion("fake in", values, "fake"); + return (Criteria) this; + } + + public Criteria andFakeNotIn(List values) { + addCriterion("fake not in", values, "fake"); + return (Criteria) this; + } + + public Criteria andFakeBetween(Boolean value1, Boolean value2) { + addCriterion("fake between", value1, value2, "fake"); + return (Criteria) this; + } + + public Criteria andFakeNotBetween(Boolean value1, Boolean value2) { + addCriterion("fake not between", value1, value2, "fake"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/entity/VoiceCommand.java b/src/main/java/club/joylink/rtss/entity/VoiceCommand.java new file mode 100644 index 000000000..33a325de9 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/VoiceCommand.java @@ -0,0 +1,152 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * voice_command + * @author + */ +public class VoiceCommand implements Serializable { + private Long id; + + /** + * 语音指令所属地图id + */ + private Long mapId; + + /** + * 指令句式 + */ + private String pattern; + + /** + * 指令类型 + */ + private String type; + + /** + * 用于查找设备的关键词的下标 + */ + private Integer deviceKeyWordIndex; + + /** + * 回复消息格式 + */ + private String reply; + + /** + * 对应的指令 + */ + private String command; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getMapId() { + return mapId; + } + + public void setMapId(Long mapId) { + this.mapId = mapId; + } + + public String getPattern() { + return pattern; + } + + public void setPattern(String pattern) { + this.pattern = pattern; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Integer getDeviceKeyWordIndex() { + return deviceKeyWordIndex; + } + + public void setDeviceKeyWordIndex(Integer deviceKeyWordIndex) { + this.deviceKeyWordIndex = deviceKeyWordIndex; + } + + public String getReply() { + return reply; + } + + public void setReply(String reply) { + this.reply = reply; + } + + public String getCommand() { + return command; + } + + public void setCommand(String command) { + this.command = command; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + VoiceCommand other = (VoiceCommand) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getPattern() == null ? other.getPattern() == null : this.getPattern().equals(other.getPattern())) + && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) + && (this.getDeviceKeyWordIndex() == null ? other.getDeviceKeyWordIndex() == null : this.getDeviceKeyWordIndex().equals(other.getDeviceKeyWordIndex())) + && (this.getReply() == null ? other.getReply() == null : this.getReply().equals(other.getReply())) + && (this.getCommand() == null ? other.getCommand() == null : this.getCommand().equals(other.getCommand())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getPattern() == null) ? 0 : getPattern().hashCode()); + result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); + result = prime * result + ((getDeviceKeyWordIndex() == null) ? 0 : getDeviceKeyWordIndex().hashCode()); + result = prime * result + ((getReply() == null) ? 0 : getReply().hashCode()); + result = prime * result + ((getCommand() == null) ? 0 : getCommand().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", mapId=").append(mapId); + sb.append(", pattern=").append(pattern); + sb.append(", type=").append(type); + sb.append(", deviceKeyWordIndex=").append(deviceKeyWordIndex); + sb.append(", reply=").append(reply); + sb.append(", command=").append(command); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} diff --git a/src/main/java/club/joylink/rtss/entity/VoiceCommandExample.java b/src/main/java/club/joylink/rtss/entity/VoiceCommandExample.java new file mode 100644 index 000000000..0e9174b61 --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/VoiceCommandExample.java @@ -0,0 +1,682 @@ +package club.joylink.rtss.entity; + +import java.util.ArrayList; +import java.util.List; + +public class VoiceCommandExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public VoiceCommandExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andMapIdIsNull() { + addCriterion("map_id is null"); + return (Criteria) this; + } + + public Criteria andMapIdIsNotNull() { + addCriterion("map_id is not null"); + return (Criteria) this; + } + + public Criteria andMapIdEqualTo(Long value) { + addCriterion("map_id =", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotEqualTo(Long value) { + addCriterion("map_id <>", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThan(Long value) { + addCriterion("map_id >", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdGreaterThanOrEqualTo(Long value) { + addCriterion("map_id >=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThan(Long value) { + addCriterion("map_id <", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdLessThanOrEqualTo(Long value) { + addCriterion("map_id <=", value, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdIn(List values) { + addCriterion("map_id in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotIn(List values) { + addCriterion("map_id not in", values, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdBetween(Long value1, Long value2) { + addCriterion("map_id between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andMapIdNotBetween(Long value1, Long value2) { + addCriterion("map_id not between", value1, value2, "mapId"); + return (Criteria) this; + } + + public Criteria andPatternIsNull() { + addCriterion("pattern is null"); + return (Criteria) this; + } + + public Criteria andPatternIsNotNull() { + addCriterion("pattern is not null"); + return (Criteria) this; + } + + public Criteria andPatternEqualTo(String value) { + addCriterion("pattern =", value, "pattern"); + return (Criteria) this; + } + + public Criteria andPatternNotEqualTo(String value) { + addCriterion("pattern <>", value, "pattern"); + return (Criteria) this; + } + + public Criteria andPatternGreaterThan(String value) { + addCriterion("pattern >", value, "pattern"); + return (Criteria) this; + } + + public Criteria andPatternGreaterThanOrEqualTo(String value) { + addCriterion("pattern >=", value, "pattern"); + return (Criteria) this; + } + + public Criteria andPatternLessThan(String value) { + addCriterion("pattern <", value, "pattern"); + return (Criteria) this; + } + + public Criteria andPatternLessThanOrEqualTo(String value) { + addCriterion("pattern <=", value, "pattern"); + return (Criteria) this; + } + + public Criteria andPatternLike(String value) { + addCriterion("pattern like", value, "pattern"); + return (Criteria) this; + } + + public Criteria andPatternNotLike(String value) { + addCriterion("pattern not like", value, "pattern"); + return (Criteria) this; + } + + public Criteria andPatternIn(List values) { + addCriterion("pattern in", values, "pattern"); + return (Criteria) this; + } + + public Criteria andPatternNotIn(List values) { + addCriterion("pattern not in", values, "pattern"); + return (Criteria) this; + } + + public Criteria andPatternBetween(String value1, String value2) { + addCriterion("pattern between", value1, value2, "pattern"); + return (Criteria) this; + } + + public Criteria andPatternNotBetween(String value1, String value2) { + addCriterion("pattern not between", value1, value2, "pattern"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("`type` is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("`type` is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(String value) { + addCriterion("`type` =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(String value) { + addCriterion("`type` <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(String value) { + addCriterion("`type` >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(String value) { + addCriterion("`type` >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(String value) { + addCriterion("`type` <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(String value) { + addCriterion("`type` <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLike(String value) { + addCriterion("`type` like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotLike(String value) { + addCriterion("`type` not like", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("`type` in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("`type` not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(String value1, String value2) { + addCriterion("`type` between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(String value1, String value2) { + addCriterion("`type` not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andDeviceKeyWordIndexIsNull() { + addCriterion("device_key_word_index is null"); + return (Criteria) this; + } + + public Criteria andDeviceKeyWordIndexIsNotNull() { + addCriterion("device_key_word_index is not null"); + return (Criteria) this; + } + + public Criteria andDeviceKeyWordIndexEqualTo(Integer value) { + addCriterion("device_key_word_index =", value, "deviceKeyWordIndex"); + return (Criteria) this; + } + + public Criteria andDeviceKeyWordIndexNotEqualTo(Integer value) { + addCriterion("device_key_word_index <>", value, "deviceKeyWordIndex"); + return (Criteria) this; + } + + public Criteria andDeviceKeyWordIndexGreaterThan(Integer value) { + addCriterion("device_key_word_index >", value, "deviceKeyWordIndex"); + return (Criteria) this; + } + + public Criteria andDeviceKeyWordIndexGreaterThanOrEqualTo(Integer value) { + addCriterion("device_key_word_index >=", value, "deviceKeyWordIndex"); + return (Criteria) this; + } + + public Criteria andDeviceKeyWordIndexLessThan(Integer value) { + addCriterion("device_key_word_index <", value, "deviceKeyWordIndex"); + return (Criteria) this; + } + + public Criteria andDeviceKeyWordIndexLessThanOrEqualTo(Integer value) { + addCriterion("device_key_word_index <=", value, "deviceKeyWordIndex"); + return (Criteria) this; + } + + public Criteria andDeviceKeyWordIndexIn(List values) { + addCriterion("device_key_word_index in", values, "deviceKeyWordIndex"); + return (Criteria) this; + } + + public Criteria andDeviceKeyWordIndexNotIn(List values) { + addCriterion("device_key_word_index not in", values, "deviceKeyWordIndex"); + return (Criteria) this; + } + + public Criteria andDeviceKeyWordIndexBetween(Integer value1, Integer value2) { + addCriterion("device_key_word_index between", value1, value2, "deviceKeyWordIndex"); + return (Criteria) this; + } + + public Criteria andDeviceKeyWordIndexNotBetween(Integer value1, Integer value2) { + addCriterion("device_key_word_index not between", value1, value2, "deviceKeyWordIndex"); + return (Criteria) this; + } + + public Criteria andReplyIsNull() { + addCriterion("reply is null"); + return (Criteria) this; + } + + public Criteria andReplyIsNotNull() { + addCriterion("reply is not null"); + return (Criteria) this; + } + + public Criteria andReplyEqualTo(String value) { + addCriterion("reply =", value, "reply"); + return (Criteria) this; + } + + public Criteria andReplyNotEqualTo(String value) { + addCriterion("reply <>", value, "reply"); + return (Criteria) this; + } + + public Criteria andReplyGreaterThan(String value) { + addCriterion("reply >", value, "reply"); + return (Criteria) this; + } + + public Criteria andReplyGreaterThanOrEqualTo(String value) { + addCriterion("reply >=", value, "reply"); + return (Criteria) this; + } + + public Criteria andReplyLessThan(String value) { + addCriterion("reply <", value, "reply"); + return (Criteria) this; + } + + public Criteria andReplyLessThanOrEqualTo(String value) { + addCriterion("reply <=", value, "reply"); + return (Criteria) this; + } + + public Criteria andReplyLike(String value) { + addCriterion("reply like", value, "reply"); + return (Criteria) this; + } + + public Criteria andReplyNotLike(String value) { + addCriterion("reply not like", value, "reply"); + return (Criteria) this; + } + + public Criteria andReplyIn(List values) { + addCriterion("reply in", values, "reply"); + return (Criteria) this; + } + + public Criteria andReplyNotIn(List values) { + addCriterion("reply not in", values, "reply"); + return (Criteria) this; + } + + public Criteria andReplyBetween(String value1, String value2) { + addCriterion("reply between", value1, value2, "reply"); + return (Criteria) this; + } + + public Criteria andReplyNotBetween(String value1, String value2) { + addCriterion("reply not between", value1, value2, "reply"); + return (Criteria) this; + } + + public Criteria andCommandIsNull() { + addCriterion("command is null"); + return (Criteria) this; + } + + public Criteria andCommandIsNotNull() { + addCriterion("command is not null"); + return (Criteria) this; + } + + public Criteria andCommandEqualTo(String value) { + addCriterion("command =", value, "command"); + return (Criteria) this; + } + + public Criteria andCommandNotEqualTo(String value) { + addCriterion("command <>", value, "command"); + return (Criteria) this; + } + + public Criteria andCommandGreaterThan(String value) { + addCriterion("command >", value, "command"); + return (Criteria) this; + } + + public Criteria andCommandGreaterThanOrEqualTo(String value) { + addCriterion("command >=", value, "command"); + return (Criteria) this; + } + + public Criteria andCommandLessThan(String value) { + addCriterion("command <", value, "command"); + return (Criteria) this; + } + + public Criteria andCommandLessThanOrEqualTo(String value) { + addCriterion("command <=", value, "command"); + return (Criteria) this; + } + + public Criteria andCommandLike(String value) { + addCriterion("command like", value, "command"); + return (Criteria) this; + } + + public Criteria andCommandNotLike(String value) { + addCriterion("command not like", value, "command"); + return (Criteria) this; + } + + public Criteria andCommandIn(List values) { + addCriterion("command in", values, "command"); + return (Criteria) this; + } + + public Criteria andCommandNotIn(List values) { + addCriterion("command not in", values, "command"); + return (Criteria) this; + } + + public Criteria andCommandBetween(String value1, String value2) { + addCriterion("command between", value1, value2, "command"); + return (Criteria) this; + } + + public Criteria andCommandNotBetween(String value1, String value2) { + addCriterion("command not between", value1, value2, "command"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} diff --git a/src/main/java/club/joylink/rtss/entity/VoiceCommandWithBLOBs.java b/src/main/java/club/joylink/rtss/entity/VoiceCommandWithBLOBs.java new file mode 100644 index 000000000..a5190324e --- /dev/null +++ b/src/main/java/club/joylink/rtss/entity/VoiceCommandWithBLOBs.java @@ -0,0 +1,120 @@ +package club.joylink.rtss.entity; + +import java.io.Serializable; + +/** + * voice_command + */ +public class VoiceCommandWithBLOBs extends VoiceCommand implements Serializable { + /** + * 每个子表达式对应的关键词 + */ + private String keyWordTypeMapJson; + + /** + * 可以触发指令的角色 + */ + private String fromType; + + /** + * 接收指令的角色 + */ + private String targetType; + + /** + * 回复消息参数在匹配到的文本中的下标 + */ + private String replyParamIndexesJson; + + private static final long serialVersionUID = 1L; + + public String getKeyWordTypeMapJson() { + return keyWordTypeMapJson; + } + + public void setKeyWordTypeMapJson(String keyWordTypeMapJson) { + this.keyWordTypeMapJson = keyWordTypeMapJson; + } + + public String getFromType() { + return fromType; + } + + public void setFromType(String fromType) { + this.fromType = fromType; + } + + public String getTargetType() { + return targetType; + } + + public void setTargetType(String targetType) { + this.targetType = targetType; + } + + public String getReplyParamIndexesJson() { + return replyParamIndexesJson; + } + + public void setReplyParamIndexesJson(String replyParamIndexesJson) { + this.replyParamIndexesJson = replyParamIndexesJson; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + VoiceCommandWithBLOBs other = (VoiceCommandWithBLOBs) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMapId() == null ? other.getMapId() == null : this.getMapId().equals(other.getMapId())) + && (this.getPattern() == null ? other.getPattern() == null : this.getPattern().equals(other.getPattern())) + && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) + && (this.getDeviceKeyWordIndex() == null ? other.getDeviceKeyWordIndex() == null : this.getDeviceKeyWordIndex().equals(other.getDeviceKeyWordIndex())) + && (this.getReply() == null ? other.getReply() == null : this.getReply().equals(other.getReply())) + && (this.getCommand() == null ? other.getCommand() == null : this.getCommand().equals(other.getCommand())) + && (this.getKeyWordTypeMapJson() == null ? other.getKeyWordTypeMapJson() == null : this.getKeyWordTypeMapJson().equals(other.getKeyWordTypeMapJson())) + && (this.getFromType() == null ? other.getFromType() == null : this.getFromType().equals(other.getFromType())) + && (this.getTargetType() == null ? other.getTargetType() == null : this.getTargetType().equals(other.getTargetType())) + && (this.getReplyParamIndexesJson() == null ? other.getReplyParamIndexesJson() == null : this.getReplyParamIndexesJson().equals(other.getReplyParamIndexesJson())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getMapId() == null) ? 0 : getMapId().hashCode()); + result = prime * result + ((getPattern() == null) ? 0 : getPattern().hashCode()); + result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); + result = prime * result + ((getDeviceKeyWordIndex() == null) ? 0 : getDeviceKeyWordIndex().hashCode()); + result = prime * result + ((getReply() == null) ? 0 : getReply().hashCode()); + result = prime * result + ((getCommand() == null) ? 0 : getCommand().hashCode()); + result = prime * result + ((getKeyWordTypeMapJson() == null) ? 0 : getKeyWordTypeMapJson().hashCode()); + result = prime * result + ((getFromType() == null) ? 0 : getFromType().hashCode()); + result = prime * result + ((getTargetType() == null) ? 0 : getTargetType().hashCode()); + result = prime * result + ((getReplyParamIndexesJson() == null) ? 0 : getReplyParamIndexesJson().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", keyWordTypeMapJson=").append(keyWordTypeMapJson); + sb.append(", fromType=").append(fromType); + sb.append(", targetType=").append(targetType); + sb.append(", replyParamIndexesJson=").append(replyParamIndexesJson); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} diff --git a/src/main/java/club/joylink/rtss/exception/BaseException.java b/src/main/java/club/joylink/rtss/exception/BaseException.java new file mode 100644 index 000000000..cead3a6eb --- /dev/null +++ b/src/main/java/club/joylink/rtss/exception/BaseException.java @@ -0,0 +1,34 @@ +package club.joylink.rtss.exception; + +public class BaseException extends RuntimeException { + + private IExceptionMessage exceptionMessage; + + public BaseException(IExceptionMessage exceptionMessage) { + super(exceptionMessage.getMessage()); + this.exceptionMessage = exceptionMessage; + } + + public BaseException(IExceptionMessage exceptionMessage, String message) { + super(message); + this.exceptionMessage = exceptionMessage; + } + + public BaseException(IExceptionMessage exceptionMessage, Throwable cause) { + super(exceptionMessage.getMessage(), cause); + this.exceptionMessage = exceptionMessage; + } + + public BaseException(IExceptionMessage exceptionMessage, String message, Throwable cause) { + super(message, cause); + this.exceptionMessage = exceptionMessage; + } + + public int getCode() { + return this.exceptionMessage.getCode(); + } + + public String getVoMessage() { + return this.exceptionMessage.getMessage(); + } +} diff --git a/src/main/java/club/joylink/rtss/exception/BusinessException.java b/src/main/java/club/joylink/rtss/exception/BusinessException.java new file mode 100644 index 000000000..e24ae4547 --- /dev/null +++ b/src/main/java/club/joylink/rtss/exception/BusinessException.java @@ -0,0 +1,19 @@ +package club.joylink.rtss.exception; + +public class BusinessException extends BaseException { + public BusinessException(IExceptionMessage exceptionMessage) { + super(exceptionMessage); + } + + public BusinessException(IExceptionMessage exceptionMessage, String message) { + super(exceptionMessage, message); + } + + public BusinessException(IExceptionMessage exceptionMessage, Throwable cause) { + super(exceptionMessage, cause); + } + + public BusinessException(IExceptionMessage exceptionMessage, String message, Throwable cause) { + super(exceptionMessage, message, cause); + } +} diff --git a/src/main/java/club/joylink/rtss/exception/BusinessExceptionAssert.java b/src/main/java/club/joylink/rtss/exception/BusinessExceptionAssert.java new file mode 100644 index 000000000..244e7b426 --- /dev/null +++ b/src/main/java/club/joylink/rtss/exception/BusinessExceptionAssert.java @@ -0,0 +1,21 @@ +package club.joylink.rtss.exception; + +public interface BusinessExceptionAssert extends IExceptionMessage, ExceptionAssert { + + default BaseException exception() { + return new BusinessException(this); + } + + default BaseException exception(Throwable t) { + return new BusinessException(this, t); + } + + default BaseException exception(String message) { + return new BusinessException(this, message); + } + + default BaseException exception(String message, Throwable t) { + return new BusinessException(this, message, t); + } + +} diff --git a/src/main/java/club/joylink/rtss/exception/BusinessExceptionAssertEnum.java b/src/main/java/club/joylink/rtss/exception/BusinessExceptionAssertEnum.java new file mode 100644 index 000000000..774a3772b --- /dev/null +++ b/src/main/java/club/joylink/rtss/exception/BusinessExceptionAssertEnum.java @@ -0,0 +1,58 @@ +package club.joylink.rtss.exception; + +import lombok.Getter; + +@Getter +public enum BusinessExceptionAssertEnum implements BusinessExceptionAssert { + INVALID_LICENSE(90000, "invalid license"), + LICENSE_EXPIRED(90001, "license expired"), + LICENSE_LOCAL_SAVE_FAILED(90002, "license local save failed"), + LICENSE_LOCAL_LOAD_FAILED(90003, "license local load failed"), + LICENSE_DECRYPT_FAILED(90004, "license decrypt failed"), + LICENSE_NOT_EXIST(90005, "license not exist"), + LICENSE_FILE_NOT_EXIST(90006, "license file not exist"), + + + SYSTEM_EXCEPTION(10000, "system exception"), + TRAINING_ROOM_SIMULATION_NOT_EXIST(10001, "training room simulation not exist"), + SIMULATION_PERMISSION_ALREADY_GET(10002, "permission already get"), + INSUFFICIENT_PERMISSIONS(10003, "insufficient permissions"), + OPERATION_NOT_SUPPORTED(10004, "operation not supported"), + INVALID_OPERATION(10005, "invalid operation"), + TRAINING_ROOM_SIMULATION_LOAD_DEVICE_ERROR(10006, "training room simulation load device error"), + DATA_NOT_EXIST(10007, "data not exist"), + ARGUMENT_ILLEGAL(10008, "argument illegal"), + SIMULATION_PERMISSION_USE_UP(10009, "simulation permission use up"), + NAME_REPEAT(10010, "name repeat"), + QUESTION_RULE_NOT_EXIST(10011, "question rule not exist"), + DATA_ALREADY_EXIST(10012, "data already exist"), + SIMULATION_PERMISSION_NOT_EXIST(10013, "simulation permission not exist"), + SIMULATION_PERMISSION_NOT_AVAILABLE(10014, "simulation permission not available"), + + + DATA_ERROR(11000, "data error"), + CI_GENERATE_ERROR(11001, "ci data generate error"), + MAP_PASSENGER_FLOW_DATA_ERROR(11002, "map passenger flow data error"), + DATA_UNIQUE_PROPERTY_REPEAT(10013, "data unique property repeat"), + + // 运行图工具 + BEYOND_RECEPTION(101, "beyond station reception"), + + + // + LOGIN_EXPIRED(40004, "login expired"), + NOT_LOGIN(40005, "not login"), + INVALID_CLIENT(40031, "invalid client"), + INCORRECT_VERIFICATION_CODE(40051, "incorrect verification code"), + THIRD_SERVICE_CALL_EXCEPTION(40071, "the third service call exception"), + ; + + int code; + + String message; + + BusinessExceptionAssertEnum(int code, String message) { + this.code = code; + this.message = message; + } +} diff --git a/src/main/java/club/joylink/rtss/exception/ExceptionAssert.java b/src/main/java/club/joylink/rtss/exception/ExceptionAssert.java new file mode 100644 index 000000000..4d0112adc --- /dev/null +++ b/src/main/java/club/joylink/rtss/exception/ExceptionAssert.java @@ -0,0 +1,139 @@ +package club.joylink.rtss.exception; + + +import org.springframework.util.CollectionUtils; +import org.springframework.util.StringUtils; + +import java.util.Collection; +import java.util.Objects; + +public interface ExceptionAssert { + + BaseException exception(); + + BaseException exception(Throwable t); + + BaseException exception(String message); + + BaseException exception(String message, Throwable t); + + default void assertNotNull(Object object) { + if (object == null) { + throw exception(); + } + } + + default void assertNotNull(Object object, String message) { + if (object == null) { + throw exception(message); + } + } + + default void assertNull(Object object) { + if (object != null) { + throw exception(); + } + } + + default void assertNull(Object object, String message) { + if (object != null) { + throw exception(message); + } + } + + default void assertTrue(boolean expression) { + if (!expression) { + throw exception(); + } + } + + default void assertTrue(boolean expression, String message) { + if (!expression) { + throw exception(message); + } + } + + default void assertNotTrue(boolean expression) { + if (expression) { + throw exception(); + } + } + + default void assertNotTrue(boolean expression, String message) { + if (expression) { + throw exception(message); + } + } + + default void assertCollectionEmpty(Collection collection) { + if (!CollectionUtils.isEmpty(collection)) { + throw exception(); + } + } + + default void assertCollectionEmpty(Collection collection, String message) { + if (!CollectionUtils.isEmpty(collection)) { + throw exception(message); + } + } + + default void assertCollectionNotEmpty(Collection collection) { + if (CollectionUtils.isEmpty(collection)) { + throw exception(); + } + } + + default void assertCollectionNotEmpty(Collection collection, String message) { + if (CollectionUtils.isEmpty(collection)) { + throw exception(message); + } + } + + default void assertEquals(Object o1, Object o2) { + if (!Objects.equals(o1, o2)) { + throw exception(); + } + } + + default void assertEquals(Object o1, Object o2, String message) { + if (!Objects.equals(o1, o2)) { + throw exception(message); + } + } + + default void assertNotEquals(Object o1, Object o2) { + if (Objects.equals(o1, o2)) { + throw exception(); + } + } + + default void assertNotEquals(Object o1, Object o2, String message) { + if (Objects.equals(o1, o2)) { + throw exception(message); + } + } + + default void assertHasText(String str) { + if (!StringUtils.hasText(str)) { + throw exception(); + } + } + + default void assertHasText(String str, String message) { + if (!StringUtils.hasText(str)) { + throw exception(message); + } + } + + default void assertNotHasText(String str) { + if (StringUtils.hasText(str)) { + throw exception(); + } + } + + default void assertNotHasText(String str, String message) { + if (StringUtils.hasText(str)) { + throw exception(message); + } + } +} diff --git a/src/main/java/club/joylink/rtss/exception/IExceptionMessage.java b/src/main/java/club/joylink/rtss/exception/IExceptionMessage.java new file mode 100644 index 000000000..b66441a96 --- /dev/null +++ b/src/main/java/club/joylink/rtss/exception/IExceptionMessage.java @@ -0,0 +1,9 @@ +package club.joylink.rtss.exception; + +public interface IExceptionMessage { + + int getCode(); + + String getMessage(); + +} diff --git a/src/main/java/club/joylink/rtss/services/AuthenticateService.java b/src/main/java/club/joylink/rtss/services/AuthenticateService.java new file mode 100644 index 000000000..e2a491684 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/AuthenticateService.java @@ -0,0 +1,515 @@ +package club.joylink.rtss.services; + +import com.joylink.base.exception.BusinessException; +import com.joylink.base.exception.SysBizException; +import com.joylink.base.exception.constant.ExceptionMapping; +import club.joylink.rtss.simulation.cbtc.ProjectJointSimulationService; +import club.joylink.rtss.simulation.cbtc.Simulation; +import club.joylink.rtss.configuration.configProp.OtherConfig; +import club.joylink.rtss.configuration.configProp.WeChatConfig; +import club.joylink.rtss.constants.Client; +import club.joylink.rtss.constants.Project; +import club.joylink.rtss.constants.SystemEnv; +import club.joylink.rtss.dao.SysUserLoginDAO; +import club.joylink.rtss.entity.SysUserLogin; +import club.joylink.rtss.event.ProjectDeviceLogoutEvent; +import club.joylink.rtss.event.UserLogoutEvent; +import club.joylink.rtss.services.project.DeviceService; +import club.joylink.rtss.services.simulation.ProjectSimulationService; +import club.joylink.rtss.util.RandomGenerator; +import club.joylink.rtss.vo.LoginUserInfoVO; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.LoginStatusVO; +import club.joylink.rtss.vo.client.LoginUserVO; +import club.joylink.rtss.vo.client.project.ProjectDeviceVO; +import club.joylink.rtss.vo.client.project.RelationLoginConfigVO; +import club.joylink.rtss.vo.wx.WmUserSession; +import lombok.Getter; +import lombok.Setter; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.ApplicationContext; +import org.springframework.context.event.EventListener; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; +import org.springframework.util.StringUtils; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +@Service +@Slf4j +public class AuthenticateService implements IAuthenticateService { + + @Autowired + private ApplicationContext applicationContext; + + @Autowired + private WeChatConfig weChatConfig; + + @Autowired + private OtherConfig otherConfig; + + @Autowired + private ISysUserService iSysUserService; + + @Autowired + private SysUserLoginDAO sysUserLoginDAO; + + @Autowired + private IWxApiService iWxApiService; + + @Autowired + private DeviceService deviceService; + + @Autowired + private LoginSessionManager loginSessionManager; + + @Autowired + private ProjectJointSimulationService projectJointSimulationService; + + @Autowired + private ProjectSimulationService projectSimulationService; + + @Override + public LoginStatusVO getWmLoginUrl(String clientId, String secret, Project project, String deviceCode) { + String envId = SystemEnv.getSystemEnvIdByName(this.otherConfig.getEnv()); + Client client = Client.getByIdAndSecret(clientId, secret); + if (Objects.isNull(project)) { + project = Project.DEFAULT; + } + ProjectDeviceVO deviceVO = null; + if (!StringUtils.isEmpty(deviceCode)) { + deviceVO = this.deviceService.getDeviceDetailInfoOf(project, deviceCode); + } + String sessionId = RandomGenerator.uuid(); + LoginScanParam param = new LoginScanParam(envId, sessionId, clientId); + String state = param.toParam(); + String url = weChatConfig.getWmLoginUrl(state); + LoginStatusVO loginStatusVO = LoginStatusVO.builder() + .url(url) + .sessionId(sessionId) + .client(client) + .project(project) + .deviceVO(deviceVO) + .time(LocalDateTime.now()) + .status(LoginStatusVO.ScanLoginStatus.WAIT) + .build(); + this.loginSessionManager.saveLoginStatus(loginStatusVO); + return loginStatusVO; + } + + @Override + public UserVO scanWmLoginQrCode(String code, String state) { + LoginScanParam param = LoginScanParam.parse(state); + LoginStatusVO loginStatusVo = getLoginStatus(param.getSessionId()); + if(Objects.isNull(loginStatusVo) || !loginStatusVo.isWaiting()) { + throw new BusinessException(ExceptionMapping.CLIENT_LOGIN_INVALID); + } + UserVO userVO = getOrCreateUserByWmcode(code); + loginStatusVo.setStatus(LoginStatusVO.ScanLoginStatus.SCAN); + return userVO; + } + + @Override + public UserVO getOrCreateUserByWmcode(String code) { + WmUserSession wmUserSession = this.iWxApiService.getWmUserSession(code); + UserVO userVO = null; + if(!StringUtils.isEmpty(wmUserSession.getUnionid())) { + userVO = this.iSysUserService.findUserByUnionId(wmUserSession.getUnionid()); + } + if(Objects.isNull(userVO)) { + userVO = this.iSysUserService.findUserByWmOpenId(wmUserSession.getOpenid()); + } else { + if (!Objects.equals(wmUserSession.getOpenid(), userVO.getWmOpenId())) { + this.iSysUserService.updateUserWmOpenId(userVO.getId(), wmUserSession.getOpenid()); + } + } + if(Objects.isNull(userVO)) { // 如果用户不存在,新建用户 + userVO = this.iSysUserService.createUserOfWechatMicro(wmUserSession); + } + userVO.filter4Client(); + return userVO; + } + + @Override + public String getTokenByWmCode(String code) { + UserVO userVO = this.getOrCreateUserByWmcode(code); + // 移除之前登录信息 + List infoVOList = this.loginSessionManager.queryLoginInfoByUserId(userVO.getId()); + if (!CollectionUtils.isEmpty(infoVOList)) { + List removeList = new ArrayList<>(); + for (LoginUserInfoVO temp : infoVOList) { + if (Objects.equals(temp.getClient(), Client.Assistant)) { + removeList.add(temp); + } + } + infoVOList.removeAll(removeList); + } + // 登录小程序助手 + LoginUserInfoVO loginUserInfoVO = new LoginUserInfoVO(userVO, Client.Assistant, + Project.DEFAULT, null); + String token = loginUserInfoVO.getToken(); + this.loginSessionManager.addLoginUserInfo(loginUserInfoVO); + return token; + } + + @Override + public boolean isTokenExpired(String token) { + return !this.loginSessionManager.containsToken(token); + } + + @Override + public void preLogout(String token) { + LoginUserInfoVO loginUserInfoVO = this.loginSessionManager.queryLoginInfoByToken(token); + if (Objects.nonNull(loginUserInfoVO)) { + loginUserInfoVO.preLogout(); + log.info(String.format("用户[%s]预登出", loginUserInfoVO.buildDebugStr())); + } + } + + /** + * 检查预登出用户,超时登出 + */ + @Scheduled(fixedRate = 1000) + public void logoutProgress() { + List infoVOList = this.loginSessionManager.queryPreLogoutInfos(); + if (!CollectionUtils.isEmpty(infoVOList)) { + LocalDateTime now = LocalDateTime.now(); + for (LoginUserInfoVO userInfoVO : infoVOList) { + LocalDateTime preLogoutTime = userInfoVO.getPreLogoutTime(); + if (Objects.nonNull(preLogoutTime) && + now.isAfter(preLogoutTime.plusSeconds(10))) { + // 预退出10秒如果还没有取消,视为退出系统 + log.info(String.format("登出预登出用户[%s-%s-%s-%s]", + userInfoVO.getUserVO().getId(), + userInfoVO.getClient(), + userInfoVO.getProject(), + userInfoVO.getDeviceVO())); + this.logout(userInfoVO); + } + } + } + } + + @Override + public void wmConfirmClientLogin(String code, String state) { + LoginScanParam param = LoginScanParam.parse(state); + String sessionId = param.getSessionId(); + // 获取登陆状态对象 + LoginStatusVO loginStatusVo = getLoginStatus(sessionId); + synchronized (loginStatusVo) { + if(!loginStatusVo.isSuccess()) { + // 获取用户 + WmUserSession wmUserSession = this.iWxApiService.getWmUserSession(code); + UserVO user = this.iSysUserService.getUserByWmOpenId(wmUserSession.getOpenid()); + if(StringUtils.isEmpty(loginStatusVo.getToken())){ //正常扫码登陆 + // 构造登陆用户信息 + LoginUserInfoVO loginUserInfo = + new LoginUserInfoVO(user, loginStatusVo.getClient(), + loginStatusVo.getProject(), loginStatusVo.getDeviceVO()); + // 登陆 + login(loginUserInfo, true); + // 更新登陆状态 + String token = loginUserInfo.getToken(); + loginStatusVo.success(token); + } + } + } + } + + /** + * 登录逻辑 + * @param loginUserInfo + * @param force 是否强制登录,true-登出之前登录的相同系统;false-若存在相同已登录系统,此次登录失败 + */ + public void login(LoginUserInfoVO loginUserInfo, boolean force) { + if (force) { + this.logoutSameClient(loginUserInfo); + } else { + this.checkSameLoginAndThrow(loginUserInfo); + } + if (Client.Joylink.equals(loginUserInfo.getClient())) { // 实训平台特殊登录 + if (loginUserInfo.isProjectDeviceLogin()) { + this.handleProjectDeviceLogin(loginUserInfo); + } + Project project = loginUserInfo.getProject(); + if (Project.isLoginWithCreateSimulation(project)) { // 行调竞赛实训系统登录 + Simulation simulation = this.projectSimulationService + .createCenterSimulation(loginUserInfo, project); + loginUserInfo.setGroup(simulation.getGroup()); + } + } + // 保存登陆信息 + SysUserLogin userLogin = loginUserInfo.convert2DB(); + this.sysUserLoginDAO.insert(userLogin); + // 保存token对应登陆用户信息缓存 + this.loginSessionManager.addLoginUserInfo(loginUserInfo); + } + + private void handleProjectDeviceLogin(LoginUserInfoVO loginUserInfo) { + ProjectDeviceVO deviceVO = loginUserInfo.getDeviceVO(); + Objects.requireNonNull(deviceVO); + switch (deviceVO.getType()) { + case IM:{ + // 教员机 + Simulation simulation = this.projectJointSimulationService.createSimulation(loginUserInfo); + loginUserInfo.setGroup(simulation.getGroup()); + break; + } + case LW: + case DEPOT: + case DRIVE: + case CW:{ + // 工作站登录 + this.projectJointSimulationService.handleWorkStationLogin(loginUserInfo); + break; + } + default: + throw new BusinessException(ExceptionMapping.ILLEGAL_OPERATION, + String.format("不支持的设备客户端登录")); + } + } + + private void checkSameLoginAndThrow(LoginUserInfoVO loginUserInfo) { + List loginUserInfoVOList = this.loginSessionManager + .queryLoginInfoByUserId(loginUserInfo.getUserVO().getId()); + // 检查是否已经登录相同系统 + boolean login = false; + if (!CollectionUtils.isEmpty(loginUserInfoVOList)) { + for (LoginUserInfoVO temp : loginUserInfoVOList) { + if (Objects.equals(temp.getClient(), loginUserInfo.getClient())) { + login = true; + break; + } + } + } + if (login) { + throw new BusinessException(ExceptionMapping.ILLEGAL_OPERATION, + String.format("已登录")); + } + } + + private void logoutSameClient(LoginUserInfoVO loginUserInfo) { + List loginUserInfoVOList = this.loginSessionManager + .queryLoginInfoByUserId(loginUserInfo.getUserVO().getId()); + // 清除之前相同系统登录 + if (!CollectionUtils.isEmpty(loginUserInfoVOList)) { + List removeList = new ArrayList<>(); + for (LoginUserInfoVO temp : loginUserInfoVOList) { + if (Objects.equals(loginUserInfo.getClient(), temp.getClient())) { + removeList.add(temp); + } + } + for (LoginUserInfoVO infoVO : removeList) { + this.logout(infoVO); + } + } + } + + @Override + public String loginWithPwd(LoginUserVO loginUser) { + UserVO user = this.iSysUserService + .findUserByAccountAndPassword(loginUser.getAccount(), loginUser.getPassword()); + if(Objects.isNull(user)) { + throw new BusinessException(ExceptionMapping.DATA_NOT_EXIST, "账号或密码不正确!"); + } + Client client = Client.getByIdAndSecret(loginUser.getClientId(), loginUser.getSecret()); + Project project = loginUser.getProject(); + if (Objects.isNull(project)) { + project = Project.DEFAULT; + } + ProjectDeviceVO deviceVO = null; + if (!StringUtils.isEmpty(loginUser.getDeviceCode())) { + deviceVO = this.deviceService.getDeviceDetailInfoOf(project, loginUser.getDeviceCode()); + } + // 构造登陆用户信息 + LoginUserInfoVO loginUserInfo = new LoginUserInfoVO(user, client, project, deviceVO); + // 执行登录 + login(loginUserInfo, true); + return loginUserInfo.getToken(); + } + + @Override + public void logout(String token) { + if(Objects.nonNull(token)) { + LoginUserInfoVO loginUserInfoVO = this.loginSessionManager.queryLoginInfoByToken(token); + this.logout(loginUserInfoVO); + } + } + + private void logout(LoginUserInfoVO loginUserInfoVO) { + if(Objects.nonNull(loginUserInfoVO)) { + log.debug(String.format("用户[%s(%s)]登出[%s]", + loginUserInfoVO.getUserVO().getNickname(), loginUserInfoVO.getUserVO().getId(), + loginUserInfoVO.getClientInfoStr())); + // 清除用户登录信息 + this.loginSessionManager.clearOf(loginUserInfoVO); + UserLogoutEvent userLogoutEvent = new UserLogoutEvent(this, loginUserInfoVO); + this.applicationContext.publishEvent(userLogoutEvent); + } + } + + /** + * 处理项目设备登出连带其他设备登出逻辑 + * @param event + */ + @EventListener + public void handleProjectImLogout(ProjectDeviceLogoutEvent event) { + ProjectDeviceVO projectDeviceVO = event.getProjectDeviceVO(); + List loginUserInfoVOS = this.loginSessionManager.queryProjectDeviceLoginInfo(projectDeviceVO.getProject()); + if (!CollectionUtils.isEmpty(loginUserInfoVOS)) { + List logoutList = new ArrayList<>(); + switch (projectDeviceVO.getType()) { + case IM: + logoutList.addAll(loginUserInfoVOS); + break; + case CW: + case LW:{ + for (LoginUserInfoVO infoVO : loginUserInfoVOS) { + ProjectDeviceVO deviceVO = infoVO.getDeviceVO(); + RelationLoginConfigVO configVO = deviceVO.buildRelationLoginConfig(); + if (Objects.nonNull(configVO) && Objects.nonNull(configVO.getDeviceCode())) { + if (Objects.equals(projectDeviceVO.getCode(), configVO.getDeviceCode())) { + logoutList.add(infoVO); + } + } + } + break; + } + } + for (LoginUserInfoVO loginUserInfoVO : logoutList) { + this.logout(loginUserInfoVO); + } + } + } + + @Override + public LoginStatusVO checkStatus(String sessionId) { + LoginStatusVO loginStatusVO = this.getLoginStatus(sessionId); + if (loginStatusVO.isProjectDeviceLogin()) { + this.checkAndHandleSpecialDeviceLogin(loginStatusVO); + } + loginStatusVO.checkExpireAndUpdate(); + if (loginStatusVO.isComplete()) { + // 完成,删除 + this.loginSessionManager.removeLoginStatus(loginStatusVO); + return LoginStatusVO.builder() + .status(loginStatusVO.getStatus()) + .token(loginStatusVO.getToken()) + .build(); + } else { + return LoginStatusVO.builder() + .status(loginStatusVO.getStatus()) + .build(); + } + } + + @Scheduled(fixedRate = 5000) + public void loginStatusClean() { + List loginStatusList = this.loginSessionManager.queryAllLoginStatus(); + List removeList = new ArrayList<>(); + for (LoginStatusVO loginStatusVO : loginStatusList) { + int deleteRemain = loginStatusVO.updateDeleteRemain(5000); + if (deleteRemain > 10000) { + removeList.add(loginStatusVO); + } + } + for (LoginStatusVO loginStatusVO : removeList) { + this.loginSessionManager.removeLoginStatus(loginStatusVO); + } + } + + private void checkAndHandleSpecialDeviceLogin(LoginStatusVO loginStatusVO) { + ProjectDeviceVO deviceVO = loginStatusVO.getDeviceVO(); + LoginUserInfoVO loginUserInfoVO = null; + switch (deviceVO.getType()) { + case LSW: + case VR_PSD: + case ISCS_LW: + case ISCS_CW: + case CCTV: + case SANDBOX: + case ILW: + case VR_IBP:{ + RelationLoginConfigVO config = deviceVO.buildRelationLoginConfig(); + if (Objects.nonNull(config) && Objects.nonNull(config.getDeviceCode())) { + loginUserInfoVO = this.loginSessionManager.queryLoginInfoOfDevice(config.getDeviceCode()); + } + break; + } + } + if (Objects.nonNull(loginUserInfoVO)) { + // 关联的设备已经登录,此设备登录 + UserVO userVO = loginUserInfoVO.getUserVO(); + LoginUserInfoVO userInfoVO = new LoginUserInfoVO(userVO, loginStatusVO.getClient(), deviceVO.getProject(), deviceVO); + userInfoVO.setGroup(loginUserInfoVO.getGroup()); + this.loginSessionManager.addLoginUserInfo(userInfoVO); + loginStatusVO.success(userInfoVO.getToken()); + } + } + + @Override + public LoginUserInfoVO getLoginUserInfoByToken(String token) { + return this.loginSessionManager.getLoginInfoByToken(token); + } + + /** + * 根据sessionId获取登陆状态信息 + * + * @param sessionId + * @return + */ + private LoginStatusVO getLoginStatus(String sessionId) { + LoginStatusVO loginStatusVo = this.loginSessionManager.queryLoginStatusBySessionId(sessionId); + if(Objects.isNull(loginStatusVo)) { + throw new SysBizException(ExceptionMapping.CLIENT_LOGIN_INVALID); + } + return loginStatusVo; + } + + @Getter + @Setter + private static class LoginScanParam { + private static final String Splitter = "_"; + private String envId; + private String sessionId; + private String clientId; + + public LoginScanParam(String envId, String sessionId, String clientId) { + this.envId = envId; + this.sessionId = sessionId; + this.clientId = clientId; + } + + public LoginScanParam(String sessionId, String clientId) { + this.sessionId = sessionId; + this.clientId = clientId; + } + + public static LoginScanParam parse(String state) { + log.info("扫码login参数:" + state); + if(StringUtils.isEmpty(state)) { + throw new BusinessException(ExceptionMapping.ARGUMENT_ILLEGAL); + } else { + String[] split = state.split(Splitter); + if(split.length != 2) { + log.error(String.format("扫码登陆参数[%s]", state)); + throw new BusinessException(ExceptionMapping.ARGUMENT_ILLEGAL); + } else { + return new LoginScanParam(split[0], split[1]); + } + } + } + + public String toParam() { + if(Objects.isNull(this.envId)) { + return this.sessionId+Splitter+this.clientId; + } + return this.envId+Splitter+this.sessionId+Splitter+this.clientId; + } + } +} diff --git a/src/main/java/club/joylink/rtss/services/CommandService.java b/src/main/java/club/joylink/rtss/services/CommandService.java new file mode 100644 index 000000000..39e22b6ab --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/CommandService.java @@ -0,0 +1,173 @@ +package club.joylink.rtss.services; + +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import com.google.common.collect.Lists; +import club.joylink.rtss.dao.CommandDefinitionDAO; +import club.joylink.rtss.entity.CommandDefinition; +import club.joylink.rtss.entity.CommandDefinitionExample; +import club.joylink.rtss.exception.BusinessExceptionAssertEnum; +import club.joylink.rtss.vo.client.CommandCopyVO; +import club.joylink.rtss.vo.client.CommandDefinitionQueryVO; +import club.joylink.rtss.vo.client.CommandDefinitionVO; +import club.joylink.rtss.vo.client.PageVO; +import org.springframework.util.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.util.List; +import java.util.Objects; + +@Service +public class CommandService implements ICommandService { + + @Autowired + private CommandDefinitionDAO commandDefinitionDAO; + + /** + * 增加指令定义及参数 + * + * @param definitionVO + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void addDefinition(CommandDefinitionVO definitionVO) { + + //指令入库 + CommandDefinition commandDefinition = definitionVO.convert2DB(); + commandDefinitionDAO.insert(commandDefinition); + } + + /** + * 分页查询指令定义,条件:线路code/操作对象, + * + * @param queryVO + * @return + */ + @Override + public PageVO queryPagedDefinitions(String lineCode, CommandDefinitionQueryVO queryVO) { + + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + CommandDefinitionExample commandDefinitionExample = new CommandDefinitionExample(); + CommandDefinitionExample.Criteria criteria = commandDefinitionExample.createCriteria(); + //条件:线路 + if (StringUtils.isNotEmpty(lineCode)) { + criteria.andLineCodeEqualTo(lineCode); + } + //条件:操作对象 + if (StringUtils.isNotEmpty(queryVO.getOperateObject())) { + criteria.andOperateObjectEqualTo(queryVO.getOperateObject()); + + } + //查指令 + Page page = (Page) commandDefinitionDAO.selectByExample(commandDefinitionExample); + List commandDefinitions = page.getResult(); + if (CollectionUtils.isEmpty(commandDefinitions)) { + return PageVO.convert(page, Lists.newArrayList()); + } + return PageVO.convert(page, CommandDefinitionVO.convert2VOList(commandDefinitions)); + } + + @Override + public List queryDefinitionsByLineCode(String lineCode) { + return this.queryDefinitions(lineCode, null, null); + } + + /** + * 根据线路查询指令定义,可根据仿真角色过滤 + * + * @param lineCode + * @param simulationRole + * @return + */ + @Override + public List queryDefinitions(String lineCode, String prdType, String simulationRole) { + + //条件:线路 + CommandDefinitionExample commandDefinitionExample = new CommandDefinitionExample(); + if (StringUtils.isNotEmpty(lineCode)) { + CommandDefinitionExample.Criteria criteria = commandDefinitionExample.createCriteria(); + criteria.andLineCodeEqualTo(lineCode); + if (StringUtils.isNotEmpty(simulationRole)) { + //+操作对象过滤 + criteria.andSimulationRoleEqualTo(simulationRole); + } + if (StringUtils.isNotEmpty(prdType)) { + criteria.andPrdTypeEqualTo(prdType); + } + + } + //查指令 + List commandDefinitions = commandDefinitionDAO.selectByExample(commandDefinitionExample); + + return CommandDefinitionVO.convert2VOList(commandDefinitions); + } + + /** + * 根据id查询当前指令定义 + * + * @param id + * @return + */ + @Override + public CommandDefinitionVO queryDefinitionById(Long id) { + //查指令 + CommandDefinition commandDefinition = commandDefinitionDAO.selectByPrimaryKey(id); + if (Objects.isNull(commandDefinition)) return null; + return new CommandDefinitionVO(commandDefinition); + + } + + /** + * 更新指令定义并重置参数 + * + * @param definitionVO + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void updateDefinition(CommandDefinitionVO definitionVO) { + //更新指令 + commandDefinitionDAO.updateByPrimaryKey(definitionVO.convert2DB()); + } + + /** + * 根据id删除指令定义 + * + * @param id + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void deleteDefinition(Long id) { + //删除指令 + commandDefinitionDAO.deleteByPrimaryKey(id); + + } + + @Override + @Transactional + public void copy(CommandCopyVO copyVO) { + //查询要复制的指令 + CommandDefinitionExample example = new CommandDefinitionExample(); + CommandDefinitionExample.Criteria criteria = example.createCriteria().andLineCodeEqualTo(copyVO.getFromLineCode()); + if (!CollectionUtils.isEmpty(copyVO.getOperateObjects())) { + criteria.andOperateObjectIn(copyVO.getOperateObjects()); + } + List commandDefinitions = commandDefinitionDAO.selectByExample(example); + BusinessExceptionAssertEnum.INVALID_OPERATION.assertTrue(!CollectionUtils.isEmpty(commandDefinitions), "源线路指令集为空"); + //删除目标线路的旧指令 + example = new CommandDefinitionExample(); + criteria = example.createCriteria().andLineCodeIn(copyVO.getTargetLineCodes()); + if (!CollectionUtils.isEmpty(copyVO.getOperateObjects())) { + criteria.andOperateObjectIn(copyVO.getOperateObjects()); + } + commandDefinitionDAO.deleteByExample(example); + //插入新的指令 + commandDefinitions.forEach(commandDefinition -> commandDefinition.setId(null)); + copyVO.getTargetLineCodes().forEach(lineCode->{ + commandDefinitions.forEach(commandDefinition -> commandDefinition.setLineCode(lineCode)); + commandDefinitionDAO.batchInsertWithId(commandDefinitions); + }); + } +} diff --git a/src/main/java/club/joylink/rtss/services/CompanyService.java b/src/main/java/club/joylink/rtss/services/CompanyService.java new file mode 100644 index 000000000..cab087d0c --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/CompanyService.java @@ -0,0 +1,89 @@ +package club.joylink.rtss.services; + +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import com.joylink.base.exception.DBException; +import com.joylink.base.exception.constant.ExceptionMapping; +import club.joylink.rtss.dao.CompanyDAO; +import club.joylink.rtss.entity.Company; +import club.joylink.rtss.entity.CompanyExample; +import club.joylink.rtss.services.completition.IRaceQuestionsRuleService; +import club.joylink.rtss.vo.client.CompanyQueryVO; +import club.joylink.rtss.vo.client.CompanyVO; +import club.joylink.rtss.vo.client.PageVO; +import org.springframework.util.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +@Service +public class CompanyService implements ICompanyService { + + @Autowired + private CompanyDAO companyDAO; + @Autowired + private IRaceQuestionsRuleService IRaceQuestionsRuleService; + + @Override + public List queryOrganizations() { + CompanyExample example = new CompanyExample(); + List list = this.companyDAO.selectByExample(example); + return CompanyVO.convert2VOList(list); + } + + + @Override + public PageVO queryPageOrganizations(CompanyQueryVO queryVO) { + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + CompanyExample example = new CompanyExample(); + CompanyExample.Criteria criteria = example.createCriteria(); + if(StringUtils.hasText(queryVO.getName())){ + criteria.andNameLike(String.format("%%%s%%", queryVO.getName())); + } + Page page = (Page) companyDAO.selectByExample(example); + return PageVO.convert(page, CompanyVO.convert2VOList(page.getResult())); + } + + @Override + public CompanyVO create(CompanyVO companyVO) { + Company entity = companyVO.toDB(); + this.companyDAO.insert(entity); + return new CompanyVO(entity); + } + + @Override + public CompanyVO update(Integer id, CompanyVO companyVO) { + Company entity = companyVO.toDB(); + entity.setId(id); + this.companyDAO.updateByPrimaryKeySelective(entity); + return new CompanyVO(entity); + } + + @Transactional + @Override + public void deleteById(Integer companyId) { + + companyDAO.deleteByPrimaryKey(companyId); + IRaceQuestionsRuleService.deleteByCompanyId(companyId); + } + + @Override + public CompanyVO getById(Integer companyId) { + Company entity = companyDAO.selectByPrimaryKey(companyId); + if (entity == null) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST, String.format("id为[%s]的公司不存在", companyId)); + } + return new CompanyVO(entity); + } + + @Override + public boolean isExist(Integer companyId) { + if (companyDAO.selectByPrimaryKey(companyId) == null) { + return false; + } + return true; + } + +} diff --git a/src/main/java/club/joylink/rtss/services/DailyRunPlanService.java b/src/main/java/club/joylink/rtss/services/DailyRunPlanService.java new file mode 100644 index 000000000..1bd804e6c --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/DailyRunPlanService.java @@ -0,0 +1,252 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.exception.BusinessExceptionAssertEnum; +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import club.joylink.rtss.services.cache.ICacheService; +import club.joylink.rtss.constants.BusinessConsts; +import club.joylink.rtss.dao.RunPlanDailyDAO; +import club.joylink.rtss.entity.RunPlanDaily; +import club.joylink.rtss.entity.RunPlanDailyExample; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.runplan.RunPlanEChartsDataVO; +import club.joylink.rtss.vo.client.runplan.RunPlanLoadVO; +import club.joylink.rtss.vo.client.runplan.RunPlanQueryVO; +import club.joylink.rtss.vo.client.runplan.RunPlanVO; +import org.springframework.util.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.List; +import java.util.Objects; + +@Service +public class DailyRunPlanService implements IDailyRunPlanService { + + @Autowired + private RunPlanDailyDAO runPlanDailyDAO; + + @Autowired + private ILoadPlanService iLoadPlanService; + + @Autowired + private IRunPlanTemplateService iRunPlanTemplateService; + + @Autowired + private ICacheService iCacheService; + + @Override + public RunPlanVO findCommonRunPlan(Long mapId, LocalDate date) { + Objects.requireNonNull(mapId); + Objects.requireNonNull(date); + RunPlanDailyExample example = new RunPlanDailyExample(); + example.createCriteria() + .andCreatorIdIsNull() + .andMapIdEqualTo(mapId) + .andRunDateEqualTo(date); + List runPlanDailyList = this.runPlanDailyDAO.selectByExampleWithBLOBs(example); + RunPlanVO planVO = null; + if(!CollectionUtils.isEmpty(runPlanDailyList)) { + RunPlanDaily runPlanDaily = runPlanDailyList.get(0); + planVO = new RunPlanVO(runPlanDaily); + if(!runPlanDaily.getModified()) { + RunPlanVO template = this.iRunPlanTemplateService.getRunPlan(runPlanDaily.getTemplateId()); + planVO.setTripList(template.getTripList()); + } + } + return planVO; + } + + @Override + public RunPlanVO findUserRunPlan(Long userId, Long mapId, LocalDate date) { + Objects.requireNonNull(userId); + Objects.requireNonNull(mapId); + Objects.requireNonNull(date); + RunPlanDailyExample example = new RunPlanDailyExample(); + example.createCriteria() + .andCreatorIdEqualTo(userId) + .andMapIdEqualTo(mapId) + .andRunDateEqualTo(date); + List runPlanDailyList = this.runPlanDailyDAO.selectByExampleWithBLOBs(example); + RunPlanVO planVO = null; + if(!CollectionUtils.isEmpty(runPlanDailyList)) { + RunPlanDaily runPlanDaily = runPlanDailyList.get(0); + planVO = new RunPlanVO(runPlanDaily); + if(!runPlanDaily.getModified()) { + RunPlanVO template = this.iRunPlanTemplateService.getRunPlan(runPlanDaily.getTemplateId()); + planVO.setTripList(template.getTripList()); + } + } + return planVO; + } + + @Override + public RunPlanVO createUserRunPlanFromLoadPlan(Long userId, Long mapId, LocalDate date) { + // 获取加载计划 + RunPlanLoadVO loadPlan = this.iLoadPlanService.getUserLoadPlan(userId, mapId, date); + Long templatePlanId = loadPlan.getTemplatePlanId(); + // 查询模板运行图 + RunPlanVO templatePlan = this.iRunPlanTemplateService.getRunPlan(templatePlanId); + return this.createDailyRunPlan(templatePlan, loadPlan.getMapId(), date, userId); + } + + @Override + @Transactional + public RunPlanVO createDailyRunPlan(RunPlanVO template, Long mapId, LocalDate date, Long userId) { + Objects.requireNonNull(template); + Objects.requireNonNull(template.getId()); + Objects.requireNonNull(mapId); + Objects.requireNonNull(date); + RunPlanDaily dailyRunPlan = new RunPlanDaily(); + dailyRunPlan.setName(template.getName()); + dailyRunPlan.setMapId(mapId); + dailyRunPlan.setTemplateId(template.getId()); + dailyRunPlan.setCreatorId(userId); + dailyRunPlan.setRunDate(date); + dailyRunPlan.setCreateTime(LocalDateTime.now()); + dailyRunPlan.setModified(false); + this.runPlanDailyDAO.insert(dailyRunPlan); + RunPlanVO planVO = new RunPlanVO(dailyRunPlan); + planVO.setTripList(template.getTripList()); + return planVO; + } + + @Override + public RunPlanVO createCommonDailyRunPlan(RunPlanVO plan, Long mapId, LocalDate date) { + // 先删除旧的通用当日运行图 + RunPlanDailyExample example = new RunPlanDailyExample(); + example.createCriteria() + .andCreatorIdIsNull() + .andMapIdEqualTo(mapId) + .andRunDateEqualTo(date); + this.runPlanDailyDAO.deleteByExample(example); + // 再创建新的当日运行图 + return this.createDailyRunPlan(plan, mapId, date, null); + } + + @Override + public RunPlanVO getRunPlan(Long mapId, Long userId) { + Objects.requireNonNull(mapId); + Objects.requireNonNull(userId); + // 先查缓存 + RunPlanVO planVO = (RunPlanVO) this.iCacheService.get(BusinessConsts.CachePrefix.Plan + mapId + userId); + if(Objects.isNull(planVO)) { + // 查找用户运行图 + planVO = this.findUserRunPlan(userId, mapId, this.getRunPlanDate()); + if(Objects.nonNull(planVO)) { + this.iCacheService.put(BusinessConsts.CachePrefix.Plan + mapId + userId, planVO); + } else { + // 用户运行图不存在,查找通用运行图 + planVO = this.getRunPlan(mapId); + } + } + return planVO; + } + + @Override + public RunPlanVO getRunPlan(Long mapId) { + Objects.requireNonNull(mapId); + RunPlanVO planVO = (RunPlanVO) this.iCacheService.get(BusinessConsts.CachePrefix.Plan + mapId); + if(Objects.isNull(planVO)) { + RunPlanDailyExample example = new RunPlanDailyExample(); + example.createCriteria() + .andMapIdEqualTo(mapId) + .andRunDateEqualTo(this.getRunPlanDate()) + .andCreatorIdIsNull(); + List planList = this.runPlanDailyDAO.selectByExampleWithBLOBs(example); + if(!CollectionUtils.isEmpty(planList)) { + RunPlanDaily daily = planList.get(0); + if(!daily.getModified()) { + planVO = new RunPlanVO(daily); + RunPlanVO template = this.iRunPlanTemplateService.getRunPlan(daily.getTemplateId()); + planVO.setTripList(template.getTripList()); + } else { + planVO = new RunPlanVO(daily); + } + this.iCacheService.put(BusinessConsts.CachePrefix.Plan + mapId, planVO); + } + } + BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertNotNull(planVO,"运行图数据不存在"); + return planVO; + } + + @Override + public PageVO queryPagedRunPlan(RunPlanQueryVO queryVO) { + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + RunPlanDailyExample example = new RunPlanDailyExample(); + example.setOrderByClause(" create_time DESC "); + RunPlanDailyExample.Criteria criteria = example.createCriteria(); + if(Objects.nonNull(queryVO.getMapId())) { + criteria.andMapIdEqualTo(queryVO.getMapId()); + } + if(StringUtils.hasText(queryVO.getName())) { + criteria.andNameLike(String.format("%%%s%%", queryVO.getName())); + } + Page runPlans = (Page) this.runPlanDailyDAO.selectByExample(example); + List runPlanVOList = RunPlanVO.convertDaily2VOList(runPlans.getResult()); + return PageVO.convert(runPlans, runPlanVOList); + } + + @Override + public void deletePlan(UserVO user, Long planId) { + this.runPlanDailyDAO.deleteByPrimaryKey(planId); + } + + @Override + public RunPlanEChartsDataVO selectDiagramData(Long planId) { + RunPlanVO planVO = this.getRunPlanById(planId); + return new RunPlanEChartsDataVO(planVO.getTripList()); + } + + @Override + public RunPlanVO findRunPlanById(Long id) { + Objects.requireNonNull(id); + RunPlanDaily daily = this.runPlanDailyDAO.selectByPrimaryKey(id); + RunPlanVO planVO = new RunPlanVO(daily); + if(!daily.getModified()) { + RunPlanVO template = this.iRunPlanTemplateService.getRunPlan(daily.getTemplateId()); + planVO.setTripList(template.getTripList()); + } + return planVO; + } + + @Override + public RunPlanVO getRunPlanById(Long id) { + RunPlanVO planVO = this.findRunPlanById(id); + BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertNotNull(planVO, String.format("id[%s]的每日运行图不存在", id)); + return planVO; + } + + @Override + public boolean isUserRunPlanOfDayExist(Long userId, Long mapId, Long templatePlanId, LocalDate day) { + RunPlanDailyExample example = new RunPlanDailyExample(); + example.createCriteria() + .andMapIdEqualTo(mapId) + .andTemplateIdEqualTo(templatePlanId) + .andCreatorIdEqualTo(userId) + .andRunDateEqualTo(day); + if (this.runPlanDailyDAO.countByExample(example) > 0) { + return true; + } + return false; + } + + @Override + public boolean isCommonRunPlanExist(Long mapId, Long templatePlanId, LocalDate day) { + RunPlanDailyExample example = new RunPlanDailyExample(); + example.createCriteria() + .andMapIdEqualTo(mapId) + .andTemplateIdEqualTo(templatePlanId) + .andCreatorIdIsNull() + .andRunDateEqualTo(day); + if (this.runPlanDailyDAO.countByExample(example) > 0) { + return true; + } + return false; + } +} diff --git a/src/main/java/club/joylink/rtss/services/DraftMapRunPlanService.java b/src/main/java/club/joylink/rtss/services/DraftMapRunPlanService.java new file mode 100644 index 000000000..113171f22 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/DraftMapRunPlanService.java @@ -0,0 +1,141 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.dao.DraftMapDAO; +import club.joylink.rtss.dao.DraftMapRunPlanDAO; +import club.joylink.rtss.entity.DraftMapRunPlan; +import club.joylink.rtss.entity.DraftMapRunPlanExample; +import club.joylink.rtss.simulation.GroupSimulationManager; +import club.joylink.rtss.simulation.SimulationConstructData; +import club.joylink.rtss.simulation.constant.SimulationType; +import club.joylink.rtss.simulation.util.SimulationIdGenerator; +import club.joylink.rtss.util.JsonUtils; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.map.MapDataVO; +import club.joylink.rtss.vo.client.map.MapStationVO; +import club.joylink.rtss.vo.client.map.newmap.MapStationNewVO; +import club.joylink.rtss.vo.client.runplan.RunPlanEChartsDataVO; +import club.joylink.rtss.vo.client.runplan.RunPlanTripVO; +import club.joylink.rtss.vo.client.runplan.RunPlanVO; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.time.LocalDateTime; +import java.util.Comparator; +import java.util.List; + +@Service +@Slf4j +public class DraftMapRunPlanService implements IDraftMapRunPlanService { + @Autowired + private IRunPlanTemplateService iRunPlanTemplateService; + + @Autowired + private DraftMapRunPlanDAO draftMapRunPlanDAO; + + @Autowired + private DraftMapDAO draftMapDAO; + + @Autowired + private IDraftMapService iDraftMapService; + + @Autowired + private GroupSimulationManager groupSimulationManager; + + /** + * 从正式发布地图的运行图中导入到用户自己玩的运行图 + * @param templateId + * @param name + */ + @Override + @Transactional + public void createFrom(Long templateId, String name, Long draftMapId) { + RunPlanVO runPlanVO = iRunPlanTemplateService.getRunPlan(templateId); + DraftMapRunPlan draftMapRunPlan = new DraftMapRunPlan(); + draftMapRunPlan.setCreateTime(LocalDateTime.now()); + draftMapRunPlan.setMapId(draftMapId); + draftMapRunPlan.setName(name); + draftMapRunPlan.setTrips(JsonUtils.writeValueAsString(runPlanVO.getTripList())); + draftMapRunPlanDAO.insert(draftMapRunPlan); + } + + /** + * 根据草稿地图id查询草稿地图运行图 + * @param draftMapId + * @return + */ + @Override + public List findByDraftMapId(Long draftMapId) { + DraftMapRunPlanExample example = new DraftMapRunPlanExample(); + example.createCriteria().andMapIdEqualTo(draftMapId); + return draftMapRunPlanDAO.selectByExample(example); + } + + /** + * 根据草稿运行图id查询数据绘制运行图 + * @param planId + * @return + */ + @Override + public RunPlanEChartsDataVO selectDiagramData(Long planId) { + DraftMapRunPlan draftMapRunPlan = draftMapRunPlanDAO.selectByPrimaryKey(planId); + //运行列车集合 + List tripList = JsonUtils.read(draftMapRunPlan.getTrips(), JsonUtils.getCollectionType(List.class, RunPlanTripVO.class)); + return new RunPlanEChartsDataVO(tripList); + } + + /** + * 运行图仿真测试 + * @param planId + * @param userVO + * @return + */ + @Override + public String simulationCheck(Long planId, UserVO userVO) { + RunPlanVO runPlanVO = getRunPlanById(planId); + MapDataVO mapData = iDraftMapService.getMapData(runPlanVO.getMapId()); + SimulationConstructData constructData = new SimulationConstructData(userVO, SimulationType.RunPlan, + null, mapData, null, runPlanVO, null); + String group = SimulationIdGenerator.generateGroup(userVO.getId()); + groupSimulationManager.prepareSimulation(group, constructData); + // 生成通用的测试用派班计划 + groupSimulationManager.generateCommonSchedulingPlan(group); + return group; + } + + /** + * 根据运行计划id查询RunPlanVO + * @param planId + * @return + */ + private RunPlanVO getRunPlanById(Long planId){ + DraftMapRunPlan draftMapRunPlan = draftMapRunPlanDAO.selectByPrimaryKey(planId); + RunPlanVO runPlanVO = new RunPlanVO(); + runPlanVO.setTripList(JsonUtils.read(draftMapRunPlan.getTrips(), JsonUtils.getCollectionType(List.class, RunPlanTripVO.class))); + runPlanVO.setName(draftMapRunPlan.getName()); + runPlanVO.setId(draftMapRunPlan.getId()); + runPlanVO.setCreateTime(draftMapRunPlan.getCreateTime()); + runPlanVO.setMapId(draftMapRunPlan.getMapId()); + return runPlanVO; + } + + /** + * 根据草稿地图id查询车站 + * @param draftMapId + * @return + */ + @Override + public List selectMapStation(Long draftMapId) { + MapDataVO mapDataVO = iDraftMapService.getMapData(draftMapId); + if(mapDataVO.isDrawWay()){ + + List stationNewList = mapDataVO.getShapeDataNew().getStationList(); + stationNewList.sort(Comparator.comparing(MapStationNewVO::getKmRange)); + return stationNewList; + } + List stationList = mapDataVO.getShapeData().getStationList(); + stationList.sort(Comparator.comparing(MapStationVO::getKmRange)); + return stationList; + } +} diff --git a/src/main/java/club/joylink/rtss/services/DraftMapService.java b/src/main/java/club/joylink/rtss/services/DraftMapService.java new file mode 100644 index 000000000..4b2f11733 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/DraftMapService.java @@ -0,0 +1,2095 @@ +package club.joylink.rtss.services; + +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import com.joylink.base.exception.BusinessException; +import com.joylink.base.exception.DBException; +import com.joylink.base.exception.constant.ExceptionMapping; +import club.joylink.rtss.simulation.cbtc.build.SimulationBuilder; +import club.joylink.rtss.simulation.cbtc.data.CalculateService; +import club.joylink.rtss.simulation.cbtc.data.map.Section; +import club.joylink.rtss.constants.BusinessConsts; +import club.joylink.rtss.dao.*; +import club.joylink.rtss.entity.*; +import club.joylink.rtss.exception.BusinessExceptionAssertEnum; +import club.joylink.rtss.services.draftData.DraftMapFlankProtectionService; +import club.joylink.rtss.services.draftData.DraftMapRunLevelService; +import club.joylink.rtss.util.ConvertUtil; +import club.joylink.rtss.util.JsonUtils; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageQueryVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.TreeNode; +import club.joylink.rtss.vo.client.map.*; +import club.joylink.rtss.vo.client.map.newmap.*; +import lombok.extern.slf4j.Slf4j; +import org.springframework.util.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; +import org.springframework.util.ObjectUtils; + +import java.time.LocalDateTime; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +@Slf4j +@Service +public class DraftMapService implements IDraftMapService { + + @Autowired + private DraftMapDAO draftMapDAO; + + @Autowired + private IRealLineService iRealLineService; + + @Autowired + private DraftMapRouteDAO draftMapRouteDAO; + + @Autowired + private DraftMapRouteFlankProtectionDAO draftMapRouteFlankProtectionDAO; + + @Autowired + private DraftMapSwitchCoupledDAO draftMapSwitchCoupledDAO; + + @Autowired + private DraftMapAutoSignalDAO draftMapAutoSignalDAO; + + @Autowired + private DraftMapRouteUnitDAO draftMapRouteUnitDAO; + + @Autowired + private DraftMapRoutingDAO draftMapRoutingDAO; + + @Autowired + private DraftMapRunLevelDAO draftMapRunLevelDAO; + + @Autowired + private DraftMapParkingTimeDAO draftMapParkingTimeDAO; + + @Autowired + private DraftMapSignalApproachSectionDAO draftMapSignalApproachSectionDAO; + + @Autowired + private DraftMapOverlapDAO draftMapOverlapDAO; + + @Autowired + private DraftMapAutoReentryDAO draftMapAutoReentryDAO; + + @Autowired + private DraftMap3dDataDAO draftMap3dDataDAO; + + @Autowired + private IMapService iMapService; + + @Autowired + private DraftMapRunLevelService draftMapRunLevelService; + + @Autowired + private DraftMapFlankProtectionService draftMapFlankProtectionService; + + @Autowired + private IDraftMapService iDraftMapService; + + @Override + public List list(UserVO userVO) { + DraftMapExample example = new DraftMapExample(); + if (Objects.nonNull(userVO)) { + example.createCriteria().andAuthorIdEqualTo(userVO.getId()); + } + List list = draftMapDAO.selectByExample(example); + return DraftMapVO.convertDraft2VO(list); + } + + @Override + public List list(Boolean drawWay, UserVO userVO) { + DraftMapExample example = new DraftMapExample(); + DraftMapExample.Criteria criteria = example.createCriteria(); + if (Objects.nonNull(userVO)) { + criteria.andAuthorIdEqualTo(userVO.getId()); + } + if (Objects.nonNull(drawWay)) { + criteria.andDrawWayEqualTo(drawWay); + } + List list = draftMapDAO.selectByExample(example); + return DraftMapVO.convertDraft2VO(list); + } + + /** + * 根据草稿地图id查询数据 + * + * @param draftMapId + * @return + */ + @Override + public DraftMapVO findById(Long draftMapId) { + DraftMap draftMap = draftMapDAO.selectByPrimaryKey(draftMapId); + DraftMapVO draftMapVO = new DraftMapVO(draftMap); + return draftMapVO; + } + + @Override + public List tree(UserVO user) { + List nodeList = new ArrayList<>(); + // TODO confirm delete +// List skinVOList = iRealLineService.queryList(null); +// skinVOList.forEach(skinVO -> { +// TreeNode skinNode = ConvertUtil.buildTree(skinVO); +// DraftMapExample example = new DraftMapExample(); +// example.createCriteria().andSkinCodeEqualTo(skinVO.getCode()).andAuthorIdEqualTo(user.getId()); +// List draftMapList = draftMapDAO.selectByExample(example); +// draftMapList.forEach(mpDraftMap -> { +// TreeNode mapNode = new TreeNode(); +// mapNode.setType(ConvertUtil.TreeNodeType.Map); +// mapNode.setName(mpDraftMap.getName()); +// mapNode.setId(ConvertUtil.long2Str(mpDraftMap.getId())); +// skinNode.addChild(mapNode); +// }); +// nodeList.add(skinNode); +// }); + return nodeList; + } + + @Override + @Transactional + public String create(DraftMapVO draftMapVo, UserVO userVO) { + DraftMapWithBLOBs draftMap = draftMapVo.convert2Draft(); + draftMap.setAuthorId(userVO.getId()); + // 名称唯一性校验 + if (checkDraftMapNameExist(draftMap)) { + throw new DBException(ExceptionMapping.NAME_REPEAT); + } + draftMap.setUpdateTime(LocalDateTime.now()); + if (draftMap.getDrawWay()) { + MapGraphDataNewVO graphDataVO = new MapGraphDataNewVO(); + graphDataVO.setSkinVO(iRealLineService.get(draftMapVo.getLineCode())); + draftMap.setGraphData(JsonUtils.writeValueAsString(graphDataVO)); + } else { + MapGraphDataVO graphDataVO = new MapGraphDataVO(); + graphDataVO.setSkinVO(iRealLineService.get(draftMapVo.getLineCode())); + draftMap.setGraphData(JsonUtils.writeValueAsString(graphDataVO)); + } + draftMapDAO.insert(draftMap); + return ConvertUtil.long2Str(draftMap.getId()); + } + + @Override + public void update(Long id, DraftMapVO draftMapVO, UserVO userVO) { + draftMapVO.setId(id); + DraftMapWithBLOBs draftMap = draftMapDAO.selectByPrimaryKey(id); + if (ObjectUtils.isEmpty(draftMap)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + DraftMapWithBLOBs upMap = draftMapVO.convert2Draft(); + upMap.setAuthorId(userVO.getId()); + upMap.setUpdateTime(LocalDateTime.now()); + // 名称唯一性校验 + if (checkDraftMapNameExist(upMap)) { + throw new DBException(ExceptionMapping.NAME_REPEAT); + } + //更改线路的话重置皮肤数据 + String changedLineCode = draftMapVO.getLineCode();//传递的线路code + if (StringUtils.hasText(changedLineCode) && !Objects.equals(draftMap.getLineCode(), changedLineCode)) { + + if (draftMap.getDrawWay()) { + MapGraphDataNewVO graphDataVO = JsonUtils.read(draftMap.getGraphData(), MapGraphDataNewVO.class); + graphDataVO.setSkinVO(iRealLineService.get(changedLineCode)); + upMap.setGraphData(JsonUtils.writeValueAsString(graphDataVO)); + } else { + MapGraphDataVO graphDataVO = JsonUtils.read(draftMap.getGraphData(), MapGraphDataVO.class); + graphDataVO.setSkinVO(iRealLineService.get(changedLineCode)); + upMap.setGraphData(JsonUtils.writeValueAsString(graphDataVO)); + } + } + draftMapDAO.updateByPrimaryKeySelective(upMap); + } + + @Override + @Transactional + public String saveAs(Long id, String name) { + DraftMapWithBLOBs draftMap = draftMapDAO.selectByPrimaryKey(id); + draftMap.setId(null); + draftMap.setName(name); + draftMap.setUpdateTime(LocalDateTime.now()); + // 名称唯一性校验 + if (checkDraftMapNameExist(draftMap)) { + throw new DBException(ExceptionMapping.NAME_REPEAT); + } + // 插入新副本 + draftMapDAO.insert(draftMap); + if (draftMap.getDrawWay()) { + + saveMapLogicDataNew(draftMap.getId(), getMapLogicDataNew(id)); + } else { + + saveMapLogicData(draftMap.getId(), getMapLogicData(id)); + } + // 3d数据处理 + Map3dDataVO map3dDataVO = find3dMapDataByMapId(id); + if (Objects.nonNull(map3dDataVO)) { + map3dDataVO.setId(null); + map3dDataVO.setMapId(draftMap.getId()); + DraftMap3dDataWithBLOBs draftMap3dDataWithBLOBs = map3dDataVO.convert2Draft(); + draftMap3dDataWithBLOBs.setCreatorId(draftMap.getAuthorId()); + draftMap3dDataWithBLOBs.setCreateTime(LocalDateTime.now()); + draftMap3dDataDAO.insert(draftMap3dDataWithBLOBs); + } + return String.valueOf(draftMap.getId()); + } + + @Override + public Object getMapShapeData(Long id) { + DraftMapWithBLOBs draftMap = draftMapDAO.selectByPrimaryKey(id); + String shapeData = draftMap.getGraphData(); + if (draftMap.getDrawWay()) { + MapGraphDataNewVO mapGraphDataNewVO; + if (StringUtils.isBlank(shapeData)) { + mapGraphDataNewVO = new MapGraphDataNewVO(); + } else { + mapGraphDataNewVO = JsonUtils.read(shapeData, MapGraphDataNewVO.class); + } + return mapGraphDataNewVO; + } + MapGraphDataVO mapGraphDataVO; + if (StringUtils.isBlank(shapeData)) { + mapGraphDataVO = new MapGraphDataVO(); + } else { + mapGraphDataVO = JsonUtils.read(shapeData, MapGraphDataVO.class); + } + return mapGraphDataVO; + + } + + @Override + public void saveMapElsDetail(Long id, String shapeData) { + DraftMapWithBLOBs draftMap = draftMapDAO.selectByPrimaryKey(id); + if (draftMap.getDrawWay()) { + MapGraphDataNewVO graphDataNewVO = JsonUtils.read(shapeData, MapGraphDataNewVO.class); + this.handleSectionData(graphDataNewVO); +// this.handlePowerLineData(graphDataNewVO); + draftMap.setGraphData(JsonUtils.writeValueAsString(graphDataNewVO)); + } else { + MapGraphDataVO graphDataVO = JsonUtils.read(shapeData, MapGraphDataVO.class); + draftMap.setGraphData(JsonUtils.writeValueAsString(graphDataVO)); + } + draftMapDAO.updateByPrimaryKeyWithBLOBs(draftMap); + } + + private void handlePowerLineData(MapGraphDataNewVO graphDataNewVO) { + List powerLineList = graphDataNewVO.getPowerLineList(); + for (MapPowerLineVO line : powerLineList) { + if (!CollectionUtils.isEmpty(line.getSectionUnitList())) { + List removeList = new ArrayList<>(); + for (MapPowerLineVO.SectionUnit sectionUnit : line.getSectionUnitList()) { + if (sectionUnit.isEmpty()) { + removeList.add(sectionUnit); + } + } + line.getSectionUnitList().removeAll(removeList); + } + } + } + + /** + * 处理道岔无用数据 + * + * @param graphDataNewVO + */ + private void handleSectionData(MapGraphDataNewVO graphDataNewVO) { + List sectionList = graphDataNewVO.getSectionList(); + for (MapSectionNewVO section : sectionList) { + if (Objects.equals(section.getType(), BusinessConsts.Section.SectionType.Type04) || + (!section.isReentryTrack() && !section.isTransferTrack())) { + section.setReentryTrack(false); + section.setReentryTrackName(null); + section.setReentryTrackNamePosition(null); + section.setDestinationCode(null); + section.setDestinationCodePoint(null); + } + if (Objects.equals(section.getType(), BusinessConsts.Section.SectionType.Type01) || + Objects.equals(section.getType(), BusinessConsts.Section.SectionType.Type04)) { + section.setParentCode(null); + } + } + } + + @Override + public void saveNewMapElsDetail(Long id, MapGraphDataNewVO shapeVO) { + DraftMapWithBLOBs draftMap = draftMapDAO.selectByPrimaryKey(id); + draftMap.setGraphData(JsonUtils.writeValueAsString(shapeVO)); + draftMapDAO.updateByPrimaryKeyWithBLOBs(draftMap); + } + + @Override + public MapVO export(Long id) { + DraftMapWithBLOBs draftMap = this.draftMapDAO.selectByPrimaryKey(id); + if (Objects.isNull(draftMap)) { + throw new BusinessException(ExceptionMapping.DATA_NOT_EXIST, + String.format("id为[%s]的草稿地图不存在", id)); + } + MapVO mapVO = new MapVO(draftMap); + MapDataVO mapDataVO; + if (draftMap.getDrawWay()) { + mapDataVO = new MapDataVO((MapGraphDataNewVO) this.buildShapeData(draftMap), this.getMapLogicDataNew(id)); + } else { + mapDataVO = new MapDataVO((MapGraphDataVO) this.buildShapeData(draftMap), this.getMapLogicData(id)); + } + mapDataVO.setMap3dDataVO(this.find3dMapDataByMapId(id)); + mapVO.setMapData(mapDataVO); + return mapVO; + } + + private Object buildShapeData(DraftMapWithBLOBs draftMap) { + String shapeData = draftMap.getGraphData(); + if (draftMap.getDrawWay()) { + MapGraphDataNewVO mapGraphDataNewVO; + if (StringUtils.isBlank(shapeData)) { + mapGraphDataNewVO = new MapGraphDataNewVO(); + } else { + mapGraphDataNewVO = JsonUtils.read(shapeData, MapGraphDataNewVO.class); + } + return mapGraphDataNewVO; + } + MapGraphDataVO mapGraphDataVO; + if (StringUtils.isBlank(shapeData)) { + mapGraphDataVO = new MapGraphDataVO(); + } else { + mapGraphDataVO = JsonUtils.read(shapeData, MapGraphDataVO.class); + } + return mapGraphDataVO; + } + + @Override + @Transactional + public void importFrom(MapVO mapVO, UserVO userVO) { + saveFrom(mapVO, mapVO.getName(), userVO); + } + + @Override + @Transactional + public void createFrom(Long id, String name, UserVO userVO) { + MapVO mapVO = iMapService.getMapDetail(id); + Map3dDataVO map3dData = this.iMapService.findMap3dDataByMapId(id); + mapVO.setMap3dData(map3dData); + saveFrom(mapVO, name, userVO); + } + + private void saveFrom(MapVO mapVO, String name, UserVO userVO) { + DraftMapWithBLOBs draftMap = new DraftMapWithBLOBs(); + draftMap.setName(name); + draftMap.setAuthorId(userVO.getId()); + // 名称唯一性校验 + if (checkDraftMapNameExist(draftMap)) { + throw new DBException(ExceptionMapping.NAME_REPEAT); + } + draftMap.setLineCode(mapVO.getLineCode()); + draftMap.setDrawWay(mapVO.isDrawWay()); + draftMap.setUpdateTime(LocalDateTime.now()); + + RealLineVO skinVO; + if (mapVO.isDrawWay()) { //新绘制方式 + draftMap.setGraphData(JsonUtils.writeValueAsString(mapVO.getGraphDataNew())); + draftMapDAO.insert(draftMap); + skinVO = mapVO.getGraphDataNew().getSkinVO(); + } else { + + draftMap.setGraphData(JsonUtils.writeValueAsString(mapVO.getGraphData())); + draftMapDAO.insert(draftMap); + skinVO = mapVO.getGraphData().getSkinVO(); + } + // 判断皮肤是否存在 + if (!iRealLineService.checkCodeExist(skinVO.getCode())) { + iRealLineService.create(skinVO, userVO); + } + if (mapVO.isDrawWay()) { + saveMapLogicDataNew(draftMap.getId(), mapVO.getLogicDataNew()); + } else { + saveMapLogicData(draftMap.getId(), mapVO.getLogicData()); + } + // 3d数据处理 + Map3dDataVO map3dDataVO = mapVO.getMap3dData(); + if (Objects.nonNull(map3dDataVO)) { + DraftMap3dDataWithBLOBs draftMap3dData = map3dDataVO.convert2Draft(); + draftMap3dData.setId(null); + draftMap3dData.setMapId(draftMap.getId()); + draftMap3dData.setCreatorId(userVO.getId()); + draftMap3dData.setCreateTime(LocalDateTime.now()); + draftMap3dDataDAO.insert(draftMap3dData); + } + } + + @Override + public void publish(Long id, DraftMapVO draftMapVO, UserVO userVO) { + DraftMapWithBLOBs draftMap = draftMapDAO.selectByPrimaryKey(id); + MapDataVO mapDataVO = null; + if (draftMap.getDrawWay()) { + mapDataVO = new MapDataVO(JsonUtils.read(draftMap.getGraphData(), MapGraphDataNewVO.class), getMapLogicDataNew(id)); + } else { + mapDataVO = new MapDataVO(JsonUtils.read(draftMap.getGraphData(), MapGraphDataVO.class), getMapLogicData(id)); + } + mapDataVO.setMap3dDataVO(find3dMapDataByMapId(id)); + iMapService.publish(new MapVO(draftMap, draftMapVO.getName(), draftMapVO.getCityCode()), mapDataVO, userVO); + } + + @Override + public void publish(Long id, DraftMapVO draftMapVO, UserVO userVO, MapDataVO mapDataVO) { + DraftMap draftMap = draftMapDAO.selectByPrimaryKey(id); + mapDataVO.setMap3dDataVO(find3dMapDataByMapId(id)); + iMapService.publish(new MapVO(draftMap, draftMapVO.getName(), draftMapVO.getCityCode()), mapDataVO, userVO); + } + + @Override + public void publish3DData(Long id, DraftMapVO draftMapVO, UserVO user) { + Map3dDataVO map3dDataVO = this.find3dMapDataByMapId(id); + DraftMap draftMap = this.draftMapDAO.selectByPrimaryKey(id); + MapVO mapVO = new MapVO(draftMap, draftMapVO.getName(), draftMapVO.getCityCode()); + this.iMapService.publish3DData(mapVO, map3dDataVO, user); + } + + @Override + public MapDataVO getMapData(Long id) { + Object shapeData = getMapShapeData(id); + if (shapeData instanceof MapGraphDataNewVO) { + + return new MapDataVO((MapGraphDataNewVO) shapeData, getMapLogicDataNew(id)); + } + return new MapDataVO((MapGraphDataVO) shapeData, getMapLogicData(id)); + } + + @Override + public List checkData(MapDataVO mapDataVO) { + List exDataList = null; + try { + if (mapDataVO.isDrawWay()) { +// exDataList = checkNew(mapDataVO); + MapVO map = new MapVO(); + map.setDrawWay(mapDataVO.isDrawWay()); + map.setMapData(mapDataVO); + exDataList = SimulationBuilder.checkAndBuildMapData(map).getErrMsgList(); + } else { + + exDataList = check(mapDataVO); + } + } catch (IllegalStateException e) { + if (e.getMessage().startsWith("Duplicate key")) { + exDataList = new ArrayList<>(); + exDataList.add(String.format("code %s 重复", e.getMessage().replace("Duplicate key ", ""))); + return exDataList; + } else { + e.printStackTrace(); + } + } + return exDataList; + } + + private List check(MapDataVO mapDataVO) { + List exDataList = new ArrayList<>(); + // link + List linkList = mapDataVO.getShapeData().getLinkList(); + Map linkVOMap = linkList.stream().collect(Collectors.toMap(MapLinkVO::getCode, Function.identity())); + linkList.forEach(linkVO -> { + if (StringUtils.hasText(linkVO.getLeftFdCode()) && Objects.isNull(linkVOMap.get(linkVO.getLeftFdCode()))) { + exDataList.add(String.format("Link %s(%s) 关联左正向Link %s不存在", linkVO.getName(), linkVO.getCode(), linkVO.getLeftFdCode())); + } + if (StringUtils.hasText(linkVO.getLeftSdCode()) && Objects.isNull(linkVOMap.get(linkVO.getLeftSdCode()))) { + exDataList.add(String.format("Link %s(%s) 关联左侧向Link %s不存在", linkVO.getName(), linkVO.getCode(), linkVO.getLeftSdCode())); + } + if (StringUtils.hasText(linkVO.getRightSdCode()) && Objects.isNull(linkVOMap.get(linkVO.getRightSdCode()))) { + exDataList.add(String.format("Link %s(%s) 关联右正向Link %s不存在", linkVO.getName(), linkVO.getCode(), linkVO.getRightSdCode())); + } + if (StringUtils.hasText(linkVO.getRightFdCode()) && Objects.isNull(linkVOMap.get(linkVO.getRightFdCode()))) { + exDataList.add(String.format("Link %s(%s) 关联右侧向Link %s不存在", linkVO.getName(), linkVO.getCode(), linkVO.getRightFdCode())); + } + }); + // ZC + List zcList = mapDataVO.getShapeData().getZcList(); + Map zcVOMap = zcList.stream().collect(Collectors.toMap(MapZcVO::getCode, Function.identity())); + // 车站 + List stationList = mapDataVO.getShapeData().getStationList(); + Map stationVOMap = stationList.stream().collect(Collectors.toMap(MapStationVO::getCode, Function.identity())); + stationList.forEach(station -> { + if (StringUtils.isBlank(station.getConcentrateStationCode())) { + exDataList.add(String.format("车站 %s(%s) 所属设备集中站为空", station.getName(), station.getCode())); + } else if (!stationVOMap.containsKey(station.getConcentrateStationCode())) { + exDataList.add(String.format("车站 %s(%s) 所属设备集中站不存在", station.getName(), station.getCode())); + } else if (!stationVOMap.get(station.getConcentrateStationCode()).getCentralized()) { + exDataList.add(String.format("车站 %s(%s) 所属设备集中站不是集中站", station.getName(), station.getCode())); + } + if (StringUtils.hasText(station.getZcCode()) && !zcVOMap.containsKey(station.getZcCode())) { + exDataList.add(String.format("车站 %s(%s) 所属ZC区域不存在", station.getName(), station.getCode())); + } + }); + // 控制模式 + List stationControlList = mapDataVO.getShapeData().getStationControlList(); + Map stationControlVOMap = stationControlList.stream().collect(Collectors.toMap(MapStationControlVO::getCode, Function.identity())); + stationControlList.forEach(stationControl -> { + if (!stationVOMap.containsKey(stationControl.getStationCode())) { + exDataList.add(String.format("控制模式 %s 所属设备集中站不存在", stationControl.getCode())); + } else if (!stationVOMap.get(stationControl.getStationCode()).getCentralized()) { + exDataList.add(String.format("控制模式 %s 所属设备集中站不是集中站", stationControl.getCode())); + } + }); + // 计数器 + List counterList = mapDataVO.getShapeData().getCounterList(); + Map counterVOMap = counterList.stream().collect(Collectors.toMap(MapStationCounterVO::getCode, Function.identity())); + // 延时解锁 + List delayShowList = mapDataVO.getShapeData().getDelayShowList(); + Map delayUnlockShowVOMap = delayShowList.stream().collect(Collectors.toMap(MapStationDelayUnlockShowVO::getCode, Function.identity())); + // 站台 + List stationStandList = mapDataVO.getShapeData().getStationStandList(); + Map standVOMap = stationStandList.stream().collect(Collectors.toMap(MapStationStandVO::getCode, Function.identity())); + stationStandList.forEach(stationStand -> { + if (!stationVOMap.containsKey(stationStand.getStationCode())) { + exDataList.add(String.format("站台 %s(%s) 所属车站不存在", stationStand.getName(), stationStand.getCode())); + } + if (!stationVOMap.containsKey(stationStand.getStationCode())) { + exDataList.add(String.format("站台 %s(%s) 所属设备集中站不存在", stationStand.getName(), stationStand.getCode())); + } else if (!stationVOMap.get(stationStand.getDeviceStationCode()).getCentralized()) { + exDataList.add(String.format("车站 %s(%s) 所属设备集中站不是集中站", stationStand.getName(), stationStand.getCode())); + } + }); + // 区段 + List sectionList = mapDataVO.getShapeData().getSectionList(); + Map sectionVOMap = sectionList.stream().collect(Collectors.toMap(MapSectionVO::getCode, Function.identity())); + sectionList.stream().filter(mapSectionVO -> Objects.equals(mapSectionVO.getType(), BusinessConsts.Section.SectionType.Type01)) + .collect(Collectors.groupingBy(MapSectionVO::getLinkCode)).forEach((linkCode, sections) -> { + sections.sort(Comparator.comparing(MapSectionVO::getOffsetLeft)); + MapLinkVO linkVO = linkVOMap.get(linkCode); + if (sections.get(0).getOffsetLeft() != 0) { + exDataList.add(String.format("link %s 上起始区段 %s(%s)左侧偏移量不为0", linkVO.getName(), + sections.get(0).getName(), sections.get(0).getCode())); + } + for (int i = 0; i < sections.size(); i++) { + MapSectionVO section1 = sections.get(i); + if (i < sections.size() - 1) { + MapSectionVO section2 = sections.get(i + 1); + if (!Objects.equals(section1.getOffsetRight(), section2.getOffsetLeft())) { + exDataList.add(String.format("link %s 上区段 %s(%s)与区段 %s(%s)左右偏移量不一致", linkVO.getName(), + section1.getName(), section1.getCode(), section2.getName(), section2.getCode())); + } + } + if (StringUtils.isBlank(section1.getStationCode())) { + exDataList.add(String.format("区段 %s(%s) 所属设备集中站为空", section1.getName(), section1.getCode())); + } else if (!stationVOMap.containsKey(section1.getStationCode())) { + exDataList.add(String.format("区段 %s(%s) 所属设备集中站不存在", section1.getName(), section1.getCode())); + } + if (section1.getIsStandTrack()) { + if (StringUtils.isBlank(section1.getRelStandCode())) { + exDataList.add(String.format("区段 %s(%s) 是站台轨,但没有关联站台", section1.getName(), section1.getCode())); + } else if (!standVOMap.containsKey(section1.getRelStandCode())) { + exDataList.add(String.format("区段 %s(%s) 关联的站台不存在", section1.getName(), section1.getCode())); + } + } + } + MapSectionVO lastSection = sections.get(sections.size() - 1); + if (!Objects.equals(lastSection.getOffsetRight(), linkVO.getLengthFact())) { + exDataList.add(String.format("link %s 上结束区段 %s(%s)右侧偏移量与link长度不一致", linkVO.getName(), + lastSection.getName(), lastSection.getCode())); + } + }); + // 道岔 + List switchList = mapDataVO.getShapeData().getSwitchList(); + Map switchVOMap = switchList.stream().collect(Collectors.toMap(MapSwitchVO::getCode, Function.identity())); + switchList.forEach(switchVO -> { + if (StringUtils.isBlank(switchVO.getStationCode())) { + exDataList.add(String.format("道岔 %s(%s) 所属设备集中站为空", switchVO.getName(), switchVO.getCode())); + } else if (!stationVOMap.containsKey(switchVO.getStationCode())) { + exDataList.add(String.format("道岔 %s(%s) 所属设备集中站不存在", switchVO.getName(), switchVO.getCode())); + } + if (Objects.isNull(sectionVOMap.get(switchVO.getSectionACode()))) { + exDataList.add(String.format("道岔 %s(%s) 关联区段A不存在", switchVO.getName(), switchVO.getCode())); + } + if (Objects.isNull(sectionVOMap.get(switchVO.getSectionBCode()))) { + exDataList.add(String.format("道岔 %s(%s) 关联区段A不存在", switchVO.getName(), switchVO.getCode())); + } + if (Objects.isNull(sectionVOMap.get(switchVO.getSectionCCode()))) { + exDataList.add(String.format("道岔 %s(%s) 关联区段A不存在", switchVO.getName(), switchVO.getCode())); + } + }); + // 信号机 + List signalList = mapDataVO.getShapeData().getSignalList(); + Map signalVOMap = signalList.stream().collect(Collectors.toMap(MapSignalVO::getCode, Function.identity())); + signalList.forEach(signalVO -> { + MapLinkVO linkVO = linkVOMap.get(signalVO.getLinkCode()); + if (Objects.isNull(linkVO)) { + exDataList.add(String.format("信号机 %s(%s) 关联Link不存在", signalVO.getName(), signalVO.getCode())); + } + if (signalVO.getOffset() < 0) { + exDataList.add(String.format("信号机 %s(%s) 偏移量小于0", signalVO.getName(), signalVO.getCode())); + } else if (signalVO.getOffset() > linkVO.getLengthFact()) { + exDataList.add(String.format("信号机 %s(%s) 偏移量大于Link实际长度", signalVO.getName(), signalVO.getCode())); + } + if (StringUtils.hasText(linkVO.getLeftFdCode()) && StringUtils.hasText(linkVO.getLeftSdCode()) + && signalVO.getOffset() == 0) { + exDataList.add(String.format("信号机 %s(%s) 偏移量不能为0", signalVO.getName(), signalVO.getCode())); + } + if (StringUtils.hasText(linkVO.getRightFdCode()) && StringUtils.hasText(linkVO.getRightSdCode()) + && signalVO.getOffset().equals(linkVO.getLengthFact())) { + exDataList.add(String.format("信号机 %s(%s) 偏移量不能为Link实际长度", signalVO.getName(), signalVO.getCode())); + } + if (StringUtils.isBlank(signalVO.getStationCode())) { + exDataList.add(String.format("信号机 %s(%s) 所属设备集中站为空", signalVO.getName(), signalVO.getCode())); + } else if (!stationVOMap.containsKey(signalVO.getStationCode())) { + exDataList.add(String.format("信号机 %s(%s) 所属设备集中站不存在", signalVO.getName(), signalVO.getCode())); + } + }); + // 列车模型 + List trainModelList = mapDataVO.getShapeData().getTrainModelList(); + Map trainModelVOMap = trainModelList.stream().collect(Collectors.toMap(MapTrainModelVO::getCode, Function.identity())); + // 列车 + List trainList = mapDataVO.getShapeData().getTrainList(); + Map trainVOMap = trainList.stream().collect(Collectors.toMap(MapTrainVO::getCode, Function.identity())); + List groupNumbers = new ArrayList<>(); + trainList.forEach(trainVO -> { + if (Objects.isNull(trainModelVOMap.get(trainVO.getModelCode()))) { + exDataList.add(String.format("列车 %s(%s) 关联的列车模型不存在", trainVO.getGroupNumber(), trainVO.getCode())); + } + if (groupNumbers.contains(trainVO.getGroupNumber())) { + exDataList.add(String.format("列车车组号 %s重复", trainVO.getGroupNumber())); + } else { + groupNumbers.add(trainVO.getGroupNumber()); + } + }); + // 车次窗 + List trainWindowList = mapDataVO.getShapeData().getTrainWindowList(); + Map trainWindowVOMap = trainWindowList.stream().collect(Collectors.toMap(MapTrainWindowVO::getCode, Function.identity())); + trainWindowList.forEach(trainWindowVO -> { + if (Objects.isNull(sectionVOMap.get(trainWindowVO.getSectionCode()))) { + exDataList.add(String.format("车次窗 %s 关联的区段不存在", trainWindowVO.getCode())); + } + }); + // 线段 + List lineList = mapDataVO.getShapeData().getLineList(); + Map lineVOMap = lineList.stream().collect(Collectors.toMap(MapLineVO::getCode, Function.identity())); + // 文字 + List textList = mapDataVO.getShapeData().getTextList(); + Map textVOMap = textList.stream().collect(Collectors.toMap(MapTextVO::getCode, Function.identity())); + // 资源 + List resourceList = mapDataVO.getShapeData().getResourceList(); + Map resourceVOMap = resourceList.stream().collect(Collectors.toMap(MapResourceVO::getCode, Function.identity())); + // LC + List lcList = mapDataVO.getShapeData().getLcList(); + Map lcVOMap = lcList.stream().collect(Collectors.toMap(MapLcVO::getCode, Function.identity())); + // 全线临时限速 + List tempSpeedLimitList = mapDataVO.getShapeData().getTempSpeedLimitList(); + Map tempSpeedLimitVOMap = tempSpeedLimitList.stream().collect(Collectors.toMap(MapTempSpeedLimitVO::getCode, Function.identity())); + // 按钮 + List buttonList = mapDataVO.getShapeData().getButtonList(); + Map buttonVOMap = buttonList.stream().collect(Collectors.toMap(MapButtonVO::getCode, Function.identity())); + // 进路 + List routeList = mapDataVO.getLogicData().getRouteList(); + Map routeVOMap = routeList.stream().collect(Collectors.toMap(MapRouteVO::getCode, Function.identity())); + routeList.forEach(routeVO -> { + if (StringUtils.isBlank(routeVO.getStationCode())) { + exDataList.add(String.format("进路 %s(%s) 所属设备集中站为空", routeVO.getName(), routeVO.getCode())); + } else if (!stationVOMap.containsKey(routeVO.getStationCode())) { + exDataList.add(String.format("进路 %s(%s) 所属设备集中站不存在", routeVO.getName(), routeVO.getCode())); + } + if (Objects.isNull(signalVOMap.get(routeVO.getStartSignalCode()))) { + exDataList.add(String.format("进路 %s(%s) 关联始端信号机 %s不存在", routeVO.getCode(), routeVO.getName(), routeVO.getStartSignalCode())); + } + if (Objects.isNull(signalVOMap.get(routeVO.getEndSignalCode()))) { + exDataList.add(String.format("进路 %s(%s) 关联终端信号机 %s不存在", routeVO.getCode(), routeVO.getName(), routeVO.getEndSignalCode())); + } + if (Objects.isNull(sectionVOMap.get(routeVO.getNearSectionCode()))) { + exDataList.add(String.format("进路 %s(%s) 接近区段 %s不存在", routeVO.getCode(), routeVO.getName(), routeVO.getNearSectionCode())); + } + // 进路内区段 + routeVO.getRouteSectionList().forEach(routeSectionVO -> { + if (Objects.isNull(sectionVOMap.get(routeSectionVO.getSectionCode()))) { + exDataList.add(String.format("进路 %s(%s) 内区段 %s不存在", routeVO.getCode(), routeVO.getName(), routeSectionVO.getSectionCode())); + } + }); + // 进路内道岔 + routeVO.getRouteSwitchList().forEach(routeSwitchVO -> { + if (Objects.isNull(switchVOMap.get(routeSwitchVO.getSwitchCode()))) { + exDataList.add(String.format("进路 %s(%s) 内道岔 %s不存在", routeVO.getCode(), routeVO.getName(), routeSwitchVO.getSwitchCode())); + } + }); + // 进路内站台 + routeVO.getRouteStandList().forEach(routeStationStandVO -> { + if (Objects.isNull(standVOMap.get(routeStationStandVO.getStationStandCode()))) { + exDataList.add(String.format("进路 %s(%s) 内站台 %s不存在", routeVO.getCode(), routeVO.getName(), routeStationStandVO.getStationStandCode())); + } + }); + // 进路自动触发区段 + routeVO.getRouteTriggerSectionList().forEach(autoTriggerSectionVO -> { + if (Objects.isNull(sectionVOMap.get(autoTriggerSectionVO.getSectionCode()))) { + exDataList.add(String.format("进路 %s(%s) 自动触发区段 %s不存在", routeVO.getCode(), routeVO.getName(), autoTriggerSectionVO.getSectionCode())); + } + }); + // 进路延续保护区段 + routeVO.getRouteOverlapSectionList().forEach(overlapSectionVO -> { + if (Objects.isNull(sectionVOMap.get(overlapSectionVO.getSectionCode()))) { + exDataList.add(String.format("进路 %s(%s) 延续保护区段 %s不存在", routeVO.getCode(), routeVO.getName(), overlapSectionVO.getSectionCode())); + } + }); + // 进路延续保护道岔 + routeVO.getRouteOverlapSwitchList().forEach(overlapSwitchVO -> { + if (Objects.isNull(switchVOMap.get(overlapSwitchVO.getSwitchCode()))) { + exDataList.add(String.format("进路 %s(%s) 延续保护道岔 %s不存在", routeVO.getCode(), routeVO.getName(), overlapSwitchVO.getSwitchCode())); + } + }); + // 进路侧防道岔 + routeVO.getRouteFlankProtectionList().forEach(flankProtectionVO -> { + if (Objects.isNull(switchVOMap.get(flankProtectionVO.getSwitchCode()))) { + exDataList.add(String.format("进路 %s(%s) 侧防道岔 %s不存在", routeVO.getCode(), routeVO.getName(), flankProtectionVO.getSwitchCode())); + } + }); + }); + // 自动信号 + List autoSignalList = mapDataVO.getLogicData().getAutoSignalList(); + Map autoSignalVOMap = autoSignalList.stream().collect(Collectors.toMap(MapAutoSignalVO::getCode, Function.identity())); + autoSignalList.forEach(autoSignalVO -> { + if (Objects.isNull(signalVOMap.get(autoSignalVO.getSignalCode()))) { + exDataList.add(String.format("自动信号 %s 信号机 %s不存在", autoSignalVO.getCode(), autoSignalVO.getSignalCode())); + } + autoSignalVO.getAutoSignalClearList().forEach(autoSignalClearVO -> { + if (Objects.isNull(sectionVOMap.get(autoSignalClearVO.getSectionCode()))) { + exDataList.add(String.format("自动信号 %s 出清区段 %s不存在", autoSignalVO.getCode(), autoSignalClearVO.getSectionCode())); + } + }); + }); + // 路径单元 + List routeUnitList = mapDataVO.getLogicData().getRouteUnitList(); + Map routeUnitVOMap = routeUnitList.stream().collect(Collectors.toMap(MapRouteUnitVO::getCode, Function.identity())); + routeUnitList.forEach(routeUnitVO -> { + if (Objects.isNull(sectionVOMap.get(routeUnitVO.getStartSectionCode()))) { + exDataList.add(String.format("路径单元 %s 始端区段 %s不存在", routeUnitVO.getCode(), routeUnitVO.getStartSectionCode())); + } + if (Objects.isNull(sectionVOMap.get(routeUnitVO.getEndSectionCode()))) { + exDataList.add(String.format("路径单元 %s 终端区段 %s不存在", routeUnitVO.getCode(), routeUnitVO.getEndSectionCode())); + } + routeUnitVO.getMapRouteUnitRelList().forEach(unitRelVO -> { + if (Objects.isNull(routeVOMap.get(unitRelVO.getRouteCode()))) { + exDataList.add(String.format("路径单元 %s 关联进路 %s不存在", routeUnitVO.getCode(), unitRelVO.getRouteCode())); + } + }); + }); + // 交路 + List routingList = mapDataVO.getLogicData().getRoutingList(); + Map routingVOMap = routingList.stream().collect(Collectors.toMap(MapRoutingVO::getCode, Function.identity())); + routingList.forEach(routingVO -> { + if (Objects.isNull(stationVOMap.get(routingVO.getStartStationCode()))) { + exDataList.add(String.format("交路 %s 始端车站 %s不存在", routingVO.getCode(), routingVO.getStartStationCode())); + } + if (Objects.isNull(sectionVOMap.get(routingVO.getStartSectionCode()))) { + exDataList.add(String.format("交路 %s 始端区段 %s不存在", routingVO.getCode(), routingVO.getStartSectionCode())); + } + if (Objects.isNull(stationVOMap.get(routingVO.getEndStationCode()))) { + exDataList.add(String.format("交路 %s 终端车站 %s不存在", routingVO.getCode(), routingVO.getEndStationCode())); + } + if (Objects.isNull(sectionVOMap.get(routingVO.getEndSectionCode()))) { + exDataList.add(String.format("交路 %s 终端区段 %s不存在", routingVO.getCode(), routingVO.getEndSectionCode())); + } + routingVO.getRoutingSectionList().forEach(routingSectionVO -> { + if (Objects.isNull(stationVOMap.get(routingSectionVO.getStationCode()))) { + exDataList.add(String.format("交路 %s 车站 %s不存在", routingVO.getCode(), routingSectionVO.getStationCode())); + } + if (Objects.isNull(sectionVOMap.get(routingSectionVO.getSectionCode()))) { + exDataList.add(String.format("交路 %s 区段 %s不存在", routingVO.getCode(), routingSectionVO.getSectionCode())); + } + }); + }); + // 联动道岔 + List switchCoupledList = mapDataVO.getLogicData().getSwitchCoupledList(); + switchCoupledList.forEach(switchCoupledVO -> { + if (Objects.isNull(switchVOMap.get(switchCoupledVO.getSwitchACode()))) { + exDataList.add(String.format("联动道岔 道岔一 %s不存在", switchCoupledVO.getSwitchACode())); + } + if (Objects.isNull(switchVOMap.get(switchCoupledVO.getSwitchBCode()))) { + exDataList.add(String.format("联动道岔 道岔二 %s不存在", switchCoupledVO.getSwitchBCode())); + } + }); + return exDataList; + } + + @Override + @Transactional + public void deleteMap(Long id, UserVO user) { +// DraftMap draftMap = draftMapDAO.selectByPrimaryKey(id); +// RunPlanVO runPlanVO = new RunPlanVO(); +// runPlanVO.setName(draftMap.getName()+"的草稿运行图"); +// runPlanVO.setSkinCode(draftMap.getSkinCode()); +// //删除刚创建地图后生成的用户自己玩的运行图 +// iRunPlanDraftUserService.deleteByCondition(runPlanVO,user); + deleteMapLogicData(id); + DraftMap3dDataExample dataExample = new DraftMap3dDataExample(); + dataExample.createCriteria().andMapIdEqualTo(id); + draftMap3dDataDAO.deleteByExample(dataExample); + draftMapDAO.deleteByPrimaryKey(id); + } + + /** + * 校验地图名称是否已经存在 + * + * @param map + * @return + */ + private boolean checkDraftMapNameExist(DraftMap map) { + DraftMapExample example = new DraftMapExample(); + DraftMapExample.Criteria criteria = example.createCriteria(); + if (Objects.nonNull(map.getLineCode())) { + criteria.andLineCodeEqualTo(map.getLineCode()); + } + if (map.getAuthorId() != null) { + criteria.andAuthorIdEqualTo(map.getAuthorId()); + } + if (map.getDrawWay() != null) { + criteria.andDrawWayEqualTo(map.getDrawWay()); + } + if (map.getId() != null) { + criteria.andIdNotEqualTo(map.getId()); + } + criteria.andNameEqualTo(map.getName()); + if (draftMapDAO.countByExample(example) > 0) { + return true; + } + return false; + } + + private MapLogicDataNewVO getMapLogicDataNew(Long id) { + MapLogicDataNewVO logicDataVO = new MapLogicDataNewVO(); + + // 进路 + DraftMapRouteExample routeExample = new DraftMapRouteExample(); + routeExample.createCriteria().andMapIdEqualTo(id); + List routeList = draftMapRouteDAO.selectByExampleWithBLOBs(routeExample); + logicDataVO.setRouteList(CollectionUtils.isEmpty(routeList) ? new ArrayList<>() : + routeList.stream().map(MapRouteNewVO::convertRel2VO).collect(Collectors.toList())); + // 交路 + DraftMapRoutingExample routingExample = new DraftMapRoutingExample(); + routingExample.createCriteria().andMapIdEqualTo(id); + List routingList = draftMapRoutingDAO.selectByExampleWithBLOBs(routingExample); + logicDataVO.setRoutingList(CollectionUtils.isEmpty(routingList) ? new ArrayList<>() : + routingList.stream().map(MapRoutingDataVO::convertRel2VO).collect(Collectors.toList())); + //目的地码释义 + DraftMapWithBLOBs entity = getEntity(id); + String logicData = entity.getLogicData(); + if (StringUtils.hasText(logicData)) { + List vos = JsonUtils.read(logicData, JsonUtils.getCollectionType(ArrayList.class, MapDestinationCodeDefinitionVO.class)); + logicDataVO.setDestinationCodeDefinitionList(vos); + } + //站间运行等级 + DraftMapRunLevelExample runLevelExample = new DraftMapRunLevelExample(); + runLevelExample.createCriteria().andMapIdEqualTo(id); + List draftMapRunLevels = draftMapRunLevelDAO.selectByExampleWithBLOBs(runLevelExample); + logicDataVO.setRunLevelList(CollectionUtils.isEmpty(draftMapRunLevels) ? new ArrayList<>() : + draftMapRunLevels.stream().map(MapStationRunLevelVO::convertRel2VO).collect(Collectors.toList())); + + //车站轨道停站时间 + DraftMapParkingTimeExample parkingTimeExample = new DraftMapParkingTimeExample(); + parkingTimeExample.createCriteria().andMapIdEqualTo(id); + List parkingTimeList = draftMapParkingTimeDAO.selectByExampleWithBLOBs(parkingTimeExample); + logicDataVO.setParkingTimeList(CollectionUtils.isEmpty(draftMapRunLevels) ? new ArrayList<>() : + parkingTimeList.stream().map(MapStationParkingTimeVO::convertRel2VO).collect(Collectors.toList())); + // 自动信号 + DraftMapAutoSignalExample autoSignalExample = new DraftMapAutoSignalExample(); + autoSignalExample.createCriteria().andMapIdEqualTo(id); + List autoSignalList = draftMapAutoSignalDAO.selectByExampleWithBLOBs(autoSignalExample); + logicDataVO.setAutoSignalList(CollectionUtils.isEmpty(autoSignalList) ? new ArrayList<>() : + autoSignalList.stream().map(MapAutoSignalNewVO::convertRel2VO).collect(Collectors.toList())); + //信号机接近区段 + DraftMapSignalApproachSectionExample signalApproachSectionExample = new DraftMapSignalApproachSectionExample(); + signalApproachSectionExample.createCriteria().andMapIdEqualTo(id); + List signalApproachSectionList = draftMapSignalApproachSectionDAO.selectByExampleWithBLOBs(signalApproachSectionExample); + logicDataVO.setSignalApproachSectionList(CollectionUtils.isEmpty(signalApproachSectionList) ? new ArrayList<>() : + signalApproachSectionList.stream().map(MapSignalApproachSectionVO::convert2RelVO).collect(Collectors.toList())); + //延续保护 + DraftMapOverlapExample draftMapOverlapExample = new DraftMapOverlapExample(); + draftMapOverlapExample.createCriteria().andMapIdEqualTo(id); + List draftMapOverlapList = draftMapOverlapDAO.selectByExampleWithBLOBs(draftMapOverlapExample); + logicDataVO.setOverlapList(CollectionUtils.isEmpty(draftMapOverlapList) ? new ArrayList<>() : + draftMapOverlapList.stream().map(MapOverlapVO::convertRel2VO).collect(Collectors.toList())); + //自动折返 + DraftMapAutoReentryExample draftMapAutoReentryExample = new DraftMapAutoReentryExample(); + draftMapAutoReentryExample.createCriteria().andMapIdEqualTo(id); + List draftMapAutoReentryList = draftMapAutoReentryDAO.selectByExampleWithBLOBs(draftMapAutoReentryExample); + logicDataVO.setAutoReentryList(CollectionUtils.isEmpty(draftMapAutoReentryList) ? new ArrayList<>() : + draftMapAutoReentryList.stream().map(MapAutoReentryVO::convertRel2VO).collect(Collectors.toList())); + // 进路侧防 + DraftMapRouteFlankProtectionExample flankProtectionExample = new DraftMapRouteFlankProtectionExample(); + flankProtectionExample.createCriteria().andMapIdEqualTo(id); + List draftMapRouteFlankProtections = this.draftMapRouteFlankProtectionDAO.selectByExampleWithBLOBs(flankProtectionExample); + logicDataVO.setFlankProtectionList(MapRouteFlankProtectionNewVO.convert2VOList(draftMapRouteFlankProtections)); + return logicDataVO; + } + + private MapLogicDataVO getMapLogicData(Long id) { + MapLogicDataVO logicDataVO = new MapLogicDataVO(); + // 联动道岔 + DraftMapSwitchCoupledExample switchCoupledExample = new DraftMapSwitchCoupledExample(); + switchCoupledExample.createCriteria().andMapIdEqualTo(id); + List switchCoupledList = draftMapSwitchCoupledDAO.selectByExample(switchCoupledExample); + logicDataVO.setSwitchCoupledList(CollectionUtils.isEmpty(switchCoupledList) ? new ArrayList<>() : + MapSwitchCoupledVO.convert2VOList(switchCoupledList)); + // 进路 + DraftMapRouteExample routeExample = new DraftMapRouteExample(); + routeExample.createCriteria().andMapIdEqualTo(id); + List routeList = draftMapRouteDAO.selectByExampleWithBLOBs(routeExample); + logicDataVO.setRouteList(CollectionUtils.isEmpty(routeList) ? new ArrayList<>() : + routeList.stream().map(MapRouteVO::convertRel2VO).collect(Collectors.toList())); + // 路径单元 + DraftMapRouteUnitExample routeUnitExample = new DraftMapRouteUnitExample(); + routeUnitExample.createCriteria().andMapIdEqualTo(id); + List routeUnitList = draftMapRouteUnitDAO.selectByExampleWithBLOBs(routeUnitExample); + logicDataVO.setRouteUnitList(CollectionUtils.isEmpty(routeUnitList) ? new ArrayList<>() : + routeUnitList.stream().map(MapRouteUnitVO::convertRel2VO).collect(Collectors.toList())); + // 交路 + DraftMapRoutingExample routingExample = new DraftMapRoutingExample(); + routingExample.createCriteria().andMapIdEqualTo(id); + List routingList = draftMapRoutingDAO.selectByExampleWithBLOBs(routingExample); + logicDataVO.setRoutingList(CollectionUtils.isEmpty(routingList) ? new ArrayList<>() : + routingList.stream().map(MapRoutingVO::convertRel2VO).collect(Collectors.toList())); + // 自动信号 + DraftMapAutoSignalExample autoSignalExample = new DraftMapAutoSignalExample(); + autoSignalExample.createCriteria().andMapIdEqualTo(id); + List autoSignalList = draftMapAutoSignalDAO.selectByExampleWithBLOBs(autoSignalExample); + logicDataVO.setAutoSignalList(CollectionUtils.isEmpty(autoSignalList) ? new ArrayList<>() : + autoSignalList.stream().map(MapAutoSignalVO::convertRel2VO).collect(Collectors.toList())); + return logicDataVO; + } + + private void saveMapLogicData(Long id, MapLogicDataVO logicDataVO) { + if (Objects.isNull(logicDataVO)) { + return; + } + if (!CollectionUtils.isEmpty(logicDataVO.getSwitchCoupledList())) { + logicDataVO.getSwitchCoupledList().forEach(switchCoupledVO -> { + switchCoupledVO.setMapId(id); + createSwitchCoupled(switchCoupledVO); + }); + } + if (!CollectionUtils.isEmpty(logicDataVO.getRouteList())) { + logicDataVO.getRouteList().forEach(mapRouteVO -> { + mapRouteVO.setMapId(id); + createRoute(mapRouteVO); + }); + } + if (!CollectionUtils.isEmpty(logicDataVO.getAutoSignalList())) { + logicDataVO.getAutoSignalList().forEach(autoSignalVO -> { + autoSignalVO.setMapId(id); + createAutoSignal(autoSignalVO); + }); + } + if (!CollectionUtils.isEmpty(logicDataVO.getRouteUnitList())) { + logicDataVO.getRouteUnitList().forEach(routeUnitVO -> { + routeUnitVO.setMapId(id); + createRouteUnit(routeUnitVO); + }); + } + if (!CollectionUtils.isEmpty(logicDataVO.getRoutingList())) { + logicDataVO.getRoutingList().forEach(routingVO -> { + routingVO.setMapId(id); + createRouting(routingVO); + }); + } + } + + private void saveMapLogicDataNew(Long id, MapLogicDataNewVO logicDataVO) { + if (Objects.isNull(logicDataVO)) { + return; + } + if (!CollectionUtils.isEmpty(logicDataVO.getRouteList())) { + logicDataVO.getRouteList().forEach(mapRouteVO -> { + mapRouteVO.setMapId(id); + DraftMapRoute route = mapRouteVO.convert2Draft(); + draftMapRouteDAO.insert(route); + }); + } + if (!CollectionUtils.isEmpty(logicDataVO.getAutoSignalList())) { + logicDataVO.getAutoSignalList().forEach(autoSignalVO -> { + autoSignalVO.setMapId(id); + DraftMapAutoSignal autoSignal = autoSignalVO.convert2Draft(); + draftMapAutoSignalDAO.insert(autoSignal); + }); + } + if (!CollectionUtils.isEmpty(logicDataVO.getDestinationCodeDefinitionList())) { + + } + if (!CollectionUtils.isEmpty(logicDataVO.getRoutingList())) { + logicDataVO.getRoutingList().forEach(routingVO -> { + routingVO.setMapId(id); + DraftMapRouting routing = routingVO.convert2Draft(); + draftMapRoutingDAO.insert(routing); + }); + } + if (!CollectionUtils.isEmpty(logicDataVO.getRunLevelList())) { + logicDataVO.getRunLevelList().forEach(runLevelVO -> { + runLevelVO.setMapId(id); + DraftMapRunLevel runLevel = runLevelVO.convert2Draft(); + this.draftMapRunLevelDAO.insert(runLevel); + }); + } + + if (!CollectionUtils.isEmpty(logicDataVO.getParkingTimeList())) { + logicDataVO.getParkingTimeList().forEach(parkingTimeVO -> { + parkingTimeVO.setMapId(id); + DraftMapParkingTime draftMapParkingTime = parkingTimeVO.convert2Draft(); + this.draftMapParkingTimeDAO.insert(draftMapParkingTime); + }); + } + if (!CollectionUtils.isEmpty(logicDataVO.getSignalApproachSectionList())) { + logicDataVO.getSignalApproachSectionList().forEach(signalApproachSection -> { + signalApproachSection.setMapId(id); + DraftMapSignalApproachSection approachSection = signalApproachSection.convert2Draft(); + this.draftMapSignalApproachSectionDAO.insert(approachSection); + }); + } + if (!CollectionUtils.isEmpty(logicDataVO.getOverlapList())) { + logicDataVO.getOverlapList().forEach(overlap -> { + overlap.setMapId(id); + DraftMapOverlap draftMapOverlap = overlap.convert2Draft(); + this.draftMapOverlapDAO.insert(draftMapOverlap); + }); + } + if (!CollectionUtils.isEmpty(logicDataVO.getAutoReentryList())) { + logicDataVO.getAutoReentryList().forEach(autoReentry -> { + autoReentry.setMapId(id); + DraftMapAutoReentry draftMapAutoReentry = autoReentry.convert2Draft(); + this.draftMapAutoReentryDAO.insert(draftMapAutoReentry); + }); + } + if (!CollectionUtils.isEmpty(logicDataVO.getFlankProtectionList())) { + logicDataVO.getFlankProtectionList().forEach(flankProtectionNewVO -> { + flankProtectionNewVO.setMapId(id); + DraftMapRouteFlankProtection entity = flankProtectionNewVO.toDB(); + this.draftMapRouteFlankProtectionDAO.insert(entity); + }); + } + + } + + private void deleteMapLogicData(Long id) { + // 联动道岔 + DraftMapSwitchCoupledExample switchCoupledExample = new DraftMapSwitchCoupledExample(); + switchCoupledExample.createCriteria().andMapIdEqualTo(id); + draftMapSwitchCoupledDAO.deleteByExample(switchCoupledExample); + // 进路 + DraftMapRouteExample routeExample = new DraftMapRouteExample(); + routeExample.createCriteria().andMapIdEqualTo(id); + draftMapRouteDAO.deleteByExample(routeExample); + // 路径单元 + DraftMapRouteUnitExample routeUnitExample = new DraftMapRouteUnitExample(); + routeUnitExample.createCriteria().andMapIdEqualTo(id); + draftMapRouteUnitDAO.deleteByExample(routeUnitExample); + // 交路 + DraftMapRoutingExample routingExample = new DraftMapRoutingExample(); + routingExample.createCriteria().andMapIdEqualTo(id); + draftMapRoutingDAO.deleteByExample(routingExample); + // 自动信号 + DraftMapAutoSignalExample autoSignalExample = new DraftMapAutoSignalExample(); + autoSignalExample.createCriteria().andMapIdEqualTo(id); + draftMapAutoSignalDAO.deleteByExample(autoSignalExample); + // 信号机接近区段 + DraftMapSignalApproachSectionExample signalApproachSectionExample = new DraftMapSignalApproachSectionExample(); + signalApproachSectionExample.createCriteria().andMapIdEqualTo(id); + draftMapSignalApproachSectionDAO.deleteByExample(signalApproachSectionExample); + // 延续保护 + DraftMapOverlapExample overlapExample = new DraftMapOverlapExample(); + overlapExample.createCriteria().andMapIdEqualTo(id); + draftMapOverlapDAO.deleteByExample(overlapExample); + // 自动折返 + DraftMapAutoReentryExample autoReentryExample = new DraftMapAutoReentryExample(); + autoReentryExample.createCriteria().andMapIdEqualTo(id); + draftMapAutoReentryDAO.deleteByExample(autoReentryExample); + } + + /*------------ SwitchCouple start ---------------------*/ + + @Override + public void createSwitchCoupled(MapSwitchCoupledVO switchCoupledVO) { + //数据校验 + String switchACode = switchCoupledVO.getSwitchACode(); + String switchBCode = switchCoupledVO.getSwitchBCode(); + if (switchACode.equalsIgnoreCase(switchBCode)) { + throw new DBException(ExceptionMapping.ILLEGAL_OPERATION); + } + DraftMapSwitchCoupledExample example = new DraftMapSwitchCoupledExample(); + List switchCodes = Arrays.asList(switchCoupledVO.getSwitchACode(), switchCoupledVO.getSwitchBCode()); + example.createCriteria().andMapIdEqualTo(switchCoupledVO.getMapId()).andSwitchaCodeIn(switchCodes).andSwitchbCodeIn(switchCodes); + long size = draftMapSwitchCoupledDAO.countByExample(example); + if (size > 0) { + throw new DBException(ExceptionMapping.CODE_REPEAT); + } + //插入数据 + draftMapSwitchCoupledDAO.insert(switchCoupledVO.convert2VO()); + } + + /** + * 查询该地图的联动道岔关系数据 + */ + @Override + public PageVO selectSwitchCoupled(Long mapId, MapSwitchCoupledQueryVO queryVO) { + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + DraftMapSwitchCoupledExample example = new DraftMapSwitchCoupledExample(); + DraftMapSwitchCoupledExample.Criteria criteria = example.createCriteria(); + criteria.andMapIdEqualTo(mapId); + if (StringUtils.hasText(queryVO.getSwitchCode())) { + criteria.andSwitchaCodeEqualTo(queryVO.getSwitchCode()); + DraftMapSwitchCoupledExample.Criteria criteria1 = example.createCriteria(); + criteria1.andMapIdEqualTo(mapId).andSwitchbCodeEqualTo(queryVO.getSwitchCode()); + example.or(criteria1); + } + Page data = (Page) draftMapSwitchCoupledDAO.selectByExample(example); + List voList = data.stream().map(MapSwitchCoupledVO::new).collect(Collectors.toList()); + return PageVO.convert(data, voList); + } + + /** + * 删除联动道岔关系 + * + * @param coupleId + */ + @Override + public void delSwitchCoupled(Long coupleId) { + draftMapSwitchCoupledDAO.deleteByPrimaryKey(coupleId); + } + + /*------------ SwitchCouple END ---------------------*/ + + /*------------ 信号机接近区段 start ---------------------*/ + @Override + public void createApproachSection(MapSignalApproachSectionVO approachSectionVO) { + DraftMapSignalApproachSectionExample example = new DraftMapSignalApproachSectionExample(); + example.createCriteria() + .andMapIdEqualTo(approachSectionVO.getMapId()) + .andSignalCodeEqualTo(approachSectionVO.getSignalCode()); + List list = this.draftMapSignalApproachSectionDAO.selectByExample(example); + if (!CollectionUtils.isEmpty(list)) { + throw new DBException(ExceptionMapping.DATA_EXISTS); + } + DraftMapSignalApproachSection approachSection = approachSectionVO.convert2Draft(); + this.draftMapSignalApproachSectionDAO.insert(approachSection); + } + + @Override + public PageVO queryPagedApproachSection(Long mapId, MapApproachSectionQueryVO queryVO) { + Objects.requireNonNull(mapId); + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + DraftMapSignalApproachSectionExample example = new DraftMapSignalApproachSectionExample(); + DraftMapSignalApproachSectionExample.Criteria criteria = example.createCriteria(); + criteria.andMapIdEqualTo(mapId); + if (StringUtils.hasText(queryVO.getSignalCode())) { + criteria.andSignalCodeEqualTo(queryVO.getSignalCode()); + } + Page page = (Page) + this.draftMapSignalApproachSectionDAO.selectByExampleWithBLOBs(example); + List voList = MapSignalApproachSectionVO.convert2VOList(page.getResult()); + return PageVO.convert(page, voList); + } + + @Override + public MapSignalApproachSectionVO getApproachSectionById(Long id) { + Objects.requireNonNull(id); + DraftMapSignalApproachSection approachSection = this.draftMapSignalApproachSectionDAO.selectByPrimaryKey(id); + if (Objects.isNull(approachSection)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + return MapSignalApproachSectionVO.convert2VO(approachSection); + } + + @Override + public void updateApproachSection(Long id, MapSignalApproachSectionVO approachSectionVO) { + DraftMapSignalApproachSection db = this.draftMapSignalApproachSectionDAO.selectByPrimaryKey(id); + db.setRelData(approachSectionVO.getJsonData()); + this.draftMapSignalApproachSectionDAO.updateByPrimaryKeyWithBLOBs(db); + } + + @Override + public void deleteApproachSection(Long id) { + this.draftMapSignalApproachSectionDAO.deleteByPrimaryKey(id); + } + /*------------ 信号机接近区段 end ---------------------*/ + + /*------------ AutoSignal start ---------------------*/ + + @Override + public void createAutoSignal(MapAutoSignalVO autoSignalVO) { + if (ifAutoSignalExist(autoSignalVO, null)) { + throw new DBException(ExceptionMapping.DATA_EXISTS); + } + DraftMapAutoSignal autoSignal = autoSignalVO.convert2Draft(); + draftMapAutoSignalDAO.insert(autoSignal); + } + + @Override + public void createAutoSignal(MapAutoSignalNewVO autoSignalVO) { + if (ifAutoSignalExist(autoSignalVO, null)) { + throw new DBException(ExceptionMapping.DATA_EXISTS); + } + DraftMapAutoSignal autoSignal = autoSignalVO.convert2Draft(); + draftMapAutoSignalDAO.insert(autoSignal); + } + + @Override + public PageVO queryPagedAutoSignal(Long mapId, MapAutoSignalQueryVO queryVO) { + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + DraftMapAutoSignalExample autoSignalExample = new DraftMapAutoSignalExample(); + autoSignalExample.setOrderByClause("id"); + DraftMapAutoSignalExample.Criteria criteria = autoSignalExample.createCriteria(); + criteria.andMapIdEqualTo(mapId); + if (StringUtils.hasText(queryVO.getCode())) { + criteria.andCodeEqualTo(queryVO.getCode()); + } + if (StringUtils.hasText(queryVO.getSignalCode())) { + criteria.andSignalCodeEqualTo(queryVO.getSignalCode()); + } + Page page = (Page) draftMapAutoSignalDAO.selectByExampleWithBLOBs(autoSignalExample); + List autoSignalVOList = page.getResult().stream().map(MapAutoSignalVO::convert2VO).collect(Collectors.toList()); + return PageVO.convert(page, autoSignalVOList); + } + + @Override + public PageVO queryPagedAutoSignalNew(Long mapId, MapAutoSignalQueryVO queryVO) { + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + DraftMapAutoSignalExample autoSignalExample = new DraftMapAutoSignalExample(); + autoSignalExample.setOrderByClause("id"); + DraftMapAutoSignalExample.Criteria criteria = autoSignalExample.createCriteria(); + criteria.andMapIdEqualTo(mapId); + if (StringUtils.hasText(queryVO.getCode())) { + criteria.andCodeEqualTo(queryVO.getCode()); + } + if (StringUtils.hasText(queryVO.getSignalCode())) { + criteria.andSignalCodeEqualTo(queryVO.getSignalCode()); + } + Page page = (Page) draftMapAutoSignalDAO.selectByExampleWithBLOBs(autoSignalExample); + List autoSignalVOList = page.getResult().stream().map(MapAutoSignalNewVO::convert2VO).collect(Collectors.toList()); + return PageVO.convert(page, autoSignalVOList); + } + + @Override + public MapAutoSignalVO getAutoSignal(Long autoSignalId) { + DraftMapAutoSignal autoSignal = draftMapAutoSignalDAO.selectByPrimaryKey(autoSignalId); + if (Objects.isNull(autoSignal)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + return MapAutoSignalVO.convert2VO(autoSignal); + } + + @Override + public MapAutoSignalNewVO getAutoSignalNew(Long autoSignalId) { + DraftMapAutoSignal autoSignal = draftMapAutoSignalDAO.selectByPrimaryKey(autoSignalId); + if (Objects.isNull(autoSignal)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + return MapAutoSignalNewVO.convert2VO(autoSignal); + } + + @Override + public void updateAutoSignal(Long autoSignalId, MapAutoSignalVO autoSignalVO) { + DraftMapAutoSignal autoSignal = draftMapAutoSignalDAO.selectByPrimaryKey(autoSignalId); + if (Objects.isNull(autoSignal)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + if (ifAutoSignalExist(autoSignalVO, autoSignalId)) { + throw new DBException(ExceptionMapping.DATA_EXISTS); + } + DraftMapAutoSignal newAutoSignal = autoSignalVO.convert2Draft(); + newAutoSignal.setId(autoSignalId); + draftMapAutoSignalDAO.updateByPrimaryKeyWithBLOBs(newAutoSignal); + } + + @Override + public void updateAutoSignal(Long autoSignalId, MapAutoSignalNewVO autoSignalVO) { + DraftMapAutoSignal autoSignal = draftMapAutoSignalDAO.selectByPrimaryKey(autoSignalId); + if (Objects.isNull(autoSignal)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + if (ifAutoSignalExist(autoSignalVO, autoSignalId)) { + throw new DBException(ExceptionMapping.DATA_EXISTS); + } + DraftMapAutoSignal newAutoSignal = autoSignalVO.convert2Draft(); + newAutoSignal.setId(autoSignalId); + draftMapAutoSignalDAO.updateByPrimaryKeyWithBLOBs(newAutoSignal); + } + + + @Override + public void deleteAutoSignal(Long autoSignalId) { + draftMapAutoSignalDAO.deleteByPrimaryKey(autoSignalId); + } + + /** + * 一个信号机只有一个自动信号 + * + * @param mapAutoSignalVO + * @param autoSignalId + * @return + */ + private boolean ifAutoSignalExist(MapAutoSignalVO mapAutoSignalVO, Long autoSignalId) { + DraftMapAutoSignalExample autoSignalExample = new DraftMapAutoSignalExample(); + DraftMapAutoSignalExample.Criteria criteria = autoSignalExample.createCriteria(); + criteria.andMapIdEqualTo(mapAutoSignalVO.getMapId()) + .andSignalCodeEqualTo(mapAutoSignalVO.getSignalCode()); + if (Objects.nonNull(autoSignalId)) { + criteria.andIdNotEqualTo(autoSignalId); + } + List draftMapAutoSignals = draftMapAutoSignalDAO.selectByExample(autoSignalExample); + return !CollectionUtils.isEmpty(draftMapAutoSignals); + } + + private boolean ifAutoSignalExist(MapAutoSignalNewVO mapAutoSignalVO, Long autoSignalId) { + DraftMapAutoSignalExample autoSignalExample = new DraftMapAutoSignalExample(); + DraftMapAutoSignalExample.Criteria criteria = autoSignalExample.createCriteria(); + criteria.andMapIdEqualTo(mapAutoSignalVO.getMapId()) + .andSignalCodeEqualTo(mapAutoSignalVO.getSignalCode()); + if (Objects.nonNull(autoSignalId)) { + criteria.andIdNotEqualTo(autoSignalId); + } + List draftMapAutoSignals = draftMapAutoSignalDAO.selectByExample(autoSignalExample); + return !CollectionUtils.isEmpty(draftMapAutoSignals); + } + /*------------ AutoSignal END ---------------------*/ + + + /*------------ Route start ---------------------*/ + @Override + public void createRoute(MapRouteVO routeVO) { + // 编号唯一校验 + DraftMapRouteExample example = new DraftMapRouteExample(); + example.createCriteria().andMapIdEqualTo(routeVO.getMapId()).andCodeEqualTo(routeVO.getCode()); + if (draftMapRouteDAO.countByExample(example) > 0) { + throw new DBException(ExceptionMapping.DATA_EXISTS); + } + // 保存进路信息 + DraftMapRoute route = routeVO.convert2Draft(); + draftMapRouteDAO.insert(route); + } + + @Override + public void createRoute(MapRouteNewVO routeVO) { + // 编号唯一校验 + DraftMapRouteExample example = new DraftMapRouteExample(); + example.createCriteria().andMapIdEqualTo(routeVO.getMapId()).andCodeEqualTo(routeVO.getCode()); + if (draftMapRouteDAO.countByExample(example) > 0) { + throw new DBException(ExceptionMapping.DATA_EXISTS); + } + // 保存进路信息 + DraftMapRoute route = routeVO.convert2Draft(); + draftMapRouteDAO.insert(route); + } + + @Override + public PageVO queryPagedRoute(Long mapId, MapRouteQueryVO queryVO) { + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + DraftMapRouteExample example = new DraftMapRouteExample(); + DraftMapRouteExample.Criteria criteria = example.createCriteria(); + criteria.andMapIdEqualTo(mapId); + if (StringUtils.hasText(queryVO.getCode())) { + criteria.andCodeEqualTo(queryVO.getCode()); + } + if (StringUtils.hasText(queryVO.getName())) { + queryVO.setName(String.format("%%%s%%", queryVO.getName())); + criteria.andNameLike(queryVO.getName()); + } + if (StringUtils.hasText(queryVO.getStationCode())) { + criteria.andStationCodeEqualTo(queryVO.getStationCode()); + } + if (StringUtils.hasText(queryVO.getStartSignalCode())) { + criteria.andStartSignalCodeEqualTo(queryVO.getStartSignalCode()); + } + if (StringUtils.hasText(queryVO.getEndSignalCode())) { + criteria.andEndSignalCodeEqualTo(queryVO.getEndSignalCode()); + } + if (StringUtils.hasText(queryVO.getNearSectionCode())) { + criteria.andNearSectionCodeEqualTo(queryVO.getNearSectionCode()); + } + Page pageTotal = (Page) draftMapRouteDAO.selectByExampleWithBLOBs(example); + List routeVOList = pageTotal.getResult().stream().map(MapRouteVO::convert2VO).collect(Collectors.toList()); + return PageVO.convert(pageTotal, routeVOList); + } + + @Override + public PageVO queryPagedRouteNew(Long mapId, MapRouteQueryVO queryVO) { + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + DraftMapRouteExample example = new DraftMapRouteExample(); + DraftMapRouteExample.Criteria criteria = example.createCriteria(); + criteria.andMapIdEqualTo(mapId); + if (StringUtils.hasText(queryVO.getCode())) { + criteria.andCodeEqualTo(queryVO.getCode()); + } + if (StringUtils.hasText(queryVO.getName())) { + queryVO.setName(String.format("%%%s%%", queryVO.getName())); + criteria.andNameLike(queryVO.getName()); + } + if (StringUtils.hasText(queryVO.getStationCode())) { + criteria.andStationCodeEqualTo(queryVO.getStationCode()); + } + if (StringUtils.hasText(queryVO.getStartSignalCode())) { + criteria.andStartSignalCodeEqualTo(queryVO.getStartSignalCode()); + } + if (StringUtils.hasText(queryVO.getEndSignalCode())) { + criteria.andEndSignalCodeEqualTo(queryVO.getEndSignalCode()); + } + Page pageTotal = (Page) draftMapRouteDAO.selectByExampleWithBLOBs(example); + List routeVOList = pageTotal.getResult().stream().map(MapRouteNewVO::convert2VO).collect(Collectors.toList()); + return PageVO.convert(pageTotal, routeVOList); + } + + @Override + public MapRouteVO getRouteDetail(Long routeId) { + DraftMapRoute route = draftMapRouteDAO.selectByPrimaryKey(routeId); + return MapRouteVO.convert2VO(route); + } + + @Override + public MapRouteNewVO getRouteDetailNew(Long routeId) { + DraftMapRoute route = draftMapRouteDAO.selectByPrimaryKey(routeId); + return MapRouteNewVO.convert2VO(route); + } + + @Override + public void updateRoute(Long routeId, MapRouteVO routeVO) { + DraftMapRoute route = draftMapRouteDAO.selectByPrimaryKey(routeId); + if (Objects.isNull(route)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + DraftMapRoute newRoute = routeVO.convert2Draft(); + newRoute.setId(routeId); + draftMapRouteDAO.updateByPrimaryKeyWithBLOBs(newRoute); + } + + @Override + public void updateRoute(Long routeId, MapRouteNewVO routeVO) { + DraftMapRoute route = draftMapRouteDAO.selectByPrimaryKey(routeId); + if (Objects.isNull(route)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + DraftMapRoute newRoute = routeVO.convert2Draft(); + newRoute.setId(routeId); + draftMapRouteDAO.updateByPrimaryKeyWithBLOBs(newRoute); + } + + @Override + public void deleteRoute(Long routeId) { + draftMapRouteDAO.deleteByPrimaryKey(routeId); + } + + /*------------ Route END ---------------------*/ + + /*------------overlap start ---------------------*/ + @Override + public void createOverlap(MapOverlapVO mapOverlapVO) { + if (StringUtils.hasText(mapOverlapVO.getName())) { + DraftMapOverlapExample example = new DraftMapOverlapExample(); + example.createCriteria() + .andMapIdEqualTo(mapOverlapVO.getMapId()) + .andNameEqualTo(mapOverlapVO.getName()); + List list = this.draftMapOverlapDAO.selectByExample(example); + if (!CollectionUtils.isEmpty(list)) { + throw new DBException(ExceptionMapping.DATA_EXISTS, + String.format("名称重复")); + } + } + DraftMapOverlap draftMapOverlap = mapOverlapVO.convert2Draft(); + this.draftMapOverlapDAO.insert(draftMapOverlap); + } + + @Override + public PageVO queryPagedOverlap(Long mapId, MapOverlapQueryVO queryVO) { + Objects.requireNonNull(mapId); + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + DraftMapOverlapExample example = new DraftMapOverlapExample(); + DraftMapOverlapExample.Criteria criteria = example.createCriteria(); + criteria.andMapIdEqualTo(mapId); + if (StringUtils.hasText(queryVO.getCode())) { + criteria.andCodeEqualTo(queryVO.getCode()); + } + Page page = (Page) + this.draftMapOverlapDAO.selectByExampleWithBLOBs(example); + List voList = page.getResult().stream().map(MapOverlapVO::convert2VO).collect(Collectors.toList()); + return PageVO.convert(page, voList); + } + + @Override + public MapOverlapVO getOverlapById(Long id) { + Objects.requireNonNull(id); + DraftMapOverlap draftMapOverlap = this.draftMapOverlapDAO.selectByPrimaryKey(id); + if (Objects.isNull(draftMapOverlap)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + return MapOverlapVO.convert2VO(draftMapOverlap); + } + + @Override + public void updateOverlap(Long id, MapOverlapVO mapOverlapVO) { + DraftMapOverlap db = this.draftMapOverlapDAO.selectByPrimaryKey(id); + if (Objects.isNull(db)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + + DraftMapOverlap draftMapOverlap = mapOverlapVO.convert2Draft(); + draftMapOverlap.setId(id); + this.draftMapOverlapDAO.updateByPrimaryKeySelective(draftMapOverlap); + } + + @Override + public void deleteOverlap(Long id) { + this.draftMapOverlapDAO.deleteByPrimaryKey(id); + } + + /*------------ Overlap END ---------------------*/ + + /*------------autoReentry start ---------------------*/ + @Override + public void createAutoReentry(MapAutoReentryVO mapAutoReentryVO) { + DraftMapAutoReentryExample example = new DraftMapAutoReentryExample(); + example.createCriteria() + .andMapIdEqualTo(mapAutoReentryVO.getMapId()) + .andCodeEqualTo(mapAutoReentryVO.getCode()); + List list = this.draftMapAutoReentryDAO.selectByExample(example); + if (!CollectionUtils.isEmpty(list)) { + throw new DBException(ExceptionMapping.DATA_EXISTS); + } + DraftMapAutoReentry draftMapAutoReentry = mapAutoReentryVO.convert2Draft(); + this.draftMapAutoReentryDAO.insert(draftMapAutoReentry); + } + + @Override + public PageVO queryPagedAutoReentry(Long mapId, MapAutoReentryQueryVO queryVO) { + Objects.requireNonNull(mapId); + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + DraftMapAutoReentryExample example = new DraftMapAutoReentryExample(); + DraftMapAutoReentryExample.Criteria criteria = example.createCriteria(); + criteria.andMapIdEqualTo(mapId); + if (StringUtils.hasText(queryVO.getCode())) { + criteria.andCodeEqualTo(queryVO.getCode()); + } + if (StringUtils.hasText(queryVO.getName())) { + criteria.andNameLike(String.format("%%%s%%", queryVO.getName())); + } + Page page = (Page) + this.draftMapAutoReentryDAO.selectByExampleWithBLOBs(example); + List voList = page.getResult().stream() + .map(MapAutoReentryVO::convert2VO).collect(Collectors.toList()); + return PageVO.convert(page, voList); + } + + /** + * 根据地图id查询折返轨分组的自动折返 + */ + @Override + public Map> queryAutoReentrysGroupByReentryTrack(Long mapId) { + Objects.requireNonNull(mapId); + DraftMapAutoReentryExample example = new DraftMapAutoReentryExample(); + example.createCriteria().andMapIdEqualTo(mapId); + List draftMapAutoReentries = this.draftMapAutoReentryDAO.selectByExampleWithBLOBs(example); + return draftMapAutoReentries.stream().map(MapAutoReentryVO::convert2VO).collect(Collectors.groupingBy(MapAutoReentryVO::getReentryTrackCode)); + } + + @Override + public MapAutoReentryVO getAutoReentryById(Long id) { + Objects.requireNonNull(id); + DraftMapAutoReentry draftMapAutoReentry = this.draftMapAutoReentryDAO.selectByPrimaryKey(id); + if (Objects.isNull(draftMapAutoReentry)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + return MapAutoReentryVO.convert2VO(draftMapAutoReentry); + } + + @Override + public void updateAutoReentry(Long id, MapAutoReentryVO mapAutoReentryVO) { + DraftMapAutoReentry db = this.draftMapAutoReentryDAO.selectByPrimaryKey(id); + if (Objects.isNull(db)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + DraftMapAutoReentry draftMapAutoReentry = mapAutoReentryVO.convert2Draft(); + draftMapAutoReentry.setId(id); + this.draftMapAutoReentryDAO.updateByPrimaryKeySelective(draftMapAutoReentry); + } + + @Override + public void deleteAutoReentry(Long id) { + this.draftMapAutoReentryDAO.deleteByPrimaryKey(id); + } + + /*------------ AutoReentry END ---------------------*/ + + + /*------------ RouteUnit start ---------------------*/ + @Override + public PageVO getRouteUnitList(Long mapId, MapRouteUnitQueryVO queryVO) { + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + DraftMapRouteUnitExample routeUnitExample = new DraftMapRouteUnitExample(); + DraftMapRouteUnitExample.Criteria criteria = routeUnitExample.createCriteria(); + criteria.andMapIdEqualTo(mapId); + if (StringUtils.hasText(queryVO.getStartSectionCode())) { + criteria.andStartSectionCodeEqualTo(queryVO.getStartSectionCode()); + } + if (StringUtils.hasText(queryVO.getEndSectionCode())) { + criteria.andEndSectionCodeEqualTo(queryVO.getEndSectionCode()); + } + Page data = (Page) draftMapRouteUnitDAO.selectByExampleWithBLOBs(routeUnitExample); + List mapRouteUnitVOList = data.stream().map(MapRouteUnitVO::convert2VO).collect(Collectors.toList()); + return PageVO.convert(data, mapRouteUnitVOList); + } + + @Override + public void createRouteUnit(MapRouteUnitVO mapRouteUnitVO) { + DraftMapRouteUnit draftRouteUnit = mapRouteUnitVO.convert2Draft(); + // 保存数据 + draftMapRouteUnitDAO.insert(draftRouteUnit); + } + + @Override + public MapRouteUnitVO getRouteUnit(Long routeUnitId) { + DraftMapRouteUnit draftMapRouteUnit = draftMapRouteUnitDAO.selectByPrimaryKey(routeUnitId); + return MapRouteUnitVO.convert2VO(draftMapRouteUnit); + } + + @Override + public void updateRouteUnit(Long routeUnitId, MapRouteUnitVO mapRouteUnitVO) { + DraftMapRouteUnit draftMapRouteUnit = mapRouteUnitVO.convert2Draft(); + draftMapRouteUnit.setId(routeUnitId); + draftMapRouteUnitDAO.updateByPrimaryKeyWithBLOBs(draftMapRouteUnit); + } + + @Override + public void deleteRouteUnit(Long routeUnitId) { + draftMapRouteUnitDAO.deleteByPrimaryKey(routeUnitId); + } + + /*------------ RouteUnit END ---------------------*/ + /*------------ Routing start ---------------------*/ + + @Override + public PageVO queryPagedRouting(Long mapId, PageQueryVO queryVO) { + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + DraftMapRoutingExample routingExample = new DraftMapRoutingExample(); + routingExample.setOrderByClause("id"); + routingExample.createCriteria().andMapIdEqualTo(mapId); + Page page = (Page) draftMapRoutingDAO.selectByExampleWithBLOBs(routingExample); + List routingVOList = page.getResult().stream().map(MapRoutingVO::convert2VO).collect(Collectors.toList()); + return PageVO.convert(page, routingVOList); + } + + @Override + public PageVO queryPagedRoutingData(Long mapId, MapRoutingDataQueryVO queryVO) { + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + DraftMapRoutingExample routingExample = new DraftMapRoutingExample(); + routingExample.setOrderByClause("id"); + DraftMapRoutingExample.Criteria criteria = routingExample.createCriteria(); + criteria.andMapIdEqualTo(mapId); + if (StringUtils.hasText(queryVO.getStartStationCode())) { + criteria.andStartStationCodeEqualTo(queryVO.getStartStationCode()); + } + if (StringUtils.hasText(queryVO.getEndStationCode())) { + criteria.andEndStationCodeEqualTo(queryVO.getEndStationCode()); + } + if (StringUtils.hasText(queryVO.getStartSectionCode())) { + criteria.andStartSectionCodeEqualTo(queryVO.getStartSectionCode()); + } + if (StringUtils.hasText(queryVO.getEndSectionCode())) { + criteria.andEndSectionCodeEqualTo(queryVO.getEndSectionCode()); + } + Page page = (Page) draftMapRoutingDAO.selectByExampleWithBLOBs(routingExample); + List routingVOList = page.getResult().stream().map(MapRoutingDataVO::convert2VO).collect(Collectors.toList()); + return PageVO.convert(page, routingVOList); + } + + @Override + public void createRouting(MapRoutingVO routingVO) { + if (ifRoutingExist(routingVO, null)) { + throw new DBException(ExceptionMapping.DATA_EXISTS); + } + DraftMapRouting routing = routingVO.convert2Draft(); + draftMapRoutingDAO.insert(routing); + } + + /** + * 创建交路时检查站间运行等级,不存在就创建 + */ + @Override + @Transactional + public void createRoutingData(MapRoutingDataVO routingVO) { + if (ifRoutingDataExist(routingVO, null)) { + throw new DBException(ExceptionMapping.DATA_EXISTS); + } + DraftMapRouting routing = routingVO.convert2Draft(); + draftMapRoutingDAO.insert(routing); + //同时生成回路 +// routingVO.setWithLoop(true);//测试用 + if (Objects.nonNull(routingVO.getWithLoop()) && routingVO.getWithLoop()) { + MapRoutingDataVO loopRoutingData = generateRoutingLoopData(routingVO); + if (ifRoutingDataExist(loopRoutingData, null)) { + throw new DBException(ExceptionMapping.DATA_EXISTS, "对应回路已存在"); + } + draftMapRoutingDAO.insert(loopRoutingData.convert2Draft()); + } + } + + /** + * 根据起始终点区段生成完整交路区段列表数据 + */ + @Override + public MapRoutingDataVO generateRoutingData(MapRoutingDataVO routingVO) { + if (ifRoutingDataExist(routingVO, null)) { + throw new DBException(ExceptionMapping.DATA_EXISTS); + } + MapDataVO mapData = this.iDraftMapService.getMapData(routingVO.getMapId()); + if (mapData.isDrawWay()) { + MapVO map = new MapVO(); + map.setDrawWay(mapData.isDrawWay()); + map.setMapData(mapData); + SimulationBuilder.SimulationDeviceBuildResult buildResult = SimulationBuilder.checkAndBuildMapDeviceData(map); + if (!CollectionUtils.isEmpty(buildResult.getErrMsgList())) { + throw new BusinessException(ExceptionMapping.OPERATION_EXCEPTION, String.format("地图基础数据校验不通过,不能生成")); + } + Section startSection = (Section) buildResult.getDeviceMap().get(routingVO.getStartSectionCode()); + Section endSection = (Section) buildResult.getDeviceMap().get(routingVO.getEndSectionCode()); + if (Objects.isNull(startSection) || Objects.isNull(endSection)) { + throw new BusinessException(ExceptionMapping.ARGUMENT_ILLEGAL, String.format("站间从区段code[%s]——至区段code[%s],两个区段中某个区段不存在", routingVO.getStartSectionCode(), routingVO.getEndSectionCode())); + } + //中间经停所有站台轨 + List
passingStandTrack = CalculateService.findPassingStandTrack(startSection, endSection, routingVO.getRight()); + if (Objects.isNull(passingStandTrack)) + throw new BusinessException(ExceptionMapping.OPERATION_EXCEPTION, "没有找到对应方向的中间经停区段,是否可手动添加或者直接保存交路"); + LinkedList parkSectionCodeList = passingStandTrack.stream().map(section -> new MapRoutingSectionNewVO(section.getStation().getCode(), section.getCode())).collect(Collectors.toCollection(LinkedList::new)); + parkSectionCodeList.addFirst(new MapRoutingSectionNewVO(routingVO.getStartStationCode(), routingVO.getStartSectionCode())); + parkSectionCodeList.addLast(new MapRoutingSectionNewVO(routingVO.getEndStationCode(), routingVO.getEndSectionCode())); + routingVO.setParkSectionCodeList(parkSectionCodeList); + } else { + throw new BusinessException(ExceptionMapping.OPERATION_EXCEPTION, String.format("旧地图数据不支持此功能")); + } + return routingVO; + } + + /** + * 生成对应交路的回路 + */ + private MapRoutingDataVO generateRoutingLoopData(MapRoutingDataVO routingDataVO) { + MapRoutingDataVO routingVO = routingDataVO.generateLoopRoutingBasicData(); + if (ifRoutingDataExist(routingVO, null)) { + throw new DBException(ExceptionMapping.DATA_EXISTS); + } + MapDataVO mapData = this.iDraftMapService.getMapData(routingVO.getMapId()); + if (mapData.isDrawWay()) { + MapVO map = new MapVO(); + map.setDrawWay(mapData.isDrawWay()); + map.setMapData(mapData); + SimulationBuilder.SimulationDeviceBuildResult buildResult = SimulationBuilder.checkAndBuildMapDeviceData(map); + if (!CollectionUtils.isEmpty(buildResult.getErrMsgList())) { + throw new BusinessException(ExceptionMapping.OPERATION_EXCEPTION, String.format("地图基础数据校验不通过,不能生成")); + } + Section startSection = (Section) buildResult.getDeviceMap().get(routingVO.getStartSectionCode()); + Section endSection = (Section) buildResult.getDeviceMap().get(routingVO.getEndSectionCode()); + routingVO.setDestinationCode(endSection.getDestinationCode()); + if (Objects.isNull(startSection) || Objects.isNull(endSection)) { + throw new BusinessException(ExceptionMapping.ARGUMENT_ILLEGAL, String.format("回路生成:站间从区段code[%s]——至区段code[%s],两个区段中某个区段不存在", routingVO.getStartSectionCode(), routingVO.getEndSectionCode())); + } + //中间经停所有站台轨 + List
passingStandTrack = CalculateService.findPassingStandTrack(startSection, endSection, routingVO.getRight()); + if (Objects.isNull(passingStandTrack)) + throw new BusinessException(ExceptionMapping.OPERATION_EXCEPTION, "没有对应的回路"); + LinkedList parkSectionCodeList = passingStandTrack.stream().map(section -> new MapRoutingSectionNewVO(section.getStation().getCode(), section.getCode())).collect(Collectors.toCollection(LinkedList::new)); + parkSectionCodeList.addFirst(new MapRoutingSectionNewVO(routingVO.getStartStationCode(), routingVO.getStartSectionCode())); + parkSectionCodeList.addLast(new MapRoutingSectionNewVO(routingVO.getEndStationCode(), routingVO.getEndSectionCode())); + routingVO.setParkSectionCodeList(parkSectionCodeList); + } else { + throw new BusinessException(ExceptionMapping.OPERATION_EXCEPTION, String.format("旧地图数据不支持此功能")); + } + return routingVO; + } + + @Override + public MapRoutingVO getRouting(Long routingId) { + DraftMapRouting routing = draftMapRoutingDAO.selectByPrimaryKey(routingId); + if (Objects.isNull(routing)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + return MapRoutingVO.convert2VO(routing); + } + + @Override + public MapRoutingDataVO getRoutingData(Long routingId) { + DraftMapRouting routing = draftMapRoutingDAO.selectByPrimaryKey(routingId); + if (Objects.isNull(routing)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + return MapRoutingDataVO.convert2VO(routing); + } + + @Override + public List getAllRoutingData(Long mapId) { + DraftMapRoutingExample routingExample = new DraftMapRoutingExample(); + DraftMapRoutingExample.Criteria criteria = routingExample.createCriteria(); + criteria.andMapIdEqualTo(mapId); + List routings = draftMapRoutingDAO.selectByExampleWithBLOBs(routingExample); + if (CollectionUtils.isEmpty(routings)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST, "没有交路数据"); + } + List routingVOList = routings.stream().map(MapRoutingDataVO::convert2VO).collect(Collectors.toList()); + + + return routingVOList; + } + + @Override + public void updateRouting(Long routingId, MapRoutingVO routingVO) { + DraftMapRouting routing = draftMapRoutingDAO.selectByPrimaryKey(routingId); + if (Objects.isNull(routing)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + if (ifRoutingExist(routingVO, routingId)) { + throw new DBException(ExceptionMapping.DATA_EXISTS); + } + // 更新 + DraftMapRouting newRouting = routingVO.convert2Draft(); + newRouting.setId(routingId); + draftMapRoutingDAO.updateByPrimaryKeyWithBLOBs(newRouting); + } + + @Override + public void updateRoutingData(Long routingId, MapRoutingDataVO routingVO) { + DraftMapRouting routing = draftMapRoutingDAO.selectByPrimaryKey(routingId); + if (Objects.isNull(routing)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + if (ifRoutingDataExist(routingVO, routingId)) { + throw new DBException(ExceptionMapping.DATA_EXISTS); + } + // 更新 + DraftMapRouting newRouting = routingVO.convert2Draft(); + newRouting.setId(routingId); + draftMapRoutingDAO.updateByPrimaryKeyWithBLOBs(newRouting); + } + + @Override + public void deleteRouting(Long routingId) { + draftMapRoutingDAO.deleteByPrimaryKey(routingId); + } + + /** + * 两个区段间只有一个交路 + * + * @param routingVO + * @param routingId + * @return + */ + private boolean ifRoutingExist(MapRoutingVO routingVO, Long routingId) { + DraftMapRoutingExample routingExample = new DraftMapRoutingExample(); + DraftMapRoutingExample.Criteria criteria = routingExample.createCriteria(); + criteria.andMapIdEqualTo(routingVO.getMapId()) + .andStartSectionCodeEqualTo(routingVO.getStartSectionCode()).andEndSectionCodeEqualTo(routingVO.getEndSectionCode()); + if (Objects.nonNull(routingId)) { + criteria.andIdNotEqualTo(routingId); + } + return !CollectionUtils.isEmpty(draftMapRoutingDAO.selectByExample(routingExample)); + } + + /** + * 两个区段间只有一个交路 + * + * @param routingVO + * @param routingId + * @return + */ + private boolean ifRoutingDataExist(MapRoutingDataVO routingVO, Long routingId) { + DraftMapRoutingExample routingExample = new DraftMapRoutingExample(); + DraftMapRoutingExample.Criteria criteria = routingExample.createCriteria(); + criteria.andMapIdEqualTo(routingVO.getMapId()) + .andStartSectionCodeEqualTo(routingVO.getStartSectionCode()).andEndSectionCodeEqualTo(routingVO.getEndSectionCode()); + if (Objects.nonNull(routingId)) { + criteria.andIdNotEqualTo(routingId); + } + return draftMapRoutingDAO.countByExample(routingExample) > 0; + } + + /*------------ Routing END ---------------------*/ + + @Override + public Map3dDataVO create3dMapData(Map3dDataVO mapData3D, UserVO user) { + DraftMap3dDataWithBLOBs mapData = mapData3D.convert2Draft(); + mapData.setCreatorId(user.getId()); + mapData.setCreateTime(LocalDateTime.now()); + draftMap3dDataDAO.insert(mapData); + mapData3D.setId(mapData.getId()); + return mapData3D; + } + + @Override + public Map3dDataVO find3dMapDataByMapId(Long mapId) { + DraftMap3dDataExample example = new DraftMap3dDataExample(); + example.createCriteria().andMapIdEqualTo(mapId); + List dbList = draftMap3dDataDAO.selectByExampleWithBLOBs(example); + if (!CollectionUtils.isEmpty(dbList)) { + return new Map3dDataVO(dbList.get(0)); + } + return null; + } + + @Override + public void update3dMapData(Long map3dId, Map3dDataVO mapData3D) { + DraftMap3dDataWithBLOBs data = draftMap3dDataDAO.selectByPrimaryKey(map3dId); + if (Objects.isNull(data)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + data.setAssets(mapData3D.getAssets()); + data.setSections(mapData3D.getSections()); + data.setSwitchs(mapData3D.getSwitchs()); + data.setSignals(mapData3D.getSignals()); + data.setStands(mapData3D.getStands()); + data.setTrains(mapData3D.getTrains()); + data.setUpdateTime(LocalDateTime.now()); + draftMap3dDataDAO.updateByPrimaryKeyWithBLOBs(data); + } + + @Override + public void handleSignalDirectionShowType() { + List mapList = this.draftMapDAO.selectByExampleWithBLOBs(null); + for (DraftMapWithBLOBs draftMap : mapList) { + String graphData = draftMap.getGraphData(); + MapGraphDataVO mapGraphDataVO = MapGraphDataVO.parse(graphData); + List signalList = mapGraphDataVO.getSignalList(); + if (!CollectionUtils.isEmpty(signalList)) { + signalList.forEach(mapSignalVO -> { + if (Objects.isNull(mapSignalVO.getDirectionShowType())) { + mapSignalVO.setDirectionShowType(mapSignalVO.getDirectionType()); + } + }); + draftMap.setGraphData(mapGraphDataVO.toJson()); + this.draftMapDAO.updateByPrimaryKey(draftMap); + } + } + } + + @Override + public void createStationParkTime(MapStationParkingTimeVO parkingTimeVO) { + DraftMapParkingTimeExample example = new DraftMapParkingTimeExample(); + example.createCriteria() + .andMapIdEqualTo(parkingTimeVO.getMapId()) + .andStationCodeEqualTo(parkingTimeVO.getStationCode()); + if (this.draftMapParkingTimeDAO.countByExample(example) > 0) { + throw new DBException(ExceptionMapping.DATA_EXISTS, "车站(" + parkingTimeVO.getStationCode() + ")停站时间数据已存在"); + } + DraftMapParkingTime draftMapParkingTime = parkingTimeVO.convert2Draft(); + this.draftMapParkingTimeDAO.insert(draftMapParkingTime); + } + + @Override + public PageVO queryPagedStationParkTime(Long mapId, MapParkTimeQueryVO queryVO) { + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + DraftMapParkingTimeExample example = new DraftMapParkingTimeExample(); + example.setOrderByClause("id"); + DraftMapParkingTimeExample.Criteria criteria = example.createCriteria(); + criteria.andMapIdEqualTo(mapId); + if (StringUtils.hasText(queryVO.getStationCode())) { + criteria.andStationCodeEqualTo(queryVO.getStationCode()); + } + Page page = (Page) this.draftMapParkingTimeDAO.selectByExampleWithBLOBs(example); + List parkingTimeList = page.getResult().stream().map(MapStationParkingTimeVO::convert2VO).collect(Collectors.toList()); + return PageVO.convert(page, parkingTimeList); + } + + @Override + public MapStationParkingTimeVO getStationParkTime(Long id) { + DraftMapParkingTime draftMapParkingTime = this.draftMapParkingTimeDAO.selectByPrimaryKey(id); + if (Objects.isNull(draftMapParkingTime)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST, + String.format("id为[%s]的草稿车站停站时间数据不存在", id)); + } + return MapStationParkingTimeVO.convert2VO(draftMapParkingTime); + } + + @Override + public void updateStationParkTime(Long id, MapStationParkingTimeVO parkingTimeVO) { + DraftMapParkingTime draftMapParkingTime = this.draftMapParkingTimeDAO.selectByPrimaryKey(id); + if (Objects.isNull(draftMapParkingTime)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST, + String.format("id为[%s]的草稿车站停站时间数据不存在", id)); + } + draftMapParkingTime.setSectionParkingTime(JsonUtils.writeValueAsString(parkingTimeVO.getParkingTimeVOList())); + this.draftMapParkingTimeDAO.updateByPrimaryKeyWithBLOBs(draftMapParkingTime); + } + + @Override + public void deleteStationParkTime(Long id) { + this.draftMapParkingTimeDAO.deleteByPrimaryKey(id); + } + + @Override + public void saveOperationDefinitions(Long mapId, MapDestinationCodeDefinitionVO definitionVO) { + + DraftMapWithBLOBs entity = getEntity(mapId); + String logicData = entity.getLogicData(); + List list; + if (StringUtils.isBlank(logicData)) { + list = new ArrayList<>(); + } else { + list = JsonUtils.read(logicData, JsonUtils.getCollectionType(ArrayList.class, MapDestinationCodeDefinitionVO.class)); + } + list.add(definitionVO); + entity.setLogicData(JsonUtils.writeValueAsString(list)); + draftMapDAO.updateByPrimaryKeyWithBLOBs(entity); + } + + @Override + public MapDestinationCodeDefinitionVO getOperationDefinitions(Long mapId, String code) { + DraftMapWithBLOBs entity = getEntity(mapId); + String logicData = entity.getLogicData(); + BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(StringUtils.hasText(logicData)); + List vos = JsonUtils.read(logicData, JsonUtils.getCollectionType(ArrayList.class, MapDestinationCodeDefinitionVO.class)); + Optional first = vos.stream().filter(vo -> Objects.equals(vo.getCode(), code)).limit(1).findFirst(); + BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(first.isPresent()); + return first.get(); + } + + @Override + public PageVO pagedQueryOperationDefinitions(Long mapId, MapDestinationCodeDefinitionQueryVO queryVO) { + DraftMapWithBLOBs entity = getEntity(mapId); + String logicData = entity.getLogicData(); + if (StringUtils.isBlank(logicData)) { + return new PageVO<>(queryVO.getPageNum(), queryVO.getPageSize(), 0, new ArrayList<>()); + } + List vos = JsonUtils.read(logicData, JsonUtils.getCollectionType(ArrayList.class, MapDestinationCodeDefinitionVO.class)); + vos.sort(Comparator.comparing(o -> Integer.valueOf(o.getCode()))); + int startIndex = (queryVO.getPageNum() - 1) * queryVO.getPageSize(); + if (startIndex > vos.size() - 1) { + return new PageVO<>(queryVO.getPageNum(), queryVO.getPageSize(), 0, new ArrayList<>()); + } + int endIndex = Math.min(startIndex + queryVO.getPageSize(), vos.size()); + List returnList = vos.subList(startIndex, endIndex); + PageVO pageVO = PageVO.convert(new Page(queryVO.getPageNum(), queryVO.getPageSize()), returnList); + pageVO.setTotal(vos.size()); + return pageVO; + } + + @Override + public void deleteOperationDefinition(Long mapId, String code) { + DraftMapWithBLOBs entity = getEntity(mapId); + String logicData = entity.getLogicData(); + if (StringUtils.hasText(logicData)) { + List vos = JsonUtils.read(logicData, JsonUtils.getCollectionType(ArrayList.class, MapDestinationCodeDefinitionVO.class)); + vos.removeIf(vo -> Objects.equals(vo.getCode(), code)); + entity.setLogicData(JsonUtils.writeValueAsString(vos)); + draftMapDAO.updateByPrimaryKeyWithBLOBs(entity); + } + } + + @Override + public void updateOperationDefinition(Long mapId, MapDestinationCodeDefinitionVO definitionVO) { + DraftMapWithBLOBs entity = getEntity(mapId); + String logicData = entity.getLogicData(); + BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(StringUtils.hasText(logicData)); + List vos = JsonUtils.read(logicData, JsonUtils.getCollectionType(ArrayList.class, MapDestinationCodeDefinitionVO.class)); + Optional first = vos.stream().filter(vo -> vo.getCode().equals(definitionVO.getCode())).limit(1).findFirst(); + BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(first.isPresent()); + MapDestinationCodeDefinitionVO old = first.get(); + vos.set(vos.indexOf(old), definitionVO); + entity.setLogicData(JsonUtils.writeValueAsString(vos)); + draftMapDAO.updateByPrimaryKeyWithBLOBs(entity); + } + + private DraftMapWithBLOBs findEntity(Long id) { + return draftMapDAO.selectByPrimaryKey(id); + } + + private DraftMapWithBLOBs getEntity(Long id) { + DraftMapWithBLOBs entity = findEntity(id); + BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertNotNull(entity); + return entity; + } +} diff --git a/src/main/java/club/joylink/rtss/services/EmailService.java b/src/main/java/club/joylink/rtss/services/EmailService.java new file mode 100644 index 000000000..be133036a --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/EmailService.java @@ -0,0 +1,97 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.configuration.configProp.MailConfig; +import club.joylink.rtss.configuration.configProp.OtherConfig; +import club.joylink.rtss.constants.BusinessConsts; +import club.joylink.rtss.constants.EmailSubject; +import club.joylink.rtss.constants.SystemEnv; +import club.joylink.rtss.vo.UserVO; +import lombok.Getter; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.ApplicationEvent; +import org.springframework.mail.SimpleMailMessage; +import org.springframework.mail.javamail.JavaMailSender; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +@Slf4j +@Service +public class EmailService implements IEmailService { + + public interface Subject { + String Valid_Code = "【琏课堂】验证码"; + } + + @Autowired + private JavaMailSender mailSender; //自动注入的Bean + + @Autowired + private MailConfig mailConfig; + + @Autowired + private ISysUserService sysUserService; + + @Autowired + private OtherConfig otherConfig; + + @Override + public void sendToOne(String toUser, String subject, String content) { + SimpleMailMessage smm = new SimpleMailMessage(); + smm.setFrom(this.mailConfig.getUsername()); + smm.setTo(toUser); + smm.setSubject(subject); + smm.setText(content); + this.mailSender.send(smm); + } + + @Override + public void sendToAll(Long userId, String subject, String content) { + if (Objects.isNull(userId)) return; + log.info("用户正在{}群发邮件",userId); + SimpleMailMessage smm = new SimpleMailMessage(); + smm.setFrom(this.mailConfig.getUsername()); + List usersWithEmail = sysUserService.getUsersWithEmail(); + if(CollectionUtils.isEmpty(usersWithEmail)){ + log.warn("邮件群发:不存在绑定邮件的用户!"); + return; + } + if(SystemEnv.isPrdEnv(this.otherConfig.getEnv())) { + smm.setTo(usersWithEmail.stream().filter(userVO -> userVO.getEmail().matches(BusinessConsts.EMAIL_FORMAT)).map(UserVO::getEmail).collect(Collectors.toList()).toArray(new String[0])); + }else { + smm.setTo(usersWithEmail.stream().filter(userVO -> Objects.equals(userVO.getId(),userId)&& userVO.getEmail().matches(BusinessConsts.EMAIL_FORMAT)).map(UserVO::getEmail).collect(Collectors.toList()).toArray(new String[0])); + } + smm.setSubject(subject); + smm.setText(content); + this.mailSender.send(smm); + } + + /**邮件事件异步监听*/ + @Override + public void handler(EmailAllSendingEvent event){ + if(event instanceof EmailAllSendingEvent){ + sendToAll(event.getSender(),EmailSubject.System_Notice.getSubject(),EmailSubject.System_Notice.buildContent(event.getTip(),event.getContent())); + } + } + + /**邮件群发事件*/ + @Getter + public static class EmailAllSendingEvent extends ApplicationEvent { + + private Long sender; + private String tip; + private String content; + + public EmailAllSendingEvent(Object source, Long sender, String tip, String content) { + super(source); + this.sender = sender; + this.tip = tip; + this.content = content; + } + } + +} diff --git a/src/main/java/club/joylink/rtss/services/ExamService.java b/src/main/java/club/joylink/rtss/services/ExamService.java new file mode 100644 index 000000000..6d056782c --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/ExamService.java @@ -0,0 +1,544 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.constants.BusinessConsts; +import club.joylink.rtss.dao.*; +import club.joylink.rtss.entity.*; +import club.joylink.rtss.exception.BusinessExceptionAssertEnum; +import club.joylink.rtss.services.student.IClassStudentUserService; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.*; +import club.joylink.rtss.vo.client.student.StudentClassVO; +import club.joylink.rtss.vo.client.userPermission.UserPermissionVO; +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; +import org.springframework.util.StringUtils; + +import java.time.LocalDateTime; +import java.util.*; +import java.util.Map.Entry; +import java.util.function.Function; +import java.util.stream.Collectors; + +@Service +public class ExamService implements IExamService{ + + @Autowired + private ExamDefinitionDAO examDefinitionDAO; + + @Autowired + private ExamDefinitionRulesDAO definitionRulesDAO; + + @Autowired + private UserExamMapper userExamMapper; + + @Autowired + private SysUserMapper sysUserMapper; + + @Autowired + private TrainingDAO trainingDAO; + + @Autowired + private IUserPermissionService iUserPermissionService; + + @Autowired + private ISysUserService iSysUserService; + + @Autowired + private ILessonService iLessonService; + + @Autowired + private ExamDefinitionRulesDAO examDefinitionRulesDAO; + + @Autowired + private IClassStudentUserService iClassStudentUserService; + + /** + * 创建考试定义 + */ + @Override + public void create(ExamDefinitionVO examDefinitionVO, UserVO userVO) { + examDefinitionVO.setCreatorId(userVO.getId()); + //检查分数是否合理 + BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(checkScore(examDefinitionVO)); + //检查考试名称和考试规则是否唯一 + checkExam(examDefinitionVO); + //插入考试定义表数据 + ExamDefinition examDefinition = examDefinitionVO.toDB(); + examDefinition.setCreateTime(LocalDateTime.now()); + examDefinition.setStatus(BusinessConsts.STATUS_USE); + // 判断是否是管理员并设置试用 + if(this.iSysUserService.isAdmin(userVO) && examDefinitionVO.getTrial()) { + examDefinition.setTrial(true); + }else { + examDefinition.setTrial(false); + } + examDefinitionDAO.insert(examDefinition); + + //插入试题规则表数据 + List examDefinitionRulesVOList = examDefinitionVO.getExamDefinitionRulesVOList(); + examDefinitionRulesVOList.forEach(examDefinitionRulesVO -> { + ExamDefinitionRules examDefinitionRules = examDefinitionRulesVO.toDB(); + examDefinitionRules.setExamId(examDefinition.getId()); + definitionRulesDAO.insert(examDefinitionRules); + }); + } + + private void checkExam(ExamDefinitionVO examDefinitionVO) { + //一个课程下考试名称查重 + ExamDefinitionExample examDefinitionExample = new ExamDefinitionExample(); + examDefinitionExample.createCriteria().andLessonIdEqualTo(examDefinitionVO.getLessonId()).andNameEqualTo(examDefinitionVO.getName()); + List examDefinitionList = examDefinitionDAO.selectByExample(examDefinitionExample); + BusinessExceptionAssertEnum.DATA_UNIQUE_PROPERTY_REPEAT.assertCollectionEmpty(examDefinitionList); + //考试规则查重 + //查询已创建的考试规则数据 + int rulesNum = examDefinitionVO.getExamDefinitionRulesVOList().stream().map(ExamDefinitionRulesVO::getNum).reduce(Integer::sum).orElse(0); + List examIdList = examDefinitionDAO.selectByRulesNumAndFullPoint(rulesNum, examDefinitionVO.getFullPoint(), examDefinitionVO.getLessonId()); + if(!CollectionUtils.isEmpty(examIdList)) { + //处理待校验数据 + Map> trainingTypeMap = examDefinitionVO.getExamDefinitionRulesVOList() + .stream().collect(Collectors.groupingBy(ExamDefinitionRulesVO::getTrainingType)); + for(Long examId : examIdList) { + ExamDefinitionRulesExample examDefinitionRulesExample = new ExamDefinitionRulesExample(); + examDefinitionRulesExample.createCriteria().andExamIdEqualTo(examId); + List examDefinitionRulesList = definitionRulesDAO.selectByExample(examDefinitionRulesExample); + Map> existTrainingTypeMap = ExamDefinitionRulesVO.convert2VOList(examDefinitionRulesList) + .stream().collect(Collectors.groupingBy(ExamDefinitionRulesVO::getTrainingType)); + //检查dataMap和map数据是否一样 + trainingTypeLoop : for(Entry> entry : trainingTypeMap.entrySet()) { + String trainingType = entry.getKey(); + // 校验实训类型 + if(null == existTrainingTypeMap.get(trainingType) || existTrainingTypeMap.get(trainingType).size() != entry.getValue().size()) { + break; + } + // 校验操作类型 + Map dataMap = entry.getValue().stream() + .collect(Collectors.toMap(ExamDefinitionRulesVO::getOperateType, Function.identity())); + Map map = existTrainingTypeMap.get(trainingType).stream() + .collect(Collectors.toMap(ExamDefinitionRulesVO::getOperateType, Function.identity())); + for(Entry en : dataMap.entrySet()) { + String operateType = en.getKey(); + if(null == map.get(operateType) || !en.getValue().equals(map.get(operateType))) { + break trainingTypeLoop; + }else { + rulesNum -= en.getValue().getNum(); + } + } + } + BusinessExceptionAssertEnum.DATA_UNIQUE_PROPERTY_REPEAT.assertNotTrue(0 == rulesNum); + } + } + } + + /** + * GZB创建考试定义 + */ + @Transactional + @Override + public void createGZBExam(ExamDefinitionVO examDefinitionVO, UserVO userVO) { + examDefinitionVO.setCreatorId(userVO.getId()); + + //检查分数是否合理 + BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(checkScore(examDefinitionVO)); + //检查考试名称和考试规则是否唯一 + checkName(examDefinitionVO); + //插入考试定义表数据 + ExamDefinition examDefinition = examDefinitionVO.toDB(); + examDefinition.setCreateTime(LocalDateTime.now()); + examDefinition.setStatus(BusinessConsts.STATUS_USE); + // 判断是否是管理员并设置试用 + if(this.iSysUserService.isAdmin(userVO) && examDefinitionVO.getTrial()) { + examDefinition.setTrial(true); + }else { + examDefinition.setTrial(false); + } + examDefinitionDAO.insert(examDefinition); + //插入试卷班级关系 + if(!CollectionUtils.isEmpty(examDefinitionVO.getClasses())) { + examDefinitionVO.getClasses().forEach(studentClassVO -> iClassStudentUserService.addExamRelClass(examDefinition.getId(),studentClassVO.getId())); + } + //插入试题规则表数据 + List examDefinitionRulesVOList = examDefinitionVO.getExamDefinitionRulesVOList(); + examDefinitionRulesVOList.forEach(examDefinitionRulesVO -> { + ExamDefinitionRules examDefinitionRules = examDefinitionRulesVO.toDB(); + examDefinitionRules.setExamId(examDefinition.getId()); + definitionRulesDAO.insert(examDefinitionRules); + }); + } + private void checkName(ExamDefinitionVO examDefinitionVO) { + //一个课程下考试名称查重 + ExamDefinitionExample examDefinitionExample = new ExamDefinitionExample(); + examDefinitionExample.createCriteria().andLessonIdEqualTo(examDefinitionVO.getLessonId()).andNameEqualTo(examDefinitionVO.getName()); + List examDefinitionList = examDefinitionDAO.selectByExample(examDefinitionExample); + BusinessExceptionAssertEnum.DATA_UNIQUE_PROPERTY_REPEAT.assertCollectionEmpty(examDefinitionList); + } + + /** + * 检查考试定义及规则分数是否合理 + * @param examDefinitionVO + * @return + */ + @Override + public boolean checkScore(ExamDefinitionVO examDefinitionVO) { + //获取定义的总分 + int defineFullScore = examDefinitionVO.getFullPoint(); + + //实际总分 + int realFullScore = 0; + List examDefinitionRulesVOList = examDefinitionVO.getExamDefinitionRulesVOList(); + for(ExamDefinitionRulesVO examDefinitionRulesVO : examDefinitionRulesVOList) { + realFullScore += examDefinitionRulesVO.getNum() * examDefinitionRulesVO.getPoint(); + } + + //定义的总分等于实际总分则合理,否则不合理 + return defineFullScore == realFullScore; + } + +// /** +// * 查询课程下有实训的章节信息 +// * @param lessonId +// * @return +// */ +// @Override +// public List queryChapterInfo(String lessonId) { +// //返回的结果 +// List examChapterInfoVOList = new ArrayList<>(); +// +// //查询数据 +// List lessonIds = new ArrayList<>(); +// lessonIds.add(Long.valueOf(lessonId)); +// List chapterVos = this.lsLessonChapterMapper.selectChapterTrainingByLessonIds(lessonIds); +// +// //检测章节是否为空 +// if (chapterVos.size() == 0) { +// throw new DBException(ExceptionMapping.DATA_NOT_EXIST); +// } +// +// //转换为VO对象 +// chapterVos.forEach(lessonChapterVO -> { +// ExamChapterInfoVO examChapterInfoVO = new ExamChapterInfoVO(); +// examChapterInfoVO.setId(lessonChapterVO.getId()); +// examChapterInfoVO.setName(lessonChapterVO.getName()); +// +// examChapterInfoVOList.add(examChapterInfoVO); +// }); +// +// return examChapterInfoVOList; +// } + + @Override + public List queryTrainingTypes(Long lessonId) { + // 获取课程,课程所属产品编码 + LessonVO lessonVO = iLessonService.getLessonInfo(lessonId); + // 获取产品下有实训的实训类型 + TrainingExample example = new TrainingExample(); + example.createCriteria() + .andMapIdEqualTo(lessonVO.getMapId()) + .andPrdTypeEqualTo(lessonVO.getPrdType()); + List trainings = this.trainingDAO.selectByExample(example); + Set trainingTypes = trainings.stream().map(Training::getType).collect(Collectors.toSet()); + return new ArrayList<>(trainingTypes); + } + + /** + * 查询试题定义的详细信息 + * @param examId + */ + @Override + public ExamDefinitionVO queryExamInfo(Long examId) { + //查询试题定义信息 + ExamDefinition examDefinition = examDefinitionDAO.selectByPrimaryKey(examId); + + //查询试题规则信息 + ExamDefinitionRulesExample example = new ExamDefinitionRulesExample(); + example.createCriteria().andExamIdEqualTo(examId); + List examDefinitionRulesList = definitionRulesDAO.selectByExample(example); + + BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertCollectionNotEmpty(examDefinitionRulesList); + + //转换为VO + List examDefinitionRulesVOList = new ArrayList<>(); + examDefinitionRulesList.forEach(examDefinitionRules -> { + ExamDefinitionRulesVO examDefinitionRulesVO = new ExamDefinitionRulesVO(examDefinitionRules); + examDefinitionRulesVOList.add(examDefinitionRulesVO); + }); + ExamDefinitionVO examDefinitionVO = new ExamDefinitionVO(examDefinition); + examDefinitionVO.setClasses(iClassStudentUserService.getClassesByExamId(examId)); + examDefinitionVO.setExamDefinitionRulesVOList(examDefinitionRulesVOList); + + return examDefinitionVO; + } + + /** + * 查询课程信息和课程下的试题信息 + */ + @Override + public ExamsLessonVO queryExamList(Long lessonId, UserVO userVO) { + + //查询课程信息 + LessonVO lessonVO = iLessonService.getLessonInfo(lessonId); + // 如果用户关联班级 查找班级关联试卷 + List studentRelIdClasses = this.iClassStudentUserService.getRelClassByUser(userVO.getId()); + List examIds = null; + if (!CollectionUtils.isEmpty(studentRelIdClasses)) { + Integer classId = studentRelIdClasses.get(0).getClassId(); + examIds = iClassStudentUserService.getRelExamIdsByClassId(classId); + } + //查询课程下的试题信息 + ExamDefinitionExample examDefinitionExample = new ExamDefinitionExample(); + examDefinitionExample.createCriteria().andLessonIdEqualTo(lessonId).andStatusEqualTo(BusinessConsts.STATUS_USE); + List examDefinitionList = examDefinitionDAO.selectByExample(examDefinitionExample); + // 检测试题是否有效 + LocalDateTime now = LocalDateTime.now(); + Iterator iterator = examDefinitionList.iterator(); + while (iterator.hasNext()) { + ExamDefinition exam = iterator.next(); + if (null != exam.getEndTime() && now.isAfter(exam.getEndTime())) { + this.offLine(exam.getId(), null); + iterator.remove(); + } else if (Objects.nonNull(examIds) && !examIds.contains(exam.getId())) { + iterator.remove(); + } + } + //转换为VO + ExamsLessonVO examsLessonVO = new ExamsLessonVO(lessonVO); + List examDefinitionVOList = new ArrayList<>(); + examDefinitionList.forEach(examDefinition -> { + ExamDefinitionVO exam = new ExamDefinitionVO(examDefinition); + // 试卷存在班级关系,获取班级列表 + List classes = iClassStudentUserService.getClassesByExamId(examDefinition.getId()); + if (!CollectionUtils.isEmpty(classes)) { + exam.setClasses(classes); + } + examDefinitionVOList.add(exam); + }); + examsLessonVO.setExamDefinitionList(examDefinitionVOList); + // 设置权限 +// List voList = userPermissionService.findTeachVOByMapIdAndUserId(lessonVO.getMapId(), userVO.getId()); + List examPermissions = this.iUserPermissionService.getExamUserPermission(userVO, + lessonVO.getMapId(), lessonVO.getPrdType(), lessonId); + examsLessonVO.setPermissionList(examPermissions); + return examsLessonVO; + } + + /** + * 查询试题列表信息 + */ + @Override + public PageVO queryExamInfoList(ExamDefinitionQueryVO queryVO) { + //查询试题列表 + ExamDefinitionExample examDefinitionExample = new ExamDefinitionExample(); + ExamDefinitionExample.Criteria criteria = examDefinitionExample.createCriteria(); + examDefinitionExample.setOrderByClause(" create_time DESC "); + //根据课程ID查询考试 + if (Objects.nonNull(queryVO.getLessonId())) { + criteria.andLessonIdEqualTo(queryVO.getLessonId()); + } else if (Objects.nonNull(queryVO.getMapId())) { + // 地图id查询 + List lessonList = this.iLessonService.queryLessonsOfMap(queryVO.getMapId()); + if (!CollectionUtils.isEmpty(lessonList)) { + List lessonIdList = lessonList.stream() + .map(LessonVO::getId) + .collect(Collectors.toList()); + criteria.andLessonIdIn(lessonIdList); + } else { + // 返回null + return new PageVO<>(); + } + } + if (StringUtils.hasText(queryVO.getStatus())) { + criteria.andStatusEqualTo(queryVO.getStatus()); + } + //根据考试名称模糊匹配 + if (StringUtils.hasText(queryVO.getName())) { + criteria.andNameLike(String.format("%%%s%%", queryVO.getName())); + } + //根据创建人名称模糊匹配 + if (StringUtils.hasText(queryVO.getCreatorName())) { + SysUserExample sysUserExample = new SysUserExample(); + sysUserExample.createCriteria().andNameLike(String.format("%%%s%%", queryVO.getCreatorName())); + List createrIdList = sysUserMapper.selectByExample(sysUserExample).stream() + .map(SysUser::getId).collect(Collectors.toList()); + if (createrIdList.size() == 0) { + createrIdList.add(null); + } + criteria.andCreatorIdIn(createrIdList); + } + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + Page examDefinitionList = (Page) examDefinitionDAO.selectByExample(examDefinitionExample); + + //转换为VO + List examDefinitionVOList = new ArrayList<>(); + LocalDateTime now = LocalDateTime.now(); + examDefinitionList.forEach(examDefinition -> { + ExamDefinitionVO examDefinitionVO = new ExamDefinitionVO(examDefinition); + if (Objects.nonNull(examDefinition.getEndTime()) && now.isAfter(examDefinition.getEndTime())) { + examDefinitionVO.setOverdue(true); + } + SysUser sysUser = sysUserMapper.selectByPrimaryKey(examDefinition.getCreatorId()); + if (Objects.nonNull(sysUser)) { + examDefinitionVO.setCreatorName(sysUser.getName()); + examDefinitionVO.setCreatorNickname(sysUser.getNickname()); + } + examDefinitionVOList.add(examDefinitionVO); + }); + return PageVO.convert(examDefinitionList, examDefinitionVOList); + } + + /** + * 删除指定ID的考试信息 + */ + @Override + public void deleteExam(String id, UserVO userVO) { + //判断是否已有用户参与考试,如果有,不能删除考试定义 + UserExamExample userExamExample = new UserExamExample(); + userExamExample.createCriteria().andExamIdEqualTo(Long.parseLong(id)); + BusinessExceptionAssertEnum.INVALID_OPERATION.assertTrue(userExamMapper.countByExample(userExamExample) < 0); + + //删除考试信息和规则信息 + ExamDefinition examDefinition = examDefinitionDAO.selectByPrimaryKey(Long.parseLong(id)); + BusinessExceptionAssertEnum.INVALID_OPERATION.assertTrue(examDefinition != null && userVO.getId().equals(examDefinition.getCreatorId())); + ExamDefinitionRulesExample example = new ExamDefinitionRulesExample(); + example.createCriteria().andExamIdEqualTo(Long.parseLong(id)); + definitionRulesDAO.deleteByExample(example); + examDefinitionDAO.deleteByPrimaryKey(Long.parseLong(id)); + } + +// /** +// * 查询章节下允许创建的最多题目数量 +// * +// * @param lessonId +// * @param chapterId +// * @return +// */ +// @Override +// public int queryTrainingNum(String lessonId, String chapterId) { +// Long chapterIdLong = ConvertUtil.str2Long(chapterId); +// Long lessonIdLong = ConvertUtil.str2Long(lessonId); +// +// //查询课程章节实训映射表信息 +// LsRelChapterTrainingExample example = new LsRelChapterTrainingExample(); +// example.setDistinct(true); +// example.createCriteria().andChapterIdEqualTo(chapterIdLong).andLessonIdEqualTo(lessonIdLong); +// List lsRelChapterTrainingList = lsRelChapterTrainingMapper.selectByExample(example); +// +// return lsRelChapterTrainingList.size(); +// } + + @Override + public Long queryTrainingNum(Long lessonId, String trainingType, String operateType) { + // 获取课程数据 + LessonVO lessonVO = iLessonService.getLessonInfo(lessonId); + // 根据产品编码和实训类型获取实训数量 + TrainingExample example = new TrainingExample(); + TrainingExample.Criteria criteria = example.createCriteria() + .andMapIdEqualTo(lessonVO.getMapId()) + .andPrdTypeEqualTo(lessonVO.getPrdType()) + .andTypeEqualTo(trainingType); + if(StringUtils.hasText(operateType)) { + criteria.andOperateTypeEqualTo(operateType); + } + return this.trainingDAO.countByExample(example); + } + + @Override + public void onLine(Long id, UserVO userVO) { + ExamDefinition exam = this.examDefinitionDAO.selectByPrimaryKey(id); + BusinessExceptionAssertEnum.INVALID_OPERATION.assertTrue( + iSysUserService.isAdmin(userVO) || exam.getCreatorId().equals(userVO.getId()) + ); + exam.setStatus(BusinessConsts.STATUS_USE); + this.examDefinitionDAO.updateByPrimaryKey(exam); + } + + @Override + public void offLine(Long id, UserVO userVO) { + ExamDefinition exam = this.examDefinitionDAO.selectByPrimaryKey(id); + BusinessExceptionAssertEnum.INVALID_OPERATION.assertTrue( + iSysUserService.isAdmin(userVO) || exam.getCreatorId().equals(userVO.getId()) + ); + exam.setStatus(BusinessConsts.STATUS_NOT_USE); + this.examDefinitionDAO.updateByPrimaryKey(exam); + } + + @Override + public void update(Long id, ExamDefinitionVO examDefinitionVO) { + ExamDefinition examDefinition = this.examDefinitionDAO.selectByPrimaryKey(id); + BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertNotNull(examDefinition); + iClassStudentUserService.getClassesByExamId(id).forEach(studentClassVO -> iClassStudentUserService.deleteExamRelClass(id)); + if(!CollectionUtils.isEmpty(examDefinitionVO.getClasses())){ + examDefinitionVO.getClasses().forEach(studentClassVO -> iClassStudentUserService.addExamRelClass(id, studentClassVO.getId())); + } + //考试名称查重 + String name = examDefinitionVO.getName(); + ExamDefinitionExample examDefinitionExample = new ExamDefinitionExample(); + examDefinitionExample.createCriteria().andNameEqualTo(name).andIdNotEqualTo(id); + List examDefinitionList = examDefinitionDAO.selectByExample(examDefinitionExample); + BusinessExceptionAssertEnum.DATA_UNIQUE_PROPERTY_REPEAT.assertCollectionEmpty(examDefinitionList); + examDefinition.setName(examDefinitionVO.getName()); + examDefinition.setTrial(examDefinitionVO.getTrial()); + this.examDefinitionDAO.updateByPrimaryKey(examDefinition); + } + + @Override + @Transactional + public void copy(Map lessonRelationMap, UserVO user) { + ArrayList lessonIdList = new ArrayList<>(lessonRelationMap.keySet()); + List examList = findEntityByLessonIdList(lessonIdList); + for (ExamDefinition exam : examList) { + //因为考试定义的id要变,先将考试规则查出来 + ExamDefinitionRulesExample rulesExample = new ExamDefinitionRulesExample(); + rulesExample.createCriteria() + .andExamIdEqualTo(exam.getId()); + List rulesList = examDefinitionRulesDAO.selectByExample(rulesExample); + //拷贝考试定义 + exam.setLessonId(lessonRelationMap.get(exam.getLessonId())); + exam.setCreatorId(user.getId()); + exam.setCreateTime(LocalDateTime.now()); + exam.setId(null); + examDefinitionDAO.insertSelective(exam); + for (ExamDefinitionRules rules : rulesList) { + rules.setId(null); + rules.setExamId(exam.getId()); + examDefinitionRulesDAO.insertSelective(rules); + } + } + +// ExamDefinitionExample examExample = new ExamDefinitionExample(); +// examExample.createCriteria() +// .andLessonIdEqualTo(sourceLessonId); +// List definitionList = this.examDefinitionDAO.selectByExample(examExample); +// if(!CollectionUtils.isEmpty(definitionList)) { +// definitionList.forEach(definition -> { +// // 拷贝考试定义 +// Long oldId = definition.getId(); +// definition.setId(null); +// definition.setLessonId(targetLessonId); +// definition.setCreatorId(user.getId()); +// this.examDefinitionDAO.insert(definition); +// Long newId = definition.getId(); +// // 拷贝考试规则 +// ExamDefinitionRulesExample example = new ExamDefinitionRulesExample(); +// example.createCriteria() +// .andExamIdEqualTo(oldId); +// List ruleList = this.definitionRulesDAO.selectByExample(example); +// if(!CollectionUtils.isEmpty(ruleList)) { +// ruleList.forEach(rules -> { +// rules.setId(null); +// rules.setExamId(newId); +// this.definitionRulesDAO.insert(rules); +// }); +// } +// }); +// } + } + + private List findEntityByLessonIdList(ArrayList lessonIdList) { + ExamDefinitionExample example = new ExamDefinitionExample(); + example.createCriteria().andLessonIdIn(lessonIdList); + return examDefinitionDAO.selectByExample(example); + } +} diff --git a/src/main/java/club/joylink/rtss/services/GoodsService.java b/src/main/java/club/joylink/rtss/services/GoodsService.java new file mode 100644 index 000000000..a8d47ce2a --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/GoodsService.java @@ -0,0 +1,456 @@ +package club.joylink.rtss.services; + +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import com.joylink.base.exception.BusinessException; +import com.joylink.base.exception.DBException; +import com.joylink.base.exception.constant.ExceptionMapping; +import club.joylink.rtss.constants.BusinessConsts; +import club.joylink.rtss.constants.SaleGoodsTypeEnum; +import club.joylink.rtss.constants.StatusEnum; +import club.joylink.rtss.dao.MapInfoDAO; +import club.joylink.rtss.dao.PermissionDAO; +import club.joylink.rtss.dao.SaleGoodsDAO; +import club.joylink.rtss.entity.Permission; +import club.joylink.rtss.entity.PermissionExample; +import club.joylink.rtss.entity.SaleGoods; +import club.joylink.rtss.entity.SaleGoodsExample; +import club.joylink.rtss.util.ConvertUtil; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.GoodsTryVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.goods.GoodsCreateVO; +import club.joylink.rtss.vo.client.goods.GoodsQueryVO; +import club.joylink.rtss.vo.client.goods.GoodsUpdateVO; +import club.joylink.rtss.vo.client.goods.GoodsVO; +import club.joylink.rtss.vo.client.permission.PermissionCreateVO; +import club.joylink.rtss.vo.client.permission.PermissionQueryVO; +import club.joylink.rtss.vo.client.permission.PermissionSelectVO; +import club.joylink.rtss.vo.client.permission.PermissionVO; +import lombok.extern.slf4j.Slf4j; +import org.springframework.util.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.time.LocalDateTime; +import java.util.*; +import java.util.stream.Collectors; + +@Service +@Slf4j +public class GoodsService implements IGoodsService { + + @Autowired + private SaleGoodsDAO saleGoodsDAO; + + @Autowired + private PermissionDAO permissionDAO; + + @Autowired + private IPermissionService iPermissionService; + + @Autowired + private MapInfoDAO mapInfoDAO; + + @Override + public PageVO queryPagedGoods(GoodsQueryVO queryVO) { + //设置查询条件 + SaleGoodsExample example = new SaleGoodsExample(); + example.setOrderByClause("id desc"); + SaleGoodsExample.Criteria criteria = example.createCriteria(); + if (StringUtils.hasText(queryVO.getName())) { + criteria.andNameLike("%" + queryVO.getName() + "%"); + } + PermissionQueryVO permissionQueryVO = new PermissionQueryVO(); + permissionQueryVO.setMapId(queryVO.getMapId()); + permissionQueryVO.setIsPackage(queryVO.getIsPackage()); + List permissionVOList = iPermissionService.queryPermission(permissionQueryVO); + List perIds = permissionVOList.stream().map(PermissionVO::getId).collect(Collectors.toList()); + if (CollectionUtils.isEmpty(perIds)) { + // 没有权限,返回 + return new PageVO<>(); + } + criteria.andPermissionIdIn(perIds); + if (StringUtils.hasText(queryVO.getStatus())) { + criteria.andStatusEqualTo(queryVO.getStatus()); + } + + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + Page page = (Page) saleGoodsDAO.selectByExample(example); + List goodsVOList = new ArrayList<>(); + GoodsVO goodsVO; + for (SaleGoods goods : page.getResult()) { + goodsVO = new GoodsVO(goods); + PermissionVO perVO = iPermissionService.getById(goods.getPermissionId()); + goodsVO.setPermissionName(perVO.getName()); + goodsVO.setMapName(mapInfoDAO.selectByPrimaryKey(perVO.getMapId()).getName()); + goodsVOList.add(goodsVO); + } + + return PageVO.convert(page, goodsVOList); + } + + /** + * 根据id查询商品。 + * + * @param id + * @return + */ + @Override + public GoodsVO selectById(long id) { + SaleGoods goods = saleGoodsDAO.selectByPrimaryKey(id); + if (goods == null) { + return null; + } + return new GoodsVO(goods); + } + + /** + * 创建商品。 + * 如果商品已存在,报DBException(数据已存在) + * 如果有重名商品,报DBException(名称重复) + * + * @param createVO + * @param user + * @return + */ + @Override + @Transactional + public GoodsVO createGoods(GoodsCreateVO createVO, UserVO user) { + //判断商品是否已存在 + if (!findGoodsByPermissionId(createVO.getPermissionId()).isEmpty()) { + throw new DBException(ExceptionMapping.DATA_EXISTS); + } + + //判断是否和已有商品重名 + if (isNameExist(createVO.getName())) { + throw new DBException(ExceptionMapping.NAME_REPEAT, String.format("名称为[%s]的商品已存在", createVO.getName())); + } + + //添加商品 + SaleGoods goods = createVO.convert2DB(); + goods.setStatus(StatusEnum.Valid.getCode()); + goods.setCreateTime(LocalDateTime.now()); + goods.setCreatorId(user.getId()); + saleGoodsDAO.insertSelective(goods); + return new GoodsVO(goods); + + } + + /** + * 创建多个商品。 + * 如果商品已存在,将查询到的商品加入返回的List; + * 如果有重名商品,报DBException(名称重复!) + * + * @param createVOList + * @param userVO + * @return + */ + @Transactional + @Override + public List createManyGoods(List createVOList, UserVO userVO) { + List returnGoodsVOList = new ArrayList<>(); + for (GoodsCreateVO createVO : createVOList) { + GoodsVO goods = new GoodsVO(); + try { + goods = createGoods(createVO, userVO); + } catch (DBException e) { + switch (e.getErrcode()) { + case 20001: + goods = selectGoodsByPermissionId(createVO.getPermissionId()); + break; + case 20003: + throw e; + } + } + returnGoodsVOList.add(goods); + } + return returnGoodsVOList; + } + + @Override + public void deleteGoods(long id) { + saleGoodsDAO.deleteByPrimaryKey(id); + } + + @Override + public void tryUse(Long id, Map map, UserVO user) { + + } + + /** + * 改变商品状态(有效/无效)。 + * 如果要改变状态的商品不存在,报DBException(DATA_NOT_EXIST) + * + * @param id + */ + @Override + public void toggleGoodsStatus(long id) { + SaleGoods goods = getEntityById(id); + + switch (goods.getStatus()) { + case "0": + goods.setStatus(SaleGoodsTypeEnum.Type_Valid.getCode()); + break; + case "1": + goods.setStatus(SaleGoodsTypeEnum.Type_Invalid.getCode()); + break; + } + + saleGoodsDAO.updateByPrimaryKeySelective(goods); + } + + private SaleGoods getEntityById(long id) { + SaleGoods goods = saleGoodsDAO.selectByPrimaryKey(id); + if (goods == null) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST, String.format("id为[%s]的商品不存在", id)); + } + return goods; + } + + /** + * 通过权限id查询商品。 + * 如果不存在,return一个只有permissionName和permissionType的GoodsVO + * + * @param permissionId + * @return + */ + @Override + public GoodsVO selectGoodsByPermissionId(Long permissionId) { + SaleGoodsExample example = new SaleGoodsExample(); + example.createCriteria() + .andPermissionIdEqualTo(permissionId); + List goodsList = saleGoodsDAO.selectByExample(example); + GoodsVO goodsVO; + if (goodsList.isEmpty()) { + goodsVO = new GoodsVO(); + PermissionVO perVO = iPermissionService.findById(permissionId); + goodsVO.setPermissionName(perVO.getName()); + goodsVO.setPermissionType(perVO.getType()); + } else { + goodsVO = new GoodsVO(goodsList.get(0)); + } + return goodsVO; + } + + /** + * 根据关联权限ids查询权限包是否有对应的商品。 + * 如果权限包和商品都没有,return null + * 如果有权限包但没有对应的商品,返回一个只有permissionId和permissionName的goodsVO + * + * @param relPermissionIds + * @return + */ + @Override + public GoodsVO findGoodsByPermissionIds(Long[] relPermissionIds) { + List voList = iPermissionService.findPermissionByRelPermissionIds(Arrays.asList(relPermissionIds)); + if (voList.isEmpty()) { + return null; + } + PermissionVO perVO = voList.get(0); + GoodsVO goodsVO = selectGoodsByPermissionId(voList.get(0).getId()); + if (goodsVO == null) { + goodsVO = new GoodsVO(); + goodsVO.setPermissionId(perVO.getId()); + goodsVO.setPermissionName(perVO.getName()); + } + return goodsVO; + } + + /** + * 通过关联权限创建权限包商品。 + * + * @param createVO + * @param userVO + * @return + */ + @Transactional + @Override + public GoodsVO createGoodsByRelPermissions(GoodsCreateVO createVO, UserVO userVO) { + //创建权限包 + List permissionIds = createVO.getRelPermissionIds(); + PermissionCreateVO permissionCreateVO = new PermissionCreateVO(); + permissionCreateVO.setRelPermissions(permissionIds); + permissionCreateVO.setName(createVO.getName()); + permissionCreateVO.setRemarks(createVO.getRemarks()); + Long permissionId; + try { + permissionId = Long.parseLong(iPermissionService.create(permissionCreateVO, userVO)); + } catch (BusinessException e) { + permissionId = iPermissionService.getPermissionByRelPermissionIds(createVO.getRelPermissionIds()).get(0).getId(); + } + + //创建商品 + createVO.setPermissionId(permissionId); + GoodsVO goods = createGoods(createVO, userVO); + return goods; + } + + /** + * 查询指定地图、产品(课程)下的权限对应的商品 + * @param queryVO + * @return + */ + @Override + public PageVO queryPagedGoodsByPermission(PermissionQueryVO queryVO) { + PermissionExample permissionExample = new PermissionExample(); + PermissionExample.Criteria criteria = permissionExample.createCriteria() + .andMapIdEqualTo(queryVO.getMapId()) + .andPrdTypeEqualTo(queryVO.getPrdType()) + .andTypeEqualTo(queryVO.getType()); + if (queryVO.getLessonId() != null) { + criteria.andLessonIdEqualTo(queryVO.getLessonId()); + } + List permissionList = permissionDAO.selectByExample(permissionExample); + List permissionIds = permissionList.stream().map(Permission::getId).collect(Collectors.toList()); + SaleGoodsExample example = new SaleGoodsExample(); + example.createCriteria().andPermissionIdIn(permissionIds); + + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + Page page = (Page) saleGoodsDAO.selectByExample(example); + List goodsVOList = new ArrayList<>(); + for (SaleGoods goods : page.getResult()) { + goodsVOList.add(new GoodsVO(goods)); + } + return PageVO.convert(page, goodsVOList); + } + + @Override + public List selectValidGoodsList() { + SaleGoodsExample goodsExample = new SaleGoodsExample(); + goodsExample.createCriteria().andStatusEqualTo(BusinessConsts.STATUS_USE); + List goodsList = saleGoodsDAO.selectByExample(goodsExample); + return goodsList.stream().map(saleGoods -> { + GoodsVO goodsVO = new GoodsVO(); + goodsVO.setId(saleGoods.getId()); + goodsVO.setName(saleGoods.getName()); + goodsVO.setPrice(ConvertUtil.long2FloatByWeight(saleGoods.getPrice(), 100)); + return goodsVO; + }).collect(Collectors.toList()); + } + + @Override + public GoodsTryVO getTryUseTime(PermissionSelectVO permissionSelectVO, UserVO user) { + return null; + } + + public List findGoodsByPermissionId(Long permissionId) { + SaleGoodsExample example = new SaleGoodsExample(); + example.createCriteria().andPermissionIdEqualTo(permissionId); + return saleGoodsDAO.selectByExample(example); + } + + /** + * 更新商品。 + * 如果要更新的商品不存在,报DBException(数据不存在) + * @param id + * @param updateVO + * @param user + */ + public void updateGoods(Long id, GoodsUpdateVO updateVO, UserVO user) { + if (!isExist(id)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST, String.format("id为[%s]的商品不存在", id)); + } + SaleGoods goods = updateVO.convert2DB(); + goods.setId(id); + goods.setUpdateUserId(user.getId()); + goods.setUpdateTime(LocalDateTime.now()); + + saleGoodsDAO.updateByPrimaryKeySelective(goods); + } + + @Override + public boolean isExist(Long id) { + SaleGoods goods = saleGoodsDAO.selectByPrimaryKey(id); + if (goods == null) { + return false; + } + return true; + } + + public boolean isNameExist(String name) { + SaleGoodsExample example = new SaleGoodsExample(); + example.createCriteria() + .andNameEqualTo(name); + if (saleGoodsDAO.selectByExample(example).isEmpty()) { + return false; + } + return true; + } + + public SaleGoods findById(Long id) { + return saleGoodsDAO.selectByPrimaryKey(id); + } + + public GoodsVO getById(Long id) { + SaleGoods goods = saleGoodsDAO.selectByPrimaryKey(id); + if (goods == null) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST, String.format("id为[%s]的商品不存在", id)); + } + return new GoodsVO(goods); + } + + public SaleGoods findByPermissionId(Long permissionId) { + Objects.requireNonNull(permissionId); + SaleGoodsExample example = new SaleGoodsExample(); + example.createCriteria() + .andPermissionIdEqualTo(permissionId); + List goodsList = saleGoodsDAO.selectByExample(example); + if (goodsList.isEmpty()) { + return null; + } + return goodsList.get(0); + } + + private SaleGoods getEntieyByPermissionId(Long permissionId) { + SaleGoods goods = findByPermissionId(permissionId); + if (goods == null) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST, String.format("权限id为[%s]的商品不存在", permissionId)); + } + return goods; + } + + @Override + public GoodsVO getByPermissionId(Long permissionId) { + SaleGoods goods = getEntieyByPermissionId(permissionId); + return new GoodsVO(goods); + } + + @Override + public void autoGenerateGoods(PermissionVO permissionVO, UserVO user) { + if (!this.isPermissionGoodsExist(permissionVO.getId())) { // 不存在,创建 + SaleGoods goods = new SaleGoods(); + goods.setPermissionId(permissionVO.getId()); + goods.setName(permissionVO.getName()); + goods.setPrice(getPermissionPrice(permissionVO)); + goods.setTryUse(false); + goods.setStatus(StatusEnum.Valid.getCode()); + goods.setCreateTime(LocalDateTime.now()); + goods.setCreatorId(user.getId()); + this.saleGoodsDAO.insert(goods); + } + } + + /** + * 根据权限类型获取价格 + * @param permission + * @return + */ + private Long getPermissionPrice(PermissionVO permission) { + return 10000l; + } + + /** + * 权限商品是否已经存在 + * @param permissionId + * @return + */ + private boolean isPermissionGoodsExist(Long permissionId) { + SaleGoodsExample example = new SaleGoodsExample(); + example.createCriteria() + .andPermissionIdEqualTo(permissionId); + return this.saleGoodsDAO.countByExample(example) > 0; + } +} diff --git a/src/main/java/club/joylink/rtss/services/IAuthenticateService.java b/src/main/java/club/joylink/rtss/services/IAuthenticateService.java new file mode 100644 index 000000000..87238d260 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/IAuthenticateService.java @@ -0,0 +1,83 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.constants.Project; +import club.joylink.rtss.vo.LoginUserInfoVO; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.LoginStatusVO; +import club.joylink.rtss.vo.client.LoginUserVO; + +public interface IAuthenticateService { + + /** + * 获取登陆状态/token + * @param sessionId + * @return + */ + LoginStatusVO checkStatus(String sessionId); + + + /** + * 通过密码登陆 + * @param loginUser + */ + String loginWithPwd(LoginUserVO loginUser); + + /** + * 登出 + * @param token + */ + void logout(String token); + + /** + * 微信小程序扫登陆二维码 + * @param code + * @param state + * @return + */ + UserVO scanWmLoginQrCode(String code, String state); + + /** + * 获取微信小程序登陆url + * @param clientId + * @param secret + * @param project + * @param deviceCode + * @return + */ + LoginStatusVO getWmLoginUrl(String clientId, String secret, Project project, String deviceCode); + + /** + * 微信小程序确认登陆 + * @param code + * @param state + */ + void wmConfirmClientLogin(String code, String state); + + /** + * 通过token获取登陆用户信息 + * @param token + */ + LoginUserInfoVO getLoginUserInfoByToken(String token); + + /** + * 根据微信小程序code获取用户(若不存在,创建用户);若已登录,则绑定微信 + * @param code + * @return + */ + UserVO getOrCreateUserByWmcode(String code); + + /** + * + * @param code + * @return + */ + String getTokenByWmCode(String code); + + boolean isTokenExpired(String token); + + /** + * 预登出(前端在刷新/关闭标签页的时候调用) + * @param token + */ + void preLogout(String token); +} diff --git a/src/main/java/club/joylink/rtss/services/ICommandService.java b/src/main/java/club/joylink/rtss/services/ICommandService.java new file mode 100644 index 000000000..5255313b2 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/ICommandService.java @@ -0,0 +1,59 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.vo.client.CommandCopyVO; +import club.joylink.rtss.vo.client.CommandDefinitionQueryVO; +import club.joylink.rtss.vo.client.CommandDefinitionVO; +import club.joylink.rtss.vo.client.PageVO; + +import java.util.List; + +public interface ICommandService { + + /** + * 添加指令定义 + * @param definitionVO + */ + void addDefinition(CommandDefinitionVO definitionVO); + + /** + * 分页带条件查询指令定义 + * @param lineCode + * @param queryVO + * @return + */ + PageVO queryPagedDefinitions(String lineCode, CommandDefinitionQueryVO queryVO); + + /** + * 根据线路编号查询操作定义 + * @param lineCode + * @return + */ + List queryDefinitionsByLineCode(String lineCode); + + /**查询指令*/ + List queryDefinitions(String lineCode, String prdType, String simulationRole); + + /** + * 根据id查询指令定义 + * @param id + * @return + */ + CommandDefinitionVO queryDefinitionById(Long id); + + /** + * 修改指令定义 + * @param definitionVO + */ + void updateDefinition(CommandDefinitionVO definitionVO); + + /** + * 删除指令定义 + * @param id + */ + void deleteDefinition(Long id); + + /** + * 复制指令 + */ + void copy(CommandCopyVO copyVO); +} diff --git a/src/main/java/club/joylink/rtss/services/ICompanyService.java b/src/main/java/club/joylink/rtss/services/ICompanyService.java new file mode 100644 index 000000000..d06c9230b --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/ICompanyService.java @@ -0,0 +1,24 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.vo.client.CompanyQueryVO; +import club.joylink.rtss.vo.client.CompanyVO; +import club.joylink.rtss.vo.client.PageVO; + +import java.util.List; + +public interface ICompanyService { + + List queryOrganizations(); + + CompanyVO create(CompanyVO organization); + + CompanyVO update(Integer id, CompanyVO companyVO); + + void deleteById(Integer companyId); + + CompanyVO getById(Integer companyId); + + boolean isExist(Integer companyId); + + PageVO queryPageOrganizations(CompanyQueryVO queryVO); +} diff --git a/src/main/java/club/joylink/rtss/services/IDailyRunPlanService.java b/src/main/java/club/joylink/rtss/services/IDailyRunPlanService.java new file mode 100644 index 000000000..0ddae51e4 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/IDailyRunPlanService.java @@ -0,0 +1,121 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.runplan.RunPlanEChartsDataVO; +import club.joylink.rtss.vo.client.runplan.RunPlanQueryVO; +import club.joylink.rtss.vo.client.runplan.RunPlanVO; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +public interface IDailyRunPlanService { + + /** + * 获取运行图计划日期(凌晨2点前,加载前一天的运行图) + * @return + */ + default LocalDate getRunPlanDate() { + LocalDateTime now = LocalDateTime.now(); + if(now.getHour() < 2) { + return now.toLocalDate().minusDays(1); + } else { + return now.toLocalDate(); + } + } + + /** + * 查询用户某日运行图 + * @param userId + * @param mapId + * @param date + */ + RunPlanVO findUserRunPlan(Long userId, Long mapId, LocalDate date); + + /** + * 从用户的加载计划创建用户某日运行图 + * @param userId + * @param mapId + * @param date + * @return + */ + RunPlanVO createUserRunPlanFromLoadPlan(Long userId, Long mapId, LocalDate date); + + /** + * 获取当日运行图(优先查询用户的运行图,若不存在,则取通用运行图) + * @param mapId + * @param userId + */ + RunPlanVO getRunPlan(Long mapId, Long userId); + + /** + * 获取当日运行图(通用运行图) + * @param mapId + */ + RunPlanVO getRunPlan(Long mapId); + + /** + * 分页查询运行计划 + * @param queryVO + * @return + */ + PageVO queryPagedRunPlan(RunPlanQueryVO queryVO); + + /** + * 删除计划 + * @param user + * @param planId + */ + void deletePlan(UserVO user, Long planId); + + /** + * 查询运行图echarts数据 + * @param planId + * @return + */ + RunPlanEChartsDataVO selectDiagramData(Long planId); + + /** + * 创建每日运行计划 + * @param plan + * @param mapId + * @param date + * @param userId + * @return + */ + RunPlanVO createDailyRunPlan(RunPlanVO plan, Long mapId, LocalDate date, Long userId); + + /** + * 创建通用的每日运行计划 + * @param plan + * @param mapId + * @param date + * @return + */ + RunPlanVO createCommonDailyRunPlan(RunPlanVO plan, Long mapId, LocalDate date); + + /** + * 根据id查询每日运行计划 + * @param id + * @return + */ + RunPlanVO findRunPlanById(Long id); + + /** + * 查询通用计划 + * @param mapId + * @param date + */ + RunPlanVO findCommonRunPlan(Long mapId, LocalDate date); + + /** + * 根据id获取每日运行计划 + * @param id + * @return + */ + RunPlanVO getRunPlanById(Long id); + + boolean isUserRunPlanOfDayExist(Long userId, Long mapId, Long templatePlanId, LocalDate day); + + boolean isCommonRunPlanExist(Long mapId, Long templatePlanId, LocalDate day); +} diff --git a/src/main/java/club/joylink/rtss/services/IDraftMapRunPlanService.java b/src/main/java/club/joylink/rtss/services/IDraftMapRunPlanService.java new file mode 100644 index 000000000..8f9e0a63e --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/IDraftMapRunPlanService.java @@ -0,0 +1,47 @@ +package club.joylink.rtss.services; + + +import club.joylink.rtss.entity.DraftMapRunPlan; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.runplan.RunPlanEChartsDataVO; + +import java.util.List; + +public interface IDraftMapRunPlanService { + /** + * 从正式发布地图的运行图中导入到用户自己玩的运行图 + * @param templateId + * @param name + * @param draftMapId + */ + void createFrom(Long templateId, String name, Long draftMapId); + + /** + * 根据草稿地图id查询草稿地图运行图 + * @param draftMapId + * @return + */ + List findByDraftMapId(Long draftMapId); + + /** + * 根据草稿运行图id查询数据绘制运行图 + * @param planId + * @return + */ + RunPlanEChartsDataVO selectDiagramData(Long planId); + + /** + * 运行图仿真测试 + * @param planId + * @param userVO + * @return + */ + String simulationCheck(Long planId, UserVO userVO); + + /** + * 根据草稿地图id查询车站 + * @param draftMapId + * @return + */ + List selectMapStation(Long draftMapId); +} diff --git a/src/main/java/club/joylink/rtss/services/IDraftMapService.java b/src/main/java/club/joylink/rtss/services/IDraftMapService.java new file mode 100644 index 000000000..8c9dfe28a --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/IDraftMapService.java @@ -0,0 +1,409 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageQueryVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.TreeNode; +import club.joylink.rtss.vo.client.map.*; +import club.joylink.rtss.vo.client.map.newmap.*; +import club.joylink.rtss.vo.client.map.newmap.MapDestinationCodeDefinitionVO; + +import java.util.List; +import java.util.Map; + +public interface IDraftMapService { + + /** + * 获取地图数据草稿列表 + * @param userVO + * @return + */ + List list(UserVO userVO); + + List list(Boolean drawWay, UserVO userVO); + + /** + * 根据草稿地图id查询数据 + * @param draftMapId + * @return + */ + DraftMapVO findById(Long draftMapId); + + /** + * 获取皮肤草稿地图树 + * @param userVO + * @return + */ + List tree(UserVO userVO); + + /** + * 创建地图 + * @param mapDraftVo + * @param user + * @return + */ + String create(DraftMapVO mapDraftVo, UserVO user); + + /** + * 修改地图草稿信息 + * @param id + * @param draftMapVO + * @param userVO + */ + void update(Long id, DraftMapVO draftMapVO, UserVO userVO); + + /** + * 地图草稿另存为 + * @param id + * @param name + * @return + */ + String saveAs(Long id, String name); + + /** + * 查询地图详细数据 + * @param id + * @return + */ + Object getMapShapeData(Long id); + + /** + * 保存地图元素数据 + * @param id + * @param shapeData + */ + void saveMapElsDetail(Long id, String shapeData); + void saveNewMapElsDetail(Long id, MapGraphDataNewVO shapeVO); + + /** + * 导出草稿地图 + * @param id + * @return + */ + MapVO export(Long id); + + /** + * 地图数据导入 + * @param mapVO + * @param userVO + */ + void importFrom(MapVO mapVO, UserVO userVO); + + /** + * 从正式地图创建草稿地图 + * @param id - 地图id + * @param name - 草稿地图名称 + */ + void createFrom(Long id, String name, UserVO user); + + /** + * 地图草稿发布为正式地图 + * @param id - 草稿地图id + * @param draftMapVO - 发布的正式地图名称 + */ + void publish(Long id, DraftMapVO draftMapVO, UserVO user); + + void publish(Long id, DraftMapVO draftMapVO, UserVO userVO, MapDataVO mapDataVO); + + /** + * 地图三维数据发布 + * @param id + * @param draftMapVO + * @param user + */ + void publish3DData(Long id, DraftMapVO draftMapVO, UserVO user); + + /** + * 获取地图数据 + * @param id + * @return + */ + MapDataVO getMapData(Long id); + + /** + * 数据校验 + * @param mapDataVO + * @return + */ + List checkData(MapDataVO mapDataVO); + + /** + * 删除地图草稿 + * @param id + * @param user + */ + void deleteMap(Long id, UserVO user); + + /** + * 创建联动道岔关系 + * @param vo + */ + void createSwitchCoupled(MapSwitchCoupledVO vo); + + /** + * 查询该地图的联动道岔关系数据 + * @param mapId + * @param queryVO + * @return + */ + PageVO selectSwitchCoupled(Long mapId, MapSwitchCoupledQueryVO queryVO); + + /** + * 删除联动道岔关系 + * @param coupleId + */ + void delSwitchCoupled(Long coupleId); + + void createApproachSection(MapSignalApproachSectionVO approachSectionVO); + + PageVO queryPagedApproachSection(Long mapId, MapApproachSectionQueryVO queryVO); + + MapSignalApproachSectionVO getApproachSectionById(Long id); + + void updateApproachSection(Long id, MapSignalApproachSectionVO approachSectionVO); + + void deleteApproachSection(Long id); + + /** + * 创建自动信号 + * @param autoSignalVO + */ + void createAutoSignal(MapAutoSignalVO autoSignalVO); + + void createAutoSignal(MapAutoSignalNewVO autoSignalVO); + + /** + * 分页获取自动信号 + * @param mapId + * @param queryVO + * @return + */ + PageVO queryPagedAutoSignal(Long mapId, MapAutoSignalQueryVO queryVO); + + PageVO queryPagedAutoSignalNew(Long mapId, MapAutoSignalQueryVO queryVO); + + MapAutoSignalVO getAutoSignal(Long autoSignalId); + + MapAutoSignalNewVO getAutoSignalNew(Long autoSignalId); + + /** + * 更新自动信号 + * @param autoSignalId + * @param autoSignalVO + */ + void updateAutoSignal(Long autoSignalId, MapAutoSignalVO autoSignalVO); + + void updateAutoSignal(Long autoSignalId, MapAutoSignalNewVO autoSignalVO); + + /** + * 删除自动信号 + * @param autoSignalId + */ + void deleteAutoSignal(Long autoSignalId); + + /** + * 保存进路数据 + * @param routeVO + */ + void createRoute(MapRouteVO routeVO); + + void createRoute(MapRouteNewVO routeVO); + + /** + * 分页查询进路数据 + * @param mapId + * @param queryVO + * @return + */ + PageVO queryPagedRoute(Long mapId, MapRouteQueryVO queryVO); + + PageVO queryPagedRouteNew(Long mapId, MapRouteQueryVO queryVO); + + /** + * 获取进路详情数据 + * @param routeId + * @return + */ + MapRouteVO getRouteDetail(Long routeId); + + MapRouteNewVO getRouteDetailNew(Long routeId); + + /** + * 更新进路数据 + * @param routeId + * @param routeVO + */ + void updateRoute(Long routeId, MapRouteVO routeVO); + + void updateRoute(Long routeId, MapRouteNewVO routeVO); + /** + * 删除进路数据 + * @param routeId + */ + void deleteRoute(Long routeId); + + /*------------overlap start ---------------------*/ + + void createOverlap(MapOverlapVO mapOverlapVO); + + PageVO queryPagedOverlap(Long mapId, MapOverlapQueryVO queryVO); + + MapOverlapVO getOverlapById(Long id); + + void updateOverlap(Long id, MapOverlapVO mapOverlapVO); + void deleteOverlap(Long id); + + /*------------autoReentry start ---------------------*/ + + void createAutoReentry(MapAutoReentryVO mapAutoReentryVO); + + PageVO queryPagedAutoReentry(Long mapId, MapAutoReentryQueryVO queryVO); + + Map> queryAutoReentrysGroupByReentryTrack(Long mapId); + + MapAutoReentryVO getAutoReentryById(Long id); + + void updateAutoReentry(Long id, MapAutoReentryVO mapAutoReentryVO); + + void deleteAutoReentry(Long id); + + /** + * 获取路径单元列表 + * @param mapId + * @param queryVO + * @return + */ + PageVO getRouteUnitList(Long mapId, MapRouteUnitQueryVO queryVO); + + /** + * 创建路径单元 + * @param mapRouteUnitVO + */ + void createRouteUnit(MapRouteUnitVO mapRouteUnitVO); + + /** + * 获取路径单元 + * @param routeUnitId + * @return + */ + MapRouteUnitVO getRouteUnit(Long routeUnitId); + + /** + * 更新路径单元 + * @param routeUnitId + * @param mapRouteUnitVO + */ + void updateRouteUnit(Long routeUnitId, MapRouteUnitVO mapRouteUnitVO); + + /** + * 删除路径单元 + * @param routeUnitId + */ + void deleteRouteUnit(Long routeUnitId); + + /** + * 创建交路 + * @param routingVO + */ + void createRouting(MapRoutingVO routingVO); + + void createRoutingData(MapRoutingDataVO routingVO); + + MapRoutingDataVO generateRoutingData(MapRoutingDataVO routingVO); + + /** + * 分页获取交路 + * + * @param mapId + * @param queryVO + * @return + */ + PageVO queryPagedRouting(Long mapId, PageQueryVO queryVO); + + PageVO queryPagedRoutingData(Long mapId, MapRoutingDataQueryVO queryVO); + + MapRoutingVO getRouting(Long routingId); + + MapRoutingDataVO getRoutingData(Long routingId); + + List getAllRoutingData(Long mapId); + + /** + * 更新交路 + * @param routingId + * @param routingVO + */ + void updateRouting(Long routingId, MapRoutingVO routingVO); + + void updateRoutingData(Long routingId, MapRoutingDataVO routingVO); + + /** + * 删除交路 + * @param routingId + */ + void deleteRouting(Long routingId); + + /** + * 创建地图3d数据 + * @param mapData3D + * @param user + * @return + */ + Map3dDataVO create3dMapData(Map3dDataVO mapData3D, UserVO user); + + /** + * 通过地图id获取地图3d数据 + * @param mapId + * @return + */ + Map3dDataVO find3dMapDataByMapId(Long mapId); + + /** + * 更新地图3d数据 + * + * @param map3dId + * @param mapData3D + * @return + */ + void update3dMapData(Long map3dId, Map3dDataVO mapData3D); + + /** + * 处理信号机显示方向类型 + */ + void handleSignalDirectionShowType(); + + void createStationParkTime(MapStationParkingTimeVO parkingTimeVO); + + PageVO queryPagedStationParkTime(Long mapId, MapParkTimeQueryVO queryVO); + + MapStationParkingTimeVO getStationParkTime(Long id); + + void updateStationParkTime(Long id, MapStationParkingTimeVO parkingTimeVO); + + void deleteStationParkTime(Long id); + + /** + * 保存目的地码定义 + */ + void saveOperationDefinitions(Long mapId, MapDestinationCodeDefinitionVO operationDefinitionVO); + + /** + * 根据code获取目的地码定义 + */ + MapDestinationCodeDefinitionVO getOperationDefinitions(Long mapId, String code); + + /** + * 分页查询目的地码 + */ + PageVO pagedQueryOperationDefinitions(Long mapId, MapDestinationCodeDefinitionQueryVO queryVO); + + /** + * 删除目的地码定义 + */ + void deleteOperationDefinition(Long mapId, String code); + + /** + * 更新目的地码定义 + */ + void updateOperationDefinition(Long mapId, MapDestinationCodeDefinitionVO definitionVO); +} diff --git a/src/main/java/club/joylink/rtss/services/IEmailService.java b/src/main/java/club/joylink/rtss/services/IEmailService.java new file mode 100644 index 000000000..705fc6507 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/IEmailService.java @@ -0,0 +1,15 @@ +package club.joylink.rtss.services; + +import org.springframework.scheduling.annotation.Async; +import org.springframework.transaction.event.TransactionalEventListener; + +public interface IEmailService { + + void sendToOne(String toUser, String subject, String content); + + void sendToAll(Long userId, String subject, String content); + + @Async("nsExecutor") + @TransactionalEventListener + void handler(EmailService.EmailAllSendingEvent event); +} diff --git a/src/main/java/club/joylink/rtss/services/IExamService.java b/src/main/java/club/joylink/rtss/services/IExamService.java new file mode 100644 index 000000000..4846c3ac4 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/IExamService.java @@ -0,0 +1,90 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.*; + +import java.util.List; +import java.util.Map; + +public interface IExamService { + /** + * 创建考试定义 + */ + void create(ExamDefinitionVO examDefinitionVO, UserVO userVO); + + void createGZBExam(ExamDefinitionVO examDefinitionVO, UserVO userVO); + + /** + * 检查分数定义是否合理 + */ + boolean checkScore(ExamDefinitionVO examDefinitionVO); + +// /** +// * 查询课程下有实训的章节信息 +// */ +// List queryChapterInfo(String lessonId); + + /** + * 查询课程所属产品下有实训的实训类型 + * @param lessonId + * @return + */ + List queryTrainingTypes(Long lessonId); + + /** + * 查询试题定义的详细信息 + * @param examId + */ + ExamDefinitionVO queryExamInfo(Long examId); + + /** + * 查询课程信息和课程下的试题信息 + */ + ExamsLessonVO queryExamList(Long lessonId, UserVO userVO); + + /** + * 查询试题列表信息 + */ + PageVO queryExamInfoList(ExamDefinitionQueryVO queryVO); + + /** + * 删除指定ID的考试信息 + */ + void deleteExam(String id, UserVO userVO); + +// /** +// * 查询章节下允许创建的最多题目数量 +// */ +// int queryTrainingNum(String lessonId, String chapterId); + + /** + * 根据课程和实训类型查询实训数量 + * @param lessonId + * @param trainingType + * @return + */ + Long queryTrainingNum(Long lessonId, String trainingType, String operateType); + + /** + * 试题上线 + * @param id + * @param userVO + */ + void onLine(Long id, UserVO userVO); + + /** + * 试题下线 + * @param id + * @param userVO + */ + void offLine(Long id, UserVO userVO); + + /** + * 更新试题 + * @param id + * @param examDefinitionVO + */ + void update(Long id, ExamDefinitionVO examDefinitionVO); + + void copy(Map lessonRelationMap, UserVO user); +} diff --git a/src/main/java/club/joylink/rtss/services/IGoodsService.java b/src/main/java/club/joylink/rtss/services/IGoodsService.java new file mode 100644 index 000000000..e3af440c4 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/IGoodsService.java @@ -0,0 +1,116 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.GoodsTryVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.goods.GoodsCreateVO; +import club.joylink.rtss.vo.client.goods.GoodsQueryVO; +import club.joylink.rtss.vo.client.goods.GoodsUpdateVO; +import club.joylink.rtss.vo.client.goods.GoodsVO; +import club.joylink.rtss.vo.client.permission.PermissionQueryVO; +import club.joylink.rtss.vo.client.permission.PermissionSelectVO; +import club.joylink.rtss.vo.client.permission.PermissionVO; +import org.springframework.web.bind.annotation.PathVariable; + +import java.util.List; +import java.util.Map; + +public interface IGoodsService { + + /** + * 分页查询商品 + * + * @param queryVO + * @return + */ + PageVO queryPagedGoods(GoodsQueryVO queryVO); + + /** + * 查询商品详情 + * + * @param id + * @return + */ + GoodsVO selectById(@PathVariable long id); + + /** + * 创建商品 + * + * @param createVO + * @param user + * @return + */ + GoodsVO createGoods(GoodsCreateVO createVO, UserVO user); + + /** + * 批量创建商品 + * @param createVOList + * @param userVO + * @return + */ + List createManyGoods(List createVOList, UserVO userVO); + + /** + * 更新商品 + * @param id + * @param updateVO + * @param user + */ + void updateGoods(Long id, GoodsUpdateVO updateVO, UserVO user); + + /** + * 删除商品 + * @param id + */ + void deleteGoods(long id); + + /** + * 更新试用时间 + * @param id + * @param map + * @param user + */ + void tryUse(Long id, Map map, UserVO user); + + /** + * 切换商品是否可用 + * + * @param id + */ + void toggleGoodsStatus(long id); + + /** + * 根据权限id查询商品 + * @param permissionId + * @return + */ + GoodsVO selectGoodsByPermissionId(Long permissionId); + + /** + * 通过关联权限ids查询权限包商品 + * @param relPermissionIds + * @return + */ + GoodsVO findGoodsByPermissionIds(Long[] relPermissionIds); + + GoodsVO createGoodsByRelPermissions(GoodsCreateVO createVO, UserVO userVO); + + PageVO queryPagedGoodsByPermission(PermissionQueryVO queryVO); + + List selectValidGoodsList(); + + GoodsTryVO getTryUseTime(PermissionSelectVO permissionSelectVO, UserVO user); + + /** + * 自动生成权限商品 + * @param permissionVO + * @param user + */ + void autoGenerateGoods(PermissionVO permissionVO, UserVO user); + + GoodsVO getById(Long goodsId); + + boolean isExist(Long goodsId); + + GoodsVO getByPermissionId(Long id); +} diff --git a/src/main/java/club/joylink/rtss/services/IIscsService.java b/src/main/java/club/joylink/rtss/services/IIscsService.java new file mode 100644 index 000000000..b74c30c92 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/IIscsService.java @@ -0,0 +1,18 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.vo.client.iscs.IscsVO; + +public interface IIscsService { + + + /** + * 保存Iscs数据 + */ + void saveIscsData(IscsVO iscsVO); + + /** + * 获取Iscs数据 + */ + IscsVO getIscsDataBy(IscsVO iscsVO); + +} diff --git a/src/main/java/club/joylink/rtss/services/IJointTrainingV1Service.java b/src/main/java/club/joylink/rtss/services/IJointTrainingV1Service.java new file mode 100644 index 000000000..e5a5c24a8 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/IJointTrainingV1Service.java @@ -0,0 +1,212 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.JointTrainingRoomDeviceVO; +import club.joylink.rtss.vo.client.JointTrainingRoomNewVO; +import club.joylink.rtss.vo.client.JointTrainingRoomRequestVO; +import club.joylink.rtss.vo.client.JointTrainingUserNewVO; +import club.joylink.rtss.vo.client.room.RoomSimulationRealDeviceVO; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; + +public interface IJointTrainingV1Service { + + /** + * 创建房间 + * @param user + * @param requestVO + * @return + */ + String createRoom(UserVO user, JointTrainingRoomRequestVO requestVO); + + /**创建比赛房间*/ + String createCompetitionRoom(UserVO user, Long competitionId, JointTrainingRoomRequestVO requestVO); + + /** + * 生成二维码 + * + * @param group + * @return + */ + String generateQrCode(String group); + + /** + * 获取权限加入房间 + * @param code + * @param group + * @return + */ + JointTrainingUserNewVO getPermission(String code, String group); + + /** + * 扫码 + * @param group + * @param userVO + */ + JointTrainingUserNewVO scanQrCode(String group, UserVO userVO); + + /** + * 销毁房间 + * @param group + */ + void destroy(String group, UserVO user); + + /** + * 获取邀请房间列表,根据项目查询 + * @param id + * @return + */ + List getRoomListByProject(Long id, String projectCode); + + List getCompetitionRoomByCreatorAndMap(List creatorIds, Long mapId, Long competitionId); + + /** + * 加入房间 + * @param group + * @param userId + */ + void join(String group, Long userId); + + /** + * 文字聊天 + * @param group + * @param message + * @param userVO + */ + void chatWithText(String group, String message, UserVO userVO); + + /** + * 语音聊天 + * @param group + * @param file + * @param userVO + */ + void chatWithAudio(String group, MultipartFile file, UserVO userVO); + + /** + * 设置用户角色 + * @param group + * @param jointTrainingUserVOList + * @param user + */ + void setUserRole(String group, List jointTrainingUserVOList, UserVO user); + + /** + * 添加或更新真实设备连接仿真设备 + * @param group + * @param roomDeviceVO + */ + void addOrUpdateRealDeviceConnection(String group, JointTrainingRoomDeviceVO roomDeviceVO); + + /** + * 删除真实设备连接仿真设备 + * @param group + * @param id + */ + void deleteRealDeviceConnection(String group, Long id); + + /** + * 查询创建的房间 + * @param group + * @return + */ + JointTrainingRoomNewVO selectRoom(String group); + + /** + * 退出综合演练房间 + * @param group + * @param userId + */ + void exit(String group, Long userId); + + /** + * 获取房间里的用户列表 + * @param group + * @return + */ + List selectUserList(String group); + + /** + * 开始综合演练 + * @param group + * @param userVO + */ + void startSimulation(String group, UserVO userVO); + + + /** + * 删除用户 + * @param group + * @param userId + */ + void deleteUser(String group, Long userId); + + /** + * 查询创建的房间 + * + * @param mapId + * @param userVO + * @return + */ + List findCreatedRoom(long mapId, UserVO userVO); + + /** + * 根据userid获取user信息 + * @param group + * @param userId + * @return + */ + JointTrainingUserNewVO getUserInfoById(String group, Long userId); + + /** + * 用户结束仿真返回房间 + * @param userId + * @param group + */ + JointTrainingRoomNewVO userExitSimulation(Long userId, String group); + + /** + * 管理员结束所有人的仿真 + * @param userVO + * @param group + * @return + */ + JointTrainingRoomNewVO adminFinishSimulation(UserVO userVO, String group); + + /** + * 用户进入仿真 + * @param userId + * @param group + */ + void userEnterSimulation(Long userId, String group); + + /** + * 获取房间真实设备连接关系列表 + * @param group + * @return + */ + List getRoomDeviceList(String group); + + /** + * 获取房间真实设备连接关系列表 + * @param group + * @return + */ + List getRoomRealDeviceList(String group); + + /** + * 更新真实设备连接对象 + * @param group + * @param deviceVOList + */ + void updateRealDeviceConnect(String group, List deviceVOList); + + /** + * 真实设备是否已被其他仿真使用 + * @param group + * @param projectCode + * @return + */ + boolean isRealDeviceUsed(String group, String projectCode); +} diff --git a/src/main/java/club/joylink/rtss/services/ILearnService.java b/src/main/java/club/joylink/rtss/services/ILearnService.java new file mode 100644 index 000000000..b6178a911 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/ILearnService.java @@ -0,0 +1,172 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.constants.Project; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageQueryVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.learn.LearnCommentVO; +import club.joylink.rtss.vo.client.learn.LearnCreateVO; +import club.joylink.rtss.vo.client.learn.LearnPostVO; +import club.joylink.rtss.vo.client.post.LearnMessageCreateVO; +import club.joylink.rtss.vo.client.post.LearnMessagePagedQueryVO; +import club.joylink.rtss.vo.client.post.LearnMessageVO; + +import java.util.List; + +public interface ILearnService { + + /** + * 分页查询帖子列表 + * @param queryVO + * @return + */ + PageVO queryPagedPost(PageQueryVO queryVO); + + /** + * 新建帖子 + * @param mapId + * @param postCreateVO + * @param userVO + */ + String createPost(Long mapId, LearnCreateVO postCreateVO, UserVO userVO); + + /** + * 赞贴 + * @param postId + * @param userVO + */ + void likePost(Long postId, UserVO userVO); + + /** + * 踩贴 + * @param postId + * @param userVO + */ + void unlikePost(Long postId, UserVO userVO); + + /** + * 获取帖子信息 + * @param postId + * @return + */ + LearnPostVO getPostInfo(Long postId); + + /** + * 分页查询帖子回复列表 + * @param messageId + * @param queryVO + * @return + */ + PageVO pagedQueryComment(Long messageId, PageQueryVO queryVO); + + /** + * 查询帖子回复列表 + * @param messageId + * @return + */ + List queryCommentList(Long messageId); + + /** + * 评论 + * @param messageId + * @param postCreateVO + * @param userVO + */ + void addComment(Long messageId, LearnCreateVO postCreateVO, UserVO userVO); + + /** + * 回复 + * @param messageId + * @param commentId + * @param postCreateVO + * @param userVO + */ + void addComment(Long messageId, Long commentId, LearnCreateVO postCreateVO, UserVO userVO); + + /** + * 赞回复 + * @param commentId + * @param userVO + */ + void likeComment(Long commentId, UserVO userVO); + + /** + * 踩回复 + * @param commentId + * @param userVO + */ + void unlikeComment(Long commentId, UserVO userVO); + + /** + * 置顶 + * @param postId + * @param userVO + */ + void top(Long postId, UserVO userVO); + + /** + * 取消置顶 + * @param postId + * @param userVO + */ + void unTop(Long postId, UserVO userVO); + + /** + * 删除帖子 + * @param postId + * @param userVO + */ + void deletePost(Long postId, UserVO userVO); + + /** + * 管理员删除评论 + */ + void adminDeleteComment(Long commentId, UserVO userVO); + + /** + * 用户删自己的评论 + */ + void userDeleteComment(Long commentId, UserVO user); + + /** + * 创建留言 + * @return + */ + long createMessage(LearnMessageCreateVO messageCreateVO, UserVO user); + + /** + * 分页查询留言 + */ + PageVO pagedQueryMessageByPostId(Long postId, LearnMessagePagedQueryVO queryVO); + + /** + * 管理员删除留言 + */ + void adminDeleteMessage(Long messageId, UserVO user); + + /** + * 用户删自己的留言 + */ + void userDeleteMessage(Long messageId, UserVO user); + + /** + * 根据项目查询帖子 + */ + LearnPostVO queryPost(Project project); + + /** + * 根据项目分页查询留言板的留言 + */ + PageVO pagedQueryMessageByProject(Project project, LearnMessagePagedQueryVO queryVO); + +// /** +// * 点赞留言 +// * @return +// */ +// Integer likeMessage(Long messageId); +// +// /** +// * 踩留言 +// */ +// Integer unlikeMessage(Long messageId); +} diff --git a/src/main/java/club/joylink/rtss/services/ILessonDraftService.java b/src/main/java/club/joylink/rtss/services/ILessonDraftService.java new file mode 100644 index 000000000..db512e868 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/ILessonDraftService.java @@ -0,0 +1,106 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.*; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +public interface ILessonDraftService { + + /** + * 获取课程树 + * @param mapId + * @param queryVO + * @param userVO + */ + PageVO queryPagedDraftLesson(Long mapId, PageQueryVO queryVO, UserVO userVO); + + + /** + * 获取课程树 + * @param lessonId + * @param userVO + */ + List getLessonTree(Long lessonId, UserVO userVO); + + /** + * 创建课程 + * @param lessonVo + */ + void createLesson(LessonVO lessonVo, UserVO userVO); + + /** + * 从发布课程创建 + * @param lessonVo + */ + void createFrom(LessonVO lessonVo, UserVO userVO); + + /** + * 更新课程信息 + * @param id + * @param lessonVo + */ + void updateLesson(Long id, LessonVO lessonVo, UserVO userVO); + + /** + * 创建章节 + * @param chapterVo + */ + void createChapter(LessonChapterVO chapterVo); + + /** + * 更新章节信息 + * @param id + * @param chapterVo + */ + void updateChapter(Long id, LessonChapterVO chapterVo); + + @Transactional + void deleteChapter(Long id); + + /** + * 删除课程 + * @param id + */ + void deleteLesson(Long id); + + /** + * 获取课程基本信息 + * @param id + * @return + */ + LessonVO getLesson(Long id); + + /** + * 获取课程章节基本信息 + * @param id + * @return + */ + LessonChapterVO getChapter(Long id); + + /** + * 发布课程 + * @param id + */ + void publishLesson(Long id, LessonPublishVO publishVO); + + /** + * 拖拽排序 + * @param sortReq + */ + void dragSort(DragSortReqVO sortReq); + + /** + * 根据实训id删除章节-实训关系 + * @param trainingId + */ + void deleteChapterRelByTrainingId(Long trainingId); + + /** + * 根据实训id列表批量删除 + * @param trainingIdList + */ + void deleteChapterRelByTrainingIdList(List trainingIdList); + +} diff --git a/src/main/java/club/joylink/rtss/services/ILessonService.java b/src/main/java/club/joylink/rtss/services/ILessonService.java new file mode 100644 index 000000000..962b2de4a --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/ILessonService.java @@ -0,0 +1,138 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.*; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; +import java.util.Map; + +public interface ILessonService { + + /** + * 课程发布 + * @param lessonVo + */ + void publish(LessonVO lessonVo, LessonPublishVO publishVO); + + /** + * 获取课程树 + * + * @param id + * @param userVO + * @return + */ + LessonTreeVO getLessonTree(Long id, UserVO userVO); + + /** + * 获取课程详细信息 (包含权限和章节) + * @param id + * @param userVO + * @return + */ + LessonVO getLessonDetail(Long id, UserVO userVO); + + /** + * 获取课程详细信息 + * @param id + * @return + */ + LessonVO getLessonInfo(Long id); + + /** + * 查询课程列表 + * @param lessonQueryVO + * @return + */ + List queryLessons(LessonQueryVO lessonQueryVO); + + /** + * 更新所属城市 + * @param mapId + */ + void updateCity(Long mapId); + + /** + * 分页查询已发布的课程 + */ + PageVO selectPagedPublishedLesson(LessonQueryVO queryVO); + + /** + * 删除发布的课程 + */ + void deletePublishedLesson(Long lessonId, UserVO userVO); + + @Transactional + void deleteUsedLesson(Long lessonId, UserVO userVO); + + /** + * 根据产品编码获取课程数据 + * @param mapId + * @param prdType + */ + List getByMapIdAndPrdType(Long mapId, String prdType); + + /** + * 根据课程id集合查询课程数据列表 + * @param lessonIds + * @return + */ + List getByIds(List lessonIds); + + /**根据课程id集合查询课程所属产品下的数据列表*/ + List getByIdsWithPrdType(List lessonIds, String prdType); + + /** + * 根据实训id删除章节-实训关系 + * @param trainingId + */ + void deleteChapterRelByTrainingId(Long trainingId); + + /** + * 发布课程上线 + * @param id + * @param userVO + */ + void onLine(Long id, UserVO userVO); + + /** + * 发布课程下线 + * @param id + * @param userVO + */ + void offLine(Long id, UserVO userVO); + + /** + * 根据实训id列表批量删除章节-实训关系数据 + * @param trainingIdList + */ + void deleteChapterRelByTrainingIdList(List trainingIdList); + + /** + * 更新课程名称和简介 + * @param id + * @param name + * @param remarks + * @param user + */ + void updateNameAndRemarks(Long id, String name, String remarks, UserVO user); + + Map copy(Long sourceMapId, Long targetMapId, Map trainingRelMap, UserVO user); + + List queryLessonsOfMap(Long mapId); + + List findByMapIdAndPrdType(Long mapId, String prdType); + + /** + * 根据mapId和prdType查询课程数量 + * @param mapId + * @param prdType + * @return + */ + Long countByMapIdAndPrdType(Long mapId, String prdType); + + List findByMapId(Long mapId); + + @Transactional + void generateLessonAndExam(List mapIds, UserVO userVO); +} diff --git a/src/main/java/club/joylink/rtss/services/ILoadPlanService.java b/src/main/java/club/joylink/rtss/services/ILoadPlanService.java new file mode 100644 index 000000000..18882801a --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/ILoadPlanService.java @@ -0,0 +1,78 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.runplan.RunPlanLoadQueryVO; +import club.joylink.rtss.vo.client.runplan.RunPlanLoadVO; + +import java.time.LocalDate; + +/** + * 运行图加载计划服务 + */ +public interface ILoadPlanService { + + /** + * 执行加载计划 + */ + void executeLoadTask(); + + /** + * 创建加载计划 + * @param runPlanLoadVO + * @param user + */ + void createLoadPlan(RunPlanLoadVO runPlanLoadVO, UserVO user); + + /** + * 分页查询加载计划 + * @param queryVO + * @return + */ + PageVO queryPagedLoadPlan(RunPlanLoadQueryVO queryVO); + + /** + * 删除加载计划 + * @param id + * @param user + */ + void deleteLoadPlan(Long id, UserVO user); + + /** + * 创建通用加载计划 + * @param runPlanLoadVO + * @param user + */ + void createCommonLoadPlan(RunPlanLoadVO runPlanLoadVO, UserVO user); + + /** + * 查找用户某天的加载计划 + * @param userId + * @param mapId + * @param date + * @return + */ + RunPlanLoadVO findUserLoadPlan(Long userId, Long mapId, LocalDate date); + + /** + * 获取用户运行图加载计划 + * @param userId + * @param mapId + * @param date + */ + RunPlanLoadVO getUserLoadPlan(Long userId, Long mapId, LocalDate date); + + /** + * 从加载计划创建每日运行计划 + * @param id + * @param user + */ + void createDailyPlanFromLoadPlan(Long id, UserVO user); + + /** + * 查询通用加载计划 + * @param mapId + * @return + */ + RunPlanLoadVO findCommonLoadPlanOfMap(Long mapId); +} diff --git a/src/main/java/club/joylink/rtss/services/IMap3dModelService.java b/src/main/java/club/joylink/rtss/services/IMap3dModelService.java new file mode 100644 index 000000000..d3f612bcb --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/IMap3dModelService.java @@ -0,0 +1,40 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.map.Map3dModelCreateVO; +import club.joylink.rtss.vo.client.map.Map3dModelUpdateVO; +import club.joylink.rtss.vo.client.map.Map3dModelVO; + +import java.util.List; + +public interface IMap3dModelService { + + /** + * 查询所有地图3d模型 + * @return + */ + List findAllModels(); + + /** + * 创建地图3d模型数据 + * @param createVO + * @param user + */ + void create(Map3dModelCreateVO createVO, UserVO user); + + /** + * 删除数据 + * @param id + */ + void delete(Long id); + + /** + * 条件查询 + */ + List query(String resourceType); + + /** + * 按id更新 + */ + void update(Map3dModelUpdateVO updateVO); +} diff --git a/src/main/java/club/joylink/rtss/services/IMapService.java b/src/main/java/club/joylink/rtss/services/IMapService.java new file mode 100644 index 000000000..efe6ef1ce --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/IMapService.java @@ -0,0 +1,276 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.constants.Project; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.DictionaryDetailVO; +import club.joylink.rtss.vo.client.MapQueryVO; +import club.joylink.rtss.vo.client.PageQueryVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.map.*; +import club.joylink.rtss.vo.client.map.newmap.MapPSDVO; +import club.joylink.rtss.vo.client.map.newmap.MapStationNewVO; +import club.joylink.rtss.vo.client.map.newmap.MapStationStandNewVO; + +import java.util.List; + +public interface IMapService { + + /** + * 查询有地图的城市列表 + * @return + * @param dicCode + */ + List queryCityHasMap(String dicCode); + + /** + * 根据名称查询地图是否存在 + * @return + * @param name + */ + boolean checkNameExist(String name); + + /** + * 地图草稿发布 + * @param mapVO + * @param mapDataVO + * @param userVO + */ + MapVO publish(MapVO mapVO, MapDataVO mapDataVO, UserVO userVO); + + /** + * 地图三维数据发布 + * @param mapVO + * @param map3dDataVO + * @param user + */ + void publish3DData(MapVO mapVO, Map3dDataVO map3dDataVO, UserVO user); + + /** + * 根据地图id获取地图版本 + * @param id + * @return + */ + String findMapVersion(Long id); + + /** + * 获取地图所有数据 + * @param id + * @return + */ + MapVO getMapDetail(Long id); + + /** + * 获取地图基本信息 + * @param id + * @return + */ + MapVO getMapInfoById(Long id); + + /** + * 查询地图list + */ + List list(MapVO mapVO); + + List listOnline(); + + /** + * 根据项目code查询地图列表 + * @param projectCode + * @return + */ + List listByProjectCode(String projectCode); + + /** + * 分页查询地图数据 + */ + PageVO queryPagedMaps(MapQueryVO queryVO); + + /** + * 分页查询地图版本数据 + * @param id + * @param queryVO + * @return + */ + PageVO queryPagedMapVersions(Long id, PageQueryVO queryVO); + + /** + * 删除发布地图数据(超级管理员权限) + */ + void deleteMap(Long id, UserVO userVO); + + /** + * 发布地图上线 + */ + void onLine(Long id, UserVO userVO); + + /** + * 发布地图下线 + */ + void offLine(Long id, UserVO userVO); + + /** + * 根据皮肤获取地图列表 + * @param lineCode + * @return + */ + List getMapListByLineCode(String lineCode); + + /** + * 更新发布地图名称 + * @param id + * @param name + */ + void updateName(Long id, String name, UserVO userVO); + + /** + * 更新发布地图所属城市 + * @param id + * @param cityCode + * @param user + */ + void updateBelongCity(Long id, String cityCode, UserVO user); + + /** + * 设置地图所属项目 + * @param id + * @param project + * @param projectCode + * @param user + */ + void updateBelongProject(Long id, boolean project, String projectCode, UserVO user); + + /** + * 查询城市下可用的地图 + * @param cityCode + * @return + */ + List getUseMapListByCity(String cityCode); + + /** + * 根据定制项目编号查询在线地图列表 + * @param projectCode + * @return + */ + List findOnlineMapByProjectCode(String projectCode); + + /** + * 查询非定制项目编号查询在线地图列表 + * @return + */ + List findOnlineMapNotProject(); + + /** + * 查询所有上线地图 + * @return + */ + List queryOnlineMapInfos(); + + /** + * 查询所有上线地图 + * @param project + * @return + */ + List queryOnlineMapInfoListOfProject(Project project); + + /** + * 获取有屏蔽门的站台 + * @param id + * @return + */ + List getHasScreenDoorStand(Long id); + + /** + * 根据id查询地图基本信息 + * @param mapId + * @return + */ + MapVO findMapBaseInfoById(Long mapId); + + /** + * 根据地图id查询地图3d数据 + * @param mapId + * @return + */ + Map3dDataVO findMap3dDataByMapId(Long mapId); + + MapDataVO getMapDataByMapId(Long mapId, Boolean drayWay); + + /** + * 根据选项拷贝发布地图数据 + * @param id + * @param copyOption + * @param user + */ + void copyMapData(Long id, MapCopyOption copyOption, UserVO user); + + /** + * 地图名称是否已经存在(重复) + * @param name + * @return + */ + boolean isMapNameExist(String name); + + /** + * id为此的地图是否已经存在 + * @param id + * @return + */ + boolean isExist(Long id); + + /** + * 做地图的仿真数据检查 + * @param mapId + * @param user + * @return + */ + List doSimulationCheck(Long mapId, UserVO user); + + /** + * 更新地图序号 + */ + void updateOrderNumber(List vos); + + /** + * 地图数据导出 + * @param id + * @return + */ + MapVO export(Long id); + + /** + * 更新地图基本信息 + * @param id + * @param updateVO + * @param user + */ + void updateBasicInfo(Long id, MapInfoUpdateVO updateVO, UserVO user); + + /** + * 获取地图下所有需要值班员的车站 + * @return + */ + List getNeedSupervisorStations(Long id); + + /** + * 获取地图车站下所有有屏蔽门的站台 + * @param id + * @param stationCode + * @return + */ + List getStationHasPsdStands(Long id, String stationCode); + + /** + * 获取地图站台关联的屏蔽门 + * @param id + * @param standCode + * @return + */ + List getStandPsds(Long id, String standCode); + + /** + * 查询所有地图名称 + */ + List queryAllMapName(); + + void generateMapFunction(Long mapId, UserVO createUser); +} diff --git a/src/main/java/club/joylink/rtss/services/IMapSystemService.java b/src/main/java/club/joylink/rtss/services/IMapSystemService.java new file mode 100644 index 000000000..60d09f29b --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/IMapSystemService.java @@ -0,0 +1,80 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.constants.Project; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.TreeNode; +import club.joylink.rtss.vo.client.sub.MapSystemDetailVO; +import club.joylink.rtss.vo.client.sub.MapSystemQueryVO; +import club.joylink.rtss.vo.client.sub.MapSystemVO; + +import java.util.List; + +public interface IMapSystemService { + /** + * 一键生成学习系统 + * @param mapId + */ + void generateSystem(Long mapId); + + /** + * 分页查询地图下的地图系统 + * @param queryVO + * @return + */ + PageVO queryPagedMapSystem(MapSystemQueryVO queryVO); + + /** + * 创建地图系统 + * @param mapSystemVO + */ + void createMapSystem(MapSystemVO mapSystemVO); + + /** + * 更新地图系统 + * @param id + * @param mapSystemVO + */ + void updateMapSystem(Long id, MapSystemVO mapSystemVO); + + /** + * 根据城市code查询对应某地图的学习系统 + * @param cityCode + * @return + */ + List queryByCityCode(String cityCode); + + /** + * 根据定制项目编号查询 + * @param project + * @return + */ + List queryByProjectCode(Project project); + + /** + * 查询子系统信息 + * @param id + * @return + */ + MapSystemVO getMapSystem(Long id); + + /** + * 根据系统类型和地图产品code查询详细信息 + * @param id + * @param user + * @return + */ + MapSystemDetailVO getMapSystemDetail(Long id, UserVO user); + + /** + * 删除地图系统 + * @param id + * @param userVO + * @return + */ + void delete(Long id, UserVO userVO); + + void copyOfMap(Long sourceMapId, Long targetMapId); + + List findByMapId(Long mapId); +} diff --git a/src/main/java/club/joylink/rtss/services/IMessagePushService.java b/src/main/java/club/joylink/rtss/services/IMessagePushService.java new file mode 100644 index 000000000..71258c865 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/IMessagePushService.java @@ -0,0 +1,24 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.vo.client.BaseUserVO; +import club.joylink.rtss.vo.client.SocketMessageVO; + +import java.util.Collection; +import java.util.List; + +/** + * websocket消息推送服务 + */ +public interface IMessagePushService { + + boolean push(SocketMessageVO messageVO); + + boolean push(String user, SocketMessageVO messageVO); + + void push(Collection user, SocketMessageVO messageVO); + + void push2User(BaseUserVO user, SocketMessageVO messageVO); + + void push2User(List userList, SocketMessageVO messageVO); + +} diff --git a/src/main/java/club/joylink/rtss/services/IOperateService.java b/src/main/java/club/joylink/rtss/services/IOperateService.java new file mode 100644 index 000000000..dbeed5c10 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/IOperateService.java @@ -0,0 +1,94 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.vo.client.*; + +import java.util.List; + +public interface IOperateService { + + /** + * 创建操作定义 + * @param definitionVO + */ + void create(OperateDefinitionVO definitionVO); + + /** + * 分页查询操作定义 + * @return + */ + PageVO queryPagedOperateDefinition(OperateDefinitionQueryVO queryVO); + + /** + * 修改操作定义 + * @param id + * @param definitionVO + */ + void update(Long id, OperateDefinitionVO definitionVO); + + /** + * 删除操作定义 + * @param id + */ + void delete(Long id); + + /** + * 创建操作步骤 + * @param stepVO + */ + void createStep(Long definitionId, OperateStepVO stepVO); + + /** + * 根据定义id分页查询步骤 + * @param definitionId + * @return + */ + PageVO queryPagedOperateStep(Long definitionId, PageQueryVO queryVO); + + /** + * 更新操作步骤 + * @param id + * @param stepVO + */ + void updateStep(Long id, OperateStepVO stepVO); + + /** + * 删除操作步骤 + * @param id + */ + void deleteStep(Long id); + + /** + * 查询操作规则定义 + * @param mapId + * @return + */ + List queryOperateDefinition(Long mapId, String prdType, String operateType); + + /** + * 根据地图和产品类型查询操作类型 + * @param mapId + * @return + */ + List queryOperateTypes(Long mapId, String productType); + + /** + * 批量生成操作 + * @param mapId + * @param definitionVOList + */ + void generate(Long mapId, List definitionVOList); + + /** + * 根据实训类型查询占位数据 + * @param trainingType + * @return + */ + List queryPlaceholder(String trainingType); + + /** + * 操作定义另存为另一皮肤的 + * @param mapId + * @param other + */ + void saveAs(Long mapId, Long other); +} diff --git a/src/main/java/club/joylink/rtss/services/IOrderNoGenerator.java b/src/main/java/club/joylink/rtss/services/IOrderNoGenerator.java new file mode 100644 index 000000000..6df3ba79a --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/IOrderNoGenerator.java @@ -0,0 +1,12 @@ +package club.joylink.rtss.services; + +/** + * 订单编号生成器 + * @author sheng + * + */ +public interface IOrderNoGenerator { + + String next(); + +} diff --git a/src/main/java/club/joylink/rtss/services/IOrderService.java b/src/main/java/club/joylink/rtss/services/IOrderService.java new file mode 100644 index 000000000..c77efed45 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/IOrderService.java @@ -0,0 +1,54 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.order.OrderCreateVO; +import club.joylink.rtss.vo.client.order.OrderDetailVO; +import club.joylink.rtss.vo.client.order.OrderVO; +import club.joylink.rtss.vo.client.permission.OrderQueryVO; + +import java.util.List; + +public interface IOrderService { + /** + * 分页获取订单数据 + * @param queryVO + * @return + */ + PageVO queryPagedOrders(OrderQueryVO queryVO); + + /** + * 分页获取订单数据(销售员) + * @param queryVO + * @param user + * @return + */ + PageVO queryPagedOrders(OrderQueryVO queryVO, UserVO user); + + /** + * 创建订单 + * @param createVO + * @param user + */ + String createOrder(OrderCreateVO createVO, UserVO user); + + /** + * 更新订单 + * @param orderVO + */ + void update(OrderVO orderVO, UserVO userVO); + + List getOrderDetail(Long id); + + Float compute(Long goodsId, Integer goodsAmount, Integer monthAmount); + + OrderCreateVO submit(OrderCreateVO orderCreateVO, UserVO user); + + String pay(long id, String payType); + + void cancelPay(Long id, UserVO user); + + OrderVO findByCode(String orderCode); + + List findOrderDetailVOListByOrderId(Long id); +} diff --git a/src/main/java/club/joylink/rtss/services/IOrganizationService.java b/src/main/java/club/joylink/rtss/services/IOrganizationService.java new file mode 100644 index 000000000..05781f509 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/IOrganizationService.java @@ -0,0 +1,32 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.vo.client.OrganizationVO; + +import java.util.List; + +public interface IOrganizationService { + + /** + * 查询组织/企业 + * @return + */ + List queryOrganization(); + + /** + * 创建组织/企业 + * @param organization + * @return + */ + OrganizationVO create(OrganizationVO organization); + + /** + * 根据企业id查询 + * @param id + * @return + */ + OrganizationVO queryOrganizationById(Long id); + + OrganizationVO getById(Long id); + + boolean isExist(Long organizationId); +} diff --git a/src/main/java/club/joylink/rtss/services/IPermissionDistributeService.java b/src/main/java/club/joylink/rtss/services/IPermissionDistributeService.java new file mode 100644 index 000000000..e8ca05967 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/IPermissionDistributeService.java @@ -0,0 +1,105 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.order.OrderCreateVO; +import club.joylink.rtss.vo.client.permission.DistributeSelectVO; +import club.joylink.rtss.vo.client.permissionDistribute.DistributeVO; +import club.joylink.rtss.vo.client.permissionDistribute.PermissionDistributeQueryVO; +import club.joylink.rtss.vo.client.userPermission.UserPermissionDistributeVO; +import club.joylink.rtss.vo.client.userPermission.UserPermissionVO; +import club.joylink.rtss.vo.client.validGroup.ValidList; +import club.joylink.rtss.vo.user.PermissionGenerateConfigVO; + +import java.util.List; + +public interface IPermissionDistributeService { + + /** + * 分页查询权限分发数据 + * @param queryVO + * @return + */ + PageVO queryPagedDistribute(PermissionDistributeQueryVO queryVO); + + /** + * 生成权限分发二维码 + * @param id + * @return + */ + String generateQrCode(Long id); + + /** + * 权限分发立即失效 + * @param id + */ + void immediateInvalid(Long id); + + /** + * 权限分发打包 + * @param ids + * @param user + * @return + */ + String packageDistribute(ValidList ids, UserVO user); + + /** + * 从订单分发权限 + * @param orderCode + * @param user + * @return + */ + String distributeFromOrder(String orderCode, UserVO user); + + void getUserPermission(Long state, UserVO user); + + String createQuickly(OrderCreateVO orderCreateVO, UserVO userVO); + + List wmGetPermission(String code, Long id); + + String distributeFromUserPermission(UserPermissionDistributeVO distributeVO, UserVO user); + + void restoreDistributeToUserPermission(Long id); + + List queryPersonalDistributeList(UserVO user); + + List queryUserPermissionsOfDistribute(Long distributeId); + + void handleOldDataColumnPackage(); + + String transferPermission(DistributeSelectVO distributeSelectVO, UserVO user); + + String distributePermission(DistributeSelectVO distributeSelectVO, UserVO user); + + DistributeVO findById(Long id); + + List getByParentId(Long distributeId); + + List findByFromUserPermissionId(Long userPermissionId); + + /** + * 系统回收用户分发 + */ + void systemRevokePermissionDistribute(Long id); + + boolean isExist(Long id); + + DistributeVO getById(Long id); + + void recoveryAfterRestoreUserPermission(Long id, Integer amount); + + DistributeVO getByOrderCode(String orderCode); + + List getByFromUserPermissionId(Long id); + + List queryDistributeGetUsers(Long id, UserVO user); + + PageVO queryPackageDetail(Long id, PermissionDistributeQueryVO queryVO); + + /** + * 生成赠送的权限分发 + * @param configVO + * @return + */ + DistributeVO generateGiftDistribute(PermissionGenerateConfigVO configVO); +} diff --git a/src/main/java/club/joylink/rtss/services/IPermissionService.java b/src/main/java/club/joylink/rtss/services/IPermissionService.java new file mode 100644 index 000000000..eb8224d83 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/IPermissionService.java @@ -0,0 +1,57 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.permission.PermissionCreateVO; +import club.joylink.rtss.vo.client.permission.PermissionQueryVO; +import club.joylink.rtss.vo.client.permission.PermissionUpdateVO; +import club.joylink.rtss.vo.client.permission.PermissionVO; + +import java.util.List; + +public interface IPermissionService { + + PageVO queryPagedPermission(PermissionQueryVO queryVO); + + /** + * 不分页查询权限 + */ + List queryPermission(PermissionQueryVO queryVO); + + PageVO getPackageDetail(Long id, PermissionQueryVO queryVO); + + String create(PermissionCreateVO createVO, UserVO user); + + void updatePermission(Long id, PermissionUpdateVO updateVO, UserVO user); + + void generatePermission(Long mapId, UserVO user); + + PermissionVO findById(Long id); + + List findByMapId(Long mapId); + + List findPermissionPackageOrBasePermission(Boolean isPackage); + + PermissionVO getById(Long permissionId); + + List findPermissionByRelPermissionIds(List asList); + + List getPermissionByRelPermissionIds(List relPermissionIds); + + /** + * 查询包含该权限的权限包 + * @param id 被包含的权限的id + * @return + */ + List findPackageContainsPermission(Long id); + + PermissionVO getJointSimulationPermissionByMapId(Long mapId); + + PermissionVO getTeachPermissionByMapId(Long mapId); + + /** + * 真·一键生成权限 + * @param user + */ + void realGenerate(UserVO user); +} diff --git a/src/main/java/club/joylink/rtss/services/IRealLineService.java b/src/main/java/club/joylink/rtss/services/IRealLineService.java new file mode 100644 index 000000000..5b9d9b6c0 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/IRealLineService.java @@ -0,0 +1,95 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.map.*; + +import java.util.List; + +public interface IRealLineService { + + /** + * 创建地图皮肤 + * @param skinVO + * @param userVO + */ + void create(RealLineVO skinVO, UserVO userVO); + + /** + * 查询皮肤列表 + * @param queryVO + * @return + */ + List queryList(RealLineQueryVO queryVO); + + /** + * 分页查询地图皮肤 + * @param queryVO + * @return + */ + PageVO queryPagedSkin(RealLineQueryVO queryVO); + + /** + * 根据id获取地图皮肤 + * @param id + */ + RealLineVO get(Long id); + + /** + * 根据code获取地图皮肤 + * @param code + */ + RealLineVO get(String code); + + /** + * 更新地图皮肤 + * @param id + * @param skinVO + * @param userVO + */ + void update(Long id, RealLineVO skinVO, UserVO userVO); + + /** + * 删除地图皮肤 + * @param id + */ + void delete(Long id); + + /** + * 检查code是否存在 + * @param code + * @return + */ + boolean checkCodeExist(String code); + + /** + * 根据code修改皮肤信息 + * @param code + * @param skinVO + * @param userVO + */ + void updateByCode(String code, RealLineVO skinVO, UserVO userVO); + + /** + * 保存线路配置项 + * @param id + * @param configVO + */ + void saveLineConfig(Long id, RealLineConfigVO configVO); + + /** + * 获取线路配置项 + * @param id + * @return + */ + RealLineConfigVO getLineConfigById(Long id); + + /** + * 根据线路编码获取线路配置 + * @param lineCode + * @return + */ + RealLineConfigVO getLineConfigByCode(String lineCode); + + RealLineVO getLineDetailByCode(String lineCode); +} diff --git a/src/main/java/club/joylink/rtss/services/IReleaseReviewService.java b/src/main/java/club/joylink/rtss/services/IReleaseReviewService.java new file mode 100644 index 000000000..10ff547b6 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/IReleaseReviewService.java @@ -0,0 +1,109 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.vo.LoginUserInfoVO; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.*; +import club.joylink.rtss.vo.client.runplan.RunPlanQueryVO; +import club.joylink.rtss.vo.client.runplan.RunPlanVO; +import club.joylink.rtss.vo.client.script.ScriptQueryVO; +import club.joylink.rtss.vo.client.script.ScriptVO; + +import java.util.List; + + +/** + * 发布审核流程 + */ +public interface IReleaseReviewService { + /** + * 查询待审核的课程 + * @param queryVO 筛选查询的条件 + * @return + */ + PageVO queryPendingReviewLesson(ReleaseReviewQueryVO queryVO); + + /** + * 发布课程 + * @param id + * @param publishVO + */ + void publishLesson(Long id, LessonPublishVO publishVO); + + /** + * 驳回课程 + * @param id + * @param explanation + */ + void rejectLesson(Long id, String explanation); + + /** + * 用户申请发布课程或者撤销申请 + * @param id + */ + void applicationForReleaseOrCancelLesson(Long id, String status); + + /** + * 预览课程 + * @param id + * @return + */ + List previewLesson(Long id); + + /** + * 查询待审核的剧本 + * @param queryVO + * @return + */ + PageVO queryPendingReviewScript(ScriptQueryVO queryVO); + + /** + * 发布剧本 + * @param id + * @param user + */ + void publishScript(Long id, UserVO user); + + /** + * 驳回剧本 + * @param id + * @param releaseReviewVO + */ + void rejectScript(Long id, ReleaseReviewVO releaseReviewVO); + + /** + * 查询待审核的运行图 + * @param queryVO 筛选查询的条件 + * @return + */ + PageVO queryPendingReviewRunPlan(RunPlanQueryVO queryVO); + + /** + * 发布运行图 + * @param planId + * @param user + */ + List publishRunPlan(Long planId, UserVO user); + + List directPublishRunPlan(Long planId, String runPlanName, UserVO user); + + /** + * 驳回运行图 + * @param id + * @param explanation + */ + void rejectRunPlan(Long id, String explanation); + + /** + * 用户申请发布运行图或者撤销申请 + * @param id + */ + void applicationForReleaseOrCancelRunPlan(Long id, String status); + + /** + * 预览运行图 + * @param planId + * @param user + * @return + */ + String previewRunPlan(Long planId, LoginUserInfoVO loginUserInfoVO); +} diff --git a/src/main/java/club/joylink/rtss/services/IReleaseService.java b/src/main/java/club/joylink/rtss/services/IReleaseService.java new file mode 100644 index 000000000..30b078d8d --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/IReleaseService.java @@ -0,0 +1,16 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.vo.client.ReleaseConfigVO; +import club.joylink.rtss.vo.client.ReleaseVO; + +public interface IReleaseService { + /** + * 导出为json + */ + ReleaseVO exportAsJson(Long mapId, ReleaseConfigVO config); + + /** + * 从json导入 + */ + void importFromJson(Long id, ReleaseVO releaseVO); +} diff --git a/src/main/java/club/joylink/rtss/services/IRunPlanDraftService.java b/src/main/java/club/joylink/rtss/services/IRunPlanDraftService.java new file mode 100644 index 000000000..4be51417a --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/IRunPlanDraftService.java @@ -0,0 +1,227 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.runplan.newdraw.RunPlanInput; +import club.joylink.rtss.vo.LoginUserInfoVO; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.map.MapRoutingSectionVO; +import club.joylink.rtss.vo.client.map.newmap.MapStationParkingTimeVO; +import club.joylink.rtss.vo.client.map.newmap.MapStationRunLevelVO; +import club.joylink.rtss.vo.client.runplan.*; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +public interface IRunPlanDraftService { + /** + * 创建运行图 + */ + String create(RunPlanVO runPlanVO, UserVO userVO); + + /** + * 创建通用运行图车次数据 + */ + RunPlanEChartsDataVO createCommon(Long runPlanId, RunPlanInput runPlanInput); + + /** + * 更新运行图名称 + * @param id + * @param name + * @param userVO + * @return + */ + void updateName(Long id, String name, UserVO userVO); + + /** + * 从模板运行图创建 + * @param templateId + * @param name + * @param userVO + * @return + */ + String createFrom(Long templateId, String name, UserVO userVO); + + /** + * 根据mapId查询运行图纵坐标车站节点 + * @param mapId + * @return + */ + List selectOrdinateByMapId(Long mapId); + + /** + * 查询运行图绘制需要的数据 + */ + RunPlanEChartsDataVO selectDiagramData(Long planId); + + /** + * 删除运行图 + */ + void deleteDiagramDraftData(Long planId, UserVO user); + + /** + * 运行图草稿发布 + */ + void publish(Long planId, UserVO user); + + @Transactional + void directPublish(Long planId, String runPlanName, UserVO userVO); + + /** + * 导入真实运行图 + * @param mapId + * @param runPlanImportList + * @param userVO + */ + void importRunPlan(Long mapId, List runPlanImportList, UserVO userVO); + + /** + * 查询地图下个人运行图列表 + * @param mapId + * @param userVO + */ + List queryListByMapId(Long mapId, UserVO userVO); + + /** + * 获取站间运行时间 + * @param mapId + * @param userVO + * @return + */ + List getStationRunningDate(Long mapId, UserVO userVO); + + /**获取地图原始站间运行等级*/ + List getStationRunLevel(Long mapId); + + /**获取地图原始车站轨道停站时间*/ + List getStationParkingTimeList(Long mapId); + + /** + * 设置站间运行时间 + * @param mapId + * @param userVO + * @return + */ + void setStationRunningTime(Long mapId, List runPlanLevelVOList, UserVO userVO); + + /** + * 根据站间运行id删除运行等级 + * @param stationRunningIdList + */ + void deleteRunPlanLevelByStationRunningId(List stationRunningIdList); + + /** + * 查询运行图服务号是否存在 + * @param planId + * @param serviceNumber + * @return + */ + boolean ifServerExists(Long planId, String serviceNumber); + + /** + * 查询交路列表 + * @param planId + * @return + */ + List getRoutingList(Long planId); + + /** + * 根据车次号查询交路 + * @param planId + * @param SDTNumber + * @return + */ + Object queryRoutingBySDTNumber(Long planId, String SDTNumber); + + /** + * 根据交路查询交路区段列表 + * + * @param planId + * @param routingCode + * @return + */ + List getRoutingSectionList(Long planId, String routingCode); + + /** + * 增加计划 + * @param planId + * @param serviceConfig + * @param userVO + */ + void addRunPlanService(Long planId, RunPlanServiceConfigVO serviceConfig, UserVO userVO); + + /** + * 修改计划 + * @param planId + * @param serviceNumber + * @param serviceConfig + * @param userVO + */ + void updateRunPlanService(Long planId, String serviceNumber, RunPlanServiceConfigVO serviceConfig, UserVO userVO); + + /** + * 删除计划 + * @param planId + * @param serviceNumber + * @param userVO + */ + void deleteRunPlanService(Long planId, String serviceNumber, UserVO userVO); + + /** + * 复制计划 + * @param planId + * @param serviceNumber + * @param serviceConfig + * @param userVO + */ + void copyRunPlanService(Long planId, String serviceNumber, RunPlanServiceConfigVO serviceConfig, UserVO userVO); + + void updateRunPlanServiceNumber(Long planId, String oldServiceNumber, String serviceNumber); + + /** + * 增加任务 + * @param planId + * @param serviceNumber + * @param tripConfig + * @param userVO + */ + void addRunPlanTrip(Long planId, String serviceNumber, RunPlanTripConfigVO tripConfig, UserVO userVO); + + /** + * 修改任务 + * @param planId + * @param SDTNumber + * @param tripConfig + * @param userVO + */ + void updateRunPlanTrip(Long planId, String SDTNumber, RunPlanTripConfigVO tripConfig, UserVO userVO); + + void updateRunPlanTripNumber(Long planId, String SDTNumber, String tripNumber); + + /** + * 删除任务 + * @param planId + * @param SDTNumber + * @param deleteBefore + * @param userVO + */ + void deleteRunPlanTrip(Long planId, String SDTNumber, boolean deleteBefore, UserVO userVO); + + /** + * 有效性检查 + * @param planId + * @return + */ + List dataCheck(Long planId); + + void removeTBTrackTripTime(Long planId); + + /** + * 运行图仿真测试 + * @param planId + * @param userVO + * @return + */ + String simulationCheck(Long planId, LoginUserInfoVO loginUserInfoVO); + + PageVO queryPagedPendingReviewPlan(RunPlanQueryVO queryVO); +} diff --git a/src/main/java/club/joylink/rtss/services/IRunPlanTemplateService.java b/src/main/java/club/joylink/rtss/services/IRunPlanTemplateService.java new file mode 100644 index 000000000..30b67f838 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/IRunPlanTemplateService.java @@ -0,0 +1,102 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.runplan.RunPlanEChartsDataVO; +import club.joylink.rtss.vo.client.runplan.RunPlanQueryVO; +import club.joylink.rtss.vo.client.runplan.RunPlanVO; + +import javax.validation.constraints.NotBlank; +import java.util.List; + +public interface IRunPlanTemplateService { + /** + * 运行图草稿发布 + * @param runPlanVO + * @param userVO + */ + void draftPublish(RunPlanVO runPlanVO, UserVO userVO); + + /** + * 删除运行图模板 + * @param planId + */ + void deletePlan(Long planId, UserVO userVO); + + /** + * 分页查询运行图模板数据 + * @param queryVO + * @return + */ + PageVO queryPagedRunPlan(RunPlanQueryVO queryVO); + + /** + * 使用此模板生成当日运行图 + * @param planId + * @param userVO + */ + RunPlanVO generateDailyRunPlan(Long planId, Long mapId, UserVO userVO); + + /** + * 查询运行图绘制需要的数据 + */ + RunPlanEChartsDataVO selectDiagramData(Long planId); + + /** + * 根据id查询模板运行图 + * @param id + * @return + */ + RunPlanVO findRunPlan(Long id); + + /** + * 获取运行图 + * @param id + * @return + */ + RunPlanVO getRunPlan(Long id); + + /** + * 根据皮肤查询运行图,取第一条 + * @param mapId + * @return + */ + RunPlanVO getFirstRunPlanByMapId(Long mapId); + + /** + * 查询所有模板运行图 + * @return + */ + List queryAll(); + + /** + * 查询皮肤下的模板运行图 + * @param mapId + * @return + */ + List queryPlanListByMapId(Long mapId); + + /** + * 复制为其他地图下的运行图 + * @param id + * @param mapId + * @param name + * @param user + */ + void copyAs(Long id, @NotBlank Long mapId, String name, UserVO user); + + /** + * 拷贝地图下的所有模板运行图 + * @param sourceMapId + * @param targetMapId + * @param user + */ + void copyAllOfMap(Long sourceMapId, Long targetMapId, UserVO user); + + /** + * 模板运行图是否被其他数据关联使用 + * @param planId + * @return + */ + boolean isUsed(Long planId); +} diff --git a/src/main/java/club/joylink/rtss/services/ISchedulingPlanService.java b/src/main/java/club/joylink/rtss/services/ISchedulingPlanService.java new file mode 100644 index 000000000..59e67c3fc --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/ISchedulingPlanService.java @@ -0,0 +1,137 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.entity.SchedulingPlan; +import club.joylink.rtss.simulation.scheduling.SchedulingPlanBO; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.map.MapVO; +import club.joylink.rtss.vo.client.runplan.RunPlanVO; +import club.joylink.rtss.vo.client.scheduling.SchedulingCheckResult; +import club.joylink.rtss.vo.client.scheduling.SchedulingPlanVO; +import club.joylink.rtss.vo.client.scheduling.SchedulingTrainEditVO; +import club.joylink.rtss.vo.client.scheduling.TrainBaseInfoVO; + +import java.time.LocalDate; +import java.util.List; + +/** + * 派班计划服务 + */ +public interface ISchedulingPlanService { + /** + * 构建派班计划的仿真数据 + * @param mapId + * @param prdType + * @param user + */ + String schedulingPlanSimulation(Long mapId, String prdType, UserVO user); + + /** + * 查询某天的派班计划-在派班计划仿真 + * @param group + * @param day + * @param user + * @return + */ + SchedulingPlanVO findSchedulingPlan(String group, LocalDate day, UserVO user); + + /** + * 查询用户某天的派班计划 + * @param mapId + * @param date + * @param userId + * @return + */ + SchedulingPlan findUserPlan(Long mapId, LocalDate date, Long userId); + + /** + * 获取用户某天的派班计划 + * @param mapId + * @param date + * @param userId + * @return + */ + SchedulingPlan getUserPlan(Long mapId, LocalDate date, Long userId); + + /** + * 查询通用的派班计划 + * @param mapId + * @return + */ + SchedulingPlan findCommonPlan(Long mapId); + + /** + * 获取通用的派班计划 + * @param mapId + * @return + */ + SchedulingPlan getCommonPlan(Long mapId); + + /** + * 生成某天的基础派班计划 + * @param group + * @param day + * @param user + * @return + */ + SchedulingPlanVO generateBaseSchedulingPlanOfDay(String group, LocalDate day, UserVO user); + + /** + * 获取所有列车 + * @param group + * @return + */ + List getAllTrains(String group); + + /** + * 派班计划冲突检查 + * @param group + * @param editVOList + * @return + */ + SchedulingCheckResult checkConflict(String group, List editVOList); + + /** + * 保存派班计划数据 + * @param group + * @param editVOList + */ + void saveSchedulingPlan(String group, List editVOList); + + SchedulingPlanVO deleteAndRebuildSchedulingPlan(String group, LocalDate day, UserVO user); + + /** + * 生成某张地图通用派班计划 + * @param mapId + * @param user + */ + void generateMapCommonSchedulingPlan(Long mapId, UserVO user); + + /** + * 生成某张地图通用派班计划 + * @param mapVO + * @param commonDailyRunPlan + * @param user + */ + void generateMapCommonSchedulingPlan(MapVO mapVO, RunPlanVO commonDailyRunPlan, UserVO user); + + /** + * 生成通用的派班计划 + * @param user + */ + void generateCommonSchedulingPlan(UserVO user); + + /** + * 获取派班计划(先获取用户的,若不存在,获取通用的) + * @param mapId + * @param userId + * @return + */ + SchedulingPlanBO getSchedulingPlan(Long mapId, Long userId); + + /** + * 拷贝通用派班计划 + * @param sourceMapId + * @param targetMapId + */ + void copyCommonSchedulingPlan(Long sourceMapId, Long targetMapId); +} diff --git a/src/main/java/club/joylink/rtss/services/IScriptDraftService.java b/src/main/java/club/joylink/rtss/services/IScriptDraftService.java new file mode 100644 index 000000000..f5d2721d5 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/IScriptDraftService.java @@ -0,0 +1,127 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.simulation.cbtc.Simulation; +import club.joylink.rtss.simulation.cbtc.script.ScriptBO; +import club.joylink.rtss.simulation.cbtc.script.ScriptUpdateVO; +import club.joylink.rtss.entity.ScriptDraftWithBLOBs; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageQueryVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.script.ScriptNewVO; +import club.joylink.rtss.vo.client.script.ScriptQueryVO; +import club.joylink.rtss.vo.client.script.ScriptVO; + +public interface IScriptDraftService { + + /** + * 分页查询某地图下的个人所有剧本 + * @param mapId + * @param user + * @return + */ + PageVO queryPagedScript(Long mapId, UserVO user, PageQueryVO queryVO); + + /** + * 创建剧本基本信息 + * @param scriptVO + * @param user + * @return + */ + String createScript(ScriptVO scriptVO, UserVO user); + + /** + * 通过id查询剧本基本信息 + * @param id + * @return + */ + ScriptNewVO getBasicInfo(Long id); + + /** + * 更新剧本基本信息 + * @param id + * @param updateVO + * @param user + */ + void updateScriptInfo(Long id, ScriptUpdateVO updateVO, UserVO user); + + /** + * 根据id删除剧本 + * @param id + * @param user + */ + void deleteScript(Long id, UserVO user); + + /** + * 根据id获取剧本详细数据 + * @param id + * @return + */ + ScriptVO getScriptDetail(Long id); + + ScriptBO getScriptBO(Long id, Simulation simulation); + + /** + * 更新地图详细数据 + * @param id + * @param scriptVO + */ + void updateScriptDetailData(Long id, ScriptVO scriptVO); + + /** + * 更新新版剧本详细数据 + */ + void updateScriptDetailData(Long id, ScriptBO scriptBO); + + /** + * 根据剧本id修改状态为发布可用状态 + * @param id + * @param name + * @param user + */ + void publish(Long id, String name, UserVO user); + + /** + * 分页查询发布待审核的剧本 + * @param queryVO + * @return + */ + PageVO queryPagedPendingReviewScript(ScriptQueryVO queryVO); + + /** + * 发布通过 + * @param id + */ + void publishPass(Long id); + + /** + * 发布驳回 + * @param id + * @param explanation + */ + void publishReject(Long id, String explanation); + + /** + * 剧本撤销发布 + * @param id + * @param user + */ + void retract(Long id, UserVO user); + + /** + * 获取保存的剧本数据 + * @param scriptId + * @return + */ + ScriptDraftWithBLOBs getEntityById(Long scriptId); + + /** + * 导出剧本 + * @return + */ + ScriptDraftWithBLOBs export(Long id); + + /** + * 导入剧本 + */ + void importFromJson(Long mapId, String name, ScriptDraftWithBLOBs scriptDraft, UserVO user); +} diff --git a/src/main/java/club/joylink/rtss/services/IScriptService.java b/src/main/java/club/joylink/rtss/services/IScriptService.java new file mode 100644 index 000000000..179a04273 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/IScriptService.java @@ -0,0 +1,45 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.simulation.cbtc.Simulation; +import club.joylink.rtss.simulation.cbtc.script.ScriptBO; +import club.joylink.rtss.entity.ScriptDraftWithBLOBs; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.script.ScriptQueryVO; +import club.joylink.rtss.vo.client.script.ScriptVO; + +public interface IScriptService { + + /** + * 根据id获取剧本详细数据 + * @param id + * @return + */ + ScriptVO getScriptDetailById(Long id); + + /** + * 分页查询上线的剧本 + * @param scriptQueryVO + * @return + */ + PageVO pagingQueryOnlineScript(ScriptQueryVO scriptQueryVO); + + /** + * 获取客户端需要的剧本详细数据 + * @param id + * @return + */ + ScriptVO getDetailForClientById(Long id); + + /** + * 发布 + */ + void publish(ScriptDraftWithBLOBs script, UserVO user); + + void copy(Long sourceMapId, Long targetMapId, UserVO user); + + /** + * 获取剧本操作对象 + */ + ScriptBO getScriptBOById(Long scriptId, Simulation simulation); +} diff --git a/src/main/java/club/joylink/rtss/services/ISimulationRecordService.java b/src/main/java/club/joylink/rtss/services/ISimulationRecordService.java new file mode 100644 index 000000000..b8c064fd5 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/ISimulationRecordService.java @@ -0,0 +1,107 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.simulation.record.SimulationFrameData; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.*; + +import java.time.LocalDateTime; +import java.util.List; +import java.util.Map; + +public interface ISimulationRecordService { + + /** + * 保存仿真记录 + */ + Long saveRecord(String group); + + /** + * 仿真结束更新记录 + * @param recordId + */ + void updateRecord(Long recordId); + + /** + * 保存按计划行车记录 + * @param recordId + * @param runPlanDailyId + * @param systemTime + */ + void saveRunAsPlanRecord(Long recordId, Long runPlanDailyId, LocalDateTime systemTime); + + /** + * 退出按计划行车更新记录 + * @param recordId + */ + void updateRunAsPlanRecord(Long recordId); + + /** + * 保存会话 + * @param recordId + * @param conversationMap + */ + void saveConversation(Long recordId, Map conversationMap); + + /** + * 保存帧 + * @param recordId + * @param simulationFrameDataList + */ + void saveFrame(Long recordId, List simulationFrameDataList); + + /** + * 分页查询仿真记录 + * @param queryVO + * @return + */ + PageVO queryPagedRecord(PageQueryVO queryVO); + + /** + * 回放 + * @param id + */ + void playBack(Long id, UserVO userVO); + + /** + * 设置播放速度 + * @param id + * @param playSpeed + */ + void setPlaySpeed(Long id, float playSpeed, UserVO userVO); + + /** + * 暂停 + * @param id + * @param userVO + */ + void pause(Long id, UserVO userVO); + + /** + * 播放 + * @param id + * @param userVO + */ + void play(Long id, UserVO userVO); + + /** + * 设置播放时间 + * @param id + * @param offsetSeconds + * @param userVO + */ + void setPlayTime(Long id, Long offsetSeconds, UserVO userVO); + + /** + * 结束 + * @param id + * @param userVO + */ + void over(Long id, UserVO userVO); + + /** + * 删除记录 + * @param id + * @param userVO + */ + void delete(Long id, UserVO userVO); +} diff --git a/src/main/java/club/joylink/rtss/services/ISmsService.java b/src/main/java/club/joylink/rtss/services/ISmsService.java new file mode 100644 index 000000000..c7d1ea4c0 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/ISmsService.java @@ -0,0 +1,40 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.vo.InternationalMobile; +import club.joylink.rtss.vo.SmsResponse; + +import java.util.List; + +/** + * 短信服务接口 + * @author sheng + * + */ +public interface ISmsService { + + /** + * 发送短信验证码 + * @param mobile - 电话号 + * @param nationCode - 国家码 + * @param params - 模板内参数列表 + * @param ts - 发送时间戳 + * @return + */ + SmsResponse sendValidateCode(String mobile, String nationCode, List params, long ts); + + /** + * 发送订单通知 + */ + SmsResponse sendOrderNotice(List internationalMobileList, List params); + + /** + * 禁止发送短信 + */ + void forbidSend(); + + /** + * 允许发送短信 + */ + void allowSend(); + +} diff --git a/src/main/java/club/joylink/rtss/services/ISysDictionaryService.java b/src/main/java/club/joylink/rtss/services/ISysDictionaryService.java new file mode 100644 index 000000000..ac87892a2 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/ISysDictionaryService.java @@ -0,0 +1,93 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.vo.client.*; + +import java.util.List; + +public interface ISysDictionaryService { + + /** + * 分页查询 + */ + PageVO queryPage(DictionaryQueryVO queryVO); + + /** + * 创建字典 + * @param dicVO + */ + void createDic(DictionaryVO dicVO); + + /** + * 检查code是否存在 + * @param code + * @return + */ + boolean checkByCode(String code); + + /** + * 更新字典信息 + * @param id + * @param dicVo + */ + void updateDic(Long id, DictionaryVO dicVo); + + /** + * 查询字典dicId下的明细列表 + */ + PageVO queryDetailPage(Long dicId, DictionaryDetailQueryVO queryVO); + + /** + * 保存字典详细信息 + * @param detailVo + */ + void createDicDetail(DictionaryDetailVO detailVo); + + /** + * 检查明细code是否已存在 + * @param code + * @return + */ + boolean checkDetailByCode(Long dicId, String code); + + /** + * 更新字典明细数据 + * @param id + * @param detailVo + */ + void updateDicDetail(Long id, DictionaryDetailVO detailVo); + + /** + * 删除字典目录 + * @param id + */ + void deleteDic(Long id); + + /** + * 删除明细 + * @param id + */ + void deleteDicDetail(Long id); + + /** + * 根据id获取字典目录对象 + * @param id + * @return + */ + DictionaryVO queryData(Long id); + + /** + * 根据id获取字典明细对象 + * @param dicId + * @param id + * @return + */ + DictionaryDetailVO getDetailData(Long dicId, Long id); + + /** + * 根据字典code获取字典明细列表 + * @param code + * @return + */ + List getDicDetailListByDicCode(String code); + +} diff --git a/src/main/java/club/joylink/rtss/services/ISysUserService.java b/src/main/java/club/joylink/rtss/services/ISysUserService.java new file mode 100644 index 000000000..5c6aaeefa --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/ISysUserService.java @@ -0,0 +1,276 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.entity.SysUser; +import club.joylink.rtss.vo.UserQueryVO; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.UserConfigVO; +import club.joylink.rtss.vo.client.UserSubscribeVO; +import club.joylink.rtss.vo.client.map.MapVO; +import club.joylink.rtss.vo.client.user.*; +import club.joylink.rtss.vo.wx.WmUserSession; + +import java.util.List; + +public interface ISysUserService { + + /** + * 根据openId查询用户 + * @param openid + */ + UserVO getUserByWxOpenId(String openid); + + /** + * 根据userId 主键查询用户 + * @param id + */ + UserVO findUserById(Long id); + + /** + * 通过用户姓名或手机号查询 + * @param query + * @return + */ + List queryUserByNameOrMobile(String query); + + /** + * 判断用户是否已经注册 + * @param wxId + * @return + */ + Boolean ifRegistered(String wxId); + + /** + * 修改用户信息 + * @param id + * @param userInfo + * @param vdcode + */ + void modify(Long id, UserVO userInfo, String vdcode); + + /** + * 保存用户配置 + * @param userId + * @param userConfigVOList + */ + void saveUserConfig(Long userId, List userConfigVOList); + + /** + * 获取用户配置 + * @param userId + * @return + */ + List getUserConfig(Long userId); + + /** + * 分页获取用户数据 + */ + PageVO queryPagedUser(UserQueryVO queryVO); + + /** + * 修改用户角色 + * @param id + * @param userId + * @param userVO + */ + void updateUserRole(Long id, Long userId, UserVO userVO); + + void updateUserCompany(Long id, Long userId, UserVO userVO); + + void updateUserInfo(Long id, Long userId, UserVO userVO); + + /** + * 是否管理员 + * @param userVO + * @return + */ + boolean isAdmin(UserVO userVO); + + /** + * 根据地图id查询订阅人员 + * @param mapId + * @return + */ + List selectSubscribeUser(long mapId); + + /** + * 分页获取用户数据(模糊查询) + * @param fuzzyParam + * @return + */ + List fuzzyQueryPagedUser(String fuzzyParam); + + /** + * 根据名称模糊查询 + * @param name + * @return + */ + List fuzzyQueryByName(String name); + + /** + * 根据微信小程序openid查询用户 + * @param wmOpenId + * @return + */ + UserVO findUserByWmOpenId(String wmOpenId); + + /** + * 根据微信小程序openid获取用户 + * @param wmOpenId + * @return + */ + UserVO getUserByWmOpenId(String wmOpenId); + + /** + * 根据unionid查询用户 + * @param unionid + */ + UserVO findUserByUnionId(String unionid); + + /** + * 根据微信openId获取用户 + * @param unionId + */ + UserVO getUserByUnionId(String unionId); + + /** + * 创建微信小程序来的用户 + * @param wmUserSession + * @return + */ + UserVO createUserOfWechatMicro(WmUserSession wmUserSession); + + /** + * 更新用户微信小程序openid + * @param id + * @param wmOpenId + */ + void updateUserWmOpenId(Long id, String wmOpenId); + + void updateUserWX(Long userId, WmUserSession wmUserSession); + + /** + * 更新用户的unionId + * @param changeUserList + */ + void updateUserWxUnionId(List changeUserList); + + /** + * 处理微信用户关注事件 + * @param wxId + * @return + */ + void wxSubscribeEventHandle(String wxId); + + /** + * 把注册用户的openId变为unionId + */ + void batchChangeOpenId2UnionId(); + + /** + * 根据账号密码查询用户 + * @param account + * @param password + * @return + */ + UserVO findUserByAccountAndPassword(String account, String password); + + /** + * 更新用户真实姓名 + * @param id + * @param name + */ + void updateUserName(Long id, String name); + + /** + * 更新用户昵称 + * @param id + * @param nickname + */ + void updateNickname(Long id, String nickname); + + /** + * 更新用户头像 + * @param id + * @param avatarPath + */ + void updateAvatar(Long id, String avatarPath); + + /** + * 更新用户手机号 + * @param id + * @param updateMobileVO + */ + void updateMobile(Long id, UpdateMobileVO updateMobileVO); + + /** + * 更新用户邮箱地址 + * @param id + * @param updateEmailVO + */ + void updateEmail(Long id, UpdateEmailVO updateEmailVO); + + /** + * 发送邮箱验证码 + * @param email + * @return + */ + String sendEmailValidCode(String email); + + /** + * 发送手机验证码 + * @param mobileInfoVO + * @return + */ + String sendMobileValidCode(MobileInfoVO mobileInfoVO); + + /** + * 查询用户总数量 + * @return + */ + int getUserAmount(); + + /** + * 更新用户密码 + * @param id + * @param updatePasswordVO + */ + void updatePassword(Long id, UpdatePasswordVO updatePasswordVO); + + /** + * 客户端修改用户密码 + * @param id + * @param password + */ + void updateUserPassword(Long id, String password); + + UserVO getUserById(Long id); + + List findUserByName(String name); + + boolean isExist(Long id); + + /** + * 获取微信小程序绑定url + * @param user + * @return + */ + WeChatBindStatusVO getWeChatBindUrl(UserVO user); + + /** + * 用户绑定微信小程序 + * @param code + * @param userId + */ + void userBindWm(String code, Long userId); + + void userBindCompany(Long userId, Integer companyId); + + UserVO getUserBaseInfoById(Long id); + + List getUsersWithEmail(); + + List getUsersWithMobile(); + + List getPlatformUsers(); +} diff --git a/src/main/java/club/joylink/rtss/services/ITaskService.java b/src/main/java/club/joylink/rtss/services/ITaskService.java new file mode 100644 index 000000000..ca8934e76 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/ITaskService.java @@ -0,0 +1,35 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.TaskListVO; +import club.joylink.rtss.vo.client.TaskQueryVO; +import club.joylink.rtss.vo.client.TaskVO; + +public interface ITaskService { + + /** + * 分页查询任务 + * @return + */ + PageVO queryPagedTask(TaskQueryVO queryVO); + + /** + * 创建任务 + * @param taskVO + * @param userVO + */ + void createTask(TaskVO taskVO, UserVO userVO); + + /** + * 开始任务 + * @param id + */ + void execute(Long id); + + /** + * 取消任务 + * @param id + */ + void cancel(Long id); +} diff --git a/src/main/java/club/joylink/rtss/services/IUserExamService.java b/src/main/java/club/joylink/rtss/services/IUserExamService.java new file mode 100644 index 000000000..3d8e2d2e3 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/IUserExamService.java @@ -0,0 +1,83 @@ +package club.joylink.rtss.services; + + +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.*; + +import java.util.List; + +public interface IUserExamService { + + /** + * 生成用户考试实例 + * @param examId + * @param userVO + * @return + */ + UserExamVO generateExamInstance(long examId, UserVO userVO); + + /** + * 获取用户考试实例 + * @param id + * @param userVO + * @return + */ + UserExamVO getExamInstance(long id, UserVO userVO); + + /** + * 完成考试题目 + * @param questionsVO + * @param userVO + */ + void finish(UserExamQuestionsVO questionsVO, UserVO userVO); + + /** + * 提交考试 + * @param id + * @param userVO + * @return + */ + UserExamVO submit(long id, UserVO userVO); + + /** + * 放弃考试 + * @param id + * @param user + */ + void abandon(long id, UserVO user); + + /** + * 根据实训id删除用户考试记录 + * @param trainingId + */ + void deleteUserExamRecordByTrainingId(Long trainingId); + + /** + * 根据实训id列表删除用户考试记录 + * @param trainingIdList + */ + void deleteUserExamRecordsByTrainingIdList(List trainingIdList); + + /** + * 分页查询用户考试数据 + * @param queryVO + * @return + */ + PageVO queryPagedUserExam(UserExamQueryVO queryVO); + + /** + * 修改用户考试数据 + * @param id + * @param userExamVO + * @param userVO + */ + void updateUserExam(Long id, UserExamVO userExamVO, UserVO userVO); + + /** + * 删除用户考试数据(同时删除用户考试试题数据) + * @param id + * @param userVO + */ + void deleteUserExam(Long id, UserVO userVO); + +} diff --git a/src/main/java/club/joylink/rtss/services/IUserPermissionService.java b/src/main/java/club/joylink/rtss/services/IUserPermissionService.java new file mode 100644 index 000000000..d4a983f7f --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/IUserPermissionService.java @@ -0,0 +1,96 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.constants.StatusEnum; +import club.joylink.rtss.entity.PermissionDistribute; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.permission.DistributeSelectVO; +import club.joylink.rtss.vo.client.permission.PermissionQueryVO; +import club.joylink.rtss.vo.client.userPermission.UserPermissionVO; +import club.joylink.rtss.vo.user.PermissionGenerateConfigVO; + +import java.util.List; + +public interface IUserPermissionService { + + /** + * 分页获取权限数据 + * @param queryVO + * @return + */ + PageVO queryPagedPermission(PermissionQueryVO queryVO); + + /** + * 设置失效 + * @param id + */ + void setInvalid(Long id); + + + List getExamUserPermission(UserVO userVO, Long mapId, String prdType, Long lessonId); + + List getSimulationUserPermission(UserVO userVO, Long mapId, String prdType); + + List getLessonUserPermission(UserVO userVO, Long mapId, String prdType, Long lessonId); + + List findUserPermissionVOListThatCanDistribute(DistributeSelectVO distributeSelectVO, UserVO user); + + PageVO queryMyPermission(UserVO user, PermissionQueryVO queryVO); + + void setPermissionOwner(Long id, UserVO owner, UserVO user); + + PageVO userPermissionStatistic(PermissionQueryVO queryVO); + + PageVO distributeTo(PermissionQueryVO queryVO); + + void createUserPermissionFromPermissionDistribute(PermissionDistribute permissionDistribute, UserVO user); + + List findValidByUserIdAndDistributeId(Long userId, Long distributeId); + + UserPermissionVO getById(Long id); + + void updateById(UserPermissionVO upVO); + + List queryByDistribute(Long id); + + List getByDistributeId(Long id); + + List findByDistributeId(Long distributeId); + + void restorePermissionToDistribute(Long userPermissionId); + + List findByDistributeIdAndStatus(Long distributeId, StatusEnum status); + + /** + * 恢复用户权限的数量 + */ + void restoreUserPermissionQuantity(Long id, Integer amount); + + /** + * 使distributeId为此的用户权限失效 + * @param distributeId + */ + void invalidateUserPermissionByDistributeId(Long distributeId); + + /** + * 查询这张地图下该用户可用的综合演练权限 + * @param mapId + * @param userId + * @return + */ + List findValidJointTrainingUserPermissionByMapIdAndUserId(Long mapId, Long userId); + + /** + * 获取个人所有用户权限 + * @param user + * @return + */ + List queryPersonalUserPermission(UserVO user); + + /** + * 生成用户权限 + * @param userVO + * @param permissionConfigVOList + */ + void generateUserPermissions(UserVO userVO, List permissionConfigVOList); +} diff --git a/src/main/java/club/joylink/rtss/services/IUserUsageStatsService.java b/src/main/java/club/joylink/rtss/services/IUserUsageStatsService.java new file mode 100644 index 000000000..983226bba --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/IUserUsageStatsService.java @@ -0,0 +1,76 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.UsageTotalStatsVO; +import club.joylink.rtss.vo.client.UserRankStatsVO; + +import java.util.List; + +public interface IUserUsageStatsService { + + /** + * 查询课程列表 + * + * @param userVO + * @return + */ + List queryLessonList(UserVO userVO); + + /** + * 查询课程统计排名 + * + * @param lessonId + * @param userVO + * @return + */ + List lessonRank(Long lessonId, UserVO userVO); + + /** + * 个人课程实训统计 + * + * @param lessonId + * @param userVO + * @return + */ + List personalLessonStats(Long lessonId, UserVO userVO); + + /** + * 查询有使用记录的课程数据 + * + * @param userVO + * @return + */ + List queryExamLessonList(UserVO userVO); + + /** + * 查询有使用记录的试卷数据 + * + * @param lessonId + * @param userVO + * @return + */ + List queryExamList(Long lessonId, UserVO userVO); + + /** + * 查询考试排名 + * + * @param examId + * @param userVO + * @return + */ + List examRank(Long examId, UserVO userVO); + + /** + * 用户考试结果数据 + * + * @param examId + * @return + */ + List examPersonalStats(Long examId, UserVO userVO); + + /** + * 统计各系统总时长 + * @return + */ + List totalDuration(boolean filter); +} diff --git a/src/main/java/club/joylink/rtss/services/IVirtualRealityIbpService.java b/src/main/java/club/joylink/rtss/services/IVirtualRealityIbpService.java new file mode 100644 index 000000000..a8d469bff --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/IVirtualRealityIbpService.java @@ -0,0 +1,26 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.simulation.cbtc.Simulation; +import club.joylink.rtss.simulation.cbtc.data.status.IbpStatus; +import club.joylink.rtss.simulation.cbtc.data.vr.VirtualRealityIbp; + +/** + * 虚拟真实IBP服务 + */ +public interface IVirtualRealityIbpService { + /** + * 获取IBP盘的状态 + */ + IbpStatus getIbpStatus(String group, String stationCode); + + /** + * 按下按钮 + */ + void pressTheButton(String group, String stationCode, VirtualRealityIbp.Button button); + + /** + * 收集并发送IBP的状态数据 + * @param simulation + */ + void collectAndDispatcher(Simulation simulation); +} diff --git a/src/main/java/club/joylink/rtss/services/IVoiceCommandService.java b/src/main/java/club/joylink/rtss/services/IVoiceCommandService.java new file mode 100644 index 000000000..f5465f0fe --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/IVoiceCommandService.java @@ -0,0 +1,17 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.simulation.cbtc.command.VoiceCommandBO; + +import java.util.List; + +public interface IVoiceCommandService { + /** + * 添加语音指令 + */ + void create(VoiceCommandBO command); + + /** + * 获取所有语音指令 + */ + List getAll(); +} diff --git a/src/main/java/club/joylink/rtss/services/IVoiceService.java b/src/main/java/club/joylink/rtss/services/IVoiceService.java new file mode 100644 index 000000000..918859d17 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/IVoiceService.java @@ -0,0 +1,90 @@ +package club.joylink.rtss.services; + +import com.joylink.base.exception.BusinessException; +import com.joylink.base.exception.constant.ExceptionMapping; +import club.joylink.rtss.util.AudioUtil; +import club.joylink.rtss.vo.client.VoiceRecognitionResult; +import net.bytebuddy.utility.RandomString; +import org.springframework.web.multipart.MultipartFile; + +import java.io.*; +import java.time.LocalDate; +import java.util.Objects; + +public interface IVoiceService { + String AudioFileBasePath = "/usr/local/joylink/jlcloud/audio/"; + static String getFilePath() { + LocalDate now = LocalDate.now(); + String datePath = now.getYear() + File.separator + now.getMonthValue() + File.separator + now.getDayOfMonth(); + String fileName = System.currentTimeMillis() + "-" + RandomString.make() + ".wav"; + String directoryPath = AudioFileBasePath + datePath; + File directory = new File(directoryPath); + if(!directory.exists()) { + directory.mkdirs(); + } + String filePath = directoryPath + File.separator + fileName; + return filePath; + } + + /** + * 保存语音文件 + * @param inputStream 此方法结束时会进行关闭 + * @return + * @throws IOException + */ + static VoiceService.VoiceFile saveFile(InputStream inputStream) throws IOException { + String filePath = getFilePath(); + OutputStream os = null; + File saveFile = null; + try { + byte[] bs = new byte[4096]; + int len; + os = new FileOutputStream(filePath); + while ((len = inputStream.read(bs)) != -1) { + os.write(bs, 0, len); + } + saveFile = new File(filePath); + } finally { + if(Objects.nonNull(inputStream)) { + inputStream.close(); + } + if(os != null) { + os.close(); + } + } + return new VoiceService.VoiceFile(filePath.replace(AudioFileBasePath, ""), saveFile); + } + static VoiceService.VoiceFile handleAndSaveFile(MultipartFile file) throws IOException { + String contentType = file.getContentType(); + boolean needConvert; + if("audio/mpeg".equals(contentType)) { // mp3 + needConvert = true; + } else if("audio/wave".equals(contentType) || + "audio/wav".equals(contentType)) { // wav + needConvert = false; + } else { + throw new BusinessException(ExceptionMapping.ILLEGAL_OPERATION, String.format("不支持的文件格式[%s]", contentType)); + } + InputStream inputStream = file.getInputStream(); + String filePath = getFilePath(); + if(needConvert) { + File saveFile = AudioUtil.convertMp3ToWav(inputStream, filePath); + return new VoiceService.VoiceFile(filePath.replace(AudioFileBasePath, ""), saveFile); + } else { + return saveFile(inputStream); + } + } + /** + * 识别服务器收到的语音文件 + * @param file + * @param lang + * @return + */ + VoiceRecognitionResult voiceRecognition(MultipartFile file, String lang); + + /** + * 语音合成,返回文件路径 + * @return 文件路径 + */ + String synthesis(String message, String per); +} diff --git a/src/main/java/club/joylink/rtss/services/IWxApiService.java b/src/main/java/club/joylink/rtss/services/IWxApiService.java new file mode 100644 index 000000000..d5a2f950d --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/IWxApiService.java @@ -0,0 +1,14 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.vo.wx.WmUserSession; + +public interface IWxApiService { + + /** + * 根据小程序code获取微信用户id信息 + * @param wmCode + * @return + */ + WmUserSession getWmUserSession(String wmCode); + +} \ No newline at end of file diff --git a/src/main/java/club/joylink/rtss/services/IWxAuthService.java b/src/main/java/club/joylink/rtss/services/IWxAuthService.java new file mode 100644 index 000000000..b9bbeb5bb --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/IWxAuthService.java @@ -0,0 +1,38 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.wx.WxPageAccessToken; +import club.joylink.rtss.vo.wx.WxUserInfo; + +/** + * 微信api接口服务 + */ +public interface IWxAuthService { + /** + * 根据微信小程序code获取用户信息 + * @param wmCode + * @return + */ + UserVO getUserInfoByWMCode(String wmCode); + + /** + * 根据微信公众号页面code获取系统用户信息 + * @param code + * @return + */ + UserVO getUserInfoByPageCode(String code); + + /** + * 根据微信公众号页面code获取页面accessToken + * @param code + * @return + */ + WxPageAccessToken getPageAccessToken(String code); + + /** + * 根据微信公众号页面code获取微信用户信息 + * @param code + * @return + */ + WxUserInfo getWxUserInfo(String code); +} diff --git a/src/main/java/club/joylink/rtss/services/IscsService.java b/src/main/java/club/joylink/rtss/services/IscsService.java new file mode 100644 index 000000000..724115c2e --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/IscsService.java @@ -0,0 +1,53 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.dao.IscsDAO; +import club.joylink.rtss.entity.Iscs; +import club.joylink.rtss.entity.IscsExample; +import club.joylink.rtss.vo.client.iscs.IscsVO; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.util.List; +import java.util.Objects; + +@Slf4j +@Service +public class IscsService implements IIscsService { + + @Autowired + private IscsDAO iscsDAO; + + @Override + public void saveIscsData(IscsVO iscsVO) { + + //查询是否存在,存在更新,不存在插入 + IscsExample example = new IscsExample(); + example.createCriteria().andLineCodeEqualTo(iscsVO.getLineCode()) +// .andStationCodeEqualTo(iscsVO.getStationCode()) + .andTotalSystemEqualTo(iscsVO.getTotalSystem()) + .andSystemEqualTo(iscsVO.getSystem()) + .andUserInterfaceEqualTo(iscsVO.getUserInterface()); + + IscsVO iscsData = getIscsDataBy(iscsVO); + if(Objects.isNull(iscsData)){ + iscsDAO.insert(iscsVO.converttoDB()); + return; + } + iscsDAO.updateByExampleSelective(iscsVO.converttoDB(),example); + } + + @Override + public IscsVO getIscsDataBy(IscsVO iscsVO) { + IscsExample example = new IscsExample(); + example.createCriteria().andLineCodeEqualTo(iscsVO.getLineCode()) +// .andStationCodeEqualTo(iscsVO.getStationCode()) + .andTotalSystemEqualTo(iscsVO.getTotalSystem()) + .andSystemEqualTo(iscsVO.getSystem()) + .andUserInterfaceEqualTo(iscsVO.getUserInterface()); + List list = iscsDAO.selectByExampleWithBLOBs(example); + if(CollectionUtils.isEmpty(list))return null; + return new IscsVO(list.get(0)); + } +} diff --git a/src/main/java/club/joylink/rtss/services/LearnService.java b/src/main/java/club/joylink/rtss/services/LearnService.java new file mode 100644 index 000000000..14b346126 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/LearnService.java @@ -0,0 +1,434 @@ +package club.joylink.rtss.services; + +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import com.joylink.base.exception.BusinessException; +import com.joylink.base.exception.DBException; +import com.joylink.base.exception.constant.ExceptionMapping; +import club.joylink.rtss.simulation.cbtc.exception.SimulationException; +import club.joylink.rtss.simulation.cbtc.exception.SimulationExceptionType; +import club.joylink.rtss.configuration.configProp.WeChatConfig; +import club.joylink.rtss.constants.Project; +import club.joylink.rtss.dao.LearnCommentDAO; +import club.joylink.rtss.dao.LearnMessageDAO; +import club.joylink.rtss.dao.LearnPostDAO; +import club.joylink.rtss.entity.*; +import club.joylink.rtss.util.ConvertUtil; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageQueryVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.learn.LearnCommentVO; +import club.joylink.rtss.vo.client.learn.LearnCreateVO; +import club.joylink.rtss.vo.client.learn.LearnPostVO; +import club.joylink.rtss.vo.client.post.LearnMessageCreateVO; +import club.joylink.rtss.vo.client.post.LearnMessagePagedQueryVO; +import club.joylink.rtss.vo.client.post.LearnMessageVO; +import club.joylink.rtss.wechat.MiniProgramService; +import club.joylink.rtss.wechat.vo.WxError; +import lombok.extern.slf4j.Slf4j; +import org.springframework.util.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; +import org.springframework.web.client.RestTemplate; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +@Slf4j +@Service +public class LearnService implements ILearnService { + + @Autowired + private LearnPostDAO learnPostDAO; + + @Autowired + private LearnCommentDAO learnCommentDAO; + + @Autowired + private ISysUserService iSysUserService; + + @Autowired + private RestTemplate restTemplate; + + @Autowired + private WeChatConfig weChatConfig; + + @Autowired + private MiniProgramService miniProgramService; + + @Autowired + private LearnMessageDAO learnMessageDAO; + + @Override + public PageVO queryPagedPost(PageQueryVO queryVO) { + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + Page page = (Page) learnPostDAO.selectByExample(null); + List vos = page.getResult().stream().map(LearnPostVO::new).collect(Collectors.toList()); + return PageVO.convert(page, vos); + } + + @Override + @Transactional + public String createPost(Long mapId, LearnCreateVO postCreateVO, UserVO userVO) { + this.checkContent(postCreateVO.getContent()); + LearnPost post = new LearnPost(); + post.setTitle(postCreateVO.getContent()); + post.setCreatorId(userVO.getId()); + post.setCreateTime(LocalDateTime.now()); + learnPostDAO.insertSelective(post); +// LearnComment comment = new LearnComment(); +// comment.setContent(postCreateVO.getContent()); +// comment.setPostId(post.getId()); +// comment.setCreatorId(userVO.getIdLong()); +// comment.setCreateTime(LocalDateTime.now()); +// learnCommentDAO.insertSelective(comment); + return ConvertUtil.long2Str(post.getId()); + } + + @Override + @Transactional + public void likePost(Long postId, UserVO userVO) { + LearnPost post = learnPostDAO.selectByPrimaryKey(postId); + if (Objects.isNull(post)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + post.setLike(post.getLike() + 1); + learnPostDAO.updateByPrimaryKey(post); + } + + @Override + @Transactional + public void unlikePost(Long postId, UserVO userVO) { + LearnPost post = learnPostDAO.selectByPrimaryKey(postId); + if (Objects.isNull(post)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + post.setUnlike(post.getUnlike() + 1); + learnPostDAO.updateByPrimaryKey(post); + } + + @Override + public LearnPostVO getPostInfo(Long postId) { + LearnPost post = learnPostDAO.selectByPrimaryKey(postId); + if (Objects.isNull(post)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + LearnPostVO postVO = new LearnPostVO(post); + // 用户昵称 + UserVO user = iSysUserService.findUserById(post.getCreatorId()); + postVO.setUserNickname(user.getNickname()); + postVO.setAvatarPath(user.getAvatarPath()); + return postVO; + } + + @Override + public PageVO pagedQueryComment(Long messageId, PageQueryVO queryVO) { + checkMessage(messageId); + List commentVOList = new ArrayList<>(); + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + LearnCommentExample commentExample = new LearnCommentExample(); + commentExample.setOrderByClause("id"); + commentExample.createCriteria().andMessageIdEqualTo(messageId); + Page page = (Page) learnCommentDAO.selectByExample(commentExample); + page.getResult().forEach(comment -> commentVOList.add(convertComment(comment))); + return PageVO.convert(page, commentVOList); + } + + @Override + public List queryCommentList(Long messageId) { + LearnCommentExample commentExample = new LearnCommentExample(); + commentExample.createCriteria().andMessageIdEqualTo(messageId); + List comments = learnCommentDAO.selectByExample(commentExample); + List commentVOList = new ArrayList<>(); + comments.forEach(comment -> commentVOList.add(convertComment(comment))); + return commentVOList; + } + + /** + * 回复数据完善 + * + * @param comment + * @return + */ + private LearnCommentVO convertComment(LearnComment comment) { + LearnCommentVO commentVO = new LearnCommentVO(comment); + // 用户昵称 + String nickname = iSysUserService.findUserById(comment.getCreatorId()).getNickname(); + commentVO.setUserNickname(nickname); + // 回复的用户的昵称 + if (comment.getParentId() != null) { + commentVO.setReplyUserNickName(iSysUserService.findUserById(comment.getParentId()).getNickname()); + } + // 回复数 + LearnCommentExample learnCommentExample = new LearnCommentExample(); + learnCommentExample.createCriteria().andMessageIdEqualTo(comment.getMessageId()).andRootIdEqualTo(comment.getId()); + commentVO.setCommentCount(learnCommentDAO.countByExample(learnCommentExample)); + return commentVO; + } + + @Override + public void addComment(Long messageId, LearnCreateVO postCreateVO, UserVO userVO) { + checkMessage(messageId); + checkContent(postCreateVO.getContent()); + LearnComment comment = new LearnComment(); + comment.setContent(postCreateVO.getContent()); + comment.setMessageId(messageId); + + comment.setCreatorId(userVO.getId()); + comment.setCreateTime(LocalDateTime.now()); + learnCommentDAO.insertSelective(comment); + } + + @Override + public void addComment(Long messageId, Long commentId, LearnCreateVO postCreateVO, UserVO userVO) { + checkMessage(messageId); + checkContent(postCreateVO.getContent()); + LearnComment comment = new LearnComment(); + comment.setContent(postCreateVO.getContent()); + comment.setMessageId(messageId); + LearnComment parentComment = learnCommentDAO.selectByPrimaryKey(commentId); + if (Objects.isNull(parentComment.getRootId())) { // 对评论的回复 + comment.setRootId(commentId); + } else { // 对回复的回复 + comment.setRootId(parentComment.getRootId()); + } + comment.setParentId(parentComment.getCreatorId()); + comment.setCreatorId(userVO.getId()); + comment.setCreateTime(LocalDateTime.now()); + learnCommentDAO.insertSelective(comment); + } + + @Override + @Transactional + public void likeComment(Long commentId, UserVO userVO) { + LearnComment comment = learnCommentDAO.selectByPrimaryKey(commentId); + if (Objects.isNull(comment)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + comment.setLike(comment.getLike() + 1); + learnCommentDAO.updateByPrimaryKey(comment); + } + + @Override + @Transactional + public void unlikeComment(Long commentId, UserVO userVO) { + LearnComment comment = learnCommentDAO.selectByPrimaryKey(commentId); + if (Objects.isNull(comment)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + comment.setUnlike(comment.getUnlike() + 1); + learnCommentDAO.updateByPrimaryKey(comment); + } + + @Override + public void top(Long postId, UserVO userVO) { + LearnPost post = topCheck(postId, userVO); + post.setTopping(true); + learnPostDAO.updateByPrimaryKey(post); + } + + @Override + public void unTop(Long postId, UserVO userVO) { + LearnPost post = topCheck(postId, userVO); + post.setTopping(false); + learnPostDAO.updateByPrimaryKey(post); + } + + @Override + public void deletePost(Long postId, UserVO userVO) { + topCheck(postId, userVO); + //删除留言 + LearnMessageExample messageExample = new LearnMessageExample(); + messageExample.createCriteria().andPostIdEqualTo(postId); + List messageIds = learnMessageDAO.selectByExample(messageExample).stream().map(LearnMessage::getId).collect(Collectors.toList()); + learnMessageDAO.deleteByExample(messageExample); + //删除评论 + LearnCommentExample commentExample = new LearnCommentExample(); + commentExample.createCriteria().andMessageIdIn(messageIds); + learnCommentDAO.deleteByExample(commentExample); + learnPostDAO.deleteByPrimaryKey(postId); + } + + @Override + public void adminDeleteComment(Long commentId, UserVO user) { + adminCheck(user); + learnCommentDAO.deleteByPrimaryKey(commentId); + } + + @Override + public void userDeleteComment(Long commentId, UserVO user) { + LearnComment comment = getComment(commentId); + if (!comment.getCreatorId().equals(user.getId())) { + log.error(String.format("用户[%s]意外尝试删除别人的评论[%s]", user.getId(), commentId)); + throw new BusinessException(ExceptionMapping.ILLEGAL_OPERATION, "无法删除非本人的评论"); + } + learnCommentDAO.deleteByPrimaryKey(commentId); + } + + @Override + public long createMessage(LearnMessageCreateVO messageCreateVO, UserVO user) { + if (StringUtils.isBlank(messageCreateVO.getContent()) + && CollectionUtils.isEmpty(messageCreateVO.getPictureUrls())) { + throw new BusinessException(ExceptionMapping.ARGUMENT_ILLEGAL, "文字和图片不能都为空"); + } + checkContent(messageCreateVO.getContent()); + LearnMessageWithBLOBs message = messageCreateVO.convert2DB(user.getId()); + learnMessageDAO.insert(message); + LearnMessageExample example = new LearnMessageExample(); + example.createCriteria().andPostIdEqualTo(messageCreateVO.getPostId()); + return learnMessageDAO.countByExample(example); + } + + @Override + public PageVO pagedQueryMessageByPostId(Long postId, LearnMessagePagedQueryVO queryVO) { + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + Page page = (Page) learnMessageDAO.select(postId, queryVO); + for (LearnMessageVO vo : page.getResult()) { + vo.setComments(pagedQueryComment(vo.getId(), new PageQueryVO(1,3))); + } + return PageVO.convert(page); + } + + @Override + public void adminDeleteMessage(Long messageId, UserVO user) { + adminCheck(user); + deleteMessage(messageId); + } + + @Override + public void userDeleteMessage(Long messageId, UserVO user) { + LearnMessage message = getMessage(messageId); + if (!message.getCreatorId().equals(user.getId())) { + log.error(String.format("用户[%s]意外尝试删除别人的留言[%s]", user.getId(), messageId)); + throw new BusinessException(ExceptionMapping.ILLEGAL_OPERATION, "无法删除非本人的留言"); + } + deleteMessage(messageId); + } + + @Override + public LearnPostVO queryPost(Project project) { + LearnPostExample example = new LearnPostExample(); + example.createCriteria().andProjectEqualTo(project.name()); + List learnPosts = learnPostDAO.selectByExample(example); + return new LearnPostVO(learnPosts.get(0)); + } + + @Override + public PageVO pagedQueryMessageByProject(Project project, LearnMessagePagedQueryVO queryVO) { + LearnPostVO post = queryPost(project); + if (post == null) { + log.error(String.format("项目[%s]的留言板不存在",project)); + throw new SimulationException(SimulationExceptionType.System_Fault, "该项目的留言板不存在"); + } + return pagedQueryMessageByPostId(post.getId(), queryVO); + } + + // @Override +// public Integer likeMessage(Long messageId) { +// LearnMessageWithBLOBs message = getMessage(messageId); +// message.setLike(message.getLike() == null ? 0 : message.getLike() + 1); +// learnMessageDAO.updateByPrimaryKey(message); +// return message.getLike(); +// } + +// @Override +// public Integer unlikeMessage(Long messageId) { +// LearnMessage message = getMessage(messageId); +// message.setUnlike(message.getUnlike() == null ? 0 : message.getUnlike() + 1); +// learnMessageDAO.updateByPrimaryKey(message); +// return message.getUnlike(); +// } + + private LearnComment findComment(Long commentId) { + return learnCommentDAO.selectByPrimaryKey(commentId); + } + + private LearnComment getComment(Long commentId) { + LearnComment comment = findComment(commentId); + if (comment == null) { + throw new BusinessException(ExceptionMapping.DATA_NOT_EXIST, "该评论不存在或已被删除"); + } + return comment; + } + + private void deleteMessage(Long messageId) { + learnMessageDAO.deleteByPrimaryKey(messageId); + deleteCommentByMessageId(messageId); + } + + private void deleteCommentByMessageId(Long messageId) { + LearnCommentExample example = new LearnCommentExample(); + example.createCriteria().andMessageIdEqualTo(messageId); + learnCommentDAO.deleteByExample(example); + } + + private LearnPost topCheck(Long postId, UserVO userVO) { + if (!iSysUserService.isAdmin(userVO)) { + throw new BusinessException(ExceptionMapping.ILLEGAL_OPERATION); + } + LearnPost post = learnPostDAO.selectByPrimaryKey(postId); + if (Objects.isNull(post)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + return post; + } + + private void checkContent(String content) { + WxError wxError = this.miniProgramService.msgSecCheck(content); + if (wxError.isError()) { + log.error(String.format("内容校验不通过: [%s]", wxError.toString())); + throw new BusinessException(ExceptionMapping.CONTENT_SECURITY_CHECK); + } +// Map param = new HashMap<>(); +// param.put("content", content); +// WxBaseResp resp = restTemplate.postForObject(weChatConfig.getMsgSecCheckUrl(), param, WxBaseResp.class); +// if (Objects.nonNull(resp)) { +// if (Objects.nonNull(resp.getErrcode()) && !Objects.equals(resp.getErrcode(), 0)) { +// log.error(String.format("内容校验不通过: code: %s, msg: %s", resp.getErrcode(), resp.getErrmsg())); +// throw new BusinessException(ExceptionMapping.CONTENT_SECURITY_CHECK); +// } +// } else { +// throw new BusinessException(ExceptionMapping.SERVER_CALL_EXCEPTION); +// } + } + + + /** + * 留言检查 + */ + private void checkMessage(Long messageId) { + if (findMessage(messageId) == null) { + throw new BusinessException(ExceptionMapping.DATA_NOT_EXIST, String.format("id为[%s]的留言不存在", messageId)); + } + } + + private LearnMessageWithBLOBs findMessage(Long messageId) { + return learnMessageDAO.selectByPrimaryKey(messageId); + } + + private LearnMessageWithBLOBs getMessage(Long messageId) { + LearnMessageWithBLOBs message = findMessage(messageId); + if (message == null) { + throw new BusinessException(ExceptionMapping.DATA_NOT_EXIST, String.format("id为[%s]的留言不存在", messageId)); + } + return message; + } + + /** + * 确认用户是管理员 + */ + private void adminCheck(UserVO user) { + if (!iSysUserService.isAdmin(user)) { + log.error(String.format("用户[%s]意外使用管理员的功能", user.getId())); + throw new BusinessException(ExceptionMapping.ILLEGAL_OPERATION, "非管理员无法使用此功能"); + } + } + + private void test(LearnMessagePagedQueryVO queryVO) { + } +} diff --git a/src/main/java/club/joylink/rtss/services/LessonDraftService.java b/src/main/java/club/joylink/rtss/services/LessonDraftService.java new file mode 100644 index 000000000..52da114b8 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/LessonDraftService.java @@ -0,0 +1,547 @@ +package club.joylink.rtss.services; + +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import com.joylink.base.exception.BusinessException; +import com.joylink.base.exception.DBException; +import com.joylink.base.exception.constant.ExceptionMapping; +import club.joylink.rtss.constants.BusinessConsts; +import club.joylink.rtss.constants.TreeNodeTypeEnum; +import club.joylink.rtss.dao.*; +import club.joylink.rtss.entity.*; +import club.joylink.rtss.entity.LsDraftLessonChapterExample.Criteria; +import club.joylink.rtss.util.ConvertUtil; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.*; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.time.LocalDateTime; +import java.util.*; +import java.util.stream.Collectors; + +/** + * 课程草稿 服务 + * @author sheng + * + */ +@Service +@Slf4j +public class LessonDraftService implements ILessonDraftService { + + @Autowired + private ILessonService iLessonService; + + @Autowired + private LsDraftLessonDAO lsDraftLessonDAO; + + @Autowired + private LsDraftLessonChapterDAO draftLessonChapterDAO; + + @Autowired + private LsDraftRelChapterTrainingDAO draftRelChapterTrainingDAO; + + @Autowired + private LsLessonDAO lessonDAO; + + @Autowired + private LsLessonChapterDAO lessonChapterDAO; + + @Autowired + private LsRelChapterTrainingDAO relChapterTrainingDAO; + + @Autowired + private TrainingDAO trainingDAO; + + @Override + public PageVO queryPagedDraftLesson(Long mapId, PageQueryVO queryVO, UserVO userVO) { + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + LsDraftLessonExample lsDraftLessonExample = new LsDraftLessonExample(); + lsDraftLessonExample.createCriteria() + .andMapIdEqualTo(mapId) + .andCreatorIdEqualTo(userVO.getId()); + Page page = (Page) lsDraftLessonDAO.selectByExample(lsDraftLessonExample); + return PageVO.convert(page, LessonVO.convert2VO(page.getResult())); + } + + @Override + public List getLessonTree(Long lessonId, UserVO userVO) { + LsDraftLesson draftLesson = lsDraftLessonDAO.selectByPrimaryKey(lessonId); + if (Objects.isNull(draftLesson)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + // 批量查询课程对应的章节、实训列表 + List chapterVos = this.draftLessonChapterDAO.selectChapterTrainingByLessonId(lessonId); + // 构建课程树 + return ConvertUtil.buildLessonTreeList(Collections.singletonList(new LessonVO(draftLesson)), chapterVos); + } + + @Override + public LessonVO getLesson(Long id) { + LsDraftLesson lesson = this.lsDraftLessonDAO.selectByPrimaryKey(id); + if(null == lesson) throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + return new LessonVO(lesson); + } + + @Override + @Transactional + public void createLesson(LessonVO lessonVo, UserVO userVO) { + LsDraftLesson lesson = lessonVo.convert2Draft(); + lesson.setUpdateTime(LocalDateTime.now()); + lesson.setCreatorId(userVO.getId()); + lesson.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_01); + this.lsDraftLessonDAO.insert(lesson); + } + + @Override + @Transactional + public void createFrom(LessonVO lessonVo, UserVO userVO) { + // 创建课程 + LsLesson lesson = this.lessonDAO.selectByPrimaryKey(lessonVo.getId()); + if(Objects.isNull(lesson)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + LsDraftLesson lsDraftLesson = new LessonVO(lesson).convert2Draft(); + lsDraftLesson.setName(lessonVo.getName()); + lsDraftLesson.setMapId(lessonVo.getMapId()); + lsDraftLesson.setUpdateTime(LocalDateTime.now()); + lsDraftLesson.setCreatorId(userVO.getId()); + //未发布状态 + lsDraftLesson.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_01); + this.lsDraftLessonDAO.insert(lsDraftLesson); + // 创建章节 + LsLessonChapterExample chapterExample = new LsLessonChapterExample(); + chapterExample.createCriteria().andLessonIdEqualTo(lesson.getId()); + List lsLessonChapters = this.lessonChapterDAO.selectByExample(chapterExample); + lsLessonChapters = lsLessonChapters.stream().sorted(Comparator.comparing(LsLessonChapter::getParentId)).collect(Collectors.toList()); + Map idChangeMap = new HashMap<>(); + lsLessonChapters.forEach(lsLessonChapter -> { + LsDraftLessonChapter lsDraftLessonChapter = LessonChapterVO.convertPublic2Draft(lsLessonChapter); + lsDraftLessonChapter.setLessonId(lsDraftLesson.getId()); + if(lsDraftLessonChapter.getParentId() != 0) { + lsDraftLessonChapter.setParentId(idChangeMap.get(lsDraftLessonChapter.getParentId())); + } + this.draftLessonChapterDAO.insert(lsDraftLessonChapter); + idChangeMap.put(lsLessonChapter.getId(), lsDraftLessonChapter.getId()); + // 章节关联实训 + LsRelChapterTrainingExample chapterTrainingExample = new LsRelChapterTrainingExample(); + chapterTrainingExample.createCriteria().andChapterIdEqualTo(lsLessonChapter.getId()); + List lsRelChapterTrainingList = this.relChapterTrainingDAO.selectByExample(chapterTrainingExample); + lsRelChapterTrainingList.forEach(lsRelChapterTraining -> { + LsDraftRelChapterTraining draftRelChapterTraining = new LsDraftRelChapterTraining(); + draftRelChapterTraining.setLessonId(lsDraftLesson.getId()); + draftRelChapterTraining.setChapterId(lsDraftLessonChapter.getId()); + draftRelChapterTraining.setTrainingId(lsRelChapterTraining.getTrainingId()); + draftRelChapterTraining.setOrderNum(lsRelChapterTraining.getOrderNum()); + draftRelChapterTraining.setTrial(lsRelChapterTraining.getTrial()); + this.draftRelChapterTrainingDAO.insert(draftRelChapterTraining); + }); + }); + } + + @Override + @Transactional + public void updateLesson(Long id, LessonVO lessonVo, UserVO userVO) { + LsDraftLesson lesson = this.lsDraftLessonDAO.selectByPrimaryKey(id); + if(null == lesson) throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + LsDraftLesson newLesson = lessonVo.convert2Draft(); + newLesson.setCreatorId(lesson.getCreatorId()); + newLesson.setId(id); + newLesson.setUpdateTime(LocalDateTime.now()); + newLesson.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_01); + this.lsDraftLessonDAO.updateByPrimaryKey(newLesson); + } + + @Override + public LessonChapterVO getChapter(Long id) { + LsDraftLessonChapter chapter = this.draftLessonChapterDAO.selectByPrimaryKey(id); + if(null == chapter) throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + LessonChapterVO chapterVo = new LessonChapterVO(chapter); + // 查询关联的实训ids + LsDraftRelChapterTrainingExample example = new LsDraftRelChapterTrainingExample(); + example.createCriteria().andChapterIdEqualTo(id); + List relList = this.draftRelChapterTrainingDAO.selectByExample(example); + + List trainingIdList = relList.stream().map(LsDraftRelChapterTraining::getTrainingId).collect(Collectors.toList()); + List relVOList = new ArrayList<>(); + if (!CollectionUtils.isEmpty(trainingIdList)) { + TrainingExample trainingExample = new TrainingExample(); + trainingExample.createCriteria().andIdIn(trainingIdList); + List trainingList = trainingDAO.selectByExample(trainingExample); + Map trainingIdNameMap = CollectionUtils.isEmpty(trainingList) ? new HashMap<>() : + trainingList.stream().collect(Collectors.toMap(Training::getId, Training::getName)); + + relList.forEach(rel -> { + LessonChapterTrainingRelVO relVO = new LessonChapterTrainingRelVO(rel); + relVO.setTrainingName(trainingIdNameMap.get(rel.getTrainingId())); + relVOList.add(relVO); + }); + } + chapterVo.setTrainings(relVOList); +// chapterVo.setTrainings(LessonChapterTrainingRelVO.convertTemplate2VOList(relList)); + // 查询关联的实训数据 +// List trainingNodes = new ArrayList<>(); +// List trainingIds = new ArrayList<>(); +// if(!CollectionUtils.isEmpty(relList)) { +// relList.forEach(rel -> { +// trainingIds.add(rel.getTrainingId()); +// }); +// List trainingVos = this.iTrainingService.queryByIds(trainingIds); +// trainingNodes = ConvertUtil.buildTreeList(trainingVos); +// } +// chapterVo.setTrainingNodes(trainingNodes); + return chapterVo; + } + + @Override + @Transactional + public void createChapter(LessonChapterVO chapterVo) { + LsDraftLessonChapter chapter = chapterVo.toDraftDB(); + if(chapter.getParentId() == null) { + chapter.setParentId(0L); + } + int order = getNextOrder(chapter); + chapter.setOrderNum(order); + this.draftLessonChapterDAO.insert(chapter); + this.saveChapterTrainingRel(chapter, chapterVo.getTrainings()); + } + + /** + * 保存章节实训关联表 + */ + private void saveChapterTrainingRel(LsDraftLessonChapter chapter, List trainings) { + long chapterId = chapter.getId(); + long lessonId = chapter.getLessonId(); + // 删除旧关系 + LsDraftRelChapterTrainingExample example = new LsDraftRelChapterTrainingExample(); + example.createCriteria().andChapterIdEqualTo(chapterId); + this.draftRelChapterTrainingDAO.deleteByExample(example); + // 保存新关系 + if(!CollectionUtils.isEmpty(trainings)) { + int order = 0; + for (LessonChapterTrainingRelVO training : trainings) { + LsDraftRelChapterTraining rel = new LsDraftRelChapterTraining(); + rel.setLessonId(lessonId); + rel.setChapterId(chapterId); + rel.setTrainingId(training.getTrainingId()); + rel.setOrderNum(++order); + rel.setTrial(training.getTrial()); + this.draftRelChapterTrainingDAO.insert(rel); + } + } + } + + /** + * 获取排序值 + * @param chapter + * @return + */ + private int getNextOrder(LsDraftLessonChapter chapter) { + int order = 1; + LsDraftLessonChapterExample example = new LsDraftLessonChapterExample(); + example.createCriteria() + .andLessonIdEqualTo(chapter.getLessonId()) + .andParentIdEqualTo(chapter.getParentId()); + example.setOrderByClause("order_num desc"); + List list = this.draftLessonChapterDAO.selectByExample(example); + if(!CollectionUtils.isEmpty(list)) { + order += list.get(0).getOrderNum(); + } + return order; + } + + @Override + @Transactional + public void updateChapter(Long id, LessonChapterVO chapterVo) { + LsDraftLessonChapter chapter = this.draftLessonChapterDAO.selectByPrimaryKey(id); + if(null == chapter) throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + chapter = chapterVo.toDraftDB(); + chapter.setId(id); + this.draftLessonChapterDAO.updateByPrimaryKey(chapter); + this.saveChapterTrainingRel(chapter, chapterVo.getTrainings()); + LsDraftLesson lsDraftLesson = lsDraftLessonDAO.selectByPrimaryKey(chapter.getLessonId()); + lsDraftLesson.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_01); + lsDraftLessonDAO.updateByPrimaryKey(lsDraftLesson); + } + + @Override + @Transactional + public void deleteChapter(Long id) { + LsDraftLessonChapter chapter = this.draftLessonChapterDAO.selectByPrimaryKey(id); + if(null == chapter) return;; + //删除章节实训关系 + LsDraftRelChapterTrainingExample example = new LsDraftRelChapterTrainingExample(); + example.createCriteria().andChapterIdEqualTo(id); + this.draftRelChapterTrainingDAO.deleteByExample(example); + //删除章节 + this.draftLessonChapterDAO.deleteByPrimaryKey(id); + //更新课程发布状态 + LsDraftLesson lsDraftLesson = lsDraftLessonDAO.selectByPrimaryKey(chapter.getLessonId()); + lsDraftLesson.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_01); + lsDraftLessonDAO.updateByPrimaryKey(lsDraftLesson); + } + + @Override + public void deleteLesson(Long id) { + LsDraftLesson lesson = this.lsDraftLessonDAO.selectByPrimaryKey(id); + if(null != lesson) { + LsDraftLessonChapterExample example = new LsDraftLessonChapterExample(); + example.createCriteria().andLessonIdEqualTo(id); + List chapters = this.draftLessonChapterDAO.selectByExample(example); + // 删除课程章节-实训关联数据 + if(!CollectionUtils.isEmpty(chapters)) { + List chapterIds = chapters.stream().map(LsDraftLessonChapter::getId).collect(Collectors.toList()); + LsDraftRelChapterTrainingExample delExample = new LsDraftRelChapterTrainingExample(); + delExample.createCriteria().andChapterIdIn(chapterIds); + this.draftRelChapterTrainingDAO.deleteByExample(delExample); + } + // 删除章节数据 + LsDraftLessonChapterExample chapterExample = new LsDraftLessonChapterExample(); + chapterExample.createCriteria().andLessonIdEqualTo(id); + this.draftLessonChapterDAO.deleteByExample(chapterExample); + // 删除课程 + this.lsDraftLessonDAO.deleteByPrimaryKey(id); + } + } + + @Override + public void publishLesson(Long id, LessonPublishVO publishVO) { + LessonVO lessonVo = this.getDraftLessonDetail(id); + this.iLessonService.publish(lessonVo, publishVO); + } + + /** + * 获取课程明细 + * @param id + * @return + */ + private LessonVO getDraftLessonDetail(Long id) { + LsDraftLesson lesson = this.lsDraftLessonDAO.selectByPrimaryKey(id); + if(null == lesson) throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + LessonVO lessonVo = new LessonVO(lesson); + // 查询章节数据 + LsDraftLessonChapterExample chapterExample = new LsDraftLessonChapterExample(); + chapterExample.createCriteria().andLessonIdEqualTo(id); + List chapters = this.draftLessonChapterDAO.selectByExample(chapterExample); + List chapterVos = LessonChapterVO.convert2VO(chapters); + lessonVo.setChapters(chapterVos); + if(!CollectionUtils.isEmpty(chapters)) { + List chapterIds = new ArrayList<>(); + chapters.forEach(chapter -> { + chapterIds.add(chapter.getId()); + }); + LsDraftRelChapterTrainingExample relExample = new LsDraftRelChapterTrainingExample(); + relExample.createCriteria().andChapterIdIn(chapterIds); + List rels = this.draftRelChapterTrainingDAO.selectByExample(relExample); + List relVos = LessonChapterTrainingRelVO.convert2VO(rels); + lessonVo.setRel(relVos); + } + return lessonVo; + } + + @Override + @Transactional + public void dragSort(DragSortReqVO sortReq) { + if(sortReq.getSourceId().equals(sortReq.getTargetId()) && sortReq.getSourceType().equals(sortReq.getTargetType())) { + // 拖拽对象和放置位置对象类型和id都相等,不处理 + return; + } else { + // 章节排序 + this.chapterOrder(sortReq); + //实训排序 + this.trainingOrder(sortReq); + } + } + +// @Override +// public void updateCity(Long mapId) { +// MpMap map = this.mpMapMapper.selectByPrimaryKey(mapId); +// LsDraftLessonExample example = new LsDraftLessonExample(); +// example.createCriteria().andMapIdEqualTo(mapId); +// List lsDraftLessons = this.lsDraftLessonMapper.selectByExample(example); +// lsDraftLessons.forEach(lsDraftLesson -> { +// lsDraftLesson.setCityCode(map.getCityCode()); +// this.lsDraftLessonMapper.updateByPrimaryKey(lsDraftLesson); +// }); +// } + + /** + * 章节排序 + * @param sortReq + */ + private void chapterOrder (DragSortReqVO sortReq) { + if(TreeNodeTypeEnum.Chapter.name().equals(sortReq.getSourceType()) + && TreeNodeTypeEnum.Chapter.name().equals(sortReq.getTargetType())) { + LsDraftLessonChapter source = this.draftLessonChapterDAO.selectByPrimaryKey(ConvertUtil.str2Long(sortReq.getSourceId())); + if(null != source) { + LsDraftLessonChapter target = this.draftLessonChapterDAO.selectByPrimaryKey(ConvertUtil.str2Long(sortReq.getTargetId())); + if(null != target) { + LsDraftLessonChapterExample example = new LsDraftLessonChapterExample(); + Criteria criteria = example.createCriteria(); + criteria.andLessonIdEqualTo(target.getLessonId()); + int order = 1; + // 前面 + if(DragSortReqVO.LocateType.Before.equals(sortReq.getLocation())) { + order = target.getOrderNum(); + criteria.andParentIdEqualTo(target.getParentId()); + if(source.getParentId().equals(target.getParentId())) { // 同一层级下 + if(source.getOrderNum().intValue() > target.getOrderNum().intValue()) { // source 位置大于 target + criteria.andOrderNumGreaterThanOrEqualTo(target.getOrderNum()) + .andOrderNumLessThan(source.getOrderNum()); + this.updateChapterOrder(example, 1); + } else { + order = target.getOrderNum() - 1; + criteria.andOrderNumGreaterThan(source.getOrderNum()) + .andOrderNumLessThan(target.getOrderNum()); + this.updateChapterOrder(example, -1); + } + } else { // 不同层级下 + LsDraftLessonChapterExample example2 = new LsDraftLessonChapterExample(); + example2.createCriteria().andLessonIdEqualTo(source.getLessonId()).andParentIdEqualTo(source.getParentId()).andOrderNumGreaterThan(source.getOrderNum()); + this.updateChapterOrder(example2, -1); + source.setParentId(target.getParentId()); + criteria.andOrderNumGreaterThanOrEqualTo(target.getOrderNum()); + this.updateChapterOrder(example, 1); + } + } else if(DragSortReqVO.LocateType.After.equals(sortReq.getLocation())) { + order = target.getOrderNum()+1; + criteria.andParentIdEqualTo(target.getParentId()); + if(source.getParentId().equals(target.getParentId())) { // 同一层级下 + if(source.getOrderNum().intValue() > target.getOrderNum().intValue()) { // source 位置大于 target + criteria.andOrderNumGreaterThan(target.getOrderNum()) + .andOrderNumLessThan(source.getOrderNum()); + this.updateChapterOrder(example, 1); + } else { + order = target.getOrderNum(); + criteria.andOrderNumGreaterThan(source.getOrderNum()) + .andOrderNumLessThanOrEqualTo(target.getOrderNum()); + this.updateChapterOrder(example, -1); + } + } else { // 不同层级下 + LsDraftLessonChapterExample example2 = new LsDraftLessonChapterExample(); + example2.createCriteria().andLessonIdEqualTo(source.getLessonId()).andParentIdEqualTo(source.getParentId()).andOrderNumGreaterThan(source.getOrderNum()); + this.updateChapterOrder(example2, -1); + source.setParentId(target.getParentId()); + criteria.andOrderNumGreaterThan(target.getOrderNum()); + this.updateChapterOrder(example, 1); + } + } else { + LsDraftLessonChapterExample example2 = new LsDraftLessonChapterExample(); + example2.createCriteria().andLessonIdEqualTo(source.getLessonId()).andParentIdEqualTo(source.getParentId()).andOrderNumGreaterThan(source.getOrderNum()); + this.updateChapterOrder(example2, -1); + source.setParentId(target.getId()); + order = this.getNextOrder(source); + } + source.setOrderNum(order); + this.draftLessonChapterDAO.updateByPrimaryKey(source); + } + } + } + } + + /** + * 实训排序 + * @param sortReq + */ + private void trainingOrder (DragSortReqVO sortReq) { + if(TreeNodeTypeEnum.Training.name().equals(sortReq.getSourceType()) + && TreeNodeTypeEnum.Training.name().equals(sortReq.getTargetType()) + && !DragSortReqVO.LocateType.Inner.equals(sortReq.getLocation())){ + if(null==sortReq.getLessonId() || null==sortReq.getChapterId()) { + throw new BusinessException(ExceptionMapping.ARGUMENT_ILLEGAL); + } else { + Integer order = 1; + LsDraftRelChapterTraining sourceRel = null; + LsDraftRelChapterTraining targetRel = null; + LsDraftRelChapterTrainingExample rExample = new LsDraftRelChapterTrainingExample(); + rExample.createCriteria().andLessonIdEqualTo(ConvertUtil.str2Long(sortReq.getLessonId())).andChapterIdEqualTo(ConvertUtil.str2Long(sortReq.getChapterId())).andTrainingIdEqualTo(ConvertUtil.str2Long(sortReq.getSourceId())); + if(!draftRelChapterTrainingDAO.selectByExample(rExample).isEmpty()) { + sourceRel = draftRelChapterTrainingDAO.selectByExample(rExample).get(0); + } + rExample = new LsDraftRelChapterTrainingExample(); + rExample.createCriteria().andLessonIdEqualTo(ConvertUtil.str2Long(sortReq.getLessonId())).andChapterIdEqualTo(ConvertUtil.str2Long(sortReq.getChapterId())).andTrainingIdEqualTo(ConvertUtil.str2Long(sortReq.getTargetId())); + if(!draftRelChapterTrainingDAO.selectByExample(rExample).isEmpty()) { + targetRel = draftRelChapterTrainingDAO.selectByExample(rExample).get(0); + } + if(DragSortReqVO.LocateType.Before.equals(sortReq.getLocation())) { + if(sourceRel.getLessonId().equals(targetRel.getLessonId()) && sourceRel.getChapterId().equals(targetRel.getChapterId())) { //同级 + if(sourceRel.getOrderNum().intValue()>targetRel.getOrderNum().intValue()) { //source位置大于target + order = targetRel.getOrderNum(); + rExample = new LsDraftRelChapterTrainingExample(); + rExample.createCriteria().andLessonIdEqualTo(sourceRel.getLessonId()).andChapterIdEqualTo(sourceRel.getChapterId()).andOrderNumGreaterThanOrEqualTo(targetRel.getOrderNum()).andOrderNumLessThan(sourceRel.getOrderNum()); + this.updateTrainingOrder(rExample, 1); + } else { //source位置小于target + order = targetRel.getOrderNum()-1; + rExample = new LsDraftRelChapterTrainingExample(); + rExample.createCriteria().andLessonIdEqualTo(sourceRel.getLessonId()).andChapterIdEqualTo(sourceRel.getChapterId()).andOrderNumGreaterThan(sourceRel.getOrderNum()).andOrderNumLessThan(targetRel.getOrderNum()); + this.updateTrainingOrder(rExample, -1); + } + } + } else if(DragSortReqVO.LocateType.After.equals(sortReq.getLocation())) { + if(sourceRel.getChapterId().equals(targetRel.getChapterId())) { //同级 + if(sourceRel.getOrderNum().intValue()>targetRel.getOrderNum().intValue()) { //source位置大于target + order = targetRel.getOrderNum()+1; + rExample = new LsDraftRelChapterTrainingExample(); + rExample.createCriteria().andLessonIdEqualTo(sourceRel.getLessonId()).andChapterIdEqualTo(sourceRel.getChapterId()).andOrderNumGreaterThan(targetRel.getOrderNum()).andOrderNumLessThan(sourceRel.getOrderNum()); + this.updateTrainingOrder(rExample, 1); + } else { //source位置小于target + order = targetRel.getOrderNum(); + rExample = new LsDraftRelChapterTrainingExample(); + rExample.createCriteria().andLessonIdEqualTo(sourceRel.getLessonId()).andChapterIdEqualTo(sourceRel.getChapterId()).andOrderNumGreaterThan(sourceRel.getOrderNum()).andOrderNumLessThanOrEqualTo(targetRel.getOrderNum()); + this.updateTrainingOrder(rExample, -1); + } + } + } + sourceRel.setOrderNum(order); + rExample = new LsDraftRelChapterTrainingExample(); + rExample.createCriteria().andLessonIdEqualTo(sourceRel.getLessonId()).andChapterIdEqualTo(sourceRel.getChapterId()).andTrainingIdEqualTo(sourceRel.getTrainingId()); + this.draftRelChapterTrainingDAO.updateByExample(sourceRel, rExample); + } + } + } + + /** + * 根据条件批量更新章节顺序 + */ + private void updateChapterOrder(LsDraftLessonChapterExample example, int i) { + List list = this.draftLessonChapterDAO.selectByExample(example); + if(!CollectionUtils.isEmpty(list)) { + list.forEach(chapter -> { + chapter.setOrderNum(chapter.getOrderNum()+i); + this.draftLessonChapterDAO.updateByPrimaryKey(chapter); + }); + } + } + + /** + * 根据条件批量更新实训顺序 + */ + private void updateTrainingOrder(LsDraftRelChapterTrainingExample rExample, int i) { + List list = this.draftRelChapterTrainingDAO.selectByExample(rExample); + if(!CollectionUtils.isEmpty(list)) { + list.forEach(rel -> { + rel.setOrderNum(rel.getOrderNum()+i); + LsDraftRelChapterTrainingExample example = new LsDraftRelChapterTrainingExample(); + example.createCriteria().andLessonIdEqualTo(rel.getLessonId()).andChapterIdEqualTo(rel.getChapterId()).andTrainingIdEqualTo(rel.getTrainingId()); + this.draftRelChapterTrainingDAO.updateByExample(rel, example); + }); + } + } + + @Override + public void deleteChapterRelByTrainingId(Long trainingId) { + LsDraftRelChapterTrainingExample example = new LsDraftRelChapterTrainingExample(); + example.createCriteria().andTrainingIdEqualTo(trainingId); + this.draftRelChapterTrainingDAO.deleteByExample(example); + } + + @Override + public void deleteChapterRelByTrainingIdList(List trainingIdList) { + LsDraftRelChapterTrainingExample example = new LsDraftRelChapterTrainingExample(); + example.createCriteria().andTrainingIdIn(trainingIdList); + this.draftRelChapterTrainingDAO.deleteByExample(example); + } +} diff --git a/src/main/java/club/joylink/rtss/services/LessonService.java b/src/main/java/club/joylink/rtss/services/LessonService.java new file mode 100644 index 000000000..fa011035d --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/LessonService.java @@ -0,0 +1,725 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.constants.BusinessConsts; +import club.joylink.rtss.constants.MapStatus; +import club.joylink.rtss.dao.*; +import club.joylink.rtss.entity.*; +import club.joylink.rtss.entity.LsLessonExample.Criteria; +import club.joylink.rtss.exception.BusinessExceptionAssertEnum; +import club.joylink.rtss.services.training.ITrainingV1Service; +import club.joylink.rtss.util.VersionUtil; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.*; +import club.joylink.rtss.vo.client.map.MapVO; +import club.joylink.rtss.vo.client.training.TrainingNewVO; +import club.joylink.rtss.vo.client.userPermission.UserPermissionVO; +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; +import org.springframework.util.StringUtils; + +import java.time.LocalDateTime; +import java.util.*; +import java.util.stream.Collectors; + +/** + * 课程 服务 + * + * @author sheng + */ +@Service +@Slf4j +public class LessonService implements ILessonService { + + @Autowired + private LsLessonDAO lessonDAO; + + @Autowired + private LsLessonVersionDAO lessonVersionDAO; + + @Autowired + private LsLessonChapterDAO lessonChapterDAO; + + @Autowired + private LsRelChapterTrainingDAO relChapterTrainingDAO; + + @Autowired + private UserTrainingStatsMapper userTrainingStatsMapper; + + @Autowired + private IMapService iMapService; + + @Autowired + private ExamDefinitionDAO examDefinitionDAO; + + @Autowired + private ExamDefinitionRulesDAO definitionRulesDAO; + + @Autowired + private IUserPermissionService iUserPermissionService; + + @Autowired + private ISysUserService iSysUserService; + + @Autowired + private ITrainingV1Service iTrainingV1Service; + + @Autowired + private StudentRelLessonClassDAO studentRelLessonClassDAO; + + @Override + public LessonTreeVO getLessonTree(Long id, UserVO userVO) { + LessonTreeVO lessonTreeVO = new LessonTreeVO(); + // 查询课程 + LsLesson lsLesson = lessonDAO.selectByPrimaryKey(id); + BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertNotNull(lsLesson); + BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(Objects.equals(lsLesson.getStatus(), MapStatus.Online.getCode())); + LessonVO lessonVO = new LessonVO(lsLesson); + // 查询章节 + LsLessonChapterExample chapterExample = new LsLessonChapterExample(); + chapterExample.createCriteria().andLessonIdEqualTo(lsLesson.getId()); + List lsLessonChapters = lessonChapterDAO.selectByExample(chapterExample); + List chapterVOList = LessonChapterVO.convert2PublishVO(lsLessonChapters); + // 查询章节实训关联关系 + List relVOList = null; + if (!CollectionUtils.isEmpty(chapterVOList)) { + List chapterIds = lsLessonChapters.stream().map(LsLessonChapter::getId).collect(Collectors.toList()); + LsRelChapterTrainingExample lsRelChapterTrainingExample = new LsRelChapterTrainingExample(); + lsRelChapterTrainingExample.createCriteria().andChapterIdIn(chapterIds); + List relChapterTrainingList = relChapterTrainingDAO.selectByExample(lsRelChapterTrainingExample); + relVOList = LessonChapterTrainingRelVO.convert2VOList(relChapterTrainingList); + } + // 查询实训 + List trainingVOList = null; + if (!CollectionUtils.isEmpty(relVOList)) { + List trainingIds = relVOList.stream().map(LessonChapterTrainingRelVO::getTrainingId).collect(Collectors.toList()); + trainingVOList = iTrainingV1Service.queryByIds(trainingIds); + } + // 查询权限 +// List voList = userPermissionService.findTeachVOByMapIdAndUserId(lessonVO.getMapId(), userVO.getId()); + List permissionVOList = iUserPermissionService.getLessonUserPermission(userVO, + lessonVO.getMapId(), lessonVO.getPrdType(), lessonVO.getId()); + boolean valid = !CollectionUtils.isEmpty(permissionVOList); + // 生成tree + lessonTreeVO.setTree(TreeNode.buildValidLessonTrainingTree(lessonVO, chapterVOList, trainingVOList, relVOList, valid)); + lessonTreeVO.setPermissionList(permissionVOList); + return lessonTreeVO; + } + + @Override + public LessonVO getLessonDetail(Long id, UserVO userVO) { + LsLesson lesson = this.lessonDAO.selectByPrimaryKey(id); + BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertNotNull(lesson); + LessonVO lessonVo = new LessonVO(lesson); + // 查询课程关联章节(带实训)数据 + LsLessonChapterExample example = new LsLessonChapterExample(); + example.createCriteria().andLessonIdEqualTo(lesson.getId()); + List chapterList = this.lessonChapterDAO.selectByExample(example); + List chapterVoList = LessonChapterVO.convert2PublishVO(chapterList); + List treeList = new ArrayList<>(); + if (!CollectionUtils.isEmpty(chapterVoList)) { + chapterVoList.forEach(chapterVo -> { + if (chapterVo.getParentId() == 0) { + treeList.add(chapterVo); + } else { + Optional first = chapterVoList.stream() + .filter(chapterVO -> chapterVO.getId().equals(chapterVo.getParentId())).findFirst(); + if (first.isPresent()) { + first.get().addChild(chapterVo); + } else { + log.warn(String.format("获取父级章节为null,父id为‘%s’", chapterVo.getParentId())); + } + } + }); + } + lessonVo.setChapters(treeList); + // 查询课程权限 + List pmsList = this.iUserPermissionService.getLessonUserPermission(userVO, lesson.getMapId(), lesson.getPrdType(), lesson.getId()); + lessonVo.setPmsList(pmsList); + return lessonVo; + } + + @Override + public LessonVO getLessonInfo(Long id) { + LsLesson lesson = this.lessonDAO.selectByPrimaryKey(id); + BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertNotNull(lesson); + return new LessonVO(lesson); + } + + @Override + @Transactional + public void publish(LessonVO lessonVo, LessonPublishVO publishVO) { + LessonVO publishedLesson = this.findByMapAndNameAndPrdType(publishVO.getMapId(), publishVO.getName(),publishVO.getPrdType()); + lessonVo.apply(publishVO); + LsLesson newLesson = lessonVo.toPublic(); + newLesson.setUpdateTime(LocalDateTime.now()); + newLesson.setStatus(BusinessConsts.STATUS_USE); + if (null == publishedLesson) { + // 新发布 + newLesson.setId(null); + this.lessonDAO.insert(newLesson); + //存在班级条件就创建课程班级关系 + if(!CollectionUtils.isEmpty(publishVO.getClassIdList())){ + addRelLessonClass(publishVO, newLesson.getId()); + } + +// // 自动创建商品 +// iGoodsService.autoCreateTeachAndExamGoods(newLesson); + } else { + // 更新 + newLesson.setId(publishedLesson.getId()); + this.lessonDAO.updateByPrimaryKey(newLesson); + //课程存在,预备检查与班级的关系 + if(!CollectionUtils.isEmpty(publishVO.getClassIdList())){ + //目前GZB项目带班级发布 + StudentRelLessonClassExample relLessonClassExample = new StudentRelLessonClassExample(); + relLessonClassExample.createCriteria().andLessonIdEqualTo(publishedLesson.getId()); + List studentRelLessonClasses = this.studentRelLessonClassDAO.selectByExample(relLessonClassExample); + if(!CollectionUtils.isEmpty(studentRelLessonClasses)){ + List existedClassIds = studentRelLessonClasses.stream().map(StudentRelLessonClass::getClassId).collect(Collectors.toList()); + if(!existedClassIds.equals(publishVO.getClassIdList())){ + //清除现有课程班级关系 + this.studentRelLessonClassDAO.deleteByExample(relLessonClassExample); + addRelLessonClass(publishVO, publishedLesson.getId()); + } + }else{ + addRelLessonClass(publishVO, publishedLesson.getId()); + } + } +// if(!lessonVo.getName().equals(publishedLesson.getName())) { +// // 自动创建商品 +// iGoodsService.autoUpdateTeachAndExamGoods(newLesson); +// } + } + this.buildAndInsertLessonVersion(newLesson); + this.saveChapterDetail(newLesson, lessonVo); + } + + /**增加课程班级关系*/ + private void addRelLessonClass(LessonPublishVO publishVO, Long id) { + publishVO.getClassIdList().forEach(classId -> { + StudentRelLessonClass relLessonClass = new StudentRelLessonClass(); + relLessonClass.setClassId(classId); + relLessonClass.setLessonId(id); + this.studentRelLessonClassDAO.insert(relLessonClass); + }); + } + + private LessonVO findByMapAndName(Long mapId, String name) { + LsLessonExample lessonExample = new LsLessonExample(); + lessonExample.createCriteria().andMapIdEqualTo(mapId).andNameEqualTo(name); + List lessonList = this.lessonDAO.selectByExample(lessonExample); + if (CollectionUtils.isEmpty(lessonList)) { + return null; + } + return new LessonVO(lessonList.get(0)); + } + + private LessonVO findByMapAndNameAndPrdType(Long mapId, String name, String prdType) { + LsLessonExample lessonExample = new LsLessonExample(); + lessonExample.createCriteria().andMapIdEqualTo(mapId).andNameEqualTo(name).andPrdTypeEqualTo(prdType); + List lessonList = this.lessonDAO.selectByExample(lessonExample); + if (CollectionUtils.isEmpty(lessonList)) { + return null; + } + return new LessonVO(lessonList.get(0)); + } + + /** + * 保存课程章节及章节关联的实训信息 + */ + private void saveChapterDetail(LsLesson newLesson, LessonVO lessonVo) { + // 清除关系表 + LsRelChapterTrainingExample relExample = new LsRelChapterTrainingExample(); + relExample.createCriteria().andLessonIdEqualTo(newLesson.getId()); + this.relChapterTrainingDAO.deleteByExample(relExample); + // 清空章节信息 + LsLessonChapterExample example = new LsLessonChapterExample(); + example.createCriteria().andLessonIdEqualTo(newLesson.getId()); + this.lessonChapterDAO.deleteByExample(example); + // 保存 + Map idChangedMap = new HashMap<>(); + this.saveChaptersInfo(newLesson, lessonVo.getChapters(), idChangedMap); + this.saveRelChapterTraining(newLesson, lessonVo.getRel(), idChangedMap); + } + + /** + * 保存课程章节信息 + */ + private void saveChaptersInfo(LsLesson newLesson, List chapterVos, Map idChangedMap) { + List chapters = LessonChapterVO.convert2PublishDB(chapterVos).stream() + .sorted(Comparator.comparing(LsLessonChapter::getParentId)).collect(Collectors.toList()); + if (!CollectionUtils.isEmpty(chapters)) { + chapters.forEach(chapter -> { + Long oldId = chapter.getId(); + chapter.setLessonId(newLesson.getId()); + if (chapter.getParentId() != 0) { + chapter.setParentId(idChangedMap.get(chapter.getParentId())); + } + this.lessonChapterDAO.insert(chapter); + idChangedMap.put(oldId, chapter.getId()); + }); + } + } + + /** + * 保存章节-实训 关联数据 + */ + private void saveRelChapterTraining(LsLesson newLesson, List relVos, Map idChangedMap) { + List relList = LessonChapterTrainingRelVO.convert2PublishDB(relVos); + if (!CollectionUtils.isEmpty(relList)) { + relList.forEach(rel -> { + rel.setLessonId(newLesson.getId()); + rel.setChapterId(idChangedMap.get(rel.getChapterId())); + this.relChapterTrainingDAO.insert(rel); + }); + } + } + + /** + * 创建并插入课程版本信息 + */ + private void buildAndInsertLessonVersion(LsLesson lesson) { + LsLessonVersion latest = this.getLatestLessonVersion(lesson.getId()); + String version = null == latest ? null : latest.getVersion(); + LsLessonVersion newVersion = buildVersion(lesson, version); + this.lessonVersionDAO.insert(newVersion); + } + + /** + * 创建新的版本信息 + */ + private LsLessonVersion buildVersion(LsLesson lesson, String old) { + String version = VersionUtil.generateNext(old); + LsLessonVersion lessonVersion = new LsLessonVersion(); + lessonVersion.setLessonId(lesson.getId()); + lessonVersion.setCreatorId(lesson.getCreatorId()); + lessonVersion.setUpdateTime(lesson.getUpdateTime()); + lessonVersion.setVersion(version); + return lessonVersion; + } + + /** + * 获取最新的课程版本信息 + */ + private LsLessonVersion getLatestLessonVersion(Long lessonId) { + LsLessonVersionExample example = new LsLessonVersionExample(); + example.createCriteria().andLessonIdEqualTo(lessonId); + example.setOrderByClause("update_time desc"); + List list = this.lessonVersionDAO.selectByExample(example); + if (CollectionUtils.isEmpty(list)) { + return null; + } else { + return list.get(0); + } + } + + @Override + public List queryLessons(LessonQueryVO lessonQueryVO) { + LsLessonExample example = new LsLessonExample(); + example.setOrderByClause("id desc"); + Criteria criteria = example.createCriteria() + .andStatusEqualTo(MapStatus.Online.getCode()); + if (Objects.nonNull(lessonQueryVO.getMapId())) { + criteria.andMapIdEqualTo(lessonQueryVO.getMapId()); + } + List list = this.lessonDAO.selectByExample(example); + return LessonVO.convert2PublishVO(list); + } + + @Override + public void updateCity(Long mapId) { + MapVO mapVO = this.iMapService.getMapInfoById(mapId); + LsLessonExample example = new LsLessonExample(); + example.createCriteria().andMapIdEqualTo(mapId); + List lsLessons = this.lessonDAO.selectByExample(example); + lsLessons.forEach(lsLesson -> { + lsLesson.setCityCode(mapVO.getCityCode()); + this.lessonDAO.updateByPrimaryKey(lsLesson); + }); + } + + /** + * 分页查询已发布的课程 + */ + @Override + public PageVO selectPagedPublishedLesson(LessonQueryVO queryVO) { + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + LsLessonExample example = new LsLessonExample(); + example.setOrderByClause(" update_time DESC "); + Criteria criteria = example.createCriteria(); + if (StringUtils.hasText(queryVO.getName())) { + criteria.andNameLike(String.format("%%%s%%", queryVO.getName())); + } + if (StringUtils.hasText(queryVO.getCityCode())) { + criteria.andCityCodeEqualTo(queryVO.getCityCode()); + } + if (Objects.nonNull(queryVO.getMapId())) { + criteria.andMapIdEqualTo(queryVO.getMapId()); + } + Page lessonPage = (Page) lessonDAO.selectByExample(example); + List lessonVOList = LessonVO.convert2PublishVO(lessonPage); + return PageVO.convert(lessonPage, lessonVOList); + } + + /** + * 删除发布的课程 + */ + @Override + @Transactional + public void deletePublishedLesson(Long lessonId, UserVO userVO) { + LsLesson lsLesson = this.lessonDAO.selectByPrimaryKey(lessonId); + // 课程可删除的条件:考试定义和权限没有该课程相关数据 + // 查询考试定义数据 + ExamDefinitionExample examDefinitionExample = new ExamDefinitionExample(); + examDefinitionExample.createCriteria().andLessonIdEqualTo(lessonId); + List examDefinitionList = examDefinitionDAO.selectByExample(examDefinitionExample); + // 查询课程权限数据 + BusinessExceptionAssertEnum.INVALID_OPERATION.assertCollectionEmpty(examDefinitionList, + "无效的操作:课程已被使用,无法删除!"); + // 删除版本信息 + LsLessonVersionExample versionExample = new LsLessonVersionExample(); + versionExample.createCriteria().andLessonIdEqualTo(lsLesson.getId()); + lessonVersionDAO.deleteByExample(versionExample); + // 删除实训和课程映射关系 + LsRelChapterTrainingExample relExample = new LsRelChapterTrainingExample(); + relExample.createCriteria().andLessonIdEqualTo(lsLesson.getId()); + relChapterTrainingDAO.deleteByExample(relExample); + // 删除课程章节信息 + LsLessonChapterExample chapterExample = new LsLessonChapterExample(); + chapterExample.createCriteria().andLessonIdEqualTo(lsLesson.getId()); + lessonChapterDAO.deleteByExample(chapterExample); + // 删除用户实训数据 + UserTrainingStatsExample userTrainingExample = new UserTrainingStatsExample(); + userTrainingExample.createCriteria().andLessonIdEqualTo(lessonId); + this.userTrainingStatsMapper.deleteByExample(userTrainingExample); + + lessonDAO.deleteByPrimaryKey(lessonId); +// // 自动删除关联商品 +// this.iGoodsService.autoDeleteTeachAndExamGoods(lsLesson.getCode()); + } + + /** + * 强制删除正在使用的发布课程 + */ + @Override + @Transactional + public void deleteUsedLesson(Long lessonId, UserVO userVO) { + LsLesson lsLesson = this.lessonDAO.selectByPrimaryKey(lessonId); + BusinessExceptionAssertEnum.INVALID_OPERATION.assertTrue(Objects.equals(userVO.getId(),lsLesson.getCreatorId()), + "不能删除他人创建的课程"); + lsLesson.setStatus(BusinessConsts.STATUS_NOT_USE); + lessonDAO.updateByPrimaryKey(lsLesson); + } + + @Override + public List getByMapIdAndPrdType(Long mapId, String prdType) { + LsLessonExample lessonExample = new LsLessonExample(); + lessonExample.createCriteria() + .andMapIdEqualTo(mapId) + .andStatusEqualTo(MapStatus.Online.getCode()) + .andPrdTypeEqualTo(prdType); + List lessonList = this.lessonDAO.selectByExample(lessonExample); + return LessonVO.convert2PublishVO(lessonList); + } + + @Override + public List getByIds(List lessonIds) { + LsLessonExample lessonExample = new LsLessonExample(); + lessonExample.createCriteria().andIdIn(lessonIds); + List lessonList = this.lessonDAO.selectByExample(lessonExample); + return LessonVO.convert2PublishVO(lessonList); + } + + @Override + public List getByIdsWithPrdType(List lessonIds, String prdType) { + LsLessonExample lessonExample = new LsLessonExample(); + lessonExample.createCriteria() + .andIdIn(lessonIds) + .andStatusEqualTo(MapStatus.Online.getCode()) + .andPrdTypeEqualTo(prdType); + List lessonList = this.lessonDAO.selectByExample(lessonExample); + return LessonVO.convert2PublishVO(lessonList); + } + + @Override + public void deleteChapterRelByTrainingId(Long trainingId) { + LsRelChapterTrainingExample example = new LsRelChapterTrainingExample(); + example.createCriteria().andTrainingIdEqualTo(trainingId); + this.relChapterTrainingDAO.deleteByExample(example); + } + + @Override + public void deleteChapterRelByTrainingIdList(List trainingIdList) { + LsRelChapterTrainingExample example = new LsRelChapterTrainingExample(); + example.createCriteria().andTrainingIdIn(trainingIdList); + this.relChapterTrainingDAO.deleteByExample(example); + } + + @Override + public void onLine(Long id, UserVO userVO) { + LsLesson lsLesson = this.lessonDAO.selectByPrimaryKey(id); + BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertNotNull(lsLesson); + lsLesson.setStatus(BusinessConsts.STATUS_USE); + this.lessonDAO.updateByPrimaryKey(lsLesson); + } + + @Override + public void offLine(Long id, UserVO userVO) { + LsLesson lsLesson = this.lessonDAO.selectByPrimaryKey(id); + BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertNotNull(lsLesson); + lsLesson.setStatus(BusinessConsts.STATUS_NOT_USE); + this.lessonDAO.updateByPrimaryKey(lsLesson); + } + + @Override + public void updateNameAndRemarks(Long id, String name, String remarks, UserVO user) { + LsLesson lesson = this.lessonDAO.selectByPrimaryKey(id); + if (Objects.nonNull(lesson)) { + lesson.setName(name); + lesson.setRemarks(remarks); + this.lessonDAO.updateByPrimaryKey(lesson); + } + } + + @Override + @Transactional + public Map copy(Long sourceMapId, Long targetMapId, Map trainingRelMap, UserVO user) { + + List lessonList = findEntityByMapId(sourceMapId); + Map relationMap = new HashMap<>(); + if (CollectionUtils.isEmpty(lessonList)) { + return relationMap; + } + //拷贝课程 + for (LsLesson lesson : lessonList) { + Long oldId = lesson.getId(); + lesson.setId(null); + lesson.setMapId(targetMapId); + lesson.setUpdateTime(LocalDateTime.now()); + lesson.setCreatorId(user.getId()); + lessonDAO.insertSelective(lesson); + relationMap.put(oldId, lesson.getId()); + } + + ArrayList oldIdList = new ArrayList<>(relationMap.keySet()); + LsLessonChapterExample chapterExample = new LsLessonChapterExample(); + chapterExample.createCriteria().andLessonIdIn(oldIdList); + List chapterList = lessonChapterDAO.selectByExample(chapterExample); + for (LsLessonChapter chapter : chapterList) { + //因为章节id要变,先把章节关联实训查出来 + LsRelChapterTrainingExample lsRelChapterTrainingExample = new LsRelChapterTrainingExample(); + lsRelChapterTrainingExample.createCriteria() + .andChapterIdEqualTo(chapter.getId()); + List relTrainingList = relChapterTrainingDAO.selectByExample(lsRelChapterTrainingExample); + //拷贝章节 + chapter.setLessonId(relationMap.get(chapter.getLessonId())); + chapter.setId(null); + lessonChapterDAO.insertSelective(chapter); + //拷贝章节关联实训 + for (LsRelChapterTraining relTraining : relTrainingList) { + relTraining.setId(null); + relTraining.setLessonId(chapter.getLessonId()); + relTraining.setChapterId(chapter.getId()); + Long newTrainingId = trainingRelMap.get(relTraining.getTrainingId()); + trainingRelMap.remove(relTraining.getTrainingId()); + relTraining.setTrainingId(newTrainingId); + relChapterTrainingDAO.insertSelective(relTraining); + } + } + return relationMap; + } + + private List findEntityByMapId(Long mapId) { + LsLessonExample example = new LsLessonExample(); + example.createCriteria().andMapIdEqualTo(mapId); + return lessonDAO.selectByExample(example); + } + + @Override + public List queryLessonsOfMap(Long mapId) { + LsLessonExample example = new LsLessonExample(); + example.createCriteria() + .andMapIdEqualTo(mapId) + .andStatusEqualTo(BusinessConsts.STATUS_USE); + List lsLessons = this.lessonDAO.selectByExample(example); + return LessonVO.convert2PublishVO(lsLessons); + } + + @Override + public List findByMapIdAndPrdType(Long mapId, String prdType) { + LsLessonExample example = new LsLessonExample(); + example.createCriteria() + .andMapIdEqualTo(mapId) + .andPrdTypeEqualTo(prdType); + List lsLessonList = lessonDAO.selectByExample(example); + return lsLessonList.stream().map(LessonVO::new).collect(Collectors.toList()); + } + + @Override + public Long countByMapIdAndPrdType(Long mapId, String prdType) { + LsLessonExample example = new LsLessonExample(); + example.createCriteria() + .andMapIdEqualTo(mapId) + .andPrdTypeEqualTo(prdType); + return lessonDAO.countByExample(example); + } + + @Override + public List findByMapId(Long mapId) { + LsLessonExample example = new LsLessonExample(); + example.createCriteria().andMapIdEqualTo(mapId); + List lessonList = lessonDAO.selectByExample(example); + return lessonList.stream().map(LessonVO::new).collect(Collectors.toList()); + } + + @Transactional + @Override + public void generateLessonAndExam(List mapIds, UserVO userVO){ + if(CollectionUtils.isEmpty(mapIds))return; + mapIds.parallelStream().forEach(mapId -> { + MapVO mapVO = iMapService.findMapBaseInfoById(mapId); + if (Objects.isNull(mapVO)) return; + + //现地课程 + generateLessonBy(userVO, mapVO, BusinessConsts.Lesson.PrdInfo.prdType01, BusinessConsts.MapPrd.PrdType.Type01); + + //行调课程 + generateLessonBy(userVO, mapVO, BusinessConsts.Lesson.PrdInfo.prdType02, BusinessConsts.MapPrd.PrdType.Type02); + }); + + } + + private void generateLessonBy(UserVO userVO, MapVO mapVO, BusinessConsts.Lesson.PrdInfo prdLessonInfo, String prdType) { + //课程 + LsLesson lesson = new LsLesson(); + lesson.setUpdateTime(LocalDateTime.now()); + lesson.setStatus(BusinessConsts.STATUS_USE); + lesson.setCityCode(mapVO.getCityCode()); + lesson.setCreatorId(userVO.getId()); + lesson.setMapId(mapVO.getId()); + lesson.setName(String.join("-", mapVO.getName(), prdLessonInfo.getName())); + lesson.setPrdType(prdType); + lesson.setRemarks(prdLessonInfo.getRemarks()); + LessonVO existedDefaultLesson = this.findByMapAndNameAndPrdType(mapVO.getId(), lesson.getName(), prdType); + if (Objects.nonNull(existedDefaultLesson)) { + lesson.setId(existedDefaultLesson.getId()); + lessonDAO.updateByPrimaryKey(lesson); + //存在默认课程删除旧版本、章节及关联实训数据 + LsLessonVersionExample versionExample = new LsLessonVersionExample(); + versionExample.createCriteria().andLessonIdEqualTo(existedDefaultLesson.getId()); + lessonVersionDAO.deleteByExample(versionExample); + + LsRelChapterTrainingExample relExample = new LsRelChapterTrainingExample(); + relExample.createCriteria().andLessonIdEqualTo(existedDefaultLesson.getId()); + relChapterTrainingDAO.deleteByExample(relExample); + + LsLessonChapterExample chapterExample = new LsLessonChapterExample(); + chapterExample.createCriteria().andLessonIdEqualTo(existedDefaultLesson.getId()); + lessonChapterDAO.deleteByExample(chapterExample); + + ExamDefinitionExample examDefinitionExample = new ExamDefinitionExample(); + examDefinitionExample.createCriteria().andLessonIdEqualTo(existedDefaultLesson.getId()); + List examDefinitions = examDefinitionDAO.selectByExample(examDefinitionExample); + if (!CollectionUtils.isEmpty(examDefinitions)) { + List list = examDefinitions.stream().map(ExamDefinition::getId).collect(Collectors.toList()); + ExamDefinitionRulesExample rulesExample = new ExamDefinitionRulesExample(); + rulesExample.createCriteria().andExamIdIn(list); + definitionRulesDAO.deleteByExample(rulesExample); + examDefinitionDAO.deleteByExample(examDefinitionExample); + } + + } else { + lessonDAO.insert(lesson); + } + //版本0.0 + LsLessonVersion lessonVersion = new LsLessonVersion(); + lessonVersion.setLessonId(lesson.getId()); + lessonVersion.setCreatorId(lesson.getCreatorId()); + lessonVersion.setUpdateTime(lesson.getUpdateTime()); + lessonVersion.setVersion(BusinessConsts.Lesson.Version.originalVersion); + lessonVersionDAO.insert(lessonVersion); + + List examTrainings = new ArrayList<>(20); + int orderNum = 1; + Random random = new Random(); + for (BusinessConsts.Training.Type type : BusinessConsts.Training.Type.values()) { + //章节 + LsLessonChapter chapter = new LsLessonChapter(); + chapter.setLessonId(lesson.getId()); + chapter.setParentId(0l); + chapter.setOrderNum(orderNum++); + chapter.setName(type.getDescription()); + chapter.setRemarks(chapter.getName() + "章节"); + lessonChapterDAO.insert(chapter); + List trainings = iTrainingV1Service.queryTrainingsBy(mapVO.getId(), lesson.getPrdType(), type.name()); + if (CollectionUtils.isEmpty(trainings)) continue; + trainings.stream().collect(Collectors.groupingBy(t -> t.getOperateType())).forEach((s, ts) -> { + examTrainings.add(ts.get(random.nextInt(ts.size()))); + int i = 1; + while (i < 3) { + //章节关联实训 + if (ts.size() == 0) return; + Long trainId = ts.remove(random.nextInt(ts.size())).getId(); + LsRelChapterTraining chapterTraining = new LsRelChapterTraining(); + chapterTraining.setLessonId(lesson.getId()); + chapterTraining.setChapterId(chapter.getId()); + chapterTraining.setOrderNum(i++); + chapterTraining.setTrainingId(trainId); + chapterTraining.setTrial(true); + relChapterTrainingDAO.insert(chapterTraining); + } + } + ); + } + //试卷定义 + + if (CollectionUtils.isEmpty(examTrainings)) { + return; + } + ExamDefinition examDefinition = new ExamDefinition(); + examDefinition.setLessonId(lesson.getId()); + examDefinition.setName(lesson.getName() + "试卷"); + examDefinition.setDuration(1800); + examDefinition.setCreatorId(userVO.getId()); + examDefinition.setCreateTime(LocalDateTime.now()); + examDefinition.setRemarks(examDefinition.getName() + "-默认试卷"); + examDefinition.setStatus("1"); + examDefinition.setTrial(true); + //试卷规则 取20道题,每中实训类型取一道 + if (examTrainings.size() < 20) { + examDefinition.setFullPoint(examTrainings.size() * 5); + examDefinition.setPassingPoint(Double.valueOf(examDefinition.getFullPoint() * 0.6).intValue()); + examDefinitionDAO.insert(examDefinition); + examTrainings.forEach(training -> { + ExamDefinitionRules examRules = new ExamDefinitionRules(); + examRules.setExamId(examDefinition.getId()); + examRules.setNum(1); + examRules.setPoint(5); + examRules.setTrainingType(training.getType()); + examRules.setOperateType(training.getOperateType()); + definitionRulesDAO.insert(examRules); + }); + + } else { + examDefinition.setFullPoint(100); + examDefinition.setPassingPoint(60); + examDefinitionDAO.insert(examDefinition); + int i = 1; + do { + ExamDefinitionRules examRules = new ExamDefinitionRules(); + examRules.setExamId(examDefinition.getId()); + examRules.setNum(1); + examRules.setPoint(5); + Training training = examTrainings.remove(random.nextInt(examTrainings.size())); + examRules.setTrainingType(training.getType()); + examRules.setOperateType(training.getOperateType()); + definitionRulesDAO.insert(examRules); + } while (i++ < 20); + } + } +} diff --git a/src/main/java/club/joylink/rtss/services/LoadPlanService.java b/src/main/java/club/joylink/rtss/services/LoadPlanService.java new file mode 100644 index 000000000..09f45e1cb --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/LoadPlanService.java @@ -0,0 +1,249 @@ +package club.joylink.rtss.services; + +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import com.joylink.base.exception.BusinessException; +import com.joylink.base.exception.DBException; +import com.joylink.base.exception.constant.ExceptionMapping; +import club.joylink.rtss.dao.RunPlanLoadDAO; +import club.joylink.rtss.entity.RunPlanLoad; +import club.joylink.rtss.entity.RunPlanLoadExample; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.map.MapVO; +import club.joylink.rtss.vo.client.runplan.RunPlanLoadQueryVO; +import club.joylink.rtss.vo.client.runplan.RunPlanLoadVO; +import club.joylink.rtss.vo.client.runplan.RunPlanVO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.time.LocalDate; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +@Service +public class LoadPlanService implements ILoadPlanService { + + @Autowired + private RunPlanLoadDAO runPlanLoadDAO; + + @Autowired + private IMapService iMapService; + + @Autowired + private IRunPlanTemplateService iRunPlanTemplateService; + + @Autowired + private IDailyRunPlanService iDailyRunPlanService; + + @Override + public void executeLoadTask() { + // 新版仿真不再需要每日运行图,所以筛选只创建旧地图的每日运行计划 + List mapVOList = this.iMapService.queryOnlineMapInfos(); + if (CollectionUtils.isEmpty(mapVOList)) { + return; + } + List mapIdList = mapVOList.stream() + .filter(mapVO -> !mapVO.isDrawWay()) + .map(MapVO::getId) + .collect(Collectors.toList()); + if (CollectionUtils.isEmpty(mapIdList)) { + // 没有需要加载的地图,返回 + return; + } + RunPlanLoadExample example = new RunPlanLoadExample(); + LocalDate today = LocalDate.now(); + example.createCriteria() + .andMapIdIn(mapIdList) + .andLoadTimeIsNull(); + example.or() + .andMapIdIn(mapIdList) + .andLoadTimeEqualTo(today); + List loadPlanList = this.runPlanLoadDAO.selectByExample(example); + if(!CollectionUtils.isEmpty(loadPlanList)) { + for (RunPlanLoad loadPlan : loadPlanList) { + this.generateDailyPlan(loadPlan); + } + } + } + + @Override + public void createDailyPlanFromLoadPlan(Long id, UserVO user) { + Objects.requireNonNull(id); + Objects.requireNonNull(user); + RunPlanLoad loadPlan = this.runPlanLoadDAO.selectByPrimaryKey(id); + if(Objects.nonNull(loadPlan)) { + if(user.isSuperAdmin() || Objects.equals(user.getId(), loadPlan.getUserId())) { + this.generateDailyPlan(loadPlan); + } + } + } + + /** + * 根据加载计划生成每日计划 + * @param loadPlan + */ + private void generateDailyPlan(RunPlanLoad loadPlan) { + Objects.requireNonNull(loadPlan); + LocalDate today = LocalDate.now(); + boolean exist; + if(Objects.nonNull(loadPlan.getUserId())) { // 查找用户每日计划 + exist = this.iDailyRunPlanService.isUserRunPlanOfDayExist( + loadPlan.getUserId(), loadPlan.getMapId(), loadPlan.getTemplatePlanId(), today); + } else { // 查找通用每日计划 + exist = this.iDailyRunPlanService + .isCommonRunPlanExist(loadPlan.getMapId(), loadPlan.getTemplatePlanId(), today); + } + if (!exist) { + // 当日计划不存在,或者存在但模板id不同,重新生成 + RunPlanVO templatePlan = this.iRunPlanTemplateService.getRunPlan(loadPlan.getTemplatePlanId()); + this.iDailyRunPlanService.createDailyRunPlan(templatePlan, loadPlan.getMapId(), today, loadPlan.getUserId()); + } + } + + @Override + @Transactional + public void createLoadPlan(RunPlanLoadVO runPlanLoadVO, UserVO user) { + Objects.requireNonNull(runPlanLoadVO); + List planDateList = runPlanLoadVO.getPlanDateList(); + if(!CollectionUtils.isEmpty(planDateList)) { + // 先删除用户之前创建的计划 + RunPlanLoadExample example = new RunPlanLoadExample(); + example.createCriteria() + .andUserIdEqualTo(user.getId()) + .andMapIdEqualTo(runPlanLoadVO.getMapId()) + .andLoadTimeIn(planDateList); + this.runPlanLoadDAO.deleteByExample(example); + // 创建新的加载计划 + for (LocalDate localDate : planDateList) { + RunPlanLoad loadPlan = new RunPlanLoad(); + loadPlan.setMapId(runPlanLoadVO.getMapId()); + loadPlan.setTemplatePlanId(runPlanLoadVO.getTemplatePlanId()); + loadPlan.setUserId(user.getId()); + loadPlan.setLoadTime(localDate); + loadPlan.setCreatorId(user.getId()); + runPlanLoadDAO.insert(loadPlan); + } + } + } + + @Override + public PageVO queryPagedLoadPlan(RunPlanLoadQueryVO queryVO) { + RunPlanLoadExample runPlanLoadExample = new RunPlanLoadExample(); + runPlanLoadExample.setOrderByClause(" load_time DESC"); + RunPlanLoadExample.Criteria loadExampleCriteria = runPlanLoadExample.createCriteria(); + if (Objects.nonNull(queryVO.getUserId())) { + loadExampleCriteria.andUserIdEqualTo(queryVO.getUserId()); + } else { + loadExampleCriteria.andUserIdIsNull(); + } + if (Objects.nonNull(queryVO.getMapId())) { + loadExampleCriteria.andMapIdEqualTo(queryVO.getMapId()); + } + if(Objects.nonNull(queryVO.getTemplatePlanId())) { + loadExampleCriteria.andTemplatePlanIdEqualTo(queryVO.getTemplatePlanId()); + } + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + Page runPlanLoadList = (Page) runPlanLoadDAO.selectByExample(runPlanLoadExample); +// List runPlanLoadVOList = runPlanLoadList.getResult().stream().map(runPlanLoad -> { +// MapVO mapVO = this.iMapService.getMapById(runPlanLoad.getMapId()); +// RunPlanTemplate runPlanTemplate = runPlanTemplateDAO.selectByPrimaryKey(runPlanLoad.getTemplatePlanId()); +// RunPlanLoadVO runPlanLoadVO = new RunPlanLoadVO(runPlanLoad); +// runPlanLoadVO.setMapName(mapVO.getName()); +// runPlanLoadVO.setRunPlanName(runPlanTemplate.getName()); +// return runPlanLoadVO; +// }).collect(Collectors.toList()); + List runPlanLoadVOList = RunPlanLoadVO.convert2VOList(runPlanLoadList); + return PageVO.convert(runPlanLoadList, runPlanLoadVOList); + } + + @Override + public void deleteLoadPlan(Long id, UserVO user) { + Objects.requireNonNull(id); + RunPlanLoad runPlanLoad = this.runPlanLoadDAO.selectByPrimaryKey(id); + if(Objects.nonNull(runPlanLoad)) { + if(user.isSuperAdmin() || + ((Objects.nonNull(runPlanLoad.getUserId()) && runPlanLoad.getUserId().equals(user.getId())))) { + // 超级管理员,或是用户自己的计划,才可删除 + this.runPlanLoadDAO.deleteByPrimaryKey(id); + } else { + throw new BusinessException(ExceptionMapping.ROLE_OPERATION_REFUSE); + } + } + } + + @Override + public void createCommonLoadPlan(RunPlanLoadVO runPlanLoadVO, UserVO user) { + if(!user.isSuperAdmin()) { // 只有管理员才能创建 + throw new BusinessException(ExceptionMapping.ROLE_OPERATION_REFUSE); + } + Objects.requireNonNull(runPlanLoadVO); + RunPlanVO templatePlan = this.iRunPlanTemplateService.getRunPlan(runPlanLoadVO.getTemplatePlanId()); + if (!Objects.equals(runPlanLoadVO.getMapId(), templatePlan.getMapId())) { + throw new BusinessException(ExceptionMapping.ARGUMENT_ILLEGAL, + String.format("所选运行图模板不是所选地图运行图")); + } + RunPlanLoadExample example = new RunPlanLoadExample(); + example.createCriteria() + .andMapIdEqualTo(runPlanLoadVO.getMapId()) + .andUserIdIsNull() + .andLoadTimeIsNull(); + List loadPlanList = this.runPlanLoadDAO.selectByExample(example); + if(CollectionUtils.isEmpty(loadPlanList)) { // 没有数据,新增 + RunPlanLoad loadPlan = new RunPlanLoad(); + loadPlan.setCreatorId(user.getId()); + loadPlan.setMapId(runPlanLoadVO.getMapId()); + loadPlan.setTemplatePlanId(runPlanLoadVO.getTemplatePlanId()); + this.runPlanLoadDAO.insert(loadPlan); + } else { + throw new BusinessException(ExceptionMapping.DATA_EXISTS, "此地图的通用加载计划已存在"); +// RunPlanLoad loadPlan = loadPlanList.get(0); +// if(!loadPlan.getTemplatePlanId().equals(runPlanLoadVO.getTemplatePlanId())) { // 当存在数据且模板运行计划不同时,修改模板运行计划 +// loadPlan.setTemplatePlanId(runPlanLoadVO.getTemplatePlanId()); +// this.runPlanLoadDAO.updateByPrimaryKey(loadPlan); +// } + } + } + + @Override + public RunPlanLoadVO findUserLoadPlan(Long userId, Long mapId, LocalDate date) { + RunPlanLoadExample example = new RunPlanLoadExample(); + example.createCriteria() + .andUserIdEqualTo(userId) + .andMapIdEqualTo(mapId) + .andLoadTimeEqualTo(date); + List loadPlanList = this.runPlanLoadDAO.selectByExample(example); + if(!CollectionUtils.isEmpty(loadPlanList)) { + RunPlanLoad loadPlan = loadPlanList.get(0); + RunPlanLoadVO loadVO = new RunPlanLoadVO(loadPlan); + return loadVO; + } + return null; + } + + @Override + public RunPlanLoadVO getUserLoadPlan(Long userId, Long mapId, LocalDate date) { + RunPlanLoadVO userLoadPlan = this.findUserLoadPlan(userId, mapId, date); + if (Objects.isNull(userLoadPlan)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST,"运行图加载计划不存在"); + } + return userLoadPlan; + } + + @Override + public RunPlanLoadVO findCommonLoadPlanOfMap(Long mapId) { + Objects.requireNonNull(mapId, "地图id不能为空"); + RunPlanLoadExample example = new RunPlanLoadExample(); + example.createCriteria() + .andMapIdEqualTo(mapId) + .andLoadTimeIsNull(); + List planLoadList = this.runPlanLoadDAO.selectByExample(example); + if(!CollectionUtils.isEmpty(planLoadList)){ + return new RunPlanLoadVO(planLoadList.get(0)); + } + return null; + } +} diff --git a/src/main/java/club/joylink/rtss/services/LoginSessionManager.java b/src/main/java/club/joylink/rtss/services/LoginSessionManager.java new file mode 100644 index 000000000..06fa6f3ff --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/LoginSessionManager.java @@ -0,0 +1,165 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.constants.Client; +import club.joylink.rtss.constants.Project; +import club.joylink.rtss.exception.BusinessExceptionAssertEnum; +import club.joylink.rtss.vo.LoginUserInfoVO; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.LoginStatusVO; +import club.joylink.rtss.vo.client.project.ProjectDeviceVO; +import org.springframework.stereotype.Component; +import org.springframework.util.CollectionUtils; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.concurrent.ConcurrentHashMap; + +@Component +public class LoginSessionManager { + + /** + * 登录状态map + * key-会话id + * value-登录状态 + */ + private static final Map sessionLoginStatusMap = new ConcurrentHashMap<>(); + + /** + * 登录用户map + * key-token + * value-登录用户信息 + */ + private static final Map tokenLoginUserMap = new ConcurrentHashMap<>(); + + /** + * 用户登录信息列表map + * key-用户id + * value-登录信息列表 + */ + private static final Map> userLoginInfoMap = new ConcurrentHashMap<>(); + + public void saveLoginStatus(LoginStatusVO loginStatusVO) { + sessionLoginStatusMap.put(loginStatusVO.getSessionId(), loginStatusVO); + } + + public void removeLoginStatus(LoginStatusVO loginStatusVO) { + sessionLoginStatusMap.remove(loginStatusVO.getSessionId()); + } + + public LoginStatusVO queryLoginStatusBySessionId(String sessionId) { + return sessionLoginStatusMap.get(sessionId); + } + + public List queryLoginInfoByUserId(Long userId) { + return userLoginInfoMap.get(userId); + } + + public void addLoginUserInfo(LoginUserInfoVO loginUserInfoVO) { + tokenLoginUserMap.put(loginUserInfoVO.getToken(), loginUserInfoVO); + UserVO userVO = loginUserInfoVO.getUserVO(); + List infoVOList = userLoginInfoMap.get(userVO.getId()); + if (Objects.isNull(infoVOList)) { + infoVOList = new ArrayList<>(); + userLoginInfoMap.put(userVO.getId(), infoVOList); + } + infoVOList.add(loginUserInfoVO); + } + + public boolean containsToken(String token) { + return tokenLoginUserMap.containsKey(token); + } + + public LoginUserInfoVO queryLoginInfoByToken(String token) { + return tokenLoginUserMap.get(token); + } + + public List queryPreLogoutInfos() { + List list = new ArrayList<>(); + for (LoginUserInfoVO infoVO : tokenLoginUserMap.values()) { + if (Objects.nonNull(infoVO.getPreLogoutTime())) { + list.add(infoVO); + } + } + return list; + } + + public void clearOf(LoginUserInfoVO loginUserInfoVO) { + tokenLoginUserMap.remove(loginUserInfoVO.getToken()); + List infoVOList = this.queryLoginInfoByUserId(loginUserInfoVO.getUserVO().getId()); + if (!CollectionUtils.isEmpty(infoVOList)) { + infoVOList.remove(loginUserInfoVO); + } + // 以防万一,清除登录状态 + List removeSessionList = new ArrayList<>(); + for (LoginStatusVO loginStatusVO : sessionLoginStatusMap.values()) { + if (Objects.equals(loginStatusVO.getToken(), loginUserInfoVO.getToken())) { + removeSessionList.add(loginStatusVO.getSessionId()); + } + } + for (String sessionId : removeSessionList) { + sessionLoginStatusMap.remove(sessionId); + } + } + + public LoginUserInfoVO getLoginInfoByToken(String token) { + LoginUserInfoVO loginUserInfoVO = this.queryLoginInfoByToken(token); + BusinessExceptionAssertEnum.LOGIN_EXPIRED.assertNotNull(loginUserInfoVO); + loginUserInfoVO.cancelPreLogout(); + return loginUserInfoVO; + } + + public void removeUserWmLogin(Long userId) { + List infoVOList = this.queryLoginInfoByUserId(userId); + if (!CollectionUtils.isEmpty(infoVOList)) { + List removeList = new ArrayList<>(); + for (LoginUserInfoVO loginUserInfoVO : infoVOList) { + if (Client.Assistant.equals(loginUserInfoVO.getClient())) { + removeList.add(loginUserInfoVO); + } + } + for (LoginUserInfoVO loginUserInfoVO : removeList) { + this.clearOf(loginUserInfoVO); + } + } + } + + public void updateLoginUser(UserVO userVO) { + List infoVOList = this.queryLoginInfoByUserId(userVO.getId()); + if (!CollectionUtils.isEmpty(infoVOList)) { + for (LoginUserInfoVO loginUserInfoVO : infoVOList) { + loginUserInfoVO.setUserVO(userVO); + } + } + } + + public LoginUserInfoVO queryLoginInfoOfDevice(String deviceCode) { + for (LoginUserInfoVO userInfoVO : tokenLoginUserMap.values()) { + ProjectDeviceVO deviceVO = userInfoVO.getDeviceVO(); + if (Objects.nonNull(deviceVO) && Objects.equals(deviceCode, deviceVO.getCode())) { + return userInfoVO; + } + } + return null; + } + + public List queryProjectDeviceLoginInfo(Project project) { + List list = new ArrayList<>(); + for (LoginUserInfoVO userInfoVO : tokenLoginUserMap.values()) { + ProjectDeviceVO deviceVO = userInfoVO.getDeviceVO(); + if (Objects.nonNull(deviceVO) && Objects.equals(deviceVO.getProject(), project)) { + list.add(userInfoVO); + } + } + return list; + } + + public List queryAllLoginStatus() { + return new ArrayList<>(sessionLoginStatusMap.values()); + } + + public List getAllLoginUserIds() { + return new ArrayList<>(userLoginInfoMap.keySet()); + } +} diff --git a/src/main/java/club/joylink/rtss/services/Map3dModelService.java b/src/main/java/club/joylink/rtss/services/Map3dModelService.java new file mode 100644 index 000000000..6d4218e0a --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/Map3dModelService.java @@ -0,0 +1,86 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.constants.StatusEnum; +import club.joylink.rtss.dao.Map3dModelDAO; +import club.joylink.rtss.entity.Map3dModel; +import club.joylink.rtss.entity.Map3dModelExample; +import club.joylink.rtss.exception.BusinessExceptionAssertEnum; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.map.Map3dModelCreateVO; +import club.joylink.rtss.vo.client.map.Map3dModelUpdateVO; +import club.joylink.rtss.vo.client.map.Map3dModelVO; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.time.LocalDateTime; +import java.util.List; +import java.util.stream.Collectors; + +@Service +@Slf4j +public class Map3dModelService implements IMap3dModelService { + + @Autowired + private Map3dModelDAO map3dModelDAO; + + @Override + public List findAllModels() { + Map3dModelExample example = new Map3dModelExample(); + example.createCriteria().andStatusEqualTo(StatusEnum.Valid.getCode()); + List allModels = map3dModelDAO.selectByExample(example); + return Map3dModelVO.convert2VOs(allModels); + } + + @Override + public void create(Map3dModelCreateVO createVO, UserVO user) { + List modelList = createVO.convert2DB(); + modelList.forEach(model -> { + model.setUploaderId(user.getId()); + model.setUploadTime(LocalDateTime.now()); + map3dModelDAO.insertSelective(model); + }); + } + + private List findEntityByUrl(String url) { + Map3dModelExample example = new Map3dModelExample(); + example.createCriteria().andUrlEqualTo(url); + return map3dModelDAO.selectByExample(example); + } + + @Override + public void delete(Long id) { + Map3dModel entity = findEntityById(id); + entity.setUpdateTime(LocalDateTime.now()); + entity.setStatus(StatusEnum.Invalid.getCode()); + map3dModelDAO.updateByPrimaryKey(entity); + } + + @Override + public List query(String resourceType) { + Map3dModelExample example = new Map3dModelExample(); + example.createCriteria().andResourceTypeEqualTo(resourceType); + List map3dModels = map3dModelDAO.selectByExample(example); + return map3dModels.stream().map(Map3dModelVO::new).collect(Collectors.toList()); + } + + @Override + public void update(Map3dModelUpdateVO updateVO) { + Map3dModel entity = getEntityById(updateVO.getId()); + Long id = entity.getId(); + entity = updateVO.cover2DB(entity); + entity.setId(id); + entity.setUpdateTime(LocalDateTime.now()); + map3dModelDAO.updateByPrimaryKey(entity); + } + + private Map3dModel getEntityById(Long id) { + Map3dModel entity = findEntityById(id); + BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertNotNull(entity, String.format("id为[%s]的模型数据不存在", id)); + return entity; + } + + private Map3dModel findEntityById(Long id) { + return map3dModelDAO.selectByPrimaryKey(id); + } +} diff --git a/src/main/java/club/joylink/rtss/services/MapService.java b/src/main/java/club/joylink/rtss/services/MapService.java new file mode 100644 index 000000000..d33131d7b --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/MapService.java @@ -0,0 +1,932 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.services.training.ITrainingV1Service; +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import com.joylink.base.exception.BusinessException; +import com.joylink.base.exception.DBException; +import com.joylink.base.exception.constant.ExceptionMapping; +import club.joylink.rtss.services.cache.ICacheService; +import club.joylink.rtss.simulation.cbtc.build.SimulationBuildParams; +import club.joylink.rtss.simulation.cbtc.build.SimulationBuilder; +import club.joylink.rtss.constants.BusinessConsts; +import club.joylink.rtss.constants.MapStatus; +import club.joylink.rtss.constants.Project; +import club.joylink.rtss.dao.*; +import club.joylink.rtss.entity.*; +import club.joylink.rtss.services.simulation.SchedulingService; +import club.joylink.rtss.simulation.Simulation; +import club.joylink.rtss.simulation.SimulationAdapter; +import club.joylink.rtss.simulation.SimulationConstructData; +import club.joylink.rtss.simulation.data.DataService; +import club.joylink.rtss.simulation.data.device.RouteUnit; +import club.joylink.rtss.util.ConvertUtil; +import club.joylink.rtss.util.JsonUtils; +import club.joylink.rtss.util.VersionUtil; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.DictionaryDetailVO; +import club.joylink.rtss.vo.client.MapQueryVO; +import club.joylink.rtss.vo.client.PageQueryVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.map.*; +import club.joylink.rtss.vo.client.map.newmap.MapPSDVO; +import club.joylink.rtss.vo.client.map.newmap.MapStationNewVO; +import club.joylink.rtss.vo.client.map.newmap.MapStationStandNewVO; +import club.joylink.rtss.vo.client.runplan.RunPlanLoadVO; +import club.joylink.rtss.vo.client.runplan.RunPlanVO; +import club.joylink.rtss.vo.client.schedulingNew.SchedulingPlanNewVO; +import lombok.extern.slf4j.Slf4j; +import org.springframework.util.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; +import org.springframework.util.ObjectUtils; + +import java.text.Collator; +import java.time.LocalDateTime; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +/** + * 地图 服务 + * + * @author sheng + */ +@Service +@Slf4j +public class MapService implements IMapService { + + @Autowired + private MapInfoDAO mapInfoDAO; + + @Autowired + private MapDataDAO mapDataDAO; + + @Autowired + private MapVersionDAO mapVersionDAO; + + @Autowired + private Map3dDataDAO map3dDataDAO; + + @Autowired + private ICacheService iCacheService; + + @Autowired + private IRealLineService iRealLineService; + + @Autowired + private ISysUserService iSysUserService; + + @Autowired + private SimulationAdapter simulationAdapter; + + @Autowired + private IRunPlanDraftService iRunPlanDraftService; + + @Autowired + private MpStationRunningDAO stationRunningDAO; + + @Autowired + private ISysDictionaryService iSysDictionaryService; + + @Autowired + private ILoadPlanService iLoadPlanService; + + @Autowired + private IRunPlanTemplateService iRunPlanTemplateService; + + @Autowired + private SchedulingService schedulingService; + + @Autowired + private ILessonService iLessonService; + + @Autowired + private ITrainingV1Service iTrainingService; + + @Autowired + private IExamService iExamService; + + @Autowired + private IScriptService iScriptService; + + @Autowired + private IMapSystemService iMapSystemService; + + @Autowired + private IPermissionService iPermissionService; + + @Override + public List queryCityHasMap(String dicCode) { + MapInfoExample example = new MapInfoExample(); + MapInfoExample.Criteria criteria = example.createCriteria(); + criteria.andStatusEqualTo(MapStatus.Online.getCode()) + .andProjectEqualTo(false); + List list = mapInfoDAO.selectByExample(example); + Set collect = list.stream().map(MapInfo::getCityCode).collect(Collectors.toSet()); + List dictionaryDetailVOList = iSysDictionaryService.getDicDetailListByDicCode(dicCode); + if (!CollectionUtils.isEmpty(dictionaryDetailVOList)) { + List citys = dictionaryDetailVOList.stream() + .filter(dictionaryDetailVO -> collect.contains(dictionaryDetailVO.getCode())) + .collect(Collectors.toList()); + Collator collator = Collator.getInstance(Locale.CHINA); + citys.sort((o1, o2) -> { + if (o1.getName().contains("标准线")) { + return -1; + } else if (o2.getName().contains("标准线")) { + return 1; + } else { + return collator.compare(o1.getName(), o2.getName()); + } + }); + return citys; + } + return null; + } + + @Override + public boolean checkNameExist(String name) { + MapInfoExample mapInfoExample = new MapInfoExample(); + mapInfoExample.createCriteria() + .andNameEqualTo(name) + .andStatusNotEqualTo(MapStatus.Delete.getCode()); + return mapInfoDAO.countByExample(mapInfoExample) > 0; + } + + @Override + public List list(MapVO mapVO) { + MapInfoExample example = new MapInfoExample(); + example.setOrderByClause("order_number"); + MapInfoExample.Criteria criteria = example.createCriteria(); + criteria.andStatusEqualTo(MapStatus.Online.getCode()); + if (!StringUtils.isBlank(mapVO.getName())) { + criteria.andNameLike(String.format("%%%s%%", mapVO.getName())); + } + if (!StringUtils.isBlank(mapVO.getCityCode())) { + criteria.andCityCodeEqualTo(mapVO.getCityCode()); + } +// criteria.andDrawWayEqualTo(mapVO.isDrawWay()); + List list = mapInfoDAO.selectByExample(example); + // 过滤项目的 + if (!CollectionUtils.isEmpty(list)) { + list = list.stream().filter(mapInfo -> !mapInfo.getProject()) + .collect(Collectors.toList()); + } + return MapVO.convert2VOList(list); + } + + public List listOnline() { + MapInfoExample example = new MapInfoExample(); + MapInfoExample.Criteria criteria = example.createCriteria(); + criteria.andStatusEqualTo(MapStatus.Online.getCode()); + List list = mapInfoDAO.selectByExample(example); + return MapVO.convert2VOList(list); + } + + @Override + public List listByProjectCode(String projectCode) { + Objects.requireNonNull(projectCode, "项目编号不能为空"); + MapInfoExample example = new MapInfoExample(); + example.setOrderByClause("order_number"); + example.createCriteria() + .andStatusEqualTo(MapStatus.Online.getCode()) + .andProjectCodeEqualTo(projectCode); + List list = mapInfoDAO.selectByExample(example); + return MapVO.convert2VOList(list); + } + + @Override + public PageVO queryPagedMaps(MapQueryVO queryVO) { + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + MapInfoExample example = new MapInfoExample(); + MapInfoExample.Criteria criteria = example.createCriteria(); + criteria.andStatusNotEqualTo(MapStatus.Delete.getCode()); + if (StringUtils.hasText(queryVO.getName())) { + criteria.andNameLike(String.format("%%%s%%", queryVO.getName())); + } + if (StringUtils.hasText(queryVO.getCityCode())) { + criteria.andCityCodeEqualTo(queryVO.getCityCode()); + } + Page page = (Page) mapInfoDAO.selectByExample(example); + List mapVOS = MapVO.convert2VOList(page.getResult()); + return PageVO.convert(page, mapVOS); + } + + @Override + public PageVO queryPagedMapVersions(Long id, PageQueryVO queryVO) { + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + MapVersionExample versionExample = new MapVersionExample(); + versionExample.createCriteria().andMapIdEqualTo(id); + versionExample.setOrderByClause("update_time desc"); + Page page = (Page) mapVersionDAO.selectByExample(versionExample); + List mapVersionVOList = MapVersionVO.convert2VOList(page.getResult()); + return PageVO.convert(page, mapVersionVOList); + } + + @Override + public MapVO getMapInfoById(Long id) { + Objects.requireNonNull(id, "id 不能为null"); + MapVO mapVO = this.findMapBaseInfoById(id); + if (Objects.isNull(mapVO)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST, String.format("id为‘%s’的地图数据不存在", id)); + } + String version = this.findMapVersion(id); + mapVO.setVersion(version); + return mapVO; + } + + @Override + public MapVO getMapDetail(Long id) { + Objects.requireNonNull(id, "id不能为空"); + if (id < 0) return null; + MapVO mapVO = (MapVO) this.iCacheService.get(BusinessConsts.CachePrefix.Map + id); + if (Objects.isNull(mapVO)) { // 缓存不存在,查询数据库 + synchronized (this) { + mapVO = (MapVO) this.iCacheService.get(BusinessConsts.CachePrefix.Map + id); + if (Objects.nonNull(mapVO)) { + return mapVO; + } + mapVO = getMapInfoById(id); +// // 查询线路数据 +// mapVO.setConfigVO(this.iRealLineService.getLineConfigByCode(mapVO.getLineCode())); +// // 查询map版本 +// String version = this.findMapVersion(mapVO.getId()); +// mapVO.setVersion(version); + MapDataVO mapDataVO = this.getMapDataByMapId(mapVO.getId(), mapVO.isDrawWay()); + mapVO.setMapData(mapDataVO); +// mapVO.setMap3dData(this.findMap3dDataByMapId(mapVO.getId())); + // todo 后面可以设置为永不过期缓存 + this.iCacheService.put(BusinessConsts.CachePrefix.Map + mapVO.getId(), mapVO); + } + } + if (Objects.nonNull(mapVO) && mapVO.isDrawWay()) { + // 查询线路数据,保证每次都获取最新的线路配置 + RealLineVO realLineVO = this.iRealLineService.getLineDetailByCode(mapVO.getLineCode()); + mapVO.setConfigVO(realLineVO.getConfigVO()); + realLineVO.setConfigVO(null); + mapVO.getGraphDataNew().setSkinVO(realLineVO); + } + return mapVO; + } + + @Override + public MapDataVO getMapDataByMapId(Long mapId, Boolean drayWay) { + Objects.requireNonNull(mapId, "mapId不能为空"); + MapDataExample example = new MapDataExample(); + example.createCriteria().andMapIdEqualTo(mapId); + List mapDataList = this.mapDataDAO.selectByExampleWithBLOBs(example); + if (CollectionUtils.isEmpty(mapDataList)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST, + String.format("地图id[%s]的地图数据不存在", mapId)); + } + return new MapDataVO(mapDataList.get(0), drayWay); + } + + @Override + public Map3dDataVO findMap3dDataByMapId(Long mapId) { + Objects.requireNonNull(mapId, "mapId不能为空"); + Map3dDataVO map3dDataVO = (Map3dDataVO) this.iCacheService.get(BusinessConsts.CachePrefix.Map_3d + mapId); + if (map3dDataVO != null) { + return map3dDataVO; + } + synchronized (this) { + Map3dDataExample example = new Map3dDataExample(); + example.createCriteria().andMapIdEqualTo(mapId); + List map3dDataList = this.map3dDataDAO.selectByExampleWithBLOBs(example); + if (!CollectionUtils.isEmpty(map3dDataList)) { + Map3dDataWithBLOBs map3dData = map3dDataList.get(0); + map3dDataVO = new Map3dDataVO(map3dData); + this.iCacheService.put(BusinessConsts.CachePrefix.Map_3d + mapId, map3dDataVO); + return map3dDataVO; + } + return null; + } + } + + @Override + public String findMapVersion(Long mapId) { + MapVersionExample example = new MapVersionExample(); + example.createCriteria().andMapIdEqualTo(mapId); + example.setOrderByClause("update_time desc"); + List versionList = this.mapVersionDAO.selectByExample(example); + if (!CollectionUtils.isEmpty(versionList)) { + return versionList.get(0).getVersion(); + } + return null; + } + + @Override + @Transactional + public void deleteMap(Long id, UserVO userVO) { + // 判断地图数据是否存在 + MapInfo map = mapInfoDAO.selectByPrimaryKey(id); + if (Objects.isNull(map)) { + return; + } + // 逻辑删除 + map.setStatus(MapStatus.Delete.getCode()); + this.mapInfoDAO.updateByPrimaryKey(map); + } + + @Override + public void onLine(Long id, UserVO userVO) { + // 判断地图数据是否存在 + MapInfo map = mapInfoDAO.selectByPrimaryKey(id); + if (map == null) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + if (!iSysUserService.isAdmin(userVO)) { + throw new BusinessException(ExceptionMapping.ILLEGAL_OPERATION); + } + map.setStatus(MapStatus.Online.getCode()); + mapInfoDAO.updateByPrimaryKey(map); + } + + @Override + public void offLine(Long id, UserVO userVO) { + // 判断地图数据是否存在 + MapInfo map = mapInfoDAO.selectByPrimaryKey(id); + if (map == null) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + if (!iSysUserService.isAdmin(userVO)) { + throw new BusinessException(ExceptionMapping.ILLEGAL_OPERATION); + } + map.setStatus(MapStatus.Offline.getCode()); + mapInfoDAO.updateByPrimaryKey(map); + } + + @Override + @Transactional + public MapVO publish(MapVO mapVO, MapDataVO mapDataVO, UserVO userVO) { + // todo 通知课程修改城市后续处理 + // 地图信息 + MapInfoExample infoExample = new MapInfoExample(); + infoExample.createCriteria() + .andNameEqualTo(mapVO.getName()) + .andStatusNotEqualTo(MapStatus.Delete.getCode()); + List mapInfoList = mapInfoDAO.selectByExample(infoExample); + MapInfo map; + if (ObjectUtils.isEmpty(mapInfoList)) { + map = new MapInfo(); + map.setName(mapVO.getName()); + map.setCityCode(mapVO.getCityCode()); + map.setLineCode(mapVO.getLineCode()); + map.setStatus(MapStatus.Online.getCode()); + map.setProject(false); + map.setDrawWay(mapVO.isDrawWay()); + mapInfoDAO.insert(map); + } else { + map = mapInfoList.get(0); + if (!MapStatus.Delete.getCode().equals(map.getStatus())) { + + if (!Objects.equals(map.getLineCode(), mapVO.getLineCode())) { + throw new BusinessException(ExceptionMapping.ILLEGAL_OPERATION, "存在名称相同但基于不同真实线路的地图"); + } + if (!Objects.equals(map.getDrawWay(), mapVO.isDrawWay())) { + throw new BusinessException(ExceptionMapping.ILLEGAL_OPERATION, "存在名称相同但基于不同绘制方式的地图"); + } + if (!Objects.equals(map.getCityCode(), mapVO.getCityCode())) { + throw new BusinessException(ExceptionMapping.ILLEGAL_OPERATION, "存在名称相同但基于不同关联城市的地图"); + } + } + } + // 地图数据 + MapDataWithBLOBs mapData; + MapDataExample dataExample = new MapDataExample(); + dataExample.createCriteria().andMapIdEqualTo(map.getId()); + List mapDataList = mapDataDAO.selectByExampleWithBLOBs(dataExample); + if (CollectionUtils.isEmpty(mapDataList)) { + mapData = new MapDataWithBLOBs(); + mapData.setMapId(map.getId()); + if (map.getDrawWay()) { + // 清除shapeData中的皮肤属性 + mapDataVO.getShapeDataNew().setSkinVO(null); + mapData.setGraphData(JsonUtils.writeValueAsString(mapDataVO.getShapeDataNew())); + mapData.setLogicData(JsonUtils.writeValueAsString(mapDataVO.getLogicDataNew())); + } else { + mapData.setGraphData(JsonUtils.writeValueAsString(mapDataVO.getShapeData())); + mapData.setLogicData(JsonUtils.writeValueAsString(mapDataVO.getLogicData())); + } + mapDataDAO.insert(mapData); + } else { + mapData = mapDataList.get(0); + if (map.getDrawWay()) { + mapDataVO.getShapeDataNew().setSkinVO(null); + mapData.setGraphData(JsonUtils.writeValueAsString(mapDataVO.getShapeDataNew())); + mapData.setLogicData(JsonUtils.writeValueAsString(mapDataVO.getLogicDataNew())); + } else { + mapData.setGraphData(JsonUtils.writeValueAsString(mapDataVO.getShapeData())); + mapData.setLogicData(JsonUtils.writeValueAsString(mapDataVO.getLogicData())); + } + mapDataDAO.updateByPrimaryKeyWithBLOBs(mapData); + } + // 地图版本 + MapVersion newMapVersion = buildAndInsertMapVersion(map, userVO); + // 保存站间运行数据 + if (!map.getDrawWay()) { + this.constructAndSaveStationRunning(map.getId(), mapDataVO); + } + ICacheService.remove(BusinessConsts.CachePrefix.Map + map.getId()); + MapVO newMapVO = new MapVO(map); + newMapVO.setVersion(newMapVersion.getVersion()); + MapDataVO dataVO = new MapDataVO(mapData, map.getDrawWay()); + newMapVO.setMapData(dataVO); + return newMapVO; + } + + @Override + public void publish3DData(MapVO mapVO, Map3dDataVO map3dDataVO, UserVO user) { + // 地图信息 + MapInfoExample infoExample = new MapInfoExample(); + infoExample.createCriteria() + .andNameEqualTo(mapVO.getName()) + .andStatusNotEqualTo(MapStatus.Delete.getCode()); + List mapInfoList = mapInfoDAO.selectByExample(infoExample); + MapInfo map; + if (ObjectUtils.isEmpty(mapInfoList)) { + throw new BusinessException(ExceptionMapping.DATA_NOT_EXIST, + String.format("地图名称为[%s]的发布地图数据不存在", mapVO.getName())); + } else { + map = mapInfoList.get(0); + if (!Objects.equals(map.getLineCode(), mapVO.getLineCode())) { + throw new BusinessException(ExceptionMapping.ILLEGAL_OPERATION, "存在名称相同但基于不同真实线路的地图"); + } + if (!Objects.equals(map.getDrawWay(), mapVO.isDrawWay())) { + throw new BusinessException(ExceptionMapping.ILLEGAL_OPERATION, "存在名称相同但基于不同绘制方式的地图"); + } + if (!Objects.equals(map.getCityCode(), mapVO.getCityCode())) { + throw new BusinessException(ExceptionMapping.ILLEGAL_OPERATION, "存在名称相同但基于不同关联城市的地图"); + } + } + if (Objects.nonNull(map3dDataVO)) { + Map3dDataExample map3dDataExample = new Map3dDataExample(); + map3dDataExample.createCriteria().andMapIdEqualTo(map.getId()); + List map3dDataList = map3dDataDAO.selectByExampleWithBLOBs(map3dDataExample); + Map3dDataWithBLOBs map3dData = map3dDataVO.convert2DB(); + if (CollectionUtils.isEmpty(map3dDataList)) { + map3dData.setMapId(map.getId()); + map3dData.setCreatorId(user.getId()); + map3dData.setCreateTime(LocalDateTime.now()); + map3dDataDAO.insert(map3dData); + } else { + Map3dDataWithBLOBs map3dDataWithBLOBs = map3dDataList.get(0); + map3dData.setId(map3dDataWithBLOBs.getId()); + map3dData.setUpdateUserId(user.getId()); + map3dData.setUpdateTime(LocalDateTime.now()); + map3dDataDAO.updateByPrimaryKeySelective(map3dData); + } + ICacheService.remove(BusinessConsts.CachePrefix.Map_3d + map.getId()); + } + } + + /** + * 创建并插入地图版本信息 + */ + private MapVersion buildAndInsertMapVersion(MapInfo map, UserVO userVO) { + String version = this.findMapVersion(map.getId()); + MapVersion newVersion = buildVersion(map, version, userVO); + mapVersionDAO.insert(newVersion); + return newVersion; + } + + /** + * 创建新的版本信息 + */ + private MapVersion buildVersion(MapInfo map, String old, UserVO userVO) { + String version = VersionUtil.generateNext(old); + MapVersion mapVersion = new MapVersion(); + mapVersion.setMapId(map.getId()); + mapVersion.setAuthorId(userVO.getId()); + mapVersion.setUpdateTime(LocalDateTime.now()); + mapVersion.setVersion(version); + return mapVersion; + } + + @Override + public List getMapListByLineCode(String lineCode) { + MapInfoExample mapExample = new MapInfoExample(); + mapExample.createCriteria().andLineCodeEqualTo(lineCode); + List maps = mapInfoDAO.selectByExample(mapExample); + return MapVO.convert2VOList(maps); + } + + @Override + public void updateName(Long id, String name, UserVO userVO) { + if (!this.iSysUserService.isAdmin(userVO)) { + throw new BusinessException(ExceptionMapping.ILLEGAL_OPERATION); + } + if (this.isNameExistExcept(name, id)) { + throw new BusinessException(ExceptionMapping.ILLEGAL_OPERATION, "名称已存在"); + } + MapInfo map = mapInfoDAO.selectByPrimaryKey(id); + if (Objects.isNull(map)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + map.setName(name); + mapInfoDAO.updateByPrimaryKey(map); +// // 自动更新商品名称 +// iGoodsService.autoUpdateSimulateGoods(new MapVO(map)); + } + + @Override + public void updateBelongCity(Long id, String cityCode, UserVO user) { + if (!this.iSysUserService.isAdmin(user)) { + throw new BusinessException(ExceptionMapping.ILLEGAL_OPERATION); + } + MapInfo mapInfo = this.mapInfoDAO.selectByPrimaryKey(id); + if (Objects.nonNull(mapInfo)) { + mapInfo.setCityCode(cityCode); + mapInfoDAO.updateByPrimaryKey(mapInfo); + } + } + + @Override + public void updateBelongProject(Long id, boolean project, String projectCode, UserVO user) { + Objects.requireNonNull(id, "地图id不能为空"); + MapInfo mapInfo = this.mapInfoDAO.selectByPrimaryKey(id); + if (project) { + if (StringUtils.isBlank(projectCode)) { + throw new BusinessException(ExceptionMapping.ARGUMENT_ILLEGAL, "定制项目不能为空"); + } + } + mapInfo.setProject(project); + mapInfo.setProjectCode(projectCode); + this.mapInfoDAO.updateByPrimaryKey(mapInfo); + } + + @Override + public List getUseMapListByCity(String cityCode) { + MapInfoExample example = new MapInfoExample(); + example.setOrderByClause("order_number"); + example.createCriteria().andCityCodeEqualTo(cityCode).andStatusEqualTo(MapStatus.Online.getCode()); + List mapInfoList = mapInfoDAO.selectByExample(example); + return MapVO.convert2VOList(mapInfoList); + } + + @Override + public List findOnlineMapByProjectCode(String projectCode) { + MapInfoExample example = new MapInfoExample(); + example.createCriteria().andProjectCodeEqualTo(projectCode).andStatusEqualTo(MapStatus.Online.getCode()); + List mapInfoList = mapInfoDAO.selectByExample(example); + return MapVO.convert2VOList(mapInfoList); + } + + @Override + public List findOnlineMapNotProject() { + MapInfoExample example = new MapInfoExample(); + example.createCriteria().andProjectEqualTo(false).andStatusEqualTo(MapStatus.Online.getCode()); + List mapInfoList = mapInfoDAO.selectByExample(example); + return MapVO.convert2VOList(mapInfoList); + } + + /** + * 构造并保存站间运行数据 + * + * @param mapId + * @param mapDataVO + */ + private void constructAndSaveStationRunning(Long mapId, MapDataVO mapDataVO) { + Objects.requireNonNull(mapId); + List routeUnitList = null; + List routingList = null; + if (!mapDataVO.isDrawWay()) { +// if (CollectionUtils.isEmpty(mapDataVO.getLogicDataNew().getRoutingList())) { +// return; +// } +// MapLogicDataNewVO logicData = mapDataVO.getLogicDataNew(); +// routingList = logicData.getRoutingList(); +// routeUnitList = logicData.getRouteUnitList(); +// } else { + + if (CollectionUtils.isEmpty(mapDataVO.getLogicData().getRoutingList())) { + return; + } + MapLogicDataVO logicData = mapDataVO.getLogicData(); + routingList = logicData.getRoutingList(); + routeUnitList = logicData.getRouteUnitList(); + } + SimulationConstructData constructData = SimulationConstructData.buildFunctionalConstructData(mapDataVO, null); + Simulation simulation = simulationAdapter.constructSimulation(constructData); + Map stationRunningMap = new HashMap<>(); + // 路径单元 + Map routeUnitVOMap = routeUnitList.stream() + .collect(Collectors.toMap(routeUnit -> + String.format("%s-%s", routeUnit.getStartSectionCode(), routeUnit.getEndSectionCode()), Function.identity())); + // 交路区段 + List routingSectionVOList = new ArrayList<>(); + routingList.forEach(routingVO -> routingSectionVOList.addAll(routingVO.getRoutingSectionList())); + Map> routingSectionMap = routingSectionVOList.stream() + .collect(Collectors.groupingBy(MapRoutingSectionVO::getRoutingCode)); + // 交路 + routingList.forEach(routingVO -> { + List routingSectionList = routingSectionMap.get(routingVO.getCode()); + for (int i = 0; i < routingSectionList.size() - 1; i++) { + MapRoutingSectionVO startSection = routingSectionList.get(i); + MapRoutingSectionVO endSection = routingSectionList.get(i + 1); + String key = String.format("%s-%s", startSection.getSectionCode(), endSection.getSectionCode()); + if (Objects.isNull(stationRunningMap.get(key))) { + MpStationRunning stationRunning = new MpStationRunning(); + stationRunning.setMapId(mapId); + stationRunning.setStartStationCode(startSection.getStationCode()); + stationRunning.setStartSectionCode(startSection.getSectionCode()); + stationRunning.setEndStationCode(endSection.getStationCode()); + stationRunning.setEndSectionCode(endSection.getSectionCode()); + stationRunning.setDirectionCode(routingVO.getDirectionCode()); + // 计算距离 + MapRouteUnitVO mapRouteUnitVO = routeUnitVOMap.get(key); + if (Objects.isNull(mapRouteUnitVO)) { + log.error(String.format("%s路径单元不存在", key)); + stationRunning.setDistance(100000); + } else { + RouteUnit routeUnit = simulation.getDeviceRepository().getDeviceByCode(mapRouteUnitVO.getCode(), RouteUnit.class); + float distance = DataService.CalculateService.calculateDistance(simulation, routeUnit); + stationRunning.setDistance(ConvertUtil.float2IntegerByWeight(distance, 100)); + } + stationRunningMap.put(key, stationRunning); + } + } + }); + // 删除旧数据,插入新数据 (后续处理比较) + MpStationRunningExample stationRunningExample = new MpStationRunningExample(); + stationRunningExample.createCriteria().andMapIdEqualTo(mapId); + List stationRunningList = this.stationRunningDAO.selectByExample(stationRunningExample); + List stationRunningIdList = stationRunningList.stream().map(MpStationRunning::getId).collect(Collectors.toList()); + iRunPlanDraftService.deleteRunPlanLevelByStationRunningId(stationRunningIdList); + this.stationRunningDAO.deleteByExample(stationRunningExample); + stationRunningMap.values().forEach(stationRunning -> { + stationRunning.setMapId(mapId); + this.stationRunningDAO.insert(stationRunning); + }); + + } + + @Override + public List queryOnlineMapInfos() { + MapInfoExample example = new MapInfoExample(); + example.createCriteria() + .andStatusEqualTo(MapStatus.Online.getCode()); + List mapInfoList = this.mapInfoDAO.selectByExample(example); + List mapVOList = MapVO.convert2VOList(mapInfoList); + return mapVOList; + } + + @Override + public List queryOnlineMapInfoListOfProject(Project project) { + MapInfoExample example = new MapInfoExample(); + MapInfoExample.Criteria criteria = example.createCriteria() + .andStatusEqualTo(MapStatus.Online.getCode()); + if (!Project.DEFAULT.equals(project)) { + criteria.andProjectCodeEqualTo(project.name()); + } + List mapInfos = this.mapInfoDAO.selectByExample(example); + List mapVOList = MapVO.convert2VOList(mapInfos); + return mapVOList; + } + + /** + * 获取有屏蔽门的站台列表 + */ + @Override + public List getHasScreenDoorStand(Long id) { + MapVO mapVO = this.getMapDetail(id); + if (mapVO.isDrawWay()) { + //新绘图下屏蔽门关联的站台 + Set standCodeSetWithPSD = mapVO.getGraphDataNew().getPsdList().parallelStream().map(psd -> psd.getStandCode()).collect(Collectors.toSet()); + return mapVO.getGraphDataNew().getStationStandList().parallelStream().filter(stand -> standCodeSetWithPSD.contains(stand.getCode())).collect(Collectors.toList()); + } + return mapVO.getGraphData().getStationStandList().stream() + .filter(stand -> stand.getVisible() && stand.getHasDoor()) + .collect(Collectors.toList()); + } + + @Override + public MapVO findMapBaseInfoById(Long id) { + MapInfo mapInfo = this.mapInfoDAO.selectByPrimaryKey(id); + if (Objects.nonNull(mapInfo)) { + return new MapVO(mapInfo); + } + return null; + } + + @Override + @Transactional + public void copyMapData(Long id, MapCopyOption copyOption, UserVO user) { + // 获取源地图数据 + MapVO mapVO = this.getMapDetail(id); + // 检查名称 + if (this.isMapNameExist(copyOption.getName())) { + throw new BusinessException(ExceptionMapping.ARGUMENT_ILLEGAL, String.format("地图名称为[%s]的地图已经存在", copyOption.getName())); + } + // 拷贝地图数据 + mapVO.setName(copyOption.getName()); + MapDataVO mapDataVO = new MapDataVO(mapVO); + MapVO mapNewVO = this.publish(mapVO, mapDataVO, user); + Map3dDataVO map3dDataVO = findMap3dDataByMapId(mapVO.getId()); + if (Objects.nonNull(map3dDataVO)) { + this.publish3DData(mapVO, map3dDataVO, user); + } + // 地图拷贝成功,拷贝运行图相关 + this.iRunPlanTemplateService.copyAllOfMap(id, mapNewVO.getId(), user); + + //根据选项拷贝相关数据 + if (copyOption.isCopyOtherData()) { + //拷贝实训 + Map relMap = this.iTrainingService + .copyAllOfMapAndPrd(id, mapNewVO.getId()); + //拷贝课程 + Map lessonRelationMap = iLessonService.copy(id, mapNewVO.getId(), relMap, user); + if (!CollectionUtils.isEmpty(lessonRelationMap)) { + //拷贝考试 + iExamService.copy(lessonRelationMap, user); + } + //拷贝system + this.iMapSystemService.copyOfMap(id, mapNewVO.getId()); + //拷贝剧本 + this.iScriptService.copy(id, mapNewVO.getId(), user); + } + } + + /** + * 查询名称是否重复 + * + * @param name + * @return + */ + @Override + public boolean isMapNameExist(String name) { + MapInfoExample example = new MapInfoExample(); + example.createCriteria() + .andNameEqualTo(name) + .andStatusNotEqualTo(MapStatus.Delete.getCode()); + if (this.mapInfoDAO.countByExample(example) > 0) { + return true; + } + return false; + } + + @Override + public boolean isExist(Long id) { + MapInfo mapInfo = mapInfoDAO.selectByPrimaryKey(id); + if (mapInfo == null) { + return false; + } + return true; + } + + @Override + public List doSimulationCheck(Long mapId, UserVO user) { + SimulationBuildParams.SimulationBuildParamsBuilder builder = SimulationBuildParams.builder(); + // 地图 + MapVO mapVO = this.getMapDetail(mapId); + builder.map(mapVO); + // 运行图 + RunPlanLoadVO loadPlan = this.iLoadPlanService.findCommonLoadPlanOfMap(mapId); + if (Objects.nonNull(loadPlan)) { + RunPlanVO runPlanVO = this.iRunPlanTemplateService.getRunPlan(loadPlan.getTemplatePlanId()); + if (Objects.nonNull(runPlanVO)) { + builder.runPlan(runPlanVO); + SchedulingPlanNewVO schedulingPlanNewVO = this.schedulingService + .queryCommonSchedulingPlan(runPlanVO.getId()); + builder.schedulingPlan(schedulingPlanNewVO); + } + } +// RunPlanVO commonRunPlan = this.iDailyRunPlanService.findCommonRunPlan(mapId, this.iDailyRunPlanService.getRunPlanDate()); +// builder.runPlan(commonRunPlan); + club.joylink.rtss.simulation.cbtc.Simulation simulation = SimulationBuilder.build(builder.build()); + return simulation.getDataErrMsgList(); + } + + @Override + public void updateOrderNumber(List vos) { + if (!CollectionUtils.isEmpty(vos)) { + vos.forEach(vo -> mapInfoDAO.updateByPrimaryKeySelective(vo.convert2DB())); + } + } + + @Override + public MapVO export(Long id) { + // 地图数据和三维数据导出 + MapVO mapVO = this.getMapDetail(id); + Map3dDataVO map3dDataVO = this.findMap3dDataByMapId(id); + mapVO.setMap3dData(map3dDataVO); + return mapVO; + } + + private boolean isNameExistExcept(String name, Long id) { + MapInfoExample example = new MapInfoExample(); + example.createCriteria() + .andNameEqualTo(name) + .andIdNotEqualTo(id) + .andStatusNotEqualTo(MapStatus.Delete.getCode()); + if (this.mapInfoDAO.countByExample(example) > 0) { + return true; + } + return false; + } + + @Override + public void updateBasicInfo(Long id, MapInfoUpdateVO updateVO, UserVO user) { + MapInfo mapInfo = this.mapInfoDAO.selectByPrimaryKey(id); + boolean update = false; + if (StringUtils.hasText(updateVO.getName())) { + if (this.isNameExistExcept(updateVO.getName(), id)) { + throw new BusinessException(ExceptionMapping.ILLEGAL_OPERATION, "名称已存在"); + } + mapInfo.setName(updateVO.getName()); + update = true; + } + if (StringUtils.hasText(updateVO.getCityCode())) { + mapInfo.setCityCode(updateVO.getCityCode()); + update = true; + } + if (StringUtils.hasText(updateVO.getLineCode()) && + this.iRealLineService.checkCodeExist(updateVO.getLineCode())) { + mapInfo.setLineCode(updateVO.getLineCode()); + update = true; + } + if (update) { + this.mapInfoDAO.updateByPrimaryKey(mapInfo); + this.iCacheService.remove(BusinessConsts.CachePrefix.Map + id); + } + } + + @Override + public List getNeedSupervisorStations(Long id) { + MapVO mapDetail = this.getMapDetail(id); + Map stationMap = mapDetail.getGraphDataNew().getStationList() + .stream() + .collect(Collectors.toMap(MapStationNewVO::getCode, Function.identity())); + Set stationSet = mapDetail.getGraphDataNew().getStationStandList() + .stream() + .filter(stand -> !stand.isSmall()) + .map(stand -> stationMap.get(stand.getStationCode())) + .collect(Collectors.toSet()); + ArrayList stationList = new ArrayList<>(stationSet); + stationList.sort(Comparator.comparing(MapStationNewVO::getKmRange)); + return stationList; + } + + @Override + public List getStationHasPsdStands(Long id, String stationCode) { + MapVO mapDetail = this.getMapDetail(id); + Map stationStandMap = mapDetail.getGraphDataNew().getStationStandList() + .stream() + .filter(standVO -> Objects.equals(standVO.getStationCode(), stationCode)) + .collect(Collectors.toMap(MapStationStandNewVO::getCode, Function.identity())); + List psdList = mapDetail.getGraphDataNew().getPsdList(); + List stationHasPsdStandList = new ArrayList<>(); + for (MapPSDVO psd : psdList) { + if (stationStandMap.containsKey(psd.getStandCode())) { + stationHasPsdStandList.add(stationStandMap.get(psd.getStandCode())); + } + } + return stationHasPsdStandList; + } + + @Override + public List getStandPsds(Long id, String standCode) { + MapVO mapDetail = this.getMapDetail(id); + List psdList = mapDetail.getGraphDataNew().getPsdList(); + List list = new ArrayList<>(); + for (MapPSDVO psd : psdList) { + if (Objects.equals(psd.getStandCode(), standCode)) { + list.add(psd); + } + } + return list; + } + + @Override + public List queryAllMapName() { + List mapInfos = mapInfoDAO.selectByExample(null); + return mapInfos.stream().map(info -> { + MapVO mapVO = new MapVO(); + mapVO.setId(info.getId()); + mapVO.setName(info.getName()); + mapVO.setProjectCode(info.getProjectCode()); + return mapVO; + }).collect(Collectors.toList()); + } + + @Override + public void generateMapFunction(Long mapId, UserVO createUser) { + synchronized (this) { + try { + //子系统 + iMapSystemService.generateSystem(mapId); + } catch (DBException e) { + log.warn("生成地图[{}]子系统{}",mapId,e.getMessage()); + } + try { + //权限 + iPermissionService.generatePermission(mapId, createUser); + } catch (BusinessException | DBException e) { + log.warn("生成地图[{}]权限:{}",mapId,e.getMessage()); + } + + } + } +} diff --git a/src/main/java/club/joylink/rtss/services/MapSystemService.java b/src/main/java/club/joylink/rtss/services/MapSystemService.java new file mode 100644 index 000000000..50267cd4e --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/MapSystemService.java @@ -0,0 +1,296 @@ +package club.joylink.rtss.services; + +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import com.joylink.base.exception.BusinessException; +import com.joylink.base.exception.DBException; +import com.joylink.base.exception.constant.ExceptionMapping; +import club.joylink.rtss.constants.MapPrdTypeEnum; +import club.joylink.rtss.constants.MapSystemType; +import club.joylink.rtss.constants.Project; +import club.joylink.rtss.constants.StatusEnum; +import club.joylink.rtss.dao.MapSystemDAO; +import club.joylink.rtss.entity.*; +import club.joylink.rtss.services.student.IClassStudentUserService; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.LessonVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.TreeNode; +import club.joylink.rtss.vo.client.map.MapVO; +import club.joylink.rtss.vo.client.runplan.RunPlanVO; +import club.joylink.rtss.vo.client.sub.MapSystemDetailVO; +import club.joylink.rtss.vo.client.sub.MapSystemQueryVO; +import club.joylink.rtss.vo.client.sub.MapSystemVO; +import club.joylink.rtss.vo.client.userPermission.UserPermissionVO; +import lombok.extern.slf4j.Slf4j; +import org.springframework.util.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +@Service +@Slf4j +public class MapSystemService implements IMapSystemService { + + @Autowired + private IMapService iMapService; + + @Autowired + private MapSystemDAO mapSystemDAO; + + @Autowired + private ILessonService iLessonService; + + @Autowired + private IUserPermissionService iUserPermissionService; + + @Autowired + private IRunPlanDraftService iRunPlanDraftService; + + @Autowired + private ISysUserService iSysUserService; + + @Autowired + private IClassStudentUserService iClassStudentUserService; + + @Override + @Transactional + public void generateSystem(Long mapId) { + if (!iMapService.isExist(mapId)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST, String.format("id为[%s]的地图不存在", mapId)); + } + for (MapPrdTypeEnum value : MapPrdTypeEnum.values()) { + MapSystem system = new MapSystem(); + system.setName(value.getMsg()); + system.setMapId(mapId); + system.setPrdType(value.getCode()); + system.setStatus(StatusEnum.Valid.getCode()); + if (!isExist(mapId, value.getCode(), MapSystemType.Simulation.name())) { + //生成仿真 + system.setType(MapSystemType.Simulation.name()); + mapSystemDAO.insertSelective(system); + } + //生成课程和考试 + Long amount = iLessonService.countByMapIdAndPrdType(mapId, value.getCode()); + for (int i = 1; i <= amount; i++) { + if (!isExist(mapId, value.getCode(), MapSystemType.Lesson.name())) { + system.setId(null); + system.setType(MapSystemType.Lesson.name()); + mapSystemDAO.insertSelective(system); + } + if (!isExist(mapId, value.getCode(), MapSystemType.Exam.name())) { + system.setId(null); + system.setType(MapSystemType.Exam.name()); + mapSystemDAO.insertSelective(system); + } + } + } + } + + private boolean isExist(Long mapId, String prdType, String type) { + MapSystemExample example = new MapSystemExample(); + example.createCriteria() + .andMapIdEqualTo(mapId) + .andPrdTypeEqualTo(prdType) + .andTypeEqualTo(type); + return mapSystemDAO.countByExample(example) >= 1; + } + + @Override + public PageVO queryPagedMapSystem(MapSystemQueryVO queryVO) { + MapSystemExample mapSystemExample = new MapSystemExample(); + MapSystemExample.Criteria criteria = mapSystemExample.createCriteria(); + mapSystemExample.setOrderByClause("id desc"); + if (Objects.nonNull(queryVO.getMapId())) { + criteria.andMapIdEqualTo(queryVO.getMapId()); + } + if (StringUtils.hasText(queryVO.getType())) { + criteria.andTypeEqualTo(queryVO.getType()); + } + if (StringUtils.hasText(queryVO.getName())) { + criteria.andNameLike(String.format("%%%s%%", queryVO.getName())); + } + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + Page page = (Page) mapSystemDAO.selectByExample(mapSystemExample); + if (CollectionUtils.isEmpty(page)) { + return new PageVO<>(); + } + List voList = page.getResult().stream().map(mapSystem -> { + MapSystemVO vo = new MapSystemVO(mapSystem); + vo.setMapName(iMapService.getMapInfoById(mapSystem.getMapId()).getName()); + return vo; + }).collect(Collectors.toList()); + return PageVO.convert(page, voList); + } + + @Override + public void createMapSystem(MapSystemVO mapSystemVO) { + MapSystemExample mapSystemExample = new MapSystemExample(); + mapSystemExample.createCriteria() + .andMapIdEqualTo(mapSystemVO.getMapId()) + .andPrdTypeEqualTo(mapSystemVO.getPrdType()) + .andTypeEqualTo(mapSystemVO.getType()); + if (mapSystemDAO.countByExample(mapSystemExample) > 0) { + throw new DBException(ExceptionMapping.DATA_EXISTS); + } + MapSystem mapSystem = new MapSystem(); + mapSystem.setName(mapSystemVO.getName()); + mapSystem.setType(mapSystemVO.getType()); + mapSystem.setMapId(mapSystemVO.getMapId()); + mapSystem.setPrdType(mapSystemVO.getPrdType()); + mapSystem.setCustomized(mapSystemVO.getCustomized()); + mapSystem.setStatus(StatusEnum.Valid.getCode()); + mapSystemDAO.insert(mapSystem); + } + + @Override + public void updateMapSystem(Long id, MapSystemVO mapSystemVO) { + MapSystem mapSystem = mapSystemDAO.selectByPrimaryKey(id); + if (Objects.isNull(mapSystem)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + if (StringUtils.hasText(mapSystemVO.getName()) && !Objects.equals(mapSystem.getName(), mapSystemVO.getName())) { + mapSystem.setName(mapSystemVO.getName()); + mapSystemDAO.updateByPrimaryKey(mapSystem); + } + } + + @Override + public MapSystemVO getMapSystem(Long id) { + MapSystem mapSystem = mapSystemDAO.selectByPrimaryKey(id); + if (Objects.isNull(mapSystem)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + return new MapSystemVO(mapSystem); + } + + /** + * 根据城市code查询课程章节仿真系统树 + * + * @param cityCode + * @return + */ + @Override + public List queryByCityCode(String cityCode) { + // 根据城市名称查询对应的地图 + List mapVOList = iMapService.getUseMapListByCity(cityCode); + if (CollectionUtils.isEmpty(mapVOList)) { + return null; + } + // 过滤项目地图 + mapVOList = mapVOList.stream() + .filter(mapVO -> !mapVO.isProject()) + .collect(Collectors.toList()); + return this.buildMapSystemTree(mapVOList); + } + + @Override + public List queryByProjectCode(Project project) { + // 根据城市名称查询对应的地图 + List mapVOList = iMapService.findOnlineMapByProjectCode(project.name()); + if (CollectionUtils.isEmpty(mapVOList)) { + return null; + } + return this.buildMapSystemTree(mapVOList); + } + + private List buildMapSystemTree(List mapVOList) { + List mapIds = mapVOList.stream().map(MapVO::getId).collect(Collectors.toList()); + MapSystemExample mapSystemExample = new MapSystemExample(); + mapSystemExample.createCriteria().andCustomizedIsNull().andMapIdIn(mapIds); + List mapSystemList = mapSystemDAO.selectByExample(mapSystemExample); + return TreeNode.buildMapAndMapSystemTree(mapVOList, MapSystemVO.convert2VOList(mapSystemList)); + } + + /** + * 根据mapSystem表id查询该产品下 + * + * @param id + * @param userVO + * @return + */ + @Override + public MapSystemDetailVO getMapSystemDetail(Long id, UserVO userVO) { + MapSystem mapSystem = mapSystemDAO.selectByPrimaryKey(id); + if (Objects.isNull(mapSystem)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + MapSystemDetailVO mapSystemDetailVO = new MapSystemDetailVO(mapSystem); + + if (MapSystemType.Simulation.name().equals(mapSystem.getType())) { + List permissionVOList = iUserPermissionService.getSimulationUserPermission(userVO, + mapSystem.getMapId(), mapSystem.getPrdType()); + + mapSystemDetailVO.setPermissionList(permissionVOList); + } else if (MapSystemType.Lesson.name().equals(mapSystem.getType()) + || MapSystemType.Exam.name().equals(mapSystem.getType())) { + + List lessonVOList = null; + //用户存在班级关系时,根据班级课程关系查询课程,目前仅GZB使用 + List studentRelIdClasses = this.iClassStudentUserService.getRelClassByUser(userVO.getId()); + if(!CollectionUtils.isEmpty(studentRelIdClasses)){ + Integer classId = studentRelIdClasses.get(0).getClassId();//学生只关联一个班 + List relLessonsByClass = this.iClassStudentUserService.getRelLessonsByClass(classId); + if(!CollectionUtils.isEmpty(relLessonsByClass)){ + lessonVOList = iLessonService.getByIdsWithPrdType(relLessonsByClass.stream().map(StudentRelLessonClass::getLessonId).collect(Collectors.toList()),mapSystem.getPrdType()); + } + + }else{ + lessonVOList = iLessonService.getByMapIdAndPrdType(mapSystem.getMapId(), mapSystem.getPrdType()); + } + + if (CollectionUtils.isEmpty(lessonVOList)) { + return null; + } + //查询课程关联的班级列表 + lessonVOList.forEach(lessonVO -> { + List classNames = this.iClassStudentUserService.getRelclassByLessonId(lessonVO.getId()); + if(!CollectionUtils.isEmpty(classNames)){ + lessonVO.setClassNames(classNames); + } + }); + mapSystemDetailVO.setLessonList(lessonVOList); + } else if (MapSystemType.Plan.name().equals(mapSystem.getType())) { + List planVOList = iRunPlanDraftService.queryListByMapId(mapSystem.getMapId(), userVO); + mapSystemDetailVO.setPlanList(planVOList); + } + return mapSystemDetailVO; + } + + @Override + public void delete(Long id, UserVO userVO) { + if (!iSysUserService.isAdmin(userVO)) { + throw new BusinessException(ExceptionMapping.ILLEGAL_OPERATION); + } + mapSystemDAO.deleteByPrimaryKey(id); + } + + @Override + @Transactional + public void copyOfMap(Long sourceMapId, Long targetMapId) { + MapSystemExample example = new MapSystemExample(); + example.createCriteria() + .andMapIdEqualTo(sourceMapId); + List systemList = this.mapSystemDAO.selectByExample(example); + if (!CollectionUtils.isEmpty(systemList)) { + systemList.forEach(mapSystem -> { + mapSystem.setId(null); + mapSystem.setMapId(targetMapId); + this.mapSystemDAO.insert(mapSystem); + }); + } + } + + @Override + public List findByMapId(Long mapId) { + MapSystemExample example = new MapSystemExample(); + example.createCriteria().andMapIdEqualTo(mapId); + List mapSystemList = mapSystemDAO.selectByExample(example); + return mapSystemList.stream().map(MapSystemVO::new).collect(Collectors.toList()); + } +} diff --git a/src/main/java/club/joylink/rtss/services/MessagePushService.java b/src/main/java/club/joylink/rtss/services/MessagePushService.java new file mode 100644 index 000000000..30464027f --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/MessagePushService.java @@ -0,0 +1,104 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.simulation.UserSimulationCache; +import club.joylink.rtss.simulation.websocket.entity.SubscribeDestination; +import club.joylink.rtss.vo.client.BaseUserVO; +import club.joylink.rtss.vo.client.SocketMessageVO; +import lombok.extern.slf4j.Slf4j; +import org.springframework.util.StringUtils; +import org.json.JSONObject; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.messaging.simp.SimpMessagingTemplate; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.util.Collection; +import java.util.List; +import java.util.Objects; +import java.util.Set; + +@Service +@Slf4j +public class MessagePushService implements IMessagePushService { + + @Autowired + private UserSimulationCache userSimulationCache; + + @Autowired + private SimpMessagingTemplate simpMessagingTemplate; + + @Override + public boolean push(SocketMessageVO messageVO) { + if (Objects.nonNull(messageVO) && Objects.nonNull(messageVO.getBody())) { + if (!(messageVO.getBody() instanceof Collection) || !CollectionUtils.isEmpty((Collection) messageVO.getBody())) { + Object send = getPayload(messageVO); + boolean push = false; + for (Object topic : messageVO.getTopicList()) { + this.simpMessagingTemplate.convertAndSend((String) topic, send); + log.info("broadcast to destination {} success.",topic); + push = true; + } + return push; + } + } + return false; + } + + private Object getPayload(SocketMessageVO messageVO) { + Object send = messageVO; + if (messageVO.getBody() instanceof String) { + String body = (String) messageVO.getBody(); + if (!body.startsWith("{") && !body.startsWith("[")) { + body = JSONObject.quote(body); + } + send = "{\"type\":\"" + messageVO.getType() + "\",\"body\":" + body + "}"; + } + return send; + } + + @Override + public boolean push(String user, SocketMessageVO messageVO) { + if (Objects.nonNull(messageVO) && Objects.nonNull(messageVO.getBody()) && StringUtils.hasText(user)) { + if (!(messageVO.getBody() instanceof Collection) || !CollectionUtils.isEmpty((Collection) messageVO.getBody())) { + Object send = getPayload(messageVO); + boolean push = false; + for (Object o : messageVO.getTopicList()) { + String topic = (String) o; + Set subDestList = this.userSimulationCache.getSubDestsByUserId(user); + if (!CollectionUtils.isEmpty(subDestList)) { // 用户订阅了topic + for (SubscribeDestination subscribeDestination : subDestList) { + if (subscribeDestination.getDestination().equals(topic)) { + this.simpMessagingTemplate.convertAndSendToUser(user, topic, send); + push = true; + break; + } + } + } else { + push = false; + } + } + return push; + } + } + return false; + } + + @Override + public void push(Collection userList, SocketMessageVO messageVO) { + if (!CollectionUtils.isEmpty(userList)) { + userList.forEach(user -> this.push(user, messageVO)); + } + } + + @Override + public void push2User(BaseUserVO user, SocketMessageVO messageVO) { + this.push(user.getIdStr(), messageVO); + } + + @Override + public void push2User(List userList, SocketMessageVO messageVO) { + if (!CollectionUtils.isEmpty(userList)) { + userList.forEach(userVO -> this.push2User(userVO, messageVO)); + } + } +} diff --git a/src/main/java/club/joylink/rtss/services/OperateService.java b/src/main/java/club/joylink/rtss/services/OperateService.java new file mode 100644 index 000000000..65c3dd3c7 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/OperateService.java @@ -0,0 +1,243 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.dao.OperateDefinitionDAO; +import club.joylink.rtss.dao.OperatePlaceholderDAO; +import club.joylink.rtss.dao.OperateStepDAO; +import club.joylink.rtss.entity.*; +import club.joylink.rtss.vo.client.*; +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; +import org.springframework.util.StringUtils; + +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +@Service +public class OperateService implements IOperateService { + + @Autowired + private OperateDefinitionDAO operateDefinitionDAO; + + @Autowired + private OperateStepDAO operateStepDAO; + + @Autowired + private OperatePlaceholderDAO operatePlaceholderDAO; + + @Override + public void create(OperateDefinitionVO definitionVO) { + OperateDefinition definition = definitionVO.convert2DB(); + this.operateDefinitionDAO.insert(definition); + } + + @Override + public PageVO queryPagedOperateDefinition(OperateDefinitionQueryVO queryVO) { + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + OperateDefinitionExample definitionExample = new OperateDefinitionExample(); + definitionExample.setOrderByClause(" training_type asc, operate_type asc "); + OperateDefinitionExample.Criteria criteria = definitionExample.createCriteria(); + if (Objects.nonNull(queryVO.getMapId())){ + criteria.andMapIdEqualTo(queryVO.getMapId()); + } + if(StringUtils.hasText(queryVO.getTrainingType())) { + criteria.andTrainingTypeEqualTo(queryVO.getTrainingType()); + } + if(StringUtils.hasText(queryVO.getTrainingName())) { + criteria.andTrainingNameLike(String.format("%%%s%%", queryVO.getTrainingName())); + } + Page page = (Page)this.operateDefinitionDAO.selectByExample(definitionExample); + return PageVO.convert(page, OperateDefinitionVO.convert2VOList(page.getResult())); + } + + @Override + public void update(Long id, OperateDefinitionVO definitionVO) { + OperateDefinition definition = definitionVO.convert2DB(); + definition.setId(id); + this.operateDefinitionDAO.updateByPrimaryKey(definition); + } + + @Transactional + @Override + public void delete(Long id) { + OperateStepExample stepExample = new OperateStepExample(); + stepExample.createCriteria().andDefinitionIdEqualTo(id); + List stepList = this.operateStepDAO.selectByExample(stepExample); + stepList.forEach(step -> this.deleteStep(step.getId())); + this.operateDefinitionDAO.deleteByPrimaryKey(id); + } + + @Override + public void createStep(Long definitionId, OperateStepVO stepVO) { + OperateStep step = stepVO.convert2DB(); + step.setDefinitionId(definitionId); + this.operateStepDAO.insert(step); + } + + @Override + public PageVO queryPagedOperateStep(Long definitionId, PageQueryVO queryVO) { + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + OperateStepExample stepExample = new OperateStepExample(); + stepExample.createCriteria().andDefinitionIdEqualTo(definitionId); + Page page = (Page) this.operateStepDAO.selectByExample(stepExample); + return PageVO.convert(page, OperateStepVO.convert2VOList(page.getResult())); + } + + @Override + public void updateStep(Long id, OperateStepVO stepVO) { + OperateStep step = stepVO.convert2DB(); + step.setId(id); + this.operateStepDAO.updateByPrimaryKey(step); + } + + @Override + public void deleteStep(Long id) { + this.operateStepDAO.deleteByPrimaryKey(id); + } + + @Override + public List queryOperateDefinition(Long mapId, String prdType, String operateType) { + List definitionVOList = new ArrayList<>(); + // 查询操作定义 + OperateDefinitionExample definitionExample = new OperateDefinitionExample(); + definitionExample.createCriteria() + .andMapIdEqualTo(mapId) + .andProductTypesLike(String.format("%%%s%%", prdType)) + .andOperateTypeEqualTo(operateType); + List definitionList = this.operateDefinitionDAO.selectByExampleWithBLOBs(definitionExample); + if(!CollectionUtils.isEmpty(definitionList)) { + // 根据实训类型查询操作占位符数据 + List placeholderVOList = this.queryPlaceholder(definitionList.get(0).getTrainingType()); + Map placeholderVOMap = placeholderVOList.stream().collect(Collectors.toMap(OperatePlaceholderVO::getCode, Function.identity())); + definitionList.forEach(definition -> { + OperateDefinitionVO definitionVO = new OperateDefinitionVO(definition); + // 查询操作步骤 + OperateStepExample stepExample = new OperateStepExample(); + stepExample.createCriteria().andDefinitionIdEqualTo(definition.getId()); + List stepList = this.operateStepDAO.selectByExample(stepExample); + definitionVO.setStepVOList(OperateStepVO.convert2VOList(stepList)); + definitionVOList.add(definitionVO); + definitionVO.setPlaceholderVOMap(placeholderVOMap); + }); + } + return definitionVOList; + } + + @Override + public List queryOperateTypes(Long mapId, String productType) { + List tree = new ArrayList<>(); + OperateDefinitionExample definitionExample = new OperateDefinitionExample(); + definitionExample.createCriteria().andMapIdEqualTo(mapId) + .andProductTypesLike(String.format("%%%s%%", productType)); + List definitionList = this.operateDefinitionDAO.selectByExample(definitionExample); + Map> trainingTypeMap = definitionList.stream().collect(Collectors.groupingBy(OperateDefinition::getTrainingType)); + trainingTypeMap.forEach((trainingType, list) -> { + TreeNode trainingTypeNode = TreeNode.buildTrainingTypeNode(trainingType, ""); + tree.add(trainingTypeNode); + Set operateTypeList = list.stream().collect(Collectors.groupingBy(OperateDefinition::getOperateType)).keySet(); + operateTypeList.forEach(operateType -> { + TreeNode operateTypeNode = TreeNode.buildOperateTypeNode(operateType, ""); + trainingTypeNode.addChild(operateTypeNode); + }); + }); + return tree; + } + + @Override + @Transactional + public void generate(Long mapId, List definitionVOList) { + // 删除之前的操作定义 + this.deleteOperateDefinitionOfSkin(mapId); + // 添加新的操作定义 + definitionVOList.forEach(definitionVO -> { + // 保存定义 + OperateDefinition definition = definitionVO.convert2DB(); + this.operateDefinitionDAO.insert(definition); + // 保存步骤 + definitionVO.getStepVOList().forEach(stepVO -> { + OperateStep step = stepVO.convert2DB(); + step.setDefinitionId(definition.getId()); + this.operateStepDAO.insert(step); + }); + }); + } + + @Override + @Transactional + public void saveAs(Long mapId, Long other) { + OperateDefinitionExample example = new OperateDefinitionExample(); + example.createCriteria().andMapIdEqualTo(mapId); + List definitionList = this.operateDefinitionDAO.selectByExample(example); + if(!CollectionUtils.isEmpty(definitionList)) { + // 删除旧的操作定义 + this.deleteOperateDefinitionOfSkin(other); + for (OperateDefinition definition : definitionList) { + OperateDefinition clone = this.cloneDefinition(definition); + clone.setMapId(other); + this.operateDefinitionDAO.insert(clone); + OperateStepExample stepExample = new OperateStepExample(); + stepExample.createCriteria().andDefinitionIdEqualTo(definition.getId()); + List stepList = this.operateStepDAO.selectByExample(stepExample); + if(!CollectionUtils.isEmpty(stepList)) { + for (OperateStep step : stepList) { + OperateStep cloneStep = this.cloneStep(step); + cloneStep.setDefinitionId(clone.getId()); + this.operateStepDAO.insert(cloneStep); + } + } + } + } + } + + private OperateStep cloneStep(OperateStep step) { + OperateStep nstep = new OperateStep(); + nstep.setDefinitionId(step.getDefinitionId()); + nstep.setDeviceType(step.getDeviceType()); + nstep.setOperateCode(step.getOperateCode()); + nstep.setOrderNum(step.getOrderNum()); + nstep.setTip(step.getTip()); + nstep.setVal(step.getVal()); + return nstep; + } + + private OperateDefinition cloneDefinition(OperateDefinition definition) { + OperateDefinition newDefinition = new OperateDefinition(); + newDefinition.setMapId(definition.getMapId()); + newDefinition.setMaxDuration(definition.getMaxDuration()); + newDefinition.setMinDuration(definition.getMinDuration()); + newDefinition.setOperateType(definition.getOperateType()); + newDefinition.setProductTypes(definition.getProductTypes()); + newDefinition.setTrainingName(definition.getTrainingName()); + newDefinition.setTrainingRemark(definition.getTrainingRemark()); + newDefinition.setTrainingType(definition.getTrainingType()); + return newDefinition; + } + + @Transactional + public void deleteOperateDefinitionOfSkin(Long mapId) { + OperateDefinitionExample definitionExample = new OperateDefinitionExample(); + definitionExample.createCriteria().andMapIdEqualTo(mapId); + List definitionList = this.operateDefinitionDAO.selectByExample(definitionExample); + definitionList.forEach(definition -> { + OperateStepExample stepExample = new OperateStepExample(); + stepExample.createCriteria().andDefinitionIdEqualTo(definition.getId()); + this.operateStepDAO.deleteByExample(stepExample); + this.operateDefinitionDAO.deleteByPrimaryKey(definition.getId()); + }); + } + + @Override + public List queryPlaceholder(String trainingType) { + OperatePlaceholderExample example = new OperatePlaceholderExample(); + OperatePlaceholderExample.Criteria criteria = example.createCriteria(); + if(StringUtils.hasText(trainingType)) { + criteria.andTrainingTypeEqualTo(trainingType); + } + List operatePlaceholderList = this.operatePlaceholderDAO.selectByExample(example); + return OperatePlaceholderVO.convert2VOList(operatePlaceholderList); + } +} diff --git a/src/main/java/club/joylink/rtss/services/OrderNoGenerator.java b/src/main/java/club/joylink/rtss/services/OrderNoGenerator.java new file mode 100644 index 000000000..5d1a54f09 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/OrderNoGenerator.java @@ -0,0 +1,68 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.dao.SaleOrderSerialNumDAO; +import club.joylink.rtss.entity.SaleOrderSerialNum; +import club.joylink.rtss.entity.SaleOrderSerialNumExample; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.text.SimpleDateFormat; +import java.time.LocalDate; +import java.util.Date; +import java.util.List; + +@Service +public class OrderNoGenerator implements IOrderNoGenerator { + + @Autowired + private SaleOrderSerialNumDAO saleOrderSerialNumDAO; + + private SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); + + private static final int SerialNumLen = 5; + + private final Object lock = new Object(); + + @Override + public String next() { + StringBuffer sb = new StringBuffer(); + sb.append(sdf.format(new Date())); + sb.append(this.getNextSerialNumber(SerialNumLen)); + return sb.toString(); + } + + /** + * 获取几位的流水号 + * @param length - 位数 + * @return + */ + public String getNextSerialNumber(int length) { + synchronized (lock) { + SaleOrderSerialNumExample example = new SaleOrderSerialNumExample(); + example.createCriteria().andDateEqualTo(LocalDate.now()); + List list = this.saleOrderSerialNumDAO.selectByExample(example); + Integer serialNum = null; + if(!CollectionUtils.isEmpty(list)) { + SaleOrderSerialNum osn = list.get(0); + osn.setNo(osn.getNo()+1); + this.saleOrderSerialNumDAO.updateByPrimaryKey(osn); + serialNum = osn.getNo(); + } else { + serialNum = 1; + SaleOrderSerialNum dbSn = new SaleOrderSerialNum(); + dbSn.setDate(LocalDate.now()); + dbSn.setNo(serialNum); + this.saleOrderSerialNumDAO.insert(dbSn); + } + String sn = String.valueOf(serialNum); + StringBuffer sb = new StringBuffer(); + for(int i=sn.length(); i queryPagedOrders(OrderQueryVO queryVO) { + return queryPagedOrders(queryVO, null); + } + + @Override + public PageVO queryPagedOrders(OrderQueryVO queryVO, UserVO user) { + SaleOrderExample example = new SaleOrderExample(); + example.setOrderByClause("id desc"); + SaleOrderExample.Criteria criteria = example.createCriteria(); + if (user == null) { + if (queryVO.getOrganizationId() != null) { + criteria.andOrganizationIdEqualTo(queryVO.getOrganizationId()); + } + if (StringUtils.hasText(queryVO.getUserName())) { + List voList = iSysUserService.findUserByName(queryVO.getUserName()); + List userIds = voList.stream().map(UserVO::getId).collect(Collectors.toList()); + if (!userIds.isEmpty()) { + criteria.andCreatorIdIn(userIds); + } else { + criteria.andCreatorIdEqualTo(-1L); + } + } + } else { + criteria.andSellerIdEqualTo(user.getId()); + } + + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + List saleOrderList = saleOrderDAO.selectByExample(example); + Page page = (Page) saleOrderList; + List orderVOList = new ArrayList<>(); + for (SaleOrder saleOrder : page.getResult()) { + OrderVO orderVO = new OrderVO(saleOrder); + if (saleOrder.getOrganizationId() != null) { + orderVO.setOrganizationName(iOrganizationService.getById(saleOrder.getOrganizationId()).getName()); + } else { + UserVO vo = iSysUserService.getUserById(saleOrder.getCreatorId()); + orderVO.setUserName(vo.getName()); + orderVO.setUserMobile(vo.getMobile()); + } + List voList = this.findOrderDetailVOListByOrderId(saleOrder.getId()); + orderVO.setAmount(voList.stream().mapToInt(vo -> vo.getGoodsAmount()).sum()); + orderVO.setForever(voList.get(0).getForever()); + orderVO.setStartTime(voList.get(0).getStartTime()); + orderVO.setMonthAmount(voList.get(0).getMonthAmount()); + orderVOList.add(orderVO); + } + return PageVO.convert(page, orderVOList); + } + + /** + * 创建订单 + * + * @param createVO + * @param user + */ + @Override + @Transactional + public String createOrder(OrderCreateVO createVO, UserVO user) { + if (valid(createVO)) { + return create(createVO, user); + } + return null; + } + + private String create(OrderCreateVO createVO, UserVO user) { + //新增订单 + SaleOrder saleOrder = createVO.convert2DB(); + saleOrder.setCode(iOrderNoGenerator.next()); + saleOrder.setStatus(BusinessConsts.STATUS_USE); + saleOrder.setCreatorId(user.getId()); + saleOrder.setCreateTime(LocalDateTime.now()); + saleOrder.setQrCodeGenerated(false); + try { + saleOrderDAO.insertSelective(saleOrder); + } catch (DuplicateKeyException e) { + throw BusinessExceptionAssertEnum.DATA_UNIQUE_PROPERTY_REPEAT.exception("订单编号重复"); + } + Long orderId = saleOrder.getId(); + + //新增订单明细 + createVO.getDetailCreateVOList().forEach(detailCreateVO -> { + SaleOrderDetail detail = detailCreateVO.convert2DB(); + detail.setOrderId(orderId); + detail.setForever(createVO.getForever()); + detail.setMonthAmount(createVO.getMonthAmount()); + detail.setStartTime(createVO.getStartTime()); + detail.setPrice((long) (iGoodsService.getById(detail.getGoodsId()).getPrice() * 100)); + saleOrderDetailDAO.insertSelective(detail); + }); + return saleOrder.getCode(); + } + + private boolean valid(OrderCreateVO createVO) { + SaleOrderTypeEnum type = SaleOrderTypeEnum.getSaleOrderTypeByCode(createVO.getOrderType()); + switch (type) { + case Business_Contract: + Objects.requireNonNull(createVO.getOrganizationId()); + Objects.requireNonNull(createVO.getContractNo()); + Objects.requireNonNull(createVO.getSellerId()); + BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(iOrganizationService.isExist(createVO.getOrganizationId()), + "没有该组织机构/企业"); + BusinessExceptionAssertEnum.DATA_ALREADY_EXIST.assertNotNull(isContractNoExist(createVO.getContractNo()), + String.format("合同编号为[%s]的订单已存在", createVO.getContractNo())); + break; + case Contract_Gift: + Objects.requireNonNull(createVO.getOrganizationId()); + break; + } + //公共校验 + BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertCollectionNotEmpty(createVO.getDetailCreateVOList(), + "订单明细列表不能为空"); + if (!createVO.getForever()) { + BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertNotNull(createVO.getStartTime(), + "非永久的权限必须有开始时间"); + BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue( + createVO.getMonthAmount() != null && createVO.getMonthAmount() > 0, + "非永久的权限月数必须大于0"); + } + + List detailCreateVOList = createVO.getDetailCreateVOList(); + for (OrderDetailCreateVO detailVO : detailCreateVOList) { + BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(iGoodsService.isExist(detailVO.getGoodsId()), + String.format("id为[%s]的商品不存在", detailVO.getGoodsId())); + BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue( + detailVO.getGoodsAmount() != null && detailVO.getGoodsAmount() > 0, + "商品数量至少为1"); + } + return true; + } + + /** + * 更新订单。 + * 如果要更新的订单不存在,报DBException(订单不存在) + * + * @param orderVO + * @param userVO + */ + @Override + public void update(OrderVO orderVO, UserVO userVO) { + BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(isExist(orderVO.getId()), + String.format("id为[%s]的订单不存在", orderVO.getId())); + SaleOrder saleOrder = orderVO.convert2DB(); + saleOrder.setUpdateUserId(userVO.getId()); + saleOrder.setUpdateTime(LocalDateTime.now()); + saleOrderDAO.updateByPrimaryKeySelective(saleOrder); + } + + @Override + public List getOrderDetail(Long id) { + List detailVOList = findOrderDetailVOListByOrderId(id); + for (OrderDetailVO detailVO : detailVOList) { + detailVO.setGoodsName(iGoodsService.getById(detailVO.getGoodsId()).getName()); + } + return detailVOList; + } + + @Override + public Float compute(Long goodsId, Integer goodsAmount, Integer monthAmount) { + return null; + } + + @Override + public OrderCreateVO submit(OrderCreateVO orderCreateVO, UserVO user) { + return null; + } + + @Override + public String pay(long id, String payType) { + return null; + } + + @Override + public void cancelPay(Long id, UserVO user) { + + } + + public boolean isExist(Long id) { + if (saleOrderDAO.selectByPrimaryKey(id) == null) { + return false; + } + return true; + } + + public SaleOrder getById(Long id) { + SaleOrder saleOrder = saleOrderDAO.selectByPrimaryKey(id); + BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertNotNull(saleOrder); + return saleOrder; + } + + public boolean isContractNoExist(String contractNo) { + SaleOrderExample example = new SaleOrderExample(); + example.createCriteria().andContractNoEqualTo(contractNo); + if (saleOrderDAO.countByExample(example) == 0) { + return false; + } + return true; + } + + public SaleOrder findById(Long id) { + return saleOrderDAO.selectByPrimaryKey(id); + } + + public OrderVO findByCode(String code) { + SaleOrderExample example = new SaleOrderExample(); + example.createCriteria() + .andCodeEqualTo(code); + List saleOrderList = saleOrderDAO.selectByExample(example); + if (saleOrderList.isEmpty()) { + return null; + } + return new OrderVO(saleOrderList.get(0)); + } + + @Override + public List findOrderDetailVOListByOrderId(Long orderId) { + SaleOrderDetailExample example = new SaleOrderDetailExample(); + example.createCriteria().andOrderIdEqualTo(orderId); + List orderDetailList = saleOrderDetailDAO.selectByExample(example); + return orderDetailList.stream().map(saleOrderDetail -> new OrderDetailVO(saleOrderDetail)).collect(Collectors.toList()); + } +} diff --git a/src/main/java/club/joylink/rtss/services/OrganizationService.java b/src/main/java/club/joylink/rtss/services/OrganizationService.java new file mode 100644 index 000000000..001d5db62 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/OrganizationService.java @@ -0,0 +1,60 @@ +package club.joylink.rtss.services; + +import com.joylink.base.exception.DBException; +import com.joylink.base.exception.constant.ExceptionMapping; +import club.joylink.rtss.dao.OrganizationDAO; +import club.joylink.rtss.entity.Organization; +import club.joylink.rtss.entity.OrganizationExample; +import club.joylink.rtss.vo.client.OrganizationVO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class OrganizationService implements IOrganizationService { + + @Autowired + private OrganizationDAO organizationDAO; + + @Override + public List queryOrganization() { + OrganizationExample example = new OrganizationExample(); + List organizations = this.organizationDAO.selectByExample(example); + return new OrganizationVO().convert2VOList(organizations); + } + + @Override + public OrganizationVO create(OrganizationVO organization) { + Organization org = organization.toDB(); + this.organizationDAO.insert(org); + return new OrganizationVO(org); + } + + @Override + public OrganizationVO queryOrganizationById(Long id) { + Organization organization = this.organizationDAO.selectByPrimaryKey(id); + if(null == organization) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + return new OrganizationVO(organization); + } + + @Override + public OrganizationVO getById(Long id) { + Organization organization = organizationDAO.selectByPrimaryKey(id); + if (organization == null) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST, String.format("id为[%s]的组织/机构不存在", id)); + } + return new OrganizationVO(organization); + } + + @Override + public boolean isExist(Long id) { + if (organizationDAO.selectByPrimaryKey(id) == null) { + return false; + } + return true; + } + +} diff --git a/src/main/java/club/joylink/rtss/services/PermissionDistributeService.java b/src/main/java/club/joylink/rtss/services/PermissionDistributeService.java new file mode 100644 index 000000000..50c5acd7c --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/PermissionDistributeService.java @@ -0,0 +1,732 @@ +package club.joylink.rtss.services; + +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import com.joylink.base.exception.BusinessException; +import com.joylink.base.exception.DBException; +import com.joylink.base.exception.constant.ExceptionMapping; +import club.joylink.rtss.configuration.configProp.OtherConfig; +import club.joylink.rtss.configuration.configProp.WeChatConfig; +import club.joylink.rtss.constants.PermissionDistributeSourceEnum; +import club.joylink.rtss.constants.StatusEnum; +import club.joylink.rtss.constants.SystemEnv; +import club.joylink.rtss.dao.PermissionDistributeDAO; +import club.joylink.rtss.dao.UserPermissionDAO; +import club.joylink.rtss.entity.*; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.order.OrderCreateVO; +import club.joylink.rtss.vo.client.order.OrderDetailVO; +import club.joylink.rtss.vo.client.order.OrderVO; +import club.joylink.rtss.vo.client.permission.DistributeSelectVO; +import club.joylink.rtss.vo.client.permission.PermissionVO; +import club.joylink.rtss.vo.client.permissionDistribute.DistributeVO; +import club.joylink.rtss.vo.client.permissionDistribute.PermissionDistributeQueryVO; +import club.joylink.rtss.vo.client.userPermission.UserPermissionAndAmountVO; +import club.joylink.rtss.vo.client.userPermission.UserPermissionDistributeVO; +import club.joylink.rtss.vo.client.userPermission.UserPermissionVO; +import club.joylink.rtss.vo.client.validGroup.ValidList; +import club.joylink.rtss.vo.user.PermissionGenerateConfigVO; +import lombok.extern.slf4j.Slf4j; +import org.springframework.util.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +@Slf4j +@Service +public class PermissionDistributeService implements IPermissionDistributeService { + @Autowired + private IGoodsService iGoodsService; + + @Autowired + private PermissionDistributeDAO permissionDistributeDAO; + + @Autowired + private IOrganizationService iOrganizationService; + + @Autowired + private IPermissionService iPermissionService; + + @Autowired + private ISysUserService iSysUserService; + + @Autowired + private OtherConfig otherConfig; + + @Autowired + private WeChatConfig weChatConfig; + + @Autowired + private IOrderService iOrderService; + + @Autowired + private IUserPermissionService iUserPermissionService; + + @Autowired + private IAuthenticateService iAuthenticateService; + + @Autowired + private UserPermissionDAO userPermissionDAO; + + @Autowired + private IMapService iMapService; + + @Override + public PageVO queryPagedDistribute(PermissionDistributeQueryVO queryVO) { + //原 + PermissionDistributeExample example = new PermissionDistributeExample(); + example.setOrderByClause("id desc"); + PermissionDistributeExample.Criteria criteria = example.createCriteria() + .andParentIdEqualTo(0L); + if (StringUtils.hasText(queryVO.getStatus())) { + criteria.andStatusEqualTo(queryVO.getStatus()); + } + if (queryVO.getCanDistribute() != null) { + criteria.andCanDistributeEqualTo(queryVO.getCanDistribute()); + } + if (queryVO.getMapId() != null) { + PermissionExample permissionExample = new PermissionExample(); + permissionExample.createCriteria() + .andMapIdEqualTo(queryVO.getMapId()); + List voList = iPermissionService.findByMapId(queryVO.getMapId()); + List permissionIds = voList.stream().map(PermissionVO::getId).collect(Collectors.toList()); + criteria.andPermissionIdIn(permissionIds); + } + + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + Page page = (Page) permissionDistributeDAO.selectByExample(example); + List distributeListVOList = new ArrayList<>(); + for (PermissionDistribute permissionDistribute : page.getResult()) { + DistributeVO vo = new DistributeVO(permissionDistribute); + if (permissionDistribute.getOrganizationId() != null) { + vo.setOrganizationName(iOrganizationService.getById(permissionDistribute.getOrganizationId()).getName()); + } + PermissionVO permission; + if (permissionDistribute.getPermissionId() != null) { + permission = iPermissionService.findById(permissionDistribute.getPermissionId()); + if (permission == null) { + vo.setPermissionName(String.format("id为[%s]的权限不存在", permissionDistribute.getPermissionId())); + } else { + vo.setPermissionName(permission.getName()); + } + } + if (permissionDistribute.getUserId() != null) { + UserVO userVO = iSysUserService.getUserById(permissionDistribute.getUserId()); + vo.setUserName(userVO.getName()); + vo.setUserNickname(userVO.getNickname()); + } + distributeListVOList.add(vo); + } + + return PageVO.convert(page, distributeListVOList); + } + + /** + * 生成二维码 + * + * @param id 权限分发id + * @return + */ + @Override + public String generateQrCode(Long id) { + Objects.requireNonNull(id); +// if(SystemEnv.isPrdEnv(this.otherConfig.getEnv())) { +// return this.weChatConfig.getWxApiUrl(WxConstants.WxApi.DISTRIBUTE, id+""); +// } + String envId = SystemEnv.getSystemEnvIdByName(this.otherConfig.getEnv()); + String state = envId + "_" + id; + return this.weChatConfig.getPermissionDistributeUrl(state); + } + + /** + * 使权限分发立即失效。 + * 如果权限分发不存在,报DBException(数据不存在) + * + * @param id + */ + @Override + public void immediateInvalid(Long id) { + PermissionDistribute permissionDistribute = getEntityById(id); + permissionDistribute.setStatus(StatusEnum.Invalid.getCode()); + permissionDistributeDAO.updateByPrimaryKeySelective(permissionDistribute); + } + + @Override + public String packageDistribute(ValidList ids, UserVO user) { + return null; + } + + /** + * 从订单创建权限分发。 + * 如果没有这个订单,报BusinessException(订单不存在) + * + * @param orderCode + * @param user + * @return + */ + @Override + @Transactional + public String distributeFromOrder(String orderCode, UserVO user) { + //校验 + OrderVO order = iOrderService.findByCode(orderCode); + if (order == null) { + throw new BusinessException(ExceptionMapping.ORDER_NOT_EXIST); + } + + Long permissionDistributeId; + if (order.getQrCodeGenerated()) { + PermissionDistributeExample distributeExample = new PermissionDistributeExample(); + distributeExample.createCriteria() + .andOrderCodeEqualTo(order.getCode()); + permissionDistributeId = permissionDistributeDAO.selectByExample(distributeExample).get(0).getId(); + return generateQrCode(permissionDistributeId); + } + + //获取订单明细列表 + order.setDetailVOList(iOrderService.findOrderDetailVOListByOrderId(order.getId())); + + //如果订单有多个商品,创建权限分发包 + if (order.getDetailVOList().size() > 1) { + //添加权限分发包 + PermissionDistribute distribute = buildPermissionDistributeFromOrder(order); + int amount = order.getDetailVOList().stream().mapToInt(OrderDetailVO::getGoodsAmount).sum(); + distribute.setAmount(amount); + distribute.setRemains(amount); + distribute.setIsPackage(true); + permissionDistributeDAO.insertSelective(distribute); + permissionDistributeId = distribute.getId(); + + //添加权限分发包关联的基础权限 + distribute.setIsPackage(false); + distribute.setParentId(permissionDistributeId); + for (OrderDetailVO orderDetailVO : order.getDetailVOList()) { + distribute.setId(null); + distribute.setPermissionId(iGoodsService.getById(orderDetailVO.getGoodsId()).getPermissionId()); + distribute.setAmount(orderDetailVO.getGoodsAmount()); + distribute.setRemains(distribute.getAmount()); + permissionDistributeDAO.insertSelective(distribute); + } + + } else { //如果只有一个商品,创建权限分发 + PermissionDistribute distribute = buildPermissionDistributeFromOrder(order); + OrderDetailVO orderDetailVO = order.getDetailVOList().get(0); + distribute.setPermissionId(iGoodsService.getById(orderDetailVO.getGoodsId()).getPermissionId()); + distribute.setAmount(orderDetailVO.getGoodsAmount()); + distribute.setRemains(distribute.getAmount()); + distribute.setIsPackage(false); + permissionDistributeDAO.insertSelective(distribute); + permissionDistributeId = distribute.getId(); + } + + //更新订单状态 + order.setQrCodeGenerated(true); + iOrderService.update(order, user); + + return generateQrCode(permissionDistributeId); + } + + /** + * 领取权限。 + * 如果权限分发不存在,报DBException(数据不存在) + * + * @param state 权限分发id + * @param user 要获取权限的用户 + */ + @Override + @Transactional + public void getUserPermission(Long state, UserVO user) { + PermissionDistribute distribute = getEntityById(state); + canReceiveValid(distribute, user); + if (distribute.getIsPackage()) { + List permissionDistributeList = getEntityByParentId(distribute.getId()); + if (distribute.getCanDistribute()) { + for (PermissionDistribute permissionDistribute : permissionDistributeList) { + iUserPermissionService.createUserPermissionFromPermissionDistribute(permissionDistribute, user); + permissionDistribute.setRemains(0); + permissionDistributeDAO.updateByPrimaryKeySelective(permissionDistribute); + } + distribute.setRemains(0); + } else { + if (distribute.getOnlyGetOne()) { + for (PermissionDistribute permissionDistribute : permissionDistributeList) { + if (permissionDistribute.getRemains() > 0) { + iUserPermissionService.createUserPermissionFromPermissionDistribute(permissionDistribute, user); + permissionDistribute.setRemains(permissionDistribute.getRemains() - 1); + permissionDistributeDAO.updateByPrimaryKeySelective(permissionDistribute); + break; + } + } + distribute.setRemains(distribute.getRemains() - 1); + } else { + for (PermissionDistribute permissionDistribute : permissionDistributeList) { + if (permissionDistribute.getRemains() > 0) { + iUserPermissionService.createUserPermissionFromPermissionDistribute(permissionDistribute, user); + permissionDistribute.setRemains(permissionDistribute.getRemains() - 1); + distribute.setRemains(distribute.getRemains() - 1); + permissionDistributeDAO.updateByPrimaryKeySelective(permissionDistribute); + } + } + } + } + } else { + if (distribute.getCanDistribute()) { + iUserPermissionService.createUserPermissionFromPermissionDistribute(distribute, user); + distribute.setRemains(0); + } else { + iUserPermissionService.createUserPermissionFromPermissionDistribute(distribute, user); + distribute.setRemains(distribute.getRemains() - 1); + } + } + permissionDistributeDAO.updateByPrimaryKeySelective(distribute); + } + + @Override + @Transactional + public String createQuickly(OrderCreateVO orderCreateVO, UserVO userVO) { + String orderCode = iOrderService.createOrder(orderCreateVO, userVO); + return distributeFromOrder(orderCode, userVO); + } + + /** + * 微信扫码获取权限 + * + * @param code 用户编码 + * @param id 权限分发id + * @return + */ + @Override + @Transactional + public List wmGetPermission(String code, Long id) { + UserVO userVO = this.iAuthenticateService.getOrCreateUserByWmcode(code); + this.getUserPermission(id, userVO); + List voList = iUserPermissionService.findValidByUserIdAndDistributeId(userVO.getId(), id); + return voList; + } + + /** + * 从用户权限创建权限分发 + * + * @param updVO + * @param user + * @return 权限分发的二维码 + */ + @Override + @Transactional + public String distributeFromUserPermission(UserPermissionDistributeVO updVO, UserVO user) { + List userPermissionAndAmountVOList = updVO.getUserPermissionAndAmountVOList(); + PermissionDistribute distribute = buildPermissionDistributeFromUserPermission(updVO, user); + + //将amount为0的UserPermissionAndAmountVO去掉 + List removeList = new ArrayList<>(); + for (UserPermissionAndAmountVO upaaVO : userPermissionAndAmountVOList) { + if (upaaVO.getAmount() == 0) { + removeList.add(upaaVO); + } + } + userPermissionAndAmountVOList.removeAll(removeList); + + Long distributeId; + if (userPermissionAndAmountVOList.size() == 1) { + distribute.setIsPackage(false); + UserPermissionAndAmountVO upaaVO = userPermissionAndAmountVOList.get(0); + distribute.setPermissionId(iUserPermissionService.getById(upaaVO.getUserPermissionId()).getPermissionId()); + distribute.setAmount(upaaVO.getAmount()); + distribute.setRemains(upaaVO.getAmount()); + distribute.setFromUserPermissionId(upaaVO.getUserPermissionId()); + permissionDistributeDAO.insertSelective(distribute); + UserPermission userPermission = new UserPermission(); + userPermission.setId(upaaVO.getUserPermissionId()); + userPermission.setRemains(iUserPermissionService.getById(upaaVO.getUserPermissionId()).getRemains() - upaaVO.getAmount()); + iUserPermissionService.updateById(new UserPermissionVO(userPermission)); + distributeId = distribute.getId(); + } else { + distribute.setIsPackage(true); + distribute.setAmount(userPermissionAndAmountVOList.stream().mapToInt(UserPermissionAndAmountVO::getAmount).sum()); + distribute.setRemains(distribute.getAmount()); + permissionDistributeDAO.insertSelective(distribute); + distributeId = distribute.getId(); + for (UserPermissionAndAmountVO upaaVO : userPermissionAndAmountVOList) { + distribute.setId(null); + distribute.setIsPackage(false); + distribute.setParentId(distributeId); + distribute.setPermissionId(iUserPermissionService.getById(upaaVO.getUserPermissionId()).getPermissionId()); + distribute.setFromUserPermissionId(upaaVO.getUserPermissionId()); + distribute.setAmount(upaaVO.getAmount()); + distribute.setRemains(upaaVO.getAmount()); + permissionDistributeDAO.insertSelective(distribute); + UserPermission userPermission = new UserPermission(); + userPermission.setId(upaaVO.getUserPermissionId()); + userPermission.setRemains(iUserPermissionService.getById(upaaVO.getUserPermissionId()).getRemains() - upaaVO.getAmount()); + iUserPermissionService.updateById(new UserPermissionVO(userPermission)); + } + } + return generateQrCode(distributeId); + } + + private PermissionDistribute getEntityById(Long id) { + PermissionDistribute distribute = permissionDistributeDAO.selectByPrimaryKey(id); + if (distribute == null) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST, String.format("id为[%s]的权限分发不存在", id)); + } + return distribute; + } + + /** + * 将权限分发中的所有权限全部回收到用户权限 + */ + @Transactional + @Override + public void restoreDistributeToUserPermission(Long id) { + //校验 + PermissionDistribute distribute = getEntityById(id); + if (StatusEnum.Invalid.getCode().equals(distribute.getStatus())) { + throw new BusinessException(ExceptionMapping.ILLEGAL_OPERATION, "该权限分发已失效"); + } + if (!PermissionDistributeSourceEnum.FromUser.getCode().equals(distribute.getSource())) { + throw new BusinessException(ExceptionMapping.ILLEGAL_OPERATION, "从用户权限创建的权限分发才可以回收"); + } + + //先让这个权限分发本身失效 + distribute.setStatus(StatusEnum.Invalid.getCode()); + permissionDistributeDAO.updateByPrimaryKeySelective(distribute); + //如果这个权限分发是个分发包,让从子分发获得的用户权限和分发本身失效 + if (distribute.getIsPackage()) { + List distributeList = getEntityByParentId(distribute.getId()); + distributeList.forEach(dis -> { + iUserPermissionService.invalidateUserPermissionByDistributeId(dis.getId()); + dis.setStatus(StatusEnum.Invalid.getCode()); + permissionDistributeDAO.updateByPrimaryKeySelective(dis); + iUserPermissionService.restoreUserPermissionQuantity(dis.getFromUserPermissionId(), dis.getAmount()); + }); + } else { + iUserPermissionService.invalidateUserPermissionByDistributeId(distribute.getId()); + iUserPermissionService.restoreUserPermissionQuantity(distribute.getFromUserPermissionId(), distribute.getAmount()); + } + } + + @Transactional + @Override + public void systemRevokePermissionDistribute(Long id) { + //校验 + PermissionDistribute distribute = getEntityById(id); + if (StatusEnum.Invalid.getCode().equals(distribute.getStatus())) { + return; + } + + //先让这个权限分发本身失效 + distribute.setStatus(StatusEnum.Invalid.getCode()); + permissionDistributeDAO.updateByPrimaryKeySelective(distribute); + //如果这个权限分发是个分发包,让从子分发获得的用户权限和分发本身失效 + if (distribute.getIsPackage()) { + List distributeList = getEntityByParentId(distribute.getId()); + distributeList.forEach(dis -> { + iUserPermissionService.invalidateUserPermissionByDistributeId(dis.getId()); + dis.setStatus(StatusEnum.Invalid.getCode()); + permissionDistributeDAO.updateByPrimaryKeySelective(dis); + if (dis.getFromUserPermissionId() != null) { + iUserPermissionService.restoreUserPermissionQuantity(dis.getFromUserPermissionId(), dis.getAmount()); + } + }); + } else { + iUserPermissionService.invalidateUserPermissionByDistributeId(distribute.getId()); + if (distribute.getFromUserPermissionId() != null) { + iUserPermissionService.restoreUserPermissionQuantity(distribute.getFromUserPermissionId(), distribute.getAmount()); + } + } + } + + @Override + public boolean isExist(Long id) { + if (permissionDistributeDAO.selectByPrimaryKey(id) == null) { + return false; + } + return true; + } + + @Override + public DistributeVO getById(Long id) { + PermissionDistribute distribute = permissionDistributeDAO.selectByPrimaryKey(id); + if (distribute == null) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + return new DistributeVO(distribute); + } + + private PermissionDistribute buildPermissionDistributeFromUserPermission(UserPermissionDistributeVO updVO, UserVO userVO) { + PermissionDistribute distribute = new PermissionDistribute(); + distribute.setUserId(userVO.getId()); + distribute.setForever(false); + distribute.setStartTime(updVO.getStartTime()); + distribute.setEndTime(updVO.getEndTime()); + distribute.setStatus(StatusEnum.Valid.getCode()); + distribute.setCanDistribute(updVO.getDistribute()); + distribute.setSource(PermissionDistributeSourceEnum.FromUser.getCode()); + distribute.setOnlyGetOne(!updVO.getDistribute()); + return distribute; + } + + /** + * 从订单构建一个权限分发,这个权限分发对权限分发包与基础权限分发的公共属性进行了赋值 + * + * @param orderVO + * @return + */ + private PermissionDistribute buildPermissionDistributeFromOrder(OrderVO orderVO) { + //参数校验 + Objects.requireNonNull(orderVO, "order不能为null"); + if (CollectionUtils.isEmpty(orderVO.getDetailVOList())) { + throw new RuntimeException("订单明细列表不能为空"); + } + //构建PermissionDistribute + PermissionDistribute distribute = new PermissionDistribute(); + distribute.setOrderCode(orderVO.getCode()); + distribute.setOrganizationId(orderVO.getOrganizationId()); + List detailVOList = orderVO.getDetailVOList(); + OrderDetailVO orderDetailVO = detailVOList.get(0); + distribute.setForever(orderDetailVO.getForever()); + distribute.setStartTime(orderDetailVO.getStartTime()); + if (!distribute.getForever()) { + distribute.setEndTime(orderDetailVO.getStartTime().plusMonths(orderDetailVO.getMonthAmount())); + } + distribute.setStatus(StatusEnum.Valid.getCode()); + distribute.setCanDistribute(true); + distribute.setSource(PermissionDistributeSourceEnum.FromOrder.getCode()); + return distribute; + } + + /** + * 确认权限分发可以被领取 + * + * @param distribute + * @param userVO + */ + private void canReceiveValid(PermissionDistribute distribute, UserVO userVO) { + //如果权限分发失效 + if (distribute.getStatus().equals(StatusEnum.Invalid.getCode())) { + throw new BusinessException(ExceptionMapping.PERMISSION_DISTRIBUTE_EXPIRE, "权限分发已经失效"); + } + //如果权限已被领取完 + if (distribute.getRemains() <= 0) { + throw new BusinessException(ExceptionMapping.PERMISSION_DISTRIBUTE_FINISHED, "权限分发已被领取完"); + } + //如果该用户已经领取过 + if (distribute.getIsPackage()) { + List relDistributeList = getEntityByParentId(distribute.getId()); + for (PermissionDistribute relDistribute : relDistributeList) { + UserPermissionExample example = new UserPermissionExample(); + example.createCriteria() + .andUserIdEqualTo(userVO.getId()) + .andDistributeIdEqualTo(relDistribute.getId()) + .andStatusEqualTo(StatusEnum.Valid.getCode()); + if (userPermissionDAO.countByExample(example) != 0) { + throw new BusinessException(ExceptionMapping.PERMISSION_DISTRIBUTE_ALREADY_GET, "已经领取过,不能重复领取"); + } + } + } else { + UserPermissionExample example = new UserPermissionExample(); + example.createCriteria() + .andUserIdEqualTo(userVO.getId()) + .andDistributeIdEqualTo(distribute.getId()) + .andStatusEqualTo(StatusEnum.Valid.getCode()); + if (userPermissionDAO.countByExample(example) != 0) { + throw new BusinessException(ExceptionMapping.PERMISSION_DISTRIBUTE_ALREADY_GET, "已经领取过,不能重复领取"); + } + + } + } + + /** + * 通过parentId获取权限分发包关联的基础权限分发 + * + * @param parentId 权限分发包的id + * @return + */ + public List getByParentId(Long parentId) { + List distributeList = getEntityByParentId(parentId); + List voList = distributeList.stream().map(distribute -> new DistributeVO(distribute)).collect(Collectors.toList()); + return voList; + } + + @Override + public List queryPersonalDistributeList(UserVO user) { + PermissionDistributeExample example = new PermissionDistributeExample(); + example.createCriteria() + .andUserIdEqualTo(user.getId()) + .andOrderCodeIsNull() + .andParentIdEqualTo(0L) + .andStatusEqualTo(StatusEnum.Valid.getCode()); + List list = this.permissionDistributeDAO.selectByExample(example); + List voList = list.stream().map(distribute -> { + DistributeVO vo = new DistributeVO(distribute); + PermissionVO permissionVO; + if (vo.getIsPackage()) { + List distributeList = getEntityByParentId(vo.getId()); + permissionVO = iPermissionService.getById(distributeList.get(0).getPermissionId()); + } else { + permissionVO = iPermissionService.getById(distribute.getPermissionId()); + } + vo.setPermissionName(permissionVO.getName()); + vo.setMapName(iMapService.getMapInfoById(permissionVO.getMapId()).getName()); + return vo; + }).collect(Collectors.toList()); + return voList; + } + + @Override + public List queryUserPermissionsOfDistribute(Long distributeId) { + List voList = new ArrayList<>(); + PermissionDistribute distribute = this.getEntityById(distributeId); + if (distribute.getIsPackage()) { + List distributeList = this.getEntityByParentId(distributeId); + distributeList.forEach(sub -> { + voList.addAll(this.iUserPermissionService.queryByDistribute(sub.getId())); + }); + } else { + voList.addAll(this.iUserPermissionService.queryByDistribute(distributeId)); + } + return voList; + } + + private List getEntityByParentId(Long parentId) { + PermissionDistributeExample example = new PermissionDistributeExample(); + example.createCriteria().andParentIdEqualTo(parentId); + List distributeList = permissionDistributeDAO.selectByExample(example); + if (CollectionUtils.isEmpty(distributeList)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST, String.format("parentId为[%s]的权限分发不存在", parentId)); + } + return distributeList; + } + + @Override + public void handleOldDataColumnPackage() { + + } + + @Override + public String transferPermission(DistributeSelectVO distributeSelectVO, UserVO user) { + return null; + } + + @Override + public String distributePermission(DistributeSelectVO distributeSelectVO, UserVO user) { + return null; + } + + public DistributeVO findById(Long id) { + PermissionDistribute distribute = permissionDistributeDAO.selectByPrimaryKey(id); + if (distribute == null) { + return null; + } + return new DistributeVO(distribute); + } + + /** + * 查询从某条用户权限创建的权限分发 + * + * @param userPermissionId + * @return + */ + public List findByFromUserPermissionId(Long userPermissionId) { + PermissionDistributeExample example = new PermissionDistributeExample(); + example.createCriteria() + .andFromUserPermissionIdEqualTo(userPermissionId); + List distributeList = permissionDistributeDAO.selectByExample(example); + List voList = distributeList.stream().map(distribute -> new DistributeVO(distribute)).collect(Collectors.toList()); + return voList; + } + + public List getByFromUserPermissionId(Long userPermissionId) { + List voList = findByFromUserPermissionId(userPermissionId); + if (CollectionUtils.isEmpty(voList)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST, String.format("没有从id为[%s]的用户权限创建的权限分发", userPermissionId)); + } + return voList; + } + + @Override + public List queryDistributeGetUsers(Long id, UserVO user) { + List voList = iUserPermissionService.findByDistributeIdAndStatus(id, StatusEnum.Valid); + for (UserPermissionVO vo : voList) { + UserVO uservo = iSysUserService.getUserById(vo.getUserId()); + vo.setUserName(uservo.getName()); + vo.setUserNickname(uservo.getNickname()); + } + return voList; + } + + @Override + public PageVO queryPackageDetail(Long id, PermissionDistributeQueryVO queryVO) { + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + Page page = (Page) getEntityByParentId(id); + List voList = page.getResult().stream().map(distribute -> { + DistributeVO vo = new DistributeVO(distribute); + if (vo.getOrganizationId() != null) { + vo.setOrganizationName(iOrganizationService.getById(distribute.getOrganizationId()).getName()); + } + return vo; + }).collect(Collectors.toList()); + return PageVO.convert(page, voList); + } + + @Override + public DistributeVO generateGiftDistribute(PermissionGenerateConfigVO configVO) { + PermissionVO permission = this.iPermissionService.getById(configVO.getPermissionId()); + log.info(String.format("即将生成权限[%s:%s]的赠送的权限分发数据", permission.getId(), permission.getName())); + PermissionDistribute distribute = new PermissionDistribute(); + distribute.setSource(PermissionDistributeSourceEnum.Gift.getCode()); + distribute.setPermissionId(configVO.getPermissionId()); + distribute.setAmount(configVO.getQuantity()); + distribute.setRemains(configVO.getQuantity()); + distribute.setForever(false); + LocalDateTime startTime = LocalDate.now().atStartOfDay(); + distribute.setStartTime(startTime); + LocalDateTime endTime = startTime.plusMonths(configVO.getMonthNumber()); + distribute.setEndTime(endTime); + distribute.setStatus(StatusEnum.Valid.getCode()); + distribute.setIsPackage(false); + distribute.setCanDistribute(true); + distribute.setCreateTime(LocalDateTime.now()); + this.permissionDistributeDAO.insert(distribute); + return new DistributeVO(distribute); + } + + @Override + public void recoveryAfterRestoreUserPermission(Long id, Integer amount) { + PermissionDistribute distribute = getEntityById(id); + distribute.setRemains(distribute.getRemains() + amount); + permissionDistributeDAO.updateByPrimaryKeySelective(distribute); + if (distribute.getParentId() != 0) { + PermissionDistribute parentDistribute = getEntityById(distribute.getParentId()); + parentDistribute.setRemains(parentDistribute.getRemains() + amount); + permissionDistributeDAO.updateByPrimaryKeySelective(parentDistribute); + } + } + + private PermissionDistribute findByOrderCode(String orderCode) { + PermissionDistributeExample example = new PermissionDistributeExample(); + example.createCriteria().andOrderCodeEqualTo(orderCode); + List distributeList = permissionDistributeDAO.selectByExample(example); + if (distributeList.isEmpty()) { + return null; + } + return distributeList.get(0); + } + + @Override + public DistributeVO getByOrderCode(String orderCode) { + PermissionDistribute distribute = findByOrderCode(orderCode); + if (distribute == null) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST, String.format("订单编号为[%s]的权限分发不存在", orderCode)); + } + return new DistributeVO(distribute); + } +} diff --git a/src/main/java/club/joylink/rtss/services/PermissionService.java b/src/main/java/club/joylink/rtss/services/PermissionService.java new file mode 100644 index 000000000..a77105c25 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/PermissionService.java @@ -0,0 +1,596 @@ +package club.joylink.rtss.services; + +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import com.joylink.base.exception.BusinessException; +import com.joylink.base.exception.DBException; +import com.joylink.base.exception.constant.ExceptionMapping; +import club.joylink.rtss.constants.MapPrdTypeEnum; +import club.joylink.rtss.constants.PermissionTypeEnum; +import club.joylink.rtss.constants.StatusEnum; +import club.joylink.rtss.dao.MapInfoDAO; +import club.joylink.rtss.dao.PermissionDAO; +import club.joylink.rtss.dao.SysUserDAO; +import club.joylink.rtss.entity.*; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.LessonVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.map.MapVO; +import club.joylink.rtss.vo.client.permission.PermissionCreateVO; +import club.joylink.rtss.vo.client.permission.PermissionQueryVO; +import club.joylink.rtss.vo.client.permission.PermissionUpdateVO; +import club.joylink.rtss.vo.client.permission.PermissionVO; +import org.springframework.util.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.time.LocalDateTime; +import java.util.*; +import java.util.stream.Collectors; + +@Service +public class PermissionService implements IPermissionService { + + @Autowired + private PermissionDAO permissionDAO; + + @Autowired + private MapInfoDAO mapInfoDAO; + + @Autowired + private SysUserDAO sysUserDAO; + + @Autowired + private ILessonService iLessonService; + + @Autowired + private IGoodsService iGoodsService; + + @Override + public PageVO queryPagedPermission(PermissionQueryVO queryVO) { + + //设置查询条件 + PermissionExample example = new PermissionExample(); + example.setOrderByClause("id desc"); + PermissionExample.Criteria criteria = example.createCriteria(); + if (StringUtils.hasText(queryVO.getName())) { + criteria.andNameLike("%" + queryVO.getName() + "%"); + } + if (StringUtils.hasText(queryVO.getType())) { + criteria.andTypeEqualTo(queryVO.getType()); + } + if (Objects.nonNull(queryVO.getIsPackage())) { + criteria.andIsPackageEqualTo(queryVO.getIsPackage()); + } + if (Objects.nonNull(queryVO.getMapId())) { + criteria.andMapIdEqualTo(queryVO.getMapId()); + } + + //分页查询,返回结果 + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + Page page = (Page) permissionDAO.selectByExample(example); + List permissionVOList = new ArrayList<>(); + PermissionVO permissionVO; + for (Permission permission : page.getResult()) { + permissionVO = new PermissionVO(permission); + SysUser user = sysUserDAO.selectByPrimaryKey(permission.getCreatorId()); + if (Objects.nonNull(user)) { + permissionVO.setCreatorUserName(user.getName()); + permissionVO.setCreatorNickname(user.getNickname()); + } + permissionVOList.add(permissionVO); + } + + return PageVO.convert(page, permissionVOList); + } + + @Override + public List queryPermission(PermissionQueryVO queryVO) { + //设置查询条件 + PermissionExample example = new PermissionExample(); + example.setOrderByClause("id desc"); + PermissionExample.Criteria criteria = example.createCriteria(); + if (StringUtils.hasText(queryVO.getName())) { + criteria.andNameLike("%" + queryVO.getName() + "%"); + } + if (StringUtils.hasText(queryVO.getType())) { + criteria.andTypeEqualTo(queryVO.getType()); + } + if (Objects.nonNull(queryVO.getIsPackage())) { + criteria.andIsPackageEqualTo(queryVO.getIsPackage()); + } + if (Objects.nonNull(queryVO.getMapId())) { + criteria.andMapIdEqualTo(queryVO.getMapId()); + } + + //分页查询,返回结果 + List permissions = permissionDAO.selectByExample(example); + return permissions.stream().map(PermissionVO::new).collect(Collectors.toList()); + } + + /** + * 查询权限包详情。 + * 如果查不到,报DBException(数据不存在) + * + * @param id + * @param queryVO + * @return + */ + @Override + public PageVO getPackageDetail(Long id, PermissionQueryVO queryVO) { + PermissionVO permissionVO = getById(id); + if (CollectionUtils.isEmpty(permissionVO.getRelPermissionIds())) { + throw new BusinessException(ExceptionMapping.DATA_NOT_EXIST, "该权限不是权限包"); + } + + //构建查询条件 + List relPermissionIds = permissionVO.getRelPermissionIds(); + PermissionExample example = new PermissionExample(); + example.createCriteria() + .andIdIn(relPermissionIds); + + //分页查询,返回结果 + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + Page page = (Page) permissionDAO.selectByExample(example); + List permissionVOList = PermissionVO.convert2VOList(page.getResult()); + + return PageVO.convert(page, permissionVOList); + } + + /** + * 创建权限包。 + * 如果重名,报DBException(名称重复); + * 如果权限包已存在,报DBException(数据已存在) + * + * @param createVO + * @param user + */ + @Override + public String create(PermissionCreateVO createVO, UserVO user) { + if (this.isNameExist(createVO.getName())) { + throw new BusinessException(ExceptionMapping.NAME_REPEAT); + } + + //校验relPermission数量 + List relPermissionIds = createVO.getRelPermissions(); + if (relPermissionIds == null || relPermissionIds.size() < 2) { + throw new BusinessException(ExceptionMapping.OPERATION_EXCEPTION, "需要至少两个关联权限"); + } + + // 校验所选权限是否存在、是否是权限包、地图id是否相同 + Long firstMapid = getById(relPermissionIds.get(0)).getMapId(); + for (Long relPermissionsId : relPermissionIds) { + PermissionVO permission = this.getById(relPermissionsId); + if (permission.getIsPackage()) { + throw new BusinessException(ExceptionMapping.OPERATION_EXCEPTION, + String.format("创建权限包异常:权限[%s(%s)]为权限包", permission.getName(), permission.getId())); + } + if (createVO.getMapId() != null) { + if (Objects.equals(createVO.getMapId(), permission.getMapId())) { + throw new BusinessException(ExceptionMapping.OPERATION_EXCEPTION, + String.format("创建权限包异常:权限[%s(id:%s)]所属地图不相同", permission.getName(), permission.getId())); + } + } else { + if (!getById(relPermissionsId).getMapId().equals(firstMapid)) { + throw new BusinessException(ExceptionMapping.OPERATION_EXCEPTION, "关联权限所属地图不相同"); + } + } + } + + // 是否已经存在相同权限包 + if (this.isPackageExist(relPermissionIds)) { + throw new BusinessException(ExceptionMapping.DATA_EXISTS, "权限包已存在"); + } + + // 拼关联权限字符串 + Collections.sort(relPermissionIds); + String relPermissions = StringUtils.join(relPermissionIds, ","); + + //构建权限对象 + Permission permission = createVO.convert2DB(); + permission.setMapId(firstMapid); + permission.setRelPermissions(relPermissions); + permission.setCreatorId(user.getId()); + permissionDAO.insert(permission); + return permission.getId().toString(); + } + + @Override + public PermissionVO getById(Long id) { + PermissionVO vo = findById(id); + if (vo == null) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + return vo; + } + + /** + * 更新权限。 + * 如果要更新的权限不存在,报DBException(数据不存在) + * + * @param id + * @param updateVO + * @param user + */ + @Override + public void updatePermission(Long id, PermissionUpdateVO updateVO, UserVO user) { + Permission permission = getEntityById(id); + updateVO.apply(permission); + permission.setUpdateUserId(user.getId()); + permission.setUpdateTime(LocalDateTime.now()); + permissionDAO.updateByPrimaryKey(permission); + } + + private Permission findEntityById(Long id) { + return permissionDAO.selectByPrimaryKey(id); + } + + private Permission getEntityById(Long id) { + Permission permission = findEntityById(id); + if (permission == null) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST, String.format("id为[%s]的权限不存在", id)); + } + return permission; + } + + private boolean isExist(Long id) { + if (findById(id) == null) { + return false; + } + return true; + } + + /** + * 一键生成基础权限。 + * + * @param mapId + * @param user + */ + @Transactional + @Override + public void generatePermission(Long mapId, UserVO user) { + //查询地图 + MapInfo mapInfo = this.mapInfoDAO.selectByPrimaryKey(mapId); + if (Objects.isNull(mapInfo)) { + throw new BusinessException(ExceptionMapping.DATA_NOT_EXIST, + String.format("id为[%s]的地图不存在", mapId)); + } + MapVO mapVO = new MapVO(mapInfo); + // 生成基础权限 + List basePermissionList = createBasePermission(mapVO, user); + // 生成教学权限包 + PermissionVO teachingPermission = createOrUpdateTeachingPermission(mapVO, basePermissionList, user); + + // 创建教学/综合演练权限商品 + this.iGoodsService.autoGenerateGoods(teachingPermission, user); + List list = basePermissionList.stream() + .filter(permissionVO -> + Objects.equals(permissionVO.getPrdType(), MapPrdTypeEnum.JOINT.getCode())) + .collect(Collectors.toList()); + if (!CollectionUtils.isEmpty(list)) { + this.iGoodsService.autoGenerateGoods(list.get(0), user); + } + } + + private PermissionVO createOrUpdateTeachingPermission(MapVO mapVO, List basePermissionList, UserVO user) { + List idList = basePermissionList.stream() + .filter(permissionVO -> + !Objects.equals(permissionVO.getPrdType(), MapPrdTypeEnum.JOINT.getCode())) + .map(PermissionVO::getId) + .sorted(Comparator.comparing(Long::longValue)) + .collect(Collectors.toList()); + String baseIds = StringUtils.join(idList, ","); + Permission teachingPermissionPackage = findTeachingPermissionByMapId(mapVO.getId()); + if (Objects.isNull(teachingPermissionPackage)) { // 不存在,创建 + teachingPermissionPackage = new Permission(); + teachingPermissionPackage.setName(String.format("%s - 实训平台教学权限", mapVO.getName())); + teachingPermissionPackage.setIsPackage(true); + teachingPermissionPackage.setMapId(mapVO.getId()); + teachingPermissionPackage.setType(PermissionTypeEnum.Teaching_Package.getCode()); + teachingPermissionPackage.setCreatorId(user.getId()); + teachingPermissionPackage.setCreateTime(LocalDateTime.now()); + teachingPermissionPackage.setRelPermissions(baseIds); + permissionDAO.insertSelective(teachingPermissionPackage); + } else { + if (!Objects.equals(baseIds, teachingPermissionPackage.getRelPermissions())) { + teachingPermissionPackage.setRelPermissions(baseIds); + this.permissionDAO.updateByPrimaryKey(teachingPermissionPackage); + } +// else { +// throw new DBException(ExceptionMapping.DATA_EXISTS, "该地图权限已经生成过了"); +// } + } + return new PermissionVO(teachingPermissionPackage); + } + + private List createBasePermission(MapVO mapVO, UserVO user) { + List existList = findEntityByMapId(mapVO.getId()); + List newPermissionList = new ArrayList<>(); + //生成仿真权限 + for (MapPrdTypeEnum value : MapPrdTypeEnum.values()) { + if (!isExist(existList, mapVO.getId(), value, null, PermissionTypeEnum.Simulation)) { + newPermissionList.add(buildPermission(user.getId(), mapVO, value, null, PermissionTypeEnum.Simulation)); + } + } + //生成课程和考试权限 + List lessonVOList = iLessonService.findByMapId(mapVO.getId()); + for (LessonVO vo : lessonVOList) { + MapPrdTypeEnum prdType = MapPrdTypeEnum.getMapPrdTypeEnumByCode(vo.getPrdType()); + if (!isExist(existList, mapVO.getId(), prdType, vo.getId(), PermissionTypeEnum.Lesson)) { + newPermissionList.add(buildPermission(user.getId(), mapVO, prdType, vo, PermissionTypeEnum.Lesson)); + } + if (!isExist(existList, mapVO.getId(), prdType, vo.getId(), PermissionTypeEnum.Exam)) { + newPermissionList.add(buildPermission(user.getId(), mapVO, prdType, vo, PermissionTypeEnum.Exam)); + } + } + + if (!CollectionUtils.isEmpty(newPermissionList)) { + permissionDAO.batchInsert(newPermissionList); + } + existList.addAll(newPermissionList); + List voList = existList.stream().map(PermissionVO::new).collect(Collectors.toList()); + return voList; + } + + private boolean isExist(List perList, Long mapId, MapPrdTypeEnum prdType, Long lessonId, PermissionTypeEnum permissionType) { + if (lessonId == null) { + for (Permission permission : perList) { + if (mapId.equals(permission.getMapId()) + && prdType.getCode().equals(permission.getPrdType()) + && permissionType.getCode().equals(permission.getType())) { + return true; + } + } + } else { + for (Permission permission : perList) { + if (mapId.equals(permission.getMapId()) + && prdType.getCode().equals(permission.getPrdType()) + && lessonId.equals(permission.getLessonId()) + && permissionType.getCode().equals(permission.getType())) { + return true; + } + } + } + return false; + } + + private List findEntityByMapId(Long mapId) { + PermissionExample example = new PermissionExample(); + example.createCriteria().andMapIdEqualTo(mapId); + return permissionDAO.selectByExample(example); + } + + @Override + public PermissionVO findById(Long id) { + Permission permission = permissionDAO.selectByPrimaryKey(id); + if (permission == null) { + return null; + } + return new PermissionVO(permission); + } + + /** + * 判断权限包是否已经存在 + * + * @param relPermissionsIds + * @return + */ + private boolean isPackageExist(List relPermissionsIds) { + if (CollectionUtils.isEmpty(relPermissionsIds)) { + throw new RuntimeException("关联权限id列表不能为空"); + } + if (relPermissionsIds.size() < 2) { + throw new RuntimeException("关联权限id数量至少为2"); + } + Collections.sort(relPermissionsIds); + String relIds = StringUtils.join(relPermissionsIds, ","); + PermissionExample example = new PermissionExample(); + example.createCriteria() + .andRelPermissionsEqualTo(relIds); + List permissionList = this.permissionDAO.selectByExample(example); + if (!CollectionUtils.isEmpty(permissionList)) { + return true; + } + return false; + } + + /** + * 根据相关字段判断permission是否存在 + * + * @param mapId + * @param prdType + * @param lessonId + * @param type + * @return + */ + private Permission findBasePermission(Long mapId, String prdType, Long lessonId, PermissionTypeEnum type) { + Objects.requireNonNull(mapId, "mapId不能为null"); + Objects.requireNonNull(prdType, "prdType不能为null"); + Objects.requireNonNull(type, "type不能为null"); + PermissionExample permissionExample = new PermissionExample(); + PermissionExample.Criteria criteria = permissionExample.createCriteria() + .andMapIdEqualTo(mapId) + .andPrdTypeEqualTo(prdType) + .andTypeEqualTo(type.getCode()); + + switch (type) { + case Lesson: + case Exam: + Objects.requireNonNull(lessonId, "查询课程权限时lessonId不能为null"); + criteria.andLessonIdEqualTo(lessonId); + break; + } + List list = permissionDAO.selectByExample(permissionExample); + if (!CollectionUtils.isEmpty(list)) { + return list.get(0); + } + return null; + } + + /** + * 权限名称是否存在 + * + * @param name + * @return + */ + private boolean isNameExist(String name) { + //确认没有重名权限 + PermissionExample example = new PermissionExample(); + PermissionExample.Criteria criteria = example.createCriteria(); + criteria.andNameEqualTo(name); + List permissions = permissionDAO.selectByExample(example); + if (!CollectionUtils.isEmpty(permissions)) { + return true; + } + return false; + } + + /** + * 构建指定类型的permission + * + * @param userId + * @param mapVO + * @param prdType + * @param lessonVO + * @param type + * @return + */ + private Permission buildPermission(Long userId, MapVO mapVO, MapPrdTypeEnum prdType, LessonVO lessonVO, PermissionTypeEnum type) { + Objects.requireNonNull(userId, "用户不能为null"); + Objects.requireNonNull(type, "type不能为null"); + Permission permission = new Permission(); + switch (type) { + case Lesson: + case Exam: + Objects.requireNonNull(lessonVO, String.format("创建[%s]权限时,LsLesson不能为null", type.getMsg())); + permission.setName(String.format("[%s]%s - %s", type.getMsg(), mapVO.getName(), lessonVO.getName())); + permission.setLessonId(lessonVO.getId()); + break; + case Simulation: + Objects.requireNonNull(prdType, String.format("创建[%s]权限时,MpMapPrd不能为null", type.getMsg())); + permission.setName(String.format("[%s]%s - %s", type.getMsg(), mapVO.getName(), prdType.getMsg())); + break; + } + permission.setIsPackage(false); + permission.setType(type.getCode()); + permission.setMapId(mapVO.getId()); + permission.setPrdType(prdType.getCode()); + permission.setCreatorId(userId); + permission.setCreateTime(LocalDateTime.now()); + return permission; + } + + @Override + public List findPermissionByRelPermissionIds(List relPermissionIds) { + Collections.sort(relPermissionIds); + String ids = StringUtils.join(relPermissionIds, ","); + PermissionExample example = new PermissionExample(); + example.createCriteria() + .andRelPermissionsEqualTo(ids); + List permissionList = permissionDAO.selectByExample(example); + List voList = permissionList.stream().map(permission -> new PermissionVO(permission)).collect(Collectors.toList()); + return voList; + } + + @Override + public List getPermissionByRelPermissionIds(List relPermissionIds) { + List voList = findPermissionByRelPermissionIds(relPermissionIds); + if (CollectionUtils.isEmpty(voList)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + return voList; + } + + @Override + public List findByMapId(Long mapId) { + PermissionExample example = new PermissionExample(); + example.createCriteria().andMapIdEqualTo(mapId); + List permissionList = permissionDAO.selectByExample(example); + List voList = permissionList.stream().map(permission -> new PermissionVO(permission)).collect(Collectors.toList()); + return voList; + } + + /** + * 根据mapId查询该地图下的教学权限(权限包) + * + * @param mapId + * @return + */ + public Permission findTeachingPermissionByMapId(Long mapId) { + + + //无旧数据影响 + PermissionExample example = new PermissionExample(); + example.createCriteria() + .andMapIdEqualTo(mapId) + .andTypeEqualTo(PermissionTypeEnum.Teaching_Package.getCode()) + .andIsPackageEqualTo(true); + List permissionList = permissionDAO.selectByExample(example); + if (!CollectionUtils.isEmpty(permissionList)) { + return permissionList.get(0); + } + return null; + } + + public PermissionVO getTeachPermissionByMapId(Long mapId) { + Permission permission = findTeachingPermissionByMapId(mapId); + if (permission == null) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST, + String.format("id为[%s]的地图下权限包不存在", mapId)); + } + return new PermissionVO(permission); + } + + @Override + public void realGenerate(UserVO user) { + MapInfoExample example = new MapInfoExample(); + example.createCriteria().andStatusEqualTo(StatusEnum.Valid.getCode()); + List mapList = mapInfoDAO.selectByExample(example); + for (MapInfo mapInfo : mapList) { + generatePermission(mapInfo.getId(), user); + } + } + + /** + * 根据mapId获取该地图下的综合演练权限 + */ + public PermissionVO getJointSimulationPermissionByMapId(Long mapId) { + PermissionExample example = new PermissionExample(); + example.createCriteria() + .andMapIdEqualTo(mapId) + .andNameLike(String.format("%%%s%%", "综合演练")); + example.or() + .andMapIdEqualTo(mapId) + .andNameLike(String.format("%%%s%%", "Comprehensive exercise cloud platform")); + List permissions = permissionDAO.selectByExample(example); + if (permissions.isEmpty()) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST, + String.format("id为[%s]的地图下综合演练权限不存在", mapId)); + } + return new PermissionVO(permissions.get(0)); + } + + /** + * 查询所有权限包或所有基础权限 + * + * @return + */ + @Override + public List findPermissionPackageOrBasePermission(Boolean isPackage) { + PermissionExample example = new PermissionExample(); + example.createCriteria() + .andIsPackageEqualTo(isPackage); + List permissionList = permissionDAO.selectByExample(example); + List voList = permissionList.stream().map(permission -> new PermissionVO(permission)).collect(Collectors.toList()); + return voList; + } + + public List findPackageContainsPermission(Long relPermissionId) { + PermissionExample example = new PermissionExample(); + example.createCriteria().andRelPermissionsLike(String.format("%%%s%%", relPermissionId)); + List permissionList = permissionDAO.selectByExample(example); + return PermissionVO.convert2VOList(permissionList); + } +} diff --git a/src/main/java/club/joylink/rtss/services/RealLineService.java b/src/main/java/club/joylink/rtss/services/RealLineService.java new file mode 100644 index 000000000..4d173cc8d --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/RealLineService.java @@ -0,0 +1,203 @@ +package club.joylink.rtss.services; + +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import com.joylink.base.exception.DBException; +import com.joylink.base.exception.constant.ExceptionMapping; +import club.joylink.rtss.dao.RealLineDAO; +import club.joylink.rtss.entity.RealLine; +import club.joylink.rtss.entity.RealLineExample; +import club.joylink.rtss.util.JsonUtils; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.map.*; +import org.springframework.util.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.time.LocalDateTime; +import java.util.List; +import java.util.Objects; + +@Service +public class RealLineService implements IRealLineService { + + @Autowired + private RealLineDAO realLineDAO; + + @Autowired + private IMapService iMapService; + + @Override + @Transactional + public void create(RealLineVO skinVO, UserVO userVO) { + if (checkCodeExist(skinVO.getCode())) { + throw new DBException(ExceptionMapping.DATA_EXISTS); + } + RealLine realLine = skinVO.convert2DB(); + realLine.setCreateTime(LocalDateTime.now()); + realLine.setCreatorId(userVO.getId()); + //线路创建增加默认配置项 + RealLineConfigVO realLineConfigV = new RealLineConfigVO(); + realLine.setConfigData(JsonUtils.writeValueAsString(realLineConfigV)); + this.realLineDAO.insert(realLine); + } + + @Override + public List queryList(RealLineQueryVO queryVO) { + RealLineExample example = new RealLineExample(); + RealLineExample.Criteria criteria = example.createCriteria(); + if (Objects.nonNull(queryVO) && StringUtils.hasText(queryVO.getCode())) { + criteria.andCodeLike(String.format("%%%s%%", queryVO.getCode())); + } + if (Objects.nonNull(queryVO) && StringUtils.hasText(queryVO.getName())) { + criteria.andNameLike(String.format("%%%s%%", queryVO.getName())); + } + List realLines = this.realLineDAO.selectByExample(example); + return RealLineListVO.convert2VOList(realLines); + } + + @Override + public PageVO queryPagedSkin(RealLineQueryVO queryVO) { + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + RealLineExample example = new RealLineExample(); + RealLineExample.Criteria criteria = example.createCriteria(); + if (StringUtils.hasText(queryVO.getCode())) { + criteria.andCodeLike(String.format("%%%s%%", queryVO.getCode())); + } + if (StringUtils.hasText(queryVO.getName())) { + criteria.andNameLike(String.format("%%%s%%", queryVO.getName())); + } + Page page = (Page) this.realLineDAO.selectByExample(example); + return PageVO.convert(page, RealLineListVO.convert2VOList(page.getResult())); + } + + @Override + public RealLineVO get(Long id) { + RealLine realLine = this.realLineDAO.selectByPrimaryKey(id); + return new RealLineVO(realLine); + } + + @Override + public RealLineVO get(String code) { + RealLineExample example = new RealLineExample(); + example.createCriteria().andCodeEqualTo(code); + List realLineList = this.realLineDAO.selectByExample(example); + if (CollectionUtils.isEmpty(realLineList)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + return new RealLineVO(realLineList.get(0)); + } + + @Override + @Transactional + public void update(Long id, RealLineVO skinVO, UserVO userVO) { + RealLine realLine = this.realLineDAO.selectByPrimaryKey(id); + if (Objects.isNull(realLine)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + realLine.setName(skinVO.getName()); + realLine.setUpdateTime(LocalDateTime.now()); + realLine.setUpdaterId(userVO.getId()); + this.realLineDAO.updateByPrimaryKeySelective(realLine); + } + + @Override + public void delete(Long id) { + RealLine realLine = this.realLineDAO.selectByPrimaryKey(id); + if (Objects.isNull(realLine)) { + return; + } + // 判断地图是否使用 + List mapList = this.iMapService.getMapListByLineCode(realLine.getCode()); + if (!CollectionUtils.isEmpty(mapList)) { + throw new DBException(ExceptionMapping.DATA_EXISTS); + } + this.realLineDAO.deleteByPrimaryKey(id); + } + + /** + * 检查code是否存在 + * 存在 - true 不存在 - false + * + * @param code + * @return + */ + @Override + public boolean checkCodeExist(String code) { + RealLineExample example = new RealLineExample(); + example.createCriteria().andCodeEqualTo(code); + List realLineList = this.realLineDAO.selectByExample(example); + return !CollectionUtils.isEmpty(realLineList); + } + + @Override + public void updateByCode(String code, RealLineVO skinVO, UserVO userVO) { + RealLineExample example = new RealLineExample(); + example.createCriteria().andCodeEqualTo(code); + List realLines = this.realLineDAO.selectByExample(example); + if (CollectionUtils.isEmpty(realLines)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + RealLine realLine = realLines.get(0); + realLine.setUpdaterId(userVO.getId()); + realLine.setCreateTime(LocalDateTime.now()); + this.realLineDAO.updateByPrimaryKey(realLine); + } + + @Override + @Transactional + public void saveLineConfig(Long id, RealLineConfigVO configVO) { + RealLine realLine = this.realLineDAO.selectByPrimaryKey(id); + if (Objects.isNull(realLine)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + realLine.setConfigData(JsonUtils.writeValueAsString(configVO)); + this.realLineDAO.updateByPrimaryKeyWithBLOBs(realLine); + } + + @Override + public RealLineConfigVO getLineConfigById(Long id) { + RealLine realLine = this.realLineDAO.selectByPrimaryKey(id); + RealLineConfigVO lineConfigVO = new RealLineConfigVO(); + if (Objects.isNull(realLine)) throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + if (StringUtils.isBlank(realLine.getConfigData())) { + realLine.setConfigData(JsonUtils.writeValueAsString(lineConfigVO)); + this.realLineDAO.updateByPrimaryKeyWithBLOBs(realLine); + } + return RealLineConfigVO.parseJsonStr(realLine.getConfigData()); + } + + @Override + public RealLineConfigVO getLineConfigByCode(String lineCode) { + RealLineExample example = new RealLineExample(); + example.createCriteria().andCodeEqualTo(lineCode); + List realLineList = this.realLineDAO.selectByExampleWithBLOBs(example); + if (CollectionUtils.isEmpty(realLineList)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST, + String.format("code为[%s]的线路数据不存在", lineCode)); + } + RealLine realLine = realLineList.get(0); + if (Objects.nonNull(realLine.getConfigData())) { + return RealLineConfigVO.parseJsonStr(realLine.getConfigData()); + } + return null; + } + + @Override + public RealLineVO getLineDetailByCode(String lineCode) { + RealLineExample example = new RealLineExample(); + example.createCriteria().andCodeEqualTo(lineCode); + List realLineList = this.realLineDAO.selectByExampleWithBLOBs(example); + if (CollectionUtils.isEmpty(realLineList)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST, + String.format("code为[%s]的线路数据不存在", lineCode)); + } + RealLine realLine = realLineList.get(0); + RealLineVO realLineVO = new RealLineVO(realLine); + realLineVO.setConfigVO(RealLineConfigVO.parseJsonStr(realLine.getConfigData())); + return realLineVO; + } +} diff --git a/src/main/java/club/joylink/rtss/services/ReleaseReviewService.java b/src/main/java/club/joylink/rtss/services/ReleaseReviewService.java new file mode 100644 index 000000000..2f84449af --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/ReleaseReviewService.java @@ -0,0 +1,308 @@ +package club.joylink.rtss.services; + +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import club.joylink.rtss.constants.BusinessConsts; +import club.joylink.rtss.dao.*; +import club.joylink.rtss.entity.*; +import club.joylink.rtss.util.ConvertUtil; +import club.joylink.rtss.vo.LoginUserInfoVO; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.*; +import club.joylink.rtss.vo.client.map.MapVO; +import club.joylink.rtss.vo.client.runplan.RunPlanQueryVO; +import club.joylink.rtss.vo.client.runplan.RunPlanVO; +import club.joylink.rtss.vo.client.script.ScriptQueryVO; +import club.joylink.rtss.vo.client.script.ScriptVO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; +import org.springframework.util.ObjectUtils; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +@Service +public class ReleaseReviewService implements IReleaseReviewService { + @Autowired + private LsDraftLessonDAO lsDraftLessonDAO; + + @Autowired + private ILessonDraftService iLessonDraftService; + + @Autowired + private ISysUserService iSysUserService; + + @Autowired + private SysUserMapper sysUserMapper; + + @Autowired + private IMapService iMapService; + + @Autowired + private RunPlanDraftDAO runPlanDraftDAO; + + @Autowired + private IRunPlanDraftService iRunPlanDraftService; + + @Autowired + private LsDraftLessonChapterDAO draftLessonChapterDAO; + + @Autowired + private LsDraftRelChapterTrainingDAO draftRelChapterTrainingDAO; + + @Autowired + private IScriptDraftService iScriptDraftService; + + @Autowired + private IScriptService iScriptService; + + + //-----------------课程发布审核------------------ + /** + * 查询待审核的课程 + * + * @param queryVO 筛选查询的条件 + * @return + */ + @Override + public PageVO queryPendingReviewLesson(ReleaseReviewQueryVO queryVO) { + SysUserExample userExample = new SysUserExample(); + List sysUserList = new ArrayList(); + if (!ObjectUtils.isEmpty(queryVO.getUserName())) { + userExample.createCriteria().andNameLike("%" + queryVO.getUserName() + "%"); + sysUserList = sysUserMapper.selectByExample(userExample); + } + LsDraftLessonExample example = new LsDraftLessonExample(); + LsDraftLessonExample.Criteria criteria = example.createCriteria().andStatusEqualTo(BusinessConsts.ReleaseReview.RELEASE_STATUS_02); + if (!ObjectUtils.isEmpty(queryVO.getMapId())){ + MapVO mapVO = iMapService.getMapInfoById(ConvertUtil.str2Long(queryVO.getMapId())); + criteria.andMapIdEqualTo(mapVO.getId()); + } + if (!ObjectUtils.isEmpty(queryVO.getLessonName())) { + criteria.andNameLike("%" + queryVO.getLessonName() + "%"); + } + if (!ObjectUtils.isEmpty(queryVO.getUserName())){ + if (!CollectionUtils.isEmpty(sysUserList)) { + List ids = new ArrayList(); + for (SysUser sysUser : sysUserList) { + ids.add(sysUser.getId()); + } + criteria.andCreatorIdIn(ids); + } else { + criteria.andCreatorIdEqualTo(0L); + } + } + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + Page lessonPage = (Page) lsDraftLessonDAO.selectByExample(example); + List lessonVOList = LessonVO.convert2VO(lessonPage.getResult()); + for (LessonVO lessonVO : lessonVOList) { + UserVO userVO = iSysUserService.findUserById(ConvertUtil.str2Long(lessonVO.getCreatorId())); + lessonVO.setUserName(userVO.getName()); + MapVO mapVO = iMapService.getMapInfoById(lessonVO.getMapId()); + lessonVO.setCityCode(mapVO.getCityCode()); + } + return PageVO.convert(lessonPage, lessonVOList); + } + + /** + * 发布课程 + * + * @param id + * @param publishVO + */ + @Override + @Transactional + public void publishLesson(Long id, LessonPublishVO publishVO) { + //发布课程成功 + iLessonDraftService.publishLesson(id, publishVO); + //修改草稿的状态 + LsDraftLesson lsDraftLesson = lsDraftLessonDAO.selectByPrimaryKey(id); + lsDraftLesson.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_03); + lsDraftLessonDAO.updateByPrimaryKey(lsDraftLesson); + } + + /** + * 驳回课程 + * + * @param id + * @param explanation + */ + @Override + @Transactional + public void rejectLesson(Long id, String explanation) { + LsDraftLesson lsDraftLesson = lsDraftLessonDAO.selectByPrimaryKey(id); + lsDraftLesson.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_04); + lsDraftLesson.setExplanation(explanation); + lsDraftLessonDAO.updateByPrimaryKey(lsDraftLesson); + } + + /** + * 用户申请发布课程或者撤销申请 + * @param id + */ + @Override + @Transactional + public void applicationForReleaseOrCancelLesson(Long id, String status) { + LsDraftLesson lsDraftLesson = lsDraftLessonDAO.selectByPrimaryKey(id); + if (BusinessConsts.ReleaseReview.RELEASE_STATUS_02.equals(status)){ + //已发布待审核状态 + lsDraftLesson.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_02); + lsDraftLesson.setExplanation(null); + } else { + //未发布状态 + lsDraftLesson.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_01); + } + lsDraftLesson.setUpdateTime(LocalDateTime.now()); + lsDraftLessonDAO.updateByPrimaryKey(lsDraftLesson); + } + + /** + * 预览课程 + * @param id + * @return + */ + @Override + public List previewLesson(Long id) { + LsDraftLesson lsDraftLesson = lsDraftLessonDAO.selectByPrimaryKey(id); + List lessonVOS = new ArrayList<>(); + lessonVOS.add(new LessonVO(lsDraftLesson)); + List chapterVos = this.draftLessonChapterDAO.selectChapterTrainingByLessonId(id); + // 构建课程树 + List treeNodes = ConvertUtil.buildLessonTreeList(lessonVOS, chapterVos); + return treeNodes; + } + + //---------------剧本发布审核---------------- + + /** + * 查询待审核的剧本 + * @param queryVO + * @return + */ + @Override + public PageVO queryPendingReviewScript(ScriptQueryVO queryVO) { + return iScriptDraftService.queryPagedPendingReviewScript(queryVO); + } + + /** + * 发布剧本 + * @param id + * @param user + */ + @Override + @Transactional + public void publishScript(Long id, UserVO user) { + ScriptDraftWithBLOBs scriptDraftWithBLOBs = iScriptDraftService.getEntityById(id); + iScriptService.publish(scriptDraftWithBLOBs, user); + iScriptDraftService.publishPass(id); + } + + @Override + @Transactional + public void rejectScript(Long id, ReleaseReviewVO releaseReviewVO) { + iScriptDraftService.publishReject(id, releaseReviewVO.getExplanation()); + } + + //----------------------运行图发布审核------------------------- + + /** + * 查询待审核的运行图 + * @param queryVO 筛选查询的条件 + * @return + */ + @Override + public PageVO queryPendingReviewRunPlan(RunPlanQueryVO queryVO) { + return iRunPlanDraftService.queryPagedPendingReviewPlan(queryVO); + } + + /** + * 发布运行图 + * @param planId + * @param user + * @return + */ + @Override + @Transactional + public List publishRunPlan(Long planId, UserVO user) { + List checkedList = iRunPlanDraftService.dataCheck(planId); + if(CollectionUtils.isEmpty(checkedList)) { + iRunPlanDraftService.publish(planId, user); +// RunPlanDraft runPlanDraft = runPlanDraftDAO.selectByPrimaryKey(planId); +// runPlanDraft.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_03); +// runPlanDraftDAO.updateByPrimaryKey(runPlanDraft); + } + return checkedList; + } + + /** + * 直接发布运行图 + * @param planId + * @param user + * @return + */ + @Override + @Transactional + public List directPublishRunPlan(Long planId, String runPlanName, UserVO user) { + List checkedList = iRunPlanDraftService.dataCheck(planId); + if(CollectionUtils.isEmpty(checkedList)) { + iRunPlanDraftService.directPublish(planId,runPlanName, user); +// RunPlanDraft runPlanDraft = runPlanDraftDAO.selectByPrimaryKey(planId); +// runPlanDraft.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_03); +// runPlanDraftDAO.updateByPrimaryKey(runPlanDraft); + } + return checkedList; + } + + /** + * 驳回运行图 + * @param id + * @param explanation + */ + @Override + @Transactional + public void rejectRunPlan(Long id, String explanation) { + RunPlanDraft runPlanDraft = runPlanDraftDAO.selectByPrimaryKey(id); + runPlanDraft.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_04); + runPlanDraft.setExplanation(explanation); + runPlanDraftDAO.updateByPrimaryKey(runPlanDraft); + } + + /** + * 用户申请发布运行图或者撤销申请 + * @param id + * @param status + */ + @Override + @Transactional + public void applicationForReleaseOrCancelRunPlan(Long id, String status) { + RunPlanDraft runPlanDraft = runPlanDraftDAO.selectByPrimaryKey(id); + if (BusinessConsts.ReleaseReview.RELEASE_STATUS_02.equals(status)){ + //已发布待审核状态 + runPlanDraft.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_02); + runPlanDraft.setExplanation(null); + } else { + //未发布状态 + runPlanDraft.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_01); + } + runPlanDraft.setCreateTime(LocalDateTime.now()); + runPlanDraftDAO.updateByPrimaryKey(runPlanDraft); + } + + /** + * 预览运行图 + * @param planId + * @param loginUserInfoVO + * @return + */ + @Override + public String previewRunPlan(Long planId, LoginUserInfoVO loginUserInfoVO) { + List checkedList = iRunPlanDraftService.dataCheck(planId); + if(CollectionUtils.isEmpty(checkedList)) { + return iRunPlanDraftService.simulationCheck(planId, loginUserInfoVO); + } + return null; + } +} diff --git a/src/main/java/club/joylink/rtss/services/ReleaseService.java b/src/main/java/club/joylink/rtss/services/ReleaseService.java new file mode 100644 index 000000000..6f48494d1 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/ReleaseService.java @@ -0,0 +1,347 @@ +package club.joylink.rtss.services; + +import club.joylink.rtss.constants.BusinessConsts; +import club.joylink.rtss.controller.cache.CacheController; +import club.joylink.rtss.dao.*; +import club.joylink.rtss.entity.*; +import club.joylink.rtss.exception.BusinessExceptionAssertEnum; +import club.joylink.rtss.vo.client.ReleaseConfigVO; +import club.joylink.rtss.vo.client.ReleaseVO; +import club.joylink.rtss.vo.client.map.MapVO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.util.*; +import java.util.stream.Collectors; + +@Service +public class ReleaseService implements IReleaseService { + @Autowired + private MapDataDAO mapDataDAO; + + @Autowired + private RunPlanTemplateDAO runPlanTemplateDAO; + + @Autowired + private RunPlanLoadDAO runPlanLoadDAO; + + @Autowired + private Map3dDataDAO map3dDataDAO; + + @Autowired + private IMapService iMapService; + + @Autowired + private CommandDefinitionDAO commandDefinitionDAO; + + @Autowired + private RealLineDAO realLineDAO; + + @Autowired + private SchedulingPlanDAO schedulingPlanDAO; + + @Autowired + private RunPlanTemplateVersionDAO runPlanTemplateVersionDAO; + + @Autowired + private IbpDAO ibpDAO; + + @Autowired + private CacheController cacheController; + + @Autowired + private ScriptDraftDAO scriptDraftDAO; + + @Autowired + private ScriptDAO scriptDAO; + + @Autowired + private CompetitionDAO competitionDAO; + + @Override + public ReleaseVO exportAsJson(Long mapId, ReleaseConfigVO config) { + ReleaseVO releaseVO = new ReleaseVO(); + //地图数据强制选择 + releaseVO.setMapData(getMapDataWithBLOBs(mapId)); + //线路配置强制选择 + MapVO mapInfo = iMapService.getMapInfoById(mapId); + RealLineExample realLineExample = new RealLineExample(); + realLineExample.createCriteria().andCodeEqualTo(mapInfo.getLineCode()); + List realLines = realLineDAO.selectByExampleWithBLOBs(realLineExample); + BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(!CollectionUtils.isEmpty(realLines)); + RealLine realLine = realLines.get(0); + releaseVO.setRealLineConfig(realLine); + + if (config.getRunPlan()) { + this.checkRunPlan(mapId); + RunPlanTemplateExample runPlanTemplateExample = new RunPlanTemplateExample(); + runPlanTemplateExample.createCriteria().andMapIdEqualTo(mapId); + List runPlanTemplates = runPlanTemplateDAO.selectByExampleWithBLOBs(runPlanTemplateExample); + releaseVO.setRunPlanTemplateList(runPlanTemplates); + + RunPlanLoadExample runPlanLoadExample = new RunPlanLoadExample(); + runPlanLoadExample.createCriteria().andMapIdEqualTo(mapId); + List runPlanLoads = runPlanLoadDAO.selectByExample(runPlanLoadExample); + releaseVO.setRunPlanLoadList(runPlanLoads); + + SchedulingPlanExample schedulingPlanExample = new SchedulingPlanExample(); + schedulingPlanExample.createCriteria().andMapIdEqualTo(mapId); + List schedulingPlans = schedulingPlanDAO.selectByExampleWithBLOBs(schedulingPlanExample); + if (!CollectionUtils.isEmpty(schedulingPlans)) { + releaseVO.setSchedulingPlanList(schedulingPlans); + } + + if(!CollectionUtils.isEmpty(runPlanTemplates)){ + RunPlanTemplateVersionExample runPlanTemplateVersionExample = new RunPlanTemplateVersionExample(); + List runPlanTemplateIds = runPlanTemplates.stream().map(RunPlanTemplate::getId).collect(Collectors.toList()); + runPlanTemplateVersionExample.createCriteria().andPlanIdIn(runPlanTemplateIds); + List runPlanTemplateVersions = runPlanTemplateVersionDAO.selectByExample(runPlanTemplateVersionExample); + if (!CollectionUtils.isEmpty(runPlanTemplateVersions)) { + releaseVO.setRunPlanTemplateVersionList(runPlanTemplateVersions); + } + } + } + if (config.getMap3dData()) { + Map3dDataExample map3dDataExample = new Map3dDataExample(); + map3dDataExample.createCriteria().andMapIdEqualTo(mapId); + List map3dDataWithBLOBs = map3dDataDAO.selectByExampleWithBLOBs(map3dDataExample); + if (!CollectionUtils.isEmpty(map3dDataWithBLOBs)) { + releaseVO.setMap3dData(map3dDataWithBLOBs.get(0)); + } + } + if (config.getCommandDefinition()) { + MapVO mapInfo2 = iMapService.getMapInfoById(mapId); + CommandDefinitionExample commandDefinitionExample = new CommandDefinitionExample(); + commandDefinitionExample.createCriteria().andLineCodeEqualTo(mapInfo2.getLineCode()); + List commandDefinitions = commandDefinitionDAO.selectByExample(commandDefinitionExample); + if (!CollectionUtils.isEmpty(commandDefinitions)) { + releaseVO.setCommandDefinitionList(commandDefinitions); + } + } + if (config.getIbp()) { + IbpExample example = new IbpExample(); + example.createCriteria().andMapIdEqualTo(mapId); + List ibps = ibpDAO.selectByExampleWithBLOBs(example); + if (!CollectionUtils.isEmpty(ibps)) { + releaseVO.setIbpList(ibps); + } + } + if (config.getScript()) { + //草稿地图 + ScriptDraftExample example = new ScriptDraftExample(); + example.createCriteria().andMapIdEqualTo(mapId); + releaseVO.setScriptDrafts(scriptDraftDAO.selectByExampleWithBLOBs(example)); + //发布地图 + ScriptExample scriptExample = new ScriptExample(); + scriptExample.createCriteria().andMapIdEqualTo(mapId); + releaseVO.setScripts(scriptDAO.selectByExampleWithBLOBs(scriptExample)); + //如果剧本被竞赛关联,导出竞赛 + if (!CollectionUtils.isEmpty(releaseVO.getScripts())) { + CompetitionExample competitionExample = new CompetitionExample(); + List scriptIds = releaseVO.getScripts().stream().map(Script::getId).collect(Collectors.toList()); + competitionExample.createCriteria().andScriptIdIn(scriptIds); + releaseVO.setCompetitions(competitionDAO.selectByExampleWithBLOBs(competitionExample)); + } + } + return releaseVO; + } + + private MapDataWithBLOBs getMapDataWithBLOBs(Long mapId) { + MapDataExample mapDataExample = new MapDataExample(); + mapDataExample.createCriteria().andMapIdEqualTo(mapId); + List mapDataWithBLOBsList = mapDataDAO.selectByExampleWithBLOBs(mapDataExample); + BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(!CollectionUtils.isEmpty(mapDataWithBLOBsList)); + return mapDataWithBLOBsList.get(0); + } + + @Transactional + @Override + public void importFromJson(Long mapId, ReleaseVO releaseVO) { + BusinessExceptionAssertEnum.INVALID_OPERATION.assertNotNull(releaseVO.getMapData()); + BusinessExceptionAssertEnum.INVALID_OPERATION.assertNotNull(releaseVO.getRealLineConfig()); + + MapVO selectedMapInfo = iMapService.getMapInfoById(mapId); + BusinessExceptionAssertEnum.INVALID_OPERATION.assertTrue(Objects.equals(selectedMapInfo.getLineCode(), releaseVO.getRealLineConfig().getCode())); + + //更新地图数据 + MapDataWithBLOBs mapDataWithBLOBs = releaseVO.getMapData(); + mapDataWithBLOBs.setId(null); + mapDataWithBLOBs.setMapId(mapId); + MapDataExample mapDataExample = new MapDataExample(); + mapDataExample.createCriteria().andMapIdEqualTo(mapId); + mapDataDAO.updateByExampleSelective(mapDataWithBLOBs, mapDataExample); + //清除地图数据缓存 + cacheController.remove(BusinessConsts.CachePrefix.Map + mapId); + + if (!CollectionUtils.isEmpty(releaseVO.getRunPlanTemplateList())) { + //删除旧的运行图加载数据 + List runPlanLoads = releaseVO.getRunPlanLoadList(); + RunPlanLoadExample runPlanLoadExample = new RunPlanLoadExample(); + runPlanLoadExample.createCriteria().andMapIdEqualTo(mapId); + runPlanLoadDAO.deleteByExample(runPlanLoadExample); + //删除旧的模板运行图数据 + List runPlanTemplates = releaseVO.getRunPlanTemplateList(); + RunPlanTemplateExample runPlanTemplateExample = new RunPlanTemplateExample(); + runPlanTemplateExample.createCriteria().andMapIdEqualTo(mapId); + List oldRunPlanTemplates = runPlanTemplateDAO.selectByExample(runPlanTemplateExample); + List oldRunPlanTemplateIds = oldRunPlanTemplates.stream().map(RunPlanTemplate::getId).collect(Collectors.toList()); + runPlanTemplateDAO.deleteByExample(runPlanTemplateExample); + //插入新的模板运行图数据并记录id变化 + Map runPlanTemplateIdMap = new HashMap<>(); + for (RunPlanTemplate template : runPlanTemplates) { + long oldId = template.getId(); + template.setId(null); + template.setMapId(mapId); + runPlanTemplateDAO.insert(template); + runPlanTemplateIdMap.put(oldId, template.getId()); + } + //替换运行图加载数据关联的模版运行图id;插入运行图加载数据 + for (RunPlanLoad runPlanLoad : runPlanLoads) { + runPlanLoad.setId(null); + runPlanLoad.setMapId(mapId); + runPlanLoad.setTemplatePlanId(runPlanTemplateIdMap.get(runPlanLoad.getTemplatePlanId())); + } + runPlanLoadDAO.batchInsertWithId(runPlanLoads); + if (!CollectionUtils.isEmpty(releaseVO.getSchedulingPlanList())) { + //删除旧的派班计划数据 + List schedulingPlans = releaseVO.getSchedulingPlanList(); + SchedulingPlanExample schedulingPlanExample = new SchedulingPlanExample(); + schedulingPlanExample.createCriteria().andMapIdEqualTo(mapId); + schedulingPlanDAO.deleteByExample(schedulingPlanExample); + //替换派班计划关联的模板运行图id;插入派班计划数据 + for (SchedulingPlan schedulingPlan : schedulingPlans) { + schedulingPlan.setId(null); + schedulingPlan.setMapId(mapId); + schedulingPlan.setRunPlanId(runPlanTemplateIdMap.get(schedulingPlan.getRunPlanId())); + } + schedulingPlanDAO.batchInsertWithId(schedulingPlans); + } + List runPlanTemplateVersionList = releaseVO.getRunPlanTemplateVersionList(); + if (!CollectionUtils.isEmpty(runPlanTemplateVersionList)) { + //删除旧的运行图版本数据 + if (!CollectionUtils.isEmpty(oldRunPlanTemplateIds)) { + RunPlanTemplateVersionExample runPlanTemplateVersionExample = new RunPlanTemplateVersionExample(); + runPlanTemplateVersionExample.createCriteria().andPlanIdIn(oldRunPlanTemplateIds); + runPlanTemplateVersionDAO.deleteByExample(runPlanTemplateVersionExample); + } + //替换运行图版本数据关联的模板运行图id;插入运行图版本数据 + for (RunPlanTemplateVersion version : runPlanTemplateVersionList) { + version.setId(null); + version.setPlanId(runPlanTemplateIdMap.get(version.getPlanId())); + } + runPlanTemplateVersionDAO.batchInsertWithId(runPlanTemplateVersionList); + } + } + //更新地图3d数据 + if (releaseVO.getMap3dData() != null) { + Map3dDataWithBLOBs map3dData = releaseVO.getMap3dData(); + map3dData.setId(null); + map3dData.setMapId(mapId); + Map3dDataExample example = new Map3dDataExample(); + example.createCriteria().andMapIdEqualTo(mapId); + map3dDataDAO.deleteByExample(example); + map3dDataDAO.insert(map3dData); + //清除地图3D数据缓存 + cacheController.remove(BusinessConsts.CachePrefix.Map_3d + mapId); + } + if (!CollectionUtils.isEmpty(releaseVO.getCommandDefinitionList())) { + List commandDefinitions = releaseVO.getCommandDefinitionList(); + //删除该地图的真实线路的旧指令 + CommandDefinitionExample example = new CommandDefinitionExample(); + example.createCriteria().andLineCodeEqualTo(commandDefinitions.get(0).getLineCode()); + commandDefinitionDAO.deleteByExample(example); + //插入新的指令 + for (CommandDefinition commandDefinition : commandDefinitions) { + commandDefinition.setId(null); + } + commandDefinitionDAO.batchInsertWithId(commandDefinitions); + } + if (releaseVO.getRealLineConfig() != null) { + RealLine realLine = releaseVO.getRealLineConfig(); + realLine.setId(null); + RealLineExample example = new RealLineExample(); + example.createCriteria().andCodeEqualTo(realLine.getCode()); + BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(realLineDAO.countByExample(example) > 0); + realLineDAO.updateByExampleSelective(realLine, example); + } + if (!CollectionUtils.isEmpty(releaseVO.getIbpList())) { + List ibpList = releaseVO.getIbpList(); + //删除旧数据 + IbpExample example = new IbpExample(); + example.createCriteria().andMapIdEqualTo(mapId); + ibpDAO.deleteByExample(example); + //插入新数据 + for (Ibp ibp : ibpList) { + ibp.setId(null); + ibp.setMapId(mapId); + } + ibpDAO.batchInsertWithId(ibpList); + } + if (!CollectionUtils.isEmpty(releaseVO.getScriptDrafts())) { + //删除旧草稿 + ScriptDraftExample example = new ScriptDraftExample(); + example.createCriteria().andMapIdEqualTo(mapId); + scriptDraftDAO.deleteByExample(example); + //插入新草稿 + for (ScriptDraftWithBLOBs draft : releaseVO.getScriptDrafts()) { + draft.setId(null); + draft.setMapId(mapId); + } + scriptDraftDAO.batchInsert(releaseVO.getScriptDrafts()); + } + if (!CollectionUtils.isEmpty(releaseVO.getScripts())) { + //删除旧剧本 + ScriptExample scriptExample = new ScriptExample(); + scriptExample.createCriteria().andMapIdEqualTo(mapId); + List deletedScriptIds = scriptDAO.selectByExample(scriptExample).stream().map(Script::getId).collect(Collectors.toList()); + scriptDAO.deleteByExample(scriptExample); + //插入新剧本 + Map scriptIdMap = new HashMap<>(); + for (ScriptWithBLOBs script : releaseVO.getScripts()) { + long oldId = script.getId(); + script.setId(null); + script.setMapId(mapId); + scriptDAO.insert(script); + scriptIdMap.put(oldId, script.getId()); + } + if (!CollectionUtils.isEmpty(releaseVO.getCompetitions())) { + //删除旧场景 + CompetitionExample example = new CompetitionExample(); + example.createCriteria().andScriptIdIn(deletedScriptIds); + competitionDAO.deleteByExample(example); + //插入新场景 + for (CompetitionWithBLOBs competition : releaseVO.getCompetitions()) { + competition.setId(null); + competition.setScriptId(scriptIdMap.get(competition.getScriptId())); + } + competitionDAO.batchInsert(releaseVO.getCompetitions()); + } + } + } + + /** + * 检查确认该地图的runPlanLoad存在,并且关联的runPlanTemplate也存在; + * 检查确认该地图的schedulingPlan数据所关联的runPlanTemplate存在 + */ + private void checkRunPlan(Long mapId) { + //确认runPlanLoad数据存在 + RunPlanLoadExample example = new RunPlanLoadExample(); + example.createCriteria().andMapIdEqualTo(mapId); + List runPlanLoads = runPlanLoadDAO.selectByExample(example); + BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(!CollectionUtils.isEmpty(runPlanLoads)); + //整理需确认存在的runPlanTemplate数据的id + SchedulingPlanExample schedulingPlanExample = new SchedulingPlanExample(); + schedulingPlanExample.createCriteria().andMapIdEqualTo(mapId); + List schedulingPlans = schedulingPlanDAO.selectByExample(schedulingPlanExample); + + Set templatePlanIds = runPlanLoads.stream().map(RunPlanLoad::getTemplatePlanId).collect(Collectors.toSet()); + templatePlanIds.addAll(schedulingPlans.stream().map(SchedulingPlan::getRunPlanId).collect(Collectors.toSet())); + + //确认关联的runPlanTemplate数据存在 + RunPlanTemplateExample runPlanTemplateExample = new RunPlanTemplateExample(); + runPlanTemplateExample.createCriteria().andIdIn(new ArrayList<>(templatePlanIds)); + BusinessExceptionAssertEnum.DATA_NOT_EXIST.assertTrue(Objects.equals(runPlanTemplateDAO.countByExample(runPlanTemplateExample), (long) templatePlanIds.size())); + } +} diff --git a/src/main/java/club/joylink/rtss/services/RunPlanDraftService.java b/src/main/java/club/joylink/rtss/services/RunPlanDraftService.java new file mode 100644 index 000000000..754b0607b --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/RunPlanDraftService.java @@ -0,0 +1,1172 @@ +package club.joylink.rtss.services; + +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import com.joylink.base.exception.BusinessException; +import com.joylink.base.exception.DBException; +import com.joylink.base.exception.constant.ExceptionMapping; +import club.joylink.rtss.simulation.cbtc.GroupSimulationService; +import club.joylink.rtss.constants.BusinessConsts; +import club.joylink.rtss.dao.MpStationRunningDAO; +import club.joylink.rtss.dao.RealLineDAO; +import club.joylink.rtss.dao.RunPlanDraftDAO; +import club.joylink.rtss.dao.RunPlanLevelDAO; +import club.joylink.rtss.entity.*; +import club.joylink.rtss.runplan.*; +import club.joylink.rtss.runplan.newdraw.RunPlanGenerator; +import club.joylink.rtss.runplan.newdraw.RunPlanInput; +import club.joylink.rtss.runplan.newrunplan.*; +import club.joylink.rtss.simulation.GroupSimulationManager; +import club.joylink.rtss.simulation.SimulationConstructData; +import club.joylink.rtss.simulation.constant.SimulationType; +import club.joylink.rtss.simulation.util.SimulationIdGenerator; +import club.joylink.rtss.util.ConvertUtil; +import club.joylink.rtss.util.JsonUtils; +import club.joylink.rtss.vo.LoginUserInfoVO; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.map.*; +import club.joylink.rtss.vo.client.map.newmap.*; +import club.joylink.rtss.vo.client.runplan.*; +import lombok.extern.slf4j.Slf4j; +import org.springframework.util.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.time.LocalDateTime; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; + +import static club.joylink.rtss.constants.BusinessConsts.RunPlan.DirectionType; + +@Service +@Slf4j +public class RunPlanDraftService implements IRunPlanDraftService { + + @Autowired + private RunPlanDraftDAO runPlanDraftDAO; + + @Autowired + private IMapService iMapService; + + @Autowired + private IRunPlanTemplateService iRunPlanTemplateService; + + @Autowired + private MpStationRunningDAO stationRunningDAO; + + @Autowired + private RunPlanLevelDAO runPlanLevelDAO; + + @Autowired + private GroupSimulationManager groupSimulationManager; + + @Autowired + private GroupSimulationService groupSimulationService; + + @Autowired + private ISysUserService iSysUserService; + + @Autowired + private RealLineDAO realLineDAO; + + @Override + @Transactional + public String create(RunPlanVO runPlanVO, UserVO userVO) { + checkNameRepeat(null, runPlanVO.getName(), runPlanVO.getMapId(), userVO); + RunPlanDraft draftPlan = runPlanVO.convert2Draft(); + draftPlan.setCreateTime(LocalDateTime.now()); + draftPlan.setCreatorId(userVO.getId()); + draftPlan.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_01); + runPlanDraftDAO.insert(draftPlan); + return ConvertUtil.long2Str(draftPlan.getId()); + } + + @Override + @Transactional + public RunPlanEChartsDataVO createCommon(Long id, RunPlanInput runPlanInput) { + RunPlanDraft draftPlan = runPlanDraftDAO.selectByPrimaryKey(id); + MapVO mapVO = this.iMapService.getMapDetail(draftPlan.getMapId()); + List runPlanTrips = RunPlanGenerator.generatorTrips(runPlanInput, mapVO); + draftPlan.setTrips(JsonUtils.writeValueAsString(runPlanTrips)); + draftPlan.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_01); + runPlanDraftDAO.updateByPrimaryKeyWithBLOBs(draftPlan); + return new RunPlanEChartsDataVO(runPlanTrips); + } + + @Override + public void updateName(Long id, String name, UserVO userVO) { + RunPlanDraft planDraft = runPlanDraftDAO.selectByPrimaryKey(id); + checkNameRepeat(id, name, planDraft.getMapId(), userVO); + planDraft.setName(name); + planDraft.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_01); + runPlanDraftDAO.updateByPrimaryKey(planDraft); + } + + @Override + public String createFrom(Long templateId, String name, UserVO userVO) { + RunPlanVO runPlanVO = iRunPlanTemplateService.getRunPlan(templateId); + checkNameRepeat(null, name, runPlanVO.getMapId(), userVO); + RunPlanDraft planDraft = new RunPlanDraft(); + planDraft.setMapId(runPlanVO.getMapId()); + planDraft.setName(name); + planDraft.setCreatorId(userVO.getId()); + planDraft.setCreateTime(LocalDateTime.now()); + planDraft.setTrips(JsonUtils.writeValueAsString(runPlanVO.getTripList())); + planDraft.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_01); + runPlanDraftDAO.insert(planDraft); + return ConvertUtil.long2Str(planDraft.getId()); + } + + @Override + public List selectOrdinateByMapId(Long mapId) { + //查询数据 + MapVO mapVo = this.iMapService.getMapDetail(mapId); + if (mapVo.isDrawWay()) { + return mapVo.findSortedAllStationListNew(); + } + return mapVo.findSortedAllStationList(); + } + + @Override + public RunPlanEChartsDataVO selectDiagramData(Long planId) { + RunPlanVO planVO = getRunPlanById(planId); + return new RunPlanEChartsDataVO(planVO.getTripList()); + } + + @Override + public void deleteDiagramDraftData(Long planId, UserVO userVO) { + RunPlanDraft runPlanDraft = runPlanDraftDAO.selectByPrimaryKey(planId); + if (!Objects.equals(runPlanDraft.getCreatorId(), userVO.getId())) { + throw new BusinessException(ExceptionMapping.ILLEGAL_OPERATION); + } + runPlanDraftDAO.deleteByPrimaryKey(planId); + } + + @Transactional + @Override + public void publish(Long planId, UserVO userVO) { + RunPlanDraft runPlanDraft = runPlanDraftDAO.selectByPrimaryKey(planId); + if (Objects.isNull(runPlanDraft)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + if (StringUtils.isBlank(runPlanDraft.getTrips())) { + throw new BusinessException(ExceptionMapping.ILLEGAL_OPERATION, "运行图车次数据为空,请检查!"); + } + if (iSysUserService.isAdmin(userVO)) { + RunPlanVO runPlanVO = new RunPlanVO(runPlanDraft); + runPlanVO.setTripList(JsonUtils.read(runPlanDraft.getTrips(), JsonUtils.getCollectionType(List.class, RunPlanTripVO.class))); + iRunPlanTemplateService.draftPublish(runPlanVO, userVO); + runPlanDraft.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_03); + } else { + runPlanDraft.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_02); + } + runPlanDraftDAO.updateByPrimaryKey(runPlanDraft); + } + + @Transactional + @Override + public void directPublish(Long planId, String runPlanName, UserVO userVO) { + RunPlanDraft runPlanDraft = runPlanDraftDAO.selectByPrimaryKey(planId); + if (Objects.isNull(runPlanDraft)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + if (StringUtils.isBlank(runPlanDraft.getTrips())) { + throw new BusinessException(ExceptionMapping.ILLEGAL_OPERATION, "运行图车次数据为空,请检查!"); + } + RunPlanVO runPlanVO = new RunPlanVO(runPlanDraft); + if(StringUtils.hasText(runPlanName)) runPlanVO.setName(runPlanName); + runPlanVO.setTripList(JsonUtils.read(runPlanDraft.getTrips(), JsonUtils.getCollectionType(List.class, RunPlanTripVO.class))); + iRunPlanTemplateService.draftPublish(runPlanVO, userVO); + runPlanDraft.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_03); + runPlanDraftDAO.updateByPrimaryKey(runPlanDraft); + } + + @Override + @Transactional + public void importRunPlan(Long mapId, List runPlanImportList, UserVO userVO) { + String name = "真实运行图"; + checkNameRepeat(null, name, mapId, userVO); + // 查询车站数据(车站 --- 站台 --- 站台轨) + MapVO mapVO = this.iMapService.getMapDetail(mapId); + List tripVOList; + + if (mapVO.isDrawWay()) { + List stationList = this.prepareStationDataNew(mapVO); + if (CollectionUtils.isEmpty(stationList)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + // 查询目的地码-区段code关系 + Map sectionMap = mapVO.getGraphDataNew().getSectionList().stream() + .filter(mapSectionVO -> StringUtils.hasText(mapSectionVO.getDestinationCode())) + .collect(Collectors.toMap(MapSectionNewVO::getDestinationCode, Function.identity())); + // 导入数据校验并预处理 + IRunPlanStrategyNew runPlanStrategy; + //获取线路上行对应方向 + String upDirection = null; + RealLineExample example = new RealLineExample(); + example.createCriteria().andCodeEqualTo(mapVO.getLineCode()); + List realLineList = this.realLineDAO.selectByExampleWithBLOBs(example); + if (!CollectionUtils.isEmpty(realLineList)) { + String configData = realLineList.get(0).getConfigData(); + + RealLineConfigVO realLineConfigVO = RealLineConfigVO.parseJsonStr(configData); + if (realLineConfigVO.getUpRight()) { + upDirection = BusinessConsts.RealLine.Direction.RIGHT; + } else { + upDirection = BusinessConsts.RealLine.Direction.LEFT; + } + } + switch (mapVO.getLineCode()) { + case "01": + runPlanStrategy = new ChengDuLine1RunPlanNew(); + break; + case "02": + runPlanStrategy = new FuZhouLine1RunPlanNew(); + break; + case "03": + runPlanStrategy = new BeiJingLine1RunPlanNew(); + break; + case "04": + runPlanStrategy = new ChengDuLine3RunPlanNew(); + break; + case "06": + runPlanStrategy = new NingBoLine1RunPlanNew(); + break; + case "07": + runPlanStrategy = new HarBinLine1RunPlanNew(); + break; + case "08": + runPlanStrategy = new FoshanTramRunPlanNew(); + break; + case "09": + runPlanStrategy = new XianLine2RunPlanNew(); + break; + case "10": + runPlanStrategy = new XianLine1RunPlanNew(); + break; + case "11": + case "12": //宁波三测试图 + runPlanStrategy = new XianLine3RunPlanNew(); + break; + default: + runPlanStrategy = new DefaultRunPlanNew(); + break; + } + runPlanStrategy.importDataCheckAndPreHandle(runPlanImportList, stationList, upDirection); + // 生成到站计划数据 + tripVOList = runPlanStrategy.parseRunPlanImport(runPlanImportList, sectionMap, upDirection); + + } else { + List stationList = this.prepareStationData(mapVO); + if (CollectionUtils.isEmpty(stationList)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + // 查询目的地码-区段code关系 + Map sectionMap = mapVO.getGraphData().getSectionList().stream() + .filter(mapSectionVO -> StringUtils.hasText(mapSectionVO.getDestinationCode())) + .collect(Collectors.toMap(MapSectionVO::getDestinationCode, MapSectionVO::getCode)); + // 导入数据校验并预处理 + IRunPlanStrategy runPlanStrategy; + switch (mapVO.getLineCode()) { + case "02": + runPlanStrategy = new FuZhouLine1RunPlan(); + sectionMap.put("217", "Section_134_0.98324"); + break; + case "03": + runPlanStrategy = new BeiJingLine1RunPlan(); + break; + case "04": + runPlanStrategy = new ChengDuLine3RunPlan(); + break; + default: + runPlanStrategy = new DefaultRunPlan(); + break; + } + runPlanStrategy.importDataCheckAndPreHandle(runPlanImportList, stationList); + // 生成到站计划数据 + tripVOList = runPlanStrategy.parseRunPlanImport(runPlanImportList, sectionMap); + } + // 生成计划对象 + RunPlanDraft plan = new RunPlanDraft(); + plan.setMapId(mapId); + plan.setName(name); + plan.setCreatorId(userVO.getId()); + plan.setCreateTime(LocalDateTime.now()); + plan.setTrips(JsonUtils.writeValueAsString(tripVOList)); + plan.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_01); + this.runPlanDraftDAO.insert(plan); + } + + @Override + public List queryListByMapId(Long mapId, UserVO userVO) { + RunPlanDraftExample draftExample = new RunPlanDraftExample(); + draftExample.createCriteria().andMapIdEqualTo(mapId).andCreatorIdEqualTo(userVO.getId()); + List draftList = this.runPlanDraftDAO.selectByExample(draftExample); + return RunPlanVO.convertDraft2VOList(draftList); + } + + @Override + public List getStationRunningDate(Long mapId, UserVO userVO) { + // 查询站间运行数据 + MpStationRunningExample stationRunningExample = new MpStationRunningExample(); + stationRunningExample.createCriteria().andMapIdEqualTo(mapId); + List stationRunningList = this.stationRunningDAO.selectByExample(stationRunningExample); + if (CollectionUtils.isEmpty(stationRunningList)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST, "站间运行数据不存在!"); + } + List stationRunningVOList = new ArrayList<>(); + stationRunningList.forEach(stationRunning -> { + MapStationRunningVO stationRunningVO = new MapStationRunningVO(stationRunning); + RunPlanLevelExample levelExample = new RunPlanLevelExample(); + levelExample.createCriteria().andStationRunningIdEqualTo(stationRunning.getId()) + .andUserIdEqualTo(userVO.getId()); + List levelList = this.runPlanLevelDAO.selectByExample(levelExample); + if (!CollectionUtils.isEmpty(levelList)) { + stationRunningVO.setRunPlanLevelVO(new RunPlanLevelVO(levelList.get(0))); + } + stationRunningVOList.add(stationRunningVO); + }); + return stationRunningVOList; + } + + @Override + public List getStationRunLevel(Long mapId) { + return this.iMapService.getMapDetail(mapId).getLogicDataNew().getRunLevelList(); + } + + @Override + public List getStationParkingTimeList(Long mapId) { + return this.iMapService.getMapDetail(mapId).getLogicDataNew().getParkingTimeList(); + } + + @Override + @Transactional + public void setStationRunningTime(Long mapId, List runPlanLevelVOList, UserVO userVO) { + // 查询站间运行数据 + MpStationRunningExample stationRunningExample = new MpStationRunningExample(); + stationRunningExample.createCriteria().andMapIdEqualTo(mapId); + List stationRunningList = this.stationRunningDAO.selectByExample(stationRunningExample); + if (CollectionUtils.isEmpty(stationRunningList)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST, "站间运行数据不存在!"); + } + Map levelVOMap = runPlanLevelVOList.stream() + .collect(Collectors.toMap(RunPlanLevelVO::getStationRunningId, Function.identity())); + stationRunningList.forEach(stationRunning -> { + // 查询运行等级 + RunPlanLevelExample levelExample = new RunPlanLevelExample(); + levelExample.createCriteria().andStationRunningIdEqualTo(stationRunning.getId()).andUserIdEqualTo(userVO.getId()); + List levelList = this.runPlanLevelDAO.selectByExample(levelExample); + RunPlanLevelVO levelVO = levelVOMap.get(ConvertUtil.long2Str(stationRunning.getId())); + levelVO.setUserId(userVO.getId()); + if (CollectionUtils.isEmpty(levelList)) { // 新增 + RunPlanLevel runPlanLevel = levelVO.convert2DB(); + this.runPlanLevelDAO.insert(runPlanLevel); + } else { // 更新 + RunPlanLevel level = levelList.get(0); + if (levelVO.compareToDB(level)) { // 比较 + levelVO.updateDB(level); + this.runPlanLevelDAO.updateByPrimaryKeySelective(level); + } + } + }); +// List stationRunningIdList = stationRunningList.stream().map(MpStationRunning::getId).collect(Collectors.toList()); +// // 查询运行等级 +// RunPlanLevelExample levelExample = new RunPlanLevelExample(); +// levelExample.createCriteria().andStationRunningIdIn(stationRunningIdList).andUserIdEqualTo(userVO.getId()); +// List levelList = this.runPlanLevelDAO.selectByExample(levelExample); +// if(CollectionUtils.isEmpty(levelList)) { // 新增 +// runPlanLevelVOList.forEach(runPlanLevelVO -> { +// runPlanLevelVO.setUserId(userVO.getId()); +// RunPlanLevel runPlanLevel = runPlanLevelVO.convert2DB(); +// this.runPlanLevelDAO.insert(runPlanLevel); +// }); +// }else { // 更新 +// List runPlanLevels = new ArrayList<>(); +// levelList.forEach(level -> runPlanLevelVOList.forEach(levelVO -> { +// if(levelVO.compareToDB(level)) { +// levelVO.updateDB(level); +// runPlanLevels.add(level); +// } +// })); +// runPlanLevels.forEach(level -> this.runPlanLevelDAO.updateByPrimaryKeySelective(level)); +// } + } + + @Override + @Transactional + public void deleteRunPlanLevelByStationRunningId(List stationRunningIdList) { + if (CollectionUtils.isEmpty(stationRunningIdList)) { + return; + } + RunPlanLevelExample levelExample = new RunPlanLevelExample(); + levelExample.createCriteria().andStationRunningIdIn(stationRunningIdList); + this.runPlanLevelDAO.deleteByExample(levelExample); + } + + + @Override + public boolean ifServerExists(Long planId, String serviceNumber) { + return ifServerExists(getRunPlanById(planId), serviceNumber); + } + + private boolean ifServerExists(RunPlanVO planVO, String serviceNumber) { + // 判断服务号是否已存在 + if (!CollectionUtils.isEmpty(planVO.getTripList())) { + return planVO.getTripList().stream().anyMatch(runPlanTripVO -> runPlanTripVO.getServiceNumber().equals(serviceNumber)); + } + return false; + } + + @Override + public List getRoutingList(Long planId) { + RunPlanVO planVO = getRunPlanById(planId); + MapVO mapVO = this.iMapService.getMapDetail(planVO.getMapId()); + if (mapVO.isDrawWay()) { + return mapVO.getLogicDataNew().getRoutingList(); + } + return mapVO.getLogicData().getRoutingList(); + } + + @Override + public Object queryRoutingBySDTNumber(Long planId, String SDTNumber) { + RunPlanVO planVO = this.getRunPlanById(planId); + RunPlanTripVO trip = planVO.getTripList().stream() + .filter(tripVO -> tripVO.getSDTNumberNew().equals(SDTNumber)) + .findFirst() + .orElseThrow(() -> new DBException(ExceptionMapping.DATA_NOT_EXIST)); + MapVO mapVO = this.iMapService.getMapDetail(planVO.getMapId()); + return mapVO.findRoutingBySection(trip.getStartSectionCode(), trip.getEndSectionCode()); + } + + @Override + public List getRoutingSectionList(Long planId, String routingCode) { + RunPlanDraft runPlanDraft = runPlanDraftDAO.selectByPrimaryKey(planId); + MapVO mapVO = this.iMapService.getMapDetail(runPlanDraft.getMapId()); + if(mapVO.isDrawWay()){ + + MapRoutingDataVO routingVO = mapVO.findRoutingDataByCode(routingCode); + if (Objects.nonNull(routingVO)) { + return routingVO.getParkSectionCodeList(); + } + + }else{ + MapRoutingVO routingVO = mapVO.findRoutingByCode(routingCode); + if (Objects.nonNull(routingVO)) { + return routingVO.getRoutingSectionList(); + } + } + return new ArrayList<>(); + } + + //TODO + @Override + @Transactional + public void addRunPlanService(Long planId, RunPlanServiceConfigVO serviceConfig, UserVO userVO) { + RunPlanVO planVO = getRunPlanById(planId); + // 判断服务号是否已存在 +// if (this.ifServerExists(planVO, serviceConfig.getServiceNumber())) { +// // TODO 若存在,删除 合并后期处理 +// this.deleteRunPlanService(planId, serviceConfig.getServiceNumber(), userVO); + planVO.getTripList().removeAll(planVO.getTripList().stream().filter(tripVO -> tripVO.getServiceNumber().equals(serviceConfig.getServiceNumber())).collect(Collectors.toList())); +// } + // 查询上/下行最大车次号 + int maxUpTripNumber = 0; //新地图右行,后续再修改变量 + int maxDownTripNumber = 0; //新地图左行,后续再修改变量 + MapVO mapVO = this.iMapService.getMapDetail(planVO.getMapId()); +// String tripNumber = ""; + List newTripList = new ArrayList<>(); + if(mapVO.isDrawWay()){ + for (RunPlanTripConfigVO tripConfigVO : serviceConfig.getTripConfigList()) { + // 查询交路 + MapRoutingDataVO routingData = mapVO.findRoutingDataByCode(tripConfigVO.getRoutingCode()); + RunPlanTripVO tripVO = new RunPlanTripVO(tripConfigVO, routingData); + if(mapVO.getConfigVO().getUpRight()){ + if(routingData.getRight()){ +// tripNumber = String.format("%03d", ++maxUpTripNumber); + tripVO.setDirectionCode(DirectionType.Type02); + }else{ +// tripNumber = String.format("%03d", ++maxDownTripNumber); + tripVO.setDirectionCode(DirectionType.Type01); + } + }else{ + if(routingData.getRight()){ +// tripNumber = String.format("%03d", ++maxDownTripNumber); + tripVO.setDirectionCode(DirectionType.Type01); + }else{ +// tripNumber = String.format("%03d", ++maxUpTripNumber); + tripVO.setDirectionCode(DirectionType.Type02); + } + } + // 构建类车到站数据 +// tripVO.setTripNumber(tripVO.getDirectionCode() + tripNumber); + tripVO.setServiceNumber(serviceConfig.getServiceNumber()); + //增加方向码 + + List arriveConfigList = tripConfigVO.getArriveConfigList(); + arriveConfigList.stream().map(RunPlanTripTimeVO::new).forEach(timeVO -> tripVO.getTimeList().add(timeVO)); + newTripList.add(tripVO); + } + }else{ + for (RunPlanTripConfigVO tripConfigVO : serviceConfig.getTripConfigList()) { + // 查询交路 + MapRoutingVO routing = mapVO.findRoutingByCode(tripConfigVO.getRoutingCode()); +// if (DirectionType.Type02.equals(routing.getDirectionCode())) { +// tripNumber = DirectionType.Type02 + String.format("%03d", ++maxUpTripNumber); +// } else if (DirectionType.Type01.equals(routing.getDirectionCode())) { +// tripNumber = DirectionType.Type01 + String.format("%03d", ++maxDownTripNumber); +// } + RunPlanTripVO tripVO = new RunPlanTripVO(tripConfigVO, routing); + // 构建类车到站数据 +// tripVO.setTripNumber(tripNumber); + tripVO.setServiceNumber(serviceConfig.getServiceNumber()); + List arriveConfigList = tripConfigVO.getArriveConfigList(); + arriveConfigList.stream().map(RunPlanTripTimeVO::new).forEach(timeVO -> tripVO.getTimeList().add(timeVO)); + newTripList.add(tripVO); + } + } + + // 添加数据 + this.sortAndResetServiceTripNumber(newTripList); + planVO.getTripList().addAll(newTripList); + RunPlanDraft planDraft = planVO.convert2Draft(); + planDraft.setTrips(JsonUtils.writeValueAsString(planVO.getTripList())); + planDraft.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_01); + runPlanDraftDAO.updateByPrimaryKeySelective(planDraft); + } + + @Override + @Transactional + public void updateRunPlanService(Long planId, String serviceNumber, RunPlanServiceConfigVO serviceConfig, UserVO userVO) { + // 判断服务号是否已存在 +// if (!this.ifServerExists(planId, serviceNumber)) { +// return; +// } +// RunPlanVO runPlanVO = getRunPlanById(planId); +// runPlanVO.getTripList().removeAll(runPlanVO.getTripList().stream().filter(tripVO -> tripVO.getServiceNumber().equals(serviceNumber)).collect(Collectors.toList())); +// this.deleteRunPlanService(planId, serviceNumber, userVO); + serviceConfig.setServiceNumber(serviceNumber); + this.addRunPlanService(planId, serviceConfig, userVO); + } + + @Override + @Transactional + public void deleteRunPlanService(Long planId, String serviceNumber, UserVO userVO) { + // 判断服务号是否已存在 + if (!this.ifServerExists(planId, serviceNumber)) { + return; + } + RunPlanVO runPlanVO = getRunPlanById(planId); + runPlanVO.getTripList().removeAll(runPlanVO.getTripList().stream().filter(tripVO -> tripVO.getServiceNumber().equals(serviceNumber)).collect(Collectors.toList())); +// this.sortAndResetTripNumber(runPlanVO); + RunPlanDraft planDraft = runPlanVO.convert2Draft(); + planDraft.setTrips(JsonUtils.writeValueAsString(runPlanVO.getTripList())); + planDraft.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_01); + runPlanDraftDAO.updateByPrimaryKeySelective(planDraft); + } + + @Override + @Transactional + public void copyRunPlanService(Long planId, String serviceNumber, RunPlanServiceConfigVO serviceConfig, UserVO userVO) { + if (!this.ifServerExists(planId, serviceNumber)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + // 数据校验 + if (serviceConfig.getTimes() < 1 || serviceConfig.getIntervals() < 30) { + throw new BusinessException(ExceptionMapping.ARGUMENT_ILLEGAL); + } + RunPlanVO planVO = getRunPlanById(planId); + String max = planVO.getTripList().stream().map(RunPlanTripVO::getServiceNumber).max(Comparator.naturalOrder()).orElse(""); + // 查询最大服务号 + int maxServiceNumber = ConvertUtil.str2Int(max, 0); + List tripVOList = planVO.getTripList().stream() + .filter(tripVO -> tripVO.getServiceNumber().equals(serviceNumber)) + .sorted(Comparator.comparing(tripVO -> tripVO.getTimeList().get(0).getArrivalTime())) + .collect(Collectors.toList()); + int seconds; + for (int i = 1; i <= serviceConfig.getTimes(); ++i) { + List trips = new ArrayList<>(); + ++maxServiceNumber; + String newServiceNumber = String.format("%03d", maxServiceNumber); + seconds = i * serviceConfig.getIntervals(); + // 添加到站数据 + for (RunPlanTripVO tripVO : tripVOList) { + RunPlanTripVO planTripVO = new RunPlanTripVO(); + planTripVO.setServiceNumber(newServiceNumber); + planTripVO.setTripNumber(tripVO.getTripNumber()); + planTripVO.setDirectionCode(tripVO.getDirectionCode()); + planTripVO.setRight(tripVO.getRight()); + planTripVO.setDestinationCode(tripVO.getDestinationCode()); + planTripVO.setStartSectionCode(tripVO.getStartSectionCode()); + planTripVO.setStartTime(tripVO.getStartTime().plusSeconds(seconds)); + planTripVO.setEndSectionCode(tripVO.getEndSectionCode()); + planTripVO.setEndTime(tripVO.getEndTime().plusSeconds(seconds)); + planTripVO.setIsReentry(tripVO.getIsReentry()); + planTripVO.setIsOutbound(tripVO.getIsOutbound()); + planTripVO.setIsInbound(tripVO.getIsInbound()); + planTripVO.setIsBackUp(tripVO.getIsBackUp()); + List timeVOList = new ArrayList<>(); + planTripVO.setTimeList(timeVOList); + for (RunPlanTripTimeVO timeVO : tripVO.getTimeList()) { + RunPlanTripTimeVO tripTimeVO = new RunPlanTripTimeVO(); + tripTimeVO.setStationCode(timeVO.getStationCode()); + tripTimeVO.setSectionCode(timeVO.getSectionCode()); + if (serviceConfig.isForward()) { + tripTimeVO.setArrivalTime(timeVO.getArrivalTime().minusSeconds(seconds)); + tripTimeVO.setDepartureTime(timeVO.getDepartureTime().minusSeconds(seconds)); + } else { + tripTimeVO.setArrivalTime(timeVO.getArrivalTime().plusSeconds(seconds)); + tripTimeVO.setDepartureTime(timeVO.getDepartureTime().plusSeconds(seconds)); + } + timeVOList.add(tripTimeVO); + } + trips.add(planTripVO); + } + this.sortAndResetServiceTripNumber(trips); + planVO.getTripList().addAll(trips); + } + RunPlanDraft planDraft = planVO.convert2Draft(); + planDraft.setTrips(JsonUtils.writeValueAsString(planVO.getTripList())); + planDraft.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_01); + runPlanDraftDAO.updateByPrimaryKeySelective(planDraft); + } + + /**修改服务号号*/ + @Override + public void updateRunPlanServiceNumber(Long planId, String oldServiceNumber, String serviceNumber) { + RunPlanVO runPlanVO = getRunPlanById(planId); + runPlanVO.getTripList().forEach(tripVO -> { + if (tripVO.getServiceNumber().equals(oldServiceNumber)) { + tripVO.setServiceNumber(serviceNumber); + } + }); + RunPlanDraft planDraft = runPlanVO.convert2Draft(); + planDraft.setTrips(JsonUtils.writeValueAsString(runPlanVO.getTripList())); + planDraft.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_01); + runPlanDraftDAO.updateByPrimaryKeySelective(planDraft); + } + + @Override + @Transactional + public void addRunPlanTrip(Long planId, String serviceNumber, RunPlanTripConfigVO tripConfig, UserVO userVO) { + RunPlanVO planVO = getRunPlanById(planId); + if (!this.ifServerExists(planVO, serviceNumber)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + this.addTrip(planVO, serviceNumber, tripConfig); + } + + @Override + @Transactional + public void updateRunPlanTrip(Long planId, String SDTNumber, RunPlanTripConfigVO tripConfig, UserVO userVO) { + RunPlanVO runPlanVO = getRunPlanById(planId); + RunPlanTripVO del = runPlanVO.getTripList().stream() + .filter(tripVO -> { + if (tripVO.getSDTNumberNew().equals(SDTNumber)) { + return true; + } + return false; + }) + .findFirst().orElseThrow(() -> new DBException(ExceptionMapping.DATA_NOT_EXIST)); + runPlanVO.getTripList().remove(del); + // 添加车次 +// this.updateTrip(runPlanVO, del, tripConfig); +// RunPlanDraft planDraft = runPlanVO.convert2Draft(); +// planDraft.setTrips(JsonUtils.writeValueAsString(runPlanVO.getTripList())); +// planDraft.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_01); +// runPlanDraftDAO.updateByPrimaryKeySelective(planDraft); + this.addTrip(runPlanVO, del.getServiceNumber(), tripConfig); + } + + /**修改车次号*/ + @Override + public void updateRunPlanTripNumber(Long planId, String SDTNumber, String tripNumber) { + RunPlanVO runPlanVO = getRunPlanById(planId); + for (RunPlanTripVO tripVO : runPlanVO.getTripList()) { + if (tripVO.getSDTNumberNew().equals(SDTNumber)) { + tripVO.setTripNumber(tripNumber); + break; + } + } + RunPlanDraft planDraft = runPlanVO.convert2Draft(); + planDraft.setTrips(JsonUtils.writeValueAsString(runPlanVO.getTripList())); + planDraft.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_01); + runPlanDraftDAO.updateByPrimaryKeySelective(planDraft); + } + + /** 添加车次号(不校验服务号)*/ + private void addTrip(RunPlanVO runPlanVO, String serviceNumber, RunPlanTripConfigVO tripConfig) { + MapVO mapVO = this.iMapService.getMapDetail(runPlanVO.getMapId()); + String tripNumber = "000"; + RunPlanTripVO tripVO; + if (mapVO.isDrawWay()) { + // 查询交路 + MapRoutingDataVO routing = mapVO.findRoutingDataByCode(tripConfig.getRoutingCode()); + // 构建类车到站数据 + tripVO = new RunPlanTripVO(tripConfig, routing); + setDirectionCode(mapVO.getConfigVO().getUpRight(), tripVO); + } else { + // 查询交路 + MapRoutingVO routing = mapVO.findRoutingByCode(tripConfig.getRoutingCode()); + // 构建类车到站数据 + tripVO = new RunPlanTripVO(tripConfig, routing); + } + tripVO.setServiceNumber(serviceNumber); + tripVO.setTripNumber(tripVO.getDirectionCode() + tripNumber); + tripConfig.getArriveConfigList().stream().map(RunPlanTripTimeVO::new).forEach(timeVO -> tripVO.getTimeList().add(timeVO)); + if (CollectionUtils.isEmpty(runPlanVO.getTripList())) { + runPlanVO.setTripList(new ArrayList<>()); + } + runPlanVO.getTripList().add(tripVO); + List list = runPlanVO.getTripList().stream() + .filter(tr -> Objects.equals(tr.getServiceNumber(), serviceNumber)) + .sorted(Comparator.comparing(tr -> tr.getTimeList().get(0).getArrivalTime())) + .collect(Collectors.toList()); + this.sortAndResetServiceTripNumber(list); + RunPlanDraft planDraft = runPlanVO.convert2Draft(); + planDraft.setTrips(JsonUtils.writeValueAsString(runPlanVO.getTripList())); + planDraft.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_01); + runPlanDraftDAO.updateByPrimaryKeySelective(planDraft); + } + + /*** 修改车次号(不校验服务号)*/ + private void updateTrip(RunPlanVO runPlanVO, RunPlanTripVO tripVO0, RunPlanTripConfigVO tripConfig) { + MapVO mapVO = this.iMapService.getMapDetail(runPlanVO.getMapId()); + if(mapVO.isDrawWay()){ + + // 查询交路 + MapRoutingDataVO routing = mapVO.findRoutingDataByCode(tripConfig.getRoutingCode()); + String tripNumber = "000"; + // 构建类车到站数据 + RunPlanTripVO tripVO = new RunPlanTripVO(tripConfig, routing); + tripVO.setServiceNumber(tripVO0.getServiceNumber()); + setDirectionCode(mapVO.getConfigVO().getUpRight(),tripVO); + tripVO.setTripNumber(tripVO0.getTripNumber()); + tripVO.setIsReentry(tripVO0.getIsReentry()); + tripVO.setIsOutbound(tripVO0.getIsOutbound()); + tripVO.setIsInbound(tripVO0.getIsInbound()); + tripVO.setIsBackUp(tripVO0.getIsBackUp()); + tripConfig.getArriveConfigList().stream().map(RunPlanTripTimeVO::new).forEach(timeVO -> tripVO.getTimeList().add(timeVO)); + if (CollectionUtils.isEmpty(runPlanVO.getTripList())) { + runPlanVO.setTripList(new ArrayList<>()); + } + runPlanVO.getTripList().add(tripVO); + + }else{ + + // 查询交路 + MapRoutingVO routing = mapVO.findRoutingByCode(tripConfig.getRoutingCode()); + String tripNumber = "000"; + // 构建类车到站数据 + RunPlanTripVO tripVO = new RunPlanTripVO(tripConfig, routing); + tripVO.setServiceNumber(tripVO0.getServiceNumber()); + tripVO.setTripNumber(tripVO0.getTripNumber()); + tripVO.setIsReentry(tripVO0.getIsReentry()); + tripVO.setIsOutbound(tripVO0.getIsOutbound()); + tripVO.setIsInbound(tripVO0.getIsInbound()); + tripVO.setIsBackUp(tripVO0.getIsBackUp()); + tripConfig.getArriveConfigList().stream().map(RunPlanTripTimeVO::new).forEach(timeVO -> tripVO.getTimeList().add(timeVO)); + if (CollectionUtils.isEmpty(runPlanVO.getTripList())) { + runPlanVO.setTripList(new ArrayList<>()); + } + runPlanVO.getTripList().add(tripVO); + } + } + + private void setDirectionCode(Boolean upRight, RunPlanTripVO runPlanTripVO) { + if (runPlanTripVO.getRight()) { + + if (upRight) { + runPlanTripVO.setDirectionCode(BusinessConsts.RunPlan.DirectionType.Type02); + } else { + runPlanTripVO.setDirectionCode(BusinessConsts.RunPlan.DirectionType.Type01); + } + } else { + if (upRight) { + runPlanTripVO.setDirectionCode(BusinessConsts.RunPlan.DirectionType.Type01); + } else { + runPlanTripVO.setDirectionCode(BusinessConsts.RunPlan.DirectionType.Type02); + } + } + + } + @Override + @Transactional + public void deleteRunPlanTrip(Long planId, String SDTNumber, boolean deleteBefore, UserVO userVO) { +// if (SDTNumber.length() != 6 && SDTNumber.length() != 7) { +// throw new BusinessException(ExceptionMapping.ARGUMENT_ILLEGAL); +// } + RunPlanVO runPlanVO = getRunPlanById(planId); + RunPlanTripVO tripVO = runPlanVO.getTripList().stream() + .filter(runPlanTripVO -> runPlanTripVO.getSDTNumberNew().equals(SDTNumber)) + .findFirst().orElseThrow(() -> new DBException(ExceptionMapping.DATA_NOT_EXIST)); + String serviceNumber = tripVO.getServiceNumber(); + List serviceList = runPlanVO.getTripList().stream() + .filter(runPlanTripVO -> runPlanTripVO.getServiceNumber().equals(serviceNumber)) + .sorted(Comparator.comparing(runPlanTripVO -> runPlanTripVO.getTimeList().get(0).getArrivalTime())) + .collect(Collectors.toList()); + runPlanVO.getTripList().removeAll(serviceList); + int i = serviceList.indexOf(tripVO); + if (deleteBefore) { + serviceList = i == serviceList.size() ? new ArrayList<>() : serviceList.subList(i + 1, serviceList.size()); + } else { + serviceList = serviceList.subList(0, i); + } + runPlanVO.getTripList().addAll(serviceList); +// this.sortAndResetTripNumber(runPlanVO); + this.sortAndResetServiceTripNumber(serviceList); + RunPlanDraft planDraft = runPlanVO.convert2Draft(); + planDraft.setTrips(JsonUtils.writeValueAsString(runPlanVO.getTripList())); + planDraft.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_01); + runPlanDraftDAO.updateByPrimaryKeySelective(planDraft); + } + + //TODO + private void sortAndResetServiceTripNumber(List newTripList) { + if (!CollectionUtils.isEmpty(newTripList)) { + int upTripNumber = 0; + int downTripNumber = 0; + newTripList.sort(Comparator.comparing(runPlanTripVO -> runPlanTripVO.getTimeList().get(0).getArrivalTime())); + for (int i = 0; i < newTripList.size(); i++) { + RunPlanTripVO tripVO = newTripList.get(i); + if (DirectionType.Type02.equals(tripVO.getDirectionCode())) { + tripVO.setTripNumber(tripVO.getDirectionCode() + String.format("%03d", ++upTripNumber)); + } else if (DirectionType.Type01.equals(tripVO.getDirectionCode())) { + tripVO.setTripNumber(tripVO.getDirectionCode() + String.format("%03d", ++downTripNumber)); + } + if (i == 0) { + tripVO.setIsOutbound(true); + tripVO.setIsInbound(true); + tripVO.setIsReentry(false); + } + if (newTripList.size() > 1) { + if (i == newTripList.size() - 1) { + tripVO.setIsInbound(true); + tripVO.setIsReentry(false); + tripVO.setIsOutbound(false); + } else if (i == 0) { + tripVO.setIsReentry(true); + tripVO.setIsInbound(false); + } else { + tripVO.setIsInbound(false); + tripVO.setIsReentry(true); + tripVO.setIsOutbound(false); + } + } + //是否为备用车 + tripVO.setIsBackUp(false); + } + } + + } + + /** + * 排序并重新设置车次号 + * + * @param runPlanVO + */ + public void sortAndResetTripNumber(RunPlanVO runPlanVO) { + if (!CollectionUtils.isEmpty(runPlanVO.getTripList())) { + int upTripNumber = 0; + int downTripNumber = 0; + runPlanVO.getTripList().sort(Comparator.comparing(runPlanTripVO -> runPlanTripVO.getTimeList().get(0).getArrivalTime())); + Map> listMap = runPlanVO.getTripList().stream().collect(Collectors.groupingBy(RunPlanTripVO::getServiceNumber)); + Set stringSet = listMap.keySet(); + for (String serviceNumber : stringSet) { + List tripList = listMap.get(serviceNumber); + for (int i = 0; i < tripList.size(); i++) { + RunPlanTripVO tripVO = tripList.get(i); + if (DirectionType.Type02.equals(tripVO.getDirectionCode())) { + tripVO.setTripNumber(tripVO.getDirectionCode()+ String.format("%03d", ++upTripNumber)); + } else if (DirectionType.Type01.equals(tripVO.getDirectionCode())) { + tripVO.setTripNumber(tripVO.getDirectionCode()+ String.format("%03d", ++downTripNumber)); + } + if (i == 0) { + tripVO.setIsOutbound(true); + tripVO.setIsInbound(true); + tripVO.setIsReentry(false); + } + if (tripList.size() > 1) { + if (i == tripList.size() - 1) { + tripVO.setIsInbound(true); + tripVO.setIsReentry(false); + tripVO.setIsOutbound(false); + } else if (i == 0) { + tripVO.setIsReentry(true); + tripVO.setIsInbound(false); + } else { + tripVO.setIsInbound(false); + tripVO.setIsReentry(true); + tripVO.setIsOutbound(false); + } + } + //是否为备用车 + tripVO.setIsBackUp(false); + } + } + // 车次号重新排序 +// List tripList = runPlanVO.getTripList(); + + } + RunPlanDraft planDraft = runPlanVO.convert2Draft(); + planDraft.setTrips(JsonUtils.writeValueAsString(runPlanVO.getTripList())); + planDraft.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_01); + runPlanDraftDAO.updateByPrimaryKeySelective(planDraft); + } + + //TODO 增加新数据校验 + @Override + public List dataCheck(Long planId) { + List errorList = new ArrayList<>(); + RunPlanVO planVO = getRunPlanById(planId); + if (CollectionUtils.isEmpty(planVO.getTripList())) { + errorList.add("运行图数据为空!"); + } +// Map> serviceMap = planVO.getTripList().stream().collect(Collectors.groupingBy(RunPlanTripVO::getServiceNumber)); +// MapVO mapVO = this.iMapService.getMapDetail(planVO.getMapId()); +// // 转换轨 +//// List transferTrackSectionList = mapVO.findTransferTrackList(); +//// List transferTrackSectionCodeList = transferTrackSectionList.stream().map(MapSectionVO::getCode).collect(Collectors.toList()); +// // 车次数据检查 +// serviceMap.forEach((serviceNumber, list) -> { +// list.sort(Comparator.comparing(runPlanTripVO -> runPlanTripVO.getTimeList().get(0).getArrivalTime())); +// // 检查出入库 +// if (Objects.isNull(list.get(0).getIsOutbound()) || !list.get(0).getIsOutbound()) { +// errorList.add(String.format("服务号 %s 没有出库数据!", serviceNumber)); +// } +// if (Objects.isNull(list.get(list.size() - 1).getIsInbound()) || !list.get(list.size() - 1).getIsInbound()) { +// errorList.add(String.format("服务号 %s 没有入库数据!", serviceNumber)); +// } +// // 检查方向,折返前后车站 +// for (int i = 0; i < list.size() - 1; i++) { +// RunPlanTripVO tripVO1 = list.get(i); +// RunPlanTripVO tripVO2 = list.get(i + 1); +//// if(transferTrackSectionCodeList.contains(tripVO1.getEndSectionCode()) +//// && transferTrackSectionCodeList.contains(sequenceDraft2.getStartSectionCode())) { +//// continue; +//// } +// // TODO +//// if(Objects.equals(tripVO1.getDirectionCode(), tripVO2.getDirectionCode())) { +//// String SDTNumber1 = tripVO1.getServiceNumber() + tripVO1.getDirectionCode() + tripVO1.getTripNumber(); +//// String SDTNumber2 = tripVO2.getServiceNumber() + tripVO2.getDirectionCode() + tripVO2.getTripNumber(); +//// errorList.add(String.format("车次号 %s 与车次号 %s 列车存在运行方向冲突!", SDTNumber1, SDTNumber2)); +//// } +//// if(!Objects.equals(sequenceDraft1.getEndSectionCode(), sequenceDraft2.getStartSectionCode())) { +//// String SDTNumber1 = sequenceDraft1.getServiceNumber() + sequenceDraft1.getDirectionCode() + sequenceDraft1.getTripNumber(); +//// String SDTNumber2 = sequenceDraft2.getServiceNumber() + sequenceDraft2.getDirectionCode() + sequenceDraft2.getTripNumber(); +//// errorList.add(String.format("车次号 %s 终点与车次号 %s 起点不一致!", SDTNumber1, SDTNumber2)); +//// } +// } +// }); +// // 检查运行时间 +//// List stationVOList = this.iMapService.getSortedStationListByMapSkin(runPlanDraft.getSkinCode()); +//// Map stationVOMap = stationVOList.stream() +//// .collect(Collectors.toMap(MapStationVO::getCode, MapStationVO::getName)); +//// List standTrackList = iMapService.getStandTrackListByMapSkin(runPlanDraft.getSkinCode()); +//// Map> arriveSectionMap = arrivalDraftList.stream() +//// .collect(Collectors.groupingBy(RunPlanArrivalDraft::getSectionCode)); +//// arrivalDraftList.sort(Comparator.comparing(RunPlanArrivalDraft::getArriveTime)); +//// arriveSectionMap.forEach((sectionCode, arriveList) -> { +//// arriveList.sort(Comparator.comparing(RunPlanArrivalDraft::getArriveTime)); +//// for(int i = 0; i < arriveList.size() - 1; ++i) { +//// RunPlanArrivalDraft arrivalDraft1 = arriveList.get(i); +//// RunPlanArrivalDraft arrivalDraft2 = arriveList.get(i + 1); +//// if(arrivalDraft1.getArriveTime().equals(arrivalDraft1.getDepartureTime()) +//// || arrivalDraft2.getArriveTime().equals(arrivalDraft2.getDepartureTime()) ) { +//// continue; +//// } +//// long seconds = Duration.between(arrivalDraft1.getArriveTime(), arrivalDraft2.getArriveTime()).getSeconds(); +//// if(seconds < 90) { +//// if(standTrackList.stream().anyMatch(sectionVO -> sectionVO.getCode().equals(arrivalDraft1.getSectionCode())) +//// && seconds >= 15) { // 站前折返 +//// continue; +//// } +//// String SDTNumber1 = arrivalDraft1.getServiceNumber() + arrivalDraft1.getDirectionCode() + arrivalDraft1.getTripNumber(); +//// String SDTNumber2 = arrivalDraft2.getServiceNumber() + arrivalDraft2.getDirectionCode() + arrivalDraft2.getTripNumber(); +//// errorList.add(String.format("车次号 %s 与车次号 %s 列车存在运行时刻超过最大运行间隔冲突:车站 %s!", +//// SDTNumber1, SDTNumber2, stationVOMap.get(arrivalDraft1.getStationCode()))); +//// } +//// } +//// }); + + //先屏蔽掉数据检查 + return new ArrayList<>(); + } + + @Deprecated + @Override + public void removeTBTrackTripTime(Long planId) { + RunPlanVO planVO = getRunPlanById(planId); + planVO.getTripList().forEach(tripVO -> { + List timeList = tripVO.getTimeList(); + if(CollectionUtils.isEmpty(timeList) || timeList.size()<2){ + return; + } + RunPlanTripTimeVO first = timeList.get(0); + RunPlanTripTimeVO second = timeList.get(1); + RunPlanTripTimeVO second2Last = timeList.get(timeList.size()-2); + RunPlanTripTimeVO last = timeList.get(timeList.size()-1); + if(Objects.equals(first.getStationCode(),second.getStationCode())){ + timeList.remove(first); + } + if(timeList.size()>2 && Objects.equals(second2Last.getStationCode(),last.getStationCode())){ + timeList.remove(last); + } + }); + RunPlanDraft planDraft = planVO.convert2Draft(); + planDraft.setTrips(JsonUtils.writeValueAsString(planVO.getTripList())); + planDraft.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_01); + runPlanDraftDAO.updateByPrimaryKeySelective(planDraft); + } + + @Override + public String simulationCheck(Long planId, LoginUserInfoVO loginUserInfoVO) { + RunPlanVO planVO = getRunPlanById(planId); + // 查询运行图数据 + MapVO mapVO = this.iMapService.getMapDetail(planVO.getMapId()); + if (mapVO.isDrawWay()) { + return groupSimulationService.runPlanTestSimulation(planVO.getMapId(), planVO, loginUserInfoVO); + } + SimulationConstructData constructData = new SimulationConstructData(loginUserInfoVO.getUserVO(), SimulationType.RunPlan, + null, new MapDataVO(mapVO), null, planVO, null); + String group = SimulationIdGenerator.generateGroup(loginUserInfoVO.getUserVO().getId()); + groupSimulationManager.prepareSimulation(group, constructData); + // 生成通用的测试用派班计划 + this.groupSimulationManager.generateCommonSchedulingPlan(group); + return group; + } + + @Override + public PageVO queryPagedPendingReviewPlan(RunPlanQueryVO queryVO) { + RunPlanDraftExample example = new RunPlanDraftExample(); + RunPlanDraftExample.Criteria criteria = example.createCriteria(); + criteria.andStatusEqualTo(BusinessConsts.ReleaseReview.RELEASE_STATUS_02); + if (Objects.nonNull(queryVO.getMapId())) { + criteria.andMapIdEqualTo(queryVO.getMapId()); + } + if (StringUtils.hasText(queryVO.getName())) { + criteria.andNameLike(String.format("%%%s%%", queryVO.getName())); + } + Map userMap; + if (StringUtils.hasText(queryVO.getCreatorName())) { + List userVOList = iSysUserService.fuzzyQueryByName(queryVO.getCreatorName()); + List userIds = userVOList.stream().map(UserVO::getId).collect(Collectors.toList()); + if (CollectionUtils.isEmpty(userIds)) { + return new PageVO<>(); + } + criteria.andCreatorIdIn(userIds); + userMap = userVOList.stream().collect(Collectors.toMap(UserVO::getId, Function.identity())); + } else { + List userVOList = iSysUserService.fuzzyQueryByName(null); + userMap = userVOList.stream().collect(Collectors.toMap(UserVO::getId, Function.identity())); + } + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + Page page = (Page) runPlanDraftDAO.selectByExample(example); + List planVOList = new ArrayList<>(); + page.getResult().forEach(planDraft -> { + RunPlanVO runPlanVO = new RunPlanVO(planDraft); + runPlanVO.setCreatorName(userMap.get(planDraft.getCreatorId()).getName()); + planVOList.add(runPlanVO); + }); + return PageVO.convert(page, planVOList); + } + + /** + * 根据id获取运行图数据 + * + * @param planId + * @return + */ + private RunPlanVO getRunPlanById(Long planId) { + RunPlanDraft runPlanDraft = this.runPlanDraftDAO.selectByPrimaryKey(planId); + if (Objects.isNull(runPlanDraft)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + RunPlanVO runPlanVO = new RunPlanVO(runPlanDraft); + if (StringUtils.hasText(runPlanDraft.getTrips())) { + runPlanVO.setTripList(JsonUtils.read(runPlanDraft.getTrips(), JsonUtils.getCollectionType(List.class, RunPlanTripVO.class))); + } else { + runPlanVO.setTripList(new ArrayList<>()); + } + return runPlanVO; + } + + private List prepareStationData(MapVO mapVO) { + // 获取站台轨 + List standTrackList = mapVO.findStandTrackList(); + if (CollectionUtils.isEmpty(standTrackList)) { + throw new DBException(ExceptionMapping.DATA_EXCEPTION); + } + // 获取车站 + List stationList = mapVO.findSortedAllStationList(); + if (CollectionUtils.isEmpty(stationList)) { + throw new DBException(ExceptionMapping.DATA_EXCEPTION); + } + // 获取站台 + List standList = mapVO.findAllStandList(); + if (CollectionUtils.isEmpty(standList)) { + throw new DBException(ExceptionMapping.DATA_EXCEPTION); + } + Map standVOMap = standList.stream().collect( + Collectors.toMap(MapStationStandVO::getCode, Function.identity())); + // 处理车站站台轨数据 + standTrackList.forEach(sectionVO -> standVOMap.get(sectionVO.getRelStandCode()).setStandTrack(sectionVO)); + // 处理车站站台数据 + for (MapStationVO station : stationList) { + for (MapStationStandVO stand : standList) { + if (station.getCode().equals(stand.getStationCode())) { + station.addStand(stand); + } + } + } + return stationList; + } + + private List prepareStationDataNew(MapVO mapVO) { +// // 获取站台轨 +// List standTrackList = mapVO.findStandTrackListNew(); +// if (CollectionUtils.isEmpty(standTrackList)) { +// throw new DBException(ExceptionMapping.DATA_EXCEPTION); +// } + // 获取车站 + List stationList = mapVO.findSortedAllStationListNew(); + if (CollectionUtils.isEmpty(stationList)) { + throw new DBException(ExceptionMapping.DATA_EXCEPTION); + } + // 获取站台 + List standList = mapVO.findAllStandListNew(); + if (CollectionUtils.isEmpty(standList)) { + throw new DBException(ExceptionMapping.DATA_EXCEPTION); + } +// Map standVOMap = standList.stream().collect( +// Collectors.toMap(MapStationStandNewVO::getCode, Function.identity())); +// // 处理车站站台轨数据 +// standTrackList.forEach(sectionVO -> standVOMap.get(sectionVO.getRelStandCode()).setStandTrack(sectionVO)); + // 处理车站站台数据 + for (MapStationNewVO station : stationList) { + for (MapStationStandNewVO stand : standList) { + if (station.getCode().equals(stand.getStationCode())) { + station.addStand(stand); + } + } + } + return stationList; + } + + private void checkNameRepeat(Long id, String name, Long mapId, UserVO userVO) { + RunPlanDraftExample draftExample = new RunPlanDraftExample(); + RunPlanDraftExample.Criteria criteria = draftExample.createCriteria(); + if (Objects.nonNull(id)) { + criteria.andIdNotEqualTo(id); + } + criteria.andMapIdEqualTo(mapId) + .andNameEqualTo(name) + .andCreatorIdEqualTo(userVO.getId()); + if (runPlanDraftDAO.countByExample(draftExample) > 0) { + throw new DBException(ExceptionMapping.NAME_REPEAT); + } + } +} diff --git a/src/main/java/club/joylink/rtss/services/RunPlanTemplateService.java b/src/main/java/club/joylink/rtss/services/RunPlanTemplateService.java new file mode 100644 index 000000000..a9335e414 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/RunPlanTemplateService.java @@ -0,0 +1,307 @@ +package club.joylink.rtss.services; + +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import com.joylink.base.exception.BusinessException; +import com.joylink.base.exception.DBException; +import com.joylink.base.exception.constant.ExceptionMapping; +import club.joylink.rtss.constants.MapStatus; +import club.joylink.rtss.dao.RunPlanLoadDAO; +import club.joylink.rtss.dao.RunPlanTemplateDAO; +import club.joylink.rtss.dao.RunPlanTemplateVersionDAO; +import club.joylink.rtss.dao.SchedulingPlanDAO; +import club.joylink.rtss.entity.*; +import club.joylink.rtss.util.JsonUtils; +import club.joylink.rtss.util.VersionUtil; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.map.MapVO; +import club.joylink.rtss.vo.client.runplan.*; +import org.springframework.util.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; +import org.springframework.util.ObjectUtils; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.List; +import java.util.Objects; + +@Service +public class RunPlanTemplateService implements IRunPlanTemplateService { + + @Autowired + private RunPlanTemplateDAO runPlanTemplateDAO; + + @Autowired + private RunPlanTemplateVersionDAO runPlanTemplateVersionDAO; + + @Autowired + private ISysUserService iSysUserService; + + @Autowired + private IDailyRunPlanService iDailyRunPlanService; + + @Autowired + private RunPlanLoadDAO runPlanLoadDAO; + + @Autowired + private SchedulingPlanDAO schedulingPlanDAO; + + @Autowired + private IMapService iMapService; + + @Autowired + private ILoadPlanService iLoadPlanService; + + @Autowired + private ISchedulingPlanService iSchedulingPlanService; + + /** + * 运行图草稿发布 + * + * @param runPlanVO + * @param userVO + */ + @Override + @Transactional + public void draftPublish(RunPlanVO runPlanVO, UserVO userVO) { + //查询是否已存在草稿的发布 + RunPlanTemplateExample planExample = new RunPlanTemplateExample(); + planExample.createCriteria() + .andNameEqualTo(runPlanVO.getName()) + .andMapIdEqualTo(runPlanVO.getMapId()) + .andStatusNotEqualTo(MapStatus.Delete.getCode()); + List planList = runPlanTemplateDAO.selectByExample(planExample); + RunPlanTemplate oldPlan = ObjectUtils.isEmpty(planList) ? null : planList.get(0); + if (ObjectUtils.isEmpty(oldPlan)) { + // 首次发布 + RunPlanTemplate templatePlan = runPlanVO.convert2Template(); + templatePlan.setId(null); + templatePlan.setCreateTime(LocalDateTime.now()); + templatePlan.setCreatorId(userVO.getId()); + runPlanTemplateDAO.insert(templatePlan); + RunPlanTemplateVersion version = new RunPlanTemplateVersion(); + version.setPlanId(templatePlan.getId()); + version.setCreatorId(userVO.getId()); + version.setUpdateTime(LocalDateTime.now()); + version.setVersion(VersionUtil.generateNext(null)); + runPlanTemplateVersionDAO.insert(version); + } else { + // 重新发布 + RunPlanTemplate templatePlan = runPlanVO.convert2Template(); + templatePlan.setCreateTime(LocalDateTime.now()); + templatePlan.setCreatorId(userVO.getId()); + templatePlan.setId(oldPlan.getId()); + runPlanTemplateDAO.updateByPrimaryKeyWithBLOBs(templatePlan); + // 更新版本 + RunPlanTemplateVersionExample versionExample = new RunPlanTemplateVersionExample(); + versionExample.createCriteria().andPlanIdEqualTo(oldPlan.getId()); + RunPlanTemplateVersion version = runPlanTemplateVersionDAO.selectByExample(versionExample).get(0); + version.setId(null); + version.setVersion(VersionUtil.generateNext(version.getVersion())); + version.setUpdateTime(LocalDateTime.now()); + version.setCreatorId(userVO.getId()); + runPlanTemplateVersionDAO.insert(version); + } + } + + @Override + @Transactional + public void deletePlan(Long planId, UserVO userVO) { + // 判断权限,只有超级管理员才可以删除 + if (!iSysUserService.isAdmin(userVO)) { + throw new BusinessException(ExceptionMapping.ILLEGAL_OPERATION); + } +// RunPlanLoadExample runPlanLoadExample = new RunPlanLoadExample(); +// runPlanLoadExample.createCriteria().andTemplatePlanIdEqualTo(planId); +// List runPlanLoadList = runPlanLoadDAO.selectByExample(runPlanLoadExample); +// if (!CollectionUtils.isEmpty(runPlanLoadList)) { +// throw new BusinessException(ExceptionMapping.ILLEGAL_OPERATION, "模板已被加载计划使用,无法删除"); +// } +// RunPlanTemplateVersionExample versionExample = new RunPlanTemplateVersionExample(); +// versionExample.createCriteria().andPlanIdEqualTo(planId); +// runPlanTemplateVersionDAO.deleteByExample(versionExample); + // 逻辑删除 + RunPlanTemplate runPlanTemplate = this.runPlanTemplateDAO.selectByPrimaryKey(planId); + runPlanTemplate.setStatus(MapStatus.Delete.getCode()); + this.runPlanTemplateDAO.updateByPrimaryKey(runPlanTemplate); + } + + @Override + public PageVO queryPagedRunPlan(RunPlanQueryVO queryVO) { + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + RunPlanTemplateExample example = new RunPlanTemplateExample(); + example.setOrderByClause(" create_time DESC "); + RunPlanTemplateExample.Criteria criteria = example.createCriteria(); + criteria.andStatusNotEqualTo(MapStatus.Delete.getCode()); + if(Objects.nonNull(queryVO.getMapId())) { + criteria.andMapIdEqualTo(queryVO.getMapId()); + } + if(StringUtils.hasText(queryVO.getName())) { + criteria.andNameLike(String.format("%%%s%%", queryVO.getName())); + } + Page runPlans = (Page) this.runPlanTemplateDAO.selectByExample(example); + List runPlanVOList = RunPlanVO.convertTemplate2VOList(runPlans.getResult()); + return PageVO.convert(runPlans, runPlanVOList); + } + + @Override + public List queryAll() { + RunPlanTemplateExample example = new RunPlanTemplateExample(); + example.setOrderByClause("id asc"); + example.createCriteria() + .andStatusNotEqualTo(MapStatus.Delete.getCode()); + List runPlans = this.runPlanTemplateDAO.selectByExample(example); + return RunPlanVO.convertTemplate2VOList(runPlans); + } + + @Override + public List queryPlanListByMapId(Long mapId) { + RunPlanTemplateExample example = new RunPlanTemplateExample(); + example.setOrderByClause("id asc"); + example.createCriteria() + .andMapIdEqualTo(mapId) + .andStatusNotEqualTo(MapStatus.Delete.getCode()); + List runPlans = this.runPlanTemplateDAO.selectByExample(example); + return RunPlanVO.convertTemplate2VOList(runPlans); + } + + @Override + public void copyAs(Long id, Long mapId, String name, UserVO user) { + MapVO mapInfo = this.iMapService.getMapInfoById(mapId); + RunPlanVO runPlan = this.getRunPlan(id); + MapVO mapVO = iMapService.getMapDetail(runPlan.getMapId()); + if(!Objects.equals(mapVO.getLineCode(), mapInfo.getLineCode())) { + throw new BusinessException(ExceptionMapping.ILLEGAL_OPERATION, "基于不同真实线路的不能复制"); + } + if(Objects.equals(runPlan.getMapId(), mapInfo.getId())) { + throw new BusinessException(ExceptionMapping.ILLEGAL_OPERATION, "相同地图下不能复制"); + } + runPlan.setName(name); + runPlan.setMapId(mapId); + this.draftPublish(runPlan, user); + } + + @Override + public RunPlanVO generateDailyRunPlan(Long planId, Long mapId, UserVO userVO) { + Objects.requireNonNull(planId); + Objects.requireNonNull(mapId); + // 判断权限,只有超级管理员才可以执行此操作 + if (!iSysUserService.isAdmin(userVO)) { + throw new BusinessException(ExceptionMapping.ILLEGAL_OPERATION); + } + return this.iDailyRunPlanService.createCommonDailyRunPlan(this.getRunPlan(planId), mapId, LocalDate.now()); + } + + @Override + public RunPlanEChartsDataVO selectDiagramData(Long planId) { + RunPlanTemplate runPlan = runPlanTemplateDAO.selectByPrimaryKey(planId); + return new RunPlanEChartsDataVO(JsonUtils.read(runPlan.getTrips(), JsonUtils.getCollectionType(List.class, RunPlanTripVO.class))); + } + + @Override + public RunPlanVO findRunPlan(Long id) { + Objects.requireNonNull(id); + RunPlanTemplate templatePlan = runPlanTemplateDAO.selectByPrimaryKey(id); + if (Objects.isNull(templatePlan)) { + return null; + } + return new RunPlanVO(templatePlan); + } + + @Override + public RunPlanVO getRunPlan(Long id) { + RunPlanVO runPlan = this.findRunPlan(id); + if (Objects.isNull(runPlan)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST, + String.format("id为[%s]的模板运行图不存在", id)); + } + return runPlan; + } + + @Override + public RunPlanVO getFirstRunPlanByMapId(Long mapId) { + Objects.requireNonNull(mapId); + RunPlanTemplateExample example = new RunPlanTemplateExample(); + example.setOrderByClause("id asc"); + example.createCriteria() + .andMapIdEqualTo(mapId) + .andStatusNotEqualTo(MapStatus.Delete.getCode()); + List templateList = this.runPlanTemplateDAO.selectByExampleWithBLOBs(example); + if(!CollectionUtils.isEmpty(templateList)) { + RunPlanTemplate template = templateList.get(0); + return new RunPlanVO(template); + } + throw new DBException(ExceptionMapping.DATA_NOT_EXIST, "模板运行图不存在"); + } + + @Override + @Transactional + public void copyAllOfMap(Long sourceMapId, Long targetMapId, UserVO user) { + // 查询通用加载计划 + RunPlanLoadVO commonLoadPlan = this.iLoadPlanService.findCommonLoadPlanOfMap(sourceMapId); + Long loadTemplate = null; + RunPlanTemplate loadTemplateNew = null; + if(Objects.nonNull(commonLoadPlan)) { + loadTemplate = commonLoadPlan.getTemplatePlanId(); + } + // 拷贝所有模板运行图 + List sourcePlanList = this.queryPlanDetailListByMapId(sourceMapId); + if(!CollectionUtils.isEmpty(sourcePlanList)) { + LocalDateTime now = LocalDateTime.now(); + for (RunPlanVO runPlanVO : sourcePlanList) { + RunPlanTemplate template = runPlanVO.convert2Template(); + template.setId(null); + template.setMapId(targetMapId); + template.setCreatorId(user.getId()); + template.setCreateTime(now); + this.runPlanTemplateDAO.insert(template); + if(Objects.nonNull(loadTemplate) && + Objects.equals(loadTemplate, runPlanVO.getId())) { + loadTemplateNew = template; + } + } + } + if(Objects.nonNull(loadTemplateNew)) { + // 拷贝通用加载计划 + RunPlanLoadVO loadPlanNew = new RunPlanLoadVO(); + loadPlanNew.setMapId(targetMapId); + loadPlanNew.setTemplatePlanId(loadTemplateNew.getId()); + this.iLoadPlanService.createCommonLoadPlan(loadPlanNew, user); + // 创建每日运行图 + this.iDailyRunPlanService.createCommonDailyRunPlan(new RunPlanVO(loadTemplateNew), + targetMapId, this.iDailyRunPlanService.getRunPlanDate()); + // 生成通用的派班计划 + this.iSchedulingPlanService.copyCommonSchedulingPlan(sourceMapId, targetMapId); + } + } + + @Override + public boolean isUsed(Long planId) { + RunPlanLoadExample loadExample = new RunPlanLoadExample(); + loadExample.createCriteria() + .andTemplatePlanIdEqualTo(planId); + if (this.runPlanLoadDAO.countByExample(loadExample) > 0) { + return true; + } + SchedulingPlanExample schedulingExample = new SchedulingPlanExample(); + schedulingExample.createCriteria() + .andRunPlanIdEqualTo(planId); + if (this.schedulingPlanDAO.countByExample(schedulingExample) > 0) { + return true; + } + return false; + } + + private List queryPlanDetailListByMapId(Long mapId) { + RunPlanTemplateExample example = new RunPlanTemplateExample(); + example.createCriteria() + .andMapIdEqualTo(mapId) + .andStatusNotEqualTo(MapStatus.Delete.getCode()); + List planDetailList = this.runPlanTemplateDAO.selectByExampleWithBLOBs(example); + return RunPlanVO.convertTemplate2VOList(planDetailList); + } +} diff --git a/src/main/java/club/joylink/rtss/services/SchedulingPlanService.java b/src/main/java/club/joylink/rtss/services/SchedulingPlanService.java new file mode 100644 index 000000000..69101e897 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/SchedulingPlanService.java @@ -0,0 +1,266 @@ +package club.joylink.rtss.services; + +import com.joylink.base.exception.BusinessException; +import com.joylink.base.exception.DBException; +import com.joylink.base.exception.constant.ExceptionMapping; +import club.joylink.rtss.dao.SchedulingPlanDAO; +import club.joylink.rtss.entity.SchedulingPlan; +import club.joylink.rtss.entity.SchedulingPlanExample; +import club.joylink.rtss.simulation.GroupSimulationManager; +import club.joylink.rtss.simulation.Simulation; +import club.joylink.rtss.simulation.SimulationConstructData; +import club.joylink.rtss.simulation.constant.SimulationType; +import club.joylink.rtss.simulation.scheduling.SchedulingPlanBO; +import club.joylink.rtss.simulation.util.SimulationIdGenerator; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.map.MapDataVO; +import club.joylink.rtss.vo.client.map.MapVO; +import club.joylink.rtss.vo.client.runplan.RunPlanVO; +import club.joylink.rtss.vo.client.scheduling.SchedulingCheckResult; +import club.joylink.rtss.vo.client.scheduling.SchedulingPlanVO; +import club.joylink.rtss.vo.client.scheduling.SchedulingTrainEditVO; +import club.joylink.rtss.vo.client.scheduling.TrainBaseInfoVO; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.List; +import java.util.Objects; + +@Service +@Slf4j +public class SchedulingPlanService implements ISchedulingPlanService { + + @Autowired + private ISimulationService iSimulationService; + + @Autowired + private GroupSimulationManager groupSimulationManager; + + @Autowired + private IDailyRunPlanService iDailyRunPlanService; + + @Autowired + private SchedulingPlanDAO schedulingPlanDAO; + + @Autowired + private IMapService iMapService; + + @Override + public String schedulingPlanSimulation(Long mapId, String prdType, UserVO user) { + return this.iSimulationService.schedulingPlanSimulation(mapId, prdType, user); + } + + @Override + public SchedulingPlanVO findSchedulingPlan(String group, LocalDate day, UserVO user) { + SchedulingPlanVO planVO = this.groupSimulationManager.findSchedulingPlanVO(group); + if(Objects.nonNull(planVO) && planVO.getPlanDate().equals(day)) { + return planVO; + } else { + Simulation simulation = this.groupSimulationManager.getSchedulingSimulationByGroup(group); + Long mapId = simulation.getMapId(); + SchedulingPlan userPlan = this.findUserPlan(mapId, day, user.getId()); + if(Objects.nonNull(userPlan)) { + Long runPlanId = userPlan.getRunPlanId(); + RunPlanVO runPlanVO = this.iDailyRunPlanService.findRunPlanById(runPlanId); + if(Objects.isNull(runPlanVO)) { + log.error(String.format("id[%s]的每日运行图不存在", runPlanId)); + throw new BusinessException(ExceptionMapping.DATA_EXCEPTION, "派班计划的基础运行图不存在"); + } + this.groupSimulationManager.updateRunDiagram(group, runPlanVO); + this.groupSimulationManager.updateSchedulingPlan(group, new SchedulingPlanBO(userPlan)); + SchedulingPlanVO schedulingPlanVO = this.groupSimulationManager.findSchedulingPlanVO(group); + return schedulingPlanVO; + } + } + return null; + } + + @Override + public SchedulingPlan findUserPlan(Long mapId, LocalDate date, Long userId) { + Objects.requireNonNull(mapId); + Objects.requireNonNull(date); + Objects.requireNonNull(userId); + SchedulingPlanExample example = new SchedulingPlanExample(); + example.createCriteria() + .andMapIdEqualTo(mapId) + .andPlanDateEqualTo(date) + .andUserIdEqualTo(userId); + List schedulingPlanList = this.schedulingPlanDAO.selectByExampleWithBLOBs(example); + if(!CollectionUtils.isEmpty(schedulingPlanList)) { + return schedulingPlanList.get(0); + } + return null; + } + + @Override + public SchedulingPlan getUserPlan(Long mapId, LocalDate date, Long userId) { + SchedulingPlan userPlan = this.findUserPlan(mapId, date, userId); + if(Objects.isNull(userPlan)) { + log.error(String.format("地图id[%s],日期[%s],用户[%s]的派班计划不存在", mapId, date, userId)); + throw new DBException(ExceptionMapping.DATA_NOT_EXIST, "派班计划不存在"); + } + return userPlan; + } + + @Override + public SchedulingPlan findCommonPlan(Long mapId) { + Objects.requireNonNull(mapId); + SchedulingPlanExample example = new SchedulingPlanExample(); + example.createCriteria() + .andMapIdEqualTo(mapId) + .andPlanDateIsNull() + .andRunPlanIdIsNull() + .andUserIdIsNull(); + List schedulingPlanList = this.schedulingPlanDAO.selectByExampleWithBLOBs(example); + if(!CollectionUtils.isEmpty(schedulingPlanList)) { + return schedulingPlanList.get(0); + } + return null; + } + + @Override + public SchedulingPlan getCommonPlan(Long mapId) { + SchedulingPlan commonPlan = this.findCommonPlan(mapId); + if(Objects.isNull(commonPlan)) { + log.error(String.format("地图id[%s]的派班计划不存在", mapId)); + throw new DBException(ExceptionMapping.DATA_NOT_EXIST, "派班计划不存在"); + } + return commonPlan; + } + + @Override + public SchedulingPlanBO getSchedulingPlan(Long mapId, Long userId) { + SchedulingPlan plan = this.findUserPlan(mapId, LocalDate.now(), userId); + if(Objects.isNull(plan)) { + plan = this.findCommonPlan(mapId); + } + if(Objects.nonNull(plan)) { + return new SchedulingPlanBO(plan); + } + return null; + } + + @Override + public SchedulingPlanVO generateBaseSchedulingPlanOfDay(String group, LocalDate day, UserVO user) { + Simulation simulation = this.groupSimulationManager.getSchedulingSimulationByGroup(group); + Long mapId = simulation.getMapId(); + RunPlanVO userRunPlan = this.iDailyRunPlanService.findUserRunPlan(user.getId(), mapId, day); + if(Objects.isNull(userRunPlan)) { // 如果不存在,根据加载计划创建 + userRunPlan = this.iDailyRunPlanService.createUserRunPlanFromLoadPlan(user.getId(), mapId, day); + } + // 更新仿真运行图 + this.groupSimulationManager.updateRunDiagram(group, userRunPlan); + return this.groupSimulationManager.generateBaseSchedulingPlan(group); + } + + @Override + public List getAllTrains(String group) { + return this.groupSimulationManager.getAllTrains(group); + } + + @Override + public SchedulingCheckResult checkConflict(String group, List editVOList) { + this.groupSimulationManager.updateSchedulingTrainPlan(group, editVOList); + return this.groupSimulationManager.checkConflict(group); + } + + @Override + public void saveSchedulingPlan(String group, List editVOList) { + this.groupSimulationManager.updateSchedulingTrainPlan(group, editVOList); + SchedulingCheckResult result = this.checkConflict(group, editVOList); + if(result.isPass()) { + SchedulingPlanBO planBO = this.groupSimulationManager.getSchedulingPlanData(group); + SchedulingPlan plan = planBO.convert2DB(); + if(Objects.nonNull(plan.getId())) { + SchedulingPlan schedulingPlan = this.schedulingPlanDAO.selectByPrimaryKey(plan.getId()); + schedulingPlan.setPlansJson(plan.getPlansJson()); + this.schedulingPlanDAO.updateByPrimaryKeyWithBLOBs(schedulingPlan); + } else { + plan.setCreateTime(LocalDateTime.now()); + this.schedulingPlanDAO.insert(plan); + } + } else { + throw new BusinessException(ExceptionMapping.DATA_EXCEPTION, "派班数据冲突"); + } + } + + @Override + public SchedulingPlanVO deleteAndRebuildSchedulingPlan(String group, LocalDate day, UserVO user) { + Simulation simulation = this.groupSimulationManager.getSchedulingSimulationByGroup(group); + SchedulingPlan userPlan = this.findUserPlan(simulation.getMapId(), day, user.getId()); + if(Objects.nonNull(userPlan)) { + this.schedulingPlanDAO.deleteByPrimaryKey(userPlan.getId()); + } + return this.generateBaseSchedulingPlanOfDay(group, day, user); + } + + @Override + @Transactional + public void generateMapCommonSchedulingPlan(Long mapId, UserVO user) { + MapVO mapVO = this.iMapService.getMapDetail(mapId); + RunPlanVO commonRunPlan = this.iDailyRunPlanService.findCommonRunPlan(mapId, LocalDate.now()); + if(Objects.isNull(commonRunPlan)) { + log.warn(String.format("地图[%s]通用运行图不存在,无法生成通用派班计划", mapId)); + return; + } + RunPlanVO runPlan = this.iDailyRunPlanService.getRunPlan(mapId); + this.generateMapCommonSchedulingPlan(mapVO, runPlan, user); + } + + @Override + public void generateMapCommonSchedulingPlan(MapVO mapVO, RunPlanVO commonDailyRunPlan, UserVO user) { + Objects.requireNonNull(mapVO); + Objects.requireNonNull(commonDailyRunPlan); + SimulationConstructData simulationConstructData = new SimulationConstructData( + user, SimulationType.Simulation, mapVO.getId(), new MapDataVO(mapVO), + null, commonDailyRunPlan, null); + String group = SimulationIdGenerator.generateGroup(0L); + this.groupSimulationManager.prepareSimulation(group, simulationConstructData); + + SchedulingPlanBO schedulingPlanBO = this.groupSimulationManager.generateCommonSchedulingPlan(group); + // 删除旧的数据 + SchedulingPlanExample example = new SchedulingPlanExample(); + example.createCriteria() + .andMapIdEqualTo(mapVO.getId()) + .andPlanDateIsNull() + .andUserIdIsNull() + .andRunPlanIdIsNull(); + this.schedulingPlanDAO.deleteByExample(example); + // 保存新的数据 + SchedulingPlan plan = schedulingPlanBO.convert2DB(); + plan.setPlanDate(null); + plan.setRunPlanId(null); + plan.setUserId(null); + plan.setCreateTime(LocalDateTime.now()); + this.schedulingPlanDAO.insert(plan); + } + + @Override + @Transactional + public void generateCommonSchedulingPlan(UserVO user) { + List mapVOList = this.iMapService.queryOnlineMapInfos(); + if(!CollectionUtils.isEmpty(mapVOList)) { + for (MapVO map : mapVOList) { + this.generateMapCommonSchedulingPlan(map.getId(), user); + } + } + + } + + @Override + public void copyCommonSchedulingPlan(Long sourceMapId, Long targetMapId) { + SchedulingPlan commonPlan = this.findCommonPlan(sourceMapId); + if(Objects.nonNull(commonPlan)) { + SchedulingPlan newPlan = new SchedulingPlan(); + newPlan.setMapId(targetMapId); + newPlan.setPlansJson(commonPlan.getPlansJson()); + newPlan.setCreateTime(LocalDateTime.now()); + this.schedulingPlanDAO.insert(newPlan); + } + } +} diff --git a/src/main/java/club/joylink/rtss/services/ScriptDraftService.java b/src/main/java/club/joylink/rtss/services/ScriptDraftService.java new file mode 100644 index 000000000..8c9851c2b --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/ScriptDraftService.java @@ -0,0 +1,286 @@ +package club.joylink.rtss.services; + +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import com.joylink.base.exception.BusinessException; +import com.joylink.base.exception.DBException; +import com.joylink.base.exception.constant.ExceptionMapping; +import club.joylink.rtss.simulation.cbtc.Simulation; +import club.joylink.rtss.simulation.cbtc.script.ScriptBO; +import club.joylink.rtss.simulation.cbtc.script.ScriptUpdateVO; +import club.joylink.rtss.constants.BusinessConsts; +import club.joylink.rtss.dao.ScriptDraftDAO; +import club.joylink.rtss.entity.ScriptDraft; +import club.joylink.rtss.entity.ScriptDraftExample; +import club.joylink.rtss.entity.ScriptDraftWithBLOBs; +import club.joylink.rtss.util.ConvertUtil; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageQueryVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.script.ScriptNewVO; +import club.joylink.rtss.vo.client.script.ScriptQueryVO; +import club.joylink.rtss.vo.client.script.ScriptVO; +import org.springframework.util.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import java.util.stream.Collectors; + +@Service +public class ScriptDraftService implements IScriptDraftService { + + @Autowired + private ScriptDraftDAO scriptDraftDAO; + + @Autowired + private ISysUserService iSysUserService; + + @Autowired + private IScriptService iScriptService; + + @Autowired + private IMapService iMapService; + + @Override + public PageVO queryPagedScript(Long mapId, UserVO user, PageQueryVO queryVO) { + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + ScriptDraftExample example = new ScriptDraftExample(); + example.createCriteria().andMapIdEqualTo(mapId) + .andCreatorIdEqualTo(user.getId()); + Page page = (Page) scriptDraftDAO.selectByExample(example); + List scriptVOList = ScriptVO.convertDraft2VOList(page.getResult()); + return PageVO.convert(page, scriptVOList); + } + + @Override + public String createScript(ScriptVO scriptVO, UserVO user) { + checkNameRepeat(null, scriptVO.getName(), scriptVO.getMapId(), user); + ScriptDraftWithBLOBs scriptDraft = scriptVO.convert2Draft(); + scriptDraft.setCreatorId(user.getId()); + scriptDraft.setCreateTime(LocalDateTime.now()); + scriptDraft.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_01); + scriptDraftDAO.insert(scriptDraft); + return ConvertUtil.long2Str(scriptDraft.getId()); + } + + @Override + public ScriptNewVO getBasicInfo(Long id) { + ScriptDraft scriptDraft = scriptDraftDAO.selectByPrimaryKey(id); + if (Objects.isNull(scriptDraft)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + return new ScriptNewVO(scriptDraft); + } + + @Override + public void updateScriptInfo(Long id, ScriptUpdateVO updateVO, UserVO user) { + checkNameRepeat(id, updateVO.getName(), updateVO.getMapId(), user); + ScriptDraft scriptDraft = scriptDraftDAO.selectByPrimaryKey(id); + if (Objects.isNull(scriptDraft)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + boolean change = false; + if (!Objects.equals(scriptDraft.getName(), updateVO.getName())) { + scriptDraft.setName(updateVO.getName()); + change = true; + } + if (!Objects.equals(scriptDraft.getDescription(), updateVO.getDescription())) { + scriptDraft.setDescription(updateVO.getDescription()); + change = true; + } + if (!Objects.equals(scriptDraft.getFullMarksDuration(), updateVO.getFullMarksDuration())) { + scriptDraft.setFullMarksDuration(updateVO.getFullMarksDuration()); + change = true; + } + if (!Objects.equals(scriptDraft.getPassingGradeDuration(), updateVO.getPassingGradeDuration())) { + scriptDraft.setPassingGradeDuration(updateVO.getPassingGradeDuration()); + change = true; + } + if (!Objects.equals(scriptDraft.getZeroDuration(), updateVO.getZeroDuration())) { + scriptDraft.setZeroDuration(updateVO.getZeroDuration()); + change = true; + } + if (change) { + scriptDraft.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_01); + scriptDraftDAO.updateByPrimaryKey(scriptDraft); + } + } + + @Override + public void deleteScript(Long id, UserVO user) { + ScriptDraft scriptDraft = scriptDraftDAO.selectByPrimaryKey(id); + if (!scriptDraft.getCreatorId().equals(user.getId())) { + throw new BusinessException(ExceptionMapping.ILLEGAL_OPERATION); + } + scriptDraftDAO.deleteByPrimaryKey(id); + } + + @Override + public ScriptVO getScriptDetail(Long id) { + ScriptDraftWithBLOBs scriptDraftWithBLOBs = scriptDraftDAO.selectByPrimaryKey(id); + if (Objects.isNull(scriptDraftWithBLOBs)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + return new ScriptVO(scriptDraftWithBLOBs); + } + + @Override + public ScriptBO getScriptBO(Long id, Simulation simulation) { + ScriptDraftWithBLOBs scriptDraftWithBLOBs = scriptDraftDAO.selectByPrimaryKey(id); + if (Objects.isNull(scriptDraftWithBLOBs)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + return new ScriptBO(scriptDraftWithBLOBs, simulation); + } + + @Override + public void updateScriptDetailData(Long id, ScriptVO scriptVO) { + ScriptDraftWithBLOBs scriptDraftWithBLOBs = scriptDraftDAO.selectByPrimaryKey(id); + if (Objects.isNull(scriptDraftWithBLOBs)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + scriptDraftWithBLOBs.setBgScenesJson(scriptVO.getBgScenesJson()); + scriptDraftWithBLOBs.setFinalScenesJson(scriptVO.getFinalScenesJson()); + scriptDraftWithBLOBs.setMapLocationJson(scriptVO.getMapLocationJson()); + scriptDraftWithBLOBs.setMembersJson(scriptVO.getMembersJson()); + scriptDraftWithBLOBs.setPlayersJson(scriptVO.getPlayersJson()); + scriptDraftWithBLOBs.setActionsJson(scriptVO.getActionsJson()); + scriptDraftWithBLOBs.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_01); + scriptDraftDAO.updateByPrimaryKeyWithBLOBs(scriptDraftWithBLOBs); + } + + @Override + public void updateScriptDetailData(Long id, ScriptBO scriptBO) { + ScriptDraftWithBLOBs script = scriptDraftDAO.selectByPrimaryKey(id); + if (Objects.isNull(script)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + script.setBgScenesJson(scriptBO.getBgScenesJson()); + script.setFinalScenesJson(scriptBO.getFinalScenesJson()); + script.setMapLocationJson(scriptBO.getMapLocationJson()); + script.setMembersJson(scriptBO.getMembersJson()); + script.setPlayersJson(scriptBO.getPlayersJson()); + script.setActionsJson(scriptBO.getActionsJson()); + script.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_01); + scriptDraftDAO.updateByPrimaryKeyWithBLOBs(script); + } + + @Override + public void publish(Long id, String name, UserVO user) { + ScriptDraftWithBLOBs scriptDraftWithBLOBs = scriptDraftDAO.selectByPrimaryKey(id); + if (Objects.isNull(scriptDraftWithBLOBs)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + if (iSysUserService.isAdmin(user)) { + iScriptService.publish(scriptDraftWithBLOBs, user); + scriptDraftWithBLOBs.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_03); + } else { + scriptDraftWithBLOBs.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_02); + } + scriptDraftDAO.updateByPrimaryKey(scriptDraftWithBLOBs); + } + + @Override + public PageVO queryPagedPendingReviewScript(ScriptQueryVO queryVO) { + ScriptDraftExample example = new ScriptDraftExample(); + ScriptDraftExample.Criteria criteria = example.createCriteria(); + criteria.andStatusEqualTo(BusinessConsts.ReleaseReview.RELEASE_STATUS_02); + if (Objects.nonNull(queryVO.getMapId())) { + criteria.andMapIdEqualTo(queryVO.getMapId()); + } + if (StringUtils.hasText(queryVO.getName())) { + criteria.andNameLike(String.format("%%%s%%", queryVO.getName())); + } + Map userMap; + if (StringUtils.hasText(queryVO.getCreatorName())) { + List userVOList = iSysUserService.fuzzyQueryByName(queryVO.getCreatorName()); + List userIds = userVOList.stream().map(UserVO::getId).collect(Collectors.toList()); + if (CollectionUtils.isEmpty(userIds)) { + return new PageVO<>(); + } + criteria.andCreatorIdIn(userIds); + userMap = userVOList.stream().collect(Collectors.toMap(UserVO::getId, Function.identity())); + } else { + List userVOList = iSysUserService.fuzzyQueryByName(null); + userMap = userVOList.stream().collect(Collectors.toMap(UserVO::getId, Function.identity())); + } + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + Page page = (Page) scriptDraftDAO.selectByExample(example); + List scriptVOList = new ArrayList<>(); + page.getResult().forEach(script -> { + ScriptVO scriptVO = new ScriptVO(script); + scriptVO.setCreatorName(userMap.get(script.getCreatorId()).getName()); + scriptVOList.add(scriptVO); + }); + return PageVO.convert(page, scriptVOList); + } + + @Override + public void publishPass(Long id) { + ScriptDraft scriptDraft = scriptDraftDAO.selectByPrimaryKey(id); + scriptDraft.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_03); + scriptDraftDAO.updateByPrimaryKey(scriptDraft); + } + + @Override + public void publishReject(Long id, String explanation) { + ScriptDraft scriptDraft = scriptDraftDAO.selectByPrimaryKey(id); + scriptDraft.setExplanation(explanation); + scriptDraft.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_04); + scriptDraftDAO.updateByPrimaryKey(scriptDraft); + } + + @Override + public void retract(Long id, UserVO user) { + ScriptDraft scriptDraft = scriptDraftDAO.selectByPrimaryKey(id); + scriptDraft.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_01); + scriptDraftDAO.updateByPrimaryKey(scriptDraft); + } + + @Override + public ScriptDraftWithBLOBs getEntityById(Long scriptId) { + ScriptDraftWithBLOBs scriptDraftWithBLOBs = scriptDraftDAO.selectByPrimaryKey(scriptId); + if (Objects.isNull(scriptDraftWithBLOBs)) { + throw new DBException(ExceptionMapping.DATA_NOT_EXIST); + } + return scriptDraftWithBLOBs; + } + + @Override + public ScriptDraftWithBLOBs export(Long id) { + return getEntityById(id); + } + + @Override + public void importFromJson(Long mapId, String name, ScriptDraftWithBLOBs scriptDraft, UserVO user) { + checkNameRepeat(null, name, mapId, user); + scriptDraft.setId(null); + scriptDraft.setName(name); + scriptDraft.setMapId(mapId); + scriptDraft.setStatus(BusinessConsts.ReleaseReview.RELEASE_STATUS_01); + scriptDraft.setCreatorId(user.getId()); + scriptDraft.setCreateTime(LocalDateTime.now()); + scriptDraftDAO.insert(scriptDraft); + } + + private void checkNameRepeat(Long id, String name, Long mapId, UserVO userVO) { + ScriptDraftExample draftExample = new ScriptDraftExample(); + ScriptDraftExample.Criteria criteria = draftExample.createCriteria(); + if (Objects.nonNull(id)) { + criteria.andIdNotEqualTo(id); + } + criteria.andMapIdEqualTo(mapId) + .andNameEqualTo(name) + .andCreatorIdEqualTo(userVO.getId()); + if (scriptDraftDAO.countByExample(draftExample) > 0) { + throw new DBException(ExceptionMapping.NAME_REPEAT); + } + } +} diff --git a/src/main/java/club/joylink/rtss/services/ScriptService.java b/src/main/java/club/joylink/rtss/services/ScriptService.java new file mode 100644 index 000000000..fa7075a98 --- /dev/null +++ b/src/main/java/club/joylink/rtss/services/ScriptService.java @@ -0,0 +1,126 @@ +package club.joylink.rtss.services; + +import com.github.pagehelper.Page; +import com.github.pagehelper.PageHelper; +import com.joylink.base.exception.BusinessException; +import com.joylink.base.exception.constant.ExceptionMapping; +import club.joylink.rtss.simulation.cbtc.Simulation; +import club.joylink.rtss.simulation.cbtc.script.ScriptBO; +import club.joylink.rtss.constants.BusinessConsts; +import club.joylink.rtss.constants.StatusEnum; +import club.joylink.rtss.dao.ScriptDAO; +import club.joylink.rtss.entity.Script; +import club.joylink.rtss.entity.ScriptDraftWithBLOBs; +import club.joylink.rtss.entity.ScriptExample; +import club.joylink.rtss.entity.ScriptWithBLOBs; +import club.joylink.rtss.vo.UserVO; +import club.joylink.rtss.vo.client.PageVO; +import club.joylink.rtss.vo.client.script.ScriptQueryVO; +import club.joylink.rtss.vo.client.script.ScriptVO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.time.LocalDateTime; +import java.util.List; +import java.util.Objects; + +@Service +public class ScriptService implements IScriptService { + + @Autowired + private ScriptDAO scriptDAO; + + @Override + public PageVO pagingQueryOnlineScript(ScriptQueryVO queryVO) { + PageHelper.startPage(queryVO.getPageNum(), queryVO.getPageSize()); + ScriptExample example = new ScriptExample(); + ScriptExample.Criteria criteria = example.createCriteria(); + criteria.andStatusEqualTo(BusinessConsts.STATUS_USE); + if (Objects.nonNull(queryVO.getMapId())) { + criteria.andMapIdEqualTo(queryVO.getMapId()); + } + Page