Browse Source

初始化Influxdb操作项目

master
bgy 1 month ago
parent
commit
0f0fc34a45
140 changed files with 49734 additions and 0 deletions
  1. +31
    -0
      .gitignore
  2. +286
    -0
      mvnw
  3. +161
    -0
      mvnw.cmd
  4. +128
    -0
      pom.xml
  5. +18
    -0
      src/main/java/com/topsail/influxdb/OperateInfluxdbApplication.java
  6. +62
    -0
      src/main/java/com/topsail/influxdb/mapper/AlarmMapper.java
  7. +553
    -0
      src/main/java/com/topsail/influxdb/mapper/AlarmMapper.xml
  8. +48
    -0
      src/main/java/com/topsail/influxdb/mapper/CompanyMapper.java
  9. +339
    -0
      src/main/java/com/topsail/influxdb/mapper/CompanyMapper.xml
  10. +54
    -0
      src/main/java/com/topsail/influxdb/mapper/ConfigMapper.java
  11. +259
    -0
      src/main/java/com/topsail/influxdb/mapper/ConfigMapper.xml
  12. +48
    -0
      src/main/java/com/topsail/influxdb/mapper/DataFilterMapper.java
  13. +278
    -0
      src/main/java/com/topsail/influxdb/mapper/DataFilterMapper.xml
  14. +50
    -0
      src/main/java/com/topsail/influxdb/mapper/DeviceDetailMapper.java
  15. +622
    -0
      src/main/java/com/topsail/influxdb/mapper/DeviceDetailMapper.xml
  16. +40
    -0
      src/main/java/com/topsail/influxdb/mapper/DeviceDetailsMapper.java
  17. +424
    -0
      src/main/java/com/topsail/influxdb/mapper/DeviceDetailsMapper.xml
  18. +44
    -0
      src/main/java/com/topsail/influxdb/mapper/DeviceInfoMapper.java
  19. +321
    -0
      src/main/java/com/topsail/influxdb/mapper/DeviceInfoMapper.xml
  20. +48
    -0
      src/main/java/com/topsail/influxdb/mapper/DeviceLogMapper.java
  21. +259
    -0
      src/main/java/com/topsail/influxdb/mapper/DeviceLogMapper.xml
  22. +48
    -0
      src/main/java/com/topsail/influxdb/mapper/DeviceMapper.java
  23. +504
    -0
      src/main/java/com/topsail/influxdb/mapper/DeviceMapper.xml
  24. +40
    -0
      src/main/java/com/topsail/influxdb/mapper/DeviceProjectViewMapper.java
  25. +240
    -0
      src/main/java/com/topsail/influxdb/mapper/DeviceProjectViewMapper.xml
  26. +40
    -0
      src/main/java/com/topsail/influxdb/mapper/DeviceUserMapper.java
  27. +483
    -0
      src/main/java/com/topsail/influxdb/mapper/DeviceUserMapper.xml
  28. +32
    -0
      src/main/java/com/topsail/influxdb/mapper/GatewayDeviceMapper.java
  29. +17
    -0
      src/main/java/com/topsail/influxdb/mapper/GatewayDeviceMapper.xml
  30. +48
    -0
      src/main/java/com/topsail/influxdb/mapper/HistoryAllMapper.java
  31. +491
    -0
      src/main/java/com/topsail/influxdb/mapper/HistoryAllMapper.xml
  32. +48
    -0
      src/main/java/com/topsail/influxdb/mapper/HistoryErrMapper.java
  33. +491
    -0
      src/main/java/com/topsail/influxdb/mapper/HistoryErrMapper.xml
  34. +60
    -0
      src/main/java/com/topsail/influxdb/mapper/HistoryMapper.java
  35. +555
    -0
      src/main/java/com/topsail/influxdb/mapper/HistoryMapper.xml
  36. +72
    -0
      src/main/java/com/topsail/influxdb/mapper/ImsiImeiMapper.java
  37. +131
    -0
      src/main/java/com/topsail/influxdb/mapper/ImsiImeiMapper.xml
  38. +40
    -0
      src/main/java/com/topsail/influxdb/mapper/NbiotConfigMapper.java
  39. +688
    -0
      src/main/java/com/topsail/influxdb/mapper/NbiotConfigMapper.xml
  40. +40
    -0
      src/main/java/com/topsail/influxdb/mapper/OcCompanyMapper.java
  41. +285
    -0
      src/main/java/com/topsail/influxdb/mapper/OcCompanyMapper.xml
  42. +40
    -0
      src/main/java/com/topsail/influxdb/mapper/OcConfigMapper.java
  43. +688
    -0
      src/main/java/com/topsail/influxdb/mapper/OcConfigMapper.xml
  44. +44
    -0
      src/main/java/com/topsail/influxdb/mapper/OcDeviceMapper.java
  45. +385
    -0
      src/main/java/com/topsail/influxdb/mapper/OcDeviceMapper.xml
  46. +40
    -0
      src/main/java/com/topsail/influxdb/mapper/OnenetCompanyMapper.java
  47. +254
    -0
      src/main/java/com/topsail/influxdb/mapper/OnenetCompanyMapper.xml
  48. +40
    -0
      src/main/java/com/topsail/influxdb/mapper/OnenetDeviceMapper.java
  49. +332
    -0
      src/main/java/com/topsail/influxdb/mapper/OnenetDeviceMapper.xml
  50. +40
    -0
      src/main/java/com/topsail/influxdb/mapper/OnlineProjectMapper.java
  51. +209
    -0
      src/main/java/com/topsail/influxdb/mapper/OnlineProjectMapper.xml
  52. +48
    -0
      src/main/java/com/topsail/influxdb/mapper/OnlineRateMapper.java
  53. +337
    -0
      src/main/java/com/topsail/influxdb/mapper/OnlineRateMapper.xml
  54. +40
    -0
      src/main/java/com/topsail/influxdb/mapper/OnlineRateViewMapper.java
  55. +195
    -0
      src/main/java/com/topsail/influxdb/mapper/OnlineRateViewMapper.xml
  56. +48
    -0
      src/main/java/com/topsail/influxdb/mapper/ProjectMapper.java
  57. +355
    -0
      src/main/java/com/topsail/influxdb/mapper/ProjectMapper.xml
  58. +48
    -0
      src/main/java/com/topsail/influxdb/mapper/ProjectTransmitMapper.java
  59. +432
    -0
      src/main/java/com/topsail/influxdb/mapper/ProjectTransmitMapper.xml
  60. +48
    -0
      src/main/java/com/topsail/influxdb/mapper/TransmitTypeMapper.java
  61. +223
    -0
      src/main/java/com/topsail/influxdb/mapper/TransmitTypeMapper.xml
  62. +40
    -0
      src/main/java/com/topsail/influxdb/mapper/UpdateMsgViewMapper.java
  63. +195
    -0
      src/main/java/com/topsail/influxdb/mapper/UpdateMsgViewMapper.xml
  64. +114
    -0
      src/main/java/com/topsail/influxdb/model/AepModel.java
  65. +34
    -0
      src/main/java/com/topsail/influxdb/model/InfluxData.java
  66. +133
    -0
      src/main/java/com/topsail/influxdb/model/NewtopData.java
  67. +112
    -0
      src/main/java/com/topsail/influxdb/model/NewtopParam.java
  68. +31
    -0
      src/main/java/com/topsail/influxdb/model/ParamUnit.java
  69. +94
    -0
      src/main/java/com/topsail/influxdb/model/TransmitModel.java
  70. +44
    -0
      src/main/java/com/topsail/influxdb/model/UserPlat.java
  71. +409
    -0
      src/main/java/com/topsail/influxdb/pojo/Alarm.java
  72. +781
    -0
      src/main/java/com/topsail/influxdb/pojo/AlarmExample.java
  73. +280
    -0
      src/main/java/com/topsail/influxdb/pojo/Company.java
  74. +791
    -0
      src/main/java/com/topsail/influxdb/pojo/CompanyExample.java
  75. +244
    -0
      src/main/java/com/topsail/influxdb/pojo/Config.java
  76. +331
    -0
      src/main/java/com/topsail/influxdb/pojo/ConfigExample.java
  77. +246
    -0
      src/main/java/com/topsail/influxdb/pojo/DataFilter.java
  78. +580
    -0
      src/main/java/com/topsail/influxdb/pojo/DataFilterExample.java
  79. +498
    -0
      src/main/java/com/topsail/influxdb/pojo/Device.java
  80. +434
    -0
      src/main/java/com/topsail/influxdb/pojo/DeviceDetail.java
  81. +1661
    -0
      src/main/java/com/topsail/influxdb/pojo/DeviceDetailExample.java
  82. +379
    -0
      src/main/java/com/topsail/influxdb/pojo/DeviceDetails.java
  83. +1351
    -0
      src/main/java/com/topsail/influxdb/pojo/DeviceDetailsExample.java
  84. +1241
    -0
      src/main/java/com/topsail/influxdb/pojo/DeviceExample.java
  85. +279
    -0
      src/main/java/com/topsail/influxdb/pojo/DeviceInfo.java
  86. +740
    -0
      src/main/java/com/topsail/influxdb/pojo/DeviceInfoExample.java
  87. +236
    -0
      src/main/java/com/topsail/influxdb/pojo/DeviceLog.java
  88. +531
    -0
      src/main/java/com/topsail/influxdb/pojo/DeviceLogExample.java
  89. +246
    -0
      src/main/java/com/topsail/influxdb/pojo/DeviceProjectView.java
  90. +590
    -0
      src/main/java/com/topsail/influxdb/pojo/DeviceProjectViewExample.java
  91. +423
    -0
      src/main/java/com/topsail/influxdb/pojo/DeviceUser.java
  92. +1631
    -0
      src/main/java/com/topsail/influxdb/pojo/DeviceUserExample.java
  93. +125
    -0
      src/main/java/com/topsail/influxdb/pojo/GatewayDevice.java
  94. +382
    -0
      src/main/java/com/topsail/influxdb/pojo/History.java
  95. +368
    -0
      src/main/java/com/topsail/influxdb/pojo/HistoryAll.java
  96. +1311
    -0
      src/main/java/com/topsail/influxdb/pojo/HistoryAllExample.java
  97. +368
    -0
      src/main/java/com/topsail/influxdb/pojo/HistoryErr.java
  98. +1311
    -0
      src/main/java/com/topsail/influxdb/pojo/HistoryErrExample.java
  99. +1241
    -0
      src/main/java/com/topsail/influxdb/pojo/HistoryExample.java
  100. +215
    -0
      src/main/java/com/topsail/influxdb/pojo/HistoryWithBLOBs.java

+ 31
- 0
.gitignore View File

@ -0,0 +1,31 @@
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**
!**/src/test/**
### 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/
### VS Code ###
.vscode/

+ 286
- 0
mvnw View File

@ -0,0 +1,286 @@
#!/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.
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# Maven2 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)`"
# TODO classpath?
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
jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"
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 command -v wget > /dev/null; then
if [ "$MVNW_VERBOSE" = true ]; then
echo "Found wget ... using wget"
fi
wget "$jarUrl" -O "$wrapperJarPath"
elif command -v curl > /dev/null; then
if [ "$MVNW_VERBOSE" = true ]; then
echo "Found curl ... using curl"
fi
curl -o "$wrapperJarPath" "$jarUrl"
else
if [ "$MVNW_VERBOSE" = true ]; then
echo "Falling back to using Java to download"
fi
javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
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
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 "$@"

+ 161
- 0
mvnw.cmd View File

@ -0,0 +1,161 @@
@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 Maven2 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 key stroke 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 my 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.4.2/maven-wrapper-0.4.2.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% (
echo Found %WRAPPER_JAR%
) else (
echo Couldn't find %WRAPPER_JAR%, downloading it ...
echo Downloading from: %DOWNLOAD_URL%
powershell -Command "(New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"
echo Finished downloading %WRAPPER_JAR%
)
@REM End of extension
%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%

+ 128
- 0
pom.xml View File

@ -0,0 +1,128 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.8.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.topsail</groupId>
<artifactId>OperateInfluxdb</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>OperateInfluxdb</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-amqp</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.1.0</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.13</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.amqp</groupId>
<artifactId>spring-rabbit-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.15</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>
<dependency>
<groupId>com.influxdb</groupId>
<artifactId>influxdb-client-java</artifactId>
<version>1.8.0</version>
</dependency>
<!-- 添加junit测试单元包 -->
<!-- <dependency>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-test</artifactId>-->
<!-- <version> 1.5.1.RELEASE</version>-->
<!-- </dependency>-->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>4.3.6.RELEASE</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.1.8.RELEASE</version>
</plugin>
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.5</version>
<dependencies>
<!-- jdbc 依赖 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.40</version>
</dependency>
<dependency>
<groupId>com.itfsw</groupId>
<artifactId>mybatis-generator-plugin</artifactId>
<version>1.2.20</version>
</dependency>
</dependencies>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</build>
</project>

+ 18
- 0
src/main/java/com/topsail/influxdb/OperateInfluxdbApplication.java View File

@ -0,0 +1,18 @@
package com.topsail.influxdb;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import java.util.TimeZone;
@SpringBootApplication
@MapperScan("com.topsail.influxdb.mapper")
public class OperateInfluxdbApplication {
public static void main(String[] args) {
TimeZone.setDefault(TimeZone.getTimeZone("Asia/Shanghai"));
SpringApplication.run(OperateInfluxdbApplication.class, args);
}
}

+ 62
- 0
src/main/java/com/topsail/influxdb/mapper/AlarmMapper.java View File

@ -0,0 +1,62 @@
package com.topsail.influxdb.mapper;
import com.topsail.influxdb.pojo.Alarm;
import com.topsail.influxdb.pojo.AlarmExample;
import java.util.Date;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface AlarmMapper {
long countByExample(AlarmExample example);
int deleteByExample(AlarmExample example);
int deleteByPrimaryKey(Long id);
int insert(Alarm record);
int insertAlarmData(@Param("alarmData") Alarm record);
int updateAlarmData(Alarm record);
int insertAlarmDataMonth(@Param("alarmData") Alarm record);
Alarm findAlarmData(@Param("imei")String imei);
int insertSelective(Alarm record);
List<Alarm> selectByExample(AlarmExample example);
Alarm selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") Alarm record, @Param("example") AlarmExample example);
int updateByExample(@Param("record") Alarm record, @Param("example") AlarmExample example);
int updateByPrimaryKeySelective(Alarm record);
int updateByPrimaryKey(Alarm record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table alarm
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsert(@Param("list") List<Alarm> list);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table alarm
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsertSelective(@Param("list") List<Alarm> list, @Param("selective") Alarm.Column ... selective);
int deleteAlarmDataMonth(@Param("endTime") Date endTime);
}

+ 553
- 0
src/main/java/com/topsail/influxdb/mapper/AlarmMapper.xml View File

@ -0,0 +1,553 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.topsail.influxdb.mapper.AlarmMapper">
<resultMap id="BaseResultMap" type="com.topsail.influxdb.pojo.Alarm">
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="Imei" jdbcType="VARCHAR" property="imei"/>
<result column="alarmType" jdbcType="VARCHAR" property="alarmtype"/>
<result column="alarmValue" jdbcType="VARCHAR" property="alarmvalue"/>
<result column="unit" jdbcType="VARCHAR" property="unit"/>
<result column="status" jdbcType="INTEGER" property="status"/>
<result column="createtime" jdbcType="TIMESTAMP" property="createtime"/>
<result column="updatetime" jdbcType="TIMESTAMP" property="updatetime"/>
<result column="endtime" jdbcType="TIMESTAMP" property="endtime"/>
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="("
separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="("
separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, Imei, alarmType, alarmValue, unit, status, createtime, updatetime, endtime
</sql>
<select id="selectByExample" parameterType="com.topsail.influxdb.pojo.AlarmExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List"/>
from alarm
<if test="_parameter != null">
<include refid="Example_Where_Clause"/>
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from alarm
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete
from alarm
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.topsail.influxdb.pojo.AlarmExample">
delete from alarm
<if test="_parameter != null">
<include refid="Example_Where_Clause"/>
</if>
</delete>
<insert id="insert" parameterType="com.topsail.influxdb.pojo.Alarm">
insert into alarm (id, Imei, alarmType, alarmValue, unit, status, createtime, updatetime, endtime)
values (#{id,jdbcType=BIGINT},
#{imei,jdbcType=VARCHAR},
#{alarmtype,jdbcType=VARCHAR},
#{alarmvalue,jdbcType=VARCHAR},
#{unit,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER},
#{createtime,jdbcType=TIMESTAMP},
#{updatetime,jdbcType=TIMESTAMP},
#{endtime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.topsail.influxdb.pojo.Alarm">
insert into alarm
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="imei != null">
Imei,
</if>
<if test="alarmtype != null">
alarmType,
</if>
<if test="alarmvalue != null">
alarmValue,
</if>
<if test="unit != null">
unit,
</if>
<if test="status != null">
status,
</if>
<if test="createtime != null">
createtime,
</if>
<if test="updatetime != null">
updatetime,
</if>
<if test="endtime != null">
endtime,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="imei != null">
#{imei,jdbcType=VARCHAR},
</if>
<if test="alarmtype != null">
#{alarmtype,jdbcType=VARCHAR},
</if>
<if test="alarmvalue != null">
#{alarmvalue,jdbcType=VARCHAR},
</if>
<if test="unit != null">
#{unit,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createtime != null">
#{createtime,jdbcType=TIMESTAMP},
</if>
<if test="updatetime != null">
#{updatetime,jdbcType=TIMESTAMP},
</if>
<if test="endtime != null">
#{endtime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.topsail.influxdb.pojo.AlarmExample" resultType="java.lang.Long">
select count(*) from alarm
<if test="_parameter != null">
<include refid="Example_Where_Clause"/>
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update alarm
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.imei != null">
Imei = #{record.imei,jdbcType=VARCHAR},
</if>
<if test="record.alarmtype != null">
alarmType = #{record.alarmtype,jdbcType=VARCHAR},
</if>
<if test="record.alarmvalue != null">
alarmValue = #{record.alarmvalue,jdbcType=VARCHAR},
</if>
<if test="record.unit != null">
unit = #{record.unit,jdbcType=VARCHAR},
</if>
<if test="record.status != null">
status = #{record.status,jdbcType=INTEGER},
</if>
<if test="record.createtime != null">
createtime = #{record.createtime,jdbcType=TIMESTAMP},
</if>
<if test="record.updatetime != null">
updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
</if>
<if test="record.endtime != null">
endtime = #{record.endtime,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause"/>
</if>
</update>
<update id="updateByExample" parameterType="map">
update alarm
set id = #{record.id,jdbcType=BIGINT},
Imei = #{record.imei,jdbcType=VARCHAR},
alarmType = #{record.alarmtype,jdbcType=VARCHAR},
alarmValue = #{record.alarmvalue,jdbcType=VARCHAR},
unit = #{record.unit,jdbcType=VARCHAR},
status = #{record.status,jdbcType=INTEGER},
createtime = #{record.createtime,jdbcType=TIMESTAMP},
updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
endtime = #{record.endtime,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause"/>
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.topsail.influxdb.pojo.Alarm">
update alarm
<set>
<if test="imei != null">
Imei = #{imei,jdbcType=VARCHAR},
</if>
<if test="alarmtype != null">
alarmType = #{alarmtype,jdbcType=VARCHAR},
</if>
<if test="alarmvalue != null">
alarmValue = #{alarmvalue,jdbcType=VARCHAR},
</if>
<if test="unit != null">
unit = #{unit,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createtime != null">
createtime = #{createtime,jdbcType=TIMESTAMP},
</if>
<if test="updatetime != null">
updatetime = #{updatetime,jdbcType=TIMESTAMP},
</if>
<if test="endtime != null">
endtime = #{endtime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.topsail.influxdb.pojo.Alarm">
update alarm
set Imei = #{imei,jdbcType=VARCHAR},
alarmType = #{alarmtype,jdbcType=VARCHAR},
alarmValue = #{alarmvalue,jdbcType=VARCHAR},
unit = #{unit,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
createtime = #{createtime,jdbcType=TIMESTAMP},
updatetime = #{updatetime,jdbcType=TIMESTAMP},
endtime = #{endtime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
<insert id="batchInsert" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into alarm
(id, Imei, alarmType, alarmValue, unit, status, createtime, updatetime, endtime)
values
<foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=BIGINT}, #{item.imei,jdbcType=VARCHAR}, #{item.alarmtype,jdbcType=VARCHAR},
#{item.alarmvalue,jdbcType=VARCHAR}, #{item.unit,jdbcType=VARCHAR}, #{item.status,jdbcType=INTEGER},
#{item.createtime,jdbcType=TIMESTAMP}, #{item.updatetime,jdbcType=TIMESTAMP},
#{item.endtime,jdbcType=TIMESTAMP}
)
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into alarm (
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
)
values
<foreach collection="list" item="item" separator=",">
(
<foreach collection="selective" item="column" separator=",">
<if test="'id'.toString() == column.value">
#{item.id,jdbcType=BIGINT}
</if>
<if test="'Imei'.toString() == column.value">
#{item.imei,jdbcType=VARCHAR}
</if>
<if test="'alarmType'.toString() == column.value">
#{item.alarmtype,jdbcType=VARCHAR}
</if>
<if test="'alarmValue'.toString() == column.value">
#{item.alarmvalue,jdbcType=VARCHAR}
</if>
<if test="'unit'.toString() == column.value">
#{item.unit,jdbcType=VARCHAR}
</if>
<if test="'status'.toString() == column.value">
#{item.status,jdbcType=INTEGER}
</if>
<if test="'createtime'.toString() == column.value">
#{item.createtime,jdbcType=TIMESTAMP}
</if>
<if test="'updatetime'.toString() == column.value">
#{item.updatetime,jdbcType=TIMESTAMP}
</if>
<if test="'endtime'.toString() == column.value">
#{item.endtime,jdbcType=TIMESTAMP}
</if>
</foreach>
)
</foreach>
</insert>
<!-- 单个插入 -->
<insert id="insertAlarmData" parameterType="com.topsail.influxdb.pojo.Alarm" useGeneratedKeys="true"
keyProperty="alarmData.id">
insert into alarm_data
<trim prefix="(" suffix=")" suffixOverrides=",">
imei,
alarmtype,
alarmvalue,
unit,
`status`,
createtime,
updatetime,
endtime,
alarm_n,
address,
lon,
lat,
alarmmsg,
descr,
uuid
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{alarmData.imei,jdbcType=VARCHAR},
#{alarmData.alarmtype,jdbcType=VARCHAR},
#{alarmData.alarmvalue,jdbcType=VARCHAR},
#{alarmData.unit,jdbcType=VARCHAR},
#{alarmData.status,jdbcType=INTEGER},
#{alarmData.createtime,jdbcType=TIMESTAMP},
#{alarmData.updatetime,jdbcType=TIMESTAMP},
#{alarmData.endtime,jdbcType=TIMESTAMP},
#{alarmData.alarmN,jdbcType=INTEGER},
#{alarmData.address,jdbcType=VARCHAR},
#{alarmData.lon,jdbcType=DOUBLE},
#{alarmData.lat,jdbcType=DOUBLE},
#{alarmData.alarmMsg,jdbcType=VARCHAR},
#{alarmData.descr,jdbcType=VARCHAR},
#{alarmData.uuid,jdbcType=VARCHAR}
</trim>
</insert>
<!-- 单个插入 -->
<insert id="insertAlarmDataMonth" parameterType="com.topsail.influxdb.pojo.Alarm" useGeneratedKeys="true"
keyProperty="alarmData.id">
insert into alarm_data_month
<trim prefix="(" suffix=")" suffixOverrides=",">
imei,
alarmType,
alarmValue,
unit,
`status`,
createtime,
updatetime,
endtime,
address,
lon,
lat,
alarmMsg,
descr,
uuid
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{alarmData.imei,jdbcType=VARCHAR},
#{alarmData.alarmtype,jdbcType=VARCHAR},
#{alarmData.alarmvalue,jdbcType=VARCHAR},
#{alarmData.unit,jdbcType=VARCHAR},
#{alarmData.status,jdbcType=INTEGER},
#{alarmData.createtime,jdbcType=TIMESTAMP},
#{alarmData.updatetime,jdbcType=TIMESTAMP},
#{alarmData.endtime,jdbcType=TIMESTAMP},
#{alarmData.address,jdbcType=VARCHAR},
#{alarmData.lon,jdbcType=DOUBLE},
#{alarmData.lat,jdbcType=DOUBLE},
#{alarmData.alarmMsg,jdbcType=VARCHAR},
#{alarmData.descr,jdbcType=VARCHAR},
#{alarmData.uuid,jdbcType=VARCHAR}
</trim>
</insert>
<!-- 单个更新 -->
<update id="updateAlarmData" parameterType="com.topsail.influxdb.pojo.Alarm">
update alarm_data
<set>
<if test="imei != null">
imei=#{imei,jdbcType=VARCHAR},
</if>
<if test="alarmtype != null">
alarmType=#{alarmtype,jdbcType=VARCHAR},
</if>
<if test="alarmvalue != null">
alarmValue=#{alarmvalue,jdbcType=VARCHAR},
</if>
<if test="unit != null">
unit=#{unit,jdbcType=VARCHAR},
</if>
<if test="status != null">
`status`=#{status,jdbcType=INTEGER},
</if>
<if test="createtime != null">
createtime=#{createtime,jdbcType=TIMESTAMP},
</if>
<if test="updatetime != null">
updatetime=#{updatetime,jdbcType=TIMESTAMP},
</if>
<if test="endtime != null">
endtime=#{endtime,jdbcType=TIMESTAMP},
</if>
<if test="alarmN != null">
alarm_n=#{alarmN,jdbcType=INTEGER},
</if>
<if test="address != null">
address=#{address,jdbcType=VARCHAR},
</if>
<if test="lon != null">
lon=#{lon,jdbcType=DOUBLE},
</if>
<if test="lat != null">
lat=#{lat,jdbcType=DOUBLE},
</if>
<if test="alarmMsg != null">
alarmMsg=#{alarmMsg,jdbcType=VARCHAR},
</if>
<if test="descr != null">
descr=#{descr,jdbcType=VARCHAR},
</if>
<if test="uuid != null">
uuid=#{uuid,jdbcType=VARCHAR}
</if>
</set>
where id = #{id}
</update>
<resultMap id="alarmDataMap" type="com.topsail.influxdb.pojo.Alarm">
<id column="id" property="id"/>
<result column="imei" jdbcType="VARCHAR" property="imei" />
<result column="alarmType" jdbcType="VARCHAR" property="alarmtype" />
<result column="alarmValue" jdbcType="VARCHAR" property="alarmvalue" />
<result column="unit" jdbcType="VARCHAR" property="unit" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="createtime" jdbcType="TIMESTAMP" property="createtime" />
<result column="updatetime" jdbcType="TIMESTAMP" property="updatetime" />
<result column="endtime" jdbcType="TIMESTAMP" property="endtime" />
<result column="alarm_n" jdbcType="INTEGER" property="alarmN" />
<result column="address" jdbcType="VARCHAR" property="address" />
<result column="lon" jdbcType="DOUBLE" property="lon" />
<result column="lat" jdbcType="DOUBLE" property="lat" />
<result column="alarMsg" jdbcType="VARCHAR" property="alarMsg" />
<result column="descr" jdbcType="VARCHAR" property="descr" />
<result column="uuid" jdbcType="VARCHAR" property="uuid" />
</resultMap>
<!-- 基本列 -->
<sql id="alarmDataColumn">
ad.id,
ad.imei,
ad.alarmType,
ad.alarmValue,
ad.unit,
ad.status,
ad.createtime,
ad.updatetime,
ad.endtime,
ad.alarm_n,
ad.address,
ad.lon,
ad.lat,
ad.alarmMsg,
ad.descr,
ad.uuid
</sql>
<!-- 单个查询 -->
<select id="findAlarmData" parameterType="java.lang.String" resultMap="alarmDataMap">
SELECT
<include refid="alarmDataColumn"/>
FROM alarm_data as ad
where ad.imei = #{imei}
</select>
<!-- 删除超过时间的数据 -->
<delete id="deleteAlarmDataMonth">
delete from alarm_data_month where #{endTime,jdbcType=TIMESTAMP} > createtime
</delete>
</mapper>

+ 48
- 0
src/main/java/com/topsail/influxdb/mapper/CompanyMapper.java View File

@ -0,0 +1,48 @@
package com.topsail.influxdb.mapper;
import com.topsail.influxdb.pojo.Company;
import com.topsail.influxdb.pojo.CompanyExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface CompanyMapper {
long countByExample(CompanyExample example);
int deleteByExample(CompanyExample example);
int deleteByPrimaryKey(Integer id);
int insert(Company record);
int insertSelective(Company record);
List<Company> selectByExample(CompanyExample example);
Company selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") Company record, @Param("example") CompanyExample example);
int updateByExample(@Param("record") Company record, @Param("example") CompanyExample example);
int updateByPrimaryKeySelective(Company record);
int updateByPrimaryKey(Company record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table company
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsert(@Param("list") List<Company> list);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table company
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsertSelective(@Param("list") List<Company> list, @Param("selective") Company.Column ... selective);
}

+ 339
- 0
src/main/java/com/topsail/influxdb/mapper/CompanyMapper.xml View File

@ -0,0 +1,339 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.topsail.influxdb.mapper.CompanyMapper">
<resultMap id="BaseResultMap" type="com.topsail.influxdb.pojo.Company">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="company_name" jdbcType="VARCHAR" property="companyName" />
<result column="company_full_name" jdbcType="VARCHAR" property="companyFullName" />
<result column="platformType" jdbcType="VARCHAR" property="platformtype" />
<result column="dmp_id" jdbcType="INTEGER" property="dmpId" />
<result column="createtime" jdbcType="TIMESTAMP" property="createtime" />
<result column="creator" jdbcType="VARCHAR" property="creator" />
<result column="area_id" jdbcType="INTEGER" property="areaId" />
<result column="period" jdbcType="VARCHAR" property="period" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, company_name, company_full_name, platformType, dmp_id, createtime, creator, area_id,
period
</sql>
<select id="selectByExample" parameterType="com.topsail.influxdb.pojo.CompanyExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from company
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from company
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from company
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.topsail.influxdb.pojo.CompanyExample">
delete from company
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.topsail.influxdb.pojo.Company">
insert into company (id, company_name, company_full_name,
platformType, dmp_id, createtime,
creator, area_id, period
)
values (#{id,jdbcType=INTEGER}, #{companyName,jdbcType=VARCHAR}, #{companyFullName,jdbcType=VARCHAR},
#{platformtype,jdbcType=VARCHAR}, #{dmpId,jdbcType=INTEGER}, #{createtime,jdbcType=TIMESTAMP},
#{creator,jdbcType=VARCHAR}, #{areaId,jdbcType=INTEGER}, #{period,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.topsail.influxdb.pojo.Company">
insert into company
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="companyName != null">
company_name,
</if>
<if test="companyFullName != null">
company_full_name,
</if>
<if test="platformtype != null">
platformType,
</if>
<if test="dmpId != null">
dmp_id,
</if>
<if test="createtime != null">
createtime,
</if>
<if test="creator != null">
creator,
</if>
<if test="areaId != null">
area_id,
</if>
<if test="period != null">
period,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="companyName != null">
#{companyName,jdbcType=VARCHAR},
</if>
<if test="companyFullName != null">
#{companyFullName,jdbcType=VARCHAR},
</if>
<if test="platformtype != null">
#{platformtype,jdbcType=VARCHAR},
</if>
<if test="dmpId != null">
#{dmpId,jdbcType=INTEGER},
</if>
<if test="createtime != null">
#{createtime,jdbcType=TIMESTAMP},
</if>
<if test="creator != null">
#{creator,jdbcType=VARCHAR},
</if>
<if test="areaId != null">
#{areaId,jdbcType=INTEGER},
</if>
<if test="period != null">
#{period,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.topsail.influxdb.pojo.CompanyExample" resultType="java.lang.Long">
select count(*) from company
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update company
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.companyName != null">
company_name = #{record.companyName,jdbcType=VARCHAR},
</if>
<if test="record.companyFullName != null">
company_full_name = #{record.companyFullName,jdbcType=VARCHAR},
</if>
<if test="record.platformtype != null">
platformType = #{record.platformtype,jdbcType=VARCHAR},
</if>
<if test="record.dmpId != null">
dmp_id = #{record.dmpId,jdbcType=INTEGER},
</if>
<if test="record.createtime != null">
createtime = #{record.createtime,jdbcType=TIMESTAMP},
</if>
<if test="record.creator != null">
creator = #{record.creator,jdbcType=VARCHAR},
</if>
<if test="record.areaId != null">
area_id = #{record.areaId,jdbcType=INTEGER},
</if>
<if test="record.period != null">
period = #{record.period,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update company
set id = #{record.id,jdbcType=INTEGER},
company_name = #{record.companyName,jdbcType=VARCHAR},
company_full_name = #{record.companyFullName,jdbcType=VARCHAR},
platformType = #{record.platformtype,jdbcType=VARCHAR},
dmp_id = #{record.dmpId,jdbcType=INTEGER},
createtime = #{record.createtime,jdbcType=TIMESTAMP},
creator = #{record.creator,jdbcType=VARCHAR},
area_id = #{record.areaId,jdbcType=INTEGER},
period = #{record.period,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.topsail.influxdb.pojo.Company">
update company
<set>
<if test="companyName != null">
company_name = #{companyName,jdbcType=VARCHAR},
</if>
<if test="companyFullName != null">
company_full_name = #{companyFullName,jdbcType=VARCHAR},
</if>
<if test="platformtype != null">
platformType = #{platformtype,jdbcType=VARCHAR},
</if>
<if test="dmpId != null">
dmp_id = #{dmpId,jdbcType=INTEGER},
</if>
<if test="createtime != null">
createtime = #{createtime,jdbcType=TIMESTAMP},
</if>
<if test="creator != null">
creator = #{creator,jdbcType=VARCHAR},
</if>
<if test="areaId != null">
area_id = #{areaId,jdbcType=INTEGER},
</if>
<if test="period != null">
period = #{period,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.topsail.influxdb.pojo.Company">
update company
set company_name = #{companyName,jdbcType=VARCHAR},
company_full_name = #{companyFullName,jdbcType=VARCHAR},
platformType = #{platformtype,jdbcType=VARCHAR},
dmp_id = #{dmpId,jdbcType=INTEGER},
createtime = #{createtime,jdbcType=TIMESTAMP},
creator = #{creator,jdbcType=VARCHAR},
area_id = #{areaId,jdbcType=INTEGER},
period = #{period,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<insert id="batchInsert" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into company
(id, company_name, company_full_name, platformType, dmp_id, createtime, creator,
area_id, period)
values
<foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=INTEGER}, #{item.companyName,jdbcType=VARCHAR}, #{item.companyFullName,jdbcType=VARCHAR},
#{item.platformtype,jdbcType=VARCHAR}, #{item.dmpId,jdbcType=INTEGER}, #{item.createtime,jdbcType=TIMESTAMP},
#{item.creator,jdbcType=VARCHAR}, #{item.areaId,jdbcType=INTEGER}, #{item.period,jdbcType=VARCHAR}
)
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into company (
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
)
values
<foreach collection="list" item="item" separator=",">
(
<foreach collection="selective" item="column" separator=",">
<if test="'id'.toString() == column.value">
#{item.id,jdbcType=INTEGER}
</if>
<if test="'company_name'.toString() == column.value">
#{item.companyName,jdbcType=VARCHAR}
</if>
<if test="'company_full_name'.toString() == column.value">
#{item.companyFullName,jdbcType=VARCHAR}
</if>
<if test="'platformType'.toString() == column.value">
#{item.platformtype,jdbcType=VARCHAR}
</if>
<if test="'dmp_id'.toString() == column.value">
#{item.dmpId,jdbcType=INTEGER}
</if>
<if test="'createtime'.toString() == column.value">
#{item.createtime,jdbcType=TIMESTAMP}
</if>
<if test="'creator'.toString() == column.value">
#{item.creator,jdbcType=VARCHAR}
</if>
<if test="'area_id'.toString() == column.value">
#{item.areaId,jdbcType=INTEGER}
</if>
<if test="'period'.toString() == column.value">
#{item.period,jdbcType=VARCHAR}
</if>
</foreach>
)
</foreach>
</insert>
</mapper>

+ 54
- 0
src/main/java/com/topsail/influxdb/mapper/ConfigMapper.java View File

@ -0,0 +1,54 @@
package com.topsail.influxdb.mapper;
import com.topsail.influxdb.pojo.Config;
import com.topsail.influxdb.pojo.ConfigExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface ConfigMapper {
long countByExample(ConfigExample example);
int deleteByExample(ConfigExample example);
int deleteByPrimaryKey(String imei);
int insert(Config record);
int insertSelective(Config record);
List<Config> selectByExampleWithBLOBs(ConfigExample example);
List<Config> selectByExample(ConfigExample example);
Config selectByPrimaryKey(String imei);
int updateByExampleSelective(@Param("record") Config record, @Param("example") ConfigExample example);
int updateByExampleWithBLOBs(@Param("record") Config record, @Param("example") ConfigExample example);
int updateByExample(@Param("record") Config record, @Param("example") ConfigExample example);
int updateByPrimaryKeySelective(Config record);
int updateByPrimaryKeyWithBLOBs(Config record);
int updateByPrimaryKey(Config record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsert(@Param("list") List<Config> list);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsertSelective(@Param("list") List<Config> list, @Param("selective") Config.Column ... selective);
}

+ 259
- 0
src/main/java/com/topsail/influxdb/mapper/ConfigMapper.xml View File

@ -0,0 +1,259 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.topsail.influxdb.mapper.ConfigMapper">
<resultMap id="BaseResultMap" type="com.topsail.influxdb.pojo.Config">
<id column="imei" jdbcType="VARCHAR" property="imei" />
<result column="updatetime" jdbcType="TIMESTAMP" property="updatetime" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.topsail.influxdb.pojo.Config">
<result column="config" jdbcType="LONGVARCHAR" property="config" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
imei, updatetime
</sql>
<sql id="Blob_Column_List">
config
</sql>
<select id="selectByExampleWithBLOBs" parameterType="com.topsail.influxdb.pojo.ConfigExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from config
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="com.topsail.influxdb.pojo.ConfigExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from config
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from config
where imei = #{imei,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from config
where imei = #{imei,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="com.topsail.influxdb.pojo.ConfigExample">
delete from config
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.topsail.influxdb.pojo.Config">
insert into config (imei, updatetime, config
)
values (#{imei,jdbcType=VARCHAR}, #{updatetime,jdbcType=TIMESTAMP}, #{config,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.topsail.influxdb.pojo.Config">
insert into config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="imei != null">
imei,
</if>
<if test="updatetime != null">
updatetime,
</if>
<if test="config != null">
config,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="imei != null">
#{imei,jdbcType=VARCHAR},
</if>
<if test="updatetime != null">
#{updatetime,jdbcType=TIMESTAMP},
</if>
<if test="config != null">
#{config,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.topsail.influxdb.pojo.ConfigExample" resultType="java.lang.Long">
select count(*) from config
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update config
<set>
<if test="record.imei != null">
imei = #{record.imei,jdbcType=VARCHAR},
</if>
<if test="record.updatetime != null">
updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
</if>
<if test="record.config != null">
config = #{record.config,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
update config
set imei = #{record.imei,jdbcType=VARCHAR},
updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
config = #{record.config,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update config
set imei = #{record.imei,jdbcType=VARCHAR},
updatetime = #{record.updatetime,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.topsail.influxdb.pojo.Config">
update config
<set>
<if test="updatetime != null">
updatetime = #{updatetime,jdbcType=TIMESTAMP},
</if>
<if test="config != null">
config = #{config,jdbcType=LONGVARCHAR},
</if>
</set>
where imei = #{imei,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.topsail.influxdb.pojo.Config">
update config
set updatetime = #{updatetime,jdbcType=TIMESTAMP},
config = #{config,jdbcType=LONGVARCHAR}
where imei = #{imei,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.topsail.influxdb.pojo.Config">
update config
set updatetime = #{updatetime,jdbcType=TIMESTAMP}
where imei = #{imei,jdbcType=VARCHAR}
</update>
<insert id="batchInsert" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into config
(imei, updatetime, config)
values
<foreach collection="list" item="item" separator=",">
(#{item.imei,jdbcType=VARCHAR}, #{item.updatetime,jdbcType=TIMESTAMP}, #{item.config,jdbcType=LONGVARCHAR}
)
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into config (
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
)
values
<foreach collection="list" item="item" separator=",">
(
<foreach collection="selective" item="column" separator=",">
<if test="'imei'.toString() == column.value">
#{item.imei,jdbcType=VARCHAR}
</if>
<if test="'updatetime'.toString() == column.value">
#{item.updatetime,jdbcType=TIMESTAMP}
</if>
<if test="'config'.toString() == column.value">
#{item.config,jdbcType=LONGVARCHAR}
</if>
</foreach>
)
</foreach>
</insert>
</mapper>

+ 48
- 0
src/main/java/com/topsail/influxdb/mapper/DataFilterMapper.java View File

@ -0,0 +1,48 @@
package com.topsail.influxdb.mapper;
import com.topsail.influxdb.pojo.DataFilter;
import com.topsail.influxdb.pojo.DataFilterExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface DataFilterMapper {
long countByExample(DataFilterExample example);
int deleteByExample(DataFilterExample example);
int deleteByPrimaryKey(Integer id);
int insert(DataFilter record);
int insertSelective(DataFilter record);
List<DataFilter> selectByExample(DataFilterExample example);
DataFilter selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") DataFilter record, @Param("example") DataFilterExample example);
int updateByExample(@Param("record") DataFilter record, @Param("example") DataFilterExample example);
int updateByPrimaryKeySelective(DataFilter record);
int updateByPrimaryKey(DataFilter record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table data_filter
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsert(@Param("list") List<DataFilter> list);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table data_filter
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsertSelective(@Param("list") List<DataFilter> list, @Param("selective") DataFilter.Column ... selective);
}

+ 278
- 0
src/main/java/com/topsail/influxdb/mapper/DataFilterMapper.xml View File

@ -0,0 +1,278 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.topsail.influxdb.mapper.DataFilterMapper">
<resultMap id="BaseResultMap" type="com.topsail.influxdb.pojo.DataFilter">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="device_type" jdbcType="INTEGER" property="deviceType" />
<result column="device_model" jdbcType="VARCHAR" property="deviceModel" />
<result column="unit" jdbcType="VARCHAR" property="unit" />
<result column="low" jdbcType="REAL" property="low" />
<result column="high" jdbcType="REAL" property="high" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, device_type, device_model, unit, low, high
</sql>
<select id="selectByExample" parameterType="com.topsail.influxdb.pojo.DataFilterExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from data_filter
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from data_filter
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from data_filter
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.topsail.influxdb.pojo.DataFilterExample">
delete from data_filter
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.topsail.influxdb.pojo.DataFilter">
insert into data_filter (id, device_type, device_model,
unit, low, high)
values (#{id,jdbcType=INTEGER}, #{deviceType,jdbcType=INTEGER}, #{deviceModel,jdbcType=VARCHAR},
#{unit,jdbcType=VARCHAR}, #{low,jdbcType=REAL}, #{high,jdbcType=REAL})
</insert>
<insert id="insertSelective" parameterType="com.topsail.influxdb.pojo.DataFilter">
insert into data_filter
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="deviceType != null">
device_type,
</if>
<if test="deviceModel != null">
device_model,
</if>
<if test="unit != null">
unit,
</if>
<if test="low != null">
low,
</if>
<if test="high != null">
high,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="deviceType != null">
#{deviceType,jdbcType=INTEGER},
</if>
<if test="deviceModel != null">
#{deviceModel,jdbcType=VARCHAR},
</if>
<if test="unit != null">
#{unit,jdbcType=VARCHAR},
</if>
<if test="low != null">
#{low,jdbcType=REAL},
</if>
<if test="high != null">
#{high,jdbcType=REAL},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.topsail.influxdb.pojo.DataFilterExample" resultType="java.lang.Long">
select count(*) from data_filter
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update data_filter
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.deviceType != null">
device_type = #{record.deviceType,jdbcType=INTEGER},
</if>
<if test="record.deviceModel != null">
device_model = #{record.deviceModel,jdbcType=VARCHAR},
</if>
<if test="record.unit != null">
unit = #{record.unit,jdbcType=VARCHAR},
</if>
<if test="record.low != null">
low = #{record.low,jdbcType=REAL},
</if>
<if test="record.high != null">
high = #{record.high,jdbcType=REAL},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update data_filter
set id = #{record.id,jdbcType=INTEGER},
device_type = #{record.deviceType,jdbcType=INTEGER},
device_model = #{record.deviceModel,jdbcType=VARCHAR},
unit = #{record.unit,jdbcType=VARCHAR},
low = #{record.low,jdbcType=REAL},
high = #{record.high,jdbcType=REAL}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.topsail.influxdb.pojo.DataFilter">
update data_filter
<set>
<if test="deviceType != null">
device_type = #{deviceType,jdbcType=INTEGER},
</if>
<if test="deviceModel != null">
device_model = #{deviceModel,jdbcType=VARCHAR},
</if>
<if test="unit != null">
unit = #{unit,jdbcType=VARCHAR},
</if>
<if test="low != null">
low = #{low,jdbcType=REAL},
</if>
<if test="high != null">
high = #{high,jdbcType=REAL},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.topsail.influxdb.pojo.DataFilter">
update data_filter
set device_type = #{deviceType,jdbcType=INTEGER},
device_model = #{deviceModel,jdbcType=VARCHAR},
unit = #{unit,jdbcType=VARCHAR},
low = #{low,jdbcType=REAL},
high = #{high,jdbcType=REAL}
where id = #{id,jdbcType=INTEGER}
</update>
<insert id="batchInsert" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into data_filter
(id, device_type, device_model, unit, low, high)
values
<foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=INTEGER}, #{item.deviceType,jdbcType=INTEGER}, #{item.deviceModel,jdbcType=VARCHAR},
#{item.unit,jdbcType=VARCHAR}, #{item.low,jdbcType=REAL}, #{item.high,jdbcType=REAL}
)
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into data_filter (
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
)
values
<foreach collection="list" item="item" separator=",">
(
<foreach collection="selective" item="column" separator=",">
<if test="'id'.toString() == column.value">
#{item.id,jdbcType=INTEGER}
</if>
<if test="'device_type'.toString() == column.value">
#{item.deviceType,jdbcType=INTEGER}
</if>
<if test="'device_model'.toString() == column.value">
#{item.deviceModel,jdbcType=VARCHAR}
</if>
<if test="'unit'.toString() == column.value">
#{item.unit,jdbcType=VARCHAR}
</if>
<if test="'low'.toString() == column.value">
#{item.low,jdbcType=REAL}
</if>
<if test="'high'.toString() == column.value">
#{item.high,jdbcType=REAL}
</if>
</foreach>
)
</foreach>
</insert>
</mapper>

+ 50
- 0
src/main/java/com/topsail/influxdb/mapper/DeviceDetailMapper.java View File

@ -0,0 +1,50 @@
package com.topsail.influxdb.mapper;
import com.topsail.influxdb.pojo.DeviceDetail;
import com.topsail.influxdb.pojo.DeviceDetailExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface DeviceDetailMapper {
long countByExample(DeviceDetailExample example);
int deleteByExample(DeviceDetailExample example);
int deleteByPrimaryKey(String imei);
int insert(DeviceDetail record);
int insertSelective(DeviceDetail record);
List<DeviceDetail> selectByExample(DeviceDetailExample example);
DeviceDetail selectByPrimaryKey(String imei);
int updateByExampleSelective(@Param("record") DeviceDetail record, @Param("example") DeviceDetailExample example);
int updateByExample(@Param("record") DeviceDetail record, @Param("example") DeviceDetailExample example);
int updateByPrimaryKeySelective(DeviceDetail record);
int updateByPrimaryKey(DeviceDetail record);
int updateDeviceDetailByImei(@Param("deviceDetail") DeviceDetail deviceDetail);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsert(@Param("list") List<DeviceDetail> list);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsertSelective(@Param("list") List<DeviceDetail> list, @Param("selective") DeviceDetail.Column ... selective);
}

+ 622
- 0
src/main/java/com/topsail/influxdb/mapper/DeviceDetailMapper.xml View File

@ -0,0 +1,622 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.topsail.influxdb.mapper.DeviceDetailMapper">
<resultMap id="BaseResultMap" type="com.topsail.influxdb.pojo.DeviceDetail">
<id column="imei" jdbcType="VARCHAR" property="imei" />
<result column="id" jdbcType="INTEGER" property="id" />
<result column="device_type" jdbcType="INTEGER" property="deviceType" />
<result column="order_id" jdbcType="INTEGER" property="orderId" />
<result column="project_id" jdbcType="INTEGER" property="projectId" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="lon" jdbcType="DOUBLE" property="lon" />
<result column="lat" jdbcType="DOUBLE" property="lat" />
<result column="buy_date" jdbcType="TIMESTAMP" property="buyDate" />
<result column="buy_long" jdbcType="REAL" property="buyLong" />
<result column="time" jdbcType="TIMESTAMP" property="time" />
<result column="imsi" jdbcType="VARCHAR" property="imsi" />
<result column="iccid" jdbcType="VARCHAR" property="iccid" />
<result column="address" jdbcType="VARCHAR" property="address" />
<result column="delivered" jdbcType="INTEGER" property="delivered" />
<result column="platform" jdbcType="VARCHAR" property="platform" />
<result column="deviceId" jdbcType="VARCHAR" property="deviceid" />
<result column="company_id" jdbcType="INTEGER" property="companyId" />
<result column="period" jdbcType="INTEGER" property="period" />
<result column="belong" jdbcType="INTEGER" property="belong" />
<result column="handle_result" jdbcType="VARCHAR" property="handleResult" />
<result column="register_info_id" jdbcType="INTEGER" property="registerInfoId" />
<result column="updatetime" jdbcType="TIMESTAMP" property="updatetime" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
imei, id, device_type, order_id, project_id, name, lon, lat, buy_date, buy_long,
time, imsi, iccid, address, delivered, platform, deviceId, company_id, period, belong,
handle_result, register_info_id, updatetime
</sql>
<select id="selectByExample" parameterType="com.topsail.influxdb.pojo.DeviceDetailExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from device_detail
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from device_detail
where imei = #{imei,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from device_detail
where imei = #{imei,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="com.topsail.influxdb.pojo.DeviceDetailExample">
delete from device_detail
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.topsail.influxdb.pojo.DeviceDetail">
insert into device_detail (imei, id, device_type,
order_id, project_id, name,
lon, lat, buy_date,
buy_long, time, imsi,
iccid, address, delivered,
platform, deviceId, company_id,
period, belong, handle_result,
register_info_id, updatetime)
values (#{imei,jdbcType=VARCHAR}, #{id,jdbcType=INTEGER}, #{deviceType,jdbcType=INTEGER},
#{orderId,jdbcType=INTEGER}, #{projectId,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR},
#{lon,jdbcType=DOUBLE}, #{lat,jdbcType=DOUBLE}, #{buyDate,jdbcType=TIMESTAMP},
#{buyLong,jdbcType=REAL}, #{time,jdbcType=TIMESTAMP}, #{imsi,jdbcType=VARCHAR},
#{iccid,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{delivered,jdbcType=INTEGER},
#{platform,jdbcType=VARCHAR}, #{deviceid,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER},
#{period,jdbcType=INTEGER}, #{belong,jdbcType=INTEGER}, #{handleResult,jdbcType=VARCHAR},
#{registerInfoId,jdbcType=INTEGER}, #{updatetime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.topsail.influxdb.pojo.DeviceDetail">
insert into device_detail
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="imei != null">
imei,
</if>
<if test="id != null">
id,
</if>
<if test="deviceType != null">
device_type,
</if>
<if test="orderId != null">
order_id,
</if>
<if test="projectId != null">
project_id,
</if>
<if test="name != null">
name,
</if>
<if test="lon != null">
lon,
</if>
<if test="lat != null">
lat,
</if>
<if test="buyDate != null">
buy_date,
</if>
<if test="buyLong != null">
buy_long,
</if>
<if test="time != null">
time,
</if>
<if test="imsi != null">
imsi,
</if>
<if test="iccid != null">
iccid,
</if>
<if test="address != null">
address,
</if>
<if test="delivered != null">
delivered,
</if>
<if test="platform != null">
platform,
</if>
<if test="deviceid != null">
deviceId,
</if>
<if test="companyId != null">
company_id,
</if>
<if test="period != null">
period,
</if>
<if test="belong != null">
belong,
</if>
<if test="handleResult != null">
handle_result,
</if>
<if test="registerInfoId != null">
register_info_id,
</if>
<if test="updatetime != null">
updatetime,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="imei != null">
#{imei,jdbcType=VARCHAR},
</if>
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="deviceType != null">
#{deviceType,jdbcType=INTEGER},
</if>
<if test="orderId != null">
#{orderId,jdbcType=INTEGER},
</if>
<if test="projectId != null">
#{projectId,jdbcType=INTEGER},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="lon != null">
#{lon,jdbcType=DOUBLE},
</if>
<if test="lat != null">
#{lat,jdbcType=DOUBLE},
</if>
<if test="buyDate != null">
#{buyDate,jdbcType=TIMESTAMP},
</if>
<if test="buyLong != null">
#{buyLong,jdbcType=REAL},
</if>
<if test="time != null">
#{time,jdbcType=TIMESTAMP},
</if>
<if test="imsi != null">
#{imsi,jdbcType=VARCHAR},
</if>
<if test="iccid != null">
#{iccid,jdbcType=VARCHAR},
</if>
<if test="address != null">
#{address,jdbcType=VARCHAR},
</if>
<if test="delivered != null">
#{delivered,jdbcType=INTEGER},
</if>
<if test="platform != null">
#{platform,jdbcType=VARCHAR},
</if>
<if test="deviceid != null">
#{deviceid,jdbcType=VARCHAR},
</if>
<if test="companyId != null">
#{companyId,jdbcType=INTEGER},
</if>
<if test="period != null">
#{period,jdbcType=INTEGER},
</if>
<if test="belong != null">
#{belong,jdbcType=INTEGER},
</if>
<if test="handleResult != null">
#{handleResult,jdbcType=VARCHAR},
</if>
<if test="registerInfoId != null">
#{registerInfoId,jdbcType=INTEGER},
</if>
<if test="updatetime != null">
#{updatetime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.topsail.influxdb.pojo.DeviceDetailExample" resultType="java.lang.Long">
select count(*) from device_detail
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update device_detail
<set>
<if test="record.imei != null">
imei = #{record.imei,jdbcType=VARCHAR},
</if>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.deviceType != null">
device_type = #{record.deviceType,jdbcType=INTEGER},
</if>
<if test="record.orderId != null">
order_id = #{record.orderId,jdbcType=INTEGER},
</if>
<if test="record.projectId != null">
project_id = #{record.projectId,jdbcType=INTEGER},
</if>
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.lon != null">
lon = #{record.lon,jdbcType=DOUBLE},
</if>
<if test="record.lat != null">
lat = #{record.lat,jdbcType=DOUBLE},
</if>
<if test="record.buyDate != null">
buy_date = #{record.buyDate,jdbcType=TIMESTAMP},
</if>
<if test="record.buyLong != null">
buy_long = #{record.buyLong,jdbcType=REAL},
</if>
<if test="record.time != null">
time = #{record.time,jdbcType=TIMESTAMP},
</if>
<if test="record.imsi != null">
imsi = #{record.imsi,jdbcType=VARCHAR},
</if>
<if test="record.iccid != null">
iccid = #{record.iccid,jdbcType=VARCHAR},
</if>
<if test="record.address != null">
address = #{record.address,jdbcType=VARCHAR},
</if>
<if test="record.delivered != null">
delivered = #{record.delivered,jdbcType=INTEGER},
</if>
<if test="record.platform != null">
platform = #{record.platform,jdbcType=VARCHAR},
</if>
<if test="record.deviceid != null">
deviceId = #{record.deviceid,jdbcType=VARCHAR},
</if>
<if test="record.companyId != null">
company_id = #{record.companyId,jdbcType=INTEGER},
</if>
<if test="record.period != null">
period = #{record.period,jdbcType=INTEGER},
</if>
<if test="record.belong != null">
belong = #{record.belong,jdbcType=INTEGER},
</if>
<if test="record.handleResult != null">
handle_result = #{record.handleResult,jdbcType=VARCHAR},
</if>
<if test="record.registerInfoId != null">
register_info_id = #{record.registerInfoId,jdbcType=INTEGER},
</if>
<if test="record.updatetime != null">
updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update device_detail
set imei = #{record.imei,jdbcType=VARCHAR},
id = #{record.id,jdbcType=INTEGER},
device_type = #{record.deviceType,jdbcType=INTEGER},
order_id = #{record.orderId,jdbcType=INTEGER},
project_id = #{record.projectId,jdbcType=INTEGER},
name = #{record.name,jdbcType=VARCHAR},
lon = #{record.lon,jdbcType=DOUBLE},
lat = #{record.lat,jdbcType=DOUBLE},
buy_date = #{record.buyDate,jdbcType=TIMESTAMP},
buy_long = #{record.buyLong,jdbcType=REAL},
time = #{record.time,jdbcType=TIMESTAMP},
imsi = #{record.imsi,jdbcType=VARCHAR},
iccid = #{record.iccid,jdbcType=VARCHAR},
address = #{record.address,jdbcType=VARCHAR},
delivered = #{record.delivered,jdbcType=INTEGER},
platform = #{record.platform,jdbcType=VARCHAR},
deviceId = #{record.deviceid,jdbcType=VARCHAR},
company_id = #{record.companyId,jdbcType=INTEGER},
period = #{record.period,jdbcType=INTEGER},
belong = #{record.belong,jdbcType=INTEGER},
handle_result = #{record.handleResult,jdbcType=VARCHAR},
register_info_id = #{record.registerInfoId,jdbcType=INTEGER},
updatetime = #{record.updatetime,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.topsail.influxdb.pojo.DeviceDetail">
update device_detail
<set>
<if test="id != null">
id = #{id,jdbcType=INTEGER},
</if>
<if test="deviceType != null">
device_type = #{deviceType,jdbcType=INTEGER},
</if>
<if test="orderId != null">
order_id = #{orderId,jdbcType=INTEGER},
</if>
<if test="projectId != null">
project_id = #{projectId,jdbcType=INTEGER},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="lon != null">
lon = #{lon,jdbcType=DOUBLE},
</if>
<if test="lat != null">
lat = #{lat,jdbcType=DOUBLE},
</if>
<if test="buyDate != null">
buy_date = #{buyDate,jdbcType=TIMESTAMP},
</if>
<if test="buyLong != null">
buy_long = #{buyLong,jdbcType=REAL},
</if>
<if test="time != null">
time = #{time,jdbcType=TIMESTAMP},
</if>
<if test="imsi != null">
imsi = #{imsi,jdbcType=VARCHAR},
</if>
<if test="iccid != null">
iccid = #{iccid,jdbcType=VARCHAR},
</if>
<if test="address != null">
address = #{address,jdbcType=VARCHAR},
</if>
<if test="delivered != null">
delivered = #{delivered,jdbcType=INTEGER},
</if>
<if test="platform != null">
platform = #{platform,jdbcType=VARCHAR},
</if>
<if test="deviceid != null">
deviceId = #{deviceid,jdbcType=VARCHAR},
</if>
<if test="companyId != null">
company_id = #{companyId,jdbcType=INTEGER},
</if>
<if test="period != null">
period = #{period,jdbcType=INTEGER},
</if>
<if test="belong != null">
belong = #{belong,jdbcType=INTEGER},
</if>
<if test="handleResult != null">
handle_result = #{handleResult,jdbcType=VARCHAR},
</if>
<if test="registerInfoId != null">
register_info_id = #{registerInfoId,jdbcType=INTEGER},
</if>
<if test="updatetime != null">
updatetime = #{updatetime,jdbcType=TIMESTAMP},
</if>
</set>
where imei = #{imei,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.topsail.influxdb.pojo.DeviceDetail">
update device_detail
set id = #{id,jdbcType=INTEGER},
device_type = #{deviceType,jdbcType=INTEGER},
order_id = #{orderId,jdbcType=INTEGER},
project_id = #{projectId,jdbcType=INTEGER},
name = #{name,jdbcType=VARCHAR},
lon = #{lon,jdbcType=DOUBLE},
lat = #{lat,jdbcType=DOUBLE},
buy_date = #{buyDate,jdbcType=TIMESTAMP},
buy_long = #{buyLong,jdbcType=REAL},
time = #{time,jdbcType=TIMESTAMP},
imsi = #{imsi,jdbcType=VARCHAR},
iccid = #{iccid,jdbcType=VARCHAR},
address = #{address,jdbcType=VARCHAR},
delivered = #{delivered,jdbcType=INTEGER},
platform = #{platform,jdbcType=VARCHAR},
deviceId = #{deviceid,jdbcType=VARCHAR},
company_id = #{companyId,jdbcType=INTEGER},
period = #{period,jdbcType=INTEGER},
belong = #{belong,jdbcType=INTEGER},
handle_result = #{handleResult,jdbcType=VARCHAR},
register_info_id = #{registerInfoId,jdbcType=INTEGER},
updatetime = now()
where imei = #{imei,jdbcType=VARCHAR}
</update>
<insert id="batchInsert" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into device_detail
(imei, id, device_type, order_id, project_id, name, lon, lat, buy_date, buy_long,
time, imsi, iccid, address, delivered, platform, deviceId, company_id, period,
belong, handle_result, register_info_id, updatetime)
values
<foreach collection="list" item="item" separator=",">
(#{item.imei,jdbcType=VARCHAR}, #{item.id,jdbcType=INTEGER}, #{item.deviceType,jdbcType=INTEGER},
#{item.orderId,jdbcType=INTEGER}, #{item.projectId,jdbcType=INTEGER}, #{item.name,jdbcType=VARCHAR},
#{item.lon,jdbcType=DOUBLE}, #{item.lat,jdbcType=DOUBLE}, #{item.buyDate,jdbcType=TIMESTAMP},
#{item.buyLong,jdbcType=REAL}, #{item.time,jdbcType=TIMESTAMP}, #{item.imsi,jdbcType=VARCHAR},
#{item.iccid,jdbcType=VARCHAR}, #{item.address,jdbcType=VARCHAR}, #{item.delivered,jdbcType=INTEGER},
#{item.platform,jdbcType=VARCHAR}, #{item.deviceid,jdbcType=VARCHAR}, #{item.companyId,jdbcType=INTEGER},
#{item.period,jdbcType=INTEGER}, #{item.belong,jdbcType=INTEGER}, #{item.handleResult,jdbcType=VARCHAR},
#{item.registerInfoId,jdbcType=INTEGER}, #{item.updatetime,jdbcType=TIMESTAMP})
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into device_detail (
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
)
values
<foreach collection="list" item="item" separator=",">
(
<foreach collection="selective" item="column" separator=",">
<if test="'imei'.toString() == column.value">
#{item.imei,jdbcType=VARCHAR}
</if>
<if test="'id'.toString() == column.value">
#{item.id,jdbcType=INTEGER}
</if>
<if test="'device_type'.toString() == column.value">
#{item.deviceType,jdbcType=INTEGER}
</if>
<if test="'order_id'.toString() == column.value">
#{item.orderId,jdbcType=INTEGER}
</if>
<if test="'project_id'.toString() == column.value">
#{item.projectId,jdbcType=INTEGER}
</if>
<if test="'name'.toString() == column.value">
#{item.name,jdbcType=VARCHAR}
</if>
<if test="'lon'.toString() == column.value">
#{item.lon,jdbcType=DOUBLE}
</if>
<if test="'lat'.toString() == column.value">
#{item.lat,jdbcType=DOUBLE}
</if>
<if test="'buy_date'.toString() == column.value">
#{item.buyDate,jdbcType=TIMESTAMP}
</if>
<if test="'buy_long'.toString() == column.value">
#{item.buyLong,jdbcType=REAL}
</if>
<if test="'time'.toString() == column.value">
#{item.time,jdbcType=TIMESTAMP}
</if>
<if test="'imsi'.toString() == column.value">
#{item.imsi,jdbcType=VARCHAR}
</if>
<if test="'iccid'.toString() == column.value">
#{item.iccid,jdbcType=VARCHAR}
</if>
<if test="'address'.toString() == column.value">
#{item.address,jdbcType=VARCHAR}
</if>
<if test="'delivered'.toString() == column.value">
#{item.delivered,jdbcType=INTEGER}
</if>
<if test="'platform'.toString() == column.value">
#{item.platform,jdbcType=VARCHAR}
</if>
<if test="'deviceId'.toString() == column.value">
#{item.deviceid,jdbcType=VARCHAR}
</if>
<if test="'company_id'.toString() == column.value">
#{item.companyId,jdbcType=INTEGER}
</if>
<if test="'period'.toString() == column.value">
#{item.period,jdbcType=INTEGER}
</if>
<if test="'belong'.toString() == column.value">
#{item.belong,jdbcType=INTEGER}
</if>
<if test="'handle_result'.toString() == column.value">
#{item.handleResult,jdbcType=VARCHAR}
</if>
<if test="'register_info_id'.toString() == column.value">
#{item.registerInfoId,jdbcType=INTEGER}
</if>
<if test="'updatetime'.toString() == column.value">
#{item.updatetime,jdbcType=TIMESTAMP}
</if>
</foreach>
)
</foreach>
</insert>
<update id="updateDeviceDetailByImei">
update device_detail
<set>
<if test="deviceDetail.lon != null">
lon = #{deviceDetail.lon,jdbcType=DOUBLE},
</if>
<if test="deviceDetail.lat != null">
lat = #{deviceDetail.lat,jdbcType=DOUBLE},
</if>
<if test="deviceDetail.imei != null">
imei = #{deviceDetail.imei,jdbcType=VARCHAR},
</if>
updatetime=now()
</set>
where imei = #{deviceDetail.imei,jdbcType=VARCHAR}
</update>
</mapper>

+ 40
- 0
src/main/java/com/topsail/influxdb/mapper/DeviceDetailsMapper.java View File

@ -0,0 +1,40 @@
package com.topsail.influxdb.mapper;
import com.topsail.influxdb.pojo.DeviceDetails;
import com.topsail.influxdb.pojo.DeviceDetailsExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface DeviceDetailsMapper {
long countByExample(DeviceDetailsExample example);
int deleteByExample(DeviceDetailsExample example);
int insert(DeviceDetails record);
int insertSelective(DeviceDetails record);
List<DeviceDetails> selectByExample(DeviceDetailsExample example);
int updateByExampleSelective(@Param("record") DeviceDetails record, @Param("example") DeviceDetailsExample example);
int updateByExample(@Param("record") DeviceDetails record, @Param("example") DeviceDetailsExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_details
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsert(@Param("list") List<DeviceDetails> list);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_details
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsertSelective(@Param("list") List<DeviceDetails> list, @Param("selective") DeviceDetails.Column ... selective);
}

+ 424
- 0
src/main/java/com/topsail/influxdb/mapper/DeviceDetailsMapper.xml View File

@ -0,0 +1,424 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.topsail.influxdb.mapper.DeviceDetailsMapper">
<resultMap id="BaseResultMap" type="com.topsail.influxdb.pojo.DeviceDetails">
<result column="id" jdbcType="INTEGER" property="id" />
<result column="imei" jdbcType="VARCHAR" property="imei" />
<result column="device_type" jdbcType="INTEGER" property="deviceType" />
<result column="buy_date" jdbcType="TIMESTAMP" property="buyDate" />
<result column="buy_long" jdbcType="REAL" property="buyLong" />
<result column="delivered" jdbcType="INTEGER" property="delivered" />
<result column="company_id" jdbcType="INTEGER" property="companyId" />
<result column="company_name" jdbcType="VARCHAR" property="companyName" />
<result column="companyperiod" jdbcType="VARCHAR" property="companyperiod" />
<result column="project_id" jdbcType="INTEGER" property="projectId" />
<result column="platform" jdbcType="VARCHAR" property="platform" />
<result column="project_name" jdbcType="VARCHAR" property="projectName" />
<result column="order_id" jdbcType="INTEGER" property="orderId" />
<result column="order_no" jdbcType="VARCHAR" property="orderNo" />
<result column="buy_number" jdbcType="INTEGER" property="buyNumber" />
<result column="product_status" jdbcType="VARCHAR" property="productStatus" />
<result column="period" jdbcType="INTEGER" property="period" />
<result column="status" jdbcType="INTEGER" property="status" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, imei, device_type, buy_date, buy_long, delivered, company_id, company_name, companyperiod,
project_id, platform, project_name, order_id, order_no, buy_number, product_status,
period, status
</sql>
<select id="selectByExample" parameterType="com.topsail.influxdb.pojo.DeviceDetailsExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from device_details
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<delete id="deleteByExample" parameterType="com.topsail.influxdb.pojo.DeviceDetailsExample">
delete from device_details
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.topsail.influxdb.pojo.DeviceDetails">
insert into device_details (id, imei, device_type,
buy_date, buy_long, delivered,
company_id, company_name, companyperiod,
project_id, platform, project_name,
order_id, order_no, buy_number,
product_status, period, status
)
values (#{id,jdbcType=INTEGER}, #{imei,jdbcType=VARCHAR}, #{deviceType,jdbcType=INTEGER},
#{buyDate,jdbcType=TIMESTAMP}, #{buyLong,jdbcType=REAL}, #{delivered,jdbcType=INTEGER},
#{companyId,jdbcType=INTEGER}, #{companyName,jdbcType=VARCHAR}, #{companyperiod,jdbcType=VARCHAR},
#{projectId,jdbcType=INTEGER}, #{platform,jdbcType=VARCHAR}, #{projectName,jdbcType=VARCHAR},
#{orderId,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{buyNumber,jdbcType=INTEGER},
#{productStatus,jdbcType=VARCHAR}, #{period,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.topsail.influxdb.pojo.DeviceDetails">
insert into device_details
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="imei != null">
imei,
</if>
<if test="deviceType != null">
device_type,
</if>
<if test="buyDate != null">
buy_date,
</if>
<if test="buyLong != null">
buy_long,
</if>
<if test="delivered != null">
delivered,
</if>
<if test="companyId != null">
company_id,
</if>
<if test="companyName != null">
company_name,
</if>
<if test="companyperiod != null">
companyperiod,
</if>
<if test="projectId != null">
project_id,
</if>
<if test="platform != null">
platform,
</if>
<if test="projectName != null">
project_name,
</if>
<if test="orderId != null">
order_id,
</if>
<if test="orderNo != null">
order_no,
</if>
<if test="buyNumber != null">
buy_number,
</if>
<if test="productStatus != null">
product_status,
</if>
<if test="period != null">
period,
</if>
<if test="status != null">
status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="imei != null">
#{imei,jdbcType=VARCHAR},
</if>
<if test="deviceType != null">
#{deviceType,jdbcType=INTEGER},
</if>
<if test="buyDate != null">
#{buyDate,jdbcType=TIMESTAMP},
</if>
<if test="buyLong != null">
#{buyLong,jdbcType=REAL},
</if>
<if test="delivered != null">
#{delivered,jdbcType=INTEGER},
</if>
<if test="companyId != null">
#{companyId,jdbcType=INTEGER},
</if>
<if test="companyName != null">
#{companyName,jdbcType=VARCHAR},
</if>
<if test="companyperiod != null">
#{companyperiod,jdbcType=VARCHAR},
</if>
<if test="projectId != null">
#{projectId,jdbcType=INTEGER},
</if>
<if test="platform != null">
#{platform,jdbcType=VARCHAR},
</if>
<if test="projectName != null">
#{projectName,jdbcType=VARCHAR},
</if>
<if test="orderId != null">
#{orderId,jdbcType=INTEGER},
</if>
<if test="orderNo != null">
#{orderNo,jdbcType=VARCHAR},
</if>
<if test="buyNumber != null">
#{buyNumber,jdbcType=INTEGER},
</if>
<if test="productStatus != null">
#{productStatus,jdbcType=VARCHAR},
</if>
<if test="period != null">
#{period,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.topsail.influxdb.pojo.DeviceDetailsExample" resultType="java.lang.Long">
select count(*) from device_details
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update device_details
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.imei != null">
imei = #{record.imei,jdbcType=VARCHAR},
</if>
<if test="record.deviceType != null">
device_type = #{record.deviceType,jdbcType=INTEGER},
</if>
<if test="record.buyDate != null">
buy_date = #{record.buyDate,jdbcType=TIMESTAMP},
</if>
<if test="record.buyLong != null">
buy_long = #{record.buyLong,jdbcType=REAL},
</if>
<if test="record.delivered != null">
delivered = #{record.delivered,jdbcType=INTEGER},
</if>
<if test="record.companyId != null">
company_id = #{record.companyId,jdbcType=INTEGER},
</if>
<if test="record.companyName != null">
company_name = #{record.companyName,jdbcType=VARCHAR},
</if>
<if test="record.companyperiod != null">
companyperiod = #{record.companyperiod,jdbcType=VARCHAR},
</if>
<if test="record.projectId != null">
project_id = #{record.projectId,jdbcType=INTEGER},
</if>
<if test="record.platform != null">
platform = #{record.platform,jdbcType=VARCHAR},
</if>
<if test="record.projectName != null">
project_name = #{record.projectName,jdbcType=VARCHAR},
</if>
<if test="record.orderId != null">
order_id = #{record.orderId,jdbcType=INTEGER},
</if>
<if test="record.orderNo != null">
order_no = #{record.orderNo,jdbcType=VARCHAR},
</if>
<if test="record.buyNumber != null">
buy_number = #{record.buyNumber,jdbcType=INTEGER},
</if>
<if test="record.productStatus != null">
product_status = #{record.productStatus,jdbcType=VARCHAR},
</if>
<if test="record.period != null">
period = #{record.period,jdbcType=INTEGER},
</if>
<if test="record.status != null">
status = #{record.status,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update device_details
set id = #{record.id,jdbcType=INTEGER},
imei = #{record.imei,jdbcType=VARCHAR},
device_type = #{record.deviceType,jdbcType=INTEGER},
buy_date = #{record.buyDate,jdbcType=TIMESTAMP},
buy_long = #{record.buyLong,jdbcType=REAL},
delivered = #{record.delivered,jdbcType=INTEGER},
company_id = #{record.companyId,jdbcType=INTEGER},
company_name = #{record.companyName,jdbcType=VARCHAR},
companyperiod = #{record.companyperiod,jdbcType=VARCHAR},
project_id = #{record.projectId,jdbcType=INTEGER},
platform = #{record.platform,jdbcType=VARCHAR},
project_name = #{record.projectName,jdbcType=VARCHAR},
order_id = #{record.orderId,jdbcType=INTEGER},
order_no = #{record.orderNo,jdbcType=VARCHAR},
buy_number = #{record.buyNumber,jdbcType=INTEGER},
product_status = #{record.productStatus,jdbcType=VARCHAR},
period = #{record.period,jdbcType=INTEGER},
status = #{record.status,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<insert id="batchInsert" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into device_details
(id, imei, device_type, buy_date, buy_long, delivered, company_id, company_name,
companyperiod, project_id, platform, project_name, order_id, order_no, buy_number,
product_status, period, status)
values
<foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=INTEGER}, #{item.imei,jdbcType=VARCHAR}, #{item.deviceType,jdbcType=INTEGER},
#{item.buyDate,jdbcType=TIMESTAMP}, #{item.buyLong,jdbcType=REAL}, #{item.delivered,jdbcType=INTEGER},
#{item.companyId,jdbcType=INTEGER}, #{item.companyName,jdbcType=VARCHAR}, #{item.companyperiod,jdbcType=VARCHAR},
#{item.projectId,jdbcType=INTEGER}, #{item.platform,jdbcType=VARCHAR}, #{item.projectName,jdbcType=VARCHAR},
#{item.orderId,jdbcType=INTEGER}, #{item.orderNo,jdbcType=VARCHAR}, #{item.buyNumber,jdbcType=INTEGER},
#{item.productStatus,jdbcType=VARCHAR}, #{item.period,jdbcType=INTEGER}, #{item.status,jdbcType=INTEGER}
)
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into device_details (
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
)
values
<foreach collection="list" item="item" separator=",">
(
<foreach collection="selective" item="column" separator=",">
<if test="'id'.toString() == column.value">
#{item.id,jdbcType=INTEGER}
</if>
<if test="'imei'.toString() == column.value">
#{item.imei,jdbcType=VARCHAR}
</if>
<if test="'device_type'.toString() == column.value">
#{item.deviceType,jdbcType=INTEGER}
</if>
<if test="'buy_date'.toString() == column.value">
#{item.buyDate,jdbcType=TIMESTAMP}
</if>
<if test="'buy_long'.toString() == column.value">
#{item.buyLong,jdbcType=REAL}
</if>
<if test="'delivered'.toString() == column.value">
#{item.delivered,jdbcType=INTEGER}
</if>
<if test="'company_id'.toString() == column.value">
#{item.companyId,jdbcType=INTEGER}
</if>
<if test="'company_name'.toString() == column.value">
#{item.companyName,jdbcType=VARCHAR}
</if>
<if test="'companyperiod'.toString() == column.value">
#{item.companyperiod,jdbcType=VARCHAR}
</if>
<if test="'project_id'.toString() == column.value">
#{item.projectId,jdbcType=INTEGER}
</if>
<if test="'platform'.toString() == column.value">
#{item.platform,jdbcType=VARCHAR}
</if>
<if test="'project_name'.toString() == column.value">
#{item.projectName,jdbcType=VARCHAR}
</if>
<if test="'order_id'.toString() == column.value">
#{item.orderId,jdbcType=INTEGER}
</if>
<if test="'order_no'.toString() == column.value">
#{item.orderNo,jdbcType=VARCHAR}
</if>
<if test="'buy_number'.toString() == column.value">
#{item.buyNumber,jdbcType=INTEGER}
</if>
<if test="'product_status'.toString() == column.value">
#{item.productStatus,jdbcType=VARCHAR}
</if>
<if test="'period'.toString() == column.value">
#{item.period,jdbcType=INTEGER}
</if>
<if test="'status'.toString() == column.value">
#{item.status,jdbcType=INTEGER}
</if>
</foreach>
)
</foreach>
</insert>
</mapper>

+ 44
- 0
src/main/java/com/topsail/influxdb/mapper/DeviceInfoMapper.java View File

@ -0,0 +1,44 @@
package com.topsail.influxdb.mapper;
import com.topsail.influxdb.pojo.DeviceInfo;
import com.topsail.influxdb.pojo.DeviceInfoExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface DeviceInfoMapper {
long countByExample(DeviceInfoExample example);
int deleteByExample(DeviceInfoExample example);
int insert(DeviceInfo record);
int insertSelective(DeviceInfo record);
List<DeviceInfo> selectByExampleWithBLOBs(DeviceInfoExample example);
List<DeviceInfo> selectByExample(DeviceInfoExample example);
int updateByExampleSelective(@Param("record") DeviceInfo record, @Param("example") DeviceInfoExample example);
int updateByExampleWithBLOBs(@Param("record") DeviceInfo record, @Param("example") DeviceInfoExample example);
int updateByExample(@Param("record") DeviceInfo record, @Param("example") DeviceInfoExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_info
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsert(@Param("list") List<DeviceInfo> list);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_info
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsertSelective(@Param("list") List<DeviceInfo> list, @Param("selective") DeviceInfo.Column ... selective);
}

+ 321
- 0
src/main/java/com/topsail/influxdb/mapper/DeviceInfoMapper.xml View File

@ -0,0 +1,321 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.topsail.influxdb.mapper.DeviceInfoMapper">
<resultMap id="BaseResultMap" type="com.topsail.influxdb.pojo.DeviceInfo">
<result column="id" jdbcType="INTEGER" property="id" />
<result column="verifyCode" jdbcType="VARCHAR" property="verifycode" />
<result column="deviceType" jdbcType="VARCHAR" property="devicetype" />
<result column="userName" jdbcType="VARCHAR" property="username" />
<result column="latitude" jdbcType="VARCHAR" property="latitude" />
<result column="longitude" jdbcType="VARCHAR" property="longitude" />
<result column="version" jdbcType="VARCHAR" property="version" />
<result column="fk_pid" jdbcType="INTEGER" property="fkPid" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.topsail.influxdb.pojo.DeviceInfo">
<result column="deviceId" jdbcType="LONGVARCHAR" property="deviceid" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, verifyCode, deviceType, userName, latitude, longitude, version, fk_pid
</sql>
<sql id="Blob_Column_List">
deviceId
</sql>
<select id="selectByExampleWithBLOBs" parameterType="com.topsail.influxdb.pojo.DeviceInfoExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from device_info
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="com.topsail.influxdb.pojo.DeviceInfoExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from device_info
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<delete id="deleteByExample" parameterType="com.topsail.influxdb.pojo.DeviceInfoExample">
delete from device_info
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.topsail.influxdb.pojo.DeviceInfo">
insert into device_info (id, verifyCode, deviceType,
userName, latitude, longitude,
version, fk_pid, deviceId
)
values (#{id,jdbcType=INTEGER}, #{verifycode,jdbcType=VARCHAR}, #{devicetype,jdbcType=VARCHAR},
#{username,jdbcType=VARCHAR}, #{latitude,jdbcType=VARCHAR}, #{longitude,jdbcType=VARCHAR},
#{version,jdbcType=VARCHAR}, #{fkPid,jdbcType=INTEGER}, #{deviceid,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.topsail.influxdb.pojo.DeviceInfo">
insert into device_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="verifycode != null">
verifyCode,
</if>
<if test="devicetype != null">
deviceType,
</if>
<if test="username != null">
userName,
</if>
<if test="latitude != null">
latitude,
</if>
<if test="longitude != null">
longitude,
</if>
<if test="version != null">
version,
</if>
<if test="fkPid != null">
fk_pid,
</if>
<if test="deviceid != null">
deviceId,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="verifycode != null">
#{verifycode,jdbcType=VARCHAR},
</if>
<if test="devicetype != null">
#{devicetype,jdbcType=VARCHAR},
</if>
<if test="username != null">
#{username,jdbcType=VARCHAR},
</if>
<if test="latitude != null">
#{latitude,jdbcType=VARCHAR},
</if>
<if test="longitude != null">
#{longitude,jdbcType=VARCHAR},
</if>
<if test="version != null">
#{version,jdbcType=VARCHAR},
</if>
<if test="fkPid != null">
#{fkPid,jdbcType=INTEGER},
</if>
<if test="deviceid != null">
#{deviceid,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.topsail.influxdb.pojo.DeviceInfoExample" resultType="java.lang.Long">
select count(*) from device_info
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update device_info
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.verifycode != null">
verifyCode = #{record.verifycode,jdbcType=VARCHAR},
</if>
<if test="record.devicetype != null">
deviceType = #{record.devicetype,jdbcType=VARCHAR},
</if>
<if test="record.username != null">
userName = #{record.username,jdbcType=VARCHAR},
</if>
<if test="record.latitude != null">
latitude = #{record.latitude,jdbcType=VARCHAR},
</if>
<if test="record.longitude != null">
longitude = #{record.longitude,jdbcType=VARCHAR},
</if>
<if test="record.version != null">
version = #{record.version,jdbcType=VARCHAR},
</if>
<if test="record.fkPid != null">
fk_pid = #{record.fkPid,jdbcType=INTEGER},
</if>
<if test="record.deviceid != null">
deviceId = #{record.deviceid,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
update device_info
set id = #{record.id,jdbcType=INTEGER},
verifyCode = #{record.verifycode,jdbcType=VARCHAR},
deviceType = #{record.devicetype,jdbcType=VARCHAR},
userName = #{record.username,jdbcType=VARCHAR},
latitude = #{record.latitude,jdbcType=VARCHAR},
longitude = #{record.longitude,jdbcType=VARCHAR},
version = #{record.version,jdbcType=VARCHAR},
fk_pid = #{record.fkPid,jdbcType=INTEGER},
deviceId = #{record.deviceid,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update device_info
set id = #{record.id,jdbcType=INTEGER},
verifyCode = #{record.verifycode,jdbcType=VARCHAR},
deviceType = #{record.devicetype,jdbcType=VARCHAR},
userName = #{record.username,jdbcType=VARCHAR},
latitude = #{record.latitude,jdbcType=VARCHAR},
longitude = #{record.longitude,jdbcType=VARCHAR},
version = #{record.version,jdbcType=VARCHAR},
fk_pid = #{record.fkPid,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<insert id="batchInsert" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into device_info
(id, verifyCode, deviceType, userName, latitude, longitude, version, fk_pid, deviceId
)
values
<foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=INTEGER}, #{item.verifycode,jdbcType=VARCHAR}, #{item.devicetype,jdbcType=VARCHAR},
#{item.username,jdbcType=VARCHAR}, #{item.latitude,jdbcType=VARCHAR}, #{item.longitude,jdbcType=VARCHAR},
#{item.version,jdbcType=VARCHAR}, #{item.fkPid,jdbcType=INTEGER}, #{item.deviceid,jdbcType=LONGVARCHAR}
)
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into device_info (
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
)
values
<foreach collection="list" item="item" separator=",">
(
<foreach collection="selective" item="column" separator=",">
<if test="'id'.toString() == column.value">
#{item.id,jdbcType=INTEGER}
</if>
<if test="'verifyCode'.toString() == column.value">
#{item.verifycode,jdbcType=VARCHAR}
</if>
<if test="'deviceType'.toString() == column.value">
#{item.devicetype,jdbcType=VARCHAR}
</if>
<if test="'userName'.toString() == column.value">
#{item.username,jdbcType=VARCHAR}
</if>
<if test="'latitude'.toString() == column.value">
#{item.latitude,jdbcType=VARCHAR}
</if>
<if test="'longitude'.toString() == column.value">
#{item.longitude,jdbcType=VARCHAR}
</if>
<if test="'version'.toString() == column.value">
#{item.version,jdbcType=VARCHAR}
</if>
<if test="'fk_pid'.toString() == column.value">
#{item.fkPid,jdbcType=INTEGER}
</if>
<if test="'deviceId'.toString() == column.value">
#{item.deviceid,jdbcType=LONGVARCHAR}
</if>
</foreach>
)
</foreach>
</insert>
</mapper>

+ 48
- 0
src/main/java/com/topsail/influxdb/mapper/DeviceLogMapper.java View File

@ -0,0 +1,48 @@
package com.topsail.influxdb.mapper;
import com.topsail.influxdb.pojo.DeviceLog;
import com.topsail.influxdb.pojo.DeviceLogExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface DeviceLogMapper {
long countByExample(DeviceLogExample example);
int deleteByExample(DeviceLogExample example);
int deleteByPrimaryKey(Integer id);
int insert(DeviceLog record);
int insertSelective(DeviceLog record);
List<DeviceLog> selectByExample(DeviceLogExample example);
DeviceLog selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") DeviceLog record, @Param("example") DeviceLogExample example);
int updateByExample(@Param("record") DeviceLog record, @Param("example") DeviceLogExample example);
int updateByPrimaryKeySelective(DeviceLog record);
int updateByPrimaryKey(DeviceLog record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsert(@Param("list") List<DeviceLog> list);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsertSelective(@Param("list") List<DeviceLog> list, @Param("selective") DeviceLog.Column ... selective);
}

+ 259
- 0
src/main/java/com/topsail/influxdb/mapper/DeviceLogMapper.xml View File

@ -0,0 +1,259 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.topsail.influxdb.mapper.DeviceLogMapper">
<resultMap id="BaseResultMap" type="com.topsail.influxdb.pojo.DeviceLog">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="imei" jdbcType="VARCHAR" property="imei" />
<result column="operation" jdbcType="VARCHAR" property="operation" />
<result column="params" jdbcType="VARCHAR" property="params" />
<result column="updatetime" jdbcType="TIMESTAMP" property="updatetime" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, imei, operation, params, updatetime
</sql>
<select id="selectByExample" parameterType="com.topsail.influxdb.pojo.DeviceLogExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from device_log
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from device_log
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from device_log
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.topsail.influxdb.pojo.DeviceLogExample">
delete from device_log
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.topsail.influxdb.pojo.DeviceLog">
insert into device_log ( imei, operation,
params, updatetime)
values ( #{imei,jdbcType=VARCHAR}, #{operation,jdbcType=VARCHAR},
#{params,jdbcType=VARCHAR}, #{updatetime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.topsail.influxdb.pojo.DeviceLog">
insert into device_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="imei != null">
imei,
</if>
<if test="operation != null">
operation,
</if>
<if test="params != null">
params,
</if>
<if test="updatetime != null">
updatetime,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="imei != null">
#{imei,jdbcType=VARCHAR},
</if>
<if test="operation != null">
#{operation,jdbcType=VARCHAR},
</if>
<if test="params != null">
#{params,jdbcType=VARCHAR},
</if>
<if test="updatetime != null">
#{updatetime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.topsail.influxdb.pojo.DeviceLogExample" resultType="java.lang.Long">
select count(*) from device_log
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update device_log
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.imei != null">
imei = #{record.imei,jdbcType=VARCHAR},
</if>
<if test="record.operation != null">
operation = #{record.operation,jdbcType=VARCHAR},
</if>
<if test="record.params != null">
params = #{record.params,jdbcType=VARCHAR},
</if>
<if test="record.updatetime != null">
updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update device_log
set id = #{record.id,jdbcType=INTEGER},
imei = #{record.imei,jdbcType=VARCHAR},
operation = #{record.operation,jdbcType=VARCHAR},
params = #{record.params,jdbcType=VARCHAR},
updatetime = #{record.updatetime,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.topsail.influxdb.pojo.DeviceLog">
update device_log
<set>
<if test="imei != null">
imei = #{imei,jdbcType=VARCHAR},
</if>
<if test="operation != null">
operation = #{operation,jdbcType=VARCHAR},
</if>
<if test="params != null">
params = #{params,jdbcType=VARCHAR},
</if>
<if test="updatetime != null">
updatetime = #{updatetime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.topsail.influxdb.pojo.DeviceLog">
update device_log
set imei = #{imei,jdbcType=VARCHAR},
operation = #{operation,jdbcType=VARCHAR},
params = #{params,jdbcType=VARCHAR},
updatetime = #{updatetime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<insert id="batchInsert" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into device_log
(id, imei, operation, params, updatetime)
values
<foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=INTEGER}, #{item.imei,jdbcType=VARCHAR}, #{item.operation,jdbcType=VARCHAR},
#{item.params,jdbcType=VARCHAR}, #{item.updatetime,jdbcType=TIMESTAMP})
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into device_log (
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
)
values
<foreach collection="list" item="item" separator=",">
(
<foreach collection="selective" item="column" separator=",">
<if test="'id'.toString() == column.value">
#{item.id,jdbcType=INTEGER}
</if>
<if test="'imei'.toString() == column.value">
#{item.imei,jdbcType=VARCHAR}
</if>
<if test="'operation'.toString() == column.value">
#{item.operation,jdbcType=VARCHAR}
</if>
<if test="'params'.toString() == column.value">
#{item.params,jdbcType=VARCHAR}
</if>
<if test="'updatetime'.toString() == column.value">
#{item.updatetime,jdbcType=TIMESTAMP}
</if>
</foreach>
)
</foreach>
</insert>
</mapper>

+ 48
- 0
src/main/java/com/topsail/influxdb/mapper/DeviceMapper.java View File

@ -0,0 +1,48 @@
package com.topsail.influxdb.mapper;
import com.topsail.influxdb.pojo.Device;
import com.topsail.influxdb.pojo.DeviceExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface DeviceMapper {
long countByExample(DeviceExample example);
int deleteByExample(DeviceExample example);
int deleteByPrimaryKey(String imei);
int insert(Device record);
int insertSelective(Device record);
List<Device> selectByExample(DeviceExample example);
Device selectByPrimaryKey(String imei);
int updateByExampleSelective(@Param("record") Device record, @Param("example") DeviceExample example);
int updateByExample(@Param("record") Device record, @Param("example") DeviceExample example);
int updateByPrimaryKeySelective(Device record);
int updateByPrimaryKey(Device record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsert(@Param("list") List<Device> list);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsertSelective(@Param("list") List<Device> list, @Param("selective") Device.Column ... selective);
}

+ 504
- 0
src/main/java/com/topsail/influxdb/mapper/DeviceMapper.xml View File

@ -0,0 +1,504 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.topsail.influxdb.mapper.DeviceMapper">
<resultMap id="BaseResultMap" type="com.topsail.influxdb.pojo.Device">
<id column="Imei" jdbcType="VARCHAR" property="imei" />
<result column="deviceType" jdbcType="INTEGER" property="devicetype" />
<result column="batteryLevel" jdbcType="INTEGER" property="batterylevel" />
<result column="singalStrength" jdbcType="INTEGER" property="singalstrength" />
<result column="sampleData" jdbcType="VARCHAR" property="sampledata" />
<result column="passNum" jdbcType="INTEGER" property="passnum" />
<result column="batteryState" jdbcType="INTEGER" property="batterystate" />
<result column="alarmType" jdbcType="VARCHAR" property="alarmtype" />
<result column="platformType" jdbcType="VARCHAR" property="platformtype" />
<result column="userName" jdbcType="VARCHAR" property="username" />
<result column="unit" jdbcType="VARCHAR" property="unit" />
<result column="sendTime" jdbcType="VARCHAR" property="sendtime" />
<result column="time" jdbcType="TIMESTAMP" property="time" />
<result column="offlineTime" jdbcType="TIMESTAMP" property="offlinetime" />
<result column="value" jdbcType="VARCHAR" property="value" />
<result column="sampTime" jdbcType="VARCHAR" property="sampTime" />
<result column="protocol" jdbcType="VARCHAR" property="protocol" />
<result column="sendDate" jdbcType="TIMESTAMP" property="senddate" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
Imei, deviceType, batteryLevel, singalStrength, sampleData, passNum, batteryState,
alarmType, platformType, userName, unit, sendTime, time, offlineTime, value,sampTime, protocol, sendDate
</sql>
<select id="selectByExample" parameterType="com.topsail.influxdb.pojo.DeviceExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from device
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from device
where Imei = #{imei,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from device
where Imei = #{imei,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="com.topsail.influxdb.pojo.DeviceExample">
delete from device
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.topsail.influxdb.pojo.Device">
insert into device (Imei, deviceType, batteryLevel,
singalStrength, sampleData, passNum,
batteryState, alarmType, platformType,
userName, unit, sendTime,
time, offlineTime, value, sampTime, protocol,
sendDate,devModel)
values (#{imei,jdbcType=VARCHAR}, #{devicetype,jdbcType=INTEGER}, #{batterylevel,jdbcType=INTEGER},
#{singalstrength,jdbcType=INTEGER}, #{sampledata,jdbcType=VARCHAR}, #{passnum,jdbcType=INTEGER},
#{batterystate,jdbcType=INTEGER}, #{alarmtype,jdbcType=VARCHAR}, #{platformtype,jdbcType=VARCHAR},
#{username,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR}, #{sendtime,jdbcType=VARCHAR},
#{time,jdbcType=TIMESTAMP}, #{offlinetime,jdbcType=TIMESTAMP}, #{value,jdbcType=VARCHAR}, #{sampTime,jdbcType=VARCHAR}, #{protocol,jdbcType=VARCHAR},
#{senddate,jdbcType=TIMESTAMP},#{devModel,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.topsail.influxdb.pojo.Device">
insert into device
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="imei != null">
Imei,
</if>
<if test="devicetype != null">
deviceType,
</if>
<if test="batterylevel != null">
batteryLevel,
</if>
<if test="singalstrength != null">
singalStrength,
</if>
<if test="sampledata != null">
sampleData,
</if>
<if test="passnum != null">
passNum,
</if>
<if test="batterystate != null">
batteryState,
</if>
<if test="alarmtype != null">
alarmType,
</if>
<if test="platformtype != null">
platformType,
</if>
<if test="username != null">
userName,
</if>
<if test="unit != null">
unit,
</if>
<if test="sendtime != null">
sendTime,
</if>
<if test="time != null">
time,
</if>
<if test="offlinetime != null">
offlineTime,
</if>
<if test="value != null">
value,
</if>
<if test="sampTime != null">
sampTime,
</if>
<if test="senddate != null">
sendDate,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="imei != null">
#{imei,jdbcType=VARCHAR},
</if>
<if test="devicetype != null">
#{devicetype,jdbcType=INTEGER},
</if>
<if test="batterylevel != null">
#{batterylevel,jdbcType=INTEGER},
</if>
<if test="singalstrength != null">
#{singalstrength,jdbcType=INTEGER},
</if>
<if test="sampledata != null">
#{sampledata,jdbcType=VARCHAR},
</if>
<if test="passnum != null">
#{passnum,jdbcType=INTEGER},
</if>
<if test="batterystate != null">
#{batterystate,jdbcType=INTEGER},
</if>
<if test="alarmtype != null">
#{alarmtype,jdbcType=VARCHAR},
</if>
<if test="platformtype != null">
#{platformtype,jdbcType=VARCHAR},
</if>
<if test="username != null">
#{username,jdbcType=VARCHAR},
</if>
<if test="unit != null">
#{unit,jdbcType=VARCHAR},
</if>
<if test="sendtime != null">
#{sendtime,jdbcType=VARCHAR},
</if>
<if test="time != null">
#{time,jdbcType=TIMESTAMP},
</if>
<if test="offlinetime != null">
#{offlinetime,jdbcType=TIMESTAMP},
</if>
<if test="value != null">
#{value,jdbcType=VARCHAR},
</if>
<if test="sampTime != null">
#{sampTime,jdbcType=VARCHAR},
</if>
<if test="senddate != null">
#{senddate,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.topsail.influxdb.pojo.DeviceExample" resultType="java.lang.Long">
select count(*) from device
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update device
<set>
<if test="record.imei != null">
Imei = #{record.imei,jdbcType=VARCHAR},
</if>
<if test="record.devicetype != null">
deviceType = #{record.devicetype,jdbcType=INTEGER},
</if>
<if test="record.batterylevel != null">
batteryLevel = #{record.batterylevel,jdbcType=INTEGER},
</if>
<if test="record.singalstrength != null">
singalStrength = #{record.singalstrength,jdbcType=INTEGER},
</if>
<if test="record.sampledata != null">
sampleData = #{record.sampledata,jdbcType=VARCHAR},
</if>
<if test="record.passnum != null">
passNum = #{record.passnum,jdbcType=INTEGER},
</if>
<if test="record.batterystate != null">
batteryState = #{record.batterystate,jdbcType=INTEGER},
</if>
<if test="record.alarmtype != null">
alarmType = #{record.alarmtype,jdbcType=VARCHAR},
</if>
<if test="record.platformtype != null">
platformType = #{record.platformtype,jdbcType=VARCHAR},
</if>
<if test="record.username != null">
userName = #{record.username,jdbcType=VARCHAR},
</if>
<if test="record.unit != null">
unit = #{record.unit,jdbcType=VARCHAR},
</if>
<if test="record.sendtime != null">
sendTime = #{record.sendtime,jdbcType=VARCHAR},
</if>
<if test="record.time != null">
time = #{record.time,jdbcType=TIMESTAMP},
</if>
<if test="record.offlinetime != null">
offlineTime = #{record.offlinetime,jdbcType=TIMESTAMP},
</if>
<if test="record.value != null">
value = #{record.value,jdbcType=VARCHAR},
</if>
<if test="record.sampTime != null">
sampTime = #{record.sampTime,jdbcType=VARCHAR},
</if>
<if test="record.protocol != null">
protocol = #{record.protocol,jdbcType=VARCHAR},
</if>
<if test="record.senddate != null">
sendDate = #{record.senddate,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update device
set Imei = #{record.imei,jdbcType=VARCHAR},
deviceType = #{record.devicetype,jdbcType=INTEGER},
batteryLevel = #{record.batterylevel,jdbcType=INTEGER},
singalStrength = #{record.singalstrength,jdbcType=INTEGER},
sampleData = #{record.sampledata,jdbcType=VARCHAR},
passNum = #{record.passnum,jdbcType=INTEGER},
batteryState = #{record.batterystate,jdbcType=INTEGER},
alarmType = #{record.alarmtype,jdbcType=VARCHAR},
platformType = #{record.platformtype,jdbcType=VARCHAR},
userName = #{record.username,jdbcType=VARCHAR},
unit = #{record.unit,jdbcType=VARCHAR},
sendTime = #{record.sendtime,jdbcType=VARCHAR},
time = #{record.time,jdbcType=TIMESTAMP},
offlineTime = #{record.offlinetime,jdbcType=TIMESTAMP},
value = #{record.value,jdbcType=VARCHAR},
sampTime = #{record.sampTime,jdbcType=VARCHAR},
protocol = #{record.protocol,jdbcType=VARCHAR},
sendDate = #{record.senddate,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.topsail.influxdb.pojo.Device">
update device
<set>
<if test="devicetype != null">
deviceType = #{devicetype,jdbcType=INTEGER},
</if>
<if test="batterylevel != null">
batteryLevel = #{batterylevel,jdbcType=INTEGER},
</if>
<if test="singalstrength != null">
singalStrength = #{singalstrength,jdbcType=INTEGER},
</if>
<if test="sampledata != null">
sampleData = #{sampledata,jdbcType=VARCHAR},
</if>
<if test="passnum != null">
passNum = #{passnum,jdbcType=INTEGER},
</if>
<if test="batterystate != null">
batteryState = #{batterystate,jdbcType=INTEGER},
</if>
<if test="alarmtype != null">
alarmType = #{alarmtype,jdbcType=VARCHAR},
</if>
<if test="platformtype != null">
platformType = #{platformtype,jdbcType=VARCHAR},
</if>
<if test="username != null">
userName = #{username,jdbcType=VARCHAR},
</if>
<if test="unit != null">
unit = #{unit,jdbcType=VARCHAR},
</if>
<if test="sendtime != null">
sendTime = #{sendtime,jdbcType=VARCHAR},
</if>
<if test="time != null">
time = #{time,jdbcType=TIMESTAMP},
</if>
<if test="offlinetime != null">
offlineTime = #{offlinetime,jdbcType=TIMESTAMP},
</if>
<if test="value != null">
value = #{value,jdbcType=VARCHAR},
</if>
<if test="sampTime != null">
sampTime = #{sampTime,jdbcType=VARCHAR},
</if>
<if test="protocol != null">
protocol = #{protocol,jdbcType=VARCHAR},
</if>
<if test="senddate != null">
sendDate = #{senddate,jdbcType=TIMESTAMP},
</if>
</set>
where Imei = #{imei,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.topsail.influxdb.pojo.Device">
update device
set deviceType = #{devicetype,jdbcType=INTEGER},
batteryLevel = #{batterylevel,jdbcType=INTEGER},
singalStrength = #{singalstrength,jdbcType=INTEGER},
sampleData = #{sampledata,jdbcType=VARCHAR},
passNum = #{passnum,jdbcType=INTEGER},
batteryState = #{batterystate,jdbcType=INTEGER},
alarmType = #{alarmtype,jdbcType=VARCHAR},
platformType = #{platformtype,jdbcType=VARCHAR},
userName = #{username,jdbcType=VARCHAR},
unit = #{unit,jdbcType=VARCHAR},
sendTime = #{sendtime,jdbcType=VARCHAR},
time = #{time,jdbcType=TIMESTAMP},
offlineTime = #{offlinetime,jdbcType=TIMESTAMP},
value = #{value,jdbcType=VARCHAR},
sampTime = #{sampTime,jdbcType=VARCHAR},
protocol = #{protocol,jdbcType=VARCHAR},
sendDate = #{senddate,jdbcType=TIMESTAMP},
devModel=#{devModel,jdbcType=INTEGER}
where Imei = #{imei,jdbcType=VARCHAR}
</update>
<insert id="batchInsert" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into device
(Imei, deviceType, batteryLevel, singalStrength, sampleData, passNum, batteryState,
alarmType, platformType, userName, unit, sendTime, time, offlineTime, value,sampTime,protocol, sendDate
)
values
<foreach collection="list" item="item" separator=",">
(#{item.imei,jdbcType=VARCHAR}, #{item.devicetype,jdbcType=INTEGER}, #{item.batterylevel,jdbcType=INTEGER},
#{item.singalstrength,jdbcType=INTEGER}, #{item.sampledata,jdbcType=VARCHAR}, #{item.passnum,jdbcType=INTEGER},
#{item.batterystate,jdbcType=INTEGER}, #{item.alarmtype,jdbcType=VARCHAR}, #{item.platformtype,jdbcType=VARCHAR},
#{item.username,jdbcType=VARCHAR}, #{item.unit,jdbcType=VARCHAR}, #{item.sendtime,jdbcType=VARCHAR},
#{item.time,jdbcType=TIMESTAMP}, #{item.offlinetime,jdbcType=TIMESTAMP}, #{item.value,jdbcType=VARCHAR}, #{item.sampTime,jdbcType=VARCHAR}, #{item.protocol,jdbcType=VARCHAR},
#{item.senddate,jdbcType=TIMESTAMP})
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into device (
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
)
values
<foreach collection="list" item="item" separator=",">
(
<foreach collection="selective" item="column" separator=",">
<if test="'Imei'.toString() == column.value">
#{item.imei,jdbcType=VARCHAR}
</if>
<if test="'deviceType'.toString() == column.value">
#{item.devicetype,jdbcType=INTEGER}
</if>
<if test="'batteryLevel'.toString() == column.value">
#{item.batterylevel,jdbcType=INTEGER}
</if>
<if test="'singalStrength'.toString() == column.value">
#{item.singalstrength,jdbcType=INTEGER}
</if>
<if test="'sampleData'.toString() == column.value">
#{item.sampledata,jdbcType=VARCHAR}
</if>
<if test="'passNum'.toString() == column.value">
#{item.passnum,jdbcType=INTEGER}
</if>
<if test="'batteryState'.toString() == column.value">
#{item.batterystate,jdbcType=INTEGER}
</if>
<if test="'alarmType'.toString() == column.value">
#{item.alarmtype,jdbcType=VARCHAR}
</if>
<if test="'platformType'.toString() == column.value">
#{item.platformtype,jdbcType=VARCHAR}
</if>
<if test="'userName'.toString() == column.value">
#{item.username,jdbcType=VARCHAR}
</if>
<if test="'unit'.toString() == column.value">
#{item.unit,jdbcType=VARCHAR}
</if>
<if test="'sendTime'.toString() == column.value">
#{item.sendtime,jdbcType=VARCHAR}
</if>
<if test="'time'.toString() == column.value">
#{item.time,jdbcType=TIMESTAMP}
</if>
<if test="'offlineTime'.toString() == column.value">
#{item.offlinetime,jdbcType=TIMESTAMP}
</if>
<if test="'value'.toString() == column.value">
#{item.value,jdbcType=VARCHAR}
</if>
<if test="'sampTime'.toString() == column.value">
#{item.sampTime,jdbcType=VARCHAR}
</if>
<if test="'protocol'.toString() == column.value">
#{item.protocol,jdbcType=VARCHAR}
</if>
<if test="'sendDate'.toString() == column.value">
#{item.senddate,jdbcType=TIMESTAMP}
</if>
</foreach>
)
</foreach>
</insert>
</mapper>

+ 40
- 0
src/main/java/com/topsail/influxdb/mapper/DeviceProjectViewMapper.java View File

@ -0,0 +1,40 @@
package com.topsail.influxdb.mapper;
import com.topsail.influxdb.pojo.DeviceProjectView;
import com.topsail.influxdb.pojo.DeviceProjectViewExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface DeviceProjectViewMapper {
long countByExample(DeviceProjectViewExample example);
int deleteByExample(DeviceProjectViewExample example);
int insert(DeviceProjectView record);
int insertSelective(DeviceProjectView record);
List<DeviceProjectView> selectByExample(DeviceProjectViewExample example);
int updateByExampleSelective(@Param("record") DeviceProjectView record, @Param("example") DeviceProjectViewExample example);
int updateByExample(@Param("record") DeviceProjectView record, @Param("example") DeviceProjectViewExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_project_view
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsert(@Param("list") List<DeviceProjectView> list);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_project_view
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsertSelective(@Param("list") List<DeviceProjectView> list, @Param("selective") DeviceProjectView.Column ... selective);
}

+ 240
- 0
src/main/java/com/topsail/influxdb/mapper/DeviceProjectViewMapper.xml View File

@ -0,0 +1,240 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.topsail.influxdb.mapper.DeviceProjectViewMapper">
<resultMap id="BaseResultMap" type="com.topsail.influxdb.pojo.DeviceProjectView">
<result column="imei" jdbcType="VARCHAR" property="imei" />
<result column="deviceType" jdbcType="INTEGER" property="devicetype" />
<result column="userName" jdbcType="VARCHAR" property="username" />
<result column="company_id" jdbcType="INTEGER" property="companyId" />
<result column="project_id" jdbcType="INTEGER" property="projectId" />
<result column="imei2" jdbcType="VARCHAR" property="imei2" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
imei, deviceType, userName, company_id, project_id, imei2
</sql>
<select id="selectByExample" parameterType="com.topsail.influxdb.pojo.DeviceProjectViewExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from device_project_view
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<delete id="deleteByExample" parameterType="com.topsail.influxdb.pojo.DeviceProjectViewExample">
delete from device_project_view
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.topsail.influxdb.pojo.DeviceProjectView">
insert into device_project_view (imei, deviceType, userName,
company_id, project_id, imei2
)
values (#{imei,jdbcType=VARCHAR}, #{devicetype,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR},
#{companyId,jdbcType=INTEGER}, #{projectId,jdbcType=INTEGER}, #{imei2,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.topsail.influxdb.pojo.DeviceProjectView">
insert into device_project_view
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="imei != null">
imei,
</if>
<if test="devicetype != null">
deviceType,
</if>
<if test="username != null">
userName,
</if>
<if test="companyId != null">
company_id,
</if>
<if test="projectId != null">
project_id,
</if>
<if test="imei2 != null">
imei2,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="imei != null">
#{imei,jdbcType=VARCHAR},
</if>
<if test="devicetype != null">
#{devicetype,jdbcType=INTEGER},
</if>
<if test="username != null">
#{username,jdbcType=VARCHAR},
</if>
<if test="companyId != null">
#{companyId,jdbcType=INTEGER},
</if>
<if test="projectId != null">
#{projectId,jdbcType=INTEGER},
</if>
<if test="imei2 != null">
#{imei2,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.topsail.influxdb.pojo.DeviceProjectViewExample" resultType="java.lang.Long">
select count(*) from device_project_view
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update device_project_view
<set>
<if test="record.imei != null">
imei = #{record.imei,jdbcType=VARCHAR},
</if>
<if test="record.devicetype != null">
deviceType = #{record.devicetype,jdbcType=INTEGER},
</if>
<if test="record.username != null">
userName = #{record.username,jdbcType=VARCHAR},
</if>
<if test="record.companyId != null">
company_id = #{record.companyId,jdbcType=INTEGER},
</if>
<if test="record.projectId != null">
project_id = #{record.projectId,jdbcType=INTEGER},
</if>
<if test="record.imei2 != null">
imei2 = #{record.imei2,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update device_project_view
set imei = #{record.imei,jdbcType=VARCHAR},
deviceType = #{record.devicetype,jdbcType=INTEGER},
userName = #{record.username,jdbcType=VARCHAR},
company_id = #{record.companyId,jdbcType=INTEGER},
project_id = #{record.projectId,jdbcType=INTEGER},
imei2 = #{record.imei2,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<insert id="batchInsert" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into device_project_view
(imei, deviceType, userName, company_id, project_id, imei2)
values
<foreach collection="list" item="item" separator=",">
(#{item.imei,jdbcType=VARCHAR}, #{item.devicetype,jdbcType=INTEGER}, #{item.username,jdbcType=VARCHAR},
#{item.companyId,jdbcType=INTEGER}, #{item.projectId,jdbcType=INTEGER}, #{item.imei2,jdbcType=VARCHAR}
)
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into device_project_view (
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
)
values
<foreach collection="list" item="item" separator=",">
(
<foreach collection="selective" item="column" separator=",">
<if test="'imei'.toString() == column.value">
#{item.imei,jdbcType=VARCHAR}
</if>
<if test="'deviceType'.toString() == column.value">
#{item.devicetype,jdbcType=INTEGER}
</if>
<if test="'userName'.toString() == column.value">
#{item.username,jdbcType=VARCHAR}
</if>
<if test="'company_id'.toString() == column.value">
#{item.companyId,jdbcType=INTEGER}
</if>
<if test="'project_id'.toString() == column.value">
#{item.projectId,jdbcType=INTEGER}
</if>
<if test="'imei2'.toString() == column.value">
#{item.imei2,jdbcType=VARCHAR}
</if>
</foreach>
)
</foreach>
</insert>
</mapper>

+ 40
- 0
src/main/java/com/topsail/influxdb/mapper/DeviceUserMapper.java View File

@ -0,0 +1,40 @@
package com.topsail.influxdb.mapper;
import com.topsail.influxdb.pojo.DeviceUser;
import com.topsail.influxdb.pojo.DeviceUserExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface DeviceUserMapper {
long countByExample(DeviceUserExample example);
int deleteByExample(DeviceUserExample example);
int insert(DeviceUser record);
int insertSelective(DeviceUser record);
List<DeviceUser> selectByExample(DeviceUserExample example);
int updateByExampleSelective(@Param("record") DeviceUser record, @Param("example") DeviceUserExample example);
int updateByExample(@Param("record") DeviceUser record, @Param("example") DeviceUserExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_user
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsert(@Param("list") List<DeviceUser> list);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_user
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsertSelective(@Param("list") List<DeviceUser> list, @Param("selective") DeviceUser.Column ... selective);
}

+ 483
- 0
src/main/java/com/topsail/influxdb/mapper/DeviceUserMapper.xml View File

@ -0,0 +1,483 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.topsail.influxdb.mapper.DeviceUserMapper">
<resultMap id="BaseResultMap" type="com.topsail.influxdb.pojo.DeviceUser">
<result column="Imei" jdbcType="VARCHAR" property="imei" />
<result column="deviceType" jdbcType="INTEGER" property="devicetype" />
<result column="batteryLevel" jdbcType="INTEGER" property="batterylevel" />
<result column="singalStrength" jdbcType="INTEGER" property="singalstrength" />
<result column="sampleData" jdbcType="VARCHAR" property="sampledata" />
<result column="passNum" jdbcType="INTEGER" property="passnum" />
<result column="batteryState" jdbcType="INTEGER" property="batterystate" />
<result column="alarmType" jdbcType="VARCHAR" property="alarmtype" />
<result column="platformType" jdbcType="VARCHAR" property="platformtype" />
<result column="userName" jdbcType="VARCHAR" property="username" />
<result column="unit" jdbcType="VARCHAR" property="unit" />
<result column="sendTime" jdbcType="VARCHAR" property="sendtime" />
<result column="time" jdbcType="TIMESTAMP" property="time" />
<result column="offlineTime" jdbcType="TIMESTAMP" property="offlinetime" />
<result column="address" jdbcType="VARCHAR" property="address" />
<result column="lon" jdbcType="DOUBLE" property="lon" />
<result column="lat" jdbcType="DOUBLE" property="lat" />
<result column="value" jdbcType="VARCHAR" property="value" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="project_id" jdbcType="INTEGER" property="projectId" />
<result column="user_id" jdbcType="INTEGER" property="userId" />
<result column="STATUS" jdbcType="VARCHAR" property="status" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
Imei, deviceType, batteryLevel, singalStrength, sampleData, passNum, batteryState,
alarmType, platformType, userName, unit, sendTime, time, offlineTime, address, lon,
lat, value, name, project_id, user_id, STATUS
</sql>
<select id="selectByExample" parameterType="com.topsail.influxdb.pojo.DeviceUserExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from device_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<delete id="deleteByExample" parameterType="com.topsail.influxdb.pojo.DeviceUserExample">
delete from device_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.topsail.influxdb.pojo.DeviceUser">
insert into device_user (Imei, deviceType, batteryLevel,
singalStrength, sampleData, passNum,
batteryState, alarmType, platformType,
userName, unit, sendTime,
time, offlineTime, address,
lon, lat, value, name,
project_id, user_id, STATUS
)
values (#{imei,jdbcType=VARCHAR}, #{devicetype,jdbcType=INTEGER}, #{batterylevel,jdbcType=INTEGER},
#{singalstrength,jdbcType=INTEGER}, #{sampledata,jdbcType=VARCHAR}, #{passnum,jdbcType=INTEGER},
#{batterystate,jdbcType=INTEGER}, #{alarmtype,jdbcType=VARCHAR}, #{platformtype,jdbcType=VARCHAR},
#{username,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR}, #{sendtime,jdbcType=VARCHAR},
#{time,jdbcType=TIMESTAMP}, #{offlinetime,jdbcType=TIMESTAMP}, #{address,jdbcType=VARCHAR},
#{lon,jdbcType=DOUBLE}, #{lat,jdbcType=DOUBLE}, #{value,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{projectId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{status,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.topsail.influxdb.pojo.DeviceUser">
insert into device_user
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="imei != null">
Imei,
</if>
<if test="devicetype != null">
deviceType,
</if>
<if test="batterylevel != null">
batteryLevel,
</if>
<if test="singalstrength != null">
singalStrength,
</if>
<if test="sampledata != null">
sampleData,
</if>
<if test="passnum != null">
passNum,
</if>
<if test="batterystate != null">
batteryState,
</if>
<if test="alarmtype != null">
alarmType,
</if>
<if test="platformtype != null">
platformType,
</if>
<if test="username != null">
userName,
</if>
<if test="unit != null">
unit,
</if>
<if test="sendtime != null">
sendTime,
</if>
<if test="time != null">
time,
</if>
<if test="offlinetime != null">
offlineTime,
</if>
<if test="address != null">
address,
</if>
<if test="lon != null">
lon,
</if>
<if test="lat != null">
lat,
</if>
<if test="value != null">
value,
</if>
<if test="name != null">
name,
</if>
<if test="projectId != null">
project_id,
</if>
<if test="userId != null">
user_id,
</if>
<if test="status != null">
STATUS,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="imei != null">
#{imei,jdbcType=VARCHAR},
</if>
<if test="devicetype != null">
#{devicetype,jdbcType=INTEGER},
</if>
<if test="batterylevel != null">
#{batterylevel,jdbcType=INTEGER},
</if>
<if test="singalstrength != null">
#{singalstrength,jdbcType=INTEGER},
</if>
<if test="sampledata != null">
#{sampledata,jdbcType=VARCHAR},
</if>
<if test="passnum != null">
#{passnum,jdbcType=INTEGER},
</if>
<if test="batterystate != null">
#{batterystate,jdbcType=INTEGER},
</if>
<if test="alarmtype != null">
#{alarmtype,jdbcType=VARCHAR},
</if>
<if test="platformtype != null">
#{platformtype,jdbcType=VARCHAR},
</if>
<if test="username != null">
#{username,jdbcType=VARCHAR},
</if>
<if test="unit != null">
#{unit,jdbcType=VARCHAR},
</if>
<if test="sendtime != null">
#{sendtime,jdbcType=VARCHAR},
</if>
<if test="time != null">
#{time,jdbcType=TIMESTAMP},
</if>
<if test="offlinetime != null">
#{offlinetime,jdbcType=TIMESTAMP},
</if>
<if test="address != null">
#{address,jdbcType=VARCHAR},
</if>
<if test="lon != null">
#{lon,jdbcType=DOUBLE},
</if>
<if test="lat != null">
#{lat,jdbcType=DOUBLE},
</if>
<if test="value != null">
#{value,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="projectId != null">
#{projectId,jdbcType=INTEGER},
</if>
<if test="userId != null">
#{userId,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.topsail.influxdb.pojo.DeviceUserExample" resultType="java.lang.Long">
select count(*) from device_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update device_user
<set>
<if test="record.imei != null">
Imei = #{record.imei,jdbcType=VARCHAR},
</if>
<if test="record.devicetype != null">
deviceType = #{record.devicetype,jdbcType=INTEGER},
</if>
<if test="record.batterylevel != null">
batteryLevel = #{record.batterylevel,jdbcType=INTEGER},
</if>
<if test="record.singalstrength != null">
singalStrength = #{record.singalstrength,jdbcType=INTEGER},
</if>
<if test="record.sampledata != null">
sampleData = #{record.sampledata,jdbcType=VARCHAR},
</if>
<if test="record.passnum != null">
passNum = #{record.passnum,jdbcType=INTEGER},
</if>
<if test="record.batterystate != null">
batteryState = #{record.batterystate,jdbcType=INTEGER},
</if>
<if test="record.alarmtype != null">
alarmType = #{record.alarmtype,jdbcType=VARCHAR},
</if>
<if test="record.platformtype != null">
platformType = #{record.platformtype,jdbcType=VARCHAR},
</if>
<if test="record.username != null">
userName = #{record.username,jdbcType=VARCHAR},
</if>
<if test="record.unit != null">
unit = #{record.unit,jdbcType=VARCHAR},
</if>
<if test="record.sendtime != null">
sendTime = #{record.sendtime,jdbcType=VARCHAR},
</if>
<if test="record.time != null">
time = #{record.time,jdbcType=TIMESTAMP},
</if>
<if test="record.offlinetime != null">
offlineTime = #{record.offlinetime,jdbcType=TIMESTAMP},
</if>
<if test="record.address != null">
address = #{record.address,jdbcType=VARCHAR},
</if>
<if test="record.lon != null">
lon = #{record.lon,jdbcType=DOUBLE},
</if>
<if test="record.lat != null">
lat = #{record.lat,jdbcType=DOUBLE},
</if>
<if test="record.value != null">
value = #{record.value,jdbcType=VARCHAR},
</if>
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.projectId != null">
project_id = #{record.projectId,jdbcType=INTEGER},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=INTEGER},
</if>
<if test="record.status != null">
STATUS = #{record.status,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update device_user
set Imei = #{record.imei,jdbcType=VARCHAR},
deviceType = #{record.devicetype,jdbcType=INTEGER},
batteryLevel = #{record.batterylevel,jdbcType=INTEGER},
singalStrength = #{record.singalstrength,jdbcType=INTEGER},
sampleData = #{record.sampledata,jdbcType=VARCHAR},
passNum = #{record.passnum,jdbcType=INTEGER},
batteryState = #{record.batterystate,jdbcType=INTEGER},
alarmType = #{record.alarmtype,jdbcType=VARCHAR},
platformType = #{record.platformtype,jdbcType=VARCHAR},
userName = #{record.username,jdbcType=VARCHAR},
unit = #{record.unit,jdbcType=VARCHAR},
sendTime = #{record.sendtime,jdbcType=VARCHAR},
time = #{record.time,jdbcType=TIMESTAMP},
offlineTime = #{record.offlinetime,jdbcType=TIMESTAMP},
address = #{record.address,jdbcType=VARCHAR},
lon = #{record.lon,jdbcType=DOUBLE},
lat = #{record.lat,jdbcType=DOUBLE},
value = #{record.value,jdbcType=VARCHAR},
name = #{record.name,jdbcType=VARCHAR},
project_id = #{record.projectId,jdbcType=INTEGER},
user_id = #{record.userId,jdbcType=INTEGER},
STATUS = #{record.status,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<insert id="batchInsert" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into device_user
(Imei, deviceType, batteryLevel, singalStrength, sampleData, passNum, batteryState,
alarmType, platformType, userName, unit, sendTime, time, offlineTime, address,
lon, lat, value, name, project_id, user_id, STATUS)
values
<foreach collection="list" item="item" separator=",">
(#{item.imei,jdbcType=VARCHAR}, #{item.devicetype,jdbcType=INTEGER}, #{item.batterylevel,jdbcType=INTEGER},
#{item.singalstrength,jdbcType=INTEGER}, #{item.sampledata,jdbcType=VARCHAR}, #{item.passnum,jdbcType=INTEGER},
#{item.batterystate,jdbcType=INTEGER}, #{item.alarmtype,jdbcType=VARCHAR}, #{item.platformtype,jdbcType=VARCHAR},
#{item.username,jdbcType=VARCHAR}, #{item.unit,jdbcType=VARCHAR}, #{item.sendtime,jdbcType=VARCHAR},
#{item.time,jdbcType=TIMESTAMP}, #{item.offlinetime,jdbcType=TIMESTAMP}, #{item.address,jdbcType=VARCHAR},
#{item.lon,jdbcType=DOUBLE}, #{item.lat,jdbcType=DOUBLE}, #{item.value,jdbcType=VARCHAR},
#{item.name,jdbcType=VARCHAR}, #{item.projectId,jdbcType=INTEGER}, #{item.userId,jdbcType=INTEGER},
#{item.status,jdbcType=VARCHAR})
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into device_user (
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
)
values
<foreach collection="list" item="item" separator=",">
(
<foreach collection="selective" item="column" separator=",">
<if test="'Imei'.toString() == column.value">
#{item.imei,jdbcType=VARCHAR}
</if>
<if test="'deviceType'.toString() == column.value">
#{item.devicetype,jdbcType=INTEGER}
</if>
<if test="'batteryLevel'.toString() == column.value">
#{item.batterylevel,jdbcType=INTEGER}
</if>
<if test="'singalStrength'.toString() == column.value">
#{item.singalstrength,jdbcType=INTEGER}
</if>
<if test="'sampleData'.toString() == column.value">
#{item.sampledata,jdbcType=VARCHAR}
</if>
<if test="'passNum'.toString() == column.value">
#{item.passnum,jdbcType=INTEGER}
</if>
<if test="'batteryState'.toString() == column.value">
#{item.batterystate,jdbcType=INTEGER}
</if>
<if test="'alarmType'.toString() == column.value">
#{item.alarmtype,jdbcType=VARCHAR}
</if>
<if test="'platformType'.toString() == column.value">
#{item.platformtype,jdbcType=VARCHAR}
</if>
<if test="'userName'.toString() == column.value">
#{item.username,jdbcType=VARCHAR}
</if>
<if test="'unit'.toString() == column.value">
#{item.unit,jdbcType=VARCHAR}
</if>
<if test="'sendTime'.toString() == column.value">
#{item.sendtime,jdbcType=VARCHAR}
</if>
<if test="'time'.toString() == column.value">
#{item.time,jdbcType=TIMESTAMP}
</if>
<if test="'offlineTime'.toString() == column.value">
#{item.offlinetime,jdbcType=TIMESTAMP}
</if>
<if test="'address'.toString() == column.value">
#{item.address,jdbcType=VARCHAR}
</if>
<if test="'lon'.toString() == column.value">
#{item.lon,jdbcType=DOUBLE}
</if>
<if test="'lat'.toString() == column.value">
#{item.lat,jdbcType=DOUBLE}
</if>
<if test="'value'.toString() == column.value">
#{item.value,jdbcType=VARCHAR}
</if>
<if test="'name'.toString() == column.value">
#{item.name,jdbcType=VARCHAR}
</if>
<if test="'project_id'.toString() == column.value">
#{item.projectId,jdbcType=INTEGER}
</if>
<if test="'user_id'.toString() == column.value">
#{item.userId,jdbcType=INTEGER}
</if>
<if test="'STATUS'.toString() == column.value">
#{item.status,jdbcType=VARCHAR}
</if>
</foreach>
)
</foreach>
</insert>
</mapper>

+ 32
- 0
src/main/java/com/topsail/influxdb/mapper/GatewayDeviceMapper.java View File

@ -0,0 +1,32 @@
package com.topsail.influxdb.mapper;
import com.topsail.influxdb.pojo.GatewayDevice;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
/**
*
*
* @version
* <pre>
* Author Version Date Changes
* Administrator 1.0 2022年04月22日 Created
*
* </pre>
* @since 1.
*/
public interface GatewayDeviceMapper {
/**
* 新增
*
* @param
* @return
*/
int saveGatewayDevice(GatewayDevice gatewayDevice);
@Update("update gateway_device set bind_status = #{bindStatus} where imei = #{imei}")
int updateGatewayDeviceStatus(@Param("imei") String imei,@Param("bindStatus") Integer bindStatus);
}

+ 17
- 0
src/main/java/com/topsail/influxdb/mapper/GatewayDeviceMapper.xml View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.topsail.influxdb.mapper.GatewayDeviceMapper">
<insert id="saveGatewayDevice" parameterType="com.topsail.influxdb.pojo.GatewayDevice">
insert into gateway_device
(imei,parent_imei,device_id,platform_type,bind_status,create_time)
values
(#{imei},#{parentImei},#{deviceId},#{platformType},#{bindStatus},now())
ON DUPLICATE KEY UPDATE
device_id = #{deviceId},
platform_type = #{platformType},
bind_status = #{bindStatus},
update_time = now();
</insert>
</mapper>

+ 48
- 0
src/main/java/com/topsail/influxdb/mapper/HistoryAllMapper.java View File

@ -0,0 +1,48 @@
package com.topsail.influxdb.mapper;
import com.topsail.influxdb.pojo.HistoryAll;
import com.topsail.influxdb.pojo.HistoryAllExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface HistoryAllMapper {
long countByExample(HistoryAllExample example);
int deleteByExample(HistoryAllExample example);
int deleteByPrimaryKey(Long id);
int insert(HistoryAll record);
int insertSelective(HistoryAll record);
List<HistoryAll> selectByExample(HistoryAllExample example);
HistoryAll selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") HistoryAll record, @Param("example") HistoryAllExample example);
int updateByExample(@Param("record") HistoryAll record, @Param("example") HistoryAllExample example);
int updateByPrimaryKeySelective(HistoryAll record);
int updateByPrimaryKey(HistoryAll record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history_all
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsert(@Param("list") List<HistoryAll> list);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history_all
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsertSelective(@Param("list") List<HistoryAll> list, @Param("selective") HistoryAll.Column ... selective);
}

+ 491
- 0
src/main/java/com/topsail/influxdb/mapper/HistoryAllMapper.xml View File

@ -0,0 +1,491 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.topsail.influxdb.mapper.HistoryAllMapper">
<resultMap id="BaseResultMap" type="com.topsail.influxdb.pojo.HistoryAll">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="deviceType" jdbcType="INTEGER" property="devicetype" />
<result column="Imei" jdbcType="VARCHAR" property="imei" />
<result column="batteryLevel" jdbcType="INTEGER" property="batterylevel" />
<result column="singalStrength" jdbcType="INTEGER" property="singalstrength" />
<result column="sampleData" jdbcType="VARCHAR" property="sampledata" />
<result column="passNum" jdbcType="INTEGER" property="passnum" />
<result column="batteryState" jdbcType="INTEGER" property="batterystate" />
<result column="alarmType" jdbcType="VARCHAR" property="alarmtype" />
<result column="platformType" jdbcType="VARCHAR" property="platformtype" />
<result column="userName" jdbcType="VARCHAR" property="username" />
<result column="unit" jdbcType="VARCHAR" property="unit" />
<result column="sendTime" jdbcType="VARCHAR" property="sendtime" />
<result column="dataBody" jdbcType="VARCHAR" property="databody" />
<result column="time" jdbcType="TIMESTAMP" property="time" />
<result column="value" jdbcType="VARCHAR" property="value" />
<result column="sendDate" jdbcType="TIMESTAMP" property="senddate" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, deviceType, Imei, batteryLevel, singalStrength, sampleData, passNum, batteryState,
alarmType, platformType, userName, unit, sendTime, dataBody, time, value, sendDate
</sql>
<select id="selectByExample" parameterType="com.topsail.influxdb.pojo.HistoryAllExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from history_all
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from history_all
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from history_all
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.topsail.influxdb.pojo.HistoryAllExample">
delete from history_all
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.topsail.influxdb.pojo.HistoryAll">
insert into history_all (id, deviceType, Imei,
batteryLevel, singalStrength, sampleData,
passNum, batteryState, alarmType,
platformType, userName, unit,
sendTime, dataBody, time,
value, sendDate)
values (#{id,jdbcType=BIGINT}, #{devicetype,jdbcType=INTEGER}, #{imei,jdbcType=VARCHAR},
#{batterylevel,jdbcType=INTEGER}, #{singalstrength,jdbcType=INTEGER}, #{sampledata,jdbcType=VARCHAR},
#{passnum,jdbcType=INTEGER}, #{batterystate,jdbcType=INTEGER}, #{alarmtype,jdbcType=VARCHAR},
#{platformtype,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR},
#{sendtime,jdbcType=VARCHAR}, #{databody,jdbcType=VARCHAR}, #{time,jdbcType=TIMESTAMP},
#{value,jdbcType=VARCHAR}, #{senddate,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.topsail.influxdb.pojo.HistoryAll">
insert into history_all
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="devicetype != null">
deviceType,
</if>
<if test="imei != null">
Imei,
</if>
<if test="batterylevel != null">
batteryLevel,
</if>
<if test="singalstrength != null">
singalStrength,
</if>
<if test="sampledata != null">
sampleData,
</if>
<if test="passnum != null">
passNum,
</if>
<if test="batterystate != null">
batteryState,
</if>
<if test="alarmtype != null">
alarmType,
</if>
<if test="platformtype != null">
platformType,
</if>
<if test="username != null">
userName,
</if>
<if test="unit != null">
unit,
</if>
<if test="sendtime != null">
sendTime,
</if>
<if test="databody != null">
dataBody,
</if>
<if test="time != null">
time,
</if>
<if test="value != null">
value,
</if>
<if test="senddate != null">
sendDate,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="devicetype != null">
#{devicetype,jdbcType=INTEGER},
</if>
<if test="imei != null">
#{imei,jdbcType=VARCHAR},
</if>
<if test="batterylevel != null">
#{batterylevel,jdbcType=INTEGER},
</if>
<if test="singalstrength != null">
#{singalstrength,jdbcType=INTEGER},
</if>
<if test="sampledata != null">
#{sampledata,jdbcType=VARCHAR},
</if>
<if test="passnum != null">
#{passnum,jdbcType=INTEGER},
</if>
<if test="batterystate != null">
#{batterystate,jdbcType=INTEGER},
</if>
<if test="alarmtype != null">
#{alarmtype,jdbcType=VARCHAR},
</if>
<if test="platformtype != null">
#{platformtype,jdbcType=VARCHAR},
</if>
<if test="username != null">
#{username,jdbcType=VARCHAR},
</if>
<if test="unit != null">
#{unit,jdbcType=VARCHAR},
</if>
<if test="sendtime != null">
#{sendtime,jdbcType=VARCHAR},
</if>
<if test="databody != null">
#{databody,jdbcType=VARCHAR},
</if>
<if test="time != null">
#{time,jdbcType=TIMESTAMP},
</if>
<if test="value != null">
#{value,jdbcType=VARCHAR},
</if>
<if test="senddate != null">
#{senddate,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.topsail.influxdb.pojo.HistoryAllExample" resultType="java.lang.Long">
select count(*) from history_all
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update history_all
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.devicetype != null">
deviceType = #{record.devicetype,jdbcType=INTEGER},
</if>
<if test="record.imei != null">
Imei = #{record.imei,jdbcType=VARCHAR},
</if>
<if test="record.batterylevel != null">
batteryLevel = #{record.batterylevel,jdbcType=INTEGER},
</if>
<if test="record.singalstrength != null">
singalStrength = #{record.singalstrength,jdbcType=INTEGER},
</if>
<if test="record.sampledata != null">
sampleData = #{record.sampledata,jdbcType=VARCHAR},
</if>
<if test="record.passnum != null">
passNum = #{record.passnum,jdbcType=INTEGER},
</if>
<if test="record.batterystate != null">
batteryState = #{record.batterystate,jdbcType=INTEGER},
</if>
<if test="record.alarmtype != null">
alarmType = #{record.alarmtype,jdbcType=VARCHAR},
</if>
<if test="record.platformtype != null">
platformType = #{record.platformtype,jdbcType=VARCHAR},
</if>
<if test="record.username != null">
userName = #{record.username,jdbcType=VARCHAR},
</if>
<if test="record.unit != null">
unit = #{record.unit,jdbcType=VARCHAR},
</if>
<if test="record.sendtime != null">
sendTime = #{record.sendtime,jdbcType=VARCHAR},
</if>
<if test="record.databody != null">
dataBody = #{record.databody,jdbcType=VARCHAR},
</if>
<if test="record.time != null">
time = #{record.time,jdbcType=TIMESTAMP},
</if>
<if test="record.value != null">
value = #{record.value,jdbcType=VARCHAR},
</if>
<if test="record.senddate != null">
sendDate = #{record.senddate,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update history_all
set id = #{record.id,jdbcType=BIGINT},
deviceType = #{record.devicetype,jdbcType=INTEGER},
Imei = #{record.imei,jdbcType=VARCHAR},
batteryLevel = #{record.batterylevel,jdbcType=INTEGER},
singalStrength = #{record.singalstrength,jdbcType=INTEGER},
sampleData = #{record.sampledata,jdbcType=VARCHAR},
passNum = #{record.passnum,jdbcType=INTEGER},
batteryState = #{record.batterystate,jdbcType=INTEGER},
alarmType = #{record.alarmtype,jdbcType=VARCHAR},
platformType = #{record.platformtype,jdbcType=VARCHAR},
userName = #{record.username,jdbcType=VARCHAR},
unit = #{record.unit,jdbcType=VARCHAR},
sendTime = #{record.sendtime,jdbcType=VARCHAR},
dataBody = #{record.databody,jdbcType=VARCHAR},
time = #{record.time,jdbcType=TIMESTAMP},
value = #{record.value,jdbcType=VARCHAR},
sendDate = #{record.senddate,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.topsail.influxdb.pojo.HistoryAll">
update history_all
<set>
<if test="devicetype != null">
deviceType = #{devicetype,jdbcType=INTEGER},
</if>
<if test="imei != null">
Imei = #{imei,jdbcType=VARCHAR},
</if>
<if test="batterylevel != null">
batteryLevel = #{batterylevel,jdbcType=INTEGER},
</if>
<if test="singalstrength != null">
singalStrength = #{singalstrength,jdbcType=INTEGER},
</if>
<if test="sampledata != null">
sampleData = #{sampledata,jdbcType=VARCHAR},
</if>
<if test="passnum != null">
passNum = #{passnum,jdbcType=INTEGER},
</if>
<if test="batterystate != null">
batteryState = #{batterystate,jdbcType=INTEGER},
</if>
<if test="alarmtype != null">
alarmType = #{alarmtype,jdbcType=VARCHAR},
</if>
<if test="platformtype != null">
platformType = #{platformtype,jdbcType=VARCHAR},
</if>
<if test="username != null">
userName = #{username,jdbcType=VARCHAR},
</if>
<if test="unit != null">
unit = #{unit,jdbcType=VARCHAR},
</if>
<if test="sendtime != null">
sendTime = #{sendtime,jdbcType=VARCHAR},
</if>
<if test="databody != null">
dataBody = #{databody,jdbcType=VARCHAR},
</if>
<if test="time != null">
time = #{time,jdbcType=TIMESTAMP},
</if>
<if test="value != null">
value = #{value,jdbcType=VARCHAR},
</if>
<if test="senddate != null">
sendDate = #{senddate,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.topsail.influxdb.pojo.HistoryAll">
update history_all
set deviceType = #{devicetype,jdbcType=INTEGER},
Imei = #{imei,jdbcType=VARCHAR},
batteryLevel = #{batterylevel,jdbcType=INTEGER},
singalStrength = #{singalstrength,jdbcType=INTEGER},
sampleData = #{sampledata,jdbcType=VARCHAR},
passNum = #{passnum,jdbcType=INTEGER},
batteryState = #{batterystate,jdbcType=INTEGER},
alarmType = #{alarmtype,jdbcType=VARCHAR},
platformType = #{platformtype,jdbcType=VARCHAR},
userName = #{username,jdbcType=VARCHAR},
unit = #{unit,jdbcType=VARCHAR},
sendTime = #{sendtime,jdbcType=VARCHAR},
dataBody = #{databody,jdbcType=VARCHAR},
time = #{time,jdbcType=TIMESTAMP},
value = #{value,jdbcType=VARCHAR},
sendDate = #{senddate,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
<insert id="batchInsert" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into history_all
(id, deviceType, Imei, batteryLevel, singalStrength, sampleData, passNum, batteryState,
alarmType, platformType, userName, unit, sendTime, dataBody, time, value, sendDate
)
values
<foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=BIGINT}, #{item.devicetype,jdbcType=INTEGER}, #{item.imei,jdbcType=VARCHAR},
#{item.batterylevel,jdbcType=INTEGER}, #{item.singalstrength,jdbcType=INTEGER},
#{item.sampledata,jdbcType=VARCHAR}, #{item.passnum,jdbcType=INTEGER}, #{item.batterystate,jdbcType=INTEGER},
#{item.alarmtype,jdbcType=VARCHAR}, #{item.platformtype,jdbcType=VARCHAR}, #{item.username,jdbcType=VARCHAR},
#{item.unit,jdbcType=VARCHAR}, #{item.sendtime,jdbcType=VARCHAR}, #{item.databody,jdbcType=VARCHAR},
#{item.time,jdbcType=TIMESTAMP}, #{item.value,jdbcType=VARCHAR}, #{item.senddate,jdbcType=TIMESTAMP}
)
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into history_all (
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
)
values
<foreach collection="list" item="item" separator=",">
(
<foreach collection="selective" item="column" separator=",">
<if test="'id'.toString() == column.value">
#{item.id,jdbcType=BIGINT}
</if>
<if test="'deviceType'.toString() == column.value">
#{item.devicetype,jdbcType=INTEGER}
</if>
<if test="'Imei'.toString() == column.value">
#{item.imei,jdbcType=VARCHAR}
</if>
<if test="'batteryLevel'.toString() == column.value">
#{item.batterylevel,jdbcType=INTEGER}
</if>
<if test="'singalStrength'.toString() == column.value">
#{item.singalstrength,jdbcType=INTEGER}
</if>
<if test="'sampleData'.toString() == column.value">
#{item.sampledata,jdbcType=VARCHAR}
</if>
<if test="'passNum'.toString() == column.value">
#{item.passnum,jdbcType=INTEGER}
</if>
<if test="'batteryState'.toString() == column.value">
#{item.batterystate,jdbcType=INTEGER}
</if>
<if test="'alarmType'.toString() == column.value">
#{item.alarmtype,jdbcType=VARCHAR}
</if>
<if test="'platformType'.toString() == column.value">
#{item.platformtype,jdbcType=VARCHAR}
</if>
<if test="'userName'.toString() == column.value">
#{item.username,jdbcType=VARCHAR}
</if>
<if test="'unit'.toString() == column.value">
#{item.unit,jdbcType=VARCHAR}
</if>
<if test="'sendTime'.toString() == column.value">
#{item.sendtime,jdbcType=VARCHAR}
</if>
<if test="'dataBody'.toString() == column.value">
#{item.databody,jdbcType=VARCHAR}
</if>
<if test="'time'.toString() == column.value">
#{item.time,jdbcType=TIMESTAMP}
</if>
<if test="'value'.toString() == column.value">
#{item.value,jdbcType=VARCHAR}
</if>
<if test="'sendDate'.toString() == column.value">
#{item.senddate,jdbcType=TIMESTAMP}
</if>
</foreach>
)
</foreach>
</insert>
</mapper>

+ 48
- 0
src/main/java/com/topsail/influxdb/mapper/HistoryErrMapper.java View File

@ -0,0 +1,48 @@
package com.topsail.influxdb.mapper;
import com.topsail.influxdb.pojo.HistoryErr;
import com.topsail.influxdb.pojo.HistoryErrExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface HistoryErrMapper {
long countByExample(HistoryErrExample example);
int deleteByExample(HistoryErrExample example);
int deleteByPrimaryKey(Long id);
int insert(HistoryErr record);
int insertSelective(HistoryErr record);
List<HistoryErr> selectByExample(HistoryErrExample example);
HistoryErr selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") HistoryErr record, @Param("example") HistoryErrExample example);
int updateByExample(@Param("record") HistoryErr record, @Param("example") HistoryErrExample example);
int updateByPrimaryKeySelective(HistoryErr record);
int updateByPrimaryKey(HistoryErr record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history_err
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsert(@Param("list") List<HistoryErr> list);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history_err
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsertSelective(@Param("list") List<HistoryErr> list, @Param("selective") HistoryErr.Column ... selective);
}

+ 491
- 0
src/main/java/com/topsail/influxdb/mapper/HistoryErrMapper.xml View File

@ -0,0 +1,491 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.topsail.influxdb.mapper.HistoryErrMapper">
<resultMap id="BaseResultMap" type="com.topsail.influxdb.pojo.HistoryErr">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="deviceType" jdbcType="INTEGER" property="devicetype" />
<result column="Imei" jdbcType="VARCHAR" property="imei" />
<result column="batteryLevel" jdbcType="INTEGER" property="batterylevel" />
<result column="singalStrength" jdbcType="INTEGER" property="singalstrength" />
<result column="sampleData" jdbcType="VARCHAR" property="sampledata" />
<result column="passNum" jdbcType="INTEGER" property="passnum" />
<result column="batteryState" jdbcType="INTEGER" property="batterystate" />
<result column="alarmType" jdbcType="VARCHAR" property="alarmtype" />
<result column="platformType" jdbcType="VARCHAR" property="platformtype" />
<result column="userName" jdbcType="VARCHAR" property="username" />
<result column="unit" jdbcType="VARCHAR" property="unit" />
<result column="sendTime" jdbcType="VARCHAR" property="sendtime" />
<result column="dataBody" jdbcType="VARCHAR" property="databody" />
<result column="time" jdbcType="TIMESTAMP" property="time" />
<result column="value" jdbcType="VARCHAR" property="value" />
<result column="sendDate" jdbcType="TIMESTAMP" property="senddate" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, deviceType, Imei, batteryLevel, singalStrength, sampleData, passNum, batteryState,
alarmType, platformType, userName, unit, sendTime, dataBody, time, value, sendDate
</sql>
<select id="selectByExample" parameterType="com.topsail.influxdb.pojo.HistoryErrExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from history_err
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from history_err
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from history_err
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.topsail.influxdb.pojo.HistoryErrExample">
delete from history_err
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.topsail.influxdb.pojo.HistoryErr">
insert into history_err (id, deviceType, Imei,
batteryLevel, singalStrength, sampleData,
passNum, batteryState, alarmType,
platformType, userName, unit,
sendTime, dataBody, time,
value, sendDate)
values (#{id,jdbcType=BIGINT}, #{devicetype,jdbcType=INTEGER}, #{imei,jdbcType=VARCHAR},
#{batterylevel,jdbcType=INTEGER}, #{singalstrength,jdbcType=INTEGER}, #{sampledata,jdbcType=VARCHAR},
#{passnum,jdbcType=INTEGER}, #{batterystate,jdbcType=INTEGER}, #{alarmtype,jdbcType=VARCHAR},
#{platformtype,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR},
#{sendtime,jdbcType=VARCHAR}, #{databody,jdbcType=VARCHAR}, #{time,jdbcType=TIMESTAMP},
#{value,jdbcType=VARCHAR}, #{senddate,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.topsail.influxdb.pojo.HistoryErr">
insert into history_err
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="devicetype != null">
deviceType,
</if>
<if test="imei != null">
Imei,
</if>
<if test="batterylevel != null">
batteryLevel,
</if>
<if test="singalstrength != null">
singalStrength,
</if>
<if test="sampledata != null">
sampleData,
</if>
<if test="passnum != null">
passNum,
</if>
<if test="batterystate != null">
batteryState,
</if>
<if test="alarmtype != null">
alarmType,
</if>
<if test="platformtype != null">
platformType,
</if>
<if test="username != null">
userName,
</if>
<if test="unit != null">
unit,
</if>
<if test="sendtime != null">
sendTime,
</if>
<if test="databody != null">
dataBody,
</if>
<if test="time != null">
time,
</if>
<if test="value != null">
value,
</if>
<if test="senddate != null">
sendDate,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="devicetype != null">
#{devicetype,jdbcType=INTEGER},
</if>
<if test="imei != null">
#{imei,jdbcType=VARCHAR},
</if>
<if test="batterylevel != null">
#{batterylevel,jdbcType=INTEGER},
</if>
<if test="singalstrength != null">
#{singalstrength,jdbcType=INTEGER},
</if>
<if test="sampledata != null">
#{sampledata,jdbcType=VARCHAR},
</if>
<if test="passnum != null">
#{passnum,jdbcType=INTEGER},
</if>
<if test="batterystate != null">
#{batterystate,jdbcType=INTEGER},
</if>
<if test="alarmtype != null">
#{alarmtype,jdbcType=VARCHAR},
</if>
<if test="platformtype != null">
#{platformtype,jdbcType=VARCHAR},
</if>
<if test="username != null">
#{username,jdbcType=VARCHAR},
</if>
<if test="unit != null">
#{unit,jdbcType=VARCHAR},
</if>
<if test="sendtime != null">
#{sendtime,jdbcType=VARCHAR},
</if>
<if test="databody != null">
#{databody,jdbcType=VARCHAR},
</if>
<if test="time != null">
#{time,jdbcType=TIMESTAMP},
</if>
<if test="value != null">
#{value,jdbcType=VARCHAR},
</if>
<if test="senddate != null">
#{senddate,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.topsail.influxdb.pojo.HistoryErrExample" resultType="java.lang.Long">
select count(*) from history_err
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update history_err
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.devicetype != null">
deviceType = #{record.devicetype,jdbcType=INTEGER},
</if>
<if test="record.imei != null">
Imei = #{record.imei,jdbcType=VARCHAR},
</if>
<if test="record.batterylevel != null">
batteryLevel = #{record.batterylevel,jdbcType=INTEGER},
</if>
<if test="record.singalstrength != null">
singalStrength = #{record.singalstrength,jdbcType=INTEGER},
</if>
<if test="record.sampledata != null">
sampleData = #{record.sampledata,jdbcType=VARCHAR},
</if>
<if test="record.passnum != null">
passNum = #{record.passnum,jdbcType=INTEGER},
</if>
<if test="record.batterystate != null">
batteryState = #{record.batterystate,jdbcType=INTEGER},
</if>
<if test="record.alarmtype != null">
alarmType = #{record.alarmtype,jdbcType=VARCHAR},
</if>
<if test="record.platformtype != null">
platformType = #{record.platformtype,jdbcType=VARCHAR},
</if>
<if test="record.username != null">
userName = #{record.username,jdbcType=VARCHAR},
</if>
<if test="record.unit != null">
unit = #{record.unit,jdbcType=VARCHAR},
</if>
<if test="record.sendtime != null">
sendTime = #{record.sendtime,jdbcType=VARCHAR},
</if>
<if test="record.databody != null">
dataBody = #{record.databody,jdbcType=VARCHAR},
</if>
<if test="record.time != null">
time = #{record.time,jdbcType=TIMESTAMP},
</if>
<if test="record.value != null">
value = #{record.value,jdbcType=VARCHAR},
</if>
<if test="record.senddate != null">
sendDate = #{record.senddate,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update history_err
set id = #{record.id,jdbcType=BIGINT},
deviceType = #{record.devicetype,jdbcType=INTEGER},
Imei = #{record.imei,jdbcType=VARCHAR},
batteryLevel = #{record.batterylevel,jdbcType=INTEGER},
singalStrength = #{record.singalstrength,jdbcType=INTEGER},
sampleData = #{record.sampledata,jdbcType=VARCHAR},
passNum = #{record.passnum,jdbcType=INTEGER},
batteryState = #{record.batterystate,jdbcType=INTEGER},
alarmType = #{record.alarmtype,jdbcType=VARCHAR},
platformType = #{record.platformtype,jdbcType=VARCHAR},
userName = #{record.username,jdbcType=VARCHAR},
unit = #{record.unit,jdbcType=VARCHAR},
sendTime = #{record.sendtime,jdbcType=VARCHAR},
dataBody = #{record.databody,jdbcType=VARCHAR},
time = #{record.time,jdbcType=TIMESTAMP},
value = #{record.value,jdbcType=VARCHAR},
sendDate = #{record.senddate,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.topsail.influxdb.pojo.HistoryErr">
update history_err
<set>
<if test="devicetype != null">
deviceType = #{devicetype,jdbcType=INTEGER},
</if>
<if test="imei != null">
Imei = #{imei,jdbcType=VARCHAR},
</if>
<if test="batterylevel != null">
batteryLevel = #{batterylevel,jdbcType=INTEGER},
</if>
<if test="singalstrength != null">
singalStrength = #{singalstrength,jdbcType=INTEGER},
</if>
<if test="sampledata != null">
sampleData = #{sampledata,jdbcType=VARCHAR},
</if>
<if test="passnum != null">
passNum = #{passnum,jdbcType=INTEGER},
</if>
<if test="batterystate != null">
batteryState = #{batterystate,jdbcType=INTEGER},
</if>
<if test="alarmtype != null">
alarmType = #{alarmtype,jdbcType=VARCHAR},
</if>
<if test="platformtype != null">
platformType = #{platformtype,jdbcType=VARCHAR},
</if>
<if test="username != null">
userName = #{username,jdbcType=VARCHAR},
</if>
<if test="unit != null">
unit = #{unit,jdbcType=VARCHAR},
</if>
<if test="sendtime != null">
sendTime = #{sendtime,jdbcType=VARCHAR},
</if>
<if test="databody != null">
dataBody = #{databody,jdbcType=VARCHAR},
</if>
<if test="time != null">
time = #{time,jdbcType=TIMESTAMP},
</if>
<if test="value != null">
value = #{value,jdbcType=VARCHAR},
</if>
<if test="senddate != null">
sendDate = #{senddate,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.topsail.influxdb.pojo.HistoryErr">
update history_err
set deviceType = #{devicetype,jdbcType=INTEGER},
Imei = #{imei,jdbcType=VARCHAR},
batteryLevel = #{batterylevel,jdbcType=INTEGER},
singalStrength = #{singalstrength,jdbcType=INTEGER},
sampleData = #{sampledata,jdbcType=VARCHAR},
passNum = #{passnum,jdbcType=INTEGER},
batteryState = #{batterystate,jdbcType=INTEGER},
alarmType = #{alarmtype,jdbcType=VARCHAR},
platformType = #{platformtype,jdbcType=VARCHAR},
userName = #{username,jdbcType=VARCHAR},
unit = #{unit,jdbcType=VARCHAR},
sendTime = #{sendtime,jdbcType=VARCHAR},
dataBody = #{databody,jdbcType=VARCHAR},
time = #{time,jdbcType=TIMESTAMP},
value = #{value,jdbcType=VARCHAR},
sendDate = #{senddate,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
<insert id="batchInsert" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into history_err
(id, deviceType, Imei, batteryLevel, singalStrength, sampleData, passNum, batteryState,
alarmType, platformType, userName, unit, sendTime, dataBody, time, value, sendDate
)
values
<foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=BIGINT}, #{item.devicetype,jdbcType=INTEGER}, #{item.imei,jdbcType=VARCHAR},
#{item.batterylevel,jdbcType=INTEGER}, #{item.singalstrength,jdbcType=INTEGER},
#{item.sampledata,jdbcType=VARCHAR}, #{item.passnum,jdbcType=INTEGER}, #{item.batterystate,jdbcType=INTEGER},
#{item.alarmtype,jdbcType=VARCHAR}, #{item.platformtype,jdbcType=VARCHAR}, #{item.username,jdbcType=VARCHAR},
#{item.unit,jdbcType=VARCHAR}, #{item.sendtime,jdbcType=VARCHAR}, #{item.databody,jdbcType=VARCHAR},
#{item.time,jdbcType=TIMESTAMP}, #{item.value,jdbcType=VARCHAR}, #{item.senddate,jdbcType=TIMESTAMP}
)
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into history_err (
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
)
values
<foreach collection="list" item="item" separator=",">
(
<foreach collection="selective" item="column" separator=",">
<if test="'id'.toString() == column.value">
#{item.id,jdbcType=BIGINT}
</if>
<if test="'deviceType'.toString() == column.value">
#{item.devicetype,jdbcType=INTEGER}
</if>
<if test="'Imei'.toString() == column.value">
#{item.imei,jdbcType=VARCHAR}
</if>
<if test="'batteryLevel'.toString() == column.value">
#{item.batterylevel,jdbcType=INTEGER}
</if>
<if test="'singalStrength'.toString() == column.value">
#{item.singalstrength,jdbcType=INTEGER}
</if>
<if test="'sampleData'.toString() == column.value">
#{item.sampledata,jdbcType=VARCHAR}
</if>
<if test="'passNum'.toString() == column.value">
#{item.passnum,jdbcType=INTEGER}
</if>
<if test="'batteryState'.toString() == column.value">
#{item.batterystate,jdbcType=INTEGER}
</if>
<if test="'alarmType'.toString() == column.value">
#{item.alarmtype,jdbcType=VARCHAR}
</if>
<if test="'platformType'.toString() == column.value">
#{item.platformtype,jdbcType=VARCHAR}
</if>
<if test="'userName'.toString() == column.value">
#{item.username,jdbcType=VARCHAR}
</if>
<if test="'unit'.toString() == column.value">
#{item.unit,jdbcType=VARCHAR}
</if>
<if test="'sendTime'.toString() == column.value">
#{item.sendtime,jdbcType=VARCHAR}
</if>
<if test="'dataBody'.toString() == column.value">
#{item.databody,jdbcType=VARCHAR}
</if>
<if test="'time'.toString() == column.value">
#{item.time,jdbcType=TIMESTAMP}
</if>
<if test="'value'.toString() == column.value">
#{item.value,jdbcType=VARCHAR}
</if>
<if test="'sendDate'.toString() == column.value">
#{item.senddate,jdbcType=TIMESTAMP}
</if>
</foreach>
)
</foreach>
</insert>
</mapper>

+ 60
- 0
src/main/java/com/topsail/influxdb/mapper/HistoryMapper.java View File

@ -0,0 +1,60 @@
package com.topsail.influxdb.mapper;
import com.topsail.influxdb.pojo.History;
import com.topsail.influxdb.pojo.HistoryExample;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
public interface HistoryMapper {
long countByExample(HistoryExample example);
int deleteByExample(HistoryExample example);
int deleteByPrimaryKey(Long id);
int insert(History record);
int insertSelective(History record);
List<History> selectByExampleWithBLOBs(HistoryExample example);
List<History> selectByExample(HistoryExample example);
History selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") History record, @Param("example") HistoryExample example);
int updateByExampleWithBLOBs(@Param("record") History record, @Param("example") HistoryExample example);
int updateByExample(@Param("record") History record, @Param("example") HistoryExample example);
int updateByPrimaryKeySelective(History record);
int updateByPrimaryKeyWithBLOBs(History record);
int updateByPrimaryKey(History record);
@Select("select * from (SELECT imei,count( 1 ) as num FROM history GROUP BY imei ORDER BY count( 1 ) DESC ) m where num>200")
List<Map<String,Object>> getBigImei();
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsert(@Param("list") List<History> list);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsertSelective(@Param("list") List<History> list, @Param("selective") History.Column ... selective);
}

+ 555
- 0
src/main/java/com/topsail/influxdb/mapper/HistoryMapper.xml View File

@ -0,0 +1,555 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.topsail.influxdb.mapper.HistoryMapper">
<resultMap id="BaseResultMap" type="com.topsail.influxdb.pojo.History">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="deviceType" jdbcType="INTEGER" property="devicetype" />
<result column="Imei" jdbcType="VARCHAR" property="imei" />
<result column="batteryLevel" jdbcType="INTEGER" property="batterylevel" />
<result column="singalStrength" jdbcType="INTEGER" property="singalstrength" />
<result column="sampleData" jdbcType="VARCHAR" property="sampledata" />
<result column="passNum" jdbcType="INTEGER" property="passnum" />
<result column="batteryState" jdbcType="INTEGER" property="batterystate" />
<result column="alarmType" jdbcType="VARCHAR" property="alarmtype" />
<result column="platformType" jdbcType="VARCHAR" property="platformtype" />
<result column="userName" jdbcType="VARCHAR" property="username" />
<result column="unit" jdbcType="VARCHAR" property="unit" />
<result column="sendTime" jdbcType="VARCHAR" property="sendtime" />
<result column="time" jdbcType="TIMESTAMP" property="time" />
<result column="value" jdbcType="VARCHAR" property="value" />
<result column="sendDate" jdbcType="TIMESTAMP" property="senddate" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.topsail.influxdb.pojo.History">
<result column="dataBody" jdbcType="LONGVARCHAR" property="databody" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, deviceType, Imei, batteryLevel, singalStrength, sampleData, passNum, batteryState,
alarmType, platformType, userName, unit, sendTime, time, value, sendDate
</sql>
<sql id="Blob_Column_List">
dataBody
</sql>
<select id="selectByExampleWithBLOBs" parameterType="com.topsail.influxdb.pojo.HistoryExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from history
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="com.topsail.influxdb.pojo.HistoryExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from history
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from history
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from history
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.topsail.influxdb.pojo.HistoryExample">
delete from history
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.topsail.influxdb.pojo.History">
insert into history (id, deviceType, Imei,
batteryLevel, singalStrength, sampleData,
passNum, batteryState, alarmType,
platformType, userName, unit,
sendTime, time, value,
sendDate, dataBody,devModel)
values (#{id,jdbcType=BIGINT}, #{devicetype,jdbcType=INTEGER}, #{imei,jdbcType=VARCHAR},
#{batterylevel,jdbcType=INTEGER}, #{singalstrength,jdbcType=INTEGER}, #{sampledata,jdbcType=VARCHAR},
#{passnum,jdbcType=INTEGER}, #{batterystate,jdbcType=INTEGER}, #{alarmtype,jdbcType=VARCHAR},
#{platformtype,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR},
#{sendtime,jdbcType=VARCHAR}, #{time,jdbcType=TIMESTAMP}, #{value,jdbcType=VARCHAR},
#{senddate,jdbcType=TIMESTAMP}, #{databody,jdbcType=LONGVARCHAR},#{devModel,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.topsail.influxdb.pojo.History">
insert into history
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="devicetype != null">
deviceType,
</if>
<if test="imei != null">
Imei,
</if>
<if test="batterylevel != null">
batteryLevel,
</if>
<if test="singalstrength != null">
singalStrength,
</if>
<if test="sampledata != null">
sampleData,
</if>
<if test="passnum != null">
passNum,
</if>
<if test="batterystate != null">
batteryState,
</if>
<if test="alarmtype != null">
alarmType,
</if>
<if test="platformtype != null">
platformType,
</if>
<if test="username != null">
userName,
</if>
<if test="unit != null">
unit,
</if>
<if test="sendtime != null">
sendTime,
</if>
<if test="time != null">
time,
</if>
<if test="value != null">
value,
</if>
<if test="senddate != null">
sendDate,
</if>
<if test="databody != null">
dataBody,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="devicetype != null">
#{devicetype,jdbcType=INTEGER},
</if>
<if test="imei != null">
#{imei,jdbcType=VARCHAR},
</if>
<if test="batterylevel != null">
#{batterylevel,jdbcType=INTEGER},
</if>
<if test="singalstrength != null">
#{singalstrength,jdbcType=INTEGER},
</if>
<if test="sampledata != null">
#{sampledata,jdbcType=VARCHAR},
</if>
<if test="passnum != null">
#{passnum,jdbcType=INTEGER},
</if>
<if test="batterystate != null">
#{batterystate,jdbcType=INTEGER},
</if>
<if test="alarmtype != null">
#{alarmtype,jdbcType=VARCHAR},
</if>
<if test="platformtype != null">
#{platformtype,jdbcType=VARCHAR},
</if>
<if test="username != null">
#{username,jdbcType=VARCHAR},
</if>
<if test="unit != null">
#{unit,jdbcType=VARCHAR},
</if>
<if test="sendtime != null">
#{sendtime,jdbcType=VARCHAR},
</if>
<if test="time != null">
#{time,jdbcType=TIMESTAMP},
</if>
<if test="value != null">
#{value,jdbcType=VARCHAR},
</if>
<if test="senddate != null">
#{senddate,jdbcType=TIMESTAMP},
</if>
<if test="databody != null">
#{databody,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.topsail.influxdb.pojo.HistoryExample" resultType="java.lang.Long">
select count(*) from history
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update history
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.devicetype != null">
deviceType = #{record.devicetype,jdbcType=INTEGER},
</if>
<if test="record.imei != null">
Imei = #{record.imei,jdbcType=VARCHAR},
</if>
<if test="record.batterylevel != null">
batteryLevel = #{record.batterylevel,jdbcType=INTEGER},
</if>
<if test="record.singalstrength != null">
singalStrength = #{record.singalstrength,jdbcType=INTEGER},
</if>
<if test="record.sampledata != null">
sampleData = #{record.sampledata,jdbcType=VARCHAR},
</if>
<if test="record.passnum != null">
passNum = #{record.passnum,jdbcType=INTEGER},
</if>
<if test="record.batterystate != null">
batteryState = #{record.batterystate,jdbcType=INTEGER},
</if>
<if test="record.alarmtype != null">
alarmType = #{record.alarmtype,jdbcType=VARCHAR},
</if>
<if test="record.platformtype != null">
platformType = #{record.platformtype,jdbcType=VARCHAR},
</if>
<if test="record.username != null">
userName = #{record.username,jdbcType=VARCHAR},
</if>
<if test="record.unit != null">
unit = #{record.unit,jdbcType=VARCHAR},
</if>
<if test="record.sendtime != null">
sendTime = #{record.sendtime,jdbcType=VARCHAR},
</if>
<if test="record.time != null">
time = #{record.time,jdbcType=TIMESTAMP},
</if>
<if test="record.value != null">
value = #{record.value,jdbcType=VARCHAR},
</if>
<if test="record.senddate != null">
sendDate = #{record.senddate,jdbcType=TIMESTAMP},
</if>
<if test="record.databody != null">
dataBody = #{record.databody,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
update history
set id = #{record.id,jdbcType=BIGINT},
deviceType = #{record.devicetype,jdbcType=INTEGER},
Imei = #{record.imei,jdbcType=VARCHAR},
batteryLevel = #{record.batterylevel,jdbcType=INTEGER},
singalStrength = #{record.singalstrength,jdbcType=INTEGER},
sampleData = #{record.sampledata,jdbcType=VARCHAR},
passNum = #{record.passnum,jdbcType=INTEGER},
batteryState = #{record.batterystate,jdbcType=INTEGER},
alarmType = #{record.alarmtype,jdbcType=VARCHAR},
platformType = #{record.platformtype,jdbcType=VARCHAR},
userName = #{record.username,jdbcType=VARCHAR},
unit = #{record.unit,jdbcType=VARCHAR},
sendTime = #{record.sendtime,jdbcType=VARCHAR},
time = #{record.time,jdbcType=TIMESTAMP},
value = #{record.value,jdbcType=VARCHAR},
sendDate = #{record.senddate,jdbcType=TIMESTAMP},
dataBody = #{record.databody,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update history
set id = #{record.id,jdbcType=BIGINT},
deviceType = #{record.devicetype,jdbcType=INTEGER},
Imei = #{record.imei,jdbcType=VARCHAR},
batteryLevel = #{record.batterylevel,jdbcType=INTEGER},
singalStrength = #{record.singalstrength,jdbcType=INTEGER},
sampleData = #{record.sampledata,jdbcType=VARCHAR},
passNum = #{record.passnum,jdbcType=INTEGER},
batteryState = #{record.batterystate,jdbcType=INTEGER},
alarmType = #{record.alarmtype,jdbcType=VARCHAR},
platformType = #{record.platformtype,jdbcType=VARCHAR},
userName = #{record.username,jdbcType=VARCHAR},
unit = #{record.unit,jdbcType=VARCHAR},
sendTime = #{record.sendtime,jdbcType=VARCHAR},
time = #{record.time,jdbcType=TIMESTAMP},
value = #{record.value,jdbcType=VARCHAR},
sendDate = #{record.senddate,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.topsail.influxdb.pojo.History">
update history
<set>
<if test="devicetype != null">
deviceType = #{devicetype,jdbcType=INTEGER},
</if>
<if test="imei != null">
Imei = #{imei,jdbcType=VARCHAR},
</if>
<if test="batterylevel != null">
batteryLevel = #{batterylevel,jdbcType=INTEGER},
</if>
<if test="singalstrength != null">
singalStrength = #{singalstrength,jdbcType=INTEGER},
</if>
<if test="sampledata != null">
sampleData = #{sampledata,jdbcType=VARCHAR},
</if>
<if test="passnum != null">
passNum = #{passnum,jdbcType=INTEGER},
</if>
<if test="batterystate != null">
batteryState = #{batterystate,jdbcType=INTEGER},
</if>
<if test="alarmtype != null">
alarmType = #{alarmtype,jdbcType=VARCHAR},
</if>
<if test="platformtype != null">
platformType = #{platformtype,jdbcType=VARCHAR},
</if>
<if test="username != null">
userName = #{username,jdbcType=VARCHAR},
</if>
<if test="unit != null">
unit = #{unit,jdbcType=VARCHAR},
</if>
<if test="sendtime != null">
sendTime = #{sendtime,jdbcType=VARCHAR},
</if>
<if test="time != null">
time = #{time,jdbcType=TIMESTAMP},
</if>
<if test="value != null">
value = #{value,jdbcType=VARCHAR},
</if>
<if test="senddate != null">
sendDate = #{senddate,jdbcType=TIMESTAMP},
</if>
<if test="databody != null">
dataBody = #{databody,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.topsail.influxdb.pojo.History">
update history
set deviceType = #{devicetype,jdbcType=INTEGER},
Imei = #{imei,jdbcType=VARCHAR},
batteryLevel = #{batterylevel,jdbcType=INTEGER},
singalStrength = #{singalstrength,jdbcType=INTEGER},
sampleData = #{sampledata,jdbcType=VARCHAR},
passNum = #{passnum,jdbcType=INTEGER},
batteryState = #{batterystate,jdbcType=INTEGER},
alarmType = #{alarmtype,jdbcType=VARCHAR},
platformType = #{platformtype,jdbcType=VARCHAR},
userName = #{username,jdbcType=VARCHAR},
unit = #{unit,jdbcType=VARCHAR},
sendTime = #{sendtime,jdbcType=VARCHAR},
time = #{time,jdbcType=TIMESTAMP},
value = #{value,jdbcType=VARCHAR},
sendDate = #{senddate,jdbcType=TIMESTAMP},
dataBody = #{databody,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.topsail.influxdb.pojo.History">
update history
set deviceType = #{devicetype,jdbcType=INTEGER},
Imei = #{imei,jdbcType=VARCHAR},
batteryLevel = #{batterylevel,jdbcType=INTEGER},
singalStrength = #{singalstrength,jdbcType=INTEGER},
sampleData = #{sampledata,jdbcType=VARCHAR},
passNum = #{passnum,jdbcType=INTEGER},
batteryState = #{batterystate,jdbcType=INTEGER},
alarmType = #{alarmtype,jdbcType=VARCHAR},
platformType = #{platformtype,jdbcType=VARCHAR},
userName = #{username,jdbcType=VARCHAR},
unit = #{unit,jdbcType=VARCHAR},
sendTime = #{sendtime,jdbcType=VARCHAR},
time = #{time,jdbcType=TIMESTAMP},
value = #{value,jdbcType=VARCHAR},
sendDate = #{senddate,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
<insert id="batchInsert" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into history
(id, deviceType, Imei, batteryLevel, singalStrength, sampleData, passNum, batteryState,
alarmType, platformType, userName, unit, sendTime, time, value, sendDate, dataBody
)
values
<foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=BIGINT}, #{item.devicetype,jdbcType=INTEGER}, #{item.imei,jdbcType=VARCHAR},
#{item.batterylevel,jdbcType=INTEGER}, #{item.singalstrength,jdbcType=INTEGER},
#{item.sampledata,jdbcType=VARCHAR}, #{item.passnum,jdbcType=INTEGER}, #{item.batterystate,jdbcType=INTEGER},
#{item.alarmtype,jdbcType=VARCHAR}, #{item.platformtype,jdbcType=VARCHAR}, #{item.username,jdbcType=VARCHAR},
#{item.unit,jdbcType=VARCHAR}, #{item.sendtime,jdbcType=VARCHAR}, #{item.time,jdbcType=TIMESTAMP},
#{item.value,jdbcType=VARCHAR}, #{item.senddate,jdbcType=TIMESTAMP}, #{item.databody,jdbcType=LONGVARCHAR}
)
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into history (
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
)
values
<foreach collection="list" item="item" separator=",">
(
<foreach collection="selective" item="column" separator=",">
<if test="'id'.toString() == column.value">
#{item.id,jdbcType=BIGINT}
</if>
<if test="'deviceType'.toString() == column.value">
#{item.devicetype,jdbcType=INTEGER}
</if>
<if test="'Imei'.toString() == column.value">
#{item.imei,jdbcType=VARCHAR}
</if>
<if test="'batteryLevel'.toString() == column.value">
#{item.batterylevel,jdbcType=INTEGER}
</if>
<if test="'singalStrength'.toString() == column.value">
#{item.singalstrength,jdbcType=INTEGER}
</if>
<if test="'sampleData'.toString() == column.value">
#{item.sampledata,jdbcType=VARCHAR}
</if>
<if test="'passNum'.toString() == column.value">
#{item.passnum,jdbcType=INTEGER}
</if>
<if test="'batteryState'.toString() == column.value">
#{item.batterystate,jdbcType=INTEGER}
</if>
<if test="'alarmType'.toString() == column.value">
#{item.alarmtype,jdbcType=VARCHAR}
</if>
<if test="'platformType'.toString() == column.value">
#{item.platformtype,jdbcType=VARCHAR}
</if>
<if test="'userName'.toString() == column.value">
#{item.username,jdbcType=VARCHAR}
</if>
<if test="'unit'.toString() == column.value">
#{item.unit,jdbcType=VARCHAR}
</if>
<if test="'sendTime'.toString() == column.value">
#{item.sendtime,jdbcType=VARCHAR}
</if>
<if test="'time'.toString() == column.value">
#{item.time,jdbcType=TIMESTAMP}
</if>
<if test="'value'.toString() == column.value">
#{item.value,jdbcType=VARCHAR}
</if>
<if test="'sendDate'.toString() == column.value">
#{item.senddate,jdbcType=TIMESTAMP}
</if>
<if test="'dataBody'.toString() == column.value">
#{item.databody,jdbcType=LONGVARCHAR}
</if>
</foreach>
)
</foreach>
</insert>
</mapper>

+ 72
- 0
src/main/java/com/topsail/influxdb/mapper/ImsiImeiMapper.java View File

@ -0,0 +1,72 @@
package com.topsail.influxdb.mapper;
import com.topsail.influxdb.pojo.ImsiImei;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
*
* imsi和imei关系表Dao
*
* @version
* <pre>
* Author Version Date Changes
* Administrator 1.0 2021年05月31日 Created
*
* </pre>
* @since 1.
*/
public interface ImsiImeiMapper {
/**
* imsi和imei关系表 新增
*
* @param imsiImei
* @return
*/
int saveImsiImei(@Param("imsiImei") ImsiImei imsiImei);
/**
* imsi和imei关系表 更新
*
* @param imsiImei
* @return
*/
int updateImsiImei(ImsiImei imsiImei);
/**
*imsi和imei关系表 删除
*
* @param id
* @return
*/
int deleteImsiImei(@Param("imsi") String id);
/**
* imsi和imei关系表 查询列表
*
* @param imsiImei
* @param start
* @param pageSize
* @return
*/
List<ImsiImei> pageListImsiImei(@Param("imsiImei") ImsiImei imsiImei, @Param("start") Integer start, @Param("pageSize") Integer pageSize);
/**
* imsi和imei关系表 count
*
* @param imsiImei
* @return
*/
Integer findCountImsiImei(@Param("imsiImei") ImsiImei imsiImei);
/**
* imsi和imei关系表 根据id查询
*
* @param imsi
* @return
*/
ImsiImei findImsiImei(String imsi);
}

+ 131
- 0
src/main/java/com/topsail/influxdb/mapper/ImsiImeiMapper.xml View File

@ -0,0 +1,131 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.topsail.influxdb.mapper.ImsiImeiMapper">
<resultMap id="imsiImeiMap" type="com.topsail.influxdb.pojo.ImsiImei">
<result column="imsi" jdbcType="VARCHAR" property="imsi" />
<result column="imei" jdbcType="VARCHAR" property="imei" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<!-- 基本列 -->
<sql id="imsiImeiColumn">
ii.imsi,
ii.imei,
ii.create_time,
ii.update_time
</sql>
<!-- 单个插入 -->
<insert id="saveImsiImei" parameterType="com.topsail.influxdb.pojo.ImsiImei" useGeneratedKeys="true" keyProperty="imsiImei.id">
insert into imsi_imei
<trim prefix="(" suffix=")" suffixOverrides=",">
imsi,
imei,
create_time
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{imsiImei.imsi,jdbcType=VARCHAR},
#{imsiImei.imei,jdbcType=VARCHAR},
now()
</trim>
ON DUPLICATE KEY UPDATE
imei = #{imsiImei.imei},
update_time = now();
</insert>
<!-- 批量新增 -->
<!-- 单个更新 -->
<update id="updateImsiImei" parameterType="com.topsail.influxdb.pojo.ImsiImei">
update imsi_imei
<set>
<if test="imsi != null">
imsi=#{imsi,jdbcType=VARCHAR},
</if>
<if test="imei != null">
imei=#{imei,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
update_time=#{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where imsi = #{imsi}
</update>
<!-- 批量更新 -->
<!-- 删除 -->
<delete id="deleteImsiImei" parameterType="java.lang.String">
delete from imsi_imei where imsi = #{imsi}
</delete>
<!-- 批量删除 -->
<!-- 分页查询 -->
<select id="pageListImsiImei" resultMap="imsiImeiMap">
SELECT
<include refid="imsiImeiColumn"/>
FROM imsi_imei as ii
<where>
<if test="imsiImei.imsi != null and imsiImei.imsi != ''">
AND ii.imsi=#{imsiImei.imsi,jdbcType=VARCHAR}
</if>
<if test="imsiImei.imei != null and imsiImei.imei != ''">
AND ii.imei=#{imsiImei.imei,jdbcType=VARCHAR}
</if>
<if test="imsiImei.createTime != null and imsiImei.createTime != ''">
AND ii.create_time=#{imsiImei.createTime,jdbcType=TIMESTAMP}
</if>
<if test="imsiImei.updateTime != null and imsiImei.updateTime != ''">
AND ii.update_time=#{imsiImei.updateTime,jdbcType=TIMESTAMP}
</if>
</where>
<choose>
<when test="start != null and pageSize != null">
order by ii.create_time desc
limit #{start},#{pageSize};
</when>
<otherwise>
order by ii.create_time desc
</otherwise>
</choose>
</select>
<!-- 单个查询 -->
<select id="findImsiImei" parameterType="java.lang.String" resultMap="imsiImeiMap">
SELECT
<include refid="imsiImeiColumn"/>
FROM imsi_imei as ii
where ii.imsi = #{imsi}
</select>
<!-- 查询count -->
<select id="findCountImsiImei" resultType="java.lang.Integer">
SELECT
count(*)
FROM imsi_imei as ii
<where>
<if test="imsiImei.imsi != null and imsiImei.imsi != ''">
AND ii.imsi=#{imsiImei.imsi,jdbcType=VARCHAR}
</if>
<if test="imsiImei.imei != null and imsiImei.imei != ''">
AND ii.imei=#{imsiImei.imei,jdbcType=VARCHAR}
</if>
<if test="imsiImei.createTime != null and imsiImei.createTime != ''">
AND ii.create_time=#{imsiImei.createTime,jdbcType=TIMESTAMP}
</if>
<if test="imsiImei.updateTime != null and imsiImei.updateTime != ''">
AND ii.update_time=#{imsiImei.updateTime,jdbcType=TIMESTAMP}
</if>
</where>
</select>
</mapper>

+ 40
- 0
src/main/java/com/topsail/influxdb/mapper/NbiotConfigMapper.java View File

@ -0,0 +1,40 @@
package com.topsail.influxdb.mapper;
import com.topsail.influxdb.pojo.NbiotConfig;
import com.topsail.influxdb.pojo.NbiotConfigExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface NbiotConfigMapper {
long countByExample(NbiotConfigExample example);
int deleteByExample(NbiotConfigExample example);
int insert(NbiotConfig record);
int insertSelective(NbiotConfig record);
List<NbiotConfig> selectByExample(NbiotConfigExample example);
int updateByExampleSelective(@Param("record") NbiotConfig record, @Param("example") NbiotConfigExample example);
int updateByExample(@Param("record") NbiotConfig record, @Param("example") NbiotConfigExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table nbiot_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsert(@Param("list") List<NbiotConfig> list);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table nbiot_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsertSelective(@Param("list") List<NbiotConfig> list, @Param("selective") NbiotConfig.Column ... selective);
}

+ 688
- 0
src/main/java/com/topsail/influxdb/mapper/NbiotConfigMapper.xml View File

@ -0,0 +1,688 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.topsail.influxdb.mapper.NbiotConfigMapper">
<resultMap id="BaseResultMap" type="com.topsail.influxdb.pojo.NbiotConfig">
<result column="id" jdbcType="BIGINT" property="id" />
<result column="imei" jdbcType="VARCHAR" property="imei" />
<result column="typeName" jdbcType="VARCHAR" property="typename" />
<result column="deviceType" jdbcType="INTEGER" property="devicetype" />
<result column="collectionGap" jdbcType="INTEGER" property="collectiongap" />
<result column="sendingGap" jdbcType="INTEGER" property="sendinggap" />
<result column="urlAddress" jdbcType="VARCHAR" property="urladdress" />
<result column="port" jdbcType="VARCHAR" property="port" />
<result column="unipathThresholdLimit" jdbcType="INTEGER" property="unipaththresholdlimit" />
<result column="unipathThresholdUpper" jdbcType="INTEGER" property="unipaththresholdupper" />
<result column="unipathChangeThreshold" jdbcType="INTEGER" property="unipathchangethreshold" />
<result column="multipleThresholdLimit" jdbcType="INTEGER" property="multiplethresholdlimit" />
<result column="multipleThresholdUpper" jdbcType="INTEGER" property="multiplethresholdupper" />
<result column="multipleChangeThreshold" jdbcType="INTEGER" property="multiplechangethreshold" />
<result column="controlValveState" jdbcType="INTEGER" property="controlvalvestate" />
<result column="startTime" jdbcType="VARCHAR" property="starttime" />
<result column="endTime" jdbcType="VARCHAR" property="endtime" />
<result column="numDays" jdbcType="INTEGER" property="numdays" />
<result column="switchingValue" jdbcType="INTEGER" property="switchingvalue" />
<result column="stopReporting" jdbcType="INTEGER" property="stopreporting" />
<result column="softwareVersions" jdbcType="VARCHAR" property="softwareversions" />
<result column="hardwareVersions" jdbcType="VARCHAR" property="hardwareversions" />
<result column="IMSI" jdbcType="VARCHAR" property="imsi" />
<result column="APN" jdbcType="VARCHAR" property="apn" />
<result column="time" jdbcType="TIMESTAMP" property="time" />
<result column="autoControlPolicy" jdbcType="VARCHAR" property="autocontrolpolicy" />
<result column="autoControlTime" jdbcType="VARCHAR" property="autocontroltime" />
<result column="selfCheckTime" jdbcType="VARCHAR" property="selfchecktime" />
<result column="collide" jdbcType="INTEGER" property="collide" />
<result column="lean" jdbcType="INTEGER" property="lean" />
<result column="lora_frequency" jdbcType="INTEGER" property="loraFrequency" />
<result column="lora_bandwidth" jdbcType="INTEGER" property="loraBandwidth" />
<result column="lora_spreading" jdbcType="INTEGER" property="loraSpreading" />
<result column="lora_encoding_rate" jdbcType="INTEGER" property="loraEncodingRate" />
<result column="netType" jdbcType="INTEGER" property="nettype" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, imei, typeName, deviceType, collectionGap, sendingGap, urlAddress, port, unipathThresholdLimit,
unipathThresholdUpper, unipathChangeThreshold, multipleThresholdLimit, multipleThresholdUpper,
multipleChangeThreshold, controlValveState, startTime, endTime, numDays, switchingValue,
stopReporting, softwareVersions, hardwareVersions, IMSI, APN, time, autoControlPolicy,
autoControlTime, selfCheckTime, collide, lean, lora_frequency, lora_bandwidth, lora_spreading,
lora_encoding_rate, netType
</sql>
<select id="selectByExample" parameterType="com.topsail.influxdb.pojo.NbiotConfigExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from nbiot_config
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<delete id="deleteByExample" parameterType="com.topsail.influxdb.pojo.NbiotConfigExample">
delete from nbiot_config
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.topsail.influxdb.pojo.NbiotConfig">
insert into nbiot_config (id, imei, typeName,
deviceType, collectionGap, sendingGap,
urlAddress, port, unipathThresholdLimit,
unipathThresholdUpper, unipathChangeThreshold,
multipleThresholdLimit, multipleThresholdUpper,
multipleChangeThreshold, controlValveState,
startTime, endTime, numDays,
switchingValue, stopReporting, softwareVersions,
hardwareVersions, IMSI, APN,
time, autoControlPolicy, autoControlTime,
selfCheckTime, collide, lean,
lora_frequency, lora_bandwidth, lora_spreading,
lora_encoding_rate, netType)
values (#{id,jdbcType=BIGINT}, #{imei,jdbcType=VARCHAR}, #{typename,jdbcType=VARCHAR},
#{devicetype,jdbcType=INTEGER}, #{collectiongap,jdbcType=INTEGER}, #{sendinggap,jdbcType=INTEGER},
#{urladdress,jdbcType=VARCHAR}, #{port,jdbcType=VARCHAR}, #{unipaththresholdlimit,jdbcType=INTEGER},
#{unipaththresholdupper,jdbcType=INTEGER}, #{unipathchangethreshold,jdbcType=INTEGER},
#{multiplethresholdlimit,jdbcType=INTEGER}, #{multiplethresholdupper,jdbcType=INTEGER},
#{multiplechangethreshold,jdbcType=INTEGER}, #{controlvalvestate,jdbcType=INTEGER},
#{starttime,jdbcType=VARCHAR}, #{endtime,jdbcType=VARCHAR}, #{numdays,jdbcType=INTEGER},
#{switchingvalue,jdbcType=INTEGER}, #{stopreporting,jdbcType=INTEGER}, #{softwareversions,jdbcType=VARCHAR},
#{hardwareversions,jdbcType=VARCHAR}, #{imsi,jdbcType=VARCHAR}, #{apn,jdbcType=VARCHAR},
#{time,jdbcType=TIMESTAMP}, #{autocontrolpolicy,jdbcType=VARCHAR}, #{autocontroltime,jdbcType=VARCHAR},
#{selfchecktime,jdbcType=VARCHAR}, #{collide,jdbcType=INTEGER}, #{lean,jdbcType=INTEGER},
#{loraFrequency,jdbcType=INTEGER}, #{loraBandwidth,jdbcType=INTEGER}, #{loraSpreading,jdbcType=INTEGER},
#{loraEncodingRate,jdbcType=INTEGER}, #{nettype,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.topsail.influxdb.pojo.NbiotConfig">
insert into nbiot_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="imei != null">
imei,
</if>
<if test="typename != null">
typeName,
</if>
<if test="devicetype != null">
deviceType,
</if>
<if test="collectiongap != null">
collectionGap,
</if>
<if test="sendinggap != null">
sendingGap,
</if>
<if test="urladdress != null">
urlAddress,
</if>
<if test="port != null">
port,
</if>
<if test="unipaththresholdlimit != null">
unipathThresholdLimit,
</if>
<if test="unipaththresholdupper != null">
unipathThresholdUpper,
</if>
<if test="unipathchangethreshold != null">
unipathChangeThreshold,
</if>
<if test="multiplethresholdlimit != null">
multipleThresholdLimit,
</if>
<if test="multiplethresholdupper != null">
multipleThresholdUpper,
</if>
<if test="multiplechangethreshold != null">
multipleChangeThreshold,
</if>
<if test="controlvalvestate != null">
controlValveState,
</if>
<if test="starttime != null">
startTime,
</if>
<if test="endtime != null">
endTime,
</if>
<if test="numdays != null">
numDays,
</if>
<if test="switchingvalue != null">
switchingValue,
</if>
<if test="stopreporting != null">
stopReporting,
</if>
<if test="softwareversions != null">
softwareVersions,
</if>
<if test="hardwareversions != null">
hardwareVersions,
</if>
<if test="imsi != null">
IMSI,
</if>
<if test="apn != null">
APN,
</if>
<if test="time != null">
time,
</if>
<if test="autocontrolpolicy != null">
autoControlPolicy,
</if>
<if test="autocontroltime != null">
autoControlTime,
</if>
<if test="selfchecktime != null">
selfCheckTime,
</if>
<if test="collide != null">
collide,
</if>
<if test="lean != null">
lean,
</if>
<if test="loraFrequency != null">
lora_frequency,
</if>
<if test="loraBandwidth != null">
lora_bandwidth,
</if>
<if test="loraSpreading != null">
lora_spreading,
</if>
<if test="loraEncodingRate != null">
lora_encoding_rate,
</if>
<if test="nettype != null">
netType,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="imei != null">
#{imei,jdbcType=VARCHAR},
</if>
<if test="typename != null">
#{typename,jdbcType=VARCHAR},
</if>
<if test="devicetype != null">
#{devicetype,jdbcType=INTEGER},
</if>
<if test="collectiongap != null">
#{collectiongap,jdbcType=INTEGER},
</if>
<if test="sendinggap != null">
#{sendinggap,jdbcType=INTEGER},
</if>
<if test="urladdress != null">
#{urladdress,jdbcType=VARCHAR},
</if>
<if test="port != null">
#{port,jdbcType=VARCHAR},
</if>
<if test="unipaththresholdlimit != null">
#{unipaththresholdlimit,jdbcType=INTEGER},
</if>
<if test="unipaththresholdupper != null">
#{unipaththresholdupper,jdbcType=INTEGER},
</if>
<if test="unipathchangethreshold != null">
#{unipathchangethreshold,jdbcType=INTEGER},
</if>
<if test="multiplethresholdlimit != null">
#{multiplethresholdlimit,jdbcType=INTEGER},
</if>
<if test="multiplethresholdupper != null">
#{multiplethresholdupper,jdbcType=INTEGER},
</if>
<if test="multiplechangethreshold != null">
#{multiplechangethreshold,jdbcType=INTEGER},
</if>
<if test="controlvalvestate != null">
#{controlvalvestate,jdbcType=INTEGER},
</if>
<if test="starttime != null">
#{starttime,jdbcType=VARCHAR},
</if>
<if test="endtime != null">
#{endtime,jdbcType=VARCHAR},
</if>
<if test="numdays != null">
#{numdays,jdbcType=INTEGER},
</if>
<if test="switchingvalue != null">
#{switchingvalue,jdbcType=INTEGER},
</if>
<if test="stopreporting != null">
#{stopreporting,jdbcType=INTEGER},
</if>
<if test="softwareversions != null">
#{softwareversions,jdbcType=VARCHAR},
</if>
<if test="hardwareversions != null">
#{hardwareversions,jdbcType=VARCHAR},
</if>
<if test="imsi != null">
#{imsi,jdbcType=VARCHAR},
</if>
<if test="apn != null">
#{apn,jdbcType=VARCHAR},
</if>
<if test="time != null">
#{time,jdbcType=TIMESTAMP},
</if>
<if test="autocontrolpolicy != null">
#{autocontrolpolicy,jdbcType=VARCHAR},
</if>
<if test="autocontroltime != null">
#{autocontroltime,jdbcType=VARCHAR},
</if>
<if test="selfchecktime != null">
#{selfchecktime,jdbcType=VARCHAR},
</if>
<if test="collide != null">
#{collide,jdbcType=INTEGER},
</if>
<if test="lean != null">
#{lean,jdbcType=INTEGER},
</if>
<if test="loraFrequency != null">
#{loraFrequency,jdbcType=INTEGER},
</if>
<if test="loraBandwidth != null">
#{loraBandwidth,jdbcType=INTEGER},
</if>
<if test="loraSpreading != null">
#{loraSpreading,jdbcType=INTEGER},
</if>
<if test="loraEncodingRate != null">
#{loraEncodingRate,jdbcType=INTEGER},
</if>
<if test="nettype != null">
#{nettype,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.topsail.influxdb.pojo.NbiotConfigExample" resultType="java.lang.Long">
select count(*) from nbiot_config
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update nbiot_config
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.imei != null">
imei = #{record.imei,jdbcType=VARCHAR},
</if>
<if test="record.typename != null">
typeName = #{record.typename,jdbcType=VARCHAR},
</if>
<if test="record.devicetype != null">
deviceType = #{record.devicetype,jdbcType=INTEGER},
</if>
<if test="record.collectiongap != null">
collectionGap = #{record.collectiongap,jdbcType=INTEGER},
</if>
<if test="record.sendinggap != null">
sendingGap = #{record.sendinggap,jdbcType=INTEGER},
</if>
<if test="record.urladdress != null">
urlAddress = #{record.urladdress,jdbcType=VARCHAR},
</if>
<if test="record.port != null">
port = #{record.port,jdbcType=VARCHAR},
</if>
<if test="record.unipaththresholdlimit != null">
unipathThresholdLimit = #{record.unipaththresholdlimit,jdbcType=INTEGER},
</if>
<if test="record.unipaththresholdupper != null">
unipathThresholdUpper = #{record.unipaththresholdupper,jdbcType=INTEGER},
</if>
<if test="record.unipathchangethreshold != null">
unipathChangeThreshold = #{record.unipathchangethreshold,jdbcType=INTEGER},
</if>
<if test="record.multiplethresholdlimit != null">
multipleThresholdLimit = #{record.multiplethresholdlimit,jdbcType=INTEGER},
</if>
<if test="record.multiplethresholdupper != null">
multipleThresholdUpper = #{record.multiplethresholdupper,jdbcType=INTEGER},
</if>
<if test="record.multiplechangethreshold != null">
multipleChangeThreshold = #{record.multiplechangethreshold,jdbcType=INTEGER},
</if>
<if test="record.controlvalvestate != null">
controlValveState = #{record.controlvalvestate,jdbcType=INTEGER},
</if>
<if test="record.starttime != null">
startTime = #{record.starttime,jdbcType=VARCHAR},
</if>
<if test="record.endtime != null">
endTime = #{record.endtime,jdbcType=VARCHAR},
</if>
<if test="record.numdays != null">
numDays = #{record.numdays,jdbcType=INTEGER},
</if>
<if test="record.switchingvalue != null">
switchingValue = #{record.switchingvalue,jdbcType=INTEGER},
</if>
<if test="record.stopreporting != null">
stopReporting = #{record.stopreporting,jdbcType=INTEGER},
</if>
<if test="record.softwareversions != null">
softwareVersions = #{record.softwareversions,jdbcType=VARCHAR},
</if>
<if test="record.hardwareversions != null">
hardwareVersions = #{record.hardwareversions,jdbcType=VARCHAR},
</if>
<if test="record.imsi != null">
IMSI = #{record.imsi,jdbcType=VARCHAR},
</if>
<if test="record.apn != null">
APN = #{record.apn,jdbcType=VARCHAR},
</if>
<if test="record.time != null">
time = #{record.time,jdbcType=TIMESTAMP},
</if>
<if test="record.autocontrolpolicy != null">
autoControlPolicy = #{record.autocontrolpolicy,jdbcType=VARCHAR},
</if>
<if test="record.autocontroltime != null">
autoControlTime = #{record.autocontroltime,jdbcType=VARCHAR},
</if>
<if test="record.selfchecktime != null">
selfCheckTime = #{record.selfchecktime,jdbcType=VARCHAR},
</if>
<if test="record.collide != null">
collide = #{record.collide,jdbcType=INTEGER},
</if>
<if test="record.lean != null">
lean = #{record.lean,jdbcType=INTEGER},
</if>
<if test="record.loraFrequency != null">
lora_frequency = #{record.loraFrequency,jdbcType=INTEGER},
</if>
<if test="record.loraBandwidth != null">
lora_bandwidth = #{record.loraBandwidth,jdbcType=INTEGER},
</if>
<if test="record.loraSpreading != null">
lora_spreading = #{record.loraSpreading,jdbcType=INTEGER},
</if>
<if test="record.loraEncodingRate != null">
lora_encoding_rate = #{record.loraEncodingRate,jdbcType=INTEGER},
</if>
<if test="record.nettype != null">
netType = #{record.nettype,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update nbiot_config
set id = #{record.id,jdbcType=BIGINT},
imei = #{record.imei,jdbcType=VARCHAR},
typeName = #{record.typename,jdbcType=VARCHAR},
deviceType = #{record.devicetype,jdbcType=INTEGER},
collectionGap = #{record.collectiongap,jdbcType=INTEGER},
sendingGap = #{record.sendinggap,jdbcType=INTEGER},
urlAddress = #{record.urladdress,jdbcType=VARCHAR},
port = #{record.port,jdbcType=VARCHAR},
unipathThresholdLimit = #{record.unipaththresholdlimit,jdbcType=INTEGER},
unipathThresholdUpper = #{record.unipaththresholdupper,jdbcType=INTEGER},
unipathChangeThreshold = #{record.unipathchangethreshold,jdbcType=INTEGER},
multipleThresholdLimit = #{record.multiplethresholdlimit,jdbcType=INTEGER},
multipleThresholdUpper = #{record.multiplethresholdupper,jdbcType=INTEGER},
multipleChangeThreshold = #{record.multiplechangethreshold,jdbcType=INTEGER},
controlValveState = #{record.controlvalvestate,jdbcType=INTEGER},
startTime = #{record.starttime,jdbcType=VARCHAR},
endTime = #{record.endtime,jdbcType=VARCHAR},
numDays = #{record.numdays,jdbcType=INTEGER},
switchingValue = #{record.switchingvalue,jdbcType=INTEGER},
stopReporting = #{record.stopreporting,jdbcType=INTEGER},
softwareVersions = #{record.softwareversions,jdbcType=VARCHAR},
hardwareVersions = #{record.hardwareversions,jdbcType=VARCHAR},
IMSI = #{record.imsi,jdbcType=VARCHAR},
APN = #{record.apn,jdbcType=VARCHAR},
time = #{record.time,jdbcType=TIMESTAMP},
autoControlPolicy = #{record.autocontrolpolicy,jdbcType=VARCHAR},
autoControlTime = #{record.autocontroltime,jdbcType=VARCHAR},
selfCheckTime = #{record.selfchecktime,jdbcType=VARCHAR},
collide = #{record.collide,jdbcType=INTEGER},
lean = #{record.lean,jdbcType=INTEGER},
lora_frequency = #{record.loraFrequency,jdbcType=INTEGER},
lora_bandwidth = #{record.loraBandwidth,jdbcType=INTEGER},
lora_spreading = #{record.loraSpreading,jdbcType=INTEGER},
lora_encoding_rate = #{record.loraEncodingRate,jdbcType=INTEGER},
netType = #{record.nettype,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<insert id="batchInsert" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into nbiot_config
(id, imei, typeName, deviceType, collectionGap, sendingGap, urlAddress, port, unipathThresholdLimit,
unipathThresholdUpper, unipathChangeThreshold, multipleThresholdLimit, multipleThresholdUpper,
multipleChangeThreshold, controlValveState, startTime, endTime, numDays, switchingValue,
stopReporting, softwareVersions, hardwareVersions, IMSI, APN, time, autoControlPolicy,
autoControlTime, selfCheckTime, collide, lean, lora_frequency, lora_bandwidth,
lora_spreading, lora_encoding_rate, netType)
values
<foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=BIGINT}, #{item.imei,jdbcType=VARCHAR}, #{item.typename,jdbcType=VARCHAR},
#{item.devicetype,jdbcType=INTEGER}, #{item.collectiongap,jdbcType=INTEGER}, #{item.sendinggap,jdbcType=INTEGER},
#{item.urladdress,jdbcType=VARCHAR}, #{item.port,jdbcType=VARCHAR}, #{item.unipaththresholdlimit,jdbcType=INTEGER},
#{item.unipaththresholdupper,jdbcType=INTEGER}, #{item.unipathchangethreshold,jdbcType=INTEGER},
#{item.multiplethresholdlimit,jdbcType=INTEGER}, #{item.multiplethresholdupper,jdbcType=INTEGER},
#{item.multiplechangethreshold,jdbcType=INTEGER}, #{item.controlvalvestate,jdbcType=INTEGER},
#{item.starttime,jdbcType=VARCHAR}, #{item.endtime,jdbcType=VARCHAR}, #{item.numdays,jdbcType=INTEGER},
#{item.switchingvalue,jdbcType=INTEGER}, #{item.stopreporting,jdbcType=INTEGER},
#{item.softwareversions,jdbcType=VARCHAR}, #{item.hardwareversions,jdbcType=VARCHAR},
#{item.imsi,jdbcType=VARCHAR}, #{item.apn,jdbcType=VARCHAR}, #{item.time,jdbcType=TIMESTAMP},
#{item.autocontrolpolicy,jdbcType=VARCHAR}, #{item.autocontroltime,jdbcType=VARCHAR},
#{item.selfchecktime,jdbcType=VARCHAR}, #{item.collide,jdbcType=INTEGER}, #{item.lean,jdbcType=INTEGER},
#{item.loraFrequency,jdbcType=INTEGER}, #{item.loraBandwidth,jdbcType=INTEGER},
#{item.loraSpreading,jdbcType=INTEGER}, #{item.loraEncodingRate,jdbcType=INTEGER},
#{item.nettype,jdbcType=INTEGER})
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into nbiot_config (
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
)
values
<foreach collection="list" item="item" separator=",">
(
<foreach collection="selective" item="column" separator=",">
<if test="'id'.toString() == column.value">
#{item.id,jdbcType=BIGINT}
</if>
<if test="'imei'.toString() == column.value">
#{item.imei,jdbcType=VARCHAR}
</if>
<if test="'typeName'.toString() == column.value">
#{item.typename,jdbcType=VARCHAR}
</if>
<if test="'deviceType'.toString() == column.value">
#{item.devicetype,jdbcType=INTEGER}
</if>
<if test="'collectionGap'.toString() == column.value">
#{item.collectiongap,jdbcType=INTEGER}
</if>
<if test="'sendingGap'.toString() == column.value">
#{item.sendinggap,jdbcType=INTEGER}
</if>
<if test="'urlAddress'.toString() == column.value">
#{item.urladdress,jdbcType=VARCHAR}
</if>
<if test="'port'.toString() == column.value">
#{item.port,jdbcType=VARCHAR}
</if>
<if test="'unipathThresholdLimit'.toString() == column.value">
#{item.unipaththresholdlimit,jdbcType=INTEGER}
</if>
<if test="'unipathThresholdUpper'.toString() == column.value">
#{item.unipaththresholdupper,jdbcType=INTEGER}
</if>
<if test="'unipathChangeThreshold'.toString() == column.value">
#{item.unipathchangethreshold,jdbcType=INTEGER}
</if>
<if test="'multipleThresholdLimit'.toString() == column.value">
#{item.multiplethresholdlimit,jdbcType=INTEGER}
</if>
<if test="'multipleThresholdUpper'.toString() == column.value">
#{item.multiplethresholdupper,jdbcType=INTEGER}
</if>
<if test="'multipleChangeThreshold'.toString() == column.value">
#{item.multiplechangethreshold,jdbcType=INTEGER}
</if>
<if test="'controlValveState'.toString() == column.value">
#{item.controlvalvestate,jdbcType=INTEGER}
</if>
<if test="'startTime'.toString() == column.value">
#{item.starttime,jdbcType=VARCHAR}
</if>
<if test="'endTime'.toString() == column.value">
#{item.endtime,jdbcType=VARCHAR}
</if>
<if test="'numDays'.toString() == column.value">
#{item.numdays,jdbcType=INTEGER}
</if>
<if test="'switchingValue'.toString() == column.value">
#{item.switchingvalue,jdbcType=INTEGER}
</if>
<if test="'stopReporting'.toString() == column.value">
#{item.stopreporting,jdbcType=INTEGER}
</if>
<if test="'softwareVersions'.toString() == column.value">
#{item.softwareversions,jdbcType=VARCHAR}
</if>
<if test="'hardwareVersions'.toString() == column.value">
#{item.hardwareversions,jdbcType=VARCHAR}
</if>
<if test="'IMSI'.toString() == column.value">
#{item.imsi,jdbcType=VARCHAR}
</if>
<if test="'APN'.toString() == column.value">
#{item.apn,jdbcType=VARCHAR}
</if>
<if test="'time'.toString() == column.value">
#{item.time,jdbcType=TIMESTAMP}
</if>
<if test="'autoControlPolicy'.toString() == column.value">
#{item.autocontrolpolicy,jdbcType=VARCHAR}
</if>
<if test="'autoControlTime'.toString() == column.value">
#{item.autocontroltime,jdbcType=VARCHAR}
</if>
<if test="'selfCheckTime'.toString() == column.value">
#{item.selfchecktime,jdbcType=VARCHAR}
</if>
<if test="'collide'.toString() == column.value">
#{item.collide,jdbcType=INTEGER}
</if>
<if test="'lean'.toString() == column.value">
#{item.lean,jdbcType=INTEGER}
</if>
<if test="'lora_frequency'.toString() == column.value">
#{item.loraFrequency,jdbcType=INTEGER}
</if>
<if test="'lora_bandwidth'.toString() == column.value">
#{item.loraBandwidth,jdbcType=INTEGER}
</if>
<if test="'lora_spreading'.toString() == column.value">
#{item.loraSpreading,jdbcType=INTEGER}
</if>
<if test="'lora_encoding_rate'.toString() == column.value">
#{item.loraEncodingRate,jdbcType=INTEGER}
</if>
<if test="'netType'.toString() == column.value">
#{item.nettype,jdbcType=INTEGER}
</if>
</foreach>
)
</foreach>
</insert>
</mapper>

+ 40
- 0
src/main/java/com/topsail/influxdb/mapper/OcCompanyMapper.java View File

@ -0,0 +1,40 @@
package com.topsail.influxdb.mapper;
import com.topsail.influxdb.pojo.OcCompany;
import com.topsail.influxdb.pojo.OcCompanyExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface OcCompanyMapper {
long countByExample(OcCompanyExample example);
int deleteByExample(OcCompanyExample example);
int insert(OcCompany record);
int insertSelective(OcCompany record);
List<OcCompany> selectByExample(OcCompanyExample example);
int updateByExampleSelective(@Param("record") OcCompany record, @Param("example") OcCompanyExample example);
int updateByExample(@Param("record") OcCompany record, @Param("example") OcCompanyExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table oc_company
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsert(@Param("list") List<OcCompany> list);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table oc_company
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsertSelective(@Param("list") List<OcCompany> list, @Param("selective") OcCompany.Column ... selective);
}

+ 285
- 0
src/main/java/com/topsail/influxdb/mapper/OcCompanyMapper.xml View File

@ -0,0 +1,285 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.topsail.influxdb.mapper.OcCompanyMapper">
<resultMap id="BaseResultMap" type="com.topsail.influxdb.pojo.OcCompany">
<result column="id" jdbcType="INTEGER" property="id" />
<result column="username" jdbcType="VARCHAR" property="username" />
<result column="userip" jdbcType="VARCHAR" property="userip" />
<result column="userport" jdbcType="INTEGER" property="userport" />
<result column="userprot" jdbcType="VARCHAR" property="userprot" />
<result column="period" jdbcType="VARCHAR" property="period" />
<result column="phoneNum" jdbcType="VARCHAR" property="phonenum" />
<result column="cid" jdbcType="INTEGER" property="cid" />
<result column="cperiod" jdbcType="VARCHAR" property="cperiod" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, username, userip, userport, userprot, period, phoneNum, cid, cperiod
</sql>
<select id="selectByExample" parameterType="com.topsail.influxdb.pojo.OcCompanyExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from oc_company
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<delete id="deleteByExample" parameterType="com.topsail.influxdb.pojo.OcCompanyExample">
delete from oc_company
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.topsail.influxdb.pojo.OcCompany">
insert into oc_company (id, username, userip,
userport, userprot, period,
phoneNum, cid, cperiod
)
values (#{id,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, #{userip,jdbcType=VARCHAR},
#{userport,jdbcType=INTEGER}, #{userprot,jdbcType=VARCHAR}, #{period,jdbcType=VARCHAR},
#{phonenum,jdbcType=VARCHAR}, #{cid,jdbcType=INTEGER}, #{cperiod,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.topsail.influxdb.pojo.OcCompany">
insert into oc_company
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="username != null">
username,
</if>
<if test="userip != null">
userip,
</if>
<if test="userport != null">
userport,
</if>
<if test="userprot != null">
userprot,
</if>
<if test="period != null">
period,
</if>
<if test="phonenum != null">
phoneNum,
</if>
<if test="cid != null">
cid,
</if>
<if test="cperiod != null">
cperiod,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="username != null">
#{username,jdbcType=VARCHAR},
</if>
<if test="userip != null">
#{userip,jdbcType=VARCHAR},
</if>
<if test="userport != null">
#{userport,jdbcType=INTEGER},
</if>
<if test="userprot != null">
#{userprot,jdbcType=VARCHAR},
</if>
<if test="period != null">
#{period,jdbcType=VARCHAR},
</if>
<if test="phonenum != null">
#{phonenum,jdbcType=VARCHAR},
</if>
<if test="cid != null">
#{cid,jdbcType=INTEGER},
</if>
<if test="cperiod != null">
#{cperiod,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.topsail.influxdb.pojo.OcCompanyExample" resultType="java.lang.Long">
select count(*) from oc_company
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update oc_company
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.username != null">
username = #{record.username,jdbcType=VARCHAR},
</if>
<if test="record.userip != null">
userip = #{record.userip,jdbcType=VARCHAR},
</if>
<if test="record.userport != null">
userport = #{record.userport,jdbcType=INTEGER},
</if>
<if test="record.userprot != null">
userprot = #{record.userprot,jdbcType=VARCHAR},
</if>
<if test="record.period != null">
period = #{record.period,jdbcType=VARCHAR},
</if>
<if test="record.phonenum != null">
phoneNum = #{record.phonenum,jdbcType=VARCHAR},
</if>
<if test="record.cid != null">
cid = #{record.cid,jdbcType=INTEGER},
</if>
<if test="record.cperiod != null">
cperiod = #{record.cperiod,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update oc_company
set id = #{record.id,jdbcType=INTEGER},
username = #{record.username,jdbcType=VARCHAR},
userip = #{record.userip,jdbcType=VARCHAR},
userport = #{record.userport,jdbcType=INTEGER},
userprot = #{record.userprot,jdbcType=VARCHAR},
period = #{record.period,jdbcType=VARCHAR},
phoneNum = #{record.phonenum,jdbcType=VARCHAR},
cid = #{record.cid,jdbcType=INTEGER},
cperiod = #{record.cperiod,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<insert id="batchInsert" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into oc_company
(id, username, userip, userport, userprot, period, phoneNum, cid, cperiod)
values
<foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=INTEGER}, #{item.username,jdbcType=VARCHAR}, #{item.userip,jdbcType=VARCHAR},
#{item.userport,jdbcType=INTEGER}, #{item.userprot,jdbcType=VARCHAR}, #{item.period,jdbcType=VARCHAR},
#{item.phonenum,jdbcType=VARCHAR}, #{item.cid,jdbcType=INTEGER}, #{item.cperiod,jdbcType=VARCHAR}
)
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into oc_company (
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
)
values
<foreach collection="list" item="item" separator=",">
(
<foreach collection="selective" item="column" separator=",">
<if test="'id'.toString() == column.value">
#{item.id,jdbcType=INTEGER}
</if>
<if test="'username'.toString() == column.value">
#{item.username,jdbcType=VARCHAR}
</if>
<if test="'userip'.toString() == column.value">
#{item.userip,jdbcType=VARCHAR}
</if>
<if test="'userport'.toString() == column.value">
#{item.userport,jdbcType=INTEGER}
</if>
<if test="'userprot'.toString() == column.value">
#{item.userprot,jdbcType=VARCHAR}
</if>
<if test="'period'.toString() == column.value">
#{item.period,jdbcType=VARCHAR}
</if>
<if test="'phoneNum'.toString() == column.value">
#{item.phonenum,jdbcType=VARCHAR}
</if>
<if test="'cid'.toString() == column.value">
#{item.cid,jdbcType=INTEGER}
</if>
<if test="'cperiod'.toString() == column.value">
#{item.cperiod,jdbcType=VARCHAR}
</if>
</foreach>
)
</foreach>
</insert>
</mapper>

+ 40
- 0
src/main/java/com/topsail/influxdb/mapper/OcConfigMapper.java View File

@ -0,0 +1,40 @@
package com.topsail.influxdb.mapper;
import com.topsail.influxdb.pojo.OcConfig;
import com.topsail.influxdb.pojo.OcConfigExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface OcConfigMapper {
long countByExample(OcConfigExample example);
int deleteByExample(OcConfigExample example);
int insert(OcConfig record);
int insertSelective(OcConfig record);
List<OcConfig> selectByExample(OcConfigExample example);
int updateByExampleSelective(@Param("record") OcConfig record, @Param("example") OcConfigExample example);
int updateByExample(@Param("record") OcConfig record, @Param("example") OcConfigExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table oc_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsert(@Param("list") List<OcConfig> list);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table oc_config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsertSelective(@Param("list") List<OcConfig> list, @Param("selective") OcConfig.Column ... selective);
}

+ 688
- 0
src/main/java/com/topsail/influxdb/mapper/OcConfigMapper.xml View File

@ -0,0 +1,688 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.topsail.influxdb.mapper.OcConfigMapper">
<resultMap id="BaseResultMap" type="com.topsail.influxdb.pojo.OcConfig">
<result column="id" jdbcType="BIGINT" property="id" />
<result column="imei" jdbcType="VARCHAR" property="imei" />
<result column="typeName" jdbcType="VARCHAR" property="typename" />
<result column="deviceType" jdbcType="INTEGER" property="devicetype" />
<result column="collectionGap" jdbcType="INTEGER" property="collectiongap" />
<result column="sendingGap" jdbcType="INTEGER" property="sendinggap" />
<result column="urlAddress" jdbcType="VARCHAR" property="urladdress" />
<result column="port" jdbcType="VARCHAR" property="port" />
<result column="unipathThresholdLimit" jdbcType="INTEGER" property="unipaththresholdlimit" />
<result column="unipathThresholdUpper" jdbcType="INTEGER" property="unipaththresholdupper" />
<result column="unipathChangeThreshold" jdbcType="INTEGER" property="unipathchangethreshold" />
<result column="multipleThresholdLimit" jdbcType="INTEGER" property="multiplethresholdlimit" />
<result column="multipleThresholdUpper" jdbcType="INTEGER" property="multiplethresholdupper" />
<result column="multipleChangeThreshold" jdbcType="INTEGER" property="multiplechangethreshold" />
<result column="controlValveState" jdbcType="INTEGER" property="controlvalvestate" />
<result column="startTime" jdbcType="VARCHAR" property="starttime" />
<result column="endTime" jdbcType="VARCHAR" property="endtime" />
<result column="numDays" jdbcType="INTEGER" property="numdays" />
<result column="switchingValue" jdbcType="INTEGER" property="switchingvalue" />
<result column="stopReporting" jdbcType="INTEGER" property="stopreporting" />
<result column="softwareVersions" jdbcType="VARCHAR" property="softwareversions" />
<result column="hardwareVersions" jdbcType="VARCHAR" property="hardwareversions" />
<result column="IMSI" jdbcType="VARCHAR" property="imsi" />
<result column="APN" jdbcType="VARCHAR" property="apn" />
<result column="time" jdbcType="TIMESTAMP" property="time" />
<result column="autoControlPolicy" jdbcType="VARCHAR" property="autocontrolpolicy" />
<result column="autoControlTime" jdbcType="VARCHAR" property="autocontroltime" />
<result column="selfCheckTime" jdbcType="VARCHAR" property="selfchecktime" />
<result column="collide" jdbcType="INTEGER" property="collide" />
<result column="lean" jdbcType="INTEGER" property="lean" />
<result column="lora_frequency" jdbcType="INTEGER" property="loraFrequency" />
<result column="lora_bandwidth" jdbcType="INTEGER" property="loraBandwidth" />
<result column="lora_spreading" jdbcType="INTEGER" property="loraSpreading" />
<result column="lora_encoding_rate" jdbcType="INTEGER" property="loraEncodingRate" />
<result column="cimei" jdbcType="VARCHAR" property="cimei" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, imei, typeName, deviceType, collectionGap, sendingGap, urlAddress, port, unipathThresholdLimit,
unipathThresholdUpper, unipathChangeThreshold, multipleThresholdLimit, multipleThresholdUpper,
multipleChangeThreshold, controlValveState, startTime, endTime, numDays, switchingValue,
stopReporting, softwareVersions, hardwareVersions, IMSI, APN, time, autoControlPolicy,
autoControlTime, selfCheckTime, collide, lean, lora_frequency, lora_bandwidth, lora_spreading,
lora_encoding_rate, cimei
</sql>
<select id="selectByExample" parameterType="com.topsail.influxdb.pojo.OcConfigExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from oc_config
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<delete id="deleteByExample" parameterType="com.topsail.influxdb.pojo.OcConfigExample">
delete from oc_config
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.topsail.influxdb.pojo.OcConfig">
insert into oc_config (id, imei, typeName,
deviceType, collectionGap, sendingGap,
urlAddress, port, unipathThresholdLimit,
unipathThresholdUpper, unipathChangeThreshold,
multipleThresholdLimit, multipleThresholdUpper,
multipleChangeThreshold, controlValveState,
startTime, endTime, numDays,
switchingValue, stopReporting, softwareVersions,
hardwareVersions, IMSI, APN,
time, autoControlPolicy, autoControlTime,
selfCheckTime, collide, lean,
lora_frequency, lora_bandwidth, lora_spreading,
lora_encoding_rate, cimei)
values (#{id,jdbcType=BIGINT}, #{imei,jdbcType=VARCHAR}, #{typename,jdbcType=VARCHAR},
#{devicetype,jdbcType=INTEGER}, #{collectiongap,jdbcType=INTEGER}, #{sendinggap,jdbcType=INTEGER},
#{urladdress,jdbcType=VARCHAR}, #{port,jdbcType=VARCHAR}, #{unipaththresholdlimit,jdbcType=INTEGER},
#{unipaththresholdupper,jdbcType=INTEGER}, #{unipathchangethreshold,jdbcType=INTEGER},
#{multiplethresholdlimit,jdbcType=INTEGER}, #{multiplethresholdupper,jdbcType=INTEGER},
#{multiplechangethreshold,jdbcType=INTEGER}, #{controlvalvestate,jdbcType=INTEGER},
#{starttime,jdbcType=VARCHAR}, #{endtime,jdbcType=VARCHAR}, #{numdays,jdbcType=INTEGER},
#{switchingvalue,jdbcType=INTEGER}, #{stopreporting,jdbcType=INTEGER}, #{softwareversions,jdbcType=VARCHAR},
#{hardwareversions,jdbcType=VARCHAR}, #{imsi,jdbcType=VARCHAR}, #{apn,jdbcType=VARCHAR},
#{time,jdbcType=TIMESTAMP}, #{autocontrolpolicy,jdbcType=VARCHAR}, #{autocontroltime,jdbcType=VARCHAR},
#{selfchecktime,jdbcType=VARCHAR}, #{collide,jdbcType=INTEGER}, #{lean,jdbcType=INTEGER},
#{loraFrequency,jdbcType=INTEGER}, #{loraBandwidth,jdbcType=INTEGER}, #{loraSpreading,jdbcType=INTEGER},
#{loraEncodingRate,jdbcType=INTEGER}, #{cimei,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.topsail.influxdb.pojo.OcConfig">
insert into oc_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="imei != null">
imei,
</if>
<if test="typename != null">
typeName,
</if>
<if test="devicetype != null">
deviceType,
</if>
<if test="collectiongap != null">
collectionGap,
</if>
<if test="sendinggap != null">
sendingGap,
</if>
<if test="urladdress != null">
urlAddress,
</if>
<if test="port != null">
port,
</if>
<if test="unipaththresholdlimit != null">
unipathThresholdLimit,
</if>
<if test="unipaththresholdupper != null">
unipathThresholdUpper,
</if>
<if test="unipathchangethreshold != null">
unipathChangeThreshold,
</if>
<if test="multiplethresholdlimit != null">
multipleThresholdLimit,
</if>
<if test="multiplethresholdupper != null">
multipleThresholdUpper,
</if>
<if test="multiplechangethreshold != null">
multipleChangeThreshold,
</if>
<if test="controlvalvestate != null">
controlValveState,
</if>
<if test="starttime != null">
startTime,
</if>
<if test="endtime != null">
endTime,
</if>
<if test="numdays != null">
numDays,
</if>
<if test="switchingvalue != null">
switchingValue,
</if>
<if test="stopreporting != null">
stopReporting,
</if>
<if test="softwareversions != null">
softwareVersions,
</if>
<if test="hardwareversions != null">
hardwareVersions,
</if>
<if test="imsi != null">
IMSI,
</if>
<if test="apn != null">
APN,
</if>
<if test="time != null">
time,
</if>
<if test="autocontrolpolicy != null">
autoControlPolicy,
</if>
<if test="autocontroltime != null">
autoControlTime,
</if>
<if test="selfchecktime != null">
selfCheckTime,
</if>
<if test="collide != null">
collide,
</if>
<if test="lean != null">
lean,
</if>
<if test="loraFrequency != null">
lora_frequency,
</if>
<if test="loraBandwidth != null">
lora_bandwidth,
</if>
<if test="loraSpreading != null">
lora_spreading,
</if>
<if test="loraEncodingRate != null">
lora_encoding_rate,
</if>
<if test="cimei != null">
cimei,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="imei != null">
#{imei,jdbcType=VARCHAR},
</if>
<if test="typename != null">
#{typename,jdbcType=VARCHAR},
</if>
<if test="devicetype != null">
#{devicetype,jdbcType=INTEGER},
</if>
<if test="collectiongap != null">
#{collectiongap,jdbcType=INTEGER},
</if>
<if test="sendinggap != null">
#{sendinggap,jdbcType=INTEGER},
</if>
<if test="urladdress != null">
#{urladdress,jdbcType=VARCHAR},
</if>
<if test="port != null">
#{port,jdbcType=VARCHAR},
</if>
<if test="unipaththresholdlimit != null">
#{unipaththresholdlimit,jdbcType=INTEGER},
</if>
<if test="unipaththresholdupper != null">
#{unipaththresholdupper,jdbcType=INTEGER},
</if>
<if test="unipathchangethreshold != null">
#{unipathchangethreshold,jdbcType=INTEGER},
</if>
<if test="multiplethresholdlimit != null">
#{multiplethresholdlimit,jdbcType=INTEGER},
</if>
<if test="multiplethresholdupper != null">
#{multiplethresholdupper,jdbcType=INTEGER},
</if>
<if test="multiplechangethreshold != null">
#{multiplechangethreshold,jdbcType=INTEGER},
</if>
<if test="controlvalvestate != null">
#{controlvalvestate,jdbcType=INTEGER},
</if>
<if test="starttime != null">
#{starttime,jdbcType=VARCHAR},
</if>
<if test="endtime != null">
#{endtime,jdbcType=VARCHAR},
</if>
<if test="numdays != null">
#{numdays,jdbcType=INTEGER},
</if>
<if test="switchingvalue != null">
#{switchingvalue,jdbcType=INTEGER},
</if>
<if test="stopreporting != null">
#{stopreporting,jdbcType=INTEGER},
</if>
<if test="softwareversions != null">
#{softwareversions,jdbcType=VARCHAR},
</if>
<if test="hardwareversions != null">
#{hardwareversions,jdbcType=VARCHAR},
</if>
<if test="imsi != null">
#{imsi,jdbcType=VARCHAR},
</if>
<if test="apn != null">
#{apn,jdbcType=VARCHAR},
</if>
<if test="time != null">
#{time,jdbcType=TIMESTAMP},
</if>
<if test="autocontrolpolicy != null">
#{autocontrolpolicy,jdbcType=VARCHAR},
</if>
<if test="autocontroltime != null">
#{autocontroltime,jdbcType=VARCHAR},
</if>
<if test="selfchecktime != null">
#{selfchecktime,jdbcType=VARCHAR},
</if>
<if test="collide != null">
#{collide,jdbcType=INTEGER},
</if>
<if test="lean != null">
#{lean,jdbcType=INTEGER},
</if>
<if test="loraFrequency != null">
#{loraFrequency,jdbcType=INTEGER},
</if>
<if test="loraBandwidth != null">
#{loraBandwidth,jdbcType=INTEGER},
</if>
<if test="loraSpreading != null">
#{loraSpreading,jdbcType=INTEGER},
</if>
<if test="loraEncodingRate != null">
#{loraEncodingRate,jdbcType=INTEGER},
</if>
<if test="cimei != null">
#{cimei,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.topsail.influxdb.pojo.OcConfigExample" resultType="java.lang.Long">
select count(*) from oc_config
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update oc_config
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.imei != null">
imei = #{record.imei,jdbcType=VARCHAR},
</if>
<if test="record.typename != null">
typeName = #{record.typename,jdbcType=VARCHAR},
</if>
<if test="record.devicetype != null">
deviceType = #{record.devicetype,jdbcType=INTEGER},
</if>
<if test="record.collectiongap != null">
collectionGap = #{record.collectiongap,jdbcType=INTEGER},
</if>
<if test="record.sendinggap != null">
sendingGap = #{record.sendinggap,jdbcType=INTEGER},
</if>
<if test="record.urladdress != null">
urlAddress = #{record.urladdress,jdbcType=VARCHAR},
</if>
<if test="record.port != null">
port = #{record.port,jdbcType=VARCHAR},
</if>
<if test="record.unipaththresholdlimit != null">
unipathThresholdLimit = #{record.unipaththresholdlimit,jdbcType=INTEGER},
</if>
<if test="record.unipaththresholdupper != null">
unipathThresholdUpper = #{record.unipaththresholdupper,jdbcType=INTEGER},
</if>
<if test="record.unipathchangethreshold != null">
unipathChangeThreshold = #{record.unipathchangethreshold,jdbcType=INTEGER},
</if>
<if test="record.multiplethresholdlimit != null">
multipleThresholdLimit = #{record.multiplethresholdlimit,jdbcType=INTEGER},
</if>
<if test="record.multiplethresholdupper != null">
multipleThresholdUpper = #{record.multiplethresholdupper,jdbcType=INTEGER},
</if>
<if test="record.multiplechangethreshold != null">
multipleChangeThreshold = #{record.multiplechangethreshold,jdbcType=INTEGER},
</if>
<if test="record.controlvalvestate != null">
controlValveState = #{record.controlvalvestate,jdbcType=INTEGER},
</if>
<if test="record.starttime != null">
startTime = #{record.starttime,jdbcType=VARCHAR},
</if>
<if test="record.endtime != null">
endTime = #{record.endtime,jdbcType=VARCHAR},
</if>
<if test="record.numdays != null">
numDays = #{record.numdays,jdbcType=INTEGER},
</if>
<if test="record.switchingvalue != null">
switchingValue = #{record.switchingvalue,jdbcType=INTEGER},
</if>
<if test="record.stopreporting != null">
stopReporting = #{record.stopreporting,jdbcType=INTEGER},
</if>
<if test="record.softwareversions != null">
softwareVersions = #{record.softwareversions,jdbcType=VARCHAR},
</if>
<if test="record.hardwareversions != null">
hardwareVersions = #{record.hardwareversions,jdbcType=VARCHAR},
</if>
<if test="record.imsi != null">
IMSI = #{record.imsi,jdbcType=VARCHAR},
</if>
<if test="record.apn != null">
APN = #{record.apn,jdbcType=VARCHAR},
</if>
<if test="record.time != null">
time = #{record.time,jdbcType=TIMESTAMP},
</if>
<if test="record.autocontrolpolicy != null">
autoControlPolicy = #{record.autocontrolpolicy,jdbcType=VARCHAR},
</if>
<if test="record.autocontroltime != null">
autoControlTime = #{record.autocontroltime,jdbcType=VARCHAR},
</if>
<if test="record.selfchecktime != null">
selfCheckTime = #{record.selfchecktime,jdbcType=VARCHAR},
</if>
<if test="record.collide != null">
collide = #{record.collide,jdbcType=INTEGER},
</if>
<if test="record.lean != null">
lean = #{record.lean,jdbcType=INTEGER},
</if>
<if test="record.loraFrequency != null">
lora_frequency = #{record.loraFrequency,jdbcType=INTEGER},
</if>
<if test="record.loraBandwidth != null">
lora_bandwidth = #{record.loraBandwidth,jdbcType=INTEGER},
</if>
<if test="record.loraSpreading != null">
lora_spreading = #{record.loraSpreading,jdbcType=INTEGER},
</if>
<if test="record.loraEncodingRate != null">
lora_encoding_rate = #{record.loraEncodingRate,jdbcType=INTEGER},
</if>
<if test="record.cimei != null">
cimei = #{record.cimei,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update oc_config
set id = #{record.id,jdbcType=BIGINT},
imei = #{record.imei,jdbcType=VARCHAR},
typeName = #{record.typename,jdbcType=VARCHAR},
deviceType = #{record.devicetype,jdbcType=INTEGER},
collectionGap = #{record.collectiongap,jdbcType=INTEGER},
sendingGap = #{record.sendinggap,jdbcType=INTEGER},
urlAddress = #{record.urladdress,jdbcType=VARCHAR},
port = #{record.port,jdbcType=VARCHAR},
unipathThresholdLimit = #{record.unipaththresholdlimit,jdbcType=INTEGER},
unipathThresholdUpper = #{record.unipaththresholdupper,jdbcType=INTEGER},
unipathChangeThreshold = #{record.unipathchangethreshold,jdbcType=INTEGER},
multipleThresholdLimit = #{record.multiplethresholdlimit,jdbcType=INTEGER},
multipleThresholdUpper = #{record.multiplethresholdupper,jdbcType=INTEGER},
multipleChangeThreshold = #{record.multiplechangethreshold,jdbcType=INTEGER},
controlValveState = #{record.controlvalvestate,jdbcType=INTEGER},
startTime = #{record.starttime,jdbcType=VARCHAR},
endTime = #{record.endtime,jdbcType=VARCHAR},
numDays = #{record.numdays,jdbcType=INTEGER},
switchingValue = #{record.switchingvalue,jdbcType=INTEGER},
stopReporting = #{record.stopreporting,jdbcType=INTEGER},
softwareVersions = #{record.softwareversions,jdbcType=VARCHAR},
hardwareVersions = #{record.hardwareversions,jdbcType=VARCHAR},
IMSI = #{record.imsi,jdbcType=VARCHAR},
APN = #{record.apn,jdbcType=VARCHAR},
time = #{record.time,jdbcType=TIMESTAMP},
autoControlPolicy = #{record.autocontrolpolicy,jdbcType=VARCHAR},
autoControlTime = #{record.autocontroltime,jdbcType=VARCHAR},
selfCheckTime = #{record.selfchecktime,jdbcType=VARCHAR},
collide = #{record.collide,jdbcType=INTEGER},
lean = #{record.lean,jdbcType=INTEGER},
lora_frequency = #{record.loraFrequency,jdbcType=INTEGER},
lora_bandwidth = #{record.loraBandwidth,jdbcType=INTEGER},
lora_spreading = #{record.loraSpreading,jdbcType=INTEGER},
lora_encoding_rate = #{record.loraEncodingRate,jdbcType=INTEGER},
cimei = #{record.cimei,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<insert id="batchInsert" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into oc_config
(id, imei, typeName, deviceType, collectionGap, sendingGap, urlAddress, port, unipathThresholdLimit,
unipathThresholdUpper, unipathChangeThreshold, multipleThresholdLimit, multipleThresholdUpper,
multipleChangeThreshold, controlValveState, startTime, endTime, numDays, switchingValue,
stopReporting, softwareVersions, hardwareVersions, IMSI, APN, time, autoControlPolicy,
autoControlTime, selfCheckTime, collide, lean, lora_frequency, lora_bandwidth,
lora_spreading, lora_encoding_rate, cimei)
values
<foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=BIGINT}, #{item.imei,jdbcType=VARCHAR}, #{item.typename,jdbcType=VARCHAR},
#{item.devicetype,jdbcType=INTEGER}, #{item.collectiongap,jdbcType=INTEGER}, #{item.sendinggap,jdbcType=INTEGER},
#{item.urladdress,jdbcType=VARCHAR}, #{item.port,jdbcType=VARCHAR}, #{item.unipaththresholdlimit,jdbcType=INTEGER},
#{item.unipaththresholdupper,jdbcType=INTEGER}, #{item.unipathchangethreshold,jdbcType=INTEGER},
#{item.multiplethresholdlimit,jdbcType=INTEGER}, #{item.multiplethresholdupper,jdbcType=INTEGER},
#{item.multiplechangethreshold,jdbcType=INTEGER}, #{item.controlvalvestate,jdbcType=INTEGER},
#{item.starttime,jdbcType=VARCHAR}, #{item.endtime,jdbcType=VARCHAR}, #{item.numdays,jdbcType=INTEGER},
#{item.switchingvalue,jdbcType=INTEGER}, #{item.stopreporting,jdbcType=INTEGER},
#{item.softwareversions,jdbcType=VARCHAR}, #{item.hardwareversions,jdbcType=VARCHAR},
#{item.imsi,jdbcType=VARCHAR}, #{item.apn,jdbcType=VARCHAR}, #{item.time,jdbcType=TIMESTAMP},
#{item.autocontrolpolicy,jdbcType=VARCHAR}, #{item.autocontroltime,jdbcType=VARCHAR},
#{item.selfchecktime,jdbcType=VARCHAR}, #{item.collide,jdbcType=INTEGER}, #{item.lean,jdbcType=INTEGER},
#{item.loraFrequency,jdbcType=INTEGER}, #{item.loraBandwidth,jdbcType=INTEGER},
#{item.loraSpreading,jdbcType=INTEGER}, #{item.loraEncodingRate,jdbcType=INTEGER},
#{item.cimei,jdbcType=VARCHAR})
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into oc_config (
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
)
values
<foreach collection="list" item="item" separator=",">
(
<foreach collection="selective" item="column" separator=",">
<if test="'id'.toString() == column.value">
#{item.id,jdbcType=BIGINT}
</if>
<if test="'imei'.toString() == column.value">
#{item.imei,jdbcType=VARCHAR}
</if>
<if test="'typeName'.toString() == column.value">
#{item.typename,jdbcType=VARCHAR}
</if>
<if test="'deviceType'.toString() == column.value">
#{item.devicetype,jdbcType=INTEGER}
</if>
<if test="'collectionGap'.toString() == column.value">
#{item.collectiongap,jdbcType=INTEGER}
</if>
<if test="'sendingGap'.toString() == column.value">
#{item.sendinggap,jdbcType=INTEGER}
</if>
<if test="'urlAddress'.toString() == column.value">
#{item.urladdress,jdbcType=VARCHAR}
</if>
<if test="'port'.toString() == column.value">
#{item.port,jdbcType=VARCHAR}
</if>
<if test="'unipathThresholdLimit'.toString() == column.value">
#{item.unipaththresholdlimit,jdbcType=INTEGER}
</if>
<if test="'unipathThresholdUpper'.toString() == column.value">
#{item.unipaththresholdupper,jdbcType=INTEGER}
</if>
<if test="'unipathChangeThreshold'.toString() == column.value">
#{item.unipathchangethreshold,jdbcType=INTEGER}
</if>
<if test="'multipleThresholdLimit'.toString() == column.value">
#{item.multiplethresholdlimit,jdbcType=INTEGER}
</if>
<if test="'multipleThresholdUpper'.toString() == column.value">
#{item.multiplethresholdupper,jdbcType=INTEGER}
</if>
<if test="'multipleChangeThreshold'.toString() == column.value">
#{item.multiplechangethreshold,jdbcType=INTEGER}
</if>
<if test="'controlValveState'.toString() == column.value">
#{item.controlvalvestate,jdbcType=INTEGER}
</if>
<if test="'startTime'.toString() == column.value">
#{item.starttime,jdbcType=VARCHAR}
</if>
<if test="'endTime'.toString() == column.value">
#{item.endtime,jdbcType=VARCHAR}
</if>
<if test="'numDays'.toString() == column.value">
#{item.numdays,jdbcType=INTEGER}
</if>
<if test="'switchingValue'.toString() == column.value">
#{item.switchingvalue,jdbcType=INTEGER}
</if>
<if test="'stopReporting'.toString() == column.value">
#{item.stopreporting,jdbcType=INTEGER}
</if>
<if test="'softwareVersions'.toString() == column.value">
#{item.softwareversions,jdbcType=VARCHAR}
</if>
<if test="'hardwareVersions'.toString() == column.value">
#{item.hardwareversions,jdbcType=VARCHAR}
</if>
<if test="'IMSI'.toString() == column.value">
#{item.imsi,jdbcType=VARCHAR}
</if>
<if test="'APN'.toString() == column.value">
#{item.apn,jdbcType=VARCHAR}
</if>
<if test="'time'.toString() == column.value">
#{item.time,jdbcType=TIMESTAMP}
</if>
<if test="'autoControlPolicy'.toString() == column.value">
#{item.autocontrolpolicy,jdbcType=VARCHAR}
</if>
<if test="'autoControlTime'.toString() == column.value">
#{item.autocontroltime,jdbcType=VARCHAR}
</if>
<if test="'selfCheckTime'.toString() == column.value">
#{item.selfchecktime,jdbcType=VARCHAR}
</if>
<if test="'collide'.toString() == column.value">
#{item.collide,jdbcType=INTEGER}
</if>
<if test="'lean'.toString() == column.value">
#{item.lean,jdbcType=INTEGER}
</if>
<if test="'lora_frequency'.toString() == column.value">
#{item.loraFrequency,jdbcType=INTEGER}
</if>
<if test="'lora_bandwidth'.toString() == column.value">
#{item.loraBandwidth,jdbcType=INTEGER}
</if>
<if test="'lora_spreading'.toString() == column.value">
#{item.loraSpreading,jdbcType=INTEGER}
</if>
<if test="'lora_encoding_rate'.toString() == column.value">
#{item.loraEncodingRate,jdbcType=INTEGER}
</if>
<if test="'cimei'.toString() == column.value">
#{item.cimei,jdbcType=VARCHAR}
</if>
</foreach>
)
</foreach>
</insert>
</mapper>

+ 44
- 0
src/main/java/com/topsail/influxdb/mapper/OcDeviceMapper.java View File

@ -0,0 +1,44 @@
package com.topsail.influxdb.mapper;
import com.topsail.influxdb.pojo.OcDevice;
import com.topsail.influxdb.pojo.OcDeviceExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface OcDeviceMapper {
long countByExample(OcDeviceExample example);
int deleteByExample(OcDeviceExample example);
int insert(OcDevice record);
int insertSelective(OcDevice record);
List<OcDevice> selectByExampleWithBLOBs(OcDeviceExample example);
List<OcDevice> selectByExample(OcDeviceExample example);
int updateByExampleSelective(@Param("record") OcDevice record, @Param("example") OcDeviceExample example);
int updateByExampleWithBLOBs(@Param("record") OcDevice record, @Param("example") OcDeviceExample example);
int updateByExample(@Param("record") OcDevice record, @Param("example") OcDeviceExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table oc_device
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsert(@Param("list") List<OcDevice> list);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table oc_device
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsertSelective(@Param("list") List<OcDevice> list, @Param("selective") OcDevice.Column ... selective);
}

+ 385
- 0
src/main/java/com/topsail/influxdb/mapper/OcDeviceMapper.xml View File

@ -0,0 +1,385 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.topsail.influxdb.mapper.OcDeviceMapper">
<resultMap id="BaseResultMap" type="com.topsail.influxdb.pojo.OcDevice">
<result column="id" jdbcType="INTEGER" property="id" />
<result column="verifyCode" jdbcType="VARCHAR" property="verifycode" />
<result column="deviceType" jdbcType="VARCHAR" property="devicetype" />
<result column="userName" jdbcType="VARCHAR" property="username" />
<result column="latitude" jdbcType="VARCHAR" property="latitude" />
<result column="longitude" jdbcType="VARCHAR" property="longitude" />
<result column="version" jdbcType="VARCHAR" property="version" />
<result column="fk_pid" jdbcType="INTEGER" property="fkPid" />
<result column="period" jdbcType="VARCHAR" property="period" />
<result column="imei" jdbcType="VARCHAR" property="imei" />
<result column="dperiod" jdbcType="INTEGER" property="dperiod" />
<result column="company_id" jdbcType="INTEGER" property="companyId" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.topsail.influxdb.pojo.OcDevice">
<result column="deviceId" jdbcType="LONGVARCHAR" property="deviceid" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, verifyCode, deviceType, userName, latitude, longitude, version, fk_pid, period,
imei, dperiod, company_id
</sql>
<sql id="Blob_Column_List">
deviceId
</sql>
<select id="selectByExampleWithBLOBs" parameterType="com.topsail.influxdb.pojo.OcDeviceExample" resultMap="ResultMapWithBLOBs">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from oc_device
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByExample" parameterType="com.topsail.influxdb.pojo.OcDeviceExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from oc_device
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<delete id="deleteByExample" parameterType="com.topsail.influxdb.pojo.OcDeviceExample">
delete from oc_device
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.topsail.influxdb.pojo.OcDevice">
insert into oc_device (id, verifyCode, deviceType,
userName, latitude, longitude,
version, fk_pid, period,
imei, dperiod, company_id,
deviceId)
values (#{id,jdbcType=INTEGER}, #{verifycode,jdbcType=VARCHAR}, #{devicetype,jdbcType=VARCHAR},
#{username,jdbcType=VARCHAR}, #{latitude,jdbcType=VARCHAR}, #{longitude,jdbcType=VARCHAR},
#{version,jdbcType=VARCHAR}, #{fkPid,jdbcType=INTEGER}, #{period,jdbcType=VARCHAR},
#{imei,jdbcType=VARCHAR}, #{dperiod,jdbcType=INTEGER}, #{companyId,jdbcType=INTEGER},
#{deviceid,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.topsail.influxdb.pojo.OcDevice">
insert into oc_device
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="verifycode != null">
verifyCode,
</if>
<if test="devicetype != null">
deviceType,
</if>
<if test="username != null">
userName,
</if>
<if test="latitude != null">
latitude,
</if>
<if test="longitude != null">
longitude,
</if>
<if test="version != null">
version,
</if>
<if test="fkPid != null">
fk_pid,
</if>
<if test="period != null">
period,
</if>
<if test="imei != null">
imei,
</if>
<if test="dperiod != null">
dperiod,
</if>
<if test="companyId != null">
company_id,
</if>
<if test="deviceid != null">
deviceId,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="verifycode != null">
#{verifycode,jdbcType=VARCHAR},
</if>
<if test="devicetype != null">
#{devicetype,jdbcType=VARCHAR},
</if>
<if test="username != null">
#{username,jdbcType=VARCHAR},
</if>
<if test="latitude != null">
#{latitude,jdbcType=VARCHAR},
</if>
<if test="longitude != null">
#{longitude,jdbcType=VARCHAR},
</if>
<if test="version != null">
#{version,jdbcType=VARCHAR},
</if>
<if test="fkPid != null">
#{fkPid,jdbcType=INTEGER},
</if>
<if test="period != null">
#{period,jdbcType=VARCHAR},
</if>
<if test="imei != null">
#{imei,jdbcType=VARCHAR},
</if>
<if test="dperiod != null">
#{dperiod,jdbcType=INTEGER},
</if>
<if test="companyId != null">
#{companyId,jdbcType=INTEGER},
</if>
<if test="deviceid != null">
#{deviceid,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.topsail.influxdb.pojo.OcDeviceExample" resultType="java.lang.Long">
select count(*) from oc_device
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update oc_device
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.verifycode != null">
verifyCode = #{record.verifycode,jdbcType=VARCHAR},
</if>
<if test="record.devicetype != null">
deviceType = #{record.devicetype,jdbcType=VARCHAR},
</if>
<if test="record.username != null">
userName = #{record.username,jdbcType=VARCHAR},
</if>
<if test="record.latitude != null">
latitude = #{record.latitude,jdbcType=VARCHAR},
</if>
<if test="record.longitude != null">
longitude = #{record.longitude,jdbcType=VARCHAR},
</if>
<if test="record.version != null">
version = #{record.version,jdbcType=VARCHAR},
</if>
<if test="record.fkPid != null">
fk_pid = #{record.fkPid,jdbcType=INTEGER},
</if>
<if test="record.period != null">
period = #{record.period,jdbcType=VARCHAR},
</if>
<if test="record.imei != null">
imei = #{record.imei,jdbcType=VARCHAR},
</if>
<if test="record.dperiod != null">
dperiod = #{record.dperiod,jdbcType=INTEGER},
</if>
<if test="record.companyId != null">
company_id = #{record.companyId,jdbcType=INTEGER},
</if>
<if test="record.deviceid != null">
deviceId = #{record.deviceid,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExampleWithBLOBs" parameterType="map">
update oc_device
set id = #{record.id,jdbcType=INTEGER},
verifyCode = #{record.verifycode,jdbcType=VARCHAR},
deviceType = #{record.devicetype,jdbcType=VARCHAR},
userName = #{record.username,jdbcType=VARCHAR},
latitude = #{record.latitude,jdbcType=VARCHAR},
longitude = #{record.longitude,jdbcType=VARCHAR},
version = #{record.version,jdbcType=VARCHAR},
fk_pid = #{record.fkPid,jdbcType=INTEGER},
period = #{record.period,jdbcType=VARCHAR},
imei = #{record.imei,jdbcType=VARCHAR},
dperiod = #{record.dperiod,jdbcType=INTEGER},
company_id = #{record.companyId,jdbcType=INTEGER},
deviceId = #{record.deviceid,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update oc_device
set id = #{record.id,jdbcType=INTEGER},
verifyCode = #{record.verifycode,jdbcType=VARCHAR},
deviceType = #{record.devicetype,jdbcType=VARCHAR},
userName = #{record.username,jdbcType=VARCHAR},
latitude = #{record.latitude,jdbcType=VARCHAR},
longitude = #{record.longitude,jdbcType=VARCHAR},
version = #{record.version,jdbcType=VARCHAR},
fk_pid = #{record.fkPid,jdbcType=INTEGER},
period = #{record.period,jdbcType=VARCHAR},
imei = #{record.imei,jdbcType=VARCHAR},
dperiod = #{record.dperiod,jdbcType=INTEGER},
company_id = #{record.companyId,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<insert id="batchInsert" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into oc_device
(id, verifyCode, deviceType, userName, latitude, longitude, version, fk_pid, period,
imei, dperiod, company_id, deviceId)
values
<foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=INTEGER}, #{item.verifycode,jdbcType=VARCHAR}, #{item.devicetype,jdbcType=VARCHAR},
#{item.username,jdbcType=VARCHAR}, #{item.latitude,jdbcType=VARCHAR}, #{item.longitude,jdbcType=VARCHAR},
#{item.version,jdbcType=VARCHAR}, #{item.fkPid,jdbcType=INTEGER}, #{item.period,jdbcType=VARCHAR},
#{item.imei,jdbcType=VARCHAR}, #{item.dperiod,jdbcType=INTEGER}, #{item.companyId,jdbcType=INTEGER},
#{item.deviceid,jdbcType=LONGVARCHAR})
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into oc_device (
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
)
values
<foreach collection="list" item="item" separator=",">
(
<foreach collection="selective" item="column" separator=",">
<if test="'id'.toString() == column.value">
#{item.id,jdbcType=INTEGER}
</if>
<if test="'verifyCode'.toString() == column.value">
#{item.verifycode,jdbcType=VARCHAR}
</if>
<if test="'deviceType'.toString() == column.value">
#{item.devicetype,jdbcType=VARCHAR}
</if>
<if test="'userName'.toString() == column.value">
#{item.username,jdbcType=VARCHAR}
</if>
<if test="'latitude'.toString() == column.value">
#{item.latitude,jdbcType=VARCHAR}
</if>
<if test="'longitude'.toString() == column.value">
#{item.longitude,jdbcType=VARCHAR}
</if>
<if test="'version'.toString() == column.value">
#{item.version,jdbcType=VARCHAR}
</if>
<if test="'fk_pid'.toString() == column.value">
#{item.fkPid,jdbcType=INTEGER}
</if>
<if test="'period'.toString() == column.value">
#{item.period,jdbcType=VARCHAR}
</if>
<if test="'imei'.toString() == column.value">
#{item.imei,jdbcType=VARCHAR}
</if>
<if test="'dperiod'.toString() == column.value">
#{item.dperiod,jdbcType=INTEGER}
</if>
<if test="'company_id'.toString() == column.value">
#{item.companyId,jdbcType=INTEGER}
</if>
<if test="'deviceId'.toString() == column.value">
#{item.deviceid,jdbcType=LONGVARCHAR}
</if>
</foreach>
)
</foreach>
</insert>
</mapper>

+ 40
- 0
src/main/java/com/topsail/influxdb/mapper/OnenetCompanyMapper.java View File

@ -0,0 +1,40 @@
package com.topsail.influxdb.mapper;
import com.topsail.influxdb.pojo.OnenetCompany;
import com.topsail.influxdb.pojo.OnenetCompanyExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface OnenetCompanyMapper {
long countByExample(OnenetCompanyExample example);
int deleteByExample(OnenetCompanyExample example);
int insert(OnenetCompany record);
int insertSelective(OnenetCompany record);
List<OnenetCompany> selectByExample(OnenetCompanyExample example);
int updateByExampleSelective(@Param("record") OnenetCompany record, @Param("example") OnenetCompanyExample example);
int updateByExample(@Param("record") OnenetCompany record, @Param("example") OnenetCompanyExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table onenet_company
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsert(@Param("list") List<OnenetCompany> list);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table onenet_company
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsertSelective(@Param("list") List<OnenetCompany> list, @Param("selective") OnenetCompany.Column ... selective);
}

+ 254
- 0
src/main/java/com/topsail/influxdb/mapper/OnenetCompanyMapper.xml View File

@ -0,0 +1,254 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.topsail.influxdb.mapper.OnenetCompanyMapper">
<resultMap id="BaseResultMap" type="com.topsail.influxdb.pojo.OnenetCompany">
<result column="id" jdbcType="INTEGER" property="id" />
<result column="username" jdbcType="VARCHAR" property="username" />
<result column="userip" jdbcType="VARCHAR" property="userip" />
<result column="userport" jdbcType="INTEGER" property="userport" />
<result column="userprot" jdbcType="VARCHAR" property="userprot" />
<result column="period" jdbcType="VARCHAR" property="period" />
<result column="cperiod" jdbcType="VARCHAR" property="cperiod" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, username, userip, userport, userprot, period, cperiod
</sql>
<select id="selectByExample" parameterType="com.topsail.influxdb.pojo.OnenetCompanyExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from onenet_company
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<delete id="deleteByExample" parameterType="com.topsail.influxdb.pojo.OnenetCompanyExample">
delete from onenet_company
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.topsail.influxdb.pojo.OnenetCompany">
insert into onenet_company (id, username, userip,
userport, userprot, period,
cperiod)
values (#{id,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, #{userip,jdbcType=VARCHAR},
#{userport,jdbcType=INTEGER}, #{userprot,jdbcType=VARCHAR}, #{period,jdbcType=VARCHAR},
#{cperiod,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.topsail.influxdb.pojo.OnenetCompany">
insert into onenet_company
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="username != null">
username,
</if>
<if test="userip != null">
userip,
</if>
<if test="userport != null">
userport,
</if>
<if test="userprot != null">
userprot,
</if>
<if test="period != null">
period,
</if>
<if test="cperiod != null">
cperiod,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="username != null">
#{username,jdbcType=VARCHAR},
</if>
<if test="userip != null">
#{userip,jdbcType=VARCHAR},
</if>
<if test="userport != null">
#{userport,jdbcType=INTEGER},
</if>
<if test="userprot != null">
#{userprot,jdbcType=VARCHAR},
</if>
<if test="period != null">
#{period,jdbcType=VARCHAR},
</if>
<if test="cperiod != null">
#{cperiod,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.topsail.influxdb.pojo.OnenetCompanyExample" resultType="java.lang.Long">
select count(*) from onenet_company
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update onenet_company
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.username != null">
username = #{record.username,jdbcType=VARCHAR},
</if>
<if test="record.userip != null">
userip = #{record.userip,jdbcType=VARCHAR},
</if>
<if test="record.userport != null">
userport = #{record.userport,jdbcType=INTEGER},
</if>
<if test="record.userprot != null">
userprot = #{record.userprot,jdbcType=VARCHAR},
</if>
<if test="record.period != null">
period = #{record.period,jdbcType=VARCHAR},
</if>
<if test="record.cperiod != null">
cperiod = #{record.cperiod,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update onenet_company
set id = #{record.id,jdbcType=INTEGER},
username = #{record.username,jdbcType=VARCHAR},
userip = #{record.userip,jdbcType=VARCHAR},
userport = #{record.userport,jdbcType=INTEGER},
userprot = #{record.userprot,jdbcType=VARCHAR},
period = #{record.period,jdbcType=VARCHAR},
cperiod = #{record.cperiod,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<insert id="batchInsert" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into onenet_company
(id, username, userip, userport, userprot, period, cperiod)
values
<foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=INTEGER}, #{item.username,jdbcType=VARCHAR}, #{item.userip,jdbcType=VARCHAR},
#{item.userport,jdbcType=INTEGER}, #{item.userprot,jdbcType=VARCHAR}, #{item.period,jdbcType=VARCHAR},
#{item.cperiod,jdbcType=VARCHAR})
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into onenet_company (
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
)
values
<foreach collection="list" item="item" separator=",">
(
<foreach collection="selective" item="column" separator=",">
<if test="'id'.toString() == column.value">
#{item.id,jdbcType=INTEGER}
</if>
<if test="'username'.toString() == column.value">
#{item.username,jdbcType=VARCHAR}
</if>
<if test="'userip'.toString() == column.value">
#{item.userip,jdbcType=VARCHAR}
</if>
<if test="'userport'.toString() == column.value">
#{item.userport,jdbcType=INTEGER}
</if>
<if test="'userprot'.toString() == column.value">
#{item.userprot,jdbcType=VARCHAR}
</if>
<if test="'period'.toString() == column.value">
#{item.period,jdbcType=VARCHAR}
</if>
<if test="'cperiod'.toString() == column.value">
#{item.cperiod,jdbcType=VARCHAR}
</if>
</foreach>
)
</foreach>
</insert>
</mapper>

+ 40
- 0
src/main/java/com/topsail/influxdb/mapper/OnenetDeviceMapper.java View File

@ -0,0 +1,40 @@
package com.topsail.influxdb.mapper;
import com.topsail.influxdb.pojo.OnenetDevice;
import com.topsail.influxdb.pojo.OnenetDeviceExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface OnenetDeviceMapper {
long countByExample(OnenetDeviceExample example);
int deleteByExample(OnenetDeviceExample example);
int insert(OnenetDevice record);
int insertSelective(OnenetDevice record);
List<OnenetDevice> selectByExample(OnenetDeviceExample example);
int updateByExampleSelective(@Param("record") OnenetDevice record, @Param("example") OnenetDeviceExample example);
int updateByExample(@Param("record") OnenetDevice record, @Param("example") OnenetDeviceExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table onenet_device
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsert(@Param("list") List<OnenetDevice> list);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table onenet_device
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsertSelective(@Param("list") List<OnenetDevice> list, @Param("selective") OnenetDevice.Column ... selective);
}

+ 332
- 0
src/main/java/com/topsail/influxdb/mapper/OnenetDeviceMapper.xml View File

@ -0,0 +1,332 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.topsail.influxdb.mapper.OnenetDeviceMapper">
<resultMap id="BaseResultMap" type="com.topsail.influxdb.pojo.OnenetDevice">
<result column="id" jdbcType="INTEGER" property="id" />
<result column="verifyCode" jdbcType="VARCHAR" property="verifycode" />
<result column="deviceId" jdbcType="VARCHAR" property="deviceid" />
<result column="deviceType" jdbcType="VARCHAR" property="devicetype" />
<result column="userName" jdbcType="VARCHAR" property="username" />
<result column="latitude" jdbcType="DOUBLE" property="latitude" />
<result column="longitude" jdbcType="DOUBLE" property="longitude" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="period" jdbcType="VARCHAR" property="period" />
<result column="imei" jdbcType="VARCHAR" property="imei" />
<result column="dperiod" jdbcType="INTEGER" property="dperiod" />
<result column="company_id" jdbcType="INTEGER" property="companyId" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, verifyCode, deviceId, deviceType, userName, latitude, longitude, type, period,
imei, dperiod, company_id
</sql>
<select id="selectByExample" parameterType="com.topsail.influxdb.pojo.OnenetDeviceExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from onenet_device
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<delete id="deleteByExample" parameterType="com.topsail.influxdb.pojo.OnenetDeviceExample">
delete from onenet_device
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.topsail.influxdb.pojo.OnenetDevice">
insert into onenet_device (id, verifyCode, deviceId,
deviceType, userName, latitude,
longitude, type, period,
imei, dperiod, company_id
)
values (#{id,jdbcType=INTEGER}, #{verifycode,jdbcType=VARCHAR}, #{deviceid,jdbcType=VARCHAR},
#{devicetype,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, #{latitude,jdbcType=DOUBLE},
#{longitude,jdbcType=DOUBLE}, #{type,jdbcType=VARCHAR}, #{period,jdbcType=VARCHAR},
#{imei,jdbcType=VARCHAR}, #{dperiod,jdbcType=INTEGER}, #{companyId,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.topsail.influxdb.pojo.OnenetDevice">
insert into onenet_device
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="verifycode != null">
verifyCode,
</if>
<if test="deviceid != null">
deviceId,
</if>
<if test="devicetype != null">
deviceType,
</if>
<if test="username != null">
userName,
</if>
<if test="latitude != null">
latitude,
</if>
<if test="longitude != null">
longitude,
</if>
<if test="type != null">
type,
</if>
<if test="period != null">
period,
</if>
<if test="imei != null">
imei,
</if>
<if test="dperiod != null">
dperiod,
</if>
<if test="companyId != null">
company_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="verifycode != null">
#{verifycode,jdbcType=VARCHAR},
</if>
<if test="deviceid != null">
#{deviceid,jdbcType=VARCHAR},
</if>
<if test="devicetype != null">
#{devicetype,jdbcType=VARCHAR},
</if>
<if test="username != null">
#{username,jdbcType=VARCHAR},
</if>
<if test="latitude != null">
#{latitude,jdbcType=DOUBLE},
</if>
<if test="longitude != null">
#{longitude,jdbcType=DOUBLE},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="period != null">
#{period,jdbcType=VARCHAR},
</if>
<if test="imei != null">
#{imei,jdbcType=VARCHAR},
</if>
<if test="dperiod != null">
#{dperiod,jdbcType=INTEGER},
</if>
<if test="companyId != null">
#{companyId,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.topsail.influxdb.pojo.OnenetDeviceExample" resultType="java.lang.Long">
select count(*) from onenet_device
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update onenet_device
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.verifycode != null">
verifyCode = #{record.verifycode,jdbcType=VARCHAR},
</if>
<if test="record.deviceid != null">
deviceId = #{record.deviceid,jdbcType=VARCHAR},
</if>
<if test="record.devicetype != null">
deviceType = #{record.devicetype,jdbcType=VARCHAR},
</if>
<if test="record.username != null">
userName = #{record.username,jdbcType=VARCHAR},
</if>
<if test="record.latitude != null">
latitude = #{record.latitude,jdbcType=DOUBLE},
</if>
<if test="record.longitude != null">
longitude = #{record.longitude,jdbcType=DOUBLE},
</if>
<if test="record.type != null">
type = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.period != null">
period = #{record.period,jdbcType=VARCHAR},
</if>
<if test="record.imei != null">
imei = #{record.imei,jdbcType=VARCHAR},
</if>
<if test="record.dperiod != null">
dperiod = #{record.dperiod,jdbcType=INTEGER},
</if>
<if test="record.companyId != null">
company_id = #{record.companyId,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update onenet_device
set id = #{record.id,jdbcType=INTEGER},
verifyCode = #{record.verifycode,jdbcType=VARCHAR},
deviceId = #{record.deviceid,jdbcType=VARCHAR},
deviceType = #{record.devicetype,jdbcType=VARCHAR},
userName = #{record.username,jdbcType=VARCHAR},
latitude = #{record.latitude,jdbcType=DOUBLE},
longitude = #{record.longitude,jdbcType=DOUBLE},
type = #{record.type,jdbcType=VARCHAR},
period = #{record.period,jdbcType=VARCHAR},
imei = #{record.imei,jdbcType=VARCHAR},
dperiod = #{record.dperiod,jdbcType=INTEGER},
company_id = #{record.companyId,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<insert id="batchInsert" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into onenet_device
(id, verifyCode, deviceId, deviceType, userName, latitude, longitude, type, period,
imei, dperiod, company_id)
values
<foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=INTEGER}, #{item.verifycode,jdbcType=VARCHAR}, #{item.deviceid,jdbcType=VARCHAR},
#{item.devicetype,jdbcType=VARCHAR}, #{item.username,jdbcType=VARCHAR}, #{item.latitude,jdbcType=DOUBLE},
#{item.longitude,jdbcType=DOUBLE}, #{item.type,jdbcType=VARCHAR}, #{item.period,jdbcType=VARCHAR},
#{item.imei,jdbcType=VARCHAR}, #{item.dperiod,jdbcType=INTEGER}, #{item.companyId,jdbcType=INTEGER}
)
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into onenet_device (
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
)
values
<foreach collection="list" item="item" separator=",">
(
<foreach collection="selective" item="column" separator=",">
<if test="'id'.toString() == column.value">
#{item.id,jdbcType=INTEGER}
</if>
<if test="'verifyCode'.toString() == column.value">
#{item.verifycode,jdbcType=VARCHAR}
</if>
<if test="'deviceId'.toString() == column.value">
#{item.deviceid,jdbcType=VARCHAR}
</if>
<if test="'deviceType'.toString() == column.value">
#{item.devicetype,jdbcType=VARCHAR}
</if>
<if test="'userName'.toString() == column.value">
#{item.username,jdbcType=VARCHAR}
</if>
<if test="'latitude'.toString() == column.value">
#{item.latitude,jdbcType=DOUBLE}
</if>
<if test="'longitude'.toString() == column.value">
#{item.longitude,jdbcType=DOUBLE}
</if>
<if test="'type'.toString() == column.value">
#{item.type,jdbcType=VARCHAR}
</if>
<if test="'period'.toString() == column.value">
#{item.period,jdbcType=VARCHAR}
</if>
<if test="'imei'.toString() == column.value">
#{item.imei,jdbcType=VARCHAR}
</if>
<if test="'dperiod'.toString() == column.value">
#{item.dperiod,jdbcType=INTEGER}
</if>
<if test="'company_id'.toString() == column.value">
#{item.companyId,jdbcType=INTEGER}
</if>
</foreach>
)
</foreach>
</insert>
</mapper>

+ 40
- 0
src/main/java/com/topsail/influxdb/mapper/OnlineProjectMapper.java View File

@ -0,0 +1,40 @@
package com.topsail.influxdb.mapper;
import com.topsail.influxdb.pojo.OnlineProject;
import com.topsail.influxdb.pojo.OnlineProjectExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface OnlineProjectMapper {
long countByExample(OnlineProjectExample example);
int deleteByExample(OnlineProjectExample example);
int insert(OnlineProject record);
int insertSelective(OnlineProject record);
List<OnlineProject> selectByExample(OnlineProjectExample example);
int updateByExampleSelective(@Param("record") OnlineProject record, @Param("example") OnlineProjectExample example);
int updateByExample(@Param("record") OnlineProject record, @Param("example") OnlineProjectExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table online_project
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsert(@Param("list") List<OnlineProject> list);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table online_project
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsertSelective(@Param("list") List<OnlineProject> list, @Param("selective") OnlineProject.Column ... selective);
}

+ 209
- 0
src/main/java/com/topsail/influxdb/mapper/OnlineProjectMapper.xml View File

@ -0,0 +1,209 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.topsail.influxdb.mapper.OnlineProjectMapper">
<resultMap id="BaseResultMap" type="com.topsail.influxdb.pojo.OnlineProject">
<result column="num" jdbcType="BIGINT" property="num" />
<result column="project_id" jdbcType="INTEGER" property="projectId" />
<result column="company_id" jdbcType="INTEGER" property="companyId" />
<result column="STATUS" jdbcType="INTEGER" property="status" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
num, project_id, company_id, STATUS
</sql>
<select id="selectByExample" parameterType="com.topsail.influxdb.pojo.OnlineProjectExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from online_project
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<delete id="deleteByExample" parameterType="com.topsail.influxdb.pojo.OnlineProjectExample">
delete from online_project
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.topsail.influxdb.pojo.OnlineProject">
insert into online_project (num, project_id, company_id,
STATUS)
values (#{num,jdbcType=BIGINT}, #{projectId,jdbcType=INTEGER}, #{companyId,jdbcType=INTEGER},
#{status,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.topsail.influxdb.pojo.OnlineProject">
insert into online_project
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="num != null">
num,
</if>
<if test="projectId != null">
project_id,
</if>
<if test="companyId != null">
company_id,
</if>
<if test="status != null">
STATUS,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="num != null">
#{num,jdbcType=BIGINT},
</if>
<if test="projectId != null">
#{projectId,jdbcType=INTEGER},
</if>
<if test="companyId != null">
#{companyId,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.topsail.influxdb.pojo.OnlineProjectExample" resultType="java.lang.Long">
select count(*) from online_project
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update online_project
<set>
<if test="record.num != null">
num = #{record.num,jdbcType=BIGINT},
</if>
<if test="record.projectId != null">
project_id = #{record.projectId,jdbcType=INTEGER},
</if>
<if test="record.companyId != null">
company_id = #{record.companyId,jdbcType=INTEGER},
</if>
<if test="record.status != null">
STATUS = #{record.status,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update online_project
set num = #{record.num,jdbcType=BIGINT},
project_id = #{record.projectId,jdbcType=INTEGER},
company_id = #{record.companyId,jdbcType=INTEGER},
STATUS = #{record.status,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<insert id="batchInsert" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into online_project
(num, project_id, company_id, STATUS)
values
<foreach collection="list" item="item" separator=",">
(#{item.num,jdbcType=BIGINT}, #{item.projectId,jdbcType=INTEGER}, #{item.companyId,jdbcType=INTEGER},
#{item.status,jdbcType=INTEGER})
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into online_project (
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
)
values
<foreach collection="list" item="item" separator=",">
(
<foreach collection="selective" item="column" separator=",">
<if test="'num'.toString() == column.value">
#{item.num,jdbcType=BIGINT}
</if>
<if test="'project_id'.toString() == column.value">
#{item.projectId,jdbcType=INTEGER}
</if>
<if test="'company_id'.toString() == column.value">
#{item.companyId,jdbcType=INTEGER}
</if>
<if test="'STATUS'.toString() == column.value">
#{item.status,jdbcType=INTEGER}
</if>
</foreach>
)
</foreach>
</insert>
</mapper>

+ 48
- 0
src/main/java/com/topsail/influxdb/mapper/OnlineRateMapper.java View File

@ -0,0 +1,48 @@
package com.topsail.influxdb.mapper;
import com.topsail.influxdb.pojo.OnlineRate;
import com.topsail.influxdb.pojo.OnlineRateExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface OnlineRateMapper {
long countByExample(OnlineRateExample example);
int deleteByExample(OnlineRateExample example);
int deleteByPrimaryKey(Integer id);
int insert(OnlineRate record);
int insertSelective(OnlineRate record);
List<OnlineRate> selectByExample(OnlineRateExample example);
OnlineRate selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") OnlineRate record, @Param("example") OnlineRateExample example);
int updateByExample(@Param("record") OnlineRate record, @Param("example") OnlineRateExample example);
int updateByPrimaryKeySelective(OnlineRate record);
int updateByPrimaryKey(OnlineRate record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table online_rate
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsert(@Param("list") List<OnlineRate> list);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table online_rate
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsertSelective(@Param("list") List<OnlineRate> list, @Param("selective") OnlineRate.Column ... selective);
}

+ 337
- 0
src/main/java/com/topsail/influxdb/mapper/OnlineRateMapper.xml View File

@ -0,0 +1,337 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.topsail.influxdb.mapper.OnlineRateMapper">
<resultMap id="BaseResultMap" type="com.topsail.influxdb.pojo.OnlineRate">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="online" jdbcType="INTEGER" property="online" />
<result column="count" jdbcType="INTEGER" property="count" />
<result column="per" jdbcType="DOUBLE" property="per" />
<result column="platformType" jdbcType="VARCHAR" property="platformtype" />
<result column="time" jdbcType="TIMESTAMP" property="time" />
<result column="userName" jdbcType="VARCHAR" property="username" />
<result column="project_id" jdbcType="INTEGER" property="projectId" />
<result column="company_id" jdbcType="INTEGER" property="companyId" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, online, count, per, platformType, time, userName, project_id, company_id
</sql>
<select id="selectByExample" parameterType="com.topsail.influxdb.pojo.OnlineRateExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from online_rate
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from online_rate
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from online_rate
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.topsail.influxdb.pojo.OnlineRateExample">
delete from online_rate
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.topsail.influxdb.pojo.OnlineRate">
insert into online_rate (id, online, count,
per, platformType, time,
userName, project_id, company_id
)
values (#{id,jdbcType=INTEGER}, #{online,jdbcType=INTEGER}, #{count,jdbcType=INTEGER},
#{per,jdbcType=DOUBLE}, #{platformtype,jdbcType=VARCHAR}, #{time,jdbcType=TIMESTAMP},
#{username,jdbcType=VARCHAR}, #{projectId,jdbcType=INTEGER}, #{companyId,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.topsail.influxdb.pojo.OnlineRate">
insert into online_rate
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="online != null">
online,
</if>
<if test="count != null">
count,
</if>
<if test="per != null">
per,
</if>
<if test="platformtype != null">
platformType,
</if>
<if test="time != null">
time,
</if>
<if test="username != null">
userName,
</if>
<if test="projectId != null">
project_id,
</if>
<if test="companyId != null">
company_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="online != null">
#{online,jdbcType=INTEGER},
</if>
<if test="count != null">
#{count,jdbcType=INTEGER},
</if>
<if test="per != null">
#{per,jdbcType=DOUBLE},
</if>
<if test="platformtype != null">
#{platformtype,jdbcType=VARCHAR},
</if>
<if test="time != null">
#{time,jdbcType=TIMESTAMP},
</if>
<if test="username != null">
#{username,jdbcType=VARCHAR},
</if>
<if test="projectId != null">
#{projectId,jdbcType=INTEGER},
</if>
<if test="companyId != null">
#{companyId,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.topsail.influxdb.pojo.OnlineRateExample" resultType="java.lang.Long">
select count(*) from online_rate
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update online_rate
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.online != null">
online = #{record.online,jdbcType=INTEGER},
</if>
<if test="record.count != null">
count = #{record.count,jdbcType=INTEGER},
</if>
<if test="record.per != null">
per = #{record.per,jdbcType=DOUBLE},
</if>
<if test="record.platformtype != null">
platformType = #{record.platformtype,jdbcType=VARCHAR},
</if>
<if test="record.time != null">
time = #{record.time,jdbcType=TIMESTAMP},
</if>
<if test="record.username != null">
userName = #{record.username,jdbcType=VARCHAR},
</if>
<if test="record.projectId != null">
project_id = #{record.projectId,jdbcType=INTEGER},
</if>
<if test="record.companyId != null">
company_id = #{record.companyId,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update online_rate
set id = #{record.id,jdbcType=INTEGER},
online = #{record.online,jdbcType=INTEGER},
count = #{record.count,jdbcType=INTEGER},
per = #{record.per,jdbcType=DOUBLE},
platformType = #{record.platformtype,jdbcType=VARCHAR},
time = #{record.time,jdbcType=TIMESTAMP},
userName = #{record.username,jdbcType=VARCHAR},
project_id = #{record.projectId,jdbcType=INTEGER},
company_id = #{record.companyId,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.topsail.influxdb.pojo.OnlineRate">
update online_rate
<set>
<if test="online != null">
online = #{online,jdbcType=INTEGER},
</if>
<if test="count != null">
count = #{count,jdbcType=INTEGER},
</if>
<if test="per != null">
per = #{per,jdbcType=DOUBLE},
</if>
<if test="platformtype != null">
platformType = #{platformtype,jdbcType=VARCHAR},
</if>
<if test="time != null">
time = #{time,jdbcType=TIMESTAMP},
</if>
<if test="username != null">
userName = #{username,jdbcType=VARCHAR},
</if>
<if test="projectId != null">
project_id = #{projectId,jdbcType=INTEGER},
</if>
<if test="companyId != null">
company_id = #{companyId,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.topsail.influxdb.pojo.OnlineRate">
update online_rate
set online = #{online,jdbcType=INTEGER},
count = #{count,jdbcType=INTEGER},
per = #{per,jdbcType=DOUBLE},
platformType = #{platformtype,jdbcType=VARCHAR},
time = #{time,jdbcType=TIMESTAMP},
userName = #{username,jdbcType=VARCHAR},
project_id = #{projectId,jdbcType=INTEGER},
company_id = #{companyId,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
<insert id="batchInsert" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into online_rate
(id, online, count, per, platformType, time, userName, project_id, company_id)
values
<foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=INTEGER}, #{item.online,jdbcType=INTEGER}, #{item.count,jdbcType=INTEGER},
#{item.per,jdbcType=DOUBLE}, #{item.platformtype,jdbcType=VARCHAR}, #{item.time,jdbcType=TIMESTAMP},
#{item.username,jdbcType=VARCHAR}, #{item.projectId,jdbcType=INTEGER}, #{item.companyId,jdbcType=INTEGER}
)
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into online_rate (
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
)
values
<foreach collection="list" item="item" separator=",">
(
<foreach collection="selective" item="column" separator=",">
<if test="'id'.toString() == column.value">
#{item.id,jdbcType=INTEGER}
</if>
<if test="'online'.toString() == column.value">
#{item.online,jdbcType=INTEGER}
</if>
<if test="'count'.toString() == column.value">
#{item.count,jdbcType=INTEGER}
</if>
<if test="'per'.toString() == column.value">
#{item.per,jdbcType=DOUBLE}
</if>
<if test="'platformType'.toString() == column.value">
#{item.platformtype,jdbcType=VARCHAR}
</if>
<if test="'time'.toString() == column.value">
#{item.time,jdbcType=TIMESTAMP}
</if>
<if test="'userName'.toString() == column.value">
#{item.username,jdbcType=VARCHAR}
</if>
<if test="'project_id'.toString() == column.value">
#{item.projectId,jdbcType=INTEGER}
</if>
<if test="'company_id'.toString() == column.value">
#{item.companyId,jdbcType=INTEGER}
</if>
</foreach>
)
</foreach>
</insert>
</mapper>

+ 40
- 0
src/main/java/com/topsail/influxdb/mapper/OnlineRateViewMapper.java View File

@ -0,0 +1,40 @@
package com.topsail.influxdb.mapper;
import com.topsail.influxdb.pojo.OnlineRateView;
import com.topsail.influxdb.pojo.OnlineRateViewExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface OnlineRateViewMapper {
long countByExample(OnlineRateViewExample example);
int deleteByExample(OnlineRateViewExample example);
int insert(OnlineRateView record);
int insertSelective(OnlineRateView record);
List<OnlineRateView> selectByExample(OnlineRateViewExample example);
int updateByExampleSelective(@Param("record") OnlineRateView record, @Param("example") OnlineRateViewExample example);
int updateByExample(@Param("record") OnlineRateView record, @Param("example") OnlineRateViewExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table online_rate_view
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsert(@Param("list") List<OnlineRateView> list);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table online_rate_view
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsertSelective(@Param("list") List<OnlineRateView> list, @Param("selective") OnlineRateView.Column ... selective);
}

+ 195
- 0
src/main/java/com/topsail/influxdb/mapper/OnlineRateViewMapper.xml View File

@ -0,0 +1,195 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.topsail.influxdb.mapper.OnlineRateViewMapper">
<resultMap id="BaseResultMap" type="com.topsail.influxdb.pojo.OnlineRateView">
<result column="project_id" jdbcType="INTEGER" property="projectId" />
<result column="time" jdbcType="TIMESTAMP" property="time" />
<result column="num" jdbcType="BIGINT" property="num" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
project_id, time, num
</sql>
<select id="selectByExample" parameterType="com.topsail.influxdb.pojo.OnlineRateViewExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from online_rate_view
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<delete id="deleteByExample" parameterType="com.topsail.influxdb.pojo.OnlineRateViewExample">
delete from online_rate_view
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.topsail.influxdb.pojo.OnlineRateView">
insert into online_rate_view (project_id, time, num
)
values (#{projectId,jdbcType=INTEGER}, #{time,jdbcType=TIMESTAMP}, #{num,jdbcType=BIGINT}
)
</insert>
<insert id="insertSelective" parameterType="com.topsail.influxdb.pojo.OnlineRateView">
insert into online_rate_view
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="projectId != null">
project_id,
</if>
<if test="time != null">
time,
</if>
<if test="num != null">
num,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="projectId != null">
#{projectId,jdbcType=INTEGER},
</if>
<if test="time != null">
#{time,jdbcType=TIMESTAMP},
</if>
<if test="num != null">
#{num,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.topsail.influxdb.pojo.OnlineRateViewExample" resultType="java.lang.Long">
select count(*) from online_rate_view
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update online_rate_view
<set>
<if test="record.projectId != null">
project_id = #{record.projectId,jdbcType=INTEGER},
</if>
<if test="record.time != null">
time = #{record.time,jdbcType=TIMESTAMP},
</if>
<if test="record.num != null">
num = #{record.num,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update online_rate_view
set project_id = #{record.projectId,jdbcType=INTEGER},
time = #{record.time,jdbcType=TIMESTAMP},
num = #{record.num,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<insert id="batchInsert" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into online_rate_view
(project_id, time, num)
values
<foreach collection="list" item="item" separator=",">
(#{item.projectId,jdbcType=INTEGER}, #{item.time,jdbcType=TIMESTAMP}, #{item.num,jdbcType=BIGINT}
)
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into online_rate_view (
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
)
values
<foreach collection="list" item="item" separator=",">
(
<foreach collection="selective" item="column" separator=",">
<if test="'project_id'.toString() == column.value">
#{item.projectId,jdbcType=INTEGER}
</if>
<if test="'time'.toString() == column.value">
#{item.time,jdbcType=TIMESTAMP}
</if>
<if test="'num'.toString() == column.value">
#{item.num,jdbcType=BIGINT}
</if>
</foreach>
)
</foreach>
</insert>
</mapper>

+ 48
- 0
src/main/java/com/topsail/influxdb/mapper/ProjectMapper.java View File

@ -0,0 +1,48 @@
package com.topsail.influxdb.mapper;
import com.topsail.influxdb.pojo.Project;
import com.topsail.influxdb.pojo.ProjectExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface ProjectMapper {
long countByExample(ProjectExample example);
int deleteByExample(ProjectExample example);
int deleteByPrimaryKey(Integer id);
int insert(Project record);
int insertSelective(Project record);
List<Project> selectByExample(ProjectExample example);
Project selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") Project record, @Param("example") ProjectExample example);
int updateByExample(@Param("record") Project record, @Param("example") ProjectExample example);
int updateByPrimaryKeySelective(Project record);
int updateByPrimaryKey(Project record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table project
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsert(@Param("list") List<Project> list);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table project
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsertSelective(@Param("list") List<Project> list, @Param("selective") Project.Column ... selective);
}

+ 355
- 0
src/main/java/com/topsail/influxdb/mapper/ProjectMapper.xml View File

@ -0,0 +1,355 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.topsail.influxdb.mapper.ProjectMapper">
<resultMap id="BaseResultMap" type="com.topsail.influxdb.pojo.Project">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="platformType" jdbcType="VARCHAR" property="platformtype" />
<result column="descr" jdbcType="VARCHAR" property="descr" />
<result column="ip" jdbcType="VARCHAR" property="ip" />
<result column="port" jdbcType="VARCHAR" property="port" />
<result column="protocol" jdbcType="VARCHAR" property="protocol" />
<result column="order_id" jdbcType="INTEGER" property="orderId" />
<result column="company_id" jdbcType="INTEGER" property="companyId" />
<result column="time" jdbcType="TIMESTAMP" property="time" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, name, platformType, descr, ip, port, protocol, order_id, company_id, time
</sql>
<select id="selectByExample" parameterType="com.topsail.influxdb.pojo.ProjectExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from project
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from project
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from project
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.topsail.influxdb.pojo.ProjectExample">
delete from project
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.topsail.influxdb.pojo.Project">
insert into project (id, name, platformType,
descr, ip, port, protocol,
order_id, company_id, time
)
values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{platformtype,jdbcType=VARCHAR},
#{descr,jdbcType=VARCHAR}, #{ip,jdbcType=VARCHAR}, #{port,jdbcType=VARCHAR}, #{protocol,jdbcType=VARCHAR},
#{orderId,jdbcType=INTEGER}, #{companyId,jdbcType=INTEGER}, #{time,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.topsail.influxdb.pojo.Project">
insert into project
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="name != null">
name,
</if>
<if test="platformtype != null">
platformType,
</if>
<if test="descr != null">
descr,
</if>
<if test="ip != null">
ip,
</if>
<if test="port != null">
port,
</if>
<if test="protocol != null">
protocol,
</if>
<if test="orderId != null">
order_id,
</if>
<if test="companyId != null">
company_id,
</if>
<if test="time != null">
time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="platformtype != null">
#{platformtype,jdbcType=VARCHAR},
</if>
<if test="descr != null">
#{descr,jdbcType=VARCHAR},
</if>
<if test="ip != null">
#{ip,jdbcType=VARCHAR},
</if>
<if test="port != null">
#{port,jdbcType=VARCHAR},
</if>
<if test="protocol != null">
#{protocol,jdbcType=VARCHAR},
</if>
<if test="orderId != null">
#{orderId,jdbcType=INTEGER},
</if>
<if test="companyId != null">
#{companyId,jdbcType=INTEGER},
</if>
<if test="time != null">
#{time,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.topsail.influxdb.pojo.ProjectExample" resultType="java.lang.Long">
select count(*) from project
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update project
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.platformtype != null">
platformType = #{record.platformtype,jdbcType=VARCHAR},
</if>
<if test="record.descr != null">
descr = #{record.descr,jdbcType=VARCHAR},
</if>
<if test="record.ip != null">
ip = #{record.ip,jdbcType=VARCHAR},
</if>
<if test="record.port != null">
port = #{record.port,jdbcType=VARCHAR},
</if>
<if test="record.protocol != null">
protocol = #{record.protocol,jdbcType=VARCHAR},
</if>
<if test="record.orderId != null">
order_id = #{record.orderId,jdbcType=INTEGER},
</if>
<if test="record.companyId != null">
company_id = #{record.companyId,jdbcType=INTEGER},
</if>
<if test="record.time != null">
time = #{record.time,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update project
set id = #{record.id,jdbcType=INTEGER},
name = #{record.name,jdbcType=VARCHAR},
platformType = #{record.platformtype,jdbcType=VARCHAR},
descr = #{record.descr,jdbcType=VARCHAR},
ip = #{record.ip,jdbcType=VARCHAR},
port = #{record.port,jdbcType=VARCHAR},
protocol = #{record.protocol,jdbcType=VARCHAR},
order_id = #{record.orderId,jdbcType=INTEGER},
company_id = #{record.companyId,jdbcType=INTEGER},
time = #{record.time,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.topsail.influxdb.pojo.Project">
update project
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="platformtype != null">
platformType = #{platformtype,jdbcType=VARCHAR},
</if>
<if test="descr != null">
descr = #{descr,jdbcType=VARCHAR},
</if>
<if test="ip != null">
ip = #{ip,jdbcType=VARCHAR},
</if>
<if test="port != null">
port = #{port,jdbcType=VARCHAR},
</if>
<if test="protocol != null">
protocol = #{protocol,jdbcType=VARCHAR},
</if>
<if test="orderId != null">
order_id = #{orderId,jdbcType=INTEGER},
</if>
<if test="companyId != null">
company_id = #{companyId,jdbcType=INTEGER},
</if>
<if test="time != null">
time = #{time,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.topsail.influxdb.pojo.Project">
update project
set name = #{name,jdbcType=VARCHAR},
platformType = #{platformtype,jdbcType=VARCHAR},
descr = #{descr,jdbcType=VARCHAR},
ip = #{ip,jdbcType=VARCHAR},
port = #{port,jdbcType=VARCHAR},
protocol = #{protocol,jdbcType=VARCHAR},
order_id = #{orderId,jdbcType=INTEGER},
company_id = #{companyId,jdbcType=INTEGER},
time = #{time,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<insert id="batchInsert" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into project
(id, name, platformType, descr, ip, port, protocol, order_id, company_id, time)
values
<foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=INTEGER}, #{item.name,jdbcType=VARCHAR}, #{item.platformtype,jdbcType=VARCHAR},
#{item.descr,jdbcType=VARCHAR}, #{item.ip,jdbcType=VARCHAR}, #{item.port,jdbcType=VARCHAR},
#{item.protocol,jdbcType=VARCHAR}, #{item.orderId,jdbcType=INTEGER}, #{item.companyId,jdbcType=INTEGER},
#{item.time,jdbcType=TIMESTAMP})
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into project (
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
)
values
<foreach collection="list" item="item" separator=",">
(
<foreach collection="selective" item="column" separator=",">
<if test="'id'.toString() == column.value">
#{item.id,jdbcType=INTEGER}
</if>
<if test="'name'.toString() == column.value">
#{item.name,jdbcType=VARCHAR}
</if>
<if test="'platformType'.toString() == column.value">
#{item.platformtype,jdbcType=VARCHAR}
</if>
<if test="'descr'.toString() == column.value">
#{item.descr,jdbcType=VARCHAR}
</if>
<if test="'ip'.toString() == column.value">
#{item.ip,jdbcType=VARCHAR}
</if>
<if test="'port'.toString() == column.value">
#{item.port,jdbcType=VARCHAR}
</if>
<if test="'protocol'.toString() == column.value">
#{item.protocol,jdbcType=VARCHAR}
</if>
<if test="'order_id'.toString() == column.value">
#{item.orderId,jdbcType=INTEGER}
</if>
<if test="'company_id'.toString() == column.value">
#{item.companyId,jdbcType=INTEGER}
</if>
<if test="'time'.toString() == column.value">
#{item.time,jdbcType=TIMESTAMP}
</if>
</foreach>
)
</foreach>
</insert>
</mapper>

+ 48
- 0
src/main/java/com/topsail/influxdb/mapper/ProjectTransmitMapper.java View File

@ -0,0 +1,48 @@
package com.topsail.influxdb.mapper;
import com.topsail.influxdb.pojo.ProjectTransmit;
import com.topsail.influxdb.pojo.ProjectTransmitExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface ProjectTransmitMapper {
long countByExample(ProjectTransmitExample example);
int deleteByExample(ProjectTransmitExample example);
int deleteByPrimaryKey(Integer id);
int insert(ProjectTransmit record);
int insertSelective(ProjectTransmit record);
List<ProjectTransmit> selectByExample(ProjectTransmitExample example);
ProjectTransmit selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") ProjectTransmit record, @Param("example") ProjectTransmitExample example);
int updateByExample(@Param("record") ProjectTransmit record, @Param("example") ProjectTransmitExample example);
int updateByPrimaryKeySelective(ProjectTransmit record);
int updateByPrimaryKey(ProjectTransmit record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table project_transmit
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsert(@Param("list") List<ProjectTransmit> list);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table project_transmit
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsertSelective(@Param("list") List<ProjectTransmit> list, @Param("selective") ProjectTransmit.Column ... selective);
}

+ 432
- 0
src/main/java/com/topsail/influxdb/mapper/ProjectTransmitMapper.xml View File

@ -0,0 +1,432 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.topsail.influxdb.mapper.ProjectTransmitMapper">
<resultMap id="BaseResultMap" type="com.topsail.influxdb.pojo.ProjectTransmit">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="company_id" jdbcType="INTEGER" property="companyId" />
<result column="project_id" jdbcType="INTEGER" property="projectId" />
<result column="protocol" jdbcType="VARCHAR" property="protocol" />
<result column="ip" jdbcType="VARCHAR" property="ip" />
<result column="port" jdbcType="VARCHAR" property="port" />
<result column="time" jdbcType="TIMESTAMP" property="time" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="total" jdbcType="INTEGER" property="total" />
<result column="suc" jdbcType="INTEGER" property="suc" />
<result column="err" jdbcType="INTEGER" property="err" />
<result column="params" jdbcType="VARCHAR" property="params" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, company_id, project_id, protocol, ip, port, time, type, status, update_time,
total, suc, err, params
</sql>
<select id="selectByExample" parameterType="com.topsail.influxdb.pojo.ProjectTransmitExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from project_transmit
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from project_transmit
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from project_transmit
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.topsail.influxdb.pojo.ProjectTransmitExample">
delete from project_transmit
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.topsail.influxdb.pojo.ProjectTransmit">
insert into project_transmit (id, company_id, project_id,
protocol, ip, port,
time, type, status,
update_time, total, suc,
err, params)
values (#{id,jdbcType=INTEGER}, #{companyId,jdbcType=INTEGER}, #{projectId,jdbcType=INTEGER},
#{protocol,jdbcType=VARCHAR}, #{ip,jdbcType=VARCHAR}, #{port,jdbcType=VARCHAR},
#{time,jdbcType=TIMESTAMP}, #{type,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
#{updateTime,jdbcType=TIMESTAMP}, #{total,jdbcType=INTEGER}, #{suc,jdbcType=INTEGER},
#{err,jdbcType=INTEGER}, #{params,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.topsail.influxdb.pojo.ProjectTransmit">
insert into project_transmit
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="companyId != null">
company_id,
</if>
<if test="projectId != null">
project_id,
</if>
<if test="protocol != null">
protocol,
</if>
<if test="ip != null">
ip,
</if>
<if test="port != null">
port,
</if>
<if test="time != null">
time,
</if>
<if test="type != null">
type,
</if>
<if test="status != null">
status,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="total != null">
total,
</if>
<if test="suc != null">
suc,
</if>
<if test="err != null">
err,
</if>
<if test="params != null">
params,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="companyId != null">
#{companyId,jdbcType=INTEGER},
</if>
<if test="projectId != null">
#{projectId,jdbcType=INTEGER},
</if>
<if test="protocol != null">
#{protocol,jdbcType=VARCHAR},
</if>
<if test="ip != null">
#{ip,jdbcType=VARCHAR},
</if>
<if test="port != null">
#{port,jdbcType=VARCHAR},
</if>
<if test="time != null">
#{time,jdbcType=TIMESTAMP},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="total != null">
#{total,jdbcType=INTEGER},
</if>
<if test="suc != null">
#{suc,jdbcType=INTEGER},
</if>
<if test="err != null">
#{err,jdbcType=INTEGER},
</if>
<if test="params != null">
#{params,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.topsail.influxdb.pojo.ProjectTransmitExample" resultType="java.lang.Long">
select count(*) from project_transmit
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update project_transmit
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.companyId != null">
company_id = #{record.companyId,jdbcType=INTEGER},
</if>
<if test="record.projectId != null">
project_id = #{record.projectId,jdbcType=INTEGER},
</if>
<if test="record.protocol != null">
protocol = #{record.protocol,jdbcType=VARCHAR},
</if>
<if test="record.ip != null">
ip = #{record.ip,jdbcType=VARCHAR},
</if>
<if test="record.port != null">
port = #{record.port,jdbcType=VARCHAR},
</if>
<if test="record.time != null">
time = #{record.time,jdbcType=TIMESTAMP},
</if>
<if test="record.type != null">
type = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.status != null">
status = #{record.status,jdbcType=INTEGER},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.total != null">
total = #{record.total,jdbcType=INTEGER},
</if>
<if test="record.suc != null">
suc = #{record.suc,jdbcType=INTEGER},
</if>
<if test="record.err != null">
err = #{record.err,jdbcType=INTEGER},
</if>
<if test="record.params != null">
params = #{record.params,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update project_transmit
set id = #{record.id,jdbcType=INTEGER},
company_id = #{record.companyId,jdbcType=INTEGER},
project_id = #{record.projectId,jdbcType=INTEGER},
protocol = #{record.protocol,jdbcType=VARCHAR},
ip = #{record.ip,jdbcType=VARCHAR},
port = #{record.port,jdbcType=VARCHAR},
time = #{record.time,jdbcType=TIMESTAMP},
type = #{record.type,jdbcType=VARCHAR},
status = #{record.status,jdbcType=INTEGER},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
total = #{record.total,jdbcType=INTEGER},
suc = #{record.suc,jdbcType=INTEGER},
err = #{record.err,jdbcType=INTEGER},
params = #{record.params,jdbcType=VARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.topsail.influxdb.pojo.ProjectTransmit">
update project_transmit
<set>
<if test="companyId != null">
company_id = #{companyId,jdbcType=INTEGER},
</if>
<if test="projectId != null">
project_id = #{projectId,jdbcType=INTEGER},
</if>
<if test="protocol != null">
protocol = #{protocol,jdbcType=VARCHAR},
</if>
<if test="ip != null">
ip = #{ip,jdbcType=VARCHAR},
</if>
<if test="port != null">
port = #{port,jdbcType=VARCHAR},
</if>
<if test="time != null">
time = #{time,jdbcType=TIMESTAMP},
</if>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="total != null">
total = #{total,jdbcType=INTEGER},
</if>
<if test="suc != null">
suc = #{suc,jdbcType=INTEGER},
</if>
<if test="err != null">
err = #{err,jdbcType=INTEGER},
</if>
<if test="params != null">
params = #{params,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.topsail.influxdb.pojo.ProjectTransmit">
update project_transmit
set company_id = #{companyId,jdbcType=INTEGER},
project_id = #{projectId,jdbcType=INTEGER},
protocol = #{protocol,jdbcType=VARCHAR},
ip = #{ip,jdbcType=VARCHAR},
port = #{port,jdbcType=VARCHAR},
time = #{time,jdbcType=TIMESTAMP},
type = #{type,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
update_time = #{updateTime,jdbcType=TIMESTAMP},
total = #{total,jdbcType=INTEGER},
suc = #{suc,jdbcType=INTEGER},
err = #{err,jdbcType=INTEGER},
params = #{params,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<insert id="batchInsert" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into project_transmit
(id, company_id, project_id, protocol, ip, port, time, type, status, update_time,
total, suc, err, params)
values
<foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=INTEGER}, #{item.companyId,jdbcType=INTEGER}, #{item.projectId,jdbcType=INTEGER},
#{item.protocol,jdbcType=VARCHAR}, #{item.ip,jdbcType=VARCHAR}, #{item.port,jdbcType=VARCHAR},
#{item.time,jdbcType=TIMESTAMP}, #{item.type,jdbcType=VARCHAR}, #{item.status,jdbcType=INTEGER},
#{item.updateTime,jdbcType=TIMESTAMP}, #{item.total,jdbcType=INTEGER}, #{item.suc,jdbcType=INTEGER},
#{item.err,jdbcType=INTEGER}, #{item.params,jdbcType=VARCHAR})
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into project_transmit (
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
)
values
<foreach collection="list" item="item" separator=",">
(
<foreach collection="selective" item="column" separator=",">
<if test="'id'.toString() == column.value">
#{item.id,jdbcType=INTEGER}
</if>
<if test="'company_id'.toString() == column.value">
#{item.companyId,jdbcType=INTEGER}
</if>
<if test="'project_id'.toString() == column.value">
#{item.projectId,jdbcType=INTEGER}
</if>
<if test="'protocol'.toString() == column.value">
#{item.protocol,jdbcType=VARCHAR}
</if>
<if test="'ip'.toString() == column.value">
#{item.ip,jdbcType=VARCHAR}
</if>
<if test="'port'.toString() == column.value">
#{item.port,jdbcType=VARCHAR}
</if>
<if test="'time'.toString() == column.value">
#{item.time,jdbcType=TIMESTAMP}
</if>
<if test="'type'.toString() == column.value">
#{item.type,jdbcType=VARCHAR}
</if>
<if test="'status'.toString() == column.value">
#{item.status,jdbcType=INTEGER}
</if>
<if test="'update_time'.toString() == column.value">
#{item.updateTime,jdbcType=TIMESTAMP}
</if>
<if test="'total'.toString() == column.value">
#{item.total,jdbcType=INTEGER}
</if>
<if test="'suc'.toString() == column.value">
#{item.suc,jdbcType=INTEGER}
</if>
<if test="'err'.toString() == column.value">
#{item.err,jdbcType=INTEGER}
</if>
<if test="'params'.toString() == column.value">
#{item.params,jdbcType=VARCHAR}
</if>
</foreach>
)
</foreach>
</insert>
</mapper>

+ 48
- 0
src/main/java/com/topsail/influxdb/mapper/TransmitTypeMapper.java View File

@ -0,0 +1,48 @@
package com.topsail.influxdb.mapper;
import com.topsail.influxdb.pojo.TransmitType;
import com.topsail.influxdb.pojo.TransmitTypeExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface TransmitTypeMapper {
long countByExample(TransmitTypeExample example);
int deleteByExample(TransmitTypeExample example);
int deleteByPrimaryKey(Integer id);
int insert(TransmitType record);
int insertSelective(TransmitType record);
List<TransmitType> selectByExample(TransmitTypeExample example);
TransmitType selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") TransmitType record, @Param("example") TransmitTypeExample example);
int updateByExample(@Param("record") TransmitType record, @Param("example") TransmitTypeExample example);
int updateByPrimaryKeySelective(TransmitType record);
int updateByPrimaryKey(TransmitType record);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table transmit_type
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsert(@Param("list") List<TransmitType> list);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table transmit_type
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsertSelective(@Param("list") List<TransmitType> list, @Param("selective") TransmitType.Column ... selective);
}

+ 223
- 0
src/main/java/com/topsail/influxdb/mapper/TransmitTypeMapper.xml View File

@ -0,0 +1,223 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.topsail.influxdb.mapper.TransmitTypeMapper">
<resultMap id="BaseResultMap" type="com.topsail.influxdb.pojo.TransmitType">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="transmit_id" jdbcType="INTEGER" property="transmitId" />
<result column="datatype" jdbcType="INTEGER" property="datatype" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, transmit_id, datatype
</sql>
<select id="selectByExample" parameterType="com.topsail.influxdb.pojo.TransmitTypeExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from transmit_type
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from transmit_type
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from transmit_type
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.topsail.influxdb.pojo.TransmitTypeExample">
delete from transmit_type
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.topsail.influxdb.pojo.TransmitType">
insert into transmit_type (id, transmit_id, datatype
)
values (#{id,jdbcType=INTEGER}, #{transmitId,jdbcType=INTEGER}, #{datatype,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.topsail.influxdb.pojo.TransmitType">
insert into transmit_type
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="transmitId != null">
transmit_id,
</if>
<if test="datatype != null">
datatype,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="transmitId != null">
#{transmitId,jdbcType=INTEGER},
</if>
<if test="datatype != null">
#{datatype,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.topsail.influxdb.pojo.TransmitTypeExample" resultType="java.lang.Long">
select count(*) from transmit_type
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update transmit_type
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.transmitId != null">
transmit_id = #{record.transmitId,jdbcType=INTEGER},
</if>
<if test="record.datatype != null">
datatype = #{record.datatype,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update transmit_type
set id = #{record.id,jdbcType=INTEGER},
transmit_id = #{record.transmitId,jdbcType=INTEGER},
datatype = #{record.datatype,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.topsail.influxdb.pojo.TransmitType">
update transmit_type
<set>
<if test="transmitId != null">
transmit_id = #{transmitId,jdbcType=INTEGER},
</if>
<if test="datatype != null">
datatype = #{datatype,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.topsail.influxdb.pojo.TransmitType">
update transmit_type
set transmit_id = #{transmitId,jdbcType=INTEGER},
datatype = #{datatype,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
<insert id="batchInsert" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into transmit_type
(id, transmit_id, datatype)
values
<foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=INTEGER}, #{item.transmitId,jdbcType=INTEGER}, #{item.datatype,jdbcType=INTEGER}
)
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into transmit_type (
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
)
values
<foreach collection="list" item="item" separator=",">
(
<foreach collection="selective" item="column" separator=",">
<if test="'id'.toString() == column.value">
#{item.id,jdbcType=INTEGER}
</if>
<if test="'transmit_id'.toString() == column.value">
#{item.transmitId,jdbcType=INTEGER}
</if>
<if test="'datatype'.toString() == column.value">
#{item.datatype,jdbcType=INTEGER}
</if>
</foreach>
)
</foreach>
</insert>
</mapper>

+ 40
- 0
src/main/java/com/topsail/influxdb/mapper/UpdateMsgViewMapper.java View File

@ -0,0 +1,40 @@
package com.topsail.influxdb.mapper;
import com.topsail.influxdb.pojo.UpdateMsgView;
import com.topsail.influxdb.pojo.UpdateMsgViewExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface UpdateMsgViewMapper {
long countByExample(UpdateMsgViewExample example);
int deleteByExample(UpdateMsgViewExample example);
int insert(UpdateMsgView record);
int insertSelective(UpdateMsgView record);
List<UpdateMsgView> selectByExample(UpdateMsgViewExample example);
int updateByExampleSelective(@Param("record") UpdateMsgView record, @Param("example") UpdateMsgViewExample example);
int updateByExample(@Param("record") UpdateMsgView record, @Param("example") UpdateMsgViewExample example);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table update_msg_view
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsert(@Param("list") List<UpdateMsgView> list);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table update_msg_view
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
int batchInsertSelective(@Param("list") List<UpdateMsgView> list, @Param("selective") UpdateMsgView.Column ... selective);
}

+ 195
- 0
src/main/java/com/topsail/influxdb/mapper/UpdateMsgViewMapper.xml View File

@ -0,0 +1,195 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.topsail.influxdb.mapper.UpdateMsgViewMapper">
<resultMap id="BaseResultMap" type="com.topsail.influxdb.pojo.UpdateMsgView">
<result column="imei" jdbcType="VARCHAR" property="imei" />
<result column="period" jdbcType="VARCHAR" property="period" />
<result column="dperiod" jdbcType="INTEGER" property="dperiod" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
imei, period, dperiod
</sql>
<select id="selectByExample" parameterType="com.topsail.influxdb.pojo.UpdateMsgViewExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from update_msg_view
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<delete id="deleteByExample" parameterType="com.topsail.influxdb.pojo.UpdateMsgViewExample">
delete from update_msg_view
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.topsail.influxdb.pojo.UpdateMsgView">
insert into update_msg_view (imei, period, dperiod
)
values (#{imei,jdbcType=VARCHAR}, #{period,jdbcType=VARCHAR}, #{dperiod,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.topsail.influxdb.pojo.UpdateMsgView">
insert into update_msg_view
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="imei != null">
imei,
</if>
<if test="period != null">
period,
</if>
<if test="dperiod != null">
dperiod,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="imei != null">
#{imei,jdbcType=VARCHAR},
</if>
<if test="period != null">
#{period,jdbcType=VARCHAR},
</if>
<if test="dperiod != null">
#{dperiod,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.topsail.influxdb.pojo.UpdateMsgViewExample" resultType="java.lang.Long">
select count(*) from update_msg_view
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update update_msg_view
<set>
<if test="record.imei != null">
imei = #{record.imei,jdbcType=VARCHAR},
</if>
<if test="record.period != null">
period = #{record.period,jdbcType=VARCHAR},
</if>
<if test="record.dperiod != null">
dperiod = #{record.dperiod,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update update_msg_view
set imei = #{record.imei,jdbcType=VARCHAR},
period = #{record.period,jdbcType=VARCHAR},
dperiod = #{record.dperiod,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<insert id="batchInsert" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into update_msg_view
(imei, period, dperiod)
values
<foreach collection="list" item="item" separator=",">
(#{item.imei,jdbcType=VARCHAR}, #{item.period,jdbcType=VARCHAR}, #{item.dperiod,jdbcType=INTEGER}
)
</foreach>
</insert>
<insert id="batchInsertSelective" parameterType="map">
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
insert into update_msg_view (
<foreach collection="selective" item="column" separator=",">
${column.escapedColumnName}
</foreach>
)
values
<foreach collection="list" item="item" separator=",">
(
<foreach collection="selective" item="column" separator=",">
<if test="'imei'.toString() == column.value">
#{item.imei,jdbcType=VARCHAR}
</if>
<if test="'period'.toString() == column.value">
#{item.period,jdbcType=VARCHAR}
</if>
<if test="'dperiod'.toString() == column.value">
#{item.dperiod,jdbcType=INTEGER}
</if>
</foreach>
)
</foreach>
</insert>
</mapper>

+ 114
- 0
src/main/java/com/topsail/influxdb/model/AepModel.java View File

@ -0,0 +1,114 @@
package com.topsail.influxdb.model;
import com.alibaba.fastjson.JSONObject;
public class AepModel {
private String deviceType;
private String productId;
private String IMEI;
private String deviceId;
private String protocol;
private String messageType;
private JSONObject payload;
private String tenantId;
private String IMSI;
private String topic;
private int serviceId;
private long timestamp;
public String getDeviceType() {
return deviceType;
}
public void setDeviceType(String deviceType) {
this.deviceType = deviceType;
}
public String getProductId() {
return productId;
}
public void setProductId(String productId) {
this.productId = productId;
}
public String getIMEI() {
return IMEI;
}
public void setIMEI(String IMEI) {
this.IMEI = IMEI;
}
public String getDeviceId() {
return deviceId;
}
public void setDeviceId(String deviceId) {
this.deviceId = deviceId;
}
public String getProtocol() {
return protocol;
}
public void setProtocol(String protocol) {
this.protocol = protocol;
}
public String getMessageType() {
return messageType;
}
public void setMessageType(String messageType) {
this.messageType = messageType;
}
public JSONObject getPayload() {
return payload;
}
public void setPayload(JSONObject payload) {
this.payload = payload;
}
public String getTenantId() {
return tenantId;
}
public void setTenantId(String tenantId) {
this.tenantId = tenantId;
}
public String getIMSI() {
return IMSI;
}
public void setIMSI(String IMSI) {
this.IMSI = IMSI;
}
public String getTopic() {
return topic;
}
public void setTopic(String topic) {
this.topic = topic;
}
public int getServiceId() {
return serviceId;
}
public void setServiceId(int serviceId) {
this.serviceId = serviceId;
}
public long getTimestamp() {
return timestamp;
}
public void setTimestamp(long timestamp) {
this.timestamp = timestamp;
}
}

+ 34
- 0
src/main/java/com/topsail/influxdb/model/InfluxData.java View File

@ -0,0 +1,34 @@
package com.topsail.influxdb.model;
import com.influxdb.annotations.Column;
import com.influxdb.annotations.Measurement;
import java.time.Instant;
@Measurement(name = "history")
public class InfluxData {
@Column(tag = true)
public String imei;
@Column
public double value1;
@Column
public double value2;
@Column
public double value3;
@Column
public double value4;
@Column
public Integer battery;
@Column
public Integer sigal;
@Column
public String values;
@Column
public String unit;
@Column
public String alarmtype;
@Column
public String jsondata;
@Column(timestamp = true)
public Instant time;
}

+ 133
- 0
src/main/java/com/topsail/influxdb/model/NewtopData.java View File

@ -0,0 +1,133 @@
package com.topsail.influxdb.model;
public class NewtopData {
private int type;
private int length;
private int device_type;
private String imei;
private String sendtime;
private int battery_level;
private int signal_strength;
private String sampledata;
private String crc;
public String convertHexToString(String hex){
StringBuilder sb = new StringBuilder();
StringBuilder temp = new StringBuilder();
//49204c6f7665204a617661 split into two characters 49, 20, 4c...
for( int i=0; i<hex.length()-1; i+=2 ){
//grab the hex in pairs
String output = hex.substring(i, (i + 2));
//convert hex to decimal
int decimal = Integer.parseInt(output, 16);
//convert the decimal to character
sb.append((char)decimal);
temp.append(decimal);
}
return sb.toString();
}
static public int gettype(String body){
int slength=body.length();
if(slength>14){
if(body.substring(0,8).equals("7470736C")&&body.substring(slength-6,slength).equals("696F74")){
int type = Integer.parseInt(body.substring(8,10),16);
return type;
}
}
return -1;
}
public void parsebody(String body){
int slength=body.length();
if(slength>80){
if(body.substring(0,8).equals("7470736C")&&body.substring(slength-6,slength).equals("696F74")){
type = Integer.parseInt(body.substring(8,10),16);
length =Integer.parseInt(body.substring(10,14),16);
device_type = Integer.parseInt(body.substring(14,16),16);
imei = convertHexToString(body.substring(16,46));
sendtime = body.substring(48,60);
battery_level = Integer.parseInt(body.substring(60,62),16);
signal_strength = Integer.parseInt(body.substring(62,64),16);
sampledata = body.substring(64,slength-10);
}
}
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public int getLength() {
return length;
}
public void setLength(int length) {
this.length = length;
}
public int getDevice_type() {
return device_type;
}
public void setDevice_type(int device_type) {
this.device_type = device_type;
}
public String getImei() {
return imei;
}
public void setImei(String imei) {
this.imei = imei;
}
public String getSendtime() {
return sendtime;
}
public void setSendtime(String sendtime) {
this.sendtime = sendtime;
}
public int getBattery_level() {
return battery_level;
}
public void setBattery_level(int battery_level) {
this.battery_level = battery_level;
}
public int getSignal_strength() {
return signal_strength;
}
public void setSignal_strength(int signal_strength) {
this.signal_strength = signal_strength;
}
public String getSampledata() {
return sampledata;
}
public void setSampledata(String sampledata) {
this.sampledata = sampledata;
}
public String getCrc() {
return crc;
}
public void setCrc(String crc) {
this.crc = crc;
}
}

+ 112
- 0
src/main/java/com/topsail/influxdb/model/NewtopParam.java View File

@ -0,0 +1,112 @@
package com.topsail.influxdb.model;
import java.util.ArrayList;
import java.util.List;
public class NewtopParam {
private int type;
private int length;
private int device_type;
private String imei;
private String crc;
private List<ParamUnit> paramUnitList;
public String convertHexToString(String hex){
StringBuilder sb = new StringBuilder();
StringBuilder temp = new StringBuilder();
//49204c6f7665204a617661 split into two characters 49, 20, 4c...
for( int i=0; i<hex.length()-1; i+=2 ){
//grab the hex in pairs
String output = hex.substring(i, (i + 2));
//convert hex to decimal
int decimal = Integer.parseInt(output, 16);
//convert the decimal to character
sb.append((char)decimal);
temp.append(decimal);
}
return sb.toString();
}
public void parsebody(String body){
int slength=body.length();
if(slength>46){
if(body.substring(0,8).equals("7470736C")&&body.substring(slength-6,slength).equals("696F74")){
type = Integer.parseInt(body.substring(8,10),16);
length =Integer.parseInt(body.substring(10,14),16);
device_type = Integer.parseInt(body.substring(14,16),16);
imei = convertHexToString(body.substring(16,46));
int startindex=48;
paramUnitList=new ArrayList<>();
while(startindex<slength-10){
ParamUnit paramUnit=new ParamUnit();
paramUnit.setType(Integer.parseInt(body.substring(startindex,startindex+2),16));
int len=Integer.parseInt(body.substring(startindex+2,startindex+4),16);
paramUnit.setLen(len);
int ptype = paramUnit.getType();
if(ptype==1||ptype==2||ptype==6||ptype==7||ptype==8||ptype==9||ptype==14||ptype==15||ptype==16||ptype>23){
paramUnit.setValue(String.valueOf(Integer.parseInt(body.substring(startindex+4,startindex+4+len*2),16)));
//startindex+=12;
}else if(ptype==3||ptype==4||ptype==5||ptype==12||ptype==13){
paramUnit.setValue(convertHexToString(body.substring(startindex+4,startindex+4+len*2)));
}
startindex=startindex+4+len*2;
paramUnitList.add(paramUnit);
//paramUnit.setValue();
}
}
}
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public int getLength() {
return length;
}
public void setLength(int length) {
this.length = length;
}
public int getDevice_type() {
return device_type;
}
public void setDevice_type(int device_type) {
this.device_type = device_type;
}
public String getImei() {
return imei;
}
public void setImei(String imei) {
this.imei = imei;
}
public String getCrc() {
return crc;
}
public void setCrc(String crc) {
this.crc = crc;
}
public List<ParamUnit> getParamUnitList() {
return paramUnitList;
}
public void setParamUnitList(List<ParamUnit> paramUnitList) {
this.paramUnitList = paramUnitList;
}
}

+ 31
- 0
src/main/java/com/topsail/influxdb/model/ParamUnit.java View File

@ -0,0 +1,31 @@
package com.topsail.influxdb.model;
public class ParamUnit {
private int type;
private int len;
private String value;
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public int getLen() {
return len;
}
public void setLen(int len) {
this.len = len;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}

+ 94
- 0
src/main/java/com/topsail/influxdb/model/TransmitModel.java View File

@ -0,0 +1,94 @@
package com.topsail.influxdb.model;
public class TransmitModel {
private String sourcetype;
private String type;
private String protocol;
private String ip;
private String port;
private Object data;
private String params;
private int id;
private int maxretry;
private int retry;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getMaxretry() {
return maxretry;
}
public void setMaxretry(int maxretry) {
this.maxretry = maxretry;
}
public int getRetry() {
return retry;
}
public void setRetry(int retry) {
this.retry = retry;
}
public String getParams() {
return params;
}
public void setParams(String params) {
this.params = params;
}
public String getSourcetype() {
return sourcetype;
}
public void setSourcetype(String sourcetype) {
this.sourcetype = sourcetype;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getProtocol() {
return protocol;
}
public void setProtocol(String protocol) {
this.protocol = protocol;
}
public String getIp() {
return ip;
}
public void setIp(String ip) {
this.ip = ip;
}
public String getPort() {
return port;
}
public void setPort(String port) {
this.port = port;
}
public Object getData() {
return data;
}
public void setData(Object data) {
this.data = data;
}
}

+ 44
- 0
src/main/java/com/topsail/influxdb/model/UserPlat.java View File

@ -0,0 +1,44 @@
package com.topsail.influxdb.model;
public class UserPlat {
private String userName;
private String platform;
@Override
public boolean equals(Object obj)
{
if(obj instanceof UserPlat){
if (this.getUserName().equals(((UserPlat)obj).getUserName())
&&(this.getPlatform().equals(((UserPlat)obj).getPlatform()))){
return true;
}
}
return false;
}
@Override
public int hashCode() {
return 0;
}
public UserPlat(String user,String plat){
this.userName=user;
this.platform=plat;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getPlatform() {
return platform;
}
public void setPlatform(String platform) {
this.platform = platform;
}
}

+ 409
- 0
src/main/java/com/topsail/influxdb/pojo/Alarm.java View File

@ -0,0 +1,409 @@
package com.topsail.influxdb.pojo;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
public class Alarm {
public static void main(String[] args) {
System.out.println(Integer.parseInt("31",16)+"");
String result="";
String[] units={"℃","O/F"};
String[] datas={"27.12","0a"};
int i = 0;
while (i < 2) {
if (i != 0) {
result += ",";
}
String un = units[i];
String data = datas[i];
String newdata = data;
if (un.trim().equals("O/F")) {
String first = data.substring(0, 1);
if (first.equals("1")&&data.length()==2) {
data = data.substring(1, data.length());
}
/* if (data.equals("0.0000")) {
newdata = "0";
} else if (data.equals("0a")) {
newdata = "10";
} else if (data.equals("a")) {
newdata = "10";
} else {
newdata = String.valueOf((int) Double.parseDouble(data));
}*/
if(data.equals("0a")||data.equals("a")){
newdata = "10";
} else{
newdata=Integer.parseInt(String.valueOf((int) Double.parseDouble(data)),16)+"";
}
}
result += newdata;
i++;
}
System.out.println(result);
}
private Long id;
private String imei;
private String alarmtype;
private String alarmvalue;
private String unit;
private Integer status;
private Date createtime;
private Date updatetime;
private Date endtime;
/**
*告警类型msg
*/
private String alarmMsg;
/**
*地址
*/
private String address;
/**
*经度
*/
private Double lon;
/**
*纬度
*/
private Double lat;
/**
*uuid
*/
private String uuid;
/**
*描述
*/
private String descr;
/**
* 总告警
*/
private Integer alarmN;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getImei() {
return imei;
}
public void setImei(String imei) {
this.imei = imei == null ? null : imei.trim();
}
public String getAlarmtype() {
return alarmtype;
}
public void setAlarmtype(String alarmtype) {
this.alarmtype = alarmtype == null ? null : alarmtype.trim();
}
public String getAlarmvalue() {
return alarmvalue;
}
public void setAlarmvalue(String alarmvalue) {
this.alarmvalue = alarmvalue == null ? null : alarmvalue.trim();
}
public String getUnit() {
return unit;
}
public void setUnit(String unit) {
this.unit = unit == null ? null : unit.trim();
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Date getCreatetime() {
return createtime;
}
public void setCreatetime(Date createtime) {
this.createtime = createtime;
}
public Date getUpdatetime() {
return updatetime;
}
public void setUpdatetime(Date updatetime) {
this.updatetime = updatetime;
}
public Date getEndtime() {
return endtime;
}
public void setEndtime(Date endtime) {
this.endtime = endtime;
}
public String getAlarmMsg() {
return alarmMsg;
}
public void setAlarmMsg(String alarmMsg) {
this.alarmMsg = alarmMsg;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public Double getLon() {
return lon;
}
public void setLon(Double lon) {
this.lon = lon;
}
public Double getLat() {
return lat;
}
public void setLat(Double lat) {
this.lat = lat;
}
public String getUuid() {
return uuid;
}
public void setUuid(String uuid) {
this.uuid = uuid;
}
public String getDescr() {
return descr;
}
public void setDescr(String descr) {
this.descr = descr;
}
public Integer getAlarmN() {
return alarmN;
}
public void setAlarmN(Integer alarmN) {
this.alarmN = alarmN;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table alarm
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public enum Column {
id("id", "id", "BIGINT", false),
imei("Imei", "imei", "VARCHAR", false),
alarmtype("alarmType", "alarmtype", "VARCHAR", false),
alarmvalue("alarmValue", "alarmvalue", "VARCHAR", false),
unit("unit", "unit", "VARCHAR", false),
status("status", "status", "INTEGER", false),
createtime("createtime", "createtime", "TIMESTAMP", false),
updatetime("updatetime", "updatetime", "TIMESTAMP", false),
endtime("endtime", "endtime", "TIMESTAMP", false);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table alarm
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String BEGINNING_DELIMITER = "\"";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table alarm
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String ENDING_DELIMITER = "\"";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table alarm
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String column;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table alarm
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final boolean isColumnNameDelimited;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table alarm
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String javaProperty;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table alarm
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String jdbcType;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table alarm
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String value() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table alarm
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getValue() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table alarm
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJavaProperty() {
return this.javaProperty;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table alarm
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJdbcType() {
return this.jdbcType;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table alarm
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
this.column = column;
this.javaProperty = javaProperty;
this.jdbcType = jdbcType;
this.isColumnNameDelimited = isColumnNameDelimited;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table alarm
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String desc() {
return this.getEscapedColumnName() + " DESC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table alarm
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String asc() {
return this.getEscapedColumnName() + " ASC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table alarm
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public static Column[] excludes(Column ... excludes) {
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
if (excludes != null && excludes.length > 0) {
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
}
return columns.toArray(new Column[]{});
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table alarm
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getEscapedColumnName() {
if (this.isColumnNameDelimited) {
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
} else {
return this.column;
}
}
}
}

+ 781
- 0
src/main/java/com/topsail/influxdb/pojo/AlarmExample.java View File

@ -0,0 +1,781 @@
package com.topsail.influxdb.pojo;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class AlarmExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public AlarmExample() {
oredCriteria = new ArrayList<Criteria>();
}
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<Criteria> 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;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> 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<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> 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 andImeiIsNull() {
addCriterion("Imei is null");
return (Criteria) this;
}
public Criteria andImeiIsNotNull() {
addCriterion("Imei is not null");
return (Criteria) this;
}
public Criteria andImeiEqualTo(String value) {
addCriterion("Imei =", value, "imei");
return (Criteria) this;
}
public Criteria andImeiNotEqualTo(String value) {
addCriterion("Imei <>", value, "imei");
return (Criteria) this;
}
public Criteria andImeiGreaterThan(String value) {
addCriterion("Imei >", value, "imei");
return (Criteria) this;
}
public Criteria andImeiGreaterThanOrEqualTo(String value) {
addCriterion("Imei >=", value, "imei");
return (Criteria) this;
}
public Criteria andImeiLessThan(String value) {
addCriterion("Imei <", value, "imei");
return (Criteria) this;
}
public Criteria andImeiLessThanOrEqualTo(String value) {
addCriterion("Imei <=", value, "imei");
return (Criteria) this;
}
public Criteria andImeiLike(String value) {
addCriterion("Imei like", value, "imei");
return (Criteria) this;
}
public Criteria andImeiNotLike(String value) {
addCriterion("Imei not like", value, "imei");
return (Criteria) this;
}
public Criteria andImeiIn(List<String> values) {
addCriterion("Imei in", values, "imei");
return (Criteria) this;
}
public Criteria andImeiNotIn(List<String> values) {
addCriterion("Imei not in", values, "imei");
return (Criteria) this;
}
public Criteria andImeiBetween(String value1, String value2) {
addCriterion("Imei between", value1, value2, "imei");
return (Criteria) this;
}
public Criteria andImeiNotBetween(String value1, String value2) {
addCriterion("Imei not between", value1, value2, "imei");
return (Criteria) this;
}
public Criteria andAlarmtypeIsNull() {
addCriterion("alarmType is null");
return (Criteria) this;
}
public Criteria andAlarmtypeIsNotNull() {
addCriterion("alarmType is not null");
return (Criteria) this;
}
public Criteria andAlarmtypeEqualTo(String value) {
addCriterion("alarmType =", value, "alarmtype");
return (Criteria) this;
}
public Criteria andAlarmtypeNotEqualTo(String value) {
addCriterion("alarmType <>", value, "alarmtype");
return (Criteria) this;
}
public Criteria andAlarmtypeGreaterThan(String value) {
addCriterion("alarmType >", value, "alarmtype");
return (Criteria) this;
}
public Criteria andAlarmtypeGreaterThanOrEqualTo(String value) {
addCriterion("alarmType >=", value, "alarmtype");
return (Criteria) this;
}
public Criteria andAlarmtypeLessThan(String value) {
addCriterion("alarmType <", value, "alarmtype");
return (Criteria) this;
}
public Criteria andAlarmtypeLessThanOrEqualTo(String value) {
addCriterion("alarmType <=", value, "alarmtype");
return (Criteria) this;
}
public Criteria andAlarmtypeLike(String value) {
addCriterion("alarmType like", value, "alarmtype");
return (Criteria) this;
}
public Criteria andAlarmtypeNotLike(String value) {
addCriterion("alarmType not like", value, "alarmtype");
return (Criteria) this;
}
public Criteria andAlarmtypeIn(List<String> values) {
addCriterion("alarmType in", values, "alarmtype");
return (Criteria) this;
}
public Criteria andAlarmtypeNotIn(List<String> values) {
addCriterion("alarmType not in", values, "alarmtype");
return (Criteria) this;
}
public Criteria andAlarmtypeBetween(String value1, String value2) {
addCriterion("alarmType between", value1, value2, "alarmtype");
return (Criteria) this;
}
public Criteria andAlarmtypeNotBetween(String value1, String value2) {
addCriterion("alarmType not between", value1, value2, "alarmtype");
return (Criteria) this;
}
public Criteria andAlarmvalueIsNull() {
addCriterion("alarmValue is null");
return (Criteria) this;
}
public Criteria andAlarmvalueIsNotNull() {
addCriterion("alarmValue is not null");
return (Criteria) this;
}
public Criteria andAlarmvalueEqualTo(String value) {
addCriterion("alarmValue =", value, "alarmvalue");
return (Criteria) this;
}
public Criteria andAlarmvalueNotEqualTo(String value) {
addCriterion("alarmValue <>", value, "alarmvalue");
return (Criteria) this;
}
public Criteria andAlarmvalueGreaterThan(String value) {
addCriterion("alarmValue >", value, "alarmvalue");
return (Criteria) this;
}
public Criteria andAlarmvalueGreaterThanOrEqualTo(String value) {
addCriterion("alarmValue >=", value, "alarmvalue");
return (Criteria) this;
}
public Criteria andAlarmvalueLessThan(String value) {
addCriterion("alarmValue <", value, "alarmvalue");
return (Criteria) this;
}
public Criteria andAlarmvalueLessThanOrEqualTo(String value) {
addCriterion("alarmValue <=", value, "alarmvalue");
return (Criteria) this;
}
public Criteria andAlarmvalueLike(String value) {
addCriterion("alarmValue like", value, "alarmvalue");
return (Criteria) this;
}
public Criteria andAlarmvalueNotLike(String value) {
addCriterion("alarmValue not like", value, "alarmvalue");
return (Criteria) this;
}
public Criteria andAlarmvalueIn(List<String> values) {
addCriterion("alarmValue in", values, "alarmvalue");
return (Criteria) this;
}
public Criteria andAlarmvalueNotIn(List<String> values) {
addCriterion("alarmValue not in", values, "alarmvalue");
return (Criteria) this;
}
public Criteria andAlarmvalueBetween(String value1, String value2) {
addCriterion("alarmValue between", value1, value2, "alarmvalue");
return (Criteria) this;
}
public Criteria andAlarmvalueNotBetween(String value1, String value2) {
addCriterion("alarmValue not between", value1, value2, "alarmvalue");
return (Criteria) this;
}
public Criteria andUnitIsNull() {
addCriterion("unit is null");
return (Criteria) this;
}
public Criteria andUnitIsNotNull() {
addCriterion("unit is not null");
return (Criteria) this;
}
public Criteria andUnitEqualTo(String value) {
addCriterion("unit =", value, "unit");
return (Criteria) this;
}
public Criteria andUnitNotEqualTo(String value) {
addCriterion("unit <>", value, "unit");
return (Criteria) this;
}
public Criteria andUnitGreaterThan(String value) {
addCriterion("unit >", value, "unit");
return (Criteria) this;
}
public Criteria andUnitGreaterThanOrEqualTo(String value) {
addCriterion("unit >=", value, "unit");
return (Criteria) this;
}
public Criteria andUnitLessThan(String value) {
addCriterion("unit <", value, "unit");
return (Criteria) this;
}
public Criteria andUnitLessThanOrEqualTo(String value) {
addCriterion("unit <=", value, "unit");
return (Criteria) this;
}
public Criteria andUnitLike(String value) {
addCriterion("unit like", value, "unit");
return (Criteria) this;
}
public Criteria andUnitNotLike(String value) {
addCriterion("unit not like", value, "unit");
return (Criteria) this;
}
public Criteria andUnitIn(List<String> values) {
addCriterion("unit in", values, "unit");
return (Criteria) this;
}
public Criteria andUnitNotIn(List<String> values) {
addCriterion("unit not in", values, "unit");
return (Criteria) this;
}
public Criteria andUnitBetween(String value1, String value2) {
addCriterion("unit between", value1, value2, "unit");
return (Criteria) this;
}
public Criteria andUnitNotBetween(String value1, String value2) {
addCriterion("unit not between", value1, value2, "unit");
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<Integer> values) {
addCriterion("status in", values, "status");
return (Criteria) this;
}
public Criteria andStatusNotIn(List<Integer> 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 andCreatetimeIsNull() {
addCriterion("createtime is null");
return (Criteria) this;
}
public Criteria andCreatetimeIsNotNull() {
addCriterion("createtime is not null");
return (Criteria) this;
}
public Criteria andCreatetimeEqualTo(Date value) {
addCriterion("createtime =", value, "createtime");
return (Criteria) this;
}
public Criteria andCreatetimeNotEqualTo(Date value) {
addCriterion("createtime <>", value, "createtime");
return (Criteria) this;
}
public Criteria andCreatetimeGreaterThan(Date value) {
addCriterion("createtime >", value, "createtime");
return (Criteria) this;
}
public Criteria andCreatetimeGreaterThanOrEqualTo(Date value) {
addCriterion("createtime >=", value, "createtime");
return (Criteria) this;
}
public Criteria andCreatetimeLessThan(Date value) {
addCriterion("createtime <", value, "createtime");
return (Criteria) this;
}
public Criteria andCreatetimeLessThanOrEqualTo(Date value) {
addCriterion("createtime <=", value, "createtime");
return (Criteria) this;
}
public Criteria andCreatetimeIn(List<Date> values) {
addCriterion("createtime in", values, "createtime");
return (Criteria) this;
}
public Criteria andCreatetimeNotIn(List<Date> values) {
addCriterion("createtime not in", values, "createtime");
return (Criteria) this;
}
public Criteria andCreatetimeBetween(Date value1, Date value2) {
addCriterion("createtime between", value1, value2, "createtime");
return (Criteria) this;
}
public Criteria andCreatetimeNotBetween(Date value1, Date value2) {
addCriterion("createtime not between", value1, value2, "createtime");
return (Criteria) this;
}
public Criteria andUpdatetimeIsNull() {
addCriterion("updatetime is null");
return (Criteria) this;
}
public Criteria andUpdatetimeIsNotNull() {
addCriterion("updatetime is not null");
return (Criteria) this;
}
public Criteria andUpdatetimeEqualTo(Date value) {
addCriterion("updatetime =", value, "updatetime");
return (Criteria) this;
}
public Criteria andUpdatetimeNotEqualTo(Date value) {
addCriterion("updatetime <>", value, "updatetime");
return (Criteria) this;
}
public Criteria andUpdatetimeGreaterThan(Date value) {
addCriterion("updatetime >", value, "updatetime");
return (Criteria) this;
}
public Criteria andUpdatetimeGreaterThanOrEqualTo(Date value) {
addCriterion("updatetime >=", value, "updatetime");
return (Criteria) this;
}
public Criteria andUpdatetimeLessThan(Date value) {
addCriterion("updatetime <", value, "updatetime");
return (Criteria) this;
}
public Criteria andUpdatetimeLessThanOrEqualTo(Date value) {
addCriterion("updatetime <=", value, "updatetime");
return (Criteria) this;
}
public Criteria andUpdatetimeIn(List<Date> values) {
addCriterion("updatetime in", values, "updatetime");
return (Criteria) this;
}
public Criteria andUpdatetimeNotIn(List<Date> values) {
addCriterion("updatetime not in", values, "updatetime");
return (Criteria) this;
}
public Criteria andUpdatetimeBetween(Date value1, Date value2) {
addCriterion("updatetime between", value1, value2, "updatetime");
return (Criteria) this;
}
public Criteria andUpdatetimeNotBetween(Date value1, Date value2) {
addCriterion("updatetime not between", value1, value2, "updatetime");
return (Criteria) this;
}
public Criteria andEndtimeIsNull() {
addCriterion("endtime is null");
return (Criteria) this;
}
public Criteria andEndtimeIsNotNull() {
addCriterion("endtime is not null");
return (Criteria) this;
}
public Criteria andEndtimeEqualTo(Date value) {
addCriterion("endtime =", value, "endtime");
return (Criteria) this;
}
public Criteria andEndtimeNotEqualTo(Date value) {
addCriterion("endtime <>", value, "endtime");
return (Criteria) this;
}
public Criteria andEndtimeGreaterThan(Date value) {
addCriterion("endtime >", value, "endtime");
return (Criteria) this;
}
public Criteria andEndtimeGreaterThanOrEqualTo(Date value) {
addCriterion("endtime >=", value, "endtime");
return (Criteria) this;
}
public Criteria andEndtimeLessThan(Date value) {
addCriterion("endtime <", value, "endtime");
return (Criteria) this;
}
public Criteria andEndtimeLessThanOrEqualTo(Date value) {
addCriterion("endtime <=", value, "endtime");
return (Criteria) this;
}
public Criteria andEndtimeIn(List<Date> values) {
addCriterion("endtime in", values, "endtime");
return (Criteria) this;
}
public Criteria andEndtimeNotIn(List<Date> values) {
addCriterion("endtime not in", values, "endtime");
return (Criteria) this;
}
public Criteria andEndtimeBetween(Date value1, Date value2) {
addCriterion("endtime between", value1, value2, "endtime");
return (Criteria) this;
}
public Criteria andEndtimeNotBetween(Date value1, Date value2) {
addCriterion("endtime 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);
}
}
}

+ 280
- 0
src/main/java/com/topsail/influxdb/pojo/Company.java View File

@ -0,0 +1,280 @@
package com.topsail.influxdb.pojo;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
public class Company {
private Integer id;
private String companyName;
private String companyFullName;
private String platformtype;
private Integer dmpId;
private Date createtime;
private String creator;
private Integer areaId;
private String period;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName == null ? null : companyName.trim();
}
public String getCompanyFullName() {
return companyFullName;
}
public void setCompanyFullName(String companyFullName) {
this.companyFullName = companyFullName == null ? null : companyFullName.trim();
}
public String getPlatformtype() {
return platformtype;
}
public void setPlatformtype(String platformtype) {
this.platformtype = platformtype == null ? null : platformtype.trim();
}
public Integer getDmpId() {
return dmpId;
}
public void setDmpId(Integer dmpId) {
this.dmpId = dmpId;
}
public Date getCreatetime() {
return createtime;
}
public void setCreatetime(Date createtime) {
this.createtime = createtime;
}
public String getCreator() {
return creator;
}
public void setCreator(String creator) {
this.creator = creator == null ? null : creator.trim();
}
public Integer getAreaId() {
return areaId;
}
public void setAreaId(Integer areaId) {
this.areaId = areaId;
}
public String getPeriod() {
return period;
}
public void setPeriod(String period) {
this.period = period == null ? null : period.trim();
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table company
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public enum Column {
id("id", "id", "INTEGER", false),
companyName("company_name", "companyName", "VARCHAR", false),
companyFullName("company_full_name", "companyFullName", "VARCHAR", false),
platformtype("platformType", "platformtype", "VARCHAR", false),
dmpId("dmp_id", "dmpId", "INTEGER", false),
createtime("createtime", "createtime", "TIMESTAMP", false),
creator("creator", "creator", "VARCHAR", false),
areaId("area_id", "areaId", "INTEGER", false),
period("period", "period", "VARCHAR", false);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table company
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String BEGINNING_DELIMITER = "\"";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table company
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String ENDING_DELIMITER = "\"";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table company
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String column;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table company
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final boolean isColumnNameDelimited;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table company
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String javaProperty;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table company
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String jdbcType;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table company
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String value() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table company
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getValue() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table company
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJavaProperty() {
return this.javaProperty;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table company
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJdbcType() {
return this.jdbcType;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table company
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
this.column = column;
this.javaProperty = javaProperty;
this.jdbcType = jdbcType;
this.isColumnNameDelimited = isColumnNameDelimited;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table company
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String desc() {
return this.getEscapedColumnName() + " DESC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table company
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String asc() {
return this.getEscapedColumnName() + " ASC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table company
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public static Column[] excludes(Column ... excludes) {
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
if (excludes != null && excludes.length > 0) {
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
}
return columns.toArray(new Column[]{});
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table company
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getEscapedColumnName() {
if (this.isColumnNameDelimited) {
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
} else {
return this.column;
}
}
}
}

+ 791
- 0
src/main/java/com/topsail/influxdb/pojo/CompanyExample.java View File

@ -0,0 +1,791 @@
package com.topsail.influxdb.pojo;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class CompanyExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public CompanyExample() {
oredCriteria = new ArrayList<Criteria>();
}
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<Criteria> 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;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> 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<Integer> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Integer> 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 andCompanyNameIsNull() {
addCriterion("company_name is null");
return (Criteria) this;
}
public Criteria andCompanyNameIsNotNull() {
addCriterion("company_name is not null");
return (Criteria) this;
}
public Criteria andCompanyNameEqualTo(String value) {
addCriterion("company_name =", value, "companyName");
return (Criteria) this;
}
public Criteria andCompanyNameNotEqualTo(String value) {
addCriterion("company_name <>", value, "companyName");
return (Criteria) this;
}
public Criteria andCompanyNameGreaterThan(String value) {
addCriterion("company_name >", value, "companyName");
return (Criteria) this;
}
public Criteria andCompanyNameGreaterThanOrEqualTo(String value) {
addCriterion("company_name >=", value, "companyName");
return (Criteria) this;
}
public Criteria andCompanyNameLessThan(String value) {
addCriterion("company_name <", value, "companyName");
return (Criteria) this;
}
public Criteria andCompanyNameLessThanOrEqualTo(String value) {
addCriterion("company_name <=", value, "companyName");
return (Criteria) this;
}
public Criteria andCompanyNameLike(String value) {
addCriterion("company_name like", value, "companyName");
return (Criteria) this;
}
public Criteria andCompanyNameNotLike(String value) {
addCriterion("company_name not like", value, "companyName");
return (Criteria) this;
}
public Criteria andCompanyNameIn(List<String> values) {
addCriterion("company_name in", values, "companyName");
return (Criteria) this;
}
public Criteria andCompanyNameNotIn(List<String> values) {
addCriterion("company_name not in", values, "companyName");
return (Criteria) this;
}
public Criteria andCompanyNameBetween(String value1, String value2) {
addCriterion("company_name between", value1, value2, "companyName");
return (Criteria) this;
}
public Criteria andCompanyNameNotBetween(String value1, String value2) {
addCriterion("company_name not between", value1, value2, "companyName");
return (Criteria) this;
}
public Criteria andCompanyFullNameIsNull() {
addCriterion("company_full_name is null");
return (Criteria) this;
}
public Criteria andCompanyFullNameIsNotNull() {
addCriterion("company_full_name is not null");
return (Criteria) this;
}
public Criteria andCompanyFullNameEqualTo(String value) {
addCriterion("company_full_name =", value, "companyFullName");
return (Criteria) this;
}
public Criteria andCompanyFullNameNotEqualTo(String value) {
addCriterion("company_full_name <>", value, "companyFullName");
return (Criteria) this;
}
public Criteria andCompanyFullNameGreaterThan(String value) {
addCriterion("company_full_name >", value, "companyFullName");
return (Criteria) this;
}
public Criteria andCompanyFullNameGreaterThanOrEqualTo(String value) {
addCriterion("company_full_name >=", value, "companyFullName");
return (Criteria) this;
}
public Criteria andCompanyFullNameLessThan(String value) {
addCriterion("company_full_name <", value, "companyFullName");
return (Criteria) this;
}
public Criteria andCompanyFullNameLessThanOrEqualTo(String value) {
addCriterion("company_full_name <=", value, "companyFullName");
return (Criteria) this;
}
public Criteria andCompanyFullNameLike(String value) {
addCriterion("company_full_name like", value, "companyFullName");
return (Criteria) this;
}
public Criteria andCompanyFullNameNotLike(String value) {
addCriterion("company_full_name not like", value, "companyFullName");
return (Criteria) this;
}
public Criteria andCompanyFullNameIn(List<String> values) {
addCriterion("company_full_name in", values, "companyFullName");
return (Criteria) this;
}
public Criteria andCompanyFullNameNotIn(List<String> values) {
addCriterion("company_full_name not in", values, "companyFullName");
return (Criteria) this;
}
public Criteria andCompanyFullNameBetween(String value1, String value2) {
addCriterion("company_full_name between", value1, value2, "companyFullName");
return (Criteria) this;
}
public Criteria andCompanyFullNameNotBetween(String value1, String value2) {
addCriterion("company_full_name not between", value1, value2, "companyFullName");
return (Criteria) this;
}
public Criteria andPlatformtypeIsNull() {
addCriterion("platformType is null");
return (Criteria) this;
}
public Criteria andPlatformtypeIsNotNull() {
addCriterion("platformType is not null");
return (Criteria) this;
}
public Criteria andPlatformtypeEqualTo(String value) {
addCriterion("platformType =", value, "platformtype");
return (Criteria) this;
}
public Criteria andPlatformtypeNotEqualTo(String value) {
addCriterion("platformType <>", value, "platformtype");
return (Criteria) this;
}
public Criteria andPlatformtypeGreaterThan(String value) {
addCriterion("platformType >", value, "platformtype");
return (Criteria) this;
}
public Criteria andPlatformtypeGreaterThanOrEqualTo(String value) {
addCriterion("platformType >=", value, "platformtype");
return (Criteria) this;
}
public Criteria andPlatformtypeLessThan(String value) {
addCriterion("platformType <", value, "platformtype");
return (Criteria) this;
}
public Criteria andPlatformtypeLessThanOrEqualTo(String value) {
addCriterion("platformType <=", value, "platformtype");
return (Criteria) this;
}
public Criteria andPlatformtypeLike(String value) {
addCriterion("platformType like", value, "platformtype");
return (Criteria) this;
}
public Criteria andPlatformtypeNotLike(String value) {
addCriterion("platformType not like", value, "platformtype");
return (Criteria) this;
}
public Criteria andPlatformtypeIn(List<String> values) {
addCriterion("platformType in", values, "platformtype");
return (Criteria) this;
}
public Criteria andPlatformtypeNotIn(List<String> values) {
addCriterion("platformType not in", values, "platformtype");
return (Criteria) this;
}
public Criteria andPlatformtypeBetween(String value1, String value2) {
addCriterion("platformType between", value1, value2, "platformtype");
return (Criteria) this;
}
public Criteria andPlatformtypeNotBetween(String value1, String value2) {
addCriterion("platformType not between", value1, value2, "platformtype");
return (Criteria) this;
}
public Criteria andDmpIdIsNull() {
addCriterion("dmp_id is null");
return (Criteria) this;
}
public Criteria andDmpIdIsNotNull() {
addCriterion("dmp_id is not null");
return (Criteria) this;
}
public Criteria andDmpIdEqualTo(Integer value) {
addCriterion("dmp_id =", value, "dmpId");
return (Criteria) this;
}
public Criteria andDmpIdNotEqualTo(Integer value) {
addCriterion("dmp_id <>", value, "dmpId");
return (Criteria) this;
}
public Criteria andDmpIdGreaterThan(Integer value) {
addCriterion("dmp_id >", value, "dmpId");
return (Criteria) this;
}
public Criteria andDmpIdGreaterThanOrEqualTo(Integer value) {
addCriterion("dmp_id >=", value, "dmpId");
return (Criteria) this;
}
public Criteria andDmpIdLessThan(Integer value) {
addCriterion("dmp_id <", value, "dmpId");
return (Criteria) this;
}
public Criteria andDmpIdLessThanOrEqualTo(Integer value) {
addCriterion("dmp_id <=", value, "dmpId");
return (Criteria) this;
}
public Criteria andDmpIdIn(List<Integer> values) {
addCriterion("dmp_id in", values, "dmpId");
return (Criteria) this;
}
public Criteria andDmpIdNotIn(List<Integer> values) {
addCriterion("dmp_id not in", values, "dmpId");
return (Criteria) this;
}
public Criteria andDmpIdBetween(Integer value1, Integer value2) {
addCriterion("dmp_id between", value1, value2, "dmpId");
return (Criteria) this;
}
public Criteria andDmpIdNotBetween(Integer value1, Integer value2) {
addCriterion("dmp_id not between", value1, value2, "dmpId");
return (Criteria) this;
}
public Criteria andCreatetimeIsNull() {
addCriterion("createtime is null");
return (Criteria) this;
}
public Criteria andCreatetimeIsNotNull() {
addCriterion("createtime is not null");
return (Criteria) this;
}
public Criteria andCreatetimeEqualTo(Date value) {
addCriterion("createtime =", value, "createtime");
return (Criteria) this;
}
public Criteria andCreatetimeNotEqualTo(Date value) {
addCriterion("createtime <>", value, "createtime");
return (Criteria) this;
}
public Criteria andCreatetimeGreaterThan(Date value) {
addCriterion("createtime >", value, "createtime");
return (Criteria) this;
}
public Criteria andCreatetimeGreaterThanOrEqualTo(Date value) {
addCriterion("createtime >=", value, "createtime");
return (Criteria) this;
}
public Criteria andCreatetimeLessThan(Date value) {
addCriterion("createtime <", value, "createtime");
return (Criteria) this;
}
public Criteria andCreatetimeLessThanOrEqualTo(Date value) {
addCriterion("createtime <=", value, "createtime");
return (Criteria) this;
}
public Criteria andCreatetimeIn(List<Date> values) {
addCriterion("createtime in", values, "createtime");
return (Criteria) this;
}
public Criteria andCreatetimeNotIn(List<Date> values) {
addCriterion("createtime not in", values, "createtime");
return (Criteria) this;
}
public Criteria andCreatetimeBetween(Date value1, Date value2) {
addCriterion("createtime between", value1, value2, "createtime");
return (Criteria) this;
}
public Criteria andCreatetimeNotBetween(Date value1, Date value2) {
addCriterion("createtime not between", value1, value2, "createtime");
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(String value) {
addCriterion("creator =", value, "creator");
return (Criteria) this;
}
public Criteria andCreatorNotEqualTo(String value) {
addCriterion("creator <>", value, "creator");
return (Criteria) this;
}
public Criteria andCreatorGreaterThan(String value) {
addCriterion("creator >", value, "creator");
return (Criteria) this;
}
public Criteria andCreatorGreaterThanOrEqualTo(String value) {
addCriterion("creator >=", value, "creator");
return (Criteria) this;
}
public Criteria andCreatorLessThan(String value) {
addCriterion("creator <", value, "creator");
return (Criteria) this;
}
public Criteria andCreatorLessThanOrEqualTo(String value) {
addCriterion("creator <=", value, "creator");
return (Criteria) this;
}
public Criteria andCreatorLike(String value) {
addCriterion("creator like", value, "creator");
return (Criteria) this;
}
public Criteria andCreatorNotLike(String value) {
addCriterion("creator not like", value, "creator");
return (Criteria) this;
}
public Criteria andCreatorIn(List<String> values) {
addCriterion("creator in", values, "creator");
return (Criteria) this;
}
public Criteria andCreatorNotIn(List<String> values) {
addCriterion("creator not in", values, "creator");
return (Criteria) this;
}
public Criteria andCreatorBetween(String value1, String value2) {
addCriterion("creator between", value1, value2, "creator");
return (Criteria) this;
}
public Criteria andCreatorNotBetween(String value1, String value2) {
addCriterion("creator not between", value1, value2, "creator");
return (Criteria) this;
}
public Criteria andAreaIdIsNull() {
addCriterion("area_id is null");
return (Criteria) this;
}
public Criteria andAreaIdIsNotNull() {
addCriterion("area_id is not null");
return (Criteria) this;
}
public Criteria andAreaIdEqualTo(Integer value) {
addCriterion("area_id =", value, "areaId");
return (Criteria) this;
}
public Criteria andAreaIdNotEqualTo(Integer value) {
addCriterion("area_id <>", value, "areaId");
return (Criteria) this;
}
public Criteria andAreaIdGreaterThan(Integer value) {
addCriterion("area_id >", value, "areaId");
return (Criteria) this;
}
public Criteria andAreaIdGreaterThanOrEqualTo(Integer value) {
addCriterion("area_id >=", value, "areaId");
return (Criteria) this;
}
public Criteria andAreaIdLessThan(Integer value) {
addCriterion("area_id <", value, "areaId");
return (Criteria) this;
}
public Criteria andAreaIdLessThanOrEqualTo(Integer value) {
addCriterion("area_id <=", value, "areaId");
return (Criteria) this;
}
public Criteria andAreaIdIn(List<Integer> values) {
addCriterion("area_id in", values, "areaId");
return (Criteria) this;
}
public Criteria andAreaIdNotIn(List<Integer> values) {
addCriterion("area_id not in", values, "areaId");
return (Criteria) this;
}
public Criteria andAreaIdBetween(Integer value1, Integer value2) {
addCriterion("area_id between", value1, value2, "areaId");
return (Criteria) this;
}
public Criteria andAreaIdNotBetween(Integer value1, Integer value2) {
addCriterion("area_id not between", value1, value2, "areaId");
return (Criteria) this;
}
public Criteria andPeriodIsNull() {
addCriterion("period is null");
return (Criteria) this;
}
public Criteria andPeriodIsNotNull() {
addCriterion("period is not null");
return (Criteria) this;
}
public Criteria andPeriodEqualTo(String value) {
addCriterion("period =", value, "period");
return (Criteria) this;
}
public Criteria andPeriodNotEqualTo(String value) {
addCriterion("period <>", value, "period");
return (Criteria) this;
}
public Criteria andPeriodGreaterThan(String value) {
addCriterion("period >", value, "period");
return (Criteria) this;
}
public Criteria andPeriodGreaterThanOrEqualTo(String value) {
addCriterion("period >=", value, "period");
return (Criteria) this;
}
public Criteria andPeriodLessThan(String value) {
addCriterion("period <", value, "period");
return (Criteria) this;
}
public Criteria andPeriodLessThanOrEqualTo(String value) {
addCriterion("period <=", value, "period");
return (Criteria) this;
}
public Criteria andPeriodLike(String value) {
addCriterion("period like", value, "period");
return (Criteria) this;
}
public Criteria andPeriodNotLike(String value) {
addCriterion("period not like", value, "period");
return (Criteria) this;
}
public Criteria andPeriodIn(List<String> values) {
addCriterion("period in", values, "period");
return (Criteria) this;
}
public Criteria andPeriodNotIn(List<String> values) {
addCriterion("period not in", values, "period");
return (Criteria) this;
}
public Criteria andPeriodBetween(String value1, String value2) {
addCriterion("period between", value1, value2, "period");
return (Criteria) this;
}
public Criteria andPeriodNotBetween(String value1, String value2) {
addCriterion("period not between", value1, value2, "period");
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);
}
}
}

+ 244
- 0
src/main/java/com/topsail/influxdb/pojo/Config.java View File

@ -0,0 +1,244 @@
package com.topsail.influxdb.pojo;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
public class Config {
private String imei;
private Date updatetime;
private String config;
public String getImei() {
return imei;
}
public void setImei(String imei) {
this.imei = imei == null ? null : imei.trim();
}
public Date getUpdatetime() {
return updatetime;
}
public void setUpdatetime(Date updatetime) {
this.updatetime = updatetime;
}
public String getConfig() {
return config;
}
public void setConfig(String config) {
this.config = config == null ? null : config.trim();
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public enum Column {
imei("imei", "imei", "VARCHAR", false),
updatetime("updatetime", "updatetime", "TIMESTAMP", false),
config("config", "config", "LONGVARCHAR", false);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String BEGINNING_DELIMITER = "\"";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String ENDING_DELIMITER = "\"";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String column;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final boolean isColumnNameDelimited;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String javaProperty;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String jdbcType;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String value() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getValue() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJavaProperty() {
return this.javaProperty;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJdbcType() {
return this.jdbcType;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
this.column = column;
this.javaProperty = javaProperty;
this.jdbcType = jdbcType;
this.isColumnNameDelimited = isColumnNameDelimited;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String desc() {
return this.getEscapedColumnName() + " DESC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String asc() {
return this.getEscapedColumnName() + " ASC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public static Column[] excludes(Column ... excludes) {
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
if (excludes != null && excludes.length > 0) {
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
}
return columns.toArray(new Column[]{});
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table config
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getEscapedColumnName() {
if (this.isColumnNameDelimited) {
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
} else {
return this.column;
}
}
}
public static void main(String[] args) {
String a="{ \"alarmType\" : \"1\",\n" +
"\"batteryLevel\" : 100,\n" +
"\"batteryState\" : 64,\n" +
"\"deviceType\" : 7,\n" +
"\"id\" : 0,\n" +
"\"imei\" : \"X68474045658406\",\n" +
"\"passNum\" : 0,\n" +
"\"platformType\" : \"ONENET\",\n" +
"\"platformjson\" : \"{\\\"msg\\\":{\\\"at\\\":1658088209904,\\\"type\\\":1,\\\"ds_id\\\":\\\"ds_test\\\",\\\"value\\\":\\\"7470736C01601B07583638343734303435363538343036002207180403306437014047453E40696F74\\\",\\\"dev_id\\\":578629796},\\\"msg_signature\\\":\\\"4FjC3LWZ39mxem3N2zncYw==\\\",\\\"nonce\\\":\\\"XyO-7??Z\\\"}\",\n" +
"\"singalStrength\" : 55,\n" +
"\"sourcetype\" : \"new_top\" } ";
JSONObject jsonObject= JSON.parseObject(a);
int sendingGap=0;
if(jsonObject.get("sendinggap")!=null){
jsonObject.put("sendingGap",jsonObject.get("sendinggap"));
}
sendingGap = jsonObject.getInteger("sendingGap");
System.out.println(sendingGap);
}
}

+ 331
- 0
src/main/java/com/topsail/influxdb/pojo/ConfigExample.java View File

@ -0,0 +1,331 @@
package com.topsail.influxdb.pojo;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class ConfigExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public ConfigExample() {
oredCriteria = new ArrayList<Criteria>();
}
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<Criteria> 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;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> 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 andImeiIsNull() {
addCriterion("imei is null");
return (Criteria) this;
}
public Criteria andImeiIsNotNull() {
addCriterion("imei is not null");
return (Criteria) this;
}
public Criteria andImeiEqualTo(String value) {
addCriterion("imei =", value, "imei");
return (Criteria) this;
}
public Criteria andImeiNotEqualTo(String value) {
addCriterion("imei <>", value, "imei");
return (Criteria) this;
}
public Criteria andImeiGreaterThan(String value) {
addCriterion("imei >", value, "imei");
return (Criteria) this;
}
public Criteria andImeiGreaterThanOrEqualTo(String value) {
addCriterion("imei >=", value, "imei");
return (Criteria) this;
}
public Criteria andImeiLessThan(String value) {
addCriterion("imei <", value, "imei");
return (Criteria) this;
}
public Criteria andImeiLessThanOrEqualTo(String value) {
addCriterion("imei <=", value, "imei");
return (Criteria) this;
}
public Criteria andImeiLike(String value) {
addCriterion("imei like", value, "imei");
return (Criteria) this;
}
public Criteria andImeiNotLike(String value) {
addCriterion("imei not like", value, "imei");
return (Criteria) this;
}
public Criteria andImeiIn(List<String> values) {
addCriterion("imei in", values, "imei");
return (Criteria) this;
}
public Criteria andImeiNotIn(List<String> values) {
addCriterion("imei not in", values, "imei");
return (Criteria) this;
}
public Criteria andImeiBetween(String value1, String value2) {
addCriterion("imei between", value1, value2, "imei");
return (Criteria) this;
}
public Criteria andImeiNotBetween(String value1, String value2) {
addCriterion("imei not between", value1, value2, "imei");
return (Criteria) this;
}
public Criteria andUpdatetimeIsNull() {
addCriterion("updatetime is null");
return (Criteria) this;
}
public Criteria andUpdatetimeIsNotNull() {
addCriterion("updatetime is not null");
return (Criteria) this;
}
public Criteria andUpdatetimeEqualTo(Date value) {
addCriterion("updatetime =", value, "updatetime");
return (Criteria) this;
}
public Criteria andUpdatetimeNotEqualTo(Date value) {
addCriterion("updatetime <>", value, "updatetime");
return (Criteria) this;
}
public Criteria andUpdatetimeGreaterThan(Date value) {
addCriterion("updatetime >", value, "updatetime");
return (Criteria) this;
}
public Criteria andUpdatetimeGreaterThanOrEqualTo(Date value) {
addCriterion("updatetime >=", value, "updatetime");
return (Criteria) this;
}
public Criteria andUpdatetimeLessThan(Date value) {
addCriterion("updatetime <", value, "updatetime");
return (Criteria) this;
}
public Criteria andUpdatetimeLessThanOrEqualTo(Date value) {
addCriterion("updatetime <=", value, "updatetime");
return (Criteria) this;
}
public Criteria andUpdatetimeIn(List<Date> values) {
addCriterion("updatetime in", values, "updatetime");
return (Criteria) this;
}
public Criteria andUpdatetimeNotIn(List<Date> values) {
addCriterion("updatetime not in", values, "updatetime");
return (Criteria) this;
}
public Criteria andUpdatetimeBetween(Date value1, Date value2) {
addCriterion("updatetime between", value1, value2, "updatetime");
return (Criteria) this;
}
public Criteria andUpdatetimeNotBetween(Date value1, Date value2) {
addCriterion("updatetime 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);
}
}
}

+ 246
- 0
src/main/java/com/topsail/influxdb/pojo/DataFilter.java View File

@ -0,0 +1,246 @@
package com.topsail.influxdb.pojo;
import java.util.ArrayList;
import java.util.Arrays;
public class DataFilter {
private Integer id;
private Integer deviceType;
private String deviceModel;
private String unit;
private Float low;
private Float high;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getDeviceType() {
return deviceType;
}
public void setDeviceType(Integer deviceType) {
this.deviceType = deviceType;
}
public String getDeviceModel() {
return deviceModel;
}
public void setDeviceModel(String deviceModel) {
this.deviceModel = deviceModel == null ? null : deviceModel.trim();
}
public String getUnit() {
return unit;
}
public void setUnit(String unit) {
this.unit = unit == null ? null : unit.trim();
}
public Float getLow() {
return low;
}
public void setLow(Float low) {
this.low = low;
}
public Float getHigh() {
return high;
}
public void setHigh(Float high) {
this.high = high;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table data_filter
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public enum Column {
id("id", "id", "INTEGER", false),
deviceType("device_type", "deviceType", "INTEGER", false),
deviceModel("device_model", "deviceModel", "VARCHAR", false),
unit("unit", "unit", "VARCHAR", false),
low("low", "low", "REAL", false),
high("high", "high", "REAL", false);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table data_filter
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String BEGINNING_DELIMITER = "\"";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table data_filter
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String ENDING_DELIMITER = "\"";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table data_filter
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String column;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table data_filter
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final boolean isColumnNameDelimited;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table data_filter
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String javaProperty;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table data_filter
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String jdbcType;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table data_filter
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String value() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table data_filter
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getValue() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table data_filter
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJavaProperty() {
return this.javaProperty;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table data_filter
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJdbcType() {
return this.jdbcType;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table data_filter
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
this.column = column;
this.javaProperty = javaProperty;
this.jdbcType = jdbcType;
this.isColumnNameDelimited = isColumnNameDelimited;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table data_filter
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String desc() {
return this.getEscapedColumnName() + " DESC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table data_filter
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String asc() {
return this.getEscapedColumnName() + " ASC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table data_filter
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public static Column[] excludes(Column ... excludes) {
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
if (excludes != null && excludes.length > 0) {
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
}
return columns.toArray(new Column[]{});
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table data_filter
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getEscapedColumnName() {
if (this.isColumnNameDelimited) {
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
} else {
return this.column;
}
}
}
}

+ 580
- 0
src/main/java/com/topsail/influxdb/pojo/DataFilterExample.java View File

@ -0,0 +1,580 @@
package com.topsail.influxdb.pojo;
import java.util.ArrayList;
import java.util.List;
public class DataFilterExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public DataFilterExample() {
oredCriteria = new ArrayList<Criteria>();
}
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<Criteria> 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;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> 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<Integer> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Integer> 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 andDeviceTypeIsNull() {
addCriterion("device_type is null");
return (Criteria) this;
}
public Criteria andDeviceTypeIsNotNull() {
addCriterion("device_type is not null");
return (Criteria) this;
}
public Criteria andDeviceTypeEqualTo(Integer value) {
addCriterion("device_type =", value, "deviceType");
return (Criteria) this;
}
public Criteria andDeviceTypeNotEqualTo(Integer value) {
addCriterion("device_type <>", value, "deviceType");
return (Criteria) this;
}
public Criteria andDeviceTypeGreaterThan(Integer value) {
addCriterion("device_type >", value, "deviceType");
return (Criteria) this;
}
public Criteria andDeviceTypeGreaterThanOrEqualTo(Integer value) {
addCriterion("device_type >=", value, "deviceType");
return (Criteria) this;
}
public Criteria andDeviceTypeLessThan(Integer value) {
addCriterion("device_type <", value, "deviceType");
return (Criteria) this;
}
public Criteria andDeviceTypeLessThanOrEqualTo(Integer value) {
addCriterion("device_type <=", value, "deviceType");
return (Criteria) this;
}
public Criteria andDeviceTypeIn(List<Integer> values) {
addCriterion("device_type in", values, "deviceType");
return (Criteria) this;
}
public Criteria andDeviceTypeNotIn(List<Integer> values) {
addCriterion("device_type not in", values, "deviceType");
return (Criteria) this;
}
public Criteria andDeviceTypeBetween(Integer value1, Integer value2) {
addCriterion("device_type between", value1, value2, "deviceType");
return (Criteria) this;
}
public Criteria andDeviceTypeNotBetween(Integer value1, Integer value2) {
addCriterion("device_type not between", value1, value2, "deviceType");
return (Criteria) this;
}
public Criteria andDeviceModelIsNull() {
addCriterion("device_model is null");
return (Criteria) this;
}
public Criteria andDeviceModelIsNotNull() {
addCriterion("device_model is not null");
return (Criteria) this;
}
public Criteria andDeviceModelEqualTo(String value) {
addCriterion("device_model =", value, "deviceModel");
return (Criteria) this;
}
public Criteria andDeviceModelNotEqualTo(String value) {
addCriterion("device_model <>", value, "deviceModel");
return (Criteria) this;
}
public Criteria andDeviceModelGreaterThan(String value) {
addCriterion("device_model >", value, "deviceModel");
return (Criteria) this;
}
public Criteria andDeviceModelGreaterThanOrEqualTo(String value) {
addCriterion("device_model >=", value, "deviceModel");
return (Criteria) this;
}
public Criteria andDeviceModelLessThan(String value) {
addCriterion("device_model <", value, "deviceModel");
return (Criteria) this;
}
public Criteria andDeviceModelLessThanOrEqualTo(String value) {
addCriterion("device_model <=", value, "deviceModel");
return (Criteria) this;
}
public Criteria andDeviceModelLike(String value) {
addCriterion("device_model like", value, "deviceModel");
return (Criteria) this;
}
public Criteria andDeviceModelNotLike(String value) {
addCriterion("device_model not like", value, "deviceModel");
return (Criteria) this;
}
public Criteria andDeviceModelIn(List<String> values) {
addCriterion("device_model in", values, "deviceModel");
return (Criteria) this;
}
public Criteria andDeviceModelNotIn(List<String> values) {
addCriterion("device_model not in", values, "deviceModel");
return (Criteria) this;
}
public Criteria andDeviceModelBetween(String value1, String value2) {
addCriterion("device_model between", value1, value2, "deviceModel");
return (Criteria) this;
}
public Criteria andDeviceModelNotBetween(String value1, String value2) {
addCriterion("device_model not between", value1, value2, "deviceModel");
return (Criteria) this;
}
public Criteria andUnitIsNull() {
addCriterion("unit is null");
return (Criteria) this;
}
public Criteria andUnitIsNotNull() {
addCriterion("unit is not null");
return (Criteria) this;
}
public Criteria andUnitEqualTo(String value) {
addCriterion("unit =", value, "unit");
return (Criteria) this;
}
public Criteria andUnitNotEqualTo(String value) {
addCriterion("unit <>", value, "unit");
return (Criteria) this;
}
public Criteria andUnitGreaterThan(String value) {
addCriterion("unit >", value, "unit");
return (Criteria) this;
}
public Criteria andUnitGreaterThanOrEqualTo(String value) {
addCriterion("unit >=", value, "unit");
return (Criteria) this;
}
public Criteria andUnitLessThan(String value) {
addCriterion("unit <", value, "unit");
return (Criteria) this;
}
public Criteria andUnitLessThanOrEqualTo(String value) {
addCriterion("unit <=", value, "unit");
return (Criteria) this;
}
public Criteria andUnitLike(String value) {
addCriterion("unit like", value, "unit");
return (Criteria) this;
}
public Criteria andUnitNotLike(String value) {
addCriterion("unit not like", value, "unit");
return (Criteria) this;
}
public Criteria andUnitIn(List<String> values) {
addCriterion("unit in", values, "unit");
return (Criteria) this;
}
public Criteria andUnitNotIn(List<String> values) {
addCriterion("unit not in", values, "unit");
return (Criteria) this;
}
public Criteria andUnitBetween(String value1, String value2) {
addCriterion("unit between", value1, value2, "unit");
return (Criteria) this;
}
public Criteria andUnitNotBetween(String value1, String value2) {
addCriterion("unit not between", value1, value2, "unit");
return (Criteria) this;
}
public Criteria andLowIsNull() {
addCriterion("low is null");
return (Criteria) this;
}
public Criteria andLowIsNotNull() {
addCriterion("low is not null");
return (Criteria) this;
}
public Criteria andLowEqualTo(Float value) {
addCriterion("low =", value, "low");
return (Criteria) this;
}
public Criteria andLowNotEqualTo(Float value) {
addCriterion("low <>", value, "low");
return (Criteria) this;
}
public Criteria andLowGreaterThan(Float value) {
addCriterion("low >", value, "low");
return (Criteria) this;
}
public Criteria andLowGreaterThanOrEqualTo(Float value) {
addCriterion("low >=", value, "low");
return (Criteria) this;
}
public Criteria andLowLessThan(Float value) {
addCriterion("low <", value, "low");
return (Criteria) this;
}
public Criteria andLowLessThanOrEqualTo(Float value) {
addCriterion("low <=", value, "low");
return (Criteria) this;
}
public Criteria andLowIn(List<Float> values) {
addCriterion("low in", values, "low");
return (Criteria) this;
}
public Criteria andLowNotIn(List<Float> values) {
addCriterion("low not in", values, "low");
return (Criteria) this;
}
public Criteria andLowBetween(Float value1, Float value2) {
addCriterion("low between", value1, value2, "low");
return (Criteria) this;
}
public Criteria andLowNotBetween(Float value1, Float value2) {
addCriterion("low not between", value1, value2, "low");
return (Criteria) this;
}
public Criteria andHighIsNull() {
addCriterion("high is null");
return (Criteria) this;
}
public Criteria andHighIsNotNull() {
addCriterion("high is not null");
return (Criteria) this;
}
public Criteria andHighEqualTo(Float value) {
addCriterion("high =", value, "high");
return (Criteria) this;
}
public Criteria andHighNotEqualTo(Float value) {
addCriterion("high <>", value, "high");
return (Criteria) this;
}
public Criteria andHighGreaterThan(Float value) {
addCriterion("high >", value, "high");
return (Criteria) this;
}
public Criteria andHighGreaterThanOrEqualTo(Float value) {
addCriterion("high >=", value, "high");
return (Criteria) this;
}
public Criteria andHighLessThan(Float value) {
addCriterion("high <", value, "high");
return (Criteria) this;
}
public Criteria andHighLessThanOrEqualTo(Float value) {
addCriterion("high <=", value, "high");
return (Criteria) this;
}
public Criteria andHighIn(List<Float> values) {
addCriterion("high in", values, "high");
return (Criteria) this;
}
public Criteria andHighNotIn(List<Float> values) {
addCriterion("high not in", values, "high");
return (Criteria) this;
}
public Criteria andHighBetween(Float value1, Float value2) {
addCriterion("high between", value1, value2, "high");
return (Criteria) this;
}
public Criteria andHighNotBetween(Float value1, Float value2) {
addCriterion("high not between", value1, value2, "high");
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);
}
}
}

+ 498
- 0
src/main/java/com/topsail/influxdb/pojo/Device.java View File

@ -0,0 +1,498 @@
package com.topsail.influxdb.pojo;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
public class Device {
private String imei;
private Integer devicetype;
private Integer batterylevel;
private Integer singalstrength;
private String sampledata;
private Integer passnum;
private Integer batterystate;
private String alarmtype;
private String platformtype;
private String username;
private String unit;
private String sendtime;
private Date time;
private Date offlinetime;
private String value;
private String imsi;
private String iccid;
private Date senddate;
// 4.24 数据协议
private String protocol;
private Double lon;
private Double lat;
private Integer devModel;
// 4.22 应为网关关系新增下面字段
// 父imei
private String parentImei;
// 父设备id
private String deviceid;
// 数据采集时间
private String sampTime;
// 告警类型中文
private String alarmMsg;
public Integer getDevModel() {
return devModel;
}
public void setDevModel(Integer devModel) {
this.devModel = devModel;
}
public String getProtocol() {
return protocol;
}
public void setProtocol(String protocol) {
this.protocol = protocol;
}
public String getSampTime() {
return sampTime;
}
public void setSampTime(String sampTime) {
this.sampTime = sampTime;
}
public String getParentImei() {
return parentImei;
}
public void setParentImei(String parentImei) {
this.parentImei = parentImei;
}
public String getDeviceid() {
return deviceid;
}
public void setDeviceid(String deviceid) {
this.deviceid = deviceid;
}
public String getImei() {
return imei;
}
public void setImei(String imei) {
this.imei = imei == null ? null : imei.trim();
}
public Integer getDevicetype() {
return devicetype;
}
public void setDevicetype(Integer devicetype) {
this.devicetype = devicetype;
}
public Integer getBatterylevel() {
return batterylevel;
}
public void setBatterylevel(Integer batterylevel) {
this.batterylevel = batterylevel;
}
public Integer getSingalstrength() {
return singalstrength;
}
public void setSingalstrength(Integer singalstrength) {
this.singalstrength = singalstrength;
}
public String getSampledata() {
return sampledata;
}
public void setSampledata(String sampledata) {
this.sampledata = sampledata == null ? null : sampledata.trim();
}
public Integer getPassnum() {
return passnum;
}
public void setPassnum(Integer passnum) {
this.passnum = passnum;
}
public Integer getBatterystate() {
return batterystate;
}
public void setBatterystate(Integer batterystate) {
this.batterystate = batterystate;
}
public String getAlarmtype() {
return alarmtype;
}
public void setAlarmtype(String alarmtype) {
this.alarmtype = alarmtype == null ? null : alarmtype.trim();
}
public String getPlatformtype() {
return platformtype;
}
public void setPlatformtype(String platformtype) {
this.platformtype = platformtype == null ? null : platformtype.trim();
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username == null ? null : username.trim();
}
public String getUnit() {
return unit;
}
public void setUnit(String unit) {
this.unit = unit == null ? null : unit.trim();
}
public String getSendtime() {
return sendtime;
}
public void setSendtime(String sendtime) {
this.sendtime = sendtime == null ? null : sendtime.trim();
}
public Date getTime() {
return time;
}
public void setTime(Date time) {
this.time = time;
}
public Date getOfflinetime() {
return offlinetime;
}
public void setOfflinetime(Date offlinetime) {
this.offlinetime = offlinetime;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value == null ? null : value.trim();
}
public Date getSenddate() {
return senddate;
}
public void setSenddate(Date senddate) {
this.senddate = senddate;
}
public String getImsi() {
return imsi;
}
public void setImsi(String imsi) {
this.imsi = imsi;
}
public String getIccid() {
return iccid;
}
public void setIccid(String iccid) {
this.iccid = iccid;
}
public Double getLon() {
return lon;
}
public void setLon(Double lon) {
this.lon = lon;
}
public Double getLat() {
return lat;
}
public void setLat(Double lat) {
this.lat = lat;
}
public String getAlarmMsg() {
return alarmMsg;
}
public void setAlarmMsg(String alarmMsg) {
this.alarmMsg = alarmMsg;
}
@Override
public String toString() {
return "Device{" +
"imei='" + imei + '\'' +
", devicetype=" + devicetype +
", batterylevel=" + batterylevel +
", singalstrength=" + singalstrength +
", sampledata='" + sampledata + '\'' +
", passnum=" + passnum +
", batterystate=" + batterystate +
", alarmtype='" + alarmtype + '\'' +
", platformtype='" + platformtype + '\'' +
", username='" + username + '\'' +
", unit='" + unit + '\'' +
", sendtime='" + sendtime + '\'' +
", time=" + time +
", offlinetime=" + offlinetime +
", value='" + value + '\'' +
", imsi='" + imsi + '\'' +
", iccid='" + iccid + '\'' +
", senddate=" + senddate +
", protocol='" + protocol + '\'' +
", lon=" + lon +
", lat=" + lat +
", parentImei='" + parentImei + '\'' +
", deviceid='" + deviceid + '\'' +
", sampTime='" + sampTime + '\'' +
", alarmMsg='" + alarmMsg + '\'' +
", devModel=" + devModel +
'}';
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table device
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public enum Column {
imei("Imei", "imei", "VARCHAR", false),
devicetype("deviceType", "devicetype", "INTEGER", false),
batterylevel("batteryLevel", "batterylevel", "INTEGER", false),
singalstrength("singalStrength", "singalstrength", "INTEGER", false),
sampledata("sampleData", "sampledata", "VARCHAR", false),
passnum("passNum", "passnum", "INTEGER", false),
batterystate("batteryState", "batterystate", "INTEGER", false),
alarmtype("alarmType", "alarmtype", "VARCHAR", false),
platformtype("platformType", "platformtype", "VARCHAR", false),
username("userName", "username", "VARCHAR", false),
unit("unit", "unit", "VARCHAR", false),
sendtime("sendTime", "sendtime", "VARCHAR", false),
time("time", "time", "TIMESTAMP", false),
offlinetime("offlineTime", "offlinetime", "TIMESTAMP", false),
value("value", "value", "VARCHAR", false),
senddate("sendDate", "senddate", "TIMESTAMP", false);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String BEGINNING_DELIMITER = "\"";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String ENDING_DELIMITER = "\"";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String column;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final boolean isColumnNameDelimited;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String javaProperty;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String jdbcType;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String value() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getValue() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJavaProperty() {
return this.javaProperty;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJdbcType() {
return this.jdbcType;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
this.column = column;
this.javaProperty = javaProperty;
this.jdbcType = jdbcType;
this.isColumnNameDelimited = isColumnNameDelimited;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String desc() {
return this.getEscapedColumnName() + " DESC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String asc() {
return this.getEscapedColumnName() + " ASC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public static Column[] excludes(Column ... excludes) {
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
if (excludes != null && excludes.length > 0) {
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
}
return columns.toArray(new Column[]{});
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getEscapedColumnName() {
if (this.isColumnNameDelimited) {
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
} else {
return this.column;
}
}
}
}

+ 434
- 0
src/main/java/com/topsail/influxdb/pojo/DeviceDetail.java View File

@ -0,0 +1,434 @@
package com.topsail.influxdb.pojo;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
public class DeviceDetail {
private String imei;
private Integer id;
private Integer deviceType;
private Integer orderId;
private Integer projectId;
private String name;
private Double lon;
private Double lat;
private Date buyDate;
private Float buyLong;
private Date time;
private String imsi;
private String iccid;
private String address;
private Integer delivered;
private String platform;
private String deviceid;
private Integer companyId;
private Integer period;
private Integer belong;
private String handleResult;
private Integer registerInfoId;
private Date updatetime;
public String getImei() {
return imei;
}
public void setImei(String imei) {
this.imei = imei == null ? null : imei.trim();
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getDeviceType() {
return deviceType;
}
public void setDeviceType(Integer deviceType) {
this.deviceType = deviceType;
}
public Integer getOrderId() {
return orderId;
}
public void setOrderId(Integer orderId) {
this.orderId = orderId;
}
public Integer getProjectId() {
return projectId;
}
public void setProjectId(Integer projectId) {
this.projectId = projectId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
public Double getLon() {
return lon;
}
public void setLon(Double lon) {
this.lon = lon;
}
public Double getLat() {
return lat;
}
public void setLat(Double lat) {
this.lat = lat;
}
public Date getBuyDate() {
return buyDate;
}
public void setBuyDate(Date buyDate) {
this.buyDate = buyDate;
}
public Float getBuyLong() {
return buyLong;
}
public void setBuyLong(Float buyLong) {
this.buyLong = buyLong;
}
public Date getTime() {
return time;
}
public void setTime(Date time) {
this.time = time;
}
public String getImsi() {
return imsi;
}
public void setImsi(String imsi) {
this.imsi = imsi == null ? null : imsi.trim();
}
public String getIccid() {
return iccid;
}
public void setIccid(String iccid) {
this.iccid = iccid == null ? null : iccid.trim();
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address == null ? null : address.trim();
}
public Integer getDelivered() {
return delivered;
}
public void setDelivered(Integer delivered) {
this.delivered = delivered;
}
public String getPlatform() {
return platform;
}
public void setPlatform(String platform) {
this.platform = platform == null ? null : platform.trim();
}
public String getDeviceid() {
return deviceid;
}
public void setDeviceid(String deviceid) {
this.deviceid = deviceid == null ? null : deviceid.trim();
}
public Integer getCompanyId() {
return companyId;
}
public void setCompanyId(Integer companyId) {
this.companyId = companyId;
}
public Integer getPeriod() {
return period;
}
public void setPeriod(Integer period) {
this.period = period;
}
public Integer getBelong() {
return belong;
}
public void setBelong(Integer belong) {
this.belong = belong;
}
public String getHandleResult() {
return handleResult;
}
public void setHandleResult(String handleResult) {
this.handleResult = handleResult == null ? null : handleResult.trim();
}
public Integer getRegisterInfoId() {
return registerInfoId;
}
public void setRegisterInfoId(Integer registerInfoId) {
this.registerInfoId = registerInfoId;
}
public Date getUpdatetime() {
return updatetime;
}
public void setUpdatetime(Date updatetime) {
this.updatetime = updatetime;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table device_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public enum Column {
imei("imei", "imei", "VARCHAR", false),
id("id", "id", "INTEGER", false),
deviceType("device_type", "deviceType", "INTEGER", false),
orderId("order_id", "orderId", "INTEGER", false),
projectId("project_id", "projectId", "INTEGER", false),
name("name", "name", "VARCHAR", false),
lon("lon", "lon", "DOUBLE", false),
lat("lat", "lat", "DOUBLE", false),
buyDate("buy_date", "buyDate", "TIMESTAMP", false),
buyLong("buy_long", "buyLong", "REAL", false),
time("time", "time", "TIMESTAMP", false),
imsi("imsi", "imsi", "VARCHAR", false),
iccid("iccid", "iccid", "VARCHAR", false),
address("address", "address", "VARCHAR", false),
delivered("delivered", "delivered", "INTEGER", false),
platform("platform", "platform", "VARCHAR", false),
deviceid("deviceId", "deviceid", "VARCHAR", false),
companyId("company_id", "companyId", "INTEGER", false),
period("period", "period", "INTEGER", false),
belong("belong", "belong", "INTEGER", false),
handleResult("handle_result", "handleResult", "VARCHAR", false),
registerInfoId("register_info_id", "registerInfoId", "INTEGER", false),
updatetime("updatetime", "updatetime", "TIMESTAMP", false);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String BEGINNING_DELIMITER = "\"";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String ENDING_DELIMITER = "\"";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String column;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final boolean isColumnNameDelimited;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String javaProperty;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String jdbcType;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String value() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getValue() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJavaProperty() {
return this.javaProperty;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJdbcType() {
return this.jdbcType;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
this.column = column;
this.javaProperty = javaProperty;
this.jdbcType = jdbcType;
this.isColumnNameDelimited = isColumnNameDelimited;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String desc() {
return this.getEscapedColumnName() + " DESC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String asc() {
return this.getEscapedColumnName() + " ASC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public static Column[] excludes(Column ... excludes) {
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
if (excludes != null && excludes.length > 0) {
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
}
return columns.toArray(new Column[]{});
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_detail
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getEscapedColumnName() {
if (this.isColumnNameDelimited) {
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
} else {
return this.column;
}
}
}
}

+ 1661
- 0
src/main/java/com/topsail/influxdb/pojo/DeviceDetailExample.java
File diff suppressed because it is too large
View File


+ 379
- 0
src/main/java/com/topsail/influxdb/pojo/DeviceDetails.java View File

@ -0,0 +1,379 @@
package com.topsail.influxdb.pojo;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
public class DeviceDetails {
private Integer id;
private String imei;
private Integer deviceType;
private Date buyDate;
private Float buyLong;
private Integer delivered;
private Integer companyId;
private String companyName;
private String companyperiod;
private Integer projectId;
private String platform;
private String projectName;
private Integer orderId;
private String orderNo;
private Integer buyNumber;
private String productStatus;
private Integer period;
private Integer status;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getImei() {
return imei;
}
public void setImei(String imei) {
this.imei = imei == null ? null : imei.trim();
}
public Integer getDeviceType() {
return deviceType;
}
public void setDeviceType(Integer deviceType) {
this.deviceType = deviceType;
}
public Date getBuyDate() {
return buyDate;
}
public void setBuyDate(Date buyDate) {
this.buyDate = buyDate;
}
public Float getBuyLong() {
return buyLong;
}
public void setBuyLong(Float buyLong) {
this.buyLong = buyLong;
}
public Integer getDelivered() {
return delivered;
}
public void setDelivered(Integer delivered) {
this.delivered = delivered;
}
public Integer getCompanyId() {
return companyId;
}
public void setCompanyId(Integer companyId) {
this.companyId = companyId;
}
public String getCompanyName() {
return companyName;
}
public void setCompanyName(String companyName) {
this.companyName = companyName == null ? null : companyName.trim();
}
public String getCompanyperiod() {
return companyperiod;
}
public void setCompanyperiod(String companyperiod) {
this.companyperiod = companyperiod == null ? null : companyperiod.trim();
}
public Integer getProjectId() {
return projectId;
}
public void setProjectId(Integer projectId) {
this.projectId = projectId;
}
public String getPlatform() {
return platform;
}
public void setPlatform(String platform) {
this.platform = platform == null ? null : platform.trim();
}
public String getProjectName() {
return projectName;
}
public void setProjectName(String projectName) {
this.projectName = projectName == null ? null : projectName.trim();
}
public Integer getOrderId() {
return orderId;
}
public void setOrderId(Integer orderId) {
this.orderId = orderId;
}
public String getOrderNo() {
return orderNo;
}
public void setOrderNo(String orderNo) {
this.orderNo = orderNo == null ? null : orderNo.trim();
}
public Integer getBuyNumber() {
return buyNumber;
}
public void setBuyNumber(Integer buyNumber) {
this.buyNumber = buyNumber;
}
public String getProductStatus() {
return productStatus;
}
public void setProductStatus(String productStatus) {
this.productStatus = productStatus == null ? null : productStatus.trim();
}
public Integer getPeriod() {
return period;
}
public void setPeriod(Integer period) {
this.period = period;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table device_details
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public enum Column {
id("id", "id", "INTEGER", false),
imei("imei", "imei", "VARCHAR", false),
deviceType("device_type", "deviceType", "INTEGER", false),
buyDate("buy_date", "buyDate", "TIMESTAMP", false),
buyLong("buy_long", "buyLong", "REAL", false),
delivered("delivered", "delivered", "INTEGER", false),
companyId("company_id", "companyId", "INTEGER", false),
companyName("company_name", "companyName", "VARCHAR", false),
companyperiod("companyperiod", "companyperiod", "VARCHAR", false),
projectId("project_id", "projectId", "INTEGER", false),
platform("platform", "platform", "VARCHAR", false),
projectName("project_name", "projectName", "VARCHAR", false),
orderId("order_id", "orderId", "INTEGER", false),
orderNo("order_no", "orderNo", "VARCHAR", false),
buyNumber("buy_number", "buyNumber", "INTEGER", false),
productStatus("product_status", "productStatus", "VARCHAR", false),
period("period", "period", "INTEGER", false),
status("status", "status", "INTEGER", false);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device_details
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String BEGINNING_DELIMITER = "\"";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device_details
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String ENDING_DELIMITER = "\"";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device_details
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String column;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device_details
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final boolean isColumnNameDelimited;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device_details
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String javaProperty;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device_details
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String jdbcType;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_details
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String value() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_details
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getValue() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_details
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJavaProperty() {
return this.javaProperty;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_details
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJdbcType() {
return this.jdbcType;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_details
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
this.column = column;
this.javaProperty = javaProperty;
this.jdbcType = jdbcType;
this.isColumnNameDelimited = isColumnNameDelimited;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_details
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String desc() {
return this.getEscapedColumnName() + " DESC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_details
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String asc() {
return this.getEscapedColumnName() + " ASC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_details
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public static Column[] excludes(Column ... excludes) {
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
if (excludes != null && excludes.length > 0) {
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
}
return columns.toArray(new Column[]{});
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_details
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getEscapedColumnName() {
if (this.isColumnNameDelimited) {
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
} else {
return this.column;
}
}
}
}

+ 1351
- 0
src/main/java/com/topsail/influxdb/pojo/DeviceDetailsExample.java
File diff suppressed because it is too large
View File


+ 1241
- 0
src/main/java/com/topsail/influxdb/pojo/DeviceExample.java
File diff suppressed because it is too large
View File


+ 279
- 0
src/main/java/com/topsail/influxdb/pojo/DeviceInfo.java View File

@ -0,0 +1,279 @@
package com.topsail.influxdb.pojo;
import java.util.ArrayList;
import java.util.Arrays;
public class DeviceInfo {
private Integer id;
private String verifycode;
private String devicetype;
private String username;
private String latitude;
private String longitude;
private String version;
private Integer fkPid;
private String deviceid;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getVerifycode() {
return verifycode;
}
public void setVerifycode(String verifycode) {
this.verifycode = verifycode == null ? null : verifycode.trim();
}
public String getDevicetype() {
return devicetype;
}
public void setDevicetype(String devicetype) {
this.devicetype = devicetype == null ? null : devicetype.trim();
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username == null ? null : username.trim();
}
public String getLatitude() {
return latitude;
}
public void setLatitude(String latitude) {
this.latitude = latitude == null ? null : latitude.trim();
}
public String getLongitude() {
return longitude;
}
public void setLongitude(String longitude) {
this.longitude = longitude == null ? null : longitude.trim();
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version == null ? null : version.trim();
}
public Integer getFkPid() {
return fkPid;
}
public void setFkPid(Integer fkPid) {
this.fkPid = fkPid;
}
public String getDeviceid() {
return deviceid;
}
public void setDeviceid(String deviceid) {
this.deviceid = deviceid == null ? null : deviceid.trim();
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table device_info
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public enum Column {
id("id", "id", "INTEGER", false),
verifycode("verifyCode", "verifycode", "VARCHAR", false),
devicetype("deviceType", "devicetype", "VARCHAR", false),
username("userName", "username", "VARCHAR", false),
latitude("latitude", "latitude", "VARCHAR", false),
longitude("longitude", "longitude", "VARCHAR", false),
version("version", "version", "VARCHAR", false),
fkPid("fk_pid", "fkPid", "INTEGER", false),
deviceid("deviceId", "deviceid", "LONGVARCHAR", false);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device_info
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String BEGINNING_DELIMITER = "\"";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device_info
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String ENDING_DELIMITER = "\"";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device_info
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String column;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device_info
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final boolean isColumnNameDelimited;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device_info
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String javaProperty;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device_info
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String jdbcType;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_info
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String value() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_info
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getValue() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_info
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJavaProperty() {
return this.javaProperty;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_info
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJdbcType() {
return this.jdbcType;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_info
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
this.column = column;
this.javaProperty = javaProperty;
this.jdbcType = jdbcType;
this.isColumnNameDelimited = isColumnNameDelimited;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_info
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String desc() {
return this.getEscapedColumnName() + " DESC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_info
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String asc() {
return this.getEscapedColumnName() + " ASC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_info
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public static Column[] excludes(Column ... excludes) {
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
if (excludes != null && excludes.length > 0) {
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
}
return columns.toArray(new Column[]{});
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_info
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getEscapedColumnName() {
if (this.isColumnNameDelimited) {
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
} else {
return this.column;
}
}
}
}

+ 740
- 0
src/main/java/com/topsail/influxdb/pojo/DeviceInfoExample.java View File

@ -0,0 +1,740 @@
package com.topsail.influxdb.pojo;
import java.util.ArrayList;
import java.util.List;
public class DeviceInfoExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public DeviceInfoExample() {
oredCriteria = new ArrayList<Criteria>();
}
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<Criteria> 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;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> 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<Integer> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Integer> 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 andVerifycodeIsNull() {
addCriterion("verifyCode is null");
return (Criteria) this;
}
public Criteria andVerifycodeIsNotNull() {
addCriterion("verifyCode is not null");
return (Criteria) this;
}
public Criteria andVerifycodeEqualTo(String value) {
addCriterion("verifyCode =", value, "verifycode");
return (Criteria) this;
}
public Criteria andVerifycodeNotEqualTo(String value) {
addCriterion("verifyCode <>", value, "verifycode");
return (Criteria) this;
}
public Criteria andVerifycodeGreaterThan(String value) {
addCriterion("verifyCode >", value, "verifycode");
return (Criteria) this;
}
public Criteria andVerifycodeGreaterThanOrEqualTo(String value) {
addCriterion("verifyCode >=", value, "verifycode");
return (Criteria) this;
}
public Criteria andVerifycodeLessThan(String value) {
addCriterion("verifyCode <", value, "verifycode");
return (Criteria) this;
}
public Criteria andVerifycodeLessThanOrEqualTo(String value) {
addCriterion("verifyCode <=", value, "verifycode");
return (Criteria) this;
}
public Criteria andVerifycodeLike(String value) {
addCriterion("verifyCode like", value, "verifycode");
return (Criteria) this;
}
public Criteria andVerifycodeNotLike(String value) {
addCriterion("verifyCode not like", value, "verifycode");
return (Criteria) this;
}
public Criteria andVerifycodeIn(List<String> values) {
addCriterion("verifyCode in", values, "verifycode");
return (Criteria) this;
}
public Criteria andVerifycodeNotIn(List<String> values) {
addCriterion("verifyCode not in", values, "verifycode");
return (Criteria) this;
}
public Criteria andVerifycodeBetween(String value1, String value2) {
addCriterion("verifyCode between", value1, value2, "verifycode");
return (Criteria) this;
}
public Criteria andVerifycodeNotBetween(String value1, String value2) {
addCriterion("verifyCode not between", value1, value2, "verifycode");
return (Criteria) this;
}
public Criteria andDevicetypeIsNull() {
addCriterion("deviceType is null");
return (Criteria) this;
}
public Criteria andDevicetypeIsNotNull() {
addCriterion("deviceType is not null");
return (Criteria) this;
}
public Criteria andDevicetypeEqualTo(String value) {
addCriterion("deviceType =", value, "devicetype");
return (Criteria) this;
}
public Criteria andDevicetypeNotEqualTo(String value) {
addCriterion("deviceType <>", value, "devicetype");
return (Criteria) this;
}
public Criteria andDevicetypeGreaterThan(String value) {
addCriterion("deviceType >", value, "devicetype");
return (Criteria) this;
}
public Criteria andDevicetypeGreaterThanOrEqualTo(String value) {
addCriterion("deviceType >=", value, "devicetype");
return (Criteria) this;
}
public Criteria andDevicetypeLessThan(String value) {
addCriterion("deviceType <", value, "devicetype");
return (Criteria) this;
}
public Criteria andDevicetypeLessThanOrEqualTo(String value) {
addCriterion("deviceType <=", value, "devicetype");
return (Criteria) this;
}
public Criteria andDevicetypeLike(String value) {
addCriterion("deviceType like", value, "devicetype");
return (Criteria) this;
}
public Criteria andDevicetypeNotLike(String value) {
addCriterion("deviceType not like", value, "devicetype");
return (Criteria) this;
}
public Criteria andDevicetypeIn(List<String> values) {
addCriterion("deviceType in", values, "devicetype");
return (Criteria) this;
}
public Criteria andDevicetypeNotIn(List<String> values) {
addCriterion("deviceType not in", values, "devicetype");
return (Criteria) this;
}
public Criteria andDevicetypeBetween(String value1, String value2) {
addCriterion("deviceType between", value1, value2, "devicetype");
return (Criteria) this;
}
public Criteria andDevicetypeNotBetween(String value1, String value2) {
addCriterion("deviceType not between", value1, value2, "devicetype");
return (Criteria) this;
}
public Criteria andUsernameIsNull() {
addCriterion("userName is null");
return (Criteria) this;
}
public Criteria andUsernameIsNotNull() {
addCriterion("userName is not null");
return (Criteria) this;
}
public Criteria andUsernameEqualTo(String value) {
addCriterion("userName =", value, "username");
return (Criteria) this;
}
public Criteria andUsernameNotEqualTo(String value) {
addCriterion("userName <>", value, "username");
return (Criteria) this;
}
public Criteria andUsernameGreaterThan(String value) {
addCriterion("userName >", value, "username");
return (Criteria) this;
}
public Criteria andUsernameGreaterThanOrEqualTo(String value) {
addCriterion("userName >=", value, "username");
return (Criteria) this;
}
public Criteria andUsernameLessThan(String value) {
addCriterion("userName <", value, "username");
return (Criteria) this;
}
public Criteria andUsernameLessThanOrEqualTo(String value) {
addCriterion("userName <=", value, "username");
return (Criteria) this;
}
public Criteria andUsernameLike(String value) {
addCriterion("userName like", value, "username");
return (Criteria) this;
}
public Criteria andUsernameNotLike(String value) {
addCriterion("userName not like", value, "username");
return (Criteria) this;
}
public Criteria andUsernameIn(List<String> values) {
addCriterion("userName in", values, "username");
return (Criteria) this;
}
public Criteria andUsernameNotIn(List<String> values) {
addCriterion("userName not in", values, "username");
return (Criteria) this;
}
public Criteria andUsernameBetween(String value1, String value2) {
addCriterion("userName between", value1, value2, "username");
return (Criteria) this;
}
public Criteria andUsernameNotBetween(String value1, String value2) {
addCriterion("userName not between", value1, value2, "username");
return (Criteria) this;
}
public Criteria andLatitudeIsNull() {
addCriterion("latitude is null");
return (Criteria) this;
}
public Criteria andLatitudeIsNotNull() {
addCriterion("latitude is not null");
return (Criteria) this;
}
public Criteria andLatitudeEqualTo(String value) {
addCriterion("latitude =", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeNotEqualTo(String value) {
addCriterion("latitude <>", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeGreaterThan(String value) {
addCriterion("latitude >", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeGreaterThanOrEqualTo(String value) {
addCriterion("latitude >=", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeLessThan(String value) {
addCriterion("latitude <", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeLessThanOrEqualTo(String value) {
addCriterion("latitude <=", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeLike(String value) {
addCriterion("latitude like", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeNotLike(String value) {
addCriterion("latitude not like", value, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeIn(List<String> values) {
addCriterion("latitude in", values, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeNotIn(List<String> values) {
addCriterion("latitude not in", values, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeBetween(String value1, String value2) {
addCriterion("latitude between", value1, value2, "latitude");
return (Criteria) this;
}
public Criteria andLatitudeNotBetween(String value1, String value2) {
addCriterion("latitude not between", value1, value2, "latitude");
return (Criteria) this;
}
public Criteria andLongitudeIsNull() {
addCriterion("longitude is null");
return (Criteria) this;
}
public Criteria andLongitudeIsNotNull() {
addCriterion("longitude is not null");
return (Criteria) this;
}
public Criteria andLongitudeEqualTo(String value) {
addCriterion("longitude =", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeNotEqualTo(String value) {
addCriterion("longitude <>", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeGreaterThan(String value) {
addCriterion("longitude >", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeGreaterThanOrEqualTo(String value) {
addCriterion("longitude >=", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeLessThan(String value) {
addCriterion("longitude <", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeLessThanOrEqualTo(String value) {
addCriterion("longitude <=", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeLike(String value) {
addCriterion("longitude like", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeNotLike(String value) {
addCriterion("longitude not like", value, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeIn(List<String> values) {
addCriterion("longitude in", values, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeNotIn(List<String> values) {
addCriterion("longitude not in", values, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeBetween(String value1, String value2) {
addCriterion("longitude between", value1, value2, "longitude");
return (Criteria) this;
}
public Criteria andLongitudeNotBetween(String value1, String value2) {
addCriterion("longitude not between", value1, value2, "longitude");
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<String> values) {
addCriterion("version in", values, "version");
return (Criteria) this;
}
public Criteria andVersionNotIn(List<String> 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 andFkPidIsNull() {
addCriterion("fk_pid is null");
return (Criteria) this;
}
public Criteria andFkPidIsNotNull() {
addCriterion("fk_pid is not null");
return (Criteria) this;
}
public Criteria andFkPidEqualTo(Integer value) {
addCriterion("fk_pid =", value, "fkPid");
return (Criteria) this;
}
public Criteria andFkPidNotEqualTo(Integer value) {
addCriterion("fk_pid <>", value, "fkPid");
return (Criteria) this;
}
public Criteria andFkPidGreaterThan(Integer value) {
addCriterion("fk_pid >", value, "fkPid");
return (Criteria) this;
}
public Criteria andFkPidGreaterThanOrEqualTo(Integer value) {
addCriterion("fk_pid >=", value, "fkPid");
return (Criteria) this;
}
public Criteria andFkPidLessThan(Integer value) {
addCriterion("fk_pid <", value, "fkPid");
return (Criteria) this;
}
public Criteria andFkPidLessThanOrEqualTo(Integer value) {
addCriterion("fk_pid <=", value, "fkPid");
return (Criteria) this;
}
public Criteria andFkPidIn(List<Integer> values) {
addCriterion("fk_pid in", values, "fkPid");
return (Criteria) this;
}
public Criteria andFkPidNotIn(List<Integer> values) {
addCriterion("fk_pid not in", values, "fkPid");
return (Criteria) this;
}
public Criteria andFkPidBetween(Integer value1, Integer value2) {
addCriterion("fk_pid between", value1, value2, "fkPid");
return (Criteria) this;
}
public Criteria andFkPidNotBetween(Integer value1, Integer value2) {
addCriterion("fk_pid not between", value1, value2, "fkPid");
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);
}
}
}

+ 236
- 0
src/main/java/com/topsail/influxdb/pojo/DeviceLog.java View File

@ -0,0 +1,236 @@
package com.topsail.influxdb.pojo;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
public class DeviceLog {
private Integer id;
private String imei;
private String operation;
private String params;
private Date updatetime;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getImei() {
return imei;
}
public void setImei(String imei) {
this.imei = imei == null ? null : imei.trim();
}
public String getOperation() {
return operation;
}
public void setOperation(String operation) {
this.operation = operation == null ? null : operation.trim();
}
public String getParams() {
return params;
}
public void setParams(String params) {
this.params = params == null ? null : params.trim();
}
public Date getUpdatetime() {
return updatetime;
}
public void setUpdatetime(Date updatetime) {
this.updatetime = updatetime;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table device_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public enum Column {
id("id", "id", "INTEGER", false),
imei("imei", "imei", "VARCHAR", false),
operation("operation", "operation", "VARCHAR", false),
params("params", "params", "VARCHAR", false),
updatetime("updatetime", "updatetime", "TIMESTAMP", false);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String BEGINNING_DELIMITER = "\"";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String ENDING_DELIMITER = "\"";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String column;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final boolean isColumnNameDelimited;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String javaProperty;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String jdbcType;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String value() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getValue() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJavaProperty() {
return this.javaProperty;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJdbcType() {
return this.jdbcType;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
this.column = column;
this.javaProperty = javaProperty;
this.jdbcType = jdbcType;
this.isColumnNameDelimited = isColumnNameDelimited;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String desc() {
return this.getEscapedColumnName() + " DESC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String asc() {
return this.getEscapedColumnName() + " ASC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public static Column[] excludes(Column ... excludes) {
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
if (excludes != null && excludes.length > 0) {
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
}
return columns.toArray(new Column[]{});
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_log
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getEscapedColumnName() {
if (this.isColumnNameDelimited) {
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
} else {
return this.column;
}
}
}
}

+ 531
- 0
src/main/java/com/topsail/influxdb/pojo/DeviceLogExample.java View File

@ -0,0 +1,531 @@
package com.topsail.influxdb.pojo;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class DeviceLogExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public DeviceLogExample() {
oredCriteria = new ArrayList<Criteria>();
}
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<Criteria> 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;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> 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<Integer> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Integer> 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 andImeiIsNull() {
addCriterion("imei is null");
return (Criteria) this;
}
public Criteria andImeiIsNotNull() {
addCriterion("imei is not null");
return (Criteria) this;
}
public Criteria andImeiEqualTo(String value) {
addCriterion("imei =", value, "imei");
return (Criteria) this;
}
public Criteria andImeiNotEqualTo(String value) {
addCriterion("imei <>", value, "imei");
return (Criteria) this;
}
public Criteria andImeiGreaterThan(String value) {
addCriterion("imei >", value, "imei");
return (Criteria) this;
}
public Criteria andImeiGreaterThanOrEqualTo(String value) {
addCriterion("imei >=", value, "imei");
return (Criteria) this;
}
public Criteria andImeiLessThan(String value) {
addCriterion("imei <", value, "imei");
return (Criteria) this;
}
public Criteria andImeiLessThanOrEqualTo(String value) {
addCriterion("imei <=", value, "imei");
return (Criteria) this;
}
public Criteria andImeiLike(String value) {
addCriterion("imei like", value, "imei");
return (Criteria) this;
}
public Criteria andImeiNotLike(String value) {
addCriterion("imei not like", value, "imei");
return (Criteria) this;
}
public Criteria andImeiIn(List<String> values) {
addCriterion("imei in", values, "imei");
return (Criteria) this;
}
public Criteria andImeiNotIn(List<String> values) {
addCriterion("imei not in", values, "imei");
return (Criteria) this;
}
public Criteria andImeiBetween(String value1, String value2) {
addCriterion("imei between", value1, value2, "imei");
return (Criteria) this;
}
public Criteria andImeiNotBetween(String value1, String value2) {
addCriterion("imei not between", value1, value2, "imei");
return (Criteria) this;
}
public Criteria andOperationIsNull() {
addCriterion("operation is null");
return (Criteria) this;
}
public Criteria andOperationIsNotNull() {
addCriterion("operation is not null");
return (Criteria) this;
}
public Criteria andOperationEqualTo(String value) {
addCriterion("operation =", value, "operation");
return (Criteria) this;
}
public Criteria andOperationNotEqualTo(String value) {
addCriterion("operation <>", value, "operation");
return (Criteria) this;
}
public Criteria andOperationGreaterThan(String value) {
addCriterion("operation >", value, "operation");
return (Criteria) this;
}
public Criteria andOperationGreaterThanOrEqualTo(String value) {
addCriterion("operation >=", value, "operation");
return (Criteria) this;
}
public Criteria andOperationLessThan(String value) {
addCriterion("operation <", value, "operation");
return (Criteria) this;
}
public Criteria andOperationLessThanOrEqualTo(String value) {
addCriterion("operation <=", value, "operation");
return (Criteria) this;
}
public Criteria andOperationLike(String value) {
addCriterion("operation like", value, "operation");
return (Criteria) this;
}
public Criteria andOperationNotLike(String value) {
addCriterion("operation not like", value, "operation");
return (Criteria) this;
}
public Criteria andOperationIn(List<String> values) {
addCriterion("operation in", values, "operation");
return (Criteria) this;
}
public Criteria andOperationNotIn(List<String> values) {
addCriterion("operation not in", values, "operation");
return (Criteria) this;
}
public Criteria andOperationBetween(String value1, String value2) {
addCriterion("operation between", value1, value2, "operation");
return (Criteria) this;
}
public Criteria andOperationNotBetween(String value1, String value2) {
addCriterion("operation not between", value1, value2, "operation");
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<String> values) {
addCriterion("params in", values, "params");
return (Criteria) this;
}
public Criteria andParamsNotIn(List<String> 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 Criteria andUpdatetimeIsNull() {
addCriterion("updatetime is null");
return (Criteria) this;
}
public Criteria andUpdatetimeIsNotNull() {
addCriterion("updatetime is not null");
return (Criteria) this;
}
public Criteria andUpdatetimeEqualTo(Date value) {
addCriterion("updatetime =", value, "updatetime");
return (Criteria) this;
}
public Criteria andUpdatetimeNotEqualTo(Date value) {
addCriterion("updatetime <>", value, "updatetime");
return (Criteria) this;
}
public Criteria andUpdatetimeGreaterThan(Date value) {
addCriterion("updatetime >", value, "updatetime");
return (Criteria) this;
}
public Criteria andUpdatetimeGreaterThanOrEqualTo(Date value) {
addCriterion("updatetime >=", value, "updatetime");
return (Criteria) this;
}
public Criteria andUpdatetimeLessThan(Date value) {
addCriterion("updatetime <", value, "updatetime");
return (Criteria) this;
}
public Criteria andUpdatetimeLessThanOrEqualTo(Date value) {
addCriterion("updatetime <=", value, "updatetime");
return (Criteria) this;
}
public Criteria andUpdatetimeIn(List<Date> values) {
addCriterion("updatetime in", values, "updatetime");
return (Criteria) this;
}
public Criteria andUpdatetimeNotIn(List<Date> values) {
addCriterion("updatetime not in", values, "updatetime");
return (Criteria) this;
}
public Criteria andUpdatetimeBetween(Date value1, Date value2) {
addCriterion("updatetime between", value1, value2, "updatetime");
return (Criteria) this;
}
public Criteria andUpdatetimeNotBetween(Date value1, Date value2) {
addCriterion("updatetime 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);
}
}
}

+ 246
- 0
src/main/java/com/topsail/influxdb/pojo/DeviceProjectView.java View File

@ -0,0 +1,246 @@
package com.topsail.influxdb.pojo;
import java.util.ArrayList;
import java.util.Arrays;
public class DeviceProjectView {
private String imei;
private Integer devicetype;
private String username;
private Integer companyId;
private Integer projectId;
private String imei2;
public String getImei() {
return imei;
}
public void setImei(String imei) {
this.imei = imei == null ? null : imei.trim();
}
public Integer getDevicetype() {
return devicetype;
}
public void setDevicetype(Integer devicetype) {
this.devicetype = devicetype;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username == null ? null : username.trim();
}
public Integer getCompanyId() {
return companyId;
}
public void setCompanyId(Integer companyId) {
this.companyId = companyId;
}
public Integer getProjectId() {
return projectId;
}
public void setProjectId(Integer projectId) {
this.projectId = projectId;
}
public String getImei2() {
return imei2;
}
public void setImei2(String imei2) {
this.imei2 = imei2 == null ? null : imei2.trim();
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table device_project_view
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public enum Column {
imei("imei", "imei", "VARCHAR", false),
devicetype("deviceType", "devicetype", "INTEGER", false),
username("userName", "username", "VARCHAR", false),
companyId("company_id", "companyId", "INTEGER", false),
projectId("project_id", "projectId", "INTEGER", false),
imei2("imei2", "imei2", "VARCHAR", false);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device_project_view
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String BEGINNING_DELIMITER = "\"";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device_project_view
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String ENDING_DELIMITER = "\"";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device_project_view
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String column;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device_project_view
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final boolean isColumnNameDelimited;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device_project_view
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String javaProperty;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device_project_view
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String jdbcType;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_project_view
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String value() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_project_view
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getValue() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_project_view
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJavaProperty() {
return this.javaProperty;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_project_view
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJdbcType() {
return this.jdbcType;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_project_view
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
this.column = column;
this.javaProperty = javaProperty;
this.jdbcType = jdbcType;
this.isColumnNameDelimited = isColumnNameDelimited;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_project_view
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String desc() {
return this.getEscapedColumnName() + " DESC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_project_view
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String asc() {
return this.getEscapedColumnName() + " ASC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_project_view
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public static Column[] excludes(Column ... excludes) {
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
if (excludes != null && excludes.length > 0) {
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
}
return columns.toArray(new Column[]{});
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_project_view
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getEscapedColumnName() {
if (this.isColumnNameDelimited) {
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
} else {
return this.column;
}
}
}
}

+ 590
- 0
src/main/java/com/topsail/influxdb/pojo/DeviceProjectViewExample.java View File

@ -0,0 +1,590 @@
package com.topsail.influxdb.pojo;
import java.util.ArrayList;
import java.util.List;
public class DeviceProjectViewExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public DeviceProjectViewExample() {
oredCriteria = new ArrayList<Criteria>();
}
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<Criteria> 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;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> 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 andImeiIsNull() {
addCriterion("imei is null");
return (Criteria) this;
}
public Criteria andImeiIsNotNull() {
addCriterion("imei is not null");
return (Criteria) this;
}
public Criteria andImeiEqualTo(String value) {
addCriterion("imei =", value, "imei");
return (Criteria) this;
}
public Criteria andImeiNotEqualTo(String value) {
addCriterion("imei <>", value, "imei");
return (Criteria) this;
}
public Criteria andImeiGreaterThan(String value) {
addCriterion("imei >", value, "imei");
return (Criteria) this;
}
public Criteria andImeiGreaterThanOrEqualTo(String value) {
addCriterion("imei >=", value, "imei");
return (Criteria) this;
}
public Criteria andImeiLessThan(String value) {
addCriterion("imei <", value, "imei");
return (Criteria) this;
}
public Criteria andImeiLessThanOrEqualTo(String value) {
addCriterion("imei <=", value, "imei");
return (Criteria) this;
}
public Criteria andImeiLike(String value) {
addCriterion("imei like", value, "imei");
return (Criteria) this;
}
public Criteria andImeiNotLike(String value) {
addCriterion("imei not like", value, "imei");
return (Criteria) this;
}
public Criteria andImeiIn(List<String> values) {
addCriterion("imei in", values, "imei");
return (Criteria) this;
}
public Criteria andImeiNotIn(List<String> values) {
addCriterion("imei not in", values, "imei");
return (Criteria) this;
}
public Criteria andImeiBetween(String value1, String value2) {
addCriterion("imei between", value1, value2, "imei");
return (Criteria) this;
}
public Criteria andImeiNotBetween(String value1, String value2) {
addCriterion("imei not between", value1, value2, "imei");
return (Criteria) this;
}
public Criteria andDevicetypeIsNull() {
addCriterion("deviceType is null");
return (Criteria) this;
}
public Criteria andDevicetypeIsNotNull() {
addCriterion("deviceType is not null");
return (Criteria) this;
}
public Criteria andDevicetypeEqualTo(Integer value) {
addCriterion("deviceType =", value, "devicetype");
return (Criteria) this;
}
public Criteria andDevicetypeNotEqualTo(Integer value) {
addCriterion("deviceType <>", value, "devicetype");
return (Criteria) this;
}
public Criteria andDevicetypeGreaterThan(Integer value) {
addCriterion("deviceType >", value, "devicetype");
return (Criteria) this;
}
public Criteria andDevicetypeGreaterThanOrEqualTo(Integer value) {
addCriterion("deviceType >=", value, "devicetype");
return (Criteria) this;
}
public Criteria andDevicetypeLessThan(Integer value) {
addCriterion("deviceType <", value, "devicetype");
return (Criteria) this;
}
public Criteria andDevicetypeLessThanOrEqualTo(Integer value) {
addCriterion("deviceType <=", value, "devicetype");
return (Criteria) this;
}
public Criteria andDevicetypeIn(List<Integer> values) {
addCriterion("deviceType in", values, "devicetype");
return (Criteria) this;
}
public Criteria andDevicetypeNotIn(List<Integer> values) {
addCriterion("deviceType not in", values, "devicetype");
return (Criteria) this;
}
public Criteria andDevicetypeBetween(Integer value1, Integer value2) {
addCriterion("deviceType between", value1, value2, "devicetype");
return (Criteria) this;
}
public Criteria andDevicetypeNotBetween(Integer value1, Integer value2) {
addCriterion("deviceType not between", value1, value2, "devicetype");
return (Criteria) this;
}
public Criteria andUsernameIsNull() {
addCriterion("userName is null");
return (Criteria) this;
}
public Criteria andUsernameIsNotNull() {
addCriterion("userName is not null");
return (Criteria) this;
}
public Criteria andUsernameEqualTo(String value) {
addCriterion("userName =", value, "username");
return (Criteria) this;
}
public Criteria andUsernameNotEqualTo(String value) {
addCriterion("userName <>", value, "username");
return (Criteria) this;
}
public Criteria andUsernameGreaterThan(String value) {
addCriterion("userName >", value, "username");
return (Criteria) this;
}
public Criteria andUsernameGreaterThanOrEqualTo(String value) {
addCriterion("userName >=", value, "username");
return (Criteria) this;
}
public Criteria andUsernameLessThan(String value) {
addCriterion("userName <", value, "username");
return (Criteria) this;
}
public Criteria andUsernameLessThanOrEqualTo(String value) {
addCriterion("userName <=", value, "username");
return (Criteria) this;
}
public Criteria andUsernameLike(String value) {
addCriterion("userName like", value, "username");
return (Criteria) this;
}
public Criteria andUsernameNotLike(String value) {
addCriterion("userName not like", value, "username");
return (Criteria) this;
}
public Criteria andUsernameIn(List<String> values) {
addCriterion("userName in", values, "username");
return (Criteria) this;
}
public Criteria andUsernameNotIn(List<String> values) {
addCriterion("userName not in", values, "username");
return (Criteria) this;
}
public Criteria andUsernameBetween(String value1, String value2) {
addCriterion("userName between", value1, value2, "username");
return (Criteria) this;
}
public Criteria andUsernameNotBetween(String value1, String value2) {
addCriterion("userName not between", value1, value2, "username");
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<Integer> values) {
addCriterion("company_id in", values, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdNotIn(List<Integer> 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 andProjectIdIsNull() {
addCriterion("project_id is null");
return (Criteria) this;
}
public Criteria andProjectIdIsNotNull() {
addCriterion("project_id is not null");
return (Criteria) this;
}
public Criteria andProjectIdEqualTo(Integer value) {
addCriterion("project_id =", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotEqualTo(Integer value) {
addCriterion("project_id <>", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdGreaterThan(Integer value) {
addCriterion("project_id >", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdGreaterThanOrEqualTo(Integer value) {
addCriterion("project_id >=", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdLessThan(Integer value) {
addCriterion("project_id <", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdLessThanOrEqualTo(Integer value) {
addCriterion("project_id <=", value, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdIn(List<Integer> values) {
addCriterion("project_id in", values, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotIn(List<Integer> values) {
addCriterion("project_id not in", values, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdBetween(Integer value1, Integer value2) {
addCriterion("project_id between", value1, value2, "projectId");
return (Criteria) this;
}
public Criteria andProjectIdNotBetween(Integer value1, Integer value2) {
addCriterion("project_id not between", value1, value2, "projectId");
return (Criteria) this;
}
public Criteria andImei2IsNull() {
addCriterion("imei2 is null");
return (Criteria) this;
}
public Criteria andImei2IsNotNull() {
addCriterion("imei2 is not null");
return (Criteria) this;
}
public Criteria andImei2EqualTo(String value) {
addCriterion("imei2 =", value, "imei2");
return (Criteria) this;
}
public Criteria andImei2NotEqualTo(String value) {
addCriterion("imei2 <>", value, "imei2");
return (Criteria) this;
}
public Criteria andImei2GreaterThan(String value) {
addCriterion("imei2 >", value, "imei2");
return (Criteria) this;
}
public Criteria andImei2GreaterThanOrEqualTo(String value) {
addCriterion("imei2 >=", value, "imei2");
return (Criteria) this;
}
public Criteria andImei2LessThan(String value) {
addCriterion("imei2 <", value, "imei2");
return (Criteria) this;
}
public Criteria andImei2LessThanOrEqualTo(String value) {
addCriterion("imei2 <=", value, "imei2");
return (Criteria) this;
}
public Criteria andImei2Like(String value) {
addCriterion("imei2 like", value, "imei2");
return (Criteria) this;
}
public Criteria andImei2NotLike(String value) {
addCriterion("imei2 not like", value, "imei2");
return (Criteria) this;
}
public Criteria andImei2In(List<String> values) {
addCriterion("imei2 in", values, "imei2");
return (Criteria) this;
}
public Criteria andImei2NotIn(List<String> values) {
addCriterion("imei2 not in", values, "imei2");
return (Criteria) this;
}
public Criteria andImei2Between(String value1, String value2) {
addCriterion("imei2 between", value1, value2, "imei2");
return (Criteria) this;
}
public Criteria andImei2NotBetween(String value1, String value2) {
addCriterion("imei2 not between", value1, value2, "imei2");
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);
}
}
}

+ 423
- 0
src/main/java/com/topsail/influxdb/pojo/DeviceUser.java View File

@ -0,0 +1,423 @@
package com.topsail.influxdb.pojo;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
public class DeviceUser {
private String imei;
private Integer devicetype;
private Integer batterylevel;
private Integer singalstrength;
private String sampledata;
private Integer passnum;
private Integer batterystate;
private String alarmtype;
private String platformtype;
private String username;
private String unit;
private String sendtime;
private Date time;
private Date offlinetime;
private String address;
private Double lon;
private Double lat;
private String value;
private String name;
private Integer projectId;
private Integer userId;
private String status;
public String getImei() {
return imei;
}
public void setImei(String imei) {
this.imei = imei == null ? null : imei.trim();
}
public Integer getDevicetype() {
return devicetype;
}
public void setDevicetype(Integer devicetype) {
this.devicetype = devicetype;
}
public Integer getBatterylevel() {
return batterylevel;
}
public void setBatterylevel(Integer batterylevel) {
this.batterylevel = batterylevel;
}
public Integer getSingalstrength() {
return singalstrength;
}
public void setSingalstrength(Integer singalstrength) {
this.singalstrength = singalstrength;
}
public String getSampledata() {
return sampledata;
}
public void setSampledata(String sampledata) {
this.sampledata = sampledata == null ? null : sampledata.trim();
}
public Integer getPassnum() {
return passnum;
}
public void setPassnum(Integer passnum) {
this.passnum = passnum;
}
public Integer getBatterystate() {
return batterystate;
}
public void setBatterystate(Integer batterystate) {
this.batterystate = batterystate;
}
public String getAlarmtype() {
return alarmtype;
}
public void setAlarmtype(String alarmtype) {
this.alarmtype = alarmtype == null ? null : alarmtype.trim();
}
public String getPlatformtype() {
return platformtype;
}
public void setPlatformtype(String platformtype) {
this.platformtype = platformtype == null ? null : platformtype.trim();
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username == null ? null : username.trim();
}
public String getUnit() {
return unit;
}
public void setUnit(String unit) {
this.unit = unit == null ? null : unit.trim();
}
public String getSendtime() {
return sendtime;
}
public void setSendtime(String sendtime) {
this.sendtime = sendtime == null ? null : sendtime.trim();
}
public Date getTime() {
return time;
}
public void setTime(Date time) {
this.time = time;
}
public Date getOfflinetime() {
return offlinetime;
}
public void setOfflinetime(Date offlinetime) {
this.offlinetime = offlinetime;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address == null ? null : address.trim();
}
public Double getLon() {
return lon;
}
public void setLon(Double lon) {
this.lon = lon;
}
public Double getLat() {
return lat;
}
public void setLat(Double lat) {
this.lat = lat;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value == null ? null : value.trim();
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
public Integer getProjectId() {
return projectId;
}
public void setProjectId(Integer projectId) {
this.projectId = projectId;
}
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status == null ? null : status.trim();
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table device_user
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public enum Column {
imei("Imei", "imei", "VARCHAR", false),
devicetype("deviceType", "devicetype", "INTEGER", false),
batterylevel("batteryLevel", "batterylevel", "INTEGER", false),
singalstrength("singalStrength", "singalstrength", "INTEGER", false),
sampledata("sampleData", "sampledata", "VARCHAR", false),
passnum("passNum", "passnum", "INTEGER", false),
batterystate("batteryState", "batterystate", "INTEGER", false),
alarmtype("alarmType", "alarmtype", "VARCHAR", false),
platformtype("platformType", "platformtype", "VARCHAR", false),
username("userName", "username", "VARCHAR", false),
unit("unit", "unit", "VARCHAR", false),
sendtime("sendTime", "sendtime", "VARCHAR", false),
time("time", "time", "TIMESTAMP", false),
offlinetime("offlineTime", "offlinetime", "TIMESTAMP", false),
address("address", "address", "VARCHAR", false),
lon("lon", "lon", "DOUBLE", false),
lat("lat", "lat", "DOUBLE", false),
value("value", "value", "VARCHAR", false),
name("name", "name", "VARCHAR", false),
projectId("project_id", "projectId", "INTEGER", false),
userId("user_id", "userId", "INTEGER", false),
status("STATUS", "status", "VARCHAR", false);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device_user
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String BEGINNING_DELIMITER = "\"";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device_user
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String ENDING_DELIMITER = "\"";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device_user
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String column;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device_user
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final boolean isColumnNameDelimited;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device_user
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String javaProperty;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table device_user
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String jdbcType;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_user
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String value() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_user
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getValue() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_user
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJavaProperty() {
return this.javaProperty;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_user
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJdbcType() {
return this.jdbcType;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_user
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
this.column = column;
this.javaProperty = javaProperty;
this.jdbcType = jdbcType;
this.isColumnNameDelimited = isColumnNameDelimited;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_user
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String desc() {
return this.getEscapedColumnName() + " DESC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_user
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String asc() {
return this.getEscapedColumnName() + " ASC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_user
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public static Column[] excludes(Column ... excludes) {
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
if (excludes != null && excludes.length > 0) {
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
}
return columns.toArray(new Column[]{});
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table device_user
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getEscapedColumnName() {
if (this.isColumnNameDelimited) {
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
} else {
return this.column;
}
}
}
}

+ 1631
- 0
src/main/java/com/topsail/influxdb/pojo/DeviceUserExample.java
File diff suppressed because it is too large
View File


+ 125
- 0
src/main/java/com/topsail/influxdb/pojo/GatewayDevice.java View File

@ -0,0 +1,125 @@
package com.topsail.influxdb.pojo;
import java.util.Date;
/**
* @ClassName GatewayDevice
* @Deacription TODO
* @Author Administrator
* @Date 2022/4/22 14:45
* @Version 1.0
**/
public class GatewayDevice {
/**
* id
*/
private Integer id;
/**
* imei
*/
private String imei;
/**
* 父imei
*/
private String parentImei;
/**
* 父设备id
*/
private String deviceId;
/**
* 平台类型
*/
private String platformType;
/**
* 绑定状态0 废除 1 启用
*/
private Integer bindStatus = 1;
/**
* 修改时间
*/
private Date updateTime;
/**
* 创建时间
*/
private Date createTime;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getImei() {
return imei;
}
public void setImei(String imei) {
this.imei = imei;
}
public String getParentImei() {
return parentImei;
}
public void setParentImei(String parentImei) {
this.parentImei = parentImei;
}
public String getDeviceId() {
return deviceId;
}
public void setDeviceId(String deviceId) {
this.deviceId = deviceId;
}
public String getPlatformType() {
return platformType;
}
public void setPlatformType(String platformType) {
this.platformType = platformType;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Integer getBindStatus() {
return bindStatus;
}
public void setBindStatus(Integer bindStatus) {
this.bindStatus = bindStatus;
}
@Override
public String toString() {
return "GatewayDevice{" +
"id=" + id +
", imei='" + imei + '\'' +
", parentImei='" + parentImei + '\'' +
", deviceId='" + deviceId + '\'' +
", platformType='" + platformType + '\'' +
", bindStatus=" + bindStatus +
", updateTime=" + updateTime +
", createTime=" + createTime +
'}';
}
}

+ 382
- 0
src/main/java/com/topsail/influxdb/pojo/History.java View File

@ -0,0 +1,382 @@
package com.topsail.influxdb.pojo;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
public class History {
private Long id;
private Integer devicetype;
private String imei;
private Integer batterylevel;
private Integer singalstrength;
private String sampledata;
private Integer passnum;
private Integer batterystate;
private String alarmtype;
private String platformtype;
private String username;
private String unit;
private String sendtime;
private Date time;
private String value;
private Date senddate;
private String databody;
private Integer devModel;
public Integer getDevModel() {
return devModel;
}
public void setDevModel(Integer devModel) {
this.devModel = devModel;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Integer getDevicetype() {
return devicetype;
}
public void setDevicetype(Integer devicetype) {
this.devicetype = devicetype;
}
public String getImei() {
return imei;
}
public void setImei(String imei) {
this.imei = imei == null ? null : imei.trim();
}
public Integer getBatterylevel() {
return batterylevel;
}
public void setBatterylevel(Integer batterylevel) {
this.batterylevel = batterylevel;
}
public Integer getSingalstrength() {
return singalstrength;
}
public void setSingalstrength(Integer singalstrength) {
this.singalstrength = singalstrength;
}
public String getSampledata() {
return sampledata;
}
public void setSampledata(String sampledata) {
this.sampledata = sampledata == null ? null : sampledata.trim();
}
public Integer getPassnum() {
return passnum;
}
public void setPassnum(Integer passnum) {
this.passnum = passnum;
}
public Integer getBatterystate() {
return batterystate;
}
public void setBatterystate(Integer batterystate) {
this.batterystate = batterystate;
}
public String getAlarmtype() {
return alarmtype;
}
public void setAlarmtype(String alarmtype) {
this.alarmtype = alarmtype == null ? null : alarmtype.trim();
}
public String getPlatformtype() {
return platformtype;
}
public void setPlatformtype(String platformtype) {
this.platformtype = platformtype == null ? null : platformtype.trim();
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username == null ? null : username.trim();
}
public String getUnit() {
return unit;
}
public void setUnit(String unit) {
this.unit = unit == null ? null : unit.trim();
}
public String getSendtime() {
return sendtime;
}
public void setSendtime(String sendtime) {
this.sendtime = sendtime == null ? null : sendtime.trim();
}
public Date getTime() {
return time;
}
public void setTime(Date time) {
this.time = time;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value == null ? null : value.trim();
}
public Date getSenddate() {
return senddate;
}
public void setSenddate(Date senddate) {
this.senddate = senddate;
}
public String getDatabody() {
return databody;
}
public void setDatabody(String databody) {
this.databody = databody == null ? null : databody.trim();
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table history
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public enum Column {
id("id", "id", "BIGINT", false),
devicetype("deviceType", "devicetype", "INTEGER", false),
imei("Imei", "imei", "VARCHAR", false),
batterylevel("batteryLevel", "batterylevel", "INTEGER", false),
singalstrength("singalStrength", "singalstrength", "INTEGER", false),
sampledata("sampleData", "sampledata", "VARCHAR", false),
passnum("passNum", "passnum", "INTEGER", false),
batterystate("batteryState", "batterystate", "INTEGER", false),
alarmtype("alarmType", "alarmtype", "VARCHAR", false),
platformtype("platformType", "platformtype", "VARCHAR", false),
username("userName", "username", "VARCHAR", false),
unit("unit", "unit", "VARCHAR", false),
sendtime("sendTime", "sendtime", "VARCHAR", false),
time("time", "time", "TIMESTAMP", false),
value("value", "value", "VARCHAR", false),
senddate("sendDate", "senddate", "TIMESTAMP", false),
databody("dataBody", "databody", "LONGVARCHAR", false),
devModel("devModel", "devModel", "INTEGER", false);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table history
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String BEGINNING_DELIMITER = "\"";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table history
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String ENDING_DELIMITER = "\"";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table history
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String column;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table history
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final boolean isColumnNameDelimited;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table history
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String javaProperty;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table history
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String jdbcType;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String value() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getValue() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJavaProperty() {
return this.javaProperty;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJdbcType() {
return this.jdbcType;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
this.column = column;
this.javaProperty = javaProperty;
this.jdbcType = jdbcType;
this.isColumnNameDelimited = isColumnNameDelimited;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String desc() {
return this.getEscapedColumnName() + " DESC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String asc() {
return this.getEscapedColumnName() + " ASC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public static Column[] excludes(Column ... excludes) {
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
if (excludes != null && excludes.length > 0) {
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
}
return columns.toArray(new Column[]{});
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getEscapedColumnName() {
if (this.isColumnNameDelimited) {
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
} else {
return this.column;
}
}
}
}

+ 368
- 0
src/main/java/com/topsail/influxdb/pojo/HistoryAll.java View File

@ -0,0 +1,368 @@
package com.topsail.influxdb.pojo;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
public class HistoryAll {
private Long id;
private Integer devicetype;
private String imei;
private Integer batterylevel;
private Integer singalstrength;
private String sampledata;
private Integer passnum;
private Integer batterystate;
private String alarmtype;
private String platformtype;
private String username;
private String unit;
private String sendtime;
private String databody;
private Date time;
private String value;
private Date senddate;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Integer getDevicetype() {
return devicetype;
}
public void setDevicetype(Integer devicetype) {
this.devicetype = devicetype;
}
public String getImei() {
return imei;
}
public void setImei(String imei) {
this.imei = imei == null ? null : imei.trim();
}
public Integer getBatterylevel() {
return batterylevel;
}
public void setBatterylevel(Integer batterylevel) {
this.batterylevel = batterylevel;
}
public Integer getSingalstrength() {
return singalstrength;
}
public void setSingalstrength(Integer singalstrength) {
this.singalstrength = singalstrength;
}
public String getSampledata() {
return sampledata;
}
public void setSampledata(String sampledata) {
this.sampledata = sampledata == null ? null : sampledata.trim();
}
public Integer getPassnum() {
return passnum;
}
public void setPassnum(Integer passnum) {
this.passnum = passnum;
}
public Integer getBatterystate() {
return batterystate;
}
public void setBatterystate(Integer batterystate) {
this.batterystate = batterystate;
}
public String getAlarmtype() {
return alarmtype;
}
public void setAlarmtype(String alarmtype) {
this.alarmtype = alarmtype == null ? null : alarmtype.trim();
}
public String getPlatformtype() {
return platformtype;
}
public void setPlatformtype(String platformtype) {
this.platformtype = platformtype == null ? null : platformtype.trim();
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username == null ? null : username.trim();
}
public String getUnit() {
return unit;
}
public void setUnit(String unit) {
this.unit = unit == null ? null : unit.trim();
}
public String getSendtime() {
return sendtime;
}
public void setSendtime(String sendtime) {
this.sendtime = sendtime == null ? null : sendtime.trim();
}
public String getDatabody() {
return databody;
}
public void setDatabody(String databody) {
this.databody = databody == null ? null : databody.trim();
}
public Date getTime() {
return time;
}
public void setTime(Date time) {
this.time = time;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value == null ? null : value.trim();
}
public Date getSenddate() {
return senddate;
}
public void setSenddate(Date senddate) {
this.senddate = senddate;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table history_all
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public enum Column {
id("id", "id", "BIGINT", false),
devicetype("deviceType", "devicetype", "INTEGER", false),
imei("Imei", "imei", "VARCHAR", false),
batterylevel("batteryLevel", "batterylevel", "INTEGER", false),
singalstrength("singalStrength", "singalstrength", "INTEGER", false),
sampledata("sampleData", "sampledata", "VARCHAR", false),
passnum("passNum", "passnum", "INTEGER", false),
batterystate("batteryState", "batterystate", "INTEGER", false),
alarmtype("alarmType", "alarmtype", "VARCHAR", false),
platformtype("platformType", "platformtype", "VARCHAR", false),
username("userName", "username", "VARCHAR", false),
unit("unit", "unit", "VARCHAR", false),
sendtime("sendTime", "sendtime", "VARCHAR", false),
databody("dataBody", "databody", "VARCHAR", false),
time("time", "time", "TIMESTAMP", false),
value("value", "value", "VARCHAR", false),
senddate("sendDate", "senddate", "TIMESTAMP", false);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table history_all
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String BEGINNING_DELIMITER = "\"";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table history_all
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String ENDING_DELIMITER = "\"";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table history_all
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String column;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table history_all
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final boolean isColumnNameDelimited;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table history_all
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String javaProperty;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table history_all
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String jdbcType;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history_all
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String value() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history_all
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getValue() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history_all
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJavaProperty() {
return this.javaProperty;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history_all
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJdbcType() {
return this.jdbcType;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history_all
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
this.column = column;
this.javaProperty = javaProperty;
this.jdbcType = jdbcType;
this.isColumnNameDelimited = isColumnNameDelimited;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history_all
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String desc() {
return this.getEscapedColumnName() + " DESC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history_all
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String asc() {
return this.getEscapedColumnName() + " ASC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history_all
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public static Column[] excludes(Column ... excludes) {
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
if (excludes != null && excludes.length > 0) {
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
}
return columns.toArray(new Column[]{});
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history_all
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getEscapedColumnName() {
if (this.isColumnNameDelimited) {
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
} else {
return this.column;
}
}
}
}

+ 1311
- 0
src/main/java/com/topsail/influxdb/pojo/HistoryAllExample.java
File diff suppressed because it is too large
View File


+ 368
- 0
src/main/java/com/topsail/influxdb/pojo/HistoryErr.java View File

@ -0,0 +1,368 @@
package com.topsail.influxdb.pojo;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
public class HistoryErr {
private Long id;
private Integer devicetype;
private String imei;
private Integer batterylevel;
private Integer singalstrength;
private String sampledata;
private Integer passnum;
private Integer batterystate;
private String alarmtype;
private String platformtype;
private String username;
private String unit;
private String sendtime;
private String databody;
private Date time;
private String value;
private Date senddate;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Integer getDevicetype() {
return devicetype;
}
public void setDevicetype(Integer devicetype) {
this.devicetype = devicetype;
}
public String getImei() {
return imei;
}
public void setImei(String imei) {
this.imei = imei == null ? null : imei.trim();
}
public Integer getBatterylevel() {
return batterylevel;
}
public void setBatterylevel(Integer batterylevel) {
this.batterylevel = batterylevel;
}
public Integer getSingalstrength() {
return singalstrength;
}
public void setSingalstrength(Integer singalstrength) {
this.singalstrength = singalstrength;
}
public String getSampledata() {
return sampledata;
}
public void setSampledata(String sampledata) {
this.sampledata = sampledata == null ? null : sampledata.trim();
}
public Integer getPassnum() {
return passnum;
}
public void setPassnum(Integer passnum) {
this.passnum = passnum;
}
public Integer getBatterystate() {
return batterystate;
}
public void setBatterystate(Integer batterystate) {
this.batterystate = batterystate;
}
public String getAlarmtype() {
return alarmtype;
}
public void setAlarmtype(String alarmtype) {
this.alarmtype = alarmtype == null ? null : alarmtype.trim();
}
public String getPlatformtype() {
return platformtype;
}
public void setPlatformtype(String platformtype) {
this.platformtype = platformtype == null ? null : platformtype.trim();
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username == null ? null : username.trim();
}
public String getUnit() {
return unit;
}
public void setUnit(String unit) {
this.unit = unit == null ? null : unit.trim();
}
public String getSendtime() {
return sendtime;
}
public void setSendtime(String sendtime) {
this.sendtime = sendtime == null ? null : sendtime.trim();
}
public String getDatabody() {
return databody;
}
public void setDatabody(String databody) {
this.databody = databody == null ? null : databody.trim();
}
public Date getTime() {
return time;
}
public void setTime(Date time) {
this.time = time;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value == null ? null : value.trim();
}
public Date getSenddate() {
return senddate;
}
public void setSenddate(Date senddate) {
this.senddate = senddate;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table history_err
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public enum Column {
id("id", "id", "BIGINT", false),
devicetype("deviceType", "devicetype", "INTEGER", false),
imei("Imei", "imei", "VARCHAR", false),
batterylevel("batteryLevel", "batterylevel", "INTEGER", false),
singalstrength("singalStrength", "singalstrength", "INTEGER", false),
sampledata("sampleData", "sampledata", "VARCHAR", false),
passnum("passNum", "passnum", "INTEGER", false),
batterystate("batteryState", "batterystate", "INTEGER", false),
alarmtype("alarmType", "alarmtype", "VARCHAR", false),
platformtype("platformType", "platformtype", "VARCHAR", false),
username("userName", "username", "VARCHAR", false),
unit("unit", "unit", "VARCHAR", false),
sendtime("sendTime", "sendtime", "VARCHAR", false),
databody("dataBody", "databody", "VARCHAR", false),
time("time", "time", "TIMESTAMP", false),
value("value", "value", "VARCHAR", false),
senddate("sendDate", "senddate", "TIMESTAMP", false);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table history_err
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String BEGINNING_DELIMITER = "\"";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table history_err
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String ENDING_DELIMITER = "\"";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table history_err
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String column;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table history_err
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final boolean isColumnNameDelimited;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table history_err
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String javaProperty;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table history_err
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String jdbcType;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history_err
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String value() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history_err
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getValue() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history_err
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJavaProperty() {
return this.javaProperty;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history_err
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJdbcType() {
return this.jdbcType;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history_err
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
this.column = column;
this.javaProperty = javaProperty;
this.jdbcType = jdbcType;
this.isColumnNameDelimited = isColumnNameDelimited;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history_err
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String desc() {
return this.getEscapedColumnName() + " DESC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history_err
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String asc() {
return this.getEscapedColumnName() + " ASC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history_err
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public static Column[] excludes(Column ... excludes) {
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
if (excludes != null && excludes.length > 0) {
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
}
return columns.toArray(new Column[]{});
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history_err
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getEscapedColumnName() {
if (this.isColumnNameDelimited) {
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
} else {
return this.column;
}
}
}
}

+ 1311
- 0
src/main/java/com/topsail/influxdb/pojo/HistoryErrExample.java
File diff suppressed because it is too large
View File


+ 1241
- 0
src/main/java/com/topsail/influxdb/pojo/HistoryExample.java
File diff suppressed because it is too large
View File


+ 215
- 0
src/main/java/com/topsail/influxdb/pojo/HistoryWithBLOBs.java View File

@ -0,0 +1,215 @@
package com.topsail.influxdb.pojo;
import java.util.ArrayList;
import java.util.Arrays;
public class HistoryWithBLOBs extends History {
private String sampledata;
private String databody;
public String getSampledata() {
return sampledata;
}
public void setSampledata(String sampledata) {
this.sampledata = sampledata == null ? null : sampledata.trim();
}
public String getDatabody() {
return databody;
}
public void setDatabody(String databody) {
this.databody = databody == null ? null : databody.trim();
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table history
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public enum Column {
id("id", "id", "BIGINT", false),
devicetype("deviceType", "devicetype", "INTEGER", false),
imei("Imei", "imei", "VARCHAR", false),
batterylevel("batteryLevel", "batterylevel", "INTEGER", false),
singalstrength("singalStrength", "singalstrength", "INTEGER", false),
passnum("passNum", "passnum", "INTEGER", false),
batterystate("batteryState", "batterystate", "INTEGER", false),
alarmtype("alarmType", "alarmtype", "VARCHAR", false),
platformtype("platformType", "platformtype", "VARCHAR", false),
username("userName", "username", "VARCHAR", false),
unit("unit", "unit", "VARCHAR", false),
sendtime("sendTime", "sendtime", "VARCHAR", false),
time("time", "time", "TIMESTAMP", false),
sampledata("sampleData", "sampledata", "LONGVARCHAR", false),
databody("dataBody", "databody", "LONGVARCHAR", false);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table history
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String BEGINNING_DELIMITER = "\"";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table history
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private static final String ENDING_DELIMITER = "\"";
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table history
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String column;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table history
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final boolean isColumnNameDelimited;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table history
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String javaProperty;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table history
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private final String jdbcType;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String value() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getValue() {
return this.column;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJavaProperty() {
return this.javaProperty;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getJdbcType() {
return this.jdbcType;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
this.column = column;
this.javaProperty = javaProperty;
this.jdbcType = jdbcType;
this.isColumnNameDelimited = isColumnNameDelimited;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String desc() {
return this.getEscapedColumnName() + " DESC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String asc() {
return this.getEscapedColumnName() + " ASC";
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public static Column[] excludes(Column ... excludes) {
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
if (excludes != null && excludes.length > 0) {
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
}
return columns.toArray(new Column[]{});
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table history
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public String getEscapedColumnName() {
if (this.isColumnNameDelimited) {
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
} else {
return this.column;
}
}
}
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save