59 changed files with 9949 additions and 1 deletions
@ -0,0 +1,33 @@ |
|||||
|
HELP.md |
||||
|
target/ |
||||
|
!.mvn/wrapper/maven-wrapper.jar |
||||
|
!**/src/main/**/target/ |
||||
|
!**/src/test/**/target/ |
||||
|
|
||||
|
### STS ### |
||||
|
.apt_generated |
||||
|
.classpath |
||||
|
.factorypath |
||||
|
.project |
||||
|
.settings |
||||
|
.springBeans |
||||
|
.sts4-cache |
||||
|
|
||||
|
### IntelliJ IDEA ### |
||||
|
.idea |
||||
|
*.iws |
||||
|
*.iml |
||||
|
*.ipr |
||||
|
|
||||
|
### NetBeans ### |
||||
|
/nbproject/private/ |
||||
|
/nbbuild/ |
||||
|
/dist/ |
||||
|
/nbdist/ |
||||
|
/.nb-gradle/ |
||||
|
build/ |
||||
|
!**/src/main/**/build/ |
||||
|
!**/src/test/**/build/ |
||||
|
|
||||
|
### VS Code ### |
||||
|
.vscode/ |
@ -0,0 +1,322 @@ |
|||||
|
#!/bin/sh |
||||
|
# ---------------------------------------------------------------------------- |
||||
|
# Licensed to the Apache Software Foundation (ASF) under one |
||||
|
# or more contributor license agreements. See the NOTICE file |
||||
|
# distributed with this work for additional information |
||||
|
# regarding copyright ownership. The ASF licenses this file |
||||
|
# to you under the Apache License, Version 2.0 (the |
||||
|
# "License"); you may not use this file except in compliance |
||||
|
# with the License. You may obtain a copy of the License at |
||||
|
# |
||||
|
# https://www.apache.org/licenses/LICENSE-2.0 |
||||
|
# |
||||
|
# Unless required by applicable law or agreed to in writing, |
||||
|
# software distributed under the License is distributed on an |
||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||
|
# KIND, either express or implied. See the License for the |
||||
|
# specific language governing permissions and limitations |
||||
|
# under the License. |
||||
|
# ---------------------------------------------------------------------------- |
||||
|
|
||||
|
# ---------------------------------------------------------------------------- |
||||
|
# Maven Start Up Batch script |
||||
|
# |
||||
|
# Required ENV vars: |
||||
|
# ------------------ |
||||
|
# JAVA_HOME - location of a JDK home dir |
||||
|
# |
||||
|
# Optional ENV vars |
||||
|
# ----------------- |
||||
|
# M2_HOME - location of maven2's installed home dir |
||||
|
# MAVEN_OPTS - parameters passed to the Java VM when running Maven |
||||
|
# e.g. to debug Maven itself, use |
||||
|
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 |
||||
|
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files |
||||
|
# ---------------------------------------------------------------------------- |
||||
|
|
||||
|
if [ -z "$MAVEN_SKIP_RC" ]; then |
||||
|
|
||||
|
if [ -f /etc/mavenrc ]; then |
||||
|
. /etc/mavenrc |
||||
|
fi |
||||
|
|
||||
|
if [ -f "$HOME/.mavenrc" ]; then |
||||
|
. "$HOME/.mavenrc" |
||||
|
fi |
||||
|
|
||||
|
fi |
||||
|
|
||||
|
# OS specific support. $var _must_ be set to either true or false. |
||||
|
cygwin=false |
||||
|
darwin=false |
||||
|
mingw=false |
||||
|
case "$(uname)" in |
||||
|
CYGWIN*) cygwin=true ;; |
||||
|
MINGW*) mingw=true ;; |
||||
|
Darwin*) |
||||
|
darwin=true |
||||
|
# Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home |
||||
|
# See https://developer.apple.com/library/mac/qa/qa1170/_index.html |
||||
|
if [ -z "$JAVA_HOME" ]; then |
||||
|
if [ -x "/usr/libexec/java_home" ]; then |
||||
|
export JAVA_HOME="$(/usr/libexec/java_home)" |
||||
|
else |
||||
|
export JAVA_HOME="/Library/Java/Home" |
||||
|
fi |
||||
|
fi |
||||
|
;; |
||||
|
esac |
||||
|
|
||||
|
if [ -z "$JAVA_HOME" ]; then |
||||
|
if [ -r /etc/gentoo-release ]; then |
||||
|
JAVA_HOME=$(java-config --jre-home) |
||||
|
fi |
||||
|
fi |
||||
|
|
||||
|
if [ -z "$M2_HOME" ]; then |
||||
|
## resolve links - $0 may be a link to maven's home |
||||
|
PRG="$0" |
||||
|
|
||||
|
# need this for relative symlinks |
||||
|
while [ -h "$PRG" ]; do |
||||
|
ls=$(ls -ld "$PRG") |
||||
|
link=$(expr "$ls" : '.*-> \(.*\)$') |
||||
|
if expr "$link" : '/.*' >/dev/null; then |
||||
|
PRG="$link" |
||||
|
else |
||||
|
PRG="$(dirname "$PRG")/$link" |
||||
|
fi |
||||
|
done |
||||
|
|
||||
|
saveddir=$(pwd) |
||||
|
|
||||
|
M2_HOME=$(dirname "$PRG")/.. |
||||
|
|
||||
|
# make it fully qualified |
||||
|
M2_HOME=$(cd "$M2_HOME" && pwd) |
||||
|
|
||||
|
cd "$saveddir" |
||||
|
# echo Using m2 at $M2_HOME |
||||
|
fi |
||||
|
|
||||
|
# For Cygwin, ensure paths are in UNIX format before anything is touched |
||||
|
if $cygwin; then |
||||
|
[ -n "$M2_HOME" ] && |
||||
|
M2_HOME=$(cygpath --unix "$M2_HOME") |
||||
|
[ -n "$JAVA_HOME" ] && |
||||
|
JAVA_HOME=$(cygpath --unix "$JAVA_HOME") |
||||
|
[ -n "$CLASSPATH" ] && |
||||
|
CLASSPATH=$(cygpath --path --unix "$CLASSPATH") |
||||
|
fi |
||||
|
|
||||
|
# For Mingw, ensure paths are in UNIX format before anything is touched |
||||
|
if $mingw; then |
||||
|
[ -n "$M2_HOME" ] && |
||||
|
M2_HOME="$( ( |
||||
|
cd "$M2_HOME" |
||||
|
pwd |
||||
|
))" |
||||
|
[ -n "$JAVA_HOME" ] && |
||||
|
JAVA_HOME="$( ( |
||||
|
cd "$JAVA_HOME" |
||||
|
pwd |
||||
|
))" |
||||
|
fi |
||||
|
|
||||
|
if [ -z "$JAVA_HOME" ]; then |
||||
|
javaExecutable="$(which javac)" |
||||
|
if [ -n "$javaExecutable" ] && ! [ "$(expr \"$javaExecutable\" : '\([^ ]*\)')" = "no" ]; then |
||||
|
# readlink(1) is not available as standard on Solaris 10. |
||||
|
readLink=$(which readlink) |
||||
|
if [ ! $(expr "$readLink" : '\([^ ]*\)') = "no" ]; then |
||||
|
if $darwin; then |
||||
|
javaHome="$(dirname \"$javaExecutable\")" |
||||
|
javaExecutable="$(cd \"$javaHome\" && pwd -P)/javac" |
||||
|
else |
||||
|
javaExecutable="$(readlink -f \"$javaExecutable\")" |
||||
|
fi |
||||
|
javaHome="$(dirname \"$javaExecutable\")" |
||||
|
javaHome=$(expr "$javaHome" : '\(.*\)/bin') |
||||
|
JAVA_HOME="$javaHome" |
||||
|
export JAVA_HOME |
||||
|
fi |
||||
|
fi |
||||
|
fi |
||||
|
|
||||
|
if [ -z "$JAVACMD" ]; then |
||||
|
if [ -n "$JAVA_HOME" ]; then |
||||
|
if [ -x "$JAVA_HOME/jre/sh/java" ]; then |
||||
|
# IBM's JDK on AIX uses strange locations for the executables |
||||
|
JAVACMD="$JAVA_HOME/jre/sh/java" |
||||
|
else |
||||
|
JAVACMD="$JAVA_HOME/bin/java" |
||||
|
fi |
||||
|
else |
||||
|
JAVACMD="$(which java)" |
||||
|
fi |
||||
|
fi |
||||
|
|
||||
|
if [ ! -x "$JAVACMD" ]; then |
||||
|
echo "Error: JAVA_HOME is not defined correctly." >&2 |
||||
|
echo " We cannot execute $JAVACMD" >&2 |
||||
|
exit 1 |
||||
|
fi |
||||
|
|
||||
|
if [ -z "$JAVA_HOME" ]; then |
||||
|
echo "Warning: JAVA_HOME environment variable is not set." |
||||
|
fi |
||||
|
|
||||
|
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher |
||||
|
|
||||
|
# traverses directory structure from process work directory to filesystem root |
||||
|
# first directory with .mvn subdirectory is considered project base directory |
||||
|
find_maven_basedir() { |
||||
|
|
||||
|
if [ -z "$1" ]; then |
||||
|
echo "Path not specified to find_maven_basedir" |
||||
|
return 1 |
||||
|
fi |
||||
|
|
||||
|
basedir="$1" |
||||
|
wdir="$1" |
||||
|
while [ "$wdir" != '/' ]; do |
||||
|
if [ -d "$wdir"/.mvn ]; then |
||||
|
basedir=$wdir |
||||
|
break |
||||
|
fi |
||||
|
# workaround for JBEAP-8937 (on Solaris 10/Sparc) |
||||
|
if [ -d "${wdir}" ]; then |
||||
|
wdir=$( |
||||
|
cd "$wdir/.." |
||||
|
pwd |
||||
|
) |
||||
|
fi |
||||
|
# end of workaround |
||||
|
done |
||||
|
echo "${basedir}" |
||||
|
} |
||||
|
|
||||
|
# concatenates all lines of a file |
||||
|
concat_lines() { |
||||
|
if [ -f "$1" ]; then |
||||
|
echo "$(tr -s '\n' ' ' <"$1")" |
||||
|
fi |
||||
|
} |
||||
|
|
||||
|
BASE_DIR=$(find_maven_basedir "$(pwd)") |
||||
|
if [ -z "$BASE_DIR" ]; then |
||||
|
exit 1 |
||||
|
fi |
||||
|
|
||||
|
########################################################################################## |
||||
|
# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central |
||||
|
# This allows using the maven wrapper in projects that prohibit checking in binary data. |
||||
|
########################################################################################## |
||||
|
if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then |
||||
|
if [ "$MVNW_VERBOSE" = true ]; then |
||||
|
echo "Found .mvn/wrapper/maven-wrapper.jar" |
||||
|
fi |
||||
|
else |
||||
|
if [ "$MVNW_VERBOSE" = true ]; then |
||||
|
echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." |
||||
|
fi |
||||
|
if [ -n "$MVNW_REPOURL" ]; then |
||||
|
jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" |
||||
|
else |
||||
|
jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" |
||||
|
fi |
||||
|
while IFS="=" read key value; do |
||||
|
case "$key" in wrapperUrl) |
||||
|
jarUrl="$value" |
||||
|
break |
||||
|
;; |
||||
|
esac |
||||
|
done <"$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" |
||||
|
if [ "$MVNW_VERBOSE" = true ]; then |
||||
|
echo "Downloading from: $jarUrl" |
||||
|
fi |
||||
|
wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" |
||||
|
if $cygwin; then |
||||
|
wrapperJarPath=$(cygpath --path --windows "$wrapperJarPath") |
||||
|
fi |
||||
|
|
||||
|
if command -v wget >/dev/null; then |
||||
|
if [ "$MVNW_VERBOSE" = true ]; then |
||||
|
echo "Found wget ... using wget" |
||||
|
fi |
||||
|
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then |
||||
|
wget "$jarUrl" -O "$wrapperJarPath" |
||||
|
else |
||||
|
wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" |
||||
|
fi |
||||
|
elif command -v curl >/dev/null; then |
||||
|
if [ "$MVNW_VERBOSE" = true ]; then |
||||
|
echo "Found curl ... using curl" |
||||
|
fi |
||||
|
if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then |
||||
|
curl -o "$wrapperJarPath" "$jarUrl" -f |
||||
|
else |
||||
|
curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f |
||||
|
fi |
||||
|
|
||||
|
else |
||||
|
if [ "$MVNW_VERBOSE" = true ]; then |
||||
|
echo "Falling back to using Java to download" |
||||
|
fi |
||||
|
javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" |
||||
|
# For Cygwin, switch paths to Windows format before running javac |
||||
|
if $cygwin; then |
||||
|
javaClass=$(cygpath --path --windows "$javaClass") |
||||
|
fi |
||||
|
if [ -e "$javaClass" ]; then |
||||
|
if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then |
||||
|
if [ "$MVNW_VERBOSE" = true ]; then |
||||
|
echo " - Compiling MavenWrapperDownloader.java ..." |
||||
|
fi |
||||
|
# Compiling the Java class |
||||
|
("$JAVA_HOME/bin/javac" "$javaClass") |
||||
|
fi |
||||
|
if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then |
||||
|
# Running the downloader |
||||
|
if [ "$MVNW_VERBOSE" = true ]; then |
||||
|
echo " - Running MavenWrapperDownloader.java ..." |
||||
|
fi |
||||
|
("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") |
||||
|
fi |
||||
|
fi |
||||
|
fi |
||||
|
fi |
||||
|
########################################################################################## |
||||
|
# End of extension |
||||
|
########################################################################################## |
||||
|
|
||||
|
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} |
||||
|
if [ "$MVNW_VERBOSE" = true ]; then |
||||
|
echo $MAVEN_PROJECTBASEDIR |
||||
|
fi |
||||
|
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" |
||||
|
|
||||
|
# For Cygwin, switch paths to Windows format before running java |
||||
|
if $cygwin; then |
||||
|
[ -n "$M2_HOME" ] && |
||||
|
M2_HOME=$(cygpath --path --windows "$M2_HOME") |
||||
|
[ -n "$JAVA_HOME" ] && |
||||
|
JAVA_HOME=$(cygpath --path --windows "$JAVA_HOME") |
||||
|
[ -n "$CLASSPATH" ] && |
||||
|
CLASSPATH=$(cygpath --path --windows "$CLASSPATH") |
||||
|
[ -n "$MAVEN_PROJECTBASEDIR" ] && |
||||
|
MAVEN_PROJECTBASEDIR=$(cygpath --path --windows "$MAVEN_PROJECTBASEDIR") |
||||
|
fi |
||||
|
|
||||
|
# Provide a "standardized" way to retrieve the CLI args that will |
||||
|
# work with both Windows and non-Windows executions. |
||||
|
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" |
||||
|
export MAVEN_CMD_LINE_ARGS |
||||
|
|
||||
|
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain |
||||
|
|
||||
|
exec "$JAVACMD" \ |
||||
|
$MAVEN_OPTS \ |
||||
|
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ |
||||
|
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ |
||||
|
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" |
@ -0,0 +1,182 @@ |
|||||
|
@REM ---------------------------------------------------------------------------- |
||||
|
@REM Licensed to the Apache Software Foundation (ASF) under one |
||||
|
@REM or more contributor license agreements. See the NOTICE file |
||||
|
@REM distributed with this work for additional information |
||||
|
@REM regarding copyright ownership. The ASF licenses this file |
||||
|
@REM to you under the Apache License, Version 2.0 (the |
||||
|
@REM "License"); you may not use this file except in compliance |
||||
|
@REM with the License. You may obtain a copy of the License at |
||||
|
@REM |
||||
|
@REM https://www.apache.org/licenses/LICENSE-2.0 |
||||
|
@REM |
||||
|
@REM Unless required by applicable law or agreed to in writing, |
||||
|
@REM software distributed under the License is distributed on an |
||||
|
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||
|
@REM KIND, either express or implied. See the License for the |
||||
|
@REM specific language governing permissions and limitations |
||||
|
@REM under the License. |
||||
|
@REM ---------------------------------------------------------------------------- |
||||
|
|
||||
|
@REM ---------------------------------------------------------------------------- |
||||
|
@REM Maven Start Up Batch script |
||||
|
@REM |
||||
|
@REM Required ENV vars: |
||||
|
@REM JAVA_HOME - location of a JDK home dir |
||||
|
@REM |
||||
|
@REM Optional ENV vars |
||||
|
@REM M2_HOME - location of maven2's installed home dir |
||||
|
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands |
||||
|
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending |
||||
|
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven |
||||
|
@REM e.g. to debug Maven itself, use |
||||
|
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 |
||||
|
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files |
||||
|
@REM ---------------------------------------------------------------------------- |
||||
|
|
||||
|
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' |
||||
|
@echo off |
||||
|
@REM set title of command window |
||||
|
title %0 |
||||
|
@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' |
||||
|
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% |
||||
|
|
||||
|
@REM set %HOME% to equivalent of $HOME |
||||
|
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") |
||||
|
|
||||
|
@REM Execute a user defined script before this one |
||||
|
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre |
||||
|
@REM check for pre script, once with legacy .bat ending and once with .cmd ending |
||||
|
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" |
||||
|
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" |
||||
|
:skipRcPre |
||||
|
|
||||
|
@setlocal |
||||
|
|
||||
|
set ERROR_CODE=0 |
||||
|
|
||||
|
@REM To isolate internal variables from possible post scripts, we use another setlocal |
||||
|
@setlocal |
||||
|
|
||||
|
@REM ==== START VALIDATION ==== |
||||
|
if not "%JAVA_HOME%" == "" goto OkJHome |
||||
|
|
||||
|
echo. |
||||
|
echo Error: JAVA_HOME not found in your environment. >&2 |
||||
|
echo Please set the JAVA_HOME variable in your environment to match the >&2 |
||||
|
echo location of your Java installation. >&2 |
||||
|
echo. |
||||
|
goto error |
||||
|
|
||||
|
:OkJHome |
||||
|
if exist "%JAVA_HOME%\bin\java.exe" goto init |
||||
|
|
||||
|
echo. |
||||
|
echo Error: JAVA_HOME is set to an invalid directory. >&2 |
||||
|
echo JAVA_HOME = "%JAVA_HOME%" >&2 |
||||
|
echo Please set the JAVA_HOME variable in your environment to match the >&2 |
||||
|
echo location of your Java installation. >&2 |
||||
|
echo. |
||||
|
goto error |
||||
|
|
||||
|
@REM ==== END VALIDATION ==== |
||||
|
|
||||
|
:init |
||||
|
|
||||
|
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". |
||||
|
@REM Fallback to current working directory if not found. |
||||
|
|
||||
|
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% |
||||
|
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir |
||||
|
|
||||
|
set EXEC_DIR=%CD% |
||||
|
set WDIR=%EXEC_DIR% |
||||
|
:findBaseDir |
||||
|
IF EXIST "%WDIR%"\.mvn goto baseDirFound |
||||
|
cd .. |
||||
|
IF "%WDIR%"=="%CD%" goto baseDirNotFound |
||||
|
set WDIR=%CD% |
||||
|
goto findBaseDir |
||||
|
|
||||
|
:baseDirFound |
||||
|
set MAVEN_PROJECTBASEDIR=%WDIR% |
||||
|
cd "%EXEC_DIR%" |
||||
|
goto endDetectBaseDir |
||||
|
|
||||
|
:baseDirNotFound |
||||
|
set MAVEN_PROJECTBASEDIR=%EXEC_DIR% |
||||
|
cd "%EXEC_DIR%" |
||||
|
|
||||
|
:endDetectBaseDir |
||||
|
|
||||
|
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig |
||||
|
|
||||
|
@setlocal EnableExtensions EnableDelayedExpansion |
||||
|
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a |
||||
|
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% |
||||
|
|
||||
|
:endReadAdditionalConfig |
||||
|
|
||||
|
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" |
||||
|
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" |
||||
|
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain |
||||
|
|
||||
|
set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" |
||||
|
|
||||
|
FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( |
||||
|
IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B |
||||
|
) |
||||
|
|
||||
|
@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central |
||||
|
@REM This allows using the maven wrapper in projects that prohibit checking in binary data. |
||||
|
if exist %WRAPPER_JAR% ( |
||||
|
if "%MVNW_VERBOSE%" == "true" ( |
||||
|
echo Found %WRAPPER_JAR% |
||||
|
) |
||||
|
) else ( |
||||
|
if not "%MVNW_REPOURL%" == "" ( |
||||
|
SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" |
||||
|
) |
||||
|
if "%MVNW_VERBOSE%" == "true" ( |
||||
|
echo Couldn't find %WRAPPER_JAR%, downloading it ... |
||||
|
echo Downloading from: %DOWNLOAD_URL% |
||||
|
) |
||||
|
|
||||
|
powershell -Command "&{"^ |
||||
|
"$webclient = new-object System.Net.WebClient;"^ |
||||
|
"if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ |
||||
|
"$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ |
||||
|
"}"^ |
||||
|
"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ |
||||
|
"}" |
||||
|
if "%MVNW_VERBOSE%" == "true" ( |
||||
|
echo Finished downloading %WRAPPER_JAR% |
||||
|
) |
||||
|
) |
||||
|
@REM End of extension |
||||
|
|
||||
|
@REM Provide a "standardized" way to retrieve the CLI args that will |
||||
|
@REM work with both Windows and non-Windows executions. |
||||
|
set MAVEN_CMD_LINE_ARGS=%* |
||||
|
|
||||
|
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* |
||||
|
if ERRORLEVEL 1 goto error |
||||
|
goto end |
||||
|
|
||||
|
:error |
||||
|
set ERROR_CODE=1 |
||||
|
|
||||
|
:end |
||||
|
@endlocal & set ERROR_CODE=%ERROR_CODE% |
||||
|
|
||||
|
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost |
||||
|
@REM check for post script, once with legacy .bat ending and once with .cmd ending |
||||
|
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" |
||||
|
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" |
||||
|
:skipRcPost |
||||
|
|
||||
|
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' |
||||
|
if "%MAVEN_BATCH_PAUSE%" == "on" pause |
||||
|
|
||||
|
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% |
||||
|
|
||||
|
exit /B %ERROR_CODE% |
@ -0,0 +1,69 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> |
||||
|
<parent> |
||||
|
<artifactId>ccsenscloud</artifactId> |
||||
|
<groupId>com.ccsens</groupId> |
||||
|
<version>1.0-SNAPSHOT</version> |
||||
|
</parent> |
||||
|
<modelVersion>4.0.0</modelVersion> |
||||
|
|
||||
|
<artifactId>signin</artifactId> |
||||
|
<properties> |
||||
|
<java.version>1.8</java.version> |
||||
|
</properties> |
||||
|
|
||||
|
<dependencies> |
||||
|
<!--cloud 工具类--> |
||||
|
<dependency> |
||||
|
<artifactId>cloudutil</artifactId> |
||||
|
<groupId>com.ccsens</groupId> |
||||
|
<version>1.0-SNAPSHOT</version> |
||||
|
</dependency> |
||||
|
<!--util 工具类--> |
||||
|
<dependency> |
||||
|
<artifactId>util</artifactId> |
||||
|
<groupId>com.ccsens</groupId> |
||||
|
<version>1.0-SNAPSHOT</version> |
||||
|
</dependency> |
||||
|
|
||||
|
</dependencies> |
||||
|
|
||||
|
<build> |
||||
|
<plugins> |
||||
|
<plugin> |
||||
|
<groupId>org.mybatis.generator</groupId> |
||||
|
<artifactId>mybatis-generator-maven-plugin</artifactId> |
||||
|
<version>1.3.7</version> |
||||
|
<configuration> |
||||
|
<configurationFile>${basedir}/src/main/resources/mbg.xml</configurationFile> |
||||
|
<overwrite>true</overwrite> |
||||
|
</configuration> |
||||
|
<dependencies> |
||||
|
<dependency> |
||||
|
<groupId>mysql</groupId> |
||||
|
<artifactId>mysql-connector-java</artifactId> |
||||
|
<version>5.1.34</version> |
||||
|
</dependency> |
||||
|
</dependencies> |
||||
|
</plugin> |
||||
|
<plugin> |
||||
|
<groupId>org.springframework.boot</groupId> |
||||
|
<artifactId>spring-boot-maven-plugin</artifactId> |
||||
|
<configuration> |
||||
|
<mainClass>com.ccsens.signin.SigninApplication</mainClass> |
||||
|
<!--<skip>true</skip>--> |
||||
|
</configuration> |
||||
|
<executions> |
||||
|
<execution> |
||||
|
<goals> |
||||
|
<goal>repackage</goal> |
||||
|
</goals> |
||||
|
</execution> |
||||
|
</executions> |
||||
|
</plugin> |
||||
|
|
||||
|
</plugins> |
||||
|
</build> |
||||
|
|
||||
|
</project> |
@ -0,0 +1,24 @@ |
|||||
|
package com.ccsens.signin; |
||||
|
|
||||
|
import org.mybatis.spring.annotation.MapperScan; |
||||
|
import org.springframework.boot.SpringApplication; |
||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication; |
||||
|
import org.springframework.boot.web.servlet.ServletComponentScan; |
||||
|
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker; |
||||
|
import org.springframework.cloud.openfeign.EnableFeignClients; |
||||
|
import org.springframework.scheduling.annotation.EnableAsync; |
||||
|
|
||||
|
@MapperScan(basePackages = {"com.ccsens.signin.persist.*"}) |
||||
|
@ServletComponentScan |
||||
|
@EnableAsync |
||||
|
//开启断路器功能
|
||||
|
@EnableCircuitBreaker |
||||
|
@EnableFeignClients(basePackages = "com.ccsens.cloudutil.feign") |
||||
|
@SpringBootApplication(scanBasePackages = "com.ccsens") |
||||
|
public class SigninApplication { |
||||
|
|
||||
|
public static void main(String[] args) { |
||||
|
SpringApplication.run(SigninApplication.class, args); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,29 @@ |
|||||
|
package com.ccsens.wisdomcar.api; |
||||
|
|
||||
|
import com.ccsens.util.JsonResponse; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiImplicitParams; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
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; |
||||
|
|
||||
|
@Api(tags = "DEBUG" , description = "DebugController | ") |
||||
|
@RestController |
||||
|
@RequestMapping("/debug") |
||||
|
@Slf4j |
||||
|
public class DebugController { |
||||
|
|
||||
|
@ApiOperation(value = "/测试",notes = "") |
||||
|
@ApiImplicitParams({ |
||||
|
}) |
||||
|
@RequestMapping(value="",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse debug(HttpServletRequest request) throws Exception { |
||||
|
|
||||
|
return JsonResponse.newInstance().ok("测试"); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,478 @@ |
|||||
|
package com.ccsens.signin.api; |
||||
|
|
||||
|
import cn.hutool.core.collection.CollectionUtil; |
||||
|
import cn.hutool.core.util.ObjectUtil; |
||||
|
import cn.hutool.core.util.StrUtil; |
||||
|
import cn.hutool.extra.servlet.ServletUtil; |
||||
|
import com.ccsens.signin.bean.dto.UserDto; |
||||
|
import com.ccsens.signin.bean.vo.UserVo; |
||||
|
import com.ccsens.signin.exception.UserLoginException; |
||||
|
import com.ccsens.signin.service.IUserService; |
||||
|
import com.ccsens.util.CodeEnum; |
||||
|
import com.ccsens.util.JsonResponse; |
||||
|
import com.ccsens.util.JwtUtil; |
||||
|
import com.ccsens.util.WebConstant; |
||||
|
import io.jsonwebtoken.Claims; |
||||
|
import io.jsonwebtoken.ExpiredJwtException; |
||||
|
import io.jsonwebtoken.SignatureException; |
||||
|
import io.swagger.annotations.*; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.validation.annotation.Validated; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import javax.servlet.http.HttpServletRequest; |
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
@Slf4j |
||||
|
@Api(tags = "用户相关操作API", description = "UserController | 用户操作控制器类") |
||||
|
@RestController |
||||
|
@RequestMapping("/users") |
||||
|
public class UserController { |
||||
|
@Autowired |
||||
|
private IUserService userService; |
||||
|
|
||||
|
// @Autowired
|
||||
|
// private IProMemberService proMemberService;
|
||||
|
|
||||
|
|
||||
|
@ApiOperation(value = "/用户登录", notes = "") |
||||
|
@ApiImplicitParams({ |
||||
|
}) |
||||
|
@RequestMapping(value = "/signin", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse<UserVo.TokenBean> userSignin(HttpServletRequest request, |
||||
|
@ApiParam @Validated @RequestBody(required = true) UserDto.UserSginin dto) throws Exception { |
||||
|
log.info("开始登陆:{}",dto); |
||||
|
Long start = System.currentTimeMillis(); |
||||
|
WebConstant.CLIENT_TYPE clientType = WebConstant.CLIENT_TYPE.valueOf(dto.getClient()); |
||||
|
WebConstant.IDENTIFY_TYPE identify_type = WebConstant.IDENTIFY_TYPE.valueOf(dto.getType()); |
||||
|
String identifier = dto.getData().getIdentifier(); |
||||
|
String credential = dto.getData().getCredential(); |
||||
|
|
||||
|
//1.验证参数
|
||||
|
switch (clientType) { |
||||
|
|
||||
|
case Wxmp: |
||||
|
case H5: |
||||
|
case Android: |
||||
|
case IOS: |
||||
|
case WxEnterprise: |
||||
|
break; |
||||
|
default: |
||||
|
throw new UserLoginException(-1, String.format("Not supported client type: %1$d(%2$s)", |
||||
|
clientType.value, clientType)); |
||||
|
} |
||||
|
log.info("登录场景"); |
||||
|
switch (identify_type) { |
||||
|
case WxEnterprise: |
||||
|
case Wxmp: |
||||
|
case OAUTH2_Wx: |
||||
|
case Wx_H5: |
||||
|
case OAUTH2_WeiBo: { |
||||
|
break; |
||||
|
} |
||||
|
case Phone: |
||||
|
case Email: |
||||
|
case Account: { |
||||
|
if (StrUtil.isEmpty(credential)) { |
||||
|
String msg = "credential is required when type is %1$d(%2$s)"; |
||||
|
throw new UserLoginException(-2, String.format(msg, identify_type.value, identify_type.phase)); |
||||
|
} |
||||
|
break; |
||||
|
} |
||||
|
default: { |
||||
|
throw new UserLoginException(-2, String.format("Not supported signin type: %1$d(%2$s)", |
||||
|
identify_type.value, identify_type.phase)); |
||||
|
} |
||||
|
} |
||||
|
log.info("登录方式"); |
||||
|
//2.调用业务方法(注册/添加登陆记录)
|
||||
|
UserVo.UserSign userSignVo = userService.signin( |
||||
|
clientType, identify_type, identifier, credential, |
||||
|
ServletUtil.getClientIP(request), dto.getRedirect()); |
||||
|
|
||||
|
//3.生成token(access_token,refresh_token)
|
||||
|
if (ObjectUtil.isNotNull(userSignVo)) { |
||||
|
Map<String, Object> theMap = CollectionUtil.newHashMap(); |
||||
|
theMap.put("authId", String.valueOf(userSignVo.getAuthId())); |
||||
|
UserVo.TokenBean tokenBean = userService.getUserInfoAndToken(clientType, identify_type,userSignVo, theMap); |
||||
|
|
||||
|
Long end = System.currentTimeMillis(); |
||||
|
log.info("本次登录使用了{}毫秒",end - start); |
||||
|
log.info("登录返回:{}",tokenBean); |
||||
|
return JsonResponse.newInstance().ok(tokenBean); |
||||
|
} else { |
||||
|
return JsonResponse.newInstance().fail("登陆信息不正确."); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "/发送验证码", notes = "") |
||||
|
@ApiImplicitParams({ |
||||
|
}) |
||||
|
@RequestMapping(value = "/smscode", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse<UserVo.SmsCode> getSmsCode(HttpServletRequest request, |
||||
|
@ApiParam @RequestParam String phone, |
||||
|
// @ApiParam Integer client,
|
||||
|
@RequestParam(required = true) String verificationCodeId, String verificationCodeValue) throws Exception { |
||||
|
log.info("发送验证码,手机号:{},图形验证码id:{},值:{}",phone,verificationCodeId,verificationCodeValue); |
||||
|
UserVo.SmsCode smsCodeVo = userService.getSignInSmsCode(phone,verificationCodeId,verificationCodeValue); |
||||
|
|
||||
|
return JsonResponse.newInstance().ok(smsCodeVo); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "/注册", notes = "") |
||||
|
@ApiImplicitParams({ |
||||
|
}) |
||||
|
@RequestMapping(value = "/signup", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse<UserVo.TokenBean> registerUser(HttpServletRequest request, |
||||
|
@ApiParam @Validated @RequestBody(required = true) UserDto.UserSignup userSignup) throws Exception { |
||||
|
|
||||
|
UserVo.UserSign userSignVo = userService.registerUser(userSignup); |
||||
|
//3.生成token(access_token,refresh_token)
|
||||
|
if (ObjectUtil.isNotNull(userSignVo)) { |
||||
|
WebConstant.CLIENT_TYPE clientType = WebConstant.CLIENT_TYPE.valueOf(1); |
||||
|
WebConstant.IDENTIFY_TYPE identifyType = WebConstant.IDENTIFY_TYPE.valueOf(3); |
||||
|
|
||||
|
Map<String, Object> theMap = CollectionUtil.newHashMap(); |
||||
|
theMap.put("authId", String.valueOf(userSignVo.getAuthId())); |
||||
|
UserVo.TokenBean tokenBean = userService.getUserInfoAndToken(clientType, identifyType,userSignVo, theMap); |
||||
|
|
||||
|
return JsonResponse.newInstance().ok(tokenBean); |
||||
|
} else { |
||||
|
return JsonResponse.newInstance().fail("登陆信息不正确."); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "/注册(不需要手机号)", notes = "") |
||||
|
@ApiImplicitParams({ |
||||
|
}) |
||||
|
@RequestMapping(value = "/signup/system", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse<UserVo.TokenBean> systemRegister(HttpServletRequest request, |
||||
|
@ApiParam @Validated @RequestBody(required = true) UserDto.UserSignupSystem userSignup) throws Exception { |
||||
|
|
||||
|
UserVo.Account account = userService.systemRegister(userSignup); |
||||
|
return JsonResponse.newInstance().ok(account); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "/检查账号是否被注册", notes = "") |
||||
|
@ApiImplicitParams({ |
||||
|
}) |
||||
|
@RequestMapping(value = "/account", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse<Boolean> accounts(@ApiParam @RequestParam String account) throws Exception { |
||||
|
|
||||
|
Boolean flag = userService.findAccount(account); |
||||
|
return JsonResponse.newInstance().ok(flag); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@ApiOperation(value = "/检查手机号是否被注册", notes = "") |
||||
|
@ApiImplicitParams({ |
||||
|
}) |
||||
|
@RequestMapping(value = "/phone", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse<Boolean> findPhone(@ApiParam @RequestParam String phone) throws Exception { |
||||
|
|
||||
|
Boolean flag = userService.findPhone(phone); |
||||
|
return JsonResponse.newInstance().ok(flag); |
||||
|
} |
||||
|
|
||||
|
// @ApiOperation(value = "/修改账号信息",notes = "")
|
||||
|
// @ApiImplicitParams({
|
||||
|
// })
|
||||
|
// @RequestMapping(value="/account",method = RequestMethod.POST,produces = {"application/json;charset=UTF-8"})
|
||||
|
// public JsonResponse updateAccount(HttpServletRequest request,@ApiParam @RequestBody UserDto.Account account) throws Exception {
|
||||
|
// userService.updateAccount(account);
|
||||
|
// return JsonResponse.newInstance().ok();
|
||||
|
// }
|
||||
|
|
||||
|
|
||||
|
@ApiOperation(value = "/微信合并已有账号",notes = "") |
||||
|
@ApiImplicitParams({ |
||||
|
}) |
||||
|
@RequestMapping(value="/merge",method = RequestMethod.POST,produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse<UserVo.TokenBean> bindingPhone(HttpServletRequest request, |
||||
|
@ApiParam @RequestBody UserDto.WxMergePhone wxPhone) throws Exception { |
||||
|
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); |
||||
|
UserVo.UserSign userSignVo = userService.mergeByPhone(currentUserId,wxPhone); |
||||
|
|
||||
|
UserVo.TokenBean tokenBean = null; |
||||
|
if (ObjectUtil.isNotNull(userSignVo)) { |
||||
|
WebConstant.CLIENT_TYPE clientType = WebConstant.CLIENT_TYPE.valueOf(1); |
||||
|
WebConstant.IDENTIFY_TYPE identifyType = WebConstant.IDENTIFY_TYPE.valueOf(3); |
||||
|
Map<String, Object> theMap = CollectionUtil.newHashMap(); |
||||
|
theMap.put("authId", String.valueOf(userSignVo.getAuthId())); |
||||
|
tokenBean = userService.getUserInfoAndToken(clientType, identifyType,userSignVo, theMap); |
||||
|
} |
||||
|
return JsonResponse.newInstance().ok(tokenBean); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "/微信绑定账号",notes = "") |
||||
|
@ApiImplicitParams({ |
||||
|
}) |
||||
|
@RequestMapping(value="/binding",method = RequestMethod.POST,produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse<UserVo.TokenBean> bindingPhone(HttpServletRequest request, |
||||
|
@ApiParam @RequestBody UserDto.WxBindingPhone wxPhone) throws Exception { |
||||
|
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); |
||||
|
UserVo.UserSign userSignVo = userService.bindingNewPhone(currentUserId,wxPhone); |
||||
|
|
||||
|
UserVo.TokenBean tokenBean = null; |
||||
|
if (ObjectUtil.isNotNull(userSignVo)) { |
||||
|
WebConstant.CLIENT_TYPE clientType = WebConstant.CLIENT_TYPE.valueOf(1); |
||||
|
WebConstant.IDENTIFY_TYPE identifyType = WebConstant.IDENTIFY_TYPE.valueOf(3); |
||||
|
Map<String, Object> theMap = CollectionUtil.newHashMap(); |
||||
|
theMap.put("authId", String.valueOf(userSignVo.getAuthId())); |
||||
|
tokenBean = userService.getUserInfoAndToken(clientType,identifyType, userSignVo, theMap); |
||||
|
} |
||||
|
return JsonResponse.newInstance().ok(tokenBean); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "/更改绑定手机", notes = "") |
||||
|
@ApiImplicitParams({ |
||||
|
}) |
||||
|
@RequestMapping(value = "/upPhone", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse updatePhone(HttpServletRequest request, |
||||
|
@ApiParam @RequestBody UserDto.UpdatePhone updatePhone) throws Exception { |
||||
|
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); |
||||
|
userService.updatePhone(currentUserId, updatePhone); |
||||
|
return JsonResponse.newInstance().ok(); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "/修改用户信息", notes = "") |
||||
|
@ApiImplicitParams({ |
||||
|
}) |
||||
|
@RequestMapping(value = "/userInfo", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse<UserVo.WxInfo> updateUserInfo(HttpServletRequest request, |
||||
|
@ApiParam @RequestBody UserDto.WxInfo userInfo) throws Exception { |
||||
|
log.info("修改用户信息,{}",userInfo); |
||||
|
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); |
||||
|
UserVo.WxInfo wxInfo = userService.updateUserInfo(currentUserId, userInfo); |
||||
|
return JsonResponse.newInstance().ok(wxInfo); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "通过手机号修改密码", notes = "") |
||||
|
@ApiImplicitParams({ |
||||
|
}) |
||||
|
@RequestMapping(value = "/password", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse updatePassword(HttpServletRequest request, |
||||
|
@ApiParam @Validated @RequestBody UserDto.UpdatePassword passwordDto) throws Exception { |
||||
|
userService.updatePassword(passwordDto); |
||||
|
return JsonResponse.newInstance().ok(); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "通过账号密码修改密码", notes = "") |
||||
|
@ApiImplicitParams({ |
||||
|
}) |
||||
|
@RequestMapping(value = "/password/account", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse updatePasswordByAccount(HttpServletRequest request, |
||||
|
@ApiParam @Validated @RequestBody UserDto.UpdatePasswordByAccount passwordDto) throws Exception { |
||||
|
userService.updatePasswordByAccount(passwordDto); |
||||
|
return JsonResponse.newInstance().ok(); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "解绑手机号", notes = "") |
||||
|
@ApiImplicitParams({ |
||||
|
}) |
||||
|
@RequestMapping(value = "/relievePhone", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse relievePhone(HttpServletRequest request, |
||||
|
@ApiParam @Validated @RequestBody UserDto.WxBindingPhone phoneInfo) throws Exception { |
||||
|
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); |
||||
|
userService.relievePhone(currentUserId,phoneInfo); |
||||
|
return JsonResponse.newInstance().ok(); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "直接更改手机号(不用输入密码)", notes = "") |
||||
|
@ApiImplicitParams({ |
||||
|
}) |
||||
|
@RequestMapping(value = "/changePhone", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse changePhone(HttpServletRequest request, |
||||
|
@ApiParam @Validated @RequestBody UserDto.WxBindingPhone phoneInfo) throws Exception { |
||||
|
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); |
||||
|
UserVo.UserSign userSignVo = userService.changePhoneNotPassword(currentUserId,phoneInfo); |
||||
|
UserVo.TokenBean tokenBean = null; |
||||
|
if (ObjectUtil.isNotNull(userSignVo)) { |
||||
|
WebConstant.CLIENT_TYPE clientType = WebConstant.CLIENT_TYPE.valueOf(1); |
||||
|
WebConstant.IDENTIFY_TYPE identifyType = WebConstant.IDENTIFY_TYPE.valueOf(3); |
||||
|
Map<String, Object> theMap = CollectionUtil.newHashMap(); |
||||
|
theMap.put("authId", String.valueOf(userSignVo.getAuthId())); |
||||
|
tokenBean = userService.getUserInfoAndToken(clientType, identifyType,userSignVo, theMap); |
||||
|
} |
||||
|
return JsonResponse.newInstance().ok(tokenBean); |
||||
|
} |
||||
|
|
||||
|
// @ApiOperation(value = "查询用户是否关注某个项目",notes = "")
|
||||
|
// @ApiImplicitParams({
|
||||
|
// @ApiImplicitParam(name="projectId",value = "projectId",required = true,paramType = "query")
|
||||
|
// })
|
||||
|
// @RequestMapping(value = "/attention",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"})
|
||||
|
// public JsonResponse<UserVo.TokenToUserId> getIsAttention(HttpServletRequest request,
|
||||
|
// @RequestParam(required = true) Long projectId) throws Exception {
|
||||
|
// Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject());
|
||||
|
//
|
||||
|
// Boolean isAttention = userService.getIsAttention(currentUserId,projectId);
|
||||
|
// return JsonResponse.newInstance().ok(isAttention);
|
||||
|
// }
|
||||
|
|
||||
|
// @ApiOperation(value = "用户关注项目",notes = "")
|
||||
|
// @ApiImplicitParams({
|
||||
|
// @ApiImplicitParam(name="projectId",value = "projectId",required = true,paramType = "query")
|
||||
|
// })
|
||||
|
// @RequestMapping(value = "/attention",method = RequestMethod.POST,produces = {"application/json;charset=UTF-8"})
|
||||
|
// public JsonResponse<UserVo.TokenToUserId> userAttentionProject(HttpServletRequest request,
|
||||
|
// @ApiParam @Validated @RequestBody ProjectDto.ProjectIdDto projectIdDto) throws Exception {
|
||||
|
// Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject());
|
||||
|
// userService.userAttentionProject(currentUserId,projectIdDto);
|
||||
|
// return JsonResponse.newInstance().ok();
|
||||
|
// }
|
||||
|
|
||||
|
@ApiOperation(value = "输入两个userid将两个账号合并(保留企业用户的id)",notes = "") |
||||
|
@ApiImplicitParams({ |
||||
|
@ApiImplicitParam(name="userId",value = "需要保留的userId",required = true,paramType = "query"), |
||||
|
@ApiImplicitParam(name="uselessId",value = "不需要保留的userId",required = true,paramType = "query") |
||||
|
}) |
||||
|
@RequestMapping(value = "/mergeUserId",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse mergeUserId(HttpServletRequest request, |
||||
|
@RequestParam(required = true) Long userId,Long uselessId) throws Exception { |
||||
|
userService.mergeUserId(userId,uselessId); |
||||
|
return JsonResponse.newInstance().ok(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@ApiOperation(value = "通过userId获取token",notes = "") |
||||
|
@ApiImplicitParams({ |
||||
|
@ApiImplicitParam(name="userId",value = "用户id",required = true,paramType = "query") |
||||
|
}) |
||||
|
@RequestMapping(value = "/userId",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse<UserVo.TokenBean> getTokenByUserId(HttpServletRequest request, |
||||
|
@RequestParam(required = true) Long userId) throws Exception { |
||||
|
|
||||
|
UserVo.TokenBean tokenBean = userService.getTokenByUserId(userId); |
||||
|
return JsonResponse.newInstance().ok(tokenBean); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/*===============================================================================================*/ |
||||
|
@ApiOperation(value = "根据token获取userId",notes = "") |
||||
|
@ApiImplicitParams({ |
||||
|
@ApiImplicitParam(name="token",value = "token",required = true,paramType = "query") |
||||
|
}) |
||||
|
@RequestMapping(value = "claims",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"}) |
||||
|
public String getNodeMessage(@RequestParam(required = true) String token) throws Exception { |
||||
|
log.info("根据token获取userId,token:{}",token); |
||||
|
//验证token是否有效
|
||||
|
String userId = null; |
||||
|
Claims claims = null; |
||||
|
boolean flag = false; |
||||
|
if (token != null) { |
||||
|
try { |
||||
|
claims = JwtUtil.parseJWT(token, WebConstant.JWT_ACCESS_TOKEN_SECERT); |
||||
|
flag = true; |
||||
|
}catch(SignatureException e){ |
||||
|
flag = false; |
||||
|
}catch(ExpiredJwtException e){ |
||||
|
flag = false; |
||||
|
}catch(Exception e){ |
||||
|
e.printStackTrace(); |
||||
|
flag = false; |
||||
|
} |
||||
|
} |
||||
|
if(flag){ |
||||
|
userId = claims.getSubject(); |
||||
|
} |
||||
|
return userId; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@ApiOperation(value = "根据token字符串获取userId",notes = "") |
||||
|
@ApiImplicitParams({ |
||||
|
@ApiImplicitParam(name="token",value = "token",required = true,paramType = "query") |
||||
|
}) |
||||
|
@RequestMapping(value = "token",method = RequestMethod.GET,produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse<UserVo.TokenToUserId> getUserByToken(@RequestParam(required = true) String token) throws Exception { |
||||
|
long start = System.currentTimeMillis(); |
||||
|
UserVo.TokenToUserId tokenToUserId = new UserVo.TokenToUserId(); |
||||
|
|
||||
|
// 验证token是否存在
|
||||
|
String tokenStr = token; |
||||
|
if (tokenStr == null || !tokenStr.startsWith(WebConstant.HEADER_KEY_TOKEN_PREFIX)) { |
||||
|
return JsonResponse.newInstance().ok(CodeEnum.NOT_LOGIN); |
||||
|
} |
||||
|
String userToken = tokenStr.substring(WebConstant.HEADER_KEY_TOKEN_PREFIX.length()); |
||||
|
|
||||
|
//验证token是否有效
|
||||
|
Claims claims = null; |
||||
|
try { |
||||
|
claims = JwtUtil.parseJWT(userToken, WebConstant.JWT_ACCESS_TOKEN_SECERT); |
||||
|
}catch(Exception e){ |
||||
|
return JsonResponse.newInstance().ok(CodeEnum.NOT_LOGIN); |
||||
|
} |
||||
|
//验证用户存根
|
||||
|
if(userService.tokenNotExistInCache(Long.valueOf(claims.getSubject()))){ |
||||
|
return JsonResponse.newInstance().ok(CodeEnum.NOT_LOGIN); |
||||
|
} |
||||
|
// //验证用户是否禁用
|
||||
|
// SysUser user = userService.getUserById(Long.valueOf(claims.getSubject()));
|
||||
|
// if(user.getRecStatus() == WebConstant.REC_STATUS.Disabled.value){
|
||||
|
// return JsonResponse.newInstance().ok(CodeEnum.NOT_LOGIN);
|
||||
|
// }
|
||||
|
|
||||
|
tokenToUserId.setId(Long.valueOf(claims.getSubject())); |
||||
|
long end = System.currentTimeMillis(); |
||||
|
log.info("根据token查找userId用时:{}",end - start); |
||||
|
return JsonResponse.newInstance().ok(tokenToUserId); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
// /**
|
||||
|
// * 查询user在项目中的member信息
|
||||
|
// */
|
||||
|
// @RequestMapping(value = "member", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
|
||||
|
// public JsonResponse<MemberVo.MemberInfo> getMemberByUserIdAndProjectId( Long userId,Long projectId) throws Exception {
|
||||
|
//
|
||||
|
// MemberVo.MemberInfo memberInfo = proMemberService.getMemberByUserIdAndProjectId(userId,projectId);
|
||||
|
// return JsonResponse.newInstance().ok(memberInfo);
|
||||
|
// }
|
||||
|
|
||||
|
|
||||
|
// /**
|
||||
|
// * 查询user在项目中的member信息
|
||||
|
// */
|
||||
|
// @RequestMapping(value = "memberByTask", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
|
||||
|
// public JsonResponse<MemberVo.MemberInfo> getMemberByUserIdAndTaskId( Long userId,Long taskId) throws Exception {
|
||||
|
// log.info("根据任务ID和用户ID查询用户信息:{}-{}", userId, taskId);
|
||||
|
// MemberVo.MemberInfo memberInfo = proMemberService.getMemberByUserIdAndTaskId(userId,taskId);
|
||||
|
// log.info("用户信息:{}", memberInfo);
|
||||
|
// return JsonResponse.newInstance().ok(memberInfo);
|
||||
|
// }
|
||||
|
|
||||
|
// /**
|
||||
|
// * 查询user的信息
|
||||
|
// */
|
||||
|
// @RequestMapping(value = "getUserInfo", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
|
||||
|
// public JsonResponse<MemberVo.MemberInfo> getUserInfoByUserId(Long userId) throws Exception {
|
||||
|
//
|
||||
|
// MemberVo.MemberInfo memberInfo = proMemberService.getUserInfoByUserId(userId);
|
||||
|
// return JsonResponse.newInstance().ok(memberInfo);
|
||||
|
// }
|
||||
|
|
||||
|
// /**
|
||||
|
// * 获取项目下的所有成员ID
|
||||
|
// */
|
||||
|
// @RequestMapping(value = "allMemberAll", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"})
|
||||
|
// public List<Long> getMemberIdByProjectId(Long projectId) throws Exception {
|
||||
|
//
|
||||
|
// List<Long> memberIdInfo = proMemberService.getMemberIdByProjectId(projectId);
|
||||
|
// return memberIdInfo;
|
||||
|
// }
|
||||
|
|
||||
|
@ApiOperation(value = "图片验证码") |
||||
|
@ApiImplicitParams({ |
||||
|
}) |
||||
|
@RequestMapping(value = "/code", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse<UserVo.VerificationCode> vertifyCode(HttpServletRequest request, HttpServletResponse response) throws Exception { |
||||
|
UserVo.VerificationCode vertifyCode = userService.getVertifyCode(); |
||||
|
// ImageCodeGeneratorUtil.generateCodeImage(response.getOutputStream(), (String) codeMap.get("imageCode"), 200, 70);
|
||||
|
return JsonResponse.newInstance().ok(vertifyCode); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
@ -0,0 +1,89 @@ |
|||||
|
package com.ccsens.signin.api; |
||||
|
|
||||
|
import com.ccsens.signin.bean.dto.UserDto; |
||||
|
import com.ccsens.signin.bean.vo.UserVo; |
||||
|
import com.ccsens.signin.service.IUserInfoService; |
||||
|
import com.ccsens.util.JsonResponse; |
||||
|
import com.ccsens.util.WebConstant; |
||||
|
import io.jsonwebtoken.Claims; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiImplicitParams; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import io.swagger.annotations.ApiParam; |
||||
|
import org.springframework.validation.annotation.Validated; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
import javax.servlet.http.HttpServletRequest; |
||||
|
import javax.servlet.http.Part; |
||||
|
|
||||
|
/** |
||||
|
* @author 逗 |
||||
|
*/ |
||||
|
@Api(tags = "用户详细信息操作API") |
||||
|
@RestController |
||||
|
@RequestMapping("/users/info") |
||||
|
public class UserInfoController { |
||||
|
@Resource |
||||
|
private IUserInfoService userInfoService; |
||||
|
|
||||
|
@ApiOperation(value = "修改登录账号") |
||||
|
@ApiImplicitParams({ |
||||
|
}) |
||||
|
@RequestMapping(value = "/account", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse updateAccount(HttpServletRequest request, |
||||
|
@ApiParam @Validated @RequestBody UserDto.UpdateAccount updateAccount) throws Exception { |
||||
|
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); |
||||
|
userInfoService.updateAccount(currentUserId, updateAccount); |
||||
|
return JsonResponse.newInstance().ok(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@ApiOperation(value = "修改昵称") |
||||
|
@ApiImplicitParams({ |
||||
|
}) |
||||
|
@RequestMapping(value = "/nickname", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse updateNickname(HttpServletRequest request, |
||||
|
@ApiParam @Validated @RequestBody UserDto.UpdateNickname updateNickname) throws Exception { |
||||
|
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); |
||||
|
userInfoService.updateNickname(currentUserId, updateNickname); |
||||
|
return JsonResponse.newInstance().ok(); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "上传头像") |
||||
|
@ApiImplicitParams({ |
||||
|
}) |
||||
|
@RequestMapping(value = "/avatarUrl", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse uploadAvatarUrl(HttpServletRequest request, |
||||
|
@RequestParam(required = true) Part file) throws Exception { |
||||
|
|
||||
|
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); |
||||
|
userInfoService.uploadAvatarUrl(currentUserId,file); |
||||
|
return JsonResponse.newInstance().ok(); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "查找用户详细信息") |
||||
|
@ApiImplicitParams({ |
||||
|
}) |
||||
|
@RequestMapping(value = "", method = RequestMethod.GET, produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse<UserVo.SelectUserInfo> selectUserInfo(HttpServletRequest request) throws Exception { |
||||
|
|
||||
|
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); |
||||
|
UserVo.SelectUserInfo selectUserInfo = userInfoService.selectUserInfo(currentUserId); |
||||
|
return JsonResponse.newInstance().ok(selectUserInfo); |
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "修改用户详细信息") |
||||
|
@ApiImplicitParams({ |
||||
|
}) |
||||
|
@RequestMapping(value = "", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse<UserVo.SelectUserInfo> updateUserInfo(HttpServletRequest request, |
||||
|
@ApiParam @Validated @RequestBody UserDto.UpdateUserInfo updateUserInfo) throws Exception { |
||||
|
|
||||
|
Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); |
||||
|
UserVo.SelectUserInfo selectUserInfo = userInfoService.updateUserInfo(currentUserId,updateUserInfo); |
||||
|
return JsonResponse.newInstance().ok(selectUserInfo); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,214 @@ |
|||||
|
package com.ccsens.signin.bean.dto; |
||||
|
|
||||
|
import com.ccsens.util.WebConstant; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotEmpty; |
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import javax.validation.constraints.Pattern; |
||||
|
|
||||
|
/** |
||||
|
* @author 逗 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class UserDto { |
||||
|
@Data |
||||
|
@ApiModel |
||||
|
public static class UserSginin{ |
||||
|
@lombok.Data |
||||
|
@ApiModel |
||||
|
public static class Data{ |
||||
|
@ApiModelProperty("用户标识|用户名") |
||||
|
@NotEmpty(message = "identifier is required.") |
||||
|
private String identifier; |
||||
|
@ApiModelProperty("用户凭据|密码") |
||||
|
private String credential; |
||||
|
} |
||||
|
@ApiModelProperty("登录客户端:0-wxmp,1-H5,2-Android,3-IOS,4-WxEnterprise") |
||||
|
@NotNull(message = "client is required.") |
||||
|
private Integer client; |
||||
|
@ApiModelProperty("登录类型:0-wxmp,1-phone,2-email,3-accounts,4-OAUTH2_Wx,5-Wx_H5,6-OAUTH2_WeiBo, 7-Wx_Enterprise") |
||||
|
@NotNull(message = "type is required.") |
||||
|
private Integer type; |
||||
|
@ApiModelProperty("登录信息") |
||||
|
private Data data; |
||||
|
@ApiModelProperty("通知消息") |
||||
|
private String redirect; |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel |
||||
|
public static class UpdatePhone{ |
||||
|
@ApiModelProperty("旧手机号") |
||||
|
private String oldPhone; |
||||
|
@ApiModelProperty("密码") |
||||
|
private String password; |
||||
|
@ApiModelProperty("新手机号") |
||||
|
private String newPhone; |
||||
|
@ApiModelProperty("新手机号的验证码") |
||||
|
private String code; |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel |
||||
|
public static class Account{ |
||||
|
@ApiModelProperty("用户id") |
||||
|
private Long id; |
||||
|
@ApiModelProperty("用户名") |
||||
|
private String username; |
||||
|
@ApiModelProperty("密码") |
||||
|
private String password; |
||||
|
} |
||||
|
@Data |
||||
|
@ApiModel |
||||
|
public static class UpdatePassword{ |
||||
|
@ApiModelProperty("手机号") |
||||
|
@NotEmpty(message = "手机号不能为空") |
||||
|
@Pattern(regexp="^[1]([3-9])[0-9]{9}$",message="请输入正确的手机号") |
||||
|
private String phone; |
||||
|
@ApiModelProperty("验证码") |
||||
|
@NotEmpty(message = "验证码不能为空.") |
||||
|
private String code; |
||||
|
@ApiModelProperty("密码") |
||||
|
@NotEmpty(message = "密码不能为空") |
||||
|
@Pattern(regexp="^[a-zA-Z0-9._-]{6,20}$",message="密码长度需在6~20之间,不能使用汉字,不能包含特殊字符") |
||||
|
private String password; |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("通过账号修改密码") |
||||
|
public static class UpdatePasswordByAccount{ |
||||
|
@ApiModelProperty("账号") |
||||
|
@NotEmpty(message = "账号不能为空") |
||||
|
private String account; |
||||
|
@ApiModelProperty("旧密码") |
||||
|
@NotEmpty(message = "旧密码不能为空.") |
||||
|
@Pattern(regexp="^[a-zA-Z0-9._-]{6,20}$",message="密码长度需在6~20之间,不能使用汉字,不能包含特殊字符") |
||||
|
private String passwordOld; |
||||
|
@ApiModelProperty("新密码") |
||||
|
@NotEmpty(message = "新密码不能为空") |
||||
|
@Pattern(regexp="^[a-zA-Z0-9._-]{6,20}$",message="密码长度需在6~20之间,不能使用汉字,不能包含特殊字符") |
||||
|
private String passwordNew; |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("手机号注册") |
||||
|
public static class UserSignup{ |
||||
|
@ApiModelProperty("手机号") |
||||
|
@NotEmpty(message = "手机号不能为空") |
||||
|
@Pattern(regexp="^[1]([3-9])[0-9]{9}$",message="请输入正确的手机号") |
||||
|
private String phone; |
||||
|
@ApiModelProperty("验证码") |
||||
|
@NotEmpty(message = "验证码不能为空.") |
||||
|
private String smsCode; |
||||
|
@ApiModelProperty("账号") |
||||
|
@NotEmpty(message = "账号不能为空.") |
||||
|
@Pattern(regexp="^[a-zA-Z0-9._-]{2,20}$",message="账号长度需在2~20之间,不能使用汉字,不能包含特殊字符") |
||||
|
private String account; |
||||
|
@ApiModelProperty("密码") |
||||
|
@NotEmpty(message = "密码不能为空") |
||||
|
@Pattern(regexp="^[a-zA-Z0-9._-]{6,20}$",message="密码长度需在6~20之间,不能使用汉字,不能包含特殊字符") |
||||
|
private String password; |
||||
|
@ApiModelProperty("来源 0:默认注册,1:跳绳") |
||||
|
private byte source = WebConstant.Regist.SOURCE; |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("注册") |
||||
|
public static class UserSignupSystem{ |
||||
|
@ApiModelProperty("账号") |
||||
|
private String account; |
||||
|
@ApiModelProperty("密码") |
||||
|
private String password; |
||||
|
} |
||||
|
@Data |
||||
|
@ApiModel |
||||
|
public static class WxMergePhone{ |
||||
|
@ApiModelProperty("手机号") |
||||
|
private String phone; |
||||
|
@ApiModelProperty("合并方式 0直接合并 1不合并以前的信息") |
||||
|
private int isMerge; |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel |
||||
|
public static class WxBindingPhone{ |
||||
|
@ApiModelProperty("手机号") |
||||
|
private String phone; |
||||
|
@ApiModelProperty("手机验证码") |
||||
|
private String smsCode; |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel |
||||
|
public static class WxInfo{ |
||||
|
// @ApiModelProperty("用户id")
|
||||
|
// private String userId;
|
||||
|
@ApiModelProperty("微信名") |
||||
|
private String nickname; |
||||
|
@ApiModelProperty("微信头像") |
||||
|
private String headImgUrl; |
||||
|
@ApiModelProperty("性别") |
||||
|
private Byte sex; |
||||
|
@ApiModelProperty("省") |
||||
|
private String province; |
||||
|
@ApiModelProperty("市") |
||||
|
private String city; |
||||
|
@ApiModelProperty("国家") |
||||
|
private String country; |
||||
|
@ApiModelProperty("语言") |
||||
|
private String language; |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("修改登录账号") |
||||
|
public static class UpdateAccount{ |
||||
|
@ApiModelProperty("手机号") |
||||
|
@NotEmpty(message = "手机号不能为空") |
||||
|
@Pattern(regexp="^[1]([3-9])[0-9]{9}$",message="请输入正确的手机号") |
||||
|
private String phone; |
||||
|
@ApiModelProperty("验证码") |
||||
|
@NotEmpty(message = "验证码不能为空.") |
||||
|
private String smsCode; |
||||
|
@ApiModelProperty("账号") |
||||
|
@NotEmpty(message = "新账号不能为空.") |
||||
|
private String account; |
||||
|
@ApiModelProperty("密码,有账号登录信息则验证密码,没有则设为新密码") |
||||
|
@NotEmpty(message = "密码不能为空") |
||||
|
private String password; |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("修改昵称") |
||||
|
public static class UpdateNickname{ |
||||
|
@ApiModelProperty("昵称") |
||||
|
@NotEmpty(message = "新昵称不能为空.") |
||||
|
private String nickname; |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("修改个人详细信息") |
||||
|
public static class UpdateUserInfo{ |
||||
|
@NotNull |
||||
|
@ApiModelProperty("userId") |
||||
|
private Long id; |
||||
|
@ApiModelProperty("昵称") |
||||
|
private String nickname; |
||||
|
@ApiModelProperty("个人签名") |
||||
|
private String signature; |
||||
|
@ApiModelProperty("个人简介") |
||||
|
private String introduction; |
||||
|
@ApiModelProperty("生日") |
||||
|
private String birthday; |
||||
|
@ApiModelProperty("所在地") |
||||
|
private String address; |
||||
|
@ApiModelProperty("网页") |
||||
|
private String webPath; |
||||
|
@ApiModelProperty("公司") |
||||
|
private String company; |
||||
|
@ApiModelProperty("职位") |
||||
|
private String position; |
||||
|
} |
||||
|
} |
@ -0,0 +1,128 @@ |
|||||
|
package com.ccsens.signin.bean.po; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
public class SysAuth implements Serializable { |
||||
|
private Long id; |
||||
|
|
||||
|
private Long userId; |
||||
|
|
||||
|
private Byte identifyType; |
||||
|
|
||||
|
private String identifier; |
||||
|
|
||||
|
private String credential; |
||||
|
|
||||
|
private String salt; |
||||
|
|
||||
|
private Date createdAt; |
||||
|
|
||||
|
private Date updatedAt; |
||||
|
|
||||
|
private Byte recStatus; |
||||
|
|
||||
|
private Byte registerType; |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
public Long getId() { |
||||
|
return id; |
||||
|
} |
||||
|
|
||||
|
public void setId(Long id) { |
||||
|
this.id = id; |
||||
|
} |
||||
|
|
||||
|
public Long getUserId() { |
||||
|
return userId; |
||||
|
} |
||||
|
|
||||
|
public void setUserId(Long userId) { |
||||
|
this.userId = userId; |
||||
|
} |
||||
|
|
||||
|
public Byte getIdentifyType() { |
||||
|
return identifyType; |
||||
|
} |
||||
|
|
||||
|
public void setIdentifyType(Byte identifyType) { |
||||
|
this.identifyType = identifyType; |
||||
|
} |
||||
|
|
||||
|
public String getIdentifier() { |
||||
|
return identifier; |
||||
|
} |
||||
|
|
||||
|
public void setIdentifier(String identifier) { |
||||
|
this.identifier = identifier == null ? null : identifier.trim(); |
||||
|
} |
||||
|
|
||||
|
public String getCredential() { |
||||
|
return credential; |
||||
|
} |
||||
|
|
||||
|
public void setCredential(String credential) { |
||||
|
this.credential = credential == null ? null : credential.trim(); |
||||
|
} |
||||
|
|
||||
|
public String getSalt() { |
||||
|
return salt; |
||||
|
} |
||||
|
|
||||
|
public void setSalt(String salt) { |
||||
|
this.salt = salt == null ? null : salt.trim(); |
||||
|
} |
||||
|
|
||||
|
public Date getCreatedAt() { |
||||
|
return createdAt; |
||||
|
} |
||||
|
|
||||
|
public void setCreatedAt(Date createdAt) { |
||||
|
this.createdAt = createdAt; |
||||
|
} |
||||
|
|
||||
|
public Date getUpdatedAt() { |
||||
|
return updatedAt; |
||||
|
} |
||||
|
|
||||
|
public void setUpdatedAt(Date updatedAt) { |
||||
|
this.updatedAt = updatedAt; |
||||
|
} |
||||
|
|
||||
|
public Byte getRecStatus() { |
||||
|
return recStatus; |
||||
|
} |
||||
|
|
||||
|
public void setRecStatus(Byte recStatus) { |
||||
|
this.recStatus = recStatus; |
||||
|
} |
||||
|
|
||||
|
public Byte getRegisterType() { |
||||
|
return registerType; |
||||
|
} |
||||
|
|
||||
|
public void setRegisterType(Byte registerType) { |
||||
|
this.registerType = registerType; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String toString() { |
||||
|
StringBuilder sb = new StringBuilder(); |
||||
|
sb.append(getClass().getSimpleName()); |
||||
|
sb.append(" ["); |
||||
|
sb.append("Hash = ").append(hashCode()); |
||||
|
sb.append(", id=").append(id); |
||||
|
sb.append(", userId=").append(userId); |
||||
|
sb.append(", identifyType=").append(identifyType); |
||||
|
sb.append(", identifier=").append(identifier); |
||||
|
sb.append(", credential=").append(credential); |
||||
|
sb.append(", salt=").append(salt); |
||||
|
sb.append(", createdAt=").append(createdAt); |
||||
|
sb.append(", updatedAt=").append(updatedAt); |
||||
|
sb.append(", recStatus=").append(recStatus); |
||||
|
sb.append(", registerType=").append(registerType); |
||||
|
sb.append("]"); |
||||
|
return sb.toString(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,831 @@ |
|||||
|
package com.ccsens.signin.bean.po; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
public class SysAuthExample { |
||||
|
protected String orderByClause; |
||||
|
|
||||
|
protected boolean distinct; |
||||
|
|
||||
|
protected List<Criteria> oredCriteria; |
||||
|
|
||||
|
public SysAuthExample() { |
||||
|
oredCriteria = new ArrayList<Criteria>(); |
||||
|
} |
||||
|
|
||||
|
public void setOrderByClause(String orderByClause) { |
||||
|
this.orderByClause = orderByClause; |
||||
|
} |
||||
|
|
||||
|
public String getOrderByClause() { |
||||
|
return orderByClause; |
||||
|
} |
||||
|
|
||||
|
public void setDistinct(boolean distinct) { |
||||
|
this.distinct = distinct; |
||||
|
} |
||||
|
|
||||
|
public boolean isDistinct() { |
||||
|
return distinct; |
||||
|
} |
||||
|
|
||||
|
public List<Criteria> getOredCriteria() { |
||||
|
return oredCriteria; |
||||
|
} |
||||
|
|
||||
|
public void or(Criteria criteria) { |
||||
|
oredCriteria.add(criteria); |
||||
|
} |
||||
|
|
||||
|
public Criteria or() { |
||||
|
Criteria criteria = createCriteriaInternal(); |
||||
|
oredCriteria.add(criteria); |
||||
|
return criteria; |
||||
|
} |
||||
|
|
||||
|
public Criteria createCriteria() { |
||||
|
Criteria criteria = createCriteriaInternal(); |
||||
|
if (oredCriteria.size() == 0) { |
||||
|
oredCriteria.add(criteria); |
||||
|
} |
||||
|
return criteria; |
||||
|
} |
||||
|
|
||||
|
protected Criteria createCriteriaInternal() { |
||||
|
Criteria criteria = new Criteria(); |
||||
|
return criteria; |
||||
|
} |
||||
|
|
||||
|
public void clear() { |
||||
|
oredCriteria.clear(); |
||||
|
orderByClause = null; |
||||
|
distinct = false; |
||||
|
} |
||||
|
|
||||
|
protected abstract static class GeneratedCriteria { |
||||
|
protected List<Criterion> criteria; |
||||
|
|
||||
|
protected GeneratedCriteria() { |
||||
|
super(); |
||||
|
criteria = new ArrayList<Criterion>(); |
||||
|
} |
||||
|
|
||||
|
public boolean isValid() { |
||||
|
return criteria.size() > 0; |
||||
|
} |
||||
|
|
||||
|
public List<Criterion> getAllCriteria() { |
||||
|
return criteria; |
||||
|
} |
||||
|
|
||||
|
public List<Criterion> getCriteria() { |
||||
|
return criteria; |
||||
|
} |
||||
|
|
||||
|
protected void addCriterion(String condition) { |
||||
|
if (condition == null) { |
||||
|
throw new RuntimeException("Value for condition cannot be null"); |
||||
|
} |
||||
|
criteria.add(new Criterion(condition)); |
||||
|
} |
||||
|
|
||||
|
protected void addCriterion(String condition, Object value, String property) { |
||||
|
if (value == null) { |
||||
|
throw new RuntimeException("Value for " + property + " cannot be null"); |
||||
|
} |
||||
|
criteria.add(new Criterion(condition, value)); |
||||
|
} |
||||
|
|
||||
|
protected void addCriterion(String condition, Object value1, Object value2, String property) { |
||||
|
if (value1 == null || value2 == null) { |
||||
|
throw new RuntimeException("Between values for " + property + " cannot be null"); |
||||
|
} |
||||
|
criteria.add(new Criterion(condition, value1, value2)); |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdIsNull() { |
||||
|
addCriterion("id is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdIsNotNull() { |
||||
|
addCriterion("id is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdEqualTo(Long value) { |
||||
|
addCriterion("id =", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdNotEqualTo(Long value) { |
||||
|
addCriterion("id <>", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdGreaterThan(Long value) { |
||||
|
addCriterion("id >", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdGreaterThanOrEqualTo(Long value) { |
||||
|
addCriterion("id >=", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdLessThan(Long value) { |
||||
|
addCriterion("id <", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdLessThanOrEqualTo(Long value) { |
||||
|
addCriterion("id <=", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdIn(List<Long> values) { |
||||
|
addCriterion("id in", values, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdNotIn(List<Long> values) { |
||||
|
addCriterion("id not in", values, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdBetween(Long value1, Long value2) { |
||||
|
addCriterion("id between", value1, value2, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdNotBetween(Long value1, Long value2) { |
||||
|
addCriterion("id not between", value1, value2, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdIsNull() { |
||||
|
addCriterion("user_id is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdIsNotNull() { |
||||
|
addCriterion("user_id is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdEqualTo(Long value) { |
||||
|
addCriterion("user_id =", value, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdNotEqualTo(Long value) { |
||||
|
addCriterion("user_id <>", value, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdGreaterThan(Long value) { |
||||
|
addCriterion("user_id >", value, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdGreaterThanOrEqualTo(Long value) { |
||||
|
addCriterion("user_id >=", value, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdLessThan(Long value) { |
||||
|
addCriterion("user_id <", value, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdLessThanOrEqualTo(Long value) { |
||||
|
addCriterion("user_id <=", value, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdIn(List<Long> values) { |
||||
|
addCriterion("user_id in", values, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdNotIn(List<Long> values) { |
||||
|
addCriterion("user_id not in", values, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdBetween(Long value1, Long value2) { |
||||
|
addCriterion("user_id between", value1, value2, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdNotBetween(Long value1, Long value2) { |
||||
|
addCriterion("user_id not between", value1, value2, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdentifyTypeIsNull() { |
||||
|
addCriterion("identify_type is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdentifyTypeIsNotNull() { |
||||
|
addCriterion("identify_type is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdentifyTypeEqualTo(Byte value) { |
||||
|
addCriterion("identify_type =", value, "identifyType"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdentifyTypeNotEqualTo(Byte value) { |
||||
|
addCriterion("identify_type <>", value, "identifyType"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdentifyTypeGreaterThan(Byte value) { |
||||
|
addCriterion("identify_type >", value, "identifyType"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdentifyTypeGreaterThanOrEqualTo(Byte value) { |
||||
|
addCriterion("identify_type >=", value, "identifyType"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdentifyTypeLessThan(Byte value) { |
||||
|
addCriterion("identify_type <", value, "identifyType"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdentifyTypeLessThanOrEqualTo(Byte value) { |
||||
|
addCriterion("identify_type <=", value, "identifyType"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdentifyTypeIn(List<Byte> values) { |
||||
|
addCriterion("identify_type in", values, "identifyType"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdentifyTypeNotIn(List<Byte> values) { |
||||
|
addCriterion("identify_type not in", values, "identifyType"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdentifyTypeBetween(Byte value1, Byte value2) { |
||||
|
addCriterion("identify_type between", value1, value2, "identifyType"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdentifyTypeNotBetween(Byte value1, Byte value2) { |
||||
|
addCriterion("identify_type not between", value1, value2, "identifyType"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdentifierIsNull() { |
||||
|
addCriterion("identifier is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdentifierIsNotNull() { |
||||
|
addCriterion("identifier is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdentifierEqualTo(String value) { |
||||
|
addCriterion("identifier =", value, "identifier"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdentifierNotEqualTo(String value) { |
||||
|
addCriterion("identifier <>", value, "identifier"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdentifierGreaterThan(String value) { |
||||
|
addCriterion("identifier >", value, "identifier"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdentifierGreaterThanOrEqualTo(String value) { |
||||
|
addCriterion("identifier >=", value, "identifier"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdentifierLessThan(String value) { |
||||
|
addCriterion("identifier <", value, "identifier"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdentifierLessThanOrEqualTo(String value) { |
||||
|
addCriterion("identifier <=", value, "identifier"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdentifierLike(String value) { |
||||
|
addCriterion("identifier like", value, "identifier"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdentifierNotLike(String value) { |
||||
|
addCriterion("identifier not like", value, "identifier"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdentifierIn(List<String> values) { |
||||
|
addCriterion("identifier in", values, "identifier"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdentifierNotIn(List<String> values) { |
||||
|
addCriterion("identifier not in", values, "identifier"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdentifierBetween(String value1, String value2) { |
||||
|
addCriterion("identifier between", value1, value2, "identifier"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdentifierNotBetween(String value1, String value2) { |
||||
|
addCriterion("identifier not between", value1, value2, "identifier"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCredentialIsNull() { |
||||
|
addCriterion("credential is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCredentialIsNotNull() { |
||||
|
addCriterion("credential is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCredentialEqualTo(String value) { |
||||
|
addCriterion("credential =", value, "credential"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCredentialNotEqualTo(String value) { |
||||
|
addCriterion("credential <>", value, "credential"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCredentialGreaterThan(String value) { |
||||
|
addCriterion("credential >", value, "credential"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCredentialGreaterThanOrEqualTo(String value) { |
||||
|
addCriterion("credential >=", value, "credential"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCredentialLessThan(String value) { |
||||
|
addCriterion("credential <", value, "credential"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCredentialLessThanOrEqualTo(String value) { |
||||
|
addCriterion("credential <=", value, "credential"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCredentialLike(String value) { |
||||
|
addCriterion("credential like", value, "credential"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCredentialNotLike(String value) { |
||||
|
addCriterion("credential not like", value, "credential"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCredentialIn(List<String> values) { |
||||
|
addCriterion("credential in", values, "credential"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCredentialNotIn(List<String> values) { |
||||
|
addCriterion("credential not in", values, "credential"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCredentialBetween(String value1, String value2) { |
||||
|
addCriterion("credential between", value1, value2, "credential"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCredentialNotBetween(String value1, String value2) { |
||||
|
addCriterion("credential not between", value1, value2, "credential"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSaltIsNull() { |
||||
|
addCriterion("salt is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSaltIsNotNull() { |
||||
|
addCriterion("salt is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSaltEqualTo(String value) { |
||||
|
addCriterion("salt =", value, "salt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSaltNotEqualTo(String value) { |
||||
|
addCriterion("salt <>", value, "salt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSaltGreaterThan(String value) { |
||||
|
addCriterion("salt >", value, "salt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSaltGreaterThanOrEqualTo(String value) { |
||||
|
addCriterion("salt >=", value, "salt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSaltLessThan(String value) { |
||||
|
addCriterion("salt <", value, "salt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSaltLessThanOrEqualTo(String value) { |
||||
|
addCriterion("salt <=", value, "salt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSaltLike(String value) { |
||||
|
addCriterion("salt like", value, "salt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSaltNotLike(String value) { |
||||
|
addCriterion("salt not like", value, "salt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSaltIn(List<String> values) { |
||||
|
addCriterion("salt in", values, "salt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSaltNotIn(List<String> values) { |
||||
|
addCriterion("salt not in", values, "salt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSaltBetween(String value1, String value2) { |
||||
|
addCriterion("salt between", value1, value2, "salt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSaltNotBetween(String value1, String value2) { |
||||
|
addCriterion("salt not between", value1, value2, "salt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtIsNull() { |
||||
|
addCriterion("created_at is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtIsNotNull() { |
||||
|
addCriterion("created_at is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtEqualTo(Date value) { |
||||
|
addCriterion("created_at =", value, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtNotEqualTo(Date value) { |
||||
|
addCriterion("created_at <>", value, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtGreaterThan(Date value) { |
||||
|
addCriterion("created_at >", value, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { |
||||
|
addCriterion("created_at >=", value, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtLessThan(Date value) { |
||||
|
addCriterion("created_at <", value, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtLessThanOrEqualTo(Date value) { |
||||
|
addCriterion("created_at <=", value, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtIn(List<Date> values) { |
||||
|
addCriterion("created_at in", values, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtNotIn(List<Date> values) { |
||||
|
addCriterion("created_at not in", values, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtBetween(Date value1, Date value2) { |
||||
|
addCriterion("created_at between", value1, value2, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtNotBetween(Date value1, Date value2) { |
||||
|
addCriterion("created_at not between", value1, value2, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtIsNull() { |
||||
|
addCriterion("updated_at is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtIsNotNull() { |
||||
|
addCriterion("updated_at is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtEqualTo(Date value) { |
||||
|
addCriterion("updated_at =", value, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtNotEqualTo(Date value) { |
||||
|
addCriterion("updated_at <>", value, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtGreaterThan(Date value) { |
||||
|
addCriterion("updated_at >", value, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { |
||||
|
addCriterion("updated_at >=", value, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtLessThan(Date value) { |
||||
|
addCriterion("updated_at <", value, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { |
||||
|
addCriterion("updated_at <=", value, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtIn(List<Date> values) { |
||||
|
addCriterion("updated_at in", values, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtNotIn(List<Date> values) { |
||||
|
addCriterion("updated_at not in", values, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtBetween(Date value1, Date value2) { |
||||
|
addCriterion("updated_at between", value1, value2, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { |
||||
|
addCriterion("updated_at not between", value1, value2, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusIsNull() { |
||||
|
addCriterion("rec_status is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusIsNotNull() { |
||||
|
addCriterion("rec_status is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusEqualTo(Byte value) { |
||||
|
addCriterion("rec_status =", value, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusNotEqualTo(Byte value) { |
||||
|
addCriterion("rec_status <>", value, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusGreaterThan(Byte value) { |
||||
|
addCriterion("rec_status >", value, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { |
||||
|
addCriterion("rec_status >=", value, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusLessThan(Byte value) { |
||||
|
addCriterion("rec_status <", value, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusLessThanOrEqualTo(Byte value) { |
||||
|
addCriterion("rec_status <=", value, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusIn(List<Byte> values) { |
||||
|
addCriterion("rec_status in", values, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusNotIn(List<Byte> values) { |
||||
|
addCriterion("rec_status not in", values, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusBetween(Byte value1, Byte value2) { |
||||
|
addCriterion("rec_status between", value1, value2, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { |
||||
|
addCriterion("rec_status not between", value1, value2, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRegisterTypeIsNull() { |
||||
|
addCriterion("register_type is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRegisterTypeIsNotNull() { |
||||
|
addCriterion("register_type is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRegisterTypeEqualTo(Byte value) { |
||||
|
addCriterion("register_type =", value, "registerType"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRegisterTypeNotEqualTo(Byte value) { |
||||
|
addCriterion("register_type <>", value, "registerType"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRegisterTypeGreaterThan(Byte value) { |
||||
|
addCriterion("register_type >", value, "registerType"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRegisterTypeGreaterThanOrEqualTo(Byte value) { |
||||
|
addCriterion("register_type >=", value, "registerType"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRegisterTypeLessThan(Byte value) { |
||||
|
addCriterion("register_type <", value, "registerType"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRegisterTypeLessThanOrEqualTo(Byte value) { |
||||
|
addCriterion("register_type <=", value, "registerType"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRegisterTypeIn(List<Byte> values) { |
||||
|
addCriterion("register_type in", values, "registerType"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRegisterTypeNotIn(List<Byte> values) { |
||||
|
addCriterion("register_type not in", values, "registerType"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRegisterTypeBetween(Byte value1, Byte value2) { |
||||
|
addCriterion("register_type between", value1, value2, "registerType"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRegisterTypeNotBetween(Byte value1, Byte value2) { |
||||
|
addCriterion("register_type not between", value1, value2, "registerType"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public static class Criteria extends GeneratedCriteria { |
||||
|
|
||||
|
protected Criteria() { |
||||
|
super(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public static class Criterion { |
||||
|
private String condition; |
||||
|
|
||||
|
private Object value; |
||||
|
|
||||
|
private Object secondValue; |
||||
|
|
||||
|
private boolean noValue; |
||||
|
|
||||
|
private boolean singleValue; |
||||
|
|
||||
|
private boolean betweenValue; |
||||
|
|
||||
|
private boolean listValue; |
||||
|
|
||||
|
private String typeHandler; |
||||
|
|
||||
|
public String getCondition() { |
||||
|
return condition; |
||||
|
} |
||||
|
|
||||
|
public Object getValue() { |
||||
|
return value; |
||||
|
} |
||||
|
|
||||
|
public Object getSecondValue() { |
||||
|
return secondValue; |
||||
|
} |
||||
|
|
||||
|
public boolean isNoValue() { |
||||
|
return noValue; |
||||
|
} |
||||
|
|
||||
|
public boolean isSingleValue() { |
||||
|
return singleValue; |
||||
|
} |
||||
|
|
||||
|
public boolean isBetweenValue() { |
||||
|
return betweenValue; |
||||
|
} |
||||
|
|
||||
|
public boolean isListValue() { |
||||
|
return listValue; |
||||
|
} |
||||
|
|
||||
|
public String getTypeHandler() { |
||||
|
return typeHandler; |
||||
|
} |
||||
|
|
||||
|
protected Criterion(String condition) { |
||||
|
super(); |
||||
|
this.condition = condition; |
||||
|
this.typeHandler = null; |
||||
|
this.noValue = true; |
||||
|
} |
||||
|
|
||||
|
protected Criterion(String condition, Object value, String typeHandler) { |
||||
|
super(); |
||||
|
this.condition = condition; |
||||
|
this.value = value; |
||||
|
this.typeHandler = typeHandler; |
||||
|
if (value instanceof List<?>) { |
||||
|
this.listValue = true; |
||||
|
} else { |
||||
|
this.singleValue = true; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
protected Criterion(String condition, Object value) { |
||||
|
this(condition, value, null); |
||||
|
} |
||||
|
|
||||
|
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { |
||||
|
super(); |
||||
|
this.condition = condition; |
||||
|
this.value = value; |
||||
|
this.secondValue = secondValue; |
||||
|
this.typeHandler = typeHandler; |
||||
|
this.betweenValue = true; |
||||
|
} |
||||
|
|
||||
|
protected Criterion(String condition, Object value, Object secondValue) { |
||||
|
this(condition, value, secondValue, null); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,205 @@ |
|||||
|
package com.ccsens.signin.bean.po; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
public class SysUser implements Serializable { |
||||
|
private Long id; |
||||
|
|
||||
|
private Long gradeId; |
||||
|
|
||||
|
private String avatarUrl; |
||||
|
|
||||
|
private String nickname; |
||||
|
|
||||
|
private Byte gender; |
||||
|
|
||||
|
private String country; |
||||
|
|
||||
|
private String province; |
||||
|
|
||||
|
private String city; |
||||
|
|
||||
|
private String language; |
||||
|
|
||||
|
private String phone; |
||||
|
|
||||
|
private String wechat; |
||||
|
|
||||
|
private String email; |
||||
|
|
||||
|
private Long balance; |
||||
|
|
||||
|
private Date createdAt; |
||||
|
|
||||
|
private Date updatedAt; |
||||
|
|
||||
|
private Byte recStatus; |
||||
|
|
||||
|
private Byte source; |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
public Long getId() { |
||||
|
return id; |
||||
|
} |
||||
|
|
||||
|
public void setId(Long id) { |
||||
|
this.id = id; |
||||
|
} |
||||
|
|
||||
|
public Long getGradeId() { |
||||
|
return gradeId; |
||||
|
} |
||||
|
|
||||
|
public void setGradeId(Long gradeId) { |
||||
|
this.gradeId = gradeId; |
||||
|
} |
||||
|
|
||||
|
public String getAvatarUrl() { |
||||
|
return avatarUrl; |
||||
|
} |
||||
|
|
||||
|
public void setAvatarUrl(String avatarUrl) { |
||||
|
this.avatarUrl = avatarUrl == null ? null : avatarUrl.trim(); |
||||
|
} |
||||
|
|
||||
|
public String getNickname() { |
||||
|
return nickname; |
||||
|
} |
||||
|
|
||||
|
public void setNickname(String nickname) { |
||||
|
this.nickname = nickname == null ? null : nickname.trim(); |
||||
|
} |
||||
|
|
||||
|
public Byte getGender() { |
||||
|
return gender; |
||||
|
} |
||||
|
|
||||
|
public void setGender(Byte gender) { |
||||
|
this.gender = gender; |
||||
|
} |
||||
|
|
||||
|
public String getCountry() { |
||||
|
return country; |
||||
|
} |
||||
|
|
||||
|
public void setCountry(String country) { |
||||
|
this.country = country == null ? null : country.trim(); |
||||
|
} |
||||
|
|
||||
|
public String getProvince() { |
||||
|
return province; |
||||
|
} |
||||
|
|
||||
|
public void setProvince(String province) { |
||||
|
this.province = province == null ? null : province.trim(); |
||||
|
} |
||||
|
|
||||
|
public String getCity() { |
||||
|
return city; |
||||
|
} |
||||
|
|
||||
|
public void setCity(String city) { |
||||
|
this.city = city == null ? null : city.trim(); |
||||
|
} |
||||
|
|
||||
|
public String getLanguage() { |
||||
|
return language; |
||||
|
} |
||||
|
|
||||
|
public void setLanguage(String language) { |
||||
|
this.language = language == null ? null : language.trim(); |
||||
|
} |
||||
|
|
||||
|
public String getPhone() { |
||||
|
return phone; |
||||
|
} |
||||
|
|
||||
|
public void setPhone(String phone) { |
||||
|
this.phone = phone == null ? null : phone.trim(); |
||||
|
} |
||||
|
|
||||
|
public String getWechat() { |
||||
|
return wechat; |
||||
|
} |
||||
|
|
||||
|
public void setWechat(String wechat) { |
||||
|
this.wechat = wechat == null ? null : wechat.trim(); |
||||
|
} |
||||
|
|
||||
|
public String getEmail() { |
||||
|
return email; |
||||
|
} |
||||
|
|
||||
|
public void setEmail(String email) { |
||||
|
this.email = email == null ? null : email.trim(); |
||||
|
} |
||||
|
|
||||
|
public Long getBalance() { |
||||
|
return balance; |
||||
|
} |
||||
|
|
||||
|
public void setBalance(Long balance) { |
||||
|
this.balance = balance; |
||||
|
} |
||||
|
|
||||
|
public Date getCreatedAt() { |
||||
|
return createdAt; |
||||
|
} |
||||
|
|
||||
|
public void setCreatedAt(Date createdAt) { |
||||
|
this.createdAt = createdAt; |
||||
|
} |
||||
|
|
||||
|
public Date getUpdatedAt() { |
||||
|
return updatedAt; |
||||
|
} |
||||
|
|
||||
|
public void setUpdatedAt(Date updatedAt) { |
||||
|
this.updatedAt = updatedAt; |
||||
|
} |
||||
|
|
||||
|
public Byte getRecStatus() { |
||||
|
return recStatus; |
||||
|
} |
||||
|
|
||||
|
public void setRecStatus(Byte recStatus) { |
||||
|
this.recStatus = recStatus; |
||||
|
} |
||||
|
|
||||
|
public Byte getSource() { |
||||
|
return source; |
||||
|
} |
||||
|
|
||||
|
public void setSource(Byte source) { |
||||
|
this.source = source; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String toString() { |
||||
|
StringBuilder sb = new StringBuilder(); |
||||
|
sb.append(getClass().getSimpleName()); |
||||
|
sb.append(" ["); |
||||
|
sb.append("Hash = ").append(hashCode()); |
||||
|
sb.append(", id=").append(id); |
||||
|
sb.append(", gradeId=").append(gradeId); |
||||
|
sb.append(", avatarUrl=").append(avatarUrl); |
||||
|
sb.append(", nickname=").append(nickname); |
||||
|
sb.append(", gender=").append(gender); |
||||
|
sb.append(", country=").append(country); |
||||
|
sb.append(", province=").append(province); |
||||
|
sb.append(", city=").append(city); |
||||
|
sb.append(", language=").append(language); |
||||
|
sb.append(", phone=").append(phone); |
||||
|
sb.append(", wechat=").append(wechat); |
||||
|
sb.append(", email=").append(email); |
||||
|
sb.append(", balance=").append(balance); |
||||
|
sb.append(", createdAt=").append(createdAt); |
||||
|
sb.append(", updatedAt=").append(updatedAt); |
||||
|
sb.append(", recStatus=").append(recStatus); |
||||
|
sb.append(", source=").append(source); |
||||
|
sb.append("]"); |
||||
|
return sb.toString(); |
||||
|
} |
||||
|
} |
File diff suppressed because it is too large
@ -0,0 +1,150 @@ |
|||||
|
package com.ccsens.signin.bean.po; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
public class SysUserInfo implements Serializable { |
||||
|
private Long id; |
||||
|
|
||||
|
private Long userId; |
||||
|
|
||||
|
private String signature; |
||||
|
|
||||
|
private String introduction; |
||||
|
|
||||
|
private String birthday; |
||||
|
|
||||
|
private String address; |
||||
|
|
||||
|
private String webPath; |
||||
|
|
||||
|
private String company; |
||||
|
|
||||
|
private String position; |
||||
|
|
||||
|
private Date createdAt; |
||||
|
|
||||
|
private Date updatedAt; |
||||
|
|
||||
|
private Byte recStatus; |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
public Long getId() { |
||||
|
return id; |
||||
|
} |
||||
|
|
||||
|
public void setId(Long id) { |
||||
|
this.id = id; |
||||
|
} |
||||
|
|
||||
|
public Long getUserId() { |
||||
|
return userId; |
||||
|
} |
||||
|
|
||||
|
public void setUserId(Long userId) { |
||||
|
this.userId = userId; |
||||
|
} |
||||
|
|
||||
|
public String getSignature() { |
||||
|
return signature; |
||||
|
} |
||||
|
|
||||
|
public void setSignature(String signature) { |
||||
|
this.signature = signature == null ? null : signature.trim(); |
||||
|
} |
||||
|
|
||||
|
public String getIntroduction() { |
||||
|
return introduction; |
||||
|
} |
||||
|
|
||||
|
public void setIntroduction(String introduction) { |
||||
|
this.introduction = introduction == null ? null : introduction.trim(); |
||||
|
} |
||||
|
|
||||
|
public String getBirthday() { |
||||
|
return birthday; |
||||
|
} |
||||
|
|
||||
|
public void setBirthday(String birthday) { |
||||
|
this.birthday = birthday == null ? null : birthday.trim(); |
||||
|
} |
||||
|
|
||||
|
public String getAddress() { |
||||
|
return address; |
||||
|
} |
||||
|
|
||||
|
public void setAddress(String address) { |
||||
|
this.address = address == null ? null : address.trim(); |
||||
|
} |
||||
|
|
||||
|
public String getWebPath() { |
||||
|
return webPath; |
||||
|
} |
||||
|
|
||||
|
public void setWebPath(String webPath) { |
||||
|
this.webPath = webPath == null ? null : webPath.trim(); |
||||
|
} |
||||
|
|
||||
|
public String getCompany() { |
||||
|
return company; |
||||
|
} |
||||
|
|
||||
|
public void setCompany(String company) { |
||||
|
this.company = company == null ? null : company.trim(); |
||||
|
} |
||||
|
|
||||
|
public String getPosition() { |
||||
|
return position; |
||||
|
} |
||||
|
|
||||
|
public void setPosition(String position) { |
||||
|
this.position = position == null ? null : position.trim(); |
||||
|
} |
||||
|
|
||||
|
public Date getCreatedAt() { |
||||
|
return createdAt; |
||||
|
} |
||||
|
|
||||
|
public void setCreatedAt(Date createdAt) { |
||||
|
this.createdAt = createdAt; |
||||
|
} |
||||
|
|
||||
|
public Date getUpdatedAt() { |
||||
|
return updatedAt; |
||||
|
} |
||||
|
|
||||
|
public void setUpdatedAt(Date updatedAt) { |
||||
|
this.updatedAt = updatedAt; |
||||
|
} |
||||
|
|
||||
|
public Byte getRecStatus() { |
||||
|
return recStatus; |
||||
|
} |
||||
|
|
||||
|
public void setRecStatus(Byte recStatus) { |
||||
|
this.recStatus = recStatus; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String toString() { |
||||
|
StringBuilder sb = new StringBuilder(); |
||||
|
sb.append(getClass().getSimpleName()); |
||||
|
sb.append(" ["); |
||||
|
sb.append("Hash = ").append(hashCode()); |
||||
|
sb.append(", id=").append(id); |
||||
|
sb.append(", userId=").append(userId); |
||||
|
sb.append(", signature=").append(signature); |
||||
|
sb.append(", introduction=").append(introduction); |
||||
|
sb.append(", birthday=").append(birthday); |
||||
|
sb.append(", address=").append(address); |
||||
|
sb.append(", webPath=").append(webPath); |
||||
|
sb.append(", company=").append(company); |
||||
|
sb.append(", position=").append(position); |
||||
|
sb.append(", createdAt=").append(createdAt); |
||||
|
sb.append(", updatedAt=").append(updatedAt); |
||||
|
sb.append(", recStatus=").append(recStatus); |
||||
|
sb.append("]"); |
||||
|
return sb.toString(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,991 @@ |
|||||
|
package com.ccsens.signin.bean.po; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
public class SysUserInfoExample { |
||||
|
protected String orderByClause; |
||||
|
|
||||
|
protected boolean distinct; |
||||
|
|
||||
|
protected List<Criteria> oredCriteria; |
||||
|
|
||||
|
public SysUserInfoExample() { |
||||
|
oredCriteria = new ArrayList<Criteria>(); |
||||
|
} |
||||
|
|
||||
|
public void setOrderByClause(String orderByClause) { |
||||
|
this.orderByClause = orderByClause; |
||||
|
} |
||||
|
|
||||
|
public String getOrderByClause() { |
||||
|
return orderByClause; |
||||
|
} |
||||
|
|
||||
|
public void setDistinct(boolean distinct) { |
||||
|
this.distinct = distinct; |
||||
|
} |
||||
|
|
||||
|
public boolean isDistinct() { |
||||
|
return distinct; |
||||
|
} |
||||
|
|
||||
|
public List<Criteria> getOredCriteria() { |
||||
|
return oredCriteria; |
||||
|
} |
||||
|
|
||||
|
public void or(Criteria criteria) { |
||||
|
oredCriteria.add(criteria); |
||||
|
} |
||||
|
|
||||
|
public Criteria or() { |
||||
|
Criteria criteria = createCriteriaInternal(); |
||||
|
oredCriteria.add(criteria); |
||||
|
return criteria; |
||||
|
} |
||||
|
|
||||
|
public Criteria createCriteria() { |
||||
|
Criteria criteria = createCriteriaInternal(); |
||||
|
if (oredCriteria.size() == 0) { |
||||
|
oredCriteria.add(criteria); |
||||
|
} |
||||
|
return criteria; |
||||
|
} |
||||
|
|
||||
|
protected Criteria createCriteriaInternal() { |
||||
|
Criteria criteria = new Criteria(); |
||||
|
return criteria; |
||||
|
} |
||||
|
|
||||
|
public void clear() { |
||||
|
oredCriteria.clear(); |
||||
|
orderByClause = null; |
||||
|
distinct = false; |
||||
|
} |
||||
|
|
||||
|
protected abstract static class GeneratedCriteria { |
||||
|
protected List<Criterion> criteria; |
||||
|
|
||||
|
protected GeneratedCriteria() { |
||||
|
super(); |
||||
|
criteria = new ArrayList<Criterion>(); |
||||
|
} |
||||
|
|
||||
|
public boolean isValid() { |
||||
|
return criteria.size() > 0; |
||||
|
} |
||||
|
|
||||
|
public List<Criterion> getAllCriteria() { |
||||
|
return criteria; |
||||
|
} |
||||
|
|
||||
|
public List<Criterion> getCriteria() { |
||||
|
return criteria; |
||||
|
} |
||||
|
|
||||
|
protected void addCriterion(String condition) { |
||||
|
if (condition == null) { |
||||
|
throw new RuntimeException("Value for condition cannot be null"); |
||||
|
} |
||||
|
criteria.add(new Criterion(condition)); |
||||
|
} |
||||
|
|
||||
|
protected void addCriterion(String condition, Object value, String property) { |
||||
|
if (value == null) { |
||||
|
throw new RuntimeException("Value for " + property + " cannot be null"); |
||||
|
} |
||||
|
criteria.add(new Criterion(condition, value)); |
||||
|
} |
||||
|
|
||||
|
protected void addCriterion(String condition, Object value1, Object value2, String property) { |
||||
|
if (value1 == null || value2 == null) { |
||||
|
throw new RuntimeException("Between values for " + property + " cannot be null"); |
||||
|
} |
||||
|
criteria.add(new Criterion(condition, value1, value2)); |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdIsNull() { |
||||
|
addCriterion("id is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdIsNotNull() { |
||||
|
addCriterion("id is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdEqualTo(Long value) { |
||||
|
addCriterion("id =", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdNotEqualTo(Long value) { |
||||
|
addCriterion("id <>", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdGreaterThan(Long value) { |
||||
|
addCriterion("id >", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdGreaterThanOrEqualTo(Long value) { |
||||
|
addCriterion("id >=", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdLessThan(Long value) { |
||||
|
addCriterion("id <", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdLessThanOrEqualTo(Long value) { |
||||
|
addCriterion("id <=", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdIn(List<Long> values) { |
||||
|
addCriterion("id in", values, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdNotIn(List<Long> values) { |
||||
|
addCriterion("id not in", values, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdBetween(Long value1, Long value2) { |
||||
|
addCriterion("id between", value1, value2, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdNotBetween(Long value1, Long value2) { |
||||
|
addCriterion("id not between", value1, value2, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdIsNull() { |
||||
|
addCriterion("user_id is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdIsNotNull() { |
||||
|
addCriterion("user_id is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdEqualTo(Long value) { |
||||
|
addCriterion("user_id =", value, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdNotEqualTo(Long value) { |
||||
|
addCriterion("user_id <>", value, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdGreaterThan(Long value) { |
||||
|
addCriterion("user_id >", value, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdGreaterThanOrEqualTo(Long value) { |
||||
|
addCriterion("user_id >=", value, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdLessThan(Long value) { |
||||
|
addCriterion("user_id <", value, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdLessThanOrEqualTo(Long value) { |
||||
|
addCriterion("user_id <=", value, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdIn(List<Long> values) { |
||||
|
addCriterion("user_id in", values, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdNotIn(List<Long> values) { |
||||
|
addCriterion("user_id not in", values, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdBetween(Long value1, Long value2) { |
||||
|
addCriterion("user_id between", value1, value2, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdNotBetween(Long value1, Long value2) { |
||||
|
addCriterion("user_id not between", value1, value2, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSignatureIsNull() { |
||||
|
addCriterion("signature is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSignatureIsNotNull() { |
||||
|
addCriterion("signature is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSignatureEqualTo(String value) { |
||||
|
addCriterion("signature =", value, "signature"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSignatureNotEqualTo(String value) { |
||||
|
addCriterion("signature <>", value, "signature"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSignatureGreaterThan(String value) { |
||||
|
addCriterion("signature >", value, "signature"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSignatureGreaterThanOrEqualTo(String value) { |
||||
|
addCriterion("signature >=", value, "signature"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSignatureLessThan(String value) { |
||||
|
addCriterion("signature <", value, "signature"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSignatureLessThanOrEqualTo(String value) { |
||||
|
addCriterion("signature <=", value, "signature"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSignatureLike(String value) { |
||||
|
addCriterion("signature like", value, "signature"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSignatureNotLike(String value) { |
||||
|
addCriterion("signature not like", value, "signature"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSignatureIn(List<String> values) { |
||||
|
addCriterion("signature in", values, "signature"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSignatureNotIn(List<String> values) { |
||||
|
addCriterion("signature not in", values, "signature"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSignatureBetween(String value1, String value2) { |
||||
|
addCriterion("signature between", value1, value2, "signature"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSignatureNotBetween(String value1, String value2) { |
||||
|
addCriterion("signature not between", value1, value2, "signature"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIntroductionIsNull() { |
||||
|
addCriterion("introduction is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIntroductionIsNotNull() { |
||||
|
addCriterion("introduction is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIntroductionEqualTo(String value) { |
||||
|
addCriterion("introduction =", value, "introduction"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIntroductionNotEqualTo(String value) { |
||||
|
addCriterion("introduction <>", value, "introduction"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIntroductionGreaterThan(String value) { |
||||
|
addCriterion("introduction >", value, "introduction"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIntroductionGreaterThanOrEqualTo(String value) { |
||||
|
addCriterion("introduction >=", value, "introduction"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIntroductionLessThan(String value) { |
||||
|
addCriterion("introduction <", value, "introduction"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIntroductionLessThanOrEqualTo(String value) { |
||||
|
addCriterion("introduction <=", value, "introduction"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIntroductionLike(String value) { |
||||
|
addCriterion("introduction like", value, "introduction"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIntroductionNotLike(String value) { |
||||
|
addCriterion("introduction not like", value, "introduction"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIntroductionIn(List<String> values) { |
||||
|
addCriterion("introduction in", values, "introduction"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIntroductionNotIn(List<String> values) { |
||||
|
addCriterion("introduction not in", values, "introduction"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIntroductionBetween(String value1, String value2) { |
||||
|
addCriterion("introduction between", value1, value2, "introduction"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIntroductionNotBetween(String value1, String value2) { |
||||
|
addCriterion("introduction not between", value1, value2, "introduction"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBirthdayIsNull() { |
||||
|
addCriterion("birthday is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBirthdayIsNotNull() { |
||||
|
addCriterion("birthday is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBirthdayEqualTo(String value) { |
||||
|
addCriterion("birthday =", value, "birthday"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBirthdayNotEqualTo(String value) { |
||||
|
addCriterion("birthday <>", value, "birthday"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBirthdayGreaterThan(String value) { |
||||
|
addCriterion("birthday >", value, "birthday"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBirthdayGreaterThanOrEqualTo(String value) { |
||||
|
addCriterion("birthday >=", value, "birthday"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBirthdayLessThan(String value) { |
||||
|
addCriterion("birthday <", value, "birthday"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBirthdayLessThanOrEqualTo(String value) { |
||||
|
addCriterion("birthday <=", value, "birthday"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBirthdayLike(String value) { |
||||
|
addCriterion("birthday like", value, "birthday"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBirthdayNotLike(String value) { |
||||
|
addCriterion("birthday not like", value, "birthday"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBirthdayIn(List<String> values) { |
||||
|
addCriterion("birthday in", values, "birthday"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBirthdayNotIn(List<String> values) { |
||||
|
addCriterion("birthday not in", values, "birthday"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBirthdayBetween(String value1, String value2) { |
||||
|
addCriterion("birthday between", value1, value2, "birthday"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBirthdayNotBetween(String value1, String value2) { |
||||
|
addCriterion("birthday not between", value1, value2, "birthday"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andAddressIsNull() { |
||||
|
addCriterion("address is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andAddressIsNotNull() { |
||||
|
addCriterion("address is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andAddressEqualTo(String value) { |
||||
|
addCriterion("address =", value, "address"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andAddressNotEqualTo(String value) { |
||||
|
addCriterion("address <>", value, "address"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andAddressGreaterThan(String value) { |
||||
|
addCriterion("address >", value, "address"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andAddressGreaterThanOrEqualTo(String value) { |
||||
|
addCriterion("address >=", value, "address"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andAddressLessThan(String value) { |
||||
|
addCriterion("address <", value, "address"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andAddressLessThanOrEqualTo(String value) { |
||||
|
addCriterion("address <=", value, "address"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andAddressLike(String value) { |
||||
|
addCriterion("address like", value, "address"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andAddressNotLike(String value) { |
||||
|
addCriterion("address not like", value, "address"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andAddressIn(List<String> values) { |
||||
|
addCriterion("address in", values, "address"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andAddressNotIn(List<String> values) { |
||||
|
addCriterion("address not in", values, "address"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andAddressBetween(String value1, String value2) { |
||||
|
addCriterion("address between", value1, value2, "address"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andAddressNotBetween(String value1, String value2) { |
||||
|
addCriterion("address not between", value1, value2, "address"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andWebPathIsNull() { |
||||
|
addCriterion("web_path is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andWebPathIsNotNull() { |
||||
|
addCriterion("web_path is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andWebPathEqualTo(String value) { |
||||
|
addCriterion("web_path =", value, "webPath"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andWebPathNotEqualTo(String value) { |
||||
|
addCriterion("web_path <>", value, "webPath"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andWebPathGreaterThan(String value) { |
||||
|
addCriterion("web_path >", value, "webPath"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andWebPathGreaterThanOrEqualTo(String value) { |
||||
|
addCriterion("web_path >=", value, "webPath"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andWebPathLessThan(String value) { |
||||
|
addCriterion("web_path <", value, "webPath"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andWebPathLessThanOrEqualTo(String value) { |
||||
|
addCriterion("web_path <=", value, "webPath"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andWebPathLike(String value) { |
||||
|
addCriterion("web_path like", value, "webPath"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andWebPathNotLike(String value) { |
||||
|
addCriterion("web_path not like", value, "webPath"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andWebPathIn(List<String> values) { |
||||
|
addCriterion("web_path in", values, "webPath"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andWebPathNotIn(List<String> values) { |
||||
|
addCriterion("web_path not in", values, "webPath"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andWebPathBetween(String value1, String value2) { |
||||
|
addCriterion("web_path between", value1, value2, "webPath"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andWebPathNotBetween(String value1, String value2) { |
||||
|
addCriterion("web_path not between", value1, value2, "webPath"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyIsNull() { |
||||
|
addCriterion("company is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyIsNotNull() { |
||||
|
addCriterion("company is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyEqualTo(String value) { |
||||
|
addCriterion("company =", value, "company"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyNotEqualTo(String value) { |
||||
|
addCriterion("company <>", value, "company"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyGreaterThan(String value) { |
||||
|
addCriterion("company >", value, "company"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyGreaterThanOrEqualTo(String value) { |
||||
|
addCriterion("company >=", value, "company"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyLessThan(String value) { |
||||
|
addCriterion("company <", value, "company"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyLessThanOrEqualTo(String value) { |
||||
|
addCriterion("company <=", value, "company"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyLike(String value) { |
||||
|
addCriterion("company like", value, "company"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyNotLike(String value) { |
||||
|
addCriterion("company not like", value, "company"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyIn(List<String> values) { |
||||
|
addCriterion("company in", values, "company"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyNotIn(List<String> values) { |
||||
|
addCriterion("company not in", values, "company"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyBetween(String value1, String value2) { |
||||
|
addCriterion("company between", value1, value2, "company"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyNotBetween(String value1, String value2) { |
||||
|
addCriterion("company not between", value1, value2, "company"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andPositionIsNull() { |
||||
|
addCriterion("position is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andPositionIsNotNull() { |
||||
|
addCriterion("position is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andPositionEqualTo(String value) { |
||||
|
addCriterion("position =", value, "position"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andPositionNotEqualTo(String value) { |
||||
|
addCriterion("position <>", value, "position"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andPositionGreaterThan(String value) { |
||||
|
addCriterion("position >", value, "position"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andPositionGreaterThanOrEqualTo(String value) { |
||||
|
addCriterion("position >=", value, "position"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andPositionLessThan(String value) { |
||||
|
addCriterion("position <", value, "position"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andPositionLessThanOrEqualTo(String value) { |
||||
|
addCriterion("position <=", value, "position"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andPositionLike(String value) { |
||||
|
addCriterion("position like", value, "position"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andPositionNotLike(String value) { |
||||
|
addCriterion("position not like", value, "position"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andPositionIn(List<String> values) { |
||||
|
addCriterion("position in", values, "position"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andPositionNotIn(List<String> values) { |
||||
|
addCriterion("position not in", values, "position"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andPositionBetween(String value1, String value2) { |
||||
|
addCriterion("position between", value1, value2, "position"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andPositionNotBetween(String value1, String value2) { |
||||
|
addCriterion("position not between", value1, value2, "position"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtIsNull() { |
||||
|
addCriterion("created_at is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtIsNotNull() { |
||||
|
addCriterion("created_at is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtEqualTo(Date value) { |
||||
|
addCriterion("created_at =", value, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtNotEqualTo(Date value) { |
||||
|
addCriterion("created_at <>", value, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtGreaterThan(Date value) { |
||||
|
addCriterion("created_at >", value, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) { |
||||
|
addCriterion("created_at >=", value, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtLessThan(Date value) { |
||||
|
addCriterion("created_at <", value, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtLessThanOrEqualTo(Date value) { |
||||
|
addCriterion("created_at <=", value, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtIn(List<Date> values) { |
||||
|
addCriterion("created_at in", values, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtNotIn(List<Date> values) { |
||||
|
addCriterion("created_at not in", values, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtBetween(Date value1, Date value2) { |
||||
|
addCriterion("created_at between", value1, value2, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtNotBetween(Date value1, Date value2) { |
||||
|
addCriterion("created_at not between", value1, value2, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtIsNull() { |
||||
|
addCriterion("updated_at is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtIsNotNull() { |
||||
|
addCriterion("updated_at is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtEqualTo(Date value) { |
||||
|
addCriterion("updated_at =", value, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtNotEqualTo(Date value) { |
||||
|
addCriterion("updated_at <>", value, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtGreaterThan(Date value) { |
||||
|
addCriterion("updated_at >", value, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) { |
||||
|
addCriterion("updated_at >=", value, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtLessThan(Date value) { |
||||
|
addCriterion("updated_at <", value, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) { |
||||
|
addCriterion("updated_at <=", value, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtIn(List<Date> values) { |
||||
|
addCriterion("updated_at in", values, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtNotIn(List<Date> values) { |
||||
|
addCriterion("updated_at not in", values, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtBetween(Date value1, Date value2) { |
||||
|
addCriterion("updated_at between", value1, value2, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) { |
||||
|
addCriterion("updated_at not between", value1, value2, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusIsNull() { |
||||
|
addCriterion("rec_status is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusIsNotNull() { |
||||
|
addCriterion("rec_status is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusEqualTo(Byte value) { |
||||
|
addCriterion("rec_status =", value, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusNotEqualTo(Byte value) { |
||||
|
addCriterion("rec_status <>", value, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusGreaterThan(Byte value) { |
||||
|
addCriterion("rec_status >", value, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) { |
||||
|
addCriterion("rec_status >=", value, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusLessThan(Byte value) { |
||||
|
addCriterion("rec_status <", value, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusLessThanOrEqualTo(Byte value) { |
||||
|
addCriterion("rec_status <=", value, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusIn(List<Byte> values) { |
||||
|
addCriterion("rec_status in", values, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusNotIn(List<Byte> values) { |
||||
|
addCriterion("rec_status not in", values, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusBetween(Byte value1, Byte value2) { |
||||
|
addCriterion("rec_status between", value1, value2, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andRecStatusNotBetween(Byte value1, Byte value2) { |
||||
|
addCriterion("rec_status not between", value1, value2, "recStatus"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public static class Criteria extends GeneratedCriteria { |
||||
|
|
||||
|
protected Criteria() { |
||||
|
super(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
public static class Criterion { |
||||
|
private String condition; |
||||
|
|
||||
|
private Object value; |
||||
|
|
||||
|
private Object secondValue; |
||||
|
|
||||
|
private boolean noValue; |
||||
|
|
||||
|
private boolean singleValue; |
||||
|
|
||||
|
private boolean betweenValue; |
||||
|
|
||||
|
private boolean listValue; |
||||
|
|
||||
|
private String typeHandler; |
||||
|
|
||||
|
public String getCondition() { |
||||
|
return condition; |
||||
|
} |
||||
|
|
||||
|
public Object getValue() { |
||||
|
return value; |
||||
|
} |
||||
|
|
||||
|
public Object getSecondValue() { |
||||
|
return secondValue; |
||||
|
} |
||||
|
|
||||
|
public boolean isNoValue() { |
||||
|
return noValue; |
||||
|
} |
||||
|
|
||||
|
public boolean isSingleValue() { |
||||
|
return singleValue; |
||||
|
} |
||||
|
|
||||
|
public boolean isBetweenValue() { |
||||
|
return betweenValue; |
||||
|
} |
||||
|
|
||||
|
public boolean isListValue() { |
||||
|
return listValue; |
||||
|
} |
||||
|
|
||||
|
public String getTypeHandler() { |
||||
|
return typeHandler; |
||||
|
} |
||||
|
|
||||
|
protected Criterion(String condition) { |
||||
|
super(); |
||||
|
this.condition = condition; |
||||
|
this.typeHandler = null; |
||||
|
this.noValue = true; |
||||
|
} |
||||
|
|
||||
|
protected Criterion(String condition, Object value, String typeHandler) { |
||||
|
super(); |
||||
|
this.condition = condition; |
||||
|
this.value = value; |
||||
|
this.typeHandler = typeHandler; |
||||
|
if (value instanceof List<?>) { |
||||
|
this.listValue = true; |
||||
|
} else { |
||||
|
this.singleValue = true; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
protected Criterion(String condition, Object value) { |
||||
|
this(condition, value, null); |
||||
|
} |
||||
|
|
||||
|
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { |
||||
|
super(); |
||||
|
this.condition = condition; |
||||
|
this.value = value; |
||||
|
this.secondValue = secondValue; |
||||
|
this.typeHandler = typeHandler; |
||||
|
this.betweenValue = true; |
||||
|
} |
||||
|
|
||||
|
protected Criterion(String condition, Object value, Object secondValue) { |
||||
|
this(condition, value, secondValue, null); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,165 @@ |
|||||
|
package com.ccsens.signin.bean.vo; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonIgnore; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
@Data |
||||
|
public class UserVo { |
||||
|
@Data |
||||
|
@ApiModel |
||||
|
public static class UserSign{ |
||||
|
@ApiModelProperty("用户Id") |
||||
|
private Long userId; |
||||
|
@ApiModelProperty("认证类型Id") |
||||
|
private Long authId; |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel |
||||
|
public static class TokenBean { |
||||
|
@ApiModelProperty("用户id") |
||||
|
private Long id; |
||||
|
@ApiModelProperty("账号") |
||||
|
private String account; |
||||
|
@ApiModelProperty("手机号") |
||||
|
private String phone; |
||||
|
@ApiModelProperty("token") |
||||
|
private String token; |
||||
|
@ApiModelProperty("刷新token") |
||||
|
private String refresh_token; |
||||
|
@ApiModelProperty("微信信息") |
||||
|
private WxInfo wxInfo; |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel |
||||
|
public static class SmsCode{ |
||||
|
@ApiModelProperty("手机号") |
||||
|
private String phone; |
||||
|
@ApiModelProperty("有效时间(秒)") |
||||
|
private Integer expiredInSeconds; |
||||
|
@JsonIgnore |
||||
|
private String smsCode; |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel |
||||
|
public static class Account{ |
||||
|
@ApiModelProperty("用户id") |
||||
|
private Long id; |
||||
|
@ApiModelProperty("用户名") |
||||
|
private String username; |
||||
|
@ApiModelProperty("密码") |
||||
|
private String password; |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel |
||||
|
public static class TokenToUserId{ |
||||
|
@ApiModelProperty("用户id") |
||||
|
private Long id; |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel |
||||
|
public static class WxInfo{ |
||||
|
@ApiModelProperty("微信名") |
||||
|
private String nickname; |
||||
|
@ApiModelProperty("微信头像") |
||||
|
private String headImgUrl; |
||||
|
@ApiModelProperty("性别") |
||||
|
private Byte sex; |
||||
|
@ApiModelProperty("省") |
||||
|
private String province; |
||||
|
@ApiModelProperty("市") |
||||
|
private String city; |
||||
|
@ApiModelProperty("国家") |
||||
|
private String country; |
||||
|
@ApiModelProperty("语言") |
||||
|
private String language; |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("公众号用户") |
||||
|
public static class Oauth2WX{ |
||||
|
@ApiModelProperty("openid") |
||||
|
private String openid; |
||||
|
@ApiModelProperty("用户id") |
||||
|
private Long userId; |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("用户信息") |
||||
|
public static class UserInfo { |
||||
|
@ApiModelProperty("用户id") |
||||
|
private Long id; |
||||
|
@ApiModelProperty("昵称") |
||||
|
private String nickname; |
||||
|
@ApiModelProperty("头像") |
||||
|
private String avatarUrl; |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("查询个人信息") |
||||
|
public static class SelectUserInfo{ |
||||
|
@ApiModelProperty("userId") |
||||
|
private Long id; |
||||
|
@ApiModelProperty("账号") |
||||
|
private String account; |
||||
|
@ApiModelProperty("手机号") |
||||
|
private String phone; |
||||
|
@ApiModelProperty("昵称") |
||||
|
private String nickname; |
||||
|
@ApiModelProperty("头像") |
||||
|
private String avatarUrl; |
||||
|
@ApiModelProperty("个人签名") |
||||
|
private String signature; |
||||
|
@ApiModelProperty("个人简介") |
||||
|
private String introduction; |
||||
|
@ApiModelProperty("生日") |
||||
|
private String birthday; |
||||
|
@ApiModelProperty("所在地") |
||||
|
private String address; |
||||
|
@ApiModelProperty("网页") |
||||
|
private String webPath; |
||||
|
@ApiModelProperty("公司") |
||||
|
private String company; |
||||
|
@ApiModelProperty("职位") |
||||
|
private String position; |
||||
|
@ApiModelProperty("已使用tall多少天") |
||||
|
private Integer dayOfUseTall; |
||||
|
@JsonIgnore // 已使用tall多少天
|
||||
|
private Date createdAt; |
||||
|
@ApiModelProperty("空间使用情况") |
||||
|
private Interspace interspace; |
||||
|
// @ApiModelProperty("标签信息")
|
||||
|
// private List<LabelVo.SelectLabel> labelList;
|
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("空间使用信息") |
||||
|
public static class Interspace{ |
||||
|
@ApiModelProperty("空间已有项目") |
||||
|
private Integer projectNum; |
||||
|
@ApiModelProperty("空间总项目(目前写无限制)") |
||||
|
private Integer projectTotal; |
||||
|
@ApiModelProperty("空间剩余(目前写无限制)") |
||||
|
private Integer interspaceResidue; |
||||
|
@ApiModelProperty("总空间(目前写无限制)") |
||||
|
private Integer interspaceTotal; |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("返回图片验证码") |
||||
|
public static class VerificationCode{ |
||||
|
@ApiModelProperty("图片验证码Id") |
||||
|
private String verificationCodeId; |
||||
|
@ApiModelProperty("图片的Base64字符串") |
||||
|
private String imageBase64; |
||||
|
} |
||||
|
} |
@ -0,0 +1,31 @@ |
|||||
|
package com.ccsens.wisdomcar.config; |
||||
|
|
||||
|
import com.ccsens.wisdomcar.intercept.MybatisInterceptor; |
||||
|
import org.springframework.context.annotation.Bean; |
||||
|
import org.springframework.context.annotation.Configuration; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: wuHuiJuan |
||||
|
* @create: 2019/12/03 18:01 |
||||
|
*/ |
||||
|
@Configuration |
||||
|
public class BeanConfig { |
||||
|
// @Bean
|
||||
|
// public static PropertySourcesPlaceholderConfigurer properties(){
|
||||
|
// PropertySourcesPlaceholderConfigurer conf = new PropertySourcesPlaceholderConfigurer();
|
||||
|
// YamlPropertiesFactoryBean yml = new YamlPropertiesFactoryBean();
|
||||
|
// yml.setResources(new ClassPathResource("business.yml"));
|
||||
|
// conf.setProperties(yml.getObject());
|
||||
|
// return conf;
|
||||
|
// }
|
||||
|
|
||||
|
/** |
||||
|
* 注册拦截器 |
||||
|
*/ |
||||
|
@Bean |
||||
|
public MybatisInterceptor mybatisInterceptor() { |
||||
|
MybatisInterceptor interceptor = new MybatisInterceptor(); |
||||
|
return interceptor; |
||||
|
} |
||||
|
} |
@ -0,0 +1,169 @@ |
|||||
|
package com.ccsens.wisdomcar.config; |
||||
|
|
||||
|
|
||||
|
import cn.hutool.core.lang.Snowflake; |
||||
|
import cn.hutool.core.util.IdUtil; |
||||
|
import com.ccsens.util.config.DruidProps; |
||||
|
import com.fasterxml.jackson.databind.DeserializationFeature; |
||||
|
import com.fasterxml.jackson.databind.ObjectMapper; |
||||
|
import com.fasterxml.jackson.databind.module.SimpleModule; |
||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
||||
|
import org.springframework.beans.factory.annotation.Value; |
||||
|
import org.springframework.context.annotation.Bean; |
||||
|
import org.springframework.context.annotation.Configuration; |
||||
|
import org.springframework.http.MediaType; |
||||
|
import org.springframework.http.converter.HttpMessageConverter; |
||||
|
import org.springframework.http.converter.StringHttpMessageConverter; |
||||
|
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; |
||||
|
import org.springframework.web.servlet.config.annotation.*; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
import javax.sql.DataSource; |
||||
|
import java.nio.charset.Charset; |
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
@Configuration |
||||
|
//public class SpringConfig extends WebMvcConfigurationSupport {
|
||||
|
public class SpringConfig implements WebMvcConfigurer { |
||||
|
@Resource |
||||
|
private DruidProps druidPropsUtil; |
||||
|
@Value("${spring.snowflake.workerId}") |
||||
|
private String workerId; |
||||
|
@Value("${spring.snowflake.datacenterId}") |
||||
|
private String datacenterId; |
||||
|
|
||||
|
/** |
||||
|
* 配置Converter |
||||
|
* @return |
||||
|
*/ |
||||
|
@Bean |
||||
|
public HttpMessageConverter<String> responseStringConverter() { |
||||
|
StringHttpMessageConverter converter = new StringHttpMessageConverter( |
||||
|
Charset.forName("UTF-8")); |
||||
|
return converter; |
||||
|
} |
||||
|
|
||||
|
@Bean |
||||
|
public HttpMessageConverter<Object> responseJsonConverter(){ |
||||
|
MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter(); |
||||
|
List<MediaType> mediaTypeList = new ArrayList<>(); |
||||
|
mediaTypeList.add(MediaType.TEXT_HTML); |
||||
|
mediaTypeList.add(MediaType.APPLICATION_JSON_UTF8); |
||||
|
converter.setSupportedMediaTypes(mediaTypeList); |
||||
|
|
||||
|
//converter.setObjectMapper();
|
||||
|
ObjectMapper objectMapper = new ObjectMapper(); |
||||
|
SimpleModule simpleModule = new SimpleModule(); |
||||
|
simpleModule.addSerializer(Long.class, ToStringSerializer.instance); |
||||
|
simpleModule.addSerializer(Long.TYPE, ToStringSerializer.instance); |
||||
|
objectMapper.registerModule(simpleModule); |
||||
|
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); |
||||
|
converter.setObjectMapper(objectMapper); |
||||
|
|
||||
|
return converter; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) { |
||||
|
//super.configureMessageConverters(converters);
|
||||
|
converters.add(responseStringConverter()); |
||||
|
converters.add(responseJsonConverter()); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void configureContentNegotiation(ContentNegotiationConfigurer configurer) { |
||||
|
configurer.favorPathExtension(false); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void addCorsMappings(CorsRegistry registry) { |
||||
|
registry.addMapping("/**").allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS") |
||||
|
// .allowedMethods("*") // 允许提交请求的方法,*表示全部允许
|
||||
|
.allowedOrigins("*") // #允许向该服务器提交请求的URI,*表示全部允许
|
||||
|
.allowCredentials(true) // 允许cookies跨域
|
||||
|
.allowedHeaders("*") // #允许访问的头信息,*表示全部
|
||||
|
.maxAge(18000L); // 预检请求的缓存时间(秒),即在这个时间段里,对于相同的跨域请求不会再预检了
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 配置视图解析器 SpringBoot建议使用Thymeleaf代替jsp,动态页面默认路径:resources/template,静态页面默认路径: resources/static |
||||
|
* @return |
||||
|
*/ |
||||
|
// @Bean
|
||||
|
// public ViewResolver getViewResolver() {
|
||||
|
// InternalResourceViewResolver resolver = new InternalResourceViewResolver();
|
||||
|
// resolver.setPrefix("/WEB-INF/views/");
|
||||
|
// resolver.setSuffix(".jsp");
|
||||
|
// return resolver;
|
||||
|
// }
|
||||
|
// @Override
|
||||
|
// public void configureDefaultServletHandling(
|
||||
|
// DefaultServletHandlerConfigurer configurer) {
|
||||
|
// configurer.enable();
|
||||
|
// }
|
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 配置静态资源 |
||||
|
*/ |
||||
|
@Override |
||||
|
public void addResourceHandlers(ResourceHandlerRegistry registry) { |
||||
|
registry.addResourceHandler("swagger-ui.html") |
||||
|
.addResourceLocations("classpath:/META-INF/resources/"); |
||||
|
registry.addResourceHandler("/webjars/**") |
||||
|
.addResourceLocations("classpath:/META-INF/resources/webjars/"); |
||||
|
|
||||
|
registry.addResourceHandler("/uploads/**") |
||||
|
.addResourceLocations("file:///home/cloud/game/uploads/"); |
||||
|
//super.addResourceHandlers(registry);
|
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 配置拦截器 |
||||
|
* @param registry |
||||
|
*/ |
||||
|
@Override |
||||
|
public void addInterceptors(InterceptorRegistry registry) { |
||||
|
//addPathPatterns 用于添加拦截规则
|
||||
|
//excludePathPatterns 用于排除拦截
|
||||
|
// registry.addInterceptor(tokenInterceptor())
|
||||
|
// .addPathPatterns("/projects/**")
|
||||
|
// .addPathPatterns("/messages/**")
|
||||
|
// .addPathPatterns("/users/**")
|
||||
|
// .excludePathPatterns("/users/signin")
|
||||
|
// .excludePathPatterns("/users/smscode")
|
||||
|
// .excludePathPatterns("/users/signup")
|
||||
|
// .excludePathPatterns("/users/password")
|
||||
|
// .excludePathPatterns("/users/account")
|
||||
|
// .excludePathPatterns("/users/token")
|
||||
|
// .excludePathPatterns("/users/claims")
|
||||
|
// .addPathPatterns("/plugins/**")
|
||||
|
// .addPathPatterns("/delivers/**")
|
||||
|
// .addPathPatterns("/tasks/**")
|
||||
|
// .addPathPatterns("/members/**")
|
||||
|
// .addPathPatterns("/templates/**")
|
||||
|
// .addPathPatterns("/hardware/**");
|
||||
|
//super.addInterceptors(registry);
|
||||
|
} |
||||
|
//
|
||||
|
// @Bean
|
||||
|
// public TokenInterceptor tokenInterceptor(){
|
||||
|
// return new TokenInterceptor();
|
||||
|
// }
|
||||
|
|
||||
|
/** |
||||
|
* 配置数据源(单数据源) |
||||
|
*/ |
||||
|
@Bean |
||||
|
public DataSource dataSource(){ |
||||
|
return druidPropsUtil.createDruidDataSource(); |
||||
|
} |
||||
|
|
||||
|
@Bean |
||||
|
public Snowflake snowflake(){ |
||||
|
// return new Snowflake(Long.valueOf(workerId),Long.valueOf(datacenterId));
|
||||
|
return IdUtil.createSnowflake(Long.valueOf(workerId),Long.valueOf(datacenterId)); |
||||
|
} |
||||
|
} |
@ -0,0 +1,56 @@ |
|||||
|
package com.ccsens.wisdomcar.config; |
||||
|
|
||||
|
import com.ccsens.util.WebConstant; |
||||
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; |
||||
|
import org.springframework.context.annotation.Bean; |
||||
|
import org.springframework.context.annotation.Configuration; |
||||
|
import springfox.documentation.builders.ParameterBuilder; |
||||
|
import springfox.documentation.builders.RequestHandlerSelectors; |
||||
|
import springfox.documentation.schema.ModelRef; |
||||
|
import springfox.documentation.service.ApiInfo; |
||||
|
import springfox.documentation.service.Parameter; |
||||
|
import springfox.documentation.spi.DocumentationType; |
||||
|
import springfox.documentation.spring.web.plugins.Docket; |
||||
|
import springfox.documentation.swagger2.annotations.EnableSwagger2; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
@Configuration |
||||
|
@EnableSwagger2 |
||||
|
@ConditionalOnExpression("${swagger.enable}") |
||||
|
//public class SwaggerConfigure extends WebMvcConfigurationSupport {
|
||||
|
public class SwaggerConfigure /*implements WebMvcConfigurer*/ { |
||||
|
@Bean |
||||
|
public Docket customDocket() { |
||||
|
//
|
||||
|
return new Docket(DocumentationType.SWAGGER_2) |
||||
|
.apiInfo(apiInfo()) |
||||
|
.select() |
||||
|
.apis(RequestHandlerSelectors |
||||
|
.basePackage("com.ccsens.signin.api")) |
||||
|
.build() |
||||
|
.globalOperationParameters(setHeaderToken()); |
||||
|
} |
||||
|
|
||||
|
private ApiInfo apiInfo() { |
||||
|
return new ApiInfo("Swagger Tall-game",//大标题 title
|
||||
|
"This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.",//小标题
|
||||
|
"1.0.0",//版本
|
||||
|
"http://swagger.io/terms/",//termsOfServiceUrl
|
||||
|
"zhangsan",//作者
|
||||
|
"Apache 2.0",//链接显示文字
|
||||
|
"http://www.apache.org/licenses/LICENSE-2.0.html"//网站链接
|
||||
|
); |
||||
|
} |
||||
|
|
||||
|
private List<Parameter> setHeaderToken() { |
||||
|
ParameterBuilder tokenPar = new ParameterBuilder(); |
||||
|
List<Parameter> pars = new ArrayList<>(); |
||||
|
tokenPar.name(WebConstant.HEADER_KEY_TOKEN).description("token") |
||||
|
.defaultValue(WebConstant.HEADER_KEY_TOKEN_PREFIX) |
||||
|
.modelRef(new ModelRef("string")).parameterType("header").required(false).build(); |
||||
|
pars.add(tokenPar.build()); |
||||
|
return pars; |
||||
|
} |
||||
|
} |
@ -0,0 +1,10 @@ |
|||||
|
package com.ccsens.signin.exception; |
||||
|
|
||||
|
|
||||
|
import com.ccsens.util.exception.BaseException; |
||||
|
|
||||
|
public class GetCurrentPartiException extends BaseException { |
||||
|
public GetCurrentPartiException(Integer code, String message) { |
||||
|
super(code, message); |
||||
|
} |
||||
|
} |
@ -0,0 +1,11 @@ |
|||||
|
package com.ccsens.signin.exception; |
||||
|
|
||||
|
import com.ccsens.util.exception.BaseException; |
||||
|
import lombok.Getter; |
||||
|
|
||||
|
@Getter |
||||
|
public class GetCurrentUserException extends BaseException { |
||||
|
public GetCurrentUserException(int code, String msg){ |
||||
|
super(code,msg); |
||||
|
} |
||||
|
} |
@ -0,0 +1,10 @@ |
|||||
|
package com.ccsens.signin.exception; |
||||
|
|
||||
|
|
||||
|
import com.ccsens.util.exception.BaseException; |
||||
|
|
||||
|
public class GetTaskException extends BaseException { |
||||
|
public GetTaskException(Integer code, String message) { |
||||
|
super(code, message); |
||||
|
} |
||||
|
} |
@ -0,0 +1,10 @@ |
|||||
|
package com.ccsens.signin.exception; |
||||
|
|
||||
|
|
||||
|
import com.ccsens.util.exception.BaseException; |
||||
|
|
||||
|
public class PartiLoginException extends BaseException { |
||||
|
public PartiLoginException(Integer code, String message) { |
||||
|
super(code, message); |
||||
|
} |
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
package com.ccsens.signin.exception; |
||||
|
|
||||
|
|
||||
|
import com.ccsens.util.WebConstant; |
||||
|
import com.ccsens.util.exception.BaseException; |
||||
|
|
||||
|
public class SmsException extends BaseException { |
||||
|
public static final String Error_SendTooFast = WebConstant.Exist_Verify_Code_In_Seconds + "内只能发送一次,请稍后再试"; |
||||
|
|
||||
|
public SmsException(String message) { |
||||
|
super(message); |
||||
|
} |
||||
|
|
||||
|
public SmsException(Integer code,String message) { |
||||
|
super(code,message); |
||||
|
} |
||||
|
} |
@ -0,0 +1,10 @@ |
|||||
|
package com.ccsens.signin.exception; |
||||
|
|
||||
|
|
||||
|
import com.ccsens.util.exception.BaseException; |
||||
|
|
||||
|
public class TaskValidateException extends BaseException { |
||||
|
public TaskValidateException(int i, String s) { |
||||
|
super(i,s); |
||||
|
} |
||||
|
} |
@ -0,0 +1,10 @@ |
|||||
|
package com.ccsens.signin.exception; |
||||
|
|
||||
|
|
||||
|
import com.ccsens.util.exception.BaseException; |
||||
|
|
||||
|
public class UnAuthenticationException extends BaseException { |
||||
|
public UnAuthenticationException() { |
||||
|
super(400,"未认证的用户"); |
||||
|
} |
||||
|
} |
@ -0,0 +1,10 @@ |
|||||
|
package com.ccsens.signin.exception; |
||||
|
|
||||
|
|
||||
|
import com.ccsens.util.exception.BaseException; |
||||
|
|
||||
|
public class UnAuthorizationException extends BaseException { |
||||
|
public UnAuthorizationException() { |
||||
|
super(401,"未授权的用户"); |
||||
|
} |
||||
|
} |
@ -0,0 +1,10 @@ |
|||||
|
package com.ccsens.signin.exception; |
||||
|
|
||||
|
|
||||
|
import com.ccsens.util.exception.BaseException; |
||||
|
|
||||
|
public class UserLoginException extends BaseException { |
||||
|
public UserLoginException(int code,String message){ |
||||
|
super(code,message); |
||||
|
} |
||||
|
} |
@ -0,0 +1,159 @@ |
|||||
|
package com.ccsens.wisdomcar.intercept; |
||||
|
|
||||
|
import cn.hutool.core.collection.CollectionUtil; |
||||
|
import com.ccsens.util.WebConstant; |
||||
|
import org.apache.ibatis.executor.Executor; |
||||
|
import org.apache.ibatis.mapping.BoundSql; |
||||
|
import org.apache.ibatis.mapping.MappedStatement; |
||||
|
import org.apache.ibatis.mapping.ResultMap; |
||||
|
import org.apache.ibatis.mapping.SqlSource; |
||||
|
import org.apache.ibatis.plugin.*; |
||||
|
import org.apache.ibatis.reflection.DefaultReflectorFactory; |
||||
|
import org.apache.ibatis.reflection.MetaObject; |
||||
|
import org.apache.ibatis.reflection.factory.DefaultObjectFactory; |
||||
|
import org.apache.ibatis.reflection.wrapper.DefaultObjectWrapperFactory; |
||||
|
import org.apache.ibatis.session.ResultHandler; |
||||
|
import org.apache.ibatis.session.RowBounds; |
||||
|
|
||||
|
import java.lang.reflect.InvocationTargetException; |
||||
|
import java.lang.reflect.Method; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
import java.util.Properties; |
||||
|
|
||||
|
/** |
||||
|
* @description: |
||||
|
* @author: wuHuiJuan |
||||
|
* @create: 2019/12/11 10:58 |
||||
|
*/ |
||||
|
@Intercepts({ |
||||
|
@Signature( |
||||
|
type = Executor.class, |
||||
|
method = "query", |
||||
|
args = {MappedStatement.class, Object.class, RowBounds.class, ResultHandler.class} |
||||
|
) |
||||
|
}) |
||||
|
public class MybatisInterceptor implements Interceptor { |
||||
|
@Override |
||||
|
public Object intercept(Invocation invocation) throws Throwable { |
||||
|
|
||||
|
|
||||
|
String selectByExample = "selectByExample"; |
||||
|
String countByExample = "countByExample"; |
||||
|
String countByExample2 = "selectByExample_COUNT"; |
||||
|
String selectByPrimaryKey = "selectByPrimaryKey"; |
||||
|
|
||||
|
Object[] args = invocation.getArgs(); |
||||
|
MappedStatement statement = (MappedStatement) args[0]; |
||||
|
if (statement.getId().endsWith(selectByExample) |
||||
|
|| statement.getId().endsWith(countByExample) |
||||
|
|| statement.getId().endsWith(countByExample2)) { |
||||
|
//XXXExample
|
||||
|
Object example = args[1]; |
||||
|
|
||||
|
addCondition(statement, example); |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
} else if (statement.getId().endsWith(selectByPrimaryKey)) { |
||||
|
BoundSql boundSql = statement.getBoundSql(args[1]); |
||||
|
String sql = boundSql.getSql() + " and rec_status = 0"; |
||||
|
MappedStatement newStatement = newMappedStatement(statement, new BoundSqlSqlSource(boundSql)); |
||||
|
MetaObject msObject = MetaObject.forObject(newStatement, new DefaultObjectFactory(), new DefaultObjectWrapperFactory(),new DefaultReflectorFactory()); |
||||
|
msObject.setValue("sqlSource.boundSql.sql", sql); |
||||
|
args[0] = newStatement; |
||||
|
} |
||||
|
|
||||
|
return invocation.proceed(); |
||||
|
} |
||||
|
|
||||
|
private void addCondition(MappedStatement statement, Object example) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException { |
||||
|
if (example instanceof Map) { |
||||
|
example = ((Map) example).get("_ORIGINAL_PARAMETER_OBJECT"); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
Method method = example.getClass().getMethod("getOredCriteria", null); |
||||
|
//获取到条件数组,第一个是Criteria
|
||||
|
List list = (List) method.invoke(example); |
||||
|
if (CollectionUtil.isEmpty(list)) { |
||||
|
Class clazz = ((ResultMap) statement.getResultMaps().get(0)).getType(); |
||||
|
String exampleName = clazz.getName() + "Example"; |
||||
|
Object paramExample = Class.forName(exampleName).newInstance(); |
||||
|
Method createCriteria = paramExample.getClass().getMethod("createCriteria"); |
||||
|
Object criteria = createCriteria.invoke(paramExample); |
||||
|
Method andIsDelEqualTo = criteria.getClass().getMethod("andRecStatusEqualTo", Byte.class); |
||||
|
andIsDelEqualTo.invoke(criteria, WebConstant.REC_STATUS.Normal.value); |
||||
|
list.add(criteria); |
||||
|
} else { |
||||
|
Object criteria = list.get(0); |
||||
|
Method getCriteria = criteria.getClass().getMethod("getCriteria"); |
||||
|
List params = (List) getCriteria.invoke(criteria); |
||||
|
boolean hasDel = false; |
||||
|
for (Object param : params) { |
||||
|
Method getCondition = param.getClass().getMethod("getCondition"); |
||||
|
Object condition = getCondition.invoke(param); |
||||
|
if ("rec_status =".equals(condition)) { |
||||
|
hasDel = true; |
||||
|
} |
||||
|
} |
||||
|
if (!hasDel) { |
||||
|
Method andIsDelEqualTo = criteria.getClass().getMethod("andRecStatusEqualTo", Byte.class); |
||||
|
andIsDelEqualTo.invoke(criteria, WebConstant.REC_STATUS.Normal.value); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public Object plugin(Object target) { |
||||
|
return Plugin.wrap(target, this); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void setProperties(Properties properties) { |
||||
|
|
||||
|
} |
||||
|
|
||||
|
private MappedStatement newMappedStatement(MappedStatement ms, SqlSource newSqlSource) { |
||||
|
MappedStatement.Builder builder = |
||||
|
new MappedStatement.Builder(ms.getConfiguration(), ms.getId(), newSqlSource, ms.getSqlCommandType()); |
||||
|
builder.resource(ms.getResource()); |
||||
|
builder.fetchSize(ms.getFetchSize()); |
||||
|
builder.statementType(ms.getStatementType()); |
||||
|
builder.keyGenerator(ms.getKeyGenerator()); |
||||
|
if (ms.getKeyProperties() != null && ms.getKeyProperties().length != 0) { |
||||
|
StringBuilder keyProperties = new StringBuilder(); |
||||
|
for (String keyProperty : ms.getKeyProperties()) { |
||||
|
keyProperties.append(keyProperty).append(","); |
||||
|
} |
||||
|
keyProperties.delete(keyProperties.length() - 1, keyProperties.length()); |
||||
|
builder.keyProperty(keyProperties.toString()); |
||||
|
} |
||||
|
builder.timeout(ms.getTimeout()); |
||||
|
builder.parameterMap(ms.getParameterMap()); |
||||
|
builder.resultMaps(ms.getResultMaps()); |
||||
|
builder.resultSetType(ms.getResultSetType()); |
||||
|
builder.cache(ms.getCache()); |
||||
|
builder.flushCacheRequired(ms.isFlushCacheRequired()); |
||||
|
builder.useCache(ms.isUseCache()); |
||||
|
|
||||
|
return builder.build(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
// 定义一个内部辅助类,作用是包装sq
|
||||
|
class BoundSqlSqlSource implements SqlSource { |
||||
|
private BoundSql boundSql; |
||||
|
public BoundSqlSqlSource(BoundSql boundSql) { |
||||
|
this.boundSql = boundSql; |
||||
|
} |
||||
|
@Override |
||||
|
public BoundSql getBoundSql(Object parameterObject) { |
||||
|
return boundSql; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,18 @@ |
|||||
|
package com.ccsens.signin.persist.dao; |
||||
|
|
||||
|
|
||||
|
import com.ccsens.signin.bean.vo.UserVo; |
||||
|
import com.ccsens.signin.persist.mapper.SysAuthMapper; |
||||
|
import org.springframework.stereotype.Repository; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Repository |
||||
|
public interface SysAuthDao extends SysAuthMapper { |
||||
|
/** |
||||
|
* 查询关注了公众号的用户的openid |
||||
|
* @param userIds |
||||
|
* @return |
||||
|
*/ |
||||
|
List<UserVo.Oauth2WX> queryOauth2WX(List<Long> userIds); |
||||
|
} |
@ -0,0 +1,65 @@ |
|||||
|
package com.ccsens.signin.persist.dao; |
||||
|
|
||||
|
|
||||
|
import com.ccsens.signin.bean.vo.UserVo; |
||||
|
import com.ccsens.signin.persist.mapper.SysUserMapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
import org.springframework.stereotype.Repository; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Repository |
||||
|
public interface SysUserDao extends SysUserMapper { |
||||
|
|
||||
|
void replaceAuth(@Param("oldUserId") Long userId, @Param("newUserId") Long currentUserId); |
||||
|
|
||||
|
void replaceAttention(@Param("oldUserId") Long userId, @Param("newUserId") Long currentUserId); |
||||
|
|
||||
|
void replaceBalance(@Param("oldUserId") Long userId, @Param("newUserId") Long currentUserId); |
||||
|
|
||||
|
void replaceProject(@Param("oldUserId") Long userId, @Param("newUserId") Long currentUserId); |
||||
|
|
||||
|
void replaceMember(@Param("oldUserId") Long userId, @Param("newUserId") Long currentUserId); |
||||
|
|
||||
|
void replaceDeliverPostLog(@Param("oldUserId") Long userId, @Param("newUserId") Long currentUserId); |
||||
|
|
||||
|
void replaceProLog(@Param("oldUserId") Long userId, @Param("newUserId") Long currentUserId); |
||||
|
|
||||
|
String getUserNameByUserId(@Param("userId") Long userId); |
||||
|
|
||||
|
void replaceComment(@Param("oldUserId") Long userId, @Param("newUserId") Long currentUserId); |
||||
|
|
||||
|
/** |
||||
|
* 查询用户信息 |
||||
|
* @param userId 用户id |
||||
|
* @return 用户信息 |
||||
|
*/ |
||||
|
UserVo.UserInfo getUserInfoByUserId(Long userId); |
||||
|
|
||||
|
/** |
||||
|
* 根据id查询用户信息 |
||||
|
* @param ids 用户id数组 |
||||
|
* @return 用户信息列表 |
||||
|
*/ |
||||
|
List<UserVo.UserInfo> queryUserInfos(Long[] ids); |
||||
|
/** |
||||
|
* 查找个人详细信息 |
||||
|
* @param currentUserId userId |
||||
|
* @return 个人信息 |
||||
|
*/ |
||||
|
UserVo.SelectUserInfo selectUserInfo(@Param("userId") Long currentUserId); |
||||
|
|
||||
|
/** |
||||
|
* 获取空间使用信息 |
||||
|
* @param currentUserId userId |
||||
|
* @return 目前只查询用户创建了几个项目 |
||||
|
*/ |
||||
|
UserVo.Interspace selectInterspace(@Param("userId") Long currentUserId); |
||||
|
|
||||
|
/** |
||||
|
* 查询登录返回的信息 |
||||
|
* @param userId |
||||
|
* @return |
||||
|
*/ |
||||
|
UserVo.TokenBean getTokenBeanByUserId(Long userId); |
||||
|
} |
@ -0,0 +1,8 @@ |
|||||
|
package com.ccsens.signin.persist.dao; |
||||
|
|
||||
|
import com.ccsens.signin.persist.mapper.SysUserInfoMapper; |
||||
|
import org.springframework.stereotype.Repository; |
||||
|
|
||||
|
@Repository |
||||
|
public interface SysUserInfoDao extends SysUserInfoMapper { |
||||
|
} |
@ -0,0 +1,30 @@ |
|||||
|
package com.ccsens.signin.persist.mapper; |
||||
|
|
||||
|
import com.ccsens.signin.bean.po.SysAuth; |
||||
|
import com.ccsens.signin.bean.po.SysAuthExample; |
||||
|
import java.util.List; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
public interface SysAuthMapper { |
||||
|
long countByExample(SysAuthExample example); |
||||
|
|
||||
|
int deleteByExample(SysAuthExample example); |
||||
|
|
||||
|
int deleteByPrimaryKey(Long id); |
||||
|
|
||||
|
int insert(SysAuth record); |
||||
|
|
||||
|
int insertSelective(SysAuth record); |
||||
|
|
||||
|
List<SysAuth> selectByExample(SysAuthExample example); |
||||
|
|
||||
|
SysAuth selectByPrimaryKey(Long id); |
||||
|
|
||||
|
int updateByExampleSelective(@Param("record") SysAuth record, @Param("example") SysAuthExample example); |
||||
|
|
||||
|
int updateByExample(@Param("record") SysAuth record, @Param("example") SysAuthExample example); |
||||
|
|
||||
|
int updateByPrimaryKeySelective(SysAuth record); |
||||
|
|
||||
|
int updateByPrimaryKey(SysAuth record); |
||||
|
} |
@ -0,0 +1,30 @@ |
|||||
|
package com.ccsens.signin.persist.mapper; |
||||
|
|
||||
|
import com.ccsens.signin.bean.po.SysUserInfo; |
||||
|
import com.ccsens.signin.bean.po.SysUserInfoExample; |
||||
|
import java.util.List; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
public interface SysUserInfoMapper { |
||||
|
long countByExample(SysUserInfoExample example); |
||||
|
|
||||
|
int deleteByExample(SysUserInfoExample example); |
||||
|
|
||||
|
int deleteByPrimaryKey(Long id); |
||||
|
|
||||
|
int insert(SysUserInfo record); |
||||
|
|
||||
|
int insertSelective(SysUserInfo record); |
||||
|
|
||||
|
List<SysUserInfo> selectByExample(SysUserInfoExample example); |
||||
|
|
||||
|
SysUserInfo selectByPrimaryKey(Long id); |
||||
|
|
||||
|
int updateByExampleSelective(@Param("record") SysUserInfo record, @Param("example") SysUserInfoExample example); |
||||
|
|
||||
|
int updateByExample(@Param("record") SysUserInfo record, @Param("example") SysUserInfoExample example); |
||||
|
|
||||
|
int updateByPrimaryKeySelective(SysUserInfo record); |
||||
|
|
||||
|
int updateByPrimaryKey(SysUserInfo record); |
||||
|
} |
@ -0,0 +1,30 @@ |
|||||
|
package com.ccsens.signin.persist.mapper; |
||||
|
|
||||
|
import com.ccsens.signin.bean.po.SysUser; |
||||
|
import com.ccsens.signin.bean.po.SysUserExample; |
||||
|
import java.util.List; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
public interface SysUserMapper { |
||||
|
long countByExample(SysUserExample example); |
||||
|
|
||||
|
int deleteByExample(SysUserExample example); |
||||
|
|
||||
|
int deleteByPrimaryKey(Long id); |
||||
|
|
||||
|
int insert(SysUser record); |
||||
|
|
||||
|
int insertSelective(SysUser record); |
||||
|
|
||||
|
List<SysUser> selectByExample(SysUserExample example); |
||||
|
|
||||
|
SysUser selectByPrimaryKey(Long id); |
||||
|
|
||||
|
int updateByExampleSelective(@Param("record") SysUser record, @Param("example") SysUserExample example); |
||||
|
|
||||
|
int updateByExample(@Param("record") SysUser record, @Param("example") SysUserExample example); |
||||
|
|
||||
|
int updateByPrimaryKeySelective(SysUser record); |
||||
|
|
||||
|
int updateByPrimaryKey(SysUser record); |
||||
|
} |
@ -0,0 +1,48 @@ |
|||||
|
package com.ccsens.signin.service; |
||||
|
|
||||
|
import com.ccsens.signin.bean.dto.UserDto; |
||||
|
import com.ccsens.signin.bean.vo.UserVo; |
||||
|
|
||||
|
import javax.servlet.http.Part; |
||||
|
|
||||
|
/** |
||||
|
* @author 逗 |
||||
|
*/ |
||||
|
public interface IUserInfoService { |
||||
|
/** |
||||
|
* 修改登录的账号 |
||||
|
* @param userId 用户id |
||||
|
* @param changeAccount 验证码和新账号 |
||||
|
*/ |
||||
|
void updateAccount(Long userId, UserDto.UpdateAccount changeAccount); |
||||
|
|
||||
|
/** |
||||
|
* 修改昵称 |
||||
|
* @param userId 用户id |
||||
|
* @param updateNickname 新昵称 |
||||
|
*/ |
||||
|
void updateNickname(Long userId, UserDto.UpdateNickname updateNickname); |
||||
|
|
||||
|
/** |
||||
|
* 上传头像 |
||||
|
* @param currentUserId userId |
||||
|
* @param file 上传的文件 |
||||
|
* @throws Exception 文件异常 |
||||
|
*/ |
||||
|
void uploadAvatarUrl(Long currentUserId, Part file) throws Exception; |
||||
|
|
||||
|
/** |
||||
|
* 查找全部个人信息 |
||||
|
* @param currentUserId userId |
||||
|
* @return 个人信息 |
||||
|
*/ |
||||
|
UserVo.SelectUserInfo selectUserInfo(Long currentUserId); |
||||
|
|
||||
|
/** |
||||
|
* 修改个人详细信息 |
||||
|
* @param currentUserId userId |
||||
|
* @param updateUserInfo 需要修改的信息,为空则不需要修改 |
||||
|
* @return 返回当前用户的详细信息 |
||||
|
*/ |
||||
|
UserVo.SelectUserInfo updateUserInfo(Long currentUserId, UserDto.UpdateUserInfo updateUserInfo); |
||||
|
} |
@ -0,0 +1,110 @@ |
|||||
|
package com.ccsens.signin.service; |
||||
|
|
||||
|
import com.ccsens.signin.bean.dto.UserDto; |
||||
|
import com.ccsens.signin.bean.po.SysUser; |
||||
|
import com.ccsens.signin.bean.vo.UserVo; |
||||
|
import com.ccsens.util.WebConstant; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* @author 逗 |
||||
|
*/ |
||||
|
public interface IUserService { |
||||
|
UserVo.UserSign signin(WebConstant.CLIENT_TYPE clientType, WebConstant.IDENTIFY_TYPE identifyType, |
||||
|
String identifier, String credential, String clientIp, String redirect) throws Exception; |
||||
|
|
||||
|
UserVo.TokenBean generateToken(WebConstant.CLIENT_TYPE client_type, Object subject, Map<String, Object> payLoads) throws Exception; |
||||
|
|
||||
|
UserVo.TokenBean getUserInfoAndToken(WebConstant.CLIENT_TYPE client_type, WebConstant.IDENTIFY_TYPE identify_type, UserVo.UserSign userSignVo, Map<String, Object> theMap) throws Exception; |
||||
|
|
||||
|
boolean tokenNotExistInCache(Long authId) throws Exception; |
||||
|
|
||||
|
UserVo.SmsCode getSignInSmsCode(String phone, String verificationCodeId, String verificationCodeValue) throws Exception; |
||||
|
|
||||
|
SysUser getUserById(Long aLong) throws Exception; |
||||
|
|
||||
|
UserVo.UserSign registerUser(UserDto.UserSignup userSignup)throws Exception; |
||||
|
|
||||
|
UserVo.UserSign bindingNewPhone(Long currentUserId, UserDto.WxBindingPhone wxPhone)throws Exception; |
||||
|
|
||||
|
String getPhone(Long userId); |
||||
|
|
||||
|
void updatePhone(Long currentUserId, UserDto.UpdatePhone updatePhone) throws Exception; |
||||
|
|
||||
|
Boolean findAccount(String account); |
||||
|
|
||||
|
Boolean findPhone(String phone); |
||||
|
|
||||
|
UserVo.UserSign saveAuth(UserDto.UserSignup userSignup); |
||||
|
|
||||
|
void updateAccount(UserDto.Account account); |
||||
|
|
||||
|
/** |
||||
|
* 通过手机号修改密码 |
||||
|
* @param passwordDto 手机号验证码 |
||||
|
*/ |
||||
|
void updatePassword(UserDto.UpdatePassword passwordDto) throws Exception; |
||||
|
|
||||
|
/** |
||||
|
* 通过账号密码修改密码 |
||||
|
* @param passwordDto 账号旧密码和新密码 |
||||
|
*/ |
||||
|
void updatePasswordByAccount(UserDto.UpdatePasswordByAccount passwordDto) throws Exception; |
||||
|
|
||||
|
/** |
||||
|
* 通过手机号查找userId |
||||
|
* @param phoneCell 手机号 |
||||
|
* @return userId |
||||
|
*/ |
||||
|
Long selectUserIdByPhone(String phoneCell)throws Exception; |
||||
|
|
||||
|
String selectAccountByPhone(String phone)throws Exception; |
||||
|
|
||||
|
// List<Long> selectUserIdByRoleId(Long roleId)throws Exception;
|
||||
|
//
|
||||
|
// Boolean getIsAttention(Long currentUserId, Long projectId);
|
||||
|
|
||||
|
// void userAttentionProject(Long currentUserId, ProjectDto.ProjectIdDto projectIdDto);
|
||||
|
|
||||
|
//默认注册
|
||||
|
/** |
||||
|
*@Description: 注冊用戶,若用戶手机号存在,则默认用户已注册,不做任何操作;若账号重复,则再名字后面添加_1(递增,直到不重复) |
||||
|
* @param signup |
||||
|
*@return: long |
||||
|
*@Author: wuhuijuan |
||||
|
*@date: 2019/10/29 14:43 |
||||
|
*/ |
||||
|
long defaultRegisterUser(com.ccsens.cloudutil.bean.tall.dto.UserDto.DefaultUserSingup signup); |
||||
|
|
||||
|
|
||||
|
UserVo.UserSign mergeByPhone(Long currentUserId, UserDto.WxMergePhone wxPhone); |
||||
|
|
||||
|
UserVo.WxInfo updateUserInfo(Long currentUserId, UserDto.WxInfo userInfo); |
||||
|
|
||||
|
void relievePhone(Long userId, UserDto.WxBindingPhone phoneInfo); |
||||
|
|
||||
|
UserVo.UserSign changePhoneNotPassword(Long userId, UserDto.WxBindingPhone phoneInfo) throws Exception; |
||||
|
|
||||
|
UserVo.TokenBean getTokenByUserId(Long userId); |
||||
|
|
||||
|
void mergeUserId(Long userId, Long uselessId); |
||||
|
|
||||
|
UserVo.Account systemRegister(UserDto.UserSignupSystem userSignup); |
||||
|
|
||||
|
String getUserNameByUserId(Long userId); |
||||
|
|
||||
|
/** |
||||
|
* 根据id查询用户信息 |
||||
|
* @param ids |
||||
|
* @return |
||||
|
*/ |
||||
|
List<UserVo.UserInfo> queryUserInfos(Long[] ids); |
||||
|
|
||||
|
/** |
||||
|
* 获取图片验证码信息 |
||||
|
* @return 返回图片转成的base64字符串,和图片的id |
||||
|
*/ |
||||
|
UserVo.VerificationCode getVertifyCode(); |
||||
|
} |
@ -0,0 +1,258 @@ |
|||||
|
package com.ccsens.signin.service; |
||||
|
|
||||
|
import cn.hutool.core.collection.CollectionUtil; |
||||
|
import cn.hutool.core.date.DateUtil; |
||||
|
import cn.hutool.core.io.FileUtil; |
||||
|
import cn.hutool.core.lang.Snowflake; |
||||
|
import cn.hutool.core.util.IdUtil; |
||||
|
import cn.hutool.core.util.ImageUtil; |
||||
|
import cn.hutool.core.util.ObjectUtil; |
||||
|
import cn.hutool.core.util.StrUtil; |
||||
|
import com.ccsens.signin.bean.dto.UserDto; |
||||
|
import com.ccsens.signin.bean.po.*; |
||||
|
import com.ccsens.signin.bean.vo.UserVo; |
||||
|
import com.ccsens.signin.persist.dao.SysAuthDao; |
||||
|
import com.ccsens.signin.persist.dao.SysUserDao; |
||||
|
import com.ccsens.signin.persist.dao.SysUserInfoDao; |
||||
|
import com.ccsens.signin.util.TallConstant; |
||||
|
import com.ccsens.util.*; |
||||
|
import com.ccsens.util.exception.BaseException; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.apache.commons.io.FileUtils; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Propagation; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
import javax.servlet.http.Part; |
||||
|
import java.io.File; |
||||
|
import java.security.NoSuchAlgorithmException; |
||||
|
import java.security.spec.InvalidKeySpecException; |
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author 逗 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@Service |
||||
|
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) |
||||
|
public class UserInfoService implements IUserInfoService{ |
||||
|
@Resource |
||||
|
private RedisUtil redisUtil; |
||||
|
@Resource |
||||
|
private SysAuthDao sysAuthDao; |
||||
|
@Resource |
||||
|
private SysUserDao sysUserDao; |
||||
|
// @Resource
|
||||
|
// private SysLabelDao sysLabelDao;
|
||||
|
@Resource |
||||
|
private SysUserInfoDao sysUserInfoDao; |
||||
|
@Resource |
||||
|
private Snowflake snowflake; |
||||
|
|
||||
|
@Override |
||||
|
public void updateAccount(Long userId, UserDto.UpdateAccount changeAccount) { |
||||
|
//判断验证码是否正确
|
||||
|
if (redisUtil.hasKey(RedisKeyManager.getSigninSmsKey(changeAccount.getPhone()))) { |
||||
|
if (changeAccount.getSmsCode().equals(redisUtil.get(RedisKeyManager.getSigninSmsKey(changeAccount.getPhone())).toString())) { |
||||
|
//查找redis该账号是否正在使用
|
||||
|
String accountKey = TallConstant.getUpdateAccount(changeAccount.getAccount()); |
||||
|
if(redisUtil.hasKey(accountKey)){ |
||||
|
throw new BaseException(CodeEnum.ALREADY_EXIST_ACCOUNT); |
||||
|
} |
||||
|
//未查到则存进redis时效一分钟
|
||||
|
redisUtil.set(accountKey,changeAccount.getAccount(),60); |
||||
|
//检查数据库内账号是否存在
|
||||
|
SysAuthExample sysAuthExample = new SysAuthExample(); |
||||
|
sysAuthExample.createCriteria().andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Account.value) |
||||
|
.andIdentifierEqualTo(changeAccount.getAccount()); |
||||
|
List<SysAuth> sysAuthList = sysAuthDao.selectByExample(sysAuthExample); |
||||
|
if(CollectionUtil.isNotEmpty(sysAuthList)){ |
||||
|
throw new BaseException(CodeEnum.ALREADY_EXIST_ACCOUNT); |
||||
|
} |
||||
|
//修改账号
|
||||
|
SysAuthExample authAccountExample = new SysAuthExample(); |
||||
|
authAccountExample.createCriteria().andUserIdEqualTo(userId).andIdentifyTypeEqualTo((byte) WebConstant.IDENTIFY_TYPE.Account.value); |
||||
|
List<SysAuth> authList = sysAuthDao.selectByExample(authAccountExample); |
||||
|
if(CollectionUtil.isNotEmpty(authList)){ |
||||
|
authList.forEach(sysAuth -> { |
||||
|
//验证密码
|
||||
|
try { |
||||
|
if (!ShiroKit.authenticate(changeAccount.getPassword(), sysAuth.getCredential(), sysAuth.getSalt())) { |
||||
|
throw new BaseException(CodeEnum.PASSWORD_ERROR); |
||||
|
} |
||||
|
sysAuth.setIdentifier(changeAccount.getAccount()); |
||||
|
sysAuthDao.updateByPrimaryKeySelective(sysAuth); |
||||
|
} catch (NoSuchAlgorithmException e) { |
||||
|
e.printStackTrace(); |
||||
|
} catch (InvalidKeySpecException e) { |
||||
|
e.printStackTrace(); |
||||
|
} |
||||
|
}); |
||||
|
}else { |
||||
|
//不存在则添加账号
|
||||
|
SysAuth sysAuth = new SysAuth(); |
||||
|
sysAuth.setId(snowflake.nextId()); |
||||
|
sysAuth.setUserId(userId); |
||||
|
sysAuth.setIdentifyType((byte) WebConstant.IDENTIFY_TYPE.Account.value); |
||||
|
sysAuth.setIdentifier(changeAccount.getAccount()); |
||||
|
sysAuth.setSalt(ShiroKit.getRandomSalt(6)); |
||||
|
sysAuth.setCredential(ShiroKit.md5(changeAccount.getPassword(), sysAuth.getSalt())); |
||||
|
sysAuthDao.insertSelective(sysAuth); |
||||
|
} |
||||
|
//修改完删除redis
|
||||
|
redisUtil.del(accountKey); |
||||
|
}else { |
||||
|
throw new BaseException(CodeEnum.SMS_CODE_CORRECT); |
||||
|
} |
||||
|
}else { |
||||
|
throw new BaseException(CodeEnum.SMS_CODE_CORRECT); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void updateNickname(Long userId, UserDto.UpdateNickname updateNickname) { |
||||
|
//查找redis该昵称是否正在使用
|
||||
|
String nicknameKey = TallConstant.getUpdateNickname(updateNickname.getNickname()); |
||||
|
if(redisUtil.hasKey(nicknameKey)){ |
||||
|
throw new BaseException(CodeEnum.NICKNAME_REPEAT); |
||||
|
} |
||||
|
//未查到则存进redis时效一分钟
|
||||
|
redisUtil.set(nicknameKey,updateNickname.getNickname(),60); |
||||
|
//查找数据库此昵称是否存在
|
||||
|
SysUserExample sysUserExample = new SysUserExample(); |
||||
|
sysUserExample.createCriteria().andNicknameEqualTo(updateNickname.getNickname()); |
||||
|
List<SysUser> userList = sysUserDao.selectByExample(sysUserExample); |
||||
|
if(CollectionUtil.isNotEmpty(userList)){ |
||||
|
throw new BaseException(CodeEnum.NICKNAME_REPEAT); |
||||
|
} |
||||
|
SysUser user = sysUserDao.selectByPrimaryKey(userId); |
||||
|
if(ObjectUtil.isNotNull(user)){ |
||||
|
user.setNickname(updateNickname.getNickname()); |
||||
|
sysUserDao.updateByPrimaryKeySelective(user); |
||||
|
} |
||||
|
redisUtil.del(nicknameKey); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void uploadAvatarUrl(Long currentUserId, Part file) throws Exception { |
||||
|
//获取文件大小
|
||||
|
float fileSize = (float) file.getSize(); |
||||
|
System.out.println(fileSize); |
||||
|
//计算出倍数
|
||||
|
float a = (float)(80 * 1024) / fileSize; |
||||
|
System.out.println(a); |
||||
|
//限制文件格式
|
||||
|
String allowedExts = "png,jpg,jpeg"; |
||||
|
String original = UploadFileUtil_Servlet3.getFileNameByPart(file); |
||||
|
String ext = FileUtil.extName(original); |
||||
|
if (StrUtil.isEmpty(ext) || !allowedExts.contains(ext)){ |
||||
|
throw new NotSupportedFileTypeException("不支持的格式类型: " + ext); |
||||
|
} |
||||
|
//创建文件目录及名字
|
||||
|
String extraPath = DateUtil.format(new Date(), "yyyyMMdd"); |
||||
|
//上传的文件
|
||||
|
String temporaryFilePath = File.separator + IdUtil.simpleUUID() + "." + ext; |
||||
|
File temporaryFile = new File(WebConstant.UPLOAD_AVATAR_URL + extraPath + temporaryFilePath); |
||||
|
FileUtils.copyInputStreamToFile(file.getInputStream(), temporaryFile); |
||||
|
//压缩后的文件
|
||||
|
String compressFilePath = File.separator + IdUtil.simpleUUID() + "." + ext; |
||||
|
File compressFile = new File(WebConstant.UPLOAD_AVATAR_URL+ extraPath + compressFilePath); |
||||
|
//文件大于80k则进行压缩,否则不压缩
|
||||
|
if(a < 1) { |
||||
|
ImageUtil.scale(temporaryFile, compressFile, a); |
||||
|
} |
||||
|
//获取文件的压缩前的文件名
|
||||
|
String fullPath = WebConstant.UPLOAD_PATH_AVATAR_URL + File.separator + extraPath + temporaryFilePath; |
||||
|
//压缩前和压缩后的文件都存在则删除压缩前的文件
|
||||
|
if(temporaryFile.exists() && compressFile.exists()){ |
||||
|
FileUtil.del(temporaryFile); |
||||
|
//压缩成功后获取压缩后的文件名
|
||||
|
fullPath = WebConstant.UPLOAD_PATH_AVATAR_URL + File.separator + extraPath + compressFilePath; |
||||
|
} |
||||
|
|
||||
|
//查找到当前的用户,修改头像路径信息
|
||||
|
SysUser sysUser = sysUserDao.selectByPrimaryKey(currentUserId); |
||||
|
|
||||
|
sysUser.setAvatarUrl(PropUtil.gatewayUrl + WebConstant.TALL_UPLOADS + fullPath); |
||||
|
sysUserDao.updateByPrimaryKeySelective(sysUser); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public UserVo.SelectUserInfo selectUserInfo(Long currentUserId){ |
||||
|
UserVo.SelectUserInfo selectUserInfo = sysUserDao.selectUserInfo(currentUserId); |
||||
|
if(ObjectUtil.isNotNull(selectUserInfo)){ |
||||
|
//计算注册时长
|
||||
|
if(ObjectUtil.isNotNull(selectUserInfo.getCreatedAt())){ |
||||
|
long now = System.currentTimeMillis(); |
||||
|
selectUserInfo.setDayOfUseTall((int) ((now - selectUserInfo.getCreatedAt().getTime()) / 1000 / 3600 / 24)); |
||||
|
} |
||||
|
// //获取标签信息
|
||||
|
// selectUserInfo.setLabelList(sysLabelDao.selectLabelByUserId(currentUserId,null,null));
|
||||
|
//获取空间使用信息
|
||||
|
UserVo.Interspace interspace = sysUserDao.selectInterspace(currentUserId); |
||||
|
selectUserInfo.setInterspace(interspace); |
||||
|
} |
||||
|
|
||||
|
return selectUserInfo; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public UserVo.SelectUserInfo updateUserInfo(Long currentUserId, UserDto.UpdateUserInfo updateUserInfo) { |
||||
|
//查找用户
|
||||
|
SysUser user = sysUserDao.selectByPrimaryKey(updateUserInfo.getId()); |
||||
|
if(ObjectUtil.isNull(user)){ |
||||
|
throw new BaseException(CodeEnum.NOT_USER); |
||||
|
} |
||||
|
//查找用户详细信息的记录
|
||||
|
SysUserInfo sysUserInfo; |
||||
|
SysUserInfoExample sysUserInfoExample = new SysUserInfoExample(); |
||||
|
sysUserInfoExample.createCriteria().andUserIdEqualTo(updateUserInfo.getId()); |
||||
|
List<SysUserInfo> sysUserInfoList = sysUserInfoDao.selectByExample(sysUserInfoExample); |
||||
|
if(CollectionUtil.isNotEmpty(sysUserInfoList)){ |
||||
|
sysUserInfo = sysUserInfoList.get(0); |
||||
|
}else { |
||||
|
sysUserInfo = new SysUserInfo(); |
||||
|
sysUserInfo.setId(snowflake.nextId()); |
||||
|
sysUserInfo.setUserId(updateUserInfo.getId()); |
||||
|
sysUserInfoDao.insertSelective(sysUserInfo); |
||||
|
} |
||||
|
//修改昵称
|
||||
|
if(StrUtil.isNotEmpty(updateUserInfo.getNickname())){ |
||||
|
UserDto.UpdateNickname updateNickname = new UserDto.UpdateNickname(); |
||||
|
updateNickname.setNickname(updateUserInfo.getNickname()); |
||||
|
updateNickname(updateUserInfo.getId(),updateNickname); |
||||
|
} |
||||
|
//个人签名
|
||||
|
if(StrUtil.isNotEmpty(updateUserInfo.getSignature())){ |
||||
|
sysUserInfo.setSignature(updateUserInfo.getSignature()); |
||||
|
} |
||||
|
//个人简介
|
||||
|
if(StrUtil.isNotEmpty(updateUserInfo.getIntroduction())){ |
||||
|
sysUserInfo.setIntroduction(updateUserInfo.getIntroduction()); |
||||
|
} |
||||
|
//生日
|
||||
|
if(StrUtil.isNotEmpty(updateUserInfo.getBirthday())){ |
||||
|
sysUserInfo.setBirthday(updateUserInfo.getBirthday()); |
||||
|
} |
||||
|
//所在地
|
||||
|
if(StrUtil.isNotEmpty(updateUserInfo.getAddress())){ |
||||
|
sysUserInfo.setAddress(updateUserInfo.getAddress()); |
||||
|
} |
||||
|
//网页
|
||||
|
if(StrUtil.isNotEmpty(updateUserInfo.getWebPath())){ |
||||
|
sysUserInfo.setWebPath(updateUserInfo.getWebPath()); |
||||
|
} |
||||
|
//公司
|
||||
|
if(StrUtil.isNotEmpty(updateUserInfo.getCompany())){ |
||||
|
sysUserInfo.setCompany(updateUserInfo.getCompany()); |
||||
|
} |
||||
|
//职位
|
||||
|
if(StrUtil.isNotEmpty(updateUserInfo.getPosition())){ |
||||
|
sysUserInfo.setPosition(updateUserInfo.getPosition()); |
||||
|
} |
||||
|
sysUserInfoDao.updateByPrimaryKeySelective(sysUserInfo); |
||||
|
return selectUserInfo(updateUserInfo.getId()); |
||||
|
} |
||||
|
} |
File diff suppressed because it is too large
@ -0,0 +1,55 @@ |
|||||
|
package com.ccsens.signin.util; |
||||
|
|
||||
|
/** |
||||
|
* @author 逗 |
||||
|
*/ |
||||
|
public class TallConstant { |
||||
|
|
||||
|
/*** redis key: 修改账号*/ |
||||
|
public static final String UPDATE_ACCOUNT = "update_account_"; |
||||
|
/*** redis key: 修改账号*/ |
||||
|
public static final String UPDATE_NICKNAME = "update_nickname_"; |
||||
|
/*** redis key: 查找登陆用户 格式 identifier_login_identifyType 有效期一天*/ |
||||
|
public static final String LOGIN = "_login_"; |
||||
|
/*** (需要特殊处理的插件)个人任务汇报插件*/ |
||||
|
public static final String PERSONAL_TASK_REPORT = "personal_task_report"; |
||||
|
|
||||
|
/***一天 */ |
||||
|
public static final long LOGIN_TIME = 60 * 60 * 24; |
||||
|
|
||||
|
/** |
||||
|
* 接口发送的信息模板 |
||||
|
* @param operateType 接口code |
||||
|
* @return |
||||
|
*/ |
||||
|
public static String getRobotTemplateKey(int operateType) { |
||||
|
return "operate_type_" + operateType; |
||||
|
} |
||||
|
|
||||
|
public static String getUpdateAccount(String account){ |
||||
|
return UPDATE_ACCOUNT + account; |
||||
|
} |
||||
|
|
||||
|
public static String getUpdateNickname(String nickname){ |
||||
|
return UPDATE_ACCOUNT + nickname; |
||||
|
} |
||||
|
|
||||
|
public static final class TaskRemindTiming { |
||||
|
/**不提醒*/ |
||||
|
public static final byte REMIND_NONE = 0; |
||||
|
/**开始前*/ |
||||
|
public static final byte REMIND_TASK_BEFORE_START = 1; |
||||
|
/**开始时*/ |
||||
|
public static final byte REMIND_TASK_START = 2; |
||||
|
/**开始后*/ |
||||
|
public static final byte REMIND_TASK_AFTER_START = 3; |
||||
|
/**结束前*/ |
||||
|
public static final byte REMIND_TASK_BEFORE_END = 4; |
||||
|
/**结束时*/ |
||||
|
public static final byte REMIND_TASK_END = 5; |
||||
|
/**结束后*/ |
||||
|
public static final byte REMIND_TASK_AFTER_END = 6; |
||||
|
/**自定义*/ |
||||
|
public static final byte REMIND_TASK_USER_DEFINED = 7; |
||||
|
} |
||||
|
} |
@ -0,0 +1,168 @@ |
|||||
|
package com.ccsens.signin.util; |
||||
|
|
||||
|
import cn.hutool.core.date.DateUtil; |
||||
|
import cn.hutool.core.util.StrUtil; |
||||
|
import com.ccsens.util.WechatUtil; |
||||
|
import com.ccsens.util.wx.WxGzhUtil; |
||||
|
import com.ccsens.util.wx.WxTemplateMessage; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* @description: 微信模板 |
||||
|
* @author: whj |
||||
|
* @time: 2020/6/9 11:07 |
||||
|
*/ |
||||
|
public class WxTemplateUtil { |
||||
|
|
||||
|
/** |
||||
|
* 设置小程序跳转 |
||||
|
* @param projectId |
||||
|
* @return |
||||
|
*/ |
||||
|
private static WxTemplateMessage getWxTemplateMessage(Long projectId) { |
||||
|
String url = String.format(WechatUtil.PROJECT_URL, projectId); |
||||
|
WxTemplateMessage.MiniProgram miniProgram = new WxTemplateMessage.MiniProgram(WechatUtil.appid,url); |
||||
|
|
||||
|
WxTemplateMessage message = new WxTemplateMessage(); |
||||
|
message.setMiniprogram(miniProgram); |
||||
|
return message; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 完成任务提醒(备注是在切面处统一加的) |
||||
|
* @param projectId |
||||
|
* @param userName |
||||
|
* @param operation |
||||
|
* @param taskName |
||||
|
* @return |
||||
|
*/ |
||||
|
public static WxTemplateMessage getFinishTask(Long projectId, String userName, String operation, String taskName){ |
||||
|
|
||||
|
WxTemplateMessage message = getWxTemplateMessage(projectId); |
||||
|
message.setTemplate_id(WxGzhUtil.Template.TASK_FINISH.templateId); |
||||
|
WxTemplateMessage.TemplateData data = new WxTemplateMessage.TemplateData(); |
||||
|
data.setFirst(new WxTemplateMessage.TemplateSettings(userName + operation + taskName)); |
||||
|
data.setKeyword1(new WxTemplateMessage.TemplateSettings(taskName)); |
||||
|
data.setKeyword2(new WxTemplateMessage.TemplateSettings(DateUtil.now())); |
||||
|
message.setData(data); |
||||
|
return message; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 添加任务(备注是在切面处统一加的) |
||||
|
* @param projectId |
||||
|
* @param userName |
||||
|
* @param taskName |
||||
|
* @return |
||||
|
*/ |
||||
|
public static WxTemplateMessage getAddTask(Long projectId, String userName, String taskName) { |
||||
|
WxTemplateMessage message = getWxTemplateMessage(projectId); |
||||
|
message.setTemplate_id(WxGzhUtil.Template.TASK_ADD.templateId); |
||||
|
WxTemplateMessage.TemplateData data = new WxTemplateMessage.TemplateData(); |
||||
|
data.setFirst(new WxTemplateMessage.TemplateSettings(StrUtil.format("{}添加了{}任务", userName, taskName))); |
||||
|
data.setKeyword1(new WxTemplateMessage.TemplateSettings(taskName)); |
||||
|
data.setKeyword2(new WxTemplateMessage.TemplateSettings(DateUtil.now())); |
||||
|
message.setData(data); |
||||
|
return message; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除任务 |
||||
|
* @param projectId |
||||
|
* @param userName |
||||
|
* @param taskName |
||||
|
* @return |
||||
|
*/ |
||||
|
public static WxTemplateMessage getDeleteTask(Long projectId, String userName, String taskName) { |
||||
|
WxTemplateMessage message = getWxTemplateMessage(projectId); |
||||
|
message.setTemplate_id(WxGzhUtil.Template.TASK_DELETE.templateId); |
||||
|
WxTemplateMessage.TemplateData data = new WxTemplateMessage.TemplateData(); |
||||
|
data.setFirst(new WxTemplateMessage.TemplateSettings(StrUtil.format("{}删除了{}任务", userName, taskName))); |
||||
|
data.setKeyword1(new WxTemplateMessage.TemplateSettings(taskName)); |
||||
|
data.setKeyword2(new WxTemplateMessage.TemplateSettings(DateUtil.now())); |
||||
|
data.setKeyword3(new WxTemplateMessage.TemplateSettings("")); |
||||
|
message.setData(data); |
||||
|
return message; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改任务 |
||||
|
* @param projectId |
||||
|
* @param userName |
||||
|
* @param taskName |
||||
|
* @return |
||||
|
*/ |
||||
|
public static WxTemplateMessage getChangeTask(Long projectId, String userName, String taskName) { |
||||
|
WxTemplateMessage message = getAddTask(projectId, userName, taskName); |
||||
|
message.getData().setFirst(new WxTemplateMessage.TemplateSettings(StrUtil.format("{}修改了{}任务", userName, taskName))); |
||||
|
return message; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 上传交付物 |
||||
|
* @param projectId |
||||
|
* @param userName |
||||
|
* @param deliverName |
||||
|
* @return |
||||
|
*/ |
||||
|
public static WxTemplateMessage getAddDeliver(Long projectId, String userName, String deliverName) { |
||||
|
WxTemplateMessage message = getWxTemplateMessage(projectId); |
||||
|
message.setTemplate_id(WxGzhUtil.Template.TASK_PROGRESS.templateId); |
||||
|
WxTemplateMessage.TemplateData data = new WxTemplateMessage.TemplateData(); |
||||
|
data.setFirst(new WxTemplateMessage.TemplateSettings("")); |
||||
|
data.setKeyword1(new WxTemplateMessage.TemplateSettings(userName + "上传了" + deliverName)); |
||||
|
data.setKeyword2(new WxTemplateMessage.TemplateSettings("上传交付物")); |
||||
|
message.setData(data); |
||||
|
return message; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除交付物 |
||||
|
* @param projectId |
||||
|
* @param userName |
||||
|
* @param deliverName |
||||
|
* @return |
||||
|
*/ |
||||
|
public static WxTemplateMessage getDeleteDeliver(Long projectId, String userName, String deliverName) { |
||||
|
WxTemplateMessage message = getAddDeliver(projectId, userName, deliverName); |
||||
|
WxTemplateMessage.TemplateData data = message.getData(); |
||||
|
data.setKeyword1(new WxTemplateMessage.TemplateSettings(userName + "删除了" + deliverName)); |
||||
|
data.setKeyword2(new WxTemplateMessage.TemplateSettings("删除交付物")); |
||||
|
message.setData(data); |
||||
|
return message; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 检查交付物 |
||||
|
* @param projectId |
||||
|
* @param userName |
||||
|
* @param deliverName |
||||
|
* @return |
||||
|
*/ |
||||
|
public static WxTemplateMessage getCheckDeliver(Long projectId, String userName, String deliverName) { |
||||
|
WxTemplateMessage message = getAddDeliver(projectId, userName, deliverName); |
||||
|
WxTemplateMessage.TemplateData data = message.getData(); |
||||
|
data.setKeyword1(new WxTemplateMessage.TemplateSettings(userName + "检查了" + deliverName)); |
||||
|
data.setKeyword2(new WxTemplateMessage.TemplateSettings("检查交付物")); |
||||
|
message.setData(data); |
||||
|
return message; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 发表评论 |
||||
|
* @param projectId |
||||
|
* @param userName |
||||
|
* @return |
||||
|
*/ |
||||
|
public static WxTemplateMessage getAddComment(Long projectId, String userName) { |
||||
|
WxTemplateMessage message = getWxTemplateMessage(projectId); |
||||
|
message.setTemplate_id(WxGzhUtil.Template.TASK_PROGRESS.templateId); |
||||
|
WxTemplateMessage.TemplateData data = new WxTemplateMessage.TemplateData(); |
||||
|
data.setFirst(new WxTemplateMessage.TemplateSettings(userName + "进行了点评")); |
||||
|
data.setKeyword1(new WxTemplateMessage.TemplateSettings(userName)); |
||||
|
data.setKeyword2(new WxTemplateMessage.TemplateSettings(DateUtil.now())); |
||||
|
message.setData(data); |
||||
|
return message; |
||||
|
} |
||||
|
} |
@ -0,0 +1,28 @@ |
|||||
|
logging: |
||||
|
level: |
||||
|
com: |
||||
|
favorites: DEBUG |
||||
|
org: |
||||
|
hibernate: ERROR |
||||
|
springframework: |
||||
|
web: DEBUG |
||||
|
mybatis: |
||||
|
config-location: classpath:mybatis/mybatis-config.xml |
||||
|
mapper-locations: classpath*:mapper_*/*.xml |
||||
|
type-aliases-package: com.ccsens.ht.bean |
||||
|
server: |
||||
|
tomcat: |
||||
|
uri-encoding: UTF-8 |
||||
|
spring: |
||||
|
http: |
||||
|
encoding: |
||||
|
charset: UTF-8 |
||||
|
enabled: true |
||||
|
force: true |
||||
|
log-request-details: true |
||||
|
servlet: |
||||
|
multipart: |
||||
|
max-file-size: 10MB |
||||
|
max-request-size: 100MB |
||||
|
|
||||
|
|
@ -0,0 +1,41 @@ |
|||||
|
server: |
||||
|
port: 7130 |
||||
|
servlet: |
||||
|
context-path: |
||||
|
spring: |
||||
|
snowflake: |
||||
|
datacenterId: 1 |
||||
|
workerId: 1 |
||||
|
application: |
||||
|
name: signin |
||||
|
datasource: |
||||
|
type: com.alibaba.druid.pool.DruidDataSource |
||||
|
rabbitmq: |
||||
|
host: 192.168.0.99 |
||||
|
password: 111111 |
||||
|
port: 5672 |
||||
|
username: admin |
||||
|
redis: |
||||
|
database: 0 |
||||
|
host: 127.0.0.1 |
||||
|
jedis: |
||||
|
pool: |
||||
|
max-active: 200 |
||||
|
max-idle: 10 |
||||
|
max-wait: -1ms |
||||
|
min-idle: 0 |
||||
|
password: '' |
||||
|
port: 6379 |
||||
|
timeout: 1000ms |
||||
|
swagger: |
||||
|
enable: true |
||||
|
|
||||
|
gatewayUrl: https://test.tall.wiki/gateway/ |
||||
|
notGatewayUrl: /home/staticrec/logo.png |
||||
|
smsCode: 0 |
||||
|
wx: |
||||
|
prefixUrl: https://test.tall.wiki/wxconfigurer-api/ |
||||
|
file: |
||||
|
path: /home/cloud/tall/uploads/ |
||||
|
domain: http://localhost:7030/v1.0/ |
||||
|
imgDomain: http://localhost:7030/v1.0/uploads |
@ -0,0 +1,48 @@ |
|||||
|
server: |
||||
|
port: 7130 |
||||
|
servlet: |
||||
|
context-path: /v1.0 |
||||
|
spring: |
||||
|
snowflake: |
||||
|
datacenterId: 1 |
||||
|
workerId: 1 |
||||
|
application: |
||||
|
name: signin |
||||
|
datasource: |
||||
|
type: com.alibaba.druid.pool.DruidDataSource |
||||
|
rabbitmq: |
||||
|
host: 127.0.0.1 |
||||
|
password: 111111 |
||||
|
port: 5672 |
||||
|
username: admin |
||||
|
redis: |
||||
|
database: 0 |
||||
|
host: 127.0.0.1 |
||||
|
jedis: |
||||
|
pool: |
||||
|
max-active: 200 |
||||
|
max-idle: 10 |
||||
|
max-wait: -1ms |
||||
|
min-idle: 0 |
||||
|
# password: '' |
||||
|
password: 'areowqr!@43ef' |
||||
|
port: 6379 |
||||
|
timeout: 1000ms |
||||
|
swagger: |
||||
|
enable: false |
||||
|
eureka: |
||||
|
instance: |
||||
|
# www.tall.wiki |
||||
|
# ip-address: 140.143.228.3 |
||||
|
# ip-address: 81.70.54.64 |
||||
|
ip-address: 192.144.182.42 |
||||
|
|
||||
|
gatewayUrl: https://www.tall.wiki/gateway/ |
||||
|
notGatewayUrl: https://www.tall.wiki/ |
||||
|
smsCode: 1 |
||||
|
wx: |
||||
|
prefixUrl: https://www.tall.wiki/wxconfigurer-api/ |
||||
|
file: |
||||
|
path: /home/cloud/tall/uploads/ |
||||
|
domain: https://www.tall.wiki/gateway/tall/v1.0/ |
||||
|
imgDomain: https://www.tall.wiki/gateway/tall/v1.0/uploads |
@ -0,0 +1,51 @@ |
|||||
|
server: |
||||
|
port: 7130 |
||||
|
servlet: |
||||
|
context-path: /v1.0 |
||||
|
spring: |
||||
|
snowflake: |
||||
|
datacenterId: 1 |
||||
|
workerId: 1 |
||||
|
application: |
||||
|
name: signin |
||||
|
datasource: |
||||
|
type: com.alibaba.druid.pool.DruidDataSource |
||||
|
rabbitmq: |
||||
|
host: 127.0.0.1 |
||||
|
# host: api.ccsens.com |
||||
|
password: 111111 |
||||
|
port: 5672 |
||||
|
username: admin |
||||
|
redis: |
||||
|
database: 0 |
||||
|
host: 127.0.0.1 |
||||
|
jedis: |
||||
|
pool: |
||||
|
max-active: 200 |
||||
|
max-idle: 10 |
||||
|
max-wait: -1ms |
||||
|
min-idle: 0 |
||||
|
password: '' |
||||
|
port: 6379 |
||||
|
timeout: 1000ms |
||||
|
swagger: |
||||
|
enable: true |
||||
|
eureka: |
||||
|
instance: |
||||
|
ip-address: 192.168.0.99 |
||||
|
# ip-address: 49.233.89.188 |
||||
|
#gatewayUrl: http://192.168.0.99/gateway/ |
||||
|
#notGatewayUrl: http://192.168.0.99/ |
||||
|
gatewayUrl: https://test.tall.wiki/gateway/ |
||||
|
notGatewayUrl: https://test.tall.wiki/ |
||||
|
smsCode: 0 |
||||
|
wx: |
||||
|
prefixUrl: https://www.tall.wiki/wxconfigurer-api/ |
||||
|
file: |
||||
|
path: /home/cloud/tall/uploads/ |
||||
|
domain: https://test.tall.wiki/gateway/tall/v1.0/ |
||||
|
imgDomain: https://test.tall.wiki/gateway/tall/v1.0/uploads |
||||
|
|
||||
|
#file: |
||||
|
# domain: http://192.168.0.99/gateway/tall/v1.0/ |
||||
|
# imgDomain: http://192.168.0.99/gateway/tall/v1.0/uploads |
@ -0,0 +1,5 @@ |
|||||
|
spring: |
||||
|
profiles: |
||||
|
active: dev |
||||
|
include: util-dev,common |
||||
|
|
@ -0,0 +1,9 @@ |
|||||
|
business: |
||||
|
packet: |
||||
|
## 红包默认过期时间(ms) |
||||
|
expiretime: 7*24*3600*1000 |
||||
|
## 发红包手续费率 |
||||
|
rate: 0.01 |
||||
|
## 发红包手续费率 |
||||
|
toplimit: 500.0 |
||||
|
name: zs |
@ -0,0 +1,34 @@ |
|||||
|
spring: |
||||
|
datasource: |
||||
|
druid: |
||||
|
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 |
||||
|
driverClassName: com.mysql.cj.jdbc.Driver |
||||
|
dynamicUrl: jdbc:mysql://localhost:3306/${schema} |
||||
|
filterExclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' |
||||
|
filterName: druidFilter |
||||
|
filterProfileEnable: true |
||||
|
filterUrlPattern: /* |
||||
|
filters: stat,wall |
||||
|
initialSize: 5 |
||||
|
maxActive: 20 |
||||
|
maxPoolPreparedStatementPerConnectionSize: 20 |
||||
|
maxWait: 60000 |
||||
|
minEvictableIdleTimeMillis: 300000 |
||||
|
minIdle: 5 |
||||
|
password: 68073a279b399baa1fa12cf39bfbb65bfc1480ffee7b659ccc81cf19be8c4473 |
||||
|
poolPreparedStatements: true |
||||
|
servletLogSlowSql: true |
||||
|
servletLoginPassword: 111111 |
||||
|
servletLoginUsername: druid |
||||
|
servletName: druidServlet |
||||
|
servletResetEnable: true |
||||
|
servletUrlMapping: /druid/* |
||||
|
testOnBorrow: false |
||||
|
testOnReturn: false |
||||
|
testWhileIdle: true |
||||
|
timeBetweenEvictionRunsMillis: 60000 |
||||
|
url: jdbc:mysql://49.233.89.188:3306/tall?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true |
||||
|
# url: jdbc:mysql://127.0.0.1/tall?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true |
||||
|
username: root |
||||
|
validationQuery: SELECT 1 FROM DUAL |
||||
|
env: CCSENS_TALL |
@ -0,0 +1,34 @@ |
|||||
|
spring: |
||||
|
datasource: |
||||
|
druid: |
||||
|
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 |
||||
|
driverClassName: com.mysql.cj.jdbc.Driver |
||||
|
dynamicUrl: jdbc:mysql://127.0.0.1:3306/${schema} |
||||
|
filterExclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' |
||||
|
filterName: druidFilter |
||||
|
filterProfileEnable: true |
||||
|
filterUrlPattern: /* |
||||
|
filters: stat,wall |
||||
|
initialSize: 5 |
||||
|
maxActive: 20 |
||||
|
maxPoolPreparedStatementPerConnectionSize: 20 |
||||
|
maxWait: 60000 |
||||
|
minEvictableIdleTimeMillis: 300000 |
||||
|
minIdle: 5 |
||||
|
# password: 7cdefb88e0b8c8a401b66a83ee0cf80387461268074d1c3dcb146ab485318633 |
||||
|
password: |
||||
|
poolPreparedStatements: true |
||||
|
servletLogSlowSql: true |
||||
|
servletLoginPassword: 111111 |
||||
|
servletLoginUsername: druid |
||||
|
servletName: druidServlet |
||||
|
servletResetEnable: true |
||||
|
servletUrlMapping: /druid/* |
||||
|
testOnBorrow: false |
||||
|
testOnReturn: false |
||||
|
testWhileIdle: true |
||||
|
timeBetweenEvictionRunsMillis: 60000 |
||||
|
url: jdbc:mysql://127.0.0.1/tall?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true |
||||
|
username: root |
||||
|
validationQuery: SELECT 1 FROM DUAL |
||||
|
env: CCSENS_HEALTH |
@ -0,0 +1,35 @@ |
|||||
|
spring: |
||||
|
datasource: |
||||
|
druid: |
||||
|
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 |
||||
|
driverClassName: com.mysql.cj.jdbc.Driver |
||||
|
dynamicUrl: jdbc:mysql://localhost:3306/${schema} |
||||
|
filterExclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' |
||||
|
filterName: druidFilter |
||||
|
filterProfileEnable: true |
||||
|
filterUrlPattern: /* |
||||
|
filters: stat,wall |
||||
|
initialSize: 5 |
||||
|
maxActive: 20 |
||||
|
maxPoolPreparedStatementPerConnectionSize: 20 |
||||
|
maxWait: 60000 |
||||
|
minEvictableIdleTimeMillis: 300000 |
||||
|
minIdle: 5 |
||||
|
# password: |
||||
|
password: 68073a279b399baa1fa12cf39bfbb65bfc1480ffee7b659ccc81cf19be8c4473 |
||||
|
poolPreparedStatements: true |
||||
|
servletLogSlowSql: true |
||||
|
servletLoginPassword: 111111 |
||||
|
servletLoginUsername: druid |
||||
|
servletName: druidServlet |
||||
|
servletResetEnable: true |
||||
|
servletUrlMapping: /druid/* |
||||
|
testOnBorrow: false |
||||
|
testOnReturn: false |
||||
|
testWhileIdle: true |
||||
|
timeBetweenEvictionRunsMillis: 60000 |
||||
|
# url: jdbc:mysql://127.0.0.1/tall?useUnicode=true&characterEncoding=UTF-8 |
||||
|
url: jdbc:mysql://test.tall.wiki/tall?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true |
||||
|
username: root |
||||
|
validationQuery: SELECT 1 FROM DUAL |
||||
|
env: CCSENS_TALL |
@ -0,0 +1,196 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!-- 日志级别从低到高分为TRACE < DEBUG < INFO < WARN < ERROR < FATAL,如果设置为WARN,则低于WARN的信息都不会输出 --> |
||||
|
<!-- scan:当此属性设置为true时,配置文件如果发生改变,将会被重新加载,默认值为true --> |
||||
|
<!-- scanPeriod:设置监测配置文件是否有修改的时间间隔,如果没有给出时间单位,默认单位是毫秒。当scan为true时,此属性生效。默认的时间间隔为1分钟。 --> |
||||
|
<!-- debug:当此属性设置为true时,将打印出logback内部日志信息,实时查看logback运行状态。默认值为false。 --> |
||||
|
<configuration scan="true" scanPeriod="10 seconds"> |
||||
|
|
||||
|
<!--<include resource="org/springframework/boot/logging/logback/base.xml" />--> |
||||
|
|
||||
|
<contextName>logback</contextName> |
||||
|
<!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义变量后,可以使“${}”来使用变量。 --> |
||||
|
<property name="log.path" value="/home/cloud/signin/log/" /> |
||||
|
|
||||
|
<!-- 彩色日志 --> |
||||
|
<!-- 彩色日志依赖的渲染类 --> |
||||
|
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" /> |
||||
|
<conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" /> |
||||
|
<conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" /> |
||||
|
<!-- 彩色日志格式 --> |
||||
|
<property name="CONSOLE_LOG_PATTERN" value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/> |
||||
|
|
||||
|
|
||||
|
<!--输出到控制台--> |
||||
|
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> |
||||
|
<!--此日志appender是为开发使用,只配置最底级别,控制台输出的日志级别是大于或等于此级别的日志信息--> |
||||
|
<filter class="ch.qos.logback.classic.filter.ThresholdFilter"> |
||||
|
<level>info</level> |
||||
|
</filter> |
||||
|
<encoder> |
||||
|
<Pattern>${CONSOLE_LOG_PATTERN}</Pattern> |
||||
|
<!-- 设置字符集 --> |
||||
|
<charset>UTF-8</charset> |
||||
|
</encoder> |
||||
|
</appender> |
||||
|
|
||||
|
|
||||
|
<!--输出到文件--> |
||||
|
|
||||
|
<!-- 时间滚动输出 level为 DEBUG 日志 --> |
||||
|
<appender name="DEBUG_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
||||
|
<!-- 正在记录的日志文件的路径及文件名 --> |
||||
|
<file>${log.path}/log_debug.log</file> |
||||
|
<!--日志文件输出格式--> |
||||
|
<encoder> |
||||
|
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> |
||||
|
<charset>UTF-8</charset> <!-- 设置字符集 --> |
||||
|
</encoder> |
||||
|
<!-- 日志记录器的滚动策略,按日期,按大小记录 --> |
||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
||||
|
<!-- 日志归档 --> |
||||
|
<fileNamePattern>${log.path}/debug/log-debug-%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
||||
|
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
||||
|
<maxFileSize>100MB</maxFileSize> |
||||
|
</timeBasedFileNamingAndTriggeringPolicy> |
||||
|
<!--日志文件保留天数--> |
||||
|
<maxHistory>15</maxHistory> |
||||
|
</rollingPolicy> |
||||
|
<!-- 此日志文件只记录debug级别的 --> |
||||
|
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
||||
|
<level>debug</level> |
||||
|
<onMatch>ACCEPT</onMatch> |
||||
|
<onMismatch>DENY</onMismatch> |
||||
|
</filter> |
||||
|
</appender> |
||||
|
|
||||
|
<!-- 时间滚动输出 level为 INFO 日志 --> |
||||
|
<appender name="INFO_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
||||
|
<!-- 正在记录的日志文件的路径及文件名 --> |
||||
|
<file>${log.path}/log_info.log</file> |
||||
|
<!--日志文件输出格式--> |
||||
|
<encoder> |
||||
|
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> |
||||
|
<charset>UTF-8</charset> |
||||
|
</encoder> |
||||
|
<!-- 日志记录器的滚动策略,按日期,按大小记录 --> |
||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
||||
|
<!-- 每天日志归档路径以及格式 --> |
||||
|
<fileNamePattern>${log.path}/info/log-info-%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
||||
|
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
||||
|
<maxFileSize>100MB</maxFileSize> |
||||
|
</timeBasedFileNamingAndTriggeringPolicy> |
||||
|
<!--日志文件保留天数--> |
||||
|
<maxHistory>15</maxHistory> |
||||
|
</rollingPolicy> |
||||
|
<!-- 此日志文件只记录info级别的 --> |
||||
|
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
||||
|
<level>info</level> |
||||
|
<onMatch>ACCEPT</onMatch> |
||||
|
<onMismatch>DENY</onMismatch> |
||||
|
</filter> |
||||
|
</appender> |
||||
|
|
||||
|
<!-- 时间滚动输出 level为 WARN 日志 --> |
||||
|
<appender name="WARN_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
||||
|
<!-- 正在记录的日志文件的路径及文件名 --> |
||||
|
<file>${log.path}/log_warn.log</file> |
||||
|
<!--日志文件输出格式--> |
||||
|
<encoder> |
||||
|
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> |
||||
|
<charset>UTF-8</charset> <!-- 此处设置字符集 --> |
||||
|
</encoder> |
||||
|
<!-- 日志记录器的滚动策略,按日期,按大小记录 --> |
||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
||||
|
<fileNamePattern>${log.path}/warn/log-warn-%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
||||
|
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
||||
|
<maxFileSize>100MB</maxFileSize> |
||||
|
</timeBasedFileNamingAndTriggeringPolicy> |
||||
|
<!--日志文件保留天数--> |
||||
|
<maxHistory>15</maxHistory> |
||||
|
</rollingPolicy> |
||||
|
<!-- 此日志文件只记录warn级别的 --> |
||||
|
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
||||
|
<level>warn</level> |
||||
|
<onMatch>ACCEPT</onMatch> |
||||
|
<onMismatch>DENY</onMismatch> |
||||
|
</filter> |
||||
|
</appender> |
||||
|
|
||||
|
|
||||
|
<!-- 时间滚动输出 level为 ERROR 日志 --> |
||||
|
<appender name="ERROR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
||||
|
<!-- 正在记录的日志文件的路径及文件名 --> |
||||
|
<file>${log.path}/log_error.log</file> |
||||
|
<!--日志文件输出格式--> |
||||
|
<encoder> |
||||
|
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> |
||||
|
<charset>UTF-8</charset> <!-- 此处设置字符集 --> |
||||
|
</encoder> |
||||
|
<!-- 日志记录器的滚动策略,按日期,按大小记录 --> |
||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
||||
|
<fileNamePattern>${log.path}/error/log-error-%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
||||
|
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
||||
|
<maxFileSize>100MB</maxFileSize> |
||||
|
</timeBasedFileNamingAndTriggeringPolicy> |
||||
|
<!--日志文件保留天数--> |
||||
|
<maxHistory>15</maxHistory> |
||||
|
</rollingPolicy> |
||||
|
<!-- 此日志文件只记录ERROR级别的 --> |
||||
|
<filter class="ch.qos.logback.classic.filter.LevelFilter"> |
||||
|
<level>ERROR</level> |
||||
|
<onMatch>ACCEPT</onMatch> |
||||
|
<onMismatch>DENY</onMismatch> |
||||
|
</filter> |
||||
|
</appender> |
||||
|
|
||||
|
<!-- |
||||
|
<logger>用来设置某一个包或者具体的某一个类的日志打印级别、 |
||||
|
以及指定<appender>。<logger>仅有一个name属性, |
||||
|
一个可选的level和一个可选的addtivity属性。 |
||||
|
name:用来指定受此logger约束的某一个包或者具体的某一个类。 |
||||
|
level:用来设置打印级别,大小写无关:TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF, |
||||
|
还有一个特俗值INHERITED或者同义词NULL,代表强制执行上级的级别。 |
||||
|
如果未设置此属性,那么当前logger将会继承上级的级别。 |
||||
|
addtivity:是否向上级logger传递打印信息。默认是true。 |
||||
|
--> |
||||
|
<!--<logger name="org.springframework.web" level="info"/>--> |
||||
|
<!--<logger name="org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor" level="INFO"/>--> |
||||
|
<!-- |
||||
|
使用mybatis的时候,sql语句是debug下才会打印,而这里我们只配置了info,所以想要查看sql语句的话,有以下两种操作: |
||||
|
第一种把<root level="info">改成<root level="DEBUG">这样就会打印sql,不过这样日志那边会出现很多其他消息 |
||||
|
第二种就是单独给dao下目录配置debug模式,代码如下,这样配置sql语句会打印,其他还是正常info级别: |
||||
|
--> |
||||
|
|
||||
|
|
||||
|
<!-- |
||||
|
root节点是必选节点,用来指定最基础的日志输出级别,只有一个level属性 |
||||
|
level:用来设置打印级别,大小写无关:TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF, |
||||
|
不能设置为INHERITED或者同义词NULL。默认是DEBUG |
||||
|
可以包含零个或多个元素,标识这个appender将会添加到这个logger。 |
||||
|
--> |
||||
|
|
||||
|
<!--开发环境:打印控制台--> |
||||
|
<springProfile name="dev"> |
||||
|
<logger name="com.ccsens.ptpro.persist.*" level="debug"/> |
||||
|
</springProfile> |
||||
|
|
||||
|
<root level="info"> |
||||
|
<appender-ref ref="CONSOLE" /> |
||||
|
<appender-ref ref="DEBUG_FILE" /> |
||||
|
<appender-ref ref="INFO_FILE" /> |
||||
|
<appender-ref ref="WARN_FILE" /> |
||||
|
<appender-ref ref="ERROR_FILE" /> |
||||
|
</root> |
||||
|
|
||||
|
<!--生产环境:输出到文件--> |
||||
|
<!--<springProfile name="pro">--> |
||||
|
<!--<root level="info">--> |
||||
|
<!--<appender-ref ref="CONSOLE" />--> |
||||
|
<!--<appender-ref ref="DEBUG_FILE" />--> |
||||
|
<!--<appender-ref ref="INFO_FILE" />--> |
||||
|
<!--<appender-ref ref="ERROR_FILE" />--> |
||||
|
<!--<appender-ref ref="WARN_FILE" />--> |
||||
|
<!--</root>--> |
||||
|
<!--</springProfile>--> |
||||
|
|
||||
|
</configuration> |
@ -0,0 +1,15 @@ |
|||||
|
<?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.ccsens.tall.persist.dao.SysAuthDao"> |
||||
|
|
||||
|
<select id="queryOauth2WX" resultType="com.ccsens.signin.bean.vo.UserVo$Oauth2WX"> |
||||
|
select identifier as openid, user_id as userId |
||||
|
from t_sys_auth |
||||
|
where identify_type = 9 |
||||
|
and user_id in |
||||
|
<foreach collection="list" open="(" close=")" separator="," item="item"> |
||||
|
#{item} |
||||
|
</foreach> |
||||
|
and rec_status = 0 |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,201 @@ |
|||||
|
<?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.ccsens.tall.persist.dao.SysUserDao"> |
||||
|
<resultMap id="getTokenBeanByUserId" type="com.ccsens.signin.bean.vo.UserVo$TokenBean"> |
||||
|
<id column="id" property="id"/> |
||||
|
<result column="account" property="account"/> |
||||
|
<result column="phone" property="phone"/> |
||||
|
<collection property="wxInfo" ofType="com.ccsens.signin.bean.vo.UserVo$WxInfo"> |
||||
|
<result column="nickname" property="nickname"/> |
||||
|
<result column="headImgUrl" property="headImgUrl"/> |
||||
|
<result column="sex" property="sex"/> |
||||
|
<result column="province" property="province"/> |
||||
|
<result column="city" property="city"/> |
||||
|
<result column="country" property="country"/> |
||||
|
<result column="language" property="language"/> |
||||
|
</collection> |
||||
|
</resultMap> |
||||
|
|
||||
|
|
||||
|
<update id="replaceAuth" parameterType="java.util.Map"> |
||||
|
update |
||||
|
t_sys_auth |
||||
|
set |
||||
|
user_id = #{newUserId} |
||||
|
where |
||||
|
user_id = #{oldUserId} |
||||
|
</update> |
||||
|
|
||||
|
<update id="replaceAttention" parameterType="java.util.Map"> |
||||
|
update |
||||
|
t_sys_user_attention |
||||
|
set |
||||
|
user_id = #{newUserId} |
||||
|
where |
||||
|
user_id = #{oldUserId} |
||||
|
</update> |
||||
|
|
||||
|
<update id="replaceBalance" parameterType="java.util.Map"> |
||||
|
update |
||||
|
t_sys_balance_log |
||||
|
set |
||||
|
user_id = #{newUserId} |
||||
|
where |
||||
|
user_id = #{oldUserId} |
||||
|
</update> |
||||
|
|
||||
|
<update id="replaceProject" parameterType="java.util.Map"> |
||||
|
update |
||||
|
t_sys_project |
||||
|
set |
||||
|
creator_id = #{newUserId} |
||||
|
where |
||||
|
creator_id = #{oldUserId} |
||||
|
</update> |
||||
|
|
||||
|
<update id="replaceMember" parameterType="java.util.Map"> |
||||
|
update |
||||
|
t_pro_member |
||||
|
set |
||||
|
user_id = #{newUserId} |
||||
|
where |
||||
|
user_id = #{oldUserId} |
||||
|
</update> |
||||
|
|
||||
|
<update id="replaceDeliverPostLog" parameterType="java.util.Map"> |
||||
|
update |
||||
|
t_pro_task_deliver_post_log |
||||
|
set |
||||
|
user_id = #{newUserId} |
||||
|
where |
||||
|
user_id = #{oldUserId} |
||||
|
</update> |
||||
|
|
||||
|
<update id="replaceProLog" parameterType="java.util.Map"> |
||||
|
update |
||||
|
t_pro_log |
||||
|
set |
||||
|
user_id = #{newUserId} |
||||
|
where |
||||
|
user_id = #{oldUserId} |
||||
|
</update> |
||||
|
|
||||
|
<update id="replaceComment" parameterType="java.util.Map"> |
||||
|
update |
||||
|
t_pro_task_comment |
||||
|
set |
||||
|
user_id = #{newUserId} |
||||
|
where |
||||
|
user_id = #{oldUserId} |
||||
|
</update> |
||||
|
|
||||
|
<select id="getUserNameByUserId" parameterType="java.util.Map" resultType="java.lang.String"> |
||||
|
SELECT |
||||
|
IF( u.nickname = '', a.identifier, u.nickname ) AS userName |
||||
|
FROM |
||||
|
t_sys_user u |
||||
|
LEFT JOIN t_sys_auth a ON u.id = a.user_id |
||||
|
AND a.identify_type = 3 |
||||
|
WHERE |
||||
|
u.rec_status = 0 |
||||
|
and |
||||
|
a.rec_status = 0 |
||||
|
and |
||||
|
u.id = #{userId} |
||||
|
limit 1 |
||||
|
</select> |
||||
|
|
||||
|
<select id="getUserInfoByUserId" resultType="com.ccsens.signin.bean.vo.UserVo$UserInfo"> |
||||
|
SELECT |
||||
|
u.id, |
||||
|
IF( u.nickname = '', a.identifier, u.nickname ) AS nickname, |
||||
|
u.avatar_url as avatarUrl |
||||
|
FROM |
||||
|
t_sys_user u |
||||
|
LEFT JOIN t_sys_auth a ON u.id = a.user_id |
||||
|
AND a.identify_type = 3 |
||||
|
WHERE |
||||
|
u.rec_status = 0 |
||||
|
and |
||||
|
a.rec_status = 0 |
||||
|
and |
||||
|
u.id = #{userId} |
||||
|
limit 1 |
||||
|
</select> |
||||
|
<select id="queryUserInfos" resultType="com.ccsens.signin.bean.vo.UserVo$UserInfo"> |
||||
|
SELECT |
||||
|
u.id, |
||||
|
IF( u.nickname = '', a.identifier, u.nickname ) AS nickname, |
||||
|
u.avatar_url as avatarUrl |
||||
|
FROM |
||||
|
t_sys_user u |
||||
|
LEFT JOIN t_sys_auth a ON u.id = a.user_id |
||||
|
AND a.identify_type = 3 |
||||
|
WHERE |
||||
|
u.rec_status = 0 |
||||
|
and |
||||
|
a.rec_status = 0 |
||||
|
and |
||||
|
u.id in |
||||
|
<foreach collection="array" item="item" separator="," open="(" close=")"> |
||||
|
#{item} |
||||
|
</foreach> |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectUserInfo" parameterType="java.util.Map" resultType="com.ccsens.signin.bean.vo.UserVo$SelectUserInfo"> |
||||
|
SELECT |
||||
|
u.id as id, |
||||
|
(SELECT identifier FROM t_sys_auth WHERE rec_status = 0 AND user_id = #{userId} and identify_type = 3 order by updated_at limit 1) as account, |
||||
|
(SELECT identifier FROM t_sys_auth WHERE rec_status = 0 AND user_id = #{userId} and identify_type = 1 order by updated_at limit 1) as phone, |
||||
|
u.nickname as nickname, |
||||
|
u.avatar_url as avatarUrl, |
||||
|
i.signature as signature, |
||||
|
i.introduction as introduction, |
||||
|
i.birthday as birthday, |
||||
|
i.address as address, |
||||
|
i.web_path as webPath, |
||||
|
i.company as company, |
||||
|
i.position as `position`, |
||||
|
u.created_at as createdAt |
||||
|
FROM |
||||
|
t_sys_user u LEFT JOIN t_sys_user_info i on u.id = i.user_id |
||||
|
WHERE |
||||
|
u.rec_status = 0 |
||||
|
and |
||||
|
u.id = #{userId} |
||||
|
GROUP BY u.id |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectInterspace" parameterType="java.util.Map" resultType="com.ccsens.signin.bean.vo.UserVo$Interspace"> |
||||
|
SELECT |
||||
|
count(id) as projectNum |
||||
|
FROM |
||||
|
t_sys_project |
||||
|
WHERE |
||||
|
rec_status = 0 |
||||
|
and |
||||
|
creator_id = #{userId} |
||||
|
</select> |
||||
|
|
||||
|
<select id="getTokenBeanByUserId" parameterType="java.util.Map" resultMap="getTokenBeanByUserId"> |
||||
|
SELECT |
||||
|
u.id as id , |
||||
|
t.account as account, |
||||
|
x.phone as phone, |
||||
|
u.nickname as nickname, |
||||
|
u.avatar_url as headImgUrl, |
||||
|
u.gender as sex, |
||||
|
u.province, |
||||
|
u.city, |
||||
|
u.country, |
||||
|
u.`language` |
||||
|
FROM |
||||
|
t_sys_user u |
||||
|
LEFT JOIN ( SELECT user_id, identifier AS account FROM t_sys_auth WHERE identify_type = 3 AND rec_status = 0) t ON u.id = t.user_id |
||||
|
LEFT JOIN ( SELECT user_id, identifier AS phone FROM t_sys_auth WHERE identify_type = 1 AND rec_status = 0) x ON u.id = x.user_id |
||||
|
WHERE |
||||
|
u.id = #{userId} |
||||
|
AND |
||||
|
rec_status = 0 |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,291 @@ |
|||||
|
<?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.ccsens.signin.persist.mapper.SysAuthMapper"> |
||||
|
<resultMap id="BaseResultMap" type="com.ccsens.signin.bean.po.SysAuth"> |
||||
|
<id column="id" jdbcType="BIGINT" property="id" /> |
||||
|
<result column="user_id" jdbcType="BIGINT" property="userId" /> |
||||
|
<result column="identify_type" jdbcType="TINYINT" property="identifyType" /> |
||||
|
<result column="identifier" jdbcType="VARCHAR" property="identifier" /> |
||||
|
<result column="credential" jdbcType="VARCHAR" property="credential" /> |
||||
|
<result column="salt" jdbcType="VARCHAR" property="salt" /> |
||||
|
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
||||
|
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
||||
|
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
||||
|
<result column="register_type" jdbcType="TINYINT" property="registerType" /> |
||||
|
</resultMap> |
||||
|
<sql id="Example_Where_Clause"> |
||||
|
<where> |
||||
|
<foreach collection="oredCriteria" item="criteria" separator="or"> |
||||
|
<if test="criteria.valid"> |
||||
|
<trim prefix="(" prefixOverrides="and" suffix=")"> |
||||
|
<foreach collection="criteria.criteria" item="criterion"> |
||||
|
<choose> |
||||
|
<when test="criterion.noValue"> |
||||
|
and ${criterion.condition} |
||||
|
</when> |
||||
|
<when test="criterion.singleValue"> |
||||
|
and ${criterion.condition} #{criterion.value} |
||||
|
</when> |
||||
|
<when test="criterion.betweenValue"> |
||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
||||
|
</when> |
||||
|
<when test="criterion.listValue"> |
||||
|
and ${criterion.condition} |
||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
||||
|
#{listItem} |
||||
|
</foreach> |
||||
|
</when> |
||||
|
</choose> |
||||
|
</foreach> |
||||
|
</trim> |
||||
|
</if> |
||||
|
</foreach> |
||||
|
</where> |
||||
|
</sql> |
||||
|
<sql id="Update_By_Example_Where_Clause"> |
||||
|
<where> |
||||
|
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
||||
|
<if test="criteria.valid"> |
||||
|
<trim prefix="(" prefixOverrides="and" suffix=")"> |
||||
|
<foreach collection="criteria.criteria" item="criterion"> |
||||
|
<choose> |
||||
|
<when test="criterion.noValue"> |
||||
|
and ${criterion.condition} |
||||
|
</when> |
||||
|
<when test="criterion.singleValue"> |
||||
|
and ${criterion.condition} #{criterion.value} |
||||
|
</when> |
||||
|
<when test="criterion.betweenValue"> |
||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
||||
|
</when> |
||||
|
<when test="criterion.listValue"> |
||||
|
and ${criterion.condition} |
||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
||||
|
#{listItem} |
||||
|
</foreach> |
||||
|
</when> |
||||
|
</choose> |
||||
|
</foreach> |
||||
|
</trim> |
||||
|
</if> |
||||
|
</foreach> |
||||
|
</where> |
||||
|
</sql> |
||||
|
<sql id="Base_Column_List"> |
||||
|
id, user_id, identify_type, identifier, credential, salt, created_at, updated_at, |
||||
|
rec_status, register_type |
||||
|
</sql> |
||||
|
<select id="selectByExample" parameterType="com.ccsens.signin.bean.po.SysAuthExample" resultMap="BaseResultMap"> |
||||
|
select |
||||
|
<if test="distinct"> |
||||
|
distinct |
||||
|
</if> |
||||
|
<include refid="Base_Column_List" /> |
||||
|
from t_sys_auth |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
<if test="orderByClause != null"> |
||||
|
order by ${orderByClause} |
||||
|
</if> |
||||
|
</select> |
||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
||||
|
select |
||||
|
<include refid="Base_Column_List" /> |
||||
|
from t_sys_auth |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</select> |
||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
||||
|
delete from t_sys_auth |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</delete> |
||||
|
<delete id="deleteByExample" parameterType="com.ccsens.signin.bean.po.SysAuthExample"> |
||||
|
delete from t_sys_auth |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</delete> |
||||
|
<insert id="insert" parameterType="com.ccsens.signin.bean.po.SysAuth"> |
||||
|
insert into t_sys_auth (id, user_id, identify_type, |
||||
|
identifier, credential, salt, |
||||
|
created_at, updated_at, rec_status, |
||||
|
register_type) |
||||
|
values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{identifyType,jdbcType=TINYINT}, |
||||
|
#{identifier,jdbcType=VARCHAR}, #{credential,jdbcType=VARCHAR}, #{salt,jdbcType=VARCHAR}, |
||||
|
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}, |
||||
|
#{registerType,jdbcType=TINYINT}) |
||||
|
</insert> |
||||
|
<insert id="insertSelective" parameterType="com.ccsens.signin.bean.po.SysAuth"> |
||||
|
insert into t_sys_auth |
||||
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
|
<if test="id != null"> |
||||
|
id, |
||||
|
</if> |
||||
|
<if test="userId != null"> |
||||
|
user_id, |
||||
|
</if> |
||||
|
<if test="identifyType != null"> |
||||
|
identify_type, |
||||
|
</if> |
||||
|
<if test="identifier != null"> |
||||
|
identifier, |
||||
|
</if> |
||||
|
<if test="credential != null"> |
||||
|
credential, |
||||
|
</if> |
||||
|
<if test="salt != null"> |
||||
|
salt, |
||||
|
</if> |
||||
|
<if test="createdAt != null"> |
||||
|
created_at, |
||||
|
</if> |
||||
|
<if test="updatedAt != null"> |
||||
|
updated_at, |
||||
|
</if> |
||||
|
<if test="recStatus != null"> |
||||
|
rec_status, |
||||
|
</if> |
||||
|
<if test="registerType != null"> |
||||
|
register_type, |
||||
|
</if> |
||||
|
</trim> |
||||
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||
|
<if test="id != null"> |
||||
|
#{id,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="userId != null"> |
||||
|
#{userId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="identifyType != null"> |
||||
|
#{identifyType,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
<if test="identifier != null"> |
||||
|
#{identifier,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="credential != null"> |
||||
|
#{credential,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="salt != null"> |
||||
|
#{salt,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="createdAt != null"> |
||||
|
#{createdAt,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="updatedAt != null"> |
||||
|
#{updatedAt,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="recStatus != null"> |
||||
|
#{recStatus,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
<if test="registerType != null"> |
||||
|
#{registerType,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
</trim> |
||||
|
</insert> |
||||
|
<select id="countByExample" parameterType="com.ccsens.signin.bean.po.SysAuthExample" resultType="java.lang.Long"> |
||||
|
select count(*) from t_sys_auth |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</select> |
||||
|
<update id="updateByExampleSelective" parameterType="map"> |
||||
|
update t_sys_auth |
||||
|
<set> |
||||
|
<if test="record.id != null"> |
||||
|
id = #{record.id,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.userId != null"> |
||||
|
user_id = #{record.userId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.identifyType != null"> |
||||
|
identify_type = #{record.identifyType,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
<if test="record.identifier != null"> |
||||
|
identifier = #{record.identifier,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.credential != null"> |
||||
|
credential = #{record.credential,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.salt != null"> |
||||
|
salt = #{record.salt,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.createdAt != null"> |
||||
|
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="record.updatedAt != null"> |
||||
|
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="record.recStatus != null"> |
||||
|
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
<if test="record.registerType != null"> |
||||
|
register_type = #{record.registerType,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
</set> |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Update_By_Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</update> |
||||
|
<update id="updateByExample" parameterType="map"> |
||||
|
update t_sys_auth |
||||
|
set id = #{record.id,jdbcType=BIGINT}, |
||||
|
user_id = #{record.userId,jdbcType=BIGINT}, |
||||
|
identify_type = #{record.identifyType,jdbcType=TINYINT}, |
||||
|
identifier = #{record.identifier,jdbcType=VARCHAR}, |
||||
|
credential = #{record.credential,jdbcType=VARCHAR}, |
||||
|
salt = #{record.salt,jdbcType=VARCHAR}, |
||||
|
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
||||
|
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
||||
|
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
||||
|
register_type = #{record.registerType,jdbcType=TINYINT} |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Update_By_Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</update> |
||||
|
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.signin.bean.po.SysAuth"> |
||||
|
update t_sys_auth |
||||
|
<set> |
||||
|
<if test="userId != null"> |
||||
|
user_id = #{userId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="identifyType != null"> |
||||
|
identify_type = #{identifyType,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
<if test="identifier != null"> |
||||
|
identifier = #{identifier,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="credential != null"> |
||||
|
credential = #{credential,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="salt != null"> |
||||
|
salt = #{salt,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="createdAt != null"> |
||||
|
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="updatedAt != null"> |
||||
|
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="recStatus != null"> |
||||
|
rec_status = #{recStatus,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
<if test="registerType != null"> |
||||
|
register_type = #{registerType,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
</set> |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</update> |
||||
|
<update id="updateByPrimaryKey" parameterType="com.ccsens.signin.bean.po.SysAuth"> |
||||
|
update t_sys_auth |
||||
|
set user_id = #{userId,jdbcType=BIGINT}, |
||||
|
identify_type = #{identifyType,jdbcType=TINYINT}, |
||||
|
identifier = #{identifier,jdbcType=VARCHAR}, |
||||
|
credential = #{credential,jdbcType=VARCHAR}, |
||||
|
salt = #{salt,jdbcType=VARCHAR}, |
||||
|
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
||||
|
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
||||
|
rec_status = #{recStatus,jdbcType=TINYINT}, |
||||
|
register_type = #{registerType,jdbcType=TINYINT} |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</update> |
||||
|
</mapper> |
@ -0,0 +1,323 @@ |
|||||
|
<?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.ccsens.signin.persist.mapper.SysUserInfoMapper"> |
||||
|
<resultMap id="BaseResultMap" type="com.ccsens.signin.bean.po.SysUserInfo"> |
||||
|
<id column="id" jdbcType="BIGINT" property="id" /> |
||||
|
<result column="user_id" jdbcType="BIGINT" property="userId" /> |
||||
|
<result column="signature" jdbcType="VARCHAR" property="signature" /> |
||||
|
<result column="introduction" jdbcType="VARCHAR" property="introduction" /> |
||||
|
<result column="birthday" jdbcType="VARCHAR" property="birthday" /> |
||||
|
<result column="address" jdbcType="VARCHAR" property="address" /> |
||||
|
<result column="web_path" jdbcType="VARCHAR" property="webPath" /> |
||||
|
<result column="company" jdbcType="VARCHAR" property="company" /> |
||||
|
<result column="position" jdbcType="VARCHAR" property="position" /> |
||||
|
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
||||
|
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
||||
|
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
||||
|
</resultMap> |
||||
|
<sql id="Example_Where_Clause"> |
||||
|
<where> |
||||
|
<foreach collection="oredCriteria" item="criteria" separator="or"> |
||||
|
<if test="criteria.valid"> |
||||
|
<trim prefix="(" prefixOverrides="and" suffix=")"> |
||||
|
<foreach collection="criteria.criteria" item="criterion"> |
||||
|
<choose> |
||||
|
<when test="criterion.noValue"> |
||||
|
and ${criterion.condition} |
||||
|
</when> |
||||
|
<when test="criterion.singleValue"> |
||||
|
and ${criterion.condition} #{criterion.value} |
||||
|
</when> |
||||
|
<when test="criterion.betweenValue"> |
||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
||||
|
</when> |
||||
|
<when test="criterion.listValue"> |
||||
|
and ${criterion.condition} |
||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
||||
|
#{listItem} |
||||
|
</foreach> |
||||
|
</when> |
||||
|
</choose> |
||||
|
</foreach> |
||||
|
</trim> |
||||
|
</if> |
||||
|
</foreach> |
||||
|
</where> |
||||
|
</sql> |
||||
|
<sql id="Update_By_Example_Where_Clause"> |
||||
|
<where> |
||||
|
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
||||
|
<if test="criteria.valid"> |
||||
|
<trim prefix="(" prefixOverrides="and" suffix=")"> |
||||
|
<foreach collection="criteria.criteria" item="criterion"> |
||||
|
<choose> |
||||
|
<when test="criterion.noValue"> |
||||
|
and ${criterion.condition} |
||||
|
</when> |
||||
|
<when test="criterion.singleValue"> |
||||
|
and ${criterion.condition} #{criterion.value} |
||||
|
</when> |
||||
|
<when test="criterion.betweenValue"> |
||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
||||
|
</when> |
||||
|
<when test="criterion.listValue"> |
||||
|
and ${criterion.condition} |
||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
||||
|
#{listItem} |
||||
|
</foreach> |
||||
|
</when> |
||||
|
</choose> |
||||
|
</foreach> |
||||
|
</trim> |
||||
|
</if> |
||||
|
</foreach> |
||||
|
</where> |
||||
|
</sql> |
||||
|
<sql id="Base_Column_List"> |
||||
|
id, user_id, signature, introduction, birthday, address, web_path, company, position, |
||||
|
created_at, updated_at, rec_status |
||||
|
</sql> |
||||
|
<select id="selectByExample" parameterType="com.ccsens.signin.bean.po.SysUserInfoExample" resultMap="BaseResultMap"> |
||||
|
select |
||||
|
<if test="distinct"> |
||||
|
distinct |
||||
|
</if> |
||||
|
<include refid="Base_Column_List" /> |
||||
|
from t_sys_user_info |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
<if test="orderByClause != null"> |
||||
|
order by ${orderByClause} |
||||
|
</if> |
||||
|
</select> |
||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
||||
|
select |
||||
|
<include refid="Base_Column_List" /> |
||||
|
from t_sys_user_info |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</select> |
||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
||||
|
delete from t_sys_user_info |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</delete> |
||||
|
<delete id="deleteByExample" parameterType="com.ccsens.signin.bean.po.SysUserInfoExample"> |
||||
|
delete from t_sys_user_info |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</delete> |
||||
|
<insert id="insert" parameterType="com.ccsens.signin.bean.po.SysUserInfo"> |
||||
|
insert into t_sys_user_info (id, user_id, signature, |
||||
|
introduction, birthday, address, |
||||
|
web_path, company, position, |
||||
|
created_at, updated_at, rec_status |
||||
|
) |
||||
|
values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{signature,jdbcType=VARCHAR}, |
||||
|
#{introduction,jdbcType=VARCHAR}, #{birthday,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, |
||||
|
#{webPath,jdbcType=VARCHAR}, #{company,jdbcType=VARCHAR}, #{position,jdbcType=VARCHAR}, |
||||
|
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} |
||||
|
) |
||||
|
</insert> |
||||
|
<insert id="insertSelective" parameterType="com.ccsens.signin.bean.po.SysUserInfo"> |
||||
|
insert into t_sys_user_info |
||||
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
|
<if test="id != null"> |
||||
|
id, |
||||
|
</if> |
||||
|
<if test="userId != null"> |
||||
|
user_id, |
||||
|
</if> |
||||
|
<if test="signature != null"> |
||||
|
signature, |
||||
|
</if> |
||||
|
<if test="introduction != null"> |
||||
|
introduction, |
||||
|
</if> |
||||
|
<if test="birthday != null"> |
||||
|
birthday, |
||||
|
</if> |
||||
|
<if test="address != null"> |
||||
|
address, |
||||
|
</if> |
||||
|
<if test="webPath != null"> |
||||
|
web_path, |
||||
|
</if> |
||||
|
<if test="company != null"> |
||||
|
company, |
||||
|
</if> |
||||
|
<if test="position != null"> |
||||
|
position, |
||||
|
</if> |
||||
|
<if test="createdAt != null"> |
||||
|
created_at, |
||||
|
</if> |
||||
|
<if test="updatedAt != null"> |
||||
|
updated_at, |
||||
|
</if> |
||||
|
<if test="recStatus != null"> |
||||
|
rec_status, |
||||
|
</if> |
||||
|
</trim> |
||||
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||
|
<if test="id != null"> |
||||
|
#{id,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="userId != null"> |
||||
|
#{userId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="signature != null"> |
||||
|
#{signature,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="introduction != null"> |
||||
|
#{introduction,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="birthday != null"> |
||||
|
#{birthday,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="address != null"> |
||||
|
#{address,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="webPath != null"> |
||||
|
#{webPath,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="company != null"> |
||||
|
#{company,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="position != null"> |
||||
|
#{position,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="createdAt != null"> |
||||
|
#{createdAt,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="updatedAt != null"> |
||||
|
#{updatedAt,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="recStatus != null"> |
||||
|
#{recStatus,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
</trim> |
||||
|
</insert> |
||||
|
<select id="countByExample" parameterType="com.ccsens.signin.bean.po.SysUserInfoExample" resultType="java.lang.Long"> |
||||
|
select count(*) from t_sys_user_info |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</select> |
||||
|
<update id="updateByExampleSelective" parameterType="map"> |
||||
|
update t_sys_user_info |
||||
|
<set> |
||||
|
<if test="record.id != null"> |
||||
|
id = #{record.id,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.userId != null"> |
||||
|
user_id = #{record.userId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.signature != null"> |
||||
|
signature = #{record.signature,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.introduction != null"> |
||||
|
introduction = #{record.introduction,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.birthday != null"> |
||||
|
birthday = #{record.birthday,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.address != null"> |
||||
|
address = #{record.address,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.webPath != null"> |
||||
|
web_path = #{record.webPath,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.company != null"> |
||||
|
company = #{record.company,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.position != null"> |
||||
|
position = #{record.position,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.createdAt != null"> |
||||
|
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="record.updatedAt != null"> |
||||
|
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="record.recStatus != null"> |
||||
|
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
</set> |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Update_By_Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</update> |
||||
|
<update id="updateByExample" parameterType="map"> |
||||
|
update t_sys_user_info |
||||
|
set id = #{record.id,jdbcType=BIGINT}, |
||||
|
user_id = #{record.userId,jdbcType=BIGINT}, |
||||
|
signature = #{record.signature,jdbcType=VARCHAR}, |
||||
|
introduction = #{record.introduction,jdbcType=VARCHAR}, |
||||
|
birthday = #{record.birthday,jdbcType=VARCHAR}, |
||||
|
address = #{record.address,jdbcType=VARCHAR}, |
||||
|
web_path = #{record.webPath,jdbcType=VARCHAR}, |
||||
|
company = #{record.company,jdbcType=VARCHAR}, |
||||
|
position = #{record.position,jdbcType=VARCHAR}, |
||||
|
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
||||
|
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
||||
|
rec_status = #{record.recStatus,jdbcType=TINYINT} |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Update_By_Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</update> |
||||
|
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.signin.bean.po.SysUserInfo"> |
||||
|
update t_sys_user_info |
||||
|
<set> |
||||
|
<if test="userId != null"> |
||||
|
user_id = #{userId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="signature != null"> |
||||
|
signature = #{signature,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="introduction != null"> |
||||
|
introduction = #{introduction,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="birthday != null"> |
||||
|
birthday = #{birthday,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="address != null"> |
||||
|
address = #{address,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="webPath != null"> |
||||
|
web_path = #{webPath,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="company != null"> |
||||
|
company = #{company,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="position != null"> |
||||
|
position = #{position,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="createdAt != null"> |
||||
|
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="updatedAt != null"> |
||||
|
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="recStatus != null"> |
||||
|
rec_status = #{recStatus,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
</set> |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</update> |
||||
|
<update id="updateByPrimaryKey" parameterType="com.ccsens.signin.bean.po.SysUserInfo"> |
||||
|
update t_sys_user_info |
||||
|
set user_id = #{userId,jdbcType=BIGINT}, |
||||
|
signature = #{signature,jdbcType=VARCHAR}, |
||||
|
introduction = #{introduction,jdbcType=VARCHAR}, |
||||
|
birthday = #{birthday,jdbcType=VARCHAR}, |
||||
|
address = #{address,jdbcType=VARCHAR}, |
||||
|
web_path = #{webPath,jdbcType=VARCHAR}, |
||||
|
company = #{company,jdbcType=VARCHAR}, |
||||
|
position = #{position,jdbcType=VARCHAR}, |
||||
|
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
||||
|
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
||||
|
rec_status = #{recStatus,jdbcType=TINYINT} |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</update> |
||||
|
</mapper> |
@ -0,0 +1,400 @@ |
|||||
|
<?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.ccsens.signin.persist.mapper.SysUserMapper"> |
||||
|
<resultMap id="BaseResultMap" type="com.ccsens.signin.bean.po.SysUser"> |
||||
|
<id column="id" jdbcType="BIGINT" property="id" /> |
||||
|
<result column="grade_id" jdbcType="BIGINT" property="gradeId" /> |
||||
|
<result column="avatar_url" jdbcType="VARCHAR" property="avatarUrl" /> |
||||
|
<result column="nickname" jdbcType="VARCHAR" property="nickname" /> |
||||
|
<result column="gender" jdbcType="TINYINT" property="gender" /> |
||||
|
<result column="country" jdbcType="VARCHAR" property="country" /> |
||||
|
<result column="province" jdbcType="VARCHAR" property="province" /> |
||||
|
<result column="city" jdbcType="VARCHAR" property="city" /> |
||||
|
<result column="language" jdbcType="VARCHAR" property="language" /> |
||||
|
<result column="phone" jdbcType="VARCHAR" property="phone" /> |
||||
|
<result column="wechat" jdbcType="VARCHAR" property="wechat" /> |
||||
|
<result column="email" jdbcType="VARCHAR" property="email" /> |
||||
|
<result column="balance" jdbcType="BIGINT" property="balance" /> |
||||
|
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
||||
|
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
||||
|
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
||||
|
<result column="source" jdbcType="TINYINT" property="source" /> |
||||
|
</resultMap> |
||||
|
<sql id="Example_Where_Clause"> |
||||
|
<where> |
||||
|
<foreach collection="oredCriteria" item="criteria" separator="or"> |
||||
|
<if test="criteria.valid"> |
||||
|
<trim prefix="(" prefixOverrides="and" suffix=")"> |
||||
|
<foreach collection="criteria.criteria" item="criterion"> |
||||
|
<choose> |
||||
|
<when test="criterion.noValue"> |
||||
|
and ${criterion.condition} |
||||
|
</when> |
||||
|
<when test="criterion.singleValue"> |
||||
|
and ${criterion.condition} #{criterion.value} |
||||
|
</when> |
||||
|
<when test="criterion.betweenValue"> |
||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
||||
|
</when> |
||||
|
<when test="criterion.listValue"> |
||||
|
and ${criterion.condition} |
||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
||||
|
#{listItem} |
||||
|
</foreach> |
||||
|
</when> |
||||
|
</choose> |
||||
|
</foreach> |
||||
|
</trim> |
||||
|
</if> |
||||
|
</foreach> |
||||
|
</where> |
||||
|
</sql> |
||||
|
<sql id="Update_By_Example_Where_Clause"> |
||||
|
<where> |
||||
|
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
||||
|
<if test="criteria.valid"> |
||||
|
<trim prefix="(" prefixOverrides="and" suffix=")"> |
||||
|
<foreach collection="criteria.criteria" item="criterion"> |
||||
|
<choose> |
||||
|
<when test="criterion.noValue"> |
||||
|
and ${criterion.condition} |
||||
|
</when> |
||||
|
<when test="criterion.singleValue"> |
||||
|
and ${criterion.condition} #{criterion.value} |
||||
|
</when> |
||||
|
<when test="criterion.betweenValue"> |
||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
||||
|
</when> |
||||
|
<when test="criterion.listValue"> |
||||
|
and ${criterion.condition} |
||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
||||
|
#{listItem} |
||||
|
</foreach> |
||||
|
</when> |
||||
|
</choose> |
||||
|
</foreach> |
||||
|
</trim> |
||||
|
</if> |
||||
|
</foreach> |
||||
|
</where> |
||||
|
</sql> |
||||
|
<sql id="Base_Column_List"> |
||||
|
id, grade_id, avatar_url, nickname, gender, country, province, city, language, phone, |
||||
|
wechat, email, balance, created_at, updated_at, rec_status, source |
||||
|
</sql> |
||||
|
<select id="selectByExample" parameterType="com.ccsens.signin.bean.po.SysUserExample" resultMap="BaseResultMap"> |
||||
|
select |
||||
|
<if test="distinct"> |
||||
|
distinct |
||||
|
</if> |
||||
|
<include refid="Base_Column_List" /> |
||||
|
from t_sys_user |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
<if test="orderByClause != null"> |
||||
|
order by ${orderByClause} |
||||
|
</if> |
||||
|
</select> |
||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
||||
|
select |
||||
|
<include refid="Base_Column_List" /> |
||||
|
from t_sys_user |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</select> |
||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
||||
|
delete from t_sys_user |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</delete> |
||||
|
<delete id="deleteByExample" parameterType="com.ccsens.signin.bean.po.SysUserExample"> |
||||
|
delete from t_sys_user |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</delete> |
||||
|
<insert id="insert" parameterType="com.ccsens.signin.bean.po.SysUser"> |
||||
|
insert into t_sys_user (id, grade_id, avatar_url, |
||||
|
nickname, gender, country, |
||||
|
province, city, language, |
||||
|
phone, wechat, email, |
||||
|
balance, created_at, updated_at, |
||||
|
rec_status, source) |
||||
|
values (#{id,jdbcType=BIGINT}, #{gradeId,jdbcType=BIGINT}, #{avatarUrl,jdbcType=VARCHAR}, |
||||
|
#{nickname,jdbcType=VARCHAR}, #{gender,jdbcType=TINYINT}, #{country,jdbcType=VARCHAR}, |
||||
|
#{province,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, #{language,jdbcType=VARCHAR}, |
||||
|
#{phone,jdbcType=VARCHAR}, #{wechat,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, |
||||
|
#{balance,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, |
||||
|
#{recStatus,jdbcType=TINYINT}, #{source,jdbcType=TINYINT}) |
||||
|
</insert> |
||||
|
<insert id="insertSelective" parameterType="com.ccsens.signin.bean.po.SysUser"> |
||||
|
insert into t_sys_user |
||||
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
|
<if test="id != null"> |
||||
|
id, |
||||
|
</if> |
||||
|
<if test="gradeId != null"> |
||||
|
grade_id, |
||||
|
</if> |
||||
|
<if test="avatarUrl != null"> |
||||
|
avatar_url, |
||||
|
</if> |
||||
|
<if test="nickname != null"> |
||||
|
nickname, |
||||
|
</if> |
||||
|
<if test="gender != null"> |
||||
|
gender, |
||||
|
</if> |
||||
|
<if test="country != null"> |
||||
|
country, |
||||
|
</if> |
||||
|
<if test="province != null"> |
||||
|
province, |
||||
|
</if> |
||||
|
<if test="city != null"> |
||||
|
city, |
||||
|
</if> |
||||
|
<if test="language != null"> |
||||
|
language, |
||||
|
</if> |
||||
|
<if test="phone != null"> |
||||
|
phone, |
||||
|
</if> |
||||
|
<if test="wechat != null"> |
||||
|
wechat, |
||||
|
</if> |
||||
|
<if test="email != null"> |
||||
|
email, |
||||
|
</if> |
||||
|
<if test="balance != null"> |
||||
|
balance, |
||||
|
</if> |
||||
|
<if test="createdAt != null"> |
||||
|
created_at, |
||||
|
</if> |
||||
|
<if test="updatedAt != null"> |
||||
|
updated_at, |
||||
|
</if> |
||||
|
<if test="recStatus != null"> |
||||
|
rec_status, |
||||
|
</if> |
||||
|
<if test="source != null"> |
||||
|
source, |
||||
|
</if> |
||||
|
</trim> |
||||
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||
|
<if test="id != null"> |
||||
|
#{id,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="gradeId != null"> |
||||
|
#{gradeId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="avatarUrl != null"> |
||||
|
#{avatarUrl,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="nickname != null"> |
||||
|
#{nickname,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="gender != null"> |
||||
|
#{gender,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
<if test="country != null"> |
||||
|
#{country,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="province != null"> |
||||
|
#{province,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="city != null"> |
||||
|
#{city,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="language != null"> |
||||
|
#{language,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="phone != null"> |
||||
|
#{phone,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="wechat != null"> |
||||
|
#{wechat,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="email != null"> |
||||
|
#{email,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="balance != null"> |
||||
|
#{balance,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="createdAt != null"> |
||||
|
#{createdAt,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="updatedAt != null"> |
||||
|
#{updatedAt,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="recStatus != null"> |
||||
|
#{recStatus,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
<if test="source != null"> |
||||
|
#{source,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
</trim> |
||||
|
</insert> |
||||
|
<select id="countByExample" parameterType="com.ccsens.signin.bean.po.SysUserExample" resultType="java.lang.Long"> |
||||
|
select count(*) from t_sys_user |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</select> |
||||
|
<update id="updateByExampleSelective" parameterType="map"> |
||||
|
update t_sys_user |
||||
|
<set> |
||||
|
<if test="record.id != null"> |
||||
|
id = #{record.id,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.gradeId != null"> |
||||
|
grade_id = #{record.gradeId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.avatarUrl != null"> |
||||
|
avatar_url = #{record.avatarUrl,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.nickname != null"> |
||||
|
nickname = #{record.nickname,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.gender != null"> |
||||
|
gender = #{record.gender,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
<if test="record.country != null"> |
||||
|
country = #{record.country,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.province != null"> |
||||
|
province = #{record.province,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.city != null"> |
||||
|
city = #{record.city,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.language != null"> |
||||
|
language = #{record.language,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.phone != null"> |
||||
|
phone = #{record.phone,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.wechat != null"> |
||||
|
wechat = #{record.wechat,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.email != null"> |
||||
|
email = #{record.email,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.balance != null"> |
||||
|
balance = #{record.balance,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.createdAt != null"> |
||||
|
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="record.updatedAt != null"> |
||||
|
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="record.recStatus != null"> |
||||
|
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
<if test="record.source != null"> |
||||
|
source = #{record.source,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
</set> |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Update_By_Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</update> |
||||
|
<update id="updateByExample" parameterType="map"> |
||||
|
update t_sys_user |
||||
|
set id = #{record.id,jdbcType=BIGINT}, |
||||
|
grade_id = #{record.gradeId,jdbcType=BIGINT}, |
||||
|
avatar_url = #{record.avatarUrl,jdbcType=VARCHAR}, |
||||
|
nickname = #{record.nickname,jdbcType=VARCHAR}, |
||||
|
gender = #{record.gender,jdbcType=TINYINT}, |
||||
|
country = #{record.country,jdbcType=VARCHAR}, |
||||
|
province = #{record.province,jdbcType=VARCHAR}, |
||||
|
city = #{record.city,jdbcType=VARCHAR}, |
||||
|
language = #{record.language,jdbcType=VARCHAR}, |
||||
|
phone = #{record.phone,jdbcType=VARCHAR}, |
||||
|
wechat = #{record.wechat,jdbcType=VARCHAR}, |
||||
|
email = #{record.email,jdbcType=VARCHAR}, |
||||
|
balance = #{record.balance,jdbcType=BIGINT}, |
||||
|
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
||||
|
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
||||
|
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
||||
|
source = #{record.source,jdbcType=TINYINT} |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Update_By_Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</update> |
||||
|
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.signin.bean.po.SysUser"> |
||||
|
update t_sys_user |
||||
|
<set> |
||||
|
<if test="gradeId != null"> |
||||
|
grade_id = #{gradeId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="avatarUrl != null"> |
||||
|
avatar_url = #{avatarUrl,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="nickname != null"> |
||||
|
nickname = #{nickname,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="gender != null"> |
||||
|
gender = #{gender,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
<if test="country != null"> |
||||
|
country = #{country,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="province != null"> |
||||
|
province = #{province,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="city != null"> |
||||
|
city = #{city,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="language != null"> |
||||
|
language = #{language,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="phone != null"> |
||||
|
phone = #{phone,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="wechat != null"> |
||||
|
wechat = #{wechat,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="email != null"> |
||||
|
email = #{email,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="balance != null"> |
||||
|
balance = #{balance,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="createdAt != null"> |
||||
|
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="updatedAt != null"> |
||||
|
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="recStatus != null"> |
||||
|
rec_status = #{recStatus,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
<if test="source != null"> |
||||
|
source = #{source,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
</set> |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</update> |
||||
|
<update id="updateByPrimaryKey" parameterType="com.ccsens.signin.bean.po.SysUser"> |
||||
|
update t_sys_user |
||||
|
set grade_id = #{gradeId,jdbcType=BIGINT}, |
||||
|
avatar_url = #{avatarUrl,jdbcType=VARCHAR}, |
||||
|
nickname = #{nickname,jdbcType=VARCHAR}, |
||||
|
gender = #{gender,jdbcType=TINYINT}, |
||||
|
country = #{country,jdbcType=VARCHAR}, |
||||
|
province = #{province,jdbcType=VARCHAR}, |
||||
|
city = #{city,jdbcType=VARCHAR}, |
||||
|
language = #{language,jdbcType=VARCHAR}, |
||||
|
phone = #{phone,jdbcType=VARCHAR}, |
||||
|
wechat = #{wechat,jdbcType=VARCHAR}, |
||||
|
email = #{email,jdbcType=VARCHAR}, |
||||
|
balance = #{balance,jdbcType=BIGINT}, |
||||
|
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
||||
|
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
||||
|
rec_status = #{recStatus,jdbcType=TINYINT}, |
||||
|
source = #{source,jdbcType=TINYINT} |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</update> |
||||
|
</mapper> |
@ -0,0 +1,62 @@ |
|||||
|
<?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> |
||||
|
<!-- 全局参数 --> |
||||
|
<settings> |
||||
|
<!-- 打印SQL语句 --> |
||||
|
<setting name="logImpl" value="STDOUT_LOGGING" /> |
||||
|
<!-- 使全局的映射器启用或禁用缓存。 --> |
||||
|
<setting name="cacheEnabled" value="true"/> |
||||
|
<!-- 全局启用或禁用延迟加载。当禁用时,所有关联对象都会即时加载。 --> |
||||
|
<setting name="lazyLoadingEnabled" value="true"/> |
||||
|
<!-- 当启用时,有延迟加载属性的对象在被调用时将会完全加载任意属性。否则,每种属性将会按需要加载。 --> |
||||
|
<setting name="aggressiveLazyLoading" value="true"/> |
||||
|
<!-- 是否允许单条sql 返回多个数据集 (取决于驱动的兼容性) default:true --> |
||||
|
<setting name="multipleResultSetsEnabled" value="true"/> |
||||
|
<!-- 是否可以使用列的别名 (取决于驱动的兼容性) default:true --> |
||||
|
<setting name="useColumnLabel" value="true"/> |
||||
|
<!-- 允许JDBC 生成主键。需要驱动器支持。如果设为了true,这个设置将强制使用被生成的主键,有一些驱动器不兼容不过仍然可以执行。 default:false --> |
||||
|
<setting name="useGeneratedKeys" value="true"/> |
||||
|
<!-- 指定 MyBatis 如何自动映射 数据基表的列 NONE:不隐射 PARTIAL:部分 FULL:全部 --> |
||||
|
<setting name="autoMappingBehavior" value="PARTIAL"/> |
||||
|
<!-- 这是默认的执行类型 (SIMPLE: 简单; REUSE: 执行器可能重复使用prepared statements语句;BATCH: 执行器可以重复执行语句和批量更新) --> |
||||
|
<setting name="defaultExecutorType" value="SIMPLE"/> |
||||
|
<!-- 使用驼峰命名法转换字段。 --> |
||||
|
<setting name="mapUnderscoreToCamelCase" value="true"/> |
||||
|
<!-- 设置本地缓存范围 session:就会有数据的共享 statement:语句范围 (这样就不会有数据的共享 ) defalut:session --> |
||||
|
<setting name="localCacheScope" value="SESSION"/> |
||||
|
<!-- 设置但JDBC类型为空时,某些驱动程序 要指定值,default:OTHER,插入空值时不需要指定类型 --> |
||||
|
<setting name="jdbcTypeForNull" value="NULL"/> |
||||
|
</settings> |
||||
|
|
||||
|
<typeAliases> |
||||
|
<typeAlias alias="Integer" type="java.lang.Integer" /> |
||||
|
<typeAlias alias="Long" type="java.lang.Long" /> |
||||
|
<typeAlias alias="HashMap" type="java.util.HashMap" /> |
||||
|
<typeAlias alias="LinkedHashMap" type="java.util.LinkedHashMap" /> |
||||
|
<typeAlias alias="ArrayList" type="java.util.ArrayList" /> |
||||
|
<typeAlias alias="LinkedList" type="java.util.LinkedList" /> |
||||
|
<typeAlias alias="String" type="java.lang.String" /> |
||||
|
</typeAliases> |
||||
|
|
||||
|
<plugins> |
||||
|
<!-- com.github.pagehelper为PageHelper类所在包名 --> |
||||
|
<plugin interceptor="com.github.pagehelper.PageHelper"> |
||||
|
<property name="dialect" value="mysql"/> |
||||
|
<!-- 该参数默认为false --> |
||||
|
<!-- 设置为true时,会将RowBounds第一个参数offset当成pageNum页码使用 --> |
||||
|
<!-- 和startPage中的pageNum效果一样--> |
||||
|
<property name="offsetAsPageNum" value="false"/> |
||||
|
<!-- 该参数默认为false --> |
||||
|
<!-- 设置为true时,使用RowBounds分页会进行count查询 --> |
||||
|
<property name="rowBoundsWithCount" value="false"/> |
||||
|
<property name="pageSizeZero" value="true"/> |
||||
|
<property name="reasonable" value="false"/> |
||||
|
<property name="supportMethodsArguments" value="false"/> |
||||
|
<property name="returnPageInfo" value="none"/> |
||||
|
</plugin> |
||||
|
</plugins> |
||||
|
</configuration> |
Loading…
Reference in new issue