Commit 3b887955 authored by chenying's avatar chenying

3.2-base

parents
.gradle
/build/
!gradle/wrapper/gradle-wrapper.jar
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
nbproject/private/
build/
nbbuild/
dist/
nbdist/
.nb-gradle/
\ No newline at end of file
buildscript {
ext {
springBootVersion = '1.5.10.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
compile('org.springframework.boot:spring-boot-starter-web')
testCompile('org.springframework.boot:spring-boot-starter-test')
compile('org.projectlombok:lombok:1.16.10')
runtime('mysql:mysql-connector-java')
compile('org.springframework.boot:spring-boot-starter-jdbc')
compile('org.mybatis.spring.boot:mybatis-spring-boot-starter:1.3.1')
compile('org.apache.shiro:shiro-web:1.2.4')
compile('org.apache.shiro:shiro-core:1.2.4')
compile('org.apache.shiro:shiro-spring:1.2.4')
compile('org.apache.shiro:shiro-ehcache:1.2.4')
compile('com.google.code.gson:gson:2.6.2')
compile('com.mangofactory:swagger-springmvc:0.9.4')
compile('io.springfox:springfox-swagger2:2.2.2')
compile('io.springfox:springfox-swagger-ui:2.2.2')
compile('org.apache.commons:commons-lang3:3.3.2')
compile('org.apache.commons:commons-io:1.3.2')
compile('commons-codec:commons-codec:1.6')
compile('com.alibaba:fastjson:1.1.37')
compile('org.apache.commons:commons-compress:1.9')
compile('org.springframework.boot:spring-boot-starter-data-redis')
}
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5.1-bin.zip
#!/usr/bin/env sh
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
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
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
echo "$*"
}
die ( ) {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
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
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save ( ) {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
09:10:29.511 logback [main] INFO com.example.tdl.TdlApplication - Starting TdlApplication on DESKTOP-7LA1JFJ with PID 16976 (C:\Users\admin\Desktop\tdl\out\production\classes started by admin in C:\Users\admin\Desktop\tdl)
09:10:29.521 logback [main] INFO com.example.tdl.TdlApplication - No active profile set, falling back to default profiles: default
09:10:29.691 logback [main] INFO o.s.b.c.e.AnnotationConfigEmbeddedWebApplicationContext - Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@74bf1791: startup date [Tue Feb 27 09:10:29 CST 2018]; root of context hierarchy
09:10:29.861 logback [background-preinit] INFO o.h.validator.internal.util.Version - HV000001: Hibernate Validator 5.3.6.Final
09:10:32.221 logback [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'shiroConfiguration' of type [com.example.tdl.shiro.ShiroConfiguration$$EnhancerBySpringCGLIB$$e59ae126] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
09:10:32.511 logback [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'mybatis-org.mybatis.spring.boot.autoconfigure.MybatisProperties' of type [org.mybatis.spring.boot.autoconfigure.MybatisProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
09:10:32.521 logback [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration' of type [org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration$$EnhancerBySpringCGLIB$$3e73418c] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
09:10:32.531 logback [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration$Tomcat' of type [org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration$Tomcat] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
09:10:32.541 logback [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'spring.datasource-org.springframework.boot.autoconfigure.jdbc.DataSourceProperties' of type [org.springframework.boot.autoconfigure.jdbc.DataSourceProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
09:10:32.621 logback [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'dataSource' of type [org.apache.tomcat.jdbc.pool.DataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
09:10:33.501 logback [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'sqlSessionFactory' of type [org.apache.ibatis.session.defaults.DefaultSqlSessionFactory] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
09:10:33.501 logback [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'sqlSessionTemplate' of type [org.mybatis.spring.SqlSessionTemplate] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
09:10:33.501 logback [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'userMapper' of type [org.mybatis.spring.mapper.MapperFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
09:10:33.511 logback [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'userMapper' of type [com.sun.proxy.$Proxy60] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
09:10:33.511 logback [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'userService' of type [com.example.tdl.service.UserService] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
09:10:33.511 logback [main] INFO o.a.shiro.realm.AuthorizingRealm - No cache or cacheManager properties have been set. Authorization cache cannot be obtained.
09:10:33.511 logback [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'shiroRealm' of type [com.example.tdl.shiro.ShiroRealm] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
09:10:33.671 logback [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'ehCacheManager' of type [org.apache.shiro.cache.ehcache.EhCacheManager] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
09:10:33.671 logback [main] INFO o.a.s.cache.ehcache.EhCacheManager - Cache with name 'com.example.tdl.shiro.ShiroRealm.authorizationCache' does not yet exist. Creating now.
09:10:33.671 logback [main] INFO o.a.s.cache.ehcache.EhCacheManager - Added EhCache named [com.example.tdl.shiro.ShiroRealm.authorizationCache]
09:10:33.681 logback [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'securityManager' of type [org.apache.shiro.web.mgt.DefaultWebSecurityManager] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
09:10:33.741 logback [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'authorizationAttributeSourceAdvisor' of type [org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
09:10:33.821 logback [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$b9ef05c] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
09:10:34.782 logback [main] INFO o.s.b.c.e.t.TomcatEmbeddedServletContainer - Tomcat initialized with port(s): 8092 (http)
09:10:34.803 logback [main] INFO o.a.catalina.core.StandardService - Starting service [Tomcat]
09:10:34.803 logback [main] INFO o.a.catalina.core.StandardEngine - Starting Servlet Engine: Apache Tomcat/8.5.27
09:10:35.342 logback [localhost-startStop-1] INFO o.a.c.c.C.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext
09:10:35.362 logback [localhost-startStop-1] INFO o.s.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 5671 ms
09:10:36.022 logback [localhost-startStop-1] INFO o.s.b.w.s.ServletRegistrationBean - Mapping servlet: 'dispatcherServlet' to [/]
09:10:36.022 logback [localhost-startStop-1] INFO o.s.b.w.s.FilterRegistrationBean - Mapping filter: 'characterEncodingFilter' to: [/*]
09:10:36.022 logback [localhost-startStop-1] INFO o.s.b.w.s.FilterRegistrationBean - Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
09:10:36.022 logback [localhost-startStop-1] INFO o.s.b.w.s.FilterRegistrationBean - Mapping filter: 'httpPutFormContentFilter' to: [/*]
09:10:36.022 logback [localhost-startStop-1] INFO o.s.b.w.s.FilterRegistrationBean - Mapping filter: 'requestContextFilter' to: [/*]
09:10:36.022 logback [localhost-startStop-1] INFO o.s.b.w.s.FilterRegistrationBean - Mapping filter: 'corsFilter' to: [/*]
09:10:36.022 logback [localhost-startStop-1] INFO o.s.b.w.s.FilterRegistrationBean - Mapping filter: 'shiroFilter' to: [/*]
09:10:37.182 logback [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/alarm/getAll],methods=[GET]}" onto public java.lang.Object com.example.tdl.web.AlarmController.getAll()
09:10:37.182 logback [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/alarm/addAlarm],methods=[POST]}" onto public java.lang.Object com.example.tdl.web.AlarmController.addAlarm(com.example.tdl.domain.vo.AddAlarmVo)
09:10:37.182 logback [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/alarm/updateAlarm],methods=[POST]}" onto public java.lang.Object com.example.tdl.web.AlarmController.updateAlarm(com.example.tdl.domain.vo.UpdateAlarmVo)
09:10:37.182 logback [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/alarm/delAlarm],methods=[POST]}" onto public java.lang.Object com.example.tdl.web.AlarmController.delAlarm(com.example.tdl.domain.vo.DelAlarmVo)
09:10:37.182 logback [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/alarm/getForWarehouse],methods=[GET]}" onto public java.lang.Object com.example.tdl.web.AlarmController.getForWarehouse()
09:10:37.182 logback [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/alarm/getAllByAlarmType],methods=[POST]}" onto public java.lang.Object com.example.tdl.web.AlarmController.getAllByAlarmType(java.lang.String)
09:10:37.182 logback [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/login/doLogin],methods=[POST]}" onto public java.lang.String com.example.tdl.web.LoginController.login(com.example.tdl.domain.vo.LoginUserVo)
09:10:37.182 logback [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/permission/getAll],methods=[GET]}" onto public java.lang.Object com.example.tdl.web.PermissionController.getAll()
09:10:37.192 logback [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/role/getAllRoleName],methods=[GET]}" onto public java.lang.Object com.example.tdl.web.RoleController.getAllRoleName()
09:10:37.192 logback [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/roleHasPermission/getAll],methods=[GET]}" onto public java.lang.Object com.example.tdl.web.RoleHasPermissionController.getAll()
09:10:37.192 logback [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/route/getAll],methods=[GET]}" onto public java.lang.Object com.example.tdl.web.RouteController.getAll()
09:10:37.192 logback [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/route/getRouteByTerm],methods=[POST]}" onto public java.lang.Object com.example.tdl.web.RouteController.getRouteByTerm(com.example.tdl.domain.vo.RouteTermVo)
09:10:37.192 logback [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/route/addRoute],methods=[POST]}" onto public java.lang.Object com.example.tdl.web.RouteController.addRoute(com.example.tdl.domain.vo.AddRouteVo)
09:10:37.192 logback [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/route/updateRoute],methods=[POST]}" onto public java.lang.Object com.example.tdl.web.RouteController.updateRoute(com.example.tdl.domain.vo.UpdateRouteVo)
09:10:37.192 logback [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/route/delRoute],methods=[POST]}" onto public java.lang.Object com.example.tdl.web.RouteController.delRoute(java.lang.String)
09:10:37.192 logback [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/user/getAll],methods=[GET]}" onto public java.lang.Object com.example.tdl.web.UserController.getAll()
09:10:37.192 logback [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/user/updateUser],methods=[POST]}" onto public java.lang.Object com.example.tdl.web.UserController.updateUser(com.example.tdl.domain.vo.UpdateUserVo)
09:10:37.192 logback [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/user/getByTerm],methods=[POST]}" onto public java.lang.Object com.example.tdl.web.UserController.getByTerm(com.example.tdl.domain.vo.UserTermVo)
09:10:37.192 logback [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/user/resetPassword],methods=[POST]}" onto public java.lang.Object com.example.tdl.web.UserController.resetPassword(java.lang.String)
09:10:37.192 logback [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/user/delUser],methods=[POST]}" onto public java.lang.Object com.example.tdl.web.UserController.delUser(java.lang.String)
09:10:37.192 logback [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/user/addUser],methods=[POST]}" onto public java.lang.Object com.example.tdl.web.UserController.addUser(com.example.tdl.domain.vo.AddUserVo)
09:10:37.192 logback [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/warehouse/getAll],methods=[GET]}" onto public java.lang.Object com.example.tdl.web.WarehouseController.getAll()
09:10:37.192 logback [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/warehouse/addWarehouse],methods=[POST]}" onto public java.lang.Object com.example.tdl.web.WarehouseController.addWarehouse(com.example.tdl.domain.vo.AddWarehouseVo)
09:10:37.192 logback [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/warehouse/updateWarehouse],methods=[POST]}" onto public java.lang.Object com.example.tdl.web.WarehouseController.updateWarehouse(com.example.tdl.domain.vo.UpdateWarehouseVo)
09:10:37.192 logback [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/warehouse/delWarehouse],methods=[POST]}" onto public java.lang.Object com.example.tdl.web.WarehouseController.delWarehouse(java.lang.String)
09:10:37.192 logback [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/warehouse/getAllByTerm],methods=[POST]}" onto public java.lang.Object com.example.tdl.web.WarehouseController.getAllByTerm(com.example.tdl.domain.vo.WarehouseTermVo)
09:10:37.192 logback [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/v2/api-docs],methods=[GET]}" onto public org.springframework.http.ResponseEntity<springfox.documentation.spring.web.json.Json> springfox.documentation.swagger2.web.Swagger2Controller.getDocumentation(java.lang.String)
09:10:37.202 logback [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/configuration/security]}" onto org.springframework.http.ResponseEntity<springfox.documentation.swagger.web.SecurityConfiguration> springfox.documentation.swagger.web.ApiResourceController.securityConfiguration()
09:10:37.202 logback [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/swagger-resources]}" onto org.springframework.http.ResponseEntity<java.util.List<springfox.documentation.swagger.web.SwaggerResource>> springfox.documentation.swagger.web.ApiResourceController.swaggerResources()
09:10:37.202 logback [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/configuration/ui]}" onto org.springframework.http.ResponseEntity<springfox.documentation.swagger.web.UiConfiguration> springfox.documentation.swagger.web.ApiResourceController.uiConfiguration()
09:10:37.202 logback [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
09:10:37.202 logback [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerMapping - Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
09:10:38.272 logback [main] INFO o.s.w.s.m.m.a.RequestMappingHandlerAdapter - Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@74bf1791: startup date [Tue Feb 27 09:10:29 CST 2018]; root of context hierarchy
09:10:38.462 logback [main] INFO o.s.w.s.h.SimpleUrlHandlerMapping - Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
09:10:38.462 logback [main] INFO o.s.w.s.h.SimpleUrlHandlerMapping - Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
09:10:38.612 logback [main] INFO o.s.w.s.h.SimpleUrlHandlerMapping - Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
09:10:39.373 logback [main] INFO o.s.j.e.a.AnnotationMBeanExporter - Registering beans for JMX exposure on startup
09:10:39.383 logback [main] INFO s.d.s.w.p.DocumentationPluginsBootstrapper - Context refreshed
09:10:39.423 logback [main] INFO s.d.s.w.p.DocumentationPluginsBootstrapper - Found {0} custom documentation plugin(s)
09:10:39.433 logback [main] INFO s.d.s.w.s.ApiListingReferenceScanner - Scanning for api listing references
09:10:39.433 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method addAlarm was alarm-controller
09:10:39.433 logback [main] INFO s.d.s.w.s.ApiListingReferenceScanner - Request mapping: addAlarm belongs to groups: [[ResourceGroup{groupName='alarm-controller', position=0, controller=com.example.tdl.web.AlarmController}]]
09:10:39.433 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method delAlarm was alarm-controller
09:10:39.433 logback [main] INFO s.d.s.w.s.ApiListingReferenceScanner - Request mapping: delAlarm belongs to groups: [[ResourceGroup{groupName='alarm-controller', position=0, controller=com.example.tdl.web.AlarmController}]]
09:10:39.433 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method getAllByAlarmType was alarm-controller
09:10:39.433 logback [main] INFO s.d.s.w.s.ApiListingReferenceScanner - Request mapping: getAllByAlarmType belongs to groups: [[ResourceGroup{groupName='alarm-controller', position=0, controller=com.example.tdl.web.AlarmController}]]
09:10:39.433 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method getAll was alarm-controller
09:10:39.433 logback [main] INFO s.d.s.w.s.ApiListingReferenceScanner - Request mapping: getAll belongs to groups: [[ResourceGroup{groupName='alarm-controller', position=0, controller=com.example.tdl.web.AlarmController}]]
09:10:39.433 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method getForWarehouse was alarm-controller
09:10:39.433 logback [main] INFO s.d.s.w.s.ApiListingReferenceScanner - Request mapping: getForWarehouse belongs to groups: [[ResourceGroup{groupName='alarm-controller', position=0, controller=com.example.tdl.web.AlarmController}]]
09:10:39.433 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method updateAlarm was alarm-controller
09:10:39.433 logback [main] INFO s.d.s.w.s.ApiListingReferenceScanner - Request mapping: updateAlarm belongs to groups: [[ResourceGroup{groupName='alarm-controller', position=0, controller=com.example.tdl.web.AlarmController}]]
09:10:39.433 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method login was login-controller
09:10:39.433 logback [main] INFO s.d.s.w.s.ApiListingReferenceScanner - Request mapping: login belongs to groups: [[ResourceGroup{groupName='login-controller', position=0, controller=com.example.tdl.web.LoginController}]]
09:10:39.433 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method getAll was permission-controller
09:10:39.433 logback [main] INFO s.d.s.w.s.ApiListingReferenceScanner - Request mapping: getAll belongs to groups: [[ResourceGroup{groupName='permission-controller', position=0, controller=com.example.tdl.web.PermissionController}]]
09:10:39.443 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method getAllRoleName was role-controller
09:10:39.443 logback [main] INFO s.d.s.w.s.ApiListingReferenceScanner - Request mapping: getAllRoleName belongs to groups: [[ResourceGroup{groupName='role-controller', position=0, controller=com.example.tdl.web.RoleController}]]
09:10:39.443 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method getAll was role-has-permission-controller
09:10:39.443 logback [main] INFO s.d.s.w.s.ApiListingReferenceScanner - Request mapping: getAll belongs to groups: [[ResourceGroup{groupName='role-has-permission-controller', position=0, controller=com.example.tdl.web.RoleHasPermissionController}]]
09:10:39.443 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method addRoute was route-controller
09:10:39.443 logback [main] INFO s.d.s.w.s.ApiListingReferenceScanner - Request mapping: addRoute belongs to groups: [[ResourceGroup{groupName='route-controller', position=0, controller=com.example.tdl.web.RouteController}]]
09:10:39.443 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method delRoute was route-controller
09:10:39.443 logback [main] INFO s.d.s.w.s.ApiListingReferenceScanner - Request mapping: delRoute belongs to groups: [[ResourceGroup{groupName='route-controller', position=0, controller=com.example.tdl.web.RouteController}]]
09:10:39.443 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method getAll was route-controller
09:10:39.443 logback [main] INFO s.d.s.w.s.ApiListingReferenceScanner - Request mapping: getAll belongs to groups: [[ResourceGroup{groupName='route-controller', position=0, controller=com.example.tdl.web.RouteController}]]
09:10:39.443 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method getRouteByTerm was route-controller
09:10:39.443 logback [main] INFO s.d.s.w.s.ApiListingReferenceScanner - Request mapping: getRouteByTerm belongs to groups: [[ResourceGroup{groupName='route-controller', position=0, controller=com.example.tdl.web.RouteController}]]
09:10:39.443 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method updateRoute was route-controller
09:10:39.443 logback [main] INFO s.d.s.w.s.ApiListingReferenceScanner - Request mapping: updateRoute belongs to groups: [[ResourceGroup{groupName='route-controller', position=0, controller=com.example.tdl.web.RouteController}]]
09:10:39.443 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method addUser was user-controller
09:10:39.443 logback [main] INFO s.d.s.w.s.ApiListingReferenceScanner - Request mapping: addUser belongs to groups: [[ResourceGroup{groupName='user-controller', position=0, controller=com.example.tdl.web.UserController}]]
09:10:39.443 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method delUser was user-controller
09:10:39.443 logback [main] INFO s.d.s.w.s.ApiListingReferenceScanner - Request mapping: delUser belongs to groups: [[ResourceGroup{groupName='user-controller', position=0, controller=com.example.tdl.web.UserController}]]
09:10:39.443 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method getAll was user-controller
09:10:39.443 logback [main] INFO s.d.s.w.s.ApiListingReferenceScanner - Request mapping: getAll belongs to groups: [[ResourceGroup{groupName='user-controller', position=0, controller=com.example.tdl.web.UserController}]]
09:10:39.443 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method getByTerm was user-controller
09:10:39.443 logback [main] INFO s.d.s.w.s.ApiListingReferenceScanner - Request mapping: getByTerm belongs to groups: [[ResourceGroup{groupName='user-controller', position=0, controller=com.example.tdl.web.UserController}]]
09:10:39.443 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method resetPassword was user-controller
09:10:39.443 logback [main] INFO s.d.s.w.s.ApiListingReferenceScanner - Request mapping: resetPassword belongs to groups: [[ResourceGroup{groupName='user-controller', position=0, controller=com.example.tdl.web.UserController}]]
09:10:39.453 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method updateUser was user-controller
09:10:39.453 logback [main] INFO s.d.s.w.s.ApiListingReferenceScanner - Request mapping: updateUser belongs to groups: [[ResourceGroup{groupName='user-controller', position=0, controller=com.example.tdl.web.UserController}]]
09:10:39.453 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method addWarehouse was warehouse-controller
09:10:39.453 logback [main] INFO s.d.s.w.s.ApiListingReferenceScanner - Request mapping: addWarehouse belongs to groups: [[ResourceGroup{groupName='warehouse-controller', position=0, controller=com.example.tdl.web.WarehouseController}]]
09:10:39.453 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method delWarehouse was warehouse-controller
09:10:39.453 logback [main] INFO s.d.s.w.s.ApiListingReferenceScanner - Request mapping: delWarehouse belongs to groups: [[ResourceGroup{groupName='warehouse-controller', position=0, controller=com.example.tdl.web.WarehouseController}]]
09:10:39.453 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method getAllByTerm was warehouse-controller
09:10:39.453 logback [main] INFO s.d.s.w.s.ApiListingReferenceScanner - Request mapping: getAllByTerm belongs to groups: [[ResourceGroup{groupName='warehouse-controller', position=0, controller=com.example.tdl.web.WarehouseController}]]
09:10:39.453 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method getAll was warehouse-controller
09:10:39.453 logback [main] INFO s.d.s.w.s.ApiListingReferenceScanner - Request mapping: getAll belongs to groups: [[ResourceGroup{groupName='warehouse-controller', position=0, controller=com.example.tdl.web.WarehouseController}]]
09:10:39.453 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method updateWarehouse was warehouse-controller
09:10:39.453 logback [main] INFO s.d.s.w.s.ApiListingReferenceScanner - Request mapping: updateWarehouse belongs to groups: [[ResourceGroup{groupName='warehouse-controller', position=0, controller=com.example.tdl.web.WarehouseController}]]
09:10:39.453 logback [main] INFO s.d.s.w.s.ApiListingReferenceScanner - Created resource listing Path: /test/route-controller Description: route-controller Position: 0
09:10:39.453 logback [main] INFO s.d.s.w.s.ApiListingReferenceScanner - Created resource listing Path: /test/alarm-controller Description: alarm-controller Position: 0
09:10:39.463 logback [main] INFO s.d.s.w.s.ApiListingReferenceScanner - Created resource listing Path: /test/role-has-permission-controller Description: role-has-permission-controller Position: 0
09:10:39.463 logback [main] INFO s.d.s.w.s.ApiListingReferenceScanner - Created resource listing Path: /test/permission-controller Description: permission-controller Position: 0
09:10:39.463 logback [main] INFO s.d.s.w.s.ApiListingReferenceScanner - Created resource listing Path: /test/login-controller Description: login-controller Position: 0
09:10:39.463 logback [main] INFO s.d.s.w.s.ApiListingReferenceScanner - Created resource listing Path: /test/warehouse-controller Description: warehouse-controller Position: 0
09:10:39.463 logback [main] INFO s.d.s.w.s.ApiListingReferenceScanner - Created resource listing Path: /test/user-controller Description: user-controller Position: 0
09:10:39.463 logback [main] INFO s.d.s.w.s.ApiListingReferenceScanner - Created resource listing Path: /test/role-controller Description: role-controller Position: 0
09:10:39.493 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: com.example.tdl.domain.vo.AddAlarmVo(false)
09:10:39.493 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key com.example.tdl.domain.vo.AddAlarmVo(false)
09:10:39.493 logback [main] INFO s.d.s.p.ModelPropertiesKeyGenerator - Cache key generated: com.example.tdl.domain.vo.AddAlarmVo(false)
09:10:39.493 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelProperties with key com.example.tdl.domain.vo.AddAlarmVo(false)
09:10:39.523 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: com.example.tdl.domain.vo.AddAlarmVo(false)
09:10:39.523 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key com.example.tdl.domain.vo.AddAlarmVo(false)
09:10:39.523 logback [main] INFO s.d.s.p.ModelPropertiesKeyGenerator - Cache key generated: com.example.tdl.domain.vo.AddAlarmVo(false)
09:10:39.523 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelProperties with key com.example.tdl.domain.vo.AddAlarmVo(false)
09:10:39.523 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.523 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key java.lang.Object(true)
09:10:39.523 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.523 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key java.lang.Object(true)
09:10:39.533 logback [main] INFO s.d.s.web.OperationsKeyGenerator - Cache key generated: /alarm/addAlarm.com.example.tdl.web.AlarmController.addAlarm.CodeGenGenericTypeNamingStrategy
09:10:39.533 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache operations with key /alarm/addAlarm.com.example.tdl.web.AlarmController.addAlarm.CodeGenGenericTypeNamingStrategy
09:10:39.543 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method addAlarm was alarm-controller
09:10:39.563 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method addAlarm was alarm-controller
09:10:39.573 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.573 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key java.lang.Object(true)
09:10:39.573 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.573 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key java.lang.Object(true)
09:10:39.573 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: com.example.tdl.domain.vo.DelAlarmVo(false)
09:10:39.573 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key com.example.tdl.domain.vo.DelAlarmVo(false)
09:10:39.573 logback [main] INFO s.d.s.p.ModelPropertiesKeyGenerator - Cache key generated: com.example.tdl.domain.vo.DelAlarmVo(false)
09:10:39.573 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelProperties with key com.example.tdl.domain.vo.DelAlarmVo(false)
09:10:39.573 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: com.example.tdl.domain.vo.DelAlarmVo(false)
09:10:39.573 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key com.example.tdl.domain.vo.DelAlarmVo(false)
09:10:39.573 logback [main] INFO s.d.s.p.ModelPropertiesKeyGenerator - Cache key generated: com.example.tdl.domain.vo.DelAlarmVo(false)
09:10:39.573 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelProperties with key com.example.tdl.domain.vo.DelAlarmVo(false)
09:10:39.573 logback [main] INFO s.d.s.web.OperationsKeyGenerator - Cache key generated: /alarm/delAlarm.com.example.tdl.web.AlarmController.delAlarm.CodeGenGenericTypeNamingStrategy
09:10:39.573 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache operations with key /alarm/delAlarm.com.example.tdl.web.AlarmController.delAlarm.CodeGenGenericTypeNamingStrategy
09:10:39.573 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method delAlarm was alarm-controller
09:10:39.573 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method delAlarm was alarm-controller
09:10:39.573 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.573 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key java.lang.Object(true)
09:10:39.573 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.573 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key java.lang.Object(true)
09:10:39.573 logback [main] INFO s.d.s.web.OperationsKeyGenerator - Cache key generated: /alarm/getAll.com.example.tdl.web.AlarmController.getAll.CodeGenGenericTypeNamingStrategy
09:10:39.573 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache operations with key /alarm/getAll.com.example.tdl.web.AlarmController.getAll.CodeGenGenericTypeNamingStrategy
09:10:39.573 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method getAll was alarm-controller
09:10:39.573 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method getAll was alarm-controller
09:10:39.583 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.String(false)
09:10:39.583 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key java.lang.String(false)
09:10:39.583 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.String(false)
09:10:39.583 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key java.lang.String(false)
09:10:39.583 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.583 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key java.lang.Object(true)
09:10:39.583 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.583 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key java.lang.Object(true)
09:10:39.583 logback [main] INFO s.d.s.web.OperationsKeyGenerator - Cache key generated: /alarm/getAllByAlarmType.com.example.tdl.web.AlarmController.getAllByAlarmType.CodeGenGenericTypeNamingStrategy
09:10:39.583 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache operations with key /alarm/getAllByAlarmType.com.example.tdl.web.AlarmController.getAllByAlarmType.CodeGenGenericTypeNamingStrategy
09:10:39.583 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method getAllByAlarmType was alarm-controller
09:10:39.583 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method getAllByAlarmType was alarm-controller
09:10:39.583 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.583 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key java.lang.Object(true)
09:10:39.583 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.583 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key java.lang.Object(true)
09:10:39.583 logback [main] INFO s.d.s.web.OperationsKeyGenerator - Cache key generated: /alarm/getForWarehouse.com.example.tdl.web.AlarmController.getForWarehouse.CodeGenGenericTypeNamingStrategy
09:10:39.583 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache operations with key /alarm/getForWarehouse.com.example.tdl.web.AlarmController.getForWarehouse.CodeGenGenericTypeNamingStrategy
09:10:39.583 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method getForWarehouse was alarm-controller
09:10:39.583 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method getForWarehouse was alarm-controller
09:10:39.583 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.583 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key java.lang.Object(true)
09:10:39.583 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.583 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key java.lang.Object(true)
09:10:39.583 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: com.example.tdl.domain.vo.UpdateAlarmVo(false)
09:10:39.583 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key com.example.tdl.domain.vo.UpdateAlarmVo(false)
09:10:39.583 logback [main] INFO s.d.s.p.ModelPropertiesKeyGenerator - Cache key generated: com.example.tdl.domain.vo.UpdateAlarmVo(false)
09:10:39.583 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelProperties with key com.example.tdl.domain.vo.UpdateAlarmVo(false)
09:10:39.593 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: com.example.tdl.domain.vo.UpdateAlarmVo(false)
09:10:39.593 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key com.example.tdl.domain.vo.UpdateAlarmVo(false)
09:10:39.593 logback [main] INFO s.d.s.p.ModelPropertiesKeyGenerator - Cache key generated: com.example.tdl.domain.vo.UpdateAlarmVo(false)
09:10:39.593 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelProperties with key com.example.tdl.domain.vo.UpdateAlarmVo(false)
09:10:39.593 logback [main] INFO s.d.s.web.OperationsKeyGenerator - Cache key generated: /alarm/updateAlarm.com.example.tdl.web.AlarmController.updateAlarm.CodeGenGenericTypeNamingStrategy
09:10:39.593 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache operations with key /alarm/updateAlarm.com.example.tdl.web.AlarmController.updateAlarm.CodeGenGenericTypeNamingStrategy
09:10:39.593 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method updateAlarm was alarm-controller
09:10:39.593 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method updateAlarm was alarm-controller
09:10:39.603 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: com.example.tdl.domain.vo.LoginUserVo(false)
09:10:39.603 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key com.example.tdl.domain.vo.LoginUserVo(false)
09:10:39.603 logback [main] INFO s.d.s.p.ModelPropertiesKeyGenerator - Cache key generated: com.example.tdl.domain.vo.LoginUserVo(false)
09:10:39.603 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelProperties with key com.example.tdl.domain.vo.LoginUserVo(false)
09:10:39.603 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: com.example.tdl.domain.vo.LoginUserVo(false)
09:10:39.603 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key com.example.tdl.domain.vo.LoginUserVo(false)
09:10:39.603 logback [main] INFO s.d.s.p.ModelPropertiesKeyGenerator - Cache key generated: com.example.tdl.domain.vo.LoginUserVo(false)
09:10:39.603 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelProperties with key com.example.tdl.domain.vo.LoginUserVo(false)
09:10:39.603 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.String(true)
09:10:39.603 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key java.lang.String(true)
09:10:39.603 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.String(true)
09:10:39.603 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key java.lang.String(true)
09:10:39.603 logback [main] INFO s.d.s.web.OperationsKeyGenerator - Cache key generated: /login/doLogin.com.example.tdl.web.LoginController.login.CodeGenGenericTypeNamingStrategy
09:10:39.603 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache operations with key /login/doLogin.com.example.tdl.web.LoginController.login.CodeGenGenericTypeNamingStrategy
09:10:39.603 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method login was login-controller
09:10:39.603 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method login was login-controller
09:10:39.603 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.603 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key java.lang.Object(true)
09:10:39.603 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.603 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key java.lang.Object(true)
09:10:39.603 logback [main] INFO s.d.s.web.OperationsKeyGenerator - Cache key generated: /permission/getAll.com.example.tdl.web.PermissionController.getAll.CodeGenGenericTypeNamingStrategy
09:10:39.603 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache operations with key /permission/getAll.com.example.tdl.web.PermissionController.getAll.CodeGenGenericTypeNamingStrategy
09:10:39.603 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method getAll was permission-controller
09:10:39.603 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method getAll was permission-controller
09:10:39.603 logback [main] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: getAllUsingGET_1
09:10:39.603 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.603 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key java.lang.Object(true)
09:10:39.603 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.613 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key java.lang.Object(true)
09:10:39.613 logback [main] INFO s.d.s.web.OperationsKeyGenerator - Cache key generated: /role/getAllRoleName.com.example.tdl.web.RoleController.getAllRoleName.CodeGenGenericTypeNamingStrategy
09:10:39.613 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache operations with key /role/getAllRoleName.com.example.tdl.web.RoleController.getAllRoleName.CodeGenGenericTypeNamingStrategy
09:10:39.613 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method getAllRoleName was role-controller
09:10:39.613 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method getAllRoleName was role-controller
09:10:39.613 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.613 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key java.lang.Object(true)
09:10:39.613 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.613 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key java.lang.Object(true)
09:10:39.613 logback [main] INFO s.d.s.web.OperationsKeyGenerator - Cache key generated: /roleHasPermission/getAll.com.example.tdl.web.RoleHasPermissionController.getAll.CodeGenGenericTypeNamingStrategy
09:10:39.613 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache operations with key /roleHasPermission/getAll.com.example.tdl.web.RoleHasPermissionController.getAll.CodeGenGenericTypeNamingStrategy
09:10:39.613 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method getAll was role-has-permission-controller
09:10:39.613 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method getAll was role-has-permission-controller
09:10:39.613 logback [main] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: getAllUsingGET_2
09:10:39.613 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.613 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key java.lang.Object(true)
09:10:39.613 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.613 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key java.lang.Object(true)
09:10:39.613 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: com.example.tdl.domain.vo.AddRouteVo(false)
09:10:39.613 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key com.example.tdl.domain.vo.AddRouteVo(false)
09:10:39.613 logback [main] INFO s.d.s.p.ModelPropertiesKeyGenerator - Cache key generated: com.example.tdl.domain.vo.AddRouteVo(false)
09:10:39.613 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelProperties with key com.example.tdl.domain.vo.AddRouteVo(false)
09:10:39.613 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: com.example.tdl.domain.vo.AddRouteVo(false)
09:10:39.613 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key com.example.tdl.domain.vo.AddRouteVo(false)
09:10:39.613 logback [main] INFO s.d.s.p.ModelPropertiesKeyGenerator - Cache key generated: com.example.tdl.domain.vo.AddRouteVo(false)
09:10:39.613 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelProperties with key com.example.tdl.domain.vo.AddRouteVo(false)
09:10:39.613 logback [main] INFO s.d.s.web.OperationsKeyGenerator - Cache key generated: /route/addRoute.com.example.tdl.web.RouteController.addRoute.CodeGenGenericTypeNamingStrategy
09:10:39.623 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache operations with key /route/addRoute.com.example.tdl.web.RouteController.addRoute.CodeGenGenericTypeNamingStrategy
09:10:39.623 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method addRoute was route-controller
09:10:39.623 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method addRoute was route-controller
09:10:39.623 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.String(false)
09:10:39.623 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key java.lang.String(false)
09:10:39.623 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.String(false)
09:10:39.623 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key java.lang.String(false)
09:10:39.623 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.623 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key java.lang.Object(true)
09:10:39.623 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.623 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key java.lang.Object(true)
09:10:39.623 logback [main] INFO s.d.s.web.OperationsKeyGenerator - Cache key generated: /route/delRoute.com.example.tdl.web.RouteController.delRoute.CodeGenGenericTypeNamingStrategy
09:10:39.623 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache operations with key /route/delRoute.com.example.tdl.web.RouteController.delRoute.CodeGenGenericTypeNamingStrategy
09:10:39.623 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method delRoute was route-controller
09:10:39.623 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method delRoute was route-controller
09:10:39.623 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.623 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key java.lang.Object(true)
09:10:39.623 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.623 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key java.lang.Object(true)
09:10:39.623 logback [main] INFO s.d.s.web.OperationsKeyGenerator - Cache key generated: /route/getAll.com.example.tdl.web.RouteController.getAll.CodeGenGenericTypeNamingStrategy
09:10:39.623 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache operations with key /route/getAll.com.example.tdl.web.RouteController.getAll.CodeGenGenericTypeNamingStrategy
09:10:39.623 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method getAll was route-controller
09:10:39.623 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method getAll was route-controller
09:10:39.623 logback [main] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: getAllUsingGET_3
09:10:39.623 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: com.example.tdl.domain.vo.RouteTermVo(false)
09:10:39.623 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key com.example.tdl.domain.vo.RouteTermVo(false)
09:10:39.623 logback [main] INFO s.d.s.p.ModelPropertiesKeyGenerator - Cache key generated: com.example.tdl.domain.vo.RouteTermVo(false)
09:10:39.623 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelProperties with key com.example.tdl.domain.vo.RouteTermVo(false)
09:10:39.623 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: com.example.tdl.domain.vo.RouteTermVo(false)
09:10:39.623 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key com.example.tdl.domain.vo.RouteTermVo(false)
09:10:39.633 logback [main] INFO s.d.s.p.ModelPropertiesKeyGenerator - Cache key generated: com.example.tdl.domain.vo.RouteTermVo(false)
09:10:39.633 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelProperties with key com.example.tdl.domain.vo.RouteTermVo(false)
09:10:39.633 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.633 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key java.lang.Object(true)
09:10:39.633 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.633 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key java.lang.Object(true)
09:10:39.633 logback [main] INFO s.d.s.web.OperationsKeyGenerator - Cache key generated: /route/getRouteByTerm.com.example.tdl.web.RouteController.getRouteByTerm.CodeGenGenericTypeNamingStrategy
09:10:39.633 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache operations with key /route/getRouteByTerm.com.example.tdl.web.RouteController.getRouteByTerm.CodeGenGenericTypeNamingStrategy
09:10:39.633 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method getRouteByTerm was route-controller
09:10:39.633 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method getRouteByTerm was route-controller
09:10:39.633 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: com.example.tdl.domain.vo.UpdateRouteVo(false)
09:10:39.633 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key com.example.tdl.domain.vo.UpdateRouteVo(false)
09:10:39.633 logback [main] INFO s.d.s.p.ModelPropertiesKeyGenerator - Cache key generated: com.example.tdl.domain.vo.UpdateRouteVo(false)
09:10:39.633 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelProperties with key com.example.tdl.domain.vo.UpdateRouteVo(false)
09:10:39.633 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: com.example.tdl.domain.vo.UpdateRouteVo(false)
09:10:39.633 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key com.example.tdl.domain.vo.UpdateRouteVo(false)
09:10:39.633 logback [main] INFO s.d.s.p.ModelPropertiesKeyGenerator - Cache key generated: com.example.tdl.domain.vo.UpdateRouteVo(false)
09:10:39.633 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelProperties with key com.example.tdl.domain.vo.UpdateRouteVo(false)
09:10:39.633 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.633 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key java.lang.Object(true)
09:10:39.633 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.633 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key java.lang.Object(true)
09:10:39.633 logback [main] INFO s.d.s.web.OperationsKeyGenerator - Cache key generated: /route/updateRoute.com.example.tdl.web.RouteController.updateRoute.CodeGenGenericTypeNamingStrategy
09:10:39.633 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache operations with key /route/updateRoute.com.example.tdl.web.RouteController.updateRoute.CodeGenGenericTypeNamingStrategy
09:10:39.633 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method updateRoute was route-controller
09:10:39.633 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method updateRoute was route-controller
09:10:39.633 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: com.example.tdl.domain.vo.AddUserVo(false)
09:10:39.633 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key com.example.tdl.domain.vo.AddUserVo(false)
09:10:39.643 logback [main] INFO s.d.s.p.ModelPropertiesKeyGenerator - Cache key generated: com.example.tdl.domain.vo.AddUserVo(false)
09:10:39.643 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelProperties with key com.example.tdl.domain.vo.AddUserVo(false)
09:10:39.643 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: com.example.tdl.domain.vo.AddUserVo(false)
09:10:39.643 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key com.example.tdl.domain.vo.AddUserVo(false)
09:10:39.643 logback [main] INFO s.d.s.p.ModelPropertiesKeyGenerator - Cache key generated: com.example.tdl.domain.vo.AddUserVo(false)
09:10:39.643 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelProperties with key com.example.tdl.domain.vo.AddUserVo(false)
09:10:39.643 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.643 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key java.lang.Object(true)
09:10:39.643 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.643 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key java.lang.Object(true)
09:10:39.643 logback [main] INFO s.d.s.web.OperationsKeyGenerator - Cache key generated: /user/addUser.com.example.tdl.web.UserController.addUser.CodeGenGenericTypeNamingStrategy
09:10:39.643 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache operations with key /user/addUser.com.example.tdl.web.UserController.addUser.CodeGenGenericTypeNamingStrategy
09:10:39.643 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method addUser was user-controller
09:10:39.643 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method addUser was user-controller
09:10:39.643 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.String(false)
09:10:39.643 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key java.lang.String(false)
09:10:39.643 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.String(false)
09:10:39.643 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key java.lang.String(false)
09:10:39.643 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.643 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key java.lang.Object(true)
09:10:39.643 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.643 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key java.lang.Object(true)
09:10:39.643 logback [main] INFO s.d.s.web.OperationsKeyGenerator - Cache key generated: /user/delUser.com.example.tdl.web.UserController.delUser.CodeGenGenericTypeNamingStrategy
09:10:39.643 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache operations with key /user/delUser.com.example.tdl.web.UserController.delUser.CodeGenGenericTypeNamingStrategy
09:10:39.643 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method delUser was user-controller
09:10:39.653 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method delUser was user-controller
09:10:39.653 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.653 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key java.lang.Object(true)
09:10:39.653 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.653 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key java.lang.Object(true)
09:10:39.653 logback [main] INFO s.d.s.web.OperationsKeyGenerator - Cache key generated: /user/getAll.com.example.tdl.web.UserController.getAll.CodeGenGenericTypeNamingStrategy
09:10:39.653 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache operations with key /user/getAll.com.example.tdl.web.UserController.getAll.CodeGenGenericTypeNamingStrategy
09:10:39.653 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method getAll was user-controller
09:10:39.653 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method getAll was user-controller
09:10:39.653 logback [main] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: getAllUsingGET_4
09:10:39.653 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: com.example.tdl.domain.vo.UserTermVo(false)
09:10:39.653 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key com.example.tdl.domain.vo.UserTermVo(false)
09:10:39.653 logback [main] INFO s.d.s.p.ModelPropertiesKeyGenerator - Cache key generated: com.example.tdl.domain.vo.UserTermVo(false)
09:10:39.653 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelProperties with key com.example.tdl.domain.vo.UserTermVo(false)
09:10:39.653 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: com.example.tdl.domain.vo.UserTermVo(false)
09:10:39.653 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key com.example.tdl.domain.vo.UserTermVo(false)
09:10:39.653 logback [main] INFO s.d.s.p.ModelPropertiesKeyGenerator - Cache key generated: com.example.tdl.domain.vo.UserTermVo(false)
09:10:39.653 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelProperties with key com.example.tdl.domain.vo.UserTermVo(false)
09:10:39.653 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.653 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key java.lang.Object(true)
09:10:39.653 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.653 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key java.lang.Object(true)
09:10:39.653 logback [main] INFO s.d.s.web.OperationsKeyGenerator - Cache key generated: /user/getByTerm.com.example.tdl.web.UserController.getByTerm.CodeGenGenericTypeNamingStrategy
09:10:39.653 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache operations with key /user/getByTerm.com.example.tdl.web.UserController.getByTerm.CodeGenGenericTypeNamingStrategy
09:10:39.653 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method getByTerm was user-controller
09:10:39.653 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method getByTerm was user-controller
09:10:39.653 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.String(false)
09:10:39.653 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key java.lang.String(false)
09:10:39.663 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.String(false)
09:10:39.663 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key java.lang.String(false)
09:10:39.663 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.663 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key java.lang.Object(true)
09:10:39.663 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.663 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key java.lang.Object(true)
09:10:39.663 logback [main] INFO s.d.s.web.OperationsKeyGenerator - Cache key generated: /user/resetPassword.com.example.tdl.web.UserController.resetPassword.CodeGenGenericTypeNamingStrategy
09:10:39.663 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache operations with key /user/resetPassword.com.example.tdl.web.UserController.resetPassword.CodeGenGenericTypeNamingStrategy
09:10:39.663 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method resetPassword was user-controller
09:10:39.663 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method resetPassword was user-controller
09:10:39.663 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.663 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key java.lang.Object(true)
09:10:39.663 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.663 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key java.lang.Object(true)
09:10:39.663 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: com.example.tdl.domain.vo.UpdateUserVo(false)
09:10:39.663 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key com.example.tdl.domain.vo.UpdateUserVo(false)
09:10:39.663 logback [main] INFO s.d.s.p.ModelPropertiesKeyGenerator - Cache key generated: com.example.tdl.domain.vo.UpdateUserVo(false)
09:10:39.663 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelProperties with key com.example.tdl.domain.vo.UpdateUserVo(false)
09:10:39.663 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: com.example.tdl.domain.vo.UpdateUserVo(false)
09:10:39.663 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key com.example.tdl.domain.vo.UpdateUserVo(false)
09:10:39.673 logback [main] INFO s.d.s.p.ModelPropertiesKeyGenerator - Cache key generated: com.example.tdl.domain.vo.UpdateUserVo(false)
09:10:39.673 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelProperties with key com.example.tdl.domain.vo.UpdateUserVo(false)
09:10:39.673 logback [main] INFO s.d.s.web.OperationsKeyGenerator - Cache key generated: /user/updateUser.com.example.tdl.web.UserController.updateUser.CodeGenGenericTypeNamingStrategy
09:10:39.673 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache operations with key /user/updateUser.com.example.tdl.web.UserController.updateUser.CodeGenGenericTypeNamingStrategy
09:10:39.673 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method updateUser was user-controller
09:10:39.673 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method updateUser was user-controller
09:10:39.673 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: com.example.tdl.domain.vo.AddWarehouseVo(false)
09:10:39.673 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key com.example.tdl.domain.vo.AddWarehouseVo(false)
09:10:39.673 logback [main] INFO s.d.s.p.ModelPropertiesKeyGenerator - Cache key generated: com.example.tdl.domain.vo.AddWarehouseVo(false)
09:10:39.673 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelProperties with key com.example.tdl.domain.vo.AddWarehouseVo(false)
09:10:39.683 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: com.example.tdl.domain.vo.AddWarehouseVo(false)
09:10:39.683 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key com.example.tdl.domain.vo.AddWarehouseVo(false)
09:10:39.683 logback [main] INFO s.d.s.p.ModelPropertiesKeyGenerator - Cache key generated: com.example.tdl.domain.vo.AddWarehouseVo(false)
09:10:39.683 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelProperties with key com.example.tdl.domain.vo.AddWarehouseVo(false)
09:10:39.683 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.683 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key java.lang.Object(true)
09:10:39.683 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.683 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key java.lang.Object(true)
09:10:39.683 logback [main] INFO s.d.s.web.OperationsKeyGenerator - Cache key generated: /warehouse/addWarehouse.com.example.tdl.web.WarehouseController.addWarehouse.CodeGenGenericTypeNamingStrategy
09:10:39.683 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache operations with key /warehouse/addWarehouse.com.example.tdl.web.WarehouseController.addWarehouse.CodeGenGenericTypeNamingStrategy
09:10:39.683 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method addWarehouse was warehouse-controller
09:10:39.683 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method addWarehouse was warehouse-controller
09:10:39.683 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.String(false)
09:10:39.683 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key java.lang.String(false)
09:10:39.683 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.String(false)
09:10:39.683 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key java.lang.String(false)
09:10:39.683 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.683 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key java.lang.Object(true)
09:10:39.683 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.683 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key java.lang.Object(true)
09:10:39.683 logback [main] INFO s.d.s.web.OperationsKeyGenerator - Cache key generated: /warehouse/delWarehouse.com.example.tdl.web.WarehouseController.delWarehouse.CodeGenGenericTypeNamingStrategy
09:10:39.683 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache operations with key /warehouse/delWarehouse.com.example.tdl.web.WarehouseController.delWarehouse.CodeGenGenericTypeNamingStrategy
09:10:39.683 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method delWarehouse was warehouse-controller
09:10:39.683 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method delWarehouse was warehouse-controller
09:10:39.683 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.683 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key java.lang.Object(true)
09:10:39.683 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.683 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key java.lang.Object(true)
09:10:39.693 logback [main] INFO s.d.s.web.OperationsKeyGenerator - Cache key generated: /warehouse/getAll.com.example.tdl.web.WarehouseController.getAll.CodeGenGenericTypeNamingStrategy
09:10:39.693 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache operations with key /warehouse/getAll.com.example.tdl.web.WarehouseController.getAll.CodeGenGenericTypeNamingStrategy
09:10:39.693 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method getAll was warehouse-controller
09:10:39.693 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method getAll was warehouse-controller
09:10:39.693 logback [main] INFO s.d.s.w.r.o.CachingOperationNameGenerator - Generating unique operation named: getAllUsingGET_5
09:10:39.693 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: com.example.tdl.domain.vo.WarehouseTermVo(false)
09:10:39.693 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key com.example.tdl.domain.vo.WarehouseTermVo(false)
09:10:39.693 logback [main] INFO s.d.s.p.ModelPropertiesKeyGenerator - Cache key generated: com.example.tdl.domain.vo.WarehouseTermVo(false)
09:10:39.693 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelProperties with key com.example.tdl.domain.vo.WarehouseTermVo(false)
09:10:39.693 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: com.example.tdl.domain.vo.WarehouseTermVo(false)
09:10:39.693 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key com.example.tdl.domain.vo.WarehouseTermVo(false)
09:10:39.693 logback [main] INFO s.d.s.p.ModelPropertiesKeyGenerator - Cache key generated: com.example.tdl.domain.vo.WarehouseTermVo(false)
09:10:39.693 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelProperties with key com.example.tdl.domain.vo.WarehouseTermVo(false)
09:10:39.693 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.693 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key java.lang.Object(true)
09:10:39.693 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.693 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key java.lang.Object(true)
09:10:39.693 logback [main] INFO s.d.s.web.OperationsKeyGenerator - Cache key generated: /warehouse/getAllByTerm.com.example.tdl.web.WarehouseController.getAllByTerm.CodeGenGenericTypeNamingStrategy
09:10:39.693 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache operations with key /warehouse/getAllByTerm.com.example.tdl.web.WarehouseController.getAllByTerm.CodeGenGenericTypeNamingStrategy
09:10:39.693 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method getAllByTerm was warehouse-controller
09:10:39.693 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method getAllByTerm was warehouse-controller
09:10:39.693 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.693 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key java.lang.Object(true)
09:10:39.693 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: java.lang.Object(true)
09:10:39.693 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key java.lang.Object(true)
09:10:39.693 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: com.example.tdl.domain.vo.UpdateWarehouseVo(false)
09:10:39.693 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache models with key com.example.tdl.domain.vo.UpdateWarehouseVo(false)
09:10:39.693 logback [main] INFO s.d.s.p.ModelPropertiesKeyGenerator - Cache key generated: com.example.tdl.domain.vo.UpdateWarehouseVo(false)
09:10:39.693 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelProperties with key com.example.tdl.domain.vo.UpdateWarehouseVo(false)
09:10:39.693 logback [main] INFO s.d.schema.ModelContextKeyGenerator - Cache Key Generated: com.example.tdl.domain.vo.UpdateWarehouseVo(false)
09:10:39.703 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelDependencies with key com.example.tdl.domain.vo.UpdateWarehouseVo(false)
09:10:39.703 logback [main] INFO s.d.s.p.ModelPropertiesKeyGenerator - Cache key generated: com.example.tdl.domain.vo.UpdateWarehouseVo(false)
09:10:39.703 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache modelProperties with key com.example.tdl.domain.vo.UpdateWarehouseVo(false)
09:10:39.703 logback [main] INFO s.d.s.web.OperationsKeyGenerator - Cache key generated: /warehouse/updateWarehouse.com.example.tdl.web.WarehouseController.updateWarehouse.CodeGenGenericTypeNamingStrategy
09:10:39.703 logback [main] INFO s.d.spring.web.caching.CachingAspect - Caching aspect applied for cache operations with key /warehouse/updateWarehouse.com.example.tdl.web.WarehouseController.updateWarehouse.CodeGenGenericTypeNamingStrategy
09:10:39.703 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method updateWarehouse was warehouse-controller
09:10:39.703 logback [main] INFO s.d.s.w.ClassOrApiAnnotationResourceGrouping - Group for method updateWarehouse was warehouse-controller
09:10:39.723 logback [main] INFO o.a.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8092"]
09:10:39.723 logback [main] INFO o.a.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8092"]
09:10:39.733 logback [main] INFO o.a.tomcat.util.net.NioSelectorPool - Using a shared selector for servlet write/read
09:10:39.773 logback [main] INFO o.s.b.c.e.t.TomcatEmbeddedServletContainer - Tomcat started on port(s): 8092 (http)
09:10:39.773 logback [main] INFO com.example.tdl.TdlApplication - Started TdlApplication in 10.892 seconds (JVM running for 15.131)
09:35:10.198 logback [http-nio-8092-exec-1] INFO o.a.c.c.C.[Tomcat].[localhost].[/] - Initializing Spring FrameworkServlet 'dispatcherServlet'
09:35:10.199 logback [http-nio-8092-exec-1] INFO o.s.web.servlet.DispatcherServlet - FrameworkServlet 'dispatcherServlet': initialization started
09:35:10.264 logback [http-nio-8092-exec-1] INFO o.s.web.servlet.DispatcherServlet - FrameworkServlet 'dispatcherServlet': initialization completed in 65 ms
09:35:30.828 logback [http-nio-8092-exec-7] INFO com.example.tdl.shiro.ShiroRealm - doGetAuthenticationInfo +org.apache.shiro.authc.UsernamePasswordToken - cy, rememberMe=false
17:22:17.556 logback [http-nio-8092-exec-8] INFO com.example.tdl.shiro.ShiroRealm - doGetAuthenticationInfo +org.apache.shiro.authc.UsernamePasswordToken - cy, rememberMe=false
17:24:52.527 logback [http-nio-8092-exec-8] WARN o.s.w.s.m.s.DefaultHandlerExceptionResolver - Failed to read HTTP message: org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Unexpected character ('}' (code 125)): was expecting double-quote to start field name; nested exception is com.fasterxml.jackson.core.JsonParseException: Unexpected character ('}' (code 125)): was expecting double-quote to start field name
at [Source: java.io.PushbackInputStream@1a0ca2c0; line: 5, column: 2]
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
package com.example.tdl;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class TdlApplication {
public static void main(String[] args) {
SpringApplication.run(TdlApplication.class, args);
}
}
package com.example.tdl.common;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
public class WtTime {
public static String WTGetCurTime() {
Calendar c = Calendar.getInstance();
c.setTimeInMillis(System.currentTimeMillis());
Date d = c.getTime();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss ");
return sdf.format(d);
}
//获取n小时后的时间
public static String WTGetFurTime(Integer i) {
long currentTime = System.currentTimeMillis() ;
currentTime += i*60*60*1000;
Date date=new Date(currentTime);
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return dateFormat.format(date);
}
}
package com.example.tdl.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
import org.springframework.web.filter.CorsFilter;
@Configuration
public class CorsConfig {
private CorsConfiguration buildConfig() {
CorsConfiguration corsConfiguration = new CorsConfiguration();
corsConfiguration.addAllowedOrigin("*"); // 1
corsConfiguration.addAllowedHeader("*"); // 2
corsConfiguration.addAllowedMethod("*"); // 3
//corsConfiguration.setAllowCredentials(false);
corsConfiguration.setAllowCredentials(true);
return corsConfiguration;
}
@Bean
public CorsFilter corsFilter() {
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
source.registerCorsConfiguration("/**", buildConfig()); // 4
return new CorsFilter(source);
}
}
package com.example.tdl.config;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.PropertyAccessor;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.CachingConfigurerSupport;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cache.interceptor.KeyGenerator;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.data.redis.cache.RedisCacheManager;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
import redis.clients.jedis.JedisPoolConfig;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
@Configuration
@EnableCaching
@PropertySource(value = "classpath:/application.properties")
public class RedisConfig extends CachingConfigurerSupport {
@Value("${spring.redis.host}")
private String host;
@Value("${spring.redis.port}")
private int port;
@Value("${spring.redis.timeout}")
private int timeout;
/**
* 生产key的策略
*
* @return
*/
@Bean
@Override
public KeyGenerator keyGenerator() {
return new KeyGenerator() {
@Override
public Object generate(Object target, Method method, Object... params) {
StringBuilder sb = new StringBuilder();
sb.append(target.getClass().getName());
sb.append(method.getName());
for (Object obj : params) {
sb.append(obj.toString());
}
return sb.toString();
}
};
}
/**
* 管理缓存
*
* @param redisTemplate
* @return
*/
@SuppressWarnings("rawtypes")
@Bean
public CacheManager CacheManager(RedisTemplate redisTemplate) {
RedisCacheManager rcm = new RedisCacheManager(redisTemplate);
// 设置cache过期时间,时间单位是秒
rcm.setDefaultExpiration(60);
Map<String, Long> map = new HashMap<String, Long>();
map.put("test", 60L);
rcm.setExpires(map);
return rcm;
}
/**
* redis 数据库连接池
*
* @return
*/
@Bean
public JedisConnectionFactory tokenConnectionFactory() {
JedisConnectionFactory factory = new JedisConnectionFactory();
factory.setHostName(host);
factory.setPort( Integer.valueOf(port));
factory.setDatabase(0);
factory.setTimeout(10000); // 设置连接超时时间
factory.setPoolConfig(poolConfig());
factory.afterPropertiesSet();
return factory;
}
public JedisPoolConfig poolConfig() {
JedisPoolConfig poolConfig = new JedisPoolConfig();
poolConfig.setMaxIdle(8);
poolConfig.setMaxTotal(8);
poolConfig.setMaxWaitMillis(-1);
poolConfig.setTestOnBorrow(false);
return poolConfig;
}
/**
* redisTemplate配置
*
* @param tokenConnectionFactory
* @return
*/
@SuppressWarnings({"rawtypes", "unchecked"})
@Bean
public RedisTemplate<String, String> tokenRedisTemplate(RedisConnectionFactory tokenConnectionFactory) {
StringRedisTemplate template = new StringRedisTemplate(tokenConnectionFactory);
Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class);
ObjectMapper om = new ObjectMapper();
om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
jackson2JsonRedisSerializer.setObjectMapper(om);
template.setValueSerializer(jackson2JsonRedisSerializer);
template.afterPropertiesSet();
return template;
}
}
package com.example.tdl.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.context.request.async.DeferredResult;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
@Configuration
@EnableSwagger2
//@EnableWebMvc
public class SwaggerConfig {
@Bean
public Docket testApi() {
return new Docket(DocumentationType.SWAGGER_2)
.groupName("test")
.genericModelSubstitutes(DeferredResult.class)
.useDefaultResponseMessages(false)
.forCodeGeneration(true)
.pathMapping("/")// base,最终调用接口后会和paths拼接在一起
.select()
.apis(RequestHandlerSelectors.basePackage("com.example.tdl"))
.build();
}
}
package com.example.tdl.config;
import org.apache.catalina.Context;
import org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainer;
import org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer;
import org.springframework.boot.context.embedded.tomcat.TomcatContextCustomizer;
import org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory;
import org.springframework.context.annotation.Configuration;
@Configuration
public class TomcatConfig implements EmbeddedServletContainerCustomizer {
@Override
public void customize(final ConfigurableEmbeddedServletContainer container)
{
((TomcatEmbeddedServletContainerFactory) container).addContextCustomizers(new TomcatContextCustomizer(){
@Override
public void customize(Context context)
{
context.setUseHttpOnly(false);
}
});
}
}
package com.example.tdl.domain.dto;
public class CommFeedback {
private Integer code;
private String message;
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
package com.example.tdl.domain.vo;
public class AddAlarmVo {
private String alarmType;
private String alarmScene;
private float temMax;//温度上限
private float temMin;//温度下限
private float humidityMax;//湿度上限
private float humidityMin;//湿度下限
private float tilt;//倾斜度
private String shock;//震度
private String remark;
public String getAlarmType() {
return alarmType;
}
public void setAlarmType(String alarmType) {
this.alarmType = alarmType;
}
public String getAlarmScene() {
return alarmScene;
}
public void setAlarmScene(String alarmScene) {
this.alarmScene = alarmScene;
}
public float getTemMax() {
return temMax;
}
public void setTemMax(float temMax) {
this.temMax = temMax;
}
public float getTemMin() {
return temMin;
}
public void setTemMin(float temMin) {
this.temMin = temMin;
}
public float getHumidityMax() {
return humidityMax;
}
public void setHumidityMax(float humidityMax) {
this.humidityMax = humidityMax;
}
public float getHumidityMin() {
return humidityMin;
}
public void setHumidityMin(float humidityMin) {
this.humidityMin = humidityMin;
}
public float getTilt() {
return tilt;
}
public void setTilt(float tilt) {
this.tilt = tilt;
}
public String getShock() {
return shock;
}
public void setShock(String shock) {
this.shock = shock;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
}
package com.example.tdl.domain.vo;
public class AddRouteVo {
private String startLongitude;
private String startLatitude;
private String startCountry;
private String startProvince;
private String startCity;
private String startAddress;
private String endLongitude;
private String endLatitude;
private String endCountry;
private String endProvince;
private String endCity;
private String endAddress;
private String transport;
private String transportRemark;
private String remark;
public String getStartLongitude() {
return startLongitude;
}
public void setStartLongitude(String startLongitude) {
this.startLongitude = startLongitude;
}
public String getStartLatitude() {
return startLatitude;
}
public void setStartLatitude(String startLatitude) {
this.startLatitude = startLatitude;
}
public String getStartCountry() {
return startCountry;
}
public void setStartCountry(String startCountry) {
this.startCountry = startCountry;
}
public String getStartProvince() {
return startProvince;
}
public void setStartProvince(String startProvince) {
this.startProvince = startProvince;
}
public String getStartCity() {
return startCity;
}
public void setStartCity(String startCity) {
this.startCity = startCity;
}
public String getStartAddress() {
return startAddress;
}
public void setStartAddress(String startAddress) {
this.startAddress = startAddress;
}
public String getEndLongitude() {
return endLongitude;
}
public void setEndLongitude(String endLongitude) {
this.endLongitude = endLongitude;
}
public String getEndLatitude() {
return endLatitude;
}
public void setEndLatitude(String endLatitude) {
this.endLatitude = endLatitude;
}
public String getEndCountry() {
return endCountry;
}
public void setEndCountry(String endCountry) {
this.endCountry = endCountry;
}
public String getEndProvince() {
return endProvince;
}
public void setEndProvince(String endProvince) {
this.endProvince = endProvince;
}
public String getEndCity() {
return endCity;
}
public void setEndCity(String endCity) {
this.endCity = endCity;
}
public String getEndAddress() {
return endAddress;
}
public void setEndAddress(String endAddress) {
this.endAddress = endAddress;
}
public String getTransport() {
return transport;
}
public void setTransport(String transport) {
this.transport = transport;
}
public String getTransportRemark() {
return transportRemark;
}
public void setTransportRemark(String transportRemark) {
this.transportRemark = transportRemark;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
}
package com.example.tdl.domain.vo;
public class AddTDLDeviceVo {
private String TDLName;
private String TDLSN;
public String getTDLName() {
return TDLName;
}
public void setTDLName(String TDLName) {
this.TDLName = TDLName;
}
public String getTDLSN() {
return TDLSN;
}
public void setTDLSN(String TDLSN) {
this.TDLSN = TDLSN;
}
}
package com.example.tdl.domain.vo;
public class AddUserVo {
private String userName;
private String password;
private String nickName;
private String phone;
private String email;
private String roleName;
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getNickName() {
return nickName;
}
public void setNickName(String nickName) {
this.nickName = nickName;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getRoleName() {
return roleName;
}
public void setRoleName(String roleName) {
this.roleName = roleName;
}
}
package com.example.tdl.domain.vo;
public class AddWarehouseVo {
private String warehouseName;
private String country;
private String province;
private String city;
private String district;
private String address;
private String regionCN;//区域中文
private String regionEN;//区域英文
private String longitude;//经度
private String latitude;//纬度
private String property;//属性
private String type;//类型
private String alarmType;
private String hardwareLevel;//硬件等级
private double areaIndoor;//室内平面面积
private double areaRack;//货架面积
private double areaOutdoor;//实际室内总面积
private double areaPlanIndoor;//实际室内总面积
private String office;//办事处
private int timeZone;//时区
private String weatherInfo;//区域气象信息
private String warehouseInfo;//基础描述
private String remark;
public String getWarehouseName() {
return warehouseName;
}
public void setWarehouseName(String warehouseName) {
this.warehouseName = warehouseName;
}
public String getCountry() {
return country;
}
public void setCountry(String country) {
this.country = country;
}
public String getProvince() {
return province;
}
public void setProvince(String province) {
this.province = province;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getDistrict() {
return district;
}
public void setDistrict(String district) {
this.district = district;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getRegionCN() {
return regionCN;
}
public void setRegionCN(String regionCN) {
this.regionCN = regionCN;
}
public String getRegionEN() {
return regionEN;
}
public void setRegionEN(String regionEN) {
this.regionEN = regionEN;
}
public String getLongitude() {
return longitude;
}
public void setLongitude(String longitude) {
this.longitude = longitude;
}
public String getLatitude() {
return latitude;
}
public void setLatitude(String latitude) {
this.latitude = latitude;
}
public String getProperty() {
return property;
}
public void setProperty(String property) {
this.property = property;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getAlarmType() {
return alarmType;
}
public void setAlarmType(String alarmType) {
this.alarmType = alarmType;
}
public String getHardwareLevel() {
return hardwareLevel;
}
public void setHardwareLevel(String hardwareLevel) {
this.hardwareLevel = hardwareLevel;
}
public double getAreaIndoor() {
return areaIndoor;
}
public void setAreaIndoor(double areaIndoor) {
this.areaIndoor = areaIndoor;
}
public double getAreaRack() {
return areaRack;
}
public void setAreaRack(double areaRack) {
this.areaRack = areaRack;
}
public double getAreaOutdoor() {
return areaOutdoor;
}
public void setAreaOutdoor(double areaOutdoor) {
this.areaOutdoor = areaOutdoor;
}
public double getAreaPlanIndoor() {
return areaPlanIndoor;
}
public void setAreaPlanIndoor(double areaPlanIndoor) {
this.areaPlanIndoor = areaPlanIndoor;
}
public String getOffice() {
return office;
}
public void setOffice(String office) {
this.office = office;
}
public int getTimeZone() {
return timeZone;
}
public void setTimeZone(int timeZone) {
this.timeZone = timeZone;
}
public String getWeatherInfo() {
return weatherInfo;
}
public void setWeatherInfo(String weatherInfo) {
this.weatherInfo = weatherInfo;
}
public String getWarehouseInfo() {
return warehouseInfo;
}
public void setWarehouseInfo(String warehouseInfo) {
this.warehouseInfo = warehouseInfo;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
}
package com.example.tdl.domain.vo;
public class DelAlarmVo {
private String alarmType;
private String alarmScene;
public String getAlarmType() {
return alarmType;
}
public void setAlarmType(String alarmType) {
this.alarmType = alarmType;
}
public String getAlarmScene() {
return alarmScene;
}
public void setAlarmScene(String alarmScene) {
this.alarmScene = alarmScene;
}
}
package com.example.tdl.domain.vo;
public class LoginLogTermVo {
private Long startTime;
private Long stopTime;
public Long getStartTime() {
return startTime;
}
public void setStartTime(Long startTime) {
this.startTime = startTime;
}
public Long getStopTime() {
return stopTime;
}
public void setStopTime(Long stopTime) {
this.stopTime = stopTime;
}
}
package com.example.tdl.domain.vo;
public class LoginUserVo {
private String userName;
private String password;
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
}
package com.example.tdl.domain.vo;
public class PermissionVo {
private String permissionName;
private String pName;
private String remark;
public String getPermissionName() {
return permissionName;
}
public void setPermissionName(String permissionName) {
this.permissionName = permissionName;
}
public String getpName() {
return pName;
}
public void setpName(String pName) {
this.pName = pName;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
}
package com.example.tdl.domain.vo;
public class ResultAlarmVo{
private String alarmType;
private String alarmScene;
private float temMax;//温度上限
private float temMin;//温度下限
private float humidityMax;//湿度上限
private float humidityMin;//湿度下限
private float tilt;//倾斜度
private String shock;//震度
private String remark;
public String getAlarmType() {
return alarmType;
}
public void setAlarmType(String alarmType) {
this.alarmType = alarmType;
}
public String getAlarmScene() {
return alarmScene;
}
public void setAlarmScene(String alarmScene) {
this.alarmScene = alarmScene;
}
public float getTemMax() {
return temMax;
}
public void setTemMax(float temMax) {
this.temMax = temMax;
}
public float getTemMin() {
return temMin;
}
public void setTemMin(float temMin) {
this.temMin = temMin;
}
public float getHumidityMax() {
return humidityMax;
}
public void setHumidityMax(float humidityMax) {
this.humidityMax = humidityMax;
}
public float getHumidityMin() {
return humidityMin;
}
public void setHumidityMin(float humidityMin) {
this.humidityMin = humidityMin;
}
public float getTilt() {
return tilt;
}
public void setTilt(float tilt) {
this.tilt = tilt;
}
public String getShock() {
return shock;
}
public void setShock(String shock) {
this.shock = shock;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
}
package com.example.tdl.domain.vo;
public class ResultLoginLogVo {
private String userName;
private String createTime;
private String ipAddress;
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
public String getIpAddress() {
return ipAddress;
}
public void setIpAddress(String ipAddress) {
this.ipAddress = ipAddress;
}
}
package com.example.tdl.domain.vo;
public class ResultRouteVo {
private String routeNumber;
private String routeName;
private String abbreviation;
private String startLongitude;
private String startLatitude;
private String startCountry;
private String startProvince;
private String startCity;
private String startAddress;
private String endLongitude;
private String endLatitude;
private String endCountry;
private String endProvince;
private String endCity;
private String endAddress;
private String transport;
private String transportRemark;
private String remark;
public String getRouteNumber() {
return routeNumber;
}
public void setRouteNumber(String routeNumber) {
this.routeNumber = routeNumber;
}
public String getRouteName() {
return routeName;
}
public void setRouteName(String routeName) {
this.routeName = routeName;
}
public String getAbbreviation() {
return abbreviation;
}
public void setAbbreviation(String abbreviation) {
this.abbreviation = abbreviation;
}
public String getStartLongitude() {
return startLongitude;
}
public void setStartLongitude(String startLongitude) {
this.startLongitude = startLongitude;
}
public String getStartLatitude() {
return startLatitude;
}
public void setStartLatitude(String startLatitude) {
this.startLatitude = startLatitude;
}
public String getStartCountry() {
return startCountry;
}
public void setStartCountry(String startCountry) {
this.startCountry = startCountry;
}
public String getStartProvince() {
return startProvince;
}
public void setStartProvince(String startProvince) {
this.startProvince = startProvince;
}
public String getStartCity() {
return startCity;
}
public void setStartCity(String startCity) {
this.startCity = startCity;
}
public String getStartAddress() {
return startAddress;
}
public void setStartAddress(String startAddress) {
this.startAddress = startAddress;
}
public String getEndLongitude() {
return endLongitude;
}
public void setEndLongitude(String endLongitude) {
this.endLongitude = endLongitude;
}
public String getEndLatitude() {
return endLatitude;
}
public void setEndLatitude(String endLatitude) {
this.endLatitude = endLatitude;
}
public String getEndCountry() {
return endCountry;
}
public void setEndCountry(String endCountry) {
this.endCountry = endCountry;
}
public String getEndProvince() {
return endProvince;
}
public void setEndProvince(String endProvince) {
this.endProvince = endProvince;
}
public String getEndCity() {
return endCity;
}
public void setEndCity(String endCity) {
this.endCity = endCity;
}
public String getEndAddress() {
return endAddress;
}
public void setEndAddress(String endAddress) {
this.endAddress = endAddress;
}
public String getTransport() {
return transport;
}
public void setTransport(String transport) {
this.transport = transport;
}
public String getTransportRemark() {
return transportRemark;
}
public void setTransportRemark(String transportRemark) {
this.transportRemark = transportRemark;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
}
package com.example.tdl.domain.vo;
public class ResultTDLDeviceVo {
private String TDLName;
private String TDLSN;
private String counts;
private Long lastTime;
private int useScene;
private String warehouseName;
private String transportationNo;
public String getTDLSN() {
return TDLSN;
}
public void setTDLSN(String TDLSN) {
this.TDLSN = TDLSN;
}
public String getCounts() {
return counts;
}
public void setCounts(String counts) {
this.counts = counts;
}
public Long getLastTime() {
return lastTime;
}
public void setLastTime(Long lastTime) {
this.lastTime = lastTime;
}
public String getTDLName() {
return TDLName;
}
public void setTDLName(String TDLName) {
this.TDLName = TDLName;
}
public int getUseScene() {
return useScene;
}
public void setUseScene(int useScene) {
this.useScene = useScene;
}
public String getWarehouseName() {
return warehouseName;
}
public void setWarehouseName(String warehouseName) {
this.warehouseName = warehouseName;
}
public String getTransportationNo() {
return transportationNo;
}
public void setTransportationNo(String transportationNo) {
this.transportationNo = transportationNo;
}
}
package com.example.tdl.domain.vo;
public class ResultUserVo {
private String userNumber;
private String userName;
private String nickName;
private String phone;
private String email;
private String roleName;
public String getUserNumber() {
return userNumber;
}
public void setUserNumber(String userNumber) {
this.userNumber = userNumber;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getNickName() {
return nickName;
}
public void setNickName(String nickName) {
this.nickName = nickName;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getRoleName() {
return roleName;
}
public void setRoleName(String roleName) {
this.roleName = roleName;
}
}
package com.example.tdl.domain.vo;
public class ResultWarehouseVo {
private String warehouseName;
private String warehouseNo;//仓库编号
private String country;
private String province;
private String city;
private String district;
private String address;
private String regionCN;//区域中文
private String regionEN;//区域英文
private String longitude;//经度
private String latitude;//纬度
private String property;//属性
private String type;//类型
private String alarmType;
private String alarmScene;
private String hardwareLevel;//硬件等级
private double areaIndoor;//室内平面面积
private double areaRack;//货架面积
private double areaOutdoor;//实际室内总面积
private double areaPlanIndoor;//实际室内总面积
private String office;//办事处
private int timeZone;//时区
private String weatherInfo;//区域气象信息
private String warehouseInfo;//基础描述
private String remark;
public String getWarehouseName() {
return warehouseName;
}
public void setWarehouseName(String warehouseName) {
this.warehouseName = warehouseName;
}
public String getWarehouseNo() {
return warehouseNo;
}
public void setWarehouseNo(String warehouseNo) {
this.warehouseNo = warehouseNo;
}
public String getCountry() {
return country;
}
public void setCountry(String country) {
this.country = country;
}
public String getProvince() {
return province;
}
public void setProvince(String province) {
this.province = province;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getDistrict() {
return district;
}
public void setDistrict(String district) {
this.district = district;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getRegionCN() {
return regionCN;
}
public void setRegionCN(String regionCN) {
this.regionCN = regionCN;
}
public String getRegionEN() {
return regionEN;
}
public void setRegionEN(String regionEN) {
this.regionEN = regionEN;
}
public String getLongitude() {
return longitude;
}
public void setLongitude(String longitude) {
this.longitude = longitude;
}
public String getLatitude() {
return latitude;
}
public void setLatitude(String latitude) {
this.latitude = latitude;
}
public String getProperty() {
return property;
}
public void setProperty(String property) {
this.property = property;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getAlarmType() {
return alarmType;
}
public void setAlarmType(String alarmType) {
this.alarmType = alarmType;
}
public String getAlarmScene() {
return alarmScene;
}
public void setAlarmScene(String alarmScene) {
this.alarmScene = alarmScene;
}
public String getHardwareLevel() {
return hardwareLevel;
}
public void setHardwareLevel(String hardwareLevel) {
this.hardwareLevel = hardwareLevel;
}
public double getAreaIndoor() {
return areaIndoor;
}
public void setAreaIndoor(double areaIndoor) {
this.areaIndoor = areaIndoor;
}
public double getAreaRack() {
return areaRack;
}
public void setAreaRack(double areaRack) {
this.areaRack = areaRack;
}
public double getAreaOutdoor() {
return areaOutdoor;
}
public void setAreaOutdoor(double areaOutdoor) {
this.areaOutdoor = areaOutdoor;
}
public double getAreaPlanIndoor() {
return areaPlanIndoor;
}
public void setAreaPlanIndoor(double areaPlanIndoor) {
this.areaPlanIndoor = areaPlanIndoor;
}
public String getOffice() {
return office;
}
public void setOffice(String office) {
this.office = office;
}
public int getTimeZone() {
return timeZone;
}
public void setTimeZone(int timeZone) {
this.timeZone = timeZone;
}
public String getWeatherInfo() {
return weatherInfo;
}
public void setWeatherInfo(String weatherInfo) {
this.weatherInfo = weatherInfo;
}
public String getWarehouseInfo() {
return warehouseInfo;
}
public void setWarehouseInfo(String warehouseInfo) {
this.warehouseInfo = warehouseInfo;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
}
package com.example.tdl.domain.vo;
public class RouteTermVo {
private String routeNumber;
private String routeName;
private String startCity;
private String endCity;
private String transport;
public String getRouteNumber() {
return routeNumber;
}
public void setRouteNumber(String routeNumber) {
this.routeNumber = routeNumber;
}
public String getRouteName() {
return routeName;
}
public void setRouteName(String routeName) {
this.routeName = routeName;
}
public String getStartCity() {
return startCity;
}
public void setStartCity(String startCity) {
this.startCity = startCity;
}
public String getEndCity() {
return endCity;
}
public void setEndCity(String endCity) {
this.endCity = endCity;
}
public String getTransport() {
return transport;
}
public void setTransport(String transport) {
this.transport = transport;
}
}
package com.example.tdl.domain.vo;
public class TDLDeviceTermVo {
private String TDLName;
private String TDLSN;
private int useScene;
public String getTDLName() {
return TDLName;
}
public void setTDLName(String TDLName) {
this.TDLName = TDLName;
}
public String getTDLSN() {
return TDLSN;
}
public void setTDLSN(String TDLSN) {
this.TDLSN = TDLSN;
}
public int getUseScene() {
return useScene;
}
public void setUseScene(int useScene) {
this.useScene = useScene;
}
}
package com.example.tdl.domain.vo;
public class UpdateAlarmVo {
private String alarmType;
private String alarmScene;
private float temMax;//温度上限
private float temMin;//温度下限
private float humidityMax;//湿度上限
private float humidityMin;//湿度下限
private float tilt;//倾斜度
private String shock;//震度
private String remark;
private String oldAlarmType;
private String oldAlarmScene;
public String getOldAlarmType() {
return oldAlarmType;
}
public void setOldAlarmType(String oldAlarmType) {
this.oldAlarmType = oldAlarmType;
}
public String getOldAlarmScene() {
return oldAlarmScene;
}
public void setOldAlarmScene(String oldAlarmScene) {
this.oldAlarmScene = oldAlarmScene;
}
public String getAlarmType() {
return alarmType;
}
public void setAlarmType(String alarmType) {
this.alarmType = alarmType;
}
public String getAlarmScene() {
return alarmScene;
}
public void setAlarmScene(String alarmScene) {
this.alarmScene = alarmScene;
}
public float getTemMax() {
return temMax;
}
public void setTemMax(float temMax) {
this.temMax = temMax;
}
public float getTemMin() {
return temMin;
}
public void setTemMin(float temMin) {
this.temMin = temMin;
}
public float getHumidityMax() {
return humidityMax;
}
public void setHumidityMax(float humidityMax) {
this.humidityMax = humidityMax;
}
public float getHumidityMin() {
return humidityMin;
}
public void setHumidityMin(float humidityMin) {
this.humidityMin = humidityMin;
}
public float getTilt() {
return tilt;
}
public void setTilt(float tilt) {
this.tilt = tilt;
}
public String getShock() {
return shock;
}
public void setShock(String shock) {
this.shock = shock;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
}
package com.example.tdl.domain.vo;
public class UpdateRouteVo {
private String routeNumber;
private String routeName;
private String abbreviation;
private String startLongitude;
private String startLatitude;
private String startCountry;
private String startProvince;
private String startCity;
private String startAddress;
private String endLongitude;
private String endLatitude;
private String endCountry;
private String endProvince;
private String endCity;
private String endAddress;
private String transport;
private String transportRemark;
private String remark;
public String getRouteNumber() {
return routeNumber;
}
public void setRouteNumber(String routeNumber) {
this.routeNumber = routeNumber;
}
public String getRouteName() {
return routeName;
}
public void setRouteName(String routeName) {
this.routeName = routeName;
}
public String getAbbreviation() {
return abbreviation;
}
public void setAbbreviation(String abbreviation) {
this.abbreviation = abbreviation;
}
public String getStartLongitude() {
return startLongitude;
}
public void setStartLongitude(String startLongitude) {
this.startLongitude = startLongitude;
}
public String getStartLatitude() {
return startLatitude;
}
public void setStartLatitude(String startLatitude) {
this.startLatitude = startLatitude;
}
public String getStartCountry() {
return startCountry;
}
public void setStartCountry(String startCountry) {
this.startCountry = startCountry;
}
public String getStartProvince() {
return startProvince;
}
public void setStartProvince(String startProvince) {
this.startProvince = startProvince;
}
public String getStartCity() {
return startCity;
}
public void setStartCity(String startCity) {
this.startCity = startCity;
}
public String getStartAddress() {
return startAddress;
}
public void setStartAddress(String startAddress) {
this.startAddress = startAddress;
}
public String getEndLongitude() {
return endLongitude;
}
public void setEndLongitude(String endLongitude) {
this.endLongitude = endLongitude;
}
public String getEndLatitude() {
return endLatitude;
}
public void setEndLatitude(String endLatitude) {
this.endLatitude = endLatitude;
}
public String getEndCountry() {
return endCountry;
}
public void setEndCountry(String endCountry) {
this.endCountry = endCountry;
}
public String getEndProvince() {
return endProvince;
}
public void setEndProvince(String endProvince) {
this.endProvince = endProvince;
}
public String getEndCity() {
return endCity;
}
public void setEndCity(String endCity) {
this.endCity = endCity;
}
public String getEndAddress() {
return endAddress;
}
public void setEndAddress(String endAddress) {
this.endAddress = endAddress;
}
public String getTransport() {
return transport;
}
public void setTransport(String transport) {
this.transport = transport;
}
public String getTransportRemark() {
return transportRemark;
}
public void setTransportRemark(String transportRemark) {
this.transportRemark = transportRemark;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
}
package com.example.tdl.domain.vo;
public class UpdateTDLDeviceVo {
private String TDLName;
private String TDLSN;
public String getTDLName() {
return TDLName;
}
public void setTDLName(String TDLName) {
this.TDLName = TDLName;
}
public String getTDLSN() {
return TDLSN;
}
public void setTDLSN(String TDLSN) {
this.TDLSN = TDLSN;
}
}
package com.example.tdl.domain.vo;
public class UpdateUserVo {
private String userNumber;
private String nickName;
private String email;
private String phone;
private String roleName;
public String getUserNumber() {
return userNumber;
}
public void setUserNumber(String userNumber) {
this.userNumber = userNumber;
}
public String getNickName() {
return nickName;
}
public void setNickName(String nickName) {
this.nickName = nickName;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getRoleName() {
return roleName;
}
public void setRoleName(String roleName) {
this.roleName = roleName;
}
}
package com.example.tdl.domain.vo;
public class UpdateWarehouseVo {
private String warehouseName;
private String warehouseNo;//仓库编号
private String country;
private String province;
private String city;
private String district;
private String address;
private String regionCN;//区域中文
private String regionEN;//区域英文
private String longitude;//经度
private String latitude;//纬度
private String property;//属性
private String type;//类型
private String alarmType;
private String hardwareLevel;//硬件等级
private double areaIndoor;//室内平面面积
private double areaRack;//货架面积
private double areaOutdoor;//实际室内总面积
private double areaPlanIndoor;//实际室内总面积
private String office;//办事处
private int timeZone;//时区
private String weatherInfo;//区域气象信息
private String warehouseInfo;//基础描述
private Long updateTime;
private String remark;
public String getWarehouseName() {
return warehouseName;
}
public void setWarehouseName(String warehouseName) {
this.warehouseName = warehouseName;
}
public String getWarehouseNo() {
return warehouseNo;
}
public void setWarehouseNo(String warehouseNo) {
this.warehouseNo = warehouseNo;
}
public String getCountry() {
return country;
}
public void setCountry(String country) {
this.country = country;
}
public String getProvince() {
return province;
}
public void setProvince(String province) {
this.province = province;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getDistrict() {
return district;
}
public void setDistrict(String district) {
this.district = district;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getRegionCN() {
return regionCN;
}
public void setRegionCN(String regionCN) {
this.regionCN = regionCN;
}
public String getRegionEN() {
return regionEN;
}
public void setRegionEN(String regionEN) {
this.regionEN = regionEN;
}
public String getLongitude() {
return longitude;
}
public void setLongitude(String longitude) {
this.longitude = longitude;
}
public String getLatitude() {
return latitude;
}
public void setLatitude(String latitude) {
this.latitude = latitude;
}
public String getProperty() {
return property;
}
public void setProperty(String property) {
this.property = property;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getAlarmType() {
return alarmType;
}
public void setAlarmType(String alarmType) {
this.alarmType = alarmType;
}
public String getHardwareLevel() {
return hardwareLevel;
}
public void setHardwareLevel(String hardwareLevel) {
this.hardwareLevel = hardwareLevel;
}
public double getAreaIndoor() {
return areaIndoor;
}
public void setAreaIndoor(double areaIndoor) {
this.areaIndoor = areaIndoor;
}
public double getAreaRack() {
return areaRack;
}
public void setAreaRack(double areaRack) {
this.areaRack = areaRack;
}
public double getAreaOutdoor() {
return areaOutdoor;
}
public void setAreaOutdoor(double areaOutdoor) {
this.areaOutdoor = areaOutdoor;
}
public double getAreaPlanIndoor() {
return areaPlanIndoor;
}
public void setAreaPlanIndoor(double areaPlanIndoor) {
this.areaPlanIndoor = areaPlanIndoor;
}
public String getOffice() {
return office;
}
public void setOffice(String office) {
this.office = office;
}
public int getTimeZone() {
return timeZone;
}
public void setTimeZone(int timeZone) {
this.timeZone = timeZone;
}
public String getWeatherInfo() {
return weatherInfo;
}
public void setWeatherInfo(String weatherInfo) {
this.weatherInfo = weatherInfo;
}
public String getWarehouseInfo() {
return warehouseInfo;
}
public void setWarehouseInfo(String warehouseInfo) {
this.warehouseInfo = warehouseInfo;
}
public Long getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Long updateTime) {
this.updateTime = updateTime;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
}
package com.example.tdl.domain.vo;
public class UserRedisVo {
private String UserName;
private String UserNumber;
private String nickName;
private String email;
private String phone;
private String roleName;
public String getUserName() {
return UserName;
}
public void setUserName(String userName) {
UserName = userName;
}
public String getUserNumber() {
return UserNumber;
}
public void setUserNumber(String userNumber) {
UserNumber = userNumber;
}
public String getNickName() {
return nickName;
}
public void setNickName(String nickName) {
this.nickName = nickName;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getRoleName() {
return roleName;
}
public void setRoleName(String roleName) {
this.roleName = roleName;
}
public UserRedisVo(String userName, String userNumber, String nickName, String email, String phone, String roleName) {
UserName = userName;
UserNumber = userNumber;
this.nickName = nickName;
this.email = email;
this.phone = phone;
this.roleName = roleName;
}
}
package com.example.tdl.domain.vo;
public class UserTermVo {
private String userName;
private String roleName;
private String email;
private String phone;
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getRoleName() {
return roleName;
}
public void setRoleName(String roleName) {
this.roleName = roleName;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
}
package com.example.tdl.domain.vo;
public class UserVo {
private String userNumber;
private String userName;
private String password;
private String nickName;
private String phone;
private String email;
private String roleName;
public String getUserNumber() {
return userNumber;
}
public void setUserNumber(String userNumber) {
this.userNumber = userNumber;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getNickName() {
return nickName;
}
public void setNickName(String nickName) {
this.nickName = nickName;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getRoleName() {
return roleName;
}
public void setRoleName(String roleName) {
this.roleName = roleName;
}
}
package com.example.tdl.domain.vo;
public class WarehouseTermVo {
private String warehouseName;
private String country;
private String province;
private String city;
private String property;
private String type;
private String hardwareLevel;
public String getWarehouseName() {
return warehouseName;
}
public void setWarehouseName(String warehouseName) {
this.warehouseName = warehouseName;
}
public String getCountry() {
return country;
}
public void setCountry(String country) {
this.country = country;
}
public String getProvince() {
return province;
}
public void setProvince(String province) {
this.province = province;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getProperty() {
return property;
}
public void setProperty(String property) {
this.property = property;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getHardwareLevel() {
return hardwareLevel;
}
public void setHardwareLevel(String hardwareLevel) {
this.hardwareLevel = hardwareLevel;
}
}
package com.example.tdl.entity;
import java.io.Serializable;
/*
* 预警表
*
* */
public class Alarm implements Serializable{
private Serializable serializable = 1L;
private Integer id;
private String alarmType;
private String alarmScene;
private float temMax;//温度上限
private float temMin;//温度下限
private float humidityMax;//湿度上限
private float humidityMin;//湿度下限
private float tilt;//倾斜度
private String shock;//震度
private String remark;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getAlarmType() {
return alarmType;
}
public void setAlarmType(String alarmType) {
this.alarmType = alarmType;
}
public String getAlarmScene() {
return alarmScene;
}
public void setAlarmScene(String alarmScene) {
this.alarmScene = alarmScene;
}
public float getTemMax() {
return temMax;
}
public void setTemMax(float temMax) {
this.temMax = temMax;
}
public float getTemMin() {
return temMin;
}
public void setTemMin(float temMin) {
this.temMin = temMin;
}
public float getHumidityMax() {
return humidityMax;
}
public void setHumidityMax(float humidityMax) {
this.humidityMax = humidityMax;
}
public float getHumidityMin() {
return humidityMin;
}
public void setHumidityMin(float humidityMin) {
this.humidityMin = humidityMin;
}
public float getTilt() {
return tilt;
}
public void setTilt(float tilt) {
this.tilt = tilt;
}
public String getShock() {
return shock;
}
public void setShock(String shock) {
this.shock = shock;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
}
package com.example.tdl.entity;
import java.io.Serializable;
/*
* 线路表
*
* */
public class Circuit implements Serializable {
private Serializable serializable = 1L;
private Integer id;
private String transportationNo;//运输编号
private Route route;//路由
private Long startTime;
private Long endTime;
private boolean circuitState;//线路完成状态
private String routeNumber;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getTransportationNo() {
return transportationNo;
}
public void setTransportationNo(String transportationNo) {
this.transportationNo = transportationNo;
}
public Route getRoute() {
return route;
}
public void setRoute(Route route) {
this.route = route;
}
public Long getStartTime() {
return startTime;
}
public void setStartTime(Long startTime) {
this.startTime = startTime;
}
public Long getEndTime() {
return endTime;
}
public void setEndTime(Long endTime) {
this.endTime = endTime;
}
public boolean isCircuitState() {
return circuitState;
}
public void setCircuitState(boolean circuitState) {
this.circuitState = circuitState;
}
public String getRouteNumber() {
return routeNumber;
}
public void setRouteNumber(String routeNumber) {
this.routeNumber = routeNumber;
}
}
package com.example.tdl.entity;
public class LoginLog {
private int id;
private String userName;
private Long createTime;
private String ipAddress;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public Long getCreateTime() {
return createTime;
}
public void setCreateTime(Long createTime) {
this.createTime = createTime;
}
public String getIpAddress() {
return ipAddress;
}
public void setIpAddress(String ipAddress) {
this.ipAddress = ipAddress;
}
public LoginLog() {
}
public LoginLog(String userName, Long createTime, String ipAddress) {
this.userName = userName;
this.createTime = createTime;
this.ipAddress = ipAddress;
}
}
package com.example.tdl.entity;
import java.io.Serializable;
/*
* 权限表
*
* */
public class Permission implements Serializable {
private Serializable serializable = 1L;
private Integer id;
private String permissionName;
private String remark;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getPermissionName() {
return permissionName;
}
public void setPermissionName(String permissionName) {
this.permissionName = permissionName;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
}
package com.example.tdl.entity;
import java.io.Serializable;
/*
* 角色表
*
* */
public class Role implements Serializable{
private Serializable serializable = 1L;
private Integer id;
private String roleName;
private Long createTime;
private Long updateTime;
private String remark;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getRoleName() {
return roleName;
}
public void setRoleName(String roleName) {
this.roleName = roleName;
}
public Long getCreateTime() {
return createTime;
}
public void setCreateTime(Long createTime) {
this.createTime = createTime;
}
public Long getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Long updateTime) {
this.updateTime = updateTime;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
}
package com.example.tdl.entity;
import java.io.Serializable;
/*
* 角色和权限表
*
* */
public class RoleHasPermission implements Serializable{
private Serializable serializable = 1L;
private Role role;
private Permission permission;
public Role getRole() {
return role;
}
public void setRole(Role role) {
this.role = role;
}
public Permission getPermission() {
return permission;
}
public void setPermission(Permission permission) {
this.permission = permission;
}
}
package com.example.tdl.entity;
import java.io.Serializable;
/*
* 路由表
*
* */
public class Route implements Serializable {
private Serializable serializable = 1L;
private Integer id;
private String routeNumber;
private String routeName;
private String abbreviation;
private String startLongitude;
private String startLatitude;
private String startCountry;
private String startProvince;
private String startCity;
private String startAddress;
private String endLongitude;
private String endLatitude;
private String endCountry;
private String endProvince;
private String endCity;
private String endAddress;
private String transport;
private String transportRemark;
private Long createTime;
private Long updateTime;
private String remark;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getRouteNumber() {
return routeNumber;
}
public void setRouteNumber(String routeNumber) {
this.routeNumber = routeNumber;
}
public String getRouteName() {
return routeName;
}
public void setRouteName(String routeName) {
this.routeName = routeName;
}
public String getAbbreviation() {
return abbreviation;
}
public void setAbbreviation(String abbreviation) {
this.abbreviation = abbreviation;
}
public String getStartLongitude() {
return startLongitude;
}
public void setStartLongitude(String startLongitude) {
this.startLongitude = startLongitude;
}
public String getStartLatitude() {
return startLatitude;
}
public void setStartLatitude(String startLatitude) {
this.startLatitude = startLatitude;
}
public String getStartCountry() {
return startCountry;
}
public void setStartCountry(String startCountry) {
this.startCountry = startCountry;
}
public String getStartProvince() {
return startProvince;
}
public void setStartProvince(String startProvince) {
this.startProvince = startProvince;
}
public String getStartCity() {
return startCity;
}
public void setStartCity(String startCity) {
this.startCity = startCity;
}
public String getStartAddress() {
return startAddress;
}
public void setStartAddress(String startAddress) {
this.startAddress = startAddress;
}
public String getEndLongitude() {
return endLongitude;
}
public void setEndLongitude(String endLongitude) {
this.endLongitude = endLongitude;
}
public String getEndLatitude() {
return endLatitude;
}
public void setEndLatitude(String endLatitude) {
this.endLatitude = endLatitude;
}
public String getEndCountry() {
return endCountry;
}
public void setEndCountry(String endCountry) {
this.endCountry = endCountry;
}
public String getEndProvince() {
return endProvince;
}
public void setEndProvince(String endProvince) {
this.endProvince = endProvince;
}
public String getEndCity() {
return endCity;
}
public void setEndCity(String endCity) {
this.endCity = endCity;
}
public String getEndAddress() {
return endAddress;
}
public void setEndAddress(String endAddress) {
this.endAddress = endAddress;
}
public String getTransport() {
return transport;
}
public void setTransport(String transport) {
this.transport = transport;
}
public String getTransportRemark() {
return transportRemark;
}
public void setTransportRemark(String transportRemark) {
this.transportRemark = transportRemark;
}
public Long getCreateTime() {
return createTime;
}
public void setCreateTime(Long createTime) {
this.createTime = createTime;
}
public Long getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Long updateTime) {
this.updateTime = updateTime;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public Route(String routeNumber, String routeName, String abbreviation, String startLongitude, String startLatitude, String startCountry, String startProvince, String startCity, String startAddress, String endLongitude, String endLatitude, String endCountry, String endProvince, String endCity, String endAddress, String transport, String transportRemark, String remark) {
this.routeNumber = routeNumber;
this.routeName = routeName;
this.abbreviation = abbreviation;
this.startLongitude = startLongitude;
this.startLatitude = startLatitude;
this.startCountry = startCountry;
this.startProvince = startProvince;
this.startCity = startCity;
this.startAddress = startAddress;
this.endLongitude = endLongitude;
this.endLatitude = endLatitude;
this.endCountry = endCountry;
this.endProvince = endProvince;
this.endCity = endCity;
this.endAddress = endAddress;
this.transport = transport;
this.transportRemark = transportRemark;
this.remark = remark;
}
public Route(String routeNumber, String routeName, String abbreviation, String startLongitude, String startLatitude, String startCountry, String startProvince, String startCity, String startAddress, String endLongitude, String endLatitude, String endCountry, String endProvince, String endCity, String endAddress, String transport, String transportRemark, Long createTime, Long updateTime, String remark) {
this.routeNumber = routeNumber;
this.routeName = routeName;
this.abbreviation = abbreviation;
this.startLongitude = startLongitude;
this.startLatitude = startLatitude;
this.startCountry = startCountry;
this.startProvince = startProvince;
this.startCity = startCity;
this.startAddress = startAddress;
this.endLongitude = endLongitude;
this.endLatitude = endLatitude;
this.endCountry = endCountry;
this.endProvince = endProvince;
this.endCity = endCity;
this.endAddress = endAddress;
this.transport = transport;
this.transportRemark = transportRemark;
this.createTime = createTime;
this.updateTime = updateTime;
this.remark = remark;
}
public Route(String routeNumber, String routeName, String abbreviation, String startLongitude, String startLatitude, String startCountry, String startProvince, String startCity, String startAddress, String endLongitude, String endLatitude, String endCountry, String endProvince, String endCity, String endAddress, String transport, String transportRemark, Long updateTime, String remark) {
this.routeNumber = routeNumber;
this.routeName = routeName;
this.abbreviation = abbreviation;
this.startLongitude = startLongitude;
this.startLatitude = startLatitude;
this.startCountry = startCountry;
this.startProvince = startProvince;
this.startCity = startCity;
this.startAddress = startAddress;
this.endLongitude = endLongitude;
this.endLatitude = endLatitude;
this.endCountry = endCountry;
this.endProvince = endProvince;
this.endCity = endCity;
this.endAddress = endAddress;
this.transport = transport;
this.transportRemark = transportRemark;
this.updateTime = updateTime;
this.remark = remark;
}
public Route() {
}
}
package com.example.tdl.entity;
import java.io.Serializable;
public class TDLDevice implements Serializable{
private Serializable serializable = 1L;
private int id;
private String TDLName;
private String TDLSN;
private String counts;
private Long lastTime;
private int useScene;
private String warehouseName;
private String transportationNo;
public String getWarehouseName() {
return warehouseName;
}
public void setWarehouseName(String warehouseName) {
this.warehouseName = warehouseName;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getTDLSN() {
return TDLSN;
}
public void setTDLSN(String TDLSN) {
this.TDLSN = TDLSN;
}
public String getTDLName() {
return TDLName;
}
public void setTDLName(String TDLName) {
this.TDLName = TDLName;
}
public String getCounts() {
return counts;
}
public void setCounts(String counts) {
this.counts = counts;
}
public Long getLastTime() {
return lastTime;
}
public void setLastTime(Long lastTime) {
this.lastTime = lastTime;
}
public int getUseScene() {
return useScene;
}
public void setUseScene(int useScene) {
this.useScene = useScene;
}
public String getTransportationNo() {
return transportationNo;
}
public void setTransportationNo(String transportationNo) {
this.transportationNo = transportationNo;
}
}
package com.example.tdl.entity;
import java.io.Serializable;
/*
* 用户表
*
* */
public class User implements Serializable{
private Serializable serializable = 1L;
private Integer id;
private String userNumber;
private String userName;
private String password;
private String nickName;
private String phone;
private String email;
private Role role;
private Long createTime;
private Long updateTime;
private Integer state;
public String getUserNumber() {
return userNumber;
}
public void setUserNumber(String userNumber) {
this.userNumber = userNumber;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getNickName() {
return nickName;
}
public void setNickName(String nickName) {
this.nickName = nickName;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public Role getRole() {
return role;
}
public void setRole(Role role) {
this.role = role;
}
public Long getCreateTime() {
return createTime;
}
public void setCreateTime(Long createTime) {
this.createTime = createTime;
}
public Long getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Long updateTime) {
this.updateTime = updateTime;
}
public Integer getState() {
return state;
}
public void setState(Integer state) {
this.state = state;
}
}
package com.example.tdl.entity;
import java.io.Serializable;
/*
* 仓库表
*
* */
public class Warehouse implements Serializable {
private Serializable serializable = 1L;
private Integer id;
private String warehouseName;
private String warehouseNo;//仓库编号
private String country;
private String province;
private String city;
private String district;
private String address;
private String regionCN;//区域中文
private String regionEN;//区域英文
private String longitude;//经度
private String latitude;//纬度
private String property;//属性
private String type;//类型
private String alarmType;
private String hardwareLevel;//硬件等级
private double areaIndoor;//室内平面面积
private double areaRack;//货架面积
private double areaOutdoor;//实际室内总面积
private double areaPlanIndoor;//实际室内总面积
private String office;//办事处
private int timeZone;//时区
private String weatherInfo;//区域气象信息
private String warehouseInfo;//基础描述
private Long createTime;
private Long updateTime;
private String remark;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getWarehouseName() {
return warehouseName;
}
public void setWarehouseName(String warehouseName) {
this.warehouseName = warehouseName;
}
public String getCountry() {
return country;
}
public void setCountry(String country) {
this.country = country;
}
public String getProvince() {
return province;
}
public void setProvince(String province) {
this.province = province;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getDistrict() {
return district;
}
public void setDistrict(String district) {
this.district = district;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getRegionCN() {
return regionCN;
}
public void setRegionCN(String regionCN) {
this.regionCN = regionCN;
}
public String getRegionEN() {
return regionEN;
}
public void setRegionEN(String regionEN) {
this.regionEN = regionEN;
}
public String getLongitude() {
return longitude;
}
public void setLongitude(String longitude) {
this.longitude = longitude;
}
public String getLatitude() {
return latitude;
}
public void setLatitude(String latitude) {
this.latitude = latitude;
}
public String getProperty() {
return property;
}
public void setProperty(String property) {
this.property = property;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public Serializable getSerializable() {
return serializable;
}
public void setSerializable(Serializable serializable) {
this.serializable = serializable;
}
public String getAlarmType() {
return alarmType;
}
public void setAlarmType(String alarmType) {
this.alarmType = alarmType;
}
public String getHardwareLevel() {
return hardwareLevel;
}
public void setHardwareLevel(String hardwareLevel) {
this.hardwareLevel = hardwareLevel;
}
public double getAreaIndoor() {
return areaIndoor;
}
public void setAreaIndoor(double areaIndoor) {
this.areaIndoor = areaIndoor;
}
public double getAreaRack() {
return areaRack;
}
public void setAreaRack(double areaRack) {
this.areaRack = areaRack;
}
public double getAreaOutdoor() {
return areaOutdoor;
}
public void setAreaOutdoor(double areaOutdoor) {
this.areaOutdoor = areaOutdoor;
}
public double getAreaPlanIndoor() {
return areaPlanIndoor;
}
public void setAreaPlanIndoor(double areaPlanIndoor) {
this.areaPlanIndoor = areaPlanIndoor;
}
public String getOffice() {
return office;
}
public void setOffice(String office) {
this.office = office;
}
public int getTimeZone() {
return timeZone;
}
public void setTimeZone(int timeZone) {
this.timeZone = timeZone;
}
public String getWeatherInfo() {
return weatherInfo;
}
public void setWeatherInfo(String weatherInfo) {
this.weatherInfo = weatherInfo;
}
public String getWarehouseInfo() {
return warehouseInfo;
}
public void setWarehouseInfo(String warehouseInfo) {
this.warehouseInfo = warehouseInfo;
}
public String getWarehouseNo() {
return warehouseNo;
}
public void setWarehouseNo(String warehouseNo) {
this.warehouseNo = warehouseNo;
}
public Long getCreateTime() {
return createTime;
}
public void setCreateTime(Long createTime) {
this.createTime = createTime;
}
public Long getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Long updateTime) {
this.updateTime = updateTime;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public Warehouse() {
}
public Warehouse(String warehouseName, String warehouseNo, String country, String province, String city, String district, String address, String regionCN, String regionEN, String longitude, String latitude, String property, String type, String alarmType, String hardwareLevel, double areaIndoor, double areaRack, double areaOutdoor, double areaPlanIndoor, String office, int timeZone, String weatherInfo, String warehouseInfo, Long createTime, Long updateTime, String remark) {
this.warehouseName = warehouseName;
this.warehouseNo = warehouseNo;
this.country = country;
this.province = province;
this.city = city;
this.district = district;
this.address = address;
this.regionCN = regionCN;
this.regionEN = regionEN;
this.longitude = longitude;
this.latitude = latitude;
this.property = property;
this.type = type;
this.alarmType = alarmType;
this.hardwareLevel = hardwareLevel;
this.areaIndoor = areaIndoor;
this.areaRack = areaRack;
this.areaOutdoor = areaOutdoor;
this.areaPlanIndoor = areaPlanIndoor;
this.office = office;
this.timeZone = timeZone;
this.weatherInfo = weatherInfo;
this.warehouseInfo = warehouseInfo;
this.createTime = createTime;
this.updateTime = updateTime;
this.remark = remark;
}
}
package com.example.tdl.mapper;
import com.example.tdl.domain.vo.AddAlarmVo;
import com.example.tdl.domain.vo.DelAlarmVo;
import com.example.tdl.domain.vo.ResultAlarmVo;
import com.example.tdl.domain.vo.UpdateAlarmVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface AlarmMapper {
List<ResultAlarmVo> getAll();
List<ResultAlarmVo> getAllByAlarmType(String alarmType);
int addAlarm(AddAlarmVo addAlarmVo);
int updateAlarm(UpdateAlarmVo updateAlarmVo);
int delAlarm(DelAlarmVo delAlarmVo);
ResultAlarmVo getByTypeAndScene(@Param("alarmType") String alarmType,@Param("alarmScene") String alarmScene);
List<String> getForWarehouse();
}
package com.example.tdl.mapper;
import com.example.tdl.domain.vo.LoginLogTermVo;
import com.example.tdl.domain.vo.ResultLoginLogVo;
import com.example.tdl.entity.LoginLog;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface LoginLogMapper {
List<ResultLoginLogVo> getAll();
int addLoginLog(LoginLog loginLog);
List<ResultLoginLogVo> getByTime(LoginLogTermVo loginLogTermVo);
}
package com.example.tdl.mapper;
import com.example.tdl.domain.vo.PermissionVo;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface PermissionMapper {
List<PermissionVo> getAll();
}
package com.example.tdl.mapper;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface RoleHasPermissionMapper {
List<String> getByRoleName(String roleName);
}
package com.example.tdl.mapper;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface RoleMapper {
List<String> getAllRoleName();
}
package com.example.tdl.mapper;
import com.example.tdl.domain.vo.ResultRouteVo;
import com.example.tdl.domain.vo.RouteTermVo;
import com.example.tdl.entity.Route;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface RouteMapper {
List<ResultRouteVo> getAll();
List<ResultRouteVo> getRouteByTerm(RouteTermVo routeTermVo);
int addRoute(Route route);
int updateRoute(Route route);
int delRoute(String routeNumber);
int getByRouteNumber(String routeNumber);
}
package com.example.tdl.mapper;
import com.example.tdl.domain.vo.AddTDLDeviceVo;
import com.example.tdl.domain.vo.ResultTDLDeviceVo;
import com.example.tdl.domain.vo.TDLDeviceTermVo;
import com.example.tdl.domain.vo.UpdateTDLDeviceVo;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface TDLDeviceMapper {
List<ResultTDLDeviceVo> getAll();
List<ResultTDLDeviceVo> getByTerm(TDLDeviceTermVo tdlDeviceTermVo);
int addTDLDevice(AddTDLDeviceVo addTDLDeviceVo);
int updateTDLDevice(UpdateTDLDeviceVo updateTDLDeviceVo);
int delTDLDevice(String TDLSN);
ResultTDLDeviceVo getByTDLSN(String TDLSN);
}
package com.example.tdl.mapper;
import com.example.tdl.domain.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface UserMapper {
int login(LoginUserVo loginUserVo);
UserVo getByUserName(String userName);
List<ResultUserVo> getAll();
List<ResultUserVo> getByTerm(UserTermVo userTermVo);
ResultUserVo getByPhone(String phone);
ResultUserVo getByEmail(String email);
ResultUserVo getByUserNumber(String userNumber);
int addUser(AddUserVo addUserVo);
int updateUser(UpdateUserVo userVo);
int delUser(String userNumber);
int resetPassword(@Param("userNumber") String userNumber,@Param("password") String password);
}
package com.example.tdl.mapper;
import com.example.tdl.domain.vo.ResultWarehouseVo;
import com.example.tdl.domain.vo.UpdateWarehouseVo;
import com.example.tdl.domain.vo.WarehouseTermVo;
import com.example.tdl.entity.Warehouse;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface WarehouseMapper {
List<ResultWarehouseVo> getAll();
List<ResultWarehouseVo> getAllByTerm(WarehouseTermVo warehouseTermVo);
int addWarehouse(Warehouse warehouse);
int updateWarehouse(UpdateWarehouseVo updateWarehouseVo);
int delWarehouse(String warehouseNo);
ResultWarehouseVo getByWarehouseName(String warehouseName);
}
package com.example.tdl.service;
import com.example.tdl.domain.vo.AddAlarmVo;
import com.example.tdl.domain.vo.DelAlarmVo;
import com.example.tdl.domain.vo.ResultAlarmVo;
import com.example.tdl.domain.vo.UpdateAlarmVo;
import com.example.tdl.mapper.AlarmMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class AlarmService {
@Autowired
private AlarmMapper alarmMapper;
public List<ResultAlarmVo> getAll(){
return alarmMapper.getAll();
}
public List<ResultAlarmVo> getAllByAlarmType(String alarmType){
return alarmMapper.getAllByAlarmType(alarmType);
}
public int addAlarm(AddAlarmVo addAlarmVo){
return alarmMapper.addAlarm(addAlarmVo);
}
public int updateAlarm(UpdateAlarmVo updateAlarmVo){
return alarmMapper.updateAlarm(updateAlarmVo);
}
public int delAlarm(DelAlarmVo delAlarmVo){
return alarmMapper.delAlarm(delAlarmVo);
}
public ResultAlarmVo getByTypeAndScene(String alarmType,String alarmScene){
return alarmMapper.getByTypeAndScene(alarmType,alarmScene);
}
public List<String> getForWarehouse(){
return alarmMapper.getForWarehouse();
}
}
package com.example.tdl.service;
import com.example.tdl.domain.vo.LoginLogTermVo;
import com.example.tdl.domain.vo.ResultLoginLogVo;
import com.example.tdl.entity.LoginLog;
import com.example.tdl.mapper.LoginLogMapper;
import com.example.tdl.mapper.RoleMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class LoginLogService {
@Autowired
private LoginLogMapper loginLogMapper;
public List<ResultLoginLogVo> getAll(){
return loginLogMapper.getAll();
}
public int addLoginLog(LoginLog loginLog){
return loginLogMapper.addLoginLog(loginLog);
}
public List<ResultLoginLogVo> getByTime(LoginLogTermVo loginLogTermVo){
return loginLogMapper.getByTime(loginLogTermVo);
}
}
package com.example.tdl.service;
import com.example.tdl.domain.vo.PermissionVo;
import com.example.tdl.mapper.PermissionMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class PermissionService {
@Autowired
private PermissionMapper permissionMapper;
public List<PermissionVo> getAll(){
return permissionMapper.getAll();
}
}
package com.example.tdl.service;
import com.example.tdl.mapper.RoleHasPermissionMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class RoleHasPermissionService {
@Autowired
private RoleHasPermissionMapper roleHasPermissionMapper;
public List<String> getByRoleName(String roleName){
return roleHasPermissionMapper.getByRoleName(roleName);
}
}
package com.example.tdl.service;
import com.example.tdl.mapper.RoleMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class RoleService {
@Autowired
private RoleMapper roleMapper;
public List<String> getAllRoleName(){
return roleMapper.getAllRoleName();
}
}
package com.example.tdl.service;
import com.example.tdl.domain.vo.ResultRouteVo;
import com.example.tdl.domain.vo.RouteTermVo;
import com.example.tdl.domain.vo.UpdateRouteVo;
import com.example.tdl.entity.Route;
import com.example.tdl.mapper.RoleMapper;
import com.example.tdl.mapper.RouteMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class RouteService {
@Autowired
private RouteMapper routeMapper;
public List<ResultRouteVo> getAll(){
return routeMapper.getAll();
}
public List<ResultRouteVo> getRouteByTerm(RouteTermVo routeTermVo){
return routeMapper.getRouteByTerm(routeTermVo);
}
public int addRoute(Route route){
return routeMapper.addRoute(route);
}
public int updateRoute(Route route){
return routeMapper.updateRoute(route);
}
public int delRoute(String routeNumber){
return routeMapper.delRoute(routeNumber);
}
public int getByRouteNumber(String routeNumber){
return routeMapper.getByRouteNumber(routeNumber);
}
}
package com.example.tdl.service;
import com.example.tdl.domain.vo.AddTDLDeviceVo;
import com.example.tdl.domain.vo.ResultTDLDeviceVo;
import com.example.tdl.domain.vo.TDLDeviceTermVo;
import com.example.tdl.domain.vo.UpdateTDLDeviceVo;
import com.example.tdl.mapper.TDLDeviceMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class TDLDeviceService {
@Autowired
private TDLDeviceMapper tdlDeviceMapper;
public List<ResultTDLDeviceVo> getAll(){
return tdlDeviceMapper.getAll();
}
public List<ResultTDLDeviceVo> getByTerm(TDLDeviceTermVo tdlDeviceTermVo){
return tdlDeviceMapper.getByTerm(tdlDeviceTermVo);
}
public int addTDLDevice(AddTDLDeviceVo addTDLDeviceVo){
return tdlDeviceMapper.addTDLDevice(addTDLDeviceVo);
}
public int updateTDLDevice(UpdateTDLDeviceVo updateTDLDeviceVo){
return tdlDeviceMapper.updateTDLDevice(updateTDLDeviceVo);
}
public int delTDLDevice(String TDLSN){
return tdlDeviceMapper.delTDLDevice(TDLSN);
}
public ResultTDLDeviceVo getByTDLSN(String TDLSN){
return tdlDeviceMapper.getByTDLSN(TDLSN);
}
}
package com.example.tdl.service;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.*;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.io.Serializable;
import java.util.List;
import java.util.Set;
import java.util.concurrent.TimeUnit;
@Service
public class TokenRedisService {
private static Logger logger = Logger.getLogger(TokenRedisService.class);
@Autowired
private RedisTemplate tokenRedisTemplate;
/**
* 批量删除对应的value
*
* @param keys
*/
public void remove(final String... keys) {
for (String key : keys) {
remove(key);
}
}
/**
* 哈希 添加
*
* @param key
* @param hashKey
* @param value
*/
public void hmSet(String key, Object hashKey, Object value) {
HashOperations<String, Object, Object> hash = tokenRedisTemplate.opsForHash();
hash.put(key, hashKey, value);
}
/**
* 哈希获取数据
*
* @param key
* @param hashKey
* @return
*/
public Object hmGet(String key,Object hashKey) {
try {
HashOperations<Serializable,Object,Object> hash = tokenRedisTemplate.opsForHash();
return hash.get(key,hashKey);
}catch (Exception e){
e.printStackTrace();
return null;
}
}
/**
* 列表添加
*
* @param k
* @param v
*/
public void Push(String k, Object v) {
ListOperations<String, Object> list = tokenRedisTemplate.opsForList();
list.rightPush(k, v);
}
/**
* 列表获取
*
* @param k
* @param l
* @param l1
* @return
*/
public List<Object> Range(String k, long l, long l1) {
ListOperations<String, Object> list = tokenRedisTemplate.opsForList();
return list.range(k, l, l1);
}
public Set<Object> rangeByScore(String key, double scoure, double scoure1) {
ZSetOperations<String, Object> zset = tokenRedisTemplate.opsForZSet();
return zset.rangeByScore(key, scoure, scoure1);
}
//删除hash中的key
public void delHashKey(String key, String Hashkey) {
HashOperations<Serializable, Object, Object> hash = tokenRedisTemplate.opsForHash();
hash.delete(key,Hashkey);
}
public Object getHashKeys(String key) {
String ret="{error}";
Object result = ret;
try {
HashOperations<Serializable, Object, Object> hash = tokenRedisTemplate.opsForHash();
result = hash.keys(key);
return result;
}catch (Exception e){
e.printStackTrace();
}
return result;
}
public String get(final String key) {
String result = null;
try {
ValueOperations<Serializable, String> operations = tokenRedisTemplate.opsForValue();
result = operations.get(key);
return result;
}catch (Exception e){
e.printStackTrace();
}
return result;
}
public void expire(final String key,final Integer seconds) {
try {
tokenRedisTemplate.expire(key,seconds, TimeUnit.SECONDS);
}catch (Exception e){
e.printStackTrace();
}
}
public void set(final String key,final String value,final Integer seconds){
try{
ValueOperations<Serializable, String> operations = tokenRedisTemplate.opsForValue();
operations.set(key,value,seconds,TimeUnit.SECONDS);
}catch (Exception e){
e.printStackTrace();
logger.info(e.toString());
}
}
public void delKey(final String... key){
if(key!=null && key.length > 0){
if(key.length == 1){
tokenRedisTemplate.delete(key[0]);
}else{
tokenRedisTemplate.delete(CollectionUtils.arrayToList(key));
}
}
}
}
package com.example.tdl.service;
import com.example.tdl.domain.vo.*;
import com.example.tdl.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class UserService {
@Autowired
private UserMapper userMapper;
public int login(LoginUserVo loginUserVo){
return userMapper.login(loginUserVo);
}
public UserVo getByUserName(String userName){
return userMapper.getByUserName(userName);
}
public List<ResultUserVo> getAll(){
return userMapper.getAll();
}
public List<ResultUserVo> getByTerm(UserTermVo userTermVo){
return userMapper.getByTerm(userTermVo);
}
public ResultUserVo getByPhone(String phone){
return userMapper.getByPhone(phone);
}
public ResultUserVo getByEmail(String email){
return userMapper.getByEmail(email);
}
public ResultUserVo getByUserNumber(String userNumber){
return userMapper.getByUserNumber(userNumber);
}
public int addUser(AddUserVo addUserVo){
return userMapper.addUser(addUserVo);
}
public int updateUser(UpdateUserVo userVo){
return userMapper.updateUser(userVo);
}
public int delUser(String userNumber){
return userMapper.delUser(userNumber);
}
public int resetPassword(String userNumber,String password){
return userMapper.resetPassword(userNumber,password);
}
}
package com.example.tdl.service;
import com.example.tdl.domain.vo.ResultWarehouseVo;
import com.example.tdl.domain.vo.UpdateWarehouseVo;
import com.example.tdl.domain.vo.WarehouseTermVo;
import com.example.tdl.entity.Warehouse;
import com.example.tdl.mapper.WarehouseMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class WarehouseService {
@Autowired
private WarehouseMapper warehouseMapper;
public List<ResultWarehouseVo> getAll(){
return warehouseMapper.getAll();
}
public List<ResultWarehouseVo> getAllByTerm(WarehouseTermVo warehouseTermVo){
return warehouseMapper.getAllByTerm(warehouseTermVo);
}
public int addWarehouse(Warehouse warehouse){
return warehouseMapper.addWarehouse(warehouse);
}
public int updateWarehouse(UpdateWarehouseVo updateWarehouseVo){
return warehouseMapper.updateWarehouse(updateWarehouseVo);
}
public int delWarehouse(String warehouseNo){
return warehouseMapper.delWarehouse(warehouseNo);
}
public ResultWarehouseVo getByWarehouseName(String warehouseName){
return warehouseMapper.getByWarehouseName(warehouseName);
}
}
package com.example.tdl.shiro;
import com.example.tdl.domain.vo.UserVo;
import com.example.tdl.service.UserService;
import org.apache.shiro.authc.*;
import org.apache.shiro.authz.AuthorizationInfo;
import org.apache.shiro.authz.SimpleAuthorizationInfo;
import org.apache.shiro.realm.AuthorizingRealm;
import org.apache.shiro.subject.PrincipalCollection;
import org.springframework.beans.factory.annotation.Autowired;
public class AuthRealm extends AuthorizingRealm{
@Autowired
private UserService userService;
protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token) throws AuthenticationException {
System.out.println("....认证....");
//1 强转token
UsernamePasswordToken upToken = (UsernamePasswordToken) token;
//2 根据用户名查找用户信息
UserVo user = userService.getByUserName(upToken.getUsername());
if(user==null){
return null;
}
SimpleAuthenticationInfo info = new SimpleAuthenticationInfo(user, user.getPassword(),this.getName());
return info;
}
protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) {
// 授权
//1 获取当前登录用户
UserVo user = (UserVo) principals.fromRealm(this.getName()).iterator().next();
//2 获取用户的角色
//Set<Role> roles = user.getRoles();
//定义接收module的结果集
// List<String> list = new ArrayList<String>();
//3 遍历角色,获取每个角色对应的访问权限
//for(Role r:roles){
//}
// 4返回AuthorizationInfo信息
SimpleAuthorizationInfo info = new SimpleAuthorizationInfo();
//添加list信息
//info.addStringPermissions(list);
//return info;
return null;
}
}
package com.example.tdl.shiro;
import org.apache.shiro.cache.ehcache.EhCacheManager;
import org.apache.shiro.session.mgt.eis.EnterpriseCacheSessionDAO;
import org.apache.shiro.session.mgt.eis.JavaUuidSessionIdGenerator;
import org.apache.shiro.spring.LifecycleBeanPostProcessor;
import org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor;
import org.apache.shiro.spring.web.ShiroFilterFactoryBean;
import org.apache.shiro.web.filter.authc.LogoutFilter;
import org.apache.shiro.web.mgt.CookieRememberMeManager;
import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
import org.apache.shiro.web.servlet.SimpleCookie;
import org.apache.shiro.web.session.mgt.DefaultWebSessionManager;
import org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.DependsOn;
import javax.servlet.Filter;
import java.util.LinkedHashMap;
import java.util.Map;
/**
* shiro配置类
* Created by cdyoue on 2016/10/21.
*/
@Configuration
public class ShiroConfiguration{
/**
* LifecycleBeanPostProcessor,这是个DestructionAwareBeanPostProcessor的子类,
* 负责org.apache.shiro.util.Initializable类型bean的生命周期的,初始化和销毁。
* 主要是AuthorizingRealm类的子类,以及EhCacheManager类。
*/
@Bean(name = "lifecycleBeanPostProcessor")
public LifecycleBeanPostProcessor lifecycleBeanPostProcessor() {
return new LifecycleBeanPostProcessor();
}
/**
* HashedCredentialsMatcher,这个类是为了对密码进行编码的,
* 防止密码在数据库里明码保存,当然在登陆认证的时候,
* 这个类也负责对form里输入的密码进行编码。
*/
/*@Bean(name = "hashedCredentialsMatcher")
public HashedCredentialsMatcher hashedCredentialsMatcher() {
HashedCredentialsMatcher credentialsMatcher = new HashedCredentialsMatcher();
credentialsMatcher.setHashAlgorithmName("MD5");
credentialsMatcher.setHashIterations(2);
credentialsMatcher.setStoredCredentialsHexEncoded(true);
return credentialsMatcher;
}*/
@Bean(name="userCredentialsMatcher")
public UserCredentialsMatcher userCredentialsMatcher(){
UserCredentialsMatcher credentialsMatcher = new UserCredentialsMatcher();
return credentialsMatcher;
}
/**
* ShiroRealm,这是个自定义的认证类,继承自AuthorizingRealm,
* 负责用户的认证和权限的处理,可以参考JdbcRealm的实现。
*/
@Bean(name = "shiroRealm")
@DependsOn("lifecycleBeanPostProcessor")
public ShiroRealm shiroRealm() {
ShiroRealm realm = new ShiroRealm();
// realm.setCredentialsMatcher(hashedCredentialsMatcher());
return realm;
}
/**
* EhCacheManager,缓存管理,用户登陆成功后,把用户信息和权限信息缓存起来,
* 然后每次用户请求时,放入用户的session中,如果不设置这个bean,每个请求都会查询一次数据库。
*/
@Bean(name = "ehCacheManager")
@DependsOn("lifecycleBeanPostProcessor")
public EhCacheManager ehCacheManager() {
return new EhCacheManager();
}
/**
* SecurityManager,权限管理,这个类组合了登陆,登出,权限,session的处理,是个比较重要的类。
* //
*/
@Bean(name = "securityManager")
public DefaultWebSecurityManager securityManager() {
DefaultWebSecurityManager securityManager = new DefaultWebSecurityManager();
securityManager.setRealm(shiroRealm());
securityManager.setCacheManager(ehCacheManager());
return securityManager;
}
/**
* ShiroFilterFactoryBean,是个factorybean,为了生成ShiroFilter。
* 它主要保持了三项数据,securityManager,filters,filterChainDefinitionManager。
*/
@Bean(name = "shiroFilter")
public ShiroFilterFactoryBean shiroFilterFactoryBean() {
ShiroFilterFactoryBean shiroFilterFactoryBean = new ShiroFilterFactoryBean();
shiroFilterFactoryBean.setSecurityManager(securityManager());
Map<String, Filter> filters = new LinkedHashMap<String, Filter>();
LogoutFilter logoutFilter = new LogoutFilter();
logoutFilter.setRedirectUrl("/login");
// filters.put("logout",null);
shiroFilterFactoryBean.setFilters(filters);
Map<String, String> filterChainDefinitionManager = new LinkedHashMap<String, String>();
filterChainDefinitionManager.put("/logout", "logout");
filterChainDefinitionManager.put("/demo/**", "authc");
//filterChainDefinitionManager.put("/user/**", "authc,roles[ROLE_USER]");
//filterChainDefinitionManager.put("/events/**", "authc,roles[ROLE_ADMIN]");
// filterChainDefinitionManager.put("/user/edit/**", "authc,perms[user:edit]");// 这里为了测试,固定写死的值,也可以从数据库或其他配置中读取
filterChainDefinitionManager.put("/**", "anon");
shiroFilterFactoryBean.setFilterChainDefinitionMap(filterChainDefinitionManager);
shiroFilterFactoryBean.setSuccessUrl("/demo/all");
shiroFilterFactoryBean.setUnauthorizedUrl("/demo/all");
return shiroFilterFactoryBean;
}
/**
* DefaultAdvisorAutoProxyCreator,Spring的一个bean,由Advisor决定对哪些类的方法进行AOP代理。
*/
@Bean
@ConditionalOnMissingBean
public DefaultAdvisorAutoProxyCreator defaultAdvisorAutoProxyCreator() {
DefaultAdvisorAutoProxyCreator defaultAAP = new DefaultAdvisorAutoProxyCreator();
defaultAAP.setProxyTargetClass(true);
return defaultAAP;
}
/**
* AuthorizationAttributeSourceAdvisor,shiro里实现的Advisor类,
* 内部使用AopAllianceAnnotationsAuthorizingMethodInterceptor来拦截用以下注解的方法。
*/
@Bean
public AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor() {
AuthorizationAttributeSourceAdvisor aASA = new AuthorizationAttributeSourceAdvisor();
aASA.setSecurityManager(securityManager());
return aASA;
}
/*
* cookie对象;
*
* @return*/
@Bean
public SimpleCookie rememberMeCookie() {
// 这个参数是cookie的名称,对应前端的checkbox 的name = rememberMe
SimpleCookie simpleCookie = new SimpleCookie("rememberMe");
//设置httpOnly为false
simpleCookie.setHttpOnly(false);
// <!-- 记住我cookie生效时间30天(259200) ,单位秒;-->
simpleCookie.setMaxAge(259200);
simpleCookie.setPath("/test/dist");
return simpleCookie;
}
/*
记住我管理器 cookie管理对象;*/
@Bean(name = "cookieRememberMeManager")
public CookieRememberMeManager rememberMeManager() {
CookieRememberMeManager cookieRememberMeManager = new CookieRememberMeManager();
cookieRememberMeManager.setCookie(rememberMeCookie());
return cookieRememberMeManager;
}
@Bean
public DefaultWebSessionManager defaultWebSessionManager(){
DefaultWebSessionManager defaultWebSessionManager = new DefaultWebSessionManager();
defaultWebSessionManager.setGlobalSessionTimeout(-1000l);
defaultWebSessionManager.setDeleteInvalidSessions(true);
defaultWebSessionManager.setSessionDAO(sessionDAO());
defaultWebSessionManager.setSessionIdCookieEnabled(true);
return defaultWebSessionManager;
}
@Bean
public EnterpriseCacheSessionDAO sessionDAO(){
EnterpriseCacheSessionDAO sessionDAO = new EnterpriseCacheSessionDAO();
sessionDAO.setActiveSessionsCacheName("shiro-activeSessionCache");
sessionDAO.setSessionIdGenerator(new JavaUuidSessionIdGenerator());
return sessionDAO;
}
}
package com.example.tdl.shiro;
import com.example.tdl.domain.vo.UserVo;
import com.example.tdl.service.UserService;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.*;
import org.apache.shiro.authz.AuthorizationInfo;
import org.apache.shiro.authz.SimpleAuthorizationInfo;
import org.apache.shiro.realm.AuthorizingRealm;
import org.apache.shiro.session.Session;
import org.apache.shiro.subject.PrincipalCollection;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import javax.annotation.PostConstruct;
import java.util.HashSet;
import java.util.Set;
/**
* Created by cdyoue on 2016/10/21.
*/
public class ShiroRealm extends AuthorizingRealm {
private Logger logger = LoggerFactory.getLogger(this.getClass());
@PostConstruct
public void initCredentialsMatcher() {
setCredentialsMatcher(new UserCredentialsMatcher());
}
@Autowired
private UserService userService;
@Override
protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principalCollection) {
//授权
logger.info("doGetAuthorizationInfo+"+principalCollection.toString());
UserVo user = userService.getByUserName((String) principalCollection.getPrimaryPrincipal());
//把principals放session中 key=userId value=principals
SecurityUtils.getSubject().getSession().setAttribute(String.valueOf(user.getUserNumber()),SecurityUtils.getSubject().getPrincipals());
SimpleAuthorizationInfo info = new SimpleAuthorizationInfo();
//赋予角色
// for(Role userRole:user.getRoles()){
// info.addRole(userRole.getName());
// }
//赋予权限
// for(Permission permission:permissionService.getByUserId(user.getId())){
//// if(StringUtils.isNotBlank(permission.getPermCode()))
// info.addStringPermission(permission.getName());
// }
//权限
Set<String> s = new HashSet<String>();
s.add("printer:print");
s.add("printer:query");
info.setStringPermissions(s);
//角色
Set<String> r = new HashSet<String>();
r.add("role1");
info.setRoles(r);
//设置登录次数、时间
// userService.updateUserLogin(user);
return info;
}
@Override
protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken authenticationToken) throws AuthenticationException {
//认证
logger.info("doGetAuthenticationInfo +" + authenticationToken.toString());
UsernamePasswordToken token = (UsernamePasswordToken) authenticationToken;
//String userName=token.getUsername();
//logger.info(userName+token.getPassword());
UserVo user = userService.getByUserName(token.getUsername());
if(user == null){
return null;
}
//设置用户session
Session session = SecurityUtils.getSubject().getSession();
session.setAttribute("user", user);
session.setTimeout(-1000l);
session.setAttribute("isLogin","true");
return new SimpleAuthenticationInfo(user,user.getPassword(),this.getName());
}
}
package com.example.tdl.shiro;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.shiro.authc.AuthenticationInfo;
import org.apache.shiro.authc.AuthenticationToken;
import org.apache.shiro.authc.UsernamePasswordToken;
import org.apache.shiro.authc.credential.HashedCredentialsMatcher;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class UserCredentialsMatcher extends HashedCredentialsMatcher {
private Logger logger = LoggerFactory.getLogger(UserCredentialsMatcher.class);
//密码比较器
public boolean doCredentialsMatch(AuthenticationToken token,
AuthenticationInfo info){
UsernamePasswordToken upToken = (UsernamePasswordToken) token;
char[] pwd = upToken.getPassword();
//String newPwd = Encrypt.md5(new String(pwd), upToken.getUsername());
String newPwd = DigestUtils.sha256Hex(new String(pwd));
// logger.info(newPwd);
Object dbPwd = info.getCredentials();
Boolean boo = equals(newPwd, dbPwd);
return boo;
}
}
package com.example.tdl.web;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.example.tdl.domain.dto.CommFeedback;
import com.example.tdl.domain.vo.AddAlarmVo;
import com.example.tdl.domain.vo.DelAlarmVo;
import com.example.tdl.domain.vo.UpdateAlarmVo;
import com.example.tdl.domain.vo.UserVo;
import com.example.tdl.service.AlarmService;
import com.example.tdl.service.TokenRedisService;
import com.google.gson.Gson;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
@RestController
@RequestMapping("/alarm")
public class AlarmController {
private Logger logger = LoggerFactory.getLogger(AlarmController.class);
CommFeedback fb=new CommFeedback();
Gson gson=new Gson();
@Autowired
private AlarmService alarmService=new AlarmService();
@Autowired
private TokenRedisService tokenRedisService;
//查询所有预警信息
@ApiOperation(value = "查询所有预警信息",notes = "查询所有预警信息,返回值说明:" +
" alarmType:预警类型," +
" alarmScene:预警场景," +
" temMax:温度上限," +
" temMin:温度下限," +
" humidityMax:湿度上限," +
" humidityMin:湿度下限," +
" tilt:倾斜度," +
" shock:震度," +
" remark:备注")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
})
@RequestMapping(value="/getAll",method = RequestMethod.GET)
public Object getAll(HttpServletRequest request){
String token = request.getHeader("Account_token");
String datum = tokenRedisService.get("TOKEN_" +token);
if(datum == null){
fb.setCode(0);
fb.setMessage("您没有登录,请先登录");
return gson.toJson(fb);
}else{
return alarmService.getAll();
}
}
//根据预警类型模糊查询
@ApiOperation(value = "根据预警类型模糊查询",notes = "查询所有预警信息,返回值说明:" +
" alarmType:预警类型," +
" alarmScene:预警场景," +
" temMax:温度上限," +
" temMin:温度下限," +
" humidityMax:湿度上限," +
" humidityMin:湿度下限," +
" tilt:倾斜度," +
" shock:震度," +
" remark:备注")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
})
@RequestMapping(value="/getAllByAlarmType",method = RequestMethod.POST)
public Object getAllByAlarmType(@RequestBody String alarmType,HttpServletRequest request){
JSONObject jsonObject= JSON.parseObject(alarmType);
alarmType=(String)jsonObject.get("alarmType");
String token = request.getHeader("Account_token");
String datum = tokenRedisService.get("TOKEN_" +token);
if(datum == null){
fb.setCode(0);
fb.setMessage("您没有登录,请先登录");
return gson.toJson(fb);
}else{
return alarmService.getAllByAlarmType(alarmType);
}
}
//添加预警信息
@ApiOperation(value = "添加预警信息",notes = "添加预警信息,传递参数:" +
" alarmType:预警类型," +
" alarmScene:预警场景," +
" temMax:温度上限," +
" temMin:温度下限," +
" humidityMax:湿度上限," +
" humidityMin:湿度下限," +
" tilt:倾斜度," +
" shock:震度," +
" remark:备注")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
})
@RequestMapping(value="/addAlarm",method = RequestMethod.POST)
public Object addAlarm(@RequestBody AddAlarmVo addAlarmVo,HttpServletRequest request){
String token = request.getHeader("Account_token");
String datum = tokenRedisService.get("TOKEN_" +token);
if(datum == null){
fb.setCode(0);
fb.setMessage("您没有登录,请先登录");
return gson.toJson(fb);
}else{
if (StringUtils.isEmpty(addAlarmVo.getAlarmType())){
fb.setCode(0);
fb.setMessage("预警类型不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addAlarmVo.getAlarmScene())){
fb.setCode(0);
fb.setMessage("预警场景不能为空");
return gson.toJson(fb);
}else if (!addAlarmVo.getAlarmScene().equals("仓库")&&!addAlarmVo.getAlarmScene().equals("运输")){
fb.setCode(0);
fb.setMessage("请选择正确的预警场景");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addAlarmVo.getTemMax()+"")){
fb.setCode(0);
fb.setMessage("温度上限不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addAlarmVo.getTemMin()+"")){
fb.setCode(0);
fb.setMessage("温度下限不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addAlarmVo.getHumidityMax()+"")){
fb.setCode(0);
fb.setMessage("湿度上限不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addAlarmVo.getHumidityMin()+"")){
fb.setCode(0);
fb.setMessage("湿度下限不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addAlarmVo.getTilt()+"")){
fb.setCode(0);
fb.setMessage("倾斜度不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addAlarmVo.getShock()+"")){
fb.setCode(0);
fb.setMessage("震度不能为空");
return gson.toJson(fb);
}
if (alarmService.getByTypeAndScene(addAlarmVo.getAlarmType(),addAlarmVo.getAlarmScene())!=null){
fb.setCode(0);
fb.setMessage("添加的预警类型在该场景中已存在");
return gson.toJson(fb);
}
int a=alarmService.addAlarm(addAlarmVo);
if (a>0){
fb.setCode(1);
fb.setMessage("添加预警信息成功");
}else{
fb.setCode(0);
fb.setMessage("添加预警信息失败");
}
return gson.toJson(fb);
}
}
//修改预警信息
@ApiOperation(value = "修改预警信息",notes = "修改预警信息,传递参数:" +
" oldAlarmType:需要修改的预警类型," +
" oldAlarmScene:需要修改的预警场景," +
" alarmType:预警类型," +
" alarmScene:预警场景," +
" temMax:温度上限," +
" temMin:温度下限," +
" humidityMax:湿度上限," +
" humidityMin:湿度下限," +
" tilt:倾斜度," +
" shock:震度," +
" remark:备注")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
})
@RequestMapping(value="/updateAlarm",method = RequestMethod.POST)
public Object updateAlarm(@RequestBody UpdateAlarmVo updateAlarmVo,HttpServletRequest request){
String token = request.getHeader("Account_token");
String datum = tokenRedisService.get("TOKEN_" +token);
if(datum == null){
fb.setCode(0);
fb.setMessage("您没有登录,请先登录");
return gson.toJson(fb);
}else{
if (StringUtils.isEmpty(updateAlarmVo.getOldAlarmType())){
fb.setCode(0);
fb.setMessage("需要修改的预警类型不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateAlarmVo.getOldAlarmScene())){
fb.setCode(0);
fb.setMessage("需要修改的预警场景不能为空");
return gson.toJson(fb);
}else if (!updateAlarmVo.getOldAlarmScene().equals("仓库")&&!updateAlarmVo.getOldAlarmScene().equals("运输")){
fb.setCode(0);
fb.setMessage("请输入正确的需要修改预警场景");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateAlarmVo.getAlarmType())){
fb.setCode(0);
fb.setMessage("预警类型不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateAlarmVo.getAlarmScene())){
fb.setCode(0);
fb.setMessage("预警场景不能为空");
return gson.toJson(fb);
}else if (!updateAlarmVo.getAlarmScene().equals("仓库")&&!updateAlarmVo.getAlarmScene().equals("运输")){
fb.setCode(0);
fb.setMessage("请选择正确的预警场景");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateAlarmVo.getTemMax()+"")){
fb.setCode(0);
fb.setMessage("温度上限不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateAlarmVo.getTemMin()+"")){
fb.setCode(0);
fb.setMessage("温度下限不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateAlarmVo.getHumidityMax()+"")){
fb.setCode(0);
fb.setMessage("湿度上限不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateAlarmVo.getHumidityMin()+"")){
fb.setCode(0);
fb.setMessage("湿度下限不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateAlarmVo.getTilt()+"")){
fb.setCode(0);
fb.setMessage("倾斜度不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateAlarmVo.getShock()+"")){
fb.setCode(0);
fb.setMessage("震度不能为空");
return gson.toJson(fb);
}
if (alarmService.getByTypeAndScene(updateAlarmVo.getAlarmType(),updateAlarmVo.getAlarmType())!=null&&!updateAlarmVo.getAlarmType().equals(updateAlarmVo.getAlarmType())&&!updateAlarmVo.getAlarmScene().equals(updateAlarmVo.getAlarmScene())){
fb.setCode(0);
fb.setMessage("修改的预警类型在该场景中已存在");
return gson.toJson(fb);
}
int a=alarmService.updateAlarm(updateAlarmVo);
if (a>0){
fb.setCode(1);
fb.setMessage("修改预警信息成功");
}else{
fb.setCode(0);
fb.setMessage("修改预警信息失败");
}
return gson.toJson(fb);
}
}
//删除预警信息
@ApiOperation(value = "删除预警信息",notes = "删除预警信息,传值说明:" +
" alarmType:需要删除的预警类型," +
" alarmScene:需要删除的预警场景" )
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
})
@RequestMapping(value="/delAlarm",method = RequestMethod.POST)
public Object delAlarm(@RequestBody DelAlarmVo delAlarmVo,HttpServletRequest request){
String token = request.getHeader("Account_token");
String datum = tokenRedisService.get("TOKEN_" +token);
if(datum == null){
fb.setCode(0);
fb.setMessage("您没有登录,请先登录");
return gson.toJson(fb);
}else{
int a=alarmService.delAlarm(delAlarmVo);
if (a>0){
fb.setCode(1);
fb.setMessage("删除预警信息成功");
}else{
fb.setCode(0);
fb.setMessage("删除预警信息失败");
}
}
return gson.toJson(fb);
}
//查询仓库场景下的预警类型
@ApiOperation(value = "查询仓库场景下的预警类型",notes = "查询仓库场景下的预警类型")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
})
@RequestMapping(value="/getForWarehouse",method = RequestMethod.GET)
public Object getForWarehouse(HttpServletRequest request){
String token = request.getHeader("Account_token");
String datum = tokenRedisService.get("TOKEN_" +token);
if(datum == null){
fb.setCode(0);
fb.setMessage("您没有登录,请先登录");
return gson.toJson(fb);
}else{
return alarmService.getForWarehouse();
}
}
}
package com.example.tdl.web;
import com.example.tdl.domain.dto.CommFeedback;
import com.example.tdl.domain.vo.LoginUserVo;
import com.example.tdl.domain.vo.UserRedisVo;
import com.example.tdl.domain.vo.UserVo;
import com.example.tdl.entity.LoginLog;
import com.example.tdl.service.LoginLogService;
import com.example.tdl.service.TokenRedisService;
import com.example.tdl.service.UserService;
import com.google.gson.Gson;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.UsernamePasswordToken;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@RestController
@RequestMapping("/login")
public class LoginController {
private Logger logger = LoggerFactory.getLogger(LoginController.class);
Gson gson = new Gson();
CommFeedback fb = new CommFeedback();
@Autowired
private UserService userService;
@Autowired
private TokenRedisService tokenRedisService;
@Autowired
private LoginLogService loginLogService;
//使用token登录
@ApiOperation(value = "使用token登录",notes = "使用token登录:" +
" userName: 用户名," +
" password: 密码")
@RequestMapping(value = "/loginForToken", method = RequestMethod.POST)
@ResponseBody
public String loginForToken(@RequestBody LoginUserVo loginUserVo, HttpServletRequest request, HttpServletResponse response) {
if(StringUtils.isEmpty(loginUserVo.getUserName())){
fb.setCode(0);
fb.setMessage("用户名不能为空");
return gson.toJson(fb);
}
if(StringUtils.isEmpty(loginUserVo.getPassword())){
fb.setCode(0);
fb.setMessage("密码不能为空");
return gson.toJson(fb);
}
if(userService.getByUserName(loginUserVo.getUserName()) == null){
fb.setCode(0);
fb.setMessage("该用户不存在");
return gson.toJson(fb);
}
try {
UserVo userVo=userService.getByUserName(loginUserVo.getUserName());
//将封装好的用户名和密码交给shiro安全框架并实现登陆
SecurityUtils.getSubject().login(new UsernamePasswordToken(loginUserVo.getUserName(), loginUserVo.getPassword()));
//生成token
String token = DigestUtils.md5Hex(System.currentTimeMillis() + userVo.getUserName());
UserRedisVo redisVo = new UserRedisVo(userVo.getUserName(),userVo.getUserNumber(),userVo.getNickName(),userVo.getEmail(),userVo.getPhone(),userVo.getRoleName());
//将用户数据保存到redis中
tokenRedisService.set("TOKEN_" + token, gson.toJson(redisVo), 60 * 30);
String ip = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest().getRemoteAddr();
int a=loginLogService.addLoginLog(new LoginLog(loginUserVo.getUserName(),System.currentTimeMillis(),ip));
if (a>0){
fb.setCode(1);
fb.setMessage(token);
}else{
fb.setCode(0);
fb.setMessage("添加日志失败");
}
} catch (Exception e) {
e.printStackTrace();
logger.info(e.toString());
fb.setCode(0);
fb.setMessage("登录失败");
}
return gson.toJson(fb);
}
//注销
@ApiOperation(value = "注销",notes = "注销登录")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
})
@RequestMapping(value = "/logout", method = RequestMethod.GET)
@ResponseBody
public String logout(HttpServletRequest request){
String token=request.getHeader("Account_token");
// JSONObject jsonObject= JSON.parseObject(token);
// token=(String)jsonObject.get("token");
// logger.info(request.getHeader("Account_token"));
tokenRedisService.delKey("TOKEN_"+token);
fb.setCode(1);
fb.setMessage("注销成功");
return gson.toJson(fb);
}
//登录功能
// @ApiOperation(value = "登录功能",notes = "登录功能:" +
// " userName: 用户名," +
// " password: 密码")
// @RequestMapping(value = "/doLogin", method = RequestMethod.POST)
// @ResponseBody
// public String login(@RequestBody LoginUserVo loginUserVo) {
// if(StringUtils.isEmpty(loginUserVo.getUserName())){
// fb.setCode(0);
// fb.setMessage("用户名不能为空");
// return gson.toJson(fb);
// }
// if(StringUtils.isEmpty(loginUserVo.getPassword())){
// fb.setCode(0);
// fb.setMessage("密码不能为空");
// return gson.toJson(fb);
// }
// if(userService.getByUserName(loginUserVo.getUserName()) == null){
// fb.setCode(0);
// fb.setMessage("该用户不存在");
// return gson.toJson(fb);
// }
//
// //实现登录过程,封装用户在页面上提交的用户和密码
// UsernamePasswordToken token = new UsernamePasswordToken(loginUserVo.getUserName(), loginUserVo.getPassword());
// //将封装好的用户名和密码交给shiro安全框架并实现登陆
// try {
// SecurityUtils.getSubject().login(token);
// fb.setCode(1);
// fb.setMessage("登录成功");
// } catch (Exception e) {
//// e.printStackTrace();
//// logger.info(e.toString());
// fb.setCode(0);
// fb.setMessage("登录失败");
// }
// return gson.toJson(fb);
// }
}
package com.example.tdl.web;
import com.example.tdl.domain.dto.CommFeedback;
import com.example.tdl.domain.vo.LoginLogTermVo;
import com.example.tdl.domain.vo.UserVo;
import com.example.tdl.service.LoginLogService;
import com.example.tdl.service.TokenRedisService;
import com.google.gson.Gson;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
@RestController
@RequestMapping("/loginLog")
public class LoginLogController {
private Logger logger = LoggerFactory.getLogger(LoginLogController.class);
CommFeedback fb=new CommFeedback();
Gson gson=new Gson();
@Autowired
private LoginLogService loginLogService=new LoginLogService();
@Autowired
private TokenRedisService tokenRedisService;
//查询登录日志
@ApiOperation(value = "查询登录日志",notes = "查询登录日志,返回值说明:" +
" userName:用户名," +
" createTime:登录时间," +
" ipAddress:登录地址。")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
})
@RequestMapping(value="/getAll",method = RequestMethod.GET)
public Object getAll(HttpServletRequest request){
String token = request.getHeader("Account_token");
String datum = tokenRedisService.get("TOKEN_" +token);
if(datum == null){
fb.setCode(0);
fb.setMessage("您没有登录,请先登录");
return gson.toJson(fb);
}else{
return loginLogService.getAll();
}
}
//根据时间查询登录日志
@ApiOperation(value = "根据时间查询登录日志",notes = "根据时间查询登录日志,传值说明:" +
" startTime:查询开始时间," +
" stopTime:查询结束时间。" +
"返回值说明:" +
" userName:用户名," +
" createTime:登录时间," +
" ipAddress:登录地址。")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
})
@RequestMapping(value="/getByTime",method = RequestMethod.POST)
public Object getByTime(@RequestBody LoginLogTermVo loginLogTermVo,HttpServletRequest request){
String token = request.getHeader("Account_token");
String datum = tokenRedisService.get("TOKEN_" +token);
if(datum == null){
fb.setCode(0);
fb.setMessage("您没有登录,请先登录");
return gson.toJson(fb);
}else{
if (StringUtils.isEmpty(loginLogTermVo.getStartTime()+"")){
fb.setCode(0);
fb.setMessage("查询开始时间不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(loginLogTermVo.getStopTime()+"")){
fb.setCode(0);
fb.setMessage("查询结束时间不能为空");
return gson.toJson(fb);
}
return loginLogService.getByTime(loginLogTermVo);
}
}
}
package com.example.tdl.web;
import com.example.tdl.domain.dto.CommFeedback;
import com.example.tdl.domain.vo.UserVo;
import com.example.tdl.service.PermissionService;
import com.example.tdl.service.RoleService;
import com.example.tdl.service.TokenRedisService;
import com.google.gson.Gson;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.SecurityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
@RestController
@RequestMapping("/permission")
public class PermissionController {
private Logger logger = LoggerFactory.getLogger(PermissionController.class);
CommFeedback fb=new CommFeedback();
Gson gson=new Gson();
@Autowired
private PermissionService permissionService=new PermissionService();
@Autowired
private TokenRedisService tokenRedisService;
//查询本公司的用户
@ApiOperation(value = "查询所有权限信息",notes = "查询所有权限信息")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
})
@RequestMapping(value="/getAll",method = RequestMethod.GET)
public Object getAll(HttpServletRequest request){
String token = request.getHeader("Account_token");
String datum = tokenRedisService.get("TOKEN_" +token);
if(datum == null){
fb.setCode(0);
fb.setMessage("您没有登录,请先登录");
return gson.toJson(fb);
}else{
return permissionService.getAll();
}
}
}
package com.example.tdl.web;
import com.example.tdl.domain.dto.CommFeedback;
import com.example.tdl.domain.vo.UserVo;
import com.example.tdl.service.RoleService;
import com.example.tdl.service.TokenRedisService;
import com.google.gson.Gson;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.SecurityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
@RestController
@RequestMapping("/role")
public class RoleController {
private Logger logger = LoggerFactory.getLogger(RoleController.class);
CommFeedback fb=new CommFeedback();
Gson gson=new Gson();
@Autowired
private RoleService roleService=new RoleService();
@Autowired
private TokenRedisService tokenRedisService;
//查询本公司的用户
@ApiOperation(value = "查询所有角色名",notes = "查询所有角色名")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
})
@RequestMapping(value="/getAllRoleName",method = RequestMethod.GET)
public Object getAllRoleName(HttpServletRequest request){
String token = request.getHeader("Account_token");
String datum = tokenRedisService.get("TOKEN_" +token);
if(datum == null){
fb.setCode(0);
fb.setMessage("您没有登录,请先登录");
return gson.toJson(fb);
}else{
return roleService.getAllRoleName();
}
}
}
package com.example.tdl.web;
import com.example.tdl.domain.dto.CommFeedback;
import com.example.tdl.domain.vo.UserRedisVo;
import com.example.tdl.domain.vo.UserVo;
import com.example.tdl.service.RoleHasPermissionService;
import com.example.tdl.service.TokenRedisService;
import com.google.gson.Gson;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.SecurityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
@RestController
@RequestMapping("/roleHasPermission")
public class RoleHasPermissionController {
private Logger logger = LoggerFactory.getLogger(RoleHasPermissionController.class);
CommFeedback fb=new CommFeedback();
Gson gson=new Gson();
@Autowired
private RoleHasPermissionService roleHasPermissionService=new RoleHasPermissionService();
@Autowired
private TokenRedisService tokenRedisService;
//查询本公司的用户
@ApiOperation(value = "查询所有权限信息",notes = "查询所有权限信息")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
})
@RequestMapping(value="/getAll",method = RequestMethod.GET)
public Object getAll(HttpServletRequest request){
String token = request.getHeader("Account_token");
String datum = tokenRedisService.get("TOKEN_" +token);
UserRedisVo user = gson.fromJson(datum,UserRedisVo.class);
if(datum == null){
fb.setCode(0);
fb.setMessage("您没有登录,请先登录");
return gson.toJson(fb);
}else{
return roleHasPermissionService.getByRoleName(user.getRoleName());
}
}
}
package com.example.tdl.web;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.example.tdl.domain.dto.CommFeedback;
import com.example.tdl.domain.vo.AddRouteVo;
import com.example.tdl.domain.vo.RouteTermVo;
import com.example.tdl.domain.vo.UpdateRouteVo;
import com.example.tdl.domain.vo.UserVo;
import com.example.tdl.entity.Route;
import com.example.tdl.service.RoleService;
import com.example.tdl.service.RouteService;
import com.example.tdl.service.TokenRedisService;
import com.google.gson.Gson;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
@RestController
@RequestMapping("/route")
public class RouteController {
private Logger logger = LoggerFactory.getLogger(RouteController.class);
CommFeedback fb=new CommFeedback();
Gson gson=new Gson();
@Autowired
private RouteService routeService=new RouteService();
@Autowired
private TokenRedisService tokenRedisService;
//查询所有路由信息
@ApiOperation(value = "查询所有路由信息",notes = "查询所有路由信息,返回值说明:" +
" routeNumber:路由编号," +
" routeName:路由名称," +
" abbreviation:名称缩写," +
" startLongitude:启运经度," +
" startLatitude:启运纬度," +
" startCountry: 启运国家," +
" startProvince:启运省," +
" startCity:启运市," +
" startAddress:启运地址," +
" endLongitude:目的经度," +
" endLatitude:目的纬度," +
" endCountry:目的国家," +
" endProvince:目的省," +
" endCity:目的市," +
" endAddress:目的地址," +
" transport:运输方式," +
" transportRemark:运输方式备注," +
" remark:路由备注")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
})
@RequestMapping(value="/getAll",method = RequestMethod.GET)
public Object getAll(HttpServletRequest request){
String token = request.getHeader("Account_token");
String datum = tokenRedisService.get("TOKEN_" +token);
if(datum == null){
fb.setCode(0);
fb.setMessage("您没有登录,请先登录");
return gson.toJson(fb);
}else{
return routeService.getAll();
}
}
//根据条件查询路由信息
@ApiOperation(value = "根据条件查询路由信息",notes = "根据条件查询路由信息,传值说明:" +
" routeNumber:路由编号," +
" routeName:路由名称," +
" startCity:启运市," +
" endCity:目的市," +
" transport:运输方式。" +
"--------------------" +
"返回值说明:" +
" routeNumber:路由编号," +
" routeName:路由名称," +
" abbreviation:名称缩写," +
" startLongitude:启运经度," +
" startLatitude:启运纬度," +
" startCountry: 启运国家," +
" startProvince:启运省," +
" startCity:启运市," +
" startAddress:启运地址," +
" endLongitude:目的经度," +
" endLatitude:目的纬度," +
" endCountry:目的国家," +
" endProvince:目的省," +
" endCity:目的市," +
" endAddress:目的地址," +
" transport:运输方式," +
" transportRemark:运输方式备注," +
" remark:路由备注")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
})
@RequestMapping(value="/getRouteByTerm",method = RequestMethod.POST)
public Object getRouteByTerm(@RequestBody RouteTermVo routeTermVo,HttpServletRequest request){
String token = request.getHeader("Account_token");
String datum = tokenRedisService.get("TOKEN_" +token);
if(datum == null){
fb.setCode(0);
fb.setMessage("您没有登录,请先登录");
return gson.toJson(fb);
}else{
return routeService.getRouteByTerm(routeTermVo);
}
}
@ApiOperation(value = "添加路由信息",notes = "添加路由信息,都要传,说明:" +
" startLongitude:启运经度," +
" startLatitude:启运纬度," +
" startCountry: 启运国家," +
" startProvince:启运省," +
" startCity:启运市," +
" startAddress:启运地址," +
" endLongitude:目的经度," +
" endLatitude:目的纬度," +
" endCountry:目的国家," +
" endProvince:目的省," +
" endCity:目的市," +
" endAddress:目的地址," +
" transport:运输方式," +
" transportRemark:运输方式备注," +
" remark:路由备注")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
})
@RequestMapping(value="/addRoute",method = RequestMethod.POST)
public Object addRoute(@RequestBody AddRouteVo addRouteVo,HttpServletRequest request){
String token = request.getHeader("Account_token");
String datum = tokenRedisService.get("TOKEN_" +token);
if(datum == null){
fb.setCode(0);
fb.setMessage("您没有登录,请先登录");
return gson.toJson(fb);
}else{
if (StringUtils.isEmpty(addRouteVo.getStartLatitude())){
fb.setCode(0);
fb.setMessage("启运纬度不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addRouteVo.getStartLongitude())){
fb.setCode(0);
fb.setMessage("启运经度不能为空");
return gson.toJson(fb);
}
if(!addRouteVo.getStartLatitude().matches("^-?(([1-9])((\\.\\d{1,6})?)|([1-8]\\d)((\\.\\d{1,6})?)|90)$")){
fb.setCode(0);
fb.setMessage("启运纬度的范围为-90~90");
return gson.toJson(fb);
}
if(!addRouteVo.getStartLongitude().matches("^-?(([1-9]\\d?)((\\.\\d{1,6})?)|(1[1-7]\\d)((\\.\\d{1,6})?)|180)$")) {
fb.setCode(0);
fb.setMessage("启运经度的范围为-180~180");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addRouteVo.getStartCountry())){
fb.setCode(0);
fb.setMessage("启运国不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addRouteVo.getStartProvince())){
fb.setCode(0);
fb.setMessage("启运省不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addRouteVo.getStartCity())){
fb.setCode(0);
fb.setMessage("启运市不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addRouteVo.getStartAddress())){
fb.setCode(0);
fb.setMessage("启运地址不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addRouteVo.getEndLatitude())){
fb.setCode(0);
fb.setMessage("目的纬度不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addRouteVo.getEndLongitude())){
fb.setCode(0);
fb.setMessage("目的经度不能为空");
return gson.toJson(fb);
}
if(!addRouteVo.getEndLatitude().matches("^-?(([1-9])((\\.\\d{1,6})?)|([1-8]\\d)((\\.\\d{1,6})?)|90)$")){
fb.setCode(0);
fb.setMessage("目的纬度的范围为-90~90");
return gson.toJson(fb);
}
if(!addRouteVo.getEndLongitude().matches("^-?(([1-9]\\d?)((\\.\\d{1,6})?)|(1[1-7]\\d)((\\.\\d{1,6})?)|180)$")) {
fb.setCode(0);
fb.setMessage("目的经度的范围为-180~180");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addRouteVo.getEndCountry())){
fb.setCode(0);
fb.setMessage("目的国不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addRouteVo.getEndProvince())){
fb.setCode(0);
fb.setMessage("目的省不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addRouteVo.getEndCity())){
fb.setCode(0);
fb.setMessage("目的市不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addRouteVo.getEndAddress())){
fb.setCode(0);
fb.setMessage("目的地址不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addRouteVo.getTransport())){
fb.setCode(0);
fb.setMessage("运输方式不能为空");
return gson.toJson(fb);
}else if (!addRouteVo.getTransport().equals("铁路")&&!addRouteVo.getTransport().equals("汽运")&&!addRouteVo.getTransport().equals("海运")&&
!addRouteVo.getTransport().equals("空运")&&!addRouteVo.getTransport().equals("快递")){
fb.setCode(0);
fb.setMessage("请选择正确的运输方式");
return gson.toJson(fb);
}
String routeName=addRouteVo.getStartCity()+"-"+addRouteVo.getEndCity();
Date day=new Date();
SimpleDateFormat df = new SimpleDateFormat("yyyyMMdd");
String routeNumbers="RT"+df.format(day);
String abbreviation=routeName;
if (addRouteVo.getTransport().equals("汽运")){
routeNumbers=routeNumbers+"G";
abbreviation=abbreviation+"-G";
}
if (addRouteVo.getTransport().equals("铁路")){
routeNumbers=routeNumbers+"T";
abbreviation=abbreviation+"-T";
}
if (addRouteVo.getTransport().equals("空运")){
routeNumbers=routeNumbers+"K";
abbreviation=abbreviation+"-K";
}
if (addRouteVo.getTransport().equals("快递")){
routeNumbers=routeNumbers+"D";
abbreviation=abbreviation+"-D";
}
if (addRouteVo.getTransport().equals("海运")){
routeNumbers=routeNumbers+"H";
abbreviation=abbreviation+"-H";
}
String routeNumber=routeNumbers+((int)(Math.random()*(9999-1000+1))+1000);
if (routeService.getByRouteNumber(routeNumber)>0){
while (routeService.getByRouteNumber(routeNumber)>0){
routeNumber=routeNumbers+((int)(Math.random()*(9999-1000+1))+1000);
}
}
int a=routeService.addRoute(new Route(routeNumber,routeName,abbreviation,addRouteVo.getStartLongitude(),addRouteVo.getStartLatitude(),
addRouteVo.getStartCountry(),addRouteVo.getStartProvince(),addRouteVo.getStartCity(),addRouteVo.getStartAddress(),
addRouteVo.getEndLongitude(),addRouteVo.getEndLatitude(),addRouteVo.getEndCountry(),addRouteVo.getEndProvince(),
addRouteVo.getEndCity(), addRouteVo.getEndAddress(),addRouteVo.getTransport(),addRouteVo.getTransportRemark(),
System.currentTimeMillis(),System.currentTimeMillis(),addRouteVo.getRemark()));
if (a>0){
fb.setCode(1);
fb.setMessage("添加路由成功");
}else{
fb.setCode(0);
fb.setMessage("添加路由失败");
}
return gson.toJson(fb);
}
}
@ApiOperation(value = "修改路由信息",notes = "修改路由信息,都要传,路由编号是需要修改的路由编号,不能改,说明:" +
" routeNumber:路由编号," +
" routeName:路由名称," +
" abbreviation:名称缩写," +
" startLongitude:启运经度," +
" startLatitude:启运纬度," +
" startCountry: 启运国家," +
" startProvince:启运省," +
" startCity:启运市," +
" startAddress:启运地址," +
" endLongitude:目的经度," +
" endLatitude:目的纬度," +
" endCountry:目的国家," +
" endProvince:目的省," +
" endCity:目的市," +
" endAddress:目的地址," +
" transport:运输方式," +
" transportRemark:运输方式备注," +
" remark:路由备注")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
})
@RequestMapping(value="/updateRoute",method = RequestMethod.POST)
public Object updateRoute(@RequestBody UpdateRouteVo updateRouteVo,HttpServletRequest request){
String token = request.getHeader("Account_token");
String datum = tokenRedisService.get("TOKEN_" +token);
if(datum == null){
fb.setCode(0);
fb.setMessage("您没有登录,请先登录");
return gson.toJson(fb);
}else{
if (StringUtils.isEmpty(updateRouteVo.getStartLatitude())){
fb.setCode(0);
fb.setMessage("启运纬度不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateRouteVo.getStartLongitude())){
fb.setCode(0);
fb.setMessage("启运经度不能为空");
return gson.toJson(fb);
}
if(!updateRouteVo.getStartLatitude().matches("^-?(([1-9])((\\.\\d{1,6})?)|([1-8]\\d)((\\.\\d{1,6})?)|90)$")){
fb.setCode(0);
fb.setMessage("启运纬度的范围为-90~90");
return gson.toJson(fb);
}
if(!updateRouteVo.getStartLongitude().matches("^-?(([1-9]\\d?)((\\.\\d{1,6})?)|(1[1-7]\\d)((\\.\\d{1,6})?)|180)$")) {
fb.setCode(0);
fb.setMessage("启运经度的范围为-180~180");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateRouteVo.getStartCountry())){
fb.setCode(0);
fb.setMessage("启运国不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateRouteVo.getStartProvince())){
fb.setCode(0);
fb.setMessage("启运省不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateRouteVo.getStartCity())){
fb.setCode(0);
fb.setMessage("启运市不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateRouteVo.getStartAddress())){
fb.setCode(0);
fb.setMessage("启运地址不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateRouteVo.getEndLatitude())){
fb.setCode(0);
fb.setMessage("目的纬度不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateRouteVo.getEndLongitude())){
fb.setCode(0);
fb.setMessage("目的经度不能为空");
return gson.toJson(fb);
}
if(!updateRouteVo.getEndLatitude().matches("^-?(([1-9])((\\.\\d{1,6})?)|([1-8]\\d)((\\.\\d{1,6})?)|90)$")){
fb.setCode(0);
fb.setMessage("目的纬度的范围为-90~90");
return gson.toJson(fb);
}
if(!updateRouteVo.getEndLongitude().matches("^-?(([1-9]\\d?)((\\.\\d{1,6})?)|(1[1-7]\\d)((\\.\\d{1,6})?)|180)$")) {
fb.setCode(0);
fb.setMessage("目的经度的范围为-180~180");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateRouteVo.getEndCountry())){
fb.setCode(0);
fb.setMessage("目的国不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateRouteVo.getEndProvince())){
fb.setCode(0);
fb.setMessage("目的省不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateRouteVo.getEndCity())){
fb.setCode(0);
fb.setMessage("目的市不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateRouteVo.getEndAddress())){
fb.setCode(0);
fb.setMessage("目的地址不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateRouteVo.getTransport())){
fb.setCode(0);
fb.setMessage("运输方式不能为空");
return gson.toJson(fb);
}else if (!updateRouteVo.getTransport().equals("铁路")&&!updateRouteVo.getTransport().equals("汽运")&&!updateRouteVo.getTransport().equals("海运")&&
!updateRouteVo.getTransport().equals("空运")&&!updateRouteVo.getTransport().equals("快递")){
fb.setCode(0);
fb.setMessage("请选择正确的运输方式");
return gson.toJson(fb);
}
String routeName=updateRouteVo.getStartCity()+"-"+updateRouteVo.getEndCity();
String abbreviation=routeName;
if (updateRouteVo.getTransport().equals("汽运")){
abbreviation=abbreviation+"-G";
}
if (updateRouteVo.getTransport().equals("铁路")){
abbreviation=abbreviation+"-T";
}
if (updateRouteVo.getTransport().equals("空运")){
abbreviation=abbreviation+"-K";
}
if (updateRouteVo.getTransport().equals("快递")){
abbreviation=abbreviation+"-D";
}
if (updateRouteVo.getTransport().equals("海运")){
abbreviation=abbreviation+"-H";
}
int a=routeService.updateRoute(new Route(updateRouteVo.getRouteNumber(),routeName,abbreviation,updateRouteVo.getStartLongitude(),updateRouteVo.getStartLatitude(),
updateRouteVo.getStartCountry(),updateRouteVo.getStartProvince(),updateRouteVo.getStartCity(),updateRouteVo.getStartAddress(),
updateRouteVo.getEndLongitude(),updateRouteVo.getEndLatitude(),updateRouteVo.getEndCountry(),updateRouteVo.getEndProvince(),updateRouteVo.getEndCity(),
updateRouteVo.getEndAddress(),updateRouteVo.getTransport(),updateRouteVo.getTransportRemark(),System.currentTimeMillis(),updateRouteVo.getRemark()));
if (a>0){
fb.setCode(1);
fb.setMessage("修改路由成功");
}else{
fb.setCode(0);
fb.setMessage("修改路由失败");
}
return gson.toJson(fb);
}
}
//删除路由信息
@ApiOperation(value = "删除路由信息",notes = "删除路由信息,传递参数:{\"routeNumber\":\"需要删除的路由编号\"}")
@RequestMapping(value="/delRoute",method = RequestMethod.POST)
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
})
public Object delRoute(@RequestBody String routeNumber, HttpServletRequest request){
JSONObject jsonObject= JSON.parseObject(routeNumber);
routeNumber=(String)jsonObject.get("routeNumber");
String token = request.getHeader("Account_token");
String datum = tokenRedisService.get("TOKEN_" +token);
if(datum == null){
fb.setCode(0);
fb.setMessage("您没有登录,请先登录");
return gson.toJson(fb);
}else{
if (StringUtils.isEmpty(routeNumber)){
fb.setCode(0);
fb.setMessage("需要删除的路由编号不能为空");
return gson.toJson(fb);
}
int a=routeService.delRoute(routeNumber);
if (a>0){
fb.setCode(1);
fb.setMessage("删除路由信息成功");
}else{
fb.setCode(0);
fb.setMessage("删除路由信息失败");
}
}
return gson.toJson(fb);
}
}
package com.example.tdl.web;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.example.tdl.domain.dto.CommFeedback;
import com.example.tdl.domain.vo.*;
import com.example.tdl.entity.Route;
import com.example.tdl.service.RouteService;
import com.example.tdl.service.TDLDeviceService;
import com.example.tdl.service.TokenRedisService;
import com.google.gson.Gson;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import java.text.SimpleDateFormat;
import java.util.Date;
@RestController
@RequestMapping("/tdlDevice")
public class TDLDeviceController {
private Logger logger = LoggerFactory.getLogger(TDLDeviceController.class);
CommFeedback fb=new CommFeedback();
Gson gson=new Gson();
@Autowired
private TDLDeviceService tdlDeviceService=new TDLDeviceService();
@Autowired
private TokenRedisService tokenRedisService;
//查询TDL信息
@ApiOperation(value = "查询TDL信息",notes = "查询TDL信息,返回值说明:" +
" TDLName:TDL名字," +
" TDLSN:TDL序列号," +
" counts:使用次数," +
" lastTime:最后使用时间," +
" useScene:使用场景(0为空闲,1为仓库,2为运输)," +
" warehouseName:仓库名," +
" transportationNo:运输编号。" )
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
})
@RequestMapping(value="/getAll",method = RequestMethod.GET)
public Object getAll(HttpServletRequest request){
String token = request.getHeader("Account_token");
String datum = tokenRedisService.get("TOKEN_" +token);
if(datum == null){
fb.setCode(0);
fb.setMessage("您没有登录,请先登录");
return gson.toJson(fb);
}else{
return tdlDeviceService.getAll();
}
}
//根据条件查询TDL信息
@ApiOperation(value = "根据条件查询TDL信息",notes = "根据条件查询TDL信息,传值说明:" +
" TDLName:TDL名字," +
" TDLSN:TDL序列号," +
" useScene:使用场景(0为空闲,1为仓库,2为运输)。" +
"返回值说明:" +
" TDLName:TDL名字," +
" TDLSN:TDL序列号," +
" counts:使用次数," +
" lastTime:最后使用时间," +
" useScene:使用场景(0为空闲,1为仓库,2为运输)," +
" warehouseName:仓库名," +
" transportationNo:运输编号。" )
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
})
@RequestMapping(value="/getByTerm",method = RequestMethod.POST)
public Object getByTerm(@RequestBody TDLDeviceTermVo tdlDeviceTermVo,HttpServletRequest request){
String token = request.getHeader("Account_token");
String datum = tokenRedisService.get("TOKEN_" +token);
if(datum == null){
fb.setCode(0);
fb.setMessage("您没有登录,请先登录");
return gson.toJson(fb);
}else{
return tdlDeviceService.getByTerm(tdlDeviceTermVo);
}
}
//添加TDL信息
@ApiOperation(value = "添加TDL信息",notes = "添加TDL信息,传值说明:" +
" TDLName:TDL名字," +
" TDLSN:TDL序列号")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
})
@RequestMapping(value="/addTDLDevice",method = RequestMethod.POST)
public Object addTDLDevice(@RequestBody AddTDLDeviceVo addTDLDeviceVo,HttpServletRequest request){
String token = request.getHeader("Account_token");
String datum = tokenRedisService.get("TOKEN_" +token);
if(datum == null){
fb.setCode(0);
fb.setMessage("您没有登录,请先登录");
return gson.toJson(fb);
}else{
if (StringUtils.isEmpty(addTDLDeviceVo.getTDLName())){
fb.setCode(0);
fb.setMessage("TDL名称不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addTDLDeviceVo.getTDLSN())){
fb.setCode(0);
fb.setMessage("TDL序列号不能为空");
return gson.toJson(fb);
}
if (tdlDeviceService.getByTDLSN(addTDLDeviceVo.getTDLSN())!=null){
fb.setCode(0);
fb.setMessage("添加的TDL序列号已存在");
return gson.toJson(fb);
}
int a = tdlDeviceService.addTDLDevice(addTDLDeviceVo);
if (a>0){
fb.setCode(1);
fb.setMessage("添加TDL信息成功");
}else{
fb.setCode(0);
fb.setMessage("添加TDL信息失败");
}
return gson.toJson(fb);
}
}
//修改TDL信息
@ApiOperation(value = "修改TDL信息",notes = "修改TDL信息,TDLSN不能改,传值说明:" +
" TDLName:TDL名字," +
" TDLSN:需要修改的TDL序列号")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
})
@RequestMapping(value="/updateTDLDevice",method = RequestMethod.POST)
public Object updateTDLDevice(@RequestBody UpdateTDLDeviceVo updateTDLDeviceVo,HttpServletRequest request){
String token = request.getHeader("Account_token");
String datum = tokenRedisService.get("TOKEN_" +token);
if(datum == null){
fb.setCode(0);
fb.setMessage("您没有登录,请先登录");
return gson.toJson(fb);
}else{
if (StringUtils.isEmpty(updateTDLDeviceVo.getTDLName())){
fb.setCode(0);
fb.setMessage("TDL名称不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateTDLDeviceVo.getTDLSN())){
fb.setCode(0);
fb.setMessage("需要修改的TDL序列号不能为空");
return gson.toJson(fb);
}
int a = tdlDeviceService.updateTDLDevice(updateTDLDeviceVo);
if (a>0){
fb.setCode(1);
fb.setMessage("修改TDL信息成功");
}else{
fb.setCode(0);
fb.setMessage("修改TDL信息失败");
}
return gson.toJson(fb);
}
}
//删除TDL信息
@ApiOperation(value = "删除TDL信息",notes = "删除TDL信息,传值说明:" +
" TDLSN:需要删除的TDL序列号")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
})
@RequestMapping(value="/delTDLDevice",method = RequestMethod.POST)
public Object delTDLDevice(@RequestBody String TDLSN, HttpServletRequest request){
JSONObject jsonObject=JSON.parseObject(TDLSN);
TDLSN=(String)jsonObject.get("TDLSN");
String token = request.getHeader("Account_token");
String datum = tokenRedisService.get("TOKEN_" +token);
if(datum == null){
fb.setCode(0);
fb.setMessage("您没有登录,请先登录");
return gson.toJson(fb);
}else{
if (StringUtils.isEmpty(TDLSN)){
fb.setCode(0);
fb.setMessage("需要删除的TDL序列号不能为空");
return gson.toJson(fb);
}
int a = tdlDeviceService.delTDLDevice(TDLSN);
if (a>0){
fb.setCode(1);
fb.setMessage("删除TDL信息成功");
}else{
fb.setCode(0);
fb.setMessage("删除TDL信息失败");
}
return gson.toJson(fb);
}
}
}
package com.example.tdl.web;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.example.tdl.domain.dto.CommFeedback;
import com.example.tdl.domain.vo.*;
import com.example.tdl.service.RoleHasPermissionService;
import com.example.tdl.service.TokenRedisService;
import com.example.tdl.service.UserService;
import com.google.gson.Gson;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
@RestController
@RequestMapping("/user")
public class UserController {
private Logger logger = LoggerFactory.getLogger(UserController.class);
private CommFeedback fb = new CommFeedback();
private Gson gson = new Gson();
@Autowired
private UserService userService;
@Autowired
private RoleHasPermissionService roleHasPermissionService;
@Autowired
private TokenRedisService tokenRedisService;
//获取所有用户信息
@ApiOperation(value = "获取所有用户信息",notes = "获取所有用户信息")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
})
@RequestMapping(value="/getAll",method = RequestMethod.GET)
public Object getAll(HttpServletRequest request){
String token = request.getHeader("Account_token");
String datum = tokenRedisService.get("TOKEN_" +token);
UserRedisVo user = gson.fromJson(datum,UserRedisVo.class);
if(datum == null){
fb.setCode(0);
fb.setMessage("您没有登录,请先登录");
return gson.toJson(fb);
}
List<String> permission=roleHasPermissionService.getByRoleName(user.getRoleName());
if (!permission.contains("用户列表")){
fb.setCode(0);
fb.setMessage("对不起,您没有此权限");
return gson.toJson(fb);
}else{
return userService.getAll();
}
}
//根据条件查询
@ApiOperation(value = "根据条件查询",notes = "根据条件查询")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
})
@RequestMapping(value="/getByTerm",method = RequestMethod.POST)
public Object getByTerm(@RequestBody UserTermVo userTermVo,HttpServletRequest request){
String token = request.getHeader("Account_token");
String datum = tokenRedisService.get("TOKEN_" +token);
UserRedisVo user = gson.fromJson(datum,UserRedisVo.class);
if(datum == null){
fb.setCode(0);
fb.setMessage("您没有登录,请先登录");
return gson.toJson(fb);
}
List<String> permission=roleHasPermissionService.getByRoleName(user.getRoleName());
if (!permission.contains("用户列表")){
fb.setCode(0);
fb.setMessage("对不起,您没有此权限");
return gson.toJson(fb);
}else{
return userService.getByTerm(userTermVo);
}
}
//新增用户
@ApiOperation(value = "新增用户",notes = "新增用户都要传:" +
" userName:用户名," +
" password:密码," +
" nickName:昵称," +
" phone:电话," +
" email:邮件," +
" roleName:角色名")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
})
@RequestMapping(value="/addUser",method = RequestMethod.POST)
public Object addUser(@RequestBody AddUserVo userVo,HttpServletRequest request){
String token = request.getHeader("Account_token");
String datum = tokenRedisService.get("TOKEN_" +token);
UserRedisVo user = gson.fromJson(datum,UserRedisVo.class);
if(datum == null){
fb.setCode(0);
fb.setMessage("您没有登录,请先登录");
return gson.toJson(fb);
}
List<String> permission=roleHasPermissionService.getByRoleName(user.getRoleName());
if (!permission.contains("用户列表")){
fb.setCode(0);
fb.setMessage("对不起,您没有此权限");
return gson.toJson(fb);
}else{
if (userVo.getUserName().equals("")||userVo.getUserName()==null){
fb.setCode(0);
fb.setMessage("用户名不能为空");
}
if (!userVo.getUserName().matches("^[a-zA-Z][a-zA-Z0-9_]{5,19}$")) {
fb.setCode(0);
fb.setMessage("用户名以字母开头,可包含数字和_,6-20个字符");
return gson.toJson(fb);
}
if(userService.getByUserName(userVo.getUserName()) !=null){
fb.setCode(0);
fb.setMessage("用户名已被占用");
return gson.toJson(fb);
}
if(StringUtils.isEmpty(userVo.getPassword())){
fb.setCode(0);
fb.setMessage("密码不能为空");
return gson.toJson(fb);
}
if(!userVo.getPassword().matches("^[a-zA-Z\\d_]{6,20}$")){
fb.setCode(0);
fb.setMessage("密码必须是6-20位的数字、字母和_");
return gson.toJson(fb);
}
if (userVo.getNickName()==null||userVo.getNickName().equals("")){
fb.setCode(0);
fb.setMessage("昵称不能为空");
return gson.toJson(fb);
}
if(userVo.getPhone() ==null || userVo.getPhone().equals("")){
fb.setCode(0);
fb.setMessage("电话不能为空");
return gson.toJson(fb);
}
if( !userVo.getPhone().matches("^1[34578]\\d{9}$")){
fb.setCode(0);
fb.setMessage("手机号不规范");
return gson.toJson(fb);
}
if ((userService.getByPhone(userVo.getPhone()))!=null){
fb.setCode(0);
fb.setMessage("该手机号已被注册");
return gson.toJson(fb);
}
if(userVo.getEmail() ==null || userVo.getEmail().equals("")){
fb.setCode(0);
fb.setMessage("邮箱不能为空");
return gson.toJson(fb);
}
if( !userVo.getEmail().matches("\\w+(\\.\\w*)*@\\w+(\\.\\w{2,3}){1,3}")){
fb.setCode(0);
fb.setMessage("邮箱格式不规范");
return gson.toJson(fb);
}
if ((userService.getByEmail(userVo.getEmail()))!=null){
fb.setCode(0);
fb.setMessage("该邮箱已被注册");
return gson.toJson(fb);
}
if (userVo.getRoleName().equals("")||userVo.getRoleName()==null){
fb.setCode(0);
fb.setMessage("角色名不能为空");
return gson.toJson(fb);
}
int a=userService.addUser(userVo);
if (a>0){
fb.setCode(1);
fb.setMessage("添加用户成功");
}else{
fb.setCode(0);
fb.setMessage("添加用户失败");
}
}
return gson.toJson(fb);
}
//修改用户
@ApiOperation(value = "修改用户",notes = "修改用户都要传" +
" userNumber:用户编号," +
" nickName:昵称," +
" phone:电话," +
" email:邮件," +
" roleName:角色名")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
})
@RequestMapping(value="/updateUser",method = RequestMethod.POST)
public Object updateUser(@RequestBody UpdateUserVo userVo,HttpServletRequest request){
String token = request.getHeader("Account_token");
String datum = tokenRedisService.get("TOKEN_" +token);
UserRedisVo user = gson.fromJson(datum,UserRedisVo.class);
if(datum == null){
fb.setCode(0);
fb.setMessage("您没有登录,请先登录");
return gson.toJson(fb);
}
List<String> permission=roleHasPermissionService.getByRoleName(user.getRoleName());
if (!permission.contains("用户列表")){
fb.setCode(0);
fb.setMessage("对不起,您没有此权限");
return gson.toJson(fb);
}else{
ResultUserVo userInfo=userService.getByUserNumber(user.getUserNumber());
// if (userVo.getUserName().equals("")||userVo.getUserName()==null){
// fb.setCode(0);
// fb.setMessage("用户名不能为空");
// }
// if (!userVo.getUserName().matches("^[a-zA-Z][a-zA-Z0-9_]{5,19}$")) {
// fb.setCode(0);
// fb.setMessage("用户名以字母开头,可包含数字和_,6-20个字符");
// return gson.toJson(fb);
// }
// if( userInfo!=null&&!userInfo.getUserName().equals(userVo.getUserName())){
// fb.setCode(0);
// fb.setMessage("用户名已被占用");
// return gson.toJson(fb);
// }
// if(StringUtils.isEmpty(userVo.getPassword())){
// fb.setCode(0);
// fb.setMessage("密码不能为空");
// return gson.toJson(fb);
// }
// if(!userVo.getPassword().matches("^[a-zA-Z\\d_]{6,20}$")){
// fb.setCode(0);
// fb.setMessage("密码必须是6-20位的数字、字母和_");
// return gson.toJson(fb);
// }
if (userVo.getNickName()==null||userVo.getNickName().equals("")){
fb.setCode(0);
fb.setMessage("昵称不能为空");
return gson.toJson(fb);
}
if(userVo.getPhone() ==null || userVo.getPhone().equals("")){
fb.setCode(0);
fb.setMessage("电话不能为空");
return gson.toJson(fb);
}
if( !userVo.getPhone().matches("^1[34578]\\d{9}$")){
fb.setCode(0);
fb.setMessage("手机号不规范");
return gson.toJson(fb);
}
if (userInfo!=null&&userInfo.getPhone().equals(userVo.getPhone())){
fb.setCode(0);
fb.setMessage("该手机号已被注册");
return gson.toJson(fb);
}
if(userVo.getEmail() ==null || userVo.getEmail().equals("")){
fb.setCode(0);
fb.setMessage("邮箱不能为空");
return gson.toJson(fb);
}
if( !userVo.getEmail().matches("\\w+(\\.\\w*)*@\\w+(\\.\\w{2,3}){1,3}")){
fb.setCode(0);
fb.setMessage("邮箱格式不规范");
return gson.toJson(fb);
}
if (userInfo!=null&&userInfo.getEmail().equals(userVo.getEmail())){
fb.setCode(0);
fb.setMessage("该邮箱已被注册");
return gson.toJson(fb);
}
if (userVo.getRoleName().equals("")||userVo.getRoleName()==null){
fb.setCode(0);
fb.setMessage("角色名不能为空");
return gson.toJson(fb);
}
if (userVo.getUserNumber()==null||userVo.getUserNumber().equals("")){
fb.setCode(0);
fb.setMessage("需要修改的用户编号不能为空");
return gson.toJson(fb);
}
int a=userService.updateUser(userVo);
if (a>0){
fb.setCode(1);
fb.setMessage("修改用户成功");
}else{
fb.setCode(0);
fb.setMessage("修改用户失败");
}
}
return gson.toJson(fb);
}
//删除用户
@ApiOperation(value = "删除用户",notes = "删除用户")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
})
@RequestMapping(value="/delUser",method = RequestMethod.POST)
public Object delUser(@RequestBody String userNumber,HttpServletRequest request){
JSONObject jsonObject= JSON.parseObject(userNumber);
userNumber=jsonObject.getString("userNumber");
String token = request.getHeader("Account_token");
String datum = tokenRedisService.get("TOKEN_" +token);
UserRedisVo user = gson.fromJson(datum,UserRedisVo.class);
if(datum == null){
fb.setCode(0);
fb.setMessage("您没有登录,请先登录");
return gson.toJson(fb);
}
List<String> permission=roleHasPermissionService.getByRoleName(user.getRoleName());
if (!permission.contains("用户列表")){
fb.setCode(0);
fb.setMessage("对不起,您没有此权限");
return gson.toJson(fb);
}else{
int a = userService.delUser(userNumber);
if (a>0){
fb.setCode(0);
fb.setMessage("删除用户成功");
}else{
fb.setCode(0);
fb.setMessage("删除用户失败");
}
return gson.toJson(fb);
}
}
//重置密码
@ApiOperation(value = "重置密码",notes = "重置密码")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
})
@RequestMapping(value="/resetPassword",method = RequestMethod.POST)
public Object resetPassword(@RequestBody String userNumber, HttpServletRequest request){
JSONObject jsonObject= JSON.parseObject(userNumber);
userNumber=jsonObject.getString("userNumber");
String token = request.getHeader("Account_token");
String datum = tokenRedisService.get("TOKEN_" +token);
UserRedisVo user = gson.fromJson(datum,UserRedisVo.class);
if(datum == null){
fb.setCode(0);
fb.setMessage("您没有登录,请先登录");
return gson.toJson(fb);
}
List<String> permission=roleHasPermissionService.getByRoleName(user.getRoleName());
if (!permission.contains("用户列表")){
fb.setCode(0);
fb.setMessage("对不起,您没有此权限");
return gson.toJson(fb);
}else{
String pwd=DigestUtils.sha256Hex("Witium123");
int a = userService.resetPassword(userNumber,pwd);
if (a>0){
fb.setCode(0);
fb.setMessage("重置密码成功");
}else{
fb.setCode(0);
fb.setMessage("重置密码失败");
}
return gson.toJson(fb);
}
}
}
package com.example.tdl.web;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.example.tdl.domain.dto.CommFeedback;
import com.example.tdl.domain.vo.*;
import com.example.tdl.entity.Warehouse;
import com.example.tdl.service.RoleService;
import com.example.tdl.service.TokenRedisService;
import com.example.tdl.service.WarehouseService;
import com.google.gson.Gson;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.SecurityUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
@RestController
@RequestMapping("/warehouse")
public class WarehouseController {
private Logger logger = LoggerFactory.getLogger(WarehouseController.class);
CommFeedback fb=new CommFeedback();
Gson gson=new Gson();
@Autowired
private WarehouseService warehouseService=new WarehouseService();
@Autowired
private TokenRedisService tokenRedisService;
//查询所有仓库信息
@ApiOperation(value = "查询所有仓库信息",notes = "查询所有仓库信息,返回值说明:" +
" warehouseName:仓库名," +
" warehouseNo:仓库编号," +
" country:国家," +
" province:省," +
" city:市," +
" district:区," +
" address:具体地址," +
" regionCN:区域中文," +
" regionEN:区域英文," +
" longitude:经度," +
" latitude:纬度," +
" property:属性," +
" type:类型," +
" alarmType:预警类型," +
" alarmScene:预警场景," +
" hardwareLevel:硬件等级," +
" areaIndoor:室内平面面积," +
" areaRack:货架面积," +
" areaOutdoor:室外面积," +
" areaPlanIndoor:实际室内总面积," +
" office:办事处," +
" timeZone:时区," +
" weatherInfo:区域气象信息," +
" warehouseInfo:基础描述," +
" remark:备注")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
})
@RequestMapping(value="/getAll",method = RequestMethod.GET)
public Object getAll(HttpServletRequest request){
String token = request.getHeader("Account_token");
String datum = tokenRedisService.get("TOKEN_" +token);
if(datum == null){
fb.setCode(0);
fb.setMessage("您没有登录,请先登录");
return gson.toJson(fb);
}else{
return warehouseService.getAll();
}
}
//根据条件查询仓库信息
@ApiOperation(value = "根据条件查询仓库信息",notes = "根据条件查询仓库信息,传值说明:" +
" warehouseName:仓库名," +
" country:国家," +
" province:省," +
" city:市," +
" property:属性," +
" type:,仓库类型" +
" hardwareLevel:硬件等级。" +
"返回值说明:" +
" warehouseName:仓库名," +
" warehouseNo:仓库编号," +
" country:国家," +
" province:省," +
" city:市," +
" district:区," +
" address:具体地址," +
" regionCN:区域中文," +
" regionEN:区域英文," +
" longitude:经度," +
" latitude:纬度," +
" property:属性," +
" type:类型," +
" alarmType:预警类型," +
" alarmScene:预警场景," +
" hardwareLevel:硬件等级," +
" areaIndoor:室内平面面积," +
" areaRack:货架面积," +
" areaOutdoor:室外面积," +
" areaPlanIndoor:实际室内总面积," +
" office:办事处," +
" timeZone:时区," +
" weatherInfo:区域气象信息," +
" warehouseInfo:基础描述," +
" remark:备注")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
})
@RequestMapping(value="/getAllByTerm",method = RequestMethod.POST)
public Object getAllByTerm(@RequestBody WarehouseTermVo warehouseTermVo,HttpServletRequest request){
String token = request.getHeader("Account_token");
String datum = tokenRedisService.get("TOKEN_" +token);
if(datum == null){
fb.setCode(0);
fb.setMessage("您没有登录,请先登录");
return gson.toJson(fb);
}else{
return warehouseService.getAllByTerm(warehouseTermVo);
}
}
//添加仓库信息
@ApiOperation(value = "添加仓库信息",notes = "添加仓库信息,传值说明:" +
" warehouseName:仓库名," +
" country:国家," +
" province:省," +
" city:市," +
" district:区," +
" address:具体地址," +
" regionCN:区域中文," +
" regionEN:区域英文," +
" longitude:经度," +
" latitude:纬度," +
" property:属性," +
" type:类型," +
" alarmType:预警类型," +
" hardwareLevel:硬件等级," +
" areaIndoor:室内平面面积," +
" areaRack:货架面积," +
" areaOutdoor:室外面积," +
" areaPlanIndoor:实际室内总面积," +
" office:办事处," +
" timeZone:时区," +
" weatherInfo:区域气象信息," +
" warehouseInfo:基础描述," +
" remark:备注")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
})
@RequestMapping(value="/addWarehouse",method = RequestMethod.POST)
public Object addWarehouse(@RequestBody AddWarehouseVo addWarehouseVo,HttpServletRequest request){
String token = request.getHeader("Account_token");
String datum = tokenRedisService.get("TOKEN_" +token);
if(datum == null){
fb.setCode(0);
fb.setMessage("您没有登录,请先登录");
return gson.toJson(fb);
}else{
if (StringUtils.isEmpty(addWarehouseVo.getWarehouseName())){
fb.setCode(0);
fb.setMessage("仓库名不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addWarehouseVo.getCountry())){
fb.setCode(0);
fb.setMessage("国家不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addWarehouseVo.getProvince())){
fb.setCode(0);
fb.setMessage("省不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addWarehouseVo.getCity())){
fb.setCode(0);
fb.setMessage("市不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addWarehouseVo.getDistrict())){
fb.setCode(0);
fb.setMessage("区不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addWarehouseVo.getAddress())){
fb.setCode(0);
fb.setMessage("具体地址不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addWarehouseVo.getRegionCN())){
fb.setCode(0);
fb.setMessage("区域中文不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addWarehouseVo.getRegionEN())){
fb.setCode(0);
fb.setMessage("区域英文不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addWarehouseVo.getLatitude())){
fb.setCode(0);
fb.setMessage("纬度不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addWarehouseVo.getLongitude())){
fb.setCode(0);
fb.setMessage("经度不能为空");
return gson.toJson(fb);
}
if(!addWarehouseVo.getLatitude().matches("^-?(([1-9])((\\.\\d{1,6})?)|([1-8]\\d)((\\.\\d{1,6})?)|90)$")){
fb.setCode(0);
fb.setMessage("纬度的范围为-90~90");
return gson.toJson(fb);
}
if(!addWarehouseVo.getLongitude().matches("^-?(([1-9]\\d?)((\\.\\d{1,6})?)|(1[1-7]\\d)((\\.\\d{1,6})?)|180)$")) {
fb.setCode(0);
fb.setMessage("经度的范围为-180~180");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addWarehouseVo.getProperty())){
fb.setCode(0);
fb.setMessage("属性不能为空");
return gson.toJson(fb);
}else if (!addWarehouseVo.getProperty().equals("供应中心")&&!addWarehouseVo.getProperty().equals("项目仓")&&
!addWarehouseVo.getProperty().equals("中心仓")&&!addWarehouseVo.getProperty().equals("X-dock")){
fb.setCode(0);
fb.setMessage("请输入正确的属性");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addWarehouseVo.getType())){
fb.setCode(0);
fb.setMessage("类型不能为空");
return gson.toJson(fb);
}else if (!addWarehouseVo.getType().equals("平面仓")&&!addWarehouseVo.getType().equals("立体仓")){
fb.setCode(0);
fb.setMessage("请输入正确的仓库类型");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addWarehouseVo.getAlarmType())){
fb.setCode(0);
fb.setMessage("预警类型不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addWarehouseVo.getHardwareLevel())){
fb.setCode(0);
fb.setMessage("硬件等级不能为空");
return gson.toJson(fb);
}else if (!addWarehouseVo.getHardwareLevel().equals("好")&&!addWarehouseVo.getHardwareLevel().equals("一般")&&
!addWarehouseVo.getHardwareLevel().equals("较差")&&!addWarehouseVo.getHardwareLevel().equals("极差")){
fb.setCode(0);
fb.setMessage("请选择正确的硬件等级");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addWarehouseVo.getAreaIndoor()+"")){
fb.setCode(0);
fb.setMessage("室内平面面积不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addWarehouseVo.getAreaRack()+"")){
fb.setCode(0);
fb.setMessage("货架面积不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addWarehouseVo.getAreaOutdoor()+"")){
fb.setCode(0);
fb.setMessage("室外面积不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addWarehouseVo.getAreaPlanIndoor()+"")){
fb.setCode(0);
fb.setMessage("实际室内总面积不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addWarehouseVo.getOffice())){
fb.setCode(0);
fb.setMessage("办事处不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addWarehouseVo.getTimeZone()+"")){
fb.setCode(0);
fb.setMessage("时区不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addWarehouseVo.getWeatherInfo())){
fb.setCode(0);
fb.setMessage("区域气象信息不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(addWarehouseVo.getWarehouseInfo())){
fb.setCode(0);
fb.setMessage("基础描述不能为空");
return gson.toJson(fb);
}
if (warehouseService.getByWarehouseName(addWarehouseVo.getWarehouseName())!=null){
fb.setCode(0);
fb.setMessage("仓库名不能重复");
return gson.toJson(fb);
}
int a = warehouseService.addWarehouse(new Warehouse(addWarehouseVo.getWarehouseName(),String.valueOf(System.currentTimeMillis()),
addWarehouseVo.getCountry(),addWarehouseVo.getProvince(),addWarehouseVo.getCity(),addWarehouseVo.getDistrict(),
addWarehouseVo.getAddress(),addWarehouseVo.getRegionCN(),addWarehouseVo.getRegionEN(),addWarehouseVo.getLongitude(),
addWarehouseVo.getLatitude(),addWarehouseVo.getProperty(),addWarehouseVo.getType(),addWarehouseVo.getAlarmType(),
addWarehouseVo.getHardwareLevel(),addWarehouseVo.getAreaIndoor(),addWarehouseVo.getAreaRack(),addWarehouseVo.getAreaOutdoor(),
addWarehouseVo.getAreaPlanIndoor(),addWarehouseVo.getOffice(),addWarehouseVo.getTimeZone(),addWarehouseVo.getWeatherInfo(),
addWarehouseVo.getWarehouseInfo(),System.currentTimeMillis(),System.currentTimeMillis(),addWarehouseVo.getRemark()));
if (a>0){
fb.setCode(1);
fb.setMessage("添加仓库信息成功");
}else {
fb.setCode(0);
fb.setMessage("添加仓库信息失败");
}
return gson.toJson(fb);
}
}
//根据仓库编号修改仓库信息
@ApiOperation(value = "根据仓库编号修改仓库信息",notes = "根据仓库编号修改仓库信息,updatTime不用传,传值说明:" +
" warehouseNo:需要修改的仓库编号," +
" warehouseName:仓库名," +
" country:国家," +
" province:省," +
" city:市," +
" district:区," +
" address:具体地址," +
" regionCN:区域中文," +
" regionEN:区域英文," +
" longitude:经度," +
" latitude:纬度," +
" property:属性," +
" type:类型," +
" alarmType:预警类型," +
" hardwareLevel:硬件等级," +
" areaIndoor:室内平面面积," +
" areaRack:货架面积," +
" areaOutdoor:室外面积," +
" areaPlanIndoor:实际室内总面积," +
" office:办事处," +
" timeZone:时区," +
" weatherInfo:区域气象信息," +
" warehouseInfo:基础描述," +
" remark:备注")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
})
@RequestMapping(value="/updateWarehouse",method = RequestMethod.POST)
public Object updateWarehouse(@RequestBody UpdateWarehouseVo updateWarehouseVo,HttpServletRequest request){
String token = request.getHeader("Account_token");
String datum = tokenRedisService.get("TOKEN_" +token);
if(datum == null){
fb.setCode(0);
fb.setMessage("您没有登录,请先登录");
return gson.toJson(fb);
}else{
if (StringUtils.isEmpty(updateWarehouseVo.getWarehouseNo())){
fb.setCode(0);
fb.setMessage("需要修改的仓库编号不能为空");
}
if (StringUtils.isEmpty(updateWarehouseVo.getWarehouseName())){
fb.setCode(0);
fb.setMessage("仓库名不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateWarehouseVo.getCountry())){
fb.setCode(0);
fb.setMessage("国家不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateWarehouseVo.getProvince())){
fb.setCode(0);
fb.setMessage("省不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateWarehouseVo.getCity())){
fb.setCode(0);
fb.setMessage("市不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateWarehouseVo.getDistrict())){
fb.setCode(0);
fb.setMessage("区不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateWarehouseVo.getAddress())){
fb.setCode(0);
fb.setMessage("具体地址不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateWarehouseVo.getRegionCN())){
fb.setCode(0);
fb.setMessage("区域中文不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateWarehouseVo.getRegionEN())){
fb.setCode(0);
fb.setMessage("区域英文不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateWarehouseVo.getLatitude())){
fb.setCode(0);
fb.setMessage("纬度不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateWarehouseVo.getLongitude())){
fb.setCode(0);
fb.setMessage("经度不能为空");
return gson.toJson(fb);
}
if(!updateWarehouseVo.getLatitude().matches("^-?(([1-9])((\\.\\d{1,6})?)|([1-8]\\d)((\\.\\d{1,6})?)|90)$")){
fb.setCode(0);
fb.setMessage("纬度的范围为-90~90");
return gson.toJson(fb);
}
if(!updateWarehouseVo.getLongitude().matches("^-?(([1-9]\\d?)((\\.\\d{1,6})?)|(1[1-7]\\d)((\\.\\d{1,6})?)|180)$")) {
fb.setCode(0);
fb.setMessage("经度的范围为-180~180");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateWarehouseVo.getProperty())){
fb.setCode(0);
fb.setMessage("属性不能为空");
return gson.toJson(fb);
}else if (!updateWarehouseVo.getProperty().equals("供应中心")&&!updateWarehouseVo.getProperty().equals("项目仓")&&
!updateWarehouseVo.getProperty().equals("中心仓")&&!updateWarehouseVo.getProperty().equals("X-dock")){
fb.setCode(0);
fb.setMessage("请输入正确的属性");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateWarehouseVo.getType())){
fb.setCode(0);
fb.setMessage("类型不能为空");
return gson.toJson(fb);
}else if (!updateWarehouseVo.getType().equals("平面仓")&&!updateWarehouseVo.getType().equals("立体仓")){
fb.setCode(0);
fb.setMessage("请输入正确的仓库类型");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateWarehouseVo.getAlarmType())){
fb.setCode(0);
fb.setMessage("预警类型不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateWarehouseVo.getHardwareLevel())){
fb.setCode(0);
fb.setMessage("硬件等级不能为空");
return gson.toJson(fb);
}else if (!updateWarehouseVo.getHardwareLevel().equals("好")&&!updateWarehouseVo.getHardwareLevel().equals("一般")&&
!updateWarehouseVo.getHardwareLevel().equals("较差")&&!updateWarehouseVo.getHardwareLevel().equals("极差")){
fb.setCode(0);
fb.setMessage("请选择正确的硬件等级");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateWarehouseVo.getAreaIndoor()+"")){
fb.setCode(0);
fb.setMessage("室内平面面积不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateWarehouseVo.getAreaRack()+"")){
fb.setCode(0);
fb.setMessage("货架面积不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateWarehouseVo.getAreaOutdoor()+"")){
fb.setCode(0);
fb.setMessage("室外面积不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateWarehouseVo.getAreaPlanIndoor()+"")){
fb.setCode(0);
fb.setMessage("实际室内总面积不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateWarehouseVo.getOffice())){
fb.setCode(0);
fb.setMessage("办事处不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateWarehouseVo.getTimeZone()+"")){
fb.setCode(0);
fb.setMessage("时区不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateWarehouseVo.getWeatherInfo())){
fb.setCode(0);
fb.setMessage("区域气象信息不能为空");
return gson.toJson(fb);
}
if (StringUtils.isEmpty(updateWarehouseVo.getWarehouseInfo())){
fb.setCode(0);
fb.setMessage("基础描述不能为空");
return gson.toJson(fb);
}
ResultWarehouseVo resultWarehouseVo=warehouseService.getByWarehouseName(updateWarehouseVo.getWarehouseName());
if (resultWarehouseVo!=null&&!resultWarehouseVo.getWarehouseNo().equals(updateWarehouseVo.getWarehouseNo())){
fb.setCode(0);
fb.setMessage("修改的仓库名已存在");
return gson.toJson(fb);
}
updateWarehouseVo.setUpdateTime(System.currentTimeMillis());
int a = warehouseService.updateWarehouse(updateWarehouseVo);
if (a>0){
fb.setCode(1);
fb.setMessage("修改仓库信息成功");
}else {
fb.setCode(0);
fb.setMessage("修改仓库信息失败");
}
return gson.toJson(fb);
}
}
//删除仓库信息
@ApiOperation(value = "删除仓库信息",notes = "删除仓库信息,只用传需要删除的仓库编号")
@ApiImplicitParams({
@ApiImplicitParam(paramType="header", name = "Account_token", value = "token", required = true, dataType = "String"),
})
@RequestMapping(value="/delWarehouse",method = RequestMethod.POST)
public Object delWarehouse(@RequestBody String warehouseNo, HttpServletRequest request){
JSONObject jsonObject= JSON.parseObject(warehouseNo);
warehouseNo=(String)jsonObject.get("warehouseNo");
String token = request.getHeader("Account_token");
String datum = tokenRedisService.get("TOKEN_" +token);
if(datum == null){
fb.setCode(0);
fb.setMessage("您没有登录,请先登录");
return gson.toJson(fb);
}else{
if (StringUtils.isEmpty(warehouseNo)){
fb.setCode(0);
fb.setMessage("需要删除的仓库编号不能为空");
return gson.toJson(fb);
}
int a = warehouseService.delWarehouse(warehouseNo);
if (a>0){
fb.setCode(1);
fb.setMessage("删除仓库信息成功");
}else {
fb.setCode(0);
fb.setMessage("删除仓库信息失败");
}
return gson.toJson(fb);
}
}
}
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/cy?useUnicode=true&characterEncoding=utf-8&useSSL=false
spring.datasource.username=root
spring.datasource.password=root
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
server.port=8092
management.security.enabled=false
mybatis.type-aliases-package=com.example.demo.entity
mybatis.config-location=classpath:mybatis-config.xml
# Redis服务器地址
spring.redis.host=127.0.0.1
#spring.redis.host=120.27.235.39
# Redis数据库索引(默认为0)
spring.redis.database=0
# Redis服务器连接端口
spring.redis.port=6379
# Redis服务器连接密码(默认为空)
spring.redis.password=
# 连接池最大连接数(使用负值表示没有限制)
spring.redis.pool.max-active=8
# 连接池最大阻塞等待时间(使用负值表示没有限制)
spring.redis.pool.max-wait=-1
# 连接池中的最大空闲连接
spring.redis.pool.max-idle=8
# 连接池中的最小空闲连接
spring.redis.pool.min-idle=0
# 连接超时时间(毫秒)
spring.redis.timeout=0
# Logging
logging.config=classpath:logback.xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="60 seconds" debug="false">
<contextName>logback</contextName>
<property name="log.path" value="logback.log" />
<!--输出到控制台-->
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<!--输出到文件-->
<appender name="file" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.path}</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>logback.%d{yyyy-MM-dd}.log</fileNamePattern>
</rollingPolicy>
<encoder>
<pattern>%d{HH:mm:ss.SSS} %contextName [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<root level="INFO">
<appender-ref ref="console" />
<appender-ref ref="file" />
</root>
<!--<logger name="com.adc.disasterforecast" level="INFO" additivity="false">-->
<!--<appender-ref ref="console"/>-->
<!--</logger>-->
</configuration>
\ No newline at end of file
<?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.example.tdl.mapper.AlarmMapper">
<!--查询所有预警信息-->
<select id="getAll" resultType="com.example.tdl.domain.vo.ResultAlarmVo">
SELECT alarmType,alarmScene,temMax,temMin,humidityMax,humidityMin,tilt,shock,remark from alarm
</select>
<!--根据预警类型模糊查询-->
<select id="getAllByAlarmType" resultType="com.example.tdl.domain.vo.ResultAlarmVo" parameterType="String">
SELECT alarmType,alarmScene,temMax,temMin,humidityMax,humidityMin,tilt,shock,remark from alarm
WHERE alarmType LIKE CONCAT(CONCAT('%',#{alarmType,jdbcType=VARCHAR}), '%')
</select>
<!--添加预警信息-->
<insert id="addAlarm" parameterType="com.example.tdl.domain.vo.AddAlarmVo">
INSERT INTO alarm VALUES (
NULL ,
#{alarmType,jdbcType=VARCHAR},
#{alarmScene,jdbcType=VARCHAR},
#{temMax,jdbcType=FLOAT},
#{temMin,jdbcType=FLOAT},
#{humidityMax,jdbcType=FLOAT},
#{humidityMin,jdbcType=FLOAT},
#{tilt,jdbcType=FLOAT},
#{shock,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR}
)
</insert>
<!--修改预警信息-->
<update id="updateAlarm" parameterType="com.example.tdl.domain.vo.UpdateAlarmVo">
UPDATE alarm SET
alarmType=#{alarmType,jdbcType=VARCHAR},
alarmScene=#{alarmScene,jdbcType=VARCHAR},
temMax=#{temMax,jdbcType=FLOAT},
temMin=#{temMin,jdbcType=FLOAT},
humidityMax=#{humidityMax,jdbcType=FLOAT},
humidityMin=#{humidityMin,jdbcType=FLOAT},
tilt=#{tilt,jdbcType=FLOAT},
shock=#{shock,jdbcType=VARCHAR},
remark=#{remark,jdbcType=VARCHAR}
WHERE alarmType=#{oldAlarmType,jdbcType=VARCHAR}
AND alarmScene=#{oldAlarmScene,jdbcType=VARCHAR}
</update>
<!--删除预警信息-->
<delete id="delAlarm" parameterType="com.example.tdl.domain.vo.DelAlarmVo">
DELETE from alarm WHERE alarmType=#{alarmType,jdbcType=VARCHAR} AND alarmScene=#{alarmScene,jdbcType=VARCHAR}
</delete>
<!--根据预警类型和预警场景查询-->
<select id="getByTypeAndScene" parameterType="String" resultType="com.example.tdl.domain.vo.ResultAlarmVo">
SELECT alarmType,alarmScene,temMax,temMin,humidityMax,humidityMin,tilt,shock,remark from alarm
WHERE alarmType=#{alarmType,jdbcType=VARCHAR} AND alarmScene=#{alarmScene,jdbcType=VARCHAR}
</select>
<!--查询仓库的预警类型-->
<select id="getForWarehouse" resultType="String">
SELECT alarmType from alarm WHERE alarmScene="仓库"
</select>
</mapper>
\ No newline at end of file
<?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.example.tdl.mapper.LoginLogMapper">
<select id="getAll" resultType="com.example.tdl.domain.vo.ResultLoginLogVo">
SELECT userName,from_unixtime((createTime/1000),'%Y-%m-%d %T') createTime,inet_ntoa(ipAddress) ipAddress from login_log
</select>
<insert id="addLoginLog" parameterType="com.example.tdl.entity.LoginLog">
INSERT into login_log VALUES (
null,
#{userName,jdbcType=VARCHAR},
#{createTime,jdbcType=BIGINT},
inet_aton(#{ipAddress,jdbcType=VARCHAR})
)
</insert>
<select id="getByTime" resultType="com.example.tdl.domain.vo.ResultLoginLogVo" parameterType="com.example.tdl.domain.vo.LoginLogTermVo">
SELECT userName,from_unixtime((createTime/1000),'%Y-%m-%d %T') createTime,inet_ntoa(ipAddress) ipAddress
from login_log WHERE createTime BETWEEN #{startTime,jdbcType=BIGINT}
AND #{stopTime,jdbcType=BIGINT} ORDER BY createTime DESC
</select>
</mapper>
\ No newline at end of file
<?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.example.tdl.mapper.PermissionMapper">
<!--查询所有权限信息-->
<select id="getAll" resultType="com.example.tdl.domain.vo.PermissionVo">
SELECT permissionName,(SELECT permissionName from permission WHERE p.pid=id) pName,remark
from permission p WHERE pid is NOT NULL
</select>
</mapper>
\ No newline at end of file
<?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.example.tdl.mapper.RoleHasPermissionMapper">
<!--查询所有权限信息-->
<select id="getByRoleName" resultType="String" parameterType="String">
SELECT p.permissionName from role_has_permission rp,role r,permission p
WHERE rp.role_id=r.id
AND rp.permission_id=p.id
AND r.roleName=#{roleName.jdbcType=VARCHAR}
</select>
</mapper>
\ No newline at end of file
<?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.example.tdl.mapper.RoleMapper">
<!--查询所有角色名-->
<select id="getAllRoleName" resultType="String">
SELECT roleName from role;
</select>
</mapper>
\ No newline at end of file
<?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.example.tdl.mapper.RouteMapper">
<!--查询所有路由信息-->
<select id="getAll" resultType="com.example.tdl.domain.vo.ResultRouteVo">
SELECT routeNumber,routeName,abbreviation,startLongitude,startLatitude,startCountry,startProvince,startCity,startAddress,
endLongitude,endLatitude,endCountry,endProvince,endCity,endAddress,transport,transportRemark,remark FROM route
</select>
<!--根据条件查询路由信息-->
<select id="getRouteByTerm" resultType="com.example.tdl.domain.vo.ResultRouteVo" parameterType="com.example.tdl.domain.vo.RouteTermVo">
SELECT routeNumber,routeName,abbreviation,startLongitude,startLatitude,startCountry,startProvince,startCity,startAddress,
endLongitude,endLatitude,endCountry,endProvince,endCity,endAddress,transport,transportRemark,remark FROM route
WHERE 1=1
<if test="routeNumber!=null">
AND routeNumber like CONCAT(CONCAT('%',#{routeNumber,jdbcType=VARCHAR}), '%')
</if>
<if test="routeName!=null">
AND routeName like CONCAT(CONCAT('%',#{routeName,jdbcType=VARCHAR}), '%')
</if>
<if test="startCity!=null">
AND startCity like CONCAT(CONCAT('%',#{startCity,jdbcType=VARCHAR}), '%')
</if>
<if test="endCity!=null">
AND endCity like CONCAT(CONCAT('%',#{endCity,jdbcType=VARCHAR}), '%')
</if>
<if test="transport!=null">
AND transport=#{transport,jdbcType=VARCHAR}
</if>
</select>
<!--添加路由信息-->
<insert id="addRoute" parameterType="com.example.tdl.entity.Route">
INSERT INTO route VALUES (
NULL ,
#{routeNumber,jdbcType=VARCHAR},
#{routeName,jdbcType=VARCHAR},
#{abbreviation,jdbcType=VARCHAR},
#{startLongitude,jdbcType=VARCHAR},
#{startLatitude,jdbcType=VARCHAR},
#{startCountry,jdbcType=VARCHAR},
#{startProvince,jdbcType=VARCHAR},
#{startCity,jdbcType=VARCHAR},
#{startAddress,jdbcType=VARCHAR},
#{endLongitude,jdbcType=VARCHAR},
#{endLatitude,jdbcType=VARCHAR},
#{endCountry,jdbcType=VARCHAR},
#{endProvince,jdbcType=VARCHAR},
#{endCity,jdbcType=VARCHAR},
#{endAddress,jdbcType=VARCHAR},
#{transport,jdbcType=VARCHAR},
#{transportRemark,jdbcType=VARCHAR},
#{createTime,jdbcType=BIGINT},
#{updateTime,jdbcType=BIGINT},
#{remark,jdbcType=VARCHAR}
)
</insert>
<!--修改路由信息-->
<update id="updateRoute" parameterType="com.example.tdl.entity.Route">
UPDATE route SET
routeName=#{routeName,jdbcType=VARCHAR},
abbreviation=#{abbreviation,jdbcType=VARCHAR},
startLongitude=#{startLongitude,jdbcType=VARCHAR},
startLatitude=#{startLatitude,jdbcType=VARCHAR},
startCountry=#{startCountry,jdbcType=VARCHAR},
startProvince=#{startProvince,jdbcType=VARCHAR},
startCity=#{startCity,jdbcType=VARCHAR},
startAddress=#{startAddress,jdbcType=VARCHAR},
endLongitude=#{endLongitude,jdbcType=VARCHAR},
endLatitude=#{endLatitude,jdbcType=VARCHAR},
endCountry=#{endCountry,jdbcType=VARCHAR},
endProvince=#{endProvince,jdbcType=VARCHAR},
endCity=#{endCity,jdbcType=VARCHAR},
endAddress=#{endAddress,jdbcType=VARCHAR},
transport=#{transport,jdbcType=VARCHAR},
transportRemark=#{transportRemark,jdbcType=VARCHAR},
updateTime=#{updateTime,jdbcType=BIGINT},
remark=#{remark,jdbcType=VARCHAR}
WHERE routeNumber=#{routeNumber,jdbcType=VARCHAR}
</update>
<delete id="delRoute" parameterType="String">
DELETE from route WHERE routeNumber=#{routeNumber,jdbcType=VARCHAR}
</delete>
<!--根据条件查询路由信息-->
<select id="getByRouteNumber" resultType="java.lang.Integer" parameterType="String">
SELECT COUNT(routeNumber) FROM route WHERE routeNumber=#{routeNumber,jdbcType=VARCHAR}
</select>
</mapper>
\ No newline at end of file
<?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.example.tdl.mapper.TDLDeviceMapper">
<!--查询所有TDL信息-->
<select id="getAll" resultType="com.example.tdl.domain.vo.ResultTDLDeviceVo">
SELECT TDLName,TDLSN,counts,FROM_UNIXTIME(lastTime) lastTime,useScene,(SELECT warehouseName from warehouse WHERE id=t.warehouse_id) warehouseName,
(SELECT transportationNo from circuit WHERE id=t.circuit_id) transportationNo
from tdldevice t
</select>
<!--根据条件查询-->
<select id="getByTerm" resultType="com.example.tdl.domain.vo.ResultTDLDeviceVo" parameterType="com.example.tdl.domain.vo.TDLDeviceTermVo">
SELECT TDLName,TDLSN,counts,FROM_UNIXTIME(lastTime) lastTime,useScene,(SELECT warehouseName from warehouse WHERE id=t.warehouse_id) warehouseName,
(SELECT transportationNo from circuit WHERE id=t.circuit_id) transportationNo
from tdldevice t WHERE 1=1
<if test="TDLName!=null">
AND TDLName like CONCAT(CONCAT('%',#{TDLName,jdbcType=VARCHAR}), '%')
</if>
<if test="TDLSN!=null">
AND TDLSN like CONCAT(CONCAT('%',#{TDLSN,jdbcType=VARCHAR}), '%')
</if>
<if test="useScene!=null">
AND useScene=#{useScene,jdbcType=INTEGER}
</if>
</select>
<insert id="addTDLDevice" parameterType="com.example.tdl.domain.vo.AddTDLDeviceVo">
INSERT INTO TDLDevice VALUES (
NULL ,
#{TDLName,jdbcType=VARCHAR},
#{TDLSN,jdbcType=VARCHAR},
0,
0,
0,
NULL ,
NULL
)
</insert>
<update id="updateTDLDevice" parameterType="com.example.tdl.domain.vo.UpdateTDLDeviceVo">
UPDATE TDLDevice SET
TDLName=#{TDLName,jdbcType=VARCHAR}
WHERE TDLSN=#{TDLSN,jdbcType=VARCHAR}
</update>
<delete id="delTDLDevice" parameterType="String">
DELETE FROM TDLDevice WHERE TDLSN=#{TDLSN,jdbcType=VARCHAR}
</delete>
<select id="getByTDLSN" parameterType="String" resultType="com.example.tdl.domain.vo.ResultTDLDeviceVo">
SELECT TDLName,TDLSN,counts,FROM_UNIXTIME(lastTime) lastTime,useScene,(SELECT warehouseName from warehouse WHERE id=t.warehouse_id) warehouseName,
(SELECT transportationNo from circuit WHERE id=t.circuit_id) transportationNo
from tdldevice t WHERE TDLSN=#{TDLSN,jdbcType=VARCHAR}
</select>
</mapper>
\ No newline at end of file
<?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.example.tdl.mapper.UserMapper">
<!--登录-->
<select id="login" parameterType="com.example.tdl.domain.vo.LoginUserVo" resultType="java.lang.Integer">
SELECT COUNT(*) from USER
WHERE userName=#{userName,jdbcType=VARCHAR}
AND password=#{password,jdbcType=VARCHAR}
AND state=1
</select>
<!--通过用户名查询用户信息-->
<select id="getByUserName" parameterType="String" resultType="com.example.tdl.domain.vo.UserVo">
select userNumber, userName,password,nickName,phone,email,roleName
from `user` u INNER JOIN role r ON u.role_id=r.id
WHERE userName=#{userName,jdbcType=VARCHAR}
AND state=1
</select>
<!--获取所有用户信息-->
<select id="getAll" resultType="com.example.tdl.domain.vo.ResultUserVo">
select userNumber,userName,nickName,phone,email,roleName
from `user` u INNER JOIN role r ON u.role_id=r.id
WHERE state=1
</select>
<!--根据条件查询-->
<select id="getByTerm" resultType="com.example.tdl.domain.vo.ResultUserVo" parameterType="com.example.tdl.domain.vo.UserTermVo">
select userNumber,userName,nickName,phone,email,roleName
from `user` u INNER JOIN role r ON u.role_id=r.id WHERE 1=1
<if test="userName!=null">
AND userName like CONCAT(CONCAT('%',#{userName,jdbcType=VARCHAR}), '%')
</if>
<if test="roleName!=null">
AND roleName=#{roleName,jdbcType=VARCHAR}
</if>
<if test="email!=null">
AND email like CONCAT(CONCAT('%',#{email,jdbcType=VARCHAR}), '%')
</if>
<if test="phone!=null">
AND phone like CONCAT(CONCAT('%',#{phone,jdbcType=VARCHAR}), '%')
</if>
AND state=1
</select>
<!--通过手机号查询用户信息-->
<select id="getByPhone" parameterType="String" resultType="com.example.tdl.domain.vo.ResultUserVo">
select userNumber, userName,nickName,phone,email,roleName
from `user` u INNER JOIN role r ON u.role_id=r.id
WHERE phone=#{phone,jdbcType=VARCHAR}
AND state=1
</select>
<!--通过邮箱查询用户信息-->
<select id="getByEmail" parameterType="String" resultType="com.example.tdl.domain.vo.ResultUserVo">
select userNumber, userName,nickName,phone,email,roleName
from `user` u INNER JOIN role r ON u.role_id=r.id
WHERE email=#{email,jdbcType=VARCHAR}
AND state=1
</select>
<!--通过用户编号查询用户信息-->
<select id="getByUserNumber" parameterType="String" resultType="com.example.tdl.domain.vo.ResultUserVo">
select userNumber, userName,nickName,phone,email,roleName
from `user` u INNER JOIN role r ON u.role_id=r.id
WHERE userNumber=#{userNumber,jdbcType=VARCHAR}
AND state=1
</select>
<!--添加用户-->
<insert id="addUser" parameterType="com.example.tdl.domain.vo.UserVo">
INSERT INTO `user` VALUES(
null,
CONCAT("U",(unix_timestamp(now())*1000)),
#{userName,jdbcType=VARCHAR},
#{password,jdbcType=VARCHAR},
#{nickName,jdbcType=VARCHAR},
#{phone,jdbcType=VARCHAR},
#{email,jdbcType=VARCHAR},
(SELECT id from role WHERE roleName=#{roleName,jdbcType=VARCHAR}),
(unix_timestamp(now())*1000) ,
(unix_timestamp(now())*1000) ,
1
)
</insert>
<!--修改用户-->
<update id="updateUser" parameterType="com.example.tdl.domain.vo.UpdateUserVo">
update `user` SET
nickName=#{nickName,jdbcType=VARCHAR},
phone=#{phone,jdbcType=VARCHAR},
email=#{email,jdbcType=VARCHAR},
role_id=(SELECT id from role WHERE roleName=#{roleName,jdbcType=VARCHAR}),
updateTime=(unix_timestamp(now())*1000)
WHERE userNumber=#{userNumber,jdbcType=VARCHAR}
</update>
<!--删除用户-->
<delete id="delUser" parameterType="String">
DELETE FROM `user` WHERE userNumber=#{userNumber}
</delete>
<!--重置密码-->
<update id="resetPassword" parameterType="String">
update `user` SET
password=#{password,jdbcType=VARCHAR},
updateTime=(unix_timestamp(now())*1000)
WHERE userNumber=#{userNumber,jdbcType=VARCHAR}
</update>
</mapper>
\ No newline at end of file
<?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.example.tdl.mapper.WarehouseMapper">
<!--查询所有仓库信息-->
<select id="getAll" resultType="com.example.tdl.domain.vo.ResultWarehouseVo">
SELECT warehouseName,warehouseNo,country,province,city,district,address,regionCN,regionEN,longitude,latitude,property,type,
alarmType,alarmScene,hardwareLevel,areaIndoor,areaRack,areaOutdoor,areaPlanIndoor,office,timeZone,weatherInfo,warehouseInfo,w.remark
from warehouse w,alarm a WHERE w.alarm_id=a.id
</select>
<!--根据条件查询仓库信息-->
<select id="getAllByTerm" resultType="com.example.tdl.domain.vo.ResultWarehouseVo" parameterType="com.example.tdl.domain.vo.WarehouseTermVo">
SELECT warehouseName,warehouseNo,country,province,city,district,address,regionCN,regionEN,longitude,latitude,property,type,
alarmType,alarmScene,hardwareLevel,areaIndoor,areaRack,areaOutdoor,areaPlanIndoor,office,timeZone,weatherInfo,warehouseInfo,w.remark
from warehouse w,alarm a WHERE w.alarm_id=a.id
<if test="warehouseName!=null">
AND warehouseName like CONCAT(CONCAT('%',#{warehouseName,jdbcType=VARCHAR}), '%')
</if>
<if test="country!=null">
AND country like CONCAT(CONCAT('%',#{country,jdbcType=VARCHAR}), '%')
</if>
<if test="province!=null">
AND province like CONCAT(CONCAT('%',#{province,jdbcType=VARCHAR}), '%')
</if>
<if test="city!=null">
AND city like CONCAT(CONCAT('%',#{city,jdbcType=VARCHAR}), '%')
</if>
<if test="property!=null">
AND property=#{property,jdbcType=VARCHAR}
</if>
<if test="type!=null">
AND type=#{type,jdbcType=VARCHAR}
</if>
<if test="hardwareLevel!=null">
AND hardwareLevel=#{hardwareLevel,jdbcType=VARCHAR}
</if>
</select>
<!--添加仓库信息-->
<insert id="addWarehouse" parameterType="com.example.tdl.entity.Warehouse">
INSERT INTO warehouse VALUES (
NULL ,
#{warehouseName,jdbcType=VARCHAR},
#{warehouseNo,jdbcType=VARCHAR},
#{country,jdbcType=VARCHAR},
#{province,jdbcType=VARCHAR},
#{city,jdbcType=VARCHAR},
#{district,jdbcType=VARCHAR},
#{address,jdbcType=VARCHAR},
#{regionCN,jdbcType=VARCHAR},
#{regionEN,jdbcType=VARCHAR},
#{longitude,jdbcType=VARCHAR},
#{latitude,jdbcType=VARCHAR},
#{property,jdbcType=VARCHAR},
#{type,jdbcType=VARCHAR},
(SELECT id from alarm WHERE alarmType=#{alarmType,jdbcType=VARCHAR} AND alarmScene="仓库"),
#{hardwareLevel,jdbcType=VARCHAR},
#{areaIndoor,jdbcType=DOUBLE},
#{areaRack,jdbcType=DOUBLE},
#{areaOutdoor,jdbcType=DOUBLE},
#{areaPlanIndoor,jdbcType=DOUBLE},
#{office,jdbcType=VARCHAR},
#{timeZone,jdbcType=INTEGER},
#{weatherInfo,jdbcType=VARCHAR},
#{warehouseInfo,jdbcType=VARCHAR},
#{createTime,jdbcType=BIGINT},
#{updateTime,jdbcType=BIGINT},
#{remark,jdbcType=VARCHAR}
)
</insert>
<!--根据仓库编号修改仓库信息-->
<update id="updateWarehouse" parameterType="com.example.tdl.domain.vo.UpdateWarehouseVo">
update warehouse SET
warehouseName=#{warehouseName,jdbcType=VARCHAR},
country=#{country,jdbcType=VARCHAR},
province=#{province,jdbcType=VARCHAR},
city=#{city,jdbcType=VARCHAR},
district=#{district,jdbcType=VARCHAR},
address=#{address,jdbcType=VARCHAR},
regionCN=#{regionCN,jdbcType=VARCHAR},
regionEN=#{regionEN,jdbcType=VARCHAR},
longitude=#{longitude,jdbcType=VARCHAR},
latitude=#{latitude,jdbcType=VARCHAR},
property=#{property,jdbcType=VARCHAR},
type=#{type,jdbcType=VARCHAR},
alarm_id=(SELECT id from alarm WHERE alarmType=#{alarmType,jdbcType=VARCHAR} AND alarmScene="仓库"),
hardwareLevel=#{hardwareLevel,jdbcType=VARCHAR},
areaIndoor=#{areaIndoor,jdbcType=DOUBLE},
areaRack=#{areaRack,jdbcType=DOUBLE},
areaOutdoor=#{areaOutdoor,jdbcType=DOUBLE},
areaPlanIndoor=#{areaPlanIndoor,jdbcType=DOUBLE},
office=#{office,jdbcType=VARCHAR},
timeZone=#{timeZone,jdbcType=INTEGER},
weatherInfo=#{weatherInfo,jdbcType=VARCHAR},
warehouseInfo=#{warehouseInfo,jdbcType=VARCHAR},
updateTime=#{updateTime,jdbcType=BIGINT},
remark=#{remark,jdbcType=VARCHAR}
WHERE warehouseNo=#{warehouseNo,jdbcType=VARCHAR}
</update>
<!--删除仓库信息-->
<delete id="delWarehouse" parameterType="String">
DELETE from warehouse WHERE warehouseNo=#{warehouseNo,jdbcType=VARCHAR}
</delete>
<!--根据仓库名查询信息-->
<select id="getByWarehouseName" parameterType="String" resultType="com.example.tdl.domain.vo.ResultWarehouseVo">
SELECT warehouseName,warehouseNo,country,province,city,district,address,regionCN,regionEN,longitude,latitude,property,type,
alarmType,alarmScene,hardwareLevel,areaIndoor,areaRack,areaOutdoor,areaPlanIndoor,office,timeZone,weatherInfo,warehouseInfo,w.remark
from warehouse w,alarm a WHERE w.alarm_id=a.id
AND warehouseName=#{warehouseName,jdbcType=VARCHAR}
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<!-- <plugins>
<plugin interceptor="com.github.pagehelper.PageHelper">
<property name="dialect" value="mysql"/>
<property name="offsetAsPageNum" value="true"/>
<property name="rowBoundsWithCount" value="true"/>
<property name="reasonable" value="true"/>
</plugin>
</plugins>-->
<environments default="development">
<environment id="development">
<transactionManager type="JDBC" />
<!-- 配置数据库连接信息 -->
<dataSource type="POOLED">
<property name="driver" value="${spring.datasource.driver-class-name}" />
<property name="url" value="${spring.datasource.url}" />
<property name="username" value="${spring.datasource.username}" />
<property name="password" value="${spring.datasource.password}" />
</dataSource>
</environment>
</environments>
<mappers>
<mapper resource="mapper/UserMapper.xml"/>
<mapper resource="mapper/RoleMapper.xml"/>
<mapper resource="mapper/PermissionMapper.xml"/>
<mapper resource="mapper/RoleHasPermissionMapper.xml"/>
<mapper resource="mapper/RouteMapper.xml"/>
<mapper resource="mapper/AlarmMapper.xml"/>
<mapper resource="mapper/WarehouseMapper.xml"/>
<mapper resource="mapper/TDLDeviceMapper.xml"/>
<mapper resource="mapper/LoginLogMapper.xml"/>
</mappers>
</configuration>
package com.example.tdl;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class TdlApplicationTests {
@Test
public void contextLoads() {
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment